]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge 3.16-rc4 into staging-next
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 00:59:07 +0000 (17:59 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Jul 2014 00:59:07 +0000 (17:59 -0700)
We want the staging tree fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
647 files changed:
Documentation/ABI/testing/sysfs-bus-iio
Documentation/ABI/testing/sysfs-bus-iio-trigger-sysfs [moved from drivers/staging/iio/Documentation/sysfs-bus-iio-trigger-sysfs with 100% similarity]
Documentation/devicetree/bindings/iio/adc/max1027-adc.txt [new file with mode: 0644]
Documentation/devicetree/bindings/iio/magnetometer/hmc5843.txt
MAINTAINERS
arch/mips/cavium-octeon/executive/cvmx-helper-sgmii.c
drivers/iio/accel/Kconfig
drivers/iio/accel/Makefile
drivers/iio/accel/kxcjk-1013.c [new file with mode: 0644]
drivers/iio/adc/Kconfig
drivers/iio/adc/Makefile
drivers/iio/adc/ad7298.c
drivers/iio/adc/ad7476.c
drivers/iio/adc/ad7887.c
drivers/iio/adc/ad799x.c
drivers/iio/adc/ad_sigma_delta.c
drivers/iio/adc/at91_adc.c
drivers/iio/adc/max1027.c [new file with mode: 0644]
drivers/iio/adc/xilinx-xadc-core.c
drivers/iio/dac/Kconfig
drivers/iio/dac/Makefile
drivers/iio/dac/ad5504.c
drivers/iio/dac/ad5791.c
drivers/iio/dac/mcp4922.c [new file with mode: 0644]
drivers/iio/industrialio-buffer.c
drivers/iio/industrialio-trigger.c
drivers/iio/light/cm32181.c
drivers/iio/light/gp2ap020a00f.c
drivers/iio/magnetometer/Kconfig
drivers/iio/magnetometer/Makefile
drivers/iio/magnetometer/ak09911.c [new file with mode: 0644]
drivers/iio/magnetometer/ak8975.c
drivers/iio/pressure/Kconfig
drivers/iio/pressure/Makefile
drivers/iio/pressure/t5403.c [new file with mode: 0644]
drivers/iio/proximity/as3935.c
drivers/iio/trigger/iio-trig-interrupt.c
drivers/iio/trigger/iio-trig-sysfs.c
drivers/staging/Kconfig
drivers/staging/Makefile
drivers/staging/android/Kconfig
drivers/staging/android/alarm-dev.c
drivers/staging/android/binder.c
drivers/staging/android/ion/ion_chunk_heap.c
drivers/staging/android/ion/ion_system_heap.c
drivers/staging/bcm/Bcmchar.c
drivers/staging/bcm/CmHost.c
drivers/staging/bcm/DDRInit.c
drivers/staging/bcm/HandleControlPacket.c
drivers/staging/bcm/InterfaceInit.c
drivers/staging/bcm/Misc.c
drivers/staging/bcm/PHSModule.c
drivers/staging/bcm/Prototypes.h
drivers/staging/bcm/Qos.c
drivers/staging/bcm/Queue.h
drivers/staging/bcm/hostmibs.c
drivers/staging/bcm/led_control.c
drivers/staging/bcm/led_control.h
drivers/staging/bcm/nvm.c
drivers/staging/board/Kconfig [new file with mode: 0644]
drivers/staging/board/Makefile [new file with mode: 0644]
drivers/staging/board/TODO [new file with mode: 0644]
drivers/staging/board/board.c [new file with mode: 0644]
drivers/staging/board/board.h [new file with mode: 0644]
drivers/staging/board/kzm9d.c [new file with mode: 0644]
drivers/staging/ced1401/usb1401.h
drivers/staging/ced1401/userspace/use1401.c
drivers/staging/comedi/Kconfig
drivers/staging/comedi/comedi.h
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi-data/addi_common.h
drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3120.c
drivers/staging/comedi/drivers/addi-data/hwdrv_apci3200.c
drivers/staging/comedi/drivers/addi_apci_035.c
drivers/staging/comedi/drivers/addi_apci_1500.c
drivers/staging/comedi/drivers/addi_apci_1564.c
drivers/staging/comedi/drivers/addi_apci_3120.c
drivers/staging/comedi/drivers/addi_apci_3200.c
drivers/staging/comedi/drivers/adl_pci9111.c
drivers/staging/comedi/drivers/adq12b.c
drivers/staging/comedi/drivers/das16m1.c
drivers/staging/comedi/drivers/das1800.c
drivers/staging/comedi/drivers/dt282x.c
drivers/staging/comedi/drivers/ke_counter.c
drivers/staging/comedi/drivers/mite.c
drivers/staging/comedi/drivers/mite.h
drivers/staging/comedi/drivers/ni_65xx.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_670x.c
drivers/staging/comedi/drivers/ni_atmio.c
drivers/staging/comedi/drivers/ni_daq_700.c
drivers/staging/comedi/drivers/ni_labpc_pci.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_mio_cs.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/ni_pcimio.c
drivers/staging/comedi/drivers/ni_stc.h
drivers/staging/comedi/drivers/pcl724.c
drivers/staging/comedi/drivers/pcl730.c
drivers/staging/comedi/drivers/pcl812.c
drivers/staging/comedi/drivers/pcl816.c
drivers/staging/comedi/drivers/s626.c
drivers/staging/comedi/drivers/s626.h
drivers/staging/cptm1217/clearpad_tm1217.c
drivers/staging/crystalhd/Kconfig [deleted file]
drivers/staging/crystalhd/Makefile [deleted file]
drivers/staging/crystalhd/TODO [deleted file]
drivers/staging/crystalhd/bc_dts_defs.h [deleted file]
drivers/staging/crystalhd/bc_dts_glob_lnx.h [deleted file]
drivers/staging/crystalhd/bcm_70012_regs.h [deleted file]
drivers/staging/crystalhd/crystalhd.h [deleted file]
drivers/staging/crystalhd/crystalhd_cmds.c [deleted file]
drivers/staging/crystalhd/crystalhd_cmds.h [deleted file]
drivers/staging/crystalhd/crystalhd_fw_if.h [deleted file]
drivers/staging/crystalhd/crystalhd_hw.c [deleted file]
drivers/staging/crystalhd/crystalhd_hw.h [deleted file]
drivers/staging/crystalhd/crystalhd_lnx.c [deleted file]
drivers/staging/crystalhd/crystalhd_lnx.h [deleted file]
drivers/staging/crystalhd/crystalhd_misc.c [deleted file]
drivers/staging/crystalhd/crystalhd_misc.h [deleted file]
drivers/staging/cxt1e1/Kconfig [deleted file]
drivers/staging/cxt1e1/Makefile [deleted file]
drivers/staging/cxt1e1/comet.c [deleted file]
drivers/staging/cxt1e1/comet.h [deleted file]
drivers/staging/cxt1e1/comet_tables.c [deleted file]
drivers/staging/cxt1e1/comet_tables.h [deleted file]
drivers/staging/cxt1e1/functions.c [deleted file]
drivers/staging/cxt1e1/hwprobe.c [deleted file]
drivers/staging/cxt1e1/libsbew.h [deleted file]
drivers/staging/cxt1e1/linux.c [deleted file]
drivers/staging/cxt1e1/musycc.c [deleted file]
drivers/staging/cxt1e1/musycc.h [deleted file]
drivers/staging/cxt1e1/pmc93x6_eeprom.c [deleted file]
drivers/staging/cxt1e1/pmc93x6_eeprom.h [deleted file]
drivers/staging/cxt1e1/pmcc4.h [deleted file]
drivers/staging/cxt1e1/pmcc4_cpld.h [deleted file]
drivers/staging/cxt1e1/pmcc4_defs.h [deleted file]
drivers/staging/cxt1e1/pmcc4_drv.c [deleted file]
drivers/staging/cxt1e1/pmcc4_ioctls.h [deleted file]
drivers/staging/cxt1e1/pmcc4_private.h [deleted file]
drivers/staging/cxt1e1/pmcc4_sysdep.h [deleted file]
drivers/staging/cxt1e1/sbe_bid.h [deleted file]
drivers/staging/cxt1e1/sbe_promformat.h [deleted file]
drivers/staging/cxt1e1/sbecom_inline_linux.h [deleted file]
drivers/staging/cxt1e1/sbecrc.c [deleted file]
drivers/staging/cxt1e1/sbeid.c [deleted file]
drivers/staging/cxt1e1/sbeproc.c [deleted file]
drivers/staging/cxt1e1/sbeproc.h [deleted file]
drivers/staging/cxt1e1/sbew_ioc.h [deleted file]
drivers/staging/dgap/dgap.c
drivers/staging/dgap/dgap.h
drivers/staging/dgnc/dgnc_driver.c
drivers/staging/dgrp/Kconfig [deleted file]
drivers/staging/dgrp/Makefile [deleted file]
drivers/staging/dgrp/README [deleted file]
drivers/staging/dgrp/TODO [deleted file]
drivers/staging/dgrp/dgrp_common.c [deleted file]
drivers/staging/dgrp/dgrp_common.h [deleted file]
drivers/staging/dgrp/dgrp_dpa_ops.c [deleted file]
drivers/staging/dgrp/dgrp_driver.c [deleted file]
drivers/staging/dgrp/dgrp_mon_ops.c [deleted file]
drivers/staging/dgrp/dgrp_net_ops.c [deleted file]
drivers/staging/dgrp/dgrp_ports_ops.c [deleted file]
drivers/staging/dgrp/dgrp_specproc.c [deleted file]
drivers/staging/dgrp/dgrp_sysfs.c [deleted file]
drivers/staging/dgrp/dgrp_tty.c [deleted file]
drivers/staging/dgrp/digirp.h [deleted file]
drivers/staging/dgrp/drp.h [deleted file]
drivers/staging/emxx_udc/Kconfig [new file with mode: 0644]
drivers/staging/emxx_udc/Makefile [new file with mode: 0644]
drivers/staging/emxx_udc/TODO [new file with mode: 0644]
drivers/staging/emxx_udc/emxx_udc.c [new file with mode: 0644]
drivers/staging/emxx_udc/emxx_udc.h [new file with mode: 0644]
drivers/staging/ft1000/ft1000-pcmcia/ft1000_dnld.c
drivers/staging/fwserial/fwserial.c
drivers/staging/gdm724x/gdm_lte.c
drivers/staging/gdm72xx/gdm_qos.c
drivers/staging/gdm72xx/gdm_qos.h
drivers/staging/gdm72xx/gdm_sdio.c
drivers/staging/gdm72xx/gdm_usb.c
drivers/staging/gdm72xx/gdm_wimax.c
drivers/staging/gdm72xx/hci.h
drivers/staging/goldfish/goldfish_audio.c
drivers/staging/iio/Documentation/generic_buffer.c
drivers/staging/iio/Documentation/iio_event_monitor.c
drivers/staging/iio/Documentation/iio_utils.h
drivers/staging/iio/Documentation/trigger.txt
drivers/staging/iio/accel/lis3l02dq_ring.c
drivers/staging/iio/accel/sca3000_ring.c
drivers/staging/iio/adc/mxs-lradc.c
drivers/staging/iio/frequency/ad9832.c
drivers/staging/iio/frequency/ad9850.c
drivers/staging/iio/iio_simple_dummy.c
drivers/staging/iio/magnetometer/hmc5843.c
drivers/staging/iio/meter/ade7758_trigger.c
drivers/staging/iio/trigger/iio-trig-bfin-timer.c
drivers/staging/iio/trigger/iio-trig-periodic-rtc.c
drivers/staging/keucr/usb.c
drivers/staging/line6/driver.c
drivers/staging/lustre/include/linux/lnet/lib-types.h
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
drivers/staging/lustre/lnet/lnet/api-ni.c
drivers/staging/lustre/lnet/lnet/lib-md.c
drivers/staging/lustre/lnet/lnet/lib-me.c
drivers/staging/lustre/lnet/lnet/lib-move.c
drivers/staging/lustre/lnet/lnet/router.c
drivers/staging/lustre/lnet/selftest/console.c
drivers/staging/lustre/lnet/selftest/framework.c
drivers/staging/lustre/lustre/Kconfig
drivers/staging/lustre/lustre/fid/lproc_fid.c
drivers/staging/lustre/lustre/fld/fld_request.c
drivers/staging/lustre/lustre/fld/lproc_fld.c
drivers/staging/lustre/lustre/include/lustre_dlm.h
drivers/staging/lustre/lustre/include/lustre_net.h
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/include/obd_ost.h
drivers/staging/lustre/lustre/lclient/glimpse.c
drivers/staging/lustre/lustre/lclient/lcommon_cl.c
drivers/staging/lustre/lustre/lclient/lcommon_misc.c
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
drivers/staging/lustre/lustre/ldlm/ldlm_request.c
drivers/staging/lustre/lustre/ldlm/ldlm_resource.c
drivers/staging/lustre/lustre/libcfs/fail.c
drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
drivers/staging/lustre/lustre/llite/dir.c
drivers/staging/lustre/lustre/llite/file.c
drivers/staging/lustre/lustre/llite/llite_capa.c
drivers/staging/lustre/lustre/llite/llite_lib.c
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/lustre/lustre/llite/vvp_io.c
drivers/staging/lustre/lustre/llite/xattr.c
drivers/staging/lustre/lustre/lmv/lmv_obd.c
drivers/staging/lustre/lustre/lov/lov_internal.h
drivers/staging/lustre/lustre/lov/lov_request.c
drivers/staging/lustre/lustre/mgc/mgc_request.c
drivers/staging/lustre/lustre/obdclass/capa.c
drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c
drivers/staging/lustre/lustre/obdclass/obd_mount.c
drivers/staging/lustre/lustre/obdecho/lproc_echo.c
drivers/staging/lustre/lustre/osc/osc_cache.c
drivers/staging/lustre/lustre/osc/osc_dev.c
drivers/staging/lustre/lustre/osc/osc_internal.h
drivers/staging/lustre/lustre/osc/osc_page.c
drivers/staging/lustre/lustre/osc/osc_request.c
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/events.c
drivers/staging/lustre/lustre/ptlrpc/gss/sec_gss.c
drivers/staging/lustre/lustre/ptlrpc/import.c
drivers/staging/lustre/lustre/ptlrpc/niobuf.c
drivers/staging/lustre/lustre/ptlrpc/pinger.c
drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c
drivers/staging/lustre/lustre/ptlrpc/sec_null.c
drivers/staging/lustre/lustre/ptlrpc/sec_plain.c
drivers/staging/lustre/lustre/ptlrpc/service.c
drivers/staging/media/lirc/lirc_sir.c
drivers/staging/media/sn9c102/Kconfig
drivers/staging/nokia_h4p/nokia_core.c
drivers/staging/octeon/ethernet-mdio.c
drivers/staging/octeon/ethernet-mem.c
drivers/staging/octeon/ethernet-rgmii.c
drivers/staging/octeon/ethernet-sgmii.c
drivers/staging/octeon/ethernet-xaui.c
drivers/staging/octeon/ethernet.c
drivers/staging/octeon/octeon-ethernet.h
drivers/staging/rtl8188eu/Makefile
drivers/staging/rtl8188eu/core/rtw_ap.c
drivers/staging/rtl8188eu/core/rtw_br_ext.c [deleted file]
drivers/staging/rtl8188eu/core/rtw_cmd.c
drivers/staging/rtl8188eu/core/rtw_debug.c
drivers/staging/rtl8188eu/core/rtw_efuse.c
drivers/staging/rtl8188eu/core/rtw_ieee80211.c
drivers/staging/rtl8188eu/core/rtw_io.c [deleted file]
drivers/staging/rtl8188eu/core/rtw_ioctl_set.c
drivers/staging/rtl8188eu/core/rtw_led.c
drivers/staging/rtl8188eu/core/rtw_mlme.c
drivers/staging/rtl8188eu/core/rtw_mlme_ext.c
drivers/staging/rtl8188eu/core/rtw_mp.c
drivers/staging/rtl8188eu/core/rtw_mp_ioctl.c
drivers/staging/rtl8188eu/core/rtw_p2p.c
drivers/staging/rtl8188eu/core/rtw_pwrctrl.c
drivers/staging/rtl8188eu/core/rtw_recv.c
drivers/staging/rtl8188eu/core/rtw_security.c
drivers/staging/rtl8188eu/core/rtw_sreset.c
drivers/staging/rtl8188eu/core/rtw_sta_mgt.c
drivers/staging/rtl8188eu/core/rtw_wlan_util.c
drivers/staging/rtl8188eu/core/rtw_xmit.c
drivers/staging/rtl8188eu/hal/Hal8188ERateAdaptive.c
drivers/staging/rtl8188eu/hal/HalPhyRf.c [deleted file]
drivers/staging/rtl8188eu/hal/HalPhyRf_8188e.c
drivers/staging/rtl8188eu/hal/HalPwrSeqCmd.c
drivers/staging/rtl8188eu/hal/hal_com.c
drivers/staging/rtl8188eu/hal/hal_intf.c
drivers/staging/rtl8188eu/hal/odm.c
drivers/staging/rtl8188eu/hal/odm_RegConfig8188E.c
drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c
drivers/staging/rtl8188eu/hal/rtl8188e_dm.c
drivers/staging/rtl8188eu/hal/rtl8188e_hal_init.c
drivers/staging/rtl8188eu/hal/rtl8188e_mp.c
drivers/staging/rtl8188eu/hal/rtl8188e_phycfg.c
drivers/staging/rtl8188eu/hal/rtl8188e_rf6052.c
drivers/staging/rtl8188eu/hal/rtl8188e_rxdesc.c
drivers/staging/rtl8188eu/hal/rtl8188e_sreset.c [deleted file]
drivers/staging/rtl8188eu/hal/rtl8188eu_led.c
drivers/staging/rtl8188eu/hal/rtl8188eu_recv.c
drivers/staging/rtl8188eu/hal/rtl8188eu_xmit.c
drivers/staging/rtl8188eu/hal/usb_halinit.c
drivers/staging/rtl8188eu/hal/usb_ops_linux.c [deleted file]
drivers/staging/rtl8188eu/include/Hal8188EReg.h [deleted file]
drivers/staging/rtl8188eu/include/HalPhyRf.h [deleted file]
drivers/staging/rtl8188eu/include/HalPhyRf_8188e.h
drivers/staging/rtl8188eu/include/drv_types.h
drivers/staging/rtl8188eu/include/hal_intf.h
drivers/staging/rtl8188eu/include/odm_precomp.h
drivers/staging/rtl8188eu/include/osdep_intf.h
drivers/staging/rtl8188eu/include/osdep_service.h
drivers/staging/rtl8188eu/include/recv_osdep.h
drivers/staging/rtl8188eu/include/rtl8188e_cmd.h
drivers/staging/rtl8188eu/include/rtl8188e_hal.h
drivers/staging/rtl8188eu/include/rtl8188e_sreset.h [deleted file]
drivers/staging/rtl8188eu/include/rtl8188e_xmit.h
drivers/staging/rtl8188eu/include/rtw_br_ext.h [deleted file]
drivers/staging/rtl8188eu/include/rtw_cmd.h
drivers/staging/rtl8188eu/include/rtw_debug.h
drivers/staging/rtl8188eu/include/rtw_efuse.h
drivers/staging/rtl8188eu/include/rtw_io.h [deleted file]
drivers/staging/rtl8188eu/include/rtw_sreset.h
drivers/staging/rtl8188eu/include/rtw_version.h [deleted file]
drivers/staging/rtl8188eu/include/usb_ops.h [deleted file]
drivers/staging/rtl8188eu/include/usb_ops_linux.h
drivers/staging/rtl8188eu/include/usb_osintf.h
drivers/staging/rtl8188eu/include/usb_vendor_req.h [deleted file]
drivers/staging/rtl8188eu/os_dep/ioctl_linux.c
drivers/staging/rtl8188eu/os_dep/mlme_linux.c
drivers/staging/rtl8188eu/os_dep/os_intfs.c
drivers/staging/rtl8188eu/os_dep/osdep_service.c
drivers/staging/rtl8188eu/os_dep/recv_linux.c
drivers/staging/rtl8188eu/os_dep/usb_intf.c
drivers/staging/rtl8188eu/os_dep/usb_ops_linux.c
drivers/staging/rtl8188eu/os_dep/xmit_linux.c
drivers/staging/rtl8192e/dot11d.c
drivers/staging/rtl8192e/rtllib_module.c
drivers/staging/rtl8192ee/Kconfig
drivers/staging/rtl8192ee/base.c
drivers/staging/rtl8192ee/base.h
drivers/staging/rtl8192ee/btcoexist/halbtc8821a2ant.c
drivers/staging/rtl8192ee/btcoexist/halbtcoutsrc.h
drivers/staging/rtl8192u/ieee80211/ieee80211.h
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/ieee80211/ieee80211_tx.c
drivers/staging/rtl8192u/r8192U_core.c
drivers/staging/rtl8192u/r8192U_wx.c
drivers/staging/rtl8712/drv_types.h
drivers/staging/rtl8712/hal_init.c
drivers/staging/rtl8712/ieee80211.h
drivers/staging/rtl8712/os_intfs.c
drivers/staging/rtl8712/osdep_service.h
drivers/staging/rtl8712/rtl8712_cmd.c
drivers/staging/rtl8712/rtl8712_recv.c
drivers/staging/rtl8712/rtl8712_xmit.c
drivers/staging/rtl8712/rtl871x_cmd.c
drivers/staging/rtl8712/rtl871x_cmd.h
drivers/staging/rtl8712/rtl871x_io.c
drivers/staging/rtl8712/rtl871x_ioctl_linux.c
drivers/staging/rtl8712/rtl871x_ioctl_set.c
drivers/staging/rtl8712/rtl871x_mlme.c
drivers/staging/rtl8712/rtl871x_mp.c
drivers/staging/rtl8712/rtl871x_recv.c
drivers/staging/rtl8712/rtl871x_sta_mgt.c
drivers/staging/rtl8712/rtl871x_xmit.c
drivers/staging/rtl8712/usb_intf.c
drivers/staging/rtl8723au/Makefile
drivers/staging/rtl8723au/core/rtw_ap.c
drivers/staging/rtl8723au/core/rtw_cmd.c
drivers/staging/rtl8723au/core/rtw_ieee80211.c
drivers/staging/rtl8723au/core/rtw_ioctl_set.c [deleted file]
drivers/staging/rtl8723au/core/rtw_mlme.c
drivers/staging/rtl8723au/core/rtw_mlme_ext.c
drivers/staging/rtl8723au/core/rtw_pwrctrl.c
drivers/staging/rtl8723au/core/rtw_sreset.c
drivers/staging/rtl8723au/core/rtw_sta_mgt.c
drivers/staging/rtl8723au/core/rtw_wlan_util.c
drivers/staging/rtl8723au/hal/rtl8723a_bt-coexist.c
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c
drivers/staging/rtl8723au/hal/rtl8723a_hal_init.c
drivers/staging/rtl8723au/hal/rtl8723a_sreset.c
drivers/staging/rtl8723au/hal/rtl8723a_xmit.c
drivers/staging/rtl8723au/hal/usb_halinit.c
drivers/staging/rtl8723au/hal/usb_ops_linux.c
drivers/staging/rtl8723au/include/drv_types.h
drivers/staging/rtl8723au/include/ieee80211.h
drivers/staging/rtl8723au/include/ioctl_cfg80211.h
drivers/staging/rtl8723au/include/rtl8723a_cmd.h
drivers/staging/rtl8723au/include/rtl8723a_sreset.h
drivers/staging/rtl8723au/include/rtl8723a_xmit.h
drivers/staging/rtl8723au/include/rtw_ap.h
drivers/staging/rtl8723au/include/rtw_debug.h
drivers/staging/rtl8723au/include/rtw_event.h
drivers/staging/rtl8723au/include/rtw_ht.h
drivers/staging/rtl8723au/include/rtw_ioctl_set.h [deleted file]
drivers/staging/rtl8723au/include/rtw_mlme.h
drivers/staging/rtl8723au/include/rtw_mlme_ext.h
drivers/staging/rtl8723au/include/rtw_pwrctrl.h
drivers/staging/rtl8723au/include/rtw_rf.h
drivers/staging/rtl8723au/include/rtw_security.h
drivers/staging/rtl8723au/include/rtw_sreset.h
drivers/staging/rtl8723au/include/sta_info.h
drivers/staging/rtl8723au/include/wifi.h
drivers/staging/rtl8723au/include/wlan_bssdef.h
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c
drivers/staging/rtl8723au/os_dep/mlme_linux.c
drivers/staging/rtl8723au/os_dep/os_intfs.c
drivers/staging/rtl8723au/os_dep/usb_intf.c
drivers/staging/rtl8723au/os_dep/usb_ops_linux.c
drivers/staging/rtl8821ae/Kconfig
drivers/staging/rtl8821ae/btcoexist/HalBtc8812a1Ant.c
drivers/staging/rtl8821ae/ps.c
drivers/staging/rtl8821ae/rtl8821ae/hal_btc.c
drivers/staging/rtl8821ae/rtl8821ae/hw.c
drivers/staging/rtl8821ae/rtl8821ae/reg.h
drivers/staging/sep/sep_crypto.c
drivers/staging/serqt_usb2/Kconfig [deleted file]
drivers/staging/serqt_usb2/Makefile [deleted file]
drivers/staging/serqt_usb2/serqt_usb2.c [deleted file]
drivers/staging/skein/skein_iv.h
drivers/staging/slicoss/slicoss.c
drivers/staging/speakup/main.c
drivers/staging/tidspbridge/core/chnl_sm.c
drivers/staging/tidspbridge/core/io_sm.c
drivers/staging/tidspbridge/core/tiomap3430.c
drivers/staging/tidspbridge/core/tiomap_io.c
drivers/staging/tidspbridge/core/wdt.c
drivers/staging/tidspbridge/dynload/cload.c
drivers/staging/tidspbridge/dynload/reloc.c
drivers/staging/tidspbridge/include/dspbridge/dblldefs.h
drivers/staging/tidspbridge/pmgr/chnl.c
drivers/staging/tidspbridge/pmgr/dspapi.c
drivers/staging/tidspbridge/rmgr/dbdcd.c
drivers/staging/tidspbridge/rmgr/drv_interface.c
drivers/staging/tidspbridge/rmgr/nldr.c
drivers/staging/tidspbridge/rmgr/node.c
drivers/staging/tidspbridge/rmgr/proc.c
drivers/staging/unisys/Kconfig
drivers/staging/unisys/channels/Makefile
drivers/staging/unisys/include/guestlinuxdebug.h
drivers/staging/unisys/include/vbushelper.h
drivers/staging/unisys/uislib/Makefile
drivers/staging/unisys/uislib/uisutils.c
drivers/staging/unisys/virthba/Makefile
drivers/staging/unisys/virthba/virthba.c
drivers/staging/unisys/virtpci/Makefile
drivers/staging/unisys/virtpci/virtpci.c
drivers/staging/unisys/virtpci/virtpci.h
drivers/staging/unisys/visorchannel/Makefile
drivers/staging/unisys/visorchipset/Makefile
drivers/staging/unisys/visorchipset/visorchipset_main.c
drivers/staging/unisys/visorutil/Makefile
drivers/staging/usbip/userspace/libsrc/usbip_host_driver.c
drivers/staging/usbip/vhci_hcd.c
drivers/staging/vt6655/baseband.c
drivers/staging/vt6655/card.c
drivers/staging/vt6655/device.h
drivers/staging/vt6655/device_main.c
drivers/staging/vt6655/dpc.c
drivers/staging/vt6655/iwctl.c
drivers/staging/vt6655/iwctl.h
drivers/staging/vt6655/vntwifi.c
drivers/staging/vt6655/wmgr.c
drivers/staging/vt6656/80211hdr.h [deleted file]
drivers/staging/vt6656/80211mgr.c [deleted file]
drivers/staging/vt6656/80211mgr.h [deleted file]
drivers/staging/vt6656/Kconfig
drivers/staging/vt6656/Makefile
drivers/staging/vt6656/baseband.c
drivers/staging/vt6656/baseband.h
drivers/staging/vt6656/bssdb.c [deleted file]
drivers/staging/vt6656/bssdb.h [deleted file]
drivers/staging/vt6656/card.c
drivers/staging/vt6656/card.h
drivers/staging/vt6656/channel.c
drivers/staging/vt6656/channel.h
drivers/staging/vt6656/country.h [deleted file]
drivers/staging/vt6656/datarate.c [deleted file]
drivers/staging/vt6656/datarate.h [deleted file]
drivers/staging/vt6656/desc.h
drivers/staging/vt6656/device.h
drivers/staging/vt6656/dpc.c
drivers/staging/vt6656/dpc.h
drivers/staging/vt6656/firmware.c
drivers/staging/vt6656/firmware.h
drivers/staging/vt6656/int.c
drivers/staging/vt6656/iocmd.h [deleted file]
drivers/staging/vt6656/iowpa.h [deleted file]
drivers/staging/vt6656/iwctl.c [deleted file]
drivers/staging/vt6656/iwctl.h [deleted file]
drivers/staging/vt6656/key.c
drivers/staging/vt6656/key.h
drivers/staging/vt6656/mac.c
drivers/staging/vt6656/mac.h
drivers/staging/vt6656/main_usb.c
drivers/staging/vt6656/michael.c [deleted file]
drivers/staging/vt6656/michael.h [deleted file]
drivers/staging/vt6656/power.c
drivers/staging/vt6656/power.h
drivers/staging/vt6656/rc4.c [deleted file]
drivers/staging/vt6656/rc4.h [deleted file]
drivers/staging/vt6656/rf.c
drivers/staging/vt6656/rxtx.c
drivers/staging/vt6656/rxtx.h
drivers/staging/vt6656/tether.c [deleted file]
drivers/staging/vt6656/tether.h [deleted file]
drivers/staging/vt6656/tkip.c [deleted file]
drivers/staging/vt6656/tkip.h [deleted file]
drivers/staging/vt6656/tmacro.h [deleted file]
drivers/staging/vt6656/usbpipe.c
drivers/staging/vt6656/vntconfiguration.dat [deleted file]
drivers/staging/vt6656/wcmd.c
drivers/staging/vt6656/wcmd.h
drivers/staging/vt6656/wctl.c [deleted file]
drivers/staging/vt6656/wctl.h [deleted file]
drivers/staging/vt6656/wmgr.c [deleted file]
drivers/staging/vt6656/wmgr.h [deleted file]
drivers/staging/vt6656/wpa.c [deleted file]
drivers/staging/vt6656/wpa.h [deleted file]
drivers/staging/vt6656/wpa2.c [deleted file]
drivers/staging/vt6656/wpa2.h [deleted file]
drivers/staging/vt6656/wpactl.c [deleted file]
drivers/staging/vt6656/wpactl.h [deleted file]
drivers/staging/winbond/Kconfig [deleted file]
drivers/staging/winbond/Makefile [deleted file]
drivers/staging/winbond/TODO [deleted file]
drivers/staging/winbond/core.h [deleted file]
drivers/staging/winbond/localpara.h [deleted file]
drivers/staging/winbond/mac_structures.h [deleted file]
drivers/staging/winbond/mds.c [deleted file]
drivers/staging/winbond/mds_f.h [deleted file]
drivers/staging/winbond/mds_s.h [deleted file]
drivers/staging/winbond/mto.c [deleted file]
drivers/staging/winbond/mto.h [deleted file]
drivers/staging/winbond/phy_calibration.c [deleted file]
drivers/staging/winbond/phy_calibration.h [deleted file]
drivers/staging/winbond/reg.c [deleted file]
drivers/staging/winbond/sme_api.h [deleted file]
drivers/staging/winbond/wb35reg.c [deleted file]
drivers/staging/winbond/wb35reg_f.h [deleted file]
drivers/staging/winbond/wb35reg_s.h [deleted file]
drivers/staging/winbond/wb35rx.c [deleted file]
drivers/staging/winbond/wb35rx_f.h [deleted file]
drivers/staging/winbond/wb35rx_s.h [deleted file]
drivers/staging/winbond/wb35tx.c [deleted file]
drivers/staging/winbond/wb35tx_f.h [deleted file]
drivers/staging/winbond/wb35tx_s.h [deleted file]
drivers/staging/winbond/wbhal.h [deleted file]
drivers/staging/winbond/wbusb.c [deleted file]
drivers/staging/wlags49_h2/Kconfig [deleted file]
drivers/staging/wlags49_h2/Makefile [deleted file]
drivers/staging/wlags49_h2/README.ubuntu [deleted file]
drivers/staging/wlags49_h2/README.wlags49 [deleted file]
drivers/staging/wlags49_h2/TODO [deleted file]
drivers/staging/wlags49_h2/WARNING.txt [deleted file]
drivers/staging/wlags49_h2/ap_h2.c [deleted file]
drivers/staging/wlags49_h2/ap_h25.c [deleted file]
drivers/staging/wlags49_h2/debug.h [deleted file]
drivers/staging/wlags49_h2/dhf.c [deleted file]
drivers/staging/wlags49_h2/dhf.h [deleted file]
drivers/staging/wlags49_h2/dhfcfg.h [deleted file]
drivers/staging/wlags49_h2/hcf.c [deleted file]
drivers/staging/wlags49_h2/hcf.h [deleted file]
drivers/staging/wlags49_h2/hcfcfg.h [deleted file]
drivers/staging/wlags49_h2/hcfdef.h [deleted file]
drivers/staging/wlags49_h2/man/wlags49.4 [deleted file]
drivers/staging/wlags49_h2/mdd.h [deleted file]
drivers/staging/wlags49_h2/mmd.c [deleted file]
drivers/staging/wlags49_h2/mmd.h [deleted file]
drivers/staging/wlags49_h2/sta_h2.c [deleted file]
drivers/staging/wlags49_h2/sta_h25.c [deleted file]
drivers/staging/wlags49_h2/wl_cs.c [deleted file]
drivers/staging/wlags49_h2/wl_cs.h [deleted file]
drivers/staging/wlags49_h2/wl_enc.c [deleted file]
drivers/staging/wlags49_h2/wl_enc.h [deleted file]
drivers/staging/wlags49_h2/wl_if.h [deleted file]
drivers/staging/wlags49_h2/wl_internal.h [deleted file]
drivers/staging/wlags49_h2/wl_main.c [deleted file]
drivers/staging/wlags49_h2/wl_main.h [deleted file]
drivers/staging/wlags49_h2/wl_netdev.c [deleted file]
drivers/staging/wlags49_h2/wl_netdev.h [deleted file]
drivers/staging/wlags49_h2/wl_priv.c [deleted file]
drivers/staging/wlags49_h2/wl_priv.h [deleted file]
drivers/staging/wlags49_h2/wl_profile.c [deleted file]
drivers/staging/wlags49_h2/wl_profile.h [deleted file]
drivers/staging/wlags49_h2/wl_util.c [deleted file]
drivers/staging/wlags49_h2/wl_util.h [deleted file]
drivers/staging/wlags49_h2/wl_version.h [deleted file]
drivers/staging/wlags49_h2/wl_wext.c [deleted file]
drivers/staging/wlags49_h2/wl_wext.h [deleted file]
drivers/staging/wlags49_h25/Kconfig [deleted file]
drivers/staging/wlags49_h25/Makefile [deleted file]
drivers/staging/wlags49_h25/README.txt [deleted file]
drivers/staging/wlags49_h25/TODO [deleted file]
drivers/staging/wlags49_h25/ap_h25.c [deleted file]
drivers/staging/wlags49_h25/debug.h [deleted file]
drivers/staging/wlags49_h25/dhf.c [deleted file]
drivers/staging/wlags49_h25/dhf.h [deleted file]
drivers/staging/wlags49_h25/dhfcfg.h [deleted file]
drivers/staging/wlags49_h25/hcf.c [deleted file]
drivers/staging/wlags49_h25/hcf.h [deleted file]
drivers/staging/wlags49_h25/hcfcfg.h [deleted file]
drivers/staging/wlags49_h25/hcfdef.h [deleted file]
drivers/staging/wlags49_h25/mdd.h [deleted file]
drivers/staging/wlags49_h25/mmd.c [deleted file]
drivers/staging/wlags49_h25/mmd.h [deleted file]
drivers/staging/wlags49_h25/sta_h25.c [deleted file]
drivers/staging/wlags49_h25/wl_cs.c [deleted file]
drivers/staging/wlags49_h25/wl_cs.h [deleted file]
drivers/staging/wlags49_h25/wl_enc.c [deleted file]
drivers/staging/wlags49_h25/wl_enc.h [deleted file]
drivers/staging/wlags49_h25/wl_if.h [deleted file]
drivers/staging/wlags49_h25/wl_internal.h [deleted file]
drivers/staging/wlags49_h25/wl_main.c [deleted file]
drivers/staging/wlags49_h25/wl_main.h [deleted file]
drivers/staging/wlags49_h25/wl_netdev.c [deleted file]
drivers/staging/wlags49_h25/wl_netdev.h [deleted file]
drivers/staging/wlags49_h25/wl_priv.c [deleted file]
drivers/staging/wlags49_h25/wl_priv.h [deleted file]
drivers/staging/wlags49_h25/wl_profile.c [deleted file]
drivers/staging/wlags49_h25/wl_profile.h [deleted file]
drivers/staging/wlags49_h25/wl_util.c [deleted file]
drivers/staging/wlags49_h25/wl_util.h [deleted file]
drivers/staging/wlags49_h25/wl_version.h [deleted file]
drivers/staging/wlags49_h25/wl_wext.c [deleted file]
drivers/staging/wlags49_h25/wl_wext.h [deleted file]
drivers/staging/wlan-ng/cfg80211.c
drivers/staging/wlan-ng/hfa384x_usb.c
drivers/staging/wlan-ng/prism2mgmt.c
drivers/staging/wlan-ng/prism2mib.c
drivers/staging/wlan-ng/prism2sta.c
drivers/staging/xillybus/xillybus.h
drivers/staging/xillybus/xillybus_core.c
drivers/staging/xillybus/xillybus_of.c
drivers/staging/xillybus/xillybus_pcie.c
include/linux/iio/accel/kxcjk_1013.h [new file with mode: 0644]
include/linux/iio/trigger.h
kernel/time/alarmtimer.c

index a9757dcf2e813a50720dfc1a4f5094be596f9eaa..738b56f862b455a904517103301125f7c723a0a3 100644 (file)
@@ -895,6 +895,19 @@ Description:
                on-chip EEPROM. After power-up or chip reset the device will
                automatically load the saved configuration.
 
+What:          /sys/.../iio:deviceX/in_proximity_raw
+What:          /sys/.../iio:deviceX/in_proximity_input
+What:          /sys/.../iio:deviceX/in_proximityY_raw
+KernelVersion: 3.4
+Contact:       linux-iio@vger.kernel.org
+Description:
+               Proximity measurement indicating that some
+               object is near the sensor, usually be observing
+               reflectivity of infrared or ultrasound emitted.
+               Often these sensors are unit less and as such conversion
+               to SI units is not possible.  Where it is, the units should
+               be meters.
+
 What:          /sys/.../iio:deviceX/in_illuminanceY_input
 What:          /sys/.../iio:deviceX/in_illuminanceY_raw
 What:          /sys/.../iio:deviceX/in_illuminanceY_mean_raw
diff --git a/Documentation/devicetree/bindings/iio/adc/max1027-adc.txt b/Documentation/devicetree/bindings/iio/adc/max1027-adc.txt
new file mode 100644 (file)
index 0000000..a8770cc
--- /dev/null
@@ -0,0 +1,22 @@
+* Maxim 1027/1029/1031 Analog to Digital Converter (ADC)
+
+Required properties:
+  - compatible: Should be "maxim,max1027" or "maxim,max1029" or "maxim,max1031"
+  - reg: SPI chip select number for the device
+  - interrupt-parent: phandle to the parent interrupt controller
+  see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+  - interrupts: IRQ line for the ADC
+  see: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
+
+Recommended properties:
+- spi-max-frequency: Definition as per
+                     Documentation/devicetree/bindings/spi/spi-bus.txt
+
+Example:
+adc@0 {
+       compatible = "maxim,max1027";
+       reg = <0>;
+       interrupt-parent = <&gpio5>;
+       interrupts = <15 IRQ_TYPE_EDGE_RISING>;
+       spi-max-frequency = <1000000>;
+};
index 90d5f34db04e2af845a142969a8b22a1125e18a1..b8cbdd517abc507f4b57d528ca4dd3bd19eacadd 100644 (file)
@@ -3,6 +3,9 @@
 Required properties:
 
   - compatible : should be "honeywell,hmc5843"
+  Other models which are supported with driver are:
+       "honeywell,hmc5883"
+       "honeywell,hmc5883l"
   - reg : the I2C address of the magnetometer - typically 0x1e
 
 Optional properties:
index 6813d0aa5ecf5c48868c6050532086b1c15f2b85..0782374db6d6600c8cbfda53168e6f7f9c4ccee1 100644 (file)
@@ -8511,12 +8511,6 @@ L:       devel@driverdev.osuosl.org
 S:     Supported
 F:     drivers/staging/
 
-STAGING - AGERE HERMES II and II.5 WIRELESS DRIVERS
-M:     Henk de Groot <pe1dnn@amsat.org>
-S:     Odd Fixes
-F:     drivers/staging/wlags49_h2/
-F:     drivers/staging/wlags49_h25/
-
 STAGING - ASUS OLED
 M:     Jakub Schmidtke <sjakub@gmail.com>
 S:     Odd Fixes
@@ -8528,14 +8522,6 @@ M:       H Hartley Sweeten <hsweeten@visionengravers.com>
 S:     Odd Fixes
 F:     drivers/staging/comedi/
 
-STAGING - CRYSTAL HD VIDEO DECODER
-M:     Naren Sankar <nsankar@broadcom.com>
-M:     Jarod Wilson <jarod@wilsonet.com>
-M:     Scott Davilla <davilla@4pi.com>
-M:     Manu Abraham <abraham.manu@gmail.com>
-S:     Odd Fixes
-F:     drivers/staging/crystalhd/
-
 STAGING - ECHO CANCELLER
 M:     Steve Underwood <steveu@coppice.org>
 M:     David Rowe <david@rowetel.com>
@@ -8654,11 +8640,6 @@ M:       Forest Bond <forest@alittletooquiet.net>
 S:     Odd Fixes
 F:     drivers/staging/vt665?/
 
-STAGING - WINBOND IS89C35 WLAN USB DRIVER
-M:     Pavel Machek <pavel@ucw.cz>
-S:     Odd Fixes
-F:     drivers/staging/winbond/
-
 STAGING - XGI Z7,Z9,Z11 PCI DISPLAY DRIVER
 M:     Arnaud Patard <arnaud.patard@rtp-net.org>
 S:     Odd Fixes
index 45f18cce31a9a606c9842ed1da334c0ae3880ffc..6f9609e63a65af18bc36c69072a71b631e408216 100644 (file)
@@ -317,10 +317,14 @@ static int __cvmx_helper_sgmii_hardware_init(int interface, int num_ports)
        for (index = 0; index < num_ports; index++) {
                int ipd_port = cvmx_helper_get_ipd_port(interface, index);
                __cvmx_helper_sgmii_hardware_init_one_time(interface, index);
-               __cvmx_helper_sgmii_link_set(ipd_port,
-                                            __cvmx_helper_sgmii_link_get
-                                            (ipd_port));
-
+               /* Linux kernel driver will call ....link_set with the
+                * proper link state. In the simulator there is no
+                * link state polling and hence it is set from
+                * here.
+                */
+               if (cvmx_sysinfo_get()->board_type == CVMX_BOARD_TYPE_SIM)
+                       __cvmx_helper_sgmii_link_set(ipd_port,
+                                      __cvmx_helper_sgmii_link_get(ipd_port));
        }
 
        return 0;
index 1e120fa1e156c62d97464f205c936b0bb809534d..12addf272a610409d6e0b952816a572b22790989 100644 (file)
@@ -77,4 +77,16 @@ config MMA8452
          To compile this driver as a module, choose M here: the module
          will be called mma8452.
 
+config KXCJK1013
+       tristate "Kionix 3-Axis Accelerometer Driver"
+       depends on I2C
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
+       help
+         Say Y here if you want to build a driver for the Kionix KXCJK-1013
+         triaxial acceleration sensor.
+
+         To compile this driver as a module, choose M here: the module will
+         be called kxcjk-1013.
+
 endmenu
index dc0e379c2592e4ee28e65b6a5f98fc8737cd458e..6578ca1a8e0935f9cb7741a2101d5be22fb72834 100644 (file)
@@ -5,6 +5,7 @@
 # When adding new entries keep the list in alphabetical order
 obj-$(CONFIG_BMA180) += bma180.o
 obj-$(CONFIG_HID_SENSOR_ACCEL_3D) += hid-sensor-accel-3d.o
+obj-$(CONFIG_KXCJK1013) += kxcjk-1013.o
 obj-$(CONFIG_KXSD9)    += kxsd9.o
 obj-$(CONFIG_MMA8452)  += mma8452.o
 
diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c
new file mode 100644 (file)
index 0000000..72a6dbb
--- /dev/null
@@ -0,0 +1,764 @@
+/*
+ * KXCJK-1013 3-axis accelerometer driver
+ * Copyright (c) 2014, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/interrupt.h>
+#include <linux/delay.h>
+#include <linux/bitops.h>
+#include <linux/slab.h>
+#include <linux/string.h>
+#include <linux/acpi.h>
+#include <linux/gpio/consumer.h>
+#include <linux/iio/iio.h>
+#include <linux/iio/sysfs.h>
+#include <linux/iio/buffer.h>
+#include <linux/iio/trigger.h>
+#include <linux/iio/trigger_consumer.h>
+#include <linux/iio/triggered_buffer.h>
+#include <linux/iio/accel/kxcjk_1013.h>
+
+#define KXCJK1013_DRV_NAME "kxcjk1013"
+#define KXCJK1013_IRQ_NAME "kxcjk1013_event"
+
+#define KXCJK1013_REG_XOUT_L           0x06
+/*
+ * From low byte X axis register, all the other addresses of Y and Z can be
+ * obtained by just applying axis offset. The following axis defines are just
+ * provide clarity, but not used.
+ */
+#define KXCJK1013_REG_XOUT_H           0x07
+#define KXCJK1013_REG_YOUT_L           0x08
+#define KXCJK1013_REG_YOUT_H           0x09
+#define KXCJK1013_REG_ZOUT_L           0x0A
+#define KXCJK1013_REG_ZOUT_H           0x0B
+
+#define KXCJK1013_REG_DCST_RESP                0x0C
+#define KXCJK1013_REG_WHO_AM_I         0x0F
+#define KXCJK1013_REG_INT_SRC1         0x16
+#define KXCJK1013_REG_INT_SRC2         0x17
+#define KXCJK1013_REG_STATUS_REG       0x18
+#define KXCJK1013_REG_INT_REL          0x1A
+#define KXCJK1013_REG_CTRL1            0x1B
+#define KXCJK1013_REG_CTRL2            0x1D
+#define KXCJK1013_REG_INT_CTRL1                0x1E
+#define KXCJK1013_REG_INT_CTRL2                0x1F
+#define KXCJK1013_REG_DATA_CTRL                0x21
+#define KXCJK1013_REG_WAKE_TIMER       0x29
+#define KXCJK1013_REG_SELF_TEST                0x3A
+#define KXCJK1013_REG_WAKE_THRES       0x6A
+
+#define KXCJK1013_REG_CTRL1_BIT_PC1    BIT(7)
+#define KXCJK1013_REG_CTRL1_BIT_RES    BIT(6)
+#define KXCJK1013_REG_CTRL1_BIT_DRDY   BIT(5)
+#define KXCJK1013_REG_CTRL1_BIT_GSEL1  BIT(4)
+#define KXCJK1013_REG_CTRL1_BIT_GSEL0  BIT(3)
+#define KXCJK1013_REG_CTRL1_BIT_WUFE   BIT(1)
+#define KXCJK1013_REG_INT_REG1_BIT_IEA BIT(4)
+#define KXCJK1013_REG_INT_REG1_BIT_IEN BIT(5)
+
+#define KXCJK1013_DATA_MASK_12_BIT     0x0FFF
+#define KXCJK1013_MAX_STARTUP_TIME_US  100000
+
+struct kxcjk1013_data {
+       struct i2c_client *client;
+       struct iio_trigger *trig;
+       bool trig_mode;
+       struct mutex mutex;
+       s16 buffer[8];
+       int power_state;
+       u8 odr_bits;
+       bool active_high_intr;
+};
+
+enum kxcjk1013_axis {
+       AXIS_X,
+       AXIS_Y,
+       AXIS_Z,
+};
+
+enum kxcjk1013_mode {
+       STANDBY,
+       OPERATION,
+};
+
+static const struct {
+       int val;
+       int val2;
+       int odr_bits;
+} samp_freq_table[] = { {0, 781000, 0x08}, {1, 563000, 0x09},
+                       {3, 125000, 0x0A}, {6, 25000, 0x0B}, {12, 5000, 0},
+                       {25, 0, 0x01}, {50, 0, 0x02}, {100, 0, 0x03},
+                       {200, 0, 0x04}, {400, 0, 0x05}, {800, 0, 0x06},
+                       {1600, 0, 0x07} };
+
+/* Refer to section 4 of the specification */
+static const struct {
+       int odr_bits;
+       int usec;
+} odr_start_up_times[] = { {0x08, 100000}, {0x09, 100000}, {0x0A, 100000},
+                          {0x0B, 100000}, { 0, 80000}, {0x01, 41000},
+                          {0x02, 21000}, {0x03, 11000}, {0x04, 6400},
+                          {0x05, 3900}, {0x06, 2700}, {0x07, 2100} };
+
+static int kxcjk1013_set_mode(struct kxcjk1013_data *data,
+                             enum kxcjk1013_mode mode)
+{
+       int ret;
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_CTRL1);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_ctrl1\n");
+               return ret;
+       }
+
+       if (mode == STANDBY)
+               ret &= ~KXCJK1013_REG_CTRL1_BIT_PC1;
+       else
+               ret |= KXCJK1013_REG_CTRL1_BIT_PC1;
+
+       ret = i2c_smbus_write_byte_data(data->client,
+                                       KXCJK1013_REG_CTRL1, ret);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error writing reg_ctrl1\n");
+               return ret;
+       }
+
+       return 0;
+}
+
+static int kxcjk1013_chip_ack_intr(struct kxcjk1013_data *data)
+{
+       int ret;
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_INT_REL);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error writing reg_int_rel\n");
+               return ret;
+       }
+
+       return ret;
+}
+
+static int kxcjk1013_chip_init(struct kxcjk1013_data *data)
+{
+       int ret;
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_WHO_AM_I);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading who_am_i\n");
+               return ret;
+       }
+
+       dev_dbg(&data->client->dev, "KXCJK1013 Chip Id %x\n", ret);
+
+       ret = kxcjk1013_set_mode(data, STANDBY);
+       if (ret < 0)
+               return ret;
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_CTRL1);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_ctrl1\n");
+               return ret;
+       }
+
+       /* Setting range to 4G */
+       ret |= KXCJK1013_REG_CTRL1_BIT_GSEL0;
+       ret &= ~KXCJK1013_REG_CTRL1_BIT_GSEL1;
+
+       /* Set 12 bit mode */
+       ret |= KXCJK1013_REG_CTRL1_BIT_RES;
+
+       ret = i2c_smbus_write_byte_data(data->client, KXCJK1013_REG_CTRL1,
+                                       ret);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_ctrl\n");
+               return ret;
+       }
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_DATA_CTRL);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_data_ctrl\n");
+               return ret;
+       }
+
+       data->odr_bits = ret;
+
+       /* Set up INT polarity */
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_INT_CTRL1);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_int_ctrl1\n");
+               return ret;
+       }
+
+       if (data->active_high_intr)
+               ret |= KXCJK1013_REG_INT_REG1_BIT_IEA;
+       else
+               ret &= ~KXCJK1013_REG_INT_REG1_BIT_IEA;
+
+       ret = i2c_smbus_write_byte_data(data->client, KXCJK1013_REG_INT_CTRL1,
+                                       ret);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error writing reg_int_ctrl1\n");
+               return ret;
+       }
+
+       return 0;
+}
+
+static int kxcjk1013_chip_setup_interrupt(struct kxcjk1013_data *data,
+                                         bool status)
+{
+       int ret;
+
+       /* This is requirement by spec to change state to STANDBY */
+       ret = kxcjk1013_set_mode(data, STANDBY);
+       if (ret < 0)
+               return ret;
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_INT_CTRL1);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_int_ctrl1\n");
+               return ret;
+       }
+
+       if (status)
+               ret |= KXCJK1013_REG_INT_REG1_BIT_IEN;
+       else
+               ret &= ~KXCJK1013_REG_INT_REG1_BIT_IEN;
+
+       ret = i2c_smbus_write_byte_data(data->client, KXCJK1013_REG_INT_CTRL1,
+                                       ret);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error writing reg_int_ctrl1\n");
+               return ret;
+       }
+
+       ret = i2c_smbus_read_byte_data(data->client, KXCJK1013_REG_CTRL1);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error reading reg_ctrl1\n");
+               return ret;
+       }
+
+       if (status)
+               ret |= KXCJK1013_REG_CTRL1_BIT_DRDY;
+       else
+               ret &= ~KXCJK1013_REG_CTRL1_BIT_DRDY;
+
+       ret = i2c_smbus_write_byte_data(data->client,
+                                       KXCJK1013_REG_CTRL1, ret);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error writing reg_ctrl1\n");
+               return ret;
+       }
+
+       return ret;
+}
+
+static int kxcjk1013_convert_freq_to_bit(int val, int val2)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(samp_freq_table); ++i) {
+               if (samp_freq_table[i].val == val &&
+                       samp_freq_table[i].val2 == val2) {
+                       return samp_freq_table[i].odr_bits;
+               }
+       }
+
+       return -EINVAL;
+}
+
+static int kxcjk1013_set_odr(struct kxcjk1013_data *data, int val, int val2)
+{
+       int ret;
+       int odr_bits;
+
+       odr_bits = kxcjk1013_convert_freq_to_bit(val, val2);
+       if (odr_bits < 0)
+               return odr_bits;
+
+       /* To change ODR, the chip must be set to STANDBY as per spec */
+       ret = kxcjk1013_set_mode(data, STANDBY);
+       if (ret < 0)
+               return ret;
+
+       ret = i2c_smbus_write_byte_data(data->client, KXCJK1013_REG_DATA_CTRL,
+                                       odr_bits);
+       if (ret < 0) {
+               dev_err(&data->client->dev, "Error writing data_ctrl\n");
+               return ret;
+       }
+
+       data->odr_bits = odr_bits;
+
+       /* Check, if the ODR is changed after data enable */
+       if (data->power_state) {
+               /* Set the state back to operation */
+               ret = kxcjk1013_set_mode(data, OPERATION);
+               if (ret < 0)
+                       return ret;
+       }
+
+       return 0;
+}
+
+static int kxcjk1013_get_odr(struct kxcjk1013_data *data, int *val, int *val2)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(samp_freq_table); ++i) {
+               if (samp_freq_table[i].odr_bits == data->odr_bits) {
+                       *val = samp_freq_table[i].val;
+                       *val2 = samp_freq_table[i].val2;
+                       return IIO_VAL_INT_PLUS_MICRO;
+               }
+       }
+
+       return -EINVAL;
+}
+
+static int kxcjk1013_get_acc_reg(struct kxcjk1013_data *data, int axis)
+{
+       u8 reg = KXCJK1013_REG_XOUT_L + axis * 2;
+       int ret;
+
+       ret = i2c_smbus_read_word_data(data->client, reg);
+       if (ret < 0) {
+               dev_err(&data->client->dev,
+                       "failed to read accel_%c registers\n", 'x' + axis);
+               return ret;
+       }
+
+       return ret;
+}
+
+static int kxcjk1013_get_startup_times(struct kxcjk1013_data *data)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(odr_start_up_times); ++i) {
+               if (odr_start_up_times[i].odr_bits == data->odr_bits)
+                       return odr_start_up_times[i].usec;
+       }
+
+       return KXCJK1013_MAX_STARTUP_TIME_US;
+}
+
+static int kxcjk1013_read_raw(struct iio_dev *indio_dev,
+                             struct iio_chan_spec const *chan, int *val,
+                             int *val2, long mask)
+{
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+       int ret;
+
+       switch (mask) {
+       case IIO_CHAN_INFO_RAW:
+               mutex_lock(&data->mutex);
+               if (iio_buffer_enabled(indio_dev))
+                       ret = -EBUSY;
+               else {
+                       int sleep_val;
+
+                       ret = kxcjk1013_set_mode(data, OPERATION);
+                       if (ret < 0) {
+                               mutex_unlock(&data->mutex);
+                               return ret;
+                       }
+                       ++data->power_state;
+                       sleep_val = kxcjk1013_get_startup_times(data);
+                       if (sleep_val < 20000)
+                               usleep_range(sleep_val, 20000);
+                       else
+                               msleep_interruptible(sleep_val/1000);
+                       ret = kxcjk1013_get_acc_reg(data, chan->scan_index);
+                       if (--data->power_state == 0)
+                               kxcjk1013_set_mode(data, STANDBY);
+               }
+               mutex_unlock(&data->mutex);
+
+               if (ret < 0)
+                       return ret;
+
+               *val = sign_extend32(ret >> 4, 11);
+               return IIO_VAL_INT;
+
+       case IIO_CHAN_INFO_SCALE:
+               *val = 0;
+               *val2 = 19163; /* range +-4g (4/2047*9.806650) */
+               return IIO_VAL_INT_PLUS_MICRO;
+
+       case IIO_CHAN_INFO_SAMP_FREQ:
+               mutex_lock(&data->mutex);
+               ret = kxcjk1013_get_odr(data, val, val2);
+               mutex_unlock(&data->mutex);
+               return ret;
+
+       default:
+               return -EINVAL;
+       }
+}
+
+static int kxcjk1013_write_raw(struct iio_dev *indio_dev,
+                              struct iio_chan_spec const *chan, int val,
+                              int val2, long mask)
+{
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+       int ret;
+
+       switch (mask) {
+       case IIO_CHAN_INFO_SAMP_FREQ:
+               mutex_lock(&data->mutex);
+               ret = kxcjk1013_set_odr(data, val, val2);
+               mutex_unlock(&data->mutex);
+               break;
+       default:
+               ret = -EINVAL;
+       }
+
+       return ret;
+}
+
+static int kxcjk1013_validate_trigger(struct iio_dev *indio_dev,
+                                     struct iio_trigger *trig)
+{
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+
+       if (data->trig != trig)
+               return -EINVAL;
+
+       return 0;
+}
+
+static IIO_CONST_ATTR_SAMP_FREQ_AVAIL(
+       "0.781000 1.563000 3.125000 6.250000 12.500000 25 50 100 200 400 800 1600");
+
+static struct attribute *kxcjk1013_attributes[] = {
+       &iio_const_attr_sampling_frequency_available.dev_attr.attr,
+       NULL,
+};
+
+static const struct attribute_group kxcjk1013_attrs_group = {
+       .attrs = kxcjk1013_attributes,
+};
+
+#define KXCJK1013_CHANNEL(_axis) {                                     \
+       .type = IIO_ACCEL,                                              \
+       .modified = 1,                                                  \
+       .channel2 = IIO_MOD_##_axis,                                    \
+       .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),                   \
+       .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) |          \
+                               BIT(IIO_CHAN_INFO_SAMP_FREQ),           \
+       .scan_index = AXIS_##_axis,                                     \
+       .scan_type = {                                                  \
+               .sign = 's',                                            \
+               .realbits = 12,                                         \
+               .storagebits = 16,                                      \
+               .shift = 4,                                             \
+               .endianness = IIO_LE,                                   \
+       },                                                              \
+}
+
+static const struct iio_chan_spec kxcjk1013_channels[] = {
+       KXCJK1013_CHANNEL(X),
+       KXCJK1013_CHANNEL(Y),
+       KXCJK1013_CHANNEL(Z),
+       IIO_CHAN_SOFT_TIMESTAMP(3),
+};
+
+static const struct iio_info kxcjk1013_info = {
+       .attrs                  = &kxcjk1013_attrs_group,
+       .read_raw               = kxcjk1013_read_raw,
+       .write_raw              = kxcjk1013_write_raw,
+       .validate_trigger       = kxcjk1013_validate_trigger,
+       .driver_module          = THIS_MODULE,
+};
+
+static irqreturn_t kxcjk1013_trigger_handler(int irq, void *p)
+{
+       struct iio_poll_func *pf = p;
+       struct iio_dev *indio_dev = pf->indio_dev;
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+       int bit, ret, i = 0;
+
+       mutex_lock(&data->mutex);
+
+       for_each_set_bit(bit, indio_dev->buffer->scan_mask,
+                        indio_dev->masklength) {
+               ret = kxcjk1013_get_acc_reg(data, bit);
+               if (ret < 0) {
+                       kxcjk1013_chip_ack_intr(data);
+                       mutex_unlock(&data->mutex);
+                       goto err;
+               }
+               data->buffer[i++] = ret;
+       }
+
+       kxcjk1013_chip_ack_intr(data);
+
+       mutex_unlock(&data->mutex);
+
+       iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
+                                          pf->timestamp);
+err:
+       iio_trigger_notify_done(indio_dev->trig);
+
+       return IRQ_HANDLED;
+}
+
+static int kxcjk1013_data_rdy_trigger_set_state(struct iio_trigger *trig,
+                                               bool state)
+{
+       struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+
+       mutex_lock(&data->mutex);
+       if (state) {
+               kxcjk1013_chip_setup_interrupt(data, true);
+               kxcjk1013_set_mode(data, OPERATION);
+               ++data->power_state;
+       } else {
+               if (--data->power_state) {
+                       mutex_unlock(&data->mutex);
+                       return 0;
+               }
+               kxcjk1013_chip_setup_interrupt(data, false);
+               kxcjk1013_set_mode(data, STANDBY);
+       }
+       mutex_unlock(&data->mutex);
+
+       return 0;
+}
+
+static const struct iio_trigger_ops kxcjk1013_trigger_ops = {
+       .set_trigger_state = kxcjk1013_data_rdy_trigger_set_state,
+       .owner = THIS_MODULE,
+};
+
+static int kxcjk1013_acpi_gpio_probe(struct i2c_client *client,
+                                    struct kxcjk1013_data *data)
+{
+       const struct acpi_device_id *id;
+       struct device *dev;
+       struct gpio_desc *gpio;
+       int ret;
+
+       if (!client)
+               return -EINVAL;
+
+       dev = &client->dev;
+       if (!ACPI_HANDLE(dev))
+               return -ENODEV;
+
+       id = acpi_match_device(dev->driver->acpi_match_table, dev);
+       if (!id)
+               return -ENODEV;
+
+       /* data ready gpio interrupt pin */
+       gpio = devm_gpiod_get_index(dev, "kxcjk1013_int", 0);
+       if (IS_ERR(gpio)) {
+               dev_err(dev, "acpi gpio get index failed\n");
+               return PTR_ERR(gpio);
+       }
+
+       ret = gpiod_direction_input(gpio);
+       if (ret)
+               return ret;
+
+       ret = gpiod_to_irq(gpio);
+
+       dev_dbg(dev, "GPIO resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret);
+
+       return ret;
+}
+
+static int kxcjk1013_probe(struct i2c_client *client,
+                          const struct i2c_device_id *id)
+{
+       struct kxcjk1013_data *data;
+       struct iio_dev *indio_dev;
+       struct iio_trigger *trig = NULL;
+       struct kxcjk_1013_platform_data *pdata;
+       int ret;
+
+       indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
+       if (!indio_dev)
+               return -ENOMEM;
+
+       data = iio_priv(indio_dev);
+       i2c_set_clientdata(client, indio_dev);
+       data->client = client;
+
+       pdata = dev_get_platdata(&client->dev);
+       if (pdata)
+               data->active_high_intr = pdata->active_high_intr;
+       else
+               data->active_high_intr = true; /* default polarity */
+
+       ret = kxcjk1013_chip_init(data);
+       if (ret < 0)
+               return ret;
+
+       mutex_init(&data->mutex);
+
+       indio_dev->dev.parent = &client->dev;
+       indio_dev->channels = kxcjk1013_channels;
+       indio_dev->num_channels = ARRAY_SIZE(kxcjk1013_channels);
+       indio_dev->name = KXCJK1013_DRV_NAME;
+       indio_dev->modes = INDIO_DIRECT_MODE;
+       indio_dev->info = &kxcjk1013_info;
+
+       if (client->irq < 0)
+               client->irq = kxcjk1013_acpi_gpio_probe(client, data);
+
+       if (client->irq >= 0) {
+               trig = iio_trigger_alloc("%s-dev%d", indio_dev->name,
+                                        indio_dev->id);
+               if (!trig)
+                       return -ENOMEM;
+
+               data->trig_mode = true;
+
+               ret = devm_request_irq(&client->dev, client->irq,
+                                       iio_trigger_generic_data_rdy_poll,
+                                       IRQF_TRIGGER_RISING,
+                                       KXCJK1013_IRQ_NAME,
+                                       trig);
+               if (ret) {
+                       dev_err(&client->dev, "unable to request IRQ\n");
+                       goto err_trigger_free;
+               }
+
+               trig->dev.parent = &client->dev;
+               trig->ops = &kxcjk1013_trigger_ops;
+               iio_trigger_set_drvdata(trig, indio_dev);
+               data->trig = trig;
+               indio_dev->trig = trig;
+
+               ret = iio_trigger_register(trig);
+               if (ret)
+                       goto err_trigger_free;
+
+               ret = iio_triggered_buffer_setup(indio_dev,
+                                               &iio_pollfunc_store_time,
+                                               kxcjk1013_trigger_handler,
+                                               NULL);
+               if (ret < 0) {
+                       dev_err(&client->dev,
+                                       "iio triggered buffer setup failed\n");
+                       goto err_trigger_unregister;
+               }
+       }
+
+       ret = devm_iio_device_register(&client->dev, indio_dev);
+       if (ret < 0) {
+               dev_err(&client->dev, "unable to register iio device\n");
+               goto err_buffer_cleanup;
+       }
+
+       return 0;
+
+err_buffer_cleanup:
+       if (data->trig_mode)
+               iio_triggered_buffer_cleanup(indio_dev);
+err_trigger_unregister:
+       if (data->trig_mode)
+               iio_trigger_unregister(trig);
+err_trigger_free:
+       if (data->trig_mode)
+               iio_trigger_free(trig);
+
+       return ret;
+}
+
+static int kxcjk1013_remove(struct i2c_client *client)
+{
+       struct iio_dev *indio_dev = i2c_get_clientdata(client);
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+
+       if (data->trig_mode) {
+               iio_triggered_buffer_cleanup(indio_dev);
+               iio_trigger_unregister(data->trig);
+               iio_trigger_free(data->trig);
+       }
+
+       mutex_lock(&data->mutex);
+       kxcjk1013_set_mode(data, STANDBY);
+       mutex_unlock(&data->mutex);
+
+       return 0;
+}
+
+#ifdef CONFIG_PM_SLEEP
+static int kxcjk1013_suspend(struct device *dev)
+{
+       struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+
+       mutex_lock(&data->mutex);
+       kxcjk1013_set_mode(data, STANDBY);
+       mutex_unlock(&data->mutex);
+
+       return 0;
+}
+
+static int kxcjk1013_resume(struct device *dev)
+{
+       struct iio_dev *indio_dev = i2c_get_clientdata(to_i2c_client(dev));
+       struct kxcjk1013_data *data = iio_priv(indio_dev);
+
+       mutex_lock(&data->mutex);
+
+       if (data->power_state)
+               kxcjk1013_set_mode(data, OPERATION);
+
+       mutex_unlock(&data->mutex);
+
+       return 0;
+}
+
+static SIMPLE_DEV_PM_OPS(kxcjk1013_pm_ops, kxcjk1013_suspend, kxcjk1013_resume);
+#define KXCJK1013_PM_OPS (&kxcjk1013_pm_ops)
+#else
+#define KXCJK1013_PM_OPS NULL
+#endif
+
+static const struct acpi_device_id kx_acpi_match[] = {
+       {"KXCJ1013", 0},
+       { },
+};
+MODULE_DEVICE_TABLE(acpi, kx_acpi_match);
+
+static const struct i2c_device_id kxcjk1013_id[] = {
+       {"kxcjk1013", 0},
+       {}
+};
+
+MODULE_DEVICE_TABLE(i2c, kxcjk1013_id);
+
+static struct i2c_driver kxcjk1013_driver = {
+       .driver = {
+               .name   = KXCJK1013_DRV_NAME,
+               .acpi_match_table = ACPI_PTR(kx_acpi_match),
+               .pm     = KXCJK1013_PM_OPS,
+       },
+       .probe          = kxcjk1013_probe,
+       .remove         = kxcjk1013_remove,
+       .id_table       = kxcjk1013_id,
+};
+module_i2c_driver(kxcjk1013_driver);
+
+MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("KXCJK1013 accelerometer driver");
index a80d23628f1425efaa391e92962c2913b5b863b5..20a7073f1dd681a9387e378fa4e00c13636b0872 100644 (file)
@@ -131,6 +131,15 @@ config LP8788_ADC
        help
          Say yes here to build support for TI LP8788 ADC.
 
+config MAX1027
+       tristate "Maxim max1027 ADC driver"
+       depends on SPI
+       select IIO_BUFFER
+       select IIO_TRIGGERED_BUFFER
+       help
+         Say yes here to build support for Maxim SPI ADC models
+         max1027, max1029 and max1031.
+
 config MAX1363
        tristate "Maxim max1363 ADC driver"
        depends on I2C
index 9d60f2deaaaf276d8b6c0ee5134feb520f3dec9c..38cf5c3f5631dc6b907a1844465dcf34f14efd52 100644 (file)
@@ -15,6 +15,7 @@ obj-$(CONFIG_AD799X) += ad799x.o
 obj-$(CONFIG_AT91_ADC) += at91_adc.o
 obj-$(CONFIG_EXYNOS_ADC) += exynos_adc.o
 obj-$(CONFIG_LP8788_ADC) += lp8788_adc.o
+obj-$(CONFIG_MAX1027) += max1027.o
 obj-$(CONFIG_MAX1363) += max1363.o
 obj-$(CONFIG_MCP320X) += mcp320x.o
 obj-$(CONFIG_MCP3422) += mcp3422.o
index 2a3b65c74af9aa32543dc4d248216f31646a1c08..4a8c0a2f49b6959f5528f80124f4d10a2d9ae9f9 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/delay.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
+#include <linux/bitops.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
 #include <linux/platform_data/ad7298.h>
 
-#define AD7298_WRITE   (1 << 15) /* write to the control register */
-#define AD7298_REPEAT  (1 << 14) /* repeated conversion enable */
-#define AD7298_CH(x)   (1 << (13 - (x))) /* channel select */
-#define AD7298_TSENSE  (1 << 5) /* temperature conversion enable */
-#define AD7298_EXTREF  (1 << 2) /* external reference enable */
-#define AD7298_TAVG    (1 << 1) /* temperature sensor averaging enable */
-#define AD7298_PDD     (1 << 0) /* partial power down enable */
+#define AD7298_WRITE   BIT(15) /* write to the control register */
+#define AD7298_REPEAT  BIT(14) /* repeated conversion enable */
+#define AD7298_CH(x)   BIT(13 - (x)) /* channel select */
+#define AD7298_TSENSE  BIT(5) /* temperature conversion enable */
+#define AD7298_EXTREF  BIT(2) /* external reference enable */
+#define AD7298_TAVG    BIT(1) /* temperature sensor averaging enable */
+#define AD7298_PDD     BIT(0) /* partial power down enable */
 
 #define AD7298_MAX_CHAN                8
-#define AD7298_BITS            12
-#define AD7298_STORAGE_BITS    16
 #define AD7298_INTREF_mV       2500
 
 #define AD7298_CH_TEMP         9
 
-#define RES_MASK(bits) ((1 << (bits)) - 1)
-
 struct ad7298_state {
        struct spi_device               *spi;
        struct regulator                *reg;
@@ -257,7 +254,7 @@ static int ad7298_read_raw(struct iio_dev *indio_dev,
                        return ret;
 
                if (chan->address != AD7298_CH_TEMP)
-                       *val = ret & RES_MASK(AD7298_BITS);
+                       *val = ret & GENMASK(chan->scan_type.realbits - 1, 0);
 
                return IIO_VAL_INT;
        case IIO_CHAN_INFO_SCALE:
index d141d452c3d1081d4bea64ff01e5b38e855fcd9d..ce400ec176f13e34fddd799deaa2caf595114b03 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/regulator/consumer.h>
 #include <linux/err.h>
 #include <linux/module.h>
+#include <linux/bitops.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
@@ -21,8 +22,6 @@
 #include <linux/iio/trigger_consumer.h>
 #include <linux/iio/triggered_buffer.h>
 
-#define RES_MASK(bits) ((1 << (bits)) - 1)
-
 struct ad7476_state;
 
 struct ad7476_chip_info {
@@ -117,7 +116,7 @@ static int ad7476_read_raw(struct iio_dev *indio_dev,
                if (ret < 0)
                        return ret;
                *val = (ret >> st->chip_info->channel[0].scan_type.shift) &
-                       RES_MASK(st->chip_info->channel[0].scan_type.realbits);
+                       GENMASK(st->chip_info->channel[0].scan_type.realbits - 1, 0);
                return IIO_VAL_INT;
        case IIO_CHAN_INFO_SCALE:
                if (!st->chip_info->int_vref_uv) {
index 749a6cadab8b3708d9a9e2d50f9d086f6f17e80e..2fd012ee99f5b3f005bbe4c152760a3af36a27be 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/err.h>
 #include <linux/module.h>
 #include <linux/interrupt.h>
+#include <linux/bitops.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 
 #include <linux/platform_data/ad7887.h>
 
-#define AD7887_REF_DIS         (1 << 5) /* on-chip reference disable */
-#define AD7887_DUAL            (1 << 4) /* dual-channel mode */
-#define AD7887_CH_AIN1         (1 << 3) /* convert on channel 1, DUAL=1 */
-#define AD7887_CH_AIN0         (0 << 3) /* convert on channel 0, DUAL=0,1 */
-#define AD7887_PM_MODE1                (0)      /* CS based shutdown */
-#define AD7887_PM_MODE2                (1)      /* full on */
-#define AD7887_PM_MODE3                (2)      /* auto shutdown after conversion */
-#define AD7887_PM_MODE4                (3)      /* standby mode */
+#define AD7887_REF_DIS         BIT(5)  /* on-chip reference disable */
+#define AD7887_DUAL            BIT(4)  /* dual-channel mode */
+#define AD7887_CH_AIN1         BIT(3)  /* convert on channel 1, DUAL=1 */
+#define AD7887_CH_AIN0         0       /* convert on channel 0, DUAL=0,1 */
+#define AD7887_PM_MODE1                      /* CS based shutdown */
+#define AD7887_PM_MODE2                      /* full on */
+#define AD7887_PM_MODE3                      /* auto shutdown after conversion */
+#define AD7887_PM_MODE4                      /* standby mode */
 
 enum ad7887_channels {
        AD7887_CH0,
@@ -40,8 +41,6 @@ enum ad7887_channels {
        AD7887_CH1,
 };
 
-#define RES_MASK(bits) ((1 << (bits)) - 1)
-
 /**
  * struct ad7887_chip_info - chip specifc information
  * @int_vref_mv:       the internal reference voltage
@@ -167,7 +166,7 @@ static int ad7887_read_raw(struct iio_dev *indio_dev,
                if (ret < 0)
                        return ret;
                *val = ret >> chan->scan_type.shift;
-               *val &= RES_MASK(chan->scan_type.realbits);
+               *val &= GENMASK(chan->scan_type.realbits - 1, 0);
                return IIO_VAL_INT;
        case IIO_CHAN_INFO_SCALE:
                if (st->reg) {
index 6eba301ee03dc04ea4e174a401e99f3e176104c0..6cf9ee18a2161f7e7972b037b7259a9ffa87cc83 100644 (file)
@@ -105,9 +105,8 @@ enum {
  * struct ad799x_chip_info - chip specific information
  * @channel:           channel specification
  * @num_channels:      number of channels
- * @monitor_mode:      whether the chip supports monitor interrupts
  * @default_config:    device default configuration
- * @event_attrs:       pointer to the monitor event attribute group
+ * @info:              pointer to iio_info struct
  */
 struct ad799x_chip_info {
        struct iio_chan_spec            channel[9];
index 9a4e0e32a771c392dc153c19f9215ba7c3433d44..c55b81f7f9702b6955b7f01a31e24b3ade3d47fa 100644 (file)
@@ -410,7 +410,7 @@ static irqreturn_t ad_sd_data_rdy_trig_poll(int irq, void *private)
        complete(&sigma_delta->completion);
        disable_irq_nosync(irq);
        sigma_delta->irq_dis = true;
-       iio_trigger_poll(sigma_delta->trig, iio_get_time_ns());
+       iio_trigger_poll(sigma_delta->trig);
 
        return IRQ_HANDLED;
 }
index 2b6a9ce9927c5fb84d7b92b3d6b3fc067ad7ec75..772e869c280ed2c7a275ba3516fa66b997d00379 100644 (file)
@@ -272,7 +272,7 @@ void handle_adc_eoc_trigger(int irq, struct iio_dev *idev)
 
        if (iio_buffer_enabled(idev)) {
                disable_irq_nosync(irq);
-               iio_trigger_poll(idev->trig, iio_get_time_ns());
+               iio_trigger_poll(idev->trig);
        } else {
                st->last_value = at91_adc_readl(st, AT91_ADC_LCDR);
                st->done = true;
diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
new file mode 100644 (file)
index 0000000..87ee1c7
--- /dev/null
@@ -0,0 +1,521 @@
+ /*
+  * iio/adc/max1027.c
+  * Copyright (C) 2014 Philippe Reynes
+  *
+  * based on linux/drivers/iio/ad7923.c
+  * Copyright 2011 Analog Devices Inc (from AD7923 Driver)
+  * Copyright 2012 CS Systemes d'Information
+  *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  *
+  * max1027.c
+  *
+  * Partial support for max1027 and similar chips.
+  */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/spi/spi.h>
+#include <linux/delay.h>
+
+#include <linux/iio/iio.h>
+#include <linux/iio/buffer.h>
+#include <linux/iio/trigger.h>
+#include <linux/iio/trigger_consumer.h>
+#include <linux/iio/triggered_buffer.h>
+
+#define MAX1027_CONV_REG  BIT(7)
+#define MAX1027_SETUP_REG BIT(6)
+#define MAX1027_AVG_REG   BIT(5)
+#define MAX1027_RST_REG   BIT(4)
+
+/* conversion register */
+#define MAX1027_TEMP      BIT(0)
+#define MAX1027_SCAN_0_N  (0x00 << 1)
+#define MAX1027_SCAN_N_M  (0x01 << 1)
+#define MAX1027_SCAN_N    (0x02 << 1)
+#define MAX1027_NOSCAN    (0x03 << 1)
+#define MAX1027_CHAN(n)   ((n) << 3)
+
+/* setup register */
+#define MAX1027_UNIPOLAR  0x02
+#define MAX1027_BIPOLAR   0x03
+#define MAX1027_REF_MODE0 (0x00 << 2)
+#define MAX1027_REF_MODE1 (0x01 << 2)
+#define MAX1027_REF_MODE2 (0x02 << 2)
+#define MAX1027_REF_MODE3 (0x03 << 2)
+#define MAX1027_CKS_MODE0 (0x00 << 4)
+#define MAX1027_CKS_MODE1 (0x01 << 4)
+#define MAX1027_CKS_MODE2 (0x02 << 4)
+#define MAX1027_CKS_MODE3 (0x03 << 4)
+
+/* averaging register */
+#define MAX1027_NSCAN_4   0x00
+#define MAX1027_NSCAN_8   0x01
+#define MAX1027_NSCAN_12  0x02
+#define MAX1027_NSCAN_16  0x03
+#define MAX1027_NAVG_4    (0x00 << 2)
+#define MAX1027_NAVG_8    (0x01 << 2)
+#define MAX1027_NAVG_16   (0x02 << 2)
+#define MAX1027_NAVG_32   (0x03 << 2)
+#define MAX1027_AVG_EN    BIT(4)
+
+enum max1027_id {
+       max1027,
+       max1029,
+       max1031,
+};
+
+static const struct spi_device_id max1027_id[] = {
+       {"max1027", max1027},
+       {"max1029", max1029},
+       {"max1031", max1031},
+       {}
+};
+MODULE_DEVICE_TABLE(spi, max1027_id);
+
+#ifdef CONFIG_OF
+static const struct of_device_id max1027_adc_dt_ids[] = {
+       { .compatible = "maxim,max1027" },
+       { .compatible = "maxim,max1029" },
+       { .compatible = "maxim,max1031" },
+       {},
+};
+MODULE_DEVICE_TABLE(of, max1027_adc_dt_ids);
+#endif
+
+#define MAX1027_V_CHAN(index)                                          \
+       {                                                               \
+               .type = IIO_VOLTAGE,                                    \
+               .indexed = 1,                                           \
+               .channel = index,                                       \
+               .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),           \
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),   \
+               .scan_index = index + 1,                                \
+               .scan_type = {                                          \
+                       .sign = 'u',                                    \
+                       .realbits = 10,                                 \
+                       .storagebits = 16,                              \
+                       .shift = 2,                                     \
+                       .endianness = IIO_BE,                           \
+               },                                                      \
+       }
+
+#define MAX1027_T_CHAN                                                 \
+       {                                                               \
+               .type = IIO_TEMP,                                       \
+               .channel = 0,                                           \
+               .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),           \
+               .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),   \
+               .scan_index = 0,                                        \
+               .scan_type = {                                          \
+                       .sign = 'u',                                    \
+                       .realbits = 12,                                 \
+                       .storagebits = 16,                              \
+                       .endianness = IIO_BE,                           \
+               },                                                      \
+       }
+
+static const struct iio_chan_spec max1027_channels[] = {
+       MAX1027_T_CHAN,
+       MAX1027_V_CHAN(0),
+       MAX1027_V_CHAN(1),
+       MAX1027_V_CHAN(2),
+       MAX1027_V_CHAN(3),
+       MAX1027_V_CHAN(4),
+       MAX1027_V_CHAN(5),
+       MAX1027_V_CHAN(6),
+       MAX1027_V_CHAN(7)
+};
+
+static const struct iio_chan_spec max1029_channels[] = {
+       MAX1027_T_CHAN,
+       MAX1027_V_CHAN(0),
+       MAX1027_V_CHAN(1),
+       MAX1027_V_CHAN(2),
+       MAX1027_V_CHAN(3),
+       MAX1027_V_CHAN(4),
+       MAX1027_V_CHAN(5),
+       MAX1027_V_CHAN(6),
+       MAX1027_V_CHAN(7),
+       MAX1027_V_CHAN(8),
+       MAX1027_V_CHAN(9),
+       MAX1027_V_CHAN(10),
+       MAX1027_V_CHAN(11)
+};
+
+static const struct iio_chan_spec max1031_channels[] = {
+       MAX1027_T_CHAN,
+       MAX1027_V_CHAN(0),
+       MAX1027_V_CHAN(1),
+       MAX1027_V_CHAN(2),
+       MAX1027_V_CHAN(3),
+       MAX1027_V_CHAN(4),
+       MAX1027_V_CHAN(5),
+       MAX1027_V_CHAN(6),
+       MAX1027_V_CHAN(7),
+       MAX1027_V_CHAN(8),
+       MAX1027_V_CHAN(9),
+       MAX1027_V_CHAN(10),
+       MAX1027_V_CHAN(11),
+       MAX1027_V_CHAN(12),
+       MAX1027_V_CHAN(13),
+       MAX1027_V_CHAN(14),
+       MAX1027_V_CHAN(15)
+};
+
+static const unsigned long max1027_available_scan_masks[] = {
+       0x000001ff,
+       0x00000000,
+};
+
+static const unsigned long max1029_available_scan_masks[] = {
+       0x00001fff,
+       0x00000000,
+};
+
+static const unsigned long max1031_available_scan_masks[] = {
+       0x0001ffff,
+       0x00000000,
+};
+
+struct max1027_chip_info {
+       const struct iio_chan_spec *channels;
+       unsigned int num_channels;
+       const unsigned long *available_scan_masks;
+};
+
+static const struct max1027_chip_info max1027_chip_info_tbl[] = {
+       [max1027] = {
+               .channels = max1027_channels,
+               .num_channels = ARRAY_SIZE(max1027_channels),
+               .available_scan_masks = max1027_available_scan_masks,
+       },
+       [max1029] = {
+               .channels = max1029_channels,
+               .num_channels = ARRAY_SIZE(max1029_channels),
+               .available_scan_masks = max1029_available_scan_masks,
+       },
+       [max1031] = {
+               .channels = max1031_channels,
+               .num_channels = ARRAY_SIZE(max1031_channels),
+               .available_scan_masks = max1031_available_scan_masks,
+       },
+};
+
+struct max1027_state {
+       const struct max1027_chip_info  *info;
+       struct spi_device               *spi;
+       struct iio_trigger              *trig;
+       __be16                          *buffer;
+       struct mutex                    lock;
+
+       u8                              reg ____cacheline_aligned;
+};
+
+static int max1027_read_single_value(struct iio_dev *indio_dev,
+                                    struct iio_chan_spec const *chan,
+                                    int *val)
+{
+       int ret;
+       struct max1027_state *st = iio_priv(indio_dev);
+
+       if (iio_buffer_enabled(indio_dev)) {
+               dev_warn(&indio_dev->dev, "trigger mode already enabled");
+               return -EBUSY;
+       }
+
+       /* Start acquisition on conversion register write */
+       st->reg = MAX1027_SETUP_REG | MAX1027_REF_MODE2 | MAX1027_CKS_MODE2;
+       ret = spi_write(st->spi, &st->reg, 1);
+       if (ret < 0) {
+               dev_err(&indio_dev->dev,
+                       "Failed to configure setup register\n");
+               return ret;
+       }
+
+       /* Configure conversion register with the requested chan */
+       st->reg = MAX1027_CONV_REG | MAX1027_CHAN(chan->channel) |
+                 MAX1027_NOSCAN | !!(chan->type == IIO_TEMP);
+       ret = spi_write(st->spi, &st->reg, 1);
+       if (ret < 0) {
+               dev_err(&indio_dev->dev,
+                       "Failed to configure conversion register\n");
+               return ret;
+       }
+
+       /*
+        * For an unknown reason, when we use the mode "10" (write
+        * conversion register), the interrupt doesn't occur every time.
+        * So we just wait 1 ms.
+        */
+       mdelay(1);
+
+       /* Read result */
+       ret = spi_read(st->spi, st->buffer, (chan->type == IIO_TEMP) ? 4 : 2);
+       if (ret < 0)
+               return ret;
+
+       *val = be16_to_cpu(st->buffer[0]);
+
+       return IIO_VAL_INT;
+}
+
+static int max1027_read_raw(struct iio_dev *indio_dev,
+                           struct iio_chan_spec const *chan,
+                           int *val, int *val2, long mask)
+{
+       int ret = 0;
+       struct max1027_state *st = iio_priv(indio_dev);
+
+       mutex_lock(&st->lock);
+
+       switch (mask) {
+       case IIO_CHAN_INFO_RAW:
+               ret = max1027_read_single_value(indio_dev, chan, val);
+               break;
+       case IIO_CHAN_INFO_SCALE:
+               switch (chan->type) {
+               case IIO_TEMP:
+                       *val = 1;
+                       *val2 = 8;
+                       ret = IIO_VAL_FRACTIONAL;
+                       break;
+               case IIO_VOLTAGE:
+                       *val = 2500;
+                       *val2 = 10;
+                       ret = IIO_VAL_FRACTIONAL_LOG2;
+                       break;
+               default:
+                       ret = -EINVAL;
+                       break;
+               }
+               break;
+       default:
+               ret = -EINVAL;
+               break;
+       }
+
+       mutex_unlock(&st->lock);
+
+       return ret;
+}
+
+static int max1027_debugfs_reg_access(struct iio_dev *indio_dev,
+                                     unsigned reg, unsigned writeval,
+                                     unsigned *readval)
+{
+       struct max1027_state *st = iio_priv(indio_dev);
+       u8 *val = (u8 *)st->buffer;
+
+       if (readval != NULL)
+               return -EINVAL;
+
+       *val = (u8)writeval;
+       return spi_write(st->spi, val, 1);
+}
+
+static int max1027_validate_trigger(struct iio_dev *indio_dev,
+                                   struct iio_trigger *trig)
+{
+       struct max1027_state *st = iio_priv(indio_dev);
+
+       if (st->trig != trig)
+               return -EINVAL;
+
+       return 0;
+}
+
+static int max1027_set_trigger_state(struct iio_trigger *trig, bool state)
+{
+       struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);
+       struct max1027_state *st = iio_priv(indio_dev);
+       int ret;
+
+       if (state) {
+               /* Start acquisition on cnvst */
+               st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE0 |
+                         MAX1027_REF_MODE2;
+               ret = spi_write(st->spi, &st->reg, 1);
+               if (ret < 0)
+                       return ret;
+
+               /* Scan from 0 to max */
+               st->reg = MAX1027_CONV_REG | MAX1027_CHAN(0) |
+                         MAX1027_SCAN_N_M | MAX1027_TEMP;
+               ret = spi_write(st->spi, &st->reg, 1);
+               if (ret < 0)
+                       return ret;
+       } else {
+               /* Start acquisition on conversion register write */
+               st->reg = MAX1027_SETUP_REG | MAX1027_CKS_MODE2 |
+                         MAX1027_REF_MODE2;
+               ret = spi_write(st->spi, &st->reg, 1);
+               if (ret < 0)
+                       return ret;
+       }
+
+       return 0;
+}
+
+static int max1027_validate_device(struct iio_trigger *trig,
+                                  struct iio_dev *indio_dev)
+{
+       struct iio_dev *indio = iio_trigger_get_drvdata(trig);
+
+       if (indio != indio_dev)
+               return -EINVAL;
+
+       return 0;
+}
+
+static irqreturn_t max1027_trigger_handler(int irq, void *private)
+{
+       struct iio_poll_func *pf = (struct iio_poll_func *)private;
+       struct iio_dev *indio_dev = pf->indio_dev;
+       struct max1027_state *st = iio_priv(indio_dev);
+
+       pr_debug("%s(irq=%d, private=0x%p)\n", __func__, irq, private);
+
+       /* fill buffer with all channel */
+       spi_read(st->spi, st->buffer, indio_dev->masklength * 2);
+
+       iio_push_to_buffers(indio_dev, st->buffer);
+
+       iio_trigger_notify_done(indio_dev->trig);
+
+       return IRQ_HANDLED;
+}
+
+static const struct iio_trigger_ops max1027_trigger_ops = {
+       .owner = THIS_MODULE,
+       .validate_device = &max1027_validate_device,
+       .set_trigger_state = &max1027_set_trigger_state,
+};
+
+static const struct iio_info max1027_info = {
+       .driver_module = THIS_MODULE,
+       .read_raw = &max1027_read_raw,
+       .validate_trigger = &max1027_validate_trigger,
+       .debugfs_reg_access = &max1027_debugfs_reg_access,
+};
+
+static int max1027_probe(struct spi_device *spi)
+{
+       int ret;
+       struct iio_dev *indio_dev;
+       struct max1027_state *st;
+
+       pr_debug("%s: probe(spi = 0x%p)\n", __func__, spi);
+
+       indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*st));
+       if (indio_dev == NULL) {
+               pr_err("Can't allocate iio device\n");
+               return -ENOMEM;
+       }
+
+       spi_set_drvdata(spi, indio_dev);
+
+       st = iio_priv(indio_dev);
+       st->spi = spi;
+       st->info = &max1027_chip_info_tbl[spi_get_device_id(spi)->driver_data];
+
+       mutex_init(&st->lock);
+
+       indio_dev->name = spi_get_device_id(spi)->name;
+       indio_dev->dev.parent = &spi->dev;
+       indio_dev->info = &max1027_info;
+       indio_dev->modes = INDIO_DIRECT_MODE;
+       indio_dev->channels = st->info->channels;
+       indio_dev->num_channels = st->info->num_channels;
+       indio_dev->available_scan_masks = st->info->available_scan_masks;
+
+       st->buffer = devm_kmalloc(&indio_dev->dev,
+                                 indio_dev->num_channels * 2,
+                                 GFP_KERNEL);
+       if (st->buffer == NULL) {
+               dev_err(&indio_dev->dev, "Can't allocate bufffer\n");
+               return -ENOMEM;
+       }
+
+       ret = iio_triggered_buffer_setup(indio_dev, &iio_pollfunc_store_time,
+                                        &max1027_trigger_handler, NULL);
+       if (ret < 0) {
+               dev_err(&indio_dev->dev, "Failed to setup buffer\n");
+               return ret;
+       }
+
+       st->trig = devm_iio_trigger_alloc(&spi->dev, "%s-trigger",
+                                                       indio_dev->name);
+       if (st->trig == NULL) {
+               ret = -ENOMEM;
+               dev_err(&indio_dev->dev, "Failed to allocate iio trigger\n");
+               goto fail_trigger_alloc;
+       }
+
+       st->trig->ops = &max1027_trigger_ops;
+       st->trig->dev.parent = &spi->dev;
+       iio_trigger_set_drvdata(st->trig, indio_dev);
+       iio_trigger_register(st->trig);
+
+       ret = devm_request_threaded_irq(&spi->dev, spi->irq,
+                                       iio_trigger_generic_data_rdy_poll,
+                                       NULL,
+                                       IRQF_TRIGGER_FALLING,
+                                       spi->dev.driver->name, st->trig);
+       if (ret < 0) {
+               dev_err(&indio_dev->dev, "Failed to allocate IRQ.\n");
+               goto fail_dev_register;
+       }
+
+       /* Disable averaging */
+       st->reg = MAX1027_AVG_REG;
+       ret = spi_write(st->spi, &st->reg, 1);
+       if (ret < 0) {
+               dev_err(&indio_dev->dev, "Failed to configure averaging register\n");
+               goto fail_dev_register;
+       }
+
+       ret = iio_device_register(indio_dev);
+       if (ret < 0) {
+               dev_err(&indio_dev->dev, "Failed to register iio device\n");
+               goto fail_dev_register;
+       }
+
+       return 0;
+
+fail_dev_register:
+fail_trigger_alloc:
+       iio_triggered_buffer_cleanup(indio_dev);
+
+       return ret;
+}
+
+static int max1027_remove(struct spi_device *spi)
+{
+       struct iio_dev *indio_dev = spi_get_drvdata(spi);
+
+       pr_debug("%s: remove(spi = 0x%p)\n", __func__, spi);
+
+       iio_device_unregister(indio_dev);
+       iio_triggered_buffer_cleanup(indio_dev);
+
+       return 0;
+}
+
+static struct spi_driver max1027_driver = {
+       .driver = {
+               .name   = "max1027",
+               .owner  = THIS_MODULE,
+       },
+       .probe          = max1027_probe,
+       .remove         = max1027_remove,
+       .id_table       = max1027_id,
+};
+module_spi_driver(max1027_driver);
+
+MODULE_AUTHOR("Philippe Reynes <tremyfr@yahoo.fr>");
+MODULE_DESCRIPTION("MAX1027/MAX1029/MAX1031 ADC");
+MODULE_LICENSE("GPL v2");
index ab52be29141bb285b2a96d7bf970e420ddb08a57..fd2745c629436f6fa51c15a851c6b7ace8d14400 100644 (file)
@@ -486,7 +486,7 @@ static irqreturn_t xadc_axi_interrupt_handler(int irq, void *devid)
                return IRQ_NONE;
 
        if ((status & XADC_AXI_INT_EOS) && xadc->trigger)
-               iio_trigger_poll(xadc->trigger, 0);
+               iio_trigger_poll(xadc->trigger);
 
        if (status & XADC_AXI_INT_ALARM_MASK) {
                /*
index f378ca8033db699ff0753652cc0d92733119c56a..f278eff42a4cabd1f668d8568638453d9f866a86 100644 (file)
@@ -163,4 +163,14 @@ config MCP4725
          To compile this driver as a module, choose M here: the module
          will be called mcp4725.
 
+config MCP4922
+       tristate "MCP4902, MCP4912, MCP4922 DAC driver"
+       depends on SPI
+       help
+         Say yes here to build the driver for the Microchip MCP4902
+         MCP4912, and MCP4922 DAC devices.
+
+         To compile this driver as a module, choose M here: the module
+         will be called mcp4922.
+
 endmenu
index bb84ad64463f749c65e27570e5f7d89fce424f12..10107640bb467427e6337889126021c3c20273a0 100644 (file)
@@ -18,3 +18,4 @@ obj-$(CONFIG_AD5686) += ad5686.o
 obj-$(CONFIG_AD7303) += ad7303.o
 obj-$(CONFIG_MAX517) += max517.o
 obj-$(CONFIG_MCP4725) += mcp4725.o
+obj-$(CONFIG_MCP4922) += mcp4922.o
index 1e6449346b50868fadecda845b1f19af46a16c40..c917dd24090a01ff32b4c695b3fed39373a8e2b4 100644 (file)
 #include <linux/sysfs.h>
 #include <linux/regulator/consumer.h>
 #include <linux/module.h>
+#include <linux/bitops.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 #include <linux/iio/events.h>
 #include <linux/iio/dac/ad5504.h>
 
-#define AD5505_BITS                    12
-#define AD5504_RES_MASK                        ((1 << (AD5505_BITS)) - 1)
-
-#define AD5504_CMD_READ                        (1 << 15)
-#define AD5504_CMD_WRITE               (0 << 15)
+#define AD5504_RES_MASK                        GENMASK(11, 0)
+#define AD5504_CMD_READ                        BIT(15)
+#define AD5504_CMD_WRITE               0
 #define AD5504_ADDR(addr)              ((addr) << 12)
 
 /* Registers */
@@ -42,7 +41,7 @@
 
 /**
  * struct ad5446_state - driver instance specific data
- * @us:                        spi_device
+ * @spi:                       spi_device
  * @reg:               supply regulator
  * @vref_mv:           actual reference voltage used
  * @pwr_down_mask      power down mask
index ae49afe2b3808cdbb812e551b03140425ce6ce31..5ba785f1858988b6cef32e3dc79b78e171da3bfe 100644 (file)
 #include <linux/sysfs.h>
 #include <linux/regulator/consumer.h>
 #include <linux/module.h>
+#include <linux/bitops.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
 #include <linux/iio/dac/ad5791.h>
 
-#define AD5791_RES_MASK(x)             ((1 << (x)) - 1)
-#define AD5791_DAC_MASK                        AD5791_RES_MASK(20)
-#define AD5791_DAC_MSB                 (1 << 19)
+#define AD5791_DAC_MASK                        GENMASK(19, 0)
 
-#define AD5791_CMD_READ                        (1 << 23)
-#define AD5791_CMD_WRITE               (0 << 23)
+#define AD5791_CMD_READ                        BIT(23)
+#define AD5791_CMD_WRITE               0
 #define AD5791_ADDR(addr)              ((addr) << 20)
 
 /* Registers */
 #define AD5791_ADDR_SW_CTRL            4
 
 /* Control Register */
-#define AD5791_CTRL_RBUF               (1 << 1)
-#define AD5791_CTRL_OPGND              (1 << 2)
-#define AD5791_CTRL_DACTRI             (1 << 3)
-#define AD5791_CTRL_BIN2SC             (1 << 4)
-#define AD5791_CTRL_SDODIS             (1 << 5)
+#define AD5791_CTRL_RBUF               BIT(1)
+#define AD5791_CTRL_OPGND              BIT(2)
+#define AD5791_CTRL_DACTRI             BIT(3)
+#define AD5791_CTRL_BIN2SC             BIT(4)
+#define AD5791_CTRL_SDODIS             BIT(5)
 #define AD5761_CTRL_LINCOMP(x)         ((x) << 6)
 
 #define AD5791_LINCOMP_0_10            0
@@ -54,9 +53,9 @@
 #define AD5780_LINCOMP_10_20           12
 
 /* Software Control Register */
-#define AD5791_SWCTRL_LDAC             (1 << 0)
-#define AD5791_SWCTRL_CLR              (1 << 1)
-#define AD5791_SWCTRL_RESET            (1 << 2)
+#define AD5791_SWCTRL_LDAC             BIT(0)
+#define AD5791_SWCTRL_CLR              BIT(1)
+#define AD5791_SWCTRL_RESET            BIT(2)
 
 #define AD5791_DAC_PWRDN_6K            0
 #define AD5791_DAC_PWRDN_3STATE                1
@@ -72,7 +71,7 @@ struct ad5791_chip_info {
 
 /**
  * struct ad5791_state - driver instance specific data
- * @us:                        spi_device
+ * @spi:                       spi_device
  * @reg_vdd:           positive supply regulator
  * @reg_vss:           negative supply regulator
  * @chip_info:         chip model specific constants
@@ -328,7 +327,7 @@ static int ad5791_write_raw(struct iio_dev *indio_dev,
 
        switch (mask) {
        case IIO_CHAN_INFO_RAW:
-               val &= AD5791_RES_MASK(chan->scan_type.realbits);
+               val &= GENMASK(chan->scan_type.realbits - 1, 0);
                val <<= chan->scan_type.shift;
 
                return ad5791_spi_write(st, chan->address, val);
diff --git a/drivers/iio/dac/mcp4922.c b/drivers/iio/dac/mcp4922.c
new file mode 100644 (file)
index 0000000..92cf4ca
--- /dev/null
@@ -0,0 +1,216 @@
+/*
+ * mcp4922.c
+ *
+ * Driver for Microchip Digital to Analog Converters.
+ * Supports MCP4902, MCP4912, and MCP4922.
+ *
+ * Copyright (c) 2014 EMAC Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/spi/spi.h>
+#include <linux/iio/iio.h>
+#include <linux/iio/sysfs.h>
+#include <linux/regulator/consumer.h>
+#include <linux/bitops.h>
+
+#define MCP4922_NUM_CHANNELS   2
+
+enum mcp4922_supported_device_ids {
+       ID_MCP4902,
+       ID_MCP4912,
+       ID_MCP4922,
+};
+
+struct mcp4922_state {
+       struct spi_device *spi;
+       unsigned int value[MCP4922_NUM_CHANNELS];
+       unsigned int vref_mv;
+       struct regulator *vref_reg;
+       u8 mosi[2] ____cacheline_aligned;
+};
+
+#define MCP4922_CHAN(chan, bits) {                     \
+       .type = IIO_VOLTAGE,                            \
+       .output = 1,                                    \
+       .indexed = 1,                                   \
+       .channel = chan,                                \
+       .info_mask_separate = BIT(IIO_CHAN_INFO_RAW),   \
+       .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE),   \
+       .scan_type = {                                  \
+               .sign = 'u',                            \
+               .realbits = (bits),                     \
+               .storagebits = 16,                      \
+               .shift = 12 - (bits),                   \
+       },                                              \
+}
+
+static int mcp4922_spi_write(struct mcp4922_state *state, u8 addr, u32 val)
+{
+       state->mosi[1] = val & 0xff;
+       state->mosi[0] = (addr == 0) ? 0x00 : 0x80;
+       state->mosi[0] |= 0x30 | ((val >> 8) & 0x0f);
+
+       return spi_write(state->spi, state->mosi, 2);
+}
+
+static int mcp4922_read_raw(struct iio_dev *indio_dev,
+               struct iio_chan_spec const *chan,
+               int *val,
+               int *val2,
+               long mask)
+{
+       struct mcp4922_state *state = iio_priv(indio_dev);
+
+       switch (mask) {
+       case IIO_CHAN_INFO_RAW:
+               *val = state->value[chan->channel];
+               return IIO_VAL_INT;
+       case IIO_CHAN_INFO_SCALE:
+               *val = state->vref_mv;
+               *val2 = chan->scan_type.realbits;
+               return IIO_VAL_FRACTIONAL_LOG2;
+       default:
+               return -EINVAL;
+       }
+}
+
+static int mcp4922_write_raw(struct iio_dev *indio_dev,
+               struct iio_chan_spec const *chan,
+               int val,
+               int val2,
+               long mask)
+{
+       struct mcp4922_state *state = iio_priv(indio_dev);
+
+       if (val2 != 0)
+               return -EINVAL;
+
+       switch (mask) {
+       case IIO_CHAN_INFO_RAW:
+               if (val > GENMASK(chan->scan_type.realbits-1, 0))
+                       return -EINVAL;
+               val <<= chan->scan_type.shift;
+               state->value[chan->channel] = val;
+               return mcp4922_spi_write(state, chan->channel, val);
+       default:
+               return -EINVAL;
+       }
+}
+
+static const struct iio_chan_spec mcp4922_channels[3][MCP4922_NUM_CHANNELS] = {
+       [ID_MCP4902] = { MCP4922_CHAN(0, 8),    MCP4922_CHAN(1, 8) },
+       [ID_MCP4912] = { MCP4922_CHAN(0, 10),   MCP4922_CHAN(1, 10) },
+       [ID_MCP4922] = { MCP4922_CHAN(0, 12),   MCP4922_CHAN(1, 12) },
+};
+
+static const struct iio_info mcp4922_info = {
+       .read_raw = &mcp4922_read_raw,
+       .write_raw = &mcp4922_write_raw,
+       .driver_module = THIS_MODULE,
+};
+
+static int mcp4922_probe(struct spi_device *spi)
+{
+       struct iio_dev *indio_dev;
+       struct mcp4922_state *state;
+       const struct spi_device_id *id;
+       int ret;
+
+       indio_dev = devm_iio_device_alloc(&spi->dev, sizeof(*state));
+       if (indio_dev == NULL)
+               return -ENOMEM;
+
+       state = iio_priv(indio_dev);
+       state->spi = spi;
+       state->vref_reg = devm_regulator_get(&spi->dev, "vref");
+       if (IS_ERR(state->vref_reg)) {
+               dev_err(&spi->dev, "Vref regulator not specified\n");
+               return PTR_ERR(state->vref_reg);
+       }
+
+       ret = regulator_enable(state->vref_reg);
+       if (ret) {
+               dev_err(&spi->dev, "Failed to enable vref regulator: %d\n",
+                               ret);
+               return ret;
+       }
+
+       ret = regulator_get_voltage(state->vref_reg);
+       if (ret < 0) {
+               dev_err(&spi->dev, "Failed to read vref regulator: %d\n",
+                               ret);
+               goto error_disable_reg;
+       }
+       state->vref_mv = ret / 1000;
+
+       spi_set_drvdata(spi, indio_dev);
+       id = spi_get_device_id(spi);
+       indio_dev->dev.parent = &spi->dev;
+       indio_dev->info = &mcp4922_info;
+       indio_dev->modes = INDIO_DIRECT_MODE;
+       indio_dev->channels = mcp4922_channels[id->driver_data];
+       indio_dev->num_channels = MCP4922_NUM_CHANNELS;
+       indio_dev->name = id->name;
+
+       ret = iio_device_register(indio_dev);
+       if (ret) {
+               dev_err(&spi->dev, "Failed to register iio device: %d\n",
+                               ret);
+               goto error_disable_reg;
+       }
+
+       return 0;
+
+error_disable_reg:
+       regulator_disable(state->vref_reg);
+
+       return ret;
+}
+
+static int mcp4922_remove(struct spi_device *spi)
+{
+       struct iio_dev *indio_dev = spi_get_drvdata(spi);
+       struct mcp4922_state *state;
+
+       iio_device_unregister(indio_dev);
+       state = iio_priv(indio_dev);
+       regulator_disable(state->vref_reg);
+
+       return 0;
+}
+
+static const struct spi_device_id mcp4922_id[] = {
+       {"mcp4902", ID_MCP4902},
+       {"mcp4912", ID_MCP4912},
+       {"mcp4922", ID_MCP4922},
+       {}
+};
+MODULE_DEVICE_TABLE(spi, mcp4922_id);
+
+static struct spi_driver mcp4922_driver = {
+       .driver = {
+                  .name = "mcp4922",
+                  .owner = THIS_MODULE,
+                  },
+       .probe = mcp4922_probe,
+       .remove = mcp4922_remove,
+       .id_table = mcp4922_id,
+};
+module_spi_driver(mcp4922_driver);
+
+MODULE_AUTHOR("Michael Welling <mwelling@ieee.org>");
+MODULE_DESCRIPTION("Microchip MCP4902, MCP4912, MCP4922 DAC");
+MODULE_LICENSE("GPL v2");
index 36b1ae92e2392b5e8b59032fe9df02a8ee2aebf4..2952ee038477a2322c217ba0fe0a4d625a46367d 100644 (file)
@@ -39,10 +39,7 @@ static bool iio_buffer_is_active(struct iio_buffer *buf)
 
 static bool iio_buffer_data_available(struct iio_buffer *buf)
 {
-       if (buf->access->data_available)
-               return buf->access->data_available(buf);
-
-       return buf->stufftoread;
+       return buf->access->data_available(buf);
 }
 
 /**
index 3383b025f62e50b1d641da288075d219e7701f22..d31098e0c43f484e5a0583ae7a44e4721e7a4608 100644 (file)
@@ -114,7 +114,7 @@ static struct iio_trigger *iio_trigger_find_by_name(const char *name,
        return trig;
 }
 
-void iio_trigger_poll(struct iio_trigger *trig, s64 time)
+void iio_trigger_poll(struct iio_trigger *trig)
 {
        int i;
 
@@ -133,12 +133,12 @@ EXPORT_SYMBOL(iio_trigger_poll);
 
 irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private)
 {
-       iio_trigger_poll(private, iio_get_time_ns());
+       iio_trigger_poll(private);
        return IRQ_HANDLED;
 }
 EXPORT_SYMBOL(iio_trigger_generic_data_rdy_poll);
 
-void iio_trigger_poll_chained(struct iio_trigger *trig, s64 time)
+void iio_trigger_poll_chained(struct iio_trigger *trig)
 {
        int i;
 
@@ -161,7 +161,7 @@ void iio_trigger_notify_done(struct iio_trigger *trig)
                trig->ops->try_reenable)
                if (trig->ops->try_reenable(trig))
                        /* Missed an interrupt so launch new poll now */
-                       iio_trigger_poll(trig, 0);
+                       iio_trigger_poll(trig);
 }
 EXPORT_SYMBOL(iio_trigger_notify_done);
 
index d976e6ce60dbb22a57ee293b7baed954f648d2d3..ad36b294e4d506a3b1df2ba105b8e6038ebc087e 100644 (file)
@@ -331,7 +331,7 @@ static int cm32181_probe(struct i2c_client *client,
                return ret;
        }
 
-       ret = iio_device_register(indio_dev);
+       ret = devm_iio_device_register(&client->dev, indio_dev);
        if (ret) {
                dev_err(&client->dev,
                        "%s: regist device failed\n",
@@ -342,14 +342,6 @@ static int cm32181_probe(struct i2c_client *client,
        return 0;
 }
 
-static int cm32181_remove(struct i2c_client *client)
-{
-       struct iio_dev *indio_dev = i2c_get_clientdata(client);
-
-       iio_device_unregister(indio_dev);
-       return 0;
-}
-
 static const struct i2c_device_id cm32181_id[] = {
        { "cm32181", 0 },
        { }
@@ -370,7 +362,6 @@ static struct i2c_driver cm32181_driver = {
        },
        .id_table       = cm32181_id,
        .probe          = cm32181_probe,
-       .remove         = cm32181_remove,
 };
 
 module_i2c_driver(cm32181_driver);
index 04bdb85d2d9f33a353bd5b88a92f39cb9973fe75..221ed16de1f7babd220c81296c5eef7fdb959a0d 100644 (file)
@@ -827,7 +827,7 @@ static void gp2ap020a00f_iio_trigger_work(struct irq_work *work)
        struct gp2ap020a00f_data *data =
                container_of(work, struct gp2ap020a00f_data, work);
 
-       iio_trigger_poll(data->trig, 0);
+       iio_trigger_poll(data->trig);
 }
 
 static irqreturn_t gp2ap020a00f_prox_sensing_handler(int irq, void *data)
index 05a364c543f851bae06bd35733676b7491a997fe..b2dba9e506ab120712304cd78782ee357ec13fcd 100644 (file)
@@ -17,6 +17,16 @@ config AK8975
          To compile this driver as a module, choose M here: the module
          will be called ak8975.
 
+config AK09911
+       tristate "Asahi Kasei AK09911 3-axis Compass"
+       depends on I2C
+       help
+         Say yes here to build support for Asahi Kasei AK09911 3-Axis
+         Magnetometer.
+
+         To compile this driver as a module, choose M here: the module
+         will be called ak09911.
+
 config MAG3110
        tristate "Freescale MAG3110 3-Axis Magnetometer"
        depends on I2C
index 0f5d3c9857992425efee09de2a95ef0acb972dc1..b91315e0b8266913756660b0b5096578bb6c1f4d 100644 (file)
@@ -3,6 +3,7 @@
 #
 
 # When adding new entries keep the list in alphabetical order
+obj-$(CONFIG_AK09911)  += ak09911.o
 obj-$(CONFIG_AK8975)   += ak8975.o
 obj-$(CONFIG_MAG3110)  += mag3110.o
 obj-$(CONFIG_HID_SENSOR_MAGNETOMETER_3D) += hid-sensor-magn-3d.o
diff --git a/drivers/iio/magnetometer/ak09911.c b/drivers/iio/magnetometer/ak09911.c
new file mode 100644 (file)
index 0000000..b2bc942
--- /dev/null
@@ -0,0 +1,326 @@
+/*
+ * AK09911 3-axis compass driver
+ * Copyright (c) 2014, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/types.h>
+#include <linux/slab.h>
+#include <linux/delay.h>
+#include <linux/i2c.h>
+#include <linux/acpi.h>
+#include <linux/iio/iio.h>
+
+#define AK09911_REG_WIA1               0x00
+#define AK09911_REG_WIA2               0x01
+#define AK09911_WIA1_VALUE             0x48
+#define AK09911_WIA2_VALUE             0x05
+
+#define AK09911_REG_ST1                        0x10
+#define AK09911_REG_HXL                        0x11
+#define AK09911_REG_HXH                        0x12
+#define AK09911_REG_HYL                        0x13
+#define AK09911_REG_HYH                        0x14
+#define AK09911_REG_HZL                        0x15
+#define AK09911_REG_HZH                        0x16
+
+#define AK09911_REG_ASAX               0x60
+#define AK09911_REG_ASAY               0x61
+#define AK09911_REG_ASAZ               0x62
+
+#define AK09911_REG_CNTL1              0x30
+#define AK09911_REG_CNTL2              0x31
+#define AK09911_REG_CNTL3              0x32
+
+#define AK09911_MODE_SNG_MEASURE       0x01
+#define AK09911_MODE_SELF_TEST         0x10
+#define AK09911_MODE_FUSE_ACCESS       0x1F
+#define AK09911_MODE_POWERDOWN         0x00
+#define AK09911_RESET_DATA             0x01
+
+#define AK09911_REG_CNTL1              0x30
+#define AK09911_REG_CNTL2              0x31
+#define AK09911_REG_CNTL3              0x32
+
+#define AK09911_RAW_TO_GAUSS(asa)      ((((asa) + 128) * 6000) / 256)
+
+#define AK09911_MAX_CONVERSION_TIMEOUT_MS      500
+#define AK09911_CONVERSION_DONE_POLL_TIME_MS   10
+
+struct ak09911_data {
+       struct i2c_client       *client;
+       struct mutex            lock;
+       u8                      asa[3];
+       long                    raw_to_gauss[3];
+};
+
+static const int ak09911_index_to_reg[] = {
+       AK09911_REG_HXL, AK09911_REG_HYL, AK09911_REG_HZL,
+};
+
+static int ak09911_set_mode(struct i2c_client *client, u8 mode)
+{
+       int ret;
+
+       switch (mode) {
+       case AK09911_MODE_SNG_MEASURE:
+       case AK09911_MODE_SELF_TEST:
+       case AK09911_MODE_FUSE_ACCESS:
+       case AK09911_MODE_POWERDOWN:
+               ret = i2c_smbus_write_byte_data(client,
+                                               AK09911_REG_CNTL2, mode);
+               if (ret < 0) {
+                       dev_err(&client->dev, "set_mode error\n");
+                       return ret;
+               }
+               /* After mode change wait atleast 100us */
+               usleep_range(100, 500);
+               break;
+       default:
+               dev_err(&client->dev,
+                       "%s: Unknown mode(%d).", __func__, mode);
+               return -EINVAL;
+       }
+
+       return ret;
+}
+
+/* Get Sensitivity Adjustment value */
+static int ak09911_get_asa(struct i2c_client *client)
+{
+       struct iio_dev *indio_dev = i2c_get_clientdata(client);
+       struct ak09911_data *data = iio_priv(indio_dev);
+       int ret;
+
+       ret = ak09911_set_mode(client, AK09911_MODE_FUSE_ACCESS);
+       if (ret < 0)
+               return ret;
+
+       /* Get asa data and store in the device data. */
+       ret = i2c_smbus_read_i2c_block_data(client, AK09911_REG_ASAX,
+                                           3, data->asa);
+       if (ret < 0) {
+               dev_err(&client->dev, "Not able to read asa data\n");
+               return ret;
+       }
+
+       ret = ak09911_set_mode(client,  AK09911_MODE_POWERDOWN);
+       if (ret < 0)
+               return ret;
+
+       data->raw_to_gauss[0] = AK09911_RAW_TO_GAUSS(data->asa[0]);
+       data->raw_to_gauss[1] = AK09911_RAW_TO_GAUSS(data->asa[1]);
+       data->raw_to_gauss[2] = AK09911_RAW_TO_GAUSS(data->asa[2]);
+
+       return 0;
+}
+
+static int ak09911_verify_chip_id(struct i2c_client *client)
+{
+       u8 wia_val[2];
+       int ret;
+
+       ret = i2c_smbus_read_i2c_block_data(client, AK09911_REG_WIA1,
+                                           2, wia_val);
+       if (ret < 0) {
+               dev_err(&client->dev, "Error reading WIA\n");
+               return ret;
+       }
+
+       dev_dbg(&client->dev, "WIA %02x %02x\n", wia_val[0], wia_val[1]);
+
+       if (wia_val[0] != AK09911_WIA1_VALUE ||
+               wia_val[1] != AK09911_WIA2_VALUE) {
+               dev_err(&client->dev, "Device ak09911 not found\n");
+               return -ENODEV;
+       }
+
+       return 0;
+}
+
+static int wait_conversion_complete_polled(struct ak09911_data *data)
+{
+       struct i2c_client *client = data->client;
+       u8 read_status;
+       u32 timeout_ms = AK09911_MAX_CONVERSION_TIMEOUT_MS;
+       int ret;
+
+       /* Wait for the conversion to complete. */
+       while (timeout_ms) {
+               msleep_interruptible(AK09911_CONVERSION_DONE_POLL_TIME_MS);
+               ret = i2c_smbus_read_byte_data(client, AK09911_REG_ST1);
+               if (ret < 0) {
+                       dev_err(&client->dev, "Error in reading ST1\n");
+                       return ret;
+               }
+               read_status = ret & 0x01;
+               if (read_status)
+                       break;
+               timeout_ms -= AK09911_CONVERSION_DONE_POLL_TIME_MS;
+       }
+       if (!timeout_ms) {
+               dev_err(&client->dev, "Conversion timeout happened\n");
+               return -EIO;
+       }
+
+       return read_status;
+}
+
+static int ak09911_read_axis(struct iio_dev *indio_dev, int index, int *val)
+{
+       struct ak09911_data *data = iio_priv(indio_dev);
+       struct i2c_client *client = data->client;
+       int ret;
+
+       mutex_lock(&data->lock);
+
+       ret = ak09911_set_mode(client, AK09911_MODE_SNG_MEASURE);
+       if (ret < 0)
+               goto fn_exit;
+
+       ret = wait_conversion_complete_polled(data);
+       if (ret < 0)
+               goto fn_exit;
+
+       /* Read data */
+       ret = i2c_smbus_read_word_data(client, ak09911_index_to_reg[index]);
+       if (ret < 0) {
+               dev_err(&client->dev, "Read axis data fails\n");
+               goto fn_exit;
+       }
+
+       mutex_unlock(&data->lock);
+
+       /* Clamp to valid range. */
+       *val = sign_extend32(clamp_t(s16, ret, -8192, 8191), 13);
+
+       return IIO_VAL_INT;
+
+fn_exit:
+       mutex_unlock(&data->lock);
+
+       return ret;
+}
+
+static int ak09911_read_raw(struct iio_dev *indio_dev,
+                           struct iio_chan_spec const *chan,
+                           int *val, int *val2,
+                           long mask)
+{
+       struct ak09911_data *data = iio_priv(indio_dev);
+
+       switch (mask) {
+       case IIO_CHAN_INFO_RAW:
+               return ak09911_read_axis(indio_dev, chan->address, val);
+       case IIO_CHAN_INFO_SCALE:
+               *val = 0;
+               *val2 = data->raw_to_gauss[chan->address];
+               return IIO_VAL_INT_PLUS_MICRO;
+       }
+
+       return -EINVAL;
+}
+
+#define AK09911_CHANNEL(axis, index)                                   \
+       {                                                               \
+               .type = IIO_MAGN,                                       \
+               .modified = 1,                                          \
+               .channel2 = IIO_MOD_##axis,                             \
+               .info_mask_separate = BIT(IIO_CHAN_INFO_RAW) |          \
+                            BIT(IIO_CHAN_INFO_SCALE),                  \
+               .address = index,                                       \
+       }
+
+static const struct iio_chan_spec ak09911_channels[] = {
+       AK09911_CHANNEL(X, 0), AK09911_CHANNEL(Y, 1), AK09911_CHANNEL(Z, 2),
+};
+
+static const struct iio_info ak09911_info = {
+       .read_raw = &ak09911_read_raw,
+       .driver_module = THIS_MODULE,
+};
+
+static const struct acpi_device_id ak_acpi_match[] = {
+       {"AK009911", 0},
+       { },
+};
+MODULE_DEVICE_TABLE(acpi, ak_acpi_match);
+
+static int ak09911_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id)
+{
+       struct iio_dev *indio_dev;
+       struct ak09911_data *data;
+       const char *name;
+       int ret;
+
+       ret = ak09911_verify_chip_id(client);
+       if (ret) {
+               dev_err(&client->dev, "AK00911 not detected\n");
+               return -ENODEV;
+       }
+
+       indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
+       if (indio_dev == NULL)
+               return -ENOMEM;
+
+       data = iio_priv(indio_dev);
+       i2c_set_clientdata(client, indio_dev);
+
+       data->client = client;
+       mutex_init(&data->lock);
+
+       ret = ak09911_get_asa(client);
+       if (ret)
+               return ret;
+
+       if (id)
+               name = id->name;
+       else if (ACPI_HANDLE(&client->dev))
+               name = dev_name(&client->dev);
+       else
+               return -ENODEV;
+
+       dev_dbg(&client->dev, "Asahi compass chip %s\n", name);
+
+       indio_dev->dev.parent = &client->dev;
+       indio_dev->channels = ak09911_channels;
+       indio_dev->num_channels = ARRAY_SIZE(ak09911_channels);
+       indio_dev->info = &ak09911_info;
+       indio_dev->modes = INDIO_DIRECT_MODE;
+       indio_dev->name = name;
+
+       return devm_iio_device_register(&client->dev, indio_dev);
+}
+
+static const struct i2c_device_id ak09911_id[] = {
+       {"ak09911", 0},
+       {}
+};
+
+MODULE_DEVICE_TABLE(i2c, ak09911_id);
+
+static struct i2c_driver ak09911_driver = {
+       .driver = {
+               .name   = "ak09911",
+               .acpi_match_table = ACPI_PTR(ak_acpi_match),
+       },
+       .probe          = ak09911_probe,
+       .id_table       = ak09911_id,
+};
+module_i2c_driver(ak09911_driver);
+
+MODULE_AUTHOR("Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>");
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("AK09911 Compass driver");
index ea08313af0d2f5eeccf654e4081ad1bd5427df6e..a2357921d7618ce30e2320c6327dab9c7c7f1177 100644 (file)
@@ -165,7 +165,7 @@ static int ak8975_setup_irq(struct ak8975_data *data)
        else
                irq = gpio_to_irq(data->eoc_gpio);
 
-       rc = request_irq(irq, ak8975_irq_handler,
+       rc = devm_request_irq(&client->dev, irq, ak8975_irq_handler,
                         IRQF_TRIGGER_RISING | IRQF_ONESHOT,
                         dev_name(&client->dev), data);
        if (rc < 0) {
@@ -513,21 +513,21 @@ static int ak8975_probe(struct i2c_client *client,
        /* We may not have a GPIO based IRQ to scan, that is fine, we will
           poll if so */
        if (gpio_is_valid(eoc_gpio)) {
-               err = gpio_request_one(eoc_gpio, GPIOF_IN, "ak_8975");
+               err = devm_gpio_request_one(&client->dev, eoc_gpio,
+                                                       GPIOF_IN, "ak_8975");
                if (err < 0) {
                        dev_err(&client->dev,
                                "failed to request GPIO %d, error %d\n",
                                                        eoc_gpio, err);
-                       goto exit;
+                       return err;
                }
        }
 
        /* Register with IIO */
-       indio_dev = iio_device_alloc(sizeof(*data));
-       if (indio_dev == NULL) {
-               err = -ENOMEM;
-               goto exit_gpio;
-       }
+       indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
+       if (indio_dev == NULL)
+               return -ENOMEM;
+
        data = iio_priv(indio_dev);
        i2c_set_clientdata(client, indio_dev);
 
@@ -542,17 +542,16 @@ static int ak8975_probe(struct i2c_client *client,
                name = (char *) id->name;
        } else if (ACPI_HANDLE(&client->dev))
                name = ak8975_match_acpi_device(&client->dev, &data->chipset);
-       else {
-               err = -ENOSYS;
-               goto exit_free_iio;
-       }
+       else
+               return -ENOSYS;
+
        dev_dbg(&client->dev, "Asahi compass chip %s\n", name);
 
        /* Perform some basic start-of-day setup of the device. */
        err = ak8975_setup(client);
        if (err < 0) {
                dev_err(&client->dev, "AK8975 initialization fails\n");
-               goto exit_free_iio;
+               return err;
        }
 
        data->client = client;
@@ -564,37 +563,9 @@ static int ak8975_probe(struct i2c_client *client,
        indio_dev->info = &ak8975_info;
        indio_dev->modes = INDIO_DIRECT_MODE;
        indio_dev->name = name;
-       err = iio_device_register(indio_dev);
+       err = devm_iio_device_register(&client->dev, indio_dev);
        if (err < 0)
-               goto exit_free_iio;
-
-       return 0;
-
-exit_free_iio:
-       iio_device_free(indio_dev);
-       if (data->eoc_irq)
-               free_irq(data->eoc_irq, data);
-exit_gpio:
-       if (gpio_is_valid(eoc_gpio))
-               gpio_free(eoc_gpio);
-exit:
-       return err;
-}
-
-static int ak8975_remove(struct i2c_client *client)
-{
-       struct iio_dev *indio_dev = i2c_get_clientdata(client);
-       struct ak8975_data *data = iio_priv(indio_dev);
-
-       iio_device_unregister(indio_dev);
-
-       if (data->eoc_irq)
-               free_irq(data->eoc_irq, data);
-
-       if (gpio_is_valid(data->eoc_gpio))
-               gpio_free(data->eoc_gpio);
-
-       iio_device_free(indio_dev);
+               return err;
 
        return 0;
 }
@@ -621,7 +592,6 @@ static struct i2c_driver ak8975_driver = {
                .acpi_match_table = ACPI_PTR(ak_acpi_match),
        },
        .probe          = ak8975_probe,
-       .remove         = ak8975_remove,
        .id_table       = ak8975_id,
 };
 module_i2c_driver(ak8975_driver);
index ffac8ac1efca8c281ee76c2c7c20b87cc8d35a0c..15afbc9195211e2a5cc7cdd232574a999338a3b4 100644 (file)
@@ -70,4 +70,14 @@ config IIO_ST_PRESS_SPI
        depends on IIO_ST_PRESS
        depends on IIO_ST_SENSORS_SPI
 
+config T5403
+       tristate "EPCOS T5403 digital barometric pressure sensor driver"
+       depends on I2C
+       help
+         Say yes here to build support for the EPCOS T5403 pressure sensor
+         connected via I2C.
+
+          To compile this driver as a module, choose M here: the module
+          will be called t5403.
+
 endmenu
index c53d2500737ad622d0162072a8b28955b4e8fd56..90a37e85cf2159c3bd04b1a6b3386d05aac91d6f 100644 (file)
@@ -9,6 +9,7 @@ obj-$(CONFIG_MPL3115) += mpl3115.o
 obj-$(CONFIG_IIO_ST_PRESS) += st_pressure.o
 st_pressure-y := st_pressure_core.o
 st_pressure-$(CONFIG_IIO_BUFFER) += st_pressure_buffer.o
+obj-$(CONFIG_T5403) += t5403.o
 
 obj-$(CONFIG_IIO_ST_PRESS_I2C) += st_pressure_i2c.o
 obj-$(CONFIG_IIO_ST_PRESS_SPI) += st_pressure_spi.o
diff --git a/drivers/iio/pressure/t5403.c b/drivers/iio/pressure/t5403.c
new file mode 100644 (file)
index 0000000..e11cd39
--- /dev/null
@@ -0,0 +1,275 @@
+/*
+ * t5403.c - Support for EPCOS T5403 pressure/temperature sensor
+ *
+ * Copyright (c) 2014 Peter Meerwald <pmeerw@pmeerw.net>
+ *
+ * This file is subject to the terms and conditions of version 2 of
+ * the GNU General Public License.  See the file COPYING in the main
+ * directory of this archive for more details.
+ *
+ * (7-bit I2C slave address 0x77)
+ *
+ * TODO: end-of-conversion irq
+ */
+
+#include <linux/module.h>
+#include <linux/i2c.h>
+#include <linux/iio/iio.h>
+#include <linux/iio/sysfs.h>
+#include <linux/delay.h>
+
+#define T5403_DATA 0xf5 /* data, LSB first, 16 bit */
+#define T5403_CALIB_DATA 0x8e /* 10 calibration coeff., LSB first, 16 bit */
+#define T5403_SLAVE_ADDR 0x88 /* I2C slave address, 0x77 */
+#define T5403_COMMAND 0xf1
+
+/* command bits */
+#define T5403_MODE_SHIFT 3 /* conversion time: 2, 8, 16, 66 ms */
+#define T5403_PT BIT(1) /* 0 .. pressure, 1 .. temperature measurement */
+#define T5403_SCO BIT(0) /* start conversion */
+
+#define T5403_MODE_LOW 0
+#define T5403_MODE_STANDARD 1
+#define T5403_MODE_HIGH 2
+#define T5403_MODE_ULTRA_HIGH 3
+
+#define T5403_I2C_MASK (~BIT(7))
+#define T5403_I2C_ADDR 0x77
+
+static const int t5403_pressure_conv_ms[] = {2, 8, 16, 66};
+
+struct t5403_data {
+       struct i2c_client *client;
+       struct mutex lock;
+       int mode;
+       __le16 c[10];
+};
+
+#define T5403_C_U16(i) le16_to_cpu(data->c[(i) - 1])
+#define T5403_C(i) sign_extend32(T5403_C_U16(i), 15)
+
+static int t5403_read(struct t5403_data *data, bool pressure)
+{
+       int wait_time = 3;  /* wakeup time in ms */
+
+       int ret = i2c_smbus_write_byte_data(data->client, T5403_COMMAND,
+               (pressure ? (data->mode << T5403_MODE_SHIFT) : T5403_PT) |
+               T5403_SCO);
+       if (ret < 0)
+               return ret;
+
+       wait_time += pressure ? t5403_pressure_conv_ms[data->mode] : 2;
+
+       msleep(wait_time);
+
+       return i2c_smbus_read_word_data(data->client, T5403_DATA);
+}
+
+static int t5403_comp_pressure(struct t5403_data *data, int *val, int *val2)
+{
+       int ret;
+       s16 t_r;
+       u16 p_r;
+       s32 S, O, X;
+
+       mutex_lock(&data->lock);
+
+       ret = t5403_read(data, false);
+       if (ret < 0)
+               goto done;
+       t_r = ret;
+
+       ret = t5403_read(data, true);
+       if (ret < 0)
+               goto done;
+       p_r = ret;
+
+       /* see EPCOS application note */
+       S = T5403_C_U16(3) + (s32) T5403_C_U16(4) * t_r / 0x20000 +
+               T5403_C(5) * t_r / 0x8000 * t_r / 0x80000 +
+               T5403_C(9) * t_r / 0x8000 * t_r / 0x8000 * t_r / 0x10000;
+
+       O = T5403_C(6) * 0x4000 + T5403_C(7) * t_r / 8 +
+               T5403_C(8) * t_r / 0x8000 * t_r / 16 +
+               T5403_C(9) * t_r / 0x8000 * t_r / 0x10000 * t_r;
+
+       X = (S * p_r + O) / 0x4000;
+
+       X += ((X - 75000) * (X - 75000) / 0x10000 - 9537) *
+           T5403_C(10) / 0x10000;
+
+       *val = X / 1000;
+       *val2 = (X % 1000) * 1000;
+
+done:
+       mutex_unlock(&data->lock);
+       return ret;
+}
+
+static int t5403_comp_temp(struct t5403_data *data, int *val)
+{
+       int ret;
+       s16 t_r;
+
+       mutex_lock(&data->lock);
+       ret = t5403_read(data, false);
+       if (ret < 0)
+               goto done;
+       t_r = ret;
+
+       /* see EPCOS application note */
+       *val = ((s32) T5403_C_U16(1) * t_r / 0x100 +
+               (s32) T5403_C_U16(2) * 0x40) * 1000 / 0x10000;
+
+done:
+       mutex_unlock(&data->lock);
+       return ret;
+}
+
+static int t5403_read_raw(struct iio_dev *indio_dev,
+                         struct iio_chan_spec const *chan,
+                         int *val, int *val2, long mask)
+{
+       struct t5403_data *data = iio_priv(indio_dev);
+       int ret;
+
+       switch (mask) {
+       case IIO_CHAN_INFO_PROCESSED:
+               switch (chan->type) {
+               case IIO_PRESSURE:
+                       ret = t5403_comp_pressure(data, val, val2);
+                       if (ret < 0)
+                               return ret;
+                       return IIO_VAL_INT_PLUS_MICRO;
+               case IIO_TEMP:
+                       ret = t5403_comp_temp(data, val);
+                       if (ret < 0)
+                               return ret;
+                       return IIO_VAL_INT;
+               default:
+                       return -EINVAL;
+           }
+       case IIO_CHAN_INFO_INT_TIME:
+               *val = 0;
+               *val2 = t5403_pressure_conv_ms[data->mode] * 1000;
+               return IIO_VAL_INT_PLUS_MICRO;
+       default:
+               return -EINVAL;
+       }
+}
+
+static int t5403_write_raw(struct iio_dev *indio_dev,
+                          struct iio_chan_spec const *chan,
+                          int val, int val2, long mask)
+{
+       struct t5403_data *data = iio_priv(indio_dev);
+       int i;
+
+       switch (mask) {
+       case IIO_CHAN_INFO_INT_TIME:
+               if (val != 0)
+                       return -EINVAL;
+               for (i = 0; i < ARRAY_SIZE(t5403_pressure_conv_ms); i++)
+                       if (val2 == t5403_pressure_conv_ms[i] * 1000) {
+                               mutex_lock(&data->lock);
+                               data->mode = i;
+                               mutex_unlock(&data->lock);
+                               return 0;
+                       }
+               return -EINVAL;
+       default:
+               return -EINVAL;
+       }
+}
+
+static const struct iio_chan_spec t5403_channels[] = {
+       {
+               .type = IIO_PRESSURE,
+               .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED) |
+                   BIT(IIO_CHAN_INFO_INT_TIME),
+       },
+       {
+               .type = IIO_TEMP,
+               .info_mask_separate = BIT(IIO_CHAN_INFO_PROCESSED),
+       },
+};
+
+static IIO_CONST_ATTR_INT_TIME_AVAIL("0.002 0.008 0.016 0.066");
+
+static struct attribute *t5403_attributes[] = {
+       &iio_const_attr_integration_time_available.dev_attr.attr,
+       NULL
+};
+
+static const struct attribute_group t5403_attribute_group = {
+       .attrs = t5403_attributes,
+};
+
+static const struct iio_info t5403_info = {
+       .read_raw = &t5403_read_raw,
+       .write_raw = &t5403_write_raw,
+       .attrs = &t5403_attribute_group,
+       .driver_module = THIS_MODULE,
+};
+
+static int t5403_probe(struct i2c_client *client,
+                        const struct i2c_device_id *id)
+{
+       struct t5403_data *data;
+       struct iio_dev *indio_dev;
+       int ret;
+
+       if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_WORD_DATA |
+           I2C_FUNC_SMBUS_I2C_BLOCK))
+               return -ENODEV;
+
+       ret = i2c_smbus_read_byte_data(client, T5403_SLAVE_ADDR);
+       if (ret < 0)
+               return ret;
+       if ((ret & T5403_I2C_MASK) != T5403_I2C_ADDR)
+               return -ENODEV;
+
+       indio_dev = devm_iio_device_alloc(&client->dev, sizeof(*data));
+       if (!indio_dev)
+               return -ENOMEM;
+
+       data = iio_priv(indio_dev);
+       data->client = client;
+       mutex_init(&data->lock);
+
+       i2c_set_clientdata(client, indio_dev);
+       indio_dev->info = &t5403_info;
+       indio_dev->name = id->name;
+       indio_dev->dev.parent = &client->dev;
+       indio_dev->modes = INDIO_DIRECT_MODE;
+       indio_dev->channels = t5403_channels;
+       indio_dev->num_channels = ARRAY_SIZE(t5403_channels);
+
+       data->mode = T5403_MODE_STANDARD;
+
+       ret = i2c_smbus_read_i2c_block_data(data->client, T5403_CALIB_DATA,
+           sizeof(data->c), (u8 *) data->c);
+       if (ret < 0)
+               return ret;
+
+       return devm_iio_device_register(&client->dev, indio_dev);
+}
+
+static const struct i2c_device_id t5403_id[] = {
+       { "t5403", 0 },
+       { }
+};
+MODULE_DEVICE_TABLE(i2c, t5403_id);
+
+static struct i2c_driver t5403_driver = {
+       .driver = {
+               .name   = "t5403",
+       },
+       .probe = t5403_probe,
+       .id_table = t5403_id,
+};
+module_i2c_driver(t5403_driver);
+
+MODULE_AUTHOR("Peter Meerwald <pmeerw@pmeerw.net>");
+MODULE_DESCRIPTION("EPCOS T5403 pressure/temperature sensor driver");
+MODULE_LICENSE("GPL");
index bf677bfe8eb2c5d647195d1edff82d4108110ae6..5e780ef206f3c48774cb3f2d3a587ba0c6be1571 100644 (file)
@@ -232,7 +232,7 @@ static void as3935_event_work(struct work_struct *work)
 
        switch (val) {
        case AS3935_EVENT_INT:
-               iio_trigger_poll(st->trig, iio_get_time_ns());
+               iio_trigger_poll(st->trig);
                break;
        case AS3935_NOISE_INT:
                dev_warn(&st->spi->dev, "noise level is too high");
index 02577ec54c6b1ed650afa196a49dea3373569787..7a149a7822bcd9bf6aad40fd82aec99642ae0430 100644 (file)
@@ -24,8 +24,7 @@ struct iio_interrupt_trigger_info {
 
 static irqreturn_t iio_interrupt_trigger_poll(int irq, void *private)
 {
-       /* Timestamp not currently provided */
-       iio_trigger_poll(private, 0);
+       iio_trigger_poll(private);
        return IRQ_HANDLED;
 }
 
index 15e3b850f513e9158318bf5ff3ae420cf8a14500..254c7e906127f6152a51d273e57b0a5daa0fa950 100644 (file)
@@ -96,7 +96,7 @@ static void iio_sysfs_trigger_work(struct irq_work *work)
        struct iio_sysfs_trig *trig = container_of(work, struct iio_sysfs_trig,
                                                        work);
 
-       iio_trigger_poll(trig->trig, 0);
+       iio_trigger_poll(trig->trig);
 }
 
 static ssize_t iio_sysfs_trigger_poll(struct device *dev,
index 4f38fc000a371735d40f1b10ed2c03a155c4637e..0fd87443412a53d1ab567163aefc69f50306c385 100644 (file)
@@ -30,8 +30,6 @@ source "drivers/staging/slicoss/Kconfig"
 
 source "drivers/staging/usbip/Kconfig"
 
-source "drivers/staging/winbond/Kconfig"
-
 source "drivers/staging/wlan-ng/Kconfig"
 
 source "drivers/staging/comedi/Kconfig"
@@ -66,8 +64,6 @@ source "drivers/staging/octeon/Kconfig"
 
 source "drivers/staging/octeon-usb/Kconfig"
 
-source "drivers/staging/serqt_usb2/Kconfig"
-
 source "drivers/staging/vt6655/Kconfig"
 
 source "drivers/staging/vt6656/Kconfig"
@@ -76,20 +72,14 @@ source "drivers/staging/sep/Kconfig"
 
 source "drivers/staging/iio/Kconfig"
 
-source "drivers/staging/wlags49_h2/Kconfig"
-
-source "drivers/staging/wlags49_h25/Kconfig"
-
-source "drivers/staging/crystalhd/Kconfig"
-
-source "drivers/staging/cxt1e1/Kconfig"
-
 source "drivers/staging/xgifb/Kconfig"
 
 source "drivers/staging/tidspbridge/Kconfig"
 
 source "drivers/staging/quickstart/Kconfig"
 
+source "drivers/staging/emxx_udc/Kconfig"
+
 source "drivers/staging/keucr/Kconfig"
 
 source "drivers/staging/bcm/Kconfig"
@@ -108,6 +98,8 @@ source "drivers/staging/media/Kconfig"
 
 source "drivers/staging/android/Kconfig"
 
+source "drivers/staging/board/Kconfig"
+
 source "drivers/staging/ozwpan/Kconfig"
 
 source "drivers/staging/gdm72xx/Kconfig"
@@ -120,8 +112,6 @@ source "drivers/staging/ced1401/Kconfig"
 
 source "drivers/staging/imx-drm/Kconfig"
 
-source "drivers/staging/dgrp/Kconfig"
-
 source "drivers/staging/fwserial/Kconfig"
 
 source "drivers/staging/goldfish/Kconfig"
index 1e97ad2177de4e39bfd29282b72d2f41f612dd1b..9aeecc9b07e0e1a3cc39ec857bbb8adcfb16a1e7 100644 (file)
@@ -7,7 +7,6 @@ obj-y                           += media/
 obj-$(CONFIG_ET131X)           += et131x/
 obj-$(CONFIG_SLICOSS)          += slicoss/
 obj-$(CONFIG_USBIP_CORE)       += usbip/
-obj-$(CONFIG_W35UND)           += winbond/
 obj-$(CONFIG_PRISM2_USB)       += wlan-ng/
 obj-$(CONFIG_COMEDI)           += comedi/
 obj-$(CONFIG_FB_OLPC_DCON)     += olpc_dcon/
@@ -24,7 +23,6 @@ obj-$(CONFIG_TRANZPORT)               += frontier/
 obj-$(CONFIG_IDE_PHISON)       += phison/
 obj-$(CONFIG_LINE6_USB)                += line6/
 obj-$(CONFIG_NETLOGIC_XLR_NET) += netlogic/
-obj-$(CONFIG_USB_SERIAL_QUATECH2)      += serqt_usb2/
 obj-$(CONFIG_OCTEON_ETHERNET)  += octeon/
 obj-$(CONFIG_OCTEON_USB)       += octeon-usb/
 obj-$(CONFIG_VT6655)           += vt6655/
@@ -32,13 +30,10 @@ obj-$(CONFIG_VT6656)                += vt6656/
 obj-$(CONFIG_VME_BUS)          += vme/
 obj-$(CONFIG_DX_SEP)            += sep/
 obj-$(CONFIG_IIO)              += iio/
-obj-$(CONFIG_WLAGS49_H2)       += wlags49_h2/
-obj-$(CONFIG_WLAGS49_H25)      += wlags49_h25/
-obj-$(CONFIG_CRYSTALHD)                += crystalhd/
-obj-$(CONFIG_CXT1E1)           += cxt1e1/
 obj-$(CONFIG_FB_XGI)           += xgifb/
 obj-$(CONFIG_TIDSPBRIDGE)      += tidspbridge/
 obj-$(CONFIG_ACPI_QUICKSTART)  += quickstart/
+obj-$(CONFIG_USB_EMXX)         += emxx_udc/
 obj-$(CONFIG_USB_ENESTORAGE)   += keucr/
 obj-$(CONFIG_BCM_WIMAX)                += bcm/
 obj-$(CONFIG_FT1000)           += ft1000/
@@ -47,13 +42,13 @@ obj-$(CONFIG_TOUCHSCREEN_CLEARPAD_TM1217)   += cptm1217/
 obj-$(CONFIG_TOUCHSCREEN_SYNAPTICS_I2C_RMI4)   += ste_rmi4/
 obj-$(CONFIG_MFD_NVEC)         += nvec/
 obj-$(CONFIG_ANDROID)          += android/
+obj-$(CONFIG_STAGING_BOARD)    += board/
 obj-$(CONFIG_USB_WPAN_HCD)     += ozwpan/
 obj-$(CONFIG_WIMAX_GDM72XX)    += gdm72xx/
 obj-$(CONFIG_LTE_GDM724X)      += gdm724x/
 obj-$(CONFIG_NET_VENDOR_SILICOM)       += silicom/
 obj-$(CONFIG_CED1401)          += ced1401/
 obj-$(CONFIG_DRM_IMX)          += imx-drm/
-obj-$(CONFIG_DGRP)             += dgrp/
 obj-$(CONFIG_FIREWIRE_SERIAL)  += fwserial/
 obj-$(CONFIG_GOLDFISH)         += goldfish/
 obj-$(CONFIG_LUSTRE_FS)                += lustre/
index 99e484f845f2ec0d99ca53107c94b300feb5aaf3..c359317abadf125460a5fdd41b928405a5111fd1 100644 (file)
@@ -76,7 +76,7 @@ config ANDROID_LOW_MEMORY_KILLER
          Registers processes to be killed when memory is low
 
 config ANDROID_INTF_ALARM_DEV
-       bool "Android alarm driver"
+       tristate "Android alarm driver"
        depends on RTC_CLASS
        default n
        ---help---
index f200e8a843258b61b529c78de973a92fa0576aeb..ff4b3e8758a72efe47cb7d6bccf83673670e86a2 100644 (file)
@@ -443,4 +443,4 @@ static void  __exit alarm_dev_exit(void)
 
 module_init(alarm_dev_init);
 module_exit(alarm_dev_exit);
-
+MODULE_LICENSE("GPL");
index a741da77828aec517d858b1644be4102d2298749..589cfc81f419e7ec8402de91fe9883e09170da4b 100644 (file)
@@ -454,9 +454,8 @@ static size_t binder_buffer_size(struct binder_proc *proc,
 {
        if (list_is_last(&buffer->entry, &proc->buffers))
                return proc->buffer + proc->buffer_size - (void *)buffer->data;
-       else
-               return (size_t)list_entry(buffer->entry.next,
-                       struct binder_buffer, entry) - (size_t)buffer->data;
+       return (size_t)list_entry(buffer->entry.next,
+                         struct binder_buffer, entry) - (size_t)buffer->data;
 }
 
 static void binder_insert_free_buffer(struct binder_proc *proc,
index 3f2c12ba4d149aa9478e40d49ae375792252ec6e..9c3e49aa204bb1436297fdd6cc188322b66fce63 100644 (file)
@@ -106,7 +106,7 @@ static void ion_chunk_heap_free(struct ion_buffer *buffer)
 
        if (ion_buffer_cached(buffer))
                dma_sync_sg_for_device(NULL, table->sgl, table->nents,
-                                                               DMA_BIDIRECTIONAL);
+                                                       DMA_BIDIRECTIONAL);
 
        for_each_sg(table->sgl, sg, table->nents, i) {
                gen_pool_free(chunk_heap->pool, page_to_phys(sg_page(sg)),
index cb7ae08a5e24d330b3764ae23f505daa2eda432c..6b77c5195b4d60267065bb7e1f0f67f5ec5769a1 100644 (file)
@@ -49,13 +49,7 @@ static inline unsigned int order_to_size(int order)
 
 struct ion_system_heap {
        struct ion_heap heap;
-       struct ion_page_pool **pools;
-};
-
-struct page_info {
-       struct page *page;
-       unsigned int order;
-       struct list_head list;
+       struct ion_page_pool *pools[0];
 };
 
 static struct page *alloc_buffer_page(struct ion_system_heap *heap,
@@ -84,9 +78,9 @@ static struct page *alloc_buffer_page(struct ion_system_heap *heap,
 }
 
 static void free_buffer_page(struct ion_system_heap *heap,
-                            struct ion_buffer *buffer, struct page *page,
-                            unsigned int order)
+                            struct ion_buffer *buffer, struct page *page)
 {
+       unsigned int order = compound_order(page);
        bool cached = ion_buffer_cached(buffer);
 
        if (!cached && !(buffer->private_flags & ION_PRIV_FLAG_SHRINKER_FREE)) {
@@ -99,19 +93,14 @@ static void free_buffer_page(struct ion_system_heap *heap,
 }
 
 
-static struct page_info *alloc_largest_available(struct ion_system_heap *heap,
-                                                struct ion_buffer *buffer,
-                                                unsigned long size,
-                                                unsigned int max_order)
+static struct page *alloc_largest_available(struct ion_system_heap *heap,
+                                           struct ion_buffer *buffer,
+                                           unsigned long size,
+                                           unsigned int max_order)
 {
        struct page *page;
-       struct page_info *info;
        int i;
 
-       info = kmalloc(sizeof(struct page_info), GFP_KERNEL);
-       if (!info)
-               return NULL;
-
        for (i = 0; i < num_orders; i++) {
                if (size < order_to_size(orders[i]))
                        continue;
@@ -122,11 +111,8 @@ static struct page_info *alloc_largest_available(struct ion_system_heap *heap,
                if (!page)
                        continue;
 
-               info->page = page;
-               info->order = orders[i];
-               return info;
+               return page;
        }
-       kfree(info);
 
        return NULL;
 }
@@ -142,7 +128,7 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
        struct sg_table *table;
        struct scatterlist *sg;
        struct list_head pages;
-       struct page_info *info, *tmp_info;
+       struct page *page, *tmp_page;
        int i = 0;
        unsigned long size_remaining = PAGE_ALIGN(size);
        unsigned int max_order = orders[0];
@@ -155,13 +141,13 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
 
        INIT_LIST_HEAD(&pages);
        while (size_remaining > 0) {
-               info = alloc_largest_available(sys_heap, buffer, size_remaining,
+               page = alloc_largest_available(sys_heap, buffer, size_remaining,
                                                max_order);
-               if (!info)
+               if (!page)
                        goto free_pages;
-               list_add_tail(&info->list, &pages);
-               size_remaining -= PAGE_SIZE << info->order;
-               max_order = info->order;
+               list_add_tail(&page->lru, &pages);
+               size_remaining -= PAGE_SIZE << compound_order(page);
+               max_order = compound_order(page);
                i++;
        }
        table = kmalloc(sizeof(struct sg_table), GFP_KERNEL);
@@ -172,12 +158,10 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
                goto free_table;
 
        sg = table->sgl;
-       list_for_each_entry_safe(info, tmp_info, &pages, list) {
-               struct page *page = info->page;
-               sg_set_page(sg, page, PAGE_SIZE << info->order, 0);
+       list_for_each_entry_safe(page, tmp_page, &pages, lru) {
+               sg_set_page(sg, page, PAGE_SIZE << compound_order(page), 0);
                sg = sg_next(sg);
-               list_del(&info->list);
-               kfree(info);
+               list_del(&page->lru);
        }
 
        buffer->priv_virt = table;
@@ -186,10 +170,8 @@ static int ion_system_heap_allocate(struct ion_heap *heap,
 free_table:
        kfree(table);
 free_pages:
-       list_for_each_entry_safe(info, tmp_info, &pages, list) {
-               free_buffer_page(sys_heap, buffer, info->page, info->order);
-               kfree(info);
-       }
+       list_for_each_entry_safe(page, tmp_page, &pages, lru)
+               free_buffer_page(sys_heap, buffer, page);
        return -ENOMEM;
 }
 
@@ -209,8 +191,7 @@ static void ion_system_heap_free(struct ion_buffer *buffer)
                ion_heap_buffer_zero(buffer);
 
        for_each_sg(table->sgl, sg, table->nents, i)
-               free_buffer_page(sys_heap, buffer, sg_page(sg),
-                               get_order(sg->length));
+               free_buffer_page(sys_heap, buffer, sg_page(sg));
        sg_free_table(table);
        kfree(table);
 }
@@ -283,16 +264,15 @@ struct ion_heap *ion_system_heap_create(struct ion_platform_heap *unused)
        struct ion_system_heap *heap;
        int i;
 
-       heap = kzalloc(sizeof(struct ion_system_heap), GFP_KERNEL);
+       heap = kzalloc(sizeof(struct ion_system_heap) +
+                       sizeof(struct ion_page_pool *) * num_orders,
+                       GFP_KERNEL);
        if (!heap)
                return ERR_PTR(-ENOMEM);
        heap->heap.ops = &system_heap_ops;
        heap->heap.type = ION_HEAP_TYPE_SYSTEM;
        heap->heap.flags = ION_HEAP_FLAG_DEFER_FREE;
-       heap->pools = kzalloc(sizeof(struct ion_page_pool *) * num_orders,
-                             GFP_KERNEL);
-       if (!heap->pools)
-               goto free_heap;
+
        for (i = 0; i < num_orders; i++) {
                struct ion_page_pool *pool;
                gfp_t gfp_flags = low_order_gfp_flags;
@@ -311,8 +291,6 @@ struct ion_heap *ion_system_heap_create(struct ion_platform_heap *unused)
 destroy_pools:
        while (i--)
                ion_page_pool_destroy(heap->pools[i]);
-       kfree(heap->pools);
-free_heap:
        kfree(heap);
        return ERR_PTR(-ENOMEM);
 }
@@ -326,7 +304,6 @@ void ion_system_heap_destroy(struct ion_heap *heap)
 
        for (i = 0; i < num_orders; i++)
                ion_page_pool_destroy(sys_heap->pools[i]);
-       kfree(sys_heap->pools);
        kfree(sys_heap);
 }
 
index 606d5f5e92166041680b7eaf0f89c5a60fce8315..c1e01f7d64ba2d313f387cc0740b01b9feb53b50 100644 (file)
@@ -1648,7 +1648,7 @@ static int bcm_char_ioctl_flash2x_section_read(void __user *argp,
 
        ReadOffset = sFlash2xRead.offset;
        OutPutBuff = IoBuffer.OutputBuffer;
-       pReadBuff = (PCHAR)kzalloc(BuffSize , GFP_KERNEL);
+       pReadBuff = kzalloc(BuffSize , GFP_KERNEL);
 
        if (pReadBuff == NULL) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
index fb1d932c5d790a6e2a6b93b4a2f848c482bee223..3dbdf0eb49aca2335e0840600ee6964a8ce7514c 100644 (file)
@@ -1418,7 +1418,7 @@ static inline ULONG RestoreSFParam(struct bcm_mini_adapter *Adapter,
        ulAddrSFParamSet = ntohl(ulAddrSFParamSet);
 
        /* Read out the SF Param Set At the indicated Location */
-       if (rdm(Adapter, ulAddrSFParamSet,(PUCHAR)pucDestBuffer, nBytesToRead) < 0)
+       if (rdm(Adapter, ulAddrSFParamSet, (PUCHAR)pucDestBuffer, nBytesToRead) < 0)
                return STATUS_FAILURE;
 
        return 1;
index f1d7cb82fd7ecdeada6f68ed52c91dec1d175d30..4564f4080e923cf5f25c667f4103636e752b25c7 100644 (file)
@@ -776,7 +776,7 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
        struct bcm_ddr_setting *psDDRSetting = NULL;
        ULONG RegCount = 0;
        UINT value = 0;
-       UINT  uiResetValue = 0;
+       UINT uiResetValue = 0;
        UINT uiClockSetting = 0;
        int retval = STATUS_SUCCESS;
 
@@ -785,18 +785,18 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
                switch (Adapter->DDRSetting) {
                case DDR_80_MHZ:
                        psDDRSetting = asT3LP_DDRSetting80MHz;
-                       RegCount = (sizeof(asT3LP_DDRSetting80MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3LP_DDRSetting80MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_100_MHZ:
                        psDDRSetting = asT3LP_DDRSetting100MHz;
-                       RegCount = (sizeof(asT3LP_DDRSetting100MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3LP_DDRSetting100MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_133_MHZ:
                        psDDRSetting = asT3LP_DDRSetting133MHz;
-                       RegCount = (sizeof(asT3LP_DDRSetting133MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3LP_DDRSetting133MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        if (Adapter->bMipsConfig == MIPS_200_MHZ)
                                uiClockSetting = 0x03F13652;
                        else
@@ -818,15 +818,21 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
        if ((Adapter->chip_id !=  BCS220_2) &&
                (Adapter->chip_id !=  BCS220_2BC) &&
                (Adapter->chip_id != BCS220_3)) {
-               retval = rdmalt(Adapter, (UINT)0x0f000830, &uiResetValue, sizeof(uiResetValue));
+               retval = rdmalt(Adapter, (UINT)0x0f000830, &uiResetValue,
+                               sizeof(uiResetValue));
                if (retval < 0) {
-                       BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                       BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL,
+                                       "%s:%d RDM failed\n",
+                                       __func__, __LINE__);
                        return retval;
                }
                uiResetValue |= 0x44;
-               retval = wrmalt(Adapter, (UINT)0x0f000830, &uiResetValue, sizeof(uiResetValue));
+               retval = wrmalt(Adapter, (UINT)0x0f000830, &uiResetValue,
+                               sizeof(uiResetValue));
                if (retval < 0) {
-                       BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                       BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL,
+                                       "%s:%d RDM failed\n",
+                                       __func__, __LINE__);
                        return retval;
                }
        }
@@ -836,18 +842,18 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
 
                case DDR_80_MHZ:
                        psDDRSetting = asT3LPB_DDRSetting80MHz;
-                       RegCount = (sizeof(asT3B_DDRSetting80MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3B_DDRSetting80MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_100_MHZ:
                        psDDRSetting = asT3LPB_DDRSetting100MHz;
-                       RegCount = (sizeof(asT3B_DDRSetting100MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3B_DDRSetting100MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_133_MHZ:
                        psDDRSetting = asT3LPB_DDRSetting133MHz;
-                       RegCount = (sizeof(asT3B_DDRSetting133MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3B_DDRSetting133MHz) /
+                                   sizeof(struct bcm_ddr_setting));
 
                        if (Adapter->bMipsConfig == MIPS_200_MHZ)
                                uiClockSetting = 0x03F13652;
@@ -857,7 +863,8 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
 
                case DDR_160_MHZ:
                        psDDRSetting = asT3LPB_DDRSetting160MHz;
-                       RegCount = sizeof(asT3LPB_DDRSetting160MHz)/sizeof(struct bcm_ddr_setting);
+                       RegCount = sizeof(asT3LPB_DDRSetting160MHz) /
+                                  sizeof(struct bcm_ddr_setting);
 
                        if (Adapter->bMipsConfig == MIPS_200_MHZ)
                                uiClockSetting = 0x03F137D2;
@@ -871,22 +878,23 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
        case 0xbece0121:
        case 0xbece0130:
        case 0xbece0300:
-       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "DDR Setting: %x\n", Adapter->DDRSetting);
+       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
+                       "DDR Setting: %x\n", Adapter->DDRSetting);
                switch (Adapter->DDRSetting) {
                case DDR_80_MHZ:
                        psDDRSetting = asT3_DDRSetting80MHz;
-                       RegCount = (sizeof(asT3_DDRSetting80MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3_DDRSetting80MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_100_MHZ:
                        psDDRSetting = asT3_DDRSetting100MHz;
-                       RegCount = (sizeof(asT3_DDRSetting100MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3_DDRSetting100MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_133_MHZ:
                        psDDRSetting = asT3_DDRSetting133MHz;
-                       RegCount = (sizeof(asT3_DDRSetting133MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3_DDRSetting133MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                default:
                        return -EINVAL;
@@ -896,26 +904,26 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
                switch (Adapter->DDRSetting) {
                case DDR_80_MHZ:
                        psDDRSetting = asT3B_DDRSetting80MHz;
-                       RegCount = (sizeof(asT3B_DDRSetting80MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3B_DDRSetting80MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_100_MHZ:
                        psDDRSetting = asT3B_DDRSetting100MHz;
-                       RegCount = (sizeof(asT3B_DDRSetting100MHz)/
-                       sizeof(struct bcm_ddr_setting));
+                       RegCount = (sizeof(asT3B_DDRSetting100MHz) /
+                                   sizeof(struct bcm_ddr_setting));
                        break;
                case DDR_133_MHZ:
 
                        if (Adapter->bDPLLConfig == PLL_266_MHZ) {  /* 266Mhz PLL selected. */
                                memcpy(asT3B_DDRSetting133MHz, asDPLL_266MHZ,
-                               sizeof(asDPLL_266MHZ));
+                                      sizeof(asDPLL_266MHZ));
                                psDDRSetting = asT3B_DDRSetting133MHz;
-                               RegCount = (sizeof(asT3B_DDRSetting133MHz)/
-                               sizeof(struct bcm_ddr_setting));
+                               RegCount = (sizeof(asT3B_DDRSetting133MHz) /
+                                           sizeof(struct bcm_ddr_setting));
                        } else {
                                psDDRSetting = asT3B_DDRSetting133MHz;
-                               RegCount = (sizeof(asT3B_DDRSetting133MHz)/
-                               sizeof(struct bcm_ddr_setting));
+                               RegCount = (sizeof(asT3B_DDRSetting133MHz) /
+                                           sizeof(struct bcm_ddr_setting));
                                if (Adapter->bMipsConfig == MIPS_200_MHZ)
                                        uiClockSetting = 0x07F13652;
                                else
@@ -933,15 +941,19 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
        }
 
        value = 0;
-       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Register Count is =%lu\n", RegCount);
+       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
+                       "Register Count is =%lu\n", RegCount);
        while (RegCount && !retval) {
-               if (uiClockSetting && psDDRSetting->ulRegAddress == MIPS_CLOCK_REG)
+               if (uiClockSetting
+                               && psDDRSetting->ulRegAddress == MIPS_CLOCK_REG)
                        value = uiClockSetting;
                else
                        value = psDDRSetting->ulRegValue;
-               retval = wrmalt(Adapter, psDDRSetting->ulRegAddress, &value, sizeof(value));
+               retval = wrmalt(Adapter, psDDRSetting->ulRegAddress, &value,
+                               sizeof(value));
                if (STATUS_SUCCESS != retval) {
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
+                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                       "%s:%d\n", __func__, __LINE__);
                        break;
                }
 
@@ -957,27 +969,47 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
                        (Adapter->chip_id != BCS220_3)) {
                        /* drive MDDR to half in case of UMA-B: */
                        uiResetValue = 0x01010001;
-                       retval = wrmalt(Adapter, (UINT)0x0F007018, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0F007018,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x00040020;
-                       retval = wrmalt(Adapter, (UINT)0x0F007094, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0F007094,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x01020101;
-                       retval = wrmalt(Adapter, (UINT)0x0F00701c, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0F00701c,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x01010000;
-                       retval = wrmalt(Adapter, (UINT)0x0F007018, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0F007018,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                }
@@ -990,70 +1022,130 @@ int ddr_init(struct bcm_mini_adapter *Adapter)
                 * we will change this when we will have internal PMU.
                 */
                if (Adapter->PmuMode == HYBRID_MODE_7C) {
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x1322a8;
-                       retval = wrmalt(Adapter, (UINT)0x0f000d1c, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0f000d1c,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x132296;
-                       retval = wrmalt(Adapter, (UINT)0x0f000d14, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0f000d14,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                } else if (Adapter->PmuMode == HYBRID_MODE_6) {
 
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x6003229a;
-                       retval = wrmalt(Adapter, (UINT)0x0f000d14, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0f000d14,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
-                       retval = rdmalt(Adapter, (UINT)0x0f000c00, &uiResetValue, sizeof(uiResetValue));
+                       retval = rdmalt(Adapter, (UINT)0x0f000c00,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                        uiResetValue = 0x1322a8;
-                       retval = wrmalt(Adapter, (UINT)0x0f000d1c, &uiResetValue, sizeof(uiResetValue));
+                       retval = wrmalt(Adapter, (UINT)0x0f000d1c,
+                                       &uiResetValue, sizeof(uiResetValue));
                        if (retval < 0) {
-                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM, DBG_LVL_ALL, "%s:%d RDM failed\n", __func__, __LINE__);
+                               BCM_DEBUG_PRINT(Adapter, CMHOST, RDM,
+                                               DBG_LVL_ALL,
+                                               "%s:%d RDM failed\n",
+                                               __func__,
+                                               __LINE__);
                                return retval;
                        }
                }
@@ -1067,8 +1159,9 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter)
 {
        struct bcm_ddr_setting *psDDRSetting = NULL;
        ULONG RegCount = 0;
-       unsigned long ul_ddr_setting_load_addr = DDR_DUMP_INTERNAL_DEVICE_MEMORY;
-       UINT  value = 0;
+       unsigned long ul_ddr_setting_load_addr =
+               DDR_DUMP_INTERNAL_DEVICE_MEMORY;
+       UINT value = 0;
        int retval = STATUS_SUCCESS;
        bool bOverrideSelfRefresh = false;
 
@@ -1191,18 +1284,22 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter)
        }
        /* total number of Register that has to be dumped */
        value = RegCount;
-       retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value, sizeof(value));
+       retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value,
+                       sizeof(value));
        if (retval) {
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                               "%s:%d\n", __func__, __LINE__);
 
                return retval;
        }
        ul_ddr_setting_load_addr += sizeof(ULONG);
        /* signature */
        value = (0x1d1e0dd0);
-       retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value, sizeof(value));
+       retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value,
+                       sizeof(value));
        if (retval) {
-               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                               "%s:%d\n", __func__, __LINE__);
                return retval;
        }
 
@@ -1211,29 +1308,29 @@ int download_ddr_settings(struct bcm_mini_adapter *Adapter)
 
        while (RegCount && !retval) {
                value = psDDRSetting->ulRegAddress;
-               retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value, sizeof(value));
+               retval = wrmalt(Adapter, ul_ddr_setting_load_addr, &value,
+                               sizeof(value));
                ul_ddr_setting_load_addr += sizeof(ULONG);
                if (!retval) {
-                       if (bOverrideSelfRefresh && (psDDRSetting->ulRegAddress == 0x0F007018)) {
+                       if (bOverrideSelfRefresh
+                                       && (psDDRSetting->ulRegAddress
+                                               == 0x0F007018))
                                value = (psDDRSetting->ulRegValue | (1<<8));
-                       if (STATUS_SUCCESS != wrmalt(Adapter, ul_ddr_setting_load_addr,
-                               &value, sizeof(value))) {
-                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
-                               break;
-                       }
-                       } else {
-                               value =  psDDRSetting->ulRegValue;
+                       else
+                               value = psDDRSetting->ulRegValue;
 
-                               if (STATUS_SUCCESS != wrmalt(Adapter, ul_ddr_setting_load_addr ,
-                                       &value, sizeof(value))) {
-                                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "%s:%d\n", __func__, __LINE__);
-                                       break;
-                               }
+                       if (STATUS_SUCCESS != wrmalt(Adapter,
+                                                    ul_ddr_setting_load_addr,
+                                                    &value,
+                                                    sizeof(value))) {
+                               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0,
+                                               "%s:%d\n", __func__, __LINE__);
+                               break;
                        }
                }
                ul_ddr_setting_load_addr += sizeof(ULONG);
                RegCount--;
                psDDRSetting++;
        }
-               return retval;
+       return retval;
 }
index 495fe3dc514874b5b57f2773f2516a62d3046bff..54552214bf6f7352f83d613038db188906c5f994 100644 (file)
@@ -11,7 +11,8 @@
  * Enqueue the control packet for Application.
  * @return None
  */
-static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
+static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter,
+                                    struct sk_buff *skb)
 {
        struct bcm_tarang_data *pTarang = NULL;
        bool HighPriorityMessage = false;
@@ -22,7 +23,7 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk
 
        if (netif_msg_pktdata(Adapter))
                print_hex_dump(KERN_DEBUG, PFX "rx control: ", DUMP_PREFIX_NONE,
-                               16, 1, skb->data, skb->len, 0);
+                              16, 1, skb->data, skb->len, 0);
 
        switch (usStatus) {
        case CM_RESPONSES:               /* 0xA0 */
@@ -106,30 +107,32 @@ static VOID handle_rx_control_packet(struct bcm_mini_adapter *Adapter, struct sk
                         *    the sum of all types of dropped pkt by that
                         *    tarang only.
                         */
+                       struct bcm_mibs_dropped_cntrl_msg *msg =
+                               &pTarang->stDroppedAppCntrlMsgs;
                        switch (*(PUSHORT)skb->data) {
                        case CM_RESPONSES:
-                               pTarang->stDroppedAppCntrlMsgs.cm_responses++;
+                               msg->cm_responses++;
                                break;
                        case CM_CONTROL_NEWDSX_MULTICLASSIFIER_RESP:
-                               pTarang->stDroppedAppCntrlMsgs.cm_control_newdsx_multiclassifier_resp++;
+                               msg->cm_control_newdsx_multiclassifier_resp++;
                                break;
                        case LINK_CONTROL_RESP:
-                               pTarang->stDroppedAppCntrlMsgs.link_control_resp++;
+                               msg->link_control_resp++;
                                break;
                        case STATUS_RSP:
-                               pTarang->stDroppedAppCntrlMsgs.status_rsp++;
+                               msg->status_rsp++;
                                break;
                        case STATS_POINTER_RESP:
-                               pTarang->stDroppedAppCntrlMsgs.stats_pointer_resp++;
+                               msg->stats_pointer_resp++;
                                break;
                        case IDLE_MODE_STATUS:
-                               pTarang->stDroppedAppCntrlMsgs.idle_mode_status++;
+                               msg->idle_mode_status++;
                                break;
                        case AUTH_SS_HOST_MSG:
-                               pTarang->stDroppedAppCntrlMsgs.auth_ss_host_msg++;
+                               msg->auth_ss_host_msg++;
                                break;
                        default:
-                               pTarang->stDroppedAppCntrlMsgs.low_priority_message++;
+                               msg->low_priority_message++;
                                break;
                        }
 
@@ -216,6 +219,7 @@ INT flushAllAppQ(void)
        struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
        struct bcm_tarang_data *pTarang = NULL;
        struct sk_buff *PacketToDrop = NULL;
+
        for (pTarang = Adapter->pTarangs; pTarang; pTarang = pTarang->next) {
                while (pTarang->RxAppControlHead != NULL) {
                        PacketToDrop = pTarang->RxAppControlHead;
index 7c04c73e3bc8ffdd4b762c6d20d2e79d6bd65048..bef13a61b7c9d5ca552467fa4fcdead2ead81777 100644 (file)
@@ -28,28 +28,28 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *Adapter);
 static void InterfaceAdapterFree(struct bcm_interface_adapter *psIntfAdapter)
 {
        int i = 0;
+       struct bcm_mini_adapter *ps_ad = psIntfAdapter->psAdapter;
 
        /* Wake up the wait_queue... */
-       if (psIntfAdapter->psAdapter->LEDInfo.led_thread_running &
+       if (ps_ad->LEDInfo.led_thread_running &
                        BCM_LED_THREAD_RUNNING_ACTIVELY) {
-               psIntfAdapter->psAdapter->DriverState = DRIVER_HALT;
-               wake_up(&psIntfAdapter->psAdapter->LEDInfo.notify_led_event);
+               ps_ad->DriverState = DRIVER_HALT;
+               wake_up(&ps_ad->LEDInfo.notify_led_event);
        }
-       reset_card_proc(psIntfAdapter->psAdapter);
+       reset_card_proc(ps_ad);
 
        /*
         * worst case time taken by the RDM/WRM will be 5 sec. will check after
         * every 100 ms to accertain the device is not being accessed. After
         * this No RDM/WRM should be made.
         */
-       while (psIntfAdapter->psAdapter->DeviceAccess) {
-               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_INITEXIT,
-                               DRV_ENTRY, DBG_LVL_ALL,
-                               "Device is being accessed.\n");
+       while (ps_ad->DeviceAccess) {
+               BCM_DEBUG_PRINT(ps_ad, DBG_TYPE_INITEXIT, DRV_ENTRY,
+                               DBG_LVL_ALL, "Device is being accessed.\n");
                msleep(100);
        }
        /* Free interrupt URB */
-       /* psIntfAdapter->psAdapter->device_removed = TRUE; */
+       /* ps_ad->device_removed = TRUE; */
        usb_free_urb(psIntfAdapter->psInterruptUrb);
 
        /* Free transmit URBs */
@@ -67,10 +67,11 @@ static void InterfaceAdapterFree(struct bcm_interface_adapter *psIntfAdapter)
                        psIntfAdapter->asUsbRcb[i].urb = NULL;
                }
        }
-       AdapterFree(psIntfAdapter->psAdapter);
+       AdapterFree(ps_ad);
 }
 
-static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter)
+static void ConfigureEndPointTypesThroughEEPROM(
+               struct bcm_mini_adapter *Adapter)
 {
        u32 ulReg;
        int bytes;
@@ -129,7 +130,10 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter
        ulReg &= 0x0101FFFF;
        BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1FC, 4, TRUE);
 
-       /* Update length field if required. Also make the string NULL terminated. */
+       /*
+        * Update length field if required.
+        * Also make the string NULL terminated.
+        */
 
        ReadBeceemEEPROM(Adapter, 0xA8, &ulReg);
        if ((ulReg&0x00FF0000)>>16 > 0x30) {
@@ -147,7 +151,8 @@ static void ConfigureEndPointTypesThroughEEPROM(struct bcm_mini_adapter *Adapter
        BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&ulReg, 0x1C2, 4, TRUE);
 }
 
-static int usbbcm_device_probe(struct usb_interface *intf, const struct usb_device_id *id)
+static int usbbcm_device_probe(struct usb_interface *intf,
+                              const struct usb_device_id *id)
 {
        struct usb_device *udev = interface_to_usbdev(intf);
        int retval;
@@ -338,16 +343,16 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
 {
        int value = 0;
        UINT status = STATUS_SUCCESS;
+       struct bcm_mini_adapter *psAd = psIntfAdapter->psAdapter;
 
-       status = InitCardAndDownloadFirmware(psIntfAdapter->psAdapter);
+       status = InitCardAndDownloadFirmware(psAd);
        if (status != STATUS_SUCCESS) {
                pr_err(DRV_NAME "InitCardAndDownloadFirmware failed.\n");
                return status;
        }
-       if (psIntfAdapter->psAdapter->fw_download_done) {
+       if (psAd->fw_download_done) {
                if (StartInterruptUrb(psIntfAdapter)) {
-                       BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                       DBG_TYPE_INITEXIT, DRV_ENTRY,
+                       BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY,
                                        DBG_LVL_ALL,
                                        "Cannot send interrupt in URB\n");
                }
@@ -356,17 +361,15 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
                 * now register the cntrl interface.  after downloading the f/w
                 * waiting for 5 sec to get the mailbox interrupt.
                 */
-               psIntfAdapter->psAdapter->waiting_to_fw_download_done = false;
-               value = wait_event_timeout(
-                               psIntfAdapter->psAdapter->ioctl_fw_dnld_wait_queue,
-                               psIntfAdapter->psAdapter->waiting_to_fw_download_done,
-                               5 * HZ);
+               psAd->waiting_to_fw_download_done = false;
+               value = wait_event_timeout(psAd->ioctl_fw_dnld_wait_queue,
+                                          psAd->waiting_to_fw_download_done,
+                                          5 * HZ);
 
                if (value == 0)
                        pr_err(DRV_NAME ": Timeout waiting for mailbox interrupt.\n");
 
-               if (register_control_device_interface(
-                                       psIntfAdapter->psAdapter) < 0) {
+               if (register_control_device_interface(psAd) < 0) {
                        pr_err(DRV_NAME ": Register Control Device failed.\n");
                        return -EIO;
                }
@@ -374,6 +377,109 @@ static int device_run(struct bcm_interface_adapter *psIntfAdapter)
        return 0;
 }
 
+static int select_alternate_setting_for_highspeed_modem(
+               struct bcm_interface_adapter *psIntfAdapter,
+               struct usb_endpoint_descriptor **endpoint,
+               const struct usb_host_interface *iface_desc,
+               int *usedIntOutForBulkTransfer)
+{
+       int retval = 0;
+       struct bcm_mini_adapter *psAd = psIntfAdapter->psAdapter;
+
+       /* selecting alternate setting one as a default setting
+        * for High Speed  modem. */
+       if (psIntfAdapter->bHighSpeedDevice)
+               retval = usb_set_interface(psIntfAdapter->udev,
+                                          DEFAULT_SETTING_0,
+                                          ALTERNATE_SETTING_1);
+       BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
+                       "BCM16 is applicable on this dongle\n");
+       if (retval || !psIntfAdapter->bHighSpeedDevice) {
+               *usedIntOutForBulkTransfer = EP2;
+               *endpoint = &iface_desc->endpoint[EP2].desc;
+               BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
+                               "Interface altsetting failed or modem is configured to Full Speed, hence will work on default setting 0\n");
+               /*
+                * If Modem is high speed device EP2 should be
+                * INT OUT End point
+                *
+                * If Mode is FS then EP2 should be bulk end
+                * point
+                */
+               if ((psIntfAdapter->bHighSpeedDevice &&
+                                       !usb_endpoint_is_int_out(*endpoint)) ||
+                               (!psIntfAdapter->bHighSpeedDevice &&
+                                !usb_endpoint_is_bulk_out(*endpoint))) {
+                       BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY,
+                                       DBG_LVL_ALL,
+                                       "Configuring the EEPROM\n");
+                       /* change the EP2, EP4 to INT OUT end point */
+                       ConfigureEndPointTypesThroughEEPROM(
+                                       psAd);
+
+                       /*
+                        * It resets the device and if any thing
+                        * gets changed in USB descriptor it
+                        * will show fail and re-enumerate the
+                        * device
+                        */
+                       retval = usb_reset_device(psIntfAdapter->udev);
+                       if (retval) {
+                               BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
+                                               DRV_ENTRY, DBG_LVL_ALL,
+                                               "reset failed.  Re-enumerating the device.\n");
+                               return retval;
+                       }
+
+               }
+               if (!psIntfAdapter->bHighSpeedDevice &&
+                   usb_endpoint_is_bulk_out(*endpoint)) {
+                       /*
+                        * Once BULK is selected in FS mode.
+                        * Revert it back to INT.
+                        * Else USB_IF will fail.
+                        */
+                       UINT _uiData = ntohl(EP2_CFG_INT);
+                       BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY,
+                                       DBG_LVL_ALL,
+                                       "Reverting Bulk to INT as it is in Full Speed mode.\n");
+                       BeceemEEPROMBulkWrite(psAd, (PUCHAR) & _uiData, 0x136,
+                                             4, TRUE);
+               }
+       } else {
+               *usedIntOutForBulkTransfer = EP4;
+               *endpoint = &iface_desc->endpoint[EP4].desc;
+               BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL,
+                               "Choosing AltSetting as a default setting.\n");
+               if (!usb_endpoint_is_int_out(*endpoint)) {
+                       BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT, DRV_ENTRY,
+                                       DBG_LVL_ALL,
+                                       "Dongle does not have BCM16 Fix.\n");
+                       /*
+                        * change the EP2, EP4 to INT OUT end point and use EP4
+                        * in altsetting
+                        */
+                       ConfigureEndPointTypesThroughEEPROM(psAd);
+
+                       /*
+                        * It resets the device and if any thing
+                        * gets changed in USB descriptor it
+                        * will show fail and re-enumerate the
+                        * device
+                        */
+                       retval = usb_reset_device(psIntfAdapter->udev);
+                       if (retval) {
+                               BCM_DEBUG_PRINT(psAd, DBG_TYPE_INITEXIT,
+                                               DRV_ENTRY, DBG_LVL_ALL,
+                                               "reset failed.  Re-enumerating the device.\n");
+                               return retval;
+                       }
+               }
+       }
+
+       return 0;
+}
+
 static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
 {
        struct usb_host_interface *iface_desc;
@@ -385,6 +491,7 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
        bool bBcm16 = false;
        UINT uiData = 0;
        int bytes;
+       struct bcm_mini_adapter *psAd = psIntfAdapter->psAdapter;
 
        /* Store the usb dev into interface adapter */
        psIntfAdapter->udev =
@@ -392,141 +499,43 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
 
        psIntfAdapter->bHighSpeedDevice =
                (psIntfAdapter->udev->speed == USB_SPEED_HIGH);
-       psIntfAdapter->psAdapter->interface_rdm = BcmRDM;
-       psIntfAdapter->psAdapter->interface_wrm = BcmWRM;
+       psAd->interface_rdm = BcmRDM;
+       psAd->interface_wrm = BcmWRM;
 
-       bytes = rdmalt(psIntfAdapter->psAdapter, CHIP_ID_REG,
-                       (u32 *) &(psIntfAdapter->psAdapter->chip_id),
-                       sizeof(u32));
+       bytes = rdmalt(psAd, CHIP_ID_REG, (u32 *) &(psAd->chip_id),
+                      sizeof(u32));
        if (bytes < 0) {
                retval = bytes;
-               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0,
+               BCM_DEBUG_PRINT(psAd, DBG_TYPE_PRINTK, 0, 0,
                                "CHIP ID Read Failed\n");
                return retval;
        }
 
-       if (0xbece3200 == (psIntfAdapter->psAdapter->chip_id & ~(0xF0)))
-               psIntfAdapter->psAdapter->chip_id &= ~0xF0;
+       if (0xbece3200 == (psAd->chip_id & ~(0xF0)))
+               psAd->chip_id &= ~0xF0;
 
        dev_info(&psIntfAdapter->udev->dev, "RDM Chip ID 0x%lx\n",
-                       psIntfAdapter->psAdapter->chip_id);
+                psAd->chip_id);
 
        iface_desc = psIntfAdapter->interface->cur_altsetting;
 
-       if (psIntfAdapter->psAdapter->chip_id == T3B) {
+       if (psAd->chip_id == T3B) {
                /* T3B device will have EEPROM, check if EEPROM is proper and
                 * BCM16 can be done or not. */
-               BeceemEEPROMBulkRead(psIntfAdapter->psAdapter, &uiData, 0x0, 4);
+               BeceemEEPROMBulkRead(psAd, &uiData, 0x0, 4);
                if (uiData == BECM)
                        bBcm16 = TRUE;
 
                dev_info(&psIntfAdapter->udev->dev,
-                               "number of alternate setting %d\n",
-                               psIntfAdapter->interface->num_altsetting);
+                        "number of alternate setting %d\n",
+                        psIntfAdapter->interface->num_altsetting);
 
                if (bBcm16 == TRUE) {
-                       /* selecting alternate setting one as a default setting
-                        * for High Speed  modem. */
-                       if (psIntfAdapter->bHighSpeedDevice)
-                               retval = usb_set_interface(psIntfAdapter->udev,
-                                               DEFAULT_SETTING_0,
-                                               ALTERNATE_SETTING_1);
-                       BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                       DBG_TYPE_INITEXIT, DRV_ENTRY,
-                                       DBG_LVL_ALL,
-                                       "BCM16 is applicable on this dongle\n");
-                       if (retval || !psIntfAdapter->bHighSpeedDevice) {
-                               usedIntOutForBulkTransfer = EP2;
-                               endpoint = &iface_desc->endpoint[EP2].desc;
-                               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                               DBG_TYPE_INITEXIT, DRV_ENTRY,
-                                               DBG_LVL_ALL,
-                                               "Interface altsetting failed or modem is configured to Full Speed, hence will work on default setting 0\n");
-                               /*
-                                * If Modem is high speed device EP2 should be
-                                * INT OUT End point
-                                *
-                                * If Mode is FS then EP2 should be bulk end
-                                * point
-                                */
-                               if ((psIntfAdapter->bHighSpeedDevice &&
-                                                       !usb_endpoint_is_int_out(endpoint)) ||
-                                               (!psIntfAdapter->bHighSpeedDevice &&
-                                                !usb_endpoint_is_bulk_out(endpoint))) {
-                                       BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                                       DBG_TYPE_INITEXIT,
-                                                       DRV_ENTRY, DBG_LVL_ALL,
-                                                       "Configuring the EEPROM\n");
-                                       /* change the EP2, EP4 to INT OUT end point */
-                                       ConfigureEndPointTypesThroughEEPROM(
-                                                       psIntfAdapter->psAdapter);
-
-                                       /*
-                                        * It resets the device and if any thing
-                                        * gets changed in USB descriptor it
-                                        * will show fail and re-enumerate the
-                                        * device
-                                        */
-                                       retval = usb_reset_device(
-                                                       psIntfAdapter->udev);
-                                       if (retval) {
-                                               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                                               DBG_TYPE_INITEXIT,
-                                                               DRV_ENTRY,
-                                                               DBG_LVL_ALL,
-                                                               "reset failed.  Re-enumerating the device.\n");
-                                               return retval;
-                                       }
-
-                               }
-                               if (!psIntfAdapter->bHighSpeedDevice &&
-                                   usb_endpoint_is_bulk_out(endpoint)) {
-                                       /* Once BULK is selected in FS mode. Revert it back to INT. Else USB_IF will fail. */
-                                       UINT _uiData = ntohl(EP2_CFG_INT);
-                                       BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                                       DBG_TYPE_INITEXIT,
-                                                       DRV_ENTRY, DBG_LVL_ALL,
-                                                       "Reverting Bulk to INT as it is in Full Speed mode.\n");
-                                       BeceemEEPROMBulkWrite(
-                                                       psIntfAdapter->psAdapter,
-                                                       (PUCHAR) & _uiData,
-                                                       0x136, 4, TRUE);
-                               }
-                       } else {
-                               usedIntOutForBulkTransfer = EP4;
-                               endpoint = &iface_desc->endpoint[EP4].desc;
-                               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                               DBG_TYPE_INITEXIT, DRV_ENTRY,
-                                               DBG_LVL_ALL,
-                                               "Choosing AltSetting as a default setting.\n");
-                               if (!usb_endpoint_is_int_out(endpoint)) {
-                                       BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                                       DBG_TYPE_INITEXIT,
-                                                       DRV_ENTRY, DBG_LVL_ALL,
-                                                       "Dongle does not have BCM16 Fix.\n");
-                                       /* change the EP2, EP4 to INT OUT end point and use EP4 in altsetting */
-                                       ConfigureEndPointTypesThroughEEPROM(
-                                                       psIntfAdapter->psAdapter);
-
-                                       /*
-                                        * It resets the device and if any thing
-                                        * gets changed in USB descriptor it
-                                        * will show fail and re-enumerate the
-                                        * device
-                                        */
-                                       retval = usb_reset_device(
-                                                       psIntfAdapter->udev);
-                                       if (retval) {
-                                               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter,
-                                                               DBG_TYPE_INITEXIT,
-                                                               DRV_ENTRY,
-                                                               DBG_LVL_ALL,
-                                                               "reset failed.  Re-enumerating the device.\n");
-                                               return retval;
-                                       }
-
-                               }
-                       }
+                       retval = select_alternate_setting_for_highspeed_modem(
+                                       psIntfAdapter, &endpoint, iface_desc,
+                                       &usedIntOutForBulkTransfer);
+                       if (retval)
+                               return retval;
                }
        }
 
@@ -572,9 +581,12 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
                if (!psIntfAdapter->sIntrOut.int_out_endpointAddr &&
                                usb_endpoint_is_int_out(endpoint)) {
                        if (!psIntfAdapter->sBulkOut.bulk_out_endpointAddr &&
-                                       (psIntfAdapter->psAdapter->chip_id == T3B) &&
+                                       (psAd->chip_id == T3B) &&
                                        (value == usedIntOutForBulkTransfer)) {
-                               /* use first intout end point as a bulk out end point */
+                               /*
+                                * use first intout end point as a bulk out end
+                                * point
+                                */
                                buffer_size =
                                        le16_to_cpu(endpoint->wMaxPacketSize);
                                psIntfAdapter->sBulkOut.bulk_out_size =
@@ -606,15 +618,14 @@ static int InterfaceAdapterInit(struct bcm_interface_adapter *psIntfAdapter)
 
        usb_set_intfdata(psIntfAdapter->interface, psIntfAdapter);
 
-       psIntfAdapter->psAdapter->bcm_file_download = InterfaceFileDownload;
-       psIntfAdapter->psAdapter->bcm_file_readback_from_chip =
-               InterfaceFileReadbackFromChip;
-       psIntfAdapter->psAdapter->interface_transmit = InterfaceTransmitPacket;
+       psAd->bcm_file_download = InterfaceFileDownload;
+       psAd->bcm_file_readback_from_chip = InterfaceFileReadbackFromChip;
+       psAd->interface_transmit = InterfaceTransmitPacket;
 
        retval = CreateInterruptUrb(psIntfAdapter);
 
        if (retval) {
-               BCM_DEBUG_PRINT(psIntfAdapter->psAdapter, DBG_TYPE_PRINTK, 0, 0,
+               BCM_DEBUG_PRINT(psAd, DBG_TYPE_PRINTK, 0, 0,
                                "Cannot create interrupt urb\n");
                return retval;
        }
index 7b2fa0f4a2e48485dc53b1b8cb90abe6d6c12aac..a1c833c47cdf3aab77b7c61aed49c98b048c1080 100644 (file)
@@ -21,13 +21,13 @@ static void default_wimax_protocol_initialize(struct bcm_mini_adapter *Adapter)
        Adapter->LinkStatus = SYNC_UP_REQUEST;
        Adapter->TransferMode = IP_PACKET_ONLY_MODE;
        Adapter->usBestEffortQueueIndex = -1;
-       return;
 }
 
 int InitAdapter(struct bcm_mini_adapter *psAdapter)
 {
        int i = 0;
        int Status = STATUS_SUCCESS;
+
        BCM_DEBUG_PRINT(psAdapter, DBG_TYPE_INITEXIT, MP_INIT, DBG_LVL_ALL, "Initialising Adapter = %p", psAdapter);
 
        if (psAdapter == NULL) {
@@ -96,6 +96,7 @@ int InitAdapter(struct bcm_mini_adapter *psAdapter)
 void AdapterFree(struct bcm_mini_adapter *Adapter)
 {
        int count;
+
        beceem_protocol_reset(Adapter);
        vendorextnExit(Adapter);
 
@@ -158,6 +159,7 @@ static int create_worker_threads(struct bcm_mini_adapter *psAdapter)
 static struct file *open_firmware_file(struct bcm_mini_adapter *Adapter, const char *path)
 {
        struct file *flp = filp_open(path, O_RDONLY, S_IRWXU);
+
        if (IS_ERR(flp)) {
                pr_err(DRV_NAME "Unable To Open File %s, err %ld", path, PTR_ERR(flp));
                flp = NULL;
@@ -281,7 +283,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer)
                        pLeader->Status == CM_CONTROL_NEWDSX_MULTICLASSIFIER_REQ) {
 
                        if ((pLeader->Status == LINK_UP_CONTROL_REQ) && (pLinkReq->szData[0] == LINK_DOWN_REQ_PAYLOAD)) {
-                               if ((pLinkReq->szData[1] == LINK_SYNC_DOWN_SUBTYPE)) {
+                               if (pLinkReq->szData[1] == LINK_SYNC_DOWN_SUBTYPE) {
                                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, TX_CONTROL, DBG_LVL_ALL, "Link Down Sent in Idle Mode\n");
                                        Adapter->usIdleModePattern = ABORT_IDLE_SYNCDOWN; /* LINK DOWN sent in Idle Mode */
                                } else {
@@ -402,6 +404,7 @@ int CopyBufferToControlPacket(struct bcm_mini_adapter *Adapter, void *ioBuffer)
 void LinkMessage(struct bcm_mini_adapter *Adapter)
 {
        struct bcm_link_request *pstLinkRequest = NULL;
+
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LINK_UP_MSG, DBG_LVL_ALL, "=====>");
        if (Adapter->LinkStatus == SYNC_UP_REQUEST && Adapter->AutoSyncup) {
                pstLinkRequest = kzalloc(sizeof(struct bcm_link_request), GFP_ATOMIC);
@@ -456,7 +459,6 @@ void StatisticsResponse(struct bcm_mini_adapter *Adapter, void *pvBuffer)
        Adapter->StatisticsPointer = ntohl(*(__be32 *)pvBuffer);
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "Stats at %x", (unsigned int)Adapter->StatisticsPointer);
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "%s <====", __func__);
-       return;
 }
 
 /**********************************************************************
@@ -534,13 +536,13 @@ void LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuff
                }
        } else if (SET_MAC_ADDRESS_RESPONSE == *pucBuffer) {
                PUCHAR puMacAddr = (pucBuffer + 1);
+
                Adapter->LinkStatus = SYNC_UP_REQUEST;
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "MAC address response, sending SYNC_UP");
                LinkMessage(Adapter);
                memcpy(Adapter->dev->dev_addr, puMacAddr, MAC_ADDRESS_SIZE);
        }
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_RX, RX_DPC, DBG_LVL_ALL, "%s <=====", __func__);
-       return;
 }
 
 void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
@@ -548,6 +550,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
        int status = 0, NVMAccess = 0, lowPwrAbortMsg = 0;
        struct timeval tv;
        struct bcm_link_request stIdleResponse = {{0} };
+
        memset(&tv, 0, sizeof(tv));
        stIdleResponse.Leader.Status = IDLE_MESSAGE;
        stIdleResponse.Leader.PLength = IDLE_MODE_PAYLOAD_LENGTH;
@@ -624,7 +627,7 @@ void SendIdleModeResponse(struct bcm_mini_adapter *Adapter)
        }
 
        status = CopyBufferToControlPacket(Adapter, &stIdleResponse);
-       if ((status != STATUS_SUCCESS)) {
+       if (status != STATUS_SUCCESS) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "fail to send the Idle mode Request\n");
                Adapter->bPreparingForLowPowerMode = false;
                StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
@@ -770,8 +773,6 @@ void DumpPackInfo(struct bcm_mini_adapter *Adapter)
 
        for (uiLoopIndex = 0; uiLoopIndex < MIBS_MAX_HIST_ENTRIES; uiLoopIndex++)
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "Adapter->aTxPktSizeHist[%x] = %x\n", uiLoopIndex, Adapter->aTxPktSizeHist[uiLoopIndex]);
-
-       return;
 }
 
 int reset_card_proc(struct bcm_mini_adapter *ps_adapter)
@@ -1224,6 +1225,7 @@ int rdmalt(struct bcm_mini_adapter *Adapter, unsigned int uiAddress, unsigned in
 int wrmWithLock(struct bcm_mini_adapter *Adapter, unsigned int uiAddress, PCHAR pucBuff, size_t sSize)
 {
        int status = STATUS_SUCCESS;
+
        down(&Adapter->rdmwrmsync);
 
        if ((Adapter->IdleMode == TRUE) ||
@@ -1282,6 +1284,7 @@ exit:
 static void HandleShutDownModeWakeup(struct bcm_mini_adapter *Adapter)
 {
        int clear_abort_pattern = 0, Status = 0;
+
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "====>\n");
        /* target has woken up From Shut Down */
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "Clearing Shut Down Software abort pattern\n");
@@ -1385,7 +1388,7 @@ static void SendShutModeResponse(struct bcm_mini_adapter *Adapter)
        }
 
        Status = CopyBufferToControlPacket(Adapter, &stShutdownResponse);
-       if ((Status != STATUS_SUCCESS)) {
+       if (Status != STATUS_SUCCESS) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "fail to send the Idle mode Request\n");
                Adapter->bPreparingForLowPowerMode = false;
                StartInterruptUrb((struct bcm_interface_adapter *)(Adapter->pvInterfaceAdapter));
@@ -1418,7 +1421,6 @@ static void HandleShutDownModeRequest(struct bcm_mini_adapter *Adapter, PUCHAR p
        }
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, MP_SHUTDOWN, DBG_LVL_ALL, "<====\n");
-       return;
 }
 
 void ResetCounters(struct bcm_mini_adapter *Adapter)
@@ -1440,6 +1442,7 @@ void ResetCounters(struct bcm_mini_adapter *Adapter)
 struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIP)
 {
        unsigned int uiIndex = 0;
+
        for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
                if ((Adapter->astFragmentedPktClassifierTable[uiIndex].bUsed) &&
                        (Adapter->astFragmentedPktClassifierTable[uiIndex].usIpIdentification == usIpIdentification) &&
@@ -1454,6 +1457,7 @@ struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter,
 void AddFragIPClsEntry(struct bcm_mini_adapter *Adapter, struct bcm_fragmented_packet_info *psFragPktInfo)
 {
        unsigned int uiIndex = 0;
+
        for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
                if (!Adapter->astFragmentedPktClassifierTable[uiIndex].bUsed) {
                        memcpy(&Adapter->astFragmentedPktClassifierTable[uiIndex], psFragPktInfo, sizeof(struct bcm_fragmented_packet_info));
@@ -1465,6 +1469,7 @@ void AddFragIPClsEntry(struct bcm_mini_adapter *Adapter, struct bcm_fragmented_p
 void DelFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIp)
 {
        unsigned int uiIndex = 0;
+
        for (uiIndex = 0; uiIndex < MAX_FRAGMENTEDIP_CLASSIFICATION_ENTRIES; uiIndex++) {
                if ((Adapter->astFragmentedPktClassifierTable[uiIndex].bUsed) &&
                        (Adapter->astFragmentedPktClassifierTable[uiIndex].usIpIdentification == usIpIdentification) &&
@@ -1528,6 +1533,7 @@ void flush_queue(struct bcm_mini_adapter *Adapter, unsigned int iQIndex)
 {
        struct sk_buff *PacketToDrop = NULL;
        struct net_device_stats *netstats = &Adapter->dev->stats;
+
        spin_lock_bh(&Adapter->PackInfo[iQIndex].SFQueueLock);
 
        while (Adapter->PackInfo[iQIndex].FirstTxQueue && atomic_read(&Adapter->TotalPacketCount)) {
@@ -1551,6 +1557,7 @@ void flush_queue(struct bcm_mini_adapter *Adapter, unsigned int iQIndex)
 static void beceem_protocol_reset(struct bcm_mini_adapter *Adapter)
 {
        int i;
+
        if (netif_msg_link(Adapter))
                pr_notice(PFX "%s: protocol reset\n", Adapter->dev->name);
 
index 07c5a0bae1ed4241391fafc636231ad61f5872c4..bd68c6f814af0ed6b2b29d011f2640b60dc337f9 100644 (file)
@@ -1253,7 +1253,7 @@ static int phs_decompress(unsigned char *in_buf,
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, PHS_RECEIVE, DBG_LVL_ALL, "====>\n");
        *header_size = 0;
 
-       if ((decomp_phs_rules == NULL))
+       if (decomp_phs_rules == NULL)
                return 0;
 
        tmp_memb = decomp_phs_rules;
index fb53a00591ebaaef9b272985e40760c9e27b4dce..1ddc8b2539f6d719e014002e2e2366cd2b9d0cca 100644 (file)
@@ -3,13 +3,13 @@
 
 VOID LinkControlResponseMessage(struct bcm_mini_adapter *Adapter, PUCHAR pucBuffer);
 
-VOID StatisticsResponse(struct bcm_mini_adapter *Adapter,PVOID pvBuffer);
+VOID StatisticsResponse(struct bcm_mini_adapter *Adapter, PVOID pvBuffer);
 
-VOID IdleModeResponse(struct bcm_mini_adapter *Adapter,PUINT puiBuffer);
+VOID IdleModeResponse(struct bcm_mini_adapter *Adapter, PUINT puiBuffer);
 
-int control_packet_handler     (struct bcm_mini_adapter *Adapter);
+int control_packet_handler(struct bcm_mini_adapter *Adapter);
 
-VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter,UINT uiSearchRuleIndex);
+VOID DeleteAllClassifiersForSF(struct bcm_mini_adapter *Adapter, UINT uiSearchRuleIndex);
 
 VOID flush_all_queues(struct bcm_mini_adapter *Adapter);
 
@@ -29,18 +29,19 @@ VOID flush_all_queues(struct bcm_mini_adapter *Adapter);
 
 VOID PruneQueueAllSF(struct bcm_mini_adapter *Adapter);
 
-INT SearchSfid(struct bcm_mini_adapter *Adapter,UINT uiSfid);
+INT SearchSfid(struct bcm_mini_adapter *Adapter, UINT uiSfid);
 
-USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter,struct sk_buff* skb);
+USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb);
 
-bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrcPort);
-bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule,USHORT ushSrcPort);
-bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule,UCHAR ucProtocol);
+bool MatchSrcPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPort);
 
+bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushSrcPort);
+
+bool MatchProtocol(struct bcm_classifier_rule *pstClassifierRule, UCHAR ucProtocol);
 
 INT SetupNextSend(struct bcm_mini_adapter *Adapter, /**<Logical Adapter*/
                                        struct sk_buff *Packet, /**<data buffer*/
-                                       USHORT Vcid)    ;
+                                       USHORT Vcid);
 
 VOID LinkMessage(struct bcm_mini_adapter *Adapter);
 
@@ -50,8 +51,8 @@ INT SendControlPacket(struct bcm_mini_adapter *Adapter, /**<Logical Adapter*/
                                                        char *pControlPacket/**<Control Packet*/
                                                        );
 
-
 int register_networkdev(struct bcm_mini_adapter *Adapter);
+
 void unregister_networkdev(struct bcm_mini_adapter *Adapter);
 
 INT AllocAdapterDsxBuffer(struct bcm_mini_adapter *Adapter);
@@ -62,13 +63,12 @@ INT FreeAdapterDsxBuffer(struct bcm_mini_adapter *Adapter);
 
 int tx_pkt_handler(struct bcm_mini_adapter *Adapter);
 
-int  reset_card_proc(struct bcm_mini_adapter *Adapter );
+int reset_card_proc(struct bcm_mini_adapter *Adapter);
 
-int run_card_proc(struct bcm_mini_adapter *Adapter );
+int run_card_proc(struct bcm_mini_adapter *Adapter);
 
 int InitCardAndDownloadFirmware(struct bcm_mini_adapter *ps_adapter);
 
-
 INT ReadMacAddressFromNVM(struct bcm_mini_adapter *Adapter);
 
 int register_control_device_interface(struct bcm_mini_adapter *ps_adapter);
@@ -79,17 +79,18 @@ int rdm(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t
 
 int wrm(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t size);
 
-int wrmalt (struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
+int wrmalt(struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
 
-int rdmalt (struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
+int rdmalt(struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
 
-int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId, void __user * user_buffer);
+int get_dsx_sf_data_to_application(struct bcm_mini_adapter *Adapter, UINT uiSFId, void __user *user_buffer);
 
 void SendIdleModeResponse(struct bcm_mini_adapter *Adapter);
 
+int ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_mibs *buf);
 
-int  ProcessGetHostMibs(struct bcm_mini_adapter *Adapter, struct bcm_host_stats_mibs *buf);
 void GetDroppedAppCntrlPktMibs(struct bcm_host_stats_mibs *ioBuffer, struct bcm_tarang_data *pTarang);
+
 void beceem_parse_target_struct(struct bcm_mini_adapter *Adapter);
 
 int bcm_ioctl_fw_download(struct bcm_mini_adapter *Adapter, struct bcm_firmware_info *psFwInfo);
@@ -101,38 +102,32 @@ VOID ResetCounters(struct bcm_mini_adapter *Adapter);
 
 int InitLedSettings(struct bcm_mini_adapter *Adapter);
 
-struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter,USHORT usIpIdentification,ULONG SrcIP);
+struct bcm_classifier_rule *GetFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIP);
 
 void AddFragIPClsEntry(struct bcm_mini_adapter *Adapter, struct bcm_fragmented_packet_info *psFragPktInfo);
 
-void DelFragIPClsEntry(struct bcm_mini_adapter *Adapter,USHORT usIpIdentification,ULONG SrcIp);
-
-void update_per_cid_rx (struct bcm_mini_adapter *Adapter);
+void DelFragIPClsEntry(struct bcm_mini_adapter *Adapter, USHORT usIpIdentification, ULONG SrcIp);
 
-void update_per_sf_desc_cnts( struct bcm_mini_adapter *Adapter);
+void update_per_cid_rx(struct bcm_mini_adapter *Adapter);
 
-void ClearTargetDSXBuffer(struct bcm_mini_adapter *Adapter,B_UINT16 TID,bool bFreeAll);
+void update_per_sf_desc_cnts(struct bcm_mini_adapter *Adapter);
 
+void ClearTargetDSXBuffer(struct bcm_mini_adapter *Adapter, B_UINT16 TID, bool bFreeAll);
 
 void flush_queue(struct bcm_mini_adapter *Adapter, UINT iQIndex);
 
-
 INT flushAllAppQ(VOID);
 
-
 INT BeceemEEPROMBulkRead(
        struct bcm_mini_adapter *Adapter,
        PUINT pBuffer,
        UINT uiOffset,
        UINT uiNumBytes);
 
-
-
-INT WriteBeceemEEPROM(struct bcm_mini_adapter *Adapter,UINT uiEEPROMOffset, UINT uiData);
+INT WriteBeceemEEPROM(struct bcm_mini_adapter *Adapter, UINT uiEEPROMOffset, UINT uiData);
 
 INT PropagateCalParamsFromFlashToMemory(struct bcm_mini_adapter *Adapter);
 
-
 INT BeceemEEPROMBulkWrite(
        struct bcm_mini_adapter *Adapter,
        PUCHAR pBuffer,
@@ -140,9 +135,7 @@ INT BeceemEEPROMBulkWrite(
        UINT uiNumBytes,
        bool bVerify);
 
-
-INT ReadBeceemEEPROM(struct bcm_mini_adapter *Adapter,UINT dwAddress, UINT *pdwData);
-
+INT ReadBeceemEEPROM(struct bcm_mini_adapter *Adapter, UINT dwAddress, UINT *pdwData);
 
 INT BeceemNVMRead(
        struct bcm_mini_adapter *Adapter,
@@ -157,10 +150,10 @@ INT BeceemNVMWrite(
        UINT uiNumBytes,
        bool bVerify);
 
-
 INT BcmInitNVM(struct bcm_mini_adapter *Adapter);
 
-INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter,UINT uiSectorSize);
+INT BcmUpdateSectorSize(struct bcm_mini_adapter *Adapter, UINT uiSectorSize);
+
 bool IsSectionExistInFlash(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val section);
 
 INT BcmGetFlash2xSectionalBitMap(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_bitmap *psFlash2xBitMap);
@@ -183,40 +176,42 @@ INT BcmFlash2xBulkRead(
 INT BcmGetSectionValStartOffset(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlashSectionVal);
 
 INT BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectVal);
+
 INT BcmAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter);
+
 INT BcmDeAllocFlashCSStructure(struct bcm_mini_adapter *psAdapter);
 
 INT BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section sCopySectStrut);
+
 INT BcmFlash2xCorruptSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlash2xSectionVal);
+
 INT BcmFlash2xWriteSig(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_section_val eFlashSectionVal);
-INT    validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite);
+
+INT validateFlash2xReadWrite(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_readwrite *psFlash2xReadWrite);
+
 INT IsFlash2x(struct bcm_mini_adapter *Adapter);
-INT    BcmCopySection(struct bcm_mini_adapter *Adapter,
+
+INT BcmCopySection(struct bcm_mini_adapter *Adapter,
                                                enum bcm_flash2x_section_val SrcSection,
                                                enum bcm_flash2x_section_val DstSection,
                                                UINT offset,
                                                UINT numOfBytes);
 
-
 bool IsNonCDLessDevice(struct bcm_mini_adapter *Adapter);
 
+VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter, PUINT puiBuffer);
 
-VOID OverrideServiceFlowParams(struct bcm_mini_adapter *Adapter,PUINT puiBuffer);
+int wrmaltWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
 
-int wrmaltWithLock (struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
-int rdmaltWithLock (struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
+int rdmaltWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, unsigned int *pucBuff, size_t sSize);
 
 int wrmWithLock(struct bcm_mini_adapter *Adapter, UINT uiAddress, PCHAR pucBuff, size_t size);
+
 INT buffDnldVerify(struct bcm_mini_adapter *Adapter, unsigned char *mappedbuffer, unsigned int u32FirmwareLength,
                unsigned long u32StartingAddress);
 
-
 VOID putUsbSuspend(struct work_struct *work);
-bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios);
 
+bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios);
 
 #endif
-
-
-
-
index 0c742da8c6b5bf6df5591eb3999260e8757a427c..42c135144e1d7bc4dfb2cdf1fb2b011a27b89523 100644 (file)
@@ -1,6 +1,6 @@
 /**
-@file Qos.C
-This file contains the routines related to Quality of Service.
+ * @file Qos.C
+ * This file contains the routines related to Quality of Service.
 */
 #include "headers.h"
 
@@ -191,9 +191,9 @@ bool MatchDestPort(struct bcm_classifier_rule *pstClassifierRule, USHORT ushDest
        return false;
 }
 /**
-@ingroup tx_functions
-Compares IPV4 Ip address and port number
-@return Queue Index.
+ * @ingroup tx_functions
+ * Compares IPV4 Ip address and port number
+ * @return Queue Index.
 */
 static USHORT  IpVersion4(struct bcm_mini_adapter *Adapter,
                           struct iphdr *iphd,
@@ -211,7 +211,7 @@ static USHORT       IpVersion4(struct bcm_mini_adapter *Adapter,
                        pstClassifierRule->ucDirection,
                        pstClassifierRule->usVCID_Value);
 
-               //Checking classifier validity
+               /* Checking classifier validity */
                if (!pstClassifierRule->bUsed || pstClassifierRule->ucDirection == DOWNLINK_DIR)
                        break;
 
@@ -219,7 +219,7 @@ static USHORT       IpVersion4(struct bcm_mini_adapter *Adapter,
                if (pstClassifierRule->bIpv6Protocol)
                        break;
 
-               //**************Checking IP header parameter**************************//
+               /* Checking IP header parameter */
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Trying to match Source IP Address");
                if (!MatchSrcIpAddress(pstClassifierRule, iphd->saddr))
                        break;
@@ -239,12 +239,15 @@ static USHORT     IpVersion4(struct bcm_mini_adapter *Adapter,
                        break;
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Protocol Matched");
 
-               //if protocol is not TCP or UDP then no need of comparing source port and destination port
+               /*
+                * if protocol is not TCP or UDP then no
+                * need of comparing source port and destination port
+                */
                if (iphd->protocol != TCP && iphd->protocol != UDP) {
                        bClassificationSucceed = TRUE;
                        break;
                }
-               //******************Checking Transport Layer Header field if present *****************//
+               /* Checking Transport Layer Header field if present */
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "Source Port %04x",
                        (iphd->protocol == UDP) ? xprt_hdr->uhdr.source : xprt_hdr->thdr.source);
 
@@ -292,15 +295,15 @@ VOID PruneQueueAllSF(struct bcm_mini_adapter *Adapter)
 
 
 /**
-@ingroup tx_functions
-This function checks if the max queue size for a queue
-is less than number of bytes in the queue. If so -
-drops packets from the Head till the number of bytes is
-less than or equal to max queue size for the queue.
-*/
+ * @ingroup tx_functions
+ * This function checks if the max queue size for a queue
+ * is less than number of bytes in the queue. If so -
+ * drops packets from the Head till the number of bytes is
+ * less than or equal to max queue size for the queue.
+ */
 static VOID PruneQueue(struct bcm_mini_adapter *Adapter, INT iIndex)
 {
-       struct sk_buffPacketToDrop = NULL;
+       struct sk_buff *PacketToDrop = NULL;
        struct net_device_stats *netstats;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, PRUNE_QUEUE, DBG_LVL_ALL, "=====> Index %d", iIndex);
@@ -341,11 +344,11 @@ static VOID PruneQueue(struct bcm_mini_adapter *Adapter, INT iIndex)
 
                        DEQUEUEPACKET(Adapter->PackInfo[iIndex].FirstTxQueue,
                                                Adapter->PackInfo[iIndex].LastTxQueue);
-                       /// update current bytes and packets count
+                       /* update current bytes and packets count */
                        Adapter->PackInfo[iIndex].uiCurrentBytesOnHost -=
                                PacketToDrop->len;
                        Adapter->PackInfo[iIndex].uiCurrentPacketsOnHost--;
-                       /// update dropped bytes and packets counts
+                       /* update dropped bytes and packets counts */
                        Adapter->PackInfo[iIndex].uiDroppedCountBytes += PacketToDrop->len;
                        Adapter->PackInfo[iIndex].uiDroppedCountPackets++;
                        dev_kfree_skb(PacketToDrop);
@@ -368,9 +371,9 @@ static VOID PruneQueue(struct bcm_mini_adapter *Adapter, INT iIndex)
 
 VOID flush_all_queues(struct bcm_mini_adapter *Adapter)
 {
-       INT             iQIndex;
-       UINT    uiTotalPacketLength;
-       struct sk_buff*                 PacketToDrop = NULL;
+       INT     iQIndex;
+       UINT uiTotalPacketLength;
+       struct sk_buff *PacketToDrop = NULL;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "=====>");
 
@@ -393,11 +396,11 @@ VOID flush_all_queues(struct bcm_mini_adapter *Adapter)
                        /* Free the skb */
                        dev_kfree_skb(PacketToDrop);
 
-                       /// update current bytes and packets count
+                       /* update current bytes and packets count */
                        Adapter->PackInfo[iQIndex].uiCurrentBytesOnHost -= uiTotalPacketLength;
                        Adapter->PackInfo[iQIndex].uiCurrentPacketsOnHost--;
 
-                       /// update dropped bytes and packets counts
+                       /* update dropped bytes and packets counts */
                        Adapter->PackInfo[iQIndex].uiDroppedCountBytes += uiTotalPacketLength;
                        Adapter->PackInfo[iQIndex].uiDroppedCountPackets++;
 
@@ -412,24 +415,24 @@ VOID flush_all_queues(struct bcm_mini_adapter *Adapter)
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, DUMP_INFO, DBG_LVL_ALL, "<=====");
 }
 
-USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buffskb)
+USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff *skb)
 {
-       INT                     uiLoopIndex = 0;
+       INT uiLoopIndex = 0;
        struct bcm_classifier_rule *pstClassifierRule = NULL;
        struct bcm_eth_packet_info stEthCsPktInfo;
        PVOID pvEThPayload = NULL;
        struct iphdr *pIpHeader = NULL;
-       INT       uiSfIndex = 0;
-       USHORT  usIndex = Adapter->usBestEffortQueueIndex;
-       bool    bFragmentedPkt = false, bClassificationSucceed = false;
-       USHORT  usCurrFragment = 0;
+       INT uiSfIndex = 0;
+       USHORT usIndex = Adapter->usBestEffortQueueIndex;
+       bool bFragmentedPkt = false, bClassificationSucceed = false;
+       USHORT usCurrFragment = 0;
 
        struct bcm_tcp_header *pTcpHeader;
        UCHAR IpHeaderLength;
        UCHAR TcpHeaderLength;
 
        pvEThPayload = skb->data;
-       *((UINT32*) (skb->cb) +SKB_CB_TCPACK_OFFSET) = 0;
+       *((UINT32 *) (skb->cb) + SKB_CB_TCPACK_OFFSET) = 0;
        EThCSGetPktInfo(Adapter, pvEThPayload, &stEthCsPktInfo);
 
        switch (stEthCsPktInfo.eNwpktEthFrameType) {
@@ -461,14 +464,14 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
                        bFragmentedPkt = TRUE;
 
                if (bFragmentedPkt) {
-                               //Fragmented  Packet. Get Frag Classifier Entry.
+                       /* Fragmented  Packet. Get Frag Classifier Entry. */
                        pstClassifierRule = GetFragIPClsEntry(Adapter, pIpHeader->id, pIpHeader->saddr);
                        if (pstClassifierRule) {
                                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "It is next Fragmented pkt");
                                        bClassificationSucceed = TRUE;
                        }
                        if (!(ntohs(pIpHeader->frag_off) & IP_MF)) {
-                               //Fragmented Last packet . Remove Frag Classifier Entry
+                               /* Fragmented Last packet . Remove Frag Classifier Entry */
                                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "This is the last fragmented Pkt");
                                DelFragIPClsEntry(Adapter, pIpHeader->id, pIpHeader->saddr);
                        }
@@ -478,8 +481,10 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
        for (uiLoopIndex = MAX_CLASSIFIERS - 1; uiLoopIndex >= 0; uiLoopIndex--) {
                if (bClassificationSucceed)
                        break;
-               //Iterate through all classifiers which are already in order of priority
-               //to classify the packet until match found
+               /*
+                * Iterate through all classifiers which are already in order of priority
+                * to classify the packet until match found
+                */
                do {
                        if (false == Adapter->astClassifierTable[uiLoopIndex].bUsed) {
                                bClassificationSucceed = false;
@@ -488,8 +493,8 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "Adapter->PackInfo[%d].bvalid=True\n", uiLoopIndex);
 
                        if (0 == Adapter->astClassifierTable[uiLoopIndex].ucDirection) {
-                               bClassificationSucceed = false;//cannot be processed for classification.
-                               break;                                          // it is a down link connection
+                               bClassificationSucceed = false; /* cannot be processed for classification. */
+                               break;  /* it is a down link connection */
                        }
 
                        pstClassifierRule = &Adapter->astClassifierTable[uiLoopIndex];
@@ -517,7 +522,7 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
                                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "ClassifyPacket : Ethernet CS Classification Failed\n");
                                        break;
                                }
-                       } else {        // No ETH Supported on this SF
+                       } else { /* No ETH Supported on this SF */
                                if (eEthOtherFrame != stEthCsPktInfo.eNwpktEthFrameType) {
                                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, " ClassifyPacket : Packet Not a 802.3 Ethernet Frame... hence not allowed over non-ETH CS SF\n");
                                        bClassificationSucceed = false;
@@ -549,24 +554,31 @@ USHORT ClassifyPacket(struct bcm_mini_adapter *Adapter, struct sk_buff* skb)
        if (bClassificationSucceed == TRUE) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "CF id : %d, SF ID is =%lu", pstClassifierRule->uiClassifierRuleIndex, pstClassifierRule->ulSFID);
 
-               //Store The matched Classifier in SKB
-               *((UINT32*)(skb->cb)+SKB_CB_CLASSIFICATION_OFFSET) = pstClassifierRule->uiClassifierRuleIndex;
+               /* Store The matched Classifier in SKB */
+               *((UINT32 *)(skb->cb)+SKB_CB_CLASSIFICATION_OFFSET) = pstClassifierRule->uiClassifierRuleIndex;
                if ((TCP == pIpHeader->protocol) && !bFragmentedPkt && (ETH_AND_IP_HEADER_LEN + TCP_HEADER_LEN <= skb->len)) {
-                        IpHeaderLength   = pIpHeader->ihl;
-                        pTcpHeader = (struct bcm_tcp_header *)(((PUCHAR)pIpHeader)+(IpHeaderLength*4));
-                        TcpHeaderLength  = GET_TCP_HEADER_LEN(pTcpHeader->HeaderLength);
+                       IpHeaderLength = pIpHeader->ihl;
+                       pTcpHeader = (struct bcm_tcp_header *)(((PUCHAR)pIpHeader)+(IpHeaderLength*4));
+                       TcpHeaderLength  = GET_TCP_HEADER_LEN(pTcpHeader->HeaderLength);
 
                        if ((pTcpHeader->ucFlags & TCP_ACK) &&
                           (ntohs(pIpHeader->tot_len) == (IpHeaderLength*4)+(TcpHeaderLength*4)))
-                               *((UINT32*) (skb->cb) + SKB_CB_TCPACK_OFFSET) = TCP_ACK;
+                               *((UINT32 *) (skb->cb) + SKB_CB_TCPACK_OFFSET) = TCP_ACK;
                }
 
                usIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "index is  =%d", usIndex);
 
-               //If this is the first fragment of a Fragmented pkt, add this CF. Only This CF should be used for all other fragment of this Pkt.
+               /*
+                * If this is the first fragment of a Fragmented pkt,
+                * add this CF. Only This CF should be used for all other
+                * fragment of this Pkt.
+                */
                if (bFragmentedPkt && (usCurrFragment == 0)) {
-                       //First Fragment of Fragmented Packet. Create Frag CLS Entry
+                       /*
+                        * First Fragment of Fragmented Packet.
+                        * Create Frag CLS Entry
+                        */
                        struct bcm_fragmented_packet_info stFragPktInfo;
                        stFragPktInfo.bUsed = TRUE;
                        stFragPktInfo.ulSrcIpAddress = pIpHeader->saddr;
@@ -617,7 +629,7 @@ static bool EthCSMatchDestMACAddress(struct bcm_classifier_rule *pstClassifierRu
        return TRUE;
 }
 
-static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, struct sk_buffskb, struct bcm_eth_packet_info *pstEthCsPktInfo)
+static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule, struct sk_buff *skb, struct bcm_eth_packet_info *pstEthCsPktInfo)
 {
        struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
        if ((pstClassifierRule->ucEtherTypeLen == 0) ||
@@ -650,7 +662,7 @@ static bool EthCSMatchEThTypeSAP(struct bcm_classifier_rule *pstClassifierRule,
 
 }
 
-static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, struct sk_buffskb, struct bcm_eth_packet_info *pstEthCsPktInfo)
+static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, struct sk_buff *skb, struct bcm_eth_packet_info *pstEthCsPktInfo)
 {
        bool bClassificationSucceed = false;
        USHORT usVLANID;
@@ -659,7 +671,10 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "%s  CLS UserPrio:%x CLS VLANID:%x\n", __func__, ntohs(*((USHORT *)pstClassifierRule->usUserPriority)), pstClassifierRule->usVLANID);
 
-       /* In case FW didn't receive the TLV, the priority field should be ignored */
+       /*
+        * In case FW didn't receive the TLV,
+        * the priority field should be ignored
+        */
        if (pstClassifierRule->usValidityBitMap & (1<<PKT_CLASSIFICATION_USER_PRIORITY_VALID)) {
                if (pstEthCsPktInfo->eNwpktEthFrameType != eEth802QVLANFrame)
                                return false;
@@ -698,7 +713,7 @@ static bool EthCSMatchVLANRules(struct bcm_classifier_rule *pstClassifierRule, s
 }
 
 
-static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buffskb,
+static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buff *skb,
                                struct bcm_eth_packet_info *pstEthCsPktInfo,
                                struct bcm_classifier_rule *pstClassifierRule,
                                B_UINT8 EthCSCupport)
@@ -714,15 +729,14 @@ static bool EThCSClassifyPkt(struct bcm_mini_adapter *Adapter, struct sk_buff* s
                return false;
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "ETH CS DestMAC Matched\n");
 
-       //classify on ETHType/802.2SAP TLV
+       /* classify on ETHType/802.2SAP TLV */
        bClassificationSucceed = EthCSMatchEThTypeSAP(pstClassifierRule, skb, pstEthCsPktInfo);
        if (!bClassificationSucceed)
                return false;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "ETH CS EthType/802.2SAP Matched\n");
 
-       //classify on 802.1VLAN Header Parameters
-
+       /* classify on 802.1VLAN Header Parameters */
        bClassificationSucceed = EthCSMatchVLANRules(pstClassifierRule, skb, pstEthCsPktInfo);
        if (!bClassificationSucceed)
                return false;
@@ -739,9 +753,9 @@ static void EThCSGetPktInfo(struct bcm_mini_adapter *Adapter, PVOID pvEthPayload
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL,  "EthCSGetPktInfo : Eth Hdr Type : %X\n", u16Etype);
        if (u16Etype > 0x5dc) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "EthCSGetPktInfo : ETH2 Frame\n");
-               //ETH2 Frame
+               /* ETH2 Frame */
                if (u16Etype == ETHERNET_FRAMETYPE_802QVLAN) {
-                       //802.1Q VLAN Header
+                       /* 802.1Q VLAN Header */
                        pstEthCsPktInfo->eNwpktEthFrameType = eEth802QVLANFrame;
                        u16Etype = ((struct bcm_eth_q_frame *)pvEthPayload)->EthType;
                        //((ETH_CS_802_Q_FRAME*)pvEthPayload)->UserPriority
@@ -750,12 +764,12 @@ static void EThCSGetPktInfo(struct bcm_mini_adapter *Adapter, PVOID pvEthPayload
                        u16Etype = ntohs(u16Etype);
                }
        } else {
-               //802.2 LLC
+               /* 802.2 LLC */
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV4_DBG, DBG_LVL_ALL, "802.2 LLC Frame\n");
                pstEthCsPktInfo->eNwpktEthFrameType = eEth802LLCFrame;
                pstEthCsPktInfo->ucDSAP = ((struct bcm_eth_llc_frame *)pvEthPayload)->DSAP;
                if (pstEthCsPktInfo->ucDSAP == 0xAA && ((struct bcm_eth_llc_frame *)pvEthPayload)->SSAP == 0xAA) {
-                       //SNAP Frame
+                       /* SNAP Frame */
                        pstEthCsPktInfo->eNwpktEthFrameType = eEth802LLCSNAPFrame;
                        u16Etype = ((struct bcm_eth_llc_snap_frame *)pvEthPayload)->usEtherType;
                }
index e1f1da2bb6d4fec6d163c2b26fb2a88813e6c0fa..460c0aee67f6a41eaa9a1f946521d278c83813f3 100644 (file)
@@ -1,31 +1,29 @@
 /*************************************
-*      Queue.h
+* Queue.h
 **************************************/
 #ifndef        __QUEUE_H__
 #define        __QUEUE_H__
 
 
 
-#define ENQUEUEPACKET(_Head, _Tail,_Packet)    \
-do                                             \
-{                                               \
-    if (!_Head) {                           \
-               _Head = _Packet;                \
-        }                                      \
-       else {                                  \
-               (_Tail)->next = _Packet;        \
-        }                                       \
-       (_Packet)->next = NULL;                 \
-    _Tail = _Packet;                        \
-}while(0)
-#define DEQUEUEPACKET(Head, Tail )             \
-do                                             \
-{   if(Head)                   \
-       {                                            \
-        if (!Head->next) {                      \
-               Tail = NULL;                    \
-        }                                       \
-        Head = Head->next;                      \
-       }               \
-}while(0)
-#endif //__QUEUE_H__
+#define ENQUEUEPACKET(_Head, _Tail, _Packet)   \
+do {                                           \
+       if (!_Head) {                           \
+               _Head = _Packet;                \
+       }                                       \
+       else {                                  \
+               (_Tail)->next = _Packet;        \
+       }                                       \
+       (_Packet)->next = NULL;                 \
+       _Tail = _Packet;                        \
+} while (0)
+#define DEQUEUEPACKET(Head, Tail)              \
+do {                                           \
+       if (Head) {                             \
+               if (!Head->next) {              \
+                       Tail = NULL;            \
+               }                               \
+               Head = Head->next;              \
+       }                                       \
+} while (0)
+#endif /* __QUEUE_H__ */
index 42d9004e357d53a0ce5d33000cfb9df578f18d10..f9b08a5d8ce85032fdfad6177e86fdad4edc83d9 100644 (file)
@@ -17,6 +17,7 @@ INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter,
        struct bcm_phs_classifier_table *pstClassifierTable = NULL;
        struct bcm_phs_classifier_entry *pstClassifierRule = NULL;
        struct bcm_phs_extension *pDeviceExtension = &Adapter->stBCMPhsContext;
+       struct bcm_mibs_host_info *host_info;
        UINT nClassifierIndex = 0;
        UINT nPhsTableIndex = 0;
        UINT nSfIndex = 0;
@@ -83,18 +84,18 @@ INT ProcessGetHostMibs(struct bcm_mini_adapter *Adapter,
        }
 
        /* Copy other Host Statistics parameters */
-       pstHostMibs->stHostInfo.GoodTransmits = Adapter->dev->stats.tx_packets;
-       pstHostMibs->stHostInfo.GoodReceives = Adapter->dev->stats.rx_packets;
-       pstHostMibs->stHostInfo.CurrNumFreeDesc =
-                               atomic_read(&Adapter->CurrNumFreeTxDesc);
-       pstHostMibs->stHostInfo.BEBucketSize = Adapter->BEBucketSize;
-       pstHostMibs->stHostInfo.rtPSBucketSize = Adapter->rtPSBucketSize;
-       pstHostMibs->stHostInfo.TimerActive = Adapter->TimerActive;
-       pstHostMibs->stHostInfo.u32TotalDSD = Adapter->u32TotalDSD;
-
-       memcpy(pstHostMibs->stHostInfo.aTxPktSizeHist, Adapter->aTxPktSizeHist,
+       host_info = &pstHostMibs->stHostInfo;
+       host_info->GoodTransmits    = Adapter->dev->stats.tx_packets;
+       host_info->GoodReceives     = Adapter->dev->stats.rx_packets;
+       host_info->CurrNumFreeDesc  = atomic_read(&Adapter->CurrNumFreeTxDesc);
+       host_info->BEBucketSize     = Adapter->BEBucketSize;
+       host_info->rtPSBucketSize   = Adapter->rtPSBucketSize;
+       host_info->TimerActive      = Adapter->TimerActive;
+       host_info->u32TotalDSD      = Adapter->u32TotalDSD;
+
+       memcpy(host_info->aTxPktSizeHist, Adapter->aTxPktSizeHist,
               sizeof(UINT32) * MIBS_MAX_HIST_ENTRIES);
-       memcpy(pstHostMibs->stHostInfo.aRxPktSizeHist, Adapter->aRxPktSizeHist,
+       memcpy(host_info->aRxPktSizeHist, Adapter->aRxPktSizeHist,
               sizeof(UINT32) * MIBS_MAX_HIST_ENTRIES);
 
        return STATUS_SUCCESS;
@@ -112,32 +113,45 @@ VOID CopyMIBSExtendedSFParameters(struct bcm_mini_adapter *Adapter,
                                  struct bcm_connect_mgr_params *psfLocalSet,
                                  UINT uiSearchRuleIndex)
 {
-       struct bcm_mibs_parameters *t = &Adapter->PackInfo[uiSearchRuleIndex].stMibsExtServiceFlowTable;
+       struct bcm_mibs_parameters *t =
+               &Adapter->PackInfo[uiSearchRuleIndex].stMibsExtServiceFlowTable;
 
        t->wmanIfSfid = psfLocalSet->u32SFID;
-       t->wmanIfCmnCpsMaxSustainedRate = psfLocalSet->u32MaxSustainedTrafficRate;
+       t->wmanIfCmnCpsMaxSustainedRate =
+               psfLocalSet->u32MaxSustainedTrafficRate;
        t->wmanIfCmnCpsMaxTrafficBurst = psfLocalSet->u32MaxTrafficBurst;
        t->wmanIfCmnCpsMinReservedRate = psfLocalSet->u32MinReservedTrafficRate;
        t->wmanIfCmnCpsToleratedJitter = psfLocalSet->u32ToleratedJitter;
        t->wmanIfCmnCpsMaxLatency = psfLocalSet->u32MaximumLatency;
-       t->wmanIfCmnCpsFixedVsVariableSduInd = psfLocalSet->u8FixedLengthVSVariableLengthSDUIndicator;
-       t->wmanIfCmnCpsFixedVsVariableSduInd = ntohl(t->wmanIfCmnCpsFixedVsVariableSduInd);
+       t->wmanIfCmnCpsFixedVsVariableSduInd =
+               psfLocalSet->u8FixedLengthVSVariableLengthSDUIndicator;
+       t->wmanIfCmnCpsFixedVsVariableSduInd =
+               ntohl(t->wmanIfCmnCpsFixedVsVariableSduInd);
        t->wmanIfCmnCpsSduSize = psfLocalSet->u8SDUSize;
        t->wmanIfCmnCpsSduSize = ntohl(t->wmanIfCmnCpsSduSize);
-       t->wmanIfCmnCpsSfSchedulingType = psfLocalSet->u8ServiceFlowSchedulingType;
-       t->wmanIfCmnCpsSfSchedulingType = ntohl(t->wmanIfCmnCpsSfSchedulingType);
+       t->wmanIfCmnCpsSfSchedulingType =
+               psfLocalSet->u8ServiceFlowSchedulingType;
+       t->wmanIfCmnCpsSfSchedulingType =
+               ntohl(t->wmanIfCmnCpsSfSchedulingType);
        t->wmanIfCmnCpsArqEnable = psfLocalSet->u8ARQEnable;
        t->wmanIfCmnCpsArqEnable = ntohl(t->wmanIfCmnCpsArqEnable);
        t->wmanIfCmnCpsArqWindowSize = ntohs(psfLocalSet->u16ARQWindowSize);
        t->wmanIfCmnCpsArqWindowSize = ntohl(t->wmanIfCmnCpsArqWindowSize);
-       t->wmanIfCmnCpsArqBlockLifetime = ntohs(psfLocalSet->u16ARQBlockLifeTime);
-       t->wmanIfCmnCpsArqBlockLifetime = ntohl(t->wmanIfCmnCpsArqBlockLifetime);
-       t->wmanIfCmnCpsArqSyncLossTimeout = ntohs(psfLocalSet->u16ARQSyncLossTimeOut);
-       t->wmanIfCmnCpsArqSyncLossTimeout = ntohl(t->wmanIfCmnCpsArqSyncLossTimeout);
+       t->wmanIfCmnCpsArqBlockLifetime =
+               ntohs(psfLocalSet->u16ARQBlockLifeTime);
+       t->wmanIfCmnCpsArqBlockLifetime =
+               ntohl(t->wmanIfCmnCpsArqBlockLifetime);
+       t->wmanIfCmnCpsArqSyncLossTimeout =
+               ntohs(psfLocalSet->u16ARQSyncLossTimeOut);
+       t->wmanIfCmnCpsArqSyncLossTimeout =
+               ntohl(t->wmanIfCmnCpsArqSyncLossTimeout);
        t->wmanIfCmnCpsArqDeliverInOrder = psfLocalSet->u8ARQDeliverInOrder;
-       t->wmanIfCmnCpsArqDeliverInOrder = ntohl(t->wmanIfCmnCpsArqDeliverInOrder);
-       t->wmanIfCmnCpsArqRxPurgeTimeout = ntohs(psfLocalSet->u16ARQRxPurgeTimeOut);
-       t->wmanIfCmnCpsArqRxPurgeTimeout = ntohl(t->wmanIfCmnCpsArqRxPurgeTimeout);
+       t->wmanIfCmnCpsArqDeliverInOrder =
+               ntohl(t->wmanIfCmnCpsArqDeliverInOrder);
+       t->wmanIfCmnCpsArqRxPurgeTimeout =
+               ntohs(psfLocalSet->u16ARQRxPurgeTimeOut);
+       t->wmanIfCmnCpsArqRxPurgeTimeout =
+               ntohl(t->wmanIfCmnCpsArqRxPurgeTimeout);
        t->wmanIfCmnCpsArqBlockSize = ntohs(psfLocalSet->u16ARQBlockSize);
        t->wmanIfCmnCpsArqBlockSize = ntohl(t->wmanIfCmnCpsArqBlockSize);
        t->wmanIfCmnCpsReqTxPolicy = psfLocalSet->u8RequesttransmissionPolicy;
index eee4f4795a7195e9496edbe1c0170e627e896cea..835367780a8aa96bf4b413480750bde1901149e5 100644 (file)
@@ -23,8 +23,12 @@ bool IsReqGpioIsLedInNVM(struct bcm_mini_adapter *Adapter, UINT gpios)
                return TRUE;
 }
 
-static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLedIndex,
-               ULONG timeout, INT num_of_time, enum bcm_led_events currdriverstate)
+static INT LED_Blink(struct bcm_mini_adapter *Adapter,
+                    UINT GPIO_Num,
+                    UCHAR uiLedIndex,
+                    ULONG timeout,
+                    INT num_of_time,
+                    enum bcm_led_events currdriverstate)
 {
        int Status = STATUS_SUCCESS;
        bool bInfinite = false;
@@ -36,7 +40,7 @@ static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe
        }
        while (num_of_time) {
                if (currdriverstate == Adapter->DriverState)
-                       TURN_ON_LED(GPIO_Num, uiLedIndex);
+                       TURN_ON_LED(Adapter, GPIO_Num, uiLedIndex);
 
                /* Wait for timeout after setting on the LED */
                Status = wait_event_interruptible_timeout(
@@ -51,17 +55,17 @@ static INT LED_Blink(struct bcm_mini_adapter *Adapter, UINT GPIO_Num, UCHAR uiLe
                                "Led thread got signal to exit..hence exiting");
                        Adapter->LEDInfo.led_thread_running =
                                        BCM_LED_THREAD_DISABLED;
-                       TURN_OFF_LED(GPIO_Num, uiLedIndex);
+                       TURN_OFF_LED(Adapter, GPIO_Num, uiLedIndex);
                        Status = EVENT_SIGNALED;
                        break;
                }
                if (Status) {
-                       TURN_OFF_LED(GPIO_Num, uiLedIndex);
+                       TURN_OFF_LED(Adapter, GPIO_Num, uiLedIndex);
                        Status = EVENT_SIGNALED;
                        break;
                }
 
-               TURN_OFF_LED(GPIO_Num, uiLedIndex);
+               TURN_OFF_LED(Adapter, GPIO_Num, uiLedIndex);
                Status = wait_event_interruptible_timeout(
                                Adapter->LEDInfo.notify_led_event,
                                currdriverstate != Adapter->DriverState ||
@@ -93,11 +97,59 @@ static INT ScaleRateofTransfer(ULONG rate)
                return MAX_NUM_OF_BLINKS;
 }
 
+static INT blink_in_normal_bandwidth(struct bcm_mini_adapter *ad,
+                                    INT *time,
+                                    INT *time_tx,
+                                    INT *time_rx,
+                                    UCHAR GPIO_Num_tx,
+                                    UCHAR uiTxLedIndex,
+                                    UCHAR GPIO_Num_rx,
+                                    UCHAR uiRxLedIndex,
+                                    enum bcm_led_events currdriverstate,
+                                    ulong *timeout)
+{
+       /*
+        * Assign minimum number of blinks of
+        * either Tx or Rx.
+        */
+       *time = (*time_tx > *time_rx ? *time_rx : *time_tx);
+
+       if (*time > 0) {
+               /* Blink both Tx and Rx LEDs */
+               if ((LED_Blink(ad, 1 << GPIO_Num_tx, uiTxLedIndex, *timeout,
+                             *time, currdriverstate) == EVENT_SIGNALED) ||
+                   (LED_Blink(ad, 1 << GPIO_Num_rx, uiRxLedIndex, *timeout,
+                             *time, currdriverstate) == EVENT_SIGNALED))
+                       return EVENT_SIGNALED;
+       }
 
+       if (*time == *time_tx) {
+               /* Blink pending rate of Rx */
+               if (LED_Blink(ad, (1 << GPIO_Num_rx), uiRxLedIndex, *timeout,
+                             *time_rx - *time,
+                             currdriverstate) == EVENT_SIGNALED)
+                       return EVENT_SIGNALED;
 
-static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_Num_tx,
-               UCHAR uiTxLedIndex, UCHAR GPIO_Num_rx, UCHAR uiRxLedIndex,
-               enum bcm_led_events currdriverstate)
+               *time = *time_rx;
+       } else {
+               /* Blink pending rate of Tx */
+               if (LED_Blink(ad, 1 << GPIO_Num_tx, uiTxLedIndex, *timeout,
+                             *time_tx - *time,
+                             currdriverstate) == EVENT_SIGNALED)
+                       return EVENT_SIGNALED;
+
+               *time = *time_tx;
+       }
+
+       return 0;
+}
+
+static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter,
+                                 UCHAR GPIO_Num_tx,
+                                 UCHAR uiTxLedIndex,
+                                 UCHAR GPIO_Num_rx,
+                                 UCHAR uiRxLedIndex,
+                                 enum bcm_led_events currdriverstate)
 {
        /* Initial values of TX and RX packets */
        ULONG64 Initial_num_of_packts_tx = 0, Initial_num_of_packts_rx = 0;
@@ -108,7 +160,6 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N
        int Status = STATUS_SUCCESS;
        INT num_of_time = 0, num_of_time_tx = 0, num_of_time_rx = 0;
        UINT remDelay = 0;
-       bool bBlinkBothLED = TRUE;
        /* UINT GPIO_num = DISABLE_GPIO_NUM; */
        ulong timeout = 0;
 
@@ -122,73 +173,19 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N
 
        while ((Adapter->device_removed == false)) {
                timeout = 50;
-               /*
-                * Blink Tx and Rx LED when both Tx and Rx is
-                * in normal bandwidth
-                */
-               if (bBlinkBothLED) {
-                       /*
-                        * Assign minimum number of blinks of
-                        * either Tx or Rx.
-                        */
-                       if (num_of_time_tx > num_of_time_rx)
-                               num_of_time = num_of_time_rx;
-                       else
-                               num_of_time = num_of_time_tx;
-                       if (num_of_time > 0) {
-                               /* Blink both Tx and Rx LEDs */
-                               if (LED_Blink(Adapter, 1 << GPIO_Num_tx,
-                                               uiTxLedIndex, timeout,
-                                               num_of_time, currdriverstate)
-                                                       == EVENT_SIGNALED)
-                                       return EVENT_SIGNALED;
-
-                               if (LED_Blink(Adapter, 1 << GPIO_Num_rx,
-                                               uiRxLedIndex, timeout,
-                                               num_of_time, currdriverstate)
-                                                       == EVENT_SIGNALED)
-                                       return EVENT_SIGNALED;
-
-                       }
 
-                       if (num_of_time == num_of_time_tx) {
-                               /* Blink pending rate of Rx */
-                               if (LED_Blink(Adapter, (1 << GPIO_Num_rx),
-                                               uiRxLedIndex, timeout,
-                                               num_of_time_rx-num_of_time,
-                                               currdriverstate)
-                                                       == EVENT_SIGNALED)
-                                       return EVENT_SIGNALED;
+               if (EVENT_SIGNALED == blink_in_normal_bandwidth(Adapter,
+                                                               &num_of_time,
+                                                               &num_of_time_tx,
+                                                               &num_of_time_rx,
+                                                               GPIO_Num_tx,
+                                                               uiTxLedIndex,
+                                                               GPIO_Num_rx,
+                                                               uiRxLedIndex,
+                                                               currdriverstate,
+                                                               &timeout))
+                       return EVENT_SIGNALED;
 
-                               num_of_time = num_of_time_rx;
-                       } else {
-                               /* Blink pending rate of Tx */
-                               if (LED_Blink(Adapter, 1 << GPIO_Num_tx,
-                                               uiTxLedIndex, timeout,
-                                               num_of_time_tx-num_of_time,
-                                               currdriverstate)
-                                                       == EVENT_SIGNALED)
-                                       return EVENT_SIGNALED;
-
-                               num_of_time = num_of_time_tx;
-                       }
-               } else {
-                       if (num_of_time == num_of_time_tx) {
-                               /* Blink pending rate of Rx */
-                               if (LED_Blink(Adapter, 1 << GPIO_Num_tx,
-                                               uiTxLedIndex, timeout,
-                                               num_of_time, currdriverstate)
-                                                       == EVENT_SIGNALED)
-                                       return EVENT_SIGNALED;
-                       } else {
-                               /* Blink pending rate of Tx */
-                               if (LED_Blink(Adapter, 1 << GPIO_Num_rx,
-                                               uiRxLedIndex, timeout,
-                                               num_of_time, currdriverstate)
-                                                       == EVENT_SIGNALED)
-                                       return EVENT_SIGNALED;
-                       }
-               }
 
                /*
                 * If Tx/Rx rate is less than maximum blinks per second,
@@ -216,8 +213,8 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N
                }
 
                /* Turn off both Tx and Rx LEDs before next second */
-               TURN_OFF_LED(1 << GPIO_Num_tx, uiTxLedIndex);
-               TURN_OFF_LED(1 << GPIO_Num_rx, uiTxLedIndex);
+               TURN_OFF_LED(Adapter, 1 << GPIO_Num_tx, uiTxLedIndex);
+               TURN_OFF_LED(Adapter, 1 << GPIO_Num_rx, uiTxLedIndex);
 
                /*
                 * Read the Tx & Rx packets transmission after 1 second and
@@ -261,8 +258,9 @@ static INT LED_Proportional_Blink(struct bcm_mini_adapter *Adapter, UCHAR GPIO_N
  *  <OSAL_STATUS_CODE>
  * -----------------------------------------------------------------------------
  */
-static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulParamOffset,
-                                       USHORT usParamLen)
+static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter,
+                                    ULONG ulParamOffset,
+                                    USHORT usParamLen)
 {
        INT Status = STATUS_SUCCESS;
        PUCHAR puBuffer = NULL;
@@ -270,24 +268,24 @@ static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulP
        USHORT usChecksumCalculated = 0;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "LED Thread:ValidateDSDParamsChecksum: 0x%lx 0x%X",
-               ulParamOffset, usParamLen);
+                       "LED Thread:ValidateDSDParamsChecksum: 0x%lx 0x%X",
+                       ulParamOffset, usParamLen);
 
        puBuffer = kmalloc(usParamLen, GFP_KERNEL);
        if (!puBuffer) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL,
-                       "LED Thread: ValidateDSDParamsChecksum Allocation failed");
+                               DBG_LVL_ALL,
+                               "LED Thread: ValidateDSDParamsChecksum Allocation failed");
                return -ENOMEM;
 
        }
 
        /* Read the DSD data from the parameter offset. */
        if (STATUS_SUCCESS != BeceemNVMRead(Adapter, (PUINT)puBuffer,
-                       ulParamOffset, usParamLen)) {
+                                           ulParamOffset, usParamLen)) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL,
-                       "LED Thread: ValidateDSDParamsChecksum BeceemNVMRead failed");
+                               DBG_LVL_ALL,
+                               "LED Thread: ValidateDSDParamsChecksum BeceemNVMRead failed");
                Status = STATUS_IMAGE_CHECKSUM_MISMATCH;
                goto exit;
        }
@@ -295,24 +293,24 @@ static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulP
        /* Calculate the checksum of the data read from the DSD parameter. */
        usChecksumCalculated = CFG_CalculateChecksum(puBuffer, usParamLen);
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "LED Thread: usCheckSumCalculated = 0x%x\n",
-               usChecksumCalculated);
+                       "LED Thread: usCheckSumCalculated = 0x%x\n",
+                       usChecksumCalculated);
 
        /*
         * End of the DSD parameter will have a TWO bytes checksum stored in it.
         * Read it and compare with the calculated Checksum.
         */
        if (STATUS_SUCCESS != BeceemNVMRead(Adapter, (PUINT)&usChksmOrg,
-                       ulParamOffset+usParamLen, 2)) {
+                                           ulParamOffset+usParamLen, 2)) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL,
-                       "LED Thread: ValidateDSDParamsChecksum BeceemNVMRead failed");
+                               DBG_LVL_ALL,
+                               "LED Thread: ValidateDSDParamsChecksum BeceemNVMRead failed");
                Status = STATUS_IMAGE_CHECKSUM_MISMATCH;
                goto exit;
        }
        usChksmOrg = ntohs(usChksmOrg);
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "LED Thread: usChksmOrg = 0x%x", usChksmOrg);
+                       "LED Thread: usChksmOrg = 0x%x", usChksmOrg);
 
        /*
         * Compare the checksum calculated with the checksum read
@@ -320,8 +318,8 @@ static INT ValidateDSDParamsChecksum(struct bcm_mini_adapter *Adapter, ULONG ulP
         */
        if (usChecksumCalculated ^ usChksmOrg) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL,
-                       "LED Thread: ValidateDSDParamsChecksum: Checksums don't match");
+                               DBG_LVL_ALL,
+                               "LED Thread: ValidateDSDParamsChecksum: Checksums don't match");
                Status = STATUS_IMAGE_CHECKSUM_MISMATCH;
                goto exit;
        }
@@ -347,7 +345,8 @@ exit:
  *  <OSAL_STATUS_CODE>
  * -----------------------------------------------------------------------------
  */
-static INT ValidateHWParmStructure(struct bcm_mini_adapter *Adapter, ULONG ulHwParamOffset)
+static INT ValidateHWParmStructure(struct bcm_mini_adapter *Adapter,
+                                  ULONG ulHwParamOffset)
 {
 
        INT Status = STATUS_SUCCESS;
@@ -365,9 +364,9 @@ static INT ValidateHWParmStructure(struct bcm_mini_adapter *Adapter, ULONG ulHwP
                return STATUS_IMAGE_CHECKSUM_MISMATCH;
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "LED Thread:HwParamLen = 0x%x", HwParamLen);
+                       "LED Thread:HwParamLen = 0x%x", HwParamLen);
        Status = ValidateDSDParamsChecksum(Adapter, ulHwParamOffset,
-                                               HwParamLen);
+                                          HwParamLen);
        return Status;
 } /* ValidateHWParmStructure() */
 
@@ -383,16 +382,17 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
        UCHAR  ucGPIOInfo[32]   = {0};
 
        BeceemNVMRead(Adapter, (PUINT)&usEEPROMVersion,
-                       EEPROM_VERSION_OFFSET, 2);
+                     EEPROM_VERSION_OFFSET, 2);
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "usEEPROMVersion: Minor:0x%X Major:0x%x",
-               usEEPROMVersion&0xFF, ((usEEPROMVersion>>8)&0xFF));
+                       "usEEPROMVersion: Minor:0x%X Major:0x%x",
+                       usEEPROMVersion & 0xFF,
+                       ((usEEPROMVersion >> 8) & 0xFF));
 
 
        if (((usEEPROMVersion>>8)&0xFF) < EEPROM_MAP5_MAJORVERSION) {
                BeceemNVMRead(Adapter, (PUINT)&usHwParamData,
-                       EEPROM_HW_PARAM_POINTER_ADDRESS, 2);
+                             EEPROM_HW_PARAM_POINTER_ADDRESS, 2);
                usHwParamData = ntohs(usHwParamData);
                dwReadValue   = usHwParamData;
        } else {
@@ -401,21 +401,21 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
                 * if compatibility section is valid.
                 */
                Status = ValidateDSDParamsChecksum(Adapter,
-                               DSD_START_OFFSET,
-                               COMPATIBILITY_SECTION_LENGTH_MAP5);
+                                                  DSD_START_OFFSET,
+                                                  COMPATIBILITY_SECTION_LENGTH_MAP5);
 
                if (Status != STATUS_SUCCESS)
                        return Status;
 
                BeceemNVMRead(Adapter, (PUINT)&dwReadValue,
-                       EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5, 4);
+                             EEPROM_HW_PARAM_POINTER_ADDRRES_MAP5, 4);
                dwReadValue = ntohl(dwReadValue);
        }
 
 
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "LED Thread: Start address of HW_PARAM structure = 0x%lx",
-               dwReadValue);
+                       "LED Thread: Start address of HW_PARAM structure = 0x%lx",
+                       dwReadValue);
 
        /*
         * Validate if the address read out is within the DSD.
@@ -437,8 +437,8 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
         * To read GPIO section, add GPIO offset further.
         */
 
-       dwReadValue +=
-               DSD_START_OFFSET; /* = start address of hw param section. */
+       dwReadValue += DSD_START_OFFSET;
+                       /* = start address of hw param section. */
        dwReadValue += GPIO_SECTION_START_OFFSET;
                        /* = GPIO start offset within HW Param section. */
 
@@ -472,13 +472,14 @@ static int ReadLEDInformationFromEEPROM(struct bcm_mini_adapter *Adapter,
 
        }
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "GPIO's bit map correspond to LED :0x%X", Adapter->gpioBitMap);
+                       "GPIO's bit map correspond to LED :0x%X",
+                       Adapter->gpioBitMap);
        return Status;
 }
 
 
 static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
-                                       bool *bEnableThread)
+                                  bool *bEnableThread)
 {
        int Status = STATUS_SUCCESS;
        /* Array to store GPIO numbers from EEPROM */
@@ -487,11 +488,12 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
        UINT uiNum_of_LED_Type = 0;
        PUCHAR puCFGData        = NULL;
        UCHAR bData = 0;
+       struct bcm_led_state_info *curr_led_state;
        memset(GPIO_Array, DISABLE_GPIO_NUM, NUM_OF_LEDS+1);
 
        if (!Adapter->pstargetparams || IS_ERR(Adapter->pstargetparams)) {
-               BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL, "Target Params not Avail.\n");
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
+                               DBG_LVL_ALL, "Target Params not Avail.\n");
                return -ENOENT;
        }
 
@@ -511,7 +513,7 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
         * uiFileNameBufferSize
         */
        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO, DBG_LVL_ALL,
-               "LED Thread: Config file read successfully\n");
+                       "LED Thread: Config file read successfully\n");
        puCFGData = (PUCHAR) &Adapter->pstargetparams->HostDrvrConfig1;
 
        /*
@@ -522,31 +524,30 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
 
        for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
                bData = *puCFGData;
+               curr_led_state = &Adapter->LEDInfo.LEDState[uiIndex];
 
                /*
                 * Check Bit 8 for polarity. If it is set,
                 * polarity is reverse polarity
                 */
                if (bData & 0x80) {
-                       Adapter->LEDInfo.LEDState[uiIndex].BitPolarity = 0;
+                       curr_led_state->BitPolarity = 0;
                        /* unset the bit 8 */
                        bData = bData & 0x7f;
                }
 
-               Adapter->LEDInfo.LEDState[uiIndex].LED_Type = bData;
+               curr_led_state->LED_Type = bData;
                if (bData <= NUM_OF_LEDS)
-                       Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num =
-                                                       GPIO_Array[bData];
+                       curr_led_state->GPIO_Num = GPIO_Array[bData];
                else
-                       Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num =
-                                                       DISABLE_GPIO_NUM;
+                       curr_led_state->GPIO_Num = DISABLE_GPIO_NUM;
 
                puCFGData++;
                bData = *puCFGData;
-               Adapter->LEDInfo.LEDState[uiIndex].LED_On_State = bData;
+               curr_led_state->LED_On_State = bData;
                puCFGData++;
                bData = *puCFGData;
-               Adapter->LEDInfo.LEDState[uiIndex].LED_Blink_State = bData;
+               curr_led_state->LED_Blink_State = bData;
                puCFGData++;
        }
 
@@ -555,9 +556,11 @@ static int ReadConfigFileStructure(struct bcm_mini_adapter *Adapter,
         * dont launch the LED control thread.
         */
        for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
-               if ((Adapter->LEDInfo.LEDState[uiIndex].LED_Type == DISABLE_GPIO_NUM) ||
-                       (Adapter->LEDInfo.LEDState[uiIndex].LED_Type == 0x7f) ||
-                       (Adapter->LEDInfo.LEDState[uiIndex].LED_Type == 0))
+               curr_led_state = &Adapter->LEDInfo.LEDState[uiIndex];
+
+               if ((curr_led_state->LED_Type == DISABLE_GPIO_NUM) ||
+                       (curr_led_state->LED_Type == 0x7f) ||
+                       (curr_led_state->LED_Type == 0))
                        uiNum_of_LED_Type++;
        }
        if (uiNum_of_LED_Type >= NUM_OF_LEDS)
@@ -584,67 +587,236 @@ static VOID LedGpioInit(struct bcm_mini_adapter *Adapter)
 {
        UINT uiResetValue = 0;
        UINT uiIndex      = 0;
+       struct bcm_led_state_info *curr_led_state;
 
        /* Set all LED GPIO Mode to output mode */
        if (rdmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue,
-                       sizeof(uiResetValue)) < 0)
+                  sizeof(uiResetValue)) < 0)
                BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
                        DBG_LVL_ALL, "LED Thread: RDM Failed\n");
        for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
-               if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num !=
-                               DISABLE_GPIO_NUM)
-                       uiResetValue |= (1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num);
-               TURN_OFF_LED(1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num,
-                               uiIndex);
+               curr_led_state = &Adapter->LEDInfo.LEDState[uiIndex];
+
+               if (curr_led_state->GPIO_Num != DISABLE_GPIO_NUM)
+                       uiResetValue |= (1 << curr_led_state->GPIO_Num);
+
+               TURN_OFF_LED(Adapter, 1 << curr_led_state->GPIO_Num, uiIndex);
+
        }
        if (wrmalt(Adapter, GPIO_MODE_REGISTER, &uiResetValue,
-                       sizeof(uiResetValue)) < 0)
-               BCM_DEBUG_PRINT (Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL, "LED Thread: WRM Failed\n");
+                  sizeof(uiResetValue)) < 0)
+               BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
+                               DBG_LVL_ALL, "LED Thread: WRM Failed\n");
 
        Adapter->LEDInfo.bIdle_led_off = false;
 }
 
-static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter, UCHAR *GPIO_num_tx,
-               UCHAR *GPIO_num_rx, UCHAR *uiLedTxIndex, UCHAR *uiLedRxIndex,
-               enum bcm_led_events currdriverstate)
+static INT BcmGetGPIOPinInfo(struct bcm_mini_adapter *Adapter,
+                            UCHAR *GPIO_num_tx,
+                            UCHAR *GPIO_num_rx,
+                            UCHAR *uiLedTxIndex,
+                            UCHAR *uiLedRxIndex,
+                            enum bcm_led_events currdriverstate)
 {
        UINT uiIndex = 0;
+       struct bcm_led_state_info *led_state_info;
 
        *GPIO_num_tx = DISABLE_GPIO_NUM;
        *GPIO_num_rx = DISABLE_GPIO_NUM;
 
        for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
-
-               if ((currdriverstate == NORMAL_OPERATION) ||
-                               (currdriverstate == IDLEMODE_EXIT) ||
-                               (currdriverstate == FW_DOWNLOAD)) {
-                       if (Adapter->LEDInfo.LEDState[uiIndex].LED_Blink_State &
-                                       currdriverstate) {
-                               if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num
-                                               != DISABLE_GPIO_NUM) {
-                                       if (*GPIO_num_tx == DISABLE_GPIO_NUM) {
-                                               *GPIO_num_tx = Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num;
-                                               *uiLedTxIndex = uiIndex;
-                                       } else {
-                                               *GPIO_num_rx = Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num;
-                                               *uiLedRxIndex = uiIndex;
-                                       }
-                               }
+               led_state_info = &Adapter->LEDInfo.LEDState[uiIndex];
+
+               if (((currdriverstate == NORMAL_OPERATION) ||
+                       (currdriverstate == IDLEMODE_EXIT) ||
+                       (currdriverstate == FW_DOWNLOAD)) &&
+                   (led_state_info->LED_Blink_State & currdriverstate) &&
+                   (led_state_info->GPIO_Num != DISABLE_GPIO_NUM)) {
+                       if (*GPIO_num_tx == DISABLE_GPIO_NUM) {
+                               *GPIO_num_tx = led_state_info->GPIO_Num;
+                               *uiLedTxIndex = uiIndex;
+                       } else {
+                               *GPIO_num_rx = led_state_info->GPIO_Num;
+                               *uiLedRxIndex = uiIndex;
                        }
                } else {
-                       if (Adapter->LEDInfo.LEDState[uiIndex].LED_On_State
-                                       & currdriverstate) {
-                               if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num
-                                               != DISABLE_GPIO_NUM) {
-                                       *GPIO_num_tx = Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num;
-                                       *uiLedTxIndex = uiIndex;
-                               }
+                       if ((led_state_info->LED_On_State & currdriverstate) &&
+                           (led_state_info->GPIO_Num != DISABLE_GPIO_NUM)) {
+                               *GPIO_num_tx = led_state_info->GPIO_Num;
+                               *uiLedTxIndex = uiIndex;
                        }
                }
        }
        return STATUS_SUCCESS;
 }
+
+static void handle_adapter_driver_state(struct bcm_mini_adapter *ad,
+                                       enum bcm_led_events currdriverstate,
+                                       UCHAR GPIO_num,
+                                       UCHAR dummyGPIONum,
+                                       UCHAR uiLedIndex,
+                                       UCHAR dummyIndex,
+                                       ulong timeout,
+                                       UINT uiResetValue,
+                                       UINT uiIndex)
+{
+       switch (ad->DriverState) {
+       case DRIVER_INIT:
+               currdriverstate = DRIVER_INIT;
+                               /* ad->DriverState; */
+               BcmGetGPIOPinInfo(ad, &GPIO_num, &dummyGPIONum,
+                                 &uiLedIndex, &dummyIndex,
+                                 currdriverstate);
+
+               if (GPIO_num != DISABLE_GPIO_NUM)
+                       TURN_ON_LED(ad, 1 << GPIO_num, uiLedIndex);
+
+               break;
+       case FW_DOWNLOAD:
+               /*
+                * BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS,
+                *      LED_DUMP_INFO, DBG_LVL_ALL,
+                *      "LED Thread: FW_DN_DONE called\n");
+                */
+               currdriverstate = FW_DOWNLOAD;
+               BcmGetGPIOPinInfo(ad, &GPIO_num, &dummyGPIONum,
+                                 &uiLedIndex, &dummyIndex,
+                                 currdriverstate);
+
+               if (GPIO_num != DISABLE_GPIO_NUM) {
+                       timeout = 50;
+                       LED_Blink(ad, 1 << GPIO_num, uiLedIndex, timeout,
+                                 -1, currdriverstate);
+               }
+               break;
+       case FW_DOWNLOAD_DONE:
+               currdriverstate = FW_DOWNLOAD_DONE;
+               BcmGetGPIOPinInfo(ad, &GPIO_num, &dummyGPIONum,
+                                 &uiLedIndex, &dummyIndex, currdriverstate);
+               if (GPIO_num != DISABLE_GPIO_NUM)
+                       TURN_ON_LED(ad, 1 << GPIO_num, uiLedIndex);
+               break;
+
+       case SHUTDOWN_EXIT:
+               /*
+                * no break, continue to NO_NETWORK_ENTRY
+                * state as well.
+                */
+       case NO_NETWORK_ENTRY:
+               currdriverstate = NO_NETWORK_ENTRY;
+               BcmGetGPIOPinInfo(ad, &GPIO_num, &dummyGPIONum,
+                                 &uiLedIndex, &dummyGPIONum, currdriverstate);
+               if (GPIO_num != DISABLE_GPIO_NUM)
+                       TURN_ON_LED(ad, 1 << GPIO_num, uiLedIndex);
+               break;
+       case NORMAL_OPERATION:
+               {
+                       UCHAR GPIO_num_tx = DISABLE_GPIO_NUM;
+                       UCHAR GPIO_num_rx = DISABLE_GPIO_NUM;
+                       UCHAR uiLEDTx = 0;
+                       UCHAR uiLEDRx = 0;
+                       currdriverstate = NORMAL_OPERATION;
+                       ad->LEDInfo.bIdle_led_off = false;
+
+                       BcmGetGPIOPinInfo(ad, &GPIO_num_tx, &GPIO_num_rx,
+                                         &uiLEDTx, &uiLEDRx, currdriverstate);
+                       if ((GPIO_num_tx == DISABLE_GPIO_NUM) &&
+                                       (GPIO_num_rx == DISABLE_GPIO_NUM)) {
+                               GPIO_num = DISABLE_GPIO_NUM;
+                       } else {
+                               /*
+                                * If single LED is selected, use same
+                                * for both Tx and Rx
+                                */
+                               if (GPIO_num_tx == DISABLE_GPIO_NUM) {
+                                       GPIO_num_tx = GPIO_num_rx;
+                                       uiLEDTx = uiLEDRx;
+                               } else if (GPIO_num_rx == DISABLE_GPIO_NUM) {
+                                       GPIO_num_rx = GPIO_num_tx;
+                                       uiLEDRx = uiLEDTx;
+                               }
+                               /*
+                                * Blink the LED in proportionate
+                                * to Tx and Rx transmissions.
+                                */
+                               LED_Proportional_Blink(ad,
+                                                      GPIO_num_tx, uiLEDTx,
+                                                      GPIO_num_rx, uiLEDRx,
+                                                      currdriverstate);
+                       }
+               }
+               break;
+       case LOWPOWER_MODE_ENTER:
+               currdriverstate = LOWPOWER_MODE_ENTER;
+               if (DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING ==
+                               ad->ulPowerSaveMode) {
+                       /* Turn OFF all the LED */
+                       uiResetValue = 0;
+                       for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
+                               if (ad->LEDInfo.LEDState[uiIndex].GPIO_Num != DISABLE_GPIO_NUM)
+                                       TURN_OFF_LED(ad,
+                                                    (1 << ad->LEDInfo.LEDState[uiIndex].GPIO_Num),
+                                                    uiIndex);
+                       }
+
+               }
+               /* Turn off LED And WAKE-UP for Sendinf IDLE mode ACK */
+               ad->LEDInfo.bLedInitDone = false;
+               ad->LEDInfo.bIdle_led_off = TRUE;
+               wake_up(&ad->LEDInfo.idleModeSyncEvent);
+               GPIO_num = DISABLE_GPIO_NUM;
+               break;
+       case IDLEMODE_CONTINUE:
+               currdriverstate = IDLEMODE_CONTINUE;
+               GPIO_num = DISABLE_GPIO_NUM;
+               break;
+       case IDLEMODE_EXIT:
+               break;
+       case DRIVER_HALT:
+               currdriverstate = DRIVER_HALT;
+               GPIO_num = DISABLE_GPIO_NUM;
+               for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
+                       if (ad->LEDInfo.LEDState[uiIndex].GPIO_Num !=
+                                       DISABLE_GPIO_NUM)
+                               TURN_OFF_LED(ad,
+                                            (1 << ad->LEDInfo.LEDState[uiIndex].GPIO_Num),
+                                            uiIndex);
+               }
+               /* ad->DriverState = DRIVER_INIT; */
+               break;
+       case LED_THREAD_INACTIVE:
+               BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, LED_DUMP_INFO,
+                               DBG_LVL_ALL, "InActivating LED thread...");
+               currdriverstate = LED_THREAD_INACTIVE;
+               ad->LEDInfo.led_thread_running =
+                               BCM_LED_THREAD_RUNNING_INACTIVELY;
+               ad->LEDInfo.bLedInitDone = false;
+               /* disable ALL LED */
+               for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
+                       if (ad->LEDInfo.LEDState[uiIndex].GPIO_Num !=
+                                       DISABLE_GPIO_NUM)
+                               TURN_OFF_LED(ad,
+                                            (1 << ad->LEDInfo.LEDState[uiIndex].GPIO_Num),
+                                            uiIndex);
+               }
+               break;
+       case LED_THREAD_ACTIVE:
+               BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, LED_DUMP_INFO,
+                               DBG_LVL_ALL, "Activating LED thread again...");
+               if (ad->LinkUpStatus == false)
+                       ad->DriverState = NO_NETWORK_ENTRY;
+               else
+                       ad->DriverState = NORMAL_OPERATION;
+
+               ad->LEDInfo.led_thread_running =
+                               BCM_LED_THREAD_RUNNING_ACTIVELY;
+               break;
+               /* return; */
+       default:
+               break;
+       }
+}
+
 static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
 {
        UINT uiIndex = 0;
@@ -691,168 +863,28 @@ static VOID LEDControlThread(struct bcm_mini_adapter *Adapter)
                                "Led thread got signal to exit..hence exiting");
                        Adapter->LEDInfo.led_thread_running =
                                                BCM_LED_THREAD_DISABLED;
-                       TURN_OFF_LED(1 << GPIO_num, uiLedIndex);
+                       TURN_OFF_LED(Adapter, 1 << GPIO_num, uiLedIndex);
                        return; /* STATUS_FAILURE; */
                }
 
                if (GPIO_num != DISABLE_GPIO_NUM)
-                       TURN_OFF_LED(1 << GPIO_num, uiLedIndex);
+                       TURN_OFF_LED(Adapter, 1 << GPIO_num, uiLedIndex);
 
                if (Adapter->LEDInfo.bLedInitDone == false) {
                        LedGpioInit(Adapter);
                        Adapter->LEDInfo.bLedInitDone = TRUE;
                }
 
-               switch (Adapter->DriverState) {
-               case DRIVER_INIT:
-                       currdriverstate = DRIVER_INIT;
-                                       /* Adapter->DriverState; */
-                       BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
-                               &uiLedIndex, &dummyIndex, currdriverstate);
-
-                       if (GPIO_num != DISABLE_GPIO_NUM)
-                               TURN_ON_LED(1 << GPIO_num, uiLedIndex);
-
-                       break;
-               case FW_DOWNLOAD:
-                       /*
-                        * BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS,
-                        *      LED_DUMP_INFO, DBG_LVL_ALL,
-                        *      "LED Thread: FW_DN_DONE called\n");
-                        */
-                       currdriverstate = FW_DOWNLOAD;
-                       BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
-                               &uiLedIndex, &dummyIndex, currdriverstate);
-
-                       if (GPIO_num != DISABLE_GPIO_NUM) {
-                               timeout = 50;
-                               LED_Blink(Adapter, 1 << GPIO_num, uiLedIndex,
-                                       timeout, -1, currdriverstate);
-                       }
-                       break;
-               case FW_DOWNLOAD_DONE:
-                       currdriverstate = FW_DOWNLOAD_DONE;
-                       BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
-                               &uiLedIndex, &dummyIndex, currdriverstate);
-                       if (GPIO_num != DISABLE_GPIO_NUM)
-                               TURN_ON_LED(1 << GPIO_num, uiLedIndex);
-                       break;
-
-               case SHUTDOWN_EXIT:
-                       /*
-                        * no break, continue to NO_NETWORK_ENTRY
-                        * state as well.
-                        */
-               case NO_NETWORK_ENTRY:
-                       currdriverstate = NO_NETWORK_ENTRY;
-                       BcmGetGPIOPinInfo(Adapter, &GPIO_num, &dummyGPIONum,
-                               &uiLedIndex, &dummyGPIONum, currdriverstate);
-                       if (GPIO_num != DISABLE_GPIO_NUM)
-                               TURN_ON_LED(1 << GPIO_num, uiLedIndex);
-                       break;
-               case NORMAL_OPERATION:
-                       {
-                               UCHAR GPIO_num_tx = DISABLE_GPIO_NUM;
-                               UCHAR GPIO_num_rx = DISABLE_GPIO_NUM;
-                               UCHAR uiLEDTx = 0;
-                               UCHAR uiLEDRx = 0;
-                               currdriverstate = NORMAL_OPERATION;
-                               Adapter->LEDInfo.bIdle_led_off = false;
-
-                               BcmGetGPIOPinInfo(Adapter, &GPIO_num_tx,
-                                       &GPIO_num_rx, &uiLEDTx, &uiLEDRx,
-                                       currdriverstate);
-                               if ((GPIO_num_tx == DISABLE_GPIO_NUM) &&
-                                               (GPIO_num_rx ==
-                                                DISABLE_GPIO_NUM)) {
-                                       GPIO_num = DISABLE_GPIO_NUM;
-                               } else {
-                                       /*
-                                        * If single LED is selected, use same
-                                        * for both Tx and Rx
-                                        */
-                                       if (GPIO_num_tx == DISABLE_GPIO_NUM) {
-                                               GPIO_num_tx = GPIO_num_rx;
-                                               uiLEDTx = uiLEDRx;
-                                       } else if (GPIO_num_rx ==
-                                                       DISABLE_GPIO_NUM) {
-                                               GPIO_num_rx = GPIO_num_tx;
-                                               uiLEDRx = uiLEDTx;
-                                       }
-                                       /*
-                                        * Blink the LED in proportionate
-                                        * to Tx and Rx transmissions.
-                                        */
-                                       LED_Proportional_Blink(Adapter,
-                                               GPIO_num_tx, uiLEDTx,
-                                               GPIO_num_rx, uiLEDRx,
-                                               currdriverstate);
-                               }
-                       }
-                       break;
-               case LOWPOWER_MODE_ENTER:
-                       currdriverstate = LOWPOWER_MODE_ENTER;
-                       if (DEVICE_POWERSAVE_MODE_AS_MANUAL_CLOCK_GATING ==
-                                       Adapter->ulPowerSaveMode) {
-                               /* Turn OFF all the LED */
-                               uiResetValue = 0;
-                               for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
-                                       if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num != DISABLE_GPIO_NUM)
-                                               TURN_OFF_LED((1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num), uiIndex);
-                               }
-
-                       }
-                       /* Turn off LED And WAKE-UP for Sendinf IDLE mode ACK */
-                       Adapter->LEDInfo.bLedInitDone = false;
-                       Adapter->LEDInfo.bIdle_led_off = TRUE;
-                       wake_up(&Adapter->LEDInfo.idleModeSyncEvent);
-                       GPIO_num = DISABLE_GPIO_NUM;
-                       break;
-               case IDLEMODE_CONTINUE:
-                       currdriverstate = IDLEMODE_CONTINUE;
-                       GPIO_num = DISABLE_GPIO_NUM;
-                       break;
-               case IDLEMODE_EXIT:
-                       break;
-               case DRIVER_HALT:
-                       currdriverstate = DRIVER_HALT;
-                       GPIO_num = DISABLE_GPIO_NUM;
-                       for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
-                               if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num
-                                               != DISABLE_GPIO_NUM)
-                                       TURN_OFF_LED((1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num), uiIndex);
-                       }
-                       /* Adapter->DriverState = DRIVER_INIT; */
-                       break;
-               case LED_THREAD_INACTIVE:
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                               DBG_LVL_ALL, "InActivating LED thread...");
-                       currdriverstate = LED_THREAD_INACTIVE;
-                       Adapter->LEDInfo.led_thread_running =
-                                       BCM_LED_THREAD_RUNNING_INACTIVELY;
-                       Adapter->LEDInfo.bLedInitDone = false;
-                       /* disable ALL LED */
-                       for (uiIndex = 0; uiIndex < NUM_OF_LEDS; uiIndex++) {
-                               if (Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num
-                                               != DISABLE_GPIO_NUM)
-                                       TURN_OFF_LED((1 << Adapter->LEDInfo.LEDState[uiIndex].GPIO_Num), uiIndex);
-                       }
-                       break;
-               case LED_THREAD_ACTIVE:
-                       BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                               DBG_LVL_ALL, "Activating LED thread again...");
-                       if (Adapter->LinkUpStatus == false)
-                               Adapter->DriverState = NO_NETWORK_ENTRY;
-                       else
-                               Adapter->DriverState = NORMAL_OPERATION;
-
-                       Adapter->LEDInfo.led_thread_running =
-                                       BCM_LED_THREAD_RUNNING_ACTIVELY;
-                       break;
-                       /* return; */
-               default:
-                       break;
-               }
+               handle_adapter_driver_state(Adapter,
+                                           currdriverstate,
+                                           GPIO_num,
+                                           dummyGPIONum,
+                                           uiLedIndex,
+                                           dummyIndex,
+                                           timeout,
+                                           uiResetValue,
+                                           uiIndex
+                                           );
        }
        Adapter->LEDInfo.led_thread_running = BCM_LED_THREAD_DISABLED;
 }
@@ -878,8 +910,8 @@ int InitLedSettings(struct bcm_mini_adapter *Adapter)
        Status = ReadConfigFileStructure(Adapter, &bEnableThread);
        if (STATUS_SUCCESS != Status) {
                BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                       DBG_LVL_ALL,
-                       "LED Thread: FAILED in ReadConfigFileStructure\n");
+                               DBG_LVL_ALL,
+                               "LED Thread: FAILED in ReadConfigFileStructure\n");
                return Status;
        }
 
@@ -902,11 +934,11 @@ int InitLedSettings(struct bcm_mini_adapter *Adapter)
                Adapter->LEDInfo.bIdle_led_off = false;
                Adapter->LEDInfo.led_cntrl_threadid =
                        kthread_run((int (*)(void *)) LEDControlThread,
-                       Adapter, "led_control_thread");
+                                   Adapter, "led_control_thread");
                if (IS_ERR(Adapter->LEDInfo.led_cntrl_threadid)) {
                        BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, LED_DUMP_INFO,
-                               DBG_LVL_ALL,
-                               "Not able to spawn Kernel Thread\n");
+                                       DBG_LVL_ALL,
+                                       "Not able to spawn Kernel Thread\n");
                        Adapter->LEDInfo.led_thread_running =
                                BCM_LED_THREAD_DISABLED;
                        return PTR_ERR(Adapter->LEDInfo.led_cntrl_threadid);
index bae40e22e11bf30951d245fc5e5159f1da567fc8..1b24bf4658afb27c968b922e18b47dcba80cfe5f 100644 (file)
 #define EVENT_SIGNALED                         1
 #define MAX_FILE_NAME_BUFFER_SIZE              100
 
-#define TURN_ON_LED(GPIO, index) do {                                  \
+#define TURN_ON_LED(ad, GPIO, index) do {                                      \
                unsigned int gpio_val = GPIO;                                   \
-               (Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ?   \
-                       wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)) : \
-                       wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)); \
+               (ad->LEDInfo.LEDState[index].BitPolarity == 1) ?        \
+                       wrmaltWithLock(ad, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)) : \
+                       wrmaltWithLock(ad, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)); \
        } while (0)
 
-#define TURN_OFF_LED(GPIO, index)  do {                                        \
+#define TURN_OFF_LED(ad, GPIO, index)  do {                                    \
                unsigned int gpio_val = GPIO;                                   \
-               (Adapter->LEDInfo.LEDState[index].BitPolarity == 1) ?   \
-                       wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)) : \
-                       wrmaltWithLock(Adapter, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)); \
+               (ad->LEDInfo.LEDState[index].BitPolarity == 1) ?        \
+                       wrmaltWithLock(ad, BCM_GPIO_OUTPUT_CLR_REG, &gpio_val, sizeof(gpio_val)) : \
+                       wrmaltWithLock(ad, BCM_GPIO_OUTPUT_SET_REG, &gpio_val, sizeof(gpio_val)); \
        } while (0)
 
 enum bcm_led_colors {
index 63be3be62ebd9b0fc1093109b0ad9c8b085bfc42..99b82d82acb6a9c4e9d981834aa6707a036cabd3 100644 (file)
@@ -3321,7 +3321,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti
 
                        SectImagePriority = ReadISOPriority(Adapter, HighestPriISO) + 1;
 
-                       if ((SectImagePriority <= 0) && IsSectionWritable(Adapter, HighestPriISO)) {
+                       if ((SectImagePriority == 0) && IsSectionWritable(Adapter, HighestPriISO)) {
                                /* This is a SPECIAL Case which will only happen if the current highest priority ISO has priority value = 0x7FFFFFFF.
                                 * We will write 1 to the current Highest priority ISO And then shall increase the priority of the requested ISO
                                 * by user
@@ -3381,7 +3381,7 @@ int BcmSetActiveSection(struct bcm_mini_adapter *Adapter, enum bcm_flash2x_secti
                        }
 
                        SectImagePriority = ReadDSDPriority(Adapter, HighestPriDSD) + 1;
-                       if (SectImagePriority <= 0) {
+                       if (SectImagePriority == 0) {
                                /* This is a SPECIAL Case which will only happen if the current highest priority DSD has priority value = 0x7FFFFFFF.
                                 * We will write 1 to the current Highest priority DSD And then shall increase the priority of the requested DSD
                                 * by user
@@ -3591,7 +3591,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
 
                        if (IsThisHeaderSector == TRUE) {
                                /* If this is header sector write 0xFFFFFFFF at the sig time and in last write sig */
-                               memcpy(SigBuff, Buff + sigOffset, MAX_RW_SIZE);
+                               memcpy(SigBuff, Buff + sigOffset, sizeof(SigBuff));
 
                                for (i = 0; i < MAX_RW_SIZE; i++)
                                        *(Buff + sigOffset + i) = 0xFF;
@@ -3704,7 +3704,7 @@ int BcmCopyISO(struct bcm_mini_adapter *Adapter, struct bcm_flash2x_copy_section
 
                        if (IsThisHeaderSector == TRUE) {
                                /* If this is header sector write 0xFFFFFFFF at the sig time and in last write sig */
-                               memcpy(SigBuff, Buff + sigOffset, MAX_RW_SIZE);
+                               memcpy(SigBuff, Buff + sigOffset, sizeof(SigBuff));
 
                                for (i = 0; i < MAX_RW_SIZE; i++)
                                        *(Buff + sigOffset + i) = 0xFF;
diff --git a/drivers/staging/board/Kconfig b/drivers/staging/board/Kconfig
new file mode 100644 (file)
index 0000000..09d94b4
--- /dev/null
@@ -0,0 +1,8 @@
+config STAGING_BOARD
+       boolean "Staging Board Support"
+       depends on OF_ADDRESS
+       help
+         Select to enable per-board staging support code.
+
+         If in doubt, say N here.
+
diff --git a/drivers/staging/board/Makefile b/drivers/staging/board/Makefile
new file mode 100644 (file)
index 0000000..65d39ec
--- /dev/null
@@ -0,0 +1,2 @@
+obj-y  := board.o
+obj-$(CONFIG_ARCH_EMEV2)      += kzm9d.o
diff --git a/drivers/staging/board/TODO b/drivers/staging/board/TODO
new file mode 100644 (file)
index 0000000..8db70e1
--- /dev/null
@@ -0,0 +1,2 @@
+* replace platform device code with DT nodes once the driver supports DT
+* remove staging board code when no more platform devices are needed
diff --git a/drivers/staging/board/board.c b/drivers/staging/board/board.c
new file mode 100644 (file)
index 0000000..6050fbd
--- /dev/null
@@ -0,0 +1,41 @@
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/of.h>
+#include <linux/of_address.h>
+#include "board.h"
+
+static bool find_by_address(u64 base_address)
+{
+       struct device_node *dn = of_find_all_nodes(NULL);
+       struct resource res;
+
+       while (dn) {
+               if (of_can_translate_address(dn)
+                   && !of_address_to_resource(dn, 0, &res)) {
+                       if (res.start == base_address) {
+                               of_node_put(dn);
+                               return true;
+                       }
+               }
+               dn = of_find_all_nodes(dn);
+       }
+
+       return false;
+}
+
+bool __init board_staging_dt_node_available(const struct resource *resource,
+                                           unsigned int num_resources)
+{
+       unsigned int i;
+
+       for (i = 0; i < num_resources; i++) {
+               const struct resource *r = resource + i;
+
+               if (resource_type(r) == IORESOURCE_MEM)
+                       if (find_by_address(r->start))
+                               return true; /* DT node available */
+       }
+
+       return false; /* Nothing found */
+}
diff --git a/drivers/staging/board/board.h b/drivers/staging/board/board.h
new file mode 100644 (file)
index 0000000..2390ed6
--- /dev/null
@@ -0,0 +1,20 @@
+#ifndef __BOARD_H__
+#define __BOARD_H__
+#include <linux/init.h>
+#include <linux/of.h>
+
+bool board_staging_dt_node_available(const struct resource *resource,
+                                    unsigned int num_resources);
+
+#define board_staging(str, fn)                 \
+static int __init runtime_board_check(void)    \
+{                                              \
+       if (of_machine_is_compatible(str))      \
+               fn();                           \
+                                               \
+       return 0;                               \
+}                                              \
+                                               \
+late_initcall(runtime_board_check)
+
+#endif /* __BOARD_H__ */
diff --git a/drivers/staging/board/kzm9d.c b/drivers/staging/board/kzm9d.c
new file mode 100644 (file)
index 0000000..533f302
--- /dev/null
@@ -0,0 +1,19 @@
+/* Staging board support for KZM9D. Enable not-yet-DT-capable devices here. */
+
+#include <linux/kernel.h>
+#include <linux/platform_device.h>
+#include "board.h"
+
+static const struct resource usbs1_res[] __initconst = {
+       DEFINE_RES_MEM(0xe2800000, 0x2000),
+       DEFINE_RES_IRQ(159),
+};
+
+static void __init kzm9d_init(void)
+{
+       if (!board_staging_dt_node_available(usbs1_res, ARRAY_SIZE(usbs1_res)))
+               platform_device_register_simple("emxx_udc", -1, usbs1_res,
+                                               ARRAY_SIZE(usbs1_res));
+}
+
+board_staging("renesas,kzm9d", kzm9d_init);
index ea0fe6398a01e6a708aa48a57d344195386727f9..8327e9ce93c3a5d153e7eaaf8597a1fe40991fc6 100644 (file)
@@ -101,7 +101,7 @@ typedef struct circBlk {
 /*  A structure holding all of the information about a transfer area - an area of */
 /*   memory set up for use either as a source or destination in DMA transfers. */
 typedef struct transarea {
-       void    *lpvBuff;                /*  User address of xfer area saved for completeness */
+       void __user *lpvBuff;                /*  User address of xfer area saved for completeness */
        UINT        dwBaseOffset;           /*  offset to start of xfer area in first page */
        UINT        dwLength;               /*  Length of xfer area, in bytes */
        struct page **pPages;               /*  Points at array of locked down pages */
index 7b8a2227fe5b69677d586def6198cd02a075fff0..9ebddbd07e8df2c49f0ccc860d4f3dd8de431dc4 100644 (file)
@@ -1744,13 +1744,8 @@ U14API(short) U14GetString(short hand, char* pBuffer, unsigned short wMaxLen)
                                     &dwBytes, NULL);
                     if (iOK)                        /* Device IO control OK ? */
                     {
-                        if (dwBytes >= 0)           /* If driver OK */
-                        {
-                            strcpy(pBuffer, tstr);
-                            sErr = U14ERR_NOERROR;
-                        }
-                        else
-                            sErr = U14ERR_DRIVCOMMS;
+                        strcpy(pBuffer, tstr);
+                        sErr = U14ERR_NOERROR;
                     }
                     else
                     {
index a2f6957e7ee96c0e985eafb55cb363e5aa80fcef..8d992a87d3c48d37bc12960a688ec0c7a8350613 100644 (file)
@@ -135,13 +135,14 @@ config COMEDI_PCL724
          support driver.
 
          Supported boards include:
-           Advantech PCL-724    24 channels
-           Advantech PCL-722    144 (or 96) channels
-           Advantech PCL-731    48 channels
-           ADlink ACL-7122      144 (or 96) channels
-           ADlink ACL-7124      24 channels
-           ADlink PET-48DIO     48 channels
-           WinSystems PCM-IO48  48 channels (PC/104)
+           Advantech PCL-724            24 channels
+           Advantech PCL-722            144 (or 96) channels
+           Advantech PCL-731            48 channels
+           ADlink ACL-7122              144 (or 96) channels
+           ADlink ACL-7124              24 channels
+           ADlink PET-48DIO             48 channels
+           WinSystems PCM-IO48          48 channels (PC/104)
+           Diamond Systems ONYX-MM-DIO  48 channels (PC/104)
 
          To compile this driver as a module, choose M here: the module will be
          called pcl724.
@@ -172,6 +173,7 @@ config COMEDI_PCL730
          Advantech PCL-734             iso - 32 out
          Diamond Systems OPMM-1616-XT  iso - 16 in/16 out
          Diamond Systems PEARL-MM-P    iso - 16 out
+         Diamond Systems IR104-PBF     iso - 20 in/20 out
 
          To compile this driver as a module, choose M here: the module will be
          called pcl730.
index 6bbbe5b08954100e9ddedd9f5a19a94eeb9c4199..dbaeba7469ac56dbb163760f711ef552fba04da5 100644 (file)
@@ -976,4 +976,15 @@ enum amplc_dio_gate_source {
        AMPLC_DIO_GAT_NPAT_GONE /* negated "pattern gone away" */
 };
 
+/*
+ * Values for setting a clock source with INSN_CONFIG_SET_CLOCK_SRC for
+ * the counter subdevice on the Kolter Electronic PCI-Counter board
+ * (ke_counter driver).
+ */
+enum ke_counter_clock_source {
+       KE_CLK_20MHZ,   /* internal 20MHz (default) */
+       KE_CLK_4MHZ,    /* internal 4MHz (option) */
+       KE_CLK_EXT      /* external clock on pin 21 of D-Sub */
+};
+
 #endif /* _COMEDI_H */
index 9d99fb3c18a65d4b25dd4c20e40d84abf78871b4..d4904cc50f77ae68e19f0457b832b57c20758d00 100644 (file)
@@ -997,7 +997,7 @@ static int do_bufinfo_ioctl(struct comedi_device *dev,
                comedi_buf_read_free(s, bi.bytes_read);
 
                if (comedi_is_subdevice_idle(s) &&
-                   async->buf_write_count == async->buf_read_count) {
+                   comedi_buf_n_bytes_ready(s) == 0) {
                        do_become_nonbusy(dev, s);
                }
        }
@@ -1295,7 +1295,7 @@ static int do_insnlist_ioctl(struct comedi_device *dev,
        if (copy_from_user(&insnlist, arg, sizeof(insnlist)))
                return -EFAULT;
 
-       data = kmalloc(sizeof(unsigned int) * MAX_SAMPLES, GFP_KERNEL);
+       data = kmalloc_array(MAX_SAMPLES, sizeof(unsigned int), GFP_KERNEL);
        if (!data) {
                ret = -ENOMEM;
                goto error;
@@ -1376,7 +1376,7 @@ static int do_insn_ioctl(struct comedi_device *dev,
        unsigned int *data = NULL;
        int ret = 0;
 
-       data = kmalloc(sizeof(unsigned int) * MAX_SAMPLES, GFP_KERNEL);
+       data = kmalloc_array(MAX_SAMPLES, sizeof(unsigned int), GFP_KERNEL);
        if (!data) {
                ret = -ENOMEM;
                goto error;
@@ -2303,8 +2303,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes,
                new_s = comedi_read_subdevice(dev, minor);
                if (dev->attached && old_detach_count == dev->detach_count &&
                    s == new_s && new_s->async == async) {
-                       if (become_nonbusy ||
-                           async->buf_read_count - async->buf_write_count == 0)
+                       if (become_nonbusy || comedi_buf_n_bytes_ready(s) == 0)
                                do_become_nonbusy(dev, s);
                }
                mutex_unlock(&dev->mutex);
index 8f4e44bfbe00d28d7bfcf9e1e2bdf1eddd13e401..83fd1553ff93d5317a3a9ca33efcdd8b38038380 100644 (file)
@@ -107,43 +107,110 @@ struct comedi_buf_map {
        struct kref refcount;
 };
 
+/**
+ * struct comedi_async - control data for asynchronous comedi commands
+ * @prealloc_buf:      preallocated buffer
+ * @prealloc_bufsz:    buffer size (in bytes)
+ * @buf_map:           map of buffer pages
+ * @max_bufsize:       maximum buffer size (in bytes)
+ * @buf_write_count:   "write completed" count (in bytes, modulo 2**32)
+ * @buf_write_alloc_count: "allocated for writing" count (in bytes,
+ *                     modulo 2**32)
+ * @buf_read_count:    "read completed" count (in bytes, modulo 2**32)
+ * @buf_read_alloc_count: "allocated for reading" count (in bytes,
+ *                     modulo 2**32)
+ * @buf_write_ptr:     buffer position for writer
+ * @buf_read_ptr:      buffer position for reader
+ * @cur_chan:          current position in chanlist for scan (for those
+ *                     drivers that use it)
+ * @scan_progress:     amount received or sent for current scan (in bytes)
+ * @munge_chan:                current position in chanlist for "munging"
+ * @munge_count:       "munge" count (in bytes, modulo 2**32)
+ * @munge_ptr:         buffer position for "munging"
+ * @events:            bit-vector of events that have occurred
+ * @cmd:               details of comedi command in progress
+ * @wait_head:         task wait queue for file reader or writer
+ * @cb_mask:           bit-vector of events that should wake waiting tasks
+ * @inttrig:           software trigger function for command, or NULL
+ *
+ * Note about the ..._count and ..._ptr members:
+ *
+ * Think of the _Count values being integers of unlimited size, indexing
+ * into a buffer of infinite length (though only an advancing portion
+ * of the buffer of fixed length prealloc_bufsz is accessible at any time).
+ * Then:
+ *
+ *   Buf_Read_Count <= Buf_Read_Alloc_Count <= Munge_Count <=
+ *   Buf_Write_Count <= Buf_Write_Alloc_Count <=
+ *   (Buf_Read_Count + prealloc_bufsz)
+ *
+ * (Those aren't the actual members, apart from prealloc_bufsz.) When
+ * the buffer is reset, those _Count values start at 0 and only increase
+ * in value, maintaining the above inequalities until the next time the
+ * buffer is reset.  The buffer is divided into the following regions by
+ * the inequalities:
+ *
+ *   [0, Buf_Read_Count):
+ *     old region no longer accessible
+ *   [Buf_Read_Count, Buf_Read_Alloc_Count):
+ *     filled and munged region allocated for reading but not yet read
+ *   [Buf_Read_Alloc_Count, Munge_Count):
+ *     filled and munged region not yet allocated for reading
+ *   [Munge_Count, Buf_Write_Count):
+ *     filled region not yet munged
+ *   [Buf_Write_Count, Buf_Write_Alloc_Count):
+ *     unfilled region allocated for writing but not yet written
+ *   [Buf_Write_Alloc_Count, Buf_Read_Count + prealloc_bufsz):
+ *     unfilled region not yet allocated for writing
+ *   [Buf_Read_Count + prealloc_bufsz, infinity):
+ *     unfilled region not yet accessible
+ *
+ * Data needs to be written into the buffer before it can be read out,
+ * and may need to be converted (or "munged") between the two
+ * operations.  Extra unfilled buffer space may need to allocated for
+ * writing (advancing Buf_Write_Alloc_Count) before new data is written.
+ * After writing new data, the newly filled space needs to be released
+ * (advancing Buf_Write_Count).  This also results in the new data being
+ * "munged" (advancing Munge_Count).  Before data is read out of the
+ * buffer, extra space may need to be allocated for reading (advancing
+ * Buf_Read_Alloc_Count).  After the data has been read out, the space
+ * needs to be released (advancing Buf_Read_Count).
+ *
+ * The actual members, buf_read_count, buf_read_alloc_count,
+ * munge_count, buf_write_count, and buf_write_alloc_count take the
+ * value of the corresponding capitalized _Count values modulo 2^32
+ * (UINT_MAX+1).  Subtracting a "higher" _count value from a "lower"
+ * _count value gives the same answer as subtracting a "higher" _Count
+ * value from a lower _Count value because prealloc_bufsz < UINT_MAX+1.
+ * The modulo operation is done implicitly.
+ *
+ * The buf_read_ptr, munge_ptr, and buf_write_ptr members take the value
+ * of the corresponding capitalized _Count values modulo prealloc_bufsz.
+ * These correspond to byte indices in the physical buffer.  The modulo
+ * operation is done by subtracting prealloc_bufsz when the value
+ * exceeds prealloc_bufsz (assuming prealloc_bufsz plus the increment is
+ * less than or equal to UINT_MAX).
+ */
 struct comedi_async {
-       void *prealloc_buf;     /* pre-allocated buffer */
-       unsigned int prealloc_bufsz;    /* buffer size, in bytes */
-       struct comedi_buf_map *buf_map; /* map of buffer pages */
-
-       unsigned int max_bufsize;       /* maximum buffer size, bytes */
-
-       /* byte count for writer (write completed) */
+       void *prealloc_buf;
+       unsigned int prealloc_bufsz;
+       struct comedi_buf_map *buf_map;
+       unsigned int max_bufsize;
        unsigned int buf_write_count;
-       /* byte count for writer (allocated for writing) */
        unsigned int buf_write_alloc_count;
-       /* byte count for reader (read completed) */
        unsigned int buf_read_count;
-       /* byte count for reader (allocated for reading) */
        unsigned int buf_read_alloc_count;
-
-       unsigned int buf_write_ptr;     /* buffer marker for writer */
-       unsigned int buf_read_ptr;      /* buffer marker for reader */
-
-       unsigned int cur_chan;  /* useless channel marker for interrupt */
-       /* number of bytes that have been received for current scan */
+       unsigned int buf_write_ptr;
+       unsigned int buf_read_ptr;
+       unsigned int cur_chan;
        unsigned int scan_progress;
-       /* keeps track of where we are in chanlist as for munging */
        unsigned int munge_chan;
-       /* number of bytes that have been munged */
        unsigned int munge_count;
-       /* buffer marker for munging */
        unsigned int munge_ptr;
-
-       unsigned int events;    /* events that have occurred */
-
+       unsigned int events;
        struct comedi_cmd cmd;
-
        wait_queue_head_t wait_head;
-
        unsigned int cb_mask;
-
        int (*inttrig)(struct comedi_device *dev, struct comedi_subdevice *s,
                       unsigned int x);
 };
@@ -333,6 +400,11 @@ static inline unsigned int bytes_per_sample(const struct comedi_subdevice *subd)
  */
 int comedi_set_hw_dev(struct comedi_device *dev, struct device *hw_dev);
 
+static inline unsigned int comedi_buf_n_bytes_ready(struct comedi_subdevice *s)
+{
+       return s->async->buf_write_count - s->async->buf_read_count;
+}
+
 unsigned int comedi_buf_write_alloc(struct comedi_subdevice *s, unsigned int n);
 unsigned int comedi_buf_write_free(struct comedi_subdevice *s, unsigned int n);
 
index dc87df032203746418fa7274b36be42c38617d3a..de5843ab01aeaec011289a7c30fc4ca8f2b7554e 100644 (file)
@@ -157,14 +157,10 @@ static int addi_auto_attach(struct comedi_device *dev,
                s->subdev_flags =
                        SDF_READABLE | SDF_COMMON | SDF_GROUND
                        | SDF_DIFF;
-               if (devpriv->s_EeParameters.i_NbrAiChannel) {
-                       s->n_chan =
-                               devpriv->s_EeParameters.i_NbrAiChannel;
-                       devpriv->b_SingelDiff = 0;
-               } else {
+               if (devpriv->s_EeParameters.i_NbrAiChannel)
+                       s->n_chan = devpriv->s_EeParameters.i_NbrAiChannel;
+               else
                        s->n_chan = this_board->i_NbrAiChannelDiff;
-                       devpriv->b_SingelDiff = 1;
-               }
                s->maxdata = devpriv->s_EeParameters.i_AiMaxdata;
                s->len_chanlist = this_board->i_AiChannelList;
                s->range_table = this_board->pr_AiRangelist;
index 5c6a11c35dede4db2cfcd18a32dccd8d70efee33..a7400a25f620aa9c3bb2a5f8f3ad4faa9f53ee56 100644 (file)
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-#define LOWORD(W)      (unsigned short)((W) & 0xFFFF)
-#define HIWORD(W)      (unsigned short)(((W) >> 16) & 0xFFFF)
-
-#define ADDI_ENABLE            1
-#define ADDI_DISABLE           0
-#define APCI1710_SAVE_INTERRUPT        1
-
-#define ADDIDATA_EEPROM                1
-#define ADDIDATA_NO_EEPROM     0
-#define ADDIDATA_93C76         "93C76"
-#define ADDIDATA_S5920         "S5920"
-
-/* ADDIDATA Enable Disable */
-#define ADDIDATA_ENABLE                1
-#define ADDIDATA_DISABLE       0
-
-/* Structures */
-
-/* structure for the boardtype */
 struct addi_board {
        const char *pc_DriverName;      /*  driver name */
        int i_IorangeBase1;
@@ -141,7 +122,6 @@ struct addi_private {
        unsigned char b_InterruptMode;  /*  eoc eos or dma */
        unsigned char b_EocEosInterrupt;        /*  Enable disable eoc eos interrupt */
        unsigned int ui_EocEosConversionTime;
-       unsigned char b_SingelDiff;
        unsigned char b_ExttrigEnable;  /* To enable or disable external trigger */
 
        /* Pointer to the current process */
index 28450f65a13449f93c5875571eefdcf4809344b3..cad33f1a04fe44bd982f03ce109c873c219472f7 100644 (file)
@@ -177,8 +177,7 @@ static int apci035_timer_config(struct comedi_device *dev,
 
        /* Disable the hardware trigger */
        ui_Command = ui_Command & 0xFFFFF89FUL;
-       if (data[4] == ADDIDATA_ENABLE) {
-
+       if (data[4] == 1) {
                /* Set the hardware trigger level */
                ui_Command = ui_Command | (data[5] << 5);
        }
@@ -188,8 +187,7 @@ static int apci035_timer_config(struct comedi_device *dev,
 
        /* Disable the hardware gate */
        ui_Command = ui_Command & 0xFFFFF87FUL;
-       if (data[6] == ADDIDATA_ENABLE) {
-
+       if (data[6] == 1) {
                /* Set the hardware gate level */
                ui_Command = ui_Command | (data[7] << 7);
        }
@@ -203,8 +201,7 @@ static int apci035_timer_config(struct comedi_device *dev,
        /* Set the hardware output level */
        ui_Command = ui_Command | (data[8] << 2);
        outl(ui_Command, devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 12);
-       if (data[9] == ADDIDATA_ENABLE) {
-
+       if (data[9] == 1) {
                /* Set the reload value */
                outl(data[11],
                        devpriv->iobase + ((i_WatchdogNbr - 1) * 32) + 24);
index 0ba5385226ae69486e8f1ff055683ce6f59eed56..4007fd2d9fa4d7a8ac3f990158329ae42879c663 100644 (file)
 #define APCI1564_ADDRESS_RANGE                         128
 
 /* Digital Input IRQ Function Selection */
-#define ADDIDATA_OR                                    0
-#define ADDIDATA_AND                                   1
+#define APCI1564_DI_INT_OR                             (0 << 1)
+#define APCI1564_DI_INT_AND                            (1 << 1)
 
 /* Digital Input Interrupt Enable Disable. */
-#define APCI1564_DIGITAL_IP_INTERRUPT_ENABLE           0x4
-#define APCI1564_DIGITAL_IP_INTERRUPT_DISABLE          0xfffffffb
+#define APCI1564_DI_INT_ENABLE                         0x4
+#define APCI1564_DI_INT_DISABLE                                0xfffffffb
 
 /* Digital Output Interrupt Enable Disable. */
 #define APCI1564_DIGITAL_OP_VCC_INTERRUPT_ENABLE       0x1
@@ -49,7 +49,7 @@
 #define APCI1564_COUNTER4                              3
 
 /*
- * devpriv->i_IobaseAmcc Register Map
+ * devpriv->amcc_iobase Register Map
  */
 #define APCI1564_DI_REG                                        0x04
 #define APCI1564_DI_INT_MODE1_REG                      0x08
 #define APCI1564_TCW_WARN_TIMEVAL_REG(x)               (0x18 + ((x) * 0x20))
 #define APCI1564_TCW_WARN_TIMEBASE_REG(x)              (0x1c + ((x) * 0x20))
 
-/* Global variables */
-static unsigned int ui_InterruptStatus_1564;
-static unsigned int ui_InterruptData, ui_Type;
-
-/*
- * Configures the digital input Subdevice
- *
- * data[0] 1 = Enable interrupt, 0 = Disable interrupt
- * data[1] 0 = ADDIDATA Interrupt OR LOGIC, 1 = ADDIDATA Interrupt AND LOGIC
- * data[2] Interrupt mask for the mode 1
- * data[3] Interrupt mask for the mode 2
- */
-static int apci1564_di_config(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn,
-                             unsigned int *data)
-{
-       struct addi_private *devpriv = dev->private;
-
-       devpriv->tsk_Current = current;
-
-       /* Set the digital input logic */
-       if (data[0] == ADDIDATA_ENABLE) {
-               data[2] = data[2] << 4;
-               data[3] = data[3] << 4;
-               outl(data[2], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
-               outl(data[3], devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
-               if (data[1] == ADDIDATA_OR)
-                       outl(0x4, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-               else
-                       outl(0x6, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-       } else {
-               outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
-               outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
-               outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-       }
-
-       return insn->n;
-}
-
 /*
  * Configures The Digital Output Subdevice.
  *
@@ -140,7 +100,7 @@ static int apci1564_do_config(struct comedi_device *dev,
                              struct comedi_insn *insn,
                              unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
        unsigned int ul_Command = 0;
 
        if ((data[0] != 0) && (data[0] != 1)) {
@@ -149,24 +109,18 @@ static int apci1564_do_config(struct comedi_device *dev,
                return -EINVAL;
        }
 
-       if (data[0])
-               devpriv->b_OutputMemoryStatus = ADDIDATA_ENABLE;
-       else
-               devpriv->b_OutputMemoryStatus = ADDIDATA_DISABLE;
-
-       if (data[1] == ADDIDATA_ENABLE)
+       if (data[1] == 1)
                ul_Command = ul_Command | 0x1;
        else
                ul_Command = ul_Command & 0xFFFFFFFE;
 
-       if (data[2] == ADDIDATA_ENABLE)
+       if (data[2] == 1)
                ul_Command = ul_Command | 0x2;
        else
                ul_Command = ul_Command & 0xFFFFFFFD;
 
-       outl(ul_Command, devpriv->i_IobaseAmcc + APCI1564_DO_INT_CTRL_REG);
-       ui_InterruptData = inl(devpriv->i_IobaseAmcc + APCI1564_DO_INT_CTRL_REG);
-       devpriv->tsk_Current = current;
+       outl(ul_Command, devpriv->amcc_iobase + APCI1564_DO_INT_CTRL_REG);
+       devpriv->tsk_current = current;
        return insn->n;
 }
 
@@ -186,31 +140,31 @@ static int apci1564_timer_config(struct comedi_device *dev,
                                 struct comedi_insn *insn,
                                 unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
        unsigned int ul_Command1 = 0;
 
-       devpriv->tsk_Current = current;
+       devpriv->tsk_current = current;
        if (data[0] == ADDIDATA_WATCHDOG) {
-               devpriv->b_TimerSelectMode = ADDIDATA_WATCHDOG;
+               devpriv->timer_select_mode = ADDIDATA_WATCHDOG;
 
                /* Disable the watchdog */
-               outl(0x0, devpriv->i_IobaseAmcc + APCI1564_WDOG_CTRL_REG);
+               outl(0x0, devpriv->amcc_iobase + APCI1564_WDOG_CTRL_REG);
                /* Loading the Reload value */
-               outl(data[3], devpriv->i_IobaseAmcc + APCI1564_WDOG_RELOAD_REG);
+               outl(data[3], devpriv->amcc_iobase + APCI1564_WDOG_RELOAD_REG);
        } else if (data[0] == ADDIDATA_TIMER) {
                /* First Stop The Timer */
-               ul_Command1 = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+               ul_Command1 = inl(devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                ul_Command1 = ul_Command1 & 0xFFFFF9FEUL;
                /* Stop The Timer */
-               outl(ul_Command1, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+               outl(ul_Command1, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
 
-               devpriv->b_TimerSelectMode = ADDIDATA_TIMER;
+               devpriv->timer_select_mode = ADDIDATA_TIMER;
                if (data[1] == 1) {
                        /* Enable TIMER int & DISABLE ALL THE OTHER int SOURCES */
-                       outl(0x02, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
-                       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-                       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DO_IRQ_REG);
-                       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_WDOG_IRQ_REG);
+                       outl(0x02, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_DO_IRQ_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_WDOG_IRQ_REG);
                        outl(0x0,
                             dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER1));
                        outl(0x0,
@@ -221,22 +175,22 @@ static int apci1564_timer_config(struct comedi_device *dev,
                             dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER4));
                } else {
                        /* disable Timer interrupt */
-                       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                }
 
                /*  Loading Timebase */
-               outl(data[2], devpriv->i_IobaseAmcc + APCI1564_TIMER_TIMEBASE_REG);
+               outl(data[2], devpriv->amcc_iobase + APCI1564_TIMER_TIMEBASE_REG);
 
                /* Loading the Reload value */
-               outl(data[3], devpriv->i_IobaseAmcc + APCI1564_TIMER_RELOAD_REG);
+               outl(data[3], devpriv->amcc_iobase + APCI1564_TIMER_RELOAD_REG);
 
-               ul_Command1 = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+               ul_Command1 = inl(devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                ul_Command1 = (ul_Command1 & 0xFFF719E2UL) | 2UL << 13UL | 0x10UL;
                /* mode 2 */
-               outl(ul_Command1, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+               outl(ul_Command1, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
        } else if (data[0] == ADDIDATA_COUNTER) {
-               devpriv->b_TimerSelectMode = ADDIDATA_COUNTER;
-               devpriv->b_ModeSelectRegister = data[5];
+               devpriv->timer_select_mode = ADDIDATA_COUNTER;
+               devpriv->mode_select_register = data[5];
 
                /* First Stop The Counter */
                ul_Command1 = inl(dev->iobase + APCI1564_TCW_CTRL_REG(data[5] - 1));
@@ -285,45 +239,45 @@ static int apci1564_timer_write(struct comedi_device *dev,
                                struct comedi_insn *insn,
                                unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
        unsigned int ul_Command1 = 0;
 
-       if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
+       if (devpriv->timer_select_mode == ADDIDATA_WATCHDOG) {
                switch (data[1]) {
                case 0: /* stop the watchdog */
                        /* disable the watchdog */
-                       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_WDOG_CTRL_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_WDOG_CTRL_REG);
                        break;
                case 1: /* start the watchdog */
-                       outl(0x0001, devpriv->i_IobaseAmcc + APCI1564_WDOG_CTRL_REG);
+                       outl(0x0001, devpriv->amcc_iobase + APCI1564_WDOG_CTRL_REG);
                        break;
                case 2: /* Software trigger */
-                       outl(0x0201, devpriv->i_IobaseAmcc + APCI1564_WDOG_CTRL_REG);
+                       outl(0x0201, devpriv->amcc_iobase + APCI1564_WDOG_CTRL_REG);
                        break;
                default:
                        dev_err(dev->class_dev, "Specified functionality does not exist.\n");
                        return -EINVAL;
                }
        }
-       if (devpriv->b_TimerSelectMode == ADDIDATA_TIMER) {
+       if (devpriv->timer_select_mode == ADDIDATA_TIMER) {
                if (data[1] == 1) {
-                       ul_Command1 = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+                       ul_Command1 = inl(devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                        ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x1UL;
 
                        /* Enable the Timer */
-                       outl(ul_Command1, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+                       outl(ul_Command1, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                } else if (data[1] == 0) {
                        /* Stop The Timer */
 
-                       ul_Command1 = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+                       ul_Command1 = inl(devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                        ul_Command1 = ul_Command1 & 0xFFFFF9FEUL;
-                       outl(ul_Command1, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
+                       outl(ul_Command1, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
                }
        }
-       if (devpriv->b_TimerSelectMode == ADDIDATA_COUNTER) {
+       if (devpriv->timer_select_mode == ADDIDATA_COUNTER) {
                ul_Command1 =
                        inl(dev->iobase +
-                           APCI1564_TCW_CTRL_REG(devpriv->b_ModeSelectRegister - 1));
+                           APCI1564_TCW_CTRL_REG(devpriv->mode_select_register - 1));
                if (data[1] == 1) {
                        /* Start the Counter subdevice */
                        ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x1UL;
@@ -336,7 +290,7 @@ static int apci1564_timer_write(struct comedi_device *dev,
                        ul_Command1 = (ul_Command1 & 0xFFFFF9FFUL) | 0x400;
                }
                outl(ul_Command1, dev->iobase +
-                    APCI1564_TCW_CTRL_REG(devpriv->b_ModeSelectRegister - 1));
+                    APCI1564_TCW_CTRL_REG(devpriv->mode_select_register - 1));
        }
        return insn->n;
 }
@@ -349,27 +303,27 @@ static int apci1564_timer_read(struct comedi_device *dev,
                               struct comedi_insn *insn,
                               unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
        unsigned int ul_Command1 = 0;
 
-       if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
+       if (devpriv->timer_select_mode == ADDIDATA_WATCHDOG) {
                /*  Stores the status of the Watchdog */
-               data[0] = inl(devpriv->i_IobaseAmcc + APCI1564_WDOG_STATUS_REG) & 0x1;
-               data[1] = inl(devpriv->i_IobaseAmcc + APCI1564_WDOG_REG);
-       } else if (devpriv->b_TimerSelectMode == ADDIDATA_TIMER) {
+               data[0] = inl(devpriv->amcc_iobase + APCI1564_WDOG_STATUS_REG) & 0x1;
+               data[1] = inl(devpriv->amcc_iobase + APCI1564_WDOG_REG);
+       } else if (devpriv->timer_select_mode == ADDIDATA_TIMER) {
                /*  Stores the status of the Timer */
-               data[0] = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_STATUS_REG) & 0x1;
+               data[0] = inl(devpriv->amcc_iobase + APCI1564_TIMER_STATUS_REG) & 0x1;
 
                /*  Stores the Actual value of the Timer */
-               data[1] = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_REG);
-       } else if (devpriv->b_TimerSelectMode == ADDIDATA_COUNTER) {
+               data[1] = inl(devpriv->amcc_iobase + APCI1564_TIMER_REG);
+       } else if (devpriv->timer_select_mode == ADDIDATA_COUNTER) {
                /*  Read the Counter Actual Value. */
                data[0] =
                        inl(dev->iobase +
-                           APCI1564_TCW_REG(devpriv->b_ModeSelectRegister - 1));
+                           APCI1564_TCW_REG(devpriv->mode_select_register - 1));
                ul_Command1 =
                        inl(dev->iobase +
-                           APCI1564_TCW_STATUS_REG(devpriv->b_ModeSelectRegister - 1));
+                           APCI1564_TCW_STATUS_REG(devpriv->mode_select_register - 1));
 
                /* Get the software trigger status */
                data[1] = (unsigned char) ((ul_Command1 >> 1) & 1);
@@ -382,9 +336,9 @@ static int apci1564_timer_read(struct comedi_device *dev,
 
                /* Get the overflow status */
                data[4] = (unsigned char) ((ul_Command1 >> 0) & 1);
-       } else if ((devpriv->b_TimerSelectMode != ADDIDATA_TIMER)
-               && (devpriv->b_TimerSelectMode != ADDIDATA_WATCHDOG)
-               && (devpriv->b_TimerSelectMode != ADDIDATA_COUNTER)) {
+       } else if ((devpriv->timer_select_mode != ADDIDATA_TIMER)
+               && (devpriv->timer_select_mode != ADDIDATA_WATCHDOG)
+               && (devpriv->timer_select_mode != ADDIDATA_COUNTER)) {
                dev_err(dev->class_dev, "Invalid Subdevice!\n");
        }
        return insn->n;
@@ -398,154 +352,8 @@ static int apci1564_do_read(struct comedi_device *dev,
                            struct comedi_insn *insn,
                            unsigned int *data)
 {
-       *data = ui_Type;
-       return insn->n;
-}
-
-/*
- * Interrupt handler for the interruptible digital inputs
- */
-static void apci1564_interrupt(int irq, void *d)
-{
-       struct comedi_device *dev = d;
-       struct addi_private *devpriv = dev->private;
-       unsigned int ui_DO, ui_DI;
-       unsigned int ui_Timer;
-       unsigned int ui_C1, ui_C2, ui_C3, ui_C4;
-       unsigned int ul_Command2 = 0;
-
-       ui_DI = inl(devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG) & 0x01;
-       ui_DO = inl(devpriv->i_IobaseAmcc + APCI1564_DO_IRQ_REG) & 0x01;
-       ui_Timer = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_IRQ_REG) & 0x01;
-       ui_C1 =
-               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER1)) & 0x1;
-       ui_C2 =
-               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER2)) & 0x1;
-       ui_C3 =
-               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER3)) & 0x1;
-       ui_C4 =
-               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER4)) & 0x1;
-       if (ui_DI == 0 && ui_DO == 0 && ui_Timer == 0 && ui_C1 == 0
-               && ui_C2 == 0 && ui_C3 == 0 && ui_C4 == 0) {
-               dev_err(dev->class_dev, "Interrupt from unknown source.\n");
-       }
-
-       if (ui_DI == 1) {
-               ui_DI = inl(devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-               outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-               ui_InterruptStatus_1564 =
-                       inl(devpriv->i_IobaseAmcc + APCI1564_DI_INT_STATUS_REG);
-               ui_InterruptStatus_1564 = ui_InterruptStatus_1564 & 0X000FFFF0;
-               /* send signal to the sample */
-               send_sig(SIGIO, devpriv->tsk_Current, 0);
-               /* enable the interrupt */
-               outl(ui_DI, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-               return;
-       }
-
-       if (ui_DO == 1) {
-               /* Check for Digital Output interrupt Type */
-               /* 1: VCC interrupt                        */
-               /* 2: CC interrupt                         */
-               ui_Type = inl(devpriv->i_IobaseAmcc + APCI1564_DO_INT_STATUS_REG) & 0x3;
-               /* Disable the  Interrupt */
-               outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DO_INT_CTRL_REG);
-
-               /* Sends signal to user space */
-               send_sig(SIGIO, devpriv->tsk_Current, 0);
-       }
-
-       if (ui_Timer == 1) {
-               devpriv->b_TimerSelectMode = ADDIDATA_TIMER;
-               if (devpriv->b_TimerSelectMode) {
-
-                       /*  Disable Timer Interrupt */
-                       ul_Command2 = inl(devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
-                       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
-
-                       /* Send a signal to from kernel to user space */
-                       send_sig(SIGIO, devpriv->tsk_Current, 0);
-
-                       /*  Enable Timer Interrupt */
+       struct apci1564_private *devpriv = dev->private;
 
-                       outl(ul_Command2, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
-               }
-       }
-
-       if (ui_C1 == 1) {
-               devpriv->b_TimerSelectMode = ADDIDATA_COUNTER;
-               if (devpriv->b_TimerSelectMode) {
-
-                       /*  Disable Counter Interrupt */
-                       ul_Command2 =
-                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
-                       outl(0x0,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
-
-                       /* Send a signal to from kernel to user space */
-                       send_sig(SIGIO, devpriv->tsk_Current, 0);
-
-                       /*  Enable Counter Interrupt */
-                       outl(ul_Command2,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
-               }
-       }
-
-       if (ui_C2 == 1) {
-               devpriv->b_TimerSelectMode = ADDIDATA_COUNTER;
-               if (devpriv->b_TimerSelectMode) {
-
-                       /*  Disable Counter Interrupt */
-                       ul_Command2 =
-                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
-                       outl(0x0,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
-
-                       /* Send a signal to from kernel to user space */
-                       send_sig(SIGIO, devpriv->tsk_Current, 0);
-
-                       /*  Enable Counter Interrupt */
-                       outl(ul_Command2,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
-               }
-       }
-
-       if (ui_C3 == 1) {
-               devpriv->b_TimerSelectMode = ADDIDATA_COUNTER;
-               if (devpriv->b_TimerSelectMode) {
-
-                       /*  Disable Counter Interrupt */
-                       ul_Command2 =
-                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
-                       outl(0x0,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
-
-                       /* Send a signal to from kernel to user space */
-                       send_sig(SIGIO, devpriv->tsk_Current, 0);
-
-                       /*  Enable Counter Interrupt */
-                       outl(ul_Command2,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
-               }
-       }
-
-       if (ui_C4 == 1) {
-               devpriv->b_TimerSelectMode = ADDIDATA_COUNTER;
-               if (devpriv->b_TimerSelectMode) {
-
-                       /*  Disable Counter Interrupt */
-                       ul_Command2 =
-                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
-                       outl(0x0,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
-
-                       /* Send a signal to from kernel to user space */
-                       send_sig(SIGIO, devpriv->tsk_Current, 0);
-
-                       /*  Enable Counter Interrupt */
-                       outl(ul_Command2,
-                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
-               }
-       }
-       return;
+       *data = devpriv->do_int_type;
+       return insn->n;
 }
index 764c8f17f8faf962a877d22e0314ade153bba28d..bfa154d3fea631219c87d72fbeeb45a1be4e2760 100644 (file)
@@ -1051,7 +1051,7 @@ static int apci3120_cyclic_ai(int mode,
                                        b_DigitalOutputRegister) & 0xF0) |
                                APCI3120_SELECT_TIMER_2_LOW_WORD;
                        outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0);
-                       outw(LOWORD(ui_TimerValue2),
+                       outw(ui_TimerValue2 & 0xffff,
                                dev->iobase + APCI3120_TIMER_VALUE);
 
                        /* Writing HIGH unsigned short */
@@ -1059,7 +1059,7 @@ static int apci3120_cyclic_ai(int mode,
                                        b_DigitalOutputRegister) & 0xF0) |
                                APCI3120_SELECT_TIMER_2_HIGH_WORD;
                        outb(b_Tmp, dev->iobase + APCI3120_TIMER_CRT0);
-                       outw(HIWORD(ui_TimerValue2),
+                       outw((ui_TimerValue2 >> 16) & 0xffff,
                                dev->iobase + APCI3120_TIMER_VALUE);
 
                        /* (2) Reset FC_TIMER BIT  Clearing timer status register */
@@ -1805,7 +1805,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
                                b_DigitalOutputRegister) & 0xF0) |
                        APCI3120_SELECT_TIMER_2_LOW_WORD;
                outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
-               outw(LOWORD(ui_Timervalue2),
+               outw(ui_Timervalue2 & 0xffff,
                        devpriv->iobase + APCI3120_TIMER_VALUE);
 
                /* Writing HIGH unsigned short */
@@ -1813,7 +1813,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
                                b_DigitalOutputRegister) & 0xF0) |
                        APCI3120_SELECT_TIMER_2_HIGH_WORD;
                outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
-               outw(HIWORD(ui_Timervalue2),
+               outw((ui_Timervalue2 >> 16) & 0xffff,
                        devpriv->iobase + APCI3120_TIMER_VALUE);
                /*  timer2 in Timer mode enabled */
                devpriv->b_Timer2Mode = APCI3120_TIMER;
@@ -1841,7 +1841,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
                                b_DigitalOutputRegister) & 0xF0) |
                        APCI3120_SELECT_TIMER_2_LOW_WORD;
                outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
-               outw(LOWORD(ui_Timervalue2),
+               outw(ui_Timervalue2 & 0xffff,
                        devpriv->iobase + APCI3120_TIMER_VALUE);
 
                /* Writing HIGH unsigned short */
@@ -1850,7 +1850,7 @@ static int apci3120_config_insn_timer(struct comedi_device *dev,
                        APCI3120_SELECT_TIMER_2_HIGH_WORD;
                outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
 
-               outw(HIWORD(ui_Timervalue2),
+               outw((ui_Timervalue2 >> 16) & 0xffff,
                        devpriv->iobase + APCI3120_TIMER_VALUE);
                /* watchdog enabled */
                devpriv->b_Timer2Mode = APCI3120_WATCHDOG;
@@ -2017,7 +2017,7 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
                        APCI3120_SELECT_TIMER_2_LOW_WORD;
                outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
 
-               outw(LOWORD(ui_Timervalue2),
+               outw(ui_Timervalue2 & 0xffff,
                        devpriv->iobase + APCI3120_TIMER_VALUE);
 
                /* Writing HIGH unsigned short */
@@ -2026,7 +2026,7 @@ static int apci3120_write_insn_timer(struct comedi_device *dev,
                        APCI3120_SELECT_TIMER_2_HIGH_WORD;
                outb(b_Tmp, devpriv->iobase + APCI3120_TIMER_CRT0);
 
-               outw(HIWORD(ui_Timervalue2),
+               outw((ui_Timervalue2 >> 16) & 0xffff,
                        devpriv->iobase + APCI3120_TIMER_VALUE);
 
                break;
index f540394d17b0b4dbe35d866d7c0ff188681ef4a1..a3026a229e85e3e885c3e4cc05707b70c0daec8e 100644 (file)
@@ -689,17 +689,11 @@ static int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
 
        ui_CommandRegister = ui_ChannelNo | (ui_ChannelNo << 8) | 0x80000;
 
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /************************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /* Enable the interrupt */
-      /************************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-       }                       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
+       }
 
   /******************************/
        /* Write the command register */
@@ -712,11 +706,8 @@ static int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*************************/
                        /*Read the EOC Status bit */
@@ -738,7 +729,7 @@ static int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
                        s_BoardInfos[dev->minor].i_Offset + 28);
                /* END JK 06.07.04: Management of sevrals boards */
 
-       }                       /*  if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -800,20 +791,11 @@ static int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev,
 
        ui_CommandRegister = 0;
 
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
-
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-
-       }                       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
+       }
 
   /**********************/
        /*Start the conversion */
@@ -830,13 +812,8 @@ static int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
-
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*******************/
                        /*Read the EOC flag */
@@ -856,7 +833,7 @@ static int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -915,20 +892,11 @@ static int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev,
 
        ui_CommandRegister = 0;
 
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
-
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-
-       }                       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
+       }
 
   /**********************/
        /*Start the conversion */
@@ -945,13 +913,8 @@ static int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
-
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
 
          /*******************/
@@ -973,7 +936,7 @@ static int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev,
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
 
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -1020,14 +983,9 @@ static int i_APCI3200_ReadCJCValue(struct comedi_device *dev,
        /*Initialise dw_CommandRegister */
   /*******************************/
        ui_CommandRegister = 0;
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
        }
 
@@ -1047,12 +1005,8 @@ static int i_APCI3200_ReadCJCValue(struct comedi_device *dev,
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
 
-  /*****************************/
        /*Test if interrupt is enable */
-  /*****************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
 
          /*******************/
@@ -1073,8 +1027,7 @@ static int i_APCI3200_ReadCJCValue(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -1128,17 +1081,10 @@ static int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev,
        /*Initialise ui_CommandRegister */
   /*******************************/
        ui_CommandRegister = 0;
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
-
        }
 
   /**********************/
@@ -1154,8 +1100,7 @@ static int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev,
        /* outl(ui_CommandRegister,devpriv->iobase+i_Offset + 8); */
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*******************/
                        /*Read the EOC flag */
@@ -1172,7 +1117,7 @@ static int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -1224,14 +1169,9 @@ static int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev,
        /*Initialise dw_CommandRegister */
   /*******************************/
        ui_CommandRegister = 0;
-  /*********************************/
        /*Test if the interrupt is enable */
-  /*********************************/
-       /* if (i_InterruptFlag == ADDIDATA_ENABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_ENABLE) {
-      /**********************/
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 1) {
                /*Enable the interrupt */
-      /**********************/
                ui_CommandRegister = ui_CommandRegister | 0x00100000;
        }
   /**********************/
@@ -1247,8 +1187,7 @@ static int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev,
        /* outl(ui_CommandRegister ,devpriv->iobase+i_Offset + 8); */
        outl(ui_CommandRegister,
                devpriv->iobase + s_BoardInfos[dev->minor].i_Offset + 8);
-       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
-       if (s_BoardInfos[dev->minor].i_InterruptFlag == ADDIDATA_DISABLE) {
+       if (s_BoardInfos[dev->minor].i_InterruptFlag == 0) {
                do {
          /*******************/
                        /*Read the EOC flag */
@@ -1264,7 +1203,7 @@ static int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev,
                data[0] =
                        inl(devpriv->iobase +
                        s_BoardInfos[dev->minor].i_Offset + 28);
-       }                       /* if (i_InterruptFlag == ADDIDATA_DISABLE) */
+       }
        return 0;
 }
 
@@ -2136,8 +2075,7 @@ static int apci3200_ai_bits_test(struct comedi_device *dev,
                   i_ADDIDATAConversionTimeUnit= 1; */
                /* i_Temp= i_InterruptFlag ; */
                i_Temp = s_BoardInfos[dev->minor].i_InterruptFlag;
-               /* i_InterruptFlag = ADDIDATA_DISABLE; */
-               s_BoardInfos[dev->minor].i_InterruptFlag = ADDIDATA_DISABLE;
+               s_BoardInfos[dev->minor].i_InterruptFlag = 0;
                i_APCI3200_Read1AnalogInputChannel(dev, s, insn, data);
                /* if(i_AutoCalibration == FALSE) */
                if (s_BoardInfos[dev->minor].i_AutoCalibration == FALSE) {
@@ -2176,8 +2114,7 @@ static int apci3200_ai_bits_test(struct comedi_device *dev,
                   i_ADDIDATAConversionTimeUnit= 1; */
                /* i_Temp= i_InterruptFlag ; */
                i_Temp = s_BoardInfos[dev->minor].i_InterruptFlag;
-               /* i_InterruptFlag = ADDIDATA_DISABLE; */
-               s_BoardInfos[dev->minor].i_InterruptFlag = ADDIDATA_DISABLE;
+               s_BoardInfos[dev->minor].i_InterruptFlag = 0;
                i_APCI3200_Read1AnalogInputChannel(dev, s, insn, data);
                /* if(i_AutoCalibration == FALSE) */
                if (s_BoardInfos[dev->minor].i_AutoCalibration == FALSE) {
index 4da9db35b8e22fe9712679552d2026306e33abc8..af70c84018806eb8325b20957dcd3131f9f33702 100644 (file)
@@ -18,7 +18,7 @@ static const struct addi_board apci035_boardtypes[] = {
                .pc_DriverName          = "apci035",
                .i_IorangeBase1         = APCI035_ADDRESS_RANGE,
                .i_PCIEeprom            = 1,
-               .pc_EepromChip          = ADDIDATA_S5920,
+               .pc_EepromChip          = "S5920",
                .i_NbrAiChannel         = 16,
                .i_NbrAiChannelDiff     = 8,
                .i_AiChannelList        = 16,
index eab75eb26478164d718d54817b375ee7883aac6a..b7a284ac66498f921b328a99aee9745cb9b4d949 100644 (file)
@@ -15,7 +15,7 @@ static const struct addi_board apci1500_boardtypes[] = {
        {
                .pc_DriverName          = "apci1500",
                .i_IorangeBase1         = APCI1500_ADDRESS_RANGE,
-               .i_PCIEeprom            = ADDIDATA_NO_EEPROM,
+               .i_PCIEeprom            = 0,
                .i_NbrDiChannel         = 16,
                .i_NbrDoChannel         = 16,
                .i_DoMaxdata            = 0xffff,
index 13d9962b47ecd591bdafb297a17e0646e59a06ab..f71ee02ed626affae815ac1912402fbf073b0bdc 100644 (file)
 
 #include "../comedidev.h"
 #include "comedi_fc.h"
+#include "amcc_s5933.h"
 
 #include "addi-data/addi_common.h"
 
+struct apci1564_private {
+       unsigned int amcc_iobase;       /* base of AMCC I/O registers */
+       unsigned int mode1;             /* riding-edge/high level channels */
+       unsigned int mode2;             /* falling-edge/low level channels */
+       unsigned int ctrl;              /* interrupt mode OR (edge) . AND (level) */
+       unsigned int do_int_type;
+       unsigned char timer_select_mode;
+       unsigned char mode_select_register;
+       struct task_struct *tsk_current;
+};
+
 #include "addi-data/hwdrv_apci1564.c"
 
-static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
+static int apci1564_reset(struct comedi_device *dev)
 {
-       apci1564_interrupt(irq, d);
-       return IRQ_RETVAL(1);
+       struct apci1564_private *devpriv = dev->private;
+
+       devpriv->do_int_type = 0;
+
+       /* Disable the input interrupts and reset status register */
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+       inl(devpriv->amcc_iobase + APCI1564_DI_INT_STATUS_REG);
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE1_REG);
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE2_REG);
+
+       /* Reset the output channels and disable interrupts */
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DO_REG);
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DO_INT_CTRL_REG);
+
+       /* Reset the watchdog registers */
+       addi_watchdog_reset(devpriv->amcc_iobase + APCI1564_WDOG_REG);
+
+       /* Reset the timer registers */
+       outl(0x0, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
+       outl(0x0, devpriv->amcc_iobase + APCI1564_TIMER_RELOAD_REG);
+
+       /* Reset the counter registers */
+       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
+       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
+       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
+       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
+
+       return 0;
+}
+
+static irqreturn_t apci1564_interrupt(int irq, void *d)
+{
+       struct comedi_device *dev = d;
+       struct apci1564_private *devpriv = dev->private;
+       struct comedi_subdevice *s = dev->read_subdev;
+       unsigned int ui_DO, ui_DI;
+       unsigned int ui_Timer;
+       unsigned int ui_C1, ui_C2, ui_C3, ui_C4;
+       unsigned int ul_Command2 = 0;
+
+       /* check interrupt is from this device */
+       if ((inl(devpriv->amcc_iobase + AMCC_OP_REG_INTCSR) &
+            INTCSR_INTR_ASSERTED) == 0)
+               return IRQ_NONE;
+
+       /* check which interrupt was triggered */
+       ui_DI = inl(devpriv->amcc_iobase + APCI1564_DI_IRQ_REG) &
+                  APCI1564_DI_INT_ENABLE;
+       ui_DO = inl(devpriv->amcc_iobase + APCI1564_DO_IRQ_REG) & 0x01;
+       ui_Timer = inl(devpriv->amcc_iobase + APCI1564_TIMER_IRQ_REG) & 0x01;
+       ui_C1 =
+               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER1)) & 0x1;
+       ui_C2 =
+               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER2)) & 0x1;
+       ui_C3 =
+               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER3)) & 0x1;
+       ui_C4 =
+               inl(dev->iobase + APCI1564_TCW_IRQ_REG(APCI1564_COUNTER4)) & 0x1;
+       if (ui_DI == 0 && ui_DO == 0 && ui_Timer == 0 && ui_C1 == 0
+               && ui_C2 == 0 && ui_C3 == 0 && ui_C4 == 0) {
+               return IRQ_HANDLED;
+       }
+
+       if (ui_DI) {
+               /* disable the interrupt */
+               outl(ui_DI & APCI1564_DI_INT_DISABLE, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+
+               s->state = inl(dev->iobase + APCI1564_DI_INT_STATUS_REG) & 0xffff;
+               comedi_buf_put(s, s->state);
+               s->async->events |= COMEDI_CB_BLOCK | COMEDI_CB_EOS;
+               comedi_event(dev, s);
+
+               /* enable the interrupt */
+               outl(ui_DI, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+       }
+
+       if (ui_DO == 1) {
+               /* Check for Digital Output interrupt Type */
+               /* 1: VCC interrupt                        */
+               /* 2: CC interrupt                         */
+               devpriv->do_int_type = inl(devpriv->amcc_iobase +
+                                         APCI1564_DO_INT_STATUS_REG) & 0x3;
+               /* Disable the  Interrupt */
+               outl(0x0, devpriv->amcc_iobase + APCI1564_DO_INT_CTRL_REG);
+
+               /* Sends signal to user space */
+               send_sig(SIGIO, devpriv->tsk_current, 0);
+       }
+
+       if (ui_Timer == 1) {
+               devpriv->timer_select_mode = ADDIDATA_TIMER;
+               if (devpriv->timer_select_mode) {
+
+                       /*  Disable Timer Interrupt */
+                       ul_Command2 = inl(devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
+                       outl(0x0, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
+
+                       /* Send a signal to from kernel to user space */
+                       send_sig(SIGIO, devpriv->tsk_current, 0);
+
+                       /*  Enable Timer Interrupt */
+
+                       outl(ul_Command2, devpriv->amcc_iobase + APCI1564_TIMER_CTRL_REG);
+               }
+       }
+
+       if (ui_C1 == 1) {
+               devpriv->timer_select_mode = ADDIDATA_COUNTER;
+               if (devpriv->timer_select_mode) {
+
+                       /*  Disable Counter Interrupt */
+                       ul_Command2 =
+                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
+                       outl(0x0,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
+
+                       /* Send a signal to from kernel to user space */
+                       send_sig(SIGIO, devpriv->tsk_current, 0);
+
+                       /*  Enable Counter Interrupt */
+                       outl(ul_Command2,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
+               }
+       }
+
+       if (ui_C2 == 1) {
+               devpriv->timer_select_mode = ADDIDATA_COUNTER;
+               if (devpriv->timer_select_mode) {
+
+                       /*  Disable Counter Interrupt */
+                       ul_Command2 =
+                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
+                       outl(0x0,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
+
+                       /* Send a signal to from kernel to user space */
+                       send_sig(SIGIO, devpriv->tsk_current, 0);
+
+                       /*  Enable Counter Interrupt */
+                       outl(ul_Command2,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
+               }
+       }
+
+       if (ui_C3 == 1) {
+               devpriv->timer_select_mode = ADDIDATA_COUNTER;
+               if (devpriv->timer_select_mode) {
+
+                       /*  Disable Counter Interrupt */
+                       ul_Command2 =
+                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
+                       outl(0x0,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
+
+                       /* Send a signal to from kernel to user space */
+                       send_sig(SIGIO, devpriv->tsk_current, 0);
+
+                       /*  Enable Counter Interrupt */
+                       outl(ul_Command2,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
+               }
+       }
+
+       if (ui_C4 == 1) {
+               devpriv->timer_select_mode = ADDIDATA_COUNTER;
+               if (devpriv->timer_select_mode) {
+
+                       /*  Disable Counter Interrupt */
+                       ul_Command2 =
+                               inl(dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
+                       outl(0x0,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
+
+                       /* Send a signal to from kernel to user space */
+                       send_sig(SIGIO, devpriv->tsk_current, 0);
+
+                       /*  Enable Counter Interrupt */
+                       outl(ul_Command2,
+                            dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
+               }
+       }
+       return IRQ_HANDLED;
 }
 
 static int apci1564_di_insn_bits(struct comedi_device *dev,
@@ -19,9 +211,9 @@ static int apci1564_di_insn_bits(struct comedi_device *dev,
                                 struct comedi_insn *insn,
                                 unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
 
-       data[1] = inl(devpriv->i_IobaseAmcc + APCI1564_DI_REG);
+       data[1] = inl(devpriv->amcc_iobase + APCI1564_DI_REG);
 
        return insn->n;
 }
@@ -31,46 +223,199 @@ static int apci1564_do_insn_bits(struct comedi_device *dev,
                                 struct comedi_insn *insn,
                                 unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
 
-       s->state = inl(devpriv->i_IobaseAmcc + APCI1564_DO_REG);
+       s->state = inl(devpriv->amcc_iobase + APCI1564_DO_REG);
 
        if (comedi_dio_update_state(s, data))
-               outl(s->state, devpriv->i_IobaseAmcc + APCI1564_DO_REG);
+               outl(s->state, devpriv->amcc_iobase + APCI1564_DO_REG);
 
        data[1] = s->state;
 
        return insn->n;
 }
 
-static int apci1564_reset(struct comedi_device *dev)
+/*
+ * Change-Of-State (COS) interrupt configuration
+ *
+ * Channels 0 to 15 are interruptible. These channels can be configured
+ * to generate interrupts based on AND/OR logic for the desired channels.
+ *
+ *     OR logic
+ *             - reacts to rising or falling edges
+ *             - interrupt is generated when any enabled channel
+ *               meet the desired interrupt condition
+ *
+ *     AND logic
+ *             - reacts to changes in level of the selected inputs
+ *             - interrupt is generated when all enabled channels
+ *               meet the desired interrupt condition
+ *             - after an interrupt, a change in level must occur on
+ *               the selected inputs to release the IRQ logic
+ *
+ * The COS interrupt must be configured before it can be enabled.
+ *
+ *     data[0] : INSN_CONFIG_DIGITAL_TRIG
+ *     data[1] : trigger number (= 0)
+ *     data[2] : configuration operation:
+ *               COMEDI_DIGITAL_TRIG_DISABLE = no interrupts
+ *               COMEDI_DIGITAL_TRIG_ENABLE_EDGES = OR (edge) interrupts
+ *               COMEDI_DIGITAL_TRIG_ENABLE_LEVELS = AND (level) interrupts
+ *     data[3] : left-shift for data[4] and data[5]
+ *     data[4] : rising-edge/high level channels
+ *     data[5] : falling-edge/low level channels
+ */
+static int apci1564_cos_insn_config(struct comedi_device *dev,
+                                   struct comedi_subdevice *s,
+                                   struct comedi_insn *insn,
+                                   unsigned int *data)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
+       unsigned int shift, oldmask;
+
+       switch (data[0]) {
+       case INSN_CONFIG_DIGITAL_TRIG:
+               if (data[1] != 0)
+                       return -EINVAL;
+               shift = data[3];
+               oldmask = (1U << shift) - 1;
+               switch (data[2]) {
+               case COMEDI_DIGITAL_TRIG_DISABLE:
+                       devpriv->ctrl = 0;
+                       devpriv->mode1 = 0;
+                       devpriv->mode2 = 0;
+                       apci1564_reset(dev);
+                       break;
+               case COMEDI_DIGITAL_TRIG_ENABLE_EDGES:
+                       if (devpriv->ctrl != (APCI1564_DI_INT_ENABLE |
+                                             APCI1564_DI_INT_OR)) {
+                               /* switching to 'OR' mode */
+                               devpriv->ctrl = APCI1564_DI_INT_ENABLE |
+                                               APCI1564_DI_INT_OR;
+                               /* wipe old channels */
+                               devpriv->mode1 = 0;
+                               devpriv->mode2 = 0;
+                       } else {
+                               /* preserve unspecified channels */
+                               devpriv->mode1 &= oldmask;
+                               devpriv->mode2 &= oldmask;
+                       }
+                       /* configure specified channels */
+                       devpriv->mode1 |= data[4] << shift;
+                       devpriv->mode2 |= data[5] << shift;
+                       break;
+               case COMEDI_DIGITAL_TRIG_ENABLE_LEVELS:
+                       if (devpriv->ctrl != (APCI1564_DI_INT_ENABLE |
+                                             APCI1564_DI_INT_AND)) {
+                               /* switching to 'AND' mode */
+                               devpriv->ctrl = APCI1564_DI_INT_ENABLE |
+                                               APCI1564_DI_INT_AND;
+                               /* wipe old channels */
+                               devpriv->mode1 = 0;
+                               devpriv->mode2 = 0;
+                       } else {
+                               /* preserve unspecified channels */
+                               devpriv->mode1 &= oldmask;
+                               devpriv->mode2 &= oldmask;
+                       }
+                       /* configure specified channels */
+                       devpriv->mode1 |= data[4] << shift;
+                       devpriv->mode2 |= data[5] << shift;
+                       break;
+               default:
+                       return -EINVAL;
+               }
+               break;
+       default:
+               return -EINVAL;
+       }
+       return insn->n;
+}
 
-       ui_Type = 0;
+static int apci1564_cos_insn_bits(struct comedi_device *dev,
+                                 struct comedi_subdevice *s,
+                                 struct comedi_insn *insn,
+                                 unsigned int *data)
+{
+       data[1] = s->state;
 
-       /* Disable the input interrupts and reset status register */
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_IRQ_REG);
-       inl(devpriv->i_IobaseAmcc + APCI1564_DI_INT_STATUS_REG);
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE1_REG);
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DI_INT_MODE2_REG);
+       return 0;
+}
 
-       /* Reset the output channels and disable interrupts */
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DO_REG);
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DO_INT_CTRL_REG);
+static int apci1564_cos_cmdtest(struct comedi_device *dev,
+                               struct comedi_subdevice *s,
+                               struct comedi_cmd *cmd)
+{
+       int err = 0;
 
-       /* Reset the watchdog registers */
-       addi_watchdog_reset(devpriv->i_IobaseAmcc + APCI1564_WDOG_REG);
+       /* Step 1 : check if triggers are trivially valid */
 
-       /* Reset the timer registers */
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_TIMER_CTRL_REG);
-       outl(0x0, devpriv->i_IobaseAmcc + APCI1564_TIMER_RELOAD_REG);
+       err |= cfc_check_trigger_src(&cmd->start_src, TRIG_NOW);
+       err |= cfc_check_trigger_src(&cmd->scan_begin_src, TRIG_EXT);
+       err |= cfc_check_trigger_src(&cmd->convert_src, TRIG_FOLLOW);
+       err |= cfc_check_trigger_src(&cmd->scan_end_src, TRIG_COUNT);
+       err |= cfc_check_trigger_src(&cmd->stop_src, TRIG_NONE);
 
-       /* Reset the counter registers */
-       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER1));
-       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER2));
-       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER3));
-       outl(0x0, dev->iobase + APCI1564_TCW_CTRL_REG(APCI1564_COUNTER4));
+       if (err)
+               return 1;
+
+       /* Step 2a : make sure trigger sources are unique */
+       /* Step 2b : and mutually compatible */
+
+       if (err)
+               return 2;
+
+       /* Step 3: check if arguments are trivially valid */
+
+       err |= cfc_check_trigger_arg_is(&cmd->start_arg, 0);
+       err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, 0);
+       err |= cfc_check_trigger_arg_is(&cmd->convert_arg, 0);
+       err |= cfc_check_trigger_arg_is(&cmd->scan_end_arg, cmd->chanlist_len);
+       err |= cfc_check_trigger_arg_is(&cmd->stop_arg, 0);
+
+       if (err)
+               return 3;
+
+       /* step 4: ignored */
+
+       if (err)
+               return 4;
+
+       return 0;
+}
+
+/*
+ * Change-Of-State (COS) 'do_cmd' operation
+ *
+ * Enable the COS interrupt as configured by apci1564_cos_insn_config().
+ */
+static int apci1564_cos_cmd(struct comedi_device *dev,
+                           struct comedi_subdevice *s)
+{
+       struct apci1564_private *devpriv = dev->private;
+
+       if (!devpriv->ctrl) {
+               dev_warn(dev->class_dev,
+                       "Interrupts disabled due to mode configuration!\n");
+               return -EINVAL;
+       }
+
+       outl(devpriv->mode1, devpriv->amcc_iobase + APCI1564_DI_INT_MODE1_REG);
+       outl(devpriv->mode2, devpriv->amcc_iobase + APCI1564_DI_INT_MODE2_REG);
+       outl(devpriv->ctrl, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+
+       return 0;
+}
+
+static int apci1564_cos_cancel(struct comedi_device *dev,
+                              struct comedi_subdevice *s)
+{
+       struct apci1564_private *devpriv = dev->private;
+
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_IRQ_REG);
+       inl(devpriv->amcc_iobase + APCI1564_DI_INT_STATUS_REG);
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE1_REG);
+       outl(0x0, devpriv->amcc_iobase + APCI1564_DI_INT_MODE2_REG);
 
        return 0;
 }
@@ -79,7 +424,7 @@ static int apci1564_auto_attach(struct comedi_device *dev,
                                      unsigned long context_unused)
 {
        struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-       struct addi_private *devpriv;
+       struct apci1564_private *devpriv;
        struct comedi_subdevice *s;
        int ret;
 
@@ -94,18 +439,18 @@ static int apci1564_auto_attach(struct comedi_device *dev,
                return ret;
 
        dev->iobase = pci_resource_start(pcidev, 1);
-       devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
+       devpriv->amcc_iobase = pci_resource_start(pcidev, 0);
 
        apci1564_reset(dev);
 
        if (pcidev->irq > 0) {
-               ret = request_irq(pcidev->irq, v_ADDI_Interrupt, IRQF_SHARED,
+               ret = request_irq(pcidev->irq, apci1564_interrupt, IRQF_SHARED,
                                  dev->board_name, dev);
                if (ret == 0)
                        dev->irq = pcidev->irq;
        }
 
-       ret = comedi_alloc_subdevices(dev, 3);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret)
                return ret;
 
@@ -117,7 +462,6 @@ static int apci1564_auto_attach(struct comedi_device *dev,
        s->maxdata = 1;
        s->len_chanlist = 32;
        s->range_table = &range_digital;
-       s->insn_config = apci1564_di_config;
        s->insn_bits = apci1564_di_insn_bits;
 
        /*  Allocate and Initialise DO Subdevice Structures */
@@ -144,12 +488,31 @@ static int apci1564_auto_attach(struct comedi_device *dev,
        s->insn_read = apci1564_timer_read;
        s->insn_config = apci1564_timer_config;
 
+       /* Change-Of-State (COS) interrupt subdevice */
+       s = &dev->subdevices[3];
+       if (dev->irq) {
+               dev->read_subdev = s;
+               s->type = COMEDI_SUBD_DI;
+               s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
+               s->n_chan = 1;
+               s->maxdata = 1;
+               s->range_table = &range_digital;
+               s->len_chanlist = 1;
+               s->insn_config = apci1564_cos_insn_config;
+               s->insn_bits = apci1564_cos_insn_bits;
+               s->do_cmdtest = apci1564_cos_cmdtest;
+               s->do_cmd = apci1564_cos_cmd;
+               s->cancel = apci1564_cos_cancel;
+       } else {
+               s->type = COMEDI_SUBD_UNUSED;
+       }
+
        return 0;
 }
 
 static void apci1564_detach(struct comedi_device *dev)
 {
-       struct addi_private *devpriv = dev->private;
+       struct apci1564_private *devpriv = dev->private;
 
        if (devpriv) {
                if (dev->iobase)
index 0cfb12fa1cbc8d0131cfb8838456f3dc1ba570c1..0b77f1012d473476a35b46bd1b89eb5e23b0e4b3 100644 (file)
@@ -88,7 +88,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
                        dev->irq = pcidev->irq;
        }
 
-       devpriv->us_UseDma = ADDI_ENABLE;
+       devpriv->us_UseDma = 1;
 
        /* Allocate DMA buffers */
        devpriv->b_DmaDoubleBuffer = 0;
@@ -109,7 +109,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
                }
        }
        if (!devpriv->ul_DmaBufferVirtual[0])
-               devpriv->us_UseDma = ADDI_DISABLE;
+               devpriv->us_UseDma = 0;
 
        if (devpriv->ul_DmaBufferVirtual[1])
                devpriv->b_DmaDoubleBuffer = 1;
@@ -125,13 +125,10 @@ static int apci3120_auto_attach(struct comedi_device *dev,
        s->subdev_flags =
                SDF_READABLE | SDF_COMMON | SDF_GROUND
                | SDF_DIFF;
-       if (this_board->i_NbrAiChannel) {
+       if (this_board->i_NbrAiChannel)
                s->n_chan = this_board->i_NbrAiChannel;
-               devpriv->b_SingelDiff = 0;
-       } else {
+       else
                s->n_chan = this_board->i_NbrAiChannelDiff;
-               devpriv->b_SingelDiff = 1;
-       }
        s->maxdata = this_board->i_AiMaxdata;
        s->len_chanlist = this_board->i_AiChannelList;
        s->range_table = &range_apci3120_ai;
index f0f891a482a337453a4bf5401bec0697fea5cbfb..fe6897eff3dbc5c7b427c355fb77995adf74eff3 100644 (file)
@@ -32,8 +32,8 @@ static const struct addi_board apci3200_boardtypes[] = {
        [BOARD_APCI3200] = {
                .pc_DriverName          = "apci3200",
                .i_IorangeBase1         = 256,
-               .i_PCIEeprom            = ADDIDATA_EEPROM,
-               .pc_EepromChip          = ADDIDATA_S5920,
+               .i_PCIEeprom            = 1,
+               .pc_EepromChip          = "S5920",
                .i_NbrAiChannel         = 16,
                .i_NbrAiChannelDiff     = 8,
                .i_AiChannelList        = 16,
@@ -58,8 +58,8 @@ static const struct addi_board apci3200_boardtypes[] = {
        [BOARD_APCI3300] = {
                .pc_DriverName          = "apci3300",
                .i_IorangeBase1         = 256,
-               .i_PCIEeprom            = ADDIDATA_EEPROM,
-               .pc_EepromChip          = ADDIDATA_S5920,
+               .i_PCIEeprom            = 1,
+               .pc_EepromChip          = "S5920",
                .i_NbrAiChannelDiff     = 8,
                .i_AiChannelList        = 8,
                .i_AiMaxdata            = 0x3ffff,
index 584fd57ecb705efbe584f1b21644504eeab2b1e0..51edfebb952ae6d83f371baa44716fd67092bf65 100644 (file)
@@ -75,9 +75,6 @@ TODO:
 #include "plx9052.h"
 #include "comedi_fc.h"
 
-#define PCI9111_DRIVER_NAME    "adl_pci9111"
-#define PCI9111_HR_DEVICE_ID   0x9111
-
 #define PCI9111_FIFO_HALF_SIZE 512
 
 #define PCI9111_AI_ACQUISITION_PERIOD_MIN_NS   10000
@@ -189,68 +186,6 @@ static void pci9111_timer_set(struct comedi_device *dev)
        i8254_write(timer_base, 1, 1, dev_private->div1);
 }
 
-enum pci9111_trigger_sources {
-       software,
-       timer_pacer,
-       external
-};
-
-static void pci9111_trigger_source_set(struct comedi_device *dev,
-                                      enum pci9111_trigger_sources source)
-{
-       int flags;
-
-       /* Read the current trigger mode control bits */
-       flags = inb(dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
-       /* Mask off the EITS and TPST bits */
-       flags &= 0x9;
-
-       switch (source) {
-       case software:
-               break;
-
-       case timer_pacer:
-               flags |= PCI9111_AI_TRIG_CTRL_TPST;
-               break;
-
-       case external:
-               flags |= PCI9111_AI_TRIG_CTRL_ETIS;
-               break;
-       }
-
-       outb(flags, dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
-}
-
-static void pci9111_pretrigger_set(struct comedi_device *dev, bool pretrigger)
-{
-       int flags;
-
-       /* Read the current trigger mode control bits */
-       flags = inb(dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
-       /* Mask off the PTRG bit */
-       flags &= 0x7;
-
-       if (pretrigger)
-               flags |= PCI9111_AI_TRIG_CTRL_PTRG;
-
-       outb(flags, dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
-}
-
-static void pci9111_autoscan_set(struct comedi_device *dev, bool autoscan)
-{
-       int flags;
-
-       /* Read the current trigger mode control bits */
-       flags = inb(dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
-       /* Mask off the ASCAN bit */
-       flags &= 0xe;
-
-       if (autoscan)
-               flags |= PCI9111_AI_TRIG_CTRL_ASCAN;
-
-       outb(flags, dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
-}
-
 enum pci9111_ISC0_sources {
        irq_on_eoc,
        irq_on_fifo_half_full
@@ -303,9 +238,8 @@ static int pci9111_ai_cancel(struct comedi_device *dev,
        plx9050_interrupt_control(dev_private->lcr_io_base, true, true, true,
                                  true, false);
 
-       pci9111_trigger_source_set(dev, software);
-
-       pci9111_autoscan_set(dev, false);
+       /* disable A/D triggers (software trigger mode) and auto scan off */
+       outb(0, dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
 
        pci9111_fifo_reset(dev);
 
@@ -454,20 +388,17 @@ static int pci9111_ai_do_cmd(struct comedi_device *dev,
 {
        struct pci9111_private_data *dev_private = dev->private;
        struct comedi_cmd *cmd = &s->async->cmd;
+       unsigned int last_chan = CR_CHAN(cmd->chanlist[cmd->chanlist_len - 1]);
+       unsigned int trig = 0;
 
        /*  Set channel scan limit */
        /*  PCI9111 allows only scanning from channel 0 to channel n */
        /*  TODO: handle the case of an external multiplexer */
 
-       if (cmd->chanlist_len > 1) {
-               outb(cmd->chanlist_len - 1,
-                       dev->iobase + PCI9111_AI_CHANNEL_REG);
-               pci9111_autoscan_set(dev, true);
-       } else {
-               outb(CR_CHAN(cmd->chanlist[0]),
-                       dev->iobase + PCI9111_AI_CHANNEL_REG);
-               pci9111_autoscan_set(dev, false);
-       }
+       if (cmd->chanlist_len > 1)
+               trig |= PCI9111_AI_TRIG_CTRL_ASCAN;
+
+       outb(last_chan, dev->iobase + PCI9111_AI_CHANNEL_REG);
 
        /*  Set gain */
        /*  This is the same gain on every channel */
@@ -484,12 +415,11 @@ static int pci9111_ai_do_cmd(struct comedi_device *dev,
        /*  Set timer pacer */
        dev_private->scan_delay = 0;
        if (cmd->convert_src == TRIG_TIMER) {
-               pci9111_trigger_source_set(dev, software);
+               trig |= PCI9111_AI_TRIG_CTRL_TPST;
                pci9111_timer_set(dev);
                pci9111_fifo_reset(dev);
                pci9111_interrupt_source_set(dev, irq_on_fifo_half_full,
                                             irq_on_timer_tick);
-               pci9111_trigger_source_set(dev, timer_pacer);
                plx9050_interrupt_control(dev_private->lcr_io_base, true, true,
                                          false, true, true);
 
@@ -498,14 +428,14 @@ static int pci9111_ai_do_cmd(struct comedi_device *dev,
                                (cmd->convert_arg * cmd->chanlist_len)) - 1;
                }
        } else {        /* TRIG_EXT */
-               pci9111_trigger_source_set(dev, external);
+               trig |= PCI9111_AI_TRIG_CTRL_ETIS;
                pci9111_fifo_reset(dev);
                pci9111_interrupt_source_set(dev, irq_on_fifo_half_full,
                                             irq_on_timer_tick);
                plx9050_interrupt_control(dev_private->lcr_io_base, true, true,
                                          false, true, true);
-
        }
+       outb(trig, dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
 
        dev_private->stop_counter *= (1 + dev_private->scan_delay);
        dev_private->chunk_counter = 0;
@@ -630,7 +560,7 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
                /* '0' means FIFO is full, data may have been lost */
                if (!(status & PCI9111_AI_STAT_FF_FF)) {
                        spin_unlock_irqrestore(&dev->spinlock, irq_flags);
-                       comedi_error(dev, PCI9111_DRIVER_NAME " fifo overflow");
+                       dev_dbg(dev->class_dev, "fifo overflow\n");
                        outb(0, dev->iobase + PCI9111_INT_CLR_REG);
                        async->events |= COMEDI_CB_ERROR | COMEDI_CB_EOA;
                        cfc_handle_events(dev, s);
@@ -771,9 +701,8 @@ static int pci9111_reset(struct comedi_device *dev)
        plx9050_interrupt_control(dev_private->lcr_io_base, true, true, true,
                                  true, false);
 
-       pci9111_trigger_source_set(dev, software);
-       pci9111_pretrigger_set(dev, false);
-       pci9111_autoscan_set(dev, false);
+       /* disable A/D triggers (software trigger mode) and auto scan off */
+       outb(0, dev->iobase + PCI9111_AI_TRIG_CTRL_REG);
 
        /* Reset 8254 chip */
        dev_private->div1 = 0;
@@ -884,7 +813,7 @@ static int pci9111_pci_probe(struct pci_dev *dev,
 }
 
 static const struct pci_device_id pci9111_pci_table[] = {
-       { PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI9111_HR_DEVICE_ID) },
+       { PCI_DEVICE(PCI_VENDOR_ID_ADLINK, 0x9111) },
        /* { PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI9111_HG_DEVICE_ID) }, */
        { 0 }
 };
index b4ea37704eaf3831135d1e4d0cd126e4e59bd114..8b15cbec9891996dedf11502d74c43ed9486c696 100644 (file)
@@ -79,20 +79,20 @@ If you do not specify any options, they will default to
 #include "../comedidev.h"
 
 /* address scheme (page 2.17 of the manual) */
-#define ADQ12B_SIZE     16
-
-#define ADQ12B_CTREG    0x00
-#define ADQ12B_STINR    0x00
-#define ADQ12B_OUTBR    0x04
-#define ADQ12B_ADLOW    0x08
-#define ADQ12B_ADHIG    0x09
-#define ADQ12B_CONT0    0x0c
-#define ADQ12B_CONT1    0x0d
-#define ADQ12B_CONT2    0x0e
-#define ADQ12B_COWORD   0x0f
-
-/* mask of the bit at STINR to check end of conversion */
-#define ADQ12B_EOC     0x20
+#define ADQ12B_CTREG           0x00
+#define ADQ12B_CTREG_MSKP      (1 << 7)        /* enable pacer interrupt */
+#define ADQ12B_CTREG_GTP       (1 << 6)        /* enable pacer */
+#define ADQ12B_CTREG_RANGE(x)  ((x) << 4)
+#define ADQ12B_CTREG_CHAN(x)   ((x) << 0)
+#define ADQ12B_STINR           0x00
+#define ADQ12B_STINR_OUT2      (1 << 7)        /* timer 2 output state */
+#define ADQ12B_STINR_OUTP      (1 << 6)        /* pacer output state */
+#define ADQ12B_STINR_EOC       (1 << 5)        /* A/D end-of-conversion */
+#define ADQ12B_STINR_IN_MASK   (0x1f << 0)
+#define ADQ12B_OUTBR           0x04
+#define ADQ12B_ADLOW           0x08
+#define ADQ12B_ADHIG           0x09
+#define ADQ12B_TIMER_BASE      0x0c
 
 /* available ranges through the PGA gains */
 static const struct comedi_lrange range_adq12b_ai_bipolar = {
@@ -114,10 +114,7 @@ static const struct comedi_lrange range_adq12b_ai_unipolar = {
 };
 
 struct adq12b_private {
-       int unipolar;           /* option 2 of comedi_config (1 is iobase) */
-       int differential;       /* option 3 of comedi_config */
-       int last_channel;
-       int last_range;
+       unsigned int last_ctreg;
 };
 
 static int adq12b_ai_eoc(struct comedi_device *dev,
@@ -128,50 +125,45 @@ static int adq12b_ai_eoc(struct comedi_device *dev,
        unsigned char status;
 
        status = inb(dev->iobase + ADQ12B_STINR);
-       if (status & ADQ12B_EOC)
+       if (status & ADQ12B_STINR_EOC)
                return 0;
        return -EBUSY;
 }
 
-static int adq12b_ai_rinsn(struct comedi_device *dev,
-                          struct comedi_subdevice *s, struct comedi_insn *insn,
-                          unsigned int *data)
+static int adq12b_ai_insn_read(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              struct comedi_insn *insn,
+                              unsigned int *data)
 {
        struct adq12b_private *devpriv = dev->private;
-       int n;
-       int range, channel;
-       unsigned char hi, lo, status;
+       unsigned int chan = CR_CHAN(insn->chanspec);
+       unsigned int range = CR_RANGE(insn->chanspec);
+       unsigned int val;
        int ret;
+       int i;
 
        /* change channel and range only if it is different from the previous */
-       range = CR_RANGE(insn->chanspec);
-       channel = CR_CHAN(insn->chanspec);
-       if (channel != devpriv->last_channel || range != devpriv->last_range) {
-               outb((range << 4) | channel, dev->iobase + ADQ12B_CTREG);
+       val = ADQ12B_CTREG_RANGE(range) | ADQ12B_CTREG_CHAN(chan);
+       if (val != devpriv->last_ctreg) {
+               outb(val, dev->iobase + ADQ12B_CTREG);
+               devpriv->last_ctreg = val;
                udelay(50);     /* wait for the mux to settle */
        }
 
-       /* trigger conversion */
-       status = inb(dev->iobase + ADQ12B_ADLOW);
-
-       /* convert n samples */
-       for (n = 0; n < insn->n; n++) {
+       val = inb(dev->iobase + ADQ12B_ADLOW);  /* trigger A/D */
 
-               /* wait for end of conversion */
+       for (i = 0; i < insn->n; i++) {
                ret = comedi_timeout(dev, s, insn, adq12b_ai_eoc, 0);
                if (ret)
                        return ret;
 
-               /* read data */
-               hi = inb(dev->iobase + ADQ12B_ADHIG);
-               lo = inb(dev->iobase + ADQ12B_ADLOW);
-
-               data[n] = (hi << 8) | lo;
+               val = inb(dev->iobase + ADQ12B_ADHIG) << 8;
+               val |= inb(dev->iobase + ADQ12B_ADLOW); /* retriggers A/D */
 
+               data[i] = val;
        }
 
-       /* return the number of samples read/written */
-       return n;
+       return insn->n;
 }
 
 static int adq12b_di_insn_bits(struct comedi_device *dev,
@@ -180,7 +172,7 @@ static int adq12b_di_insn_bits(struct comedi_device *dev,
 {
 
        /* only bits 0-4 have information about digital inputs */
-       data[1] = (inb(dev->iobase + ADQ12B_STINR) & (0x1f));
+       data[1] = (inb(dev->iobase + ADQ12B_STINR) & ADQ12B_STINR_IN_MASK);
 
        return insn->n;
 }
@@ -216,7 +208,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        struct comedi_subdevice *s;
        int ret;
 
-       ret = comedi_request_region(dev, it->options[0], ADQ12B_SIZE);
+       ret = comedi_request_region(dev, it->options[0], 0x10);
        if (ret)
                return ret;
 
@@ -224,58 +216,44 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        if (!devpriv)
                return -ENOMEM;
 
-       devpriv->unipolar = it->options[1];
-       devpriv->differential = it->options[2];
-       /*
-        * initialize channel and range to -1 so we make sure we
-        * always write at least once to the CTREG in the instruction
-        */
-       devpriv->last_channel = -1;
-       devpriv->last_range = -1;
+       devpriv->last_ctreg = -1;       /* force ctreg update */
 
        ret = comedi_alloc_subdevices(dev, 3);
        if (ret)
                return ret;
 
+       /* Analog Input subdevice */
        s = &dev->subdevices[0];
-       /* analog input subdevice */
-       s->type = COMEDI_SUBD_AI;
-       if (devpriv->differential) {
-               s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
-               s->n_chan = 8;
+       s->type         = COMEDI_SUBD_AI;
+       if (it->options[2]) {
+               s->subdev_flags = SDF_READABLE | SDF_DIFF;
+               s->n_chan       = 8;
        } else {
-               s->subdev_flags = SDF_READABLE | SDF_GROUND;
-               s->n_chan = 16;
+               s->subdev_flags = SDF_READABLE | SDF_GROUND;
+               s->n_chan       = 16;
        }
+       s->maxdata      = 0xfff;
+       s->range_table  = it->options[1] ? &range_adq12b_ai_unipolar
+                                        : &range_adq12b_ai_bipolar;
+       s->insn_read    = adq12b_ai_insn_read;
 
-       if (devpriv->unipolar)
-               s->range_table = &range_adq12b_ai_unipolar;
-       else
-               s->range_table = &range_adq12b_ai_bipolar;
-
-       s->maxdata = 0xfff;
-
-       s->len_chanlist = 4;    /* This is the maximum chanlist length that
-                                  the board can handle */
-       s->insn_read = adq12b_ai_rinsn;
-
+       /* Digital Input subdevice */
        s = &dev->subdevices[1];
-       /* digital input subdevice */
-       s->type = COMEDI_SUBD_DI;
-       s->subdev_flags = SDF_READABLE;
-       s->n_chan = 5;
-       s->maxdata = 1;
-       s->range_table = &range_digital;
-       s->insn_bits = adq12b_di_insn_bits;
-
+       s->type         = COMEDI_SUBD_DI;
+       s->subdev_flags = SDF_READABLE;
+       s->n_chan       = 5;
+       s->maxdata      = 1;
+       s->range_table  = &range_digital;
+       s->insn_bits    = adq12b_di_insn_bits;
+
+       /* Digital Output subdevice */
        s = &dev->subdevices[2];
-       /* digital output subdevice */
-       s->type = COMEDI_SUBD_DO;
-       s->subdev_flags = SDF_WRITABLE;
-       s->n_chan = 8;
-       s->maxdata = 1;
-       s->range_table = &range_digital;
-       s->insn_bits = adq12b_do_insn_bits;
+       s->type         = COMEDI_SUBD_DO;
+       s->subdev_flags = SDF_WRITABLE;
+       s->n_chan       = 8;
+       s->maxdata      = 1;
+       s->range_table  = &range_digital;
+       s->insn_bits    = adq12b_do_insn_bits;
 
        return 0;
 }
index ec039fbff0f9b1583e5013dc1d2dea443db0db27..c252ad22b1b403117a6b16843e86384a32a9e0c4 100644 (file)
@@ -477,7 +477,7 @@ static int das16m1_poll(struct comedi_device *dev, struct comedi_subdevice *s)
        das16m1_handler(dev, status);
        spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       return s->async->buf_write_count - s->async->buf_read_count;
+       return comedi_buf_n_bytes_ready(s);
 }
 
 static irqreturn_t das16m1_interrupt(int irq, void *d)
index 859519026c4c2f1cf621b4508ac8ba6eb4312efc..b2f8391d5de114232571f7a914fadf34c40f75d9 100644 (file)
@@ -696,7 +696,7 @@ static int das1800_ai_poll(struct comedi_device *dev,
        das1800_ai_handler(dev);
        spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       return s->async->buf_write_count - s->async->buf_read_count;
+       return comedi_buf_n_bytes_ready(s);
 }
 
 static irqreturn_t das1800_interrupt(int irq, void *d)
index c2a66dcf99feebc8221a34b235fcfbe17fe3f99f..27a8bb18bcd5156a33fda723412ec9bc0a6b1570 100644 (file)
@@ -1,55 +1,69 @@
 /*
  comedi/drivers/dt282x.c
  Hardware driver for Data Translation DT2821 series
-
  COMEDI - Linux Control and Measurement Device Interface
  Copyright (C) 1997-8 David A. Schleef <ds@schleef.org>
-
  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
-
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.
dt282x.c
* Comedi driver for Data Translation DT2821 series
+ *
* COMEDI - Linux Control and Measurement Device Interface
* Copyright (C) 1997-8 David A. Schleef <ds@schleef.org>
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
  */
+
 /*
-Driver: dt282x
-Description: Data Translation DT2821 series (including DT-EZ)
-Author: ds
-Devices: [Data Translation] DT2821 (dt2821),
-  DT2821-F-16SE (dt2821-f), DT2821-F-8DI (dt2821-f),
-  DT2821-G-16SE (dt2821-f), DT2821-G-8DI (dt2821-g),
-  DT2823 (dt2823),
-  DT2824-PGH (dt2824-pgh), DT2824-PGL (dt2824-pgl), DT2825 (dt2825),
-  DT2827 (dt2827), DT2828 (dt2828), DT21-EZ (dt21-ez), DT23-EZ (dt23-ez),
-  DT24-EZ (dt24-ez), DT24-EZ-PGL (dt24-ez-pgl)
-Status: complete
-Updated: Wed, 22 Aug 2001 17:11:34 -0700
-
-Configuration options:
-  [0] - I/O port base address
-  [1] - IRQ
-  [2] - DMA 1
-  [3] - DMA 2
-  [4] - AI jumpered for 0=single ended, 1=differential
-  [5] - AI jumpered for 0=straight binary, 1=2's complement
-  [6] - AO 0 jumpered for 0=straight binary, 1=2's complement
-  [7] - AO 1 jumpered for 0=straight binary, 1=2's complement
-  [8] - AI jumpered for 0=[-10,10]V, 1=[0,10], 2=[-5,5], 3=[0,5]
-  [9] - AO 0 jumpered for 0=[-10,10]V, 1=[0,10], 2=[-5,5], 3=[0,5],
-       4=[-2.5,2.5]
-  [10]- A0 1 jumpered for 0=[-10,10]V, 1=[0,10], 2=[-5,5], 3=[0,5],
-       4=[-2.5,2.5]
-
-Notes:
-  - AO commands might be broken.
-  - If you try to run a command on both the AI and AO subdevices
-    simultaneously, bad things will happen.  The driver needs to
-    be fixed to check for this situation and return an error.
-*/
+ * Driver: dt282x
+ * Description: Data Translation DT2821 series (including DT-EZ)
+ * Author: ds
+ * Devices: (Data Translation) DT2821 [dt2821]
+ *         (Data Translation) DT2821-F-16SE [dt2821-f]
+ *         (Data Translation) DT2821-F-8DI [dt2821-f]
+ *         (Data Translation) DT2821-G-16SE [dt2821-g]
+ *         (Data Translation) DT2821-G-8DI [dt2821-g]
+ *         (Data Translation) DT2823 [dt2823]
+ *         (Data Translation) DT2824-PGH [dt2824-pgh]
+ *         (Data Translation) DT2824-PGL [dt2824-pgl]
+ *         (Data Translation) DT2825 [dt2825]
+ *         (Data Translation) DT2827 [dt2827]
+ *         (Data Translation) DT2828 [dt2828]
+ *         (Data Translation) DT2928 [dt2829]
+ *         (Data Translation) DT21-EZ [dt21-ez]
+ *         (Data Translation) DT23-EZ [dt23-ez]
+ *         (Data Translation) DT24-EZ [dt24-ez]
+ *         (Data Translation) DT24-EZ-PGL [dt24-ez-pgl]
+ * Status: complete
+ * Updated: Wed, 22 Aug 2001 17:11:34 -0700
+ *
+ * Configuration options:
+ *   [0] - I/O port base address
+ *   [1] - IRQ (optional, required for async command support)
+ *   [2] - DMA 1 (optional, required for async command support)
+ *   [3] - DMA 2 (optional, required for async command support)
+ *   [4] - AI jumpered for 0=single ended, 1=differential
+ *   [5] - AI jumpered for 0=straight binary, 1=2's complement
+ *   [6] - AO 0 data format (deprecated, see below)
+ *   [7] - AO 1 data format (deprecated, see below)
+ *   [8] - AI jumpered for 0=[-10,10]V, 1=[0,10], 2=[-5,5], 3=[0,5]
+ *   [9] - AO channel 0 range (deprecated, see below)
+ *   [10]- AO channel 1 range (deprecated, see below)
+ *
+ * Notes:
+ *   - AO commands might be broken.
+ *   - If you try to run a command on both the AI and AO subdevices
+ *     simultaneously, bad things will happen.  The driver needs to
+ *     be fixed to check for this situation and return an error.
+ *   - AO range is not programmable. The AO subdevice has a range_table
+ *     containing all the possible analog output ranges. Use the range
+ *     that matches your board configuration to convert between data
+ *     values and physical units. The format of the data written to the
+ *     board is handled automatically based on the unipolar/bipolar
+ *     range that is selected.
+ */
 
 #include <linux/module.h>
 #include "../comedidev.h"
@@ -63,93 +77,53 @@ Notes:
 
 #include "comedi_fc.h"
 
-#define DT2821_SIZE 0x10
-
-/*
- *    Registers in the DT282x
- */
-
-#define DT2821_ADCSR   0x00    /* A/D Control/Status             */
-#define DT2821_CHANCSR 0x02    /* Channel Control/Status */
-#define DT2821_ADDAT   0x04    /* A/D data                       */
-#define DT2821_DACSR   0x06    /* D/A Control/Status             */
-#define DT2821_DADAT   0x08    /* D/A data                       */
-#define DT2821_DIODAT  0x0a    /* digital data                   */
-#define DT2821_SUPCSR  0x0c    /* Supervisor Control/Status      */
-#define DT2821_TMRCTR  0x0e    /* Timer/Counter          */
-
-/*
- *  At power up, some registers are in a well-known state.  The
- *  masks and values are as follows:
- */
-
-#define DT2821_ADCSR_MASK 0xfff0
-#define DT2821_ADCSR_VAL 0x7c00
-
-#define DT2821_CHANCSR_MASK 0xf0f0
-#define DT2821_CHANCSR_VAL 0x70f0
-
-#define DT2821_DACSR_MASK 0x7c93
-#define DT2821_DACSR_VAL 0x7c90
-
-#define DT2821_SUPCSR_MASK 0xf8ff
-#define DT2821_SUPCSR_VAL 0x0000
-
-#define DT2821_TMRCTR_MASK 0xff00
-#define DT2821_TMRCTR_VAL 0xf000
-
 /*
- *    Bit fields of each register
+ * Register map
  */
-
-/* ADCSR */
-
-#define DT2821_ADERR   0x8000  /* (R)   1 for A/D error  */
-#define DT2821_ADCLK   0x0200  /* (R/W) A/D clock enable */
-               /*      0x7c00           read as 1's            */
-#define DT2821_MUXBUSY 0x0100  /* (R)   multiplexer busy */
-#define DT2821_ADDONE  0x0080  /* (R)   A/D done         */
-#define DT2821_IADDONE 0x0040  /* (R/W) interrupt on A/D done    */
-               /*      0x0030           gain select            */
-               /*      0x000f           channel select         */
-
-/* CHANCSR */
-
-#define DT2821_LLE     0x8000  /* (R/W) Load List Enable */
-               /*      0x7000           read as 1's            */
-               /*      0x0f00     (R)   present address        */
-               /*      0x00f0           read as 1's            */
-               /*      0x000f     (R)   number of entries - 1  */
-
-/* DACSR */
-
-#define DT2821_DAERR   0x8000  /* (R)   D/A error                */
-#define DT2821_YSEL    0x0200  /* (R/W) DAC 1 select             */
-#define DT2821_SSEL    0x0100  /* (R/W) single channel select    */
-#define DT2821_DACRDY  0x0080  /* (R)   DAC ready                */
-#define DT2821_IDARDY  0x0040  /* (R/W) interrupt on DAC ready   */
-#define DT2821_DACLK   0x0020  /* (R/W) D/A clock enable */
-#define DT2821_HBOE    0x0002  /* (R/W) DIO high byte output enable      */
-#define DT2821_LBOE    0x0001  /* (R/W) DIO low byte output enable       */
-
-/* SUPCSR */
-
-#define DT2821_DMAD    0x8000  /* (R)   DMA done                 */
-#define DT2821_ERRINTEN        0x4000  /* (R/W) interrupt on error               */
-#define DT2821_CLRDMADNE 0x2000        /* (W)   clear DMA done                   */
-#define DT2821_DDMA    0x1000  /* (R/W) dual DMA                 */
-#define DT2821_DS1     0x0800  /* (R/W) DMA select 1                     */
-#define DT2821_DS0     0x0400  /* (R/W) DMA select 0                     */
-#define DT2821_BUFFB   0x0200  /* (R/W) buffer B selected                */
-#define DT2821_SCDN    0x0100  /* (R)   scan done                        */
-#define DT2821_DACON   0x0080  /* (W)   DAC single conversion            */
-#define DT2821_ADCINIT 0x0040  /* (W)   A/D initialize                   */
-#define DT2821_DACINIT 0x0020  /* (W)   D/A initialize                   */
-#define DT2821_PRLD    0x0010  /* (W)   preload multiplexer              */
-#define DT2821_STRIG   0x0008  /* (W)   software trigger         */
-#define DT2821_XTRIG   0x0004  /* (R/W) external trigger enable  */
-#define DT2821_XCLK    0x0002  /* (R/W) external clock enable            */
-#define DT2821_BDINIT  0x0001  /* (W)   initialize board         */
+#define DT2821_ADCSR_REG               0x00
+#define DT2821_ADCSR_ADERR             (1 << 15)
+#define DT2821_ADCSR_ADCLK             (1 << 9)
+#define DT2821_ADCSR_MUXBUSY           (1 << 8)
+#define DT2821_ADCSR_ADDONE            (1 << 7)
+#define DT2821_ADCSR_IADDONE           (1 << 6)
+#define DT2821_ADCSR_GS(x)             (((x) & 0x3) << 4)
+#define DT2821_ADCSR_CHAN(x)           (((x) & 0xf) << 0)
+#define DT2821_CHANCSR_REG             0x02
+#define DT2821_CHANCSR_LLE             (1 << 15)
+#define DT2821_CHANCSR_PRESLA(x)       (((x) & 0xf) >> 8)
+#define DT2821_CHANCSR_NUMB(x)         ((((x) - 1) & 0xf) << 0)
+#define DT2821_ADDAT_REG               0x04
+#define DT2821_DACSR_REG               0x06
+#define DT2821_DACSR_DAERR             (1 << 15)
+#define DT2821_DACSR_YSEL(x)           ((x) << 9)
+#define DT2821_DACSR_SSEL              (1 << 8)
+#define DT2821_DACSR_DACRDY            (1 << 7)
+#define DT2821_DACSR_IDARDY            (1 << 6)
+#define DT2821_DACSR_DACLK             (1 << 5)
+#define DT2821_DACSR_HBOE              (1 << 1)
+#define DT2821_DACSR_LBOE              (1 << 0)
+#define DT2821_DADAT_REG               0x08
+#define DT2821_DIODAT_REG              0x0a
+#define DT2821_SUPCSR_REG              0x0c
+#define DT2821_SUPCSR_DMAD             (1 << 15)
+#define DT2821_SUPCSR_ERRINTEN         (1 << 14)
+#define DT2821_SUPCSR_CLRDMADNE                (1 << 13)
+#define DT2821_SUPCSR_DDMA             (1 << 12)
+#define DT2821_SUPCSR_DS_PIO           (0 << 10)
+#define DT2821_SUPCSR_DS_AD_CLK                (1 << 10)
+#define DT2821_SUPCSR_DS_DA_CLK                (2 << 10)
+#define DT2821_SUPCSR_DS_AD_TRIG       (3 << 10)
+#define DT2821_SUPCSR_BUFFB            (1 << 9)
+#define DT2821_SUPCSR_SCDN             (1 << 8)
+#define DT2821_SUPCSR_DACON            (1 << 7)
+#define DT2821_SUPCSR_ADCINIT          (1 << 6)
+#define DT2821_SUPCSR_DACINIT          (1 << 5)
+#define DT2821_SUPCSR_PRLD             (1 << 4)
+#define DT2821_SUPCSR_STRIG            (1 << 3)
+#define DT2821_SUPCSR_XTRIG            (1 << 2)
+#define DT2821_SUPCSR_XCLK             (1 << 1)
+#define DT2821_SUPCSR_BDINIT           (1 << 0)
+#define DT2821_TMRCTR_REG              0x0e
 
 static const struct comedi_lrange range_dt282x_ai_lo_bipolar = {
        4, {
@@ -205,146 +179,325 @@ static const struct comedi_lrange range_dt282x_ai_hi_unipolar = {
        }
 };
 
+/*
+ * The Analog Output range is set per-channel using jumpers on the board.
+ * All of these ranges may not be available on some DT2821 series boards.
+ * The default jumper setting has both channels set for +/-10V output.
+ */
+static const struct comedi_lrange dt282x_ao_range = {
+       5, {
+               BIP_RANGE(10),
+               BIP_RANGE(5),
+               BIP_RANGE(2.5),
+               UNI_RANGE(10),
+               UNI_RANGE(5),
+       }
+};
+
 struct dt282x_board {
        const char *name;
-       int adbits;
+       unsigned int ai_maxdata;
        int adchan_se;
        int adchan_di;
        int ai_speed;
        int ispgl;
        int dachan;
-       int dabits;
+       unsigned int ao_maxdata;
+};
+
+static const struct dt282x_board boardtypes[] = {
+       {
+               .name           = "dt2821",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 20000,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt2821-f",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 6500,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt2821-g",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 4000,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt2823",
+               .ai_maxdata     = 0xffff,
+               .adchan_di      = 4,
+               .ai_speed       = 10000,
+               .dachan         = 2,
+               .ao_maxdata     = 0xffff,
+       }, {
+               .name           = "dt2824-pgh",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 20000,
+       }, {
+               .name           = "dt2824-pgl",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 20000,
+               .ispgl          = 1,
+       }, {
+               .name           = "dt2825",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 20000,
+               .ispgl          = 1,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt2827",
+               .ai_maxdata     = 0xffff,
+               .adchan_di      = 4,
+               .ai_speed       = 10000,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt2828",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 4,
+               .ai_speed       = 10000,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt2829",
+               .ai_maxdata     = 0xffff,
+               .adchan_se      = 8,
+               .ai_speed       = 33250,
+               .dachan         = 2,
+               .ao_maxdata     = 0xffff,
+       }, {
+               .name           = "dt21-ez",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 10000,
+               .dachan         = 2,
+               .ao_maxdata     = 0x0fff,
+       }, {
+               .name           = "dt23-ez",
+               .ai_maxdata     = 0xffff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 10000,
+       }, {
+               .name           = "dt24-ez",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 10000,
+       }, {
+               .name           = "dt24-ez-pgl",
+               .ai_maxdata     = 0x0fff,
+               .adchan_se      = 16,
+               .adchan_di      = 8,
+               .ai_speed       = 10000,
+               .ispgl          = 1,
+       },
 };
 
 struct dt282x_private {
-       int ad_2scomp;          /* we have 2's comp jumper set  */
-       int da0_2scomp;         /* same, for DAC0               */
-       int da1_2scomp;         /* same, for DAC1               */
+       unsigned int ad_2scomp:1;
 
-       const struct comedi_lrange *darangelist[2];
+       unsigned int divisor;
 
-       unsigned short ao[2];
+       unsigned short ao_readback[2];
 
-       volatile int dacsr;     /* software copies of registers */
-       volatile int adcsr;
-       volatile int supcsr;
+       int dacsr;      /* software copies of registers */
+       int adcsr;
+       int supcsr;
 
-       volatile int ntrig;
-       volatile int nread;
+       int ntrig;
+       int nread;
 
        struct {
                int chan;
                unsigned short *buf;    /* DMA buffer */
-               volatile int size;      /* size of current transfer */
+               int size;       /* size of current transfer */
        } dma[2];
        int dma_maxsize;        /* max size of DMA transfer (in bytes) */
-       int usedma;             /* driver uses DMA              */
-       volatile int current_dma_index;
+       int current_dma_index;
        int dma_dir;
 };
 
-/*
- *    Some useless abstractions
- */
-#define chan_to_DAC(a) ((a)&1)
+static int dt282x_prep_ai_dma(struct comedi_device *dev, int dma_index, int n)
+{
+       struct dt282x_private *devpriv = dev->private;
+       int dma_chan;
+       unsigned long dma_ptr;
+       unsigned long flags;
 
-static int prep_ai_dma(struct comedi_device *dev, int chan, int size);
-static int prep_ao_dma(struct comedi_device *dev, int chan, int size);
-static int dt282x_ai_cancel(struct comedi_device *dev,
-                           struct comedi_subdevice *s);
-static int dt282x_ao_cancel(struct comedi_device *dev,
-                           struct comedi_subdevice *s);
-static int dt282x_ns_to_timer(int *nanosec, int round_mode);
-static void dt282x_disable_dma(struct comedi_device *dev);
+       if (!devpriv->ntrig)
+               return 0;
 
-static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2);
+       if (n == 0)
+               n = devpriv->dma_maxsize;
+       if (n > devpriv->ntrig * 2)
+               n = devpriv->ntrig * 2;
+       devpriv->ntrig -= n / 2;
 
-static void dt282x_munge(struct comedi_device *dev, unsigned short *buf,
-                        unsigned int nbytes)
+       devpriv->dma[dma_index].size = n;
+       dma_chan = devpriv->dma[dma_index].chan;
+       dma_ptr = virt_to_bus(devpriv->dma[dma_index].buf);
+
+       set_dma_mode(dma_chan, DMA_MODE_READ);
+       flags = claim_dma_lock();
+       clear_dma_ff(dma_chan);
+       set_dma_addr(dma_chan, dma_ptr);
+       set_dma_count(dma_chan, n);
+       release_dma_lock(flags);
+
+       enable_dma(dma_chan);
+
+       return n;
+}
+
+static int dt282x_prep_ao_dma(struct comedi_device *dev, int dma_index, int n)
 {
-       const struct dt282x_board *board = comedi_board(dev);
        struct dt282x_private *devpriv = dev->private;
-       unsigned int i;
-       unsigned short mask = (1 << board->adbits) - 1;
-       unsigned short sign = 1 << (board->adbits - 1);
-       int n;
+       int dma_chan;
+       unsigned long dma_ptr;
+       unsigned long flags;
 
-       if (devpriv->ad_2scomp)
-               sign = 1 << (board->adbits - 1);
-       else
-               sign = 0;
+       devpriv->dma[dma_index].size = n;
+       dma_chan = devpriv->dma[dma_index].chan;
+       dma_ptr = virt_to_bus(devpriv->dma[dma_index].buf);
 
-       if (nbytes % 2)
-               comedi_error(dev, "bug! odd number of bytes from dma xfer");
-       n = nbytes / 2;
-       for (i = 0; i < n; i++)
-               buf[i] = (buf[i] & mask) ^ sign;
+       set_dma_mode(dma_chan, DMA_MODE_WRITE);
+       flags = claim_dma_lock();
+       clear_dma_ff(dma_chan);
+       set_dma_addr(dma_chan, dma_ptr);
+       set_dma_count(dma_chan, n);
+       release_dma_lock(flags);
+
+       enable_dma(dma_chan);
+
+       return n;
 }
 
-static void dt282x_ao_dma_interrupt(struct comedi_device *dev)
+static void dt282x_disable_dma(struct comedi_device *dev)
 {
        struct dt282x_private *devpriv = dev->private;
-       struct comedi_subdevice *s = dev->write_subdev;
-       void *ptr;
-       int size;
+
+       disable_dma(devpriv->dma[0].chan);
+       disable_dma(devpriv->dma[1].chan);
+}
+
+static unsigned int dt282x_ns_to_timer(unsigned int *ns, unsigned int flags)
+{
+       unsigned int prescale, base, divider;
+
+       for (prescale = 0; prescale < 16; prescale++) {
+               if (prescale == 1)
+                       continue;
+               base = 250 * (1 << prescale);
+               switch (flags & TRIG_ROUND_MASK) {
+               case TRIG_ROUND_NEAREST:
+               default:
+                       divider = (*ns + base / 2) / base;
+                       break;
+               case TRIG_ROUND_DOWN:
+                       divider = (*ns) / base;
+                       break;
+               case TRIG_ROUND_UP:
+                       divider = (*ns + base - 1) / base;
+                       break;
+               }
+               if (divider < 256) {
+                       *ns = divider * base;
+                       return (prescale << 8) | (255 - divider);
+               }
+       }
+       base = 250 * (1 << 15);
+       divider = 255;
+       *ns = divider * base;
+       return (15 << 8) | (255 - divider);
+}
+
+static void dt282x_munge(struct comedi_device *dev,
+                        struct comedi_subdevice *s,
+                        unsigned short *buf,
+                        unsigned int nbytes)
+{
+       struct dt282x_private *devpriv = dev->private;
+       unsigned int val;
        int i;
 
-       outw(devpriv->supcsr | DT2821_CLRDMADNE, dev->iobase + DT2821_SUPCSR);
+       if (nbytes % 2)
+               comedi_error(dev, "bug! odd number of bytes from dma xfer");
 
-       if (!s->async->prealloc_buf) {
-               dev_err(dev->class_dev, "no buffer in %s\n", __func__);
-               return;
+       for (i = 0; i < nbytes / 2; i++) {
+               val = buf[i];
+               val &= s->maxdata;
+               if (devpriv->ad_2scomp)
+                       val = comedi_offset_munge(s, val);
+
+               buf[i] = val;
        }
+}
 
-       i = devpriv->current_dma_index;
-       ptr = devpriv->dma[i].buf;
+static void dt282x_ao_dma_interrupt(struct comedi_device *dev,
+                                   struct comedi_subdevice *s)
+{
+       struct dt282x_private *devpriv = dev->private;
+       int cur_dma = devpriv->current_dma_index;
+       void *ptr = devpriv->dma[cur_dma].buf;
+       int size;
 
-       disable_dma(devpriv->dma[i].chan);
+       outw(devpriv->supcsr | DT2821_SUPCSR_CLRDMADNE,
+            dev->iobase + DT2821_SUPCSR_REG);
 
-       devpriv->current_dma_index = 1 - i;
+       disable_dma(devpriv->dma[cur_dma].chan);
+
+       devpriv->current_dma_index = 1 - cur_dma;
 
        size = cfc_read_array_from_buffer(s, ptr, devpriv->dma_maxsize);
        if (size == 0) {
                dev_err(dev->class_dev, "AO underrun\n");
                s->async->events |= COMEDI_CB_OVERFLOW;
-               return;
+       } else {
+               dt282x_prep_ao_dma(dev, cur_dma, size);
        }
-       prep_ao_dma(dev, i, size);
-       return;
 }
 
-static void dt282x_ai_dma_interrupt(struct comedi_device *dev)
+static void dt282x_ai_dma_interrupt(struct comedi_device *dev,
+                                   struct comedi_subdevice *s)
 {
        struct dt282x_private *devpriv = dev->private;
-       struct comedi_subdevice *s = dev->read_subdev;
-       void *ptr;
-       int size;
-       int i;
+       int cur_dma = devpriv->current_dma_index;
+       void *ptr = devpriv->dma[cur_dma].buf;
+       int size = devpriv->dma[cur_dma].size;
        int ret;
 
-       outw(devpriv->supcsr | DT2821_CLRDMADNE, dev->iobase + DT2821_SUPCSR);
-
-       if (!s->async->prealloc_buf) {
-               dev_err(dev->class_dev, "no buffer in %s\n", __func__);
-               return;
-       }
-
-       i = devpriv->current_dma_index;
-       ptr = devpriv->dma[i].buf;
-       size = devpriv->dma[i].size;
+       outw(devpriv->supcsr | DT2821_SUPCSR_CLRDMADNE,
+            dev->iobase + DT2821_SUPCSR_REG);
 
-       disable_dma(devpriv->dma[i].chan);
+       disable_dma(devpriv->dma[cur_dma].chan);
 
-       devpriv->current_dma_index = 1 - i;
+       devpriv->current_dma_index = 1 - cur_dma;
 
-       dt282x_munge(dev, ptr, size);
+       dt282x_munge(dev, s, ptr, size);
        ret = cfc_write_array_to_buffer(s, ptr, size);
        if (ret != size) {
                s->async->events |= COMEDI_CB_OVERFLOW;
                return;
        }
-       devpriv->nread -= size / 2;
 
+       devpriv->nread -= size / 2;
        if (devpriv->nread < 0) {
                dev_info(dev->class_dev, "nread off by one\n");
                devpriv->nread = 0;
@@ -357,67 +510,12 @@ static void dt282x_ai_dma_interrupt(struct comedi_device *dev)
        /* clear the dual dma flag, making this the last dma segment */
        /* XXX probably wrong */
        if (!devpriv->ntrig) {
-               devpriv->supcsr &= ~(DT2821_DDMA);
-               outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR);
+               devpriv->supcsr &= ~DT2821_SUPCSR_DDMA;
+               outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR_REG);
        }
 #endif
        /* restart the channel */
-       prep_ai_dma(dev, i, 0);
-}
-
-static int prep_ai_dma(struct comedi_device *dev, int dma_index, int n)
-{
-       struct dt282x_private *devpriv = dev->private;
-       int dma_chan;
-       unsigned long dma_ptr;
-       unsigned long flags;
-
-       if (!devpriv->ntrig)
-               return 0;
-
-       if (n == 0)
-               n = devpriv->dma_maxsize;
-       if (n > devpriv->ntrig * 2)
-               n = devpriv->ntrig * 2;
-       devpriv->ntrig -= n / 2;
-
-       devpriv->dma[dma_index].size = n;
-       dma_chan = devpriv->dma[dma_index].chan;
-       dma_ptr = virt_to_bus(devpriv->dma[dma_index].buf);
-
-       set_dma_mode(dma_chan, DMA_MODE_READ);
-       flags = claim_dma_lock();
-       clear_dma_ff(dma_chan);
-       set_dma_addr(dma_chan, dma_ptr);
-       set_dma_count(dma_chan, n);
-       release_dma_lock(flags);
-
-       enable_dma(dma_chan);
-
-       return n;
-}
-
-static int prep_ao_dma(struct comedi_device *dev, int dma_index, int n)
-{
-       struct dt282x_private *devpriv = dev->private;
-       int dma_chan;
-       unsigned long dma_ptr;
-       unsigned long flags;
-
-       devpriv->dma[dma_index].size = n;
-       dma_chan = devpriv->dma[dma_index].chan;
-       dma_ptr = virt_to_bus(devpriv->dma[dma_index].buf);
-
-       set_dma_mode(dma_chan, DMA_MODE_WRITE);
-       flags = claim_dma_lock();
-       clear_dma_ff(dma_chan);
-       set_dma_addr(dma_chan, dma_ptr);
-       set_dma_count(dma_chan, n);
-       release_dma_lock(flags);
-
-       enable_dma(dma_chan);
-
-       return n;
+       dt282x_prep_ai_dma(dev, cur_dma, 0);
 }
 
 static irqreturn_t dt282x_interrupt(int irq, void *d)
@@ -434,38 +532,38 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
                return IRQ_HANDLED;
        }
 
-       adcsr = inw(dev->iobase + DT2821_ADCSR);
-       dacsr = inw(dev->iobase + DT2821_DACSR);
-       supcsr = inw(dev->iobase + DT2821_SUPCSR);
-       if (supcsr & DT2821_DMAD) {
+       adcsr = inw(dev->iobase + DT2821_ADCSR_REG);
+       dacsr = inw(dev->iobase + DT2821_DACSR_REG);
+       supcsr = inw(dev->iobase + DT2821_SUPCSR_REG);
+       if (supcsr & DT2821_SUPCSR_DMAD) {
                if (devpriv->dma_dir == DMA_MODE_READ)
-                       dt282x_ai_dma_interrupt(dev);
+                       dt282x_ai_dma_interrupt(dev, s);
                else
-                       dt282x_ao_dma_interrupt(dev);
+                       dt282x_ao_dma_interrupt(dev, s_ao);
                handled = 1;
        }
-       if (adcsr & DT2821_ADERR) {
+       if (adcsr & DT2821_ADCSR_ADERR) {
                if (devpriv->nread != 0) {
                        comedi_error(dev, "A/D error");
                        s->async->events |= COMEDI_CB_ERROR;
                }
                handled = 1;
        }
-       if (dacsr & DT2821_DAERR) {
+       if (dacsr & DT2821_DACSR_DAERR) {
                comedi_error(dev, "D/A error");
                s_ao->async->events |= COMEDI_CB_ERROR;
                handled = 1;
        }
 #if 0
-       if (adcsr & DT2821_ADDONE) {
+       if (adcsr & DT2821_ADCSR_ADDONE) {
                int ret;
                unsigned short data;
 
-               data = inw(dev->iobase + DT2821_ADDAT);
-               data &= (1 << board->adbits) - 1;
-
+               data = inw(dev->iobase + DT2821_ADDAT_REG);
+               data &= s->maxdata;
                if (devpriv->ad_2scomp)
-                       data ^= 1 << (board->adbits - 1);
+                       data = comedi_offset_munge(s, data);
+
                ret = comedi_buf_put(s, data);
 
                if (ret == 0)
@@ -475,9 +573,9 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
                if (!devpriv->nread) {
                        s->async->events |= COMEDI_CB_EOA;
                } else {
-                       if (supcsr & DT2821_SCDN)
-                               outw(devpriv->supcsr | DT2821_STRIG,
-                                       dev->iobase + DT2821_SUPCSR);
+                       if (supcsr & DT2821_SUPCSR_SCDN)
+                               outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
+                                    dev->iobase + DT2821_SUPCSR_REG);
                }
                handled = 1;
        }
@@ -492,17 +590,20 @@ static void dt282x_load_changain(struct comedi_device *dev, int n,
                                 unsigned int *chanlist)
 {
        struct dt282x_private *devpriv = dev->private;
-       unsigned int i;
-       unsigned int chan, range;
+       int i;
 
-       outw(DT2821_LLE | (n - 1), dev->iobase + DT2821_CHANCSR);
+       outw(DT2821_CHANCSR_LLE | DT2821_CHANCSR_NUMB(n),
+            dev->iobase + DT2821_CHANCSR_REG);
        for (i = 0; i < n; i++) {
-               chan = CR_CHAN(chanlist[i]);
-               range = CR_RANGE(chanlist[i]);
-               outw(devpriv->adcsr | (range << 4) | chan,
-                       dev->iobase + DT2821_ADCSR);
+               unsigned int chan = CR_CHAN(chanlist[i]);
+               unsigned int range = CR_RANGE(chanlist[i]);
+
+               outw(devpriv->adcsr |
+                    DT2821_ADCSR_GS(range) |
+                    DT2821_ADCSR_CHAN(chan),
+                    dev->iobase + DT2821_ADCSR_REG);
        }
-       outw(n - 1, dev->iobase + DT2821_CHANCSR);
+       outw(DT2821_CHANCSR_NUMB(n), dev->iobase + DT2821_CHANCSR_REG);
 }
 
 static int dt282x_ai_timeout(struct comedi_device *dev,
@@ -512,14 +613,14 @@ static int dt282x_ai_timeout(struct comedi_device *dev,
 {
        unsigned int status;
 
-       status = inw(dev->iobase + DT2821_ADCSR);
+       status = inw(dev->iobase + DT2821_ADCSR_REG);
        switch (context) {
-       case DT2821_MUXBUSY:
-               if ((status & DT2821_MUXBUSY) == 0)
+       case DT2821_ADCSR_MUXBUSY:
+               if ((status & DT2821_ADCSR_MUXBUSY) == 0)
                        return 0;
                break;
-       case DT2821_ADDONE:
-               if (status & DT2821_ADDONE)
+       case DT2821_ADCSR_ADDONE:
+               if (status & DT2821_ADCSR_ADDONE)
                        return 0;
                break;
        default:
@@ -536,47 +637,53 @@ static int dt282x_ai_timeout(struct comedi_device *dev,
  */
 static int dt282x_ai_insn_read(struct comedi_device *dev,
                               struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data)
+                              struct comedi_insn *insn,
+                              unsigned int *data)
 {
-       const struct dt282x_board *board = comedi_board(dev);
        struct dt282x_private *devpriv = dev->private;
+       unsigned int val;
        int ret;
        int i;
 
        /* XXX should we really be enabling the ad clock here? */
-       devpriv->adcsr = DT2821_ADCLK;
-       outw(devpriv->adcsr, dev->iobase + DT2821_ADCSR);
+       devpriv->adcsr = DT2821_ADCSR_ADCLK;
+       outw(devpriv->adcsr, dev->iobase + DT2821_ADCSR_REG);
 
        dt282x_load_changain(dev, 1, &insn->chanspec);
 
-       outw(devpriv->supcsr | DT2821_PRLD, dev->iobase + DT2821_SUPCSR);
-       ret = comedi_timeout(dev, s, insn, dt282x_ai_timeout, DT2821_MUXBUSY);
+       outw(devpriv->supcsr | DT2821_SUPCSR_PRLD,
+            dev->iobase + DT2821_SUPCSR_REG);
+       ret = comedi_timeout(dev, s, insn,
+                            dt282x_ai_timeout, DT2821_ADCSR_MUXBUSY);
        if (ret)
                return ret;
 
        for (i = 0; i < insn->n; i++) {
-               outw(devpriv->supcsr | DT2821_STRIG,
-                       dev->iobase + DT2821_SUPCSR);
+               outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
+                    dev->iobase + DT2821_SUPCSR_REG);
 
-               ret = comedi_timeout(dev, s, insn, dt282x_ai_timeout,
-                                    DT2821_ADDONE);
+               ret = comedi_timeout(dev, s, insn,
+                                    dt282x_ai_timeout, DT2821_ADCSR_ADDONE);
                if (ret)
                        return ret;
 
-               data[i] =
-                   inw(dev->iobase +
-                       DT2821_ADDAT) & ((1 << board->adbits) - 1);
+               val = inw(dev->iobase + DT2821_ADDAT_REG);
+               val &= s->maxdata;
                if (devpriv->ad_2scomp)
-                       data[i] ^= (1 << (board->adbits - 1));
+                       val = comedi_offset_munge(s, val);
+
+               data[i] = val;
        }
 
        return i;
 }
 
 static int dt282x_ai_cmdtest(struct comedi_device *dev,
-                            struct comedi_subdevice *s, struct comedi_cmd *cmd)
+                            struct comedi_subdevice *s,
+                            struct comedi_cmd *cmd)
 {
        const struct dt282x_board *board = comedi_board(dev);
+       struct dt282x_private *devpriv = dev->private;
        int err = 0;
        unsigned int arg;
 
@@ -634,7 +741,7 @@ static int dt282x_ai_cmdtest(struct comedi_device *dev,
        /* step 4: fix up any arguments */
 
        arg = cmd->convert_arg;
-       dt282x_ns_to_timer(&arg, cmd->flags & TRIG_ROUND_MASK);
+       devpriv->divisor = dt282x_ns_to_timer(&arg, cmd->flags);
        err |= cfc_check_trigger_arg_is(&cmd->convert_arg, arg);
 
        if (err)
@@ -645,81 +752,62 @@ static int dt282x_ai_cmdtest(struct comedi_device *dev,
 
 static int dt282x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       const struct dt282x_board *board = comedi_board(dev);
        struct dt282x_private *devpriv = dev->private;
        struct comedi_cmd *cmd = &s->async->cmd;
-       int timer;
        int ret;
 
-       if (devpriv->usedma == 0) {
-               comedi_error(dev,
-                            "driver requires 2 dma channels"
-                                               " to execute command");
-               return -EIO;
-       }
-
        dt282x_disable_dma(dev);
 
-       if (cmd->convert_arg < board->ai_speed)
-               cmd->convert_arg = board->ai_speed;
-       timer = dt282x_ns_to_timer(&cmd->convert_arg, TRIG_ROUND_NEAREST);
-       outw(timer, dev->iobase + DT2821_TMRCTR);
+       outw(devpriv->divisor, dev->iobase + DT2821_TMRCTR_REG);
 
-       if (cmd->scan_begin_src == TRIG_FOLLOW) {
-               /* internal trigger */
-               devpriv->supcsr = DT2821_ERRINTEN | DT2821_DS0;
-       } else {
-               /* external trigger */
-               devpriv->supcsr = DT2821_ERRINTEN | DT2821_DS0 | DT2821_DS1;
-       }
-       outw(devpriv->supcsr | DT2821_CLRDMADNE | DT2821_BUFFB | DT2821_ADCINIT,
-               dev->iobase + DT2821_SUPCSR);
+       devpriv->supcsr = DT2821_SUPCSR_ERRINTEN;
+       if (cmd->scan_begin_src == TRIG_FOLLOW)
+               devpriv->supcsr = DT2821_SUPCSR_DS_AD_CLK;
+       else
+               devpriv->supcsr = DT2821_SUPCSR_DS_AD_TRIG;
+       outw(devpriv->supcsr |
+            DT2821_SUPCSR_CLRDMADNE |
+            DT2821_SUPCSR_BUFFB |
+            DT2821_SUPCSR_ADCINIT,
+            dev->iobase + DT2821_SUPCSR_REG);
 
        devpriv->ntrig = cmd->stop_arg * cmd->scan_end_arg;
        devpriv->nread = devpriv->ntrig;
 
        devpriv->dma_dir = DMA_MODE_READ;
        devpriv->current_dma_index = 0;
-       prep_ai_dma(dev, 0, 0);
+       dt282x_prep_ai_dma(dev, 0, 0);
        if (devpriv->ntrig) {
-               prep_ai_dma(dev, 1, 0);
-               devpriv->supcsr |= DT2821_DDMA;
-               outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR);
+               dt282x_prep_ai_dma(dev, 1, 0);
+               devpriv->supcsr |= DT2821_SUPCSR_DDMA;
+               outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR_REG);
        }
 
        devpriv->adcsr = 0;
 
        dt282x_load_changain(dev, cmd->chanlist_len, cmd->chanlist);
 
-       devpriv->adcsr = DT2821_ADCLK | DT2821_IADDONE;
-       outw(devpriv->adcsr, dev->iobase + DT2821_ADCSR);
+       devpriv->adcsr = DT2821_ADCSR_ADCLK | DT2821_ADCSR_IADDONE;
+       outw(devpriv->adcsr, dev->iobase + DT2821_ADCSR_REG);
 
-       outw(devpriv->supcsr | DT2821_PRLD, dev->iobase + DT2821_SUPCSR);
-       ret = comedi_timeout(dev, s, NULL, dt282x_ai_timeout, DT2821_MUXBUSY);
+       outw(devpriv->supcsr | DT2821_SUPCSR_PRLD,
+            dev->iobase + DT2821_SUPCSR_REG);
+       ret = comedi_timeout(dev, s, NULL,
+                            dt282x_ai_timeout, DT2821_ADCSR_MUXBUSY);
        if (ret)
                return ret;
 
        if (cmd->scan_begin_src == TRIG_FOLLOW) {
-               outw(devpriv->supcsr | DT2821_STRIG,
-                       dev->iobase + DT2821_SUPCSR);
+               outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
+                       dev->iobase + DT2821_SUPCSR_REG);
        } else {
-               devpriv->supcsr |= DT2821_XTRIG;
-               outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR);
+               devpriv->supcsr |= DT2821_SUPCSR_XTRIG;
+               outw(devpriv->supcsr, dev->iobase + DT2821_SUPCSR_REG);
        }
 
        return 0;
 }
 
-static void dt282x_disable_dma(struct comedi_device *dev)
-{
-       struct dt282x_private *devpriv = dev->private;
-
-       if (devpriv->usedma) {
-               disable_dma(devpriv->dma[0].chan);
-               disable_dma(devpriv->dma[1].chan);
-       }
-}
-
 static int dt282x_ai_cancel(struct comedi_device *dev,
                            struct comedi_subdevice *s)
 {
@@ -728,101 +816,66 @@ static int dt282x_ai_cancel(struct comedi_device *dev,
        dt282x_disable_dma(dev);
 
        devpriv->adcsr = 0;
-       outw(devpriv->adcsr, dev->iobase + DT2821_ADCSR);
+       outw(devpriv->adcsr, dev->iobase + DT2821_ADCSR_REG);
 
        devpriv->supcsr = 0;
-       outw(devpriv->supcsr | DT2821_ADCINIT, dev->iobase + DT2821_SUPCSR);
+       outw(devpriv->supcsr | DT2821_SUPCSR_ADCINIT,
+            dev->iobase + DT2821_SUPCSR_REG);
 
        return 0;
 }
 
-static int dt282x_ns_to_timer(int *nanosec, int round_mode)
-{
-       int prescale, base, divider;
-
-       for (prescale = 0; prescale < 16; prescale++) {
-               if (prescale == 1)
-                       continue;
-               base = 250 * (1 << prescale);
-               switch (round_mode) {
-               case TRIG_ROUND_NEAREST:
-               default:
-                       divider = (*nanosec + base / 2) / base;
-                       break;
-               case TRIG_ROUND_DOWN:
-                       divider = (*nanosec) / base;
-                       break;
-               case TRIG_ROUND_UP:
-                       divider = (*nanosec + base - 1) / base;
-                       break;
-               }
-               if (divider < 256) {
-                       *nanosec = divider * base;
-                       return (prescale << 8) | (255 - divider);
-               }
-       }
-       base = 250 * (1 << 15);
-       divider = 255;
-       *nanosec = divider * base;
-       return (15 << 8) | (255 - divider);
-}
-
-/*
- *    Analog output routine.  Selects single channel conversion,
- *      selects correct channel, converts from 2's compliment to
- *      offset binary if necessary, loads the data into the DAC
- *      data register, and performs the conversion.
- */
 static int dt282x_ao_insn_read(struct comedi_device *dev,
                               struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data)
+                              struct comedi_insn *insn,
+                              unsigned int *data)
 {
        struct dt282x_private *devpriv = dev->private;
+       unsigned int chan = CR_CHAN(insn->chanspec);
+       int i;
 
-       data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
+       for (i = 0; i < insn->n; i++)
+               data[i] = devpriv->ao_readback[chan];
 
-       return 1;
+       return insn->n;
 }
 
 static int dt282x_ao_insn_write(struct comedi_device *dev,
                                struct comedi_subdevice *s,
-                               struct comedi_insn *insn, unsigned int *data)
+                               struct comedi_insn *insn,
+                               unsigned int *data)
 {
-       const struct dt282x_board *board = comedi_board(dev);
        struct dt282x_private *devpriv = dev->private;
-       unsigned short d;
-       unsigned int chan;
+       unsigned int chan = CR_CHAN(insn->chanspec);
+       unsigned int range = CR_RANGE(insn->chanspec);
+       unsigned int val;
+       int i;
 
-       chan = CR_CHAN(insn->chanspec);
-       d = data[0];
-       d &= (1 << board->dabits) - 1;
-       devpriv->ao[chan] = d;
+       devpriv->dacsr |= DT2821_DACSR_SSEL | DT2821_DACSR_YSEL(chan);
 
-       devpriv->dacsr |= DT2821_SSEL;
+       for (i = 0; i < insn->n; i++) {
+               val = data[i];
+               devpriv->ao_readback[chan] = val;
 
-       if (chan) {
-               /* select channel */
-               devpriv->dacsr |= DT2821_YSEL;
-               if (devpriv->da0_2scomp)
-                       d ^= (1 << (board->dabits - 1));
-       } else {
-               devpriv->dacsr &= ~DT2821_YSEL;
-               if (devpriv->da1_2scomp)
-                       d ^= (1 << (board->dabits - 1));
-       }
+               if (comedi_range_is_bipolar(s, range))
+                       val = comedi_offset_munge(s, val);
 
-       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR);
+               outw(devpriv->dacsr, dev->iobase + DT2821_DACSR_REG);
 
-       outw(d, dev->iobase + DT2821_DADAT);
+               outw(val, dev->iobase + DT2821_DADAT_REG);
 
-       outw(devpriv->supcsr | DT2821_DACON, dev->iobase + DT2821_SUPCSR);
+               outw(devpriv->supcsr | DT2821_SUPCSR_DACON,
+                    dev->iobase + DT2821_SUPCSR_REG);
+       }
 
-       return 1;
+       return insn->n;
 }
 
 static int dt282x_ao_cmdtest(struct comedi_device *dev,
-                            struct comedi_subdevice *s, struct comedi_cmd *cmd)
+                            struct comedi_subdevice *s,
+                            struct comedi_cmd *cmd)
 {
+       struct dt282x_private *devpriv = dev->private;
        int err = 0;
        unsigned int arg;
 
@@ -865,7 +918,7 @@ static int dt282x_ao_cmdtest(struct comedi_device *dev,
        /* step 4: fix up any arguments */
 
        arg = cmd->scan_begin_arg;
-       dt282x_ns_to_timer(&arg, cmd->flags & TRIG_ROUND_MASK);
+       devpriv->divisor = dt282x_ns_to_timer(&arg, cmd->flags);
        err |= cfc_check_trigger_arg_is(&cmd->scan_begin_arg, arg);
 
        if (err)
@@ -892,7 +945,7 @@ static int dt282x_ao_inttrig(struct comedi_device *dev,
                dev_err(dev->class_dev, "AO underrun\n");
                return -EPIPE;
        }
-       prep_ao_dma(dev, 0, size);
+       dt282x_prep_ao_dma(dev, 0, size);
 
        size = cfc_read_array_from_buffer(s, devpriv->dma[1].buf,
                                          devpriv->dma_maxsize);
@@ -900,9 +953,10 @@ static int dt282x_ao_inttrig(struct comedi_device *dev,
                dev_err(dev->class_dev, "AO underrun\n");
                return -EPIPE;
        }
-       prep_ao_dma(dev, 1, size);
+       dt282x_prep_ao_dma(dev, 1, size);
 
-       outw(devpriv->supcsr | DT2821_STRIG, dev->iobase + DT2821_SUPCSR);
+       outw(devpriv->supcsr | DT2821_SUPCSR_STRIG,
+            dev->iobase + DT2821_SUPCSR_REG);
        s->async->inttrig = NULL;
 
        return 1;
@@ -911,21 +965,18 @@ static int dt282x_ao_inttrig(struct comedi_device *dev,
 static int dt282x_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
        struct dt282x_private *devpriv = dev->private;
-       int timer;
        struct comedi_cmd *cmd = &s->async->cmd;
 
-       if (devpriv->usedma == 0) {
-               comedi_error(dev,
-                            "driver requires 2 dma channels"
-                                               " to execute command");
-               return -EIO;
-       }
-
        dt282x_disable_dma(dev);
 
-       devpriv->supcsr = DT2821_ERRINTEN | DT2821_DS1 | DT2821_DDMA;
-       outw(devpriv->supcsr | DT2821_CLRDMADNE | DT2821_BUFFB | DT2821_DACINIT,
-               dev->iobase + DT2821_SUPCSR);
+       devpriv->supcsr = DT2821_SUPCSR_ERRINTEN |
+                         DT2821_SUPCSR_DS_DA_CLK |
+                         DT2821_SUPCSR_DDMA;
+       outw(devpriv->supcsr |
+            DT2821_SUPCSR_CLRDMADNE |
+            DT2821_SUPCSR_BUFFB |
+            DT2821_SUPCSR_DACINIT,
+            dev->iobase + DT2821_SUPCSR_REG);
 
        devpriv->ntrig = cmd->stop_arg * cmd->chanlist_len;
        devpriv->nread = devpriv->ntrig;
@@ -933,11 +984,15 @@ static int dt282x_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        devpriv->dma_dir = DMA_MODE_WRITE;
        devpriv->current_dma_index = 0;
 
-       timer = dt282x_ns_to_timer(&cmd->scan_begin_arg, TRIG_ROUND_NEAREST);
-       outw(timer, dev->iobase + DT2821_TMRCTR);
+       outw(devpriv->divisor, dev->iobase + DT2821_TMRCTR_REG);
+
+       /* clear all bits but the DIO direction bits */
+       devpriv->dacsr &= (DT2821_DACSR_LBOE | DT2821_DACSR_HBOE);
 
-       devpriv->dacsr = DT2821_SSEL | DT2821_DACLK | DT2821_IDARDY;
-       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR);
+       devpriv->dacsr |= (DT2821_DACSR_SSEL |
+                          DT2821_DACSR_DACLK |
+                          DT2821_DACSR_IDARDY);
+       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR_REG);
 
        s->async->inttrig = dt282x_ao_inttrig;
 
@@ -951,11 +1006,14 @@ static int dt282x_ao_cancel(struct comedi_device *dev,
 
        dt282x_disable_dma(dev);
 
-       devpriv->dacsr = 0;
-       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR);
+       /* clear all bits but the DIO direction bits */
+       devpriv->dacsr &= (DT2821_DACSR_LBOE | DT2821_DACSR_HBOE);
+
+       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR_REG);
 
        devpriv->supcsr = 0;
-       outw(devpriv->supcsr | DT2821_DACINIT, dev->iobase + DT2821_SUPCSR);
+       outw(devpriv->supcsr | DT2821_SUPCSR_DACINIT,
+            dev->iobase + DT2821_SUPCSR_REG);
 
        return 0;
 }
@@ -966,9 +1024,9 @@ static int dt282x_dio_insn_bits(struct comedi_device *dev,
                                unsigned int *data)
 {
        if (comedi_dio_update_state(s, data))
-               outw(s->state, dev->iobase + DT2821_DIODAT);
+               outw(s->state, dev->iobase + DT2821_DIODAT_REG);
 
-       data[1] = inw(dev->iobase + DT2821_DIODAT);
+       data[1] = inw(dev->iobase + DT2821_DIODAT_REG);
 
        return insn->n;
 }
@@ -992,13 +1050,13 @@ static int dt282x_dio_insn_config(struct comedi_device *dev,
        if (ret)
                return ret;
 
-       devpriv->dacsr &= ~(DT2821_LBOE | DT2821_HBOE);
+       devpriv->dacsr &= ~(DT2821_DACSR_LBOE | DT2821_DACSR_HBOE);
        if (s->io_bits & 0x00ff)
-               devpriv->dacsr |= DT2821_LBOE;
+               devpriv->dacsr |= DT2821_DACSR_LBOE;
        if (s->io_bits & 0xff00)
-               devpriv->dacsr |= DT2821_HBOE;
+               devpriv->dacsr |= DT2821_DACSR_HBOE;
 
-       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR);
+       outw(devpriv->dacsr, dev->iobase + DT2821_DACSR_REG);
 
        return insn->n;
 }
@@ -1028,48 +1086,11 @@ static const struct comedi_lrange *opt_ai_range_lkup(int ispgl, int x)
        }
 }
 
-static const struct comedi_lrange *const ao_range_table[] = {
-       &range_bipolar10,
-       &range_unipolar10,
-       &range_bipolar5,
-       &range_unipolar5,
-       &range_bipolar2_5
-};
-
-static const struct comedi_lrange *opt_ao_range_lkup(int x)
-{
-       if (x < 0 || x >= 5)
-               x = 0;
-       return ao_range_table[x];
-}
-
-enum {  /* i/o base, irq, dma channels */
-       opt_iobase = 0, opt_irq, opt_dma1, opt_dma2,
-       opt_diff,               /* differential */
-       opt_ai_twos, opt_ao0_twos, opt_ao1_twos,        /* twos comp */
-       opt_ai_range, opt_ao0_range, opt_ao1_range,     /* range */
-};
-
 static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2)
 {
        struct dt282x_private *devpriv = dev->private;
        int ret;
 
-       devpriv->usedma = 0;
-
-       if (!dma1 && !dma2)
-               return 0;
-
-       if (dma1 == dma2 || dma1 < 5 || dma2 < 5 || dma1 > 7 || dma2 > 7)
-               return -EINVAL;
-
-       if (dma2 < dma1) {
-               int i;
-               i = dma1;
-               dma1 = dma2;
-               dma2 = i;
-       }
-
        ret = request_dma(dma1, "dt282x A");
        if (ret)
                return -EBUSY;
@@ -1086,8 +1107,45 @@ static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2)
        if (!devpriv->dma[0].buf || !devpriv->dma[1].buf)
                return -ENOMEM;
 
-       devpriv->usedma = 1;
+       return 0;
+}
+
+static void dt282x_free_dma(struct comedi_device *dev)
+{
+       struct dt282x_private *devpriv = dev->private;
+       int i;
+
+       if (!devpriv)
+               return;
 
+       for (i = 0; i < 2; i++) {
+               if (devpriv->dma[i].chan)
+                       free_dma(devpriv->dma[i].chan);
+               if (devpriv->dma[i].buf)
+                       free_page((unsigned long)devpriv->dma[i].buf);
+               devpriv->dma[i].chan = 0;
+               devpriv->dma[i].buf = NULL;
+       }
+}
+
+static int dt282x_initialize(struct comedi_device *dev)
+{
+       /* Initialize board */
+       outw(DT2821_SUPCSR_BDINIT, dev->iobase + DT2821_SUPCSR_REG);
+       inw(dev->iobase + DT2821_ADCSR_REG);
+
+       /*
+        * At power up, some registers are in a well-known state.
+        * Check them to see if a DT2821 series board is present.
+        */
+       if (((inw(dev->iobase + DT2821_ADCSR_REG) & 0xfff0) != 0x7c00) ||
+           ((inw(dev->iobase + DT2821_CHANCSR_REG) & 0xf0f0) != 0x70f0) ||
+           ((inw(dev->iobase + DT2821_DACSR_REG) & 0x7c93) != 0x7c90) ||
+           ((inw(dev->iobase + DT2821_SUPCSR_REG) & 0xf8ff) != 0x0000) ||
+           ((inw(dev->iobase + DT2821_TMRCTR_REG) & 0xff00) != 0xf000)) {
+               dev_err(dev->class_dev, "board not found\n");
+               return -EIO;
+       }
        return 0;
 }
 
@@ -1111,263 +1169,125 @@ static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        struct dt282x_private *devpriv;
        struct comedi_subdevice *s;
        int ret;
-       int i;
 
-       ret = comedi_request_region(dev, it->options[0], DT2821_SIZE);
+       ret = comedi_request_region(dev, it->options[0], 0x10);
        if (ret)
                return ret;
 
-       outw(DT2821_BDINIT, dev->iobase + DT2821_SUPCSR);
-       i = inw(dev->iobase + DT2821_ADCSR);
-
-       if (((inw(dev->iobase + DT2821_ADCSR) & DT2821_ADCSR_MASK)
-            != DT2821_ADCSR_VAL) ||
-           ((inw(dev->iobase + DT2821_CHANCSR) & DT2821_CHANCSR_MASK)
-            != DT2821_CHANCSR_VAL) ||
-           ((inw(dev->iobase + DT2821_DACSR) & DT2821_DACSR_MASK)
-            != DT2821_DACSR_VAL) ||
-           ((inw(dev->iobase + DT2821_SUPCSR) & DT2821_SUPCSR_MASK)
-            != DT2821_SUPCSR_VAL) ||
-           ((inw(dev->iobase + DT2821_TMRCTR) & DT2821_TMRCTR_MASK)
-            != DT2821_TMRCTR_VAL)) {
-               dev_err(dev->class_dev, "board not found\n");
-               return -EIO;
-       }
-       /* should do board test */
-
-       if (it->options[opt_irq] > 0) {
-               ret = request_irq(it->options[opt_irq], dt282x_interrupt, 0,
-                                 dev->board_name, dev);
-               if (ret == 0)
-                       dev->irq = it->options[opt_irq];
-       }
+       ret = dt282x_initialize(dev);
+       if (ret)
+               return ret;
 
        devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
        if (!devpriv)
                return -ENOMEM;
 
-       if (dev->irq) {
-               ret = dt282x_grab_dma(dev, it->options[opt_dma1],
-                                     it->options[opt_dma2]);
-               if (ret < 0)
-                       return ret;
+       /* an IRQ and 2 DMA channels are required for async command support */
+       if (it->options[1] && it->options[2] && it->options[3]) {
+               unsigned int irq = it->options[1];
+               unsigned int dma1 = it->options[2];
+               unsigned int dma2 = it->options[3];
+
+               if (dma2 < dma1) {
+                       unsigned int swap;
+
+                       swap = dma1;
+                       dma1 = dma2;
+                       dma2 = swap;
+               }
+
+               if (dma1 != dma2 &&
+                   dma1 >= 5 && dma1 <= 7 &&
+                   dma2 >= 5 && dma2 <= 7) {
+                       ret = request_irq(irq, dt282x_interrupt, 0,
+                                         dev->board_name, dev);
+                       if (ret == 0) {
+                               dev->irq = irq;
+
+                               ret = dt282x_grab_dma(dev, dma1, dma2);
+                               if (ret < 0) {
+                                       dt282x_free_dma(dev);
+                                       free_irq(dev->irq, dev);
+                                       dev->irq = 0;
+                               }
+                       }
+               }
        }
 
        ret = comedi_alloc_subdevices(dev, 3);
        if (ret)
                return ret;
 
+       /* Analog Input subdevice */
        s = &dev->subdevices[0];
+       s->type         = COMEDI_SUBD_AI;
+       s->subdev_flags = SDF_READABLE;
+       if ((it->options[4] && board->adchan_di) || board->adchan_se == 0) {
+               s->subdev_flags |= SDF_DIFF;
+               s->n_chan       = board->adchan_di;
+       } else {
+               s->subdev_flags |= SDF_COMMON;
+               s->n_chan       = board->adchan_se;
+       }
+       s->maxdata      = board->ai_maxdata;
 
-       /* ai subdevice */
-       s->type = COMEDI_SUBD_AI;
-       s->subdev_flags = SDF_READABLE |
-           ((it->options[opt_diff]) ? SDF_DIFF : SDF_COMMON);
-       s->n_chan =
-           (it->options[opt_diff]) ? board->adchan_di : board->adchan_se;
-       s->insn_read = dt282x_ai_insn_read;
-       s->maxdata = (1 << board->adbits) - 1;
-       s->range_table =
-           opt_ai_range_lkup(board->ispgl, it->options[opt_ai_range]);
-       devpriv->ad_2scomp = it->options[opt_ai_twos];
+       s->range_table = opt_ai_range_lkup(board->ispgl, it->options[8]);
+       devpriv->ad_2scomp = it->options[5] ? 1 : 0;
+
+       s->insn_read    = dt282x_ai_insn_read;
        if (dev->irq) {
                dev->read_subdev = s;
-               s->subdev_flags |= SDF_CMD_READ;
-               s->len_chanlist = 16;
-               s->do_cmdtest = dt282x_ai_cmdtest;
-               s->do_cmd = dt282x_ai_cmd;
-               s->cancel = dt282x_ai_cancel;
+               s->subdev_flags |= SDF_CMD_READ;
+               s->len_chanlist = s->n_chan;
+               s->do_cmdtest   = dt282x_ai_cmdtest;
+               s->do_cmd       = dt282x_ai_cmd;
+               s->cancel       = dt282x_ai_cancel;
        }
 
+       /* Analog Output subdevice */
        s = &dev->subdevices[1];
+       if (board->dachan) {
+               s->type         = COMEDI_SUBD_AO;
+               s->subdev_flags = SDF_WRITABLE;
+               s->n_chan       = board->dachan;
+               s->maxdata      = board->ao_maxdata;
+
+               /* ranges are per-channel, set by jumpers on the board */
+               s->range_table  = &dt282x_ao_range;
 
-       s->n_chan = board->dachan;
-       if (s->n_chan) {
-               /* ao subsystem */
-               s->type = COMEDI_SUBD_AO;
-               s->subdev_flags = SDF_WRITABLE;
-               s->insn_read = dt282x_ao_insn_read;
-               s->insn_write = dt282x_ao_insn_write;
-               s->maxdata = (1 << board->dabits) - 1;
-               s->range_table_list = devpriv->darangelist;
-               devpriv->darangelist[0] =
-                   opt_ao_range_lkup(it->options[opt_ao0_range]);
-               devpriv->darangelist[1] =
-                   opt_ao_range_lkup(it->options[opt_ao1_range]);
-               devpriv->da0_2scomp = it->options[opt_ao0_twos];
-               devpriv->da1_2scomp = it->options[opt_ao1_twos];
+               s->insn_read    = dt282x_ao_insn_read;
+               s->insn_write   = dt282x_ao_insn_write;
                if (dev->irq) {
                        dev->write_subdev = s;
-                       s->subdev_flags |= SDF_CMD_WRITE;
-                       s->len_chanlist = 2;
-                       s->do_cmdtest = dt282x_ao_cmdtest;
-                       s->do_cmd = dt282x_ao_cmd;
-                       s->cancel = dt282x_ao_cancel;
+                       s->subdev_flags |= SDF_CMD_WRITE;
+                       s->len_chanlist = s->n_chan;
+                       s->do_cmdtest   = dt282x_ao_cmdtest;
+                       s->do_cmd       = dt282x_ao_cmd;
+                       s->cancel       = dt282x_ao_cancel;
                }
        } else {
-               s->type = COMEDI_SUBD_UNUSED;
+               s->type         = COMEDI_SUBD_UNUSED;
        }
 
+       /* Digital I/O subdevice */
        s = &dev->subdevices[2];
-       /* dio subsystem */
-       s->type = COMEDI_SUBD_DIO;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
-       s->n_chan = 16;
-       s->insn_bits = dt282x_dio_insn_bits;
-       s->insn_config = dt282x_dio_insn_config;
-       s->maxdata = 1;
-       s->range_table = &range_digital;
+       s->type         = COMEDI_SUBD_DIO;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
+       s->n_chan       = 16;
+       s->maxdata      = 1;
+       s->range_table  = &range_digital;
+       s->insn_bits    = dt282x_dio_insn_bits;
+       s->insn_config  = dt282x_dio_insn_config;
 
        return 0;
 }
 
 static void dt282x_detach(struct comedi_device *dev)
 {
-       struct dt282x_private *devpriv = dev->private;
-
-       if (dev->private) {
-               if (devpriv->dma[0].chan)
-                       free_dma(devpriv->dma[0].chan);
-               if (devpriv->dma[1].chan)
-                       free_dma(devpriv->dma[1].chan);
-               if (devpriv->dma[0].buf)
-                       free_page((unsigned long)devpriv->dma[0].buf);
-               if (devpriv->dma[1].buf)
-                       free_page((unsigned long)devpriv->dma[1].buf);
-       }
+       dt282x_free_dma(dev);
        comedi_legacy_detach(dev);
 }
 
-static const struct dt282x_board boardtypes[] = {
-       {
-               .name           = "dt2821",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 20000,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt2821-f",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 6500,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt2821-g",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 4000,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt2823",
-               .adbits         = 16,
-               .adchan_se      = 0,
-               .adchan_di      = 4,
-               .ai_speed       = 10000,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 16,
-       }, {
-               .name           = "dt2824-pgh",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 20000,
-               .ispgl          = 0,
-               .dachan         = 0,
-               .dabits         = 0,
-       }, {
-               .name           = "dt2824-pgl",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 20000,
-               .ispgl          = 1,
-               .dachan         = 0,
-               .dabits         = 0,
-       }, {
-               .name           = "dt2825",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 20000,
-               .ispgl          = 1,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt2827",
-               .adbits         = 16,
-               .adchan_se      = 0,
-               .adchan_di      = 4,
-               .ai_speed       = 10000,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt2828",
-               .adbits         = 12,
-               .adchan_se      = 4,
-               .adchan_di      = 0,
-               .ai_speed       = 10000,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt2829",
-               .adbits         = 16,
-               .adchan_se      = 8,
-               .adchan_di      = 0,
-               .ai_speed       = 33250,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 16,
-       }, {
-               .name           = "dt21-ez",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 10000,
-               .ispgl          = 0,
-               .dachan         = 2,
-               .dabits         = 12,
-       }, {
-               .name           = "dt23-ez",
-               .adbits         = 16,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 10000,
-               .ispgl          = 0,
-               .dachan         = 0,
-               .dabits         = 0,
-       }, {
-               .name           = "dt24-ez",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 10000,
-               .ispgl          = 0,
-               .dachan         = 0,
-               .dabits         = 0,
-       }, {
-               .name           = "dt24-ez-pgl",
-               .adbits         = 12,
-               .adchan_se      = 16,
-               .adchan_di      = 8,
-               .ai_speed       = 10000,
-               .ispgl          = 1,
-               .dachan         = 0,
-               .dabits         = 0,
-       },
-};
-
 static struct comedi_driver dt282x_driver = {
        .driver_name    = "dt282x",
        .module         = THIS_MODULE,
@@ -1380,5 +1300,5 @@ static struct comedi_driver dt282x_driver = {
 module_comedi_driver(dt282x_driver);
 
 MODULE_AUTHOR("Comedi http://www.comedi.org");
-MODULE_DESCRIPTION("Comedi low-level driver");
+MODULE_DESCRIPTION("Comedi driver for Data Translation DT2821 series");
 MODULE_LICENSE("GPL");
index ec43c38958dec7c3470312630a9285a160d09bdf..f46722c2648fff5aa4fcd8884c8cecb0e7f0b72b 100644 (file)
@@ -93,6 +93,67 @@ static int ke_counter_insn_read(struct comedi_device *dev,
        return insn->n;
 }
 
+static void ke_counter_reset(struct comedi_device *dev)
+{
+       unsigned int chan;
+
+       for (chan = 0; chan < 3; chan++)
+               outb(0, dev->iobase + KE_RESET_REG(chan));
+}
+
+static int ke_counter_insn_config(struct comedi_device *dev,
+                                 struct comedi_subdevice *s,
+                                 struct comedi_insn *insn,
+                                 unsigned int *data)
+{
+       unsigned char src;
+
+       switch (data[0]) {
+       case INSN_CONFIG_SET_CLOCK_SRC:
+               switch (data[1]) {
+               case KE_CLK_20MHZ:      /* default */
+                       src = KE_OSC_SEL_20MHZ;
+                       break;
+               case KE_CLK_4MHZ:       /* option */
+                       src = KE_OSC_SEL_4MHZ;
+                       break;
+               case KE_CLK_EXT:        /* Pin 21 on D-sub */
+                       src = KE_OSC_SEL_EXT;
+                       break;
+               default:
+                       return -EINVAL;
+               }
+               outb(src, dev->iobase + KE_OSC_SEL_REG);
+               break;
+       case INSN_CONFIG_GET_CLOCK_SRC:
+               src = inb(dev->iobase + KE_OSC_SEL_REG);
+               switch (src) {
+               case KE_OSC_SEL_20MHZ:
+                       data[1] = KE_CLK_20MHZ;
+                       data[2] = 50;   /* 50ns */
+                       break;
+               case KE_OSC_SEL_4MHZ:
+                       data[1] = KE_CLK_4MHZ;
+                       data[2] = 250;  /* 250ns */
+                       break;
+               case KE_OSC_SEL_EXT:
+                       data[1] = KE_CLK_EXT;
+                       data[2] = 0;    /* Unknown */
+                       break;
+               default:
+                       return -EINVAL;
+               }
+               break;
+       case INSN_CONFIG_RESET:
+               ke_counter_reset(dev);
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       return insn->n;
+}
+
 static int ke_counter_do_insn_bits(struct comedi_device *dev,
                                   struct comedi_subdevice *s,
                                   struct comedi_insn *insn,
@@ -130,6 +191,7 @@ static int ke_counter_auto_attach(struct comedi_device *dev,
        s->range_table  = &range_unknown;
        s->insn_read    = ke_counter_insn_read;
        s->insn_write   = ke_counter_insn_write;
+       s->insn_config  = ke_counter_insn_config;
 
        s = &dev->subdevices[1];
        s->type         = COMEDI_SUBD_DO;
@@ -141,9 +203,7 @@ static int ke_counter_auto_attach(struct comedi_device *dev,
 
        outb(KE_OSC_SEL_20MHZ, dev->iobase + KE_OSC_SEL_REG);
 
-       outb(0, dev->iobase + KE_RESET_REG(0));
-       outb(0, dev->iobase + KE_RESET_REG(1));
-       outb(0, dev->iobase + KE_RESET_REG(2));
+       ke_counter_reset(dev);
 
        return 0;
 }
index 19c029acbc99a51d94006af6fb69cd03a612abae..52d154886c4fdd3b59bd1c435d0eaa5d7b061cbb 100644 (file)
@@ -173,25 +173,19 @@ int mite_setup(struct mite_struct *mite)
 }
 EXPORT_SYMBOL_GPL(mite_setup);
 
-void mite_unsetup(struct mite_struct *mite)
+void mite_detach(struct mite_struct *mite)
 {
-       /* unsigned long offset, start, length; */
-
        if (!mite)
                return;
 
-       if (mite->mite_io_addr) {
+       if (mite->mite_io_addr)
                iounmap(mite->mite_io_addr);
-               mite->mite_io_addr = NULL;
-       }
-       if (mite->daq_io_addr) {
+       if (mite->daq_io_addr)
                iounmap(mite->daq_io_addr);
-               mite->daq_io_addr = NULL;
-       }
-       if (mite->mite_phys_addr)
-               mite->mite_phys_addr = 0;
+
+       kfree(mite);
 }
-EXPORT_SYMBOL_GPL(mite_unsetup);
+EXPORT_SYMBOL_GPL(mite_detach);
 
 struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite)
 {
index e6e58e989b73a49670bddd9e13def37132167fca..a4852cbd5b312729775b63a7342452fc5b03844d 100644 (file)
@@ -65,24 +65,9 @@ struct mite_struct {
 
 struct mite_struct *mite_alloc(struct pci_dev *pcidev);
 
-static inline void mite_free(struct mite_struct *mite)
-{
-       kfree(mite);
-}
-
-static inline unsigned int mite_irq(struct mite_struct *mite)
-{
-       return mite->pcidev->irq;
-};
-
-static inline unsigned int mite_device_id(struct mite_struct *mite)
-{
-       return mite->pcidev->device;
-};
-
 int mite_setup(struct mite_struct *mite);
 int mite_setup2(struct mite_struct *mite, unsigned use_iodwbsr_1);
-void mite_unsetup(struct mite_struct *mite);
+void mite_detach(struct mite_struct *mite);
 struct mite_dma_descriptor_ring *mite_alloc_ring(struct mite_struct *mite);
 void mite_free_ring(struct mite_dma_descriptor_ring *ring);
 struct mite_channel *mite_request_channel_in_range(struct mite_struct *mite,
index 9a139d6b8ef4e7aa68db819788ab504c119f7088..59f592e0ca76ce29d59d07d116e43b6653602f41 100644 (file)
@@ -596,7 +596,7 @@ static int ni_65xx_auto_attach(struct comedi_device *dev,
                return ret;
        }
 
-       dev->irq = mite_irq(devpriv->mite);
+       dev->irq = pcidev->irq;
        dev_info(dev->class_dev, "board: %s, ID=0x%02x", dev->board_name,
               readb(devpriv->mite->daq_io_addr + ID_Register));
 
@@ -716,12 +716,8 @@ static void ni_65xx_detach(struct comedi_device *dev)
        }
        if (dev->irq)
                free_irq(dev->irq, dev);
-       if (devpriv) {
-               if (devpriv->mite) {
-                       mite_unsetup(devpriv->mite);
-                       mite_free(devpriv->mite);
-               }
-       }
+       if (devpriv)
+               mite_detach(devpriv->mite);
        comedi_pci_disable(dev);
 }
 
index 634cde83a02ba6eec64399cc546ca44781ffdab9..27d435f2565b6e0583c89c1a70f90ef7a9ee5074 100644 (file)
@@ -1170,13 +1170,13 @@ static int ni_660x_auto_attach(struct comedi_device *dev,
        for (i = 0; i < board->n_chips; ++i)
                set_tio_counterswap(dev, i);
 
-       ret = request_irq(mite_irq(devpriv->mite), ni_660x_interrupt,
+       ret = request_irq(pcidev->irq, ni_660x_interrupt,
                          IRQF_SHARED, "ni_660x", dev);
        if (ret < 0) {
                dev_warn(dev->class_dev, " irq not available\n");
                return ret;
        }
-       dev->irq = mite_irq(devpriv->mite);
+       dev->irq = pcidev->irq;
        global_interrupt_config_bits = Global_Int_Enable_Bit;
        if (board->n_chips > 1)
                global_interrupt_config_bits |= Cascade_Int_Enable_Bit;
@@ -1195,11 +1195,8 @@ static void ni_660x_detach(struct comedi_device *dev)
        if (devpriv) {
                if (devpriv->counter_dev)
                        ni_gpct_device_destroy(devpriv->counter_dev);
-               if (devpriv->mite) {
-                       ni_660x_free_mite_rings(dev);
-                       mite_unsetup(devpriv->mite);
-                       mite_free(devpriv->mite);
-               }
+               ni_660x_free_mite_rings(dev);
+               mite_detach(devpriv->mite);
        }
        comedi_pci_disable(dev);
 }
index 1002ceacfdcc9bc0db590b0156819be6ea06468d..b487f8d9eeed4c019a0d9b35b8eaa58be8da753b 100644 (file)
@@ -259,10 +259,8 @@ static void ni_670x_detach(struct comedi_device *dev)
                if (s)
                        kfree(s->range_table_list);
        }
-       if (devpriv && devpriv->mite) {
-               mite_unsetup(devpriv->mite);
-               mite_free(devpriv->mite);
-       }
+       if (devpriv)
+               mite_detach(devpriv->mite);
        comedi_pci_disable(dev);
 }
 
index d03935257b974e4fe480f10f13e5f3dd59a0e600..d7ee6bde44cdedfe8474a5b00de2dfa44bf410cf 100644 (file)
@@ -98,233 +98,149 @@ are not supported.
 #include "ni_stc.h"
 #include "8255.h"
 
-#define ATMIO 1
-#undef PCIMIO
-
 /*
  *  AT specific setup
  */
 
-#define NI_SIZE 0x20
-
-#define MAX_N_CALDACS 32
-
 static const struct ni_board_struct ni_boards[] = {
-       {.device_id = 44,
-        .isapnp_id = 0x0000,   /* XXX unknown */
-        .name = "at-mio-16e-1",
-        .n_adchan = 16,
-        .adbits = 12,
-        .ai_fifo_depth = 8192,
-        .alwaysdither = 0,
-        .gainlkup = ai_gain_16,
-        .ai_speed = 800,
-        .n_aochan = 2,
-        .aobits = 12,
-        .ao_fifo_depth = 2048,
-        .ao_range_table = &range_ni_E_ao_ext,
-        .ao_unipolar = 1,
-        .ao_speed = 1000,
-        .has_8255 = 0,
-        .num_p0_dio_channels = 8,
-        .caldac = {mb88341},
-        },
-       {.device_id = 25,
-        .isapnp_id = 0x1900,
-        .name = "at-mio-16e-2",
-        .n_adchan = 16,
-        .adbits = 12,
-        .ai_fifo_depth = 2048,
-        .alwaysdither = 0,
-        .gainlkup = ai_gain_16,
-        .ai_speed = 2000,
-        .n_aochan = 2,
-        .aobits = 12,
-        .ao_fifo_depth = 2048,
-        .ao_range_table = &range_ni_E_ao_ext,
-        .ao_unipolar = 1,
-        .ao_speed = 1000,
-        .has_8255 = 0,
-        .num_p0_dio_channels = 8,
-        .caldac = {mb88341},
-        },
-       {.device_id = 36,
-        .isapnp_id = 0x2400,
-        .name = "at-mio-16e-10",
-        .n_adchan = 16,
-        .adbits = 12,
-        .ai_fifo_depth = 512,
-        .alwaysdither = 0,
-        .gainlkup = ai_gain_16,
-        .ai_speed = 10000,
-        .n_aochan = 2,
-        .aobits = 12,
-        .ao_fifo_depth = 0,
-        .ao_range_table = &range_ni_E_ao_ext,
-        .ao_unipolar = 1,
-        .ao_speed = 10000,
-        .num_p0_dio_channels = 8,
-        .caldac = {ad8804_debug},
-        .has_8255 = 0,
-        },
-       {.device_id = 37,
-        .isapnp_id = 0x2500,
-        .name = "at-mio-16de-10",
-        .n_adchan = 16,
-        .adbits = 12,
-        .ai_fifo_depth = 512,
-        .alwaysdither = 0,
-        .gainlkup = ai_gain_16,
-        .ai_speed = 10000,
-        .n_aochan = 2,
-        .aobits = 12,
-        .ao_fifo_depth = 0,
-        .ao_range_table = &range_ni_E_ao_ext,
-        .ao_unipolar = 1,
-        .ao_speed = 10000,
-        .num_p0_dio_channels = 8,
-        .caldac = {ad8804_debug},
-        .has_8255 = 1,
-        },
-       {.device_id = 38,
-        .isapnp_id = 0x2600,
-        .name = "at-mio-64e-3",
-        .n_adchan = 64,
-        .adbits = 12,
-        .ai_fifo_depth = 2048,
-        .alwaysdither = 0,
-        .gainlkup = ai_gain_16,
-        .ai_speed = 2000,
-        .n_aochan = 2,
-        .aobits = 12,
-        .ao_fifo_depth = 2048,
-        .ao_range_table = &range_ni_E_ao_ext,
-        .ao_unipolar = 1,
-        .ao_speed = 1000,
-        .has_8255 = 0,
-        .num_p0_dio_channels = 8,
-        .caldac = {ad8804_debug},
-        },
-       {.device_id = 39,
-        .isapnp_id = 0x2700,
-        .name = "at-mio-16xe-50",
-        .n_adchan = 16,
-        .adbits = 16,
-        .ai_fifo_depth = 512,
-        .alwaysdither = 1,
-        .gainlkup = ai_gain_8,
-        .ai_speed = 50000,
-        .n_aochan = 2,
-        .aobits = 12,
-        .ao_fifo_depth = 0,
-        .ao_range_table = &range_bipolar10,
-        .ao_unipolar = 0,
-        .ao_speed = 50000,
-        .num_p0_dio_channels = 8,
-        .caldac = {dac8800, dac8043},
-        .has_8255 = 0,
-        },
-       {.device_id = 50,
-        .isapnp_id = 0x0000,   /* XXX unknown */
-        .name = "at-mio-16xe-10",
-        .n_adchan = 16,
-        .adbits = 16,
-        .ai_fifo_depth = 512,
-        .alwaysdither = 1,
-        .gainlkup = ai_gain_14,
-        .ai_speed = 10000,
-        .n_aochan = 2,
-        .aobits = 16,
-        .ao_fifo_depth = 2048,
-        .ao_range_table = &range_ni_E_ao_ext,
-        .ao_unipolar = 1,
-        .ao_speed = 1000,
-        .num_p0_dio_channels = 8,
-        .caldac = {dac8800, dac8043, ad8522},
-        .has_8255 = 0,
-        },
-       {.device_id = 51,
-        .isapnp_id = 0x0000,   /* XXX unknown */
-        .name = "at-ai-16xe-10",
-        .n_adchan = 16,
-        .adbits = 16,
-        .ai_fifo_depth = 512,
-        .alwaysdither = 1,     /* unknown */
-        .gainlkup = ai_gain_14,
-        .ai_speed = 10000,
-        .n_aochan = 0,
-        .aobits = 0,
-        .ao_fifo_depth = 0,
-        .ao_unipolar = 0,
-        .num_p0_dio_channels = 8,
-        .caldac = {dac8800, dac8043, ad8522},
-        .has_8255 = 0,
-        }
+       {
+               .name           = "at-mio-16e-1",
+               .device_id      = 44,
+               .isapnp_id      = 0x0000,       /* XXX unknown */
+               .n_adchan       = 16,
+               .adbits         = 12,
+               .ai_fifo_depth  = 8192,
+               .gainlkup       = ai_gain_16,
+               .ai_speed       = 800,
+               .n_aochan       = 2,
+               .aobits         = 12,
+               .ao_fifo_depth  = 2048,
+               .ao_range_table = &range_ni_E_ao_ext,
+               .ao_unipolar    = 1,
+               .ao_speed       = 1000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { mb88341 },
+       }, {
+               .name           = "at-mio-16e-2",
+               .device_id      = 25,
+               .isapnp_id      = 0x1900,
+               .n_adchan       = 16,
+               .adbits         = 12,
+               .ai_fifo_depth  = 2048,
+               .gainlkup       = ai_gain_16,
+               .ai_speed       = 2000,
+               .n_aochan       = 2,
+               .aobits         = 12,
+               .ao_fifo_depth  = 2048,
+               .ao_range_table = &range_ni_E_ao_ext,
+               .ao_unipolar    = 1,
+               .ao_speed       = 1000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { mb88341 },
+       }, {
+               .name           = "at-mio-16e-10",
+               .device_id      = 36,
+               .isapnp_id      = 0x2400,
+               .n_adchan       = 16,
+               .adbits         = 12,
+               .ai_fifo_depth  = 512,
+               .gainlkup       = ai_gain_16,
+               .ai_speed       = 10000,
+               .n_aochan       = 2,
+               .aobits         = 12,
+               .ao_range_table = &range_ni_E_ao_ext,
+               .ao_unipolar    = 1,
+               .ao_speed       = 10000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { ad8804_debug },
+       }, {
+               .name           = "at-mio-16de-10",
+               .device_id      = 37,
+               .isapnp_id      = 0x2500,
+               .n_adchan       = 16,
+               .adbits         = 12,
+               .ai_fifo_depth  = 512,
+               .gainlkup       = ai_gain_16,
+               .ai_speed       = 10000,
+               .n_aochan       = 2,
+               .aobits         = 12,
+               .ao_range_table = &range_ni_E_ao_ext,
+               .ao_unipolar    = 1,
+               .ao_speed       = 10000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { ad8804_debug },
+               .has_8255       = 1,
+       }, {
+               .name           = "at-mio-64e-3",
+               .device_id      = 38,
+               .isapnp_id      = 0x2600,
+               .n_adchan       = 64,
+               .adbits         = 12,
+               .ai_fifo_depth  = 2048,
+               .gainlkup       = ai_gain_16,
+               .ai_speed       = 2000,
+               .n_aochan       = 2,
+               .aobits         = 12,
+               .ao_fifo_depth  = 2048,
+               .ao_range_table = &range_ni_E_ao_ext,
+               .ao_unipolar    = 1,
+               .ao_speed       = 1000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { ad8804_debug },
+       }, {
+               .name           = "at-mio-16xe-50",
+               .device_id      = 39,
+               .isapnp_id      = 0x2700,
+               .n_adchan       = 16,
+               .adbits         = 16,
+               .ai_fifo_depth  = 512,
+               .alwaysdither   = 1,
+               .gainlkup       = ai_gain_8,
+               .ai_speed       = 50000,
+               .n_aochan       = 2,
+               .aobits         = 12,
+               .ao_range_table = &range_bipolar10,
+               .ao_speed       = 50000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { dac8800, dac8043 },
+       }, {
+               .name           = "at-mio-16xe-10",
+               .device_id      = 50,
+               .isapnp_id      = 0x0000,       /* XXX unknown */
+               .n_adchan       = 16,
+               .adbits         = 16,
+               .ai_fifo_depth  = 512,
+               .alwaysdither   = 1,
+               .gainlkup       = ai_gain_14,
+               .ai_speed       = 10000,
+               .n_aochan       = 2,
+               .aobits         = 16,
+               .ao_fifo_depth  = 2048,
+               .ao_range_table = &range_ni_E_ao_ext,
+               .ao_unipolar    = 1,
+               .ao_speed       = 1000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { dac8800, dac8043, ad8522 },
+       }, {
+               .name           = "at-ai-16xe-10",
+               .device_id      = 51,
+               .isapnp_id      = 0x0000,       /* XXX unknown */
+               .n_adchan       = 16,
+               .adbits         = 16,
+               .ai_fifo_depth  = 512,
+               .alwaysdither   = 1,    /* unknown */
+               .gainlkup       = ai_gain_14,
+               .ai_speed       = 10000,
+               .num_p0_dio_channels = 8,
+               .caldac         = { dac8800, dac8043, ad8522 },
+       },
 };
 
 static const int ni_irqpin[] = {
        -1, -1, -1, 0, 1, 2, -1, 3, -1, -1, 4, 5, 6, -1, -1, 7
 };
 
-#define interrupt_pin(a)       (ni_irqpin[(a)])
-
-#define IRQ_POLARITY 0
-
-#define NI_E_IRQ_FLAGS         0
-
-struct ni_private {
-       struct pnp_dev *isapnp_dev;
-       NI_PRIVATE_COMMON
-
-};
-
-/* How we access registers */
-
-#define ni_writel(a, b)                (outl((a), (b)+dev->iobase))
-#define ni_readl(a)            (inl((a)+dev->iobase))
-#define ni_writew(a, b)                (outw((a), (b)+dev->iobase))
-#define ni_readw(a)            (inw((a)+dev->iobase))
-#define ni_writeb(a, b)                (outb((a), (b)+dev->iobase))
-#define ni_readb(a)            (inb((a)+dev->iobase))
-
-/* How we access windowed registers */
-
-/* We automatically take advantage of STC registers that can be
- * read/written directly in the I/O space of the board.  The
- * AT-MIO devices map the low 8 STC registers to iobase+addr*2. */
-
-static void ni_atmio_win_out(struct comedi_device *dev, uint16_t data, int addr)
-{
-       struct ni_private *devpriv = dev->private;
-       unsigned long flags;
-
-       spin_lock_irqsave(&devpriv->window_lock, flags);
-       if ((addr) < 8) {
-               ni_writew(data, addr * 2);
-       } else {
-               ni_writew(addr, Window_Address);
-               ni_writew(data, Window_Data);
-       }
-       spin_unlock_irqrestore(&devpriv->window_lock, flags);
-}
-
-static uint16_t ni_atmio_win_in(struct comedi_device *dev, int addr)
-{
-       struct ni_private *devpriv = dev->private;
-       unsigned long flags;
-       uint16_t ret;
-
-       spin_lock_irqsave(&devpriv->window_lock, flags);
-       if (addr < 8) {
-               ret = ni_readw(addr * 2);
-       } else {
-               ni_writew(addr, Window_Address);
-               ret = ni_readw(Window_Data);
-       }
-       spin_unlock_irqrestore(&devpriv->window_lock, flags);
-
-       return ret;
-}
+#include "ni_mio_common.c"
 
 static struct pnp_device_id device_ids[] = {
        {.id = "NIC1900", .driver_data = 0},
@@ -337,8 +253,6 @@ static struct pnp_device_id device_ids[] = {
 
 MODULE_DEVICE_TABLE(pnp, device_ids);
 
-#include "ni_mio_common.c"
-
 static int ni_isapnp_find_board(struct pnp_dev **dev)
 {
        struct pnp_dev *isapnp_dev = NULL;
@@ -413,11 +327,6 @@ static int ni_atmio_attach(struct comedi_device *dev,
                return ret;
        devpriv = dev->private;
 
-       devpriv->stc_writew = &ni_atmio_win_out;
-       devpriv->stc_readw = &ni_atmio_win_in;
-       devpriv->stc_writel = &win_out2;
-       devpriv->stc_readl = &win_in2;
-
        iobase = it->options[0];
        irq = it->options[1];
        isapnp_dev = NULL;
@@ -428,10 +337,10 @@ static int ni_atmio_attach(struct comedi_device *dev,
 
                iobase = pnp_port_start(isapnp_dev, 0);
                irq = pnp_irq(isapnp_dev, 0);
-               devpriv->isapnp_dev = isapnp_dev;
+               comedi_set_hw_dev(dev, &isapnp_dev->dev);
        }
 
-       ret = comedi_request_region(dev, iobase, NI_SIZE);
+       ret = comedi_request_region(dev, iobase, 0x20);
        if (ret)
                return ret;
 
@@ -455,7 +364,7 @@ static int ni_atmio_attach(struct comedi_device *dev,
                        return -EINVAL;
                }
                printk(" ( irq = %u )", irq);
-               ret = request_irq(irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
+               ret = request_irq(irq, ni_E_interrupt, 0,
                                  "ni_atmio", dev);
 
                if (ret < 0) {
@@ -467,7 +376,7 @@ static int ni_atmio_attach(struct comedi_device *dev,
 
        /* generic E series stuff in ni_mio_common.c */
 
-       ret = ni_E_init(dev);
+       ret = ni_E_init(dev, ni_irqpin[dev->irq], 0);
        if (ret < 0)
                return ret;
 
@@ -477,12 +386,14 @@ static int ni_atmio_attach(struct comedi_device *dev,
 
 static void ni_atmio_detach(struct comedi_device *dev)
 {
-       struct ni_private *devpriv = dev->private;
+       struct pnp_dev *isapnp_dev;
 
        mio_common_detach(dev);
        comedi_legacy_detach(dev);
-       if (devpriv->isapnp_dev)
-               pnp_device_detach(devpriv->isapnp_dev);
+
+       isapnp_dev = dev->hw_dev ? to_pnp_dev(dev->hw_dev) : NULL;
+       if (isapnp_dev)
+               pnp_device_detach(isapnp_dev);
 }
 
 static struct comedi_driver ni_atmio_driver = {
index 728bf7f14f7bebb438552d8c4cdb53bb6942bea6..3d841d4eb552c2156a68774a4ab56606625a36d6 100644 (file)
  */
 
 /*
-Driver: ni_daq_700
-Description: National Instruments PCMCIA DAQCard-700 DIO only
-Author: Fred Brooks <nsaspook@nsaspook.com>,
-  based on ni_daq_dio24 by Daniel Vecino Castel <dvecino@able.es>
-Devices: [National Instruments] PCMCIA DAQ-Card-700 (ni_daq_700)
-Status: works
-Updated: Wed, 19 Sep 2012 12:07:20 +0000
-
-The daqcard-700 appears in Comedi as a  digital I/O subdevice (0) with
-16 channels and a analog input subdevice (1) with 16 single-ended channels.
-
-Digital:  The channel 0 corresponds to the daqcard-700's output
-port, bit 0; channel 8 corresponds to the input port, bit 0.
-
-Digital direction configuration: channels 0-7 output, 8-15 input (8225 device
-emu as port A output, port B input, port C N/A).
-
-Analog: The input  range is 0 to 4095 for -10 to +10 volts
-IRQ is assigned but not used.
-
-Version 0.1    Original DIO only driver
-Version 0.2    DIO and basic AI analog input support on 16 se channels
-
-Manuals:       Register level: http://www.ni.com/pdf/manuals/340698.pdf
-               User Manual:    http://www.ni.com/pdf/manuals/320676d.pdf
-*/
+ * Driver: ni_daq_700
+ * Description: National Instruments PCMCIA DAQCard-700
+ * Author: Fred Brooks <nsaspook@nsaspook.com>,
+ *   based on ni_daq_dio24 by Daniel Vecino Castel <dvecino@able.es>
+ * Devices: [National Instruments] PCMCIA DAQ-Card-700 (ni_daq_700)
+ * Status: works
+ * Updated: Wed, 21 May 2014 12:07:20 +0000
+ *
+ * The daqcard-700 appears in Comedi as a  digital I/O subdevice (0) with
+ * 16 channels and a analog input subdevice (1) with 16 single-ended channels
+ * or 8 differential channels, and three input ranges.
+ *
+ * Digital:  The channel 0 corresponds to the daqcard-700's output
+ * port, bit 0; channel 8 corresponds to the input port, bit 0.
+ *
+ * Digital direction configuration: channels 0-7 output, 8-15 input.
+ *
+ * Analog: The input  range is 0 to 4095 with a default of -10 to +10 volts.
+ * Valid ranges:
+ *       0 for -10 to 10V bipolar
+ *       1 for -5 to 5V bipolar
+ *       2 for -2.5 to 2.5V bipolar
+ *
+ * IRQ is assigned but not used.
+ *
+ * Version 0.1 Original DIO only driver
+ * Version 0.2 DIO and basic AI analog input support on 16 se channels
+ * Version 0.3 Add SE or DIFF mode and range switching +-10,+-5,+-2.5
+ *             Clear the FIFO of data before the conversion to handle card
+ *             mode switching glitches.
+ *
+ * Manuals:    Register level: http://www.ni.com/pdf/manuals/340698.pdf
+ *             User Manual:    http://www.ni.com/pdf/manuals/320676d.pdf
+ */
 
 #include <linux/module.h>
 #include <linux/delay.h>
@@ -69,6 +77,17 @@ Manuals:     Register level: http://www.ni.com/pdf/manuals/340698.pdf
 #define CDA_R2         0x0A    /* RW 8bit */
 #define CMO_R          0x0B    /* RO 8bit */
 #define TIC_R          0x06    /* WO 8bit */
+/* daqcard700 modes */
+#define CMD_R3_DIFF     0x04    /* diff mode */
+
+static const struct comedi_lrange range_daq700_ai = {
+       3,
+       {
+               BIP_RANGE(10),
+               BIP_RANGE(5),
+               BIP_RANGE(2.5)
+       }
+};
 
 static int daq700_dio_insn_bits(struct comedi_device *dev,
                                struct comedi_subdevice *s,
@@ -131,11 +150,22 @@ static int daq700_ai_rinsn(struct comedi_device *dev,
                           struct comedi_subdevice *s,
                           struct comedi_insn *insn, unsigned int *data)
 {
-       int n, chan;
+       int n;
        int d;
        int ret;
+       unsigned int chan       = CR_CHAN(insn->chanspec);
+       unsigned int aref       = CR_AREF(insn->chanspec);
+       unsigned int range      = CR_RANGE(insn->chanspec);
+       unsigned int r3_bits    = 0;
+
+       /* set channel input modes */
+       if (aref == AREF_DIFF)
+               r3_bits |= CMD_R3_DIFF;
+       /* write channel mode/range */
+       if (range >= 1)
+               range++;        /* convert range to hardware value */
+       outb(r3_bits | (range & 0x03), dev->iobase + CMD_R3);
 
-       chan = CR_CHAN(insn->chanspec);
        /* write channel to multiplexer */
        /* set mask scan bit high to disable scanning */
        outb(chan | 0x80, dev->iobase + CMD_R1);
@@ -147,6 +177,9 @@ static int daq700_ai_rinsn(struct comedi_device *dev,
                /* trigger conversion with out0 L to H */
                outb(0x00, dev->iobase + CMD_R2); /* enable ADC conversions */
                outb(0x30, dev->iobase + CMO_R); /* mode 0 out0 L, from H */
+               outb(0x00, dev->iobase + ADCLEAR_R);    /* clear the ADC FIFO */
+               /* read 16bit junk from FIFO to clear */
+               inw(dev->iobase + ADFIFO_R);
                /* mode 1 out0 H, L to H, start conversion */
                outb(0x32, dev->iobase + CMO_R);
 
@@ -222,11 +255,10 @@ static int daq700_auto_attach(struct comedi_device *dev,
        /* DAQCard-700 ai */
        s = &dev->subdevices[1];
        s->type = COMEDI_SUBD_AI;
-       /* we support single-ended (ground)  */
-       s->subdev_flags = SDF_READABLE | SDF_GROUND;
+       s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_DIFF;
        s->n_chan = 16;
        s->maxdata = (1 << 12) - 1;
-       s->range_table = &range_bipolar10;
+       s->range_table = &range_daq700_ai;
        s->insn_read = daq700_ai_rinsn;
        daq700_ai_config(dev, s);
 
@@ -263,5 +295,5 @@ module_comedi_pcmcia_driver(daq700_driver, daq700_cs_driver);
 MODULE_AUTHOR("Fred Brooks <nsaspook@nsaspook.com>");
 MODULE_DESCRIPTION(
        "Comedi driver for National Instruments PCMCIA DAQCard-700 DIO/AI");
-MODULE_VERSION("0.2.00");
+MODULE_VERSION("0.3.00");
 MODULE_LICENSE("GPL");
index 739597068297d2d2ee7c87415846afc8c6f6806d..358c4af3e174e09e6921330111859e9f96b653fb 100644 (file)
@@ -84,17 +84,15 @@ static int labpc_pci_auto_attach(struct comedi_device *dev,
                return ret;
        dev->iobase = (unsigned long)devpriv->mite->daq_io_addr;
 
-       return labpc_common_attach(dev, mite_irq(devpriv->mite), IRQF_SHARED);
+       return labpc_common_attach(dev, pcidev->irq, IRQF_SHARED);
 }
 
 static void labpc_pci_detach(struct comedi_device *dev)
 {
        struct labpc_private *devpriv = dev->private;
 
-       if (devpriv && devpriv->mite) {
-               mite_unsetup(devpriv->mite);
-               mite_free(devpriv->mite);
-       }
+       if (devpriv)
+               mite_detach(devpriv->mite);
        if (dev->irq)
                free_irq(dev->irq, dev);
        comedi_pci_disable(dev);
index 7ffdcc07ef927505ce773d3e50bf874d7d8d8c58..ff881a7afdd309146b32202bc856502b74c99e07 100644 (file)
@@ -194,113 +194,6 @@ static const struct comedi_lrange *const ni_range_lkup[] = {
        [ai_gain_6143] = &range_bipolar5
 };
 
-static int ni_dio_insn_config(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data);
-static int ni_dio_insn_bits(struct comedi_device *dev,
-                           struct comedi_subdevice *s,
-                           struct comedi_insn *insn, unsigned int *data);
-static int ni_cdio_cmdtest(struct comedi_device *dev,
-                          struct comedi_subdevice *s, struct comedi_cmd *cmd);
-static int ni_cdio_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
-static int ni_cdio_cancel(struct comedi_device *dev,
-                         struct comedi_subdevice *s);
-static void handle_cdio_interrupt(struct comedi_device *dev);
-static int ni_cdo_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
-                         unsigned int trignum);
-
-static int ni_serial_insn_config(struct comedi_device *dev,
-                                struct comedi_subdevice *s,
-                                struct comedi_insn *insn, unsigned int *data);
-static int ni_serial_hw_readwrite8(struct comedi_device *dev,
-                                  struct comedi_subdevice *s,
-                                  unsigned char data_out,
-                                  unsigned char *data_in);
-static int ni_serial_sw_readwrite8(struct comedi_device *dev,
-                                  struct comedi_subdevice *s,
-                                  unsigned char data_out,
-                                  unsigned char *data_in);
-
-static int ni_calib_insn_read(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data);
-static int ni_calib_insn_write(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data);
-
-static int ni_eeprom_insn_read(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data);
-static int ni_m_series_eeprom_insn_read(struct comedi_device *dev,
-                                       struct comedi_subdevice *s,
-                                       struct comedi_insn *insn,
-                                       unsigned int *data);
-
-static int ni_pfi_insn_bits(struct comedi_device *dev,
-                           struct comedi_subdevice *s,
-                           struct comedi_insn *insn, unsigned int *data);
-static int ni_pfi_insn_config(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data);
-static unsigned ni_old_get_pfi_routing(struct comedi_device *dev,
-                                      unsigned chan);
-
-static void ni_rtsi_init(struct comedi_device *dev);
-static int ni_rtsi_insn_bits(struct comedi_device *dev,
-                            struct comedi_subdevice *s,
-                            struct comedi_insn *insn, unsigned int *data);
-static int ni_rtsi_insn_config(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data);
-
-static void caldac_setup(struct comedi_device *dev, struct comedi_subdevice *s);
-static int ni_read_eeprom(struct comedi_device *dev, int addr);
-
-#ifndef PCIDMA
-static void ni_handle_fifo_half_full(struct comedi_device *dev);
-static int ni_ao_fifo_half_empty(struct comedi_device *dev,
-                                struct comedi_subdevice *s);
-#endif
-static void ni_handle_fifo_dregs(struct comedi_device *dev);
-static int ni_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
-                        unsigned int trignum);
-static void ni_load_channelgain_list(struct comedi_device *dev,
-                                    unsigned int n_chan, unsigned int *list);
-static void shutdown_ai_command(struct comedi_device *dev);
-
-static int ni_ao_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
-                        unsigned int trignum);
-
-static int ni_8255_callback(int dir, int port, int data, unsigned long arg);
-
-#ifdef PCIDMA
-static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
-static int ni_gpct_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
-#endif
-static void handle_gpct_interrupt(struct comedi_device *dev,
-                                 unsigned short counter_index);
-
-static int init_cs5529(struct comedi_device *dev);
-static int cs5529_do_conversion(struct comedi_device *dev,
-                               unsigned short *data);
-static int cs5529_ai_insn_read(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data);
-static void cs5529_config_write(struct comedi_device *dev, unsigned int value,
-                               unsigned int reg_select_bits);
-
-static int ni_m_series_pwm_config(struct comedi_device *dev,
-                                 struct comedi_subdevice *s,
-                                 struct comedi_insn *insn, unsigned int *data);
-static int ni_6143_pwm_config(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data);
-
-static int ni_set_master_clock(struct comedi_device *dev, unsigned source,
-                              unsigned period_ns);
-static void ack_a_interrupt(struct comedi_device *dev, unsigned short a_status);
-static void ack_b_interrupt(struct comedi_device *dev, unsigned short b_status);
-
 enum aimodes {
        AIMODE_NONE = 0,
        AIMODE_HALF_FULL = 1,
@@ -353,12 +246,406 @@ enum timebase_nanoseconds {
 
 static const int num_adc_stages_611x = 3;
 
-static void handle_a_interrupt(struct comedi_device *dev, unsigned short status,
-                              unsigned ai_mite_status);
-static void handle_b_interrupt(struct comedi_device *dev, unsigned short status,
-                              unsigned ao_mite_status);
-static void get_last_sample_611x(struct comedi_device *dev);
-static void get_last_sample_6143(struct comedi_device *dev);
+static void ni_writel(struct comedi_device *dev, uint32_t data, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->mite)
+               writel(data, devpriv->mite->daq_io_addr + reg);
+       else
+               outl(data, dev->iobase + reg);
+}
+
+static void ni_writew(struct comedi_device *dev, uint16_t data, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->mite)
+               writew(data, devpriv->mite->daq_io_addr + reg);
+       else
+               outw(data, dev->iobase + reg);
+}
+
+static void ni_writeb(struct comedi_device *dev, uint8_t data, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->mite)
+               writeb(data, devpriv->mite->daq_io_addr + reg);
+       else
+               outb(data, dev->iobase + reg);
+}
+
+static uint32_t ni_readl(struct comedi_device *dev, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->mite)
+               return readl(devpriv->mite->daq_io_addr + reg);
+       else
+               return inl(dev->iobase + reg);
+}
+
+static uint16_t ni_readw(struct comedi_device *dev, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->mite)
+               return readw(devpriv->mite->daq_io_addr + reg);
+       else
+               return inw(dev->iobase + reg);
+}
+
+static uint8_t ni_readb(struct comedi_device *dev, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->mite)
+               return readb(devpriv->mite->daq_io_addr + reg);
+       else
+               return inb(dev->iobase + reg);
+}
+
+/*
+ * We automatically take advantage of STC registers that can be
+ * read/written directly in the I/O space of the board.
+ *
+ * The AT-MIO and DAQCard devices map the low 8 STC registers to
+ * iobase+reg*2.
+ *
+ * Most PCIMIO devices also map the low 8 STC registers but the
+ * 611x devices map the read registers to iobase+(addr-1)*2.
+ * For now non-windowed STC access is disabled if a PCIMIO device
+ * is detected (devpriv->mite has been initialized).
+ *
+ * The M series devices do not used windowed registers for the
+ * STC registers. The functions below handle the mapping of the
+ * windowed STC registers to the m series register offsets.
+ */
+
+static void m_series_stc_writel(struct comedi_device *dev,
+                               uint32_t data, int reg)
+{
+       unsigned offset;
+
+       switch (reg) {
+       case AI_SC_Load_A_Registers:
+               offset = M_Offset_AI_SC_Load_A;
+               break;
+       case AI_SI_Load_A_Registers:
+               offset = M_Offset_AI_SI_Load_A;
+               break;
+       case AO_BC_Load_A_Register:
+               offset = M_Offset_AO_BC_Load_A;
+               break;
+       case AO_UC_Load_A_Register:
+               offset = M_Offset_AO_UC_Load_A;
+               break;
+       case AO_UI_Load_A_Register:
+               offset = M_Offset_AO_UI_Load_A;
+               break;
+       case G_Load_A_Register(0):
+               offset = M_Offset_G0_Load_A;
+               break;
+       case G_Load_A_Register(1):
+               offset = M_Offset_G1_Load_A;
+               break;
+       case G_Load_B_Register(0):
+               offset = M_Offset_G0_Load_B;
+               break;
+       case G_Load_B_Register(1):
+               offset = M_Offset_G1_Load_B;
+               break;
+       default:
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch\n",
+                        __func__, reg);
+               return;
+       }
+       ni_writel(dev, data, offset);
+}
+
+static void m_series_stc_writew(struct comedi_device *dev,
+                               uint16_t data, int reg)
+{
+       unsigned offset;
+
+       switch (reg) {
+       case ADC_FIFO_Clear:
+               offset = M_Offset_AI_FIFO_Clear;
+               break;
+       case AI_Command_1_Register:
+               offset = M_Offset_AI_Command_1;
+               break;
+       case AI_Command_2_Register:
+               offset = M_Offset_AI_Command_2;
+               break;
+       case AI_Mode_1_Register:
+               offset = M_Offset_AI_Mode_1;
+               break;
+       case AI_Mode_2_Register:
+               offset = M_Offset_AI_Mode_2;
+               break;
+       case AI_Mode_3_Register:
+               offset = M_Offset_AI_Mode_3;
+               break;
+       case AI_Output_Control_Register:
+               offset = M_Offset_AI_Output_Control;
+               break;
+       case AI_Personal_Register:
+               offset = M_Offset_AI_Personal;
+               break;
+       case AI_SI2_Load_A_Register:
+               /* this is a 32 bit register on m series boards */
+               ni_writel(dev, data, M_Offset_AI_SI2_Load_A);
+               return;
+       case AI_SI2_Load_B_Register:
+               /* this is a 32 bit register on m series boards */
+               ni_writel(dev, data, M_Offset_AI_SI2_Load_B);
+               return;
+       case AI_START_STOP_Select_Register:
+               offset = M_Offset_AI_START_STOP_Select;
+               break;
+       case AI_Trigger_Select_Register:
+               offset = M_Offset_AI_Trigger_Select;
+               break;
+       case Analog_Trigger_Etc_Register:
+               offset = M_Offset_Analog_Trigger_Etc;
+               break;
+       case AO_Command_1_Register:
+               offset = M_Offset_AO_Command_1;
+               break;
+       case AO_Command_2_Register:
+               offset = M_Offset_AO_Command_2;
+               break;
+       case AO_Mode_1_Register:
+               offset = M_Offset_AO_Mode_1;
+               break;
+       case AO_Mode_2_Register:
+               offset = M_Offset_AO_Mode_2;
+               break;
+       case AO_Mode_3_Register:
+               offset = M_Offset_AO_Mode_3;
+               break;
+       case AO_Output_Control_Register:
+               offset = M_Offset_AO_Output_Control;
+               break;
+       case AO_Personal_Register:
+               offset = M_Offset_AO_Personal;
+               break;
+       case AO_Start_Select_Register:
+               offset = M_Offset_AO_Start_Select;
+               break;
+       case AO_Trigger_Select_Register:
+               offset = M_Offset_AO_Trigger_Select;
+               break;
+       case Clock_and_FOUT_Register:
+               offset = M_Offset_Clock_and_FOUT;
+               break;
+       case Configuration_Memory_Clear:
+               offset = M_Offset_Configuration_Memory_Clear;
+               break;
+       case DAC_FIFO_Clear:
+               offset = M_Offset_AO_FIFO_Clear;
+               break;
+       case DIO_Control_Register:
+               dev_dbg(dev->class_dev,
+                       "%s: FIXME: register 0x%x does not map cleanly on to m-series boards\n",
+                       __func__, reg);
+               return;
+       case G_Autoincrement_Register(0):
+               offset = M_Offset_G0_Autoincrement;
+               break;
+       case G_Autoincrement_Register(1):
+               offset = M_Offset_G1_Autoincrement;
+               break;
+       case G_Command_Register(0):
+               offset = M_Offset_G0_Command;
+               break;
+       case G_Command_Register(1):
+               offset = M_Offset_G1_Command;
+               break;
+       case G_Input_Select_Register(0):
+               offset = M_Offset_G0_Input_Select;
+               break;
+       case G_Input_Select_Register(1):
+               offset = M_Offset_G1_Input_Select;
+               break;
+       case G_Mode_Register(0):
+               offset = M_Offset_G0_Mode;
+               break;
+       case G_Mode_Register(1):
+               offset = M_Offset_G1_Mode;
+               break;
+       case Interrupt_A_Ack_Register:
+               offset = M_Offset_Interrupt_A_Ack;
+               break;
+       case Interrupt_A_Enable_Register:
+               offset = M_Offset_Interrupt_A_Enable;
+               break;
+       case Interrupt_B_Ack_Register:
+               offset = M_Offset_Interrupt_B_Ack;
+               break;
+       case Interrupt_B_Enable_Register:
+               offset = M_Offset_Interrupt_B_Enable;
+               break;
+       case Interrupt_Control_Register:
+               offset = M_Offset_Interrupt_Control;
+               break;
+       case IO_Bidirection_Pin_Register:
+               offset = M_Offset_IO_Bidirection_Pin;
+               break;
+       case Joint_Reset_Register:
+               offset = M_Offset_Joint_Reset;
+               break;
+       case RTSI_Trig_A_Output_Register:
+               offset = M_Offset_RTSI_Trig_A_Output;
+               break;
+       case RTSI_Trig_B_Output_Register:
+               offset = M_Offset_RTSI_Trig_B_Output;
+               break;
+       case RTSI_Trig_Direction_Register:
+               offset = M_Offset_RTSI_Trig_Direction;
+               break;
+       /*
+        * FIXME: DIO_Output_Register (16 bit reg) is replaced by
+        * M_Offset_Static_Digital_Output (32 bit) and
+        * M_Offset_SCXI_Serial_Data_Out (8 bit)
+        */
+       default:
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch\n",
+                        __func__, reg);
+               return;
+       }
+       ni_writew(dev, data, offset);
+}
+
+static uint32_t m_series_stc_readl(struct comedi_device *dev, int reg)
+{
+       unsigned offset;
+
+       switch (reg) {
+       case G_HW_Save_Register(0):
+               offset = M_Offset_G0_HW_Save;
+               break;
+       case G_HW_Save_Register(1):
+               offset = M_Offset_G1_HW_Save;
+               break;
+       case G_Save_Register(0):
+               offset = M_Offset_G0_Save;
+               break;
+       case G_Save_Register(1):
+               offset = M_Offset_G1_Save;
+               break;
+       default:
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch\n",
+                        __func__, reg);
+               return 0;
+       }
+       return ni_readl(dev, offset);
+}
+
+static uint16_t m_series_stc_readw(struct comedi_device *dev, int reg)
+{
+       unsigned offset;
+
+       switch (reg) {
+       case AI_Status_1_Register:
+               offset = M_Offset_AI_Status_1;
+               break;
+       case AO_Status_1_Register:
+               offset = M_Offset_AO_Status_1;
+               break;
+       case AO_Status_2_Register:
+               offset = M_Offset_AO_Status_2;
+               break;
+       case DIO_Serial_Input_Register:
+               return ni_readb(dev, M_Offset_SCXI_Serial_Data_In);
+       case Joint_Status_1_Register:
+               offset = M_Offset_Joint_Status_1;
+               break;
+       case Joint_Status_2_Register:
+               offset = M_Offset_Joint_Status_2;
+               break;
+       case G_Status_Register:
+               offset = M_Offset_G01_Status;
+               break;
+       default:
+               dev_warn(dev->class_dev,
+                        "%s: bug! unhandled register=0x%x in switch\n",
+                        __func__, reg);
+               return 0;
+       }
+       return ni_readw(dev, offset);
+}
+
+static void ni_stc_writew(struct comedi_device *dev, uint16_t data, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+       unsigned long flags;
+
+       if (devpriv->is_m_series) {
+               m_series_stc_writew(dev, data, reg);
+       } else {
+               spin_lock_irqsave(&devpriv->window_lock, flags);
+               if (!devpriv->mite && reg < 8) {
+                       ni_writew(dev, data, reg * 2);
+               } else {
+                       ni_writew(dev, reg, Window_Address);
+                       ni_writew(dev, data, Window_Data);
+               }
+               spin_unlock_irqrestore(&devpriv->window_lock, flags);
+       }
+}
+
+static void ni_stc_writel(struct comedi_device *dev, uint32_t data, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->is_m_series) {
+               m_series_stc_writel(dev, data, reg);
+       } else {
+               ni_stc_writew(dev, data >> 16, reg);
+               ni_stc_writew(dev, data & 0xffff, reg + 1);
+       }
+}
+
+static uint16_t ni_stc_readw(struct comedi_device *dev, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+       unsigned long flags;
+       uint16_t val;
+
+       if (devpriv->is_m_series) {
+               val = m_series_stc_readw(dev, reg);
+       } else {
+               spin_lock_irqsave(&devpriv->window_lock, flags);
+               if (!devpriv->mite && reg < 8) {
+                       val = ni_readw(dev, reg * 2);
+               } else {
+                       ni_writew(dev, reg, Window_Address);
+                       val = ni_readw(dev, Window_Data);
+               }
+               spin_unlock_irqrestore(&devpriv->window_lock, flags);
+       }
+       return val;
+}
+
+static uint32_t ni_stc_readl(struct comedi_device *dev, int reg)
+{
+       struct ni_private *devpriv = dev->private;
+       uint32_t val;
+
+       if (devpriv->is_m_series) {
+               val = m_series_stc_readl(dev, reg);
+       } else {
+               val = ni_stc_readw(dev, reg) << 16;
+               val |= ni_stc_readw(dev, reg + 1);
+       }
+       return val;
+}
 
 static inline void ni_set_bitfield(struct comedi_device *dev, int reg,
                                   unsigned bit_mask, unsigned bit_values)
@@ -371,30 +658,30 @@ static inline void ni_set_bitfield(struct comedi_device *dev, int reg,
        case Interrupt_A_Enable_Register:
                devpriv->int_a_enable_reg &= ~bit_mask;
                devpriv->int_a_enable_reg |= bit_values & bit_mask;
-               devpriv->stc_writew(dev, devpriv->int_a_enable_reg,
-                                   Interrupt_A_Enable_Register);
+               ni_stc_writew(dev, devpriv->int_a_enable_reg,
+                             Interrupt_A_Enable_Register);
                break;
        case Interrupt_B_Enable_Register:
                devpriv->int_b_enable_reg &= ~bit_mask;
                devpriv->int_b_enable_reg |= bit_values & bit_mask;
-               devpriv->stc_writew(dev, devpriv->int_b_enable_reg,
-                                   Interrupt_B_Enable_Register);
+               ni_stc_writew(dev, devpriv->int_b_enable_reg,
+                             Interrupt_B_Enable_Register);
                break;
        case IO_Bidirection_Pin_Register:
                devpriv->io_bidirection_pin_reg &= ~bit_mask;
                devpriv->io_bidirection_pin_reg |= bit_values & bit_mask;
-               devpriv->stc_writew(dev, devpriv->io_bidirection_pin_reg,
-                                   IO_Bidirection_Pin_Register);
+               ni_stc_writew(dev, devpriv->io_bidirection_pin_reg,
+                             IO_Bidirection_Pin_Register);
                break;
        case AI_AO_Select:
                devpriv->ai_ao_select_reg &= ~bit_mask;
                devpriv->ai_ao_select_reg |= bit_values & bit_mask;
-               ni_writeb(devpriv->ai_ao_select_reg, AI_AO_Select);
+               ni_writeb(dev, devpriv->ai_ao_select_reg, AI_AO_Select);
                break;
        case G0_G1_Select:
                devpriv->g0_g1_select_reg &= ~bit_mask;
                devpriv->g0_g1_select_reg |= bit_values & bit_mask;
-               ni_writeb(devpriv->g0_g1_select_reg, G0_G1_Select);
+               ni_writeb(dev, devpriv->g0_g1_select_reg, G0_G1_Select);
                break;
        default:
                printk("Warning %s() called with invalid register\n", __func__);
@@ -406,8 +693,6 @@ static inline void ni_set_bitfield(struct comedi_device *dev, int reg,
 }
 
 #ifdef PCIDMA
-static int ni_ai_drain_dma(struct comedi_device *dev);
-
 /* DMA channel setup */
 
 /* negative channel means no channel */
@@ -472,7 +757,7 @@ static inline void ni_set_cdo_dma_channel(struct comedi_device *dev,
                    (ni_stc_dma_channel_select_bitfield(mite_channel) <<
                     CDO_DMA_Select_Shift) & CDO_DMA_Select_Mask;
        }
-       ni_writeb(devpriv->cdio_dma_select_reg, M_Offset_CDIO_DMA_Select);
+       ni_writeb(dev, devpriv->cdio_dma_select_reg, M_Offset_CDIO_DMA_Select);
        mmiowb();
        spin_unlock_irqrestore(&devpriv->soft_reg_copy_lock, flags);
 }
@@ -643,56 +928,47 @@ static void ni_release_cdo_mite_channel(struct comedi_device *dev)
 #endif /*  PCIDMA */
 }
 
-/* e-series boards use the second irq signals to generate dma requests for their counters */
 #ifdef PCIDMA
 static void ni_e_series_enable_second_irq(struct comedi_device *dev,
                                          unsigned gpct_index, short enable)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
+       uint16_t val = 0;
+       int reg;
 
-       if (board->reg_type & ni_reg_m_series_mask)
+       if (devpriv->is_m_series || gpct_index > 1)
                return;
-       switch (gpct_index) {
-       case 0:
-               if (enable) {
-                       devpriv->stc_writew(dev, G0_Gate_Second_Irq_Enable,
-                                           Second_IRQ_A_Enable_Register);
-               } else {
-                       devpriv->stc_writew(dev, 0,
-                                           Second_IRQ_A_Enable_Register);
-               }
-               break;
-       case 1:
-               if (enable) {
-                       devpriv->stc_writew(dev, G1_Gate_Second_Irq_Enable,
-                                           Second_IRQ_B_Enable_Register);
-               } else {
-                       devpriv->stc_writew(dev, 0,
-                                           Second_IRQ_B_Enable_Register);
-               }
-               break;
-       default:
-               BUG();
-               break;
-       }
-}
-#endif /*  PCIDMA */
+
+       /*
+        * e-series boards use the second irq signals to generate
+        * dma requests for their counters
+        */
+       if (gpct_index == 0) {
+               reg = Second_IRQ_A_Enable_Register;
+               if (enable)
+                       val = G0_Gate_Second_Irq_Enable;
+       } else {
+               reg = Second_IRQ_B_Enable_Register;
+               if (enable)
+                       val = G1_Gate_Second_Irq_Enable;
+       }
+       ni_stc_writew(dev, val, reg);
+}
+#endif /*  PCIDMA */
 
 static void ni_clear_ai_fifo(struct comedi_device *dev)
 {
        const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
        static const int timeout = 10000;
        int i;
 
        if (board->reg_type == ni_reg_6143) {
                /*  Flush the 6143 data FIFO */
-               ni_writel(0x10, AIFIFO_Control_6143);   /*  Flush fifo */
-               ni_writel(0x00, AIFIFO_Control_6143);   /*  Flush fifo */
+               ni_writel(dev, 0x10, AIFIFO_Control_6143);
+               ni_writel(dev, 0x00, AIFIFO_Control_6143);
                /*  Wait for complete */
                for (i = 0; i < timeout; i++) {
-                       if (!(ni_readl(AIFIFO_Status_6143) & 0x10))
+                       if (!(ni_readl(dev, AIFIFO_Status_6143) & 0x10))
                                break;
                        udelay(1);
                }
@@ -700,42 +976,24 @@ static void ni_clear_ai_fifo(struct comedi_device *dev)
                        comedi_error(dev, "FIFO flush timeout.");
                }
        } else {
-               devpriv->stc_writew(dev, 1, ADC_FIFO_Clear);
+               ni_stc_writew(dev, 1, ADC_FIFO_Clear);
                if (board->reg_type == ni_reg_625x) {
-                       ni_writeb(0, M_Offset_Static_AI_Control(0));
-                       ni_writeb(1, M_Offset_Static_AI_Control(0));
+                       ni_writeb(dev, 0, M_Offset_Static_AI_Control(0));
+                       ni_writeb(dev, 1, M_Offset_Static_AI_Control(0));
 #if 0
                        /* the NI example code does 3 convert pulses for 625x boards,
                           but that appears to be wrong in practice. */
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
 #endif
                }
        }
 }
 
-static void win_out2(struct comedi_device *dev, uint32_t data, int reg)
-{
-       struct ni_private *devpriv = dev->private;
-
-       devpriv->stc_writew(dev, data >> 16, reg);
-       devpriv->stc_writew(dev, data & 0xffff, reg + 1);
-}
-
-static uint32_t win_in2(struct comedi_device *dev, int reg)
-{
-       struct ni_private *devpriv = dev->private;
-       uint32_t bits;
-
-       bits = devpriv->stc_readw(dev, reg) << 16;
-       bits |= devpriv->stc_readw(dev, reg + 1);
-       return bits;
-}
-
 #define ao_win_out(data, addr) ni_ao_win_outw(dev, data, addr)
 static inline void ni_ao_win_outw(struct comedi_device *dev, uint16_t data,
                                  int addr)
@@ -744,8 +1002,8 @@ static inline void ni_ao_win_outw(struct comedi_device *dev, uint16_t data,
        unsigned long flags;
 
        spin_lock_irqsave(&devpriv->window_lock, flags);
-       ni_writew(addr, AO_Window_Address_611x);
-       ni_writew(data, AO_Window_Data_611x);
+       ni_writew(dev, addr, AO_Window_Address_611x);
+       ni_writew(dev, data, AO_Window_Data_611x);
        spin_unlock_irqrestore(&devpriv->window_lock, flags);
 }
 
@@ -756,8 +1014,8 @@ static inline void ni_ao_win_outl(struct comedi_device *dev, uint32_t data,
        unsigned long flags;
 
        spin_lock_irqsave(&devpriv->window_lock, flags);
-       ni_writew(addr, AO_Window_Address_611x);
-       ni_writel(data, AO_Window_Data_611x);
+       ni_writew(dev, addr, AO_Window_Address_611x);
+       ni_writel(dev, data, AO_Window_Data_611x);
        spin_unlock_irqrestore(&devpriv->window_lock, flags);
 }
 
@@ -768,8 +1026,8 @@ static inline unsigned short ni_ao_win_inw(struct comedi_device *dev, int addr)
        unsigned short data;
 
        spin_lock_irqsave(&devpriv->window_lock, flags);
-       ni_writew(addr, AO_Window_Address_611x);
-       data = ni_readw(AO_Window_Data_611x);
+       ni_writew(dev, addr, AO_Window_Address_611x);
+       data = ni_readw(dev, AO_Window_Data_611x);
        spin_unlock_irqrestore(&devpriv->window_lock, flags);
        return data;
 }
@@ -796,83 +1054,58 @@ static inline void ni_set_bits(struct comedi_device *dev, int reg,
        ni_set_bitfield(dev, reg, bits, bit_values);
 }
 
-static irqreturn_t ni_E_interrupt(int irq, void *d)
+#ifdef PCIDMA
+static void ni_sync_ai_dma(struct comedi_device *dev)
 {
-       struct comedi_device *dev = d;
        struct ni_private *devpriv = dev->private;
-       unsigned short a_status;
-       unsigned short b_status;
-       unsigned int ai_mite_status = 0;
-       unsigned int ao_mite_status = 0;
+       struct comedi_subdevice *s = dev->read_subdev;
        unsigned long flags;
-#ifdef PCIDMA
-       struct mite_struct *mite = devpriv->mite;
-#endif
-
-       if (!dev->attached)
-               return IRQ_NONE;
-       smp_mb();               /*  make sure dev->attached is checked before handler does anything else. */
-
-       /*  lock to avoid race with comedi_poll */
-       spin_lock_irqsave(&dev->spinlock, flags);
-       a_status = devpriv->stc_readw(dev, AI_Status_1_Register);
-       b_status = devpriv->stc_readw(dev, AO_Status_1_Register);
-#ifdef PCIDMA
-       if (mite) {
-               unsigned long flags_too;
-
-               spin_lock_irqsave(&devpriv->mite_channel_lock, flags_too);
-               if (devpriv->ai_mite_chan) {
-                       ai_mite_status = mite_get_status(devpriv->ai_mite_chan);
-                       if (ai_mite_status & CHSR_LINKC)
-                               writel(CHOR_CLRLC,
-                                      devpriv->mite->mite_io_addr +
-                                      MITE_CHOR(devpriv->
-                                                ai_mite_chan->channel));
-               }
-               if (devpriv->ao_mite_chan) {
-                       ao_mite_status = mite_get_status(devpriv->ao_mite_chan);
-                       if (ao_mite_status & CHSR_LINKC)
-                               writel(CHOR_CLRLC,
-                                      mite->mite_io_addr +
-                                      MITE_CHOR(devpriv->
-                                                ao_mite_chan->channel));
-               }
-               spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags_too);
-       }
-#endif
-       ack_a_interrupt(dev, a_status);
-       ack_b_interrupt(dev, b_status);
-       if ((a_status & Interrupt_A_St) || (ai_mite_status & CHSR_INT))
-               handle_a_interrupt(dev, a_status, ai_mite_status);
-       if ((b_status & Interrupt_B_St) || (ao_mite_status & CHSR_INT))
-               handle_b_interrupt(dev, b_status, ao_mite_status);
-       handle_gpct_interrupt(dev, 0);
-       handle_gpct_interrupt(dev, 1);
-       handle_cdio_interrupt(dev);
 
-       spin_unlock_irqrestore(&dev->spinlock, flags);
-       return IRQ_HANDLED;
+       spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
+       if (devpriv->ai_mite_chan)
+               mite_sync_input_dma(devpriv->ai_mite_chan, s);
+       spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 }
 
-#ifdef PCIDMA
-static void ni_sync_ai_dma(struct comedi_device *dev)
+static int ni_ai_drain_dma(struct comedi_device *dev)
 {
        struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
+       int i;
+       static const int timeout = 10000;
        unsigned long flags;
+       int retval = 0;
 
        spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
-       if (devpriv->ai_mite_chan)
-               mite_sync_input_dma(devpriv->ai_mite_chan, s);
+       if (devpriv->ai_mite_chan) {
+               for (i = 0; i < timeout; i++) {
+                       if ((ni_stc_readw(dev, AI_Status_1_Register) &
+                            AI_FIFO_Empty_St)
+                           && mite_bytes_in_transit(devpriv->ai_mite_chan) ==
+                           0)
+                               break;
+                       udelay(5);
+               }
+               if (i == timeout) {
+                       printk("ni_mio_common: wait for dma drain timed out\n");
+                       printk
+                           ("mite_bytes_in_transit=%i, AI_Status1_Register=0x%x\n",
+                            mite_bytes_in_transit(devpriv->ai_mite_chan),
+                            ni_stc_readw(dev, AI_Status_1_Register));
+                       retval = -1;
+               }
+       }
        spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
+
+       ni_sync_ai_dma(dev);
+
+       return retval;
 }
 
 static void mite_handle_b_linkc(struct mite_struct *mite,
                                struct comedi_device *dev)
 {
        struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AO_SUBDEV];
+       struct comedi_subdevice *s = dev->write_subdev;
        unsigned long flags;
 
        spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
@@ -883,13 +1116,12 @@ static void mite_handle_b_linkc(struct mite_struct *mite,
 
 static int ni_ao_wait_for_dma_load(struct comedi_device *dev)
 {
-       struct ni_private *devpriv = dev->private;
        static const int timeout = 10000;
        int i;
        for (i = 0; i < timeout; i++) {
                unsigned short b_status;
 
-               b_status = devpriv->stc_readw(dev, AO_Status_1_Register);
+               b_status = ni_stc_readw(dev, AO_Status_1_Register);
                if (b_status & AO_FIFO_Half_Full_St)
                        break;
                /* if we poll too often, the pci bus activity seems
@@ -902,89 +1134,379 @@ static int ni_ao_wait_for_dma_load(struct comedi_device *dev)
        }
        return 0;
 }
-
 #endif /* PCIDMA */
-static void ni_handle_eos(struct comedi_device *dev, struct comedi_subdevice *s)
+
+#ifndef PCIDMA
+
+static void ni_ao_fifo_load(struct comedi_device *dev,
+                           struct comedi_subdevice *s, int n)
 {
-       struct ni_private *devpriv = dev->private;
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct comedi_async *async = s->async;
+       struct comedi_cmd *cmd = &async->cmd;
+       int chan;
+       int i;
+       unsigned short d;
+       u32 packed_data;
+       int range;
+       int err = 1;
 
-       if (devpriv->aimode == AIMODE_SCAN) {
-#ifdef PCIDMA
-               static const int timeout = 10;
-               int i;
+       chan = async->cur_chan;
+       for (i = 0; i < n; i++) {
+               err &= comedi_buf_get(s, &d);
+               if (err == 0)
+                       break;
 
-               for (i = 0; i < timeout; i++) {
-                       ni_sync_ai_dma(dev);
-                       if ((s->async->events & COMEDI_CB_EOS))
-                               break;
-                       udelay(1);
+               range = CR_RANGE(cmd->chanlist[chan]);
+
+               if (board->reg_type & ni_reg_6xxx_mask) {
+                       packed_data = d & 0xffff;
+                       /* 6711 only has 16 bit wide ao fifo */
+                       if (board->reg_type != ni_reg_6711) {
+                               err &= comedi_buf_get(s, &d);
+                               if (err == 0)
+                                       break;
+                               chan++;
+                               i++;
+                               packed_data |= (d << 16) & 0xffff0000;
+                       }
+                       ni_writel(dev, packed_data, DAC_FIFO_Data_611x);
+               } else {
+                       ni_writew(dev, d, DAC_FIFO_Data);
                }
-#else
-               ni_handle_fifo_dregs(dev);
-               s->async->events |= COMEDI_CB_EOS;
-#endif
+               chan++;
+               chan %= cmd->chanlist_len;
        }
-       /* handle special case of single scan using AI_End_On_End_Of_Scan */
-       if ((devpriv->ai_cmd2 & AI_End_On_End_Of_Scan))
-               shutdown_ai_command(dev);
+       async->cur_chan = chan;
+       if (err == 0)
+               async->events |= COMEDI_CB_OVERFLOW;
 }
 
-static void shutdown_ai_command(struct comedi_device *dev)
+/*
+ *  There's a small problem if the FIFO gets really low and we
+ *  don't have the data to fill it.  Basically, if after we fill
+ *  the FIFO with all the data available, the FIFO is _still_
+ *  less than half full, we never clear the interrupt.  If the
+ *  IRQ is in edge mode, we never get another interrupt, because
+ *  this one wasn't cleared.  If in level mode, we get flooded
+ *  with interrupts that we can't fulfill, because nothing ever
+ *  gets put into the buffer.
+ *
+ *  This kind of situation is recoverable, but it is easier to
+ *  just pretend we had a FIFO underrun, since there is a good
+ *  chance it will happen anyway.  This is _not_ the case for
+ *  RT code, as RT code might purposely be running close to the
+ *  metal.  Needs to be fixed eventually.
+ */
+static int ni_ao_fifo_half_empty(struct comedi_device *dev,
+                                struct comedi_subdevice *s)
 {
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
+       const struct ni_board_struct *board = comedi_board(dev);
+       int n;
 
-#ifdef PCIDMA
-       ni_ai_drain_dma(dev);
-#endif
-       ni_handle_fifo_dregs(dev);
-       get_last_sample_611x(dev);
-       get_last_sample_6143(dev);
+       n = comedi_buf_read_n_available(s);
+       if (n == 0) {
+               s->async->events |= COMEDI_CB_OVERFLOW;
+               return 0;
+       }
 
-       s->async->events |= COMEDI_CB_EOA;
-}
+       n /= sizeof(short);
+       if (n > board->ao_fifo_depth / 2)
+               n = board->ao_fifo_depth / 2;
 
-static void handle_gpct_interrupt(struct comedi_device *dev,
-                                 unsigned short counter_index)
-{
-#ifdef PCIDMA
-       struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s;
+       ni_ao_fifo_load(dev, s, n);
 
-       s = &dev->subdevices[NI_GPCT_SUBDEV(counter_index)];
+       s->async->events |= COMEDI_CB_BLOCK;
 
-       ni_tio_handle_interrupt(&devpriv->counter_dev->counters[counter_index],
-                               s);
-       cfc_handle_events(dev, s);
-#endif
+       return 1;
 }
 
-static void ack_a_interrupt(struct comedi_device *dev, unsigned short a_status)
+static int ni_ao_prep_fifo(struct comedi_device *dev,
+                          struct comedi_subdevice *s)
 {
-       struct ni_private *devpriv = dev->private;
-       unsigned short ack = 0;
+       const struct ni_board_struct *board = comedi_board(dev);
+       int n;
 
-       if (a_status & AI_SC_TC_St)
-               ack |= AI_SC_TC_Interrupt_Ack;
-       if (a_status & AI_START1_St)
-               ack |= AI_START1_Interrupt_Ack;
-       if (a_status & AI_START_St)
-               ack |= AI_START_Interrupt_Ack;
-       if (a_status & AI_STOP_St)
-               /* not sure why we used to ack the START here also, instead of doing it independently. Frank Hess 2007-07-06 */
-               ack |= AI_STOP_Interrupt_Ack /*| AI_START_Interrupt_Ack */;
-       if (ack)
-               devpriv->stc_writew(dev, ack, Interrupt_A_Ack_Register);
+       /* reset fifo */
+       ni_stc_writew(dev, 1, DAC_FIFO_Clear);
+       if (board->reg_type & ni_reg_6xxx_mask)
+               ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
+
+       /* load some data */
+       n = comedi_buf_read_n_available(s);
+       if (n == 0)
+               return 0;
+
+       n /= sizeof(short);
+       if (n > board->ao_fifo_depth)
+               n = board->ao_fifo_depth;
+
+       ni_ao_fifo_load(dev, s, n);
+
+       return n;
 }
 
-static void handle_a_interrupt(struct comedi_device *dev, unsigned short status,
-                              unsigned ai_mite_status)
+static void ni_ai_fifo_read(struct comedi_device *dev,
+                           struct comedi_subdevice *s, int n)
 {
+       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
-
-       /* 67xx boards don't have ai subdevice, but their gpct0 might generate an a interrupt */
-       if (s->type == COMEDI_SUBD_UNUSED)
-               return;
+       struct comedi_async *async = s->async;
+       int i;
+
+       if (board->reg_type == ni_reg_611x) {
+               unsigned short data[2];
+               u32 dl;
+
+               for (i = 0; i < n / 2; i++) {
+                       dl = ni_readl(dev, ADC_FIFO_Data_611x);
+                       /* This may get the hi/lo data in the wrong order */
+                       data[0] = (dl >> 16) & 0xffff;
+                       data[1] = dl & 0xffff;
+                       cfc_write_array_to_buffer(s, data, sizeof(data));
+               }
+               /* Check if there's a single sample stuck in the FIFO */
+               if (n % 2) {
+                       dl = ni_readl(dev, ADC_FIFO_Data_611x);
+                       data[0] = dl & 0xffff;
+                       cfc_write_to_buffer(s, data[0]);
+               }
+       } else if (board->reg_type == ni_reg_6143) {
+               unsigned short data[2];
+               u32 dl;
+
+               /*  This just reads the FIFO assuming the data is present, no checks on the FIFO status are performed */
+               for (i = 0; i < n / 2; i++) {
+                       dl = ni_readl(dev, AIFIFO_Data_6143);
+
+                       data[0] = (dl >> 16) & 0xffff;
+                       data[1] = dl & 0xffff;
+                       cfc_write_array_to_buffer(s, data, sizeof(data));
+               }
+               if (n % 2) {
+                       /* Assume there is a single sample stuck in the FIFO */
+                       /* Get stranded sample into FIFO */
+                       ni_writel(dev, 0x01, AIFIFO_Control_6143);
+                       dl = ni_readl(dev, AIFIFO_Data_6143);
+                       data[0] = (dl >> 16) & 0xffff;
+                       cfc_write_to_buffer(s, data[0]);
+               }
+       } else {
+               if (n > sizeof(devpriv->ai_fifo_buffer) /
+                   sizeof(devpriv->ai_fifo_buffer[0])) {
+                       comedi_error(dev, "bug! ai_fifo_buffer too small");
+                       async->events |= COMEDI_CB_ERROR;
+                       return;
+               }
+               for (i = 0; i < n; i++) {
+                       devpriv->ai_fifo_buffer[i] =
+                           ni_readw(dev, ADC_FIFO_Data_Register);
+               }
+               cfc_write_array_to_buffer(s, devpriv->ai_fifo_buffer,
+                                         n *
+                                         sizeof(devpriv->ai_fifo_buffer[0]));
+       }
+}
+
+static void ni_handle_fifo_half_full(struct comedi_device *dev)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct comedi_subdevice *s = dev->read_subdev;
+       int n;
+
+       n = board->ai_fifo_depth / 2;
+
+       ni_ai_fifo_read(dev, s, n);
+}
+#endif
+
+/*
+   Empties the AI fifo
+*/
+static void ni_handle_fifo_dregs(struct comedi_device *dev)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv = dev->private;
+       struct comedi_subdevice *s = dev->read_subdev;
+       unsigned short data[2];
+       u32 dl;
+       unsigned short fifo_empty;
+       int i;
+
+       if (board->reg_type == ni_reg_611x) {
+               while ((ni_stc_readw(dev, AI_Status_1_Register) &
+                       AI_FIFO_Empty_St) == 0) {
+                       dl = ni_readl(dev, ADC_FIFO_Data_611x);
+
+                       /* This may get the hi/lo data in the wrong order */
+                       data[0] = (dl >> 16);
+                       data[1] = (dl & 0xffff);
+                       cfc_write_array_to_buffer(s, data, sizeof(data));
+               }
+       } else if (board->reg_type == ni_reg_6143) {
+               i = 0;
+               while (ni_readl(dev, AIFIFO_Status_6143) & 0x04) {
+                       dl = ni_readl(dev, AIFIFO_Data_6143);
+
+                       /* This may get the hi/lo data in the wrong order */
+                       data[0] = (dl >> 16);
+                       data[1] = (dl & 0xffff);
+                       cfc_write_array_to_buffer(s, data, sizeof(data));
+                       i += 2;
+               }
+               /*  Check if stranded sample is present */
+               if (ni_readl(dev, AIFIFO_Status_6143) & 0x01) {
+                       /* Get stranded sample into FIFO */
+                       ni_writel(dev, 0x01, AIFIFO_Control_6143);
+                       dl = ni_readl(dev, AIFIFO_Data_6143);
+                       data[0] = (dl >> 16) & 0xffff;
+                       cfc_write_to_buffer(s, data[0]);
+               }
+
+       } else {
+               fifo_empty = ni_stc_readw(dev, AI_Status_1_Register) &
+                            AI_FIFO_Empty_St;
+               while (fifo_empty == 0) {
+                       for (i = 0;
+                            i <
+                            sizeof(devpriv->ai_fifo_buffer) /
+                            sizeof(devpriv->ai_fifo_buffer[0]); i++) {
+                               fifo_empty = ni_stc_readw(dev,
+                                                         AI_Status_1_Register) &
+                                               AI_FIFO_Empty_St;
+                               if (fifo_empty)
+                                       break;
+                               devpriv->ai_fifo_buffer[i] =
+                                   ni_readw(dev, ADC_FIFO_Data_Register);
+                       }
+                       cfc_write_array_to_buffer(s, devpriv->ai_fifo_buffer,
+                                                 i *
+                                                 sizeof(devpriv->
+                                                        ai_fifo_buffer[0]));
+               }
+       }
+}
+
+static void get_last_sample_611x(struct comedi_device *dev)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct comedi_subdevice *s = dev->read_subdev;
+       unsigned short data;
+       u32 dl;
+
+       if (board->reg_type != ni_reg_611x)
+               return;
+
+       /* Check if there's a single sample stuck in the FIFO */
+       if (ni_readb(dev, XXX_Status) & 0x80) {
+               dl = ni_readl(dev, ADC_FIFO_Data_611x);
+               data = (dl & 0xffff);
+               cfc_write_to_buffer(s, data);
+       }
+}
+
+static void get_last_sample_6143(struct comedi_device *dev)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct comedi_subdevice *s = dev->read_subdev;
+       unsigned short data;
+       u32 dl;
+
+       if (board->reg_type != ni_reg_6143)
+               return;
+
+       /* Check if there's a single sample stuck in the FIFO */
+       if (ni_readl(dev, AIFIFO_Status_6143) & 0x01) {
+               /* Get stranded sample into FIFO */
+               ni_writel(dev, 0x01, AIFIFO_Control_6143);
+               dl = ni_readl(dev, AIFIFO_Data_6143);
+
+               /* This may get the hi/lo data in the wrong order */
+               data = (dl >> 16) & 0xffff;
+               cfc_write_to_buffer(s, data);
+       }
+}
+
+static void shutdown_ai_command(struct comedi_device *dev)
+{
+       struct comedi_subdevice *s = dev->read_subdev;
+
+#ifdef PCIDMA
+       ni_ai_drain_dma(dev);
+#endif
+       ni_handle_fifo_dregs(dev);
+       get_last_sample_611x(dev);
+       get_last_sample_6143(dev);
+
+       s->async->events |= COMEDI_CB_EOA;
+}
+
+static void ni_handle_eos(struct comedi_device *dev, struct comedi_subdevice *s)
+{
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->aimode == AIMODE_SCAN) {
+#ifdef PCIDMA
+               static const int timeout = 10;
+               int i;
+
+               for (i = 0; i < timeout; i++) {
+                       ni_sync_ai_dma(dev);
+                       if ((s->async->events & COMEDI_CB_EOS))
+                               break;
+                       udelay(1);
+               }
+#else
+               ni_handle_fifo_dregs(dev);
+               s->async->events |= COMEDI_CB_EOS;
+#endif
+       }
+       /* handle special case of single scan using AI_End_On_End_Of_Scan */
+       if ((devpriv->ai_cmd2 & AI_End_On_End_Of_Scan))
+               shutdown_ai_command(dev);
+}
+
+static void handle_gpct_interrupt(struct comedi_device *dev,
+                                 unsigned short counter_index)
+{
+#ifdef PCIDMA
+       struct ni_private *devpriv = dev->private;
+       struct comedi_subdevice *s;
+
+       s = &dev->subdevices[NI_GPCT_SUBDEV(counter_index)];
+
+       ni_tio_handle_interrupt(&devpriv->counter_dev->counters[counter_index],
+                               s);
+       cfc_handle_events(dev, s);
+#endif
+}
+
+static void ack_a_interrupt(struct comedi_device *dev, unsigned short a_status)
+{
+       unsigned short ack = 0;
+
+       if (a_status & AI_SC_TC_St)
+               ack |= AI_SC_TC_Interrupt_Ack;
+       if (a_status & AI_START1_St)
+               ack |= AI_START1_Interrupt_Ack;
+       if (a_status & AI_START_St)
+               ack |= AI_START_Interrupt_Ack;
+       if (a_status & AI_STOP_St)
+               /* not sure why we used to ack the START here also, instead of doing it independently. Frank Hess 2007-07-06 */
+               ack |= AI_STOP_Interrupt_Ack /*| AI_START_Interrupt_Ack */;
+       if (ack)
+               ni_stc_writew(dev, ack, Interrupt_A_Ack_Register);
+}
+
+static void handle_a_interrupt(struct comedi_device *dev, unsigned short status,
+                              unsigned ai_mite_status)
+{
+       struct ni_private *devpriv = dev->private;
+       struct comedi_subdevice *s = dev->read_subdev;
+
+       /* 67xx boards don't have ai subdevice, but their gpct0 might generate an a interrupt */
+       if (s->type == COMEDI_SUBD_UNUSED)
+               return;
 
 #ifdef PCIDMA
        if (ai_mite_status & CHSR_LINKC)
@@ -1043,8 +1565,7 @@ static void handle_a_interrupt(struct comedi_device *dev, unsigned short status,
                 *fail to get the fifo less than half full, so loop to be sure.*/
                for (i = 0; i < timeout; ++i) {
                        ni_handle_fifo_half_full(dev);
-                       if ((devpriv->stc_readw(dev,
-                                               AI_Status_1_Register) &
+                       if ((ni_stc_readw(dev, AI_Status_1_Register) &
                             AI_FIFO_Half_Full_St) == 0)
                                break;
                }
@@ -1059,7 +1580,6 @@ static void handle_a_interrupt(struct comedi_device *dev, unsigned short status,
 
 static void ack_b_interrupt(struct comedi_device *dev, unsigned short b_status)
 {
-       struct ni_private *devpriv = dev->private;
        unsigned short ack = 0;
 
        if (b_status & AO_BC_TC_St)
@@ -1077,20 +1597,22 @@ static void ack_b_interrupt(struct comedi_device *dev, unsigned short b_status)
        if (b_status & AO_UPDATE_St)
                ack |= AO_UPDATE_Interrupt_Ack;
        if (ack)
-               devpriv->stc_writew(dev, ack, Interrupt_B_Ack_Register);
+               ni_stc_writew(dev, ack, Interrupt_B_Ack_Register);
 }
 
 static void handle_b_interrupt(struct comedi_device *dev,
                               unsigned short b_status, unsigned ao_mite_status)
 {
-       struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AO_SUBDEV];
+       struct comedi_subdevice *s = dev->write_subdev;
        /* unsigned short ack=0; */
 
 #ifdef PCIDMA
        /* Currently, mite.c requires us to handle LINKC */
-       if (ao_mite_status & CHSR_LINKC)
+       if (ao_mite_status & CHSR_LINKC) {
+               struct ni_private *devpriv = dev->private;
+
                mite_handle_b_linkc(devpriv->mite, dev);
+       }
 
        if (ao_mite_status & ~(CHSR_INT | CHSR_LINKC | CHSR_DONE | CHSR_MRDY |
                               CHSR_DRDY | CHSR_DRQ1 | CHSR_DRQ0 | CHSR_ERROR |
@@ -1107,7 +1629,7 @@ static void handle_b_interrupt(struct comedi_device *dev,
        if (b_status & AO_Overrun_St) {
                printk
                    ("ni_mio_common: AO FIFO underrun status=0x%04x status2=0x%04x\n",
-                    b_status, devpriv->stc_readw(dev, AO_Status_2_Register));
+                    b_status, ni_stc_readw(dev, AO_Status_2_Register));
                s->async->events |= COMEDI_CB_OVERFLOW;
        }
 
@@ -1132,560 +1654,483 @@ static void handle_b_interrupt(struct comedi_device *dev,
        cfc_handle_events(dev, s);
 }
 
-#ifndef PCIDMA
-
-static void ni_ao_fifo_load(struct comedi_device *dev,
-                           struct comedi_subdevice *s, int n)
+static void ni_ai_munge(struct comedi_device *dev, struct comedi_subdevice *s,
+                       void *data, unsigned int num_bytes,
+                       unsigned int chan_index)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv = dev->private;
        struct comedi_async *async = s->async;
        struct comedi_cmd *cmd = &async->cmd;
-       int chan;
-       int i;
-       unsigned short d;
-       u32 packed_data;
-       int range;
-       int err = 1;
-
-       chan = async->cur_chan;
-       for (i = 0; i < n; i++) {
-               err &= comedi_buf_get(s, &d);
-               if (err == 0)
-                       break;
-
-               range = CR_RANGE(cmd->chanlist[chan]);
+       unsigned int length = num_bytes / bytes_per_sample(s);
+       unsigned short *array = data;
+       unsigned int *larray = data;
+       unsigned int i;
 
-               if (board->reg_type & ni_reg_6xxx_mask) {
-                       packed_data = d & 0xffff;
-                       /* 6711 only has 16 bit wide ao fifo */
-                       if (board->reg_type != ni_reg_6711) {
-                               err &= comedi_buf_get(s, &d);
-                               if (err == 0)
-                                       break;
-                               chan++;
-                               i++;
-                               packed_data |= (d << 16) & 0xffff0000;
-                       }
-                       ni_writel(packed_data, DAC_FIFO_Data_611x);
-               } else {
-                       ni_writew(d, DAC_FIFO_Data);
-               }
-               chan++;
-               chan %= cmd->chanlist_len;
+       for (i = 0; i < length; i++) {
+#ifdef PCIDMA
+               if (s->subdev_flags & SDF_LSAMPL)
+                       larray[i] = le32_to_cpu(larray[i]);
+               else
+                       array[i] = le16_to_cpu(array[i]);
+#endif
+               if (s->subdev_flags & SDF_LSAMPL)
+                       larray[i] += devpriv->ai_offset[chan_index];
+               else
+                       array[i] += devpriv->ai_offset[chan_index];
+               chan_index++;
+               chan_index %= cmd->chanlist_len;
        }
-       async->cur_chan = chan;
-       if (err == 0)
-               async->events |= COMEDI_CB_OVERFLOW;
 }
 
-/*
- *  There's a small problem if the FIFO gets really low and we
- *  don't have the data to fill it.  Basically, if after we fill
- *  the FIFO with all the data available, the FIFO is _still_
- *  less than half full, we never clear the interrupt.  If the
- *  IRQ is in edge mode, we never get another interrupt, because
- *  this one wasn't cleared.  If in level mode, we get flooded
- *  with interrupts that we can't fulfill, because nothing ever
- *  gets put into the buffer.
- *
- *  This kind of situation is recoverable, but it is easier to
- *  just pretend we had a FIFO underrun, since there is a good
- *  chance it will happen anyway.  This is _not_ the case for
- *  RT code, as RT code might purposely be running close to the
- *  metal.  Needs to be fixed eventually.
- */
-static int ni_ao_fifo_half_empty(struct comedi_device *dev,
-                                struct comedi_subdevice *s)
+#ifdef PCIDMA
+
+static int ni_ai_setup_MITE_dma(struct comedi_device *dev)
 {
        const struct ni_board_struct *board = comedi_board(dev);
-       int n;
+       struct ni_private *devpriv = dev->private;
+       struct comedi_subdevice *s = dev->read_subdev;
+       int retval;
+       unsigned long flags;
 
-       n = comedi_buf_read_n_available(s);
-       if (n == 0) {
-               s->async->events |= COMEDI_CB_OVERFLOW;
-               return 0;
-       }
+       retval = ni_request_ai_mite_channel(dev);
+       if (retval)
+               return retval;
+/* printk("comedi_debug: using mite channel %i for ai.\n", devpriv->ai_mite_chan->channel); */
 
-       n /= sizeof(short);
-       if (n > board->ao_fifo_depth / 2)
-               n = board->ao_fifo_depth / 2;
+       /* write alloc the entire buffer */
+       comedi_buf_write_alloc(s, s->async->prealloc_bufsz);
 
-       ni_ao_fifo_load(dev, s, n);
+       spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
+       if (devpriv->ai_mite_chan == NULL) {
+               spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
+               return -EIO;
+       }
 
-       s->async->events |= COMEDI_CB_BLOCK;
+       switch (board->reg_type) {
+       case ni_reg_611x:
+       case ni_reg_6143:
+               mite_prep_dma(devpriv->ai_mite_chan, 32, 16);
+               break;
+       case ni_reg_628x:
+               mite_prep_dma(devpriv->ai_mite_chan, 32, 32);
+               break;
+       default:
+               mite_prep_dma(devpriv->ai_mite_chan, 16, 16);
+               break;
+       }
+       /*start the MITE */
+       mite_dma_arm(devpriv->ai_mite_chan);
+       spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 
-       return 1;
+       return 0;
 }
 
-static int ni_ao_prep_fifo(struct comedi_device *dev,
-                          struct comedi_subdevice *s)
+static int ni_ao_setup_MITE_dma(struct comedi_device *dev)
 {
        const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
-       int n;
-
-       /* reset fifo */
-       devpriv->stc_writew(dev, 1, DAC_FIFO_Clear);
-       if (board->reg_type & ni_reg_6xxx_mask)
-               ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
+       struct comedi_subdevice *s = dev->write_subdev;
+       int retval;
+       unsigned long flags;
 
-       /* load some data */
-       n = comedi_buf_read_n_available(s);
-       if (n == 0)
-               return 0;
+       retval = ni_request_ao_mite_channel(dev);
+       if (retval)
+               return retval;
 
-       n /= sizeof(short);
-       if (n > board->ao_fifo_depth)
-               n = board->ao_fifo_depth;
+       /* read alloc the entire buffer */
+       comedi_buf_read_alloc(s, s->async->prealloc_bufsz);
 
-       ni_ao_fifo_load(dev, s, n);
+       spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
+       if (devpriv->ao_mite_chan) {
+               if (board->reg_type & (ni_reg_611x | ni_reg_6713)) {
+                       mite_prep_dma(devpriv->ao_mite_chan, 32, 32);
+               } else {
+                       /* doing 32 instead of 16 bit wide transfers from memory
+                          makes the mite do 32 bit pci transfers, doubling pci bandwidth. */
+                       mite_prep_dma(devpriv->ao_mite_chan, 16, 32);
+               }
+               mite_dma_arm(devpriv->ao_mite_chan);
+       } else
+               retval = -EIO;
+       spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 
-       return n;
+       return retval;
 }
 
-static void ni_ai_fifo_read(struct comedi_device *dev,
-                           struct comedi_subdevice *s, int n)
+#endif /*  PCIDMA */
+
+/*
+   used for both cancel ioctl and board initialization
+
+   this is pretty harsh for a cancel, but it works...
+ */
+
+static int ni_ai_reset(struct comedi_device *dev, struct comedi_subdevice *s)
 {
        const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       struct comedi_async *async = s->async;
-       int i;
 
-       if (board->reg_type == ni_reg_611x) {
-               unsigned short data[2];
-               u32 dl;
+       ni_release_ai_mite_channel(dev);
+       /* ai configuration */
+       ni_stc_writew(dev, AI_Configuration_Start | AI_Reset,
+                     Joint_Reset_Register);
 
-               for (i = 0; i < n / 2; i++) {
-                       dl = ni_readl(ADC_FIFO_Data_611x);
-                       /* This may get the hi/lo data in the wrong order */
-                       data[0] = (dl >> 16) & 0xffff;
-                       data[1] = dl & 0xffff;
-                       cfc_write_array_to_buffer(s, data, sizeof(data));
-               }
-               /* Check if there's a single sample stuck in the FIFO */
-               if (n % 2) {
-                       dl = ni_readl(ADC_FIFO_Data_611x);
-                       data[0] = dl & 0xffff;
-                       cfc_write_to_buffer(s, data[0]);
-               }
-       } else if (board->reg_type == ni_reg_6143) {
-               unsigned short data[2];
-               u32 dl;
+       ni_set_bits(dev, Interrupt_A_Enable_Register,
+                   AI_SC_TC_Interrupt_Enable | AI_START1_Interrupt_Enable |
+                   AI_START2_Interrupt_Enable | AI_START_Interrupt_Enable |
+                   AI_STOP_Interrupt_Enable | AI_Error_Interrupt_Enable |
+                   AI_FIFO_Interrupt_Enable, 0);
 
-               /*  This just reads the FIFO assuming the data is present, no checks on the FIFO status are performed */
-               for (i = 0; i < n / 2; i++) {
-                       dl = ni_readl(AIFIFO_Data_6143);
+       ni_clear_ai_fifo(dev);
 
-                       data[0] = (dl >> 16) & 0xffff;
-                       data[1] = dl & 0xffff;
-                       cfc_write_array_to_buffer(s, data, sizeof(data));
-               }
-               if (n % 2) {
-                       /* Assume there is a single sample stuck in the FIFO */
-                       ni_writel(0x01, AIFIFO_Control_6143);   /*  Get stranded sample into FIFO */
-                       dl = ni_readl(AIFIFO_Data_6143);
-                       data[0] = (dl >> 16) & 0xffff;
-                       cfc_write_to_buffer(s, data[0]);
-               }
+       if (board->reg_type != ni_reg_6143)
+               ni_writeb(dev, 0, Misc_Command);
+
+       ni_stc_writew(dev, AI_Disarm, AI_Command_1_Register); /* reset pulses */
+       ni_stc_writew(dev, AI_Start_Stop | AI_Mode_1_Reserved
+                           /*| AI_Trigger_Once */,
+                     AI_Mode_1_Register);
+       ni_stc_writew(dev, 0x0000, AI_Mode_2_Register);
+       /* generate FIFO interrupts on non-empty */
+       ni_stc_writew(dev, (0 << 6) | 0x0000, AI_Mode_3_Register);
+       if (board->reg_type == ni_reg_611x) {
+               ni_stc_writew(dev,
+                             AI_SHIFTIN_Pulse_Width |
+                             AI_SOC_Polarity |
+                             AI_LOCALMUX_CLK_Pulse_Width,
+                             AI_Personal_Register);
+               ni_stc_writew(dev,
+                             AI_SCAN_IN_PROG_Output_Select(3) |
+                             AI_EXTMUX_CLK_Output_Select(0) |
+                             AI_LOCALMUX_CLK_Output_Select(2) |
+                             AI_SC_TC_Output_Select(3) |
+                             AI_CONVERT_Output_Select
+                             (AI_CONVERT_Output_Enable_High),
+                             AI_Output_Control_Register);
+       } else if (board->reg_type == ni_reg_6143) {
+               ni_stc_writew(dev, AI_SHIFTIN_Pulse_Width |
+                                  AI_SOC_Polarity |
+                                  AI_LOCALMUX_CLK_Pulse_Width,
+                             AI_Personal_Register);
+               ni_stc_writew(dev,
+                             AI_SCAN_IN_PROG_Output_Select(3) |
+                             AI_EXTMUX_CLK_Output_Select(0) |
+                             AI_LOCALMUX_CLK_Output_Select(2) |
+                             AI_SC_TC_Output_Select(3) |
+                             AI_CONVERT_Output_Select
+                             (AI_CONVERT_Output_Enable_Low),
+                             AI_Output_Control_Register);
        } else {
-               if (n > sizeof(devpriv->ai_fifo_buffer) /
-                   sizeof(devpriv->ai_fifo_buffer[0])) {
-                       comedi_error(dev, "bug! ai_fifo_buffer too small");
-                       async->events |= COMEDI_CB_ERROR;
-                       return;
-               }
-               for (i = 0; i < n; i++) {
-                       devpriv->ai_fifo_buffer[i] =
-                           ni_readw(ADC_FIFO_Data_Register);
-               }
-               cfc_write_array_to_buffer(s, devpriv->ai_fifo_buffer,
-                                         n *
-                                         sizeof(devpriv->ai_fifo_buffer[0]));
+               unsigned ai_output_control_bits;
+               ni_stc_writew(dev,
+                             AI_SHIFTIN_Pulse_Width |
+                             AI_SOC_Polarity |
+                             AI_CONVERT_Pulse_Width |
+                             AI_LOCALMUX_CLK_Pulse_Width,
+                             AI_Personal_Register);
+               ai_output_control_bits =
+                   AI_SCAN_IN_PROG_Output_Select(3) |
+                   AI_EXTMUX_CLK_Output_Select(0) |
+                   AI_LOCALMUX_CLK_Output_Select(2) |
+                   AI_SC_TC_Output_Select(3);
+               if (board->reg_type == ni_reg_622x)
+                       ai_output_control_bits |=
+                           AI_CONVERT_Output_Select
+                           (AI_CONVERT_Output_Enable_High);
+               else
+                       ai_output_control_bits |=
+                           AI_CONVERT_Output_Select
+                           (AI_CONVERT_Output_Enable_Low);
+               ni_stc_writew(dev, ai_output_control_bits,
+                             AI_Output_Control_Register);
        }
+       /* the following registers should not be changed, because there
+        * are no backup registers in devpriv.  If you want to change
+        * any of these, add a backup register and other appropriate code:
+        *      AI_Mode_1_Register
+        *      AI_Mode_3_Register
+        *      AI_Personal_Register
+        *      AI_Output_Control_Register
+        */
+       ni_stc_writew(dev,
+                     AI_SC_TC_Error_Confirm |
+                     AI_START_Interrupt_Ack |
+                     AI_START2_Interrupt_Ack |
+                     AI_START1_Interrupt_Ack |
+                     AI_SC_TC_Interrupt_Ack |
+                     AI_Error_Interrupt_Ack |
+                     AI_STOP_Interrupt_Ack,
+                     Interrupt_A_Ack_Register);        /* clear interrupts */
+
+       ni_stc_writew(dev, AI_Configuration_End, Joint_Reset_Register);
+
+       return 0;
 }
 
-static void ni_handle_fifo_half_full(struct comedi_device *dev)
+static int ni_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
-       int n;
+       unsigned long flags;
+       int count;
 
-       n = board->ai_fifo_depth / 2;
+       /*  lock to avoid race with interrupt handler */
+       spin_lock_irqsave(&dev->spinlock, flags);
+#ifndef PCIDMA
+       ni_handle_fifo_dregs(dev);
+#else
+       ni_sync_ai_dma(dev);
+#endif
+       count = comedi_buf_n_bytes_ready(s);
+       spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       ni_ai_fifo_read(dev, s, n);
+       return count;
 }
-#endif
 
-#ifdef PCIDMA
-static int ni_ai_drain_dma(struct comedi_device *dev)
+static void ni_prime_channelgain_list(struct comedi_device *dev)
 {
-       struct ni_private *devpriv = dev->private;
        int i;
-       static const int timeout = 10000;
-       unsigned long flags;
-       int retval = 0;
 
-       spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
-       if (devpriv->ai_mite_chan) {
-               for (i = 0; i < timeout; i++) {
-                       if ((devpriv->stc_readw(dev,
-                                               AI_Status_1_Register) &
-                            AI_FIFO_Empty_St)
-                           && mite_bytes_in_transit(devpriv->ai_mite_chan) ==
-                           0)
-                               break;
-                       udelay(5);
-               }
-               if (i == timeout) {
-                       printk("ni_mio_common: wait for dma drain timed out\n");
-                       printk
-                           ("mite_bytes_in_transit=%i, AI_Status1_Register=0x%x\n",
-                            mite_bytes_in_transit(devpriv->ai_mite_chan),
-                            devpriv->stc_readw(dev, AI_Status_1_Register));
-                       retval = -1;
+       ni_stc_writew(dev, AI_CONVERT_Pulse, AI_Command_1_Register);
+       for (i = 0; i < NI_TIMEOUT; ++i) {
+               if (!(ni_stc_readw(dev, AI_Status_1_Register) &
+                     AI_FIFO_Empty_St)) {
+                       ni_stc_writew(dev, 1, ADC_FIFO_Clear);
+                       return;
                }
+               udelay(1);
        }
-       spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
-
-       ni_sync_ai_dma(dev);
-
-       return retval;
+       printk("ni_mio_common: timeout loading channel/gain list\n");
 }
-#endif
-/*
-   Empties the AI fifo
-*/
-static void ni_handle_fifo_dregs(struct comedi_device *dev)
+
+static void ni_m_series_load_channelgain_list(struct comedi_device *dev,
+                                             unsigned int n_chan,
+                                             unsigned int *list)
 {
        const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
-       unsigned short data[2];
-       u32 dl;
-       unsigned short fifo_empty;
-       int i;
-
-       if (board->reg_type == ni_reg_611x) {
-               while ((devpriv->stc_readw(dev,
-                                          AI_Status_1_Register) &
-                       AI_FIFO_Empty_St) == 0) {
-                       dl = ni_readl(ADC_FIFO_Data_611x);
-
-                       /* This may get the hi/lo data in the wrong order */
-                       data[0] = (dl >> 16);
-                       data[1] = (dl & 0xffff);
-                       cfc_write_array_to_buffer(s, data, sizeof(data));
-               }
-       } else if (board->reg_type == ni_reg_6143) {
-               i = 0;
-               while (ni_readl(AIFIFO_Status_6143) & 0x04) {
-                       dl = ni_readl(AIFIFO_Data_6143);
+       unsigned int chan, range, aref;
+       unsigned int i;
+       unsigned offset;
+       unsigned int dither;
+       unsigned range_code;
 
-                       /* This may get the hi/lo data in the wrong order */
-                       data[0] = (dl >> 16);
-                       data[1] = (dl & 0xffff);
-                       cfc_write_array_to_buffer(s, data, sizeof(data));
-                       i += 2;
-               }
-               /*  Check if stranded sample is present */
-               if (ni_readl(AIFIFO_Status_6143) & 0x01) {
-                       ni_writel(0x01, AIFIFO_Control_6143);   /*  Get stranded sample into FIFO */
-                       dl = ni_readl(AIFIFO_Data_6143);
-                       data[0] = (dl >> 16) & 0xffff;
-                       cfc_write_to_buffer(s, data[0]);
-               }
+       ni_stc_writew(dev, 1, Configuration_Memory_Clear);
 
+/* offset = 1 << (board->adbits - 1); */
+       if ((list[0] & CR_ALT_SOURCE)) {
+               unsigned bypass_bits;
+               chan = CR_CHAN(list[0]);
+               range = CR_RANGE(list[0]);
+               range_code = ni_gainlkup[board->gainlkup][range];
+               dither = ((list[0] & CR_ALT_FILTER) != 0);
+               bypass_bits = MSeries_AI_Bypass_Config_FIFO_Bit;
+               bypass_bits |= chan;
+               bypass_bits |=
+                   (devpriv->ai_calib_source) &
+                   (MSeries_AI_Bypass_Cal_Sel_Pos_Mask |
+                    MSeries_AI_Bypass_Cal_Sel_Neg_Mask |
+                    MSeries_AI_Bypass_Mode_Mux_Mask |
+                    MSeries_AO_Bypass_AO_Cal_Sel_Mask);
+               bypass_bits |= MSeries_AI_Bypass_Gain_Bits(range_code);
+               if (dither)
+                       bypass_bits |= MSeries_AI_Bypass_Dither_Bit;
+               /*  don't use 2's complement encoding */
+               bypass_bits |= MSeries_AI_Bypass_Polarity_Bit;
+               ni_writel(dev, bypass_bits, M_Offset_AI_Config_FIFO_Bypass);
        } else {
-               fifo_empty =
-                   devpriv->stc_readw(dev,
-                                      AI_Status_1_Register) & AI_FIFO_Empty_St;
-               while (fifo_empty == 0) {
-                       for (i = 0;
-                            i <
-                            sizeof(devpriv->ai_fifo_buffer) /
-                            sizeof(devpriv->ai_fifo_buffer[0]); i++) {
-                               fifo_empty =
-                                   devpriv->stc_readw(dev,
-                                                      AI_Status_1_Register) &
-                                   AI_FIFO_Empty_St;
-                               if (fifo_empty)
-                                       break;
-                               devpriv->ai_fifo_buffer[i] =
-                                   ni_readw(ADC_FIFO_Data_Register);
-                       }
-                       cfc_write_array_to_buffer(s, devpriv->ai_fifo_buffer,
-                                                 i *
-                                                 sizeof(devpriv->
-                                                        ai_fifo_buffer[0]));
-               }
+               ni_writel(dev, 0, M_Offset_AI_Config_FIFO_Bypass);
        }
-}
-
-static void get_last_sample_611x(struct comedi_device *dev)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv __maybe_unused = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
-       unsigned short data;
-       u32 dl;
-
-       if (board->reg_type != ni_reg_611x)
-               return;
+       offset = 0;
+       for (i = 0; i < n_chan; i++) {
+               unsigned config_bits = 0;
+               chan = CR_CHAN(list[i]);
+               aref = CR_AREF(list[i]);
+               range = CR_RANGE(list[i]);
+               dither = ((list[i] & CR_ALT_FILTER) != 0);
 
-       /* Check if there's a single sample stuck in the FIFO */
-       if (ni_readb(XXX_Status) & 0x80) {
-               dl = ni_readl(ADC_FIFO_Data_611x);
-               data = (dl & 0xffff);
-               cfc_write_to_buffer(s, data);
+               range_code = ni_gainlkup[board->gainlkup][range];
+               devpriv->ai_offset[i] = offset;
+               switch (aref) {
+               case AREF_DIFF:
+                       config_bits |=
+                           MSeries_AI_Config_Channel_Type_Differential_Bits;
+                       break;
+               case AREF_COMMON:
+                       config_bits |=
+                           MSeries_AI_Config_Channel_Type_Common_Ref_Bits;
+                       break;
+               case AREF_GROUND:
+                       config_bits |=
+                           MSeries_AI_Config_Channel_Type_Ground_Ref_Bits;
+                       break;
+               case AREF_OTHER:
+                       break;
+               }
+               config_bits |= MSeries_AI_Config_Channel_Bits(chan);
+               config_bits |=
+                   MSeries_AI_Config_Bank_Bits(board->reg_type, chan);
+               config_bits |= MSeries_AI_Config_Gain_Bits(range_code);
+               if (i == n_chan - 1)
+                       config_bits |= MSeries_AI_Config_Last_Channel_Bit;
+               if (dither)
+                       config_bits |= MSeries_AI_Config_Dither_Bit;
+               /*  don't use 2's complement encoding */
+               config_bits |= MSeries_AI_Config_Polarity_Bit;
+               ni_writew(dev, config_bits, M_Offset_AI_Config_FIFO_Data);
        }
+       ni_prime_channelgain_list(dev);
 }
 
-static void get_last_sample_6143(struct comedi_device *dev)
+/*
+ * Notes on the 6110 and 6111:
+ * These boards a slightly different than the rest of the series, since
+ * they have multiple A/D converters.
+ * From the driver side, the configuration memory is a
+ * little different.
+ * Configuration Memory Low:
+ *   bits 15-9: same
+ *   bit 8: unipolar/bipolar (should be 0 for bipolar)
+ *   bits 0-3: gain.  This is 4 bits instead of 3 for the other boards
+ *       1001 gain=0.1 (+/- 50)
+ *       1010 0.2
+ *       1011 0.1
+ *       0001 1
+ *       0010 2
+ *       0011 5
+ *       0100 10
+ *       0101 20
+ *       0110 50
+ * Configuration Memory High:
+ *   bits 12-14: Channel Type
+ *       001 for differential
+ *       000 for calibration
+ *   bit 11: coupling  (this is not currently handled)
+ *       1 AC coupling
+ *       0 DC coupling
+ *   bits 0-2: channel
+ *       valid channels are 0-3
+ */
+static void ni_load_channelgain_list(struct comedi_device *dev,
+                                    unsigned int n_chan, unsigned int *list)
 {
        const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv __maybe_unused = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
-       unsigned short data;
-       u32 dl;
+       struct ni_private *devpriv = dev->private;
+       unsigned int chan, range, aref;
+       unsigned int i;
+       unsigned int hi, lo;
+       unsigned offset;
+       unsigned int dither;
 
-       if (board->reg_type != ni_reg_6143)
+       if (devpriv->is_m_series) {
+               ni_m_series_load_channelgain_list(dev, n_chan, list);
                return;
+       }
+       if (n_chan == 1 && (board->reg_type != ni_reg_611x)
+           && (board->reg_type != ni_reg_6143)) {
+               if (devpriv->changain_state
+                   && devpriv->changain_spec == list[0]) {
+                       /*  ready to go. */
+                       return;
+               }
+               devpriv->changain_state = 1;
+               devpriv->changain_spec = list[0];
+       } else {
+               devpriv->changain_state = 0;
+       }
 
-       /* Check if there's a single sample stuck in the FIFO */
-       if (ni_readl(AIFIFO_Status_6143) & 0x01) {
-               ni_writel(0x01, AIFIFO_Control_6143);   /*  Get stranded sample into FIFO */
-               dl = ni_readl(AIFIFO_Data_6143);
+       ni_stc_writew(dev, 1, Configuration_Memory_Clear);
 
-               /* This may get the hi/lo data in the wrong order */
-               data = (dl >> 16) & 0xffff;
-               cfc_write_to_buffer(s, data);
+       /*  Set up Calibration mode if required */
+       if (board->reg_type == ni_reg_6143) {
+               if ((list[0] & CR_ALT_SOURCE)
+                   && !devpriv->ai_calib_source_enabled) {
+                       /*  Strobe Relay enable bit */
+                       ni_writew(dev, devpriv->ai_calib_source |
+                                      Calibration_Channel_6143_RelayOn,
+                                 Calibration_Channel_6143);
+                       ni_writew(dev, devpriv->ai_calib_source,
+                                 Calibration_Channel_6143);
+                       devpriv->ai_calib_source_enabled = 1;
+                       msleep_interruptible(100);      /*  Allow relays to change */
+               } else if (!(list[0] & CR_ALT_SOURCE)
+                          && devpriv->ai_calib_source_enabled) {
+                       /*  Strobe Relay disable bit */
+                       ni_writew(dev, devpriv->ai_calib_source |
+                                      Calibration_Channel_6143_RelayOff,
+                                 Calibration_Channel_6143);
+                       ni_writew(dev, devpriv->ai_calib_source,
+                                 Calibration_Channel_6143);
+                       devpriv->ai_calib_source_enabled = 0;
+                       msleep_interruptible(100);      /*  Allow relays to change */
+               }
        }
-}
 
-static void ni_ai_munge(struct comedi_device *dev, struct comedi_subdevice *s,
-                       void *data, unsigned int num_bytes,
-                       unsigned int chan_index)
-{
-       struct ni_private *devpriv = dev->private;
-       struct comedi_async *async = s->async;
-       struct comedi_cmd *cmd = &async->cmd;
-       unsigned int length = num_bytes / bytes_per_sample(s);
-       unsigned short *array = data;
-       unsigned int *larray = data;
-       unsigned int i;
+       offset = 1 << (board->adbits - 1);
+       for (i = 0; i < n_chan; i++) {
+               if ((board->reg_type != ni_reg_6143)
+                   && (list[i] & CR_ALT_SOURCE)) {
+                       chan = devpriv->ai_calib_source;
+               } else {
+                       chan = CR_CHAN(list[i]);
+               }
+               aref = CR_AREF(list[i]);
+               range = CR_RANGE(list[i]);
+               dither = ((list[i] & CR_ALT_FILTER) != 0);
 
-       for (i = 0; i < length; i++) {
-#ifdef PCIDMA
-               if (s->subdev_flags & SDF_LSAMPL)
-                       larray[i] = le32_to_cpu(larray[i]);
-               else
-                       array[i] = le16_to_cpu(array[i]);
-#endif
-               if (s->subdev_flags & SDF_LSAMPL)
-                       larray[i] += devpriv->ai_offset[chan_index];
+               /* fix the external/internal range differences */
+               range = ni_gainlkup[board->gainlkup][range];
+               if (board->reg_type == ni_reg_611x)
+                       devpriv->ai_offset[i] = offset;
                else
-                       array[i] += devpriv->ai_offset[chan_index];
-               chan_index++;
-               chan_index %= cmd->chanlist_len;
-       }
-}
-
-#ifdef PCIDMA
+                       devpriv->ai_offset[i] = (range & 0x100) ? 0 : offset;
 
-static int ni_ai_setup_MITE_dma(struct comedi_device *dev)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AI_SUBDEV];
-       int retval;
-       unsigned long flags;
-
-       retval = ni_request_ai_mite_channel(dev);
-       if (retval)
-               return retval;
-/* printk("comedi_debug: using mite channel %i for ai.\n", devpriv->ai_mite_chan->channel); */
-
-       /* write alloc the entire buffer */
-       comedi_buf_write_alloc(s, s->async->prealloc_bufsz);
-
-       spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
-       if (devpriv->ai_mite_chan == NULL) {
-               spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
-               return -EIO;
-       }
-
-       switch (board->reg_type) {
-       case ni_reg_611x:
-       case ni_reg_6143:
-               mite_prep_dma(devpriv->ai_mite_chan, 32, 16);
-               break;
-       case ni_reg_628x:
-               mite_prep_dma(devpriv->ai_mite_chan, 32, 32);
-               break;
-       default:
-               mite_prep_dma(devpriv->ai_mite_chan, 16, 16);
-               break;
-       }
-       /*start the MITE */
-       mite_dma_arm(devpriv->ai_mite_chan);
-       spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
-
-       return 0;
-}
-
-static int ni_ao_setup_MITE_dma(struct comedi_device *dev)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s = &dev->subdevices[NI_AO_SUBDEV];
-       int retval;
-       unsigned long flags;
-
-       retval = ni_request_ao_mite_channel(dev);
-       if (retval)
-               return retval;
-
-       /* read alloc the entire buffer */
-       comedi_buf_read_alloc(s, s->async->prealloc_bufsz);
-
-       spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
-       if (devpriv->ao_mite_chan) {
-               if (board->reg_type & (ni_reg_611x | ni_reg_6713)) {
-                       mite_prep_dma(devpriv->ao_mite_chan, 32, 32);
+               hi = 0;
+               if ((list[i] & CR_ALT_SOURCE)) {
+                       if (board->reg_type == ni_reg_611x)
+                               ni_writew(dev, CR_CHAN(list[i]) & 0x0003,
+                                         Calibration_Channel_Select_611x);
                } else {
-                       /* doing 32 instead of 16 bit wide transfers from memory
-                          makes the mite do 32 bit pci transfers, doubling pci bandwidth. */
-                       mite_prep_dma(devpriv->ao_mite_chan, 16, 32);
+                       if (board->reg_type == ni_reg_611x)
+                               aref = AREF_DIFF;
+                       else if (board->reg_type == ni_reg_6143)
+                               aref = AREF_OTHER;
+                       switch (aref) {
+                       case AREF_DIFF:
+                               hi |= AI_DIFFERENTIAL;
+                               break;
+                       case AREF_COMMON:
+                               hi |= AI_COMMON;
+                               break;
+                       case AREF_GROUND:
+                               hi |= AI_GROUND;
+                               break;
+                       case AREF_OTHER:
+                               break;
+                       }
                }
-               mite_dma_arm(devpriv->ao_mite_chan);
-       } else
-               retval = -EIO;
-       spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
-
-       return retval;
-}
-
-#endif /*  PCIDMA */
-
-/*
-   used for both cancel ioctl and board initialization
-
-   this is pretty harsh for a cancel, but it works...
- */
-
-static int ni_ai_reset(struct comedi_device *dev, struct comedi_subdevice *s)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-
-       ni_release_ai_mite_channel(dev);
-       /* ai configuration */
-       devpriv->stc_writew(dev, AI_Configuration_Start | AI_Reset,
-                           Joint_Reset_Register);
+               hi |= AI_CONFIG_CHANNEL(chan);
 
-       ni_set_bits(dev, Interrupt_A_Enable_Register,
-                   AI_SC_TC_Interrupt_Enable | AI_START1_Interrupt_Enable |
-                   AI_START2_Interrupt_Enable | AI_START_Interrupt_Enable |
-                   AI_STOP_Interrupt_Enable | AI_Error_Interrupt_Enable |
-                   AI_FIFO_Interrupt_Enable, 0);
+               ni_writew(dev, hi, Configuration_Memory_High);
 
-       ni_clear_ai_fifo(dev);
+               if (board->reg_type != ni_reg_6143) {
+                       lo = range;
+                       if (i == n_chan - 1)
+                               lo |= AI_LAST_CHANNEL;
+                       if (dither)
+                               lo |= AI_DITHER;
 
-       if (board->reg_type != ni_reg_6143)
-               ni_writeb(0, Misc_Command);
-
-       devpriv->stc_writew(dev, AI_Disarm, AI_Command_1_Register);     /* reset pulses */
-       devpriv->stc_writew(dev,
-                           AI_Start_Stop | AI_Mode_1_Reserved
-                           /*| AI_Trigger_Once */ ,
-                           AI_Mode_1_Register);
-       devpriv->stc_writew(dev, 0x0000, AI_Mode_2_Register);
-       /* generate FIFO interrupts on non-empty */
-       devpriv->stc_writew(dev, (0 << 6) | 0x0000, AI_Mode_3_Register);
-       if (board->reg_type == ni_reg_611x) {
-               devpriv->stc_writew(dev, AI_SHIFTIN_Pulse_Width |
-                                   AI_SOC_Polarity |
-                                   AI_LOCALMUX_CLK_Pulse_Width,
-                                   AI_Personal_Register);
-               devpriv->stc_writew(dev,
-                                   AI_SCAN_IN_PROG_Output_Select(3) |
-                                   AI_EXTMUX_CLK_Output_Select(0) |
-                                   AI_LOCALMUX_CLK_Output_Select(2) |
-                                   AI_SC_TC_Output_Select(3) |
-                                   AI_CONVERT_Output_Select
-                                   (AI_CONVERT_Output_Enable_High),
-                                   AI_Output_Control_Register);
-       } else if (board->reg_type == ni_reg_6143) {
-               devpriv->stc_writew(dev, AI_SHIFTIN_Pulse_Width |
-                                   AI_SOC_Polarity |
-                                   AI_LOCALMUX_CLK_Pulse_Width,
-                                   AI_Personal_Register);
-               devpriv->stc_writew(dev,
-                                   AI_SCAN_IN_PROG_Output_Select(3) |
-                                   AI_EXTMUX_CLK_Output_Select(0) |
-                                   AI_LOCALMUX_CLK_Output_Select(2) |
-                                   AI_SC_TC_Output_Select(3) |
-                                   AI_CONVERT_Output_Select
-                                   (AI_CONVERT_Output_Enable_Low),
-                                   AI_Output_Control_Register);
-       } else {
-               unsigned ai_output_control_bits;
-               devpriv->stc_writew(dev, AI_SHIFTIN_Pulse_Width |
-                                   AI_SOC_Polarity |
-                                   AI_CONVERT_Pulse_Width |
-                                   AI_LOCALMUX_CLK_Pulse_Width,
-                                   AI_Personal_Register);
-               ai_output_control_bits =
-                   AI_SCAN_IN_PROG_Output_Select(3) |
-                   AI_EXTMUX_CLK_Output_Select(0) |
-                   AI_LOCALMUX_CLK_Output_Select(2) |
-                   AI_SC_TC_Output_Select(3);
-               if (board->reg_type == ni_reg_622x)
-                       ai_output_control_bits |=
-                           AI_CONVERT_Output_Select
-                           (AI_CONVERT_Output_Enable_High);
-               else
-                       ai_output_control_bits |=
-                           AI_CONVERT_Output_Select
-                           (AI_CONVERT_Output_Enable_Low);
-               devpriv->stc_writew(dev, ai_output_control_bits,
-                                   AI_Output_Control_Register);
+                       ni_writew(dev, lo, Configuration_Memory_Low);
+               }
        }
-       /* the following registers should not be changed, because there
-        * are no backup registers in devpriv.  If you want to change
-        * any of these, add a backup register and other appropriate code:
-        *      AI_Mode_1_Register
-        *      AI_Mode_3_Register
-        *      AI_Personal_Register
-        *      AI_Output_Control_Register
-        */
-       devpriv->stc_writew(dev, AI_SC_TC_Error_Confirm | AI_START_Interrupt_Ack | AI_START2_Interrupt_Ack | AI_START1_Interrupt_Ack | AI_SC_TC_Interrupt_Ack | AI_Error_Interrupt_Ack | AI_STOP_Interrupt_Ack, Interrupt_A_Ack_Register);      /* clear interrupts */
-
-       devpriv->stc_writew(dev, AI_Configuration_End, Joint_Reset_Register);
-
-       return 0;
-}
-
-static int ni_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
-{
-       unsigned long flags;
-       int count;
-
-       /*  lock to avoid race with interrupt handler */
-       spin_lock_irqsave(&dev->spinlock, flags);
-#ifndef PCIDMA
-       ni_handle_fifo_dregs(dev);
-#else
-       ni_sync_ai_dma(dev);
-#endif
-       count = s->async->buf_write_count - s->async->buf_read_count;
-       spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       return count;
+       /* prime the channel/gain list */
+       if ((board->reg_type != ni_reg_611x)
+           && (board->reg_type != ni_reg_6143)) {
+               ni_prime_channelgain_list(dev);
+       }
 }
 
 static int ni_ai_insn_read(struct comedi_device *dev,
-                          struct comedi_subdevice *s, struct comedi_insn *insn,
+                          struct comedi_subdevice *s,
+                          struct comedi_insn *insn,
                           unsigned int *data)
 {
        const struct ni_board_struct *board = comedi_board(dev);
@@ -1703,26 +2148,26 @@ static int ni_ai_insn_read(struct comedi_device *dev,
        signbits = devpriv->ai_offset[0];
        if (board->reg_type == ni_reg_611x) {
                for (n = 0; n < num_adc_stages_611x; n++) {
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
                        udelay(1);
                }
                for (n = 0; n < insn->n; n++) {
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
                        /* The 611x has screwy 32-bit FIFOs. */
                        d = 0;
                        for (i = 0; i < NI_TIMEOUT; i++) {
-                               if (ni_readb(XXX_Status) & 0x80) {
-                                       d = (ni_readl(ADC_FIFO_Data_611x) >> 16)
-                                           & 0xffff;
+                               if (ni_readb(dev, XXX_Status) & 0x80) {
+                                       d = ni_readl(dev, ADC_FIFO_Data_611x);
+                                       d >>= 16;
+                                       d &= 0xffff;
                                        break;
                                }
-                               if (!(devpriv->stc_readw(dev,
-                                                        AI_Status_1_Register) &
+                               if (!(ni_stc_readw(dev, AI_Status_1_Register) &
                                      AI_FIFO_Empty_St)) {
-                                       d = ni_readl(ADC_FIFO_Data_611x) &
-                                           0xffff;
+                                       d = ni_readl(dev, ADC_FIFO_Data_611x);
+                                       d &= 0xffff;
                                        break;
                                }
                        }
@@ -1736,15 +2181,17 @@ static int ni_ai_insn_read(struct comedi_device *dev,
                }
        } else if (board->reg_type == ni_reg_6143) {
                for (n = 0; n < insn->n; n++) {
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
 
                        /* The 6143 has 32-bit FIFOs. You need to strobe a bit to move a single 16bit stranded sample into the FIFO */
                        dl = 0;
                        for (i = 0; i < NI_TIMEOUT; i++) {
-                               if (ni_readl(AIFIFO_Status_6143) & 0x01) {
-                                       ni_writel(0x01, AIFIFO_Control_6143);   /*  Get stranded sample into FIFO */
-                                       dl = ni_readl(AIFIFO_Data_6143);
+                               if (ni_readl(dev, AIFIFO_Status_6143) & 0x01) {
+                                       /* Get stranded sample into FIFO */
+                                       ni_writel(dev, 0x01,
+                                                 AIFIFO_Control_6143);
+                                       dl = ni_readl(dev, AIFIFO_Data_6143);
                                        break;
                                }
                        }
@@ -1757,11 +2204,10 @@ static int ni_ai_insn_read(struct comedi_device *dev,
                }
        } else {
                for (n = 0; n < insn->n; n++) {
-                       devpriv->stc_writew(dev, AI_CONVERT_Pulse,
-                                           AI_Command_1_Register);
+                       ni_stc_writew(dev, AI_CONVERT_Pulse,
+                                     AI_Command_1_Register);
                        for (i = 0; i < NI_TIMEOUT; i++) {
-                               if (!(devpriv->stc_readw(dev,
-                                                        AI_Status_1_Register) &
+                               if (!(ni_stc_readw(dev, AI_Status_1_Register) &
                                      AI_FIFO_Empty_St))
                                        break;
                        }
@@ -1770,11 +2216,12 @@ static int ni_ai_insn_read(struct comedi_device *dev,
                                    ("ni_mio_common: timeout in ni_ai_insn_read\n");
                                return -ETIME;
                        }
-                       if (board->reg_type & ni_reg_m_series_mask) {
-                               data[n] =
-                                   ni_readl(M_Offset_AI_FIFO_Data) & mask;
+                       if (devpriv->is_m_series) {
+                               dl = ni_readl(dev, M_Offset_AI_FIFO_Data);
+                               dl &= mask;
+                               data[n] = dl;
                        } else {
-                               d = ni_readw(ADC_FIFO_Data_Register);
+                               d = ni_readw(dev, ADC_FIFO_Data_Register);
                                d += signbits;  /* subtle: needs to be short addition */
                                data[n] = d;
                        }
@@ -1783,297 +2230,51 @@ static int ni_ai_insn_read(struct comedi_device *dev,
        return insn->n;
 }
 
-static void ni_prime_channelgain_list(struct comedi_device *dev)
+static int ni_ns_to_timer(const struct comedi_device *dev, unsigned nanosec,
+                         int round_mode)
 {
        struct ni_private *devpriv = dev->private;
-       int i;
+       int divider;
 
-       devpriv->stc_writew(dev, AI_CONVERT_Pulse, AI_Command_1_Register);
-       for (i = 0; i < NI_TIMEOUT; ++i) {
-               if (!(devpriv->stc_readw(dev,
-                                        AI_Status_1_Register) &
-                     AI_FIFO_Empty_St)) {
-                       devpriv->stc_writew(dev, 1, ADC_FIFO_Clear);
-                       return;
-               }
-               udelay(1);
+       switch (round_mode) {
+       case TRIG_ROUND_NEAREST:
+       default:
+               divider = (nanosec + devpriv->clock_ns / 2) / devpriv->clock_ns;
+               break;
+       case TRIG_ROUND_DOWN:
+               divider = (nanosec) / devpriv->clock_ns;
+               break;
+       case TRIG_ROUND_UP:
+               divider = (nanosec + devpriv->clock_ns - 1) / devpriv->clock_ns;
+               break;
        }
-       printk("ni_mio_common: timeout loading channel/gain list\n");
+       return divider - 1;
 }
 
-static void ni_m_series_load_channelgain_list(struct comedi_device *dev,
-                                             unsigned int n_chan,
-                                             unsigned int *list)
+static unsigned ni_timer_to_ns(const struct comedi_device *dev, int timer)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
-       unsigned int chan, range, aref;
-       unsigned int i;
-       unsigned offset;
-       unsigned int dither;
-       unsigned range_code;
 
-       devpriv->stc_writew(dev, 1, Configuration_Memory_Clear);
+       return devpriv->clock_ns * (timer + 1);
+}
 
-/* offset = 1 << (board->adbits - 1); */
-       if ((list[0] & CR_ALT_SOURCE)) {
-               unsigned bypass_bits;
-               chan = CR_CHAN(list[0]);
-               range = CR_RANGE(list[0]);
-               range_code = ni_gainlkup[board->gainlkup][range];
-               dither = ((list[0] & CR_ALT_FILTER) != 0);
-               bypass_bits = MSeries_AI_Bypass_Config_FIFO_Bit;
-               bypass_bits |= chan;
-               bypass_bits |=
-                   (devpriv->ai_calib_source) &
-                   (MSeries_AI_Bypass_Cal_Sel_Pos_Mask |
-                    MSeries_AI_Bypass_Cal_Sel_Neg_Mask |
-                    MSeries_AI_Bypass_Mode_Mux_Mask |
-                    MSeries_AO_Bypass_AO_Cal_Sel_Mask);
-               bypass_bits |= MSeries_AI_Bypass_Gain_Bits(range_code);
-               if (dither)
-                       bypass_bits |= MSeries_AI_Bypass_Dither_Bit;
-               /*  don't use 2's complement encoding */
-               bypass_bits |= MSeries_AI_Bypass_Polarity_Bit;
-               ni_writel(bypass_bits, M_Offset_AI_Config_FIFO_Bypass);
-       } else {
-               ni_writel(0, M_Offset_AI_Config_FIFO_Bypass);
+static unsigned ni_min_ai_scan_period_ns(struct comedi_device *dev,
+                                        unsigned num_channels)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+
+       switch (board->reg_type) {
+       case ni_reg_611x:
+       case ni_reg_6143:
+               /*  simultaneously-sampled inputs */
+               return board->ai_speed;
+               break;
+       default:
+               /*  multiplexed inputs */
+               break;
        }
-       offset = 0;
-       for (i = 0; i < n_chan; i++) {
-               unsigned config_bits = 0;
-               chan = CR_CHAN(list[i]);
-               aref = CR_AREF(list[i]);
-               range = CR_RANGE(list[i]);
-               dither = ((list[i] & CR_ALT_FILTER) != 0);
-
-               range_code = ni_gainlkup[board->gainlkup][range];
-               devpriv->ai_offset[i] = offset;
-               switch (aref) {
-               case AREF_DIFF:
-                       config_bits |=
-                           MSeries_AI_Config_Channel_Type_Differential_Bits;
-                       break;
-               case AREF_COMMON:
-                       config_bits |=
-                           MSeries_AI_Config_Channel_Type_Common_Ref_Bits;
-                       break;
-               case AREF_GROUND:
-                       config_bits |=
-                           MSeries_AI_Config_Channel_Type_Ground_Ref_Bits;
-                       break;
-               case AREF_OTHER:
-                       break;
-               }
-               config_bits |= MSeries_AI_Config_Channel_Bits(chan);
-               config_bits |=
-                   MSeries_AI_Config_Bank_Bits(board->reg_type, chan);
-               config_bits |= MSeries_AI_Config_Gain_Bits(range_code);
-               if (i == n_chan - 1)
-                       config_bits |= MSeries_AI_Config_Last_Channel_Bit;
-               if (dither)
-                       config_bits |= MSeries_AI_Config_Dither_Bit;
-               /*  don't use 2's complement encoding */
-               config_bits |= MSeries_AI_Config_Polarity_Bit;
-               ni_writew(config_bits, M_Offset_AI_Config_FIFO_Data);
-       }
-       ni_prime_channelgain_list(dev);
-}
-
-/*
- * Notes on the 6110 and 6111:
- * These boards a slightly different than the rest of the series, since
- * they have multiple A/D converters.
- * From the driver side, the configuration memory is a
- * little different.
- * Configuration Memory Low:
- *   bits 15-9: same
- *   bit 8: unipolar/bipolar (should be 0 for bipolar)
- *   bits 0-3: gain.  This is 4 bits instead of 3 for the other boards
- *       1001 gain=0.1 (+/- 50)
- *       1010 0.2
- *       1011 0.1
- *       0001 1
- *       0010 2
- *       0011 5
- *       0100 10
- *       0101 20
- *       0110 50
- * Configuration Memory High:
- *   bits 12-14: Channel Type
- *       001 for differential
- *       000 for calibration
- *   bit 11: coupling  (this is not currently handled)
- *       1 AC coupling
- *       0 DC coupling
- *   bits 0-2: channel
- *       valid channels are 0-3
- */
-static void ni_load_channelgain_list(struct comedi_device *dev,
-                                    unsigned int n_chan, unsigned int *list)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       unsigned int chan, range, aref;
-       unsigned int i;
-       unsigned int hi, lo;
-       unsigned offset;
-       unsigned int dither;
-
-       if (board->reg_type & ni_reg_m_series_mask) {
-               ni_m_series_load_channelgain_list(dev, n_chan, list);
-               return;
-       }
-       if (n_chan == 1 && (board->reg_type != ni_reg_611x)
-           && (board->reg_type != ni_reg_6143)) {
-               if (devpriv->changain_state
-                   && devpriv->changain_spec == list[0]) {
-                       /*  ready to go. */
-                       return;
-               }
-               devpriv->changain_state = 1;
-               devpriv->changain_spec = list[0];
-       } else {
-               devpriv->changain_state = 0;
-       }
-
-       devpriv->stc_writew(dev, 1, Configuration_Memory_Clear);
-
-       /*  Set up Calibration mode if required */
-       if (board->reg_type == ni_reg_6143) {
-               if ((list[0] & CR_ALT_SOURCE)
-                   && !devpriv->ai_calib_source_enabled) {
-                       /*  Strobe Relay enable bit */
-                       ni_writew(devpriv->ai_calib_source |
-                                 Calibration_Channel_6143_RelayOn,
-                                 Calibration_Channel_6143);
-                       ni_writew(devpriv->ai_calib_source,
-                                 Calibration_Channel_6143);
-                       devpriv->ai_calib_source_enabled = 1;
-                       msleep_interruptible(100);      /*  Allow relays to change */
-               } else if (!(list[0] & CR_ALT_SOURCE)
-                          && devpriv->ai_calib_source_enabled) {
-                       /*  Strobe Relay disable bit */
-                       ni_writew(devpriv->ai_calib_source |
-                                 Calibration_Channel_6143_RelayOff,
-                                 Calibration_Channel_6143);
-                       ni_writew(devpriv->ai_calib_source,
-                                 Calibration_Channel_6143);
-                       devpriv->ai_calib_source_enabled = 0;
-                       msleep_interruptible(100);      /*  Allow relays to change */
-               }
-       }
-
-       offset = 1 << (board->adbits - 1);
-       for (i = 0; i < n_chan; i++) {
-               if ((board->reg_type != ni_reg_6143)
-                   && (list[i] & CR_ALT_SOURCE)) {
-                       chan = devpriv->ai_calib_source;
-               } else {
-                       chan = CR_CHAN(list[i]);
-               }
-               aref = CR_AREF(list[i]);
-               range = CR_RANGE(list[i]);
-               dither = ((list[i] & CR_ALT_FILTER) != 0);
-
-               /* fix the external/internal range differences */
-               range = ni_gainlkup[board->gainlkup][range];
-               if (board->reg_type == ni_reg_611x)
-                       devpriv->ai_offset[i] = offset;
-               else
-                       devpriv->ai_offset[i] = (range & 0x100) ? 0 : offset;
-
-               hi = 0;
-               if ((list[i] & CR_ALT_SOURCE)) {
-                       if (board->reg_type == ni_reg_611x)
-                               ni_writew(CR_CHAN(list[i]) & 0x0003,
-                                         Calibration_Channel_Select_611x);
-               } else {
-                       if (board->reg_type == ni_reg_611x)
-                               aref = AREF_DIFF;
-                       else if (board->reg_type == ni_reg_6143)
-                               aref = AREF_OTHER;
-                       switch (aref) {
-                       case AREF_DIFF:
-                               hi |= AI_DIFFERENTIAL;
-                               break;
-                       case AREF_COMMON:
-                               hi |= AI_COMMON;
-                               break;
-                       case AREF_GROUND:
-                               hi |= AI_GROUND;
-                               break;
-                       case AREF_OTHER:
-                               break;
-                       }
-               }
-               hi |= AI_CONFIG_CHANNEL(chan);
-
-               ni_writew(hi, Configuration_Memory_High);
-
-               if (board->reg_type != ni_reg_6143) {
-                       lo = range;
-                       if (i == n_chan - 1)
-                               lo |= AI_LAST_CHANNEL;
-                       if (dither)
-                               lo |= AI_DITHER;
-
-                       ni_writew(lo, Configuration_Memory_Low);
-               }
-       }
-
-       /* prime the channel/gain list */
-       if ((board->reg_type != ni_reg_611x)
-           && (board->reg_type != ni_reg_6143)) {
-               ni_prime_channelgain_list(dev);
-       }
-}
-
-static int ni_ns_to_timer(const struct comedi_device *dev, unsigned nanosec,
-                         int round_mode)
-{
-       struct ni_private *devpriv = dev->private;
-       int divider;
-
-       switch (round_mode) {
-       case TRIG_ROUND_NEAREST:
-       default:
-               divider = (nanosec + devpriv->clock_ns / 2) / devpriv->clock_ns;
-               break;
-       case TRIG_ROUND_DOWN:
-               divider = (nanosec) / devpriv->clock_ns;
-               break;
-       case TRIG_ROUND_UP:
-               divider = (nanosec + devpriv->clock_ns - 1) / devpriv->clock_ns;
-               break;
-       }
-       return divider - 1;
-}
-
-static unsigned ni_timer_to_ns(const struct comedi_device *dev, int timer)
-{
-       struct ni_private *devpriv = dev->private;
-
-       return devpriv->clock_ns * (timer + 1);
-}
-
-static unsigned ni_min_ai_scan_period_ns(struct comedi_device *dev,
-                                        unsigned num_channels)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-
-       switch (board->reg_type) {
-       case ni_reg_611x:
-       case ni_reg_6143:
-               /*  simultaneously-sampled inputs */
-               return board->ai_speed;
-               break;
-       default:
-               /*  multiplexed inputs */
-               break;
-       }
-       return board->ai_speed * num_channels;
-}
+       return board->ai_speed * num_channels;
+}
 
 static int ni_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
                         struct comedi_cmd *cmd)
@@ -2232,6 +2433,23 @@ static int ni_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
        return 0;
 }
 
+static int ni_ai_inttrig(struct comedi_device *dev,
+                        struct comedi_subdevice *s,
+                        unsigned int trig_num)
+{
+       struct ni_private *devpriv = dev->private;
+       struct comedi_cmd *cmd = &s->async->cmd;
+
+       if (trig_num != cmd->start_arg)
+               return -EINVAL;
+
+       ni_stc_writew(dev, AI_START1_Pulse | devpriv->ai_cmd2,
+                     AI_Command_2_Register);
+       s->async->inttrig = NULL;
+
+       return 1;
+}
+
 static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
        const struct ni_board_struct *board = comedi_board(dev);
@@ -2253,21 +2471,22 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        ni_load_channelgain_list(dev, cmd->chanlist_len, cmd->chanlist);
 
        /* start configuration */
-       devpriv->stc_writew(dev, AI_Configuration_Start, Joint_Reset_Register);
+       ni_stc_writew(dev, AI_Configuration_Start, Joint_Reset_Register);
 
        /* disable analog triggering for now, since it
         * interferes with the use of pfi0 */
        devpriv->an_trig_etc_reg &= ~Analog_Trigger_Enable;
-       devpriv->stc_writew(dev, devpriv->an_trig_etc_reg,
-                           Analog_Trigger_Etc_Register);
+       ni_stc_writew(dev, devpriv->an_trig_etc_reg,
+                     Analog_Trigger_Etc_Register);
 
        switch (cmd->start_src) {
        case TRIG_INT:
        case TRIG_NOW:
-               devpriv->stc_writew(dev, AI_START2_Select(0) |
-                                   AI_START1_Sync | AI_START1_Edge |
-                                   AI_START1_Select(0),
-                                   AI_Trigger_Select_Register);
+               ni_stc_writew(dev,
+                             AI_START2_Select(0) |
+                             AI_START1_Sync | AI_START1_Edge |
+                             AI_START1_Select(0),
+                             AI_Trigger_Select_Register);
                break;
        case TRIG_EXT:
                {
@@ -2279,8 +2498,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                                bits |= AI_START1_Polarity;
                        if (cmd->start_arg & CR_EDGE)
                                bits |= AI_START1_Edge;
-                       devpriv->stc_writew(dev, bits,
-                                           AI_Trigger_Select_Register);
+                       ni_stc_writew(dev, bits, AI_Trigger_Select_Register);
                        break;
                }
        }
@@ -2288,7 +2506,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        mode2 &= ~AI_Pre_Trigger;
        mode2 &= ~AI_SC_Initial_Load_Source;
        mode2 &= ~AI_SC_Reload_Mode;
-       devpriv->stc_writew(dev, mode2, AI_Mode_2_Register);
+       ni_stc_writew(dev, mode2, AI_Mode_2_Register);
 
        if (cmd->chanlist_len == 1 || (board->reg_type == ni_reg_611x)
            || (board->reg_type == ni_reg_6143)) {
@@ -2298,8 +2516,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        } else {
                start_stop_select |= AI_STOP_Select(19);        /*  ai configuration memory */
        }
-       devpriv->stc_writew(dev, start_stop_select,
-                           AI_START_STOP_Select_Register);
+       ni_stc_writew(dev, start_stop_select, AI_START_STOP_Select_Register);
 
        devpriv->ai_cmd2 = 0;
        switch (cmd->stop_src) {
@@ -2311,12 +2528,12 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                        stop_count += num_adc_stages_611x;
                }
                /* stage number of scans */
-               devpriv->stc_writel(dev, stop_count, AI_SC_Load_A_Registers);
+               ni_stc_writel(dev, stop_count, AI_SC_Load_A_Registers);
 
                mode1 |= AI_Start_Stop | AI_Mode_1_Reserved | AI_Trigger_Once;
-               devpriv->stc_writew(dev, mode1, AI_Mode_1_Register);
+               ni_stc_writew(dev, mode1, AI_Mode_1_Register);
                /* load SC (Scan Count) */
-               devpriv->stc_writew(dev, AI_SC_Load, AI_Command_1_Register);
+               ni_stc_writew(dev, AI_SC_Load, AI_Command_1_Register);
 
                devpriv->ai_continuous = 0;
                if (stop_count == 0) {
@@ -2330,13 +2547,13 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                break;
        case TRIG_NONE:
                /* stage number of scans */
-               devpriv->stc_writel(dev, 0, AI_SC_Load_A_Registers);
+               ni_stc_writel(dev, 0, AI_SC_Load_A_Registers);
 
                mode1 |= AI_Start_Stop | AI_Mode_1_Reserved | AI_Continuous;
-               devpriv->stc_writew(dev, mode1, AI_Mode_1_Register);
+               ni_stc_writew(dev, mode1, AI_Mode_1_Register);
 
                /* load SC (Scan Count) */
-               devpriv->stc_writew(dev, AI_SC_Load, AI_Command_1_Register);
+               ni_stc_writew(dev, AI_SC_Load, AI_Command_1_Register);
 
                devpriv->ai_continuous = 1;
 
@@ -2360,20 +2577,20 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                   AI_STOP_Select=19            external pin (configuration mem)
                 */
                start_stop_select |= AI_START_Edge | AI_START_Sync;
-               devpriv->stc_writew(dev, start_stop_select,
-                                   AI_START_STOP_Select_Register);
+               ni_stc_writew(dev, start_stop_select,
+                             AI_START_STOP_Select_Register);
 
                mode2 |= AI_SI_Reload_Mode(0);
                /* AI_SI_Initial_Load_Source=A */
                mode2 &= ~AI_SI_Initial_Load_Source;
                /* mode2 |= AI_SC_Reload_Mode; */
-               devpriv->stc_writew(dev, mode2, AI_Mode_2_Register);
+               ni_stc_writew(dev, mode2, AI_Mode_2_Register);
 
                /* load SI */
                timer = ni_ns_to_timer(dev, cmd->scan_begin_arg,
                                       TRIG_ROUND_NEAREST);
-               devpriv->stc_writel(dev, timer, AI_SI_Load_A_Registers);
-               devpriv->stc_writew(dev, AI_SI_Load, AI_Command_1_Register);
+               ni_stc_writel(dev, timer, AI_SI_Load_A_Registers);
+               ni_stc_writew(dev, AI_SI_Load, AI_Command_1_Register);
                break;
        case TRIG_EXT:
                if (cmd->scan_begin_arg & CR_EDGE)
@@ -2387,7 +2604,7 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                        start_stop_select |= AI_START_Sync;
                start_stop_select |=
                    AI_START_Select(1 + CR_CHAN(cmd->scan_begin_arg));
-               devpriv->stc_writew(dev, start_stop_select,
+               ni_stc_writew(dev, start_stop_select,
                                    AI_START_STOP_Select_Register);
                break;
        }
@@ -2400,31 +2617,32 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                else
                        timer = ni_ns_to_timer(dev, cmd->convert_arg,
                                               TRIG_ROUND_NEAREST);
-               devpriv->stc_writew(dev, 1, AI_SI2_Load_A_Register);    /* 0,0 does not work. */
-               devpriv->stc_writew(dev, timer, AI_SI2_Load_B_Register);
+               /* 0,0 does not work */
+               ni_stc_writew(dev, 1, AI_SI2_Load_A_Register);
+               ni_stc_writew(dev, timer, AI_SI2_Load_B_Register);
 
                /* AI_SI2_Reload_Mode = alternate */
                /* AI_SI2_Initial_Load_Source = A */
                mode2 &= ~AI_SI2_Initial_Load_Source;
                mode2 |= AI_SI2_Reload_Mode;
-               devpriv->stc_writew(dev, mode2, AI_Mode_2_Register);
+               ni_stc_writew(dev, mode2, AI_Mode_2_Register);
 
                /* AI_SI2_Load */
-               devpriv->stc_writew(dev, AI_SI2_Load, AI_Command_1_Register);
+               ni_stc_writew(dev, AI_SI2_Load, AI_Command_1_Register);
 
                mode2 |= AI_SI2_Reload_Mode;    /*  alternate */
                mode2 |= AI_SI2_Initial_Load_Source;    /*  B */
 
-               devpriv->stc_writew(dev, mode2, AI_Mode_2_Register);
+               ni_stc_writew(dev, mode2, AI_Mode_2_Register);
                break;
        case TRIG_EXT:
                mode1 |= AI_CONVERT_Source_Select(1 + cmd->convert_arg);
                if ((cmd->convert_arg & CR_INVERT) == 0)
                        mode1 |= AI_CONVERT_Source_Polarity;
-               devpriv->stc_writew(dev, mode1, AI_Mode_1_Register);
+               ni_stc_writew(dev, mode1, AI_Mode_1_Register);
 
                mode2 |= AI_Start_Stop_Gate_Enable | AI_SC_Gate_Enable;
-               devpriv->stc_writew(dev, mode2, AI_Mode_2_Register);
+               ni_stc_writew(dev, mode2, AI_Mode_2_Register);
 
                break;
        }
@@ -2451,25 +2669,25 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                case AIMODE_HALF_FULL:
                        /*generate FIFO interrupts and DMA requests on half-full */
 #ifdef PCIDMA
-                       devpriv->stc_writew(dev, AI_FIFO_Mode_HF_to_E,
-                                           AI_Mode_3_Register);
+                       ni_stc_writew(dev, AI_FIFO_Mode_HF_to_E,
+                                     AI_Mode_3_Register);
 #else
-                       devpriv->stc_writew(dev, AI_FIFO_Mode_HF,
-                                           AI_Mode_3_Register);
+                       ni_stc_writew(dev, AI_FIFO_Mode_HF,
+                                     AI_Mode_3_Register);
 #endif
                        break;
                case AIMODE_SAMPLE:
                        /*generate FIFO interrupts on non-empty */
-                       devpriv->stc_writew(dev, AI_FIFO_Mode_NE,
-                                           AI_Mode_3_Register);
+                       ni_stc_writew(dev, AI_FIFO_Mode_NE,
+                                     AI_Mode_3_Register);
                        break;
                case AIMODE_SCAN:
 #ifdef PCIDMA
-                       devpriv->stc_writew(dev, AI_FIFO_Mode_NE,
-                                           AI_Mode_3_Register);
+                       ni_stc_writew(dev, AI_FIFO_Mode_NE,
+                                     AI_Mode_3_Register);
 #else
-                       devpriv->stc_writew(dev, AI_FIFO_Mode_HF,
-                                           AI_Mode_3_Register);
+                       ni_stc_writew(dev, AI_FIFO_Mode_HF,
+                                     AI_Mode_3_Register);
 #endif
                        interrupt_a_enable |= AI_STOP_Interrupt_Enable;
                        break;
@@ -2477,7 +2695,16 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                        break;
                }
 
-               devpriv->stc_writew(dev, AI_Error_Interrupt_Ack | AI_STOP_Interrupt_Ack | AI_START_Interrupt_Ack | AI_START2_Interrupt_Ack | AI_START1_Interrupt_Ack | AI_SC_TC_Interrupt_Ack | AI_SC_TC_Error_Confirm, Interrupt_A_Ack_Register);      /* clear interrupts */
+               /* clear interrupts */
+               ni_stc_writew(dev,
+                             AI_Error_Interrupt_Ack |
+                             AI_STOP_Interrupt_Ack |
+                             AI_START_Interrupt_Ack |
+                             AI_START2_Interrupt_Ack |
+                             AI_START1_Interrupt_Ack |
+                             AI_SC_TC_Interrupt_Ack |
+                             AI_SC_TC_Error_Confirm,
+                             Interrupt_A_Ack_Register);
 
                ni_set_bits(dev, Interrupt_A_Enable_Register,
                            interrupt_a_enable, 1);
@@ -2489,19 +2716,19 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        }
 
        /* end configuration */
-       devpriv->stc_writew(dev, AI_Configuration_End, Joint_Reset_Register);
+       ni_stc_writew(dev, AI_Configuration_End, Joint_Reset_Register);
 
        switch (cmd->scan_begin_src) {
        case TRIG_TIMER:
-               devpriv->stc_writew(dev,
-                                   AI_SI2_Arm | AI_SI_Arm | AI_DIV_Arm |
-                                   AI_SC_Arm, AI_Command_1_Register);
+               ni_stc_writew(dev,
+                             AI_SI2_Arm | AI_SI_Arm | AI_DIV_Arm | AI_SC_Arm,
+                             AI_Command_1_Register);
                break;
        case TRIG_EXT:
                /* XXX AI_SI_Arm? */
-               devpriv->stc_writew(dev,
-                                   AI_SI2_Arm | AI_SI_Arm | AI_DIV_Arm |
-                                   AI_SC_Arm, AI_Command_1_Register);
+               ni_stc_writew(dev,
+                             AI_SI2_Arm | AI_SI_Arm | AI_DIV_Arm | AI_SC_Arm,
+                             AI_Command_1_Register);
                break;
        }
 
@@ -2515,8 +2742,8 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 
        if (cmd->start_src == TRIG_NOW) {
                /* AI_START1_Pulse */
-               devpriv->stc_writew(dev, AI_START1_Pulse | devpriv->ai_cmd2,
-                                   AI_Command_2_Register);
+               ni_stc_writew(dev, AI_START1_Pulse | devpriv->ai_cmd2,
+                             AI_Command_2_Register);
                s->async->inttrig = NULL;
        } else if (cmd->start_src == TRIG_EXT) {
                s->async->inttrig = NULL;
@@ -2527,98 +2754,21 @@ static int ni_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        return 0;
 }
 
-static int ni_ai_inttrig(struct comedi_device *dev,
-                        struct comedi_subdevice *s,
-                        unsigned int trig_num)
-{
-       struct ni_private *devpriv = dev->private;
-       struct comedi_cmd *cmd = &s->async->cmd;
-
-       if (trig_num != cmd->start_arg)
-               return -EINVAL;
-
-       devpriv->stc_writew(dev, AI_START1_Pulse | devpriv->ai_cmd2,
-                           AI_Command_2_Register);
-       s->async->inttrig = NULL;
-
-       return 1;
-}
-
 static int ni_ai_config_analog_trig(struct comedi_device *dev,
                                    struct comedi_subdevice *s,
                                    struct comedi_insn *insn,
-                                   unsigned int *data);
-
-static int ni_ai_insn_config(struct comedi_device *dev,
-                            struct comedi_subdevice *s,
-                            struct comedi_insn *insn, unsigned int *data)
+                                   unsigned int *data)
 {
        const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
+       unsigned int a, b, modebits;
+       int err = 0;
 
-       if (insn->n < 1)
-               return -EINVAL;
-
-       switch (data[0]) {
-       case INSN_CONFIG_ANALOG_TRIG:
-               return ni_ai_config_analog_trig(dev, s, insn, data);
-       case INSN_CONFIG_ALT_SOURCE:
-               if (board->reg_type & ni_reg_m_series_mask) {
-                       if (data[1] & ~(MSeries_AI_Bypass_Cal_Sel_Pos_Mask |
-                                       MSeries_AI_Bypass_Cal_Sel_Neg_Mask |
-                                       MSeries_AI_Bypass_Mode_Mux_Mask |
-                                       MSeries_AO_Bypass_AO_Cal_Sel_Mask)) {
-                               return -EINVAL;
-                       }
-                       devpriv->ai_calib_source = data[1];
-               } else if (board->reg_type == ni_reg_6143) {
-                       unsigned int calib_source;
-
-                       calib_source = data[1] & 0xf;
-
-                       if (calib_source > 0xF)
-                               return -EINVAL;
-
-                       devpriv->ai_calib_source = calib_source;
-                       ni_writew(calib_source, Calibration_Channel_6143);
-               } else {
-                       unsigned int calib_source;
-                       unsigned int calib_source_adjust;
-
-                       calib_source = data[1] & 0xf;
-                       calib_source_adjust = (data[1] >> 4) & 0xff;
-
-                       if (calib_source >= 8)
-                               return -EINVAL;
-                       devpriv->ai_calib_source = calib_source;
-                       if (board->reg_type == ni_reg_611x) {
-                               ni_writeb(calib_source_adjust,
-                                         Cal_Gain_Select_611x);
-                       }
-               }
-               return 2;
-       default:
-               break;
-       }
-
-       return -EINVAL;
-}
-
-static int ni_ai_config_analog_trig(struct comedi_device *dev,
-                                   struct comedi_subdevice *s,
-                                   struct comedi_insn *insn,
-                                   unsigned int *data)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       unsigned int a, b, modebits;
-       int err = 0;
-
-       /* data[1] is flags
-        * data[2] is analog line
-        * data[3] is set level
-        * data[4] is reset level */
-       if (!board->has_analog_trig)
+       /* data[1] is flags
+        * data[2] is analog line
+        * data[3] is set level
+        * data[4] is reset level */
+       if (!board->has_analog_trig)
                return -EINVAL;
        if ((data[1] & 0xffff0000) != COMEDI_EV_SCAN_BEGIN) {
                data[1] &= (COMEDI_EV_SCAN_BEGIN | 0xffff);
@@ -2704,6 +2854,61 @@ static int ni_ai_config_analog_trig(struct comedi_device *dev,
        return 5;
 }
 
+static int ni_ai_insn_config(struct comedi_device *dev,
+                            struct comedi_subdevice *s,
+                            struct comedi_insn *insn, unsigned int *data)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv = dev->private;
+
+       if (insn->n < 1)
+               return -EINVAL;
+
+       switch (data[0]) {
+       case INSN_CONFIG_ANALOG_TRIG:
+               return ni_ai_config_analog_trig(dev, s, insn, data);
+       case INSN_CONFIG_ALT_SOURCE:
+               if (devpriv->is_m_series) {
+                       if (data[1] & ~(MSeries_AI_Bypass_Cal_Sel_Pos_Mask |
+                                       MSeries_AI_Bypass_Cal_Sel_Neg_Mask |
+                                       MSeries_AI_Bypass_Mode_Mux_Mask |
+                                       MSeries_AO_Bypass_AO_Cal_Sel_Mask)) {
+                               return -EINVAL;
+                       }
+                       devpriv->ai_calib_source = data[1];
+               } else if (board->reg_type == ni_reg_6143) {
+                       unsigned int calib_source;
+
+                       calib_source = data[1] & 0xf;
+
+                       if (calib_source > 0xF)
+                               return -EINVAL;
+
+                       devpriv->ai_calib_source = calib_source;
+                       ni_writew(dev, calib_source, Calibration_Channel_6143);
+               } else {
+                       unsigned int calib_source;
+                       unsigned int calib_source_adjust;
+
+                       calib_source = data[1] & 0xf;
+                       calib_source_adjust = (data[1] >> 4) & 0xff;
+
+                       if (calib_source >= 8)
+                               return -EINVAL;
+                       devpriv->ai_calib_source = calib_source;
+                       if (board->reg_type == ni_reg_611x) {
+                               ni_writeb(dev, calib_source_adjust,
+                                         Cal_Gain_Select_611x);
+                       }
+               }
+               return 2;
+       default:
+               break;
+       }
+
+       return -EINVAL;
+}
+
 /* munge data from unsigned to 2's complement for analog output bipolar modes */
 static void ni_ao_munge(struct comedi_device *dev, struct comedi_subdevice *s,
                        void *data, unsigned int num_bytes,
@@ -2746,9 +2951,9 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device *dev,
        if (timed) {
                for (i = 0; i < board->n_aochan; ++i) {
                        devpriv->ao_conf[i] &= ~MSeries_AO_Update_Timed_Bit;
-                       ni_writeb(devpriv->ao_conf[i],
+                       ni_writeb(dev, devpriv->ao_conf[i],
                                  M_Offset_AO_Config_Bank(i));
-                       ni_writeb(0xf, M_Offset_AO_Waveform_Order(i));
+                       ni_writeb(dev, 0xf, M_Offset_AO_Waveform_Order(i));
                }
        }
        for (i = 0; i < n_chans; i++) {
@@ -2761,20 +2966,22 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device *dev,
                switch (krange->max - krange->min) {
                case 20000000:
                        conf |= MSeries_AO_DAC_Reference_10V_Internal_Bits;
-                       ni_writeb(0, M_Offset_AO_Reference_Attenuation(chan));
+                       ni_writeb(dev, 0,
+                                 M_Offset_AO_Reference_Attenuation(chan));
                        break;
                case 10000000:
                        conf |= MSeries_AO_DAC_Reference_5V_Internal_Bits;
-                       ni_writeb(0, M_Offset_AO_Reference_Attenuation(chan));
+                       ni_writeb(dev, 0,
+                                 M_Offset_AO_Reference_Attenuation(chan));
                        break;
                case 4000000:
                        conf |= MSeries_AO_DAC_Reference_10V_Internal_Bits;
-                       ni_writeb(MSeries_Attenuate_x5_Bit,
+                       ni_writeb(dev, MSeries_Attenuate_x5_Bit,
                                  M_Offset_AO_Reference_Attenuation(chan));
                        break;
                case 2000000:
                        conf |= MSeries_AO_DAC_Reference_5V_Internal_Bits;
-                       ni_writeb(MSeries_Attenuate_x5_Bit,
+                       ni_writeb(dev, MSeries_Attenuate_x5_Bit,
                                  M_Offset_AO_Reference_Attenuation(chan));
                        break;
                default:
@@ -2796,9 +3003,9 @@ static int ni_m_series_ao_config_chanlist(struct comedi_device *dev,
                }
                if (timed)
                        conf |= MSeries_AO_Update_Timed_Bit;
-               ni_writeb(conf, M_Offset_AO_Config_Bank(chan));
+               ni_writeb(dev, conf, M_Offset_AO_Config_Bank(chan));
                devpriv->ao_conf[chan] = conf;
-               ni_writeb(i, M_Offset_AO_Waveform_Order(chan));
+               ni_writeb(dev, i, M_Offset_AO_Waveform_Order(chan));
        }
        return invert;
 }
@@ -2844,7 +3051,7 @@ static int ni_old_ao_config_chanlist(struct comedi_device *dev,
                conf |= (CR_AREF(chanspec[i]) ==
                         AREF_OTHER) ? AO_Ground_Ref : 0;
 
-               ni_writew(conf, AO_Configuration);
+               ni_writew(dev, conf, AO_Configuration);
                devpriv->ao_conf[chan] = conf;
        }
        return invert;
@@ -2855,9 +3062,9 @@ static int ni_ao_config_chanlist(struct comedi_device *dev,
                                 unsigned int chanspec[], unsigned int n_chans,
                                 int timed)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv = dev->private;
 
-       if (board->reg_type & ni_reg_m_series_mask)
+       if (devpriv->is_m_series)
                return ni_m_series_ao_config_chanlist(dev, s, chanspec, n_chans,
                                                      timed);
        else
@@ -2879,7 +3086,6 @@ static int ni_ao_insn_write(struct comedi_device *dev,
                            struct comedi_subdevice *s,
                            struct comedi_insn *insn, unsigned int *data)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
        unsigned int chan = CR_CHAN(insn->chanspec);
        unsigned int invert;
@@ -2888,10 +3094,10 @@ static int ni_ao_insn_write(struct comedi_device *dev,
 
        devpriv->ao[chan] = data[0];
 
-       if (board->reg_type & ni_reg_m_series_mask) {
-               ni_writew(data[0], M_Offset_DAC_Direct_Data(chan));
+       if (devpriv->is_m_series) {
+               ni_writew(dev, data[0], M_Offset_DAC_Direct_Data(chan));
        } else
-               ni_writew(data[0] ^ invert,
+               ni_writew(dev, data[0] ^ invert,
                          (chan) ? DAC1_Direct_Data : DAC0_Direct_Data);
 
        return 1;
@@ -2971,7 +3177,7 @@ static int ni_ao_inttrig(struct comedi_device *dev,
                    AO_FIFO_Interrupt_Enable | AO_Error_Interrupt_Enable, 0);
        interrupt_b_bits = AO_Error_Interrupt_Enable;
 #ifdef PCIDMA
-       devpriv->stc_writew(dev, 1, DAC_FIFO_Clear);
+       ni_stc_writew(dev, 1, DAC_FIFO_Clear);
        if (board->reg_type & ni_reg_6xxx_mask)
                ni_ao_win_outl(dev, 0x6, AO_FIFO_Offset_Load_611x);
        ret = ni_ao_setup_MITE_dma(dev);
@@ -2988,14 +3194,13 @@ static int ni_ao_inttrig(struct comedi_device *dev,
        interrupt_b_bits |= AO_FIFO_Interrupt_Enable;
 #endif
 
-       devpriv->stc_writew(dev, devpriv->ao_mode3 | AO_Not_An_UPDATE,
-                           AO_Mode_3_Register);
-       devpriv->stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
+       ni_stc_writew(dev, devpriv->ao_mode3 | AO_Not_An_UPDATE,
+                     AO_Mode_3_Register);
+       ni_stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
        /* wait for DACs to be loaded */
        for (i = 0; i < timeout; i++) {
                udelay(1);
-               if ((devpriv->stc_readw(dev,
-                                       Joint_Status_2_Register) &
+               if ((ni_stc_readw(dev, Joint_Status_2_Register) &
                     AO_TMRDACWRs_In_Progress_St) == 0)
                        break;
        }
@@ -3004,19 +3209,21 @@ static int ni_ao_inttrig(struct comedi_device *dev,
                             "timed out waiting for AO_TMRDACWRs_In_Progress_St to clear");
                return -EIO;
        }
-       /*  stc manual says we are need to clear error interrupt after AO_TMRDACWRs_In_Progress_St clears */
-       devpriv->stc_writew(dev, AO_Error_Interrupt_Ack,
-                           Interrupt_B_Ack_Register);
+       /*
+        * stc manual says we are need to clear error interrupt after
+        * AO_TMRDACWRs_In_Progress_St clears
+        */
+       ni_stc_writew(dev, AO_Error_Interrupt_Ack, Interrupt_B_Ack_Register);
 
        ni_set_bits(dev, Interrupt_B_Enable_Register, interrupt_b_bits, 1);
 
-       devpriv->stc_writew(dev,
-                           devpriv->ao_cmd1 | AO_UI_Arm | AO_UC_Arm | AO_BC_Arm
-                           | AO_DAC1_Update_Mode | AO_DAC0_Update_Mode,
-                           AO_Command_1_Register);
+       ni_stc_writew(dev, devpriv->ao_cmd1 |
+                     AO_UI_Arm | AO_UC_Arm | AO_BC_Arm |
+                     AO_DAC1_Update_Mode | AO_DAC0_Update_Mode,
+                     AO_Command_1_Register);
 
-       devpriv->stc_writew(dev, devpriv->ao_cmd2 | AO_START1_Pulse,
-                           AO_Command_2_Register);
+       ni_stc_writew(dev, devpriv->ao_cmd2 | AO_START1_Pulse,
+                     AO_Command_2_Register);
 
        return 0;
 }
@@ -3035,9 +3242,9 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                return -EIO;
        }
 
-       devpriv->stc_writew(dev, AO_Configuration_Start, Joint_Reset_Register);
+       ni_stc_writew(dev, AO_Configuration_Start, Joint_Reset_Register);
 
-       devpriv->stc_writew(dev, AO_Disarm, AO_Command_1_Register);
+       ni_stc_writew(dev, AO_Disarm, AO_Command_1_Register);
 
        if (board->reg_type & ni_reg_6xxx_mask) {
                ao_win_out(CLEAR_WG, AO_Misc_611x);
@@ -3062,15 +3269,15 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                devpriv->ao_mode1 &= ~AO_Continuous;
                devpriv->ao_mode1 |= AO_Trigger_Once;
        }
-       devpriv->stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
+       ni_stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
        switch (cmd->start_src) {
        case TRIG_INT:
        case TRIG_NOW:
                devpriv->ao_trigger_select &=
                    ~(AO_START1_Polarity | AO_START1_Select(-1));
                devpriv->ao_trigger_select |= AO_START1_Edge | AO_START1_Sync;
-               devpriv->stc_writew(dev, devpriv->ao_trigger_select,
-                                   AO_Trigger_Select_Register);
+               ni_stc_writew(dev, devpriv->ao_trigger_select,
+                             AO_Trigger_Select_Register);
                break;
        case TRIG_EXT:
                devpriv->ao_trigger_select =
@@ -3079,52 +3286,50 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                        devpriv->ao_trigger_select |= AO_START1_Polarity;       /*  0=active high, 1=active low. see daq-stc 3-24 (p186) */
                if (cmd->start_arg & CR_EDGE)
                        devpriv->ao_trigger_select |= AO_START1_Edge;   /*  0=edge detection disabled, 1=enabled */
-               devpriv->stc_writew(dev, devpriv->ao_trigger_select,
-                                   AO_Trigger_Select_Register);
+               ni_stc_writew(dev, devpriv->ao_trigger_select,
+                             AO_Trigger_Select_Register);
                break;
        default:
                BUG();
                break;
        }
        devpriv->ao_mode3 &= ~AO_Trigger_Length;
-       devpriv->stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
+       ni_stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
 
-       devpriv->stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
+       ni_stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
        devpriv->ao_mode2 &= ~AO_BC_Initial_Load_Source;
-       devpriv->stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
+       ni_stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
        if (cmd->stop_src == TRIG_NONE)
-               devpriv->stc_writel(dev, 0xffffff, AO_BC_Load_A_Register);
+               ni_stc_writel(dev, 0xffffff, AO_BC_Load_A_Register);
        else
-               devpriv->stc_writel(dev, 0, AO_BC_Load_A_Register);
-       devpriv->stc_writew(dev, AO_BC_Load, AO_Command_1_Register);
+               ni_stc_writel(dev, 0, AO_BC_Load_A_Register);
+       ni_stc_writew(dev, AO_BC_Load, AO_Command_1_Register);
        devpriv->ao_mode2 &= ~AO_UC_Initial_Load_Source;
-       devpriv->stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
+       ni_stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
        switch (cmd->stop_src) {
        case TRIG_COUNT:
-               if (board->reg_type & ni_reg_m_series_mask) {
+               if (devpriv->is_m_series) {
                        /*  this is how the NI example code does it for m-series boards, verified correct with 6259 */
-                       devpriv->stc_writel(dev, cmd->stop_arg - 1,
-                                           AO_UC_Load_A_Register);
-                       devpriv->stc_writew(dev, AO_UC_Load,
-                                           AO_Command_1_Register);
+                       ni_stc_writel(dev, cmd->stop_arg - 1,
+                                     AO_UC_Load_A_Register);
+                       ni_stc_writew(dev, AO_UC_Load, AO_Command_1_Register);
                } else {
-                       devpriv->stc_writel(dev, cmd->stop_arg,
-                                           AO_UC_Load_A_Register);
-                       devpriv->stc_writew(dev, AO_UC_Load,
-                                           AO_Command_1_Register);
-                       devpriv->stc_writel(dev, cmd->stop_arg - 1,
-                                           AO_UC_Load_A_Register);
+                       ni_stc_writel(dev, cmd->stop_arg,
+                                     AO_UC_Load_A_Register);
+                       ni_stc_writew(dev, AO_UC_Load, AO_Command_1_Register);
+                       ni_stc_writel(dev, cmd->stop_arg - 1,
+                                     AO_UC_Load_A_Register);
                }
                break;
        case TRIG_NONE:
-               devpriv->stc_writel(dev, 0xffffff, AO_UC_Load_A_Register);
-               devpriv->stc_writew(dev, AO_UC_Load, AO_Command_1_Register);
-               devpriv->stc_writel(dev, 0xffffff, AO_UC_Load_A_Register);
+               ni_stc_writel(dev, 0xffffff, AO_UC_Load_A_Register);
+               ni_stc_writew(dev, AO_UC_Load, AO_Command_1_Register);
+               ni_stc_writel(dev, 0xffffff, AO_UC_Load_A_Register);
                break;
        default:
-               devpriv->stc_writel(dev, 0, AO_UC_Load_A_Register);
-               devpriv->stc_writew(dev, AO_UC_Load, AO_Command_1_Register);
-               devpriv->stc_writel(dev, cmd->stop_arg, AO_UC_Load_A_Register);
+               ni_stc_writel(dev, 0, AO_UC_Load_A_Register);
+               ni_stc_writew(dev, AO_UC_Load, AO_Command_1_Register);
+               ni_stc_writel(dev, cmd->stop_arg, AO_UC_Load_A_Register);
        }
 
        devpriv->ao_mode1 &=
@@ -3136,9 +3341,9 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                trigvar =
                    ni_ns_to_timer(dev, cmd->scan_begin_arg,
                                   TRIG_ROUND_NEAREST);
-               devpriv->stc_writel(dev, 1, AO_UI_Load_A_Register);
-               devpriv->stc_writew(dev, AO_UI_Load, AO_Command_1_Register);
-               devpriv->stc_writel(dev, trigvar, AO_UI_Load_A_Register);
+               ni_stc_writel(dev, 1, AO_UI_Load_A_Register);
+               ni_stc_writew(dev, AO_UI_Load, AO_Command_1_Register);
+               ni_stc_writel(dev, trigvar, AO_UI_Load_A_Register);
                break;
        case TRIG_EXT:
                devpriv->ao_mode1 |=
@@ -3151,40 +3356,38 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                BUG();
                break;
        }
-       devpriv->stc_writew(dev, devpriv->ao_cmd2, AO_Command_2_Register);
-       devpriv->stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
+       ni_stc_writew(dev, devpriv->ao_cmd2, AO_Command_2_Register);
+       ni_stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
        devpriv->ao_mode2 &=
            ~(AO_UI_Reload_Mode(3) | AO_UI_Initial_Load_Source);
-       devpriv->stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
+       ni_stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
 
        if (cmd->scan_end_arg > 1) {
                devpriv->ao_mode1 |= AO_Multiple_Channels;
-               devpriv->stc_writew(dev,
-                                   AO_Number_Of_Channels(cmd->scan_end_arg -
-                                                         1) |
-                                   AO_UPDATE_Output_Select
-                                   (AO_Update_Output_High_Z),
-                                   AO_Output_Control_Register);
+               ni_stc_writew(dev,
+                             AO_Number_Of_Channels(cmd->scan_end_arg - 1) |
+                             AO_UPDATE_Output_Select(AO_Update_Output_High_Z),
+                             AO_Output_Control_Register);
        } else {
                unsigned bits;
                devpriv->ao_mode1 &= ~AO_Multiple_Channels;
                bits = AO_UPDATE_Output_Select(AO_Update_Output_High_Z);
-               if (board->reg_type &
-                   (ni_reg_m_series_mask | ni_reg_6xxx_mask)) {
+               if (devpriv->is_m_series ||
+                   board->reg_type & ni_reg_6xxx_mask) {
                        bits |= AO_Number_Of_Channels(0);
                } else {
                        bits |=
                            AO_Number_Of_Channels(CR_CHAN(cmd->chanlist[0]));
                }
-               devpriv->stc_writew(dev, bits, AO_Output_Control_Register);
+               ni_stc_writew(dev, bits, AO_Output_Control_Register);
        }
-       devpriv->stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
+       ni_stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
 
-       devpriv->stc_writew(dev, AO_DAC0_Update_Mode | AO_DAC1_Update_Mode,
-                           AO_Command_1_Register);
+       ni_stc_writew(dev, AO_DAC0_Update_Mode | AO_DAC1_Update_Mode,
+                     AO_Command_1_Register);
 
        devpriv->ao_mode3 |= AO_Stop_On_Overrun_Error;
-       devpriv->stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
+       ni_stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
 
        devpriv->ao_mode2 &= ~AO_FIFO_Mode_Mask;
 #ifdef PCIDMA
@@ -3193,7 +3396,7 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        devpriv->ao_mode2 |= AO_FIFO_Mode_HF;
 #endif
        devpriv->ao_mode2 &= ~AO_FIFO_Retransmit_Enable;
-       devpriv->stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
+       ni_stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
 
        bits = AO_BC_Source_Select | AO_UPDATE_Pulse_Width |
            AO_TMRDACWR_Pulse_Width;
@@ -3204,18 +3407,18 @@ static int ni_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 #if 0
        /* F Hess: windows driver does not set AO_Number_Of_DAC_Packages bit for 6281,
           verified with bus analyzer. */
-       if (board->reg_type & ni_reg_m_series_mask)
+       if (devpriv->is_m_series)
                bits |= AO_Number_Of_DAC_Packages;
 #endif
-       devpriv->stc_writew(dev, bits, AO_Personal_Register);
+       ni_stc_writew(dev, bits, AO_Personal_Register);
        /*  enable sending of ao dma requests */
-       devpriv->stc_writew(dev, AO_AOFREQ_Enable, AO_Start_Select_Register);
+       ni_stc_writew(dev, AO_AOFREQ_Enable, AO_Start_Select_Register);
 
-       devpriv->stc_writew(dev, AO_Configuration_End, Joint_Reset_Register);
+       ni_stc_writew(dev, AO_Configuration_End, Joint_Reset_Register);
 
        if (cmd->stop_src == TRIG_COUNT) {
-               devpriv->stc_writew(dev, AO_BC_TC_Interrupt_Ack,
-                                   Interrupt_B_Ack_Register);
+               ni_stc_writew(dev, AO_BC_TC_Interrupt_Ack,
+                             Interrupt_B_Ack_Register);
                ni_set_bits(dev, Interrupt_B_Enable_Register,
                            AO_BC_TC_Interrupt_Enable, 1);
        }
@@ -3316,39 +3519,33 @@ static int ni_ao_reset(struct comedi_device *dev, struct comedi_subdevice *s)
        const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
 
-       /* devpriv->ao0p=0x0000; */
-       /* ni_writew(devpriv->ao0p,AO_Configuration); */
-
-       /* devpriv->ao1p=AO_Channel(1); */
-       /* ni_writew(devpriv->ao1p,AO_Configuration); */
-
        ni_release_ao_mite_channel(dev);
 
-       devpriv->stc_writew(dev, AO_Configuration_Start, Joint_Reset_Register);
-       devpriv->stc_writew(dev, AO_Disarm, AO_Command_1_Register);
+       ni_stc_writew(dev, AO_Configuration_Start, Joint_Reset_Register);
+       ni_stc_writew(dev, AO_Disarm, AO_Command_1_Register);
        ni_set_bits(dev, Interrupt_B_Enable_Register, ~0, 0);
-       devpriv->stc_writew(dev, AO_BC_Source_Select, AO_Personal_Register);
-       devpriv->stc_writew(dev, 0x3f98, Interrupt_B_Ack_Register);
-       devpriv->stc_writew(dev, AO_BC_Source_Select | AO_UPDATE_Pulse_Width |
-                           AO_TMRDACWR_Pulse_Width, AO_Personal_Register);
-       devpriv->stc_writew(dev, 0, AO_Output_Control_Register);
-       devpriv->stc_writew(dev, 0, AO_Start_Select_Register);
+       ni_stc_writew(dev, AO_BC_Source_Select, AO_Personal_Register);
+       ni_stc_writew(dev, 0x3f98, Interrupt_B_Ack_Register);
+       ni_stc_writew(dev, AO_BC_Source_Select | AO_UPDATE_Pulse_Width |
+                     AO_TMRDACWR_Pulse_Width, AO_Personal_Register);
+       ni_stc_writew(dev, 0, AO_Output_Control_Register);
+       ni_stc_writew(dev, 0, AO_Start_Select_Register);
        devpriv->ao_cmd1 = 0;
-       devpriv->stc_writew(dev, devpriv->ao_cmd1, AO_Command_1_Register);
+       ni_stc_writew(dev, devpriv->ao_cmd1, AO_Command_1_Register);
        devpriv->ao_cmd2 = 0;
-       devpriv->stc_writew(dev, devpriv->ao_cmd2, AO_Command_2_Register);
+       ni_stc_writew(dev, devpriv->ao_cmd2, AO_Command_2_Register);
        devpriv->ao_mode1 = 0;
-       devpriv->stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
+       ni_stc_writew(dev, devpriv->ao_mode1, AO_Mode_1_Register);
        devpriv->ao_mode2 = 0;
-       devpriv->stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
-       if (board->reg_type & ni_reg_m_series_mask)
+       ni_stc_writew(dev, devpriv->ao_mode2, AO_Mode_2_Register);
+       if (devpriv->is_m_series)
                devpriv->ao_mode3 = AO_Last_Gate_Disable;
        else
                devpriv->ao_mode3 = 0;
-       devpriv->stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
+       ni_stc_writew(dev, devpriv->ao_mode3, AO_Mode_3_Register);
        devpriv->ao_trigger_select = 0;
-       devpriv->stc_writew(dev, devpriv->ao_trigger_select,
-                           AO_Trigger_Select_Register);
+       ni_stc_writew(dev, devpriv->ao_trigger_select,
+                     AO_Trigger_Select_Register);
        if (board->reg_type & ni_reg_6xxx_mask) {
                unsigned immediate_bits = 0;
                unsigned i;
@@ -3357,7 +3554,7 @@ static int ni_ao_reset(struct comedi_device *dev, struct comedi_subdevice *s)
                ao_win_out(immediate_bits, AO_Immediate_671x);
                ao_win_out(CLEAR_WG, AO_Misc_611x);
        }
-       devpriv->stc_writew(dev, AO_Configuration_End, Joint_Reset_Register);
+       ni_stc_writew(dev, AO_Configuration_End, Joint_Reset_Register);
 
        return 0;
 }
@@ -3378,7 +3575,7 @@ static int ni_dio_insn_config(struct comedi_device *dev,
 
        devpriv->dio_control &= ~DIO_Pins_Dir_Mask;
        devpriv->dio_control |= DIO_Pins_Dir(s->io_bits);
-       devpriv->stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
+       ni_stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
 
        return insn->n;
 }
@@ -3397,11 +3594,10 @@ static int ni_dio_insn_bits(struct comedi_device *dev,
        if (comedi_dio_update_state(s, data)) {
                devpriv->dio_output &= ~DIO_Parallel_Data_Mask;
                devpriv->dio_output |= DIO_Parallel_Data_Out(s->state);
-               devpriv->stc_writew(dev, devpriv->dio_output,
-                                   DIO_Output_Register);
+               ni_stc_writew(dev, devpriv->dio_output, DIO_Output_Register);
        }
 
-       data[1] = devpriv->stc_readw(dev, DIO_Parallel_Input_Register);
+       data[1] = ni_stc_readw(dev, DIO_Parallel_Input_Register);
 
        return insn->n;
 }
@@ -3411,14 +3607,13 @@ static int ni_m_series_dio_insn_config(struct comedi_device *dev,
                                       struct comedi_insn *insn,
                                       unsigned int *data)
 {
-       struct ni_private *devpriv __maybe_unused = dev->private;
        int ret;
 
        ret = comedi_dio_insn_config(dev, s, insn, data, 0);
        if (ret)
                return ret;
 
-       ni_writel(s->io_bits, M_Offset_DIO_Direction);
+       ni_writel(dev, s->io_bits, M_Offset_DIO_Direction);
 
        return insn->n;
 }
@@ -3428,12 +3623,10 @@ static int ni_m_series_dio_insn_bits(struct comedi_device *dev,
                                     struct comedi_insn *insn,
                                     unsigned int *data)
 {
-       struct ni_private *devpriv __maybe_unused = dev->private;
-
        if (comedi_dio_update_state(s, data))
-               ni_writel(s->state, M_Offset_Static_Digital_Output);
+               ni_writel(dev, s->state, M_Offset_Static_Digital_Output);
 
-       data[1] = ni_readl(M_Offset_Static_Digital_Input);
+       data[1] = ni_readl(dev, M_Offset_Static_Digital_Input);
 
        return insn->n;
 }
@@ -3508,57 +3701,18 @@ static int ni_cdio_cmdtest(struct comedi_device *dev,
        return 0;
 }
 
-static int ni_cdio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
-{
-       struct ni_private *devpriv __maybe_unused = dev->private;
-       const struct comedi_cmd *cmd = &s->async->cmd;
-       unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
-       int retval;
-
-       ni_writel(CDO_Reset_Bit, M_Offset_CDIO_Command);
-       switch (cmd->scan_begin_src) {
-       case TRIG_EXT:
-               cdo_mode_bits |=
-                   CR_CHAN(cmd->scan_begin_arg) &
-                   CDO_Sample_Source_Select_Mask;
-               break;
-       default:
-               BUG();
-               break;
-       }
-       if (cmd->scan_begin_arg & CR_INVERT)
-               cdo_mode_bits |= CDO_Polarity_Bit;
-       ni_writel(cdo_mode_bits, M_Offset_CDO_Mode);
-       if (s->io_bits) {
-               ni_writel(s->state, M_Offset_CDO_FIFO_Data);
-               ni_writel(CDO_SW_Update_Bit, M_Offset_CDIO_Command);
-               ni_writel(s->io_bits, M_Offset_CDO_Mask_Enable);
-       } else {
-               comedi_error(dev,
-                            "attempted to run digital output command with no lines configured as outputs");
-               return -EIO;
-       }
-       retval = ni_request_cdo_mite_channel(dev);
-       if (retval < 0)
-               return retval;
-
-       s->async->inttrig = ni_cdo_inttrig;
-
-       return 0;
-}
-
 static int ni_cdo_inttrig(struct comedi_device *dev,
                          struct comedi_subdevice *s,
                          unsigned int trig_num)
 {
+       struct comedi_cmd *cmd = &s->async->cmd;
+       const unsigned timeout = 1000;
+       int retval = 0;
+       unsigned i;
 #ifdef PCIDMA
        struct ni_private *devpriv = dev->private;
        unsigned long flags;
 #endif
-       struct comedi_cmd *cmd = &s->async->cmd;
-       int retval = 0;
-       unsigned i;
-       const unsigned timeout = 1000;
 
        if (trig_num != cmd->start_arg)
                return -EINVAL;
@@ -3583,53 +3737,88 @@ static int ni_cdo_inttrig(struct comedi_device *dev,
 #endif
 /*
 * XXX not sure what interrupt C group does
-* ni_writeb(Interrupt_Group_C_Enable_Bit,
+* ni_writeb(dev, Interrupt_Group_C_Enable_Bit,
 * M_Offset_Interrupt_C_Enable); wait for dma to fill output fifo
 */
        for (i = 0; i < timeout; ++i) {
-               if (ni_readl(M_Offset_CDIO_Status) & CDO_FIFO_Full_Bit)
+               if (ni_readl(dev, M_Offset_CDIO_Status) & CDO_FIFO_Full_Bit)
                        break;
                udelay(10);
        }
        if (i == timeout) {
                comedi_error(dev, "dma failed to fill cdo fifo!");
-               ni_cdio_cancel(dev, s);
+               s->cancel(dev, s);
                return -EIO;
        }
-       ni_writel(CDO_Arm_Bit | CDO_Error_Interrupt_Enable_Set_Bit |
-                 CDO_Empty_FIFO_Interrupt_Enable_Set_Bit,
+       ni_writel(dev, CDO_Arm_Bit | CDO_Error_Interrupt_Enable_Set_Bit |
+                      CDO_Empty_FIFO_Interrupt_Enable_Set_Bit,
                  M_Offset_CDIO_Command);
        return retval;
 }
 
-static int ni_cdio_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
+static int ni_cdio_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       struct ni_private *devpriv __maybe_unused = dev->private;
+       const struct comedi_cmd *cmd = &s->async->cmd;
+       unsigned cdo_mode_bits = CDO_FIFO_Mode_Bit | CDO_Halt_On_Error_Bit;
+       int retval;
+
+       ni_writel(dev, CDO_Reset_Bit, M_Offset_CDIO_Command);
+       switch (cmd->scan_begin_src) {
+       case TRIG_EXT:
+               cdo_mode_bits |=
+                   CR_CHAN(cmd->scan_begin_arg) &
+                   CDO_Sample_Source_Select_Mask;
+               break;
+       default:
+               BUG();
+               break;
+       }
+       if (cmd->scan_begin_arg & CR_INVERT)
+               cdo_mode_bits |= CDO_Polarity_Bit;
+       ni_writel(dev, cdo_mode_bits, M_Offset_CDO_Mode);
+       if (s->io_bits) {
+               ni_writel(dev, s->state, M_Offset_CDO_FIFO_Data);
+               ni_writel(dev, CDO_SW_Update_Bit, M_Offset_CDIO_Command);
+               ni_writel(dev, s->io_bits, M_Offset_CDO_Mask_Enable);
+       } else {
+               comedi_error(dev,
+                            "attempted to run digital output command with no lines configured as outputs");
+               return -EIO;
+       }
+       retval = ni_request_cdo_mite_channel(dev);
+       if (retval < 0)
+               return retval;
+
+       s->async->inttrig = ni_cdo_inttrig;
+
+       return 0;
+}
 
-       ni_writel(CDO_Disarm_Bit | CDO_Error_Interrupt_Enable_Clear_Bit |
-                 CDO_Empty_FIFO_Interrupt_Enable_Clear_Bit |
-                 CDO_FIFO_Request_Interrupt_Enable_Clear_Bit,
+static int ni_cdio_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
+{
+       ni_writel(dev, CDO_Disarm_Bit | CDO_Error_Interrupt_Enable_Clear_Bit |
+                      CDO_Empty_FIFO_Interrupt_Enable_Clear_Bit |
+                      CDO_FIFO_Request_Interrupt_Enable_Clear_Bit,
                  M_Offset_CDIO_Command);
 /*
-* XXX not sure what interrupt C group does ni_writeb(0,
+* XXX not sure what interrupt C group does ni_writeb(dev, 0,
 * M_Offset_Interrupt_C_Enable);
 */
-       ni_writel(0, M_Offset_CDO_Mask_Enable);
+       ni_writel(dev, 0, M_Offset_CDO_Mask_Enable);
        ni_release_cdo_mite_channel(dev);
        return 0;
 }
 
 static void handle_cdio_interrupt(struct comedi_device *dev)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv __maybe_unused = dev->private;
+       struct ni_private *devpriv = dev->private;
        unsigned cdio_status;
        struct comedi_subdevice *s = &dev->subdevices[NI_DIO_SUBDEV];
 #ifdef PCIDMA
        unsigned long flags;
 #endif
 
-       if ((board->reg_type & ni_reg_m_series_mask) == 0)
+       if (!devpriv->is_m_series)
                return;
 #ifdef PCIDMA
        spin_lock_irqsave(&devpriv->mite_channel_lock, flags);
@@ -3646,139 +3835,48 @@ static void handle_cdio_interrupt(struct comedi_device *dev)
        spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags);
 #endif
 
-       cdio_status = ni_readl(M_Offset_CDIO_Status);
+       cdio_status = ni_readl(dev, M_Offset_CDIO_Status);
        if (cdio_status & (CDO_Overrun_Bit | CDO_Underflow_Bit)) {
                /* printk("cdio error: statux=0x%x\n", cdio_status); */
-               ni_writel(CDO_Error_Interrupt_Confirm_Bit, M_Offset_CDIO_Command);      /*  XXX just guessing this is needed and does something useful */
+               /* XXX just guessing this is needed and does something useful */
+               ni_writel(dev, CDO_Error_Interrupt_Confirm_Bit,
+                         M_Offset_CDIO_Command);
                s->async->events |= COMEDI_CB_OVERFLOW;
        }
        if (cdio_status & CDO_FIFO_Empty_Bit) {
                /* printk("cdio fifo empty\n"); */
-               ni_writel(CDO_Empty_FIFO_Interrupt_Enable_Clear_Bit,
+               ni_writel(dev, CDO_Empty_FIFO_Interrupt_Enable_Clear_Bit,
                          M_Offset_CDIO_Command);
                /* s->async->events |= COMEDI_CB_EOA; */
        }
        cfc_handle_events(dev, s);
 }
 
-static int ni_serial_insn_config(struct comedi_device *dev,
-                                struct comedi_subdevice *s,
-                                struct comedi_insn *insn, unsigned int *data)
+static int ni_serial_hw_readwrite8(struct comedi_device *dev,
+                                  struct comedi_subdevice *s,
+                                  unsigned char data_out,
+                                  unsigned char *data_in)
 {
        struct ni_private *devpriv = dev->private;
-       int err = insn->n;
-       unsigned char byte_out, byte_in = 0;
-
-       if (insn->n != 2)
-               return -EINVAL;
+       unsigned int status1;
+       int err = 0, count = 20;
 
-       switch (data[0]) {
-       case INSN_CONFIG_SERIAL_CLOCK:
-               devpriv->serial_hw_mode = 1;
-               devpriv->dio_control |= DIO_HW_Serial_Enable;
+       devpriv->dio_output &= ~DIO_Serial_Data_Mask;
+       devpriv->dio_output |= DIO_Serial_Data_Out(data_out);
+       ni_stc_writew(dev, devpriv->dio_output, DIO_Output_Register);
 
-               if (data[1] == SERIAL_DISABLED) {
-                       devpriv->serial_hw_mode = 0;
-                       devpriv->dio_control &= ~(DIO_HW_Serial_Enable |
-                                                 DIO_Software_Serial_Control);
-                       data[1] = SERIAL_DISABLED;
-                       devpriv->serial_interval_ns = data[1];
-               } else if (data[1] <= SERIAL_600NS) {
-                       /* Warning: this clock speed is too fast to reliably
-                          control SCXI. */
-                       devpriv->dio_control &= ~DIO_HW_Serial_Timebase;
-                       devpriv->clock_and_fout |= Slow_Internal_Timebase;
-                       devpriv->clock_and_fout &= ~DIO_Serial_Out_Divide_By_2;
-                       data[1] = SERIAL_600NS;
-                       devpriv->serial_interval_ns = data[1];
-               } else if (data[1] <= SERIAL_1_2US) {
-                       devpriv->dio_control &= ~DIO_HW_Serial_Timebase;
-                       devpriv->clock_and_fout |= Slow_Internal_Timebase |
-                           DIO_Serial_Out_Divide_By_2;
-                       data[1] = SERIAL_1_2US;
-                       devpriv->serial_interval_ns = data[1];
-               } else if (data[1] <= SERIAL_10US) {
-                       devpriv->dio_control |= DIO_HW_Serial_Timebase;
-                       devpriv->clock_and_fout |= Slow_Internal_Timebase |
-                           DIO_Serial_Out_Divide_By_2;
-                       /* Note: DIO_Serial_Out_Divide_By_2 only affects
-                          600ns/1.2us. If you turn divide_by_2 off with the
-                          slow clock, you will still get 10us, except then
-                          all your delays are wrong. */
-                       data[1] = SERIAL_10US;
-                       devpriv->serial_interval_ns = data[1];
-               } else {
-                       devpriv->dio_control &= ~(DIO_HW_Serial_Enable |
-                                                 DIO_Software_Serial_Control);
-                       devpriv->serial_hw_mode = 0;
-                       data[1] = (data[1] / 1000) * 1000;
-                       devpriv->serial_interval_ns = data[1];
-               }
-
-               devpriv->stc_writew(dev, devpriv->dio_control,
-                                   DIO_Control_Register);
-               devpriv->stc_writew(dev, devpriv->clock_and_fout,
-                                   Clock_and_FOUT_Register);
-               return 1;
-
-               break;
-
-       case INSN_CONFIG_BIDIRECTIONAL_DATA:
-
-               if (devpriv->serial_interval_ns == 0)
-                       return -EINVAL;
-
-               byte_out = data[1] & 0xFF;
-
-               if (devpriv->serial_hw_mode) {
-                       err = ni_serial_hw_readwrite8(dev, s, byte_out,
-                                                     &byte_in);
-               } else if (devpriv->serial_interval_ns > 0) {
-                       err = ni_serial_sw_readwrite8(dev, s, byte_out,
-                                                     &byte_in);
-               } else {
-                       printk("ni_serial_insn_config: serial disabled!\n");
-                       return -EINVAL;
-               }
-               if (err < 0)
-                       return err;
-               data[1] = byte_in & 0xFF;
-               return insn->n;
-
-               break;
-       default:
-               return -EINVAL;
-       }
-
-}
-
-static int ni_serial_hw_readwrite8(struct comedi_device *dev,
-                                  struct comedi_subdevice *s,
-                                  unsigned char data_out,
-                                  unsigned char *data_in)
-{
-       struct ni_private *devpriv = dev->private;
-       unsigned int status1;
-       int err = 0, count = 20;
-
-       devpriv->dio_output &= ~DIO_Serial_Data_Mask;
-       devpriv->dio_output |= DIO_Serial_Data_Out(data_out);
-       devpriv->stc_writew(dev, devpriv->dio_output, DIO_Output_Register);
-
-       status1 = devpriv->stc_readw(dev, Joint_Status_1_Register);
-       if (status1 & DIO_Serial_IO_In_Progress_St) {
-               err = -EBUSY;
-               goto Error;
-       }
+       status1 = ni_stc_readw(dev, Joint_Status_1_Register);
+       if (status1 & DIO_Serial_IO_In_Progress_St) {
+               err = -EBUSY;
+               goto Error;
+       }
 
        devpriv->dio_control |= DIO_HW_Serial_Start;
-       devpriv->stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
+       ni_stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
        devpriv->dio_control &= ~DIO_HW_Serial_Start;
 
        /* Wait until STC says we're done, but don't loop infinitely. */
-       while ((status1 =
-               devpriv->stc_readw(dev,
-                                  Joint_Status_1_Register)) &
+       while ((status1 = ni_stc_readw(dev, Joint_Status_1_Register)) &
               DIO_Serial_IO_In_Progress_St) {
                /* Delay one bit per loop */
                udelay((devpriv->serial_interval_ns + 999) / 1000);
@@ -3795,10 +3893,10 @@ static int ni_serial_hw_readwrite8(struct comedi_device *dev,
        udelay((devpriv->serial_interval_ns + 999) / 1000);
 
        if (data_in != NULL)
-               *data_in = devpriv->stc_readw(dev, DIO_Serial_Input_Register);
+               *data_in = ni_stc_readw(dev, DIO_Serial_Input_Register);
 
 Error:
-       devpriv->stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
+       ni_stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
 
        return err;
 }
@@ -3821,27 +3919,23 @@ static int ni_serial_sw_readwrite8(struct comedi_device *dev,
                devpriv->dio_output &= ~DIO_SDOUT;
                if (data_out & mask)
                        devpriv->dio_output |= DIO_SDOUT;
-               devpriv->stc_writew(dev, devpriv->dio_output,
-                                   DIO_Output_Register);
+               ni_stc_writew(dev, devpriv->dio_output, DIO_Output_Register);
 
                /* Assert SDCLK (active low, inverted), wait for half of
                   the delay, deassert SDCLK, and wait for the other half. */
                devpriv->dio_control |= DIO_Software_Serial_Control;
-               devpriv->stc_writew(dev, devpriv->dio_control,
-                                   DIO_Control_Register);
+               ni_stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
 
                udelay((devpriv->serial_interval_ns + 999) / 2000);
 
                devpriv->dio_control &= ~DIO_Software_Serial_Control;
-               devpriv->stc_writew(dev, devpriv->dio_control,
-                                   DIO_Control_Register);
+               ni_stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
 
                udelay((devpriv->serial_interval_ns + 999) / 2000);
 
                /* Input current bit */
-               if (devpriv->stc_readw(dev,
-                                      DIO_Parallel_Input_Register) & DIO_SDIN) {
-                       /* printk("DIO_P_I_R: 0x%x\n", devpriv->stc_readw(dev, DIO_Parallel_Input_Register)); */
+               if (ni_stc_readw(dev, DIO_Parallel_Input_Register) & DIO_SDIN) {
+                       /* printk("DIO_P_I_R: 0x%x\n", ni_stc_readw(dev, DIO_Parallel_Input_Register)); */
                        input |= mask;
                }
        }
@@ -3852,14 +3946,95 @@ static int ni_serial_sw_readwrite8(struct comedi_device *dev,
        return 0;
 }
 
-static void mio_common_detach(struct comedi_device *dev)
+static int ni_serial_insn_config(struct comedi_device *dev,
+                                struct comedi_subdevice *s,
+                                struct comedi_insn *insn,
+                                unsigned int *data)
 {
        struct ni_private *devpriv = dev->private;
+       int err = insn->n;
+       unsigned char byte_out, byte_in = 0;
 
-       if (devpriv) {
-               if (devpriv->counter_dev)
-                       ni_gpct_device_destroy(devpriv->counter_dev);
+       if (insn->n != 2)
+               return -EINVAL;
+
+       switch (data[0]) {
+       case INSN_CONFIG_SERIAL_CLOCK:
+               devpriv->serial_hw_mode = 1;
+               devpriv->dio_control |= DIO_HW_Serial_Enable;
+
+               if (data[1] == SERIAL_DISABLED) {
+                       devpriv->serial_hw_mode = 0;
+                       devpriv->dio_control &= ~(DIO_HW_Serial_Enable |
+                                                 DIO_Software_Serial_Control);
+                       data[1] = SERIAL_DISABLED;
+                       devpriv->serial_interval_ns = data[1];
+               } else if (data[1] <= SERIAL_600NS) {
+                       /* Warning: this clock speed is too fast to reliably
+                          control SCXI. */
+                       devpriv->dio_control &= ~DIO_HW_Serial_Timebase;
+                       devpriv->clock_and_fout |= Slow_Internal_Timebase;
+                       devpriv->clock_and_fout &= ~DIO_Serial_Out_Divide_By_2;
+                       data[1] = SERIAL_600NS;
+                       devpriv->serial_interval_ns = data[1];
+               } else if (data[1] <= SERIAL_1_2US) {
+                       devpriv->dio_control &= ~DIO_HW_Serial_Timebase;
+                       devpriv->clock_and_fout |= Slow_Internal_Timebase |
+                           DIO_Serial_Out_Divide_By_2;
+                       data[1] = SERIAL_1_2US;
+                       devpriv->serial_interval_ns = data[1];
+               } else if (data[1] <= SERIAL_10US) {
+                       devpriv->dio_control |= DIO_HW_Serial_Timebase;
+                       devpriv->clock_and_fout |= Slow_Internal_Timebase |
+                           DIO_Serial_Out_Divide_By_2;
+                       /* Note: DIO_Serial_Out_Divide_By_2 only affects
+                          600ns/1.2us. If you turn divide_by_2 off with the
+                          slow clock, you will still get 10us, except then
+                          all your delays are wrong. */
+                       data[1] = SERIAL_10US;
+                       devpriv->serial_interval_ns = data[1];
+               } else {
+                       devpriv->dio_control &= ~(DIO_HW_Serial_Enable |
+                                                 DIO_Software_Serial_Control);
+                       devpriv->serial_hw_mode = 0;
+                       data[1] = (data[1] / 1000) * 1000;
+                       devpriv->serial_interval_ns = data[1];
+               }
+
+               ni_stc_writew(dev, devpriv->dio_control, DIO_Control_Register);
+               ni_stc_writew(dev, devpriv->clock_and_fout,
+                             Clock_and_FOUT_Register);
+               return 1;
+
+               break;
+
+       case INSN_CONFIG_BIDIRECTIONAL_DATA:
+
+               if (devpriv->serial_interval_ns == 0)
+                       return -EINVAL;
+
+               byte_out = data[1] & 0xFF;
+
+               if (devpriv->serial_hw_mode) {
+                       err = ni_serial_hw_readwrite8(dev, s, byte_out,
+                                                     &byte_in);
+               } else if (devpriv->serial_interval_ns > 0) {
+                       err = ni_serial_sw_readwrite8(dev, s, byte_out,
+                                                     &byte_in);
+               } else {
+                       printk("ni_serial_insn_config: serial disabled!\n");
+                       return -EINVAL;
+               }
+               if (err < 0)
+                       return err;
+               data[1] = byte_in & 0xFF;
+               return insn->n;
+
+               break;
+       default:
+               return -EINVAL;
        }
+
 }
 
 static void init_ao_67xx(struct comedi_device *dev, struct comedi_subdevice *s)
@@ -3969,7 +4144,6 @@ static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
                                   enum ni_gpct_register reg)
 {
        struct comedi_device *dev = counter->counter_dev->dev;
-       struct ni_private *devpriv = dev->private;
        unsigned stc_register;
        /* bits in the join reset register which are relevant to counters */
        static const unsigned gpct_joint_reset_mask = G0_Reset | G1_Reset;
@@ -3981,28 +4155,28 @@ static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
        switch (reg) {
                /* m-series-only registers */
        case NITIO_G0_CNT_MODE:
-               ni_writew(bits, M_Offset_G0_Counting_Mode);
+               ni_writew(dev, bits, M_Offset_G0_Counting_Mode);
                break;
        case NITIO_G1_CNT_MODE:
-               ni_writew(bits, M_Offset_G1_Counting_Mode);
+               ni_writew(dev, bits, M_Offset_G1_Counting_Mode);
                break;
        case NITIO_G0_GATE2:
-               ni_writew(bits, M_Offset_G0_Second_Gate);
+               ni_writew(dev, bits, M_Offset_G0_Second_Gate);
                break;
        case NITIO_G1_GATE2:
-               ni_writew(bits, M_Offset_G1_Second_Gate);
+               ni_writew(dev, bits, M_Offset_G1_Second_Gate);
                break;
        case NITIO_G0_DMA_CFG:
-               ni_writew(bits, M_Offset_G0_DMA_Config);
+               ni_writew(dev, bits, M_Offset_G0_DMA_Config);
                break;
        case NITIO_G1_DMA_CFG:
-               ni_writew(bits, M_Offset_G1_DMA_Config);
+               ni_writew(dev, bits, M_Offset_G1_DMA_Config);
                break;
        case NITIO_G0_ABZ:
-               ni_writew(bits, M_Offset_G0_MSeries_ABZ);
+               ni_writew(dev, bits, M_Offset_G0_MSeries_ABZ);
                break;
        case NITIO_G1_ABZ:
-               ni_writew(bits, M_Offset_G1_MSeries_ABZ);
+               ni_writew(dev, bits, M_Offset_G1_MSeries_ABZ);
                break;
 
                /* 32 bit registers */
@@ -4011,7 +4185,7 @@ static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
        case NITIO_G0_LOADB:
        case NITIO_G1_LOADB:
                stc_register = ni_gpct_to_stc_register(reg);
-               devpriv->stc_writel(dev, bits, stc_register);
+               ni_stc_writel(dev, bits, stc_register);
                break;
 
                /* 16 bit registers */
@@ -4030,7 +4204,7 @@ static void ni_gpct_write_register(struct ni_gpct *counter, unsigned bits,
                /* fall-through */
        default:
                stc_register = ni_gpct_to_stc_register(reg);
-               devpriv->stc_writew(dev, bits, stc_register);
+               ni_stc_writew(dev, bits, stc_register);
        }
 }
 
@@ -4038,15 +4212,14 @@ static unsigned ni_gpct_read_register(struct ni_gpct *counter,
                                      enum ni_gpct_register reg)
 {
        struct comedi_device *dev = counter->counter_dev->dev;
-       struct ni_private *devpriv = dev->private;
        unsigned stc_register;
 
        switch (reg) {
                /* m-series only registers */
        case NITIO_G0_DMA_STATUS:
-               return ni_readw(M_Offset_G0_DMA_Status);
+               return ni_readw(dev, M_Offset_G0_DMA_Status);
        case NITIO_G1_DMA_STATUS:
-               return ni_readw(M_Offset_G1_DMA_Status);
+               return ni_readw(dev, M_Offset_G1_DMA_Status);
 
                /* 32 bit registers */
        case NITIO_G0_HW_SAVE:
@@ -4054,12 +4227,12 @@ static unsigned ni_gpct_read_register(struct ni_gpct *counter,
        case NITIO_G0_SW_SAVE:
        case NITIO_G1_SW_SAVE:
                stc_register = ni_gpct_to_stc_register(reg);
-               return devpriv->stc_readl(dev, stc_register);
+               return ni_stc_readl(dev, stc_register);
 
                /* 16 bit registers */
        default:
                stc_register = ni_gpct_to_stc_register(reg);
-               return devpriv->stc_readw(dev, stc_register);
+               return ni_stc_readw(dev, stc_register);
                break;
        }
        return 0;
@@ -4067,507 +4240,173 @@ static unsigned ni_gpct_read_register(struct ni_gpct *counter,
 
 static int ni_freq_out_insn_read(struct comedi_device *dev,
                                 struct comedi_subdevice *s,
-                                struct comedi_insn *insn, unsigned int *data)
+                                struct comedi_insn *insn,
+                                unsigned int *data)
 {
        struct ni_private *devpriv = dev->private;
+       unsigned int val = devpriv->clock_and_fout & FOUT_Divider_mask;
+       int i;
 
-       data[0] = devpriv->clock_and_fout & FOUT_Divider_mask;
-       return 1;
+       for (i = 0; i < insn->n; i++)
+               data[i] = val;
+
+       return insn->n;
 }
 
 static int ni_freq_out_insn_write(struct comedi_device *dev,
                                  struct comedi_subdevice *s,
-                                 struct comedi_insn *insn, unsigned int *data)
+                                 struct comedi_insn *insn,
+                                 unsigned int *data)
 {
        struct ni_private *devpriv = dev->private;
 
-       devpriv->clock_and_fout &= ~FOUT_Enable;
-       devpriv->stc_writew(dev, devpriv->clock_and_fout,
-                           Clock_and_FOUT_Register);
-       devpriv->clock_and_fout &= ~FOUT_Divider_mask;
-       devpriv->clock_and_fout |= FOUT_Divider(data[0]);
-       devpriv->clock_and_fout |= FOUT_Enable;
-       devpriv->stc_writew(dev, devpriv->clock_and_fout,
-                           Clock_and_FOUT_Register);
+       if (insn->n) {
+               devpriv->clock_and_fout &= ~FOUT_Enable;
+               ni_stc_writew(dev, devpriv->clock_and_fout,
+                             Clock_and_FOUT_Register);
+               devpriv->clock_and_fout &= ~FOUT_Divider_mask;
+
+               /* use the last data value to set the fout divider */
+               devpriv->clock_and_fout |= FOUT_Divider(data[insn->n - 1]);
+
+               devpriv->clock_and_fout |= FOUT_Enable;
+               ni_stc_writew(dev, devpriv->clock_and_fout,
+                             Clock_and_FOUT_Register);
+       }
        return insn->n;
 }
 
-static int ni_set_freq_out_clock(struct comedi_device *dev,
-                                unsigned int clock_source)
+static int ni_freq_out_insn_config(struct comedi_device *dev,
+                                  struct comedi_subdevice *s,
+                                  struct comedi_insn *insn,
+                                  unsigned int *data)
 {
        struct ni_private *devpriv = dev->private;
 
-       switch (clock_source) {
-       case NI_FREQ_OUT_TIMEBASE_1_DIV_2_CLOCK_SRC:
-               devpriv->clock_and_fout &= ~FOUT_Timebase_Select;
+       switch (data[0]) {
+       case INSN_CONFIG_SET_CLOCK_SRC:
+               switch (data[1]) {
+               case NI_FREQ_OUT_TIMEBASE_1_DIV_2_CLOCK_SRC:
+                       devpriv->clock_and_fout &= ~FOUT_Timebase_Select;
+                       break;
+               case NI_FREQ_OUT_TIMEBASE_2_CLOCK_SRC:
+                       devpriv->clock_and_fout |= FOUT_Timebase_Select;
+                       break;
+               default:
+                       return -EINVAL;
+               }
+               ni_stc_writew(dev, devpriv->clock_and_fout,
+                             Clock_and_FOUT_Register);
                break;
-       case NI_FREQ_OUT_TIMEBASE_2_CLOCK_SRC:
-               devpriv->clock_and_fout |= FOUT_Timebase_Select;
+       case INSN_CONFIG_GET_CLOCK_SRC:
+               if (devpriv->clock_and_fout & FOUT_Timebase_Select) {
+                       data[1] = NI_FREQ_OUT_TIMEBASE_2_CLOCK_SRC;
+                       data[2] = TIMEBASE_2_NS;
+               } else {
+                       data[1] = NI_FREQ_OUT_TIMEBASE_1_DIV_2_CLOCK_SRC;
+                       data[2] = TIMEBASE_1_NS * 2;
+               }
                break;
        default:
                return -EINVAL;
        }
-       devpriv->stc_writew(dev, devpriv->clock_and_fout,
-                           Clock_and_FOUT_Register);
-       return 3;
+       return insn->n;
 }
 
-static void ni_get_freq_out_clock(struct comedi_device *dev,
-                                 unsigned int *clock_source,
-                                 unsigned int *clock_period_ns)
+static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
 {
-       struct ni_private *devpriv = dev->private;
+       struct comedi_device *dev = (struct comedi_device *)arg;
 
-       if (devpriv->clock_and_fout & FOUT_Timebase_Select) {
-               *clock_source = NI_FREQ_OUT_TIMEBASE_2_CLOCK_SRC;
-               *clock_period_ns = TIMEBASE_2_NS;
+       if (dir) {
+               ni_writeb(dev, data, Port_A + 2 * port);
+               return 0;
        } else {
-               *clock_source = NI_FREQ_OUT_TIMEBASE_1_DIV_2_CLOCK_SRC;
-               *clock_period_ns = TIMEBASE_1_NS * 2;
+               return ni_readb(dev, Port_A + 2 * port);
        }
 }
 
-static int ni_freq_out_insn_config(struct comedi_device *dev,
-                                  struct comedi_subdevice *s,
-                                  struct comedi_insn *insn, unsigned int *data)
+static int ni_get_pwm_config(struct comedi_device *dev, unsigned int *data)
+{
+       struct ni_private *devpriv = dev->private;
+
+       data[1] = devpriv->pwm_up_count * devpriv->clock_ns;
+       data[2] = devpriv->pwm_down_count * devpriv->clock_ns;
+       return 3;
+}
+
+static int ni_m_series_pwm_config(struct comedi_device *dev,
+                                 struct comedi_subdevice *s,
+                                 struct comedi_insn *insn,
+                                 unsigned int *data)
 {
+       struct ni_private *devpriv = dev->private;
+       unsigned up_count, down_count;
+
        switch (data[0]) {
-       case INSN_CONFIG_SET_CLOCK_SRC:
-               return ni_set_freq_out_clock(dev, data[1]);
+       case INSN_CONFIG_PWM_OUTPUT:
+               switch (data[1]) {
+               case TRIG_ROUND_NEAREST:
+                       up_count =
+                           (data[2] +
+                            devpriv->clock_ns / 2) / devpriv->clock_ns;
+                       break;
+               case TRIG_ROUND_DOWN:
+                       up_count = data[2] / devpriv->clock_ns;
+                       break;
+               case TRIG_ROUND_UP:
+                       up_count =
+                           (data[2] + devpriv->clock_ns -
+                            1) / devpriv->clock_ns;
+                       break;
+               default:
+                       return -EINVAL;
+                       break;
+               }
+               switch (data[3]) {
+               case TRIG_ROUND_NEAREST:
+                       down_count =
+                           (data[4] +
+                            devpriv->clock_ns / 2) / devpriv->clock_ns;
+                       break;
+               case TRIG_ROUND_DOWN:
+                       down_count = data[4] / devpriv->clock_ns;
+                       break;
+               case TRIG_ROUND_UP:
+                       down_count =
+                           (data[4] + devpriv->clock_ns -
+                            1) / devpriv->clock_ns;
+                       break;
+               default:
+                       return -EINVAL;
+                       break;
+               }
+               if (up_count * devpriv->clock_ns != data[2] ||
+                   down_count * devpriv->clock_ns != data[4]) {
+                       data[2] = up_count * devpriv->clock_ns;
+                       data[4] = down_count * devpriv->clock_ns;
+                       return -EAGAIN;
+               }
+               ni_writel(dev, MSeries_Cal_PWM_High_Time_Bits(up_count) |
+                              MSeries_Cal_PWM_Low_Time_Bits(down_count),
+                         M_Offset_Cal_PWM);
+               devpriv->pwm_up_count = up_count;
+               devpriv->pwm_down_count = down_count;
+               return 5;
+               break;
+       case INSN_CONFIG_GET_PWM_OUTPUT:
+               return ni_get_pwm_config(dev, data);
                break;
-       case INSN_CONFIG_GET_CLOCK_SRC:
-               ni_get_freq_out_clock(dev, &data[1], &data[2]);
-               return 3;
        default:
+               return -EINVAL;
                break;
        }
-       return -EINVAL;
-}
-
-static int ni_alloc_private(struct comedi_device *dev)
-{
-       struct ni_private *devpriv;
-
-       devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
-       if (!devpriv)
-               return -ENOMEM;
-
-       spin_lock_init(&devpriv->window_lock);
-       spin_lock_init(&devpriv->soft_reg_copy_lock);
-       spin_lock_init(&devpriv->mite_channel_lock);
-
        return 0;
-};
+}
 
-static int ni_E_init(struct comedi_device *dev)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       struct comedi_subdevice *s;
-       unsigned j;
-       enum ni_gpct_variant counter_variant;
-       int ret;
-
-       if (board->n_aochan > MAX_N_AO_CHAN) {
-               printk("bug! n_aochan > MAX_N_AO_CHAN\n");
-               return -EINVAL;
-       }
-
-       ret = comedi_alloc_subdevices(dev, NI_NUM_SUBDEVICES);
-       if (ret)
-               return ret;
-
-       /* analog input subdevice */
-
-       s = &dev->subdevices[NI_AI_SUBDEV];
-       dev->read_subdev = s;
-       if (board->n_adchan) {
-               s->type = COMEDI_SUBD_AI;
-               s->subdev_flags =
-                   SDF_READABLE | SDF_DIFF | SDF_DITHER | SDF_CMD_READ;
-               if (board->reg_type != ni_reg_611x)
-                       s->subdev_flags |= SDF_GROUND | SDF_COMMON | SDF_OTHER;
-               if (board->adbits > 16)
-                       s->subdev_flags |= SDF_LSAMPL;
-               if (board->reg_type & ni_reg_m_series_mask)
-                       s->subdev_flags |= SDF_SOFT_CALIBRATED;
-               s->n_chan = board->n_adchan;
-               s->len_chanlist = 512;
-               s->maxdata = (1 << board->adbits) - 1;
-               s->range_table = ni_range_lkup[board->gainlkup];
-               s->insn_read = &ni_ai_insn_read;
-               s->insn_config = &ni_ai_insn_config;
-               s->do_cmdtest = &ni_ai_cmdtest;
-               s->do_cmd = &ni_ai_cmd;
-               s->cancel = &ni_ai_reset;
-               s->poll = &ni_ai_poll;
-               s->munge = &ni_ai_munge;
-#ifdef PCIDMA
-               s->async_dma_dir = DMA_FROM_DEVICE;
-#endif
-       } else {
-               s->type = COMEDI_SUBD_UNUSED;
-       }
-
-       /* analog output subdevice */
-
-       s = &dev->subdevices[NI_AO_SUBDEV];
-       if (board->n_aochan) {
-               s->type = COMEDI_SUBD_AO;
-               s->subdev_flags = SDF_WRITABLE | SDF_DEGLITCH | SDF_GROUND;
-               if (board->reg_type & ni_reg_m_series_mask)
-                       s->subdev_flags |= SDF_SOFT_CALIBRATED;
-               s->n_chan = board->n_aochan;
-               s->maxdata = (1 << board->aobits) - 1;
-               s->range_table = board->ao_range_table;
-               s->insn_read = &ni_ao_insn_read;
-               if (board->reg_type & ni_reg_6xxx_mask)
-                       s->insn_write = &ni_ao_insn_write_671x;
-               else
-                       s->insn_write = &ni_ao_insn_write;
-               s->insn_config = &ni_ao_insn_config;
-#ifdef PCIDMA
-               if (board->n_aochan) {
-                       s->async_dma_dir = DMA_TO_DEVICE;
-#else
-               if (board->ao_fifo_depth) {
-#endif
-                       dev->write_subdev = s;
-                       s->subdev_flags |= SDF_CMD_WRITE;
-                       s->do_cmd = &ni_ao_cmd;
-                       s->do_cmdtest = &ni_ao_cmdtest;
-                       s->len_chanlist = board->n_aochan;
-                       if ((board->reg_type & ni_reg_m_series_mask) == 0)
-                               s->munge = ni_ao_munge;
-               }
-               s->cancel = &ni_ao_reset;
-       } else {
-               s->type = COMEDI_SUBD_UNUSED;
-       }
-       if ((board->reg_type & ni_reg_67xx_mask))
-               init_ao_67xx(dev, s);
-
-       /* digital i/o subdevice */
-
-       s = &dev->subdevices[NI_DIO_SUBDEV];
-       s->type = COMEDI_SUBD_DIO;
-       s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
-       s->maxdata = 1;
-       s->io_bits = 0;         /* all bits input */
-       s->range_table = &range_digital;
-       s->n_chan = board->num_p0_dio_channels;
-       if (board->reg_type & ni_reg_m_series_mask) {
-               s->subdev_flags |=
-                   SDF_LSAMPL | SDF_CMD_WRITE /* | SDF_CMD_READ */;
-               s->insn_bits = &ni_m_series_dio_insn_bits;
-               s->insn_config = &ni_m_series_dio_insn_config;
-               s->do_cmd = &ni_cdio_cmd;
-               s->do_cmdtest = &ni_cdio_cmdtest;
-               s->cancel = &ni_cdio_cancel;
-               s->async_dma_dir = DMA_BIDIRECTIONAL;
-               s->len_chanlist = s->n_chan;
-
-               ni_writel(CDO_Reset_Bit | CDI_Reset_Bit, M_Offset_CDIO_Command);
-               ni_writel(s->io_bits, M_Offset_DIO_Direction);
-       } else {
-               s->insn_bits = &ni_dio_insn_bits;
-               s->insn_config = &ni_dio_insn_config;
-               devpriv->dio_control = DIO_Pins_Dir(s->io_bits);
-               ni_writew(devpriv->dio_control, DIO_Control_Register);
-       }
-
-       /* 8255 device */
-       s = &dev->subdevices[NI_8255_DIO_SUBDEV];
-       if (board->has_8255) {
-               ret = subdev_8255_init(dev, s, ni_8255_callback,
-                                      (unsigned long)dev);
-               if (ret)
-                       return ret;
-       } else {
-               s->type = COMEDI_SUBD_UNUSED;
-       }
-
-       /* formerly general purpose counter/timer device, but no longer used */
-       s = &dev->subdevices[NI_UNUSED_SUBDEV];
-       s->type = COMEDI_SUBD_UNUSED;
-
-       /* calibration subdevice -- ai and ao */
-       s = &dev->subdevices[NI_CALIBRATION_SUBDEV];
-       s->type = COMEDI_SUBD_CALIB;
-       if (board->reg_type & ni_reg_m_series_mask) {
-               /*  internal PWM analog output used for AI nonlinearity calibration */
-               s->subdev_flags = SDF_INTERNAL;
-               s->insn_config = &ni_m_series_pwm_config;
-               s->n_chan = 1;
-               s->maxdata = 0;
-               ni_writel(0x0, M_Offset_Cal_PWM);
-       } else if (board->reg_type == ni_reg_6143) {
-               /*  internal PWM analog output used for AI nonlinearity calibration */
-               s->subdev_flags = SDF_INTERNAL;
-               s->insn_config = &ni_6143_pwm_config;
-               s->n_chan = 1;
-               s->maxdata = 0;
-       } else {
-               s->subdev_flags = SDF_WRITABLE | SDF_INTERNAL;
-               s->insn_read = &ni_calib_insn_read;
-               s->insn_write = &ni_calib_insn_write;
-               caldac_setup(dev, s);
-       }
-
-       /* EEPROM */
-       s = &dev->subdevices[NI_EEPROM_SUBDEV];
-       s->type = COMEDI_SUBD_MEMORY;
-       s->subdev_flags = SDF_READABLE | SDF_INTERNAL;
-       s->maxdata = 0xff;
-       if (board->reg_type & ni_reg_m_series_mask) {
-               s->n_chan = M_SERIES_EEPROM_SIZE;
-               s->insn_read = &ni_m_series_eeprom_insn_read;
-       } else {
-               s->n_chan = 512;
-               s->insn_read = &ni_eeprom_insn_read;
-       }
-
-       /* PFI */
-       s = &dev->subdevices[NI_PFI_DIO_SUBDEV];
-       s->type = COMEDI_SUBD_DIO;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
-       if (board->reg_type & ni_reg_m_series_mask) {
-               unsigned i;
-               s->n_chan = 16;
-               ni_writew(s->state, M_Offset_PFI_DO);
-               for (i = 0; i < NUM_PFI_OUTPUT_SELECT_REGS; ++i) {
-                       ni_writew(devpriv->pfi_output_select_reg[i],
-                                 M_Offset_PFI_Output_Select(i + 1));
-               }
-       } else {
-               s->n_chan = 10;
-       }
-       s->maxdata = 1;
-       if (board->reg_type & ni_reg_m_series_mask)
-               s->insn_bits = &ni_pfi_insn_bits;
-       s->insn_config = &ni_pfi_insn_config;
-       ni_set_bits(dev, IO_Bidirection_Pin_Register, ~0, 0);
-
-       /* cs5529 calibration adc */
-       s = &dev->subdevices[NI_CS5529_CALIBRATION_SUBDEV];
-       if (board->reg_type & ni_reg_67xx_mask) {
-               s->type = COMEDI_SUBD_AI;
-               s->subdev_flags = SDF_READABLE | SDF_DIFF | SDF_INTERNAL;
-               /*  one channel for each analog output channel */
-               s->n_chan = board->n_aochan;
-               s->maxdata = (1 << 16) - 1;
-               s->range_table = &range_unknown;        /* XXX */
-               s->insn_read = cs5529_ai_insn_read;
-               s->insn_config = NULL;
-               init_cs5529(dev);
-       } else {
-               s->type = COMEDI_SUBD_UNUSED;
-       }
-
-       /* Serial */
-       s = &dev->subdevices[NI_SERIAL_SUBDEV];
-       s->type = COMEDI_SUBD_SERIAL;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
-       s->n_chan = 1;
-       s->maxdata = 0xff;
-       s->insn_config = ni_serial_insn_config;
-       devpriv->serial_interval_ns = 0;
-       devpriv->serial_hw_mode = 0;
-
-       /* RTSI */
-       s = &dev->subdevices[NI_RTSI_SUBDEV];
-       s->type = COMEDI_SUBD_DIO;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
-       s->n_chan = 8;
-       s->maxdata = 1;
-       s->insn_bits = ni_rtsi_insn_bits;
-       s->insn_config = ni_rtsi_insn_config;
-       ni_rtsi_init(dev);
-
-       if (board->reg_type & ni_reg_m_series_mask)
-               counter_variant = ni_gpct_variant_m_series;
-       else
-               counter_variant = ni_gpct_variant_e_series;
-       devpriv->counter_dev = ni_gpct_device_construct(dev,
-                                                       &ni_gpct_write_register,
-                                                       &ni_gpct_read_register,
-                                                       counter_variant,
-                                                       NUM_GPCT);
-       if (!devpriv->counter_dev)
-               return -ENOMEM;
-
-       /* General purpose counters */
-       for (j = 0; j < NUM_GPCT; ++j) {
-               s = &dev->subdevices[NI_GPCT_SUBDEV(j)];
-               s->type = COMEDI_SUBD_COUNTER;
-               s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL;
-               s->n_chan = 3;
-               if (board->reg_type & ni_reg_m_series_mask)
-                       s->maxdata = 0xffffffff;
-               else
-                       s->maxdata = 0xffffff;
-               s->insn_read = ni_tio_insn_read;
-               s->insn_write = ni_tio_insn_read;
-               s->insn_config = ni_tio_insn_config;
-#ifdef PCIDMA
-               s->subdev_flags |= SDF_CMD_READ /* | SDF_CMD_WRITE */;
-               s->do_cmd = &ni_gpct_cmd;
-               s->len_chanlist = 1;
-               s->do_cmdtest = ni_tio_cmdtest;
-               s->cancel = &ni_gpct_cancel;
-               s->async_dma_dir = DMA_BIDIRECTIONAL;
-#endif
-               s->private = &devpriv->counter_dev->counters[j];
-
-               devpriv->counter_dev->counters[j].chip_index = 0;
-               devpriv->counter_dev->counters[j].counter_index = j;
-               ni_tio_init_counter(&devpriv->counter_dev->counters[j]);
-       }
-
-       /* Frequency output */
-       s = &dev->subdevices[NI_FREQ_OUT_SUBDEV];
-       s->type = COMEDI_SUBD_COUNTER;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
-       s->n_chan = 1;
-       s->maxdata = 0xf;
-       s->insn_read = &ni_freq_out_insn_read;
-       s->insn_write = &ni_freq_out_insn_write;
-       s->insn_config = &ni_freq_out_insn_config;
-
-       /* ai configuration */
-       s = &dev->subdevices[NI_AI_SUBDEV];
-       ni_ai_reset(dev, s);
-       if ((board->reg_type & ni_reg_6xxx_mask) == 0) {
-               /*  BEAM is this needed for PCI-6143 ?? */
-               devpriv->clock_and_fout =
-                   Slow_Internal_Time_Divide_By_2 |
-                   Slow_Internal_Timebase |
-                   Clock_To_Board_Divide_By_2 |
-                   Clock_To_Board |
-                   AI_Output_Divide_By_2 | AO_Output_Divide_By_2;
-       } else {
-               devpriv->clock_and_fout =
-                   Slow_Internal_Time_Divide_By_2 |
-                   Slow_Internal_Timebase |
-                   Clock_To_Board_Divide_By_2 | Clock_To_Board;
-       }
-       devpriv->stc_writew(dev, devpriv->clock_and_fout,
-                           Clock_and_FOUT_Register);
-
-       /* analog output configuration */
-       s = &dev->subdevices[NI_AO_SUBDEV];
-       ni_ao_reset(dev, s);
-
-       if (dev->irq) {
-               devpriv->stc_writew(dev,
-                                   (IRQ_POLARITY ? Interrupt_Output_Polarity :
-                                    0) | (Interrupt_Output_On_3_Pins & 0) |
-                                   Interrupt_A_Enable | Interrupt_B_Enable |
-                                   Interrupt_A_Output_Select(interrupt_pin
-                                                             (dev->irq)) |
-                                   Interrupt_B_Output_Select(interrupt_pin
-                                                             (dev->irq)),
-                                   Interrupt_Control_Register);
-       }
-
-       /* DMA setup */
-       ni_writeb(devpriv->ai_ao_select_reg, AI_AO_Select);
-       ni_writeb(devpriv->g0_g1_select_reg, G0_G1_Select);
-
-       if (board->reg_type & ni_reg_6xxx_mask) {
-               ni_writeb(0, Magic_611x);
-       } else if (board->reg_type & ni_reg_m_series_mask) {
-               int channel;
-               for (channel = 0; channel < board->n_aochan; ++channel) {
-                       ni_writeb(0xf, M_Offset_AO_Waveform_Order(channel));
-                       ni_writeb(0x0,
-                                 M_Offset_AO_Reference_Attenuation(channel));
-               }
-               ni_writeb(0x0, M_Offset_AO_Calibration);
-       }
-
-       return 0;
-}
-
-static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
-{
-       struct comedi_device *dev = (struct comedi_device *)arg;
-       struct ni_private *devpriv __maybe_unused = dev->private;
-
-       if (dir) {
-               ni_writeb(data, Port_A + 2 * port);
-               return 0;
-       } else {
-               return ni_readb(Port_A + 2 * port);
-       }
-}
-
-/*
-       presents the EEPROM as a subdevice
-*/
-
-static int ni_eeprom_insn_read(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data)
-{
-       data[0] = ni_read_eeprom(dev, CR_CHAN(insn->chanspec));
-
-       return 1;
-}
-
-/*
-       reads bytes out of eeprom
-*/
-
-static int ni_read_eeprom(struct comedi_device *dev, int addr)
-{
-       struct ni_private *devpriv __maybe_unused = dev->private;
-       int bit;
-       int bitstring;
-
-       bitstring = 0x0300 | ((addr & 0x100) << 3) | (addr & 0xff);
-       ni_writeb(0x04, Serial_Command);
-       for (bit = 0x8000; bit; bit >>= 1) {
-               ni_writeb(0x04 | ((bit & bitstring) ? 0x02 : 0),
-                         Serial_Command);
-               ni_writeb(0x05 | ((bit & bitstring) ? 0x02 : 0),
-                         Serial_Command);
-       }
-       bitstring = 0;
-       for (bit = 0x80; bit; bit >>= 1) {
-               ni_writeb(0x04, Serial_Command);
-               ni_writeb(0x05, Serial_Command);
-               bitstring |= ((ni_readb(XXX_Status) & PROMOUT) ? bit : 0);
-       }
-       ni_writeb(0x00, Serial_Command);
-
-       return bitstring;
-}
-
-static int ni_m_series_eeprom_insn_read(struct comedi_device *dev,
-                                       struct comedi_subdevice *s,
-                                       struct comedi_insn *insn,
-                                       unsigned int *data)
-{
-       struct ni_private *devpriv = dev->private;
-
-       data[0] = devpriv->eeprom_buffer[CR_CHAN(insn->chanspec)];
-
-       return 1;
-}
-
-static int ni_get_pwm_config(struct comedi_device *dev, unsigned int *data)
-{
-       struct ni_private *devpriv = dev->private;
-
-       data[1] = devpriv->pwm_up_count * devpriv->clock_ns;
-       data[2] = devpriv->pwm_down_count * devpriv->clock_ns;
-       return 3;
-}
-
-static int ni_m_series_pwm_config(struct comedi_device *dev,
-                                 struct comedi_subdevice *s,
-                                 struct comedi_insn *insn, unsigned int *data)
+static int ni_6143_pwm_config(struct comedi_device *dev,
+                             struct comedi_subdevice *s,
+                             struct comedi_insn *insn,
+                             unsigned int *data)
 {
        struct ni_private *devpriv = dev->private;
        unsigned up_count, down_count;
@@ -4616,16 +4455,14 @@ static int ni_m_series_pwm_config(struct comedi_device *dev,
                        data[4] = down_count * devpriv->clock_ns;
                        return -EAGAIN;
                }
-               ni_writel(MSeries_Cal_PWM_High_Time_Bits(up_count) |
-                         MSeries_Cal_PWM_Low_Time_Bits(down_count),
-                         M_Offset_Cal_PWM);
+               ni_writel(dev, up_count, Calibration_HighTime_6143);
                devpriv->pwm_up_count = up_count;
+               ni_writel(dev, down_count, Calibration_LowTime_6143);
                devpriv->pwm_down_count = down_count;
                return 5;
                break;
        case INSN_CONFIG_GET_PWM_OUTPUT:
                return ni_get_pwm_config(dev, data);
-               break;
        default:
                return -EINVAL;
                break;
@@ -4633,102 +4470,53 @@ static int ni_m_series_pwm_config(struct comedi_device *dev,
        return 0;
 }
 
-static int ni_6143_pwm_config(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data)
+static int pack_mb88341(int addr, int val, int *bitstring)
 {
-       struct ni_private *devpriv = dev->private;
-       unsigned up_count, down_count;
+       /*
+          Fujitsu MB 88341
+          Note that address bits are reversed.  Thanks to
+          Ingo Keen for noticing this.
 
-       switch (data[0]) {
-       case INSN_CONFIG_PWM_OUTPUT:
-               switch (data[1]) {
-               case TRIG_ROUND_NEAREST:
-                       up_count =
-                           (data[2] +
-                            devpriv->clock_ns / 2) / devpriv->clock_ns;
-                       break;
-               case TRIG_ROUND_DOWN:
-                       up_count = data[2] / devpriv->clock_ns;
-                       break;
-               case TRIG_ROUND_UP:
-                       up_count =
-                           (data[2] + devpriv->clock_ns -
-                            1) / devpriv->clock_ns;
-                       break;
-               default:
-                       return -EINVAL;
-                       break;
-               }
-               switch (data[3]) {
-               case TRIG_ROUND_NEAREST:
-                       down_count =
-                           (data[4] +
-                            devpriv->clock_ns / 2) / devpriv->clock_ns;
-                       break;
-               case TRIG_ROUND_DOWN:
-                       down_count = data[4] / devpriv->clock_ns;
-                       break;
-               case TRIG_ROUND_UP:
-                       down_count =
-                           (data[4] + devpriv->clock_ns -
-                            1) / devpriv->clock_ns;
-                       break;
-               default:
-                       return -EINVAL;
-                       break;
-               }
-               if (up_count * devpriv->clock_ns != data[2] ||
-                   down_count * devpriv->clock_ns != data[4]) {
-                       data[2] = up_count * devpriv->clock_ns;
-                       data[4] = down_count * devpriv->clock_ns;
-                       return -EAGAIN;
-               }
-               ni_writel(up_count, Calibration_HighTime_6143);
-               devpriv->pwm_up_count = up_count;
-               ni_writel(down_count, Calibration_LowTime_6143);
-               devpriv->pwm_down_count = down_count;
-               return 5;
-               break;
-       case INSN_CONFIG_GET_PWM_OUTPUT:
-               return ni_get_pwm_config(dev, data);
-       default:
-               return -EINVAL;
-               break;
-       }
-       return 0;
+          Note also that the 88341 expects address values from
+          1-12, whereas we use channel numbers 0-11.  The NI
+          docs use 1-12, also, so be careful here.
+        */
+       addr++;
+       *bitstring = ((addr & 0x1) << 11) |
+           ((addr & 0x2) << 9) |
+           ((addr & 0x4) << 7) | ((addr & 0x8) << 5) | (val & 0xff);
+       return 12;
 }
 
-static void ni_write_caldac(struct comedi_device *dev, int addr, int val);
-/*
-       calibration subdevice
-*/
-static int ni_calib_insn_write(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data)
+static int pack_dac8800(int addr, int val, int *bitstring)
 {
-       ni_write_caldac(dev, CR_CHAN(insn->chanspec), data[0]);
-
-       return 1;
+       *bitstring = ((addr & 0x7) << 8) | (val & 0xff);
+       return 11;
 }
 
-static int ni_calib_insn_read(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data)
+static int pack_dac8043(int addr, int val, int *bitstring)
 {
-       struct ni_private *devpriv = dev->private;
+       *bitstring = val & 0xfff;
+       return 12;
+}
 
-       data[0] = devpriv->caldacs[CR_CHAN(insn->chanspec)];
+static int pack_ad8522(int addr, int val, int *bitstring)
+{
+       *bitstring = (val & 0xfff) | (addr ? 0xc000 : 0xa000);
+       return 16;
+}
 
-       return 1;
+static int pack_ad8804(int addr, int val, int *bitstring)
+{
+       *bitstring = ((addr & 0xf) << 8) | (val & 0xff);
+       return 12;
 }
 
-static int pack_mb88341(int addr, int val, int *bitstring);
-static int pack_dac8800(int addr, int val, int *bitstring);
-static int pack_dac8043(int addr, int val, int *bitstring);
-static int pack_ad8522(int addr, int val, int *bitstring);
-static int pack_ad8804(int addr, int val, int *bitstring);
-static int pack_ad8842(int addr, int val, int *bitstring);
+static int pack_ad8842(int addr, int val, int *bitstring)
+{
+       *bitstring = ((addr + 1) << 8) | (val & 0xff);
+       return 12;
+}
 
 struct caldac_struct {
        int n_chans;
@@ -4746,6 +4534,66 @@ static struct caldac_struct caldacs[] = {
        [ad8804_debug] = {16, 8, pack_ad8804},
 };
 
+static void ni_write_caldac(struct comedi_device *dev, int addr, int val)
+{
+       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv = dev->private;
+       unsigned int loadbit = 0, bits = 0, bit, bitstring = 0;
+       int i;
+       int type;
+
+       /* printk("ni_write_caldac: chan=%d val=%d\n",addr,val); */
+       if (devpriv->caldacs[addr] == val)
+               return;
+       devpriv->caldacs[addr] = val;
+
+       for (i = 0; i < 3; i++) {
+               type = board->caldac[i];
+               if (type == caldac_none)
+                       break;
+               if (addr < caldacs[type].n_chans) {
+                       bits = caldacs[type].packbits(addr, val, &bitstring);
+                       loadbit = SerDacLd(i);
+                       /* printk("caldac: using i=%d addr=%d %x\n",i,addr,bitstring); */
+                       break;
+               }
+               addr -= caldacs[type].n_chans;
+       }
+
+       for (bit = 1 << (bits - 1); bit; bit >>= 1) {
+               ni_writeb(dev, ((bit & bitstring) ? 0x02 : 0), Serial_Command);
+               udelay(1);
+               ni_writeb(dev, 1 | ((bit & bitstring) ? 0x02 : 0),
+                         Serial_Command);
+               udelay(1);
+       }
+       ni_writeb(dev, loadbit, Serial_Command);
+       udelay(1);
+       ni_writeb(dev, 0, Serial_Command);
+}
+
+static int ni_calib_insn_write(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              struct comedi_insn *insn,
+                              unsigned int *data)
+{
+       ni_write_caldac(dev, CR_CHAN(insn->chanspec), data[0]);
+
+       return 1;
+}
+
+static int ni_calib_insn_read(struct comedi_device *dev,
+                             struct comedi_subdevice *s,
+                             struct comedi_insn *insn,
+                             unsigned int *data)
+{
+       struct ni_private *devpriv = dev->private;
+
+       data[0] = devpriv->caldacs[CR_CHAN(insn->chanspec)];
+
+       return 1;
+}
+
 static void caldac_setup(struct comedi_device *dev, struct comedi_subdevice *s)
 {
        const struct ni_board_struct *board = comedi_board(dev);
@@ -4800,405 +4648,734 @@ static void caldac_setup(struct comedi_device *dev, struct comedi_subdevice *s)
        }
 }
 
-static void ni_write_caldac(struct comedi_device *dev, int addr, int val)
+static int ni_read_eeprom(struct comedi_device *dev, int addr)
+{
+       int bit;
+       int bitstring;
+
+       bitstring = 0x0300 | ((addr & 0x100) << 3) | (addr & 0xff);
+       ni_writeb(dev, 0x04, Serial_Command);
+       for (bit = 0x8000; bit; bit >>= 1) {
+               ni_writeb(dev, 0x04 | ((bit & bitstring) ? 0x02 : 0),
+                         Serial_Command);
+               ni_writeb(dev, 0x05 | ((bit & bitstring) ? 0x02 : 0),
+                         Serial_Command);
+       }
+       bitstring = 0;
+       for (bit = 0x80; bit; bit >>= 1) {
+               ni_writeb(dev, 0x04, Serial_Command);
+               ni_writeb(dev, 0x05, Serial_Command);
+               bitstring |= ((ni_readb(dev, XXX_Status) & PROMOUT) ? bit : 0);
+       }
+       ni_writeb(dev, 0x00, Serial_Command);
+
+       return bitstring;
+}
+
+static int ni_eeprom_insn_read(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              struct comedi_insn *insn,
+                              unsigned int *data)
+{
+       data[0] = ni_read_eeprom(dev, CR_CHAN(insn->chanspec));
+
+       return 1;
+}
+
+static int ni_m_series_eeprom_insn_read(struct comedi_device *dev,
+                                       struct comedi_subdevice *s,
+                                       struct comedi_insn *insn,
+                                       unsigned int *data)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
-       unsigned int loadbit = 0, bits = 0, bit, bitstring = 0;
-       int i;
-       int type;
 
-       /* printk("ni_write_caldac: chan=%d val=%d\n",addr,val); */
-       if (devpriv->caldacs[addr] == val)
-               return;
-       devpriv->caldacs[addr] = val;
+       data[0] = devpriv->eeprom_buffer[CR_CHAN(insn->chanspec)];
 
-       for (i = 0; i < 3; i++) {
-               type = board->caldac[i];
-               if (type == caldac_none)
-                       break;
-               if (addr < caldacs[type].n_chans) {
-                       bits = caldacs[type].packbits(addr, val, &bitstring);
-                       loadbit = SerDacLd(i);
-                       /* printk("caldac: using i=%d addr=%d %x\n",i,addr,bitstring); */
-                       break;
-               }
-               addr -= caldacs[type].n_chans;
+       return 1;
+}
+
+static unsigned ni_old_get_pfi_routing(struct comedi_device *dev,
+                                      unsigned chan)
+{
+       /*  pre-m-series boards have fixed signals on pfi pins */
+       switch (chan) {
+       case 0:
+               return NI_PFI_OUTPUT_AI_START1;
+               break;
+       case 1:
+               return NI_PFI_OUTPUT_AI_START2;
+               break;
+       case 2:
+               return NI_PFI_OUTPUT_AI_CONVERT;
+               break;
+       case 3:
+               return NI_PFI_OUTPUT_G_SRC1;
+               break;
+       case 4:
+               return NI_PFI_OUTPUT_G_GATE1;
+               break;
+       case 5:
+               return NI_PFI_OUTPUT_AO_UPDATE_N;
+               break;
+       case 6:
+               return NI_PFI_OUTPUT_AO_START1;
+               break;
+       case 7:
+               return NI_PFI_OUTPUT_AI_START_PULSE;
+               break;
+       case 8:
+               return NI_PFI_OUTPUT_G_SRC0;
+               break;
+       case 9:
+               return NI_PFI_OUTPUT_G_GATE0;
+               break;
+       default:
+               printk("%s: bug, unhandled case in switch.\n", __func__);
+               break;
        }
+       return 0;
+}
 
-       for (bit = 1 << (bits - 1); bit; bit >>= 1) {
-               ni_writeb(((bit & bitstring) ? 0x02 : 0), Serial_Command);
-               udelay(1);
-               ni_writeb(1 | ((bit & bitstring) ? 0x02 : 0), Serial_Command);
-               udelay(1);
-       }
-       ni_writeb(loadbit, Serial_Command);
-       udelay(1);
-       ni_writeb(0, Serial_Command);
+static int ni_old_set_pfi_routing(struct comedi_device *dev,
+                                 unsigned chan, unsigned source)
+{
+       /*  pre-m-series boards have fixed signals on pfi pins */
+       if (source != ni_old_get_pfi_routing(dev, chan))
+               return -EINVAL;
+       return 2;
 }
 
-static int pack_mb88341(int addr, int val, int *bitstring)
+static unsigned ni_m_series_get_pfi_routing(struct comedi_device *dev,
+                                           unsigned chan)
 {
-       /*
-          Fujitsu MB 88341
-          Note that address bits are reversed.  Thanks to
-          Ingo Keen for noticing this.
+       struct ni_private *devpriv = dev->private;
+       const unsigned array_offset = chan / 3;
 
-          Note also that the 88341 expects address values from
-          1-12, whereas we use channel numbers 0-11.  The NI
-          docs use 1-12, also, so be careful here.
-        */
-       addr++;
-       *bitstring = ((addr & 0x1) << 11) |
-           ((addr & 0x2) << 9) |
-           ((addr & 0x4) << 7) | ((addr & 0x8) << 5) | (val & 0xff);
-       return 12;
+       return MSeries_PFI_Output_Select_Source(chan,
+                               devpriv->pfi_output_select_reg[array_offset]);
 }
 
-static int pack_dac8800(int addr, int val, int *bitstring)
+static int ni_m_series_set_pfi_routing(struct comedi_device *dev,
+                                      unsigned chan, unsigned source)
 {
-       *bitstring = ((addr & 0x7) << 8) | (val & 0xff);
-       return 11;
+       struct ni_private *devpriv = dev->private;
+       unsigned pfi_reg_index;
+       unsigned array_offset;
+
+       if ((source & 0x1f) != source)
+               return -EINVAL;
+       pfi_reg_index = 1 + chan / 3;
+       array_offset = pfi_reg_index - 1;
+       devpriv->pfi_output_select_reg[array_offset] &=
+           ~MSeries_PFI_Output_Select_Mask(chan);
+       devpriv->pfi_output_select_reg[array_offset] |=
+           MSeries_PFI_Output_Select_Bits(chan, source);
+       ni_writew(dev, devpriv->pfi_output_select_reg[array_offset],
+                 M_Offset_PFI_Output_Select(pfi_reg_index));
+       return 2;
 }
 
-static int pack_dac8043(int addr, int val, int *bitstring)
+static unsigned ni_get_pfi_routing(struct comedi_device *dev, unsigned chan)
 {
-       *bitstring = val & 0xfff;
-       return 12;
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->is_m_series)
+               return ni_m_series_get_pfi_routing(dev, chan);
+       else
+               return ni_old_get_pfi_routing(dev, chan);
 }
 
-static int pack_ad8522(int addr, int val, int *bitstring)
+static int ni_set_pfi_routing(struct comedi_device *dev, unsigned chan,
+                             unsigned source)
 {
-       *bitstring = (val & 0xfff) | (addr ? 0xc000 : 0xa000);
-       return 16;
+       struct ni_private *devpriv = dev->private;
+
+       if (devpriv->is_m_series)
+               return ni_m_series_set_pfi_routing(dev, chan, source);
+       else
+               return ni_old_set_pfi_routing(dev, chan, source);
 }
 
-static int pack_ad8804(int addr, int val, int *bitstring)
+static int ni_config_filter(struct comedi_device *dev,
+                           unsigned pfi_channel,
+                           enum ni_pfi_filter_select filter)
 {
-       *bitstring = ((addr & 0xf) << 8) | (val & 0xff);
-       return 12;
+       struct ni_private *devpriv = dev->private;
+       unsigned bits;
+
+       if (!devpriv->is_m_series)
+               return -ENOTSUPP;
+
+       bits = ni_readl(dev, M_Offset_PFI_Filter);
+       bits &= ~MSeries_PFI_Filter_Select_Mask(pfi_channel);
+       bits |= MSeries_PFI_Filter_Select_Bits(pfi_channel, filter);
+       ni_writel(dev, bits, M_Offset_PFI_Filter);
+       return 0;
 }
 
-static int pack_ad8842(int addr, int val, int *bitstring)
+static int ni_pfi_insn_config(struct comedi_device *dev,
+                             struct comedi_subdevice *s,
+                             struct comedi_insn *insn,
+                             unsigned int *data)
 {
-       *bitstring = ((addr + 1) << 8) | (val & 0xff);
-       return 12;
+       struct ni_private *devpriv = dev->private;
+       unsigned int chan;
+
+       if (insn->n < 1)
+               return -EINVAL;
+
+       chan = CR_CHAN(insn->chanspec);
+
+       switch (data[0]) {
+       case COMEDI_OUTPUT:
+               ni_set_bits(dev, IO_Bidirection_Pin_Register, 1 << chan, 1);
+               break;
+       case COMEDI_INPUT:
+               ni_set_bits(dev, IO_Bidirection_Pin_Register, 1 << chan, 0);
+               break;
+       case INSN_CONFIG_DIO_QUERY:
+               data[1] =
+                   (devpriv->io_bidirection_pin_reg & (1 << chan)) ?
+                   COMEDI_OUTPUT : COMEDI_INPUT;
+               return 0;
+               break;
+       case INSN_CONFIG_SET_ROUTING:
+               return ni_set_pfi_routing(dev, chan, data[1]);
+               break;
+       case INSN_CONFIG_GET_ROUTING:
+               data[1] = ni_get_pfi_routing(dev, chan);
+               break;
+       case INSN_CONFIG_FILTER:
+               return ni_config_filter(dev, chan, data[1]);
+               break;
+       default:
+               return -EINVAL;
+       }
+       return 0;
 }
 
-#if 0
-/*
- *     Read the GPCTs current value.
- */
-static int GPCT_G_Watch(struct comedi_device *dev, int chan)
+static int ni_pfi_insn_bits(struct comedi_device *dev,
+                           struct comedi_subdevice *s,
+                           struct comedi_insn *insn,
+                           unsigned int *data)
 {
-       unsigned int hi1, hi2, lo;
+       struct ni_private *devpriv = dev->private;
 
-       devpriv->gpct_command[chan] &= ~G_Save_Trace;
-       devpriv->stc_writew(dev, devpriv->gpct_command[chan],
-                           G_Command_Register(chan));
+       if (!devpriv->is_m_series)
+               return -ENOTSUPP;
 
-       devpriv->gpct_command[chan] |= G_Save_Trace;
-       devpriv->stc_writew(dev, devpriv->gpct_command[chan],
-                           G_Command_Register(chan));
+       if (comedi_dio_update_state(s, data))
+               ni_writew(dev, s->state, M_Offset_PFI_DO);
 
-       /* This procedure is used because the two registers cannot
-        * be read atomically. */
-       do {
-               hi1 = devpriv->stc_readw(dev, G_Save_Register_High(chan));
-               lo = devpriv->stc_readw(dev, G_Save_Register_Low(chan));
-               hi2 = devpriv->stc_readw(dev, G_Save_Register_High(chan));
-       } while (hi1 != hi2);
+       data[1] = ni_readw(dev, M_Offset_PFI_DI);
 
-       return (hi1 << 16) | lo;
+       return insn->n;
 }
 
-static void GPCT_Reset(struct comedi_device *dev, int chan)
+static int cs5529_wait_for_idle(struct comedi_device *dev)
 {
-       int temp_ack_reg = 0;
-
-       /* printk("GPCT_Reset..."); */
-       devpriv->gpct_cur_operation[chan] = GPCT_RESET;
+       unsigned short status;
+       const int timeout = HZ;
+       int i;
 
-       switch (chan) {
-       case 0:
-               devpriv->stc_writew(dev, G0_Reset, Joint_Reset_Register);
-               ni_set_bits(dev, Interrupt_A_Enable_Register,
-                           G0_TC_Interrupt_Enable, 0);
-               ni_set_bits(dev, Interrupt_A_Enable_Register,
-                           G0_Gate_Interrupt_Enable, 0);
-               temp_ack_reg |= G0_Gate_Error_Confirm;
-               temp_ack_reg |= G0_TC_Error_Confirm;
-               temp_ack_reg |= G0_TC_Interrupt_Ack;
-               temp_ack_reg |= G0_Gate_Interrupt_Ack;
-               devpriv->stc_writew(dev, temp_ack_reg,
-                                   Interrupt_A_Ack_Register);
+       for (i = 0; i < timeout; i++) {
+               status = ni_ao_win_inw(dev, CAL_ADC_Status_67xx);
+               if ((status & CSS_ADC_BUSY) == 0)
+                       break;
+               set_current_state(TASK_INTERRUPTIBLE);
+               if (schedule_timeout(1))
+                       return -EIO;
+       }
+/* printk("looped %i times waiting for idle\n", i); */
+       if (i == timeout) {
+               printk("%s: %s: timeout\n", __FILE__, __func__);
+               return -ETIME;
+       }
+       return 0;
+}
 
-               /* problem...this interferes with the other ctr... */
-               devpriv->an_trig_etc_reg |= GPFO_0_Output_Enable;
-               devpriv->stc_writew(dev, devpriv->an_trig_etc_reg,
-                                   Analog_Trigger_Etc_Register);
-               break;
-       case 1:
-               devpriv->stc_writew(dev, G1_Reset, Joint_Reset_Register);
-               ni_set_bits(dev, Interrupt_B_Enable_Register,
-                           G1_TC_Interrupt_Enable, 0);
-               ni_set_bits(dev, Interrupt_B_Enable_Register,
-                           G0_Gate_Interrupt_Enable, 0);
-               temp_ack_reg |= G1_Gate_Error_Confirm;
-               temp_ack_reg |= G1_TC_Error_Confirm;
-               temp_ack_reg |= G1_TC_Interrupt_Ack;
-               temp_ack_reg |= G1_Gate_Interrupt_Ack;
-               devpriv->stc_writew(dev, temp_ack_reg,
-                                   Interrupt_B_Ack_Register);
+static void cs5529_command(struct comedi_device *dev, unsigned short value)
+{
+       static const int timeout = 100;
+       int i;
 
-               devpriv->an_trig_etc_reg |= GPFO_1_Output_Enable;
-               devpriv->stc_writew(dev, devpriv->an_trig_etc_reg,
-                                   Analog_Trigger_Etc_Register);
-               break;
+       ni_ao_win_outw(dev, value, CAL_ADC_Command_67xx);
+       /* give time for command to start being serially clocked into cs5529.
+        * this insures that the CSS_ADC_BUSY bit will get properly
+        * set before we exit this function.
+        */
+       for (i = 0; i < timeout; i++) {
+               if ((ni_ao_win_inw(dev, CAL_ADC_Status_67xx) & CSS_ADC_BUSY))
+                       break;
+               udelay(1);
        }
+/* printk("looped %i times writing command to cs5529\n", i); */
+       if (i == timeout)
+               comedi_error(dev, "possible problem - never saw adc go busy?");
+}
 
-       devpriv->gpct_mode[chan] = 0;
-       devpriv->gpct_input_select[chan] = 0;
-       devpriv->gpct_command[chan] = 0;
+static int cs5529_do_conversion(struct comedi_device *dev,
+                               unsigned short *data)
+{
+       int retval;
+       unsigned short status;
 
-       devpriv->gpct_command[chan] |= G_Synchronized_Gate;
+       cs5529_command(dev, CSCMD_COMMAND | CSCMD_SINGLE_CONVERSION);
+       retval = cs5529_wait_for_idle(dev);
+       if (retval) {
+               comedi_error(dev,
+                            "timeout or signal in cs5529_do_conversion()");
+               return -ETIME;
+       }
+       status = ni_ao_win_inw(dev, CAL_ADC_Status_67xx);
+       if (status & CSS_OSC_DETECT) {
+               printk
+                   ("ni_mio_common: cs5529 conversion error, status CSS_OSC_DETECT\n");
+               return -EIO;
+       }
+       if (status & CSS_OVERRANGE) {
+               printk
+                   ("ni_mio_common: cs5529 conversion error, overrange (ignoring)\n");
+       }
+       if (data) {
+               *data = ni_ao_win_inw(dev, CAL_ADC_Data_67xx);
+               /* cs5529 returns 16 bit signed data in bipolar mode */
+               *data ^= (1 << 15);
+       }
+       return 0;
+}
+
+static int cs5529_ai_insn_read(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              struct comedi_insn *insn,
+                              unsigned int *data)
+{
+       int n, retval;
+       unsigned short sample;
+       unsigned int channel_select;
+       const unsigned int INTERNAL_REF = 0x1000;
 
-       devpriv->stc_writew(dev, devpriv->gpct_mode[chan],
-                           G_Mode_Register(chan));
-       devpriv->stc_writew(dev, devpriv->gpct_input_select[chan],
-                           G_Input_Select_Register(chan));
-       devpriv->stc_writew(dev, 0, G_Autoincrement_Register(chan));
+       /* Set calibration adc source.  Docs lie, reference select bits 8 to 11
+        * do nothing. bit 12 seems to chooses internal reference voltage, bit
+        * 13 causes the adc input to go overrange (maybe reads external reference?) */
+       if (insn->chanspec & CR_ALT_SOURCE)
+               channel_select = INTERNAL_REF;
+       else
+               channel_select = CR_CHAN(insn->chanspec);
+       ni_ao_win_outw(dev, channel_select, AO_Calibration_Channel_Select_67xx);
 
-       /* printk("exit GPCT_Reset\n"); */
+       for (n = 0; n < insn->n; n++) {
+               retval = cs5529_do_conversion(dev, &sample);
+               if (retval < 0)
+                       return retval;
+               data[n] = sample;
+       }
+       return insn->n;
 }
 
-#endif
-
-#ifdef PCIDMA
-static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
+static void cs5529_config_write(struct comedi_device *dev, unsigned int value,
+                               unsigned int reg_select_bits)
 {
-       struct ni_gpct *counter = s->private;
-       int retval;
-
-       retval = ni_request_gpct_mite_channel(dev, counter->counter_index,
-                                             COMEDI_INPUT);
-       if (retval) {
-               comedi_error(dev,
-                            "no dma channel available for use by counter");
-               return retval;
-       }
-       ni_tio_acknowledge_and_confirm(counter, NULL, NULL, NULL, NULL);
-       ni_e_series_enable_second_irq(dev, counter->counter_index, 1);
-
-       return ni_tio_cmd(dev, s);
+       ni_ao_win_outw(dev, ((value >> 16) & 0xff),
+                      CAL_ADC_Config_Data_High_Word_67xx);
+       ni_ao_win_outw(dev, (value & 0xffff),
+                      CAL_ADC_Config_Data_Low_Word_67xx);
+       reg_select_bits &= CSCMD_REGISTER_SELECT_MASK;
+       cs5529_command(dev, CSCMD_COMMAND | reg_select_bits);
+       if (cs5529_wait_for_idle(dev))
+               comedi_error(dev, "time or signal in cs5529_config_write()");
 }
-#endif
 
-#ifdef PCIDMA
-static int ni_gpct_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
+static int init_cs5529(struct comedi_device *dev)
 {
-       struct ni_gpct *counter = s->private;
-       int retval;
+       unsigned int config_bits =
+           CSCFG_PORT_MODE | CSCFG_WORD_RATE_2180_CYCLES;
 
-       retval = ni_tio_cancel(counter);
-       ni_e_series_enable_second_irq(dev, counter->counter_index, 0);
-       ni_release_gpct_mite_channel(dev, counter->counter_index);
-       return retval;
-}
+#if 1
+       /* do self-calibration */
+       cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET_GAIN,
+                           CSCMD_CONFIG_REGISTER);
+       /* need to force a conversion for calibration to run */
+       cs5529_do_conversion(dev, NULL);
+#else
+       /* force gain calibration to 1 */
+       cs5529_config_write(dev, 0x400000, CSCMD_GAIN_REGISTER);
+       cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET,
+                           CSCMD_CONFIG_REGISTER);
+       if (cs5529_wait_for_idle(dev))
+               comedi_error(dev, "timeout or signal in init_cs5529()\n");
 #endif
+       return 0;
+}
 
 /*
- *
- *  Programmable Function Inputs
- *
+ * Find best multiplier/divider to try and get the PLL running at 80 MHz
+ * given an arbitrary frequency input clock.
  */
-
-static int ni_m_series_set_pfi_routing(struct comedi_device *dev, unsigned chan,
-                                      unsigned source)
+static int ni_mseries_get_pll_parameters(unsigned reference_period_ns,
+                                        unsigned *freq_divider,
+                                        unsigned *freq_multiplier,
+                                        unsigned *actual_period_ns)
 {
-       struct ni_private *devpriv = dev->private;
-       unsigned pfi_reg_index;
-       unsigned array_offset;
+       unsigned div;
+       unsigned best_div = 1;
+       static const unsigned max_div = 0x10;
+       unsigned mult;
+       unsigned best_mult = 1;
+       static const unsigned max_mult = 0x100;
+       static const unsigned pico_per_nano = 1000;
 
-       if ((source & 0x1f) != source)
-               return -EINVAL;
-       pfi_reg_index = 1 + chan / 3;
-       array_offset = pfi_reg_index - 1;
-       devpriv->pfi_output_select_reg[array_offset] &=
-           ~MSeries_PFI_Output_Select_Mask(chan);
-       devpriv->pfi_output_select_reg[array_offset] |=
-           MSeries_PFI_Output_Select_Bits(chan, source);
-       ni_writew(devpriv->pfi_output_select_reg[array_offset],
-                 M_Offset_PFI_Output_Select(pfi_reg_index));
-       return 2;
+       const unsigned reference_picosec = reference_period_ns * pico_per_nano;
+       /* m-series wants the phased-locked loop to output 80MHz, which is divided by 4 to
+        * 20 MHz for most timing clocks */
+       static const unsigned target_picosec = 12500;
+       static const unsigned fudge_factor_80_to_20Mhz = 4;
+       int best_period_picosec = 0;
+       for (div = 1; div <= max_div; ++div) {
+               for (mult = 1; mult <= max_mult; ++mult) {
+                       unsigned new_period_ps =
+                           (reference_picosec * div) / mult;
+                       if (abs(new_period_ps - target_picosec) <
+                           abs(best_period_picosec - target_picosec)) {
+                               best_period_picosec = new_period_ps;
+                               best_div = div;
+                               best_mult = mult;
+                       }
+               }
+       }
+       if (best_period_picosec == 0) {
+               printk("%s: bug, failed to find pll parameters\n", __func__);
+               return -EIO;
+       }
+       *freq_divider = best_div;
+       *freq_multiplier = best_mult;
+       *actual_period_ns =
+           (best_period_picosec * fudge_factor_80_to_20Mhz +
+            (pico_per_nano / 2)) / pico_per_nano;
+       return 0;
 }
 
-static int ni_old_set_pfi_routing(struct comedi_device *dev, unsigned chan,
-                                 unsigned source)
+static int ni_mseries_set_pll_master_clock(struct comedi_device *dev,
+                                          unsigned source, unsigned period_ns)
 {
-       /*  pre-m-series boards have fixed signals on pfi pins */
-       if (source != ni_old_get_pfi_routing(dev, chan))
+       struct ni_private *devpriv = dev->private;
+       static const unsigned min_period_ns = 50;
+       static const unsigned max_period_ns = 1000;
+       static const unsigned timeout = 1000;
+       unsigned pll_control_bits;
+       unsigned freq_divider;
+       unsigned freq_multiplier;
+       unsigned i;
+       int retval;
+
+       if (source == NI_MIO_PLL_PXI10_CLOCK)
+               period_ns = 100;
+       /*  these limits are somewhat arbitrary, but NI advertises 1 to 20MHz range so we'll use that */
+       if (period_ns < min_period_ns || period_ns > max_period_ns) {
+               printk
+                   ("%s: you must specify an input clock frequency between %i and %i nanosec "
+                    "for the phased-lock loop.\n", __func__,
+                    min_period_ns, max_period_ns);
                return -EINVAL;
-       return 2;
+       }
+       devpriv->rtsi_trig_direction_reg &= ~Use_RTSI_Clock_Bit;
+       ni_stc_writew(dev, devpriv->rtsi_trig_direction_reg,
+                     RTSI_Trig_Direction_Register);
+       pll_control_bits =
+           MSeries_PLL_Enable_Bit | MSeries_PLL_VCO_Mode_75_150MHz_Bits;
+       devpriv->clock_and_fout2 |=
+           MSeries_Timebase1_Select_Bit | MSeries_Timebase3_Select_Bit;
+       devpriv->clock_and_fout2 &= ~MSeries_PLL_In_Source_Select_Mask;
+       switch (source) {
+       case NI_MIO_PLL_PXI_STAR_TRIGGER_CLOCK:
+               devpriv->clock_and_fout2 |=
+                   MSeries_PLL_In_Source_Select_Star_Trigger_Bits;
+               retval = ni_mseries_get_pll_parameters(period_ns, &freq_divider,
+                                                      &freq_multiplier,
+                                                      &devpriv->clock_ns);
+               if (retval < 0)
+                       return retval;
+               break;
+       case NI_MIO_PLL_PXI10_CLOCK:
+               /* pxi clock is 10MHz */
+               devpriv->clock_and_fout2 |=
+                   MSeries_PLL_In_Source_Select_PXI_Clock10;
+               retval = ni_mseries_get_pll_parameters(period_ns, &freq_divider,
+                                                      &freq_multiplier,
+                                                      &devpriv->clock_ns);
+               if (retval < 0)
+                       return retval;
+               break;
+       default:
+               {
+                       unsigned rtsi_channel;
+                       static const unsigned max_rtsi_channel = 7;
+                       for (rtsi_channel = 0; rtsi_channel <= max_rtsi_channel;
+                            ++rtsi_channel) {
+                               if (source ==
+                                   NI_MIO_PLL_RTSI_CLOCK(rtsi_channel)) {
+                                       devpriv->clock_and_fout2 |=
+                                           MSeries_PLL_In_Source_Select_RTSI_Bits
+                                           (rtsi_channel);
+                                       break;
+                               }
+                       }
+                       if (rtsi_channel > max_rtsi_channel)
+                               return -EINVAL;
+                       retval = ni_mseries_get_pll_parameters(period_ns,
+                                                              &freq_divider,
+                                                              &freq_multiplier,
+                                                              &devpriv->
+                                                              clock_ns);
+                       if (retval < 0)
+                               return retval;
+               }
+               break;
+       }
+       ni_writew(dev, devpriv->clock_and_fout2, M_Offset_Clock_and_Fout2);
+       pll_control_bits |=
+           MSeries_PLL_Divisor_Bits(freq_divider) |
+           MSeries_PLL_Multiplier_Bits(freq_multiplier);
+
+       /* printk("using divider=%i, multiplier=%i for PLL. pll_control_bits = 0x%x\n",
+        * freq_divider, freq_multiplier, pll_control_bits); */
+       /* printk("clock_ns=%d\n", devpriv->clock_ns); */
+       ni_writew(dev, pll_control_bits, M_Offset_PLL_Control);
+       devpriv->clock_source = source;
+       /* it seems to typically take a few hundred microseconds for PLL to lock */
+       for (i = 0; i < timeout; ++i) {
+               if (ni_readw(dev, M_Offset_PLL_Status) & MSeries_PLL_Locked_Bit)
+                       break;
+               udelay(1);
+       }
+       if (i == timeout) {
+               printk
+                   ("%s: timed out waiting for PLL to lock to reference clock source %i with period %i ns.\n",
+                    __func__, source, period_ns);
+               return -ETIMEDOUT;
+       }
+       return 3;
 }
 
-static int ni_set_pfi_routing(struct comedi_device *dev, unsigned chan,
-                             unsigned source)
+static int ni_set_master_clock(struct comedi_device *dev,
+                              unsigned source, unsigned period_ns)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv = dev->private;
 
-       if (board->reg_type & ni_reg_m_series_mask)
-               return ni_m_series_set_pfi_routing(dev, chan, source);
-       else
-               return ni_old_set_pfi_routing(dev, chan, source);
+       if (source == NI_MIO_INTERNAL_CLOCK) {
+               devpriv->rtsi_trig_direction_reg &= ~Use_RTSI_Clock_Bit;
+               ni_stc_writew(dev, devpriv->rtsi_trig_direction_reg,
+                             RTSI_Trig_Direction_Register);
+               devpriv->clock_ns = TIMEBASE_1_NS;
+               if (devpriv->is_m_series) {
+                       devpriv->clock_and_fout2 &=
+                           ~(MSeries_Timebase1_Select_Bit |
+                             MSeries_Timebase3_Select_Bit);
+                       ni_writew(dev, devpriv->clock_and_fout2,
+                                 M_Offset_Clock_and_Fout2);
+                       ni_writew(dev, 0, M_Offset_PLL_Control);
+               }
+               devpriv->clock_source = source;
+       } else {
+               if (devpriv->is_m_series) {
+                       return ni_mseries_set_pll_master_clock(dev, source,
+                                                              period_ns);
+               } else {
+                       if (source == NI_MIO_RTSI_CLOCK) {
+                               devpriv->rtsi_trig_direction_reg |=
+                                   Use_RTSI_Clock_Bit;
+                               ni_stc_writew(dev,
+                                             devpriv->rtsi_trig_direction_reg,
+                                             RTSI_Trig_Direction_Register);
+                               if (period_ns == 0) {
+                                       printk
+                                           ("%s: we don't handle an unspecified clock period correctly yet, returning error.\n",
+                                            __func__);
+                                       return -EINVAL;
+                               } else {
+                                       devpriv->clock_ns = period_ns;
+                               }
+                               devpriv->clock_source = source;
+                       } else
+                               return -EINVAL;
+               }
+       }
+       return 3;
 }
-
-static unsigned ni_m_series_get_pfi_routing(struct comedi_device *dev,
-                                           unsigned chan)
+
+static unsigned num_configurable_rtsi_channels(struct comedi_device *dev)
 {
        struct ni_private *devpriv = dev->private;
-       const unsigned array_offset = chan / 3;
 
-       return MSeries_PFI_Output_Select_Source(chan,
-                                               devpriv->
-                                               pfi_output_select_reg
-                                               [array_offset]);
+       if (devpriv->is_m_series)
+               return 8;
+       else
+               return 7;
 }
 
-static unsigned ni_old_get_pfi_routing(struct comedi_device *dev, unsigned chan)
+static int ni_valid_rtsi_output_source(struct comedi_device *dev,
+                                      unsigned chan, unsigned source)
 {
-       /*  pre-m-series boards have fixed signals on pfi pins */
-       switch (chan) {
-       case 0:
-               return NI_PFI_OUTPUT_AI_START1;
-               break;
-       case 1:
-               return NI_PFI_OUTPUT_AI_START2;
-               break;
-       case 2:
-               return NI_PFI_OUTPUT_AI_CONVERT;
-               break;
-       case 3:
-               return NI_PFI_OUTPUT_G_SRC1;
-               break;
-       case 4:
-               return NI_PFI_OUTPUT_G_GATE1;
-               break;
-       case 5:
-               return NI_PFI_OUTPUT_AO_UPDATE_N;
-               break;
-       case 6:
-               return NI_PFI_OUTPUT_AO_START1;
-               break;
-       case 7:
-               return NI_PFI_OUTPUT_AI_START_PULSE;
-               break;
-       case 8:
-               return NI_PFI_OUTPUT_G_SRC0;
+       struct ni_private *devpriv = dev->private;
+
+       if (chan >= num_configurable_rtsi_channels(dev)) {
+               if (chan == old_RTSI_clock_channel) {
+                       if (source == NI_RTSI_OUTPUT_RTSI_OSC)
+                               return 1;
+                       else {
+                               printk
+                                   ("%s: invalid source for channel=%i, channel %i is always the RTSI clock for pre-m-series boards.\n",
+                                    __func__, chan, old_RTSI_clock_channel);
+                               return 0;
+                       }
+               }
+               return 0;
+       }
+       switch (source) {
+       case NI_RTSI_OUTPUT_ADR_START1:
+       case NI_RTSI_OUTPUT_ADR_START2:
+       case NI_RTSI_OUTPUT_SCLKG:
+       case NI_RTSI_OUTPUT_DACUPDN:
+       case NI_RTSI_OUTPUT_DA_START1:
+       case NI_RTSI_OUTPUT_G_SRC0:
+       case NI_RTSI_OUTPUT_G_GATE0:
+       case NI_RTSI_OUTPUT_RGOUT0:
+       case NI_RTSI_OUTPUT_RTSI_BRD_0:
+               return 1;
                break;
-       case 9:
-               return NI_PFI_OUTPUT_G_GATE0;
+       case NI_RTSI_OUTPUT_RTSI_OSC:
+               if (devpriv->is_m_series)
+                       return 1;
+               else
+                       return 0;
                break;
        default:
-               printk("%s: bug, unhandled case in switch.\n", __func__);
+               return 0;
                break;
        }
-       return 0;
-}
-
-static unsigned ni_get_pfi_routing(struct comedi_device *dev, unsigned chan)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-
-       if (board->reg_type & ni_reg_m_series_mask)
-               return ni_m_series_get_pfi_routing(dev, chan);
-       else
-               return ni_old_get_pfi_routing(dev, chan);
 }
 
-static int ni_config_filter(struct comedi_device *dev, unsigned pfi_channel,
-                           enum ni_pfi_filter_select filter)
+static int ni_set_rtsi_routing(struct comedi_device *dev,
+                              unsigned chan, unsigned source)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv __maybe_unused = dev->private;
-       unsigned bits;
+       struct ni_private *devpriv = dev->private;
 
-       if ((board->reg_type & ni_reg_m_series_mask) == 0)
-               return -ENOTSUPP;
-       bits = ni_readl(M_Offset_PFI_Filter);
-       bits &= ~MSeries_PFI_Filter_Select_Mask(pfi_channel);
-       bits |= MSeries_PFI_Filter_Select_Bits(pfi_channel, filter);
-       ni_writel(bits, M_Offset_PFI_Filter);
-       return 0;
+       if (ni_valid_rtsi_output_source(dev, chan, source) == 0)
+               return -EINVAL;
+       if (chan < 4) {
+               devpriv->rtsi_trig_a_output_reg &= ~RTSI_Trig_Output_Mask(chan);
+               devpriv->rtsi_trig_a_output_reg |=
+                   RTSI_Trig_Output_Bits(chan, source);
+               ni_stc_writew(dev, devpriv->rtsi_trig_a_output_reg,
+                             RTSI_Trig_A_Output_Register);
+       } else if (chan < 8) {
+               devpriv->rtsi_trig_b_output_reg &= ~RTSI_Trig_Output_Mask(chan);
+               devpriv->rtsi_trig_b_output_reg |=
+                   RTSI_Trig_Output_Bits(chan, source);
+               ni_stc_writew(dev, devpriv->rtsi_trig_b_output_reg,
+                             RTSI_Trig_B_Output_Register);
+       }
+       return 2;
 }
 
-static int ni_pfi_insn_bits(struct comedi_device *dev,
-                           struct comedi_subdevice *s,
-                           struct comedi_insn *insn,
-                           unsigned int *data)
+static unsigned ni_get_rtsi_routing(struct comedi_device *dev, unsigned chan)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv __maybe_unused = dev->private;
-
-       if (!(board->reg_type & ni_reg_m_series_mask))
-               return -ENOTSUPP;
-
-       if (comedi_dio_update_state(s, data))
-               ni_writew(s->state, M_Offset_PFI_DO);
-
-       data[1] = ni_readw(M_Offset_PFI_DI);
+       struct ni_private *devpriv = dev->private;
 
-       return insn->n;
+       if (chan < 4) {
+               return RTSI_Trig_Output_Source(chan,
+                                              devpriv->rtsi_trig_a_output_reg);
+       } else if (chan < num_configurable_rtsi_channels(dev)) {
+               return RTSI_Trig_Output_Source(chan,
+                                              devpriv->rtsi_trig_b_output_reg);
+       } else {
+               if (chan == old_RTSI_clock_channel)
+                       return NI_RTSI_OUTPUT_RTSI_OSC;
+               printk("%s: bug! should never get here?\n", __func__);
+               return 0;
+       }
 }
 
-static int ni_pfi_insn_config(struct comedi_device *dev,
-                             struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data)
+static int ni_rtsi_insn_config(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              struct comedi_insn *insn,
+                              unsigned int *data)
 {
        struct ni_private *devpriv = dev->private;
-       unsigned int chan;
-
-       if (insn->n < 1)
-               return -EINVAL;
-
-       chan = CR_CHAN(insn->chanspec);
+       unsigned int chan = CR_CHAN(insn->chanspec);
 
        switch (data[0]) {
-       case COMEDI_OUTPUT:
-               ni_set_bits(dev, IO_Bidirection_Pin_Register, 1 << chan, 1);
+       case INSN_CONFIG_DIO_OUTPUT:
+               if (chan < num_configurable_rtsi_channels(dev)) {
+                       devpriv->rtsi_trig_direction_reg |=
+                           RTSI_Output_Bit(chan, devpriv->is_m_series);
+               } else if (chan == old_RTSI_clock_channel) {
+                       devpriv->rtsi_trig_direction_reg |=
+                           Drive_RTSI_Clock_Bit;
+               }
+               ni_stc_writew(dev, devpriv->rtsi_trig_direction_reg,
+                             RTSI_Trig_Direction_Register);
                break;
-       case COMEDI_INPUT:
-               ni_set_bits(dev, IO_Bidirection_Pin_Register, 1 << chan, 0);
+       case INSN_CONFIG_DIO_INPUT:
+               if (chan < num_configurable_rtsi_channels(dev)) {
+                       devpriv->rtsi_trig_direction_reg &=
+                           ~RTSI_Output_Bit(chan, devpriv->is_m_series);
+               } else if (chan == old_RTSI_clock_channel) {
+                       devpriv->rtsi_trig_direction_reg &=
+                           ~Drive_RTSI_Clock_Bit;
+               }
+               ni_stc_writew(dev, devpriv->rtsi_trig_direction_reg,
+                             RTSI_Trig_Direction_Register);
                break;
        case INSN_CONFIG_DIO_QUERY:
-               data[1] =
-                   (devpriv->io_bidirection_pin_reg & (1 << chan)) ?
-                   COMEDI_OUTPUT : COMEDI_INPUT;
-               return 0;
+               if (chan < num_configurable_rtsi_channels(dev)) {
+                       data[1] =
+                           (devpriv->rtsi_trig_direction_reg &
+                            RTSI_Output_Bit(chan, devpriv->is_m_series))
+                               ? INSN_CONFIG_DIO_OUTPUT
+                               : INSN_CONFIG_DIO_INPUT;
+               } else if (chan == old_RTSI_clock_channel) {
+                       data[1] =
+                           (devpriv->rtsi_trig_direction_reg &
+                            Drive_RTSI_Clock_Bit)
+                           ? INSN_CONFIG_DIO_OUTPUT : INSN_CONFIG_DIO_INPUT;
+               }
+               return 2;
+               break;
+       case INSN_CONFIG_SET_CLOCK_SRC:
+               return ni_set_master_clock(dev, data[1], data[2]);
+               break;
+       case INSN_CONFIG_GET_CLOCK_SRC:
+               data[1] = devpriv->clock_source;
+               data[2] = devpriv->clock_ns;
+               return 3;
                break;
        case INSN_CONFIG_SET_ROUTING:
-               return ni_set_pfi_routing(dev, chan, data[1]);
+               return ni_set_rtsi_routing(dev, chan, data[1]);
                break;
        case INSN_CONFIG_GET_ROUTING:
-               data[1] = ni_get_pfi_routing(dev, chan);
-               break;
-       case INSN_CONFIG_FILTER:
-               return ni_config_filter(dev, chan, data[1]);
+               data[1] = ni_get_rtsi_routing(dev, chan);
+               return 2;
                break;
        default:
                return -EINVAL;
+               break;
        }
-       return 0;
+       return 1;
+}
+
+static int ni_rtsi_insn_bits(struct comedi_device *dev,
+                            struct comedi_subdevice *s,
+                            struct comedi_insn *insn,
+                            unsigned int *data)
+{
+       data[1] = 0;
+
+       return insn->n;
 }
 
-/*
- *
- *  NI RTSI Bus Functions
- *
- */
 static void ni_rtsi_init(struct comedi_device *dev)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
 
        /*  Initialises the RTSI bus signal switch to a default state */
@@ -5216,525 +5393,553 @@ static void ni_rtsi_init(struct comedi_device *dev)
            RTSI_Trig_Output_Bits(2,
                                  NI_RTSI_OUTPUT_SCLKG) |
            RTSI_Trig_Output_Bits(3, NI_RTSI_OUTPUT_DACUPDN);
-       devpriv->stc_writew(dev, devpriv->rtsi_trig_a_output_reg,
-                           RTSI_Trig_A_Output_Register);
+       ni_stc_writew(dev, devpriv->rtsi_trig_a_output_reg,
+                     RTSI_Trig_A_Output_Register);
        devpriv->rtsi_trig_b_output_reg =
            RTSI_Trig_Output_Bits(4,
                                  NI_RTSI_OUTPUT_DA_START1) |
            RTSI_Trig_Output_Bits(5,
                                  NI_RTSI_OUTPUT_G_SRC0) |
            RTSI_Trig_Output_Bits(6, NI_RTSI_OUTPUT_G_GATE0);
-       if (board->reg_type & ni_reg_m_series_mask)
+       if (devpriv->is_m_series)
                devpriv->rtsi_trig_b_output_reg |=
                    RTSI_Trig_Output_Bits(7, NI_RTSI_OUTPUT_RTSI_OSC);
-       devpriv->stc_writew(dev, devpriv->rtsi_trig_b_output_reg,
-                           RTSI_Trig_B_Output_Register);
-
-/*
-* Sets the source and direction of the 4 on board lines
-* devpriv->stc_writew(dev, 0x0000, RTSI_Board_Register);
-*/
-}
-
-static int ni_rtsi_insn_bits(struct comedi_device *dev,
-                            struct comedi_subdevice *s,
-                            struct comedi_insn *insn, unsigned int *data)
-{
-       data[1] = 0;
-
-       return insn->n;
-}
-
-/* Find best multiplier/divider to try and get the PLL running at 80 MHz
- * given an arbitrary frequency input clock */
-static int ni_mseries_get_pll_parameters(unsigned reference_period_ns,
-                                        unsigned *freq_divider,
-                                        unsigned *freq_multiplier,
-                                        unsigned *actual_period_ns)
-{
-       unsigned div;
-       unsigned best_div = 1;
-       static const unsigned max_div = 0x10;
-       unsigned mult;
-       unsigned best_mult = 1;
-       static const unsigned max_mult = 0x100;
-       static const unsigned pico_per_nano = 1000;
-
-       const unsigned reference_picosec = reference_period_ns * pico_per_nano;
-       /* m-series wants the phased-locked loop to output 80MHz, which is divided by 4 to
-        * 20 MHz for most timing clocks */
-       static const unsigned target_picosec = 12500;
-       static const unsigned fudge_factor_80_to_20Mhz = 4;
-       int best_period_picosec = 0;
-       for (div = 1; div <= max_div; ++div) {
-               for (mult = 1; mult <= max_mult; ++mult) {
-                       unsigned new_period_ps =
-                           (reference_picosec * div) / mult;
-                       if (abs(new_period_ps - target_picosec) <
-                           abs(best_period_picosec - target_picosec)) {
-                               best_period_picosec = new_period_ps;
-                               best_div = div;
-                               best_mult = mult;
-                       }
-               }
-       }
-       if (best_period_picosec == 0) {
-               printk("%s: bug, failed to find pll parameters\n", __func__);
-               return -EIO;
-       }
-       *freq_divider = best_div;
-       *freq_multiplier = best_mult;
-       *actual_period_ns =
-           (best_period_picosec * fudge_factor_80_to_20Mhz +
-            (pico_per_nano / 2)) / pico_per_nano;
-       return 0;
+       ni_stc_writew(dev, devpriv->rtsi_trig_b_output_reg,
+                     RTSI_Trig_B_Output_Register);
+
+/*
+* Sets the source and direction of the 4 on board lines
+* ni_stc_writew(dev, 0x0000, RTSI_Board_Register);
+*/
 }
 
-static inline unsigned num_configurable_rtsi_channels(struct comedi_device *dev)
+#ifdef PCIDMA
+static int ni_gpct_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_gpct *counter = s->private;
+       int retval;
 
-       if (board->reg_type & ni_reg_m_series_mask)
-               return 8;
-       else
-               return 7;
+       retval = ni_request_gpct_mite_channel(dev, counter->counter_index,
+                                             COMEDI_INPUT);
+       if (retval) {
+               comedi_error(dev,
+                            "no dma channel available for use by counter");
+               return retval;
+       }
+       ni_tio_acknowledge_and_confirm(counter, NULL, NULL, NULL, NULL);
+       ni_e_series_enable_second_irq(dev, counter->counter_index, 1);
+
+       return ni_tio_cmd(dev, s);
 }
 
-static int ni_mseries_set_pll_master_clock(struct comedi_device *dev,
-                                          unsigned source, unsigned period_ns)
+static int ni_gpct_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
 {
-       struct ni_private *devpriv = dev->private;
-       static const unsigned min_period_ns = 50;
-       static const unsigned max_period_ns = 1000;
-       static const unsigned timeout = 1000;
-       unsigned pll_control_bits;
-       unsigned freq_divider;
-       unsigned freq_multiplier;
-       unsigned i;
+       struct ni_gpct *counter = s->private;
        int retval;
 
-       if (source == NI_MIO_PLL_PXI10_CLOCK)
-               period_ns = 100;
-       /*  these limits are somewhat arbitrary, but NI advertises 1 to 20MHz range so we'll use that */
-       if (period_ns < min_period_ns || period_ns > max_period_ns) {
-               printk
-                   ("%s: you must specify an input clock frequency between %i and %i nanosec "
-                    "for the phased-lock loop.\n", __func__,
-                    min_period_ns, max_period_ns);
-               return -EINVAL;
-       }
-       devpriv->rtsi_trig_direction_reg &= ~Use_RTSI_Clock_Bit;
-       devpriv->stc_writew(dev, devpriv->rtsi_trig_direction_reg,
-                           RTSI_Trig_Direction_Register);
-       pll_control_bits =
-           MSeries_PLL_Enable_Bit | MSeries_PLL_VCO_Mode_75_150MHz_Bits;
-       devpriv->clock_and_fout2 |=
-           MSeries_Timebase1_Select_Bit | MSeries_Timebase3_Select_Bit;
-       devpriv->clock_and_fout2 &= ~MSeries_PLL_In_Source_Select_Mask;
-       switch (source) {
-       case NI_MIO_PLL_PXI_STAR_TRIGGER_CLOCK:
-               devpriv->clock_and_fout2 |=
-                   MSeries_PLL_In_Source_Select_Star_Trigger_Bits;
-               retval = ni_mseries_get_pll_parameters(period_ns, &freq_divider,
-                                                      &freq_multiplier,
-                                                      &devpriv->clock_ns);
-               if (retval < 0)
-                       return retval;
-               break;
-       case NI_MIO_PLL_PXI10_CLOCK:
-               /* pxi clock is 10MHz */
-               devpriv->clock_and_fout2 |=
-                   MSeries_PLL_In_Source_Select_PXI_Clock10;
-               retval = ni_mseries_get_pll_parameters(period_ns, &freq_divider,
-                                                      &freq_multiplier,
-                                                      &devpriv->clock_ns);
-               if (retval < 0)
-                       return retval;
+       retval = ni_tio_cancel(counter);
+       ni_e_series_enable_second_irq(dev, counter->counter_index, 0);
+       ni_release_gpct_mite_channel(dev, counter->counter_index);
+       return retval;
+}
+#endif
+
+#if 0
+/*
+ *     Read the GPCTs current value.
+ */
+static int GPCT_G_Watch(struct comedi_device *dev, int chan)
+{
+       unsigned int hi1, hi2, lo;
+
+       devpriv->gpct_command[chan] &= ~G_Save_Trace;
+       ni_stc_writew(dev, devpriv->gpct_command[chan],
+                     G_Command_Register(chan));
+
+       devpriv->gpct_command[chan] |= G_Save_Trace;
+       ni_stc_writew(dev, devpriv->gpct_command[chan],
+                     G_Command_Register(chan));
+
+       /* This procedure is used because the two registers cannot
+        * be read atomically. */
+       do {
+               hi1 = ni_stc_readw(dev, G_Save_Register_High(chan));
+               lo = ni_stc_readw(dev, G_Save_Register_Low(chan));
+               hi2 = ni_stc_readw(dev, G_Save_Register_High(chan));
+       } while (hi1 != hi2);
+
+       return (hi1 << 16) | lo;
+}
+
+static void GPCT_Reset(struct comedi_device *dev, int chan)
+{
+       int temp_ack_reg = 0;
+
+       /* printk("GPCT_Reset..."); */
+       devpriv->gpct_cur_operation[chan] = GPCT_RESET;
+
+       switch (chan) {
+       case 0:
+               ni_stc_writew(dev, G0_Reset, Joint_Reset_Register);
+               ni_set_bits(dev, Interrupt_A_Enable_Register,
+                           G0_TC_Interrupt_Enable, 0);
+               ni_set_bits(dev, Interrupt_A_Enable_Register,
+                           G0_Gate_Interrupt_Enable, 0);
+               temp_ack_reg |= G0_Gate_Error_Confirm;
+               temp_ack_reg |= G0_TC_Error_Confirm;
+               temp_ack_reg |= G0_TC_Interrupt_Ack;
+               temp_ack_reg |= G0_Gate_Interrupt_Ack;
+               ni_stc_writew(dev, temp_ack_reg, Interrupt_A_Ack_Register);
+
+               /* problem...this interferes with the other ctr... */
+               devpriv->an_trig_etc_reg |= GPFO_0_Output_Enable;
+               ni_stc_writew(dev, devpriv->an_trig_etc_reg,
+                             Analog_Trigger_Etc_Register);
                break;
-       default:
-               {
-                       unsigned rtsi_channel;
-                       static const unsigned max_rtsi_channel = 7;
-                       for (rtsi_channel = 0; rtsi_channel <= max_rtsi_channel;
-                            ++rtsi_channel) {
-                               if (source ==
-                                   NI_MIO_PLL_RTSI_CLOCK(rtsi_channel)) {
-                                       devpriv->clock_and_fout2 |=
-                                           MSeries_PLL_In_Source_Select_RTSI_Bits
-                                           (rtsi_channel);
-                                       break;
-                               }
-                       }
-                       if (rtsi_channel > max_rtsi_channel)
-                               return -EINVAL;
-                       retval = ni_mseries_get_pll_parameters(period_ns,
-                                                              &freq_divider,
-                                                              &freq_multiplier,
-                                                              &devpriv->
-                                                              clock_ns);
-                       if (retval < 0)
-                               return retval;
-               }
+       case 1:
+               ni_stc_writew(dev, G1_Reset, Joint_Reset_Register);
+               ni_set_bits(dev, Interrupt_B_Enable_Register,
+                           G1_TC_Interrupt_Enable, 0);
+               ni_set_bits(dev, Interrupt_B_Enable_Register,
+                           G0_Gate_Interrupt_Enable, 0);
+               temp_ack_reg |= G1_Gate_Error_Confirm;
+               temp_ack_reg |= G1_TC_Error_Confirm;
+               temp_ack_reg |= G1_TC_Interrupt_Ack;
+               temp_ack_reg |= G1_Gate_Interrupt_Ack;
+               ni_stc_writew(dev, temp_ack_reg, Interrupt_B_Ack_Register);
+
+               devpriv->an_trig_etc_reg |= GPFO_1_Output_Enable;
+               ni_stc_writew(dev, devpriv->an_trig_etc_reg,
+                             Analog_Trigger_Etc_Register);
                break;
        }
-       ni_writew(devpriv->clock_and_fout2, M_Offset_Clock_and_Fout2);
-       pll_control_bits |=
-           MSeries_PLL_Divisor_Bits(freq_divider) |
-           MSeries_PLL_Multiplier_Bits(freq_multiplier);
 
-       /* printk("using divider=%i, multiplier=%i for PLL. pll_control_bits = 0x%x\n",
-        * freq_divider, freq_multiplier, pll_control_bits); */
-       /* printk("clock_ns=%d\n", devpriv->clock_ns); */
-       ni_writew(pll_control_bits, M_Offset_PLL_Control);
-       devpriv->clock_source = source;
-       /* it seems to typically take a few hundred microseconds for PLL to lock */
-       for (i = 0; i < timeout; ++i) {
-               if (ni_readw(M_Offset_PLL_Status) & MSeries_PLL_Locked_Bit)
-                       break;
-               udelay(1);
-       }
-       if (i == timeout) {
-               printk
-                   ("%s: timed out waiting for PLL to lock to reference clock source %i with period %i ns.\n",
-                    __func__, source, period_ns);
-               return -ETIMEDOUT;
-       }
-       return 3;
+       devpriv->gpct_mode[chan] = 0;
+       devpriv->gpct_input_select[chan] = 0;
+       devpriv->gpct_command[chan] = 0;
+
+       devpriv->gpct_command[chan] |= G_Synchronized_Gate;
+
+       ni_stc_writew(dev, devpriv->gpct_mode[chan], G_Mode_Register(chan));
+       ni_stc_writew(dev, devpriv->gpct_input_select[chan],
+                     G_Input_Select_Register(chan));
+       ni_stc_writew(dev, 0, G_Autoincrement_Register(chan));
+
+       /* printk("exit GPCT_Reset\n"); */
 }
+#endif
 
-static int ni_set_master_clock(struct comedi_device *dev, unsigned source,
-                              unsigned period_ns)
+static irqreturn_t ni_E_interrupt(int irq, void *d)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
+       struct comedi_device *dev = d;
+       unsigned short a_status;
+       unsigned short b_status;
+       unsigned int ai_mite_status = 0;
+       unsigned int ao_mite_status = 0;
+       unsigned long flags;
+#ifdef PCIDMA
        struct ni_private *devpriv = dev->private;
+       struct mite_struct *mite = devpriv->mite;
+#endif
 
-       if (source == NI_MIO_INTERNAL_CLOCK) {
-               devpriv->rtsi_trig_direction_reg &= ~Use_RTSI_Clock_Bit;
-               devpriv->stc_writew(dev, devpriv->rtsi_trig_direction_reg,
-                                   RTSI_Trig_Direction_Register);
-               devpriv->clock_ns = TIMEBASE_1_NS;
-               if (board->reg_type & ni_reg_m_series_mask) {
-                       devpriv->clock_and_fout2 &=
-                           ~(MSeries_Timebase1_Select_Bit |
-                             MSeries_Timebase3_Select_Bit);
-                       ni_writew(devpriv->clock_and_fout2,
-                                 M_Offset_Clock_and_Fout2);
-                       ni_writew(0, M_Offset_PLL_Control);
+       if (!dev->attached)
+               return IRQ_NONE;
+       smp_mb();               /*  make sure dev->attached is checked before handler does anything else. */
+
+       /*  lock to avoid race with comedi_poll */
+       spin_lock_irqsave(&dev->spinlock, flags);
+       a_status = ni_stc_readw(dev, AI_Status_1_Register);
+       b_status = ni_stc_readw(dev, AO_Status_1_Register);
+#ifdef PCIDMA
+       if (mite) {
+               struct ni_private *devpriv = dev->private;
+               unsigned long flags_too;
+
+               spin_lock_irqsave(&devpriv->mite_channel_lock, flags_too);
+               if (devpriv->ai_mite_chan) {
+                       ai_mite_status = mite_get_status(devpriv->ai_mite_chan);
+                       if (ai_mite_status & CHSR_LINKC)
+                               writel(CHOR_CLRLC,
+                                      devpriv->mite->mite_io_addr +
+                                      MITE_CHOR(devpriv->
+                                                ai_mite_chan->channel));
                }
-               devpriv->clock_source = source;
-       } else {
-               if (board->reg_type & ni_reg_m_series_mask) {
-                       return ni_mseries_set_pll_master_clock(dev, source,
-                                                              period_ns);
-               } else {
-                       if (source == NI_MIO_RTSI_CLOCK) {
-                               devpriv->rtsi_trig_direction_reg |=
-                                   Use_RTSI_Clock_Bit;
-                               devpriv->stc_writew(dev,
-                                                   devpriv->
-                                                   rtsi_trig_direction_reg,
-                                                   RTSI_Trig_Direction_Register);
-                               if (period_ns == 0) {
-                                       printk
-                                           ("%s: we don't handle an unspecified clock period correctly yet, returning error.\n",
-                                            __func__);
-                                       return -EINVAL;
-                               } else {
-                                       devpriv->clock_ns = period_ns;
-                               }
-                               devpriv->clock_source = source;
-                       } else
-                               return -EINVAL;
+               if (devpriv->ao_mite_chan) {
+                       ao_mite_status = mite_get_status(devpriv->ao_mite_chan);
+                       if (ao_mite_status & CHSR_LINKC)
+                               writel(CHOR_CLRLC,
+                                      mite->mite_io_addr +
+                                      MITE_CHOR(devpriv->
+                                                ao_mite_chan->channel));
                }
+               spin_unlock_irqrestore(&devpriv->mite_channel_lock, flags_too);
        }
-       return 3;
+#endif
+       ack_a_interrupt(dev, a_status);
+       ack_b_interrupt(dev, b_status);
+       if ((a_status & Interrupt_A_St) || (ai_mite_status & CHSR_INT))
+               handle_a_interrupt(dev, a_status, ai_mite_status);
+       if ((b_status & Interrupt_B_St) || (ao_mite_status & CHSR_INT))
+               handle_b_interrupt(dev, b_status, ao_mite_status);
+       handle_gpct_interrupt(dev, 0);
+       handle_gpct_interrupt(dev, 1);
+       handle_cdio_interrupt(dev);
+
+       spin_unlock_irqrestore(&dev->spinlock, flags);
+       return IRQ_HANDLED;
 }
 
-static int ni_valid_rtsi_output_source(struct comedi_device *dev, unsigned chan,
-                                      unsigned source)
+static int ni_alloc_private(struct comedi_device *dev)
 {
-       const struct ni_board_struct *board = comedi_board(dev);
+       struct ni_private *devpriv;
 
-       if (chan >= num_configurable_rtsi_channels(dev)) {
-               if (chan == old_RTSI_clock_channel) {
-                       if (source == NI_RTSI_OUTPUT_RTSI_OSC)
-                               return 1;
-                       else {
-                               printk
-                                   ("%s: invalid source for channel=%i, channel %i is always the RTSI clock for pre-m-series boards.\n",
-                                    __func__, chan, old_RTSI_clock_channel);
-                               return 0;
-                       }
-               }
-               return 0;
-       }
-       switch (source) {
-       case NI_RTSI_OUTPUT_ADR_START1:
-       case NI_RTSI_OUTPUT_ADR_START2:
-       case NI_RTSI_OUTPUT_SCLKG:
-       case NI_RTSI_OUTPUT_DACUPDN:
-       case NI_RTSI_OUTPUT_DA_START1:
-       case NI_RTSI_OUTPUT_G_SRC0:
-       case NI_RTSI_OUTPUT_G_GATE0:
-       case NI_RTSI_OUTPUT_RGOUT0:
-       case NI_RTSI_OUTPUT_RTSI_BRD_0:
-               return 1;
-               break;
-       case NI_RTSI_OUTPUT_RTSI_OSC:
-               if (board->reg_type & ni_reg_m_series_mask)
-                       return 1;
-               else
-                       return 0;
-               break;
-       default:
-               return 0;
-               break;
-       }
+       devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv));
+       if (!devpriv)
+               return -ENOMEM;
+
+       spin_lock_init(&devpriv->window_lock);
+       spin_lock_init(&devpriv->soft_reg_copy_lock);
+       spin_lock_init(&devpriv->mite_channel_lock);
+
+       return 0;
 }
 
-static int ni_set_rtsi_routing(struct comedi_device *dev, unsigned chan,
-                              unsigned source)
+static int ni_E_init(struct comedi_device *dev,
+                    unsigned interrupt_pin, unsigned irq_polarity)
 {
+       const struct ni_board_struct *board = comedi_board(dev);
        struct ni_private *devpriv = dev->private;
+       struct comedi_subdevice *s;
+       unsigned j;
+       enum ni_gpct_variant counter_variant;
+       int ret;
 
-       if (ni_valid_rtsi_output_source(dev, chan, source) == 0)
+       if (board->n_aochan > MAX_N_AO_CHAN) {
+               printk("bug! n_aochan > MAX_N_AO_CHAN\n");
                return -EINVAL;
-       if (chan < 4) {
-               devpriv->rtsi_trig_a_output_reg &= ~RTSI_Trig_Output_Mask(chan);
-               devpriv->rtsi_trig_a_output_reg |=
-                   RTSI_Trig_Output_Bits(chan, source);
-               devpriv->stc_writew(dev, devpriv->rtsi_trig_a_output_reg,
-                                   RTSI_Trig_A_Output_Register);
-       } else if (chan < 8) {
-               devpriv->rtsi_trig_b_output_reg &= ~RTSI_Trig_Output_Mask(chan);
-               devpriv->rtsi_trig_b_output_reg |=
-                   RTSI_Trig_Output_Bits(chan, source);
-               devpriv->stc_writew(dev, devpriv->rtsi_trig_b_output_reg,
-                                   RTSI_Trig_B_Output_Register);
        }
-       return 2;
-}
 
-static unsigned ni_get_rtsi_routing(struct comedi_device *dev, unsigned chan)
-{
-       struct ni_private *devpriv = dev->private;
+       ret = comedi_alloc_subdevices(dev, NI_NUM_SUBDEVICES);
+       if (ret)
+               return ret;
 
-       if (chan < 4) {
-               return RTSI_Trig_Output_Source(chan,
-                                              devpriv->rtsi_trig_a_output_reg);
-       } else if (chan < num_configurable_rtsi_channels(dev)) {
-               return RTSI_Trig_Output_Source(chan,
-                                              devpriv->rtsi_trig_b_output_reg);
+       /* analog input subdevice */
+
+       s = &dev->subdevices[NI_AI_SUBDEV];
+       dev->read_subdev = s;
+       if (board->n_adchan) {
+               s->type = COMEDI_SUBD_AI;
+               s->subdev_flags =
+                   SDF_READABLE | SDF_DIFF | SDF_DITHER | SDF_CMD_READ;
+               if (board->reg_type != ni_reg_611x)
+                       s->subdev_flags |= SDF_GROUND | SDF_COMMON | SDF_OTHER;
+               if (board->adbits > 16)
+                       s->subdev_flags |= SDF_LSAMPL;
+               if (devpriv->is_m_series)
+                       s->subdev_flags |= SDF_SOFT_CALIBRATED;
+               s->n_chan = board->n_adchan;
+               s->len_chanlist = 512;
+               s->maxdata = (1 << board->adbits) - 1;
+               s->range_table = ni_range_lkup[board->gainlkup];
+               s->insn_read = &ni_ai_insn_read;
+               s->insn_config = &ni_ai_insn_config;
+               s->do_cmdtest = &ni_ai_cmdtest;
+               s->do_cmd = &ni_ai_cmd;
+               s->cancel = &ni_ai_reset;
+               s->poll = &ni_ai_poll;
+               s->munge = &ni_ai_munge;
+#ifdef PCIDMA
+               s->async_dma_dir = DMA_FROM_DEVICE;
+#endif
        } else {
-               if (chan == old_RTSI_clock_channel)
-                       return NI_RTSI_OUTPUT_RTSI_OSC;
-               printk("%s: bug! should never get here?\n", __func__);
-               return 0;
+               s->type = COMEDI_SUBD_UNUSED;
        }
-}
 
-static int ni_rtsi_insn_config(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data)
-{
-       const struct ni_board_struct *board = comedi_board(dev);
-       struct ni_private *devpriv = dev->private;
-       unsigned int chan = CR_CHAN(insn->chanspec);
+       /* analog output subdevice */
 
-       switch (data[0]) {
-       case INSN_CONFIG_DIO_OUTPUT:
-               if (chan < num_configurable_rtsi_channels(dev)) {
-                       devpriv->rtsi_trig_direction_reg |=
-                           RTSI_Output_Bit(chan,
-                               (board->reg_type & ni_reg_m_series_mask) != 0);
-               } else if (chan == old_RTSI_clock_channel) {
-                       devpriv->rtsi_trig_direction_reg |=
-                           Drive_RTSI_Clock_Bit;
-               }
-               devpriv->stc_writew(dev, devpriv->rtsi_trig_direction_reg,
-                                   RTSI_Trig_Direction_Register);
-               break;
-       case INSN_CONFIG_DIO_INPUT:
-               if (chan < num_configurable_rtsi_channels(dev)) {
-                       devpriv->rtsi_trig_direction_reg &=
-                           ~RTSI_Output_Bit(chan,
-                               (board->reg_type & ni_reg_m_series_mask) != 0);
-               } else if (chan == old_RTSI_clock_channel) {
-                       devpriv->rtsi_trig_direction_reg &=
-                           ~Drive_RTSI_Clock_Bit;
-               }
-               devpriv->stc_writew(dev, devpriv->rtsi_trig_direction_reg,
-                                   RTSI_Trig_Direction_Register);
-               break;
-       case INSN_CONFIG_DIO_QUERY:
-               if (chan < num_configurable_rtsi_channels(dev)) {
-                       data[1] =
-                           (devpriv->rtsi_trig_direction_reg &
-                            RTSI_Output_Bit(chan,
-                               (board->reg_type & ni_reg_m_series_mask) != 0))
-                               ? INSN_CONFIG_DIO_OUTPUT
-                               : INSN_CONFIG_DIO_INPUT;
-               } else if (chan == old_RTSI_clock_channel) {
-                       data[1] =
-                           (devpriv->rtsi_trig_direction_reg &
-                            Drive_RTSI_Clock_Bit)
-                           ? INSN_CONFIG_DIO_OUTPUT : INSN_CONFIG_DIO_INPUT;
+       s = &dev->subdevices[NI_AO_SUBDEV];
+       if (board->n_aochan) {
+               s->type = COMEDI_SUBD_AO;
+               s->subdev_flags = SDF_WRITABLE | SDF_DEGLITCH | SDF_GROUND;
+               if (devpriv->is_m_series)
+                       s->subdev_flags |= SDF_SOFT_CALIBRATED;
+               s->n_chan = board->n_aochan;
+               s->maxdata = (1 << board->aobits) - 1;
+               s->range_table = board->ao_range_table;
+               s->insn_read = &ni_ao_insn_read;
+               if (board->reg_type & ni_reg_6xxx_mask)
+                       s->insn_write = &ni_ao_insn_write_671x;
+               else
+                       s->insn_write = &ni_ao_insn_write;
+               s->insn_config = &ni_ao_insn_config;
+#ifdef PCIDMA
+               if (board->n_aochan) {
+                       s->async_dma_dir = DMA_TO_DEVICE;
+#else
+               if (board->ao_fifo_depth) {
+#endif
+                       dev->write_subdev = s;
+                       s->subdev_flags |= SDF_CMD_WRITE;
+                       s->do_cmd = &ni_ao_cmd;
+                       s->do_cmdtest = &ni_ao_cmdtest;
+                       s->len_chanlist = board->n_aochan;
+                       if (!devpriv->is_m_series)
+                               s->munge = ni_ao_munge;
                }
-               return 2;
-               break;
-       case INSN_CONFIG_SET_CLOCK_SRC:
-               return ni_set_master_clock(dev, data[1], data[2]);
-               break;
-       case INSN_CONFIG_GET_CLOCK_SRC:
-               data[1] = devpriv->clock_source;
-               data[2] = devpriv->clock_ns;
-               return 3;
-               break;
-       case INSN_CONFIG_SET_ROUTING:
-               return ni_set_rtsi_routing(dev, chan, data[1]);
-               break;
-       case INSN_CONFIG_GET_ROUTING:
-               data[1] = ni_get_rtsi_routing(dev, chan);
-               return 2;
-               break;
-       default:
-               return -EINVAL;
-               break;
+               s->cancel = &ni_ao_reset;
+       } else {
+               s->type = COMEDI_SUBD_UNUSED;
+       }
+       if ((board->reg_type & ni_reg_67xx_mask))
+               init_ao_67xx(dev, s);
+
+       /* digital i/o subdevice */
+
+       s = &dev->subdevices[NI_DIO_SUBDEV];
+       s->type = COMEDI_SUBD_DIO;
+       s->subdev_flags = SDF_WRITABLE | SDF_READABLE;
+       s->maxdata = 1;
+       s->io_bits = 0;         /* all bits input */
+       s->range_table = &range_digital;
+       s->n_chan = board->num_p0_dio_channels;
+       if (devpriv->is_m_series) {
+               s->subdev_flags |=
+                   SDF_LSAMPL | SDF_CMD_WRITE /* | SDF_CMD_READ */;
+               s->insn_bits = &ni_m_series_dio_insn_bits;
+               s->insn_config = &ni_m_series_dio_insn_config;
+               s->do_cmd = &ni_cdio_cmd;
+               s->do_cmdtest = &ni_cdio_cmdtest;
+               s->cancel = &ni_cdio_cancel;
+               s->async_dma_dir = DMA_BIDIRECTIONAL;
+               s->len_chanlist = s->n_chan;
+
+               ni_writel(dev, CDO_Reset_Bit | CDI_Reset_Bit,
+                         M_Offset_CDIO_Command);
+               ni_writel(dev, s->io_bits, M_Offset_DIO_Direction);
+       } else {
+               s->insn_bits = &ni_dio_insn_bits;
+               s->insn_config = &ni_dio_insn_config;
+               devpriv->dio_control = DIO_Pins_Dir(s->io_bits);
+               ni_writew(dev, devpriv->dio_control, DIO_Control_Register);
+       }
+
+       /* 8255 device */
+       s = &dev->subdevices[NI_8255_DIO_SUBDEV];
+       if (board->has_8255) {
+               ret = subdev_8255_init(dev, s, ni_8255_callback,
+                                      (unsigned long)dev);
+               if (ret)
+                       return ret;
+       } else {
+               s->type = COMEDI_SUBD_UNUSED;
+       }
+
+       /* formerly general purpose counter/timer device, but no longer used */
+       s = &dev->subdevices[NI_UNUSED_SUBDEV];
+       s->type = COMEDI_SUBD_UNUSED;
+
+       /* calibration subdevice -- ai and ao */
+       s = &dev->subdevices[NI_CALIBRATION_SUBDEV];
+       s->type = COMEDI_SUBD_CALIB;
+       if (devpriv->is_m_series) {
+               /*  internal PWM analog output used for AI nonlinearity calibration */
+               s->subdev_flags = SDF_INTERNAL;
+               s->insn_config = &ni_m_series_pwm_config;
+               s->n_chan = 1;
+               s->maxdata = 0;
+               ni_writel(dev, 0x0, M_Offset_Cal_PWM);
+       } else if (board->reg_type == ni_reg_6143) {
+               /*  internal PWM analog output used for AI nonlinearity calibration */
+               s->subdev_flags = SDF_INTERNAL;
+               s->insn_config = &ni_6143_pwm_config;
+               s->n_chan = 1;
+               s->maxdata = 0;
+       } else {
+               s->subdev_flags = SDF_WRITABLE | SDF_INTERNAL;
+               s->insn_read = &ni_calib_insn_read;
+               s->insn_write = &ni_calib_insn_write;
+               caldac_setup(dev, s);
        }
-       return 1;
-}
 
-static int cs5529_wait_for_idle(struct comedi_device *dev)
-{
-       unsigned short status;
-       const int timeout = HZ;
-       int i;
+       /* EEPROM */
+       s = &dev->subdevices[NI_EEPROM_SUBDEV];
+       s->type = COMEDI_SUBD_MEMORY;
+       s->subdev_flags = SDF_READABLE | SDF_INTERNAL;
+       s->maxdata = 0xff;
+       if (devpriv->is_m_series) {
+               s->n_chan = M_SERIES_EEPROM_SIZE;
+               s->insn_read = &ni_m_series_eeprom_insn_read;
+       } else {
+               s->n_chan = 512;
+               s->insn_read = &ni_eeprom_insn_read;
+       }
 
-       for (i = 0; i < timeout; i++) {
-               status = ni_ao_win_inw(dev, CAL_ADC_Status_67xx);
-               if ((status & CSS_ADC_BUSY) == 0)
-                       break;
-               set_current_state(TASK_INTERRUPTIBLE);
-               if (schedule_timeout(1))
-                       return -EIO;
+       /* PFI */
+       s = &dev->subdevices[NI_PFI_DIO_SUBDEV];
+       s->type = COMEDI_SUBD_DIO;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
+       if (devpriv->is_m_series) {
+               unsigned i;
+               s->n_chan = 16;
+               ni_writew(dev, s->state, M_Offset_PFI_DO);
+               for (i = 0; i < NUM_PFI_OUTPUT_SELECT_REGS; ++i) {
+                       ni_writew(dev, devpriv->pfi_output_select_reg[i],
+                                 M_Offset_PFI_Output_Select(i + 1));
+               }
+       } else {
+               s->n_chan = 10;
        }
-/* printk("looped %i times waiting for idle\n", i); */
-       if (i == timeout) {
-               printk("%s: %s: timeout\n", __FILE__, __func__);
-               return -ETIME;
+       s->maxdata = 1;
+       if (devpriv->is_m_series)
+               s->insn_bits = &ni_pfi_insn_bits;
+       s->insn_config = &ni_pfi_insn_config;
+       ni_set_bits(dev, IO_Bidirection_Pin_Register, ~0, 0);
+
+       /* cs5529 calibration adc */
+       s = &dev->subdevices[NI_CS5529_CALIBRATION_SUBDEV];
+       if (board->reg_type & ni_reg_67xx_mask) {
+               s->type = COMEDI_SUBD_AI;
+               s->subdev_flags = SDF_READABLE | SDF_DIFF | SDF_INTERNAL;
+               /*  one channel for each analog output channel */
+               s->n_chan = board->n_aochan;
+               s->maxdata = (1 << 16) - 1;
+               s->range_table = &range_unknown;        /* XXX */
+               s->insn_read = cs5529_ai_insn_read;
+               s->insn_config = NULL;
+               init_cs5529(dev);
+       } else {
+               s->type = COMEDI_SUBD_UNUSED;
        }
-       return 0;
-}
 
-static void cs5529_command(struct comedi_device *dev, unsigned short value)
-{
-       static const int timeout = 100;
-       int i;
+       /* Serial */
+       s = &dev->subdevices[NI_SERIAL_SUBDEV];
+       s->type = COMEDI_SUBD_SERIAL;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
+       s->n_chan = 1;
+       s->maxdata = 0xff;
+       s->insn_config = ni_serial_insn_config;
+       devpriv->serial_interval_ns = 0;
+       devpriv->serial_hw_mode = 0;
 
-       ni_ao_win_outw(dev, value, CAL_ADC_Command_67xx);
-       /* give time for command to start being serially clocked into cs5529.
-        * this insures that the CSS_ADC_BUSY bit will get properly
-        * set before we exit this function.
-        */
-       for (i = 0; i < timeout; i++) {
-               if ((ni_ao_win_inw(dev, CAL_ADC_Status_67xx) & CSS_ADC_BUSY))
-                       break;
-               udelay(1);
-       }
-/* printk("looped %i times writing command to cs5529\n", i); */
-       if (i == timeout)
-               comedi_error(dev, "possible problem - never saw adc go busy?");
-}
+       /* RTSI */
+       s = &dev->subdevices[NI_RTSI_SUBDEV];
+       s->type = COMEDI_SUBD_DIO;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_INTERNAL;
+       s->n_chan = 8;
+       s->maxdata = 1;
+       s->insn_bits = ni_rtsi_insn_bits;
+       s->insn_config = ni_rtsi_insn_config;
+       ni_rtsi_init(dev);
 
-/* write to cs5529 register */
-static void cs5529_config_write(struct comedi_device *dev, unsigned int value,
-                               unsigned int reg_select_bits)
-{
-       ni_ao_win_outw(dev, ((value >> 16) & 0xff),
-                      CAL_ADC_Config_Data_High_Word_67xx);
-       ni_ao_win_outw(dev, (value & 0xffff),
-                      CAL_ADC_Config_Data_Low_Word_67xx);
-       reg_select_bits &= CSCMD_REGISTER_SELECT_MASK;
-       cs5529_command(dev, CSCMD_COMMAND | reg_select_bits);
-       if (cs5529_wait_for_idle(dev))
-               comedi_error(dev, "time or signal in cs5529_config_write()");
-}
+       if (devpriv->is_m_series)
+               counter_variant = ni_gpct_variant_m_series;
+       else
+               counter_variant = ni_gpct_variant_e_series;
+       devpriv->counter_dev = ni_gpct_device_construct(dev,
+                                                       &ni_gpct_write_register,
+                                                       &ni_gpct_read_register,
+                                                       counter_variant,
+                                                       NUM_GPCT);
+       if (!devpriv->counter_dev)
+               return -ENOMEM;
 
-static int cs5529_do_conversion(struct comedi_device *dev, unsigned short *data)
-{
-       int retval;
-       unsigned short status;
+       /* General purpose counters */
+       for (j = 0; j < NUM_GPCT; ++j) {
+               s = &dev->subdevices[NI_GPCT_SUBDEV(j)];
+               s->type = COMEDI_SUBD_COUNTER;
+               s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_LSAMPL;
+               s->n_chan = 3;
+               if (devpriv->is_m_series)
+                       s->maxdata = 0xffffffff;
+               else
+                       s->maxdata = 0xffffff;
+               s->insn_read = ni_tio_insn_read;
+               s->insn_write = ni_tio_insn_read;
+               s->insn_config = ni_tio_insn_config;
+#ifdef PCIDMA
+               s->subdev_flags |= SDF_CMD_READ /* | SDF_CMD_WRITE */;
+               s->do_cmd = &ni_gpct_cmd;
+               s->len_chanlist = 1;
+               s->do_cmdtest = ni_tio_cmdtest;
+               s->cancel = &ni_gpct_cancel;
+               s->async_dma_dir = DMA_BIDIRECTIONAL;
+#endif
+               s->private = &devpriv->counter_dev->counters[j];
 
-       cs5529_command(dev, CSCMD_COMMAND | CSCMD_SINGLE_CONVERSION);
-       retval = cs5529_wait_for_idle(dev);
-       if (retval) {
-               comedi_error(dev,
-                            "timeout or signal in cs5529_do_conversion()");
-               return -ETIME;
-       }
-       status = ni_ao_win_inw(dev, CAL_ADC_Status_67xx);
-       if (status & CSS_OSC_DETECT) {
-               printk
-                   ("ni_mio_common: cs5529 conversion error, status CSS_OSC_DETECT\n");
-               return -EIO;
-       }
-       if (status & CSS_OVERRANGE) {
-               printk
-                   ("ni_mio_common: cs5529 conversion error, overrange (ignoring)\n");
+               devpriv->counter_dev->counters[j].chip_index = 0;
+               devpriv->counter_dev->counters[j].counter_index = j;
+               ni_tio_init_counter(&devpriv->counter_dev->counters[j]);
        }
-       if (data) {
-               *data = ni_ao_win_inw(dev, CAL_ADC_Data_67xx);
-               /* cs5529 returns 16 bit signed data in bipolar mode */
-               *data ^= (1 << 15);
+
+       /* Frequency output */
+       s = &dev->subdevices[NI_FREQ_OUT_SUBDEV];
+       s->type = COMEDI_SUBD_COUNTER;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
+       s->n_chan = 1;
+       s->maxdata = 0xf;
+       s->insn_read = &ni_freq_out_insn_read;
+       s->insn_write = &ni_freq_out_insn_write;
+       s->insn_config = &ni_freq_out_insn_config;
+
+       /* ai configuration */
+       s = &dev->subdevices[NI_AI_SUBDEV];
+       ni_ai_reset(dev, s);
+       if ((board->reg_type & ni_reg_6xxx_mask) == 0) {
+               /*  BEAM is this needed for PCI-6143 ?? */
+               devpriv->clock_and_fout =
+                   Slow_Internal_Time_Divide_By_2 |
+                   Slow_Internal_Timebase |
+                   Clock_To_Board_Divide_By_2 |
+                   Clock_To_Board |
+                   AI_Output_Divide_By_2 | AO_Output_Divide_By_2;
+       } else {
+               devpriv->clock_and_fout =
+                   Slow_Internal_Time_Divide_By_2 |
+                   Slow_Internal_Timebase |
+                   Clock_To_Board_Divide_By_2 | Clock_To_Board;
        }
-       return 0;
-}
+       ni_stc_writew(dev, devpriv->clock_and_fout, Clock_and_FOUT_Register);
 
-static int cs5529_ai_insn_read(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              struct comedi_insn *insn, unsigned int *data)
-{
-       int n, retval;
-       unsigned short sample;
-       unsigned int channel_select;
-       const unsigned int INTERNAL_REF = 0x1000;
+       /* analog output configuration */
+       s = &dev->subdevices[NI_AO_SUBDEV];
+       ni_ao_reset(dev, s);
 
-       /* Set calibration adc source.  Docs lie, reference select bits 8 to 11
-        * do nothing. bit 12 seems to chooses internal reference voltage, bit
-        * 13 causes the adc input to go overrange (maybe reads external reference?) */
-       if (insn->chanspec & CR_ALT_SOURCE)
-               channel_select = INTERNAL_REF;
-       else
-               channel_select = CR_CHAN(insn->chanspec);
-       ni_ao_win_outw(dev, channel_select, AO_Calibration_Channel_Select_67xx);
+       if (dev->irq) {
+               ni_stc_writew(dev,
+                             (irq_polarity ? Interrupt_Output_Polarity : 0) |
+                             (Interrupt_Output_On_3_Pins & 0) |
+                             Interrupt_A_Enable | Interrupt_B_Enable |
+                             Interrupt_A_Output_Select(interrupt_pin) |
+                             Interrupt_B_Output_Select(interrupt_pin),
+                             Interrupt_Control_Register);
+       }
 
-       for (n = 0; n < insn->n; n++) {
-               retval = cs5529_do_conversion(dev, &sample);
-               if (retval < 0)
-                       return retval;
-               data[n] = sample;
+       /* DMA setup */
+       ni_writeb(dev, devpriv->ai_ao_select_reg, AI_AO_Select);
+       ni_writeb(dev, devpriv->g0_g1_select_reg, G0_G1_Select);
+
+       if (board->reg_type & ni_reg_6xxx_mask) {
+               ni_writeb(dev, 0, Magic_611x);
+       } else if (devpriv->is_m_series) {
+               int channel;
+               for (channel = 0; channel < board->n_aochan; ++channel) {
+                       ni_writeb(dev, 0xf,
+                                 M_Offset_AO_Waveform_Order(channel));
+                       ni_writeb(dev, 0x0,
+                                 M_Offset_AO_Reference_Attenuation(channel));
+               }
+               ni_writeb(dev, 0x0, M_Offset_AO_Calibration);
        }
-       return insn->n;
+
+       return 0;
 }
 
-static int init_cs5529(struct comedi_device *dev)
+static void mio_common_detach(struct comedi_device *dev)
 {
-       unsigned int config_bits =
-           CSCFG_PORT_MODE | CSCFG_WORD_RATE_2180_CYCLES;
+       struct ni_private *devpriv = dev->private;
 
-#if 1
-       /* do self-calibration */
-       cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET_GAIN,
-                           CSCMD_CONFIG_REGISTER);
-       /* need to force a conversion for calibration to run */
-       cs5529_do_conversion(dev, NULL);
-#else
-       /* force gain calibration to 1 */
-       cs5529_config_write(dev, 0x400000, CSCMD_GAIN_REGISTER);
-       cs5529_config_write(dev, config_bits | CSCFG_SELF_CAL_OFFSET,
-                           CSCMD_CONFIG_REGISTER);
-       if (cs5529_wait_for_idle(dev))
-               comedi_error(dev, "timeout or signal in init_cs5529()\n");
-#endif
-       return 0;
+       if (devpriv) {
+               if (devpriv->counter_dev)
+                       ni_gpct_device_destroy(devpriv->counter_dev);
+       }
 }
index de421486b7585b3e562190fd501b824d8f877fe3..815cb2b65c05e23fe4f6c6e26b726585e426aa33 100644 (file)
@@ -47,21 +47,14 @@ See the notes in the ni_atmio.o driver.
 #include <pcmcia/cistpl.h>
 #include <pcmcia/ds.h>
 
-#define ATMIO 1
-#undef PCIMIO
-
 /*
  *  AT specific setup
  */
 
-#define NI_SIZE 0x20
-
-#define MAX_N_CALDACS 32
-
 static const struct ni_board_struct ni_boards[] = {
        {
-               .device_id      = 0x010d,
                .name           = "DAQCard-ai-16xe-50",
+               .device_id      = 0x010d,
                .n_adchan       = 16,
                .adbits         = 16,
                .ai_fifo_depth  = 1024,
@@ -70,8 +63,8 @@ static const struct ni_board_struct ni_boards[] = {
                .num_p0_dio_channels = 8,
                .caldac         = { dac8800, dac8043 },
        }, {
-               .device_id      = 0x010c,
                .name           = "DAQCard-ai-16e-4",
+               .device_id      = 0x010c,
                .n_adchan       = 16,
                .adbits         = 12,
                .ai_fifo_depth  = 1024,
@@ -80,8 +73,8 @@ static const struct ni_board_struct ni_boards[] = {
                .num_p0_dio_channels = 8,
                .caldac         = { mb88341 },          /* verified */
        }, {
-               .device_id      = 0x02c4,
                .name           = "DAQCard-6062E",
+               .device_id      = 0x02c4,
                .n_adchan       = 16,
                .adbits         = 12,
                .ai_fifo_depth  = 8192,
@@ -96,8 +89,8 @@ static const struct ni_board_struct ni_boards[] = {
                .caldac         = { ad8804_debug },     /* verified */
         }, {
                /* specs incorrect! */
-               .device_id      = 0x075e,
                .name           = "DAQCard-6024E",
+               .device_id      = 0x075e,
                .n_adchan       = 16,
                .adbits         = 12,
                .ai_fifo_depth  = 1024,
@@ -111,8 +104,8 @@ static const struct ni_board_struct ni_boards[] = {
                .caldac         = { ad8804_debug },
        }, {
                /* specs incorrect! */
-               .device_id      = 0x0245,
                .name           = "DAQCard-6036E",
+               .device_id      = 0x0245,
                .n_adchan       = 16,
                .adbits         = 16,
                .ai_fifo_depth  = 1024,
@@ -128,8 +121,8 @@ static const struct ni_board_struct ni_boards[] = {
         },
 #if 0
        {
-               .device_id      = 0x0000,       /* unknown */
                .name           = "DAQCard-6715",
+               .device_id      = 0x0000,       /* unknown */
                .n_aochan       = 8,
                .aobits         = 12,
                .ao_671x        = 8192,
@@ -139,64 +132,6 @@ static const struct ni_board_struct ni_boards[] = {
 #endif
 };
 
-#define interrupt_pin(a)       0
-
-#define IRQ_POLARITY 1
-
-struct ni_private {
-
-       struct pcmcia_device *link;
-
-NI_PRIVATE_COMMON};
-
-/* How we access registers */
-
-#define ni_writel(a, b)                (outl((a), (b)+dev->iobase))
-#define ni_readl(a)            (inl((a)+dev->iobase))
-#define ni_writew(a, b)                (outw((a), (b)+dev->iobase))
-#define ni_readw(a)            (inw((a)+dev->iobase))
-#define ni_writeb(a, b)                (outb((a), (b)+dev->iobase))
-#define ni_readb(a)            (inb((a)+dev->iobase))
-
-/* How we access windowed registers */
-
-/* We automatically take advantage of STC registers that can be
- * read/written directly in the I/O space of the board.  The
- * DAQCard devices map the low 8 STC registers to iobase+addr*2. */
-
-static void mio_cs_win_out(struct comedi_device *dev, uint16_t data, int addr)
-{
-       struct ni_private *devpriv = dev->private;
-       unsigned long flags;
-
-       spin_lock_irqsave(&devpriv->window_lock, flags);
-       if (addr < 8) {
-               ni_writew(data, addr * 2);
-       } else {
-               ni_writew(addr, Window_Address);
-               ni_writew(data, Window_Data);
-       }
-       spin_unlock_irqrestore(&devpriv->window_lock, flags);
-}
-
-static uint16_t mio_cs_win_in(struct comedi_device *dev, int addr)
-{
-       struct ni_private *devpriv = dev->private;
-       unsigned long flags;
-       uint16_t ret;
-
-       spin_lock_irqsave(&devpriv->window_lock, flags);
-       if (addr < 8) {
-               ret = ni_readw(addr * 2);
-       } else {
-               ni_writew(addr, Window_Address);
-               ret = ni_readw(Window_Data);
-       }
-       spin_unlock_irqrestore(&devpriv->window_lock, flags);
-
-       return ret;
-}
-
 #include "ni_mio_common.c"
 
 static const void *ni_getboardtype(struct comedi_device *dev,
@@ -260,12 +195,8 @@ static int mio_cs_auto_attach(struct comedi_device *dev,
                return ret;
 
        devpriv = dev->private;
-       devpriv->stc_writew     = mio_cs_win_out;
-       devpriv->stc_readw      = mio_cs_win_in;
-       devpriv->stc_writel     = win_out2;
-       devpriv->stc_readl      = win_in2;
 
-       return ni_E_init(dev);
+       return ni_E_init(dev, 0, 1);
 }
 
 static void mio_cs_detach(struct comedi_device *dev)
index 5fc74d6ff6af55a822b8f59f734d4148d5d584f8..4d6b2ed9ac7b9ce4207fa8ce682e2e0e712a8b3d 100644 (file)
@@ -361,7 +361,7 @@ static int ni_pcidio_poll(struct comedi_device *dev, struct comedi_subdevice *s)
        if (devpriv->di_mite_chan)
                mite_sync_input_dma(devpriv->di_mite_chan, s);
        spin_unlock(&devpriv->mite_channel_lock);
-       count = s->async->buf_write_count - s->async->buf_read_count;
+       count = comedi_buf_n_bytes_ready(s);
        spin_unlock_irqrestore(&dev->spinlock, irq_flags);
        return count;
 }
@@ -1024,7 +1024,7 @@ static int nidio_auto_attach(struct comedi_device *dev,
        s->async_dma_dir = DMA_BIDIRECTIONAL;
        s->poll = &ni_pcidio_poll;
 
-       irq = mite_irq(devpriv->mite);
+       irq = pcidev->irq;
        if (irq) {
                ret = request_irq(irq, nidio_interrupt, IRQF_SHARED,
                                  dev->board_name, dev);
@@ -1046,10 +1046,7 @@ static void nidio_detach(struct comedi_device *dev)
                        mite_free_ring(devpriv->di_mite_ring);
                        devpriv->di_mite_ring = NULL;
                }
-               if (devpriv->mite) {
-                       mite_unsetup(devpriv->mite);
-                       mite_free(devpriv->mite);
-               }
+               mite_detach(devpriv->mite);
        }
        comedi_pci_disable(dev);
 }
index 89300dc78e3529d7daa1a57700c405d6d307fea7..20c839b45752dbb1f8236503820e8b98503bd0cb 100644 (file)
@@ -118,13 +118,6 @@ Bugs:
 
 #define PCIDMA
 
-#define PCIMIO 1
-#undef ATMIO
-
-#define MAX_N_CALDACS (16+16+2)
-
-#define DRV_NAME "ni_pcimio"
-
 /* These are not all the possible ao ranges for 628x boards.
  They can do OFFSET +- REFERENCE where OFFSET can be
  0V, 5V, APFI<0,1>, or AO<0...3> and RANGE can
@@ -1044,344 +1037,78 @@ static const struct ni_board_struct ni_boards[] = {
        },
 };
 
-struct ni_private {
-NI_PRIVATE_COMMON};
-
-/* How we access registers */
-
-#define ni_writel(a, b)        (writel((a), devpriv->mite->daq_io_addr + (b)))
-#define ni_readl(a)    (readl(devpriv->mite->daq_io_addr + (a)))
-#define ni_writew(a, b)        (writew((a), devpriv->mite->daq_io_addr + (b)))
-#define ni_readw(a)    (readw(devpriv->mite->daq_io_addr + (a)))
-#define ni_writeb(a, b)        (writeb((a), devpriv->mite->daq_io_addr + (b)))
-#define ni_readb(a)    (readb(devpriv->mite->daq_io_addr + (a)))
-
-/* How we access STC registers */
-
-/* We automatically take advantage of STC registers that can be
- * read/written directly in the I/O space of the board.  Most
- * PCIMIO devices map the low 8 STC registers to iobase+addr*2.
- * The 611x devices map the write registers to iobase+addr*2, and
- * the read registers to iobase+(addr-1)*2. */
-/* However, the 611x boards still aren't working, so I'm disabling
- * non-windowed STC access temporarily */
+#include "ni_mio_common.c"
 
-static void e_series_win_out(struct comedi_device *dev, uint16_t data, int reg)
+static int pcimio_ai_change(struct comedi_device *dev,
+                           struct comedi_subdevice *s,
+                           unsigned long new_size)
 {
        struct ni_private *devpriv = dev->private;
-       unsigned long flags;
+       int ret;
+
+       ret = mite_buf_change(devpriv->ai_mite_ring, s);
+       if (ret < 0)
+               return ret;
 
-       spin_lock_irqsave(&devpriv->window_lock, flags);
-       ni_writew(reg, Window_Address);
-       ni_writew(data, Window_Data);
-       spin_unlock_irqrestore(&devpriv->window_lock, flags);
+       return 0;
 }
 
-static uint16_t e_series_win_in(struct comedi_device *dev, int reg)
+static int pcimio_ao_change(struct comedi_device *dev,
+                           struct comedi_subdevice *s,
+                           unsigned long new_size)
 {
        struct ni_private *devpriv = dev->private;
-       unsigned long flags;
-       uint16_t ret;
+       int ret;
 
-       spin_lock_irqsave(&devpriv->window_lock, flags);
-       ni_writew(reg, Window_Address);
-       ret = ni_readw(Window_Data);
-       spin_unlock_irqrestore(&devpriv->window_lock, flags);
+       ret = mite_buf_change(devpriv->ao_mite_ring, s);
+       if (ret < 0)
+               return ret;
 
-       return ret;
+       return 0;
 }
 
-static void m_series_stc_writew(struct comedi_device *dev, uint16_t data,
-                               int reg)
+static int pcimio_gpct0_change(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              unsigned long new_size)
 {
        struct ni_private *devpriv = dev->private;
-       unsigned offset;
-
-       switch (reg) {
-       case ADC_FIFO_Clear:
-               offset = M_Offset_AI_FIFO_Clear;
-               break;
-       case AI_Command_1_Register:
-               offset = M_Offset_AI_Command_1;
-               break;
-       case AI_Command_2_Register:
-               offset = M_Offset_AI_Command_2;
-               break;
-       case AI_Mode_1_Register:
-               offset = M_Offset_AI_Mode_1;
-               break;
-       case AI_Mode_2_Register:
-               offset = M_Offset_AI_Mode_2;
-               break;
-       case AI_Mode_3_Register:
-               offset = M_Offset_AI_Mode_3;
-               break;
-       case AI_Output_Control_Register:
-               offset = M_Offset_AI_Output_Control;
-               break;
-       case AI_Personal_Register:
-               offset = M_Offset_AI_Personal;
-               break;
-       case AI_SI2_Load_A_Register:
-               /*  this is actually a 32 bit register on m series boards */
-               ni_writel(data, M_Offset_AI_SI2_Load_A);
-               return;
-               break;
-       case AI_SI2_Load_B_Register:
-               /*  this is actually a 32 bit register on m series boards */
-               ni_writel(data, M_Offset_AI_SI2_Load_B);
-               return;
-               break;
-       case AI_START_STOP_Select_Register:
-               offset = M_Offset_AI_START_STOP_Select;
-               break;
-       case AI_Trigger_Select_Register:
-               offset = M_Offset_AI_Trigger_Select;
-               break;
-       case Analog_Trigger_Etc_Register:
-               offset = M_Offset_Analog_Trigger_Etc;
-               break;
-       case AO_Command_1_Register:
-               offset = M_Offset_AO_Command_1;
-               break;
-       case AO_Command_2_Register:
-               offset = M_Offset_AO_Command_2;
-               break;
-       case AO_Mode_1_Register:
-               offset = M_Offset_AO_Mode_1;
-               break;
-       case AO_Mode_2_Register:
-               offset = M_Offset_AO_Mode_2;
-               break;
-       case AO_Mode_3_Register:
-               offset = M_Offset_AO_Mode_3;
-               break;
-       case AO_Output_Control_Register:
-               offset = M_Offset_AO_Output_Control;
-               break;
-       case AO_Personal_Register:
-               offset = M_Offset_AO_Personal;
-               break;
-       case AO_Start_Select_Register:
-               offset = M_Offset_AO_Start_Select;
-               break;
-       case AO_Trigger_Select_Register:
-               offset = M_Offset_AO_Trigger_Select;
-               break;
-       case Clock_and_FOUT_Register:
-               offset = M_Offset_Clock_and_FOUT;
-               break;
-       case Configuration_Memory_Clear:
-               offset = M_Offset_Configuration_Memory_Clear;
-               break;
-       case DAC_FIFO_Clear:
-               offset = M_Offset_AO_FIFO_Clear;
-               break;
-       case DIO_Control_Register:
-               dev_dbg(dev->class_dev,
-                       "%s: FIXME: register 0x%x does not map cleanly on to m-series boards.\n",
-                       __func__, reg);
-               return;
-               break;
-       case G_Autoincrement_Register(0):
-               offset = M_Offset_G0_Autoincrement;
-               break;
-       case G_Autoincrement_Register(1):
-               offset = M_Offset_G1_Autoincrement;
-               break;
-       case G_Command_Register(0):
-               offset = M_Offset_G0_Command;
-               break;
-       case G_Command_Register(1):
-               offset = M_Offset_G1_Command;
-               break;
-       case G_Input_Select_Register(0):
-               offset = M_Offset_G0_Input_Select;
-               break;
-       case G_Input_Select_Register(1):
-               offset = M_Offset_G1_Input_Select;
-               break;
-       case G_Mode_Register(0):
-               offset = M_Offset_G0_Mode;
-               break;
-       case G_Mode_Register(1):
-               offset = M_Offset_G1_Mode;
-               break;
-       case Interrupt_A_Ack_Register:
-               offset = M_Offset_Interrupt_A_Ack;
-               break;
-       case Interrupt_A_Enable_Register:
-               offset = M_Offset_Interrupt_A_Enable;
-               break;
-       case Interrupt_B_Ack_Register:
-               offset = M_Offset_Interrupt_B_Ack;
-               break;
-       case Interrupt_B_Enable_Register:
-               offset = M_Offset_Interrupt_B_Enable;
-               break;
-       case Interrupt_Control_Register:
-               offset = M_Offset_Interrupt_Control;
-               break;
-       case IO_Bidirection_Pin_Register:
-               offset = M_Offset_IO_Bidirection_Pin;
-               break;
-       case Joint_Reset_Register:
-               offset = M_Offset_Joint_Reset;
-               break;
-       case RTSI_Trig_A_Output_Register:
-               offset = M_Offset_RTSI_Trig_A_Output;
-               break;
-       case RTSI_Trig_B_Output_Register:
-               offset = M_Offset_RTSI_Trig_B_Output;
-               break;
-       case RTSI_Trig_Direction_Register:
-               offset = M_Offset_RTSI_Trig_Direction;
-               break;
-               /* FIXME: DIO_Output_Register (16 bit reg) is replaced by M_Offset_Static_Digital_Output (32 bit)
-                  and M_Offset_SCXI_Serial_Data_Out (8 bit) */
-       default:
-               dev_warn(dev->class_dev,
-                        "%s: bug! unhandled register=0x%x in switch.\n",
-                        __func__, reg);
-               BUG();
-               return;
-               break;
-       }
-       ni_writew(data, offset);
-}
+       int ret;
 
-static uint16_t m_series_stc_readw(struct comedi_device *dev, int reg)
-{
-       struct ni_private *devpriv = dev->private;
-       unsigned offset;
-
-       switch (reg) {
-       case AI_Status_1_Register:
-               offset = M_Offset_AI_Status_1;
-               break;
-       case AO_Status_1_Register:
-               offset = M_Offset_AO_Status_1;
-               break;
-       case AO_Status_2_Register:
-               offset = M_Offset_AO_Status_2;
-               break;
-       case DIO_Serial_Input_Register:
-               return ni_readb(M_Offset_SCXI_Serial_Data_In);
-               break;
-       case Joint_Status_1_Register:
-               offset = M_Offset_Joint_Status_1;
-               break;
-       case Joint_Status_2_Register:
-               offset = M_Offset_Joint_Status_2;
-               break;
-       case G_Status_Register:
-               offset = M_Offset_G01_Status;
-               break;
-       default:
-               dev_warn(dev->class_dev,
-                        "%s: bug! unhandled register=0x%x in switch.\n",
-                        __func__, reg);
-               BUG();
-               return 0;
-               break;
-       }
-       return ni_readw(offset);
+       ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
 }
 
-static void m_series_stc_writel(struct comedi_device *dev, uint32_t data,
-                               int reg)
+static int pcimio_gpct1_change(struct comedi_device *dev,
+                              struct comedi_subdevice *s,
+                              unsigned long new_size)
 {
        struct ni_private *devpriv = dev->private;
-       unsigned offset;
-
-       switch (reg) {
-       case AI_SC_Load_A_Registers:
-               offset = M_Offset_AI_SC_Load_A;
-               break;
-       case AI_SI_Load_A_Registers:
-               offset = M_Offset_AI_SI_Load_A;
-               break;
-       case AO_BC_Load_A_Register:
-               offset = M_Offset_AO_BC_Load_A;
-               break;
-       case AO_UC_Load_A_Register:
-               offset = M_Offset_AO_UC_Load_A;
-               break;
-       case AO_UI_Load_A_Register:
-               offset = M_Offset_AO_UI_Load_A;
-               break;
-       case G_Load_A_Register(0):
-               offset = M_Offset_G0_Load_A;
-               break;
-       case G_Load_A_Register(1):
-               offset = M_Offset_G1_Load_A;
-               break;
-       case G_Load_B_Register(0):
-               offset = M_Offset_G0_Load_B;
-               break;
-       case G_Load_B_Register(1):
-               offset = M_Offset_G1_Load_B;
-               break;
-       default:
-               dev_warn(dev->class_dev,
-                        "%s: bug! unhandled register=0x%x in switch.\n",
-                        __func__, reg);
-               BUG();
-               return;
-               break;
-       }
-       ni_writel(data, offset);
+       int ret;
+
+       ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
+       if (ret < 0)
+               return ret;
+
+       return 0;
 }
 
-static uint32_t m_series_stc_readl(struct comedi_device *dev, int reg)
+static int pcimio_dio_change(struct comedi_device *dev,
+                            struct comedi_subdevice *s,
+                            unsigned long new_size)
 {
        struct ni_private *devpriv = dev->private;
-       unsigned offset;
-
-       switch (reg) {
-       case G_HW_Save_Register(0):
-               offset = M_Offset_G0_HW_Save;
-               break;
-       case G_HW_Save_Register(1):
-               offset = M_Offset_G1_HW_Save;
-               break;
-       case G_Save_Register(0):
-               offset = M_Offset_G0_Save;
-               break;
-       case G_Save_Register(1):
-               offset = M_Offset_G1_Save;
-               break;
-       default:
-               dev_warn(dev->class_dev,
-                        "%s: bug! unhandled register=0x%x in switch.\n",
-                        __func__, reg);
-               BUG();
-               return 0;
-               break;
-       }
-       return ni_readl(offset);
-}
-
-#define interrupt_pin(a)       0
-#define IRQ_POLARITY 1
+       int ret;
 
-#define NI_E_IRQ_FLAGS         IRQF_SHARED
+       ret = mite_buf_change(devpriv->cdo_mite_ring, s);
+       if (ret < 0)
+               return ret;
 
-#include "ni_mio_common.c"
+       return 0;
+}
 
-static int pcimio_ai_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size);
-static int pcimio_ao_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size);
-static int pcimio_gpct0_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size);
-static int pcimio_gpct1_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size);
-static int pcimio_dio_change(struct comedi_device *dev,
-                            struct comedi_subdevice *s,
-                            unsigned long new_size);
 
 static void m_series_init_eeprom_buffer(struct comedi_device *dev)
 {
@@ -1408,12 +1135,12 @@ static void m_series_init_eeprom_buffer(struct comedi_device *dev)
        BUG_ON(serial_number_eeprom_length > sizeof(devpriv->serial_number));
        for (i = 0; i < serial_number_eeprom_length; ++i) {
                char *byte_ptr = (char *)&devpriv->serial_number + i;
-               *byte_ptr = ni_readb(serial_number_eeprom_offset + i);
+               *byte_ptr = ni_readb(dev, serial_number_eeprom_offset + i);
        }
        devpriv->serial_number = be32_to_cpu(devpriv->serial_number);
 
        for (i = 0; i < M_SERIES_EEPROM_SIZE; ++i)
-               devpriv->eeprom_buffer[i] = ni_readb(Start_Cal_EEPROM + i);
+               devpriv->eeprom_buffer[i] = ni_readb(dev, Start_Cal_EEPROM + i);
 
        writel(old_iodwbsr1_bits, devpriv->mite->mite_io_addr + MITE_IODWBSR_1);
        writel(old_iodwbsr_bits, devpriv->mite->mite_io_addr + MITE_IODWBSR);
@@ -1427,21 +1154,26 @@ static void init_6143(struct comedi_device *dev)
        struct ni_private *devpriv = dev->private;
 
        /*  Disable interrupts */
-       devpriv->stc_writew(dev, 0, Interrupt_Control_Register);
+       ni_stc_writew(dev, 0, Interrupt_Control_Register);
 
        /*  Initialise 6143 AI specific bits */
-       ni_writeb(0x00, Magic_6143);    /*  Set G0,G1 DMA mode to E series version */
-       ni_writeb(0x80, PipelineDelay_6143);    /*  Set EOCMode, ADCMode and pipelinedelay */
-       ni_writeb(0x00, EOC_Set_6143);  /*  Set EOC Delay */
+
+       /* Set G0,G1 DMA mode to E series version */
+       ni_writeb(dev, 0x00, Magic_6143);
+       /* Set EOCMode, ADCMode and pipelinedelay */
+       ni_writeb(dev, 0x80, PipelineDelay_6143);
+       /* Set EOC Delay */
+       ni_writeb(dev, 0x00, EOC_Set_6143);
 
        /* Set the FIFO half full level */
-       ni_writel(board->ai_fifo_depth / 2, AIFIFO_Flag_6143);
+       ni_writel(dev, board->ai_fifo_depth / 2, AIFIFO_Flag_6143);
 
        /*  Strobe Relay disable bit */
        devpriv->ai_calib_source_enabled = 0;
-       ni_writew(devpriv->ai_calib_source | Calibration_Channel_6143_RelayOff,
+       ni_writew(dev, devpriv->ai_calib_source |
+                      Calibration_Channel_6143_RelayOff,
                  Calibration_Channel_6143);
-       ni_writew(devpriv->ai_calib_source, Calibration_Channel_6143);
+       ni_writew(dev, devpriv->ai_calib_source, Calibration_Channel_6143);
 }
 
 static void pcimio_detach(struct comedi_device *dev)
@@ -1457,10 +1189,7 @@ static void pcimio_detach(struct comedi_device *dev)
                mite_free_ring(devpriv->cdo_mite_ring);
                mite_free_ring(devpriv->gpct_mite_ring[0]);
                mite_free_ring(devpriv->gpct_mite_ring[1]);
-               if (devpriv->mite) {
-                       mite_unsetup(devpriv->mite);
-                       mite_free(devpriv->mite);
-               }
+               mite_detach(devpriv->mite);
        }
        comedi_pci_disable(dev);
 }
@@ -1494,17 +1223,8 @@ static int pcimio_auto_attach(struct comedi_device *dev,
        if (!devpriv->mite)
                return -ENOMEM;
 
-       if (board->reg_type & ni_reg_m_series_mask) {
-               devpriv->stc_writew = &m_series_stc_writew;
-               devpriv->stc_readw = &m_series_stc_readw;
-               devpriv->stc_writel = &m_series_stc_writel;
-               devpriv->stc_readl = &m_series_stc_readl;
-       } else {
-               devpriv->stc_writew = &e_series_win_out;
-               devpriv->stc_readw = &e_series_win_in;
-               devpriv->stc_writel = &win_out2;
-               devpriv->stc_readl = &win_in2;
-       }
+       if (board->reg_type & ni_reg_m_series_mask)
+               devpriv->is_m_series = 1;
 
        ret = mite_setup(devpriv->mite);
        if (ret < 0) {
@@ -1528,20 +1248,20 @@ static int pcimio_auto_attach(struct comedi_device *dev,
        if (devpriv->gpct_mite_ring[1] == NULL)
                return -ENOMEM;
 
-       if (board->reg_type & ni_reg_m_series_mask)
+       if (devpriv->is_m_series)
                m_series_init_eeprom_buffer(dev);
        if (board->reg_type == ni_reg_6143)
                init_6143(dev);
 
-       irq = mite_irq(devpriv->mite);
+       irq = pcidev->irq;
        if (irq) {
-               ret = request_irq(irq, ni_E_interrupt, NI_E_IRQ_FLAGS,
+               ret = request_irq(irq, ni_E_interrupt, IRQF_SHARED,
                                  dev->board_name, dev);
                if (ret == 0)
                        dev->irq = irq;
        }
 
-       ret = ni_E_init(dev);
+       ret = ni_E_init(dev, 0, 1);
        if (ret < 0)
                return ret;
 
@@ -1554,73 +1274,6 @@ static int pcimio_auto_attach(struct comedi_device *dev,
        return 0;
 }
 
-static int pcimio_ai_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->ai_mite_ring, s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_ao_change(struct comedi_device *dev,
-                           struct comedi_subdevice *s, unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->ao_mite_ring, s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_gpct0_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->gpct_mite_ring[0], s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_gpct1_change(struct comedi_device *dev,
-                              struct comedi_subdevice *s,
-                              unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->gpct_mite_ring[1], s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
-static int pcimio_dio_change(struct comedi_device *dev,
-                            struct comedi_subdevice *s, unsigned long new_size)
-{
-       struct ni_private *devpriv = dev->private;
-       int ret;
-
-       ret = mite_buf_change(devpriv->cdo_mite_ring, s);
-       if (ret < 0)
-               return ret;
-
-       return 0;
-}
-
 static struct comedi_driver ni_pcimio_driver = {
        .driver_name    = "ni_pcimio",
        .module         = THIS_MODULE,
index f0630b7897b507171cb56d1ea09f7645521ca5e4..02a7fa3233e1cf45f446206c54135c5a8a395504 100644 (file)
@@ -1388,9 +1388,9 @@ enum Interrupt_C_Status_Bits {
 #define M_SERIES_EEPROM_SIZE 1024
 
 struct ni_board_struct {
+       const char *name;
        int device_id;
        int isapnp_id;
-       char *name;
 
        int n_adchan;
        int adbits;
@@ -1416,92 +1416,83 @@ struct ni_board_struct {
        enum caldac_enum caldac[3];
 };
 
-#define MAX_N_AO_CHAN 8
-#define NUM_GPCT 2
-
-#define NI_PRIVATE_COMMON                                      \
-       uint16_t (*stc_readw)(struct comedi_device *dev, int register); \
-       uint32_t (*stc_readl)(struct comedi_device *dev, int register); \
-       void (*stc_writew)(struct comedi_device *dev, uint16_t value, int register);    \
-       void (*stc_writel)(struct comedi_device *dev, uint32_t value, int register);    \
-       \
-       unsigned short dio_output;                              \
-       unsigned short dio_control;                             \
-       int ao0p, ao1p;                                         \
-       int lastchan;                                           \
-       int last_do;                                            \
-       int rt_irq;                                             \
-       int irqmask;                                            \
-       int aimode;                                             \
-       int ai_continuous;                                      \
-       int blocksize;                                          \
-       int n_left;                                             \
-       unsigned int ai_calib_source;                           \
-       unsigned int ai_calib_source_enabled;                   \
-       spinlock_t window_lock; \
-       spinlock_t soft_reg_copy_lock; \
-       spinlock_t mite_channel_lock; \
-                                                               \
-       int changain_state;                                     \
-       unsigned int changain_spec;                             \
-                                                               \
-       unsigned int caldac_maxdata_list[MAX_N_CALDACS];        \
-       unsigned short ao[MAX_N_AO_CHAN];                                       \
-       unsigned short caldacs[MAX_N_CALDACS];                          \
-                                                               \
-       unsigned short ai_cmd2; \
-                                                               \
-       unsigned short ao_conf[MAX_N_AO_CHAN];                          \
-       unsigned short ao_mode1;                                \
-       unsigned short ao_mode2;                                \
-       unsigned short ao_mode3;                                \
-       unsigned short ao_cmd1;                                 \
-       unsigned short ao_cmd2;                                 \
-       unsigned short ao_cmd3;                                 \
-       unsigned short ao_trigger_select;                       \
-                                                               \
-       struct ni_gpct_device *counter_dev;     \
-       unsigned short an_trig_etc_reg;                         \
-                                                               \
-       unsigned ai_offset[512];                                \
-                                                               \
-       unsigned long serial_interval_ns;                       \
-       unsigned char serial_hw_mode;                           \
-       unsigned short clock_and_fout;                          \
-       unsigned short clock_and_fout2;                         \
-                                                               \
-       unsigned short int_a_enable_reg;                        \
-       unsigned short int_b_enable_reg;                        \
-       unsigned short io_bidirection_pin_reg;                  \
-       unsigned short rtsi_trig_direction_reg;                 \
-       unsigned short rtsi_trig_a_output_reg; \
-       unsigned short rtsi_trig_b_output_reg; \
-       unsigned short pfi_output_select_reg[NUM_PFI_OUTPUT_SELECT_REGS]; \
-       unsigned short ai_ao_select_reg; \
-       unsigned short g0_g1_select_reg; \
-       unsigned short cdio_dma_select_reg; \
-       \
-       unsigned clock_ns; \
-       unsigned clock_source; \
-       \
-       unsigned short atrig_mode;                              \
-       unsigned short atrig_high;                              \
-       unsigned short atrig_low;                               \
-       \
-       unsigned short pwm_up_count;    \
-       unsigned short pwm_down_count;  \
-       \
-       unsigned short ai_fifo_buffer[0x2000];                  \
-       uint8_t eeprom_buffer[M_SERIES_EEPROM_SIZE]; \
-       uint32_t serial_number; \
-       \
-       struct mite_struct *mite; \
-       struct mite_channel *ai_mite_chan; \
-       struct mite_channel *ao_mite_chan;\
-       struct mite_channel *cdo_mite_chan;\
-       struct mite_dma_descriptor_ring *ai_mite_ring; \
-       struct mite_dma_descriptor_ring *ao_mite_ring; \
-       struct mite_dma_descriptor_ring *cdo_mite_ring; \
+#define MAX_N_CALDACS  34
+#define MAX_N_AO_CHAN  8
+#define NUM_GPCT       2
+
+struct ni_private {
+       unsigned short dio_output;
+       unsigned short dio_control;
+       int aimode;
+       int ai_continuous;
+       unsigned int ai_calib_source;
+       unsigned int ai_calib_source_enabled;
+       spinlock_t window_lock;
+       spinlock_t soft_reg_copy_lock;
+       spinlock_t mite_channel_lock;
+
+       int changain_state;
+       unsigned int changain_spec;
+
+       unsigned int caldac_maxdata_list[MAX_N_CALDACS];
+       unsigned short ao[MAX_N_AO_CHAN];
+       unsigned short caldacs[MAX_N_CALDACS];
+
+       unsigned short ai_cmd2;
+
+       unsigned short ao_conf[MAX_N_AO_CHAN];
+       unsigned short ao_mode1;
+       unsigned short ao_mode2;
+       unsigned short ao_mode3;
+       unsigned short ao_cmd1;
+       unsigned short ao_cmd2;
+       unsigned short ao_trigger_select;
+
+       struct ni_gpct_device *counter_dev;
+       unsigned short an_trig_etc_reg;
+
+       unsigned ai_offset[512];
+
+       unsigned long serial_interval_ns;
+       unsigned char serial_hw_mode;
+       unsigned short clock_and_fout;
+       unsigned short clock_and_fout2;
+
+       unsigned short int_a_enable_reg;
+       unsigned short int_b_enable_reg;
+       unsigned short io_bidirection_pin_reg;
+       unsigned short rtsi_trig_direction_reg;
+       unsigned short rtsi_trig_a_output_reg;
+       unsigned short rtsi_trig_b_output_reg;
+       unsigned short pfi_output_select_reg[NUM_PFI_OUTPUT_SELECT_REGS];
+       unsigned short ai_ao_select_reg;
+       unsigned short g0_g1_select_reg;
+       unsigned short cdio_dma_select_reg;
+
+       unsigned clock_ns;
+       unsigned clock_source;
+
+       unsigned short atrig_mode;
+       unsigned short atrig_high;
+       unsigned short atrig_low;
+
+       unsigned short pwm_up_count;
+       unsigned short pwm_down_count;
+
+       unsigned short ai_fifo_buffer[0x2000];
+       uint8_t eeprom_buffer[M_SERIES_EEPROM_SIZE];
+       uint32_t serial_number;
+
+       struct mite_struct *mite;
+       struct mite_channel *ai_mite_chan;
+       struct mite_channel *ao_mite_chan;
+       struct mite_channel *cdo_mite_chan;
+       struct mite_dma_descriptor_ring *ai_mite_ring;
+       struct mite_dma_descriptor_ring *ao_mite_ring;
+       struct mite_dma_descriptor_ring *cdo_mite_ring;
        struct mite_dma_descriptor_ring *gpct_mite_ring[NUM_GPCT];
 
+       unsigned int is_m_series:1;
+};
+
 #endif /* _COMEDI_NI_STC_H */
index 8af13e790ad19d5ac41559ebbbcd3f88abffb460..655bac42f6f0c6443dc4b372cc815c99ccff8561 100644 (file)
@@ -15,6 +15,7 @@
  *         (ADLink) ACL-7124 [acl7124]
  *         (ADLink) PET-48DIO [pet48dio]
  *         (WinSystems) PCM-IO48 [pcmio48]
+ *         (Diamond Systems) ONYX-MM-DIO [onyx-mm-dio]
  * Author: Michal Dobes <dobes@tesnet.cz>
  * Status: untested
  *
@@ -73,6 +74,10 @@ static const struct pcl724_board boardtypes[] = {
                .name           = "pcmio48",
                .io_range       = 0x08,
                .numofports     = 2,    /* 48 DIO channels */
+       }, {
+               .name           = "onyx-mm-dio",
+               .io_range       = 0x10,
+               .numofports     = 2,    /* 48 DIO channels */
        },
 };
 
index 7fb044ce399b86edd9da96cdf9a56dbfe849be7e..4eef4b46cf6b44ff7b901fe7f5c545f317a26aee 100644 (file)
@@ -19,6 +19,7 @@
  *         (Advantech) PCL-734 [pcl734]
  *         (Diamond Systems) OPMM-1616-XT [opmm-1616-xt]
  *         (Diamond Systems) PEARL-MM-P [prearl-mm-p]
+ *         (Diamond Systems) IR104-PBF [ir104-pbf]
  * Author: José Luis Sánchez (jsanchezv@teleline.es)
  * Status: untested
  *
  *
  *     BASE+0  Isolated outputs 0-7 (write)
  *     BASE+1  Isolated outputs 8-15 (write)
+ *
+ * The ir104-pbf board has this register mapping:
+ *
+ *     BASE+0  Isolated outputs 0-7 (write) (read back)
+ *     BASE+1  Isolated outputs 8-15 (write) (read back)
+ *     BASE+2  Isolated outputs 16-19 (write) (read back)
+ *     BASE+4  Isolated inputs 0-7 (read)
+ *     BASE+5  Isolated inputs 8-15 (read)
+ *     BASE+6  Isolated inputs 16-19 (read)
  */
 
 struct pcl730_board {
@@ -100,6 +110,7 @@ struct pcl730_board {
        unsigned int io_range;
        unsigned is_pcl725:1;
        unsigned is_acl7225b:1;
+       unsigned is_ir104:1;
        unsigned has_readback:1;
        unsigned has_ttl_io:1;
        int n_subdevs;
@@ -194,6 +205,13 @@ static const struct pcl730_board pcl730_boards[] = {
                .io_range       = 0x02,
                .n_subdevs      = 1,
                .n_iso_out_chan = 16,
+       }, {
+               .name           = "ir104-pbf",
+               .io_range       = 0x08,
+               .is_ir104       = 1,
+               .has_readback   = 1,
+               .n_iso_out_chan = 20,
+               .n_iso_in_chan  = 20,
        },
 };
 
@@ -292,7 +310,8 @@ static int pcl730_attach(struct comedi_device *dev,
                s->maxdata      = 1;
                s->range_table  = &range_digital;
                s->insn_bits    = pcl730_di_insn_bits;
-               s->private      = board->is_acl7225b ? (void *)2 :
+               s->private      = board->is_ir104 ? (void*)4 :
+                                 board->is_acl7225b ? (void *)2 :
                                  board->is_pcl725 ? (void *)1 : (void *)0;
        }
 
index 4c1b9470647838fae364572b3e339571c5d5d8b0..803e7790538cb3a3d990d18f717f6ac3ff895126 100644 (file)
@@ -985,7 +985,7 @@ static int pcl812_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
 
        spin_unlock_irqrestore(&dev->spinlock, flags);
 
-       return s->async->buf_write_count - s->async->buf_read_count;
+       return comedi_buf_n_bytes_ready(s);
 }
 
 static int pcl812_ai_cancel(struct comedi_device *dev,
index d9ca7fe16c96695c054e994c4a8e1b3f147a3292..eda9986d9cf84bd49e220c96347795267249ae4b 100644 (file)
@@ -516,7 +516,7 @@ static int pcl816_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
 
        cfc_handle_events(dev, s);
 
-       return s->async->buf_write_count - s->async->buf_read_count;
+       return comedi_buf_n_bytes_ready(s);
 }
 
 static int pcl816_ai_cancel(struct comedi_device *dev,
index 0838f8aa6951da3ee44fbee508e88264a667da0c..9da68225469e403cba43fd06a756f8c12ef6e138 100644 (file)
@@ -102,60 +102,9 @@ struct s626_private {
        unsigned int ao_readback[S626_DAC_CHANNELS];
 };
 
-/* COUNTER OBJECT ------------------------------------------------ */
-struct s626_enc_info {
-       /* Pointers to functions that differ for A and B counters: */
-       /* Return clock enable. */
-       uint16_t (*get_enable)(struct comedi_device *dev,
-                             const struct s626_enc_info *k);
-       /* Return interrupt source. */
-       uint16_t (*get_int_src)(struct comedi_device *dev,
-                              const struct s626_enc_info *k);
-       /* Return preload trigger source. */
-       uint16_t (*get_load_trig)(struct comedi_device *dev,
-                                const struct s626_enc_info *k);
-       /* Return standardized operating mode. */
-       uint16_t (*get_mode)(struct comedi_device *dev,
-                           const struct s626_enc_info *k);
-       /* Generate soft index strobe. */
-       void (*pulse_index)(struct comedi_device *dev,
-                           const struct s626_enc_info *k);
-       /* Program clock enable. */
-       void (*set_enable)(struct comedi_device *dev,
-                          const struct s626_enc_info *k, uint16_t enab);
-       /* Program interrupt source. */
-       void (*set_int_src)(struct comedi_device *dev,
-                           const struct s626_enc_info *k, uint16_t int_source);
-       /* Program preload trigger source. */
-       void (*set_load_trig)(struct comedi_device *dev,
-                             const struct s626_enc_info *k, uint16_t trig);
-       /* Program standardized operating mode. */
-       void (*set_mode)(struct comedi_device *dev,
-                        const struct s626_enc_info *k, uint16_t setup,
-                        uint16_t disable_int_src);
-       /* Reset event capture flags. */
-       void (*reset_cap_flags)(struct comedi_device *dev,
-                               const struct s626_enc_info *k);
-
-       uint16_t my_cra;        /* address of CRA register */
-       uint16_t my_crb;        /* address of CRB register */
-       uint16_t my_latch_lsw;  /* address of Latch least-significant-word
-                                * register */
-       uint16_t my_event_bits[4]; /* bit translations for IntSrc -->RDMISC2 */
-};
-
 /* Counter overflow/index event flag masks for RDMISC2. */
 #define S626_INDXMASK(C) (1 << (((C) > 2) ? ((C) * 2 - 1) : ((C) * 2 +  4)))
 #define S626_OVERMASK(C) (1 << (((C) > 2) ? ((C) * 2 + 5) : ((C) * 2 + 10)))
-#define S626_EVBITS(C) { 0, S626_OVERMASK(C), S626_INDXMASK(C), \
-                         S626_OVERMASK(C) | S626_INDXMASK(C) }
-
-/*
- * Translation table to map IntSrc into equivalent RDMISC2 event flag  bits.
- * static const uint16_t s626_event_bits[][4] =
- *     { S626_EVBITS(0), S626_EVBITS(1), S626_EVBITS(2), S626_EVBITS(3),
- *       S626_EVBITS(4), S626_EVBITS(5) };
- */
 
 /*
  * Enable/disable a function or test status bit(s) that are accessed
@@ -722,33 +671,15 @@ static int s626_load_trim_dacs(struct comedi_device *dev)
  * 2=2A, 3=0B, 4=1B, 5=2B.
  */
 
-/*
- * Read a counter's output latch.
- */
-static uint32_t s626_read_latch(struct comedi_device *dev,
-                               const struct s626_enc_info *k)
-{
-       uint32_t value;
-
-       /* Latch counts and fetch LSW of latched counts value. */
-       value = s626_debi_read(dev, k->my_latch_lsw);
-
-       /* Fetch MSW of latched counts and combine with LSW. */
-       value |= ((uint32_t)s626_debi_read(dev, k->my_latch_lsw + 2) << 16);
-
-       /* Return latched counts. */
-       return value;
-}
-
 /*
  * Return/set a counter pair's latch trigger source.  0: On read
  * access, 1: A index latches A, 2: B index latches B, 3: A overflow
  * latches B.
  */
 static void s626_set_latch_source(struct comedi_device *dev,
-                                 const struct s626_enc_info *k, uint16_t value)
+                                 unsigned int chan, uint16_t value)
 {
-       s626_debi_replace(dev, k->my_crb,
+       s626_debi_replace(dev, S626_LP_CRB(chan),
                          ~(S626_CRBMSK_INTCTRL | S626_CRBMSK_LATCHSRC),
                          S626_SET_CRB_LATCHSRC(value));
 }
@@ -757,10 +688,10 @@ static void s626_set_latch_source(struct comedi_device *dev,
  * Write value into counter preload register.
  */
 static void s626_preload(struct comedi_device *dev,
-                        const struct s626_enc_info *k, uint32_t value)
+                        unsigned int chan, uint32_t value)
 {
-       s626_debi_write(dev, k->my_latch_lsw, value);
-       s626_debi_write(dev, k->my_latch_lsw + 2, value >> 16);
+       s626_debi_write(dev, S626_LP_CNTR(chan), value);
+       s626_debi_write(dev, S626_LP_CNTR(chan) + 2, value >> 16);
 }
 
 /* ******  PRIVATE COUNTER FUNCTIONS ****** */
@@ -768,28 +699,27 @@ static void s626_preload(struct comedi_device *dev,
 /*
  * Reset a counter's index and overflow event capture flags.
  */
-static void s626_reset_cap_flags_a(struct comedi_device *dev,
-                                  const struct s626_enc_info *k)
+static void s626_reset_cap_flags(struct comedi_device *dev,
+                                unsigned int chan)
 {
-       s626_debi_replace(dev, k->my_crb, ~S626_CRBMSK_INTCTRL,
-                         (S626_SET_CRB_INTRESETCMD(1) |
-                          S626_SET_CRB_INTRESET_A(1)));
-}
+       uint16_t set;
 
-static void s626_reset_cap_flags_b(struct comedi_device *dev,
-                                  const struct s626_enc_info *k)
-{
-       s626_debi_replace(dev, k->my_crb, ~S626_CRBMSK_INTCTRL,
-                         (S626_SET_CRB_INTRESETCMD(1) |
-                          S626_SET_CRB_INTRESET_B(1)));
+       set = S626_SET_CRB_INTRESETCMD(1);
+       if (chan < 3)
+               set |= S626_SET_CRB_INTRESET_A(1);
+       else
+               set |= S626_SET_CRB_INTRESET_B(1);
+
+       s626_debi_replace(dev, S626_LP_CRB(chan), ~S626_CRBMSK_INTCTRL, set);
 }
 
+#ifdef unused
 /*
  * Return counter setup in a format (COUNTER_SETUP) that is consistent
  * for both A and B counters.
  */
 static uint16_t s626_get_mode_a(struct comedi_device *dev,
-                               const struct s626_enc_info *k)
+                               unsigned int chan)
 {
        uint16_t cra;
        uint16_t crb;
@@ -797,8 +727,8 @@ static uint16_t s626_get_mode_a(struct comedi_device *dev,
        unsigned cntsrc, clkmult, clkpol, encmode;
 
        /* Fetch CRA and CRB register images. */
-       cra = s626_debi_read(dev, k->my_cra);
-       crb = s626_debi_read(dev, k->my_crb);
+       cra = s626_debi_read(dev, S626_LP_CRA(chan));
+       crb = s626_debi_read(dev, S626_LP_CRB(chan));
 
        /*
         * Populate the standardized counter setup bit fields.
@@ -844,7 +774,7 @@ static uint16_t s626_get_mode_a(struct comedi_device *dev,
 }
 
 static uint16_t s626_get_mode_b(struct comedi_device *dev,
-                               const struct s626_enc_info *k)
+                               unsigned int chan)
 {
        uint16_t cra;
        uint16_t crb;
@@ -852,8 +782,8 @@ static uint16_t s626_get_mode_b(struct comedi_device *dev,
        unsigned cntsrc, clkmult, clkpol, encmode;
 
        /* Fetch CRA and CRB register images. */
-       cra = s626_debi_read(dev, k->my_cra);
-       crb = s626_debi_read(dev, k->my_crb);
+       cra = s626_debi_read(dev, S626_LP_CRA(chan));
+       crb = s626_debi_read(dev, S626_LP_CRB(chan));
 
        /*
         * Populate the standardized counter setup bit fields.
@@ -903,6 +833,16 @@ static uint16_t s626_get_mode_b(struct comedi_device *dev,
        return setup;
 }
 
+static uint16_t s626_get_mode(struct comedi_device *dev,
+                             unsigned int chan)
+{
+       if (chan < 3)
+               return s626_get_mode_a(dev, chan);
+       else
+               return s626_get_mode_b(dev, chan);
+}
+#endif
+
 /*
  * Set the operating mode for the specified counter.  The setup
  * parameter is treated as a COUNTER_SETUP data type.  The following
@@ -910,7 +850,7 @@ static uint16_t s626_get_mode_b(struct comedi_device *dev,
  * ClkPol, ClkEnab, IndexSrc, IndexPol, LoadSrc.
  */
 static void s626_set_mode_a(struct comedi_device *dev,
-                           const struct s626_enc_info *k, uint16_t setup,
+                           unsigned int chan, uint16_t setup,
                            uint16_t disable_int_src)
 {
        struct s626_private *devpriv = dev->private;
@@ -974,20 +914,21 @@ static void s626_set_mode_a(struct comedi_device *dev,
         * enable mask to indicate the counter interrupt is disabled.
         */
        if (disable_int_src)
-               devpriv->counter_int_enabs &= ~k->my_event_bits[3];
+               devpriv->counter_int_enabs &= ~(S626_OVERMASK(chan) |
+                                               S626_INDXMASK(chan));
 
        /*
         * While retaining CounterB and LatchSrc configurations, program the
         * new counter operating mode.
         */
-       s626_debi_replace(dev, k->my_cra,
+       s626_debi_replace(dev, S626_LP_CRA(chan),
                          S626_CRAMSK_INDXSRC_B | S626_CRAMSK_CNTSRC_B, cra);
-       s626_debi_replace(dev, k->my_crb,
+       s626_debi_replace(dev, S626_LP_CRB(chan),
                          ~(S626_CRBMSK_INTCTRL | S626_CRBMSK_CLKENAB_A), crb);
 }
 
 static void s626_set_mode_b(struct comedi_device *dev,
-                           const struct s626_enc_info *k, uint16_t setup,
+                           unsigned int chan, uint16_t setup,
                            uint16_t disable_int_src)
 {
        struct s626_private *devpriv = dev->private;
@@ -1058,54 +999,66 @@ static void s626_set_mode_b(struct comedi_device *dev,
         * enable mask to indicate the counter interrupt is disabled.
         */
        if (disable_int_src)
-               devpriv->counter_int_enabs &= ~k->my_event_bits[3];
+               devpriv->counter_int_enabs &= ~(S626_OVERMASK(chan) |
+                                               S626_INDXMASK(chan));
 
        /*
         * While retaining CounterA and LatchSrc configurations, program the
         * new counter operating mode.
         */
-       s626_debi_replace(dev, k->my_cra,
+       s626_debi_replace(dev, S626_LP_CRA(chan),
                          ~(S626_CRAMSK_INDXSRC_B | S626_CRAMSK_CNTSRC_B), cra);
-       s626_debi_replace(dev, k->my_crb,
+       s626_debi_replace(dev, S626_LP_CRB(chan),
                          S626_CRBMSK_CLKENAB_A | S626_CRBMSK_LATCHSRC, crb);
 }
 
+static void s626_set_mode(struct comedi_device *dev,
+                         unsigned int chan,
+                         uint16_t setup, uint16_t disable_int_src)
+{
+       if (chan < 3)
+               s626_set_mode_a(dev, chan, setup, disable_int_src);
+       else
+               s626_set_mode_b(dev, chan, setup, disable_int_src);
+}
+
 /*
  * Return/set a counter's enable.  enab: 0=always enabled, 1=enabled by index.
  */
-static void s626_set_enable_a(struct comedi_device *dev,
-                             const struct s626_enc_info *k, uint16_t enab)
+static void s626_set_enable(struct comedi_device *dev,
+                           unsigned int chan, uint16_t enab)
 {
-       s626_debi_replace(dev, k->my_crb,
-                         ~(S626_CRBMSK_INTCTRL | S626_CRBMSK_CLKENAB_A),
-                         S626_SET_CRB_CLKENAB_A(enab));
-}
+       unsigned int mask = S626_CRBMSK_INTCTRL;
+       unsigned int set;
 
-static void s626_set_enable_b(struct comedi_device *dev,
-                             const struct s626_enc_info *k, uint16_t enab)
-{
-       s626_debi_replace(dev, k->my_crb,
-                         ~(S626_CRBMSK_INTCTRL | S626_CRBMSK_CLKENAB_B),
-                         S626_SET_CRB_CLKENAB_B(enab));
+       if (chan < 3) {
+               mask |= S626_CRBMSK_CLKENAB_A;
+               set = S626_SET_CRB_CLKENAB_A(enab);
+       } else {
+               mask |= S626_CRBMSK_CLKENAB_B;
+               set = S626_SET_CRB_CLKENAB_B(enab);
+       }
+       s626_debi_replace(dev, S626_LP_CRB(chan), ~mask, set);
 }
 
-static uint16_t s626_get_enable_a(struct comedi_device *dev,
-                                 const struct s626_enc_info *k)
+#ifdef unused
+static uint16_t s626_get_enable(struct comedi_device *dev,
+                               unsigned int chan)
 {
-       return S626_GET_CRB_CLKENAB_A(s626_debi_read(dev, k->my_crb));
-}
+       uint16_t crb = s626_debi_read(dev, S626_LP_CRB(chan));
 
-static uint16_t s626_get_enable_b(struct comedi_device *dev,
-                                 const struct s626_enc_info *k)
-{
-       return S626_GET_CRB_CLKENAB_B(s626_debi_read(dev, k->my_crb));
+       if (chan < 3)
+               return S626_GET_CRB_CLKENAB_A(crb);
+       else
+               return S626_GET_CRB_CLKENAB_B(crb);
 }
+#endif
 
 #ifdef unused
 static uint16_t s626_get_latch_source(struct comedi_device *dev,
-                                     const struct s626_enc_info *k)
+                                     unsigned int chan)
 {
-       return S626_GET_CRB_LATCHSRC(s626_debi_read(dev, k->my_crb));
+       return S626_GET_CRB_LATCHSRC(s626_debi_read(dev, S626_LP_CRB(chan)));
 }
 #endif
 
@@ -1114,295 +1067,244 @@ static uint16_t s626_get_latch_source(struct comedi_device *dev,
  * register into the counter.  0=ThisCntr_Index, 1=ThisCntr_Overflow,
  * 2=OverflowA (B counters only), 3=disabled.
  */
-static void s626_set_load_trig_a(struct comedi_device *dev,
-                                const struct s626_enc_info *k, uint16_t trig)
+static void s626_set_load_trig(struct comedi_device *dev,
+                              unsigned int chan, uint16_t trig)
 {
-       s626_debi_replace(dev, k->my_cra, ~S626_CRAMSK_LOADSRC_A,
-                         S626_SET_CRA_LOADSRC_A(trig));
-}
+       uint16_t reg;
+       uint16_t mask;
+       uint16_t set;
 
-static void s626_set_load_trig_b(struct comedi_device *dev,
-                                const struct s626_enc_info *k, uint16_t trig)
-{
-       s626_debi_replace(dev, k->my_crb,
-                         ~(S626_CRBMSK_LOADSRC_B | S626_CRBMSK_INTCTRL),
-                         S626_SET_CRB_LOADSRC_B(trig));
-}
-
-static uint16_t s626_get_load_trig_a(struct comedi_device *dev,
-                                    const struct s626_enc_info *k)
-{
-       return S626_GET_CRA_LOADSRC_A(s626_debi_read(dev, k->my_cra));
+       if (chan < 3) {
+               reg = S626_LP_CRA(chan);
+               mask = S626_CRAMSK_LOADSRC_A;
+               set = S626_SET_CRA_LOADSRC_A(trig);
+       } else {
+               reg = S626_LP_CRB(chan);
+               mask = S626_CRBMSK_LOADSRC_B | S626_CRBMSK_INTCTRL;
+               set = S626_SET_CRB_LOADSRC_B(trig);
+       }
+       s626_debi_replace(dev, reg, ~mask, set);
 }
 
-static uint16_t s626_get_load_trig_b(struct comedi_device *dev,
-                                    const struct s626_enc_info *k)
+#ifdef unused
+static uint16_t s626_get_load_trig(struct comedi_device *dev,
+                                  unsigned int chan)
 {
-       return S626_GET_CRB_LOADSRC_B(s626_debi_read(dev, k->my_crb));
+       if (chan < 3)
+               return S626_GET_CRA_LOADSRC_A(s626_debi_read(dev,
+                                                       S626_LP_CRA(chan)));
+       else
+               return S626_GET_CRB_LOADSRC_B(s626_debi_read(dev,
+                                                       S626_LP_CRB(chan)));
 }
+#endif
 
 /*
  * Return/set counter interrupt source and clear any captured
  * index/overflow events.  int_source: 0=Disabled, 1=OverflowOnly,
  * 2=IndexOnly, 3=IndexAndOverflow.
  */
-static void s626_set_int_src_a(struct comedi_device *dev,
-                              const struct s626_enc_info *k,
-                              uint16_t int_source)
-{
-       struct s626_private *devpriv = dev->private;
-
-       /* Reset any pending counter overflow or index captures. */
-       s626_debi_replace(dev, k->my_crb, ~S626_CRBMSK_INTCTRL,
-                         (S626_SET_CRB_INTRESETCMD(1) |
-                          S626_SET_CRB_INTRESET_A(1)));
-
-       /* Program counter interrupt source. */
-       s626_debi_replace(dev, k->my_cra, ~S626_CRAMSK_INTSRC_A,
-                         S626_SET_CRA_INTSRC_A(int_source));
-
-       /* Update MISC2 interrupt enable mask. */
-       devpriv->counter_int_enabs =
-           (devpriv->counter_int_enabs & ~k->my_event_bits[3]) |
-           k->my_event_bits[int_source];
-}
-
-static void s626_set_int_src_b(struct comedi_device *dev,
-                              const struct s626_enc_info *k,
-                              uint16_t int_source)
+static void s626_set_int_src(struct comedi_device *dev,
+                            unsigned int chan, uint16_t int_source)
 {
        struct s626_private *devpriv = dev->private;
-       uint16_t crb;
+       uint16_t cra_reg = S626_LP_CRA(chan);
+       uint16_t crb_reg = S626_LP_CRB(chan);
+
+       if (chan < 3) {
+               /* Reset any pending counter overflow or index captures */
+               s626_debi_replace(dev, crb_reg, ~S626_CRBMSK_INTCTRL,
+                                 S626_SET_CRB_INTRESETCMD(1) |
+                                 S626_SET_CRB_INTRESET_A(1));
+
+               /* Program counter interrupt source */
+               s626_debi_replace(dev, cra_reg, ~S626_CRAMSK_INTSRC_A,
+                                 S626_SET_CRA_INTSRC_A(int_source));
+       } else {
+               uint16_t crb;
 
-       /* Cache writeable CRB register image. */
-       crb = s626_debi_read(dev, k->my_crb) & ~S626_CRBMSK_INTCTRL;
+               /* Cache writeable CRB register image */
+               crb = s626_debi_read(dev, crb_reg);
+               crb &= ~S626_CRBMSK_INTCTRL;
 
-       /* Reset any pending counter overflow or index captures. */
-       s626_debi_write(dev, k->my_crb, (crb | S626_SET_CRB_INTRESETCMD(1) |
-                                        S626_SET_CRB_INTRESET_B(1)));
+               /* Reset any pending counter overflow or index captures */
+               s626_debi_write(dev, crb_reg,
+                               crb | S626_SET_CRB_INTRESETCMD(1) |
+                               S626_SET_CRB_INTRESET_B(1));
 
-       /* Program counter interrupt source. */
-       s626_debi_write(dev, k->my_crb, ((crb & ~S626_CRBMSK_INTSRC_B) |
-                                        S626_SET_CRB_INTSRC_B(int_source)));
+               /* Program counter interrupt source */
+               s626_debi_write(dev, crb_reg,
+                               (crb & ~S626_CRBMSK_INTSRC_B) |
+                               S626_SET_CRB_INTSRC_B(int_source));
+       }
 
        /* Update MISC2 interrupt enable mask. */
-       devpriv->counter_int_enabs =
-               (devpriv->counter_int_enabs & ~k->my_event_bits[3]) |
-               k->my_event_bits[int_source];
-}
-
-static uint16_t s626_get_int_src_a(struct comedi_device *dev,
-                                  const struct s626_enc_info *k)
-{
-       return S626_GET_CRA_INTSRC_A(s626_debi_read(dev, k->my_cra));
+       devpriv->counter_int_enabs &= ~(S626_OVERMASK(chan) |
+                                       S626_INDXMASK(chan));
+       switch (int_source) {
+       case 0:
+       default:
+               break;
+       case 1:
+               devpriv->counter_int_enabs |= S626_OVERMASK(chan);
+               break;
+       case 2:
+               devpriv->counter_int_enabs |= S626_INDXMASK(chan);
+               break;
+       case 3:
+               devpriv->counter_int_enabs |= (S626_OVERMASK(chan) |
+                                              S626_INDXMASK(chan));
+               break;
+       }
 }
 
-static uint16_t s626_get_int_src_b(struct comedi_device *dev,
-                                  const struct s626_enc_info *k)
+#ifdef unused
+static uint16_t s626_get_int_src(struct comedi_device *dev,
+                                unsigned int chan)
 {
-       return S626_GET_CRB_INTSRC_B(s626_debi_read(dev, k->my_crb));
+       if (chan < 3)
+               return S626_GET_CRA_INTSRC_A(s626_debi_read(dev,
+                                                       S626_LP_CRA(chan)));
+       else
+               return S626_GET_CRB_INTSRC_B(s626_debi_read(dev,
+                                                       S626_LP_CRB(chan)));
 }
+#endif
 
 #ifdef unused
 /*
  * Return/set the clock multiplier.
  */
 static void s626_set_clk_mult(struct comedi_device *dev,
-                             const struct s626_enc_info *k, uint16_t value)
+                             unsigned int chan, uint16_t value)
 {
-       k->set_mode(dev, k, ((k->get_mode(dev, k) & ~S626_STDMSK_CLKMULT) |
-                            S626_SET_STD_CLKMULT(value)), false);
+       uint16_t mode;
+
+       mode = s626_get_mode(dev, chan);
+       mode &= ~S626_STDMSK_CLKMULT;
+       mode |= S626_SET_STD_CLKMULT(value);
+
+       s626_set_mode(dev, chan, mode, false);
 }
 
 static uint16_t s626_get_clk_mult(struct comedi_device *dev,
-                                 const struct s626_enc_info *k)
+                                 unsigned int chan)
 {
-       return S626_GET_STD_CLKMULT(k->get_mode(dev, k));
+       return S626_GET_STD_CLKMULT(s626_get_mode(dev, chan));
 }
 
 /*
  * Return/set the clock polarity.
  */
 static void s626_set_clk_pol(struct comedi_device *dev,
-                            const struct s626_enc_info *k, uint16_t value)
+                            unsigned int chan, uint16_t value)
 {
-       k->set_mode(dev, k, ((k->get_mode(dev, k) & ~S626_STDMSK_CLKPOL) |
-                            S626_SET_STD_CLKPOL(value)), false);
+       uint16_t mode;
+
+       mode = s626_get_mode(dev, chan);
+       mode &= ~S626_STDMSK_CLKPOL;
+       mode |= S626_SET_STD_CLKPOL(value);
+
+       s626_set_mode(dev, chan, mode, false);
 }
 
 static uint16_t s626_get_clk_pol(struct comedi_device *dev,
-                                const struct s626_enc_info *k)
+                                unsigned int chan)
 {
-       return S626_GET_STD_CLKPOL(k->get_mode(dev, k));
+       return S626_GET_STD_CLKPOL(s626_get_mode(dev, chan));
 }
 
 /*
  * Return/set the encoder mode.
  */
 static void s626_set_enc_mode(struct comedi_device *dev,
-                             const struct s626_enc_info *k, uint16_t value)
+                             unsigned int chan, uint16_t value)
 {
-       k->set_mode(dev, k, ((k->get_mode(dev, k) & ~S626_STDMSK_ENCMODE) |
-                            S626_SET_STD_ENCMODE(value)), false);
+       uint16_t mode;
+
+       mode = s626_get_mode(dev, chan);
+       mode &= ~S626_STDMSK_ENCMODE;
+       mode |= S626_SET_STD_ENCMODE(value);
+
+       s626_set_mode(dev, chan, mode, false);
 }
 
 static uint16_t s626_get_enc_mode(struct comedi_device *dev,
-                                 const struct s626_enc_info *k)
+                                 unsigned int chan)
 {
-       return S626_GET_STD_ENCMODE(k->get_mode(dev, k));
+       return S626_GET_STD_ENCMODE(s626_get_mode(dev, chan));
 }
 
 /*
  * Return/set the index polarity.
  */
 static void s626_set_index_pol(struct comedi_device *dev,
-                              const struct s626_enc_info *k, uint16_t value)
+                              unsigned int chan, uint16_t value)
 {
-       k->set_mode(dev, k, ((k->get_mode(dev, k) & ~S626_STDMSK_INDXPOL) |
-                            S626_SET_STD_INDXPOL(value != 0)), false);
+       uint16_t mode;
+
+       mode = s626_get_mode(dev, chan);
+       mode &= ~S626_STDMSK_INDXPOL;
+       mode |= S626_SET_STD_INDXPOL(value != 0);
+
+       s626_set_mode(dev, chan, mode, false);
 }
 
 static uint16_t s626_get_index_pol(struct comedi_device *dev,
-                                  const struct s626_enc_info *k)
+                                  unsigned int chan)
 {
-       return S626_GET_STD_INDXPOL(k->get_mode(dev, k));
+       return S626_GET_STD_INDXPOL(s626_get_mode(dev, chan));
 }
 
 /*
  * Return/set the index source.
  */
 static void s626_set_index_src(struct comedi_device *dev,
-                              const struct s626_enc_info *k, uint16_t value)
+                              unsigned int chan, uint16_t value)
 {
-       k->set_mode(dev, k, ((k->get_mode(dev, k) & ~S626_STDMSK_INDXSRC) |
-                            S626_SET_STD_INDXSRC(value != 0)), false);
+       uint16_t mode;
+
+       mode = s626_get_mode(dev, chan);
+       mode &= ~S626_STDMSK_INDXSRC;
+       mode |= S626_SET_STD_INDXSRC(value != 0);
+
+       s626_set_mode(dev, chan, mode, false);
 }
 
 static uint16_t s626_get_index_src(struct comedi_device *dev,
-                                  const struct s626_enc_info *k)
+                                  unsigned int chan)
 {
-       return S626_GET_STD_INDXSRC(k->get_mode(dev, k));
+       return S626_GET_STD_INDXSRC(s626_get_mode(dev, chan));
 }
 #endif
 
 /*
  * Generate an index pulse.
  */
-static void s626_pulse_index_a(struct comedi_device *dev,
-                              const struct s626_enc_info *k)
+static void s626_pulse_index(struct comedi_device *dev,
+                            unsigned int chan)
 {
-       uint16_t cra;
+       if (chan < 3) {
+               uint16_t cra;
 
-       cra = s626_debi_read(dev, k->my_cra);
-       /* Pulse index. */
-       s626_debi_write(dev, k->my_cra, (cra ^ S626_CRAMSK_INDXPOL_A));
-       s626_debi_write(dev, k->my_cra, cra);
-}
+               cra = s626_debi_read(dev, S626_LP_CRA(chan));
 
-static void s626_pulse_index_b(struct comedi_device *dev,
-                              const struct s626_enc_info *k)
-{
-       uint16_t crb;
+               /* Pulse index */
+               s626_debi_write(dev, S626_LP_CRA(chan),
+                               (cra ^ S626_CRAMSK_INDXPOL_A));
+               s626_debi_write(dev, S626_LP_CRA(chan), cra);
+       } else {
+               uint16_t crb;
 
-       crb = s626_debi_read(dev, k->my_crb) & ~S626_CRBMSK_INTCTRL;
-       /* Pulse index. */
-       s626_debi_write(dev, k->my_crb, (crb ^ S626_CRBMSK_INDXPOL_B));
-       s626_debi_write(dev, k->my_crb, crb);
-}
+               crb = s626_debi_read(dev, S626_LP_CRB(chan));
+               crb &= ~S626_CRBMSK_INTCTRL;
 
-static const struct s626_enc_info s626_enc_chan_info[] = {
-       {
-               .get_enable             = s626_get_enable_a,
-               .get_int_src            = s626_get_int_src_a,
-               .get_load_trig          = s626_get_load_trig_a,
-               .get_mode               = s626_get_mode_a,
-               .pulse_index            = s626_pulse_index_a,
-               .set_enable             = s626_set_enable_a,
-               .set_int_src            = s626_set_int_src_a,
-               .set_load_trig          = s626_set_load_trig_a,
-               .set_mode               = s626_set_mode_a,
-               .reset_cap_flags        = s626_reset_cap_flags_a,
-               .my_cra                 = S626_LP_CR0A,
-               .my_crb                 = S626_LP_CR0B,
-               .my_latch_lsw           = S626_LP_CNTR0ALSW,
-               .my_event_bits          = S626_EVBITS(0),
-       }, {
-               .get_enable             = s626_get_enable_a,
-               .get_int_src            = s626_get_int_src_a,
-               .get_load_trig          = s626_get_load_trig_a,
-               .get_mode               = s626_get_mode_a,
-               .pulse_index            = s626_pulse_index_a,
-               .set_enable             = s626_set_enable_a,
-               .set_int_src            = s626_set_int_src_a,
-               .set_load_trig          = s626_set_load_trig_a,
-               .set_mode               = s626_set_mode_a,
-               .reset_cap_flags        = s626_reset_cap_flags_a,
-               .my_cra                 = S626_LP_CR1A,
-               .my_crb                 = S626_LP_CR1B,
-               .my_latch_lsw           = S626_LP_CNTR1ALSW,
-               .my_event_bits          = S626_EVBITS(1),
-       }, {
-               .get_enable             = s626_get_enable_a,
-               .get_int_src            = s626_get_int_src_a,
-               .get_load_trig          = s626_get_load_trig_a,
-               .get_mode               = s626_get_mode_a,
-               .pulse_index            = s626_pulse_index_a,
-               .set_enable             = s626_set_enable_a,
-               .set_int_src            = s626_set_int_src_a,
-               .set_load_trig          = s626_set_load_trig_a,
-               .set_mode               = s626_set_mode_a,
-               .reset_cap_flags        = s626_reset_cap_flags_a,
-               .my_cra                 = S626_LP_CR2A,
-               .my_crb                 = S626_LP_CR2B,
-               .my_latch_lsw           = S626_LP_CNTR2ALSW,
-               .my_event_bits          = S626_EVBITS(2),
-       }, {
-               .get_enable             = s626_get_enable_b,
-               .get_int_src            = s626_get_int_src_b,
-               .get_load_trig          = s626_get_load_trig_b,
-               .get_mode               = s626_get_mode_b,
-               .pulse_index            = s626_pulse_index_b,
-               .set_enable             = s626_set_enable_b,
-               .set_int_src            = s626_set_int_src_b,
-               .set_load_trig          = s626_set_load_trig_b,
-               .set_mode               = s626_set_mode_b,
-               .reset_cap_flags        = s626_reset_cap_flags_b,
-               .my_cra                 = S626_LP_CR0A,
-               .my_crb                 = S626_LP_CR0B,
-               .my_latch_lsw           = S626_LP_CNTR0BLSW,
-               .my_event_bits          = S626_EVBITS(3),
-       }, {
-               .get_enable             = s626_get_enable_b,
-               .get_int_src            = s626_get_int_src_b,
-               .get_load_trig          = s626_get_load_trig_b,
-               .get_mode               = s626_get_mode_b,
-               .pulse_index            = s626_pulse_index_b,
-               .set_enable             = s626_set_enable_b,
-               .set_int_src            = s626_set_int_src_b,
-               .set_load_trig          = s626_set_load_trig_b,
-               .set_mode               = s626_set_mode_b,
-               .reset_cap_flags        = s626_reset_cap_flags_b,
-               .my_cra                 = S626_LP_CR1A,
-               .my_crb                 = S626_LP_CR1B,
-               .my_latch_lsw           = S626_LP_CNTR1BLSW,
-               .my_event_bits          = S626_EVBITS(4),
-       }, {
-               .get_enable             = s626_get_enable_b,
-               .get_int_src            = s626_get_int_src_b,
-               .get_load_trig          = s626_get_load_trig_b,
-               .get_mode               = s626_get_mode_b,
-               .pulse_index            = s626_pulse_index_b,
-               .set_enable             = s626_set_enable_b,
-               .set_int_src            = s626_set_int_src_b,
-               .set_load_trig          = s626_set_load_trig_b,
-               .set_mode               = s626_set_mode_b,
-               .reset_cap_flags        = s626_reset_cap_flags_b,
-               .my_cra                 = S626_LP_CR2A,
-               .my_crb                 = S626_LP_CR2B,
-               .my_latch_lsw           = S626_LP_CNTR2BLSW,
-               .my_event_bits          = S626_EVBITS(5),
-       },
-};
+               /* Pulse index */
+               s626_debi_write(dev, S626_LP_CRB(chan),
+                               (crb ^ S626_CRBMSK_INDXPOL_B));
+               s626_debi_write(dev, S626_LP_CRB(chan), crb);
+       }
+}
 
 static unsigned int s626_ai_reg_to_uint(unsigned int data)
 {
@@ -1490,11 +1392,8 @@ static void s626_handle_dio_interrupt(struct comedi_device *dev,
                        }
 
                        if (cmd->convert_src == TRIG_TIMER) {
-                               const struct s626_enc_info *k =
-                                       &s626_enc_chan_info[5];
-
                                devpriv->ai_convert_count = cmd->chanlist_len;
-                               k->set_enable(dev, k, S626_CLKENAB_ALWAYS);
+                               s626_set_enable(dev, 5, S626_CLKENAB_ALWAYS);
                        }
                }
                if ((irqbit >> (cmd->convert_arg - (16 * group))) == 1 &&
@@ -1533,7 +1432,6 @@ static void s626_check_counter_interrupts(struct comedi_device *dev)
        struct comedi_subdevice *s = dev->read_subdev;
        struct comedi_async *async = s->async;
        struct comedi_cmd *cmd = &async->cmd;
-       const struct s626_enc_info *k;
        uint16_t irqbit;
 
        /* read interrupt type */
@@ -1541,39 +1439,29 @@ static void s626_check_counter_interrupts(struct comedi_device *dev)
 
        /* check interrupt on counters */
        if (irqbit & S626_IRQ_COINT1A) {
-               k = &s626_enc_chan_info[0];
-
                /* clear interrupt capture flag */
-               k->reset_cap_flags(dev, k);
+               s626_reset_cap_flags(dev, 0);
        }
        if (irqbit & S626_IRQ_COINT2A) {
-               k = &s626_enc_chan_info[1];
-
                /* clear interrupt capture flag */
-               k->reset_cap_flags(dev, k);
+               s626_reset_cap_flags(dev, 1);
        }
        if (irqbit & S626_IRQ_COINT3A) {
-               k = &s626_enc_chan_info[2];
-
                /* clear interrupt capture flag */
-               k->reset_cap_flags(dev, k);
+               s626_reset_cap_flags(dev, 2);
        }
        if (irqbit & S626_IRQ_COINT1B) {
-               k = &s626_enc_chan_info[3];
-
                /* clear interrupt capture flag */
-               k->reset_cap_flags(dev, k);
+               s626_reset_cap_flags(dev, 3);
        }
        if (irqbit & S626_IRQ_COINT2B) {
-               k = &s626_enc_chan_info[4];
-
                /* clear interrupt capture flag */
-               k->reset_cap_flags(dev, k);
+               s626_reset_cap_flags(dev, 4);
 
                if (devpriv->ai_convert_count > 0) {
                        devpriv->ai_convert_count--;
                        if (devpriv->ai_convert_count == 0)
-                               k->set_enable(dev, k, S626_CLKENAB_INDEX);
+                               s626_set_enable(dev, 4, S626_CLKENAB_INDEX);
 
                        if (cmd->convert_src == TRIG_TIMER) {
                                /* Trigger ADC scan loop start */
@@ -1583,10 +1471,8 @@ static void s626_check_counter_interrupts(struct comedi_device *dev)
                }
        }
        if (irqbit & S626_IRQ_COINT3B) {
-               k = &s626_enc_chan_info[5];
-
                /* clear interrupt capture flag */
-               k->reset_cap_flags(dev, k);
+               s626_reset_cap_flags(dev, 5);
 
                if (cmd->scan_begin_src == TRIG_TIMER) {
                        /* Trigger ADC scan loop start */
@@ -1594,9 +1480,8 @@ static void s626_check_counter_interrupts(struct comedi_device *dev)
                }
 
                if (cmd->convert_src == TRIG_TIMER) {
-                       k = &s626_enc_chan_info[4];
                        devpriv->ai_convert_count = cmd->chanlist_len;
-                       k->set_enable(dev, k, S626_CLKENAB_ALWAYS);
+                       s626_set_enable(dev, 4, S626_CLKENAB_ALWAYS);
                }
        }
 }
@@ -2122,7 +2007,7 @@ static int s626_ns_to_timer(unsigned int *nanosec, int round_mode)
 }
 
 static void s626_timer_load(struct comedi_device *dev,
-                           const struct s626_enc_info *k, int tick)
+                           unsigned int chan, int tick)
 {
        uint16_t setup =
                /* Preload upon index. */
@@ -2140,26 +2025,26 @@ static void s626_timer_load(struct comedi_device *dev,
        uint16_t value_latchsrc = S626_LATCHSRC_A_INDXA;
        /* uint16_t enab = S626_CLKENAB_ALWAYS; */
 
-       k->set_mode(dev, k, setup, false);
+       s626_set_mode(dev, chan, setup, false);
 
        /* Set the preload register */
-       s626_preload(dev, k, tick);
+       s626_preload(dev, chan, tick);
 
        /*
         * Software index pulse forces the preload register to load
         * into the counter
         */
-       k->set_load_trig(dev, k, 0);
-       k->pulse_index(dev, k);
+       s626_set_load_trig(dev, chan, 0);
+       s626_pulse_index(dev, chan);
 
        /* set reload on counter overflow */
-       k->set_load_trig(dev, k, 1);
+       s626_set_load_trig(dev, chan, 1);
 
        /* set interrupt on overflow */
-       k->set_int_src(dev, k, S626_INTSRC_OVER);
+       s626_set_int_src(dev, chan, S626_INTSRC_OVER);
 
-       s626_set_latch_source(dev, k, value_latchsrc);
-       /* k->set_enable(dev, k, (uint16_t)(enab != 0)); */
+       s626_set_latch_source(dev, chan, value_latchsrc);
+       /* s626_set_enable(dev, chan, (uint16_t)(enab != 0)); */
 }
 
 /* TO COMPLETE  */
@@ -2168,7 +2053,6 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
        struct s626_private *devpriv = dev->private;
        uint8_t ppl[16];
        struct comedi_cmd *cmd = &s->async->cmd;
-       const struct s626_enc_info *k;
        int tick;
 
        if (devpriv->ai_cmd_running) {
@@ -2205,13 +2089,12 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                 * set a counter to generate adc trigger at scan_begin_arg
                 * interval
                 */
-               k = &s626_enc_chan_info[5];
                tick = s626_ns_to_timer(&cmd->scan_begin_arg,
                                        cmd->flags & TRIG_ROUND_MASK);
 
                /* load timer value and enable interrupt */
-               s626_timer_load(dev, k, tick);
-               k->set_enable(dev, k, S626_CLKENAB_ALWAYS);
+               s626_timer_load(dev, 5, tick);
+               s626_set_enable(dev, 5, S626_CLKENAB_ALWAYS);
                break;
        case TRIG_EXT:
                /* set the digital line and interrupt for scan trigger */
@@ -2228,13 +2111,12 @@ static int s626_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
                 * set a counter to generate adc trigger at convert_arg
                 * interval
                 */
-               k = &s626_enc_chan_info[4];
                tick = s626_ns_to_timer(&cmd->convert_arg,
                                        cmd->flags & TRIG_ROUND_MASK);
 
                /* load timer value and enable interrupt */
-               s626_timer_load(dev, k, tick);
-               k->set_enable(dev, k, S626_CLKENAB_INDEX);
+               s626_timer_load(dev, 4, tick);
+               s626_set_enable(dev, 4, S626_CLKENAB_INDEX);
                break;
        case TRIG_EXT:
                /* set the digital line and interrupt for convert trigger */
@@ -2516,6 +2398,7 @@ static int s626_enc_insn_config(struct comedi_device *dev,
                                struct comedi_subdevice *s,
                                struct comedi_insn *insn, unsigned int *data)
 {
+       unsigned int chan = CR_CHAN(insn->chanspec);
        uint16_t setup =
                /* Preload upon index. */
                S626_SET_STD_LOADSRC(S626_LOADSRC_INDX) |
@@ -2533,51 +2416,58 @@ static int s626_enc_insn_config(struct comedi_device *dev,
        /* uint32_t Preloadvalue;              //Counter initial value */
        uint16_t value_latchsrc = S626_LATCHSRC_AB_READ;
        uint16_t enab = S626_CLKENAB_ALWAYS;
-       const struct s626_enc_info *k =
-               &s626_enc_chan_info[CR_CHAN(insn->chanspec)];
 
        /* (data==NULL) ? (Preloadvalue=0) : (Preloadvalue=data[0]); */
 
-       k->set_mode(dev, k, setup, true);
-       s626_preload(dev, k, data[0]);
-       k->pulse_index(dev, k);
-       s626_set_latch_source(dev, k, value_latchsrc);
-       k->set_enable(dev, k, (enab != 0));
+       s626_set_mode(dev, chan, setup, true);
+       s626_preload(dev, chan, data[0]);
+       s626_pulse_index(dev, chan);
+       s626_set_latch_source(dev, chan, value_latchsrc);
+       s626_set_enable(dev, chan, (enab != 0));
 
        return insn->n;
 }
 
 static int s626_enc_insn_read(struct comedi_device *dev,
                              struct comedi_subdevice *s,
-                             struct comedi_insn *insn, unsigned int *data)
+                             struct comedi_insn *insn,
+                             unsigned int *data)
 {
-       int n;
-       const struct s626_enc_info *k =
-               &s626_enc_chan_info[CR_CHAN(insn->chanspec)];
+       unsigned int chan = CR_CHAN(insn->chanspec);
+       uint16_t cntr_latch_reg = S626_LP_CNTR(chan);
+       int i;
 
-       for (n = 0; n < insn->n; n++)
-               data[n] = s626_read_latch(dev, k);
+       for (i = 0; i < insn->n; i++) {
+               unsigned int val;
 
-       return n;
+               /*
+                * Read the counter's output latch LSW/MSW.
+                * Latches on LSW read.
+                */
+               val = s626_debi_read(dev, cntr_latch_reg);
+               val |= (s626_debi_read(dev, cntr_latch_reg + 2) << 16);
+               data[i] = val;
+       }
+
+       return insn->n;
 }
 
 static int s626_enc_insn_write(struct comedi_device *dev,
                               struct comedi_subdevice *s,
                               struct comedi_insn *insn, unsigned int *data)
 {
-       const struct s626_enc_info *k =
-               &s626_enc_chan_info[CR_CHAN(insn->chanspec)];
+       unsigned int chan = CR_CHAN(insn->chanspec);
 
        /* Set the preload register */
-       s626_preload(dev, k, data[0]);
+       s626_preload(dev, chan, data[0]);
 
        /*
         * Software index pulse forces the preload register to load
         * into the counter
         */
-       k->set_load_trig(dev, k, 0);
-       k->pulse_index(dev, k);
-       k->set_load_trig(dev, k, 2);
+       s626_set_load_trig(dev, chan, 0);
+       s626_pulse_index(dev, chan);
+       s626_set_load_trig(dev, chan, 2);
 
        return 1;
 }
@@ -2612,7 +2502,6 @@ static void s626_close_dma_b(struct comedi_device *dev,
 static void s626_counters_init(struct comedi_device *dev)
 {
        int chan;
-       const struct s626_enc_info *k;
        uint16_t setup =
                /* Preload upon index. */
                S626_SET_STD_LOADSRC(S626_LOADSRC_INDX) |
@@ -2631,11 +2520,10 @@ static void s626_counters_init(struct comedi_device *dev)
         * Disable all counter interrupts and clear any captured counter events.
         */
        for (chan = 0; chan < S626_ENCODER_CHANNELS; chan++) {
-               k = &s626_enc_chan_info[chan];
-               k->set_mode(dev, k, setup, true);
-               k->set_int_src(dev, k, 0);
-               k->reset_cap_flags(dev, k);
-               k->set_enable(dev, k, S626_CLKENAB_ALWAYS);
+               s626_set_mode(dev, chan, setup, true);
+               s626_set_int_src(dev, chan, 0);
+               s626_reset_cap_flags(dev, chan);
+               s626_set_enable(dev, chan, S626_CLKENAB_ALWAYS);
        }
 }
 
index 33b72739c1cbdf4c6887971fa12b1408ff8d247d..b83424e7507badb6336ccd89debf0d855b231340 100644 (file)
 #define S626_LP_RDEDGSEL(x)    (0x004c + (x) * 0x10)   /* R: edge selection */
 #define S626_LP_RDCAPSEL(x)    (0x004e + (x) * 0x10)   /* R: capture enable */
 
-/* Counter Registers (read/write): */
-#define S626_LP_CR0A           0x0000  /* 0A setup register. */
-#define S626_LP_CR0B           0x0002  /* 0B setup register. */
-#define S626_LP_CR1A           0x0004  /* 1A setup register. */
-#define S626_LP_CR1B           0x0006  /* 1B setup register. */
-#define S626_LP_CR2A           0x0008  /* 2A setup register. */
-#define S626_LP_CR2B           0x000A  /* 2B setup register. */
-
-/* Counter PreLoad (write) and Latch (read) Registers: */
-#define        S626_LP_CNTR0ALSW       0x000C  /* 0A lsw. */
-#define        S626_LP_CNTR0AMSW       0x000E  /* 0A msw. */
-#define        S626_LP_CNTR0BLSW       0x0010  /* 0B lsw. */
-#define        S626_LP_CNTR0BMSW       0x0012  /* 0B msw. */
-#define        S626_LP_CNTR1ALSW       0x0014  /* 1A lsw. */
-#define        S626_LP_CNTR1AMSW       0x0016  /* 1A msw. */
-#define        S626_LP_CNTR1BLSW       0x0018  /* 1B lsw. */
-#define        S626_LP_CNTR1BMSW       0x001A  /* 1B msw. */
-#define        S626_LP_CNTR2ALSW       0x001C  /* 2A lsw. */
-#define        S626_LP_CNTR2AMSW       0x001E  /* 2A msw. */
-#define        S626_LP_CNTR2BLSW       0x0020  /* 2B lsw. */
-#define        S626_LP_CNTR2BMSW       0x0022  /* 2B msw. */
+/* Counter registers (read/write): 0A 1A 2A 0B 1B 2B */
+#define S626_LP_CRA(x)         (0x0000 + (((x) % 3) * 0x4))
+#define S626_LP_CRB(x)         (0x0002 + (((x) % 3) * 0x4))
+
+/* Counter PreLoad (write) and Latch (read) Registers: 0A 1A 2A 0B 1B 2B */
+#define S626_LP_CNTR(x)                (0x000c  + (((x) < 3) ? 0x0 : 0x4) + \
+                                          (((x) % 3) * 0x8))
 
 /* Miscellaneous Registers (read/write): */
 #define S626_LP_MISC1          0x0088  /* Read/write Misc1. */
index ca4c2c67dd880d4253909850a7811badcc24b7b9..edf9ff2ea25b32020161b92dc8f1df4edd4d217b 100644 (file)
@@ -147,12 +147,11 @@ static int cp_tm1217_read(struct cp_tm1217_device *ts,
        msleep(WAIT_FOR_RESPONSE);
        for (i = 0; i < MAX_RETRIES; i++) {
                retval = i2c_master_recv(ts->client, &req[1], size);
-               if (retval == size) {
+               if (retval == size)
                        break;
-               } else {
-                       msleep(INCREMENTAL_DELAY);
-                       dev_dbg(ts->dev, "cp_tm1217: Retry count is %d\n", i);
-               }
+
+               msleep(INCREMENTAL_DELAY);
+               dev_dbg(ts->dev, "cp_tm1217: Retry count is %d\n", i);
        }
        if (retval != size)
                dev_err(ts->dev, "cp_tm1217: Read from device failed\n");
@@ -288,11 +287,11 @@ static irqreturn_t cp_tm1217_sample_thread(int irq, void *handle)
        if (ts->thread_running == 1) {
                mutex_unlock(&ts->thread_mutex);
                return IRQ_HANDLED;
-       } else {
-               ts->thread_running = 1;
-               mutex_unlock(&ts->thread_mutex);
        }
 
+       ts->thread_running = 1;
+       mutex_unlock(&ts->thread_mutex);
+
        /* Mask the interrupts */
        retval = cp_tm1217_mask_interrupt(ts);
 
diff --git a/drivers/staging/crystalhd/Kconfig b/drivers/staging/crystalhd/Kconfig
deleted file mode 100644 (file)
index 56b414b..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-config CRYSTALHD
-       tristate "Broadcom Crystal HD video decoder support"
-       depends on PCI
-       default n
-       help
-         Support for the Broadcom Crystal HD video decoder chipset
diff --git a/drivers/staging/crystalhd/Makefile b/drivers/staging/crystalhd/Makefile
deleted file mode 100644 (file)
index c31657a..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-obj-$(CONFIG_CRYSTALHD)        += crystalhd.o
-
-crystalhd-y            := crystalhd_cmds.o     \
-                          crystalhd_hw.o       \
-                          crystalhd_lnx.o      \
-                          crystalhd_misc.o
diff --git a/drivers/staging/crystalhd/TODO b/drivers/staging/crystalhd/TODO
deleted file mode 100644 (file)
index daca2d4..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-- Testing
-- Cleanup return codes
-- Cleanup typedefs
-- Allocate an Accelerator device class specific Major number,
-  since we don't have any other open sourced accelerators, it is the only
-  one in that category for now.
-  A somewhat similar device is the DXR2/3
-
-Please send patches to:
-Greg Kroah-Hartman <greg@kroah.com>
-Naren Sankar <nsankar@broadcom.com>
-Jarod Wilson <jarod@wilsonet.com>
-Scott Davilla <davilla@4pi.com>
-Manu Abraham <abraham.manu@gmail.com>
-
diff --git a/drivers/staging/crystalhd/bc_dts_defs.h b/drivers/staging/crystalhd/bc_dts_defs.h
deleted file mode 100644 (file)
index 647e116..0000000
+++ /dev/null
@@ -1,572 +0,0 @@
-/********************************************************************
- * Copyright(c) 2006-2009 Broadcom Corporation.
- *
- *  Name: bc_dts_defs.h
- *
- *  Description: Common definitions for all components. Only types
- *              is allowed to be included from this file.
- *
- *  AU
- *
- *  HISTORY:
- *
- ********************************************************************
- * This header is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 2.1 of the License.
- *
- * This header is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License
- * along with this header.  If not, see <http://www.gnu.org/licenses/>.
- *******************************************************************/
-
-#ifndef _BC_DTS_DEFS_H_
-#define _BC_DTS_DEFS_H_
-
-#include <linux/types.h>
-
-/* BIT Mask */
-#define BC_BIT(_x)             (1 << (_x))
-
-enum BC_STATUS {
-       BC_STS_SUCCESS          = 0,
-       BC_STS_INV_ARG          = 1,
-       BC_STS_BUSY             = 2,
-       BC_STS_NOT_IMPL         = 3,
-       BC_STS_PGM_QUIT         = 4,
-       BC_STS_NO_ACCESS        = 5,
-       BC_STS_INSUFF_RES       = 6,
-       BC_STS_IO_ERROR         = 7,
-       BC_STS_NO_DATA          = 8,
-       BC_STS_VER_MISMATCH     = 9,
-       BC_STS_TIMEOUT          = 10,
-       BC_STS_FW_CMD_ERR       = 11,
-       BC_STS_DEC_NOT_OPEN     = 12,
-       BC_STS_ERR_USAGE        = 13,
-       BC_STS_IO_USER_ABORT    = 14,
-       BC_STS_IO_XFR_ERROR     = 15,
-       BC_STS_DEC_NOT_STARTED  = 16,
-       BC_STS_FWHEX_NOT_FOUND  = 17,
-       BC_STS_FMT_CHANGE       = 18,
-       BC_STS_HIF_ACCESS       = 19,
-       BC_STS_CMD_CANCELLED    = 20,
-       BC_STS_FW_AUTH_FAILED   = 21,
-       BC_STS_BOOTLOADER_FAILED = 22,
-       BC_STS_CERT_VERIFY_ERROR = 23,
-       BC_STS_DEC_EXIST_OPEN   = 24,
-       BC_STS_PENDING          = 25,
-       BC_STS_CLK_NOCHG        = 26,
-
-       /* Must be the last one.*/
-       BC_STS_ERROR            = -1
-};
-
-/*------------------------------------------------------*
- *    Registry Key Definitions                         *
- *------------------------------------------------------*/
-#define BC_REG_KEY_MAIN_PATH   "Software\\Broadcom\\MediaPC\\70010"
-#define BC_REG_KEY_FWPATH              "FirmwareFilePath"
-#define BC_REG_KEY_SEC_OPT             "DbgOptions"
-
-/*
- * Options:
- *
- *  b[5] = Enable RSA KEY in EEPROM Support
- *  b[6] = Enable Old PIB scheme. (0 = Use PIB with video scheme)
- *
- *  b[12] = Enable send message to NotifyIcon
- *
- */
-
-enum BC_SW_OPTIONS {
-       BC_OPT_DOSER_OUT_ENCRYPT        = BC_BIT(3),
-       BC_OPT_LINK_OUT_ENCRYPT         = BC_BIT(29),
-};
-
-struct BC_REG_CONFIG {
-       uint32_t                DbgOptions;
-};
-
-#if defined(__KERNEL__) || defined(__LINUX_USER__)
-#else
-/* Align data structures */
-#define ALIGN(x)       __declspec(align(x))
-#endif
-
-/* mode
- * b[0]..b[7]  = _DtsDeviceOpenMode
- * b[8]                =  Load new FW
- * b[9]                =  Load file play back FW
- * b[10]       =  Disk format (0 for HD DVD and 1 for BLU ray)
- * b[11]-b[15] =  default output resolution
- * b[16]       =  Skip TX CPB Buffer Check
- * b[17]       =  Adaptive Output Encrypt/Scramble Scheme
- * b[18]-b[31] =  reserved for future use
- */
-
-/* To allow multiple apps to open the device. */
-enum DtsDeviceOpenMode {
-       DTS_PLAYBACK_MODE = 0,
-       DTS_DIAG_MODE,
-       DTS_MONITOR_MODE,
-       DTS_HWINIT_MODE
-};
-
-/* To enable the filter to selectively enable/disable fixes or erratas */
-enum DtsDeviceFixMode {
-       DTS_LOAD_NEW_FW         = BC_BIT(8),
-       DTS_LOAD_FILE_PLAY_FW   = BC_BIT(9),
-       DTS_DISK_FMT_BD         = BC_BIT(10),
-       /* b[11]-b[15] : Default output resolution */
-       DTS_SKIP_TX_CHK_CPB     = BC_BIT(16),
-       DTS_ADAPTIVE_OUTPUT_PER = BC_BIT(17),
-       DTS_INTELLIMAP          = BC_BIT(18),
-       /* b[19]-b[21] : select clock frequency */
-       DTS_PLAYBACK_DROP_RPT_MODE = BC_BIT(22)
-};
-
-#define DTS_DFLT_RESOLUTION(x) (x<<11)
-
-#define DTS_DFLT_CLOCK(x) (x<<19)
-
-/* F/W File Version corresponding to S/W Releases */
-enum FW_FILE_VER {
-       /* S/W release: 02.04.02        F/W release 2.12.2.0 */
-       BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0))
-};
-
-/*------------------------------------------------------*
- *    Stream Types for DtsOpenDecoder()                        *
- *------------------------------------------------------*/
-enum DtsOpenDecStreamTypes {
-       BC_STREAM_TYPE_ES               = 0,
-       BC_STREAM_TYPE_PES              = 1,
-       BC_STREAM_TYPE_TS               = 2,
-       BC_STREAM_TYPE_ES_TSTAMP        = 6,
-};
-
-/*------------------------------------------------------*
- *    Video Algorithms for DtsSetVideoParams()         *
- *------------------------------------------------------*/
-enum DtsSetVideoParamsAlgo {
-       BC_VID_ALGO_H264                = 0,
-       BC_VID_ALGO_MPEG2               = 1,
-       BC_VID_ALGO_VC1                 = 4,
-       BC_VID_ALGO_VC1MP               = 7,
-};
-
-/*------------------------------------------------------*
- *    MPEG Extension to the PPB                                *
- *------------------------------------------------------*/
-#define BC_MPEG_VALID_PANSCAN          (1)
-
-struct BC_PIB_EXT_MPEG {
-       uint32_t        valid;
-       /* Always valid,  defaults to picture size if no
-        * sequence display extension in the stream. */
-       uint32_t        display_horizontal_size;
-       uint32_t        display_vertical_size;
-
-       /* MPEG_VALID_PANSCAN
-        * Offsets are a copy values from the MPEG stream. */
-       uint32_t        offset_count;
-       int32_t         horizontal_offset[3];
-       int32_t         vertical_offset[3];
-};
-
-/*------------------------------------------------------*
- *    H.264 Extension to the PPB                       *
- *------------------------------------------------------*/
-/* Bit definitions for 'other.h264.valid' field */
-#define H264_VALID_PANSCAN             (1)
-#define H264_VALID_SPS_CROP            (2)
-#define H264_VALID_VUI                 (4)
-
-struct BC_PIB_EXT_H264 {
-       /* 'valid' specifies which fields (or sets of
-        * fields) below are valid.  If the corresponding
-        * bit in 'valid' is NOT set then that field(s)
-        * is (are) not initialized. */
-       uint32_t        valid;
-
-       /* H264_VALID_PANSCAN */
-       uint32_t        pan_scan_count;
-       int32_t         pan_scan_left[3];
-       int32_t         pan_scan_right[3];
-       int32_t         pan_scan_top[3];
-       int32_t         pan_scan_bottom[3];
-
-       /* H264_VALID_SPS_CROP */
-       int32_t         sps_crop_left;
-       int32_t         sps_crop_right;
-       int32_t         sps_crop_top;
-       int32_t         sps_crop_bottom;
-
-       /* H264_VALID_VUI */
-       uint32_t        chroma_top;
-       uint32_t        chroma_bottom;
-};
-
-/*------------------------------------------------------*
- *    VC1 Extension to the PPB                         *
- *------------------------------------------------------*/
-#define VC1_VALID_PANSCAN              (1)
-
-struct BC_PIB_EXT_VC1 {
-       uint32_t        valid;
-
-       /* Always valid, defaults to picture size if no
-        * sequence display extension in the stream. */
-       uint32_t        display_horizontal_size;
-       uint32_t        display_vertical_size;
-
-       /* VC1 pan scan windows */
-       uint32_t        num_panscan_windows;
-       int32_t         ps_horiz_offset[4];
-       int32_t         ps_vert_offset[4];
-       int32_t         ps_width[4];
-       int32_t         ps_height[4];
-};
-
-/*------------------------------------------------------*
- *    Picture Information Block                                *
- *------------------------------------------------------*/
-#if defined(__LINUX_USER__)
-/* Values for 'pulldown' field.  '0' means no pulldown information
- * was present for this picture. */
-enum {
-       vdecNoPulldownInfo      = 0,
-       vdecTop                 = 1,
-       vdecBottom              = 2,
-       vdecTopBottom           = 3,
-       vdecBottomTop           = 4,
-       vdecTopBottomTop        = 5,
-       vdecBottomTopBottom     = 6,
-       vdecFrame_X2            = 7,
-       vdecFrame_X3            = 8,
-       vdecFrame_X1            = 9,
-       vdecFrame_X4            = 10,
-};
-
-/* Values for the 'frame_rate' field. */
-enum {
-       vdecFrameRateUnknown = 0,
-       vdecFrameRate23_97,
-       vdecFrameRate24,
-       vdecFrameRate25,
-       vdecFrameRate29_97,
-       vdecFrameRate30,
-       vdecFrameRate50,
-       vdecFrameRate59_94,
-       vdecFrameRate60,
-};
-
-/* Values for the 'aspect_ratio' field. */
-enum {
-       vdecAspectRatioUnknown = 0,
-       vdecAspectRatioSquare,
-       vdecAspectRatio12_11,
-       vdecAspectRatio10_11,
-       vdecAspectRatio16_11,
-       vdecAspectRatio40_33,
-       vdecAspectRatio24_11,
-       vdecAspectRatio20_11,
-       vdecAspectRatio32_11,
-       vdecAspectRatio80_33,
-       vdecAspectRatio18_11,
-       vdecAspectRatio15_11,
-       vdecAspectRatio64_33,
-       vdecAspectRatio160_99,
-       vdecAspectRatio4_3,
-       vdecAspectRatio16_9,
-       vdecAspectRatio221_1,
-       vdecAspectRatioOther = 255,
-};
-
-/* Values for the 'colour_primaries' field. */
-enum {
-       vdecColourPrimariesUnknown = 0,
-       vdecColourPrimariesBT709,
-       vdecColourPrimariesUnspecified,
-       vdecColourPrimariesReserved,
-       vdecColourPrimariesBT470_2M = 4,
-       vdecColourPrimariesBT470_2BG,
-       vdecColourPrimariesSMPTE170M,
-       vdecColourPrimariesSMPTE240M,
-       vdecColourPrimariesGenericFilm,
-};
-/**
- * @vdecRESOLUTION_CUSTOM: custom
- * @vdecRESOLUTION_480i: 480i
- * @vdecRESOLUTION_1080i: 1080i (1920x1080, 60i)
- * @vdecRESOLUTION_NTSC: NTSC (720x483, 60i)
- * @vdecRESOLUTION_480p: 480p (720x480, 60p)
- * @vdecRESOLUTION_720p: 720p (1280x720, 60p)
- * @vdecRESOLUTION_PAL1: PAL_1 (720x576, 50i)
- * @vdecRESOLUTION_1080i25: 1080i25 (1920x1080, 50i)
- * @vdecRESOLUTION_720p50: 720p50 (1280x720, 50p)
- * @vdecRESOLUTION_576p: 576p (720x576, 50p)
- * @vdecRESOLUTION_1080i29_97: 1080i (1920x1080, 59.94i)
- * @vdecRESOLUTION_720p59_94: 720p (1280x720, 59.94p)
- * @vdecRESOLUTION_SD_DVD: SD DVD (720x483, 60i)
- * @vdecRESOLUTION_480p656: 480p (720x480, 60p),
- *     output bus width 8 bit, clock 74.25MHz
- * @vdecRESOLUTION_1080p23_976: 1080p23_976 (1920x1080, 23.976p)
- * @vdecRESOLUTION_720p23_976: 720p23_976 (1280x720p, 23.976p)
- * @vdecRESOLUTION_240p29_97: 240p (1440x240, 29.97p )
- * @vdecRESOLUTION_240p30: 240p (1440x240, 30p)
- * @vdecRESOLUTION_288p25: 288p (1440x288p, 25p)
- * @vdecRESOLUTION_1080p29_97: 1080p29_97 (1920x1080, 29.97p)
- * @vdecRESOLUTION_1080p30: 1080p30 (1920x1080, 30p)
- * @vdecRESOLUTION_1080p24: 1080p24 (1920x1080, 24p)
- * @vdecRESOLUTION_1080p25: 1080p25 (1920x1080, 25p)
- * @vdecRESOLUTION_720p24: 720p24 (1280x720, 25p)
- * @vdecRESOLUTION_720p29_97: 720p29.97 (1280x720, 29.97p)
- * @vdecRESOLUTION_480p23_976: 480p23.976 (720*480, 23.976)
- * @vdecRESOLUTION_480p29_97: 480p29.976 (720*480, 29.97p)
- * @vdecRESOLUTION_576p25: 576p25 (720*576, 25p)
- * @vdecRESOLUTION_480p0: 480p (720x480, 0p)
- * @vdecRESOLUTION_480i0: 480i (720x480, 0i)
- * @vdecRESOLUTION_576p0: 576p (720x576, 0p)
- * @vdecRESOLUTION_720p0: 720p (1280x720, 0p)
- * @vdecRESOLUTION_1080p0: 1080p (1920x1080, 0p)
- * @vdecRESOLUTION_1080i0: 1080i (1920x1080, 0i)
- */
-enum {
-       vdecRESOLUTION_CUSTOM   = 0x00000000,
-       vdecRESOLUTION_480i     = 0x00000001,
-       vdecRESOLUTION_1080i    = 0x00000002,
-       vdecRESOLUTION_NTSC     = 0x00000003,
-       vdecRESOLUTION_480p     = 0x00000004,
-       vdecRESOLUTION_720p     = 0x00000005,
-       vdecRESOLUTION_PAL1     = 0x00000006,
-       vdecRESOLUTION_1080i25  = 0x00000007,
-       vdecRESOLUTION_720p50   = 0x00000008,
-       vdecRESOLUTION_576p     = 0x00000009,
-       vdecRESOLUTION_1080i29_97 = 0x0000000A,
-       vdecRESOLUTION_720p59_94  = 0x0000000B,
-       vdecRESOLUTION_SD_DVD   = 0x0000000C,
-       vdecRESOLUTION_480p656  = 0x0000000D,
-       vdecRESOLUTION_1080p23_976 = 0x0000000E,
-       vdecRESOLUTION_720p23_976  = 0x0000000F,
-       vdecRESOLUTION_240p29_97   = 0x00000010,
-       vdecRESOLUTION_240p30   = 0x00000011,
-       vdecRESOLUTION_288p25   = 0x00000012,
-       vdecRESOLUTION_1080p29_97 = 0x00000013,
-       vdecRESOLUTION_1080p30  = 0x00000014,
-       vdecRESOLUTION_1080p24  = 0x00000015,
-       vdecRESOLUTION_1080p25  = 0x00000016,
-       vdecRESOLUTION_720p24   = 0x00000017,
-       vdecRESOLUTION_720p29_97  = 0x00000018,
-       vdecRESOLUTION_480p23_976 = 0x00000019,
-       vdecRESOLUTION_480p29_97  = 0x0000001A,
-       vdecRESOLUTION_576p25   = 0x0000001B,
-       /* For Zero Frame Rate */
-       vdecRESOLUTION_480p0    = 0x0000001C,
-       vdecRESOLUTION_480i0    = 0x0000001D,
-       vdecRESOLUTION_576p0    = 0x0000001E,
-       vdecRESOLUTION_720p0    = 0x0000001F,
-       vdecRESOLUTION_1080p0   = 0x00000020,
-       vdecRESOLUTION_1080i0   = 0x00000021,
-};
-
-/* Bit definitions for 'flags' field */
-#define VDEC_FLAG_EOS                          (0x0004)
-
-#define VDEC_FLAG_FRAME                                (0x0000)
-#define VDEC_FLAG_FIELDPAIR                    (0x0008)
-#define VDEC_FLAG_TOPFIELD                     (0x0010)
-#define VDEC_FLAG_BOTTOMFIELD                  (0x0018)
-
-#define VDEC_FLAG_PROGRESSIVE_SRC              (0x0000)
-#define VDEC_FLAG_INTERLACED_SRC               (0x0020)
-#define VDEC_FLAG_UNKNOWN_SRC                  (0x0040)
-
-#define VDEC_FLAG_BOTTOM_FIRST                 (0x0080)
-#define VDEC_FLAG_LAST_PICTURE                 (0x0100)
-
-#define VDEC_FLAG_PICTURE_META_DATA_PRESENT    (0x40000)
-
-#endif /* __LINUX_USER__ */
-
-enum _BC_OUTPUT_FORMAT {
-       MODE420                         = 0x0,
-       MODE422_YUY2                    = 0x1,
-       MODE422_UYVY                    = 0x2,
-};
-/**
- * struct BC_PIC_INFO_BLOCK
- * @timeStam;: Timestamp
- * @picture_number: Ordinal display number
- * @width:  pixels
- * @height:  pixels
- * @chroma_format:  0x420, 0x422 or 0x444
- * @n_drop;:  number of non-reference frames
- *     remaining to be dropped
- */
-struct BC_PIC_INFO_BLOCK {
-       /* Common fields. */
-       uint64_t        timeStamp;
-       uint32_t        picture_number;
-       uint32_t        width;
-       uint32_t        height;
-       uint32_t        chroma_format;
-       uint32_t        pulldown;
-       uint32_t        flags;
-       uint32_t        frame_rate;
-       uint32_t        aspect_ratio;
-       uint32_t        colour_primaries;
-       uint32_t        picture_meta_payload;
-       uint32_t        sess_num;
-       uint32_t        ycom;
-       uint32_t        custom_aspect_ratio_width_height;
-       uint32_t        n_drop; /* number of non-reference frames
-                                       remaining to be dropped */
-
-       /* Protocol-specific extensions. */
-       union {
-               struct BC_PIB_EXT_H264  h264;
-               struct BC_PIB_EXT_MPEG  mpeg;
-               struct BC_PIB_EXT_VC1    vc1;
-       } other;
-
-};
-
-/*------------------------------------------------------*
- *    ProcOut Info                                     *
- *------------------------------------------------------*/
-
-/**
- * enum POUT_OPTIONAL_IN_FLAGS - Optional flags for ProcOut Interface.
- * @BC_POUT_FLAGS_YV12:  Copy Data in YV12 format
- * @BC_POUT_FLAGS_STRIDE:  Stride size is valid.
- * @BC_POUT_FLAGS_SIZE:  Take size information from Application
- * @BC_POUT_FLAGS_INTERLACED:  copy only half the bytes
- * @BC_POUT_FLAGS_INTERLEAVED:  interleaved frame
- * @:  * @BC_POUT_FLAGS_FMT_CHANGE:  Data is not VALID when this flag is set
- * @BC_POUT_FLAGS_PIB_VALID:  PIB Information valid
- * @BC_POUT_FLAGS_ENCRYPTED:  Data is encrypted.
- * @BC_POUT_FLAGS_FLD_BOT:  Bottom Field data
- */
-enum POUT_OPTIONAL_IN_FLAGS_ {
-       /* Flags from App to Device */
-       BC_POUT_FLAGS_YV12        = 0x01,
-       BC_POUT_FLAGS_STRIDE      = 0x02,
-       BC_POUT_FLAGS_SIZE        = 0x04,
-       BC_POUT_FLAGS_INTERLACED  = 0x08,
-       BC_POUT_FLAGS_INTERLEAVED = 0x10,
-
-       /* Flags from Device to APP */
-       BC_POUT_FLAGS_FMT_CHANGE  = 0x10000,
-       BC_POUT_FLAGS_PIB_VALID   = 0x20000,
-       BC_POUT_FLAGS_ENCRYPTED   = 0x40000,
-       BC_POUT_FLAGS_FLD_BOT     = 0x80000,
-};
-
-typedef enum BC_STATUS(*dts_pout_callback)(void  *shnd, uint32_t width,
-                       uint32_t height, uint32_t stride, void *pOut);
-
-/* Line 21 Closed Caption */
-/* User Data */
-#define MAX_UD_SIZE            1792    /* 1920 - 128 */
-
-/**
- * struct BC_DTS_PROC_OUT
- * @Ybuff: Caller Supplied buffer for Y data
- * @YbuffSz: Caller Supplied Y buffer size
- * @YBuffDoneSz: Transferred Y datasize
- * @*UVbuff: Caller Supplied buffer for UV data
- * @UVbuffSz: Caller Supplied UV buffer size
- * @UVBuffDoneSz: Transferred UV data size
- * @StrideSz: Caller supplied Stride Size
- * @PoutFlags: Call IN Flags
- * @discCnt: Picture discontinuity count
- * @PicInfo: Picture Information Block Data
- * @b422Mode: Picture output Mode
- * @bPibEnc: PIB encrypted
- */
-struct BC_DTS_PROC_OUT {
-       uint8_t         *Ybuff;
-       uint32_t        YbuffSz;
-       uint32_t        YBuffDoneSz;
-
-       uint8_t         *UVbuff;
-       uint32_t        UVbuffSz;
-       uint32_t        UVBuffDoneSz;
-
-       uint32_t        StrideSz;
-       uint32_t        PoutFlags;
-
-       uint32_t        discCnt;
-
-       struct BC_PIC_INFO_BLOCK PicInfo;
-
-       /* Line 21 Closed Caption */
-       /* User Data */
-       uint32_t        UserDataSz;
-       uint8_t         UserData[MAX_UD_SIZE];
-
-       void            *hnd;
-       dts_pout_callback AppCallBack;
-       uint8_t         DropFrames;
-       uint8_t         b422Mode;
-       uint8_t         bPibEnc;
-       uint8_t         bRevertScramble;
-
-};
-/**
- * struct BC_DTS_STATUS
- * @ReadyListCount: Number of frames in ready list (reported by driver)
- * @PowerStateChange: Number of active state power
- *     transitions (reported by driver)
- * @FramesDropped:  Number of frames dropped.  (reported by DIL)
- * @FramesCaptured: Number of frames captured. (reported by DIL)
- * @FramesRepeated: Number of frames repeated. (reported by DIL)
- * @InputCount:        Times compressed video has been sent to the HW.
- *     i.e. Successful DtsProcInput() calls (reported by DIL)
- * @InputTotalSize: Amount of compressed video that has been sent to the HW.
- *     (reported by DIL)
- * @InputBusyCount: Times compressed video has attempted to be sent to the HW
- *     but the input FIFO was full. (reported by DIL)
- * @PIBMissCount: Amount of times a PIB is invalid. (reported by DIL)
- * @cpbEmptySize: supported only for H.264, specifically changed for
- *     Adobe. Report size of CPB buffer available. (reported by DIL)
- * @NextTimeStamp: TimeStamp of the next picture that will be returned
- *     by a call to ProcOutput. Added for Adobe. Reported
- *     back from the driver
- */
-struct BC_DTS_STATUS {
-       uint8_t         ReadyListCount;
-       uint8_t         FreeListCount;
-       uint8_t         PowerStateChange;
-       uint8_t         reserved_[1];
-       uint32_t        FramesDropped;
-       uint32_t        FramesCaptured;
-       uint32_t        FramesRepeated;
-       uint32_t        InputCount;
-       uint64_t        InputTotalSize;
-       uint32_t        InputBusyCount;
-       uint32_t        PIBMissCount;
-       uint32_t        cpbEmptySize;
-       uint64_t        NextTimeStamp;
-       uint8_t         reserved__[16];
-};
-
-#define BC_SWAP32(_v)                  \
-       ((((_v) & 0xFF000000)>>24)|     \
-         (((_v) & 0x00FF0000)>>8)|     \
-         (((_v) & 0x0000FF00)<<8)|     \
-         (((_v) & 0x000000FF)<<24))
-
-#define WM_AGENT_TRAYICON_DECODER_OPEN 10001
-#define WM_AGENT_TRAYICON_DECODER_CLOSE        10002
-#define WM_AGENT_TRAYICON_DECODER_START        10003
-#define WM_AGENT_TRAYICON_DECODER_STOP 10004
-#define WM_AGENT_TRAYICON_DECODER_RUN  10005
-#define WM_AGENT_TRAYICON_DECODER_PAUSE        10006
-
-
-#endif /* _BC_DTS_DEFS_H_ */
diff --git a/drivers/staging/crystalhd/bc_dts_glob_lnx.h b/drivers/staging/crystalhd/bc_dts_glob_lnx.h
deleted file mode 100644 (file)
index 92b0cff..0000000
+++ /dev/null
@@ -1,300 +0,0 @@
-/********************************************************************
- * Copyright(c) 2006-2009 Broadcom Corporation.
- *
- *  Name: bc_dts_glob_lnx.h
- *
- *  Description: Wrapper to Windows dts_glob.h for Link-Linux usage.
- *              The idea is to define additional Linux related defs
- *              in this file to avoid changes to existing Windows
- *              glob file.
- *
- *  AU
- *
- *  HISTORY:
- *
- ********************************************************************
- * This header is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 2.1 of the License.
- *
- * This header is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License
- * along with this header.  If not, see <http://www.gnu.org/licenses/>.
- *******************************************************************/
-
-#ifndef _BC_DTS_GLOB_LNX_H_
-#define _BC_DTS_GLOB_LNX_H_
-
-#ifdef __LINUX_USER__
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <ctype.h>
-#include <string.h>
-#include <errno.h>
-#include <netdb.h>
-#include <sys/time.h>
-#include <time.h>
-#include <arpa/inet.h>
-#include <linux/param.h>
-#include <linux/ioctl.h>
-#include <sys/select.h>
-
-#define DRVIFLIB_INT_API
-
-#endif
-
-#include "crystalhd.h"
-
-#define CRYSTALHD_API_NAME     "crystalhd"
-#define CRYSTALHD_API_DEV_NAME "/dev/crystalhd"
-
-/*
- * These are SW stack tunable parameters shared
- * between the driver and the application.
- */
-enum BC_DTS_GLOBALS {
-       BC_MAX_FW_CMD_BUFF_SZ = 0x40, /* FW passthrough cmd/rsp buffer size */
-       PCI_CFG_SIZE            = 256,          /* PCI config size buffer */
-       BC_IOCTL_DATA_POOL_SIZE = 8,            /* BC_IOCTL_DATA Pool size */
-       BC_LINK_MAX_OPENS       = 3,    /* Maximum simultaneous opens*/
-       BC_LINK_MAX_SGLS        = 1024, /* Maximum SG elements 4M/4K */
-       BC_TX_LIST_CNT          = 2,            /* Max Tx DMA Rings */
-       BC_RX_LIST_CNT          = 8,            /* Max Rx DMA Rings*/
-       BC_PROC_OUTPUT_TIMEOUT  = 3000,         /* Milliseconds */
-       BC_INFIFO_THRESHOLD     = 0x10000,
-};
-
-struct BC_CMD_REG_ACC {
-       uint32_t                Offset;
-       uint32_t                Value;
-};
-
-struct BC_CMD_DEV_MEM {
-       uint32_t                StartOff;
-       uint32_t                NumDwords;
-       uint32_t                Rsrd;
-};
-
-/* FW Passthrough command structure */
-enum bc_fw_cmd_flags {
-       BC_FW_CMD_FLAGS_NONE    = 0,
-       BC_FW_CMD_PIB_QS        = 0x01,
-};
-
-struct BC_FW_CMD {
-       uint32_t                cmd[BC_MAX_FW_CMD_BUFF_SZ];
-       uint32_t                rsp[BC_MAX_FW_CMD_BUFF_SZ];
-       uint32_t                flags;
-       uint32_t                add_data;
-};
-
-struct BC_HW_TYPE {
-       uint16_t                PciDevId;
-       uint16_t                PciVenId;
-       uint8_t                 HwRev;
-       uint8_t                 Align[3];
-};
-
-struct BC_PCI_CFG {
-       uint32_t                Size;
-       uint32_t                Offset;
-       uint8_t                 pci_cfg_space[PCI_CFG_SIZE];
-};
-
-struct BC_VERSION_INFO {
-       uint8_t                 DriverMajor;
-       uint8_t                 DriverMinor;
-       uint16_t                DriverRevision;
-};
-
-struct BC_START_RX_CAP {
-       uint32_t                Rsrd;
-       uint32_t                StartDeliveryThsh;
-       uint32_t                PauseThsh;
-       uint32_t                ResumeThsh;
-};
-
-struct BC_FLUSH_RX_CAP {
-       uint32_t                Rsrd;
-       uint32_t                bDiscardOnly;
-};
-
-struct BC_DTS_STATS {
-       uint8_t                 drvRLL;
-       uint8_t                 drvFLL;
-       uint8_t                 eosDetected;
-       uint8_t                 pwr_state_change;
-
-       /* Stats from App */
-       uint32_t                opFrameDropped;
-       uint32_t                opFrameCaptured;
-       uint32_t                ipSampleCnt;
-       uint64_t                ipTotalSize;
-       uint32_t                reptdFrames;
-       uint32_t                pauseCount;
-       uint32_t                pibMisses;
-       uint32_t                discCounter;
-
-       /* Stats from Driver */
-       uint32_t                TxFifoBsyCnt;
-       uint32_t                intCount;
-       uint32_t                DrvIgnIntrCnt;
-       uint32_t                DrvTotalFrmDropped;
-       uint32_t                DrvTotalHWErrs;
-       uint32_t                DrvTotalPIBFlushCnt;
-       uint32_t                DrvTotalFrmCaptured;
-       uint32_t                DrvPIBMisses;
-       uint32_t                DrvPauseTime;
-       uint32_t                DrvRepeatedFrms;
-       uint32_t                res1[13];
-
-};
-
-struct BC_PROC_INPUT {
-       uint8_t                 *pDmaBuff;
-       uint32_t                BuffSz;
-       uint8_t                 Mapped;
-       uint8_t                 Encrypted;
-       uint8_t                 Rsrd[2];
-       uint32_t                DramOffset;     /* For debug use only */
-};
-
-struct BC_DEC_YUV_BUFFS {
-       uint32_t                b422Mode;
-       uint8_t                 *YuvBuff;
-       uint32_t                YuvBuffSz;
-       uint32_t                UVbuffOffset;
-       uint32_t                YBuffDoneSz;
-       uint32_t                UVBuffDoneSz;
-       uint32_t                RefCnt;
-};
-
-enum DECOUT_COMPLETION_FLAGS {
-       COMP_FLAG_NO_INFO       = 0x00,
-       COMP_FLAG_FMT_CHANGE    = 0x01,
-       COMP_FLAG_PIB_VALID     = 0x02,
-       COMP_FLAG_DATA_VALID    = 0x04,
-       COMP_FLAG_DATA_ENC      = 0x08,
-       COMP_FLAG_DATA_BOT      = 0x10,
-};
-
-struct BC_DEC_OUT_BUFF {
-       struct BC_DEC_YUV_BUFFS OutPutBuffs;
-       struct BC_PIC_INFO_BLOCK PibInfo;
-       uint32_t                Flags;
-       uint32_t                BadFrCnt;
-};
-
-struct BC_NOTIFY_MODE {
-       uint32_t                Mode;
-       uint32_t                Rsvr[3];
-};
-
-struct BC_CLOCK {
-       uint32_t                clk;
-       uint32_t                Rsvr[3];
-};
-
-struct BC_IOCTL_DATA {
-       enum BC_STATUS          RetSts;
-       uint32_t                IoctlDataSz;
-       uint32_t                Timeout;
-       union {
-               struct BC_CMD_REG_ACC   regAcc;
-               struct BC_CMD_DEV_MEM   devMem;
-               struct BC_FW_CMD        fwCmd;
-               struct BC_HW_TYPE       hwType;
-               struct BC_PCI_CFG       pciCfg;
-               struct BC_VERSION_INFO  VerInfo;
-               struct BC_PROC_INPUT    ProcInput;
-               struct BC_DEC_YUV_BUFFS RxBuffs;
-               struct BC_DEC_OUT_BUFF  DecOutData;
-               struct BC_START_RX_CAP  RxCap;
-               struct BC_FLUSH_RX_CAP  FlushRxCap;
-               struct BC_DTS_STATS     drvStat;
-               struct BC_NOTIFY_MODE   NotifyMode;
-               struct BC_CLOCK         clockValue;
-       } u;
-       struct _BC_IOCTL_DATA   *next;
-};
-
-enum BC_DRV_CMD {
-       DRV_CMD_VERSION = 0,    /* Get SW version */
-       DRV_CMD_GET_HWTYPE,     /* Get HW version and type Dozer/Tank */
-       DRV_CMD_REG_RD,         /* Read Device Register */
-       DRV_CMD_REG_WR,         /* Write Device Register */
-       DRV_CMD_FPGA_RD,        /* Read FPGA Register */
-       DRV_CMD_FPGA_WR,        /* Write FPGA Register */
-       DRV_CMD_MEM_RD,         /* Read Device Memory */
-       DRV_CMD_MEM_WR,         /* Write Device Memory */
-       DRV_CMD_RD_PCI_CFG,     /* Read PCI Config Space */
-       DRV_CMD_WR_PCI_CFG,     /* Write the PCI Configuration Space*/
-       DRV_CMD_FW_DOWNLOAD,    /* Download Firmware */
-       DRV_ISSUE_FW_CMD,       /* Issue FW Cmd (pass through mode) */
-       DRV_CMD_PROC_INPUT,     /* Process Input Sample */
-       DRV_CMD_ADD_RXBUFFS,    /* Add Rx side buffers to driver pool */
-       DRV_CMD_FETCH_RXBUFF,   /* Get Rx DMAed buffer */
-       DRV_CMD_START_RX_CAP,   /* Start Rx Buffer Capture */
-       DRV_CMD_FLUSH_RX_CAP,   /* Stop the capture for now...
-                       we will enhance this later*/
-       DRV_CMD_GET_DRV_STAT,   /* Get Driver Internal Statistics */
-       DRV_CMD_RST_DRV_STAT,   /* Reset Driver Internal Statistics */
-       DRV_CMD_NOTIFY_MODE,    /* Notify the Mode to driver
-                       in which the application is Operating*/
-       DRV_CMD_CHANGE_CLOCK,   /* Change the core clock to either save power
-                       or improve performance */
-
-       /* MUST be the last one.. */
-       DRV_CMD_END,                    /* End of the List.. */
-};
-
-#define BC_IOC_BASE            'b'
-#define BC_IOC_VOID            _IOC_NONE
-#define BC_IOC_IOWR(nr, type)  _IOWR(BC_IOC_BASE, nr, type)
-#define BC_IOCTL_MB            struct BC_IOCTL_DATA
-
-#define        BCM_IOC_GET_VERSION     BC_IOC_IOWR(DRV_CMD_VERSION, BC_IOCTL_MB)
-#define        BCM_IOC_GET_HWTYPE      BC_IOC_IOWR(DRV_CMD_GET_HWTYPE, BC_IOCTL_MB)
-#define        BCM_IOC_REG_RD          BC_IOC_IOWR(DRV_CMD_REG_RD, BC_IOCTL_MB)
-#define        BCM_IOC_REG_WR          BC_IOC_IOWR(DRV_CMD_REG_WR, BC_IOCTL_MB)
-#define        BCM_IOC_MEM_RD          BC_IOC_IOWR(DRV_CMD_MEM_RD, BC_IOCTL_MB)
-#define        BCM_IOC_MEM_WR          BC_IOC_IOWR(DRV_CMD_MEM_WR, BC_IOCTL_MB)
-#define BCM_IOC_FPGA_RD                BC_IOC_IOWR(DRV_CMD_FPGA_RD, BC_IOCTL_MB)
-#define BCM_IOC_FPGA_WR                BC_IOC_IOWR(DRV_CMD_FPGA_WR, BC_IOCTL_MB)
-#define        BCM_IOC_RD_PCI_CFG      BC_IOC_IOWR(DRV_CMD_RD_PCI_CFG, BC_IOCTL_MB)
-#define        BCM_IOC_WR_PCI_CFG      BC_IOC_IOWR(DRV_CMD_WR_PCI_CFG, BC_IOCTL_MB)
-#define BCM_IOC_PROC_INPUT     BC_IOC_IOWR(DRV_CMD_PROC_INPUT, BC_IOCTL_MB)
-#define BCM_IOC_ADD_RXBUFFS    BC_IOC_IOWR(DRV_CMD_ADD_RXBUFFS, BC_IOCTL_MB)
-#define BCM_IOC_FETCH_RXBUFF   BC_IOC_IOWR(DRV_CMD_FETCH_RXBUFF, BC_IOCTL_MB)
-#define        BCM_IOC_FW_CMD          BC_IOC_IOWR(DRV_ISSUE_FW_CMD, BC_IOCTL_MB)
-#define        BCM_IOC_START_RX_CAP    BC_IOC_IOWR(DRV_CMD_START_RX_CAP, BC_IOCTL_MB)
-#define BCM_IOC_FLUSH_RX_CAP   BC_IOC_IOWR(DRV_CMD_FLUSH_RX_CAP, BC_IOCTL_MB)
-#define BCM_IOC_GET_DRV_STAT   BC_IOC_IOWR(DRV_CMD_GET_DRV_STAT, BC_IOCTL_MB)
-#define BCM_IOC_RST_DRV_STAT   BC_IOC_IOWR(DRV_CMD_RST_DRV_STAT, BC_IOCTL_MB)
-#define BCM_IOC_NOTIFY_MODE    BC_IOC_IOWR(DRV_CMD_NOTIFY_MODE, BC_IOCTL_MB)
-#define        BCM_IOC_FW_DOWNLOAD     BC_IOC_IOWR(DRV_CMD_FW_DOWNLOAD, BC_IOCTL_MB)
-#define BCM_IOC_CHG_CLK                BC_IOC_IOWR(DRV_CMD_CHANGE_CLOCK, BC_IOCTL_MB)
-#define        BCM_IOC_END             BC_IOC_VOID
-
-/* Wrapper for main IOCTL data */
-struct crystalhd_ioctl_data {
-       struct BC_IOCTL_DATA    udata;          /* IOCTL from App..*/
-       uint32_t                u_id;           /* Driver specific user ID */
-       uint32_t                cmd;            /* Cmd ID for driver's use. */
-       void     *add_cdata;    /* Additional command specific data..*/
-       uint32_t add_cdata_sz;  /* Additional command specific data size */
-       struct crystalhd_ioctl_data *next;      /* List/Fifo management */
-};
-
-enum crystalhd_kmod_ver {
-       crystalhd_kmod_major    = 0,
-       crystalhd_kmod_minor    = 9,
-       crystalhd_kmod_rev      = 27,
-};
-
-#endif
diff --git a/drivers/staging/crystalhd/bcm_70012_regs.h b/drivers/staging/crystalhd/bcm_70012_regs.h
deleted file mode 100644 (file)
index da199ad..0000000
+++ /dev/null
@@ -1,758 +0,0 @@
-/***************************************************************************
- * Copyright (c) 1999-2009, Broadcom Corporation.
- *
- *  Name: bcm_70012_regs.h
- *
- *  Description: BCM70012 registers
- *
- ********************************************************************
- * This header is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published
- * by the Free Software Foundation, either version 2.1 of the License.
- *
- * This header is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- * You should have received a copy of the GNU Lesser General Public License
- * along with this header.  If not, see <http://www.gnu.org/licenses/>.
- ***************************************************************************/
-
-#ifndef MACFILE_H__
-#define MACFILE_H__
-
-/**
- * m = memory, c = core, r = register, f = field, d = data.
- */
-#if !defined(GET_FIELD) && !defined(SET_FIELD)
-#define BRCM_ALIGN(c, r, f)   c##_##r##_##f##_ALIGN
-#define BRCM_BITS(c, r, f)    c##_##r##_##f##_BITS
-#define BRCM_MASK(c, r, f)    c##_##r##_##f##_MASK
-#define BRCM_SHIFT(c, r, f)   c##_##r##_##f##_SHIFT
-
-#define GET_FIELD(m, c, r, f) \
-       ((((m) & BRCM_MASK(c, r, f)) >> BRCM_SHIFT(c, r, f)) << \
-        BRCM_ALIGN(c, r, f))
-
-#define SET_FIELD(m, c, r, f, d) \
-       ((m) = (((m) & ~BRCM_MASK(c, r, f)) | ((((d) >> BRCM_ALIGN(c, r, f)) << \
-        BRCM_SHIFT(c, r, f)) & BRCM_MASK(c, r, f))) \
-       )
-
-#define SET_TYPE_FIELD(m, c, r, f, d) SET_FIELD(m, c, r, f, c##_##d)
-#define SET_NAME_FIELD(m, c, r, f, d) SET_FIELD(m, c, r, f, c##_##r##_##f##_##d)
-#define SET_VALUE_FIELD(m, c, r, f, d) SET_FIELD(m, c, r, f, d)
-
-#endif /* GET & SET */
-
-/****************************************************************************
- * Core Enums.
- ***************************************************************************/
-/****************************************************************************
- * Enums: AES_RGR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define AES_RGR_BRIDGE_RESET_CTRL_DEASSERT                 0
-#define AES_RGR_BRIDGE_RESET_CTRL_ASSERT                   1
-
-/****************************************************************************
- * Enums: CCE_RGR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define CCE_RGR_BRIDGE_RESET_CTRL_DEASSERT                 0
-#define CCE_RGR_BRIDGE_RESET_CTRL_ASSERT                   1
-
-/****************************************************************************
- * Enums: DBU_RGR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define DBU_RGR_BRIDGE_RESET_CTRL_DEASSERT                 0
-#define DBU_RGR_BRIDGE_RESET_CTRL_ASSERT                   1
-
-/****************************************************************************
- * Enums: DCI_RGR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define DCI_RGR_BRIDGE_RESET_CTRL_DEASSERT                 0
-#define DCI_RGR_BRIDGE_RESET_CTRL_ASSERT                   1
-
-/****************************************************************************
- * Enums: GISB_ARBITER_DEASSERT_ASSERT
- ***************************************************************************/
-#define GISB_ARBITER_DEASSERT_ASSERT_DEASSERT              0
-#define GISB_ARBITER_DEASSERT_ASSERT_ASSERT                1
-
-/****************************************************************************
- * Enums: GISB_ARBITER_UNMASK_MASK
- ***************************************************************************/
-#define GISB_ARBITER_UNMASK_MASK_UNMASK                    0
-#define GISB_ARBITER_UNMASK_MASK_MASK                      1
-
-/****************************************************************************
- * Enums: GISB_ARBITER_DISABLE_ENABLE
- ***************************************************************************/
-#define GISB_ARBITER_DISABLE_ENABLE_DISABLE                0
-#define GISB_ARBITER_DISABLE_ENABLE_ENABLE                 1
-
-/****************************************************************************
- * Enums: I2C_GR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define I2C_GR_BRIDGE_RESET_CTRL_DEASSERT                  0
-#define I2C_GR_BRIDGE_RESET_CTRL_ASSERT                    1
-
-/****************************************************************************
- * Enums: MISC_GR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define MISC_GR_BRIDGE_RESET_CTRL_DEASSERT                 0
-#define MISC_GR_BRIDGE_RESET_CTRL_ASSERT                   1
-
-/****************************************************************************
- * Enums: OTP_GR_BRIDGE_RESET_CTRL
- ***************************************************************************/
-#define OTP_GR_BRIDGE_RESET_CTRL_DEASSERT                  0
-#define OTP_GR_BRIDGE_RESET_CTRL_ASSERT                    1
-
-/****************************************************************************
- * BCM70012_TGT_TOP_PCIE_CFG
- ***************************************************************************/
-#define PCIE_CFG_DEVICE_VENDOR_ID      0x00000000 /* DEVICE_VENDOR_ID Register */
-#define PCIE_CFG_STATUS_COMMAND        0x00000004 /* STATUS_COMMAND Register */
-#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID 0x00000008 /* PCI_CLASSCODE_AND_REVISION_ID Register */
-#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE 0x0000000c /* BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE Register */
-#define PCIE_CFG_BASE_ADDRESS_1        0x00000010 /* BASE_ADDRESS_1 Register */
-#define PCIE_CFG_BASE_ADDRESS_2        0x00000014 /* BASE_ADDRESS_2 Register */
-#define PCIE_CFG_BASE_ADDRESS_3        0x00000018 /* BASE_ADDRESS_3 Register */
-#define PCIE_CFG_BASE_ADDRESS_4        0x0000001c /* BASE_ADDRESS_4 Register */
-#define PCIE_CFG_CARDBUS_CIS_POINTER   0x00000028 /* CARDBUS_CIS_POINTER Register */
-#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID 0x0000002c /* SUBSYSTEM_DEVICE_VENDOR_ID Register */
-#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS 0x00000030 /* EXPANSION_ROM_BASE_ADDRESS Register */
-#define PCIE_CFG_CAPABILITIES_POINTER  0x00000034 /* CAPABILITIES_POINTER Register */
-#define PCIE_CFG_INTERRUPT             0x0000003c /* INTERRUPT Register */
-#define PCIE_CFG_VPD_CAPABILITIES      0x00000040 /* VPD_CAPABILITIES Register */
-#define PCIE_CFG_VPD_DATA              0x00000044 /* VPD_DATA Register */
-#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY 0x00000048 /* POWER_MANAGEMENT_CAPABILITY Register */
-#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS 0x0000004c /* POWER_MANAGEMENT_CONTROL_STATUS Register */
-#define PCIE_CFG_MSI_CAPABILITY_HEADER 0x00000050 /* MSI_CAPABILITY_HEADER Register */
-#define PCIE_CFG_MSI_LOWER_ADDRESS     0x00000054 /* MSI_LOWER_ADDRESS Register */
-#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER 0x00000058 /* MSI_UPPER_ADDRESS_REGISTER Register */
-#define PCIE_CFG_MSI_DATA              0x0000005c /* MSI_DATA Register */
-#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER 0x00000060 /* BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER Register */
-#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES 0x00000064 /* RESET_COUNTERS_INITIAL_VALUES Register */
-#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL 0x00000068 /* MISCELLANEOUS_HOST_CONTROL Register */
-#define PCIE_CFG_SPARE                 0x0000006c /* SPARE Register */
-#define PCIE_CFG_PCI_STATE             0x00000070 /* PCI_STATE Register */
-#define PCIE_CFG_CLOCK_CONTROL         0x00000074 /* CLOCK_CONTROL Register */
-#define PCIE_CFG_REGISTER_BASE         0x00000078 /* REGISTER_BASE Register */
-#define PCIE_CFG_MEMORY_BASE           0x0000007c /* MEMORY_BASE Register */
-#define PCIE_CFG_REGISTER_DATA         0x00000080 /* REGISTER_DATA Register */
-#define PCIE_CFG_MEMORY_DATA           0x00000084 /* MEMORY_DATA Register */
-#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE 0x00000088 /* EXPANSION_ROM_BAR_SIZE Register */
-#define PCIE_CFG_EXPANSION_ROM_ADDRESS 0x0000008c /* EXPANSION_ROM_ADDRESS Register */
-#define PCIE_CFG_EXPANSION_ROM_DATA    0x00000090 /* EXPANSION_ROM_DATA Register */
-#define PCIE_CFG_VPD_INTERFACE         0x00000094 /* VPD_INTERFACE Register */
-#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER 0x00000098 /* UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER Register */
-#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER 0x0000009c /* UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER Register */
-#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER 0x000000a0 /* UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER Register */
-#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER 0x000000a4 /* UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER Register */
-#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER 0x000000a8 /* UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER Register */
-#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER 0x000000ac /* UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER Register */
-#define PCIE_CFG_INT_MAILBOX_UPPER     0x000000b0 /* INT_MAILBOX_UPPER Register */
-#define PCIE_CFG_INT_MAILBOX_LOWER     0x000000b4 /* INT_MAILBOX_LOWER Register */
-#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION 0x000000bc /* PRODUCT_ID_AND_ASIC_REVISION Register */
-#define PCIE_CFG_FUNCTION_EVENT        0x000000c0 /* FUNCTION_EVENT Register */
-#define PCIE_CFG_FUNCTION_EVENT_MASK   0x000000c4 /* FUNCTION_EVENT_MASK Register */
-#define PCIE_CFG_FUNCTION_PRESENT      0x000000c8 /* FUNCTION_PRESENT Register */
-#define PCIE_CFG_PCIE_CAPABILITIES     0x000000cc /* PCIE_CAPABILITIES Register */
-#define PCIE_CFG_DEVICE_CAPABILITIES   0x000000d0 /* DEVICE_CAPABILITIES Register */
-#define PCIE_CFG_DEVICE_STATUS_CONTROL 0x000000d4 /* DEVICE_STATUS_CONTROL Register */
-#define PCIE_CFG_LINK_CAPABILITY       0x000000d8 /* LINK_CAPABILITY Register */
-#define PCIE_CFG_LINK_STATUS_CONTROL   0x000000dc /* LINK_STATUS_CONTROL Register */
-#define PCIE_CFG_DEVICE_CAPABILITIES_2 0x000000f0 /* DEVICE_CAPABILITIES_2 Register */
-#define PCIE_CFG_DEVICE_STATUS_CONTROL_2 0x000000f4 /* DEVICE_STATUS_CONTROL_2 Register */
-#define PCIE_CFG_LINK_CAPABILITIES_2   0x000000f8 /* LINK_CAPABILITIES_2 Register */
-#define PCIE_CFG_LINK_STATUS_CONTROL_2 0x000000fc /* LINK_STATUS_CONTROL_2 Register */
-#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER 0x00000100 /* ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER Register */
-#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS 0x00000104 /* UNCORRECTABLE_ERROR_STATUS Register */
-#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK 0x00000108 /* UNCORRECTABLE_ERROR_MASK Register */
-#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY 0x0000010c /* UNCORRECTABLE_ERROR_SEVERITY Register */
-#define PCIE_CFG_CORRECTABLE_ERROR_STATUS 0x00000110 /* CORRECTABLE_ERROR_STATUS Register */
-#define PCIE_CFG_CORRECTABLE_ERROR_MASK 0x00000114 /* CORRECTABLE_ERROR_MASK Register */
-#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL 0x00000118 /* ADVANCED_ERROR_CAPABILITIES_AND_CONTROL Register */
-#define PCIE_CFG_HEADER_LOG_1          0x0000011c /* HEADER_LOG_1 Register */
-#define PCIE_CFG_HEADER_LOG_2          0x00000120 /* HEADER_LOG_2 Register */
-#define PCIE_CFG_HEADER_LOG_3          0x00000124 /* HEADER_LOG_3 Register */
-#define PCIE_CFG_HEADER_LOG_4          0x00000128 /* HEADER_LOG_4 Register */
-#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER 0x0000013c /* VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER Register */
-#define PCIE_CFG_PORT_VC_CAPABILITY    0x00000140 /* PORT_VC_CAPABILITY Register */
-#define PCIE_CFG_PORT_VC_CAPABILITY_2  0x00000144 /* PORT_VC_CAPABILITY_2 Register */
-#define PCIE_CFG_PORT_VC_STATUS_CONTROL 0x00000148 /* PORT_VC_STATUS_CONTROL Register */
-#define PCIE_CFG_VC_RESOURCE_CAPABILITY 0x0000014c /* VC_RESOURCE_CAPABILITY Register */
-#define PCIE_CFG_VC_RESOURCE_CONTROL   0x00000150 /* VC_RESOURCE_CONTROL Register */
-#define PCIE_CFG_VC_RESOURCE_STATUS    0x00000154 /* VC_RESOURCE_STATUS Register */
-#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER 0x00000160 /* DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER Register */
-#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW 0x00000164 /* DEVICE_SERIAL_NO_LOWER_DW Register */
-#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW 0x00000168 /* DEVICE_SERIAL_NO_UPPER_DW Register */
-#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER 0x0000016c /* POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER Register */
-#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT 0x00000170 /* POWER_BUDGETING_DATA_SELECT Register */
-#define PCIE_CFG_POWER_BUDGETING_DATA  0x00000174 /* POWER_BUDGETING_DATA Register */
-#define PCIE_CFG_POWER_BUDGETING_CAPABILITY 0x00000178 /* POWER_BUDGETING_CAPABILITY Register */
-#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1 0x0000017c /* FIRMWARE_POWER_BUDGETING_2_1 Register */
-#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3 0x00000180 /* FIRMWARE_POWER_BUDGETING_4_3 Register */
-#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5 0x00000184 /* FIRMWARE_POWER_BUDGETING_6_5 Register */
-#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7 0x00000188 /* FIRMWARE_POWER_BUDGETING_8_7 Register */
-#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING 0x0000018c /* PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING Register */
-
-
-/****************************************************************************
- * BCM70012_TGT_TOP_PCIE_TL
- ***************************************************************************/
-#define PCIE_TL_TL_CONTROL             0x00000400 /* TL_CONTROL Register */
-#define PCIE_TL_TRANSACTION_CONFIGURATION 0x00000404 /* TRANSACTION_CONFIGURATION Register */
-
-
-/****************************************************************************
- * BCM70012_TGT_TOP_PCIE_DLL
- ***************************************************************************/
-#define PCIE_DLL_DATA_LINK_CONTROL     0x00000500 /* DATA_LINK_CONTROL Register */
-#define PCIE_DLL_DATA_LINK_STATUS      0x00000504 /* DATA_LINK_STATUS Register */
-
-
-/****************************************************************************
- * BCM70012_TGT_TOP_INTR
- ***************************************************************************/
-#define INTR_INTR_STATUS               0x00000700 /* Interrupt Status Register */
-#define INTR_INTR_SET                  0x00000704 /* Interrupt Set Register */
-#define INTR_INTR_CLR_REG              0x00000708 /* Interrupt Clear Register */
-#define INTR_INTR_MSK_STS_REG          0x0000070c /* Interrupt Mask Status Register */
-#define INTR_INTR_MSK_SET_REG          0x00000710 /* Interrupt Mask Set Register */
-#define INTR_INTR_MSK_CLR_REG          0x00000714 /* Interrupt Mask Clear Register */
-#define INTR_EOI_CTRL                  0x00000720 /* End of interrupt control register */
-
-
-/****************************************************************************
- * BCM70012_MISC_TOP_MISC1
- ***************************************************************************/
-#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0 0x00000c00 /* Tx DMA Descriptor List0 First Descriptor lower Address */
-#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0 0x00000c04 /* Tx DMA Descriptor List0 First Descriptor Upper Address */
-#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1 0x00000c08 /* Tx DMA Descriptor List1 First Descriptor Lower Address */
-#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1 0x00000c0c /* Tx DMA Descriptor List1 First Descriptor Upper Address */
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS 0x00000c10 /* Tx DMA Software Descriptor List Control and Status */
-#define MISC1_TX_DMA_ERROR_STATUS      0x00000c18 /* Tx DMA Engine Error Status */
-#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR 0x00000c1c /* Tx DMA List0 Current Descriptor Lower Address */
-#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR 0x00000c20 /* Tx DMA List0 Current Descriptor Upper Address */
-#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM 0x00000c24 /* Tx DMA List0 Current Descriptor Upper Address */
-#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR 0x00000c28 /* Tx DMA List1 Current Descriptor Lower Address */
-#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR 0x00000c2c /* Tx DMA List1 Current Descriptor Upper Address */
-#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM 0x00000c30 /* Tx DMA List1 Current Descriptor Upper Address */
-#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0 0x00000c34 /* Y Rx Descriptor List0 First Descriptor Lower Address */
-#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0 0x00000c38 /* Y Rx Descriptor List0 First Descriptor Upper Address */
-#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1 0x00000c3c /* Y Rx Descriptor List1 First Descriptor Lower Address */
-#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1 0x00000c40 /* Y Rx Descriptor List1 First Descriptor Upper Address */
-#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS 0x00000c44 /* Y Rx Software Descriptor List Control and Status */
-#define MISC1_Y_RX_ERROR_STATUS        0x00000c4c /* Y Rx Engine Error Status */
-#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR 0x00000c50 /* Y Rx List0 Current Descriptor Lower Address */
-#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR 0x00000c54 /* Y Rx List0 Current Descriptor Upper Address */
-#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT  0x00000c58 /* Y Rx List0 Current Descriptor Byte Count */
-#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR 0x00000c5c /* Y Rx List1 Current Descriptor Lower address */
-#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR 0x00000c60 /* Y Rx List1 Current Descriptor Upper address */
-#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT  0x00000c64 /* Y Rx List1 Current Descriptor Byte Count */
-#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0 0x00000c68 /* UV Rx Descriptor List0 First Descriptor lower Address */
-#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0 0x00000c6c /* UV Rx Descriptor List0 First Descriptor Upper Address */
-#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1 0x00000c70 /* UV Rx Descriptor List1 First Descriptor Lower Address */
-#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1 0x00000c74 /* UV Rx Descriptor List1 First Descriptor Upper Address */
-#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS 0x00000c78 /* UV Rx Software Descriptor List Control and Status */
-#define MISC1_UV_RX_ERROR_STATUS       0x00000c7c /* UV Rx Engine Error Status */
-#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR 0x00000c80 /* UV Rx List0 Current Descriptor Lower Address */
-#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR 0x00000c84 /* UV Rx List0 Current Descriptor Upper Address */
-#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT 0x00000c88 /* UV Rx List0 Current Descriptor Byte Count */
-#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR 0x00000c8c /* UV Rx List1 Current Descriptor Lower Address */
-#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR 0x00000c90 /* UV Rx List1 Current Descriptor Upper Address */
-#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT 0x00000c94 /* UV Rx List1 Current Descriptor Byte Count */
-#define MISC1_DMA_DEBUG_OPTIONS_REG    0x00000c98 /* DMA Debug Options Register */
-#define MISC1_READ_CHANNEL_ERROR_STATUS 0x00000c9c /* Read Channel Error Status */
-#define MISC1_PCIE_DMA_CTRL            0x00000ca0 /* PCIE DMA Control Register */
-
-
-/****************************************************************************
- * BCM70012_MISC_TOP_MISC2
- ***************************************************************************/
-#define MISC2_GLOBAL_CTRL              0x00000d00 /* Global Control Register */
-#define MISC2_INTERNAL_STATUS          0x00000d04 /* Internal Status Register */
-#define MISC2_INTERNAL_STATUS_MUX_CTRL 0x00000d08 /* Internal Debug Mux Control */
-#define MISC2_DEBUG_FIFO_LENGTH        0x00000d0c /* Debug FIFO Length */
-
-
-/****************************************************************************
- * BCM70012_MISC_TOP_MISC3
- ***************************************************************************/
-#define MISC3_RESET_CTRL               0x00000e00 /* Reset Control Register */
-#define MISC3_BIST_CTRL                0x00000e04 /* BIST Control Register */
-#define MISC3_BIST_STATUS              0x00000e08 /* BIST Status Register */
-#define MISC3_RX_CHECKSUM              0x00000e0c /* Receive Checksum */
-#define MISC3_TX_CHECKSUM              0x00000e10 /* Transmit Checksum */
-#define MISC3_ECO_CTRL_CORE            0x00000e14 /* ECO Core Reset Control Register */
-#define MISC3_CSI_TEST_CTRL            0x00000e18 /* CSI Test Control Register */
-#define MISC3_HD_DVI_TEST_CTRL         0x00000e1c /* HD DVI Test Control Register */
-
-
-/****************************************************************************
- * BCM70012_MISC_TOP_MISC_PERST
- ***************************************************************************/
-#define MISC_PERST_ECO_CTRL_PERST      0x00000e80 /* ECO PCIE Reset Control Register */
-#define MISC_PERST_DECODER_CTRL        0x00000e84 /* Decoder Control Register */
-#define MISC_PERST_CCE_STATUS          0x00000e88 /* Config Copy Engine Status */
-#define MISC_PERST_PCIE_DEBUG          0x00000e8c /* PCIE Debug Control Register */
-#define MISC_PERST_PCIE_DEBUG_STATUS   0x00000e90 /* PCIE Debug Status Register */
-#define MISC_PERST_VREG_CTRL           0x00000e94 /* Voltage Regulator Control Register */
-#define MISC_PERST_MEM_CTRL            0x00000e98 /* Memory Control Register */
-#define MISC_PERST_CLOCK_CTRL          0x00000e9c /* Clock Control Register */
-
-
-/****************************************************************************
- * BCM70012_MISC_TOP_GISB_ARBITER
- ***************************************************************************/
-#define GISB_ARBITER_REVISION          0x00000f00 /* GISB ARBITER REVISION */
-#define GISB_ARBITER_SCRATCH           0x00000f04 /* GISB ARBITER Scratch Register */
-#define GISB_ARBITER_REQ_MASK          0x00000f08 /* GISB ARBITER Master Request Mask Register */
-#define GISB_ARBITER_TIMER             0x00000f0c /* GISB ARBITER Timer Value Register */
-
-
-/****************************************************************************
- * BCM70012_OTP_TOP_OTP
- ***************************************************************************/
-#define OTP_CONFIG_INFO                0x00001400 /* OTP Configuration Register */
-#define OTP_CMD                        0x00001404 /* OTP Command Register */
-#define OTP_STATUS                     0x00001408 /* OTP Status Register */
-#define OTP_CONTENT_MISC               0x0000140c /* Content : Miscellaneous Register */
-#define OTP_CONTENT_AES_0              0x00001410 /* Content : AES Key 0 Register */
-#define OTP_CONTENT_AES_1              0x00001414 /* Content : AES Key 1 Register */
-#define OTP_CONTENT_AES_2              0x00001418 /* Content : AES Key 2 Register */
-#define OTP_CONTENT_AES_3              0x0000141c /* Content : AES Key 3 Register */
-#define OTP_CONTENT_SHA_0              0x00001420 /* Content : SHA Key 0 Register */
-#define OTP_CONTENT_SHA_1              0x00001424 /* Content : SHA Key 1 Register */
-#define OTP_CONTENT_SHA_2              0x00001428 /* Content : SHA Key 2 Register */
-#define OTP_CONTENT_SHA_3              0x0000142c /* Content : SHA Key 3 Register */
-#define OTP_CONTENT_SHA_4              0x00001430 /* Content : SHA Key 4 Register */
-#define OTP_CONTENT_SHA_5              0x00001434 /* Content : SHA Key 5 Register */
-#define OTP_CONTENT_SHA_6              0x00001438 /* Content : SHA Key 6 Register */
-#define OTP_CONTENT_SHA_7              0x0000143c /* Content : SHA Key 7 Register */
-#define OTP_CONTENT_CHECKSUM           0x00001440 /* Content : Checksum  Register */
-#define OTP_PROG_CTRL                  0x00001444 /* Programming Control Register */
-#define OTP_PROG_STATUS                0x00001448 /* Programming Status Register */
-#define OTP_PROG_PULSE                 0x0000144c /* Program Pulse Width Register */
-#define OTP_VERIFY_PULSE               0x00001450 /* Verify Pulse Width Register */
-#define OTP_PROG_MASK                  0x00001454 /* Program Mask Register */
-#define OTP_DATA_INPUT                 0x00001458 /* Data Input Register */
-#define OTP_DATA_OUTPUT                0x0000145c /* Data Output Register */
-
-
-/****************************************************************************
- * BCM70012_AES_TOP_AES
- ***************************************************************************/
-#define AES_CONFIG_INFO                0x00001800 /* AES Configuration Information Register */
-#define AES_CMD                        0x00001804 /* AES Command Register */
-#define AES_STATUS                     0x00001808 /* AES Status Register */
-#define AES_EEPROM_CONFIG              0x0000180c /* AES EEPROM Configuration Register */
-#define AES_EEPROM_DATA_0              0x00001810 /* AES EEPROM Data Register 0 */
-#define AES_EEPROM_DATA_1              0x00001814 /* AES EEPROM Data Register 1 */
-#define AES_EEPROM_DATA_2              0x00001818 /* AES EEPROM Data Register 2 */
-#define AES_EEPROM_DATA_3              0x0000181c /* AES EEPROM Data Register 3 */
-
-
-/****************************************************************************
- * BCM70012_DCI_TOP_DCI
- ***************************************************************************/
-#define DCI_CMD                        0x00001c00 /* DCI Command Register */
-#define DCI_STATUS                     0x00001c04 /* DCI Status Register */
-#define DCI_DRAM_BASE_ADDR             0x00001c08 /* DRAM Base Address Register */
-#define DCI_FIRMWARE_ADDR              0x00001c0c /* Firmware Address Register */
-#define DCI_FIRMWARE_DATA              0x00001c10 /* Firmware Data Register */
-#define DCI_SIGNATURE_DATA_0           0x00001c14 /* Signature Data Register 0 */
-#define DCI_SIGNATURE_DATA_1           0x00001c18 /* Signature Data Register 1 */
-#define DCI_SIGNATURE_DATA_2           0x00001c1c /* Signature Data Register 2 */
-#define DCI_SIGNATURE_DATA_3           0x00001c20 /* Signature Data Register 3 */
-#define DCI_SIGNATURE_DATA_4           0x00001c24 /* Signature Data Register 4 */
-#define DCI_SIGNATURE_DATA_5           0x00001c28 /* Signature Data Register 5 */
-#define DCI_SIGNATURE_DATA_6           0x00001c2c /* Signature Data Register 6 */
-#define DCI_SIGNATURE_DATA_7           0x00001c30 /* Signature Data Register 7 */
-
-
-/****************************************************************************
- * BCM70012_TGT_TOP_INTR
- ***************************************************************************/
-/****************************************************************************
- * INTR :: INTR_STATUS
- ***************************************************************************/
-/* INTR :: INTR_STATUS :: reserved0 [31:26] */
-#define INTR_INTR_STATUS_reserved0_MASK                            0xfc000000
-#define INTR_INTR_STATUS_reserved0_ALIGN                           0
-#define INTR_INTR_STATUS_reserved0_BITS                            6
-#define INTR_INTR_STATUS_reserved0_SHIFT                           26
-
-/* INTR :: INTR_STATUS :: PCIE_TGT_CA_ATTN [25:25] */
-#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_MASK                     0x02000000
-#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_ALIGN                    0
-#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_BITS                     1
-#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_SHIFT                    25
-
-/* INTR :: INTR_STATUS :: PCIE_TGT_UR_ATTN [24:24] */
-#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_MASK                     0x01000000
-#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_ALIGN                    0
-#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_BITS                     1
-#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_SHIFT                    24
-
-/* INTR :: INTR_STATUS :: reserved1 [23:14] */
-#define INTR_INTR_STATUS_reserved1_MASK                            0x00ffc000
-#define INTR_INTR_STATUS_reserved1_ALIGN                           0
-#define INTR_INTR_STATUS_reserved1_BITS                            10
-#define INTR_INTR_STATUS_reserved1_SHIFT                           14
-
-/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_ERR_INTR [13:13] */
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK                0x00002000
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_ALIGN               0
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_BITS                1
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_SHIFT               13
-
-/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_DONE_INTR [12:12] */
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK               0x00001000
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_ALIGN              0
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_BITS               1
-#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_SHIFT              12
-
-/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_ERR_INTR [11:11] */
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK                 0x00000800
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_ALIGN                0
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_BITS                 1
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_SHIFT                11
-
-/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_DONE_INTR [10:10] */
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK                0x00000400
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_ALIGN               0
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_BITS                1
-#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_SHIFT               10
-
-/* INTR :: INTR_STATUS :: L1_TX_DMA_ERR_INTR [09:09] */
-#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK                   0x00000200
-#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_ALIGN                  0
-#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_BITS                   1
-#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_SHIFT                  9
-
-/* INTR :: INTR_STATUS :: L1_TX_DMA_DONE_INTR [08:08] */
-#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK                  0x00000100
-#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_ALIGN                 0
-#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_BITS                  1
-#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_SHIFT                 8
-
-/* INTR :: INTR_STATUS :: reserved2 [07:06] */
-#define INTR_INTR_STATUS_reserved2_MASK                            0x000000c0
-#define INTR_INTR_STATUS_reserved2_ALIGN                           0
-#define INTR_INTR_STATUS_reserved2_BITS                            2
-#define INTR_INTR_STATUS_reserved2_SHIFT                           6
-
-/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_ERR_INTR [05:05] */
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK                0x00000020
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_ALIGN               0
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_BITS                1
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_SHIFT               5
-
-/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_DONE_INTR [04:04] */
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK               0x00000010
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_ALIGN              0
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_BITS               1
-#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_SHIFT              4
-
-/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_ERR_INTR [03:03] */
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK                 0x00000008
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_ALIGN                0
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_BITS                 1
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_SHIFT                3
-
-/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_DONE_INTR [02:02] */
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK                0x00000004
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_ALIGN               0
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_BITS                1
-#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_SHIFT               2
-
-/* INTR :: INTR_STATUS :: L0_TX_DMA_ERR_INTR [01:01] */
-#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK                   0x00000002
-#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_ALIGN                  0
-#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_BITS                   1
-#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_SHIFT                  1
-
-/* INTR :: INTR_STATUS :: L0_TX_DMA_DONE_INTR [00:00] */
-#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK                  0x00000001
-#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_ALIGN                 0
-#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_BITS                  1
-#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_SHIFT                 0
-
-
-/****************************************************************************
- * MISC1 :: TX_SW_DESC_LIST_CTRL_STS
- ***************************************************************************/
-/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_MASK              0xfffffff0
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN             0
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_BITS              28
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT             4
-
-/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK      0x00000008
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN     0
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS      1
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT     3
-
-/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK          0x00000004
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN         0
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS          1
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT         2
-
-/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_HALT_ON_ERROR [01:01] */
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_MASK   0x00000002
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_ALIGN  0
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_BITS   1
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_SHIFT  1
-
-/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_RUN_STOP [00:00] */
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK        0x00000001
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_ALIGN       0
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_BITS        1
-#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_SHIFT       0
-
-
-/****************************************************************************
- * MISC1 :: TX_DMA_ERROR_STATUS
- ***************************************************************************/
-/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved0 [31:10] */
-#define MISC1_TX_DMA_ERROR_STATUS_reserved0_MASK                   0xfffffc00
-#define MISC1_TX_DMA_ERROR_STATUS_reserved0_ALIGN                  0
-#define MISC1_TX_DMA_ERROR_STATUS_reserved0_BITS                   22
-#define MISC1_TX_DMA_ERROR_STATUS_reserved0_SHIFT                  10
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DESC_TX_ABORT_ERRORS [09:09] */
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK  0x00000200
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_ALIGN 0
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_BITS  1
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_SHIFT 9
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved1 [08:08] */
-#define MISC1_TX_DMA_ERROR_STATUS_reserved1_MASK                   0x00000100
-#define MISC1_TX_DMA_ERROR_STATUS_reserved1_ALIGN                  0
-#define MISC1_TX_DMA_ERROR_STATUS_reserved1_BITS                   1
-#define MISC1_TX_DMA_ERROR_STATUS_reserved1_SHIFT                  8
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DESC_TX_ABORT_ERRORS [07:07] */
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK  0x00000080
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_ALIGN 0
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_BITS  1
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_SHIFT 7
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved2 [06:06] */
-#define MISC1_TX_DMA_ERROR_STATUS_reserved2_MASK                   0x00000040
-#define MISC1_TX_DMA_ERROR_STATUS_reserved2_ALIGN                  0
-#define MISC1_TX_DMA_ERROR_STATUS_reserved2_BITS                   1
-#define MISC1_TX_DMA_ERROR_STATUS_reserved2_SHIFT                  6
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DMA_DATA_TX_ABORT_ERRORS [05:05] */
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000020
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_BITS 1
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_SHIFT 5
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_FIFO_FULL_ERRORS [04:04] */
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK      0x00000010
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_ALIGN     0
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_BITS      1
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_SHIFT     4
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved3 [03:03] */
-#define MISC1_TX_DMA_ERROR_STATUS_reserved3_MASK                   0x00000008
-#define MISC1_TX_DMA_ERROR_STATUS_reserved3_ALIGN                  0
-#define MISC1_TX_DMA_ERROR_STATUS_reserved3_BITS                   1
-#define MISC1_TX_DMA_ERROR_STATUS_reserved3_SHIFT                  3
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DMA_DATA_TX_ABORT_ERRORS [02:02] */
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000004
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_BITS 1
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_SHIFT 2
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_FIFO_FULL_ERRORS [01:01] */
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK      0x00000002
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_ALIGN     0
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_BITS      1
-#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_SHIFT     1
-
-/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved4 [00:00] */
-#define MISC1_TX_DMA_ERROR_STATUS_reserved4_MASK                   0x00000001
-#define MISC1_TX_DMA_ERROR_STATUS_reserved4_ALIGN                  0
-#define MISC1_TX_DMA_ERROR_STATUS_reserved4_BITS                   1
-#define MISC1_TX_DMA_ERROR_STATUS_reserved4_SHIFT                  0
-
-
-/****************************************************************************
- * MISC1 :: Y_RX_ERROR_STATUS
- ***************************************************************************/
-/* MISC1 :: Y_RX_ERROR_STATUS :: reserved0 [31:14] */
-#define MISC1_Y_RX_ERROR_STATUS_reserved0_MASK                     0xffffc000
-#define MISC1_Y_RX_ERROR_STATUS_reserved0_ALIGN                    0
-#define MISC1_Y_RX_ERROR_STATUS_reserved0_BITS                     18
-#define MISC1_Y_RX_ERROR_STATUS_reserved0_SHIFT                    14
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK          0x00002000
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN         0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS          1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT         13
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK           0x00001000
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN          0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS           1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT          12
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK          0x00000800
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN         0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS          1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT         11
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK           0x00000400
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN          0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS           1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT          10
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK    0x00000200
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN   0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS    1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT   9
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: reserved1 [08:08] */
-#define MISC1_Y_RX_ERROR_STATUS_reserved1_MASK                     0x00000100
-#define MISC1_Y_RX_ERROR_STATUS_reserved1_ALIGN                    0
-#define MISC1_Y_RX_ERROR_STATUS_reserved1_BITS                     1
-#define MISC1_Y_RX_ERROR_STATUS_reserved1_SHIFT                    8
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK    0x00000080
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN   0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS    1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT   7
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: reserved2 [06:05] */
-#define MISC1_Y_RX_ERROR_STATUS_reserved2_MASK                     0x00000060
-#define MISC1_Y_RX_ERROR_STATUS_reserved2_ALIGN                    0
-#define MISC1_Y_RX_ERROR_STATUS_reserved2_BITS                     2
-#define MISC1_Y_RX_ERROR_STATUS_reserved2_SHIFT                    5
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK        0x00000010
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN       0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS        1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT       4
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: reserved3 [03:02] */
-#define MISC1_Y_RX_ERROR_STATUS_reserved3_MASK                     0x0000000c
-#define MISC1_Y_RX_ERROR_STATUS_reserved3_ALIGN                    0
-#define MISC1_Y_RX_ERROR_STATUS_reserved3_BITS                     2
-#define MISC1_Y_RX_ERROR_STATUS_reserved3_SHIFT                    2
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK        0x00000002
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN       0
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS        1
-#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT       1
-
-/* MISC1 :: Y_RX_ERROR_STATUS :: reserved4 [00:00] */
-#define MISC1_Y_RX_ERROR_STATUS_reserved4_MASK                     0x00000001
-#define MISC1_Y_RX_ERROR_STATUS_reserved4_ALIGN                    0
-#define MISC1_Y_RX_ERROR_STATUS_reserved4_BITS                     1
-#define MISC1_Y_RX_ERROR_STATUS_reserved4_SHIFT                    0
-
-
-/****************************************************************************
- * MISC1 :: UV_RX_ERROR_STATUS
- ***************************************************************************/
-/* MISC1 :: UV_RX_ERROR_STATUS :: reserved0 [31:14] */
-#define MISC1_UV_RX_ERROR_STATUS_reserved0_MASK                    0xffffc000
-#define MISC1_UV_RX_ERROR_STATUS_reserved0_ALIGN                   0
-#define MISC1_UV_RX_ERROR_STATUS_reserved0_BITS                    18
-#define MISC1_UV_RX_ERROR_STATUS_reserved0_SHIFT                   14
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK         0x00002000
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN        0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS         1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT        13
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK          0x00001000
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN         0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS          1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT         12
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK         0x00000800
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN        0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS         1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT        11
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK          0x00000400
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN         0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS          1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT         10
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK   0x00000200
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN  0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS   1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT  9
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: reserved1 [08:08] */
-#define MISC1_UV_RX_ERROR_STATUS_reserved1_MASK                    0x00000100
-#define MISC1_UV_RX_ERROR_STATUS_reserved1_ALIGN                   0
-#define MISC1_UV_RX_ERROR_STATUS_reserved1_BITS                    1
-#define MISC1_UV_RX_ERROR_STATUS_reserved1_SHIFT                   8
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK   0x00000080
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN  0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS   1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT  7
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: reserved2 [06:05] */
-#define MISC1_UV_RX_ERROR_STATUS_reserved2_MASK                    0x00000060
-#define MISC1_UV_RX_ERROR_STATUS_reserved2_ALIGN                   0
-#define MISC1_UV_RX_ERROR_STATUS_reserved2_BITS                    2
-#define MISC1_UV_RX_ERROR_STATUS_reserved2_SHIFT                   5
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK       0x00000010
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN      0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS       1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT      4
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: reserved3 [03:02] */
-#define MISC1_UV_RX_ERROR_STATUS_reserved3_MASK                    0x0000000c
-#define MISC1_UV_RX_ERROR_STATUS_reserved3_ALIGN                   0
-#define MISC1_UV_RX_ERROR_STATUS_reserved3_BITS                    2
-#define MISC1_UV_RX_ERROR_STATUS_reserved3_SHIFT                   2
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK       0x00000002
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN      0
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS       1
-#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT      1
-
-/* MISC1 :: UV_RX_ERROR_STATUS :: reserved4 [00:00] */
-#define MISC1_UV_RX_ERROR_STATUS_reserved4_MASK                    0x00000001
-#define MISC1_UV_RX_ERROR_STATUS_reserved4_ALIGN                   0
-#define MISC1_UV_RX_ERROR_STATUS_reserved4_BITS                    1
-#define MISC1_UV_RX_ERROR_STATUS_reserved4_SHIFT                   0
-
-/****************************************************************************
- * Datatype Definitions.
- ***************************************************************************/
-#endif /* #ifndef MACFILE_H__ */
-
-/* End of File */
-
diff --git a/drivers/staging/crystalhd/crystalhd.h b/drivers/staging/crystalhd/crystalhd.h
deleted file mode 100644 (file)
index b3a550b..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef _CRYSTALHD_H_
-#define _CRYSTALHD_H_
-
-#include "bc_dts_defs.h"
-#include "crystalhd_misc.h"
-#include "bc_dts_glob_lnx.h"
-#include "crystalhd_hw.h"
-#include "crystalhd_cmds.h"
-#include "crystalhd_lnx.h"
-#include "bcm_70012_regs.h"
-#include "crystalhd_fw_if.h"
-
-#endif
diff --git a/drivers/staging/crystalhd/crystalhd_cmds.c b/drivers/staging/crystalhd/crystalhd_cmds.c
deleted file mode 100644 (file)
index 642f438..0000000
+++ /dev/null
@@ -1,1066 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_cmds . c
- *
- *  Description:
- *             BCM70010 Linux driver user command interfaces.
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#include "crystalhd.h"
-
-static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx)
-{
-       struct crystalhd_user *user = NULL;
-       int i;
-
-       for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
-               if (!ctx->user[i].in_use) {
-                       user = &ctx->user[i];
-                       break;
-               }
-       }
-
-       return user;
-}
-
-static int bc_cproc_get_user_count(struct crystalhd_cmd *ctx)
-{
-       int i, count = 0;
-
-       for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
-               if (ctx->user[i].in_use)
-                       count++;
-       }
-
-       return count;
-}
-
-static void bc_cproc_mark_pwr_state(struct crystalhd_cmd *ctx)
-{
-       int i;
-
-       for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
-               if (!ctx->user[i].in_use)
-                       continue;
-               if (ctx->user[i].mode == DTS_DIAG_MODE ||
-                   ctx->user[i].mode == DTS_PLAYBACK_MODE) {
-                       ctx->pwr_state_change = 1;
-                       break;
-               }
-       }
-}
-
-static enum BC_STATUS bc_cproc_notify_mode(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-       int rc = 0, i = 0;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (ctx->user[idata->u_id].mode != DTS_MODE_INV) {
-               BCMLOG_ERR("Close the handle first..\n");
-               return BC_STS_ERR_USAGE;
-       }
-       if (idata->udata.u.NotifyMode.Mode == DTS_MONITOR_MODE) {
-               ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode;
-               return BC_STS_SUCCESS;
-       }
-       if (ctx->state != BC_LINK_INVALID) {
-               BCMLOG_ERR("Link invalid state %d\n", ctx->state);
-               return BC_STS_ERR_USAGE;
-       }
-       /* Check for duplicate playback sessions..*/
-       for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
-               if (ctx->user[i].mode == DTS_DIAG_MODE ||
-                   ctx->user[i].mode == DTS_PLAYBACK_MODE) {
-                       BCMLOG_ERR("multiple playback sessions are not supported..\n");
-                       return BC_STS_ERR_USAGE;
-               }
-       }
-       ctx->cin_wait_exit = 0;
-       ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode;
-       /* Setup mmap pool for uaddr sgl mapping..*/
-       rc = crystalhd_create_dio_pool(ctx->adp, BC_LINK_MAX_SGLS);
-       if (rc)
-               return BC_STS_ERROR;
-
-       /* Setup Hardware DMA rings */
-       return crystalhd_hw_setup_dma_rings(&ctx->hw_ctx);
-}
-
-static enum BC_STATUS bc_cproc_get_version(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-       idata->udata.u.VerInfo.DriverMajor = crystalhd_kmod_major;
-       idata->udata.u.VerInfo.DriverMinor = crystalhd_kmod_minor;
-       idata->udata.u.VerInfo.DriverRevision   = crystalhd_kmod_rev;
-       return BC_STS_SUCCESS;
-}
-
-
-static enum BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx,
-                                       struct crystalhd_ioctl_data *idata)
-{
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       crystalhd_pci_cfg_rd(ctx->adp, 0, 2,
-                          (uint32_t *)&idata->udata.u.hwType.PciVenId);
-       crystalhd_pci_cfg_rd(ctx->adp, 2, 2,
-                          (uint32_t *)&idata->udata.u.hwType.PciDevId);
-       crystalhd_pci_cfg_rd(ctx->adp, 8, 1,
-                          (uint32_t *)&idata->udata.u.hwType.HwRev);
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata)
-{
-       if (!ctx || !idata)
-               return BC_STS_INV_ARG;
-       idata->udata.u.regAcc.Value = bc_dec_reg_rd(ctx->adp,
-                                       idata->udata.u.regAcc.Offset);
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata)
-{
-       if (!ctx || !idata)
-               return BC_STS_INV_ARG;
-
-       bc_dec_reg_wr(ctx->adp, idata->udata.u.regAcc.Offset,
-                     idata->udata.u.regAcc.Value);
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-       if (!ctx || !idata)
-               return BC_STS_INV_ARG;
-
-       idata->udata.u.regAcc.Value = crystalhd_reg_rd(ctx->adp,
-                                       idata->udata.u.regAcc.Offset);
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-       if (!ctx || !idata)
-               return BC_STS_INV_ARG;
-
-       crystalhd_reg_wr(ctx->adp, idata->udata.u.regAcc.Offset,
-                      idata->udata.u.regAcc.Value);
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata || !idata->add_cdata)
-               return BC_STS_INV_ARG;
-
-       if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
-               BCMLOG_ERR("insufficient buffer\n");
-               return BC_STS_INV_ARG;
-       }
-       sts = crystalhd_mem_rd(ctx->adp, idata->udata.u.devMem.StartOff,
-                            idata->udata.u.devMem.NumDwords,
-                            (uint32_t *)idata->add_cdata);
-       return sts;
-
-}
-
-static enum BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata || !idata->add_cdata)
-               return BC_STS_INV_ARG;
-
-       if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
-               BCMLOG_ERR("insufficient buffer\n");
-               return BC_STS_INV_ARG;
-       }
-
-       sts = crystalhd_mem_wr(ctx->adp, idata->udata.u.devMem.StartOff,
-                            idata->udata.u.devMem.NumDwords,
-                            (uint32_t *)idata->add_cdata);
-       return sts;
-}
-
-static enum BC_STATUS bc_cproc_cfg_rd(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata)
-{
-       uint32_t ix, cnt, off, len;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       uint32_t *temp;
-
-       if (!ctx || !idata)
-               return BC_STS_INV_ARG;
-
-       temp = (uint32_t *) idata->udata.u.pciCfg.pci_cfg_space;
-       off = idata->udata.u.pciCfg.Offset;
-       len = idata->udata.u.pciCfg.Size;
-
-       if (len <= 4)
-               return crystalhd_pci_cfg_rd(ctx->adp, off, len, temp);
-
-       /* Truncate to dword alignment..*/
-       len = 4;
-       cnt = idata->udata.u.pciCfg.Size / len;
-       for (ix = 0; ix < cnt; ix++) {
-               sts = crystalhd_pci_cfg_rd(ctx->adp, off, len, &temp[ix]);
-               if (sts != BC_STS_SUCCESS) {
-                       BCMLOG_ERR("config read : %d\n", sts);
-                       return sts;
-               }
-               off += len;
-       }
-
-       return sts;
-}
-
-static enum BC_STATUS bc_cproc_cfg_wr(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata)
-{
-       uint32_t ix, cnt, off, len;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       uint32_t *temp;
-
-       if (!ctx || !idata)
-               return BC_STS_INV_ARG;
-
-       temp = (uint32_t *) idata->udata.u.pciCfg.pci_cfg_space;
-       off = idata->udata.u.pciCfg.Offset;
-       len = idata->udata.u.pciCfg.Size;
-
-       if (len <= 4)
-               return crystalhd_pci_cfg_wr(ctx->adp, off, len, temp[0]);
-
-       /* Truncate to dword alignment..*/
-       len = 4;
-       cnt = idata->udata.u.pciCfg.Size / len;
-       for (ix = 0; ix < cnt; ix++) {
-               sts = crystalhd_pci_cfg_wr(ctx->adp, off, len, temp[ix]);
-               if (sts != BC_STS_SUCCESS) {
-                       BCMLOG_ERR("config write : %d\n", sts);
-                       return sts;
-               }
-               off += len;
-       }
-
-       return sts;
-}
-
-static enum BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (ctx->state != BC_LINK_INVALID) {
-               BCMLOG_ERR("Link invalid state %d\n", ctx->state);
-               return BC_STS_ERR_USAGE;
-       }
-
-       sts = crystalhd_download_fw(ctx->adp, (uint8_t *)idata->add_cdata,
-                                 idata->add_cdata_sz);
-
-       if (sts != BC_STS_SUCCESS)
-               BCMLOG_ERR("Firmware Download Failure!! - %d\n", sts);
-       else
-               ctx->state |= BC_LINK_INIT;
-
-       return sts;
-}
-
-/*
- * We use the FW_CMD interface to sync up playback state with application
- * and  firmware. This function will perform the required pre and post
- * processing of the Firmware commands.
- *
- * Pause -
- *     Disable capture after decoder pause.
- * Resume -
- *     First enable capture and issue decoder resume command.
- * Flush -
- *     Abort pending input transfers and issue decoder flush command.
- *
- */
-static enum BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx,
-                                       struct crystalhd_ioctl_data *idata)
-{
-       enum BC_STATUS sts;
-       uint32_t *cmd;
-
-       if (!(ctx->state & BC_LINK_INIT)) {
-               BCMLOG_ERR("Link invalid state %d\n", ctx->state);
-               return BC_STS_ERR_USAGE;
-       }
-
-       cmd = idata->udata.u.fwCmd.cmd;
-
-       /* Pre-Process */
-       if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) {
-               if (!cmd[3]) {
-                       ctx->state &= ~BC_LINK_PAUSED;
-                       crystalhd_hw_unpause(&ctx->hw_ctx);
-               }
-       } else if (cmd[0] == eCMD_C011_DEC_CHAN_FLUSH) {
-               BCMLOG(BCMLOG_INFO, "Flush issued\n");
-               if (cmd[3])
-                       ctx->cin_wait_exit = 1;
-       }
-
-       sts = crystalhd_do_fw_cmd(&ctx->hw_ctx, &idata->udata.u.fwCmd);
-
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG(BCMLOG_INFO, "fw cmd %x failed\n", cmd[0]);
-               return sts;
-       }
-
-       /* Post-Process */
-       if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) {
-               if (cmd[3]) {
-                       ctx->state |= BC_LINK_PAUSED;
-                       crystalhd_hw_pause(&ctx->hw_ctx);
-               }
-       }
-
-       return sts;
-}
-
-static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd,
-                                 wait_queue_head_t *event, enum BC_STATUS sts)
-{
-       if (!dio_hnd || !event) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return;
-       }
-       if (sts == BC_STS_IO_USER_ABORT)
-               return;
-
-       dio_hnd->uinfo.comp_sts = sts;
-       dio_hnd->uinfo.ev_sts = 1;
-       crystalhd_set_event(event);
-}
-
-static enum BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx)
-{
-       wait_queue_head_t sleep_ev;
-       int rc = 0;
-
-       if (ctx->state & BC_LINK_SUSPEND)
-               return BC_STS_IO_USER_ABORT;
-
-       if (ctx->cin_wait_exit) {
-               ctx->cin_wait_exit = 0;
-               return BC_STS_CMD_CANCELLED;
-       }
-       crystalhd_create_event(&sleep_ev);
-       crystalhd_wait_on_event(&sleep_ev, 0, 100, rc, 0);
-       if (rc == -EINTR)
-               return BC_STS_IO_USER_ABORT;
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
-                                  struct crystalhd_ioctl_data *idata,
-                                  struct crystalhd_dio_req *dio)
-{
-       uint32_t tx_listid = 0;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       wait_queue_head_t event;
-       int rc = 0;
-
-       if (!ctx || !idata || !dio) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       crystalhd_create_event(&event);
-
-       ctx->tx_list_id = 0;
-       /* msleep_interruptible(2000); */
-       sts = crystalhd_hw_post_tx(&ctx->hw_ctx, dio, bc_proc_in_completion,
-                                &event, &tx_listid,
-                                idata->udata.u.ProcInput.Encrypted);
-
-       while (sts == BC_STS_BUSY) {
-               sts = bc_cproc_codein_sleep(ctx);
-               if (sts != BC_STS_SUCCESS)
-                       break;
-               sts = crystalhd_hw_post_tx(&ctx->hw_ctx, dio,
-                                        bc_proc_in_completion,
-                                        &event, &tx_listid,
-                                        idata->udata.u.ProcInput.Encrypted);
-       }
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG(BCMLOG_DBG, "_hw_txdma returning sts:%d\n", sts);
-               return sts;
-       }
-       if (ctx->cin_wait_exit)
-               ctx->cin_wait_exit = 0;
-
-       ctx->tx_list_id = tx_listid;
-
-       /* _post() succeeded.. wait for the completion. */
-       crystalhd_wait_on_event(&event, (dio->uinfo.ev_sts), 3000, rc, 0);
-       ctx->tx_list_id = 0;
-       if (!rc) {
-               return dio->uinfo.comp_sts;
-       } else if (rc == -EBUSY) {
-               BCMLOG(BCMLOG_DBG, "_tx_post() T/O\n");
-               sts = BC_STS_TIMEOUT;
-       } else if (rc == -EINTR) {
-               BCMLOG(BCMLOG_DBG, "Tx Wait Signal int.\n");
-               sts = BC_STS_IO_USER_ABORT;
-       } else {
-               sts = BC_STS_IO_ERROR;
-       }
-
-       /* We are cancelling the IO from the same context as the _post().
-        * so no need to wait on the event again.. the return itself
-        * ensures the release of our resources.
-        */
-       crystalhd_hw_cancel_tx(&ctx->hw_ctx, tx_listid);
-
-       return sts;
-}
-
-/* Helper function to check on user buffers */
-static enum BC_STATUS bc_cproc_check_inbuffs(bool pin, void *ubuff,
-                                uint32_t ub_sz, uint32_t uv_off, bool en_422)
-{
-       if (!ubuff || !ub_sz) {
-               BCMLOG_ERR("%s->Invalid Arg %p %x\n",
-                       ((pin) ? "TX" : "RX"), ubuff, ub_sz);
-               return BC_STS_INV_ARG;
-       }
-
-       /* Check for alignment */
-       if (((uintptr_t)ubuff) & 0x03) {
-               BCMLOG_ERR(
-                       "%s-->Un-aligned address not implemented yet.. %p\n",
-                        ((pin) ? "TX" : "RX"), ubuff);
-               return BC_STS_NOT_IMPL;
-       }
-       if (pin)
-               return BC_STS_SUCCESS;
-
-       if (!en_422 && !uv_off) {
-               BCMLOG_ERR("Need UV offset for 420 mode.\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (en_422 && uv_off) {
-               BCMLOG_ERR("UV offset in 422 mode ??\n");
-               return BC_STS_INV_ARG;
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_proc_input(struct crystalhd_cmd *ctx,
-                                       struct crystalhd_ioctl_data *idata)
-{
-       void *ubuff;
-       uint32_t ub_sz;
-       struct crystalhd_dio_req *dio_hnd = NULL;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       ubuff = idata->udata.u.ProcInput.pDmaBuff;
-       ub_sz = idata->udata.u.ProcInput.BuffSz;
-
-       sts = bc_cproc_check_inbuffs(1, ubuff, ub_sz, 0, 0);
-       if (sts != BC_STS_SUCCESS)
-               return sts;
-
-       sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, 0, 0, 1, &dio_hnd);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("dio map - %d\n", sts);
-               return sts;
-       }
-
-       if (!dio_hnd)
-               return BC_STS_ERROR;
-
-       sts = bc_cproc_hw_txdma(ctx, idata, dio_hnd);
-
-       crystalhd_unmap_dio(ctx->adp, dio_hnd);
-
-       return sts;
-}
-
-static enum BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
-                                      struct crystalhd_ioctl_data *idata)
-{
-       void *ubuff;
-       uint32_t ub_sz, uv_off;
-       bool en_422;
-       struct crystalhd_dio_req *dio_hnd = NULL;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       ubuff = idata->udata.u.RxBuffs.YuvBuff;
-       ub_sz = idata->udata.u.RxBuffs.YuvBuffSz;
-       uv_off = idata->udata.u.RxBuffs.UVbuffOffset;
-       en_422 = idata->udata.u.RxBuffs.b422Mode;
-
-       sts = bc_cproc_check_inbuffs(0, ubuff, ub_sz, uv_off, en_422);
-       if (sts != BC_STS_SUCCESS)
-               return sts;
-
-       sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, uv_off,
-                             en_422, 0, &dio_hnd);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("dio map - %d\n", sts);
-               return sts;
-       }
-
-       if (!dio_hnd)
-               return BC_STS_ERROR;
-
-       sts = crystalhd_hw_add_cap_buffer(&ctx->hw_ctx, dio_hnd,
-                                        (ctx->state == BC_LINK_READY));
-       if ((sts != BC_STS_SUCCESS) && (sts != BC_STS_BUSY)) {
-               crystalhd_unmap_dio(ctx->adp, dio_hnd);
-               return sts;
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx,
-                                    struct crystalhd_dio_req *dio)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       sts = crystalhd_hw_add_cap_buffer(&ctx->hw_ctx, dio, 0);
-       if (sts != BC_STS_SUCCESS)
-               return sts;
-
-       ctx->state |= BC_LINK_FMT_CHG;
-       if (ctx->state == BC_LINK_READY)
-               sts = crystalhd_hw_start_capture(&ctx->hw_ctx);
-
-       return sts;
-}
-
-static enum BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-       struct crystalhd_dio_req *dio = NULL;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       struct BC_DEC_OUT_BUFF *frame;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (!(ctx->state & BC_LINK_CAP_EN)) {
-               BCMLOG(BCMLOG_DBG, "Capture not enabled..%x\n", ctx->state);
-               return BC_STS_ERR_USAGE;
-       }
-
-       frame = &idata->udata.u.DecOutData;
-
-       sts = crystalhd_hw_get_cap_buffer(&ctx->hw_ctx, &frame->PibInfo, &dio);
-       if (sts != BC_STS_SUCCESS)
-               return (ctx->state & BC_LINK_SUSPEND) ?
-                                        BC_STS_IO_USER_ABORT : sts;
-
-       frame->Flags = dio->uinfo.comp_flags;
-
-       if (frame->Flags & COMP_FLAG_FMT_CHANGE)
-               return bc_cproc_fmt_change(ctx, dio);
-
-       frame->OutPutBuffs.YuvBuff = dio->uinfo.xfr_buff;
-       frame->OutPutBuffs.YuvBuffSz = dio->uinfo.xfr_len;
-       frame->OutPutBuffs.UVbuffOffset = dio->uinfo.uv_offset;
-       frame->OutPutBuffs.b422Mode = dio->uinfo.b422mode;
-
-       frame->OutPutBuffs.YBuffDoneSz = dio->uinfo.y_done_sz;
-       frame->OutPutBuffs.UVBuffDoneSz = dio->uinfo.uv_done_sz;
-
-       crystalhd_unmap_dio(ctx->adp, dio);
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
-                                       struct crystalhd_ioctl_data *idata)
-{
-       ctx->state |= BC_LINK_CAP_EN;
-       if (ctx->state == BC_LINK_READY)
-               return crystalhd_hw_start_capture(&ctx->hw_ctx);
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
-                                         struct crystalhd_ioctl_data *idata)
-{
-       struct crystalhd_dio_req *dio = NULL;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       struct BC_DEC_OUT_BUFF *frame;
-       uint32_t count;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (!(ctx->state & BC_LINK_CAP_EN))
-               return BC_STS_ERR_USAGE;
-
-       /* We should ack flush even when we are in paused/suspend state */
-       if (!(ctx->state & BC_LINK_READY))
-               return crystalhd_hw_stop_capture(&ctx->hw_ctx);
-
-       ctx->state &= ~(BC_LINK_CAP_EN|BC_LINK_FMT_CHG);
-
-       frame = &idata->udata.u.DecOutData;
-       for (count = 0; count < BC_RX_LIST_CNT; count++) {
-
-               sts = crystalhd_hw_get_cap_buffer(&ctx->hw_ctx,
-                                        &frame->PibInfo, &dio);
-               if (sts != BC_STS_SUCCESS)
-                       break;
-
-               crystalhd_unmap_dio(ctx->adp, dio);
-       }
-
-       return crystalhd_hw_stop_capture(&ctx->hw_ctx);
-}
-
-static enum BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
-                                   struct crystalhd_ioctl_data *idata)
-{
-       struct BC_DTS_STATS *stats;
-       struct crystalhd_hw_stats       hw_stats;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       crystalhd_hw_stats(&ctx->hw_ctx, &hw_stats);
-
-       stats = &idata->udata.u.drvStat;
-       stats->drvRLL = hw_stats.rdyq_count;
-       stats->drvFLL = hw_stats.freeq_count;
-       stats->DrvTotalFrmDropped = hw_stats.rx_errors;
-       stats->DrvTotalHWErrs = hw_stats.rx_errors + hw_stats.tx_errors;
-       stats->intCount = hw_stats.num_interrupts;
-       stats->DrvIgnIntrCnt = hw_stats.num_interrupts -
-                               hw_stats.dev_interrupts;
-       stats->TxFifoBsyCnt = hw_stats.cin_busy;
-       stats->pauseCount = hw_stats.pause_cnt;
-
-       if (ctx->pwr_state_change)
-               stats->pwr_state_change = 1;
-       if (ctx->state & BC_LINK_PAUSED)
-               stats->DrvPauseTime = 1;
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx,
-                                     struct crystalhd_ioctl_data *idata)
-{
-       crystalhd_hw_stats(&ctx->hw_ctx, NULL);
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS bc_cproc_chg_clk(struct crystalhd_cmd *ctx,
-                                 struct crystalhd_ioctl_data *idata)
-{
-       struct BC_CLOCK *clock;
-       uint32_t oldClk;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       clock = &idata->udata.u.clockValue;
-       oldClk = ctx->hw_ctx.core_clock_mhz;
-       ctx->hw_ctx.core_clock_mhz = clock->clk;
-
-       if (ctx->state & BC_LINK_READY) {
-               sts = crystalhd_hw_set_core_clock(&ctx->hw_ctx);
-               if (sts == BC_STS_CLK_NOCHG)
-                       ctx->hw_ctx.core_clock_mhz = oldClk;
-       }
-
-       clock->clk = ctx->hw_ctx.core_clock_mhz;
-
-       return sts;
-}
-
-/*=============== Cmd Proc Table.. ======================================*/
-static const struct crystalhd_cmd_tbl  g_crystalhd_cproc_tbl[] = {
-       { BCM_IOC_GET_VERSION,          bc_cproc_get_version,   0},
-       { BCM_IOC_GET_HWTYPE,           bc_cproc_get_hwtype,    0},
-       { BCM_IOC_REG_RD,               bc_cproc_reg_rd,        0},
-       { BCM_IOC_REG_WR,               bc_cproc_reg_wr,        0},
-       { BCM_IOC_FPGA_RD,              bc_cproc_link_reg_rd,   0},
-       { BCM_IOC_FPGA_WR,              bc_cproc_link_reg_wr,   0},
-       { BCM_IOC_MEM_RD,               bc_cproc_mem_rd,        0},
-       { BCM_IOC_MEM_WR,               bc_cproc_mem_wr,        0},
-       { BCM_IOC_RD_PCI_CFG,           bc_cproc_cfg_rd,        0},
-       { BCM_IOC_WR_PCI_CFG,           bc_cproc_cfg_wr,        1},
-       { BCM_IOC_FW_DOWNLOAD,          bc_cproc_download_fw,   1},
-       { BCM_IOC_FW_CMD,               bc_cproc_do_fw_cmd,     1},
-       { BCM_IOC_PROC_INPUT,           bc_cproc_proc_input,    1},
-       { BCM_IOC_ADD_RXBUFFS,          bc_cproc_add_cap_buff,  1},
-       { BCM_IOC_FETCH_RXBUFF,         bc_cproc_fetch_frame,   1},
-       { BCM_IOC_START_RX_CAP,         bc_cproc_start_capture, 1},
-       { BCM_IOC_FLUSH_RX_CAP,         bc_cproc_flush_cap_buffs, 1},
-       { BCM_IOC_GET_DRV_STAT,         bc_cproc_get_stats,     0},
-       { BCM_IOC_RST_DRV_STAT,         bc_cproc_reset_stats,   0},
-       { BCM_IOC_NOTIFY_MODE,          bc_cproc_notify_mode,   0},
-       { BCM_IOC_CHG_CLK,              bc_cproc_chg_clk, 0},
-       { BCM_IOC_END,                  NULL},
-};
-
-/*=============== Cmd Proc Functions.. ===================================*/
-
-/**
- * crystalhd_suspend - Power management suspend request.
- * @ctx: Command layer context.
- * @idata: Iodata - required for internal use.
- *
- * Return:
- *     status
- *
- * 1. Set the state to Suspend.
- * 2. Flush the Rx Buffers it will unmap all the buffers and
- *    stop the RxDMA engine.
- * 3. Cancel The TX Io and Stop Dma Engine.
- * 4. Put the DDR in to deep sleep.
- * 5. Stop the hardware putting it in to Reset State.
- *
- * Current gstreamer frame work does not provide any power management
- * related notification to user mode decoder plug-in. As a work-around
- * we pass on the power management notification to our plug-in by completing
- * all outstanding requests with BC_STS_IO_USER_ABORT return code.
- */
-enum BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx,
-                               struct crystalhd_ioctl_data *idata)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!ctx || !idata) {
-               BCMLOG_ERR("Invalid Parameters\n");
-               return BC_STS_ERROR;
-       }
-
-       if (ctx->state & BC_LINK_SUSPEND)
-               return BC_STS_SUCCESS;
-
-       if (ctx->state == BC_LINK_INVALID) {
-               BCMLOG(BCMLOG_DBG, "Nothing To Do Suspend Success\n");
-               return BC_STS_SUCCESS;
-       }
-
-       ctx->state |= BC_LINK_SUSPEND;
-
-       bc_cproc_mark_pwr_state(ctx);
-
-       if (ctx->state & BC_LINK_CAP_EN) {
-               sts = bc_cproc_flush_cap_buffs(ctx, idata);
-               if (sts != BC_STS_SUCCESS)
-                       return sts;
-       }
-
-       if (ctx->tx_list_id) {
-               sts = crystalhd_hw_cancel_tx(&ctx->hw_ctx, ctx->tx_list_id);
-               if (sts != BC_STS_SUCCESS)
-                       return sts;
-       }
-
-       sts = crystalhd_hw_suspend(&ctx->hw_ctx);
-       if (sts != BC_STS_SUCCESS)
-               return sts;
-
-       BCMLOG(BCMLOG_DBG, "BCM70012 suspend success\n");
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_resume - Resume frame capture.
- * @ctx: Command layer contextx.
- *
- * Return:
- *     status
- *
- *
- * Resume frame capture.
- *
- * PM_Resume can't resume the playback state back to pre-suspend state
- * because we don't keep video clip related information within driver.
- * To get back to the pre-suspend state App will re-open the device and
- * start a new playback session from the pre-suspend clip position.
- *
- */
-enum BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx)
-{
-       BCMLOG(BCMLOG_DBG, "crystalhd_resume Success %x\n", ctx->state);
-
-       bc_cproc_mark_pwr_state(ctx);
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_user_open - Create application handle.
- * @ctx: Command layer contextx.
- * @user_ctx: User ID context.
- *
- * Return:
- *     status
- *
- * Creates an application specific UID and allocates
- * application specific resources. HW layer initialization
- * is done for the first open request.
- */
-enum BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
-                           struct crystalhd_user **user_ctx)
-{
-       struct crystalhd_user *uc;
-
-       if (!ctx || !user_ctx) {
-               BCMLOG_ERR("Invalid arg..\n");
-               return BC_STS_INV_ARG;
-       }
-
-       uc = bc_cproc_get_uid(ctx);
-       if (!uc) {
-               BCMLOG(BCMLOG_INFO, "No free user context...\n");
-               return BC_STS_BUSY;
-       }
-
-       BCMLOG(BCMLOG_INFO, "Opening new user[%x] handle\n", uc->uid);
-
-       crystalhd_hw_open(&ctx->hw_ctx, ctx->adp);
-
-       uc->in_use = 1;
-
-       *user_ctx = uc;
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_user_close - Close application handle.
- * @ctx: Command layer contextx.
- * @uc: User ID context.
- *
- * Return:
- *     status
- *
- * Closer application handle and release app specific
- * resources.
- */
-enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx,
-                                        struct crystalhd_user *uc)
-{
-       uint32_t mode = uc->mode;
-
-       ctx->user[uc->uid].mode = DTS_MODE_INV;
-       ctx->user[uc->uid].in_use = 0;
-       ctx->cin_wait_exit = 1;
-       ctx->pwr_state_change = 0;
-
-       BCMLOG(BCMLOG_INFO, "Closing user[%x] handle\n", uc->uid);
-
-       if ((mode == DTS_DIAG_MODE) || (mode == DTS_PLAYBACK_MODE)) {
-               crystalhd_hw_free_dma_rings(&ctx->hw_ctx);
-               crystalhd_destroy_dio_pool(ctx->adp);
-       } else if (bc_cproc_get_user_count(ctx)) {
-               return BC_STS_SUCCESS;
-       }
-
-       crystalhd_hw_close(&ctx->hw_ctx);
-
-       ctx->state = BC_LINK_INVALID;
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_setup_cmd_context - Setup Command layer resources.
- * @ctx: Command layer contextx.
- * @adp: Adapter context
- *
- * Return:
- *     status
- *
- * Called at the time of driver load.
- */
-enum BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
-                                   struct crystalhd_adp *adp)
-{
-       int i = 0;
-
-       if (!ctx || !adp) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (ctx->adp)
-               BCMLOG(BCMLOG_DBG, "Resetting Cmd context delete missing..\n");
-
-       ctx->adp = adp;
-       for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
-               ctx->user[i].uid = i;
-               ctx->user[i].in_use = 0;
-               ctx->user[i].mode = DTS_MODE_INV;
-       }
-
-       /*Open and Close the Hardware to put it in to sleep state*/
-       crystalhd_hw_open(&ctx->hw_ctx, ctx->adp);
-       crystalhd_hw_close(&ctx->hw_ctx);
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_delete_cmd_context - Release Command layer resources.
- * @ctx: Command layer contextx.
- *
- * Return:
- *     status
- *
- * Called at the time of driver un-load.
- */
-enum BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
-{
-       BCMLOG(BCMLOG_DBG, "Deleting Command context..\n");
-
-       ctx->adp = NULL;
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_get_cmd_proc  - Cproc table lookup.
- * @ctx: Command layer contextx.
- * @cmd: IOCTL command code.
- * @uc: User ID context.
- *
- * Return:
- *     command proc function pointer
- *
- * This function checks the process context, application's
- * mode of operation and returns the function pointer
- * from the cproc table.
- */
-crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx,
-                                uint32_t cmd, struct crystalhd_user *uc)
-{
-       crystalhd_cmd_proc cproc = NULL;
-       unsigned int i, tbl_sz;
-
-       if (!ctx) {
-               BCMLOG_ERR("Invalid arg.. Cmd[%d]\n", cmd);
-               return NULL;
-       }
-
-       if ((cmd != BCM_IOC_GET_DRV_STAT) && (ctx->state & BC_LINK_SUSPEND)) {
-               BCMLOG_ERR("Invalid State [suspend Set].. Cmd[%d]\n", cmd);
-               return NULL;
-       }
-
-       tbl_sz = sizeof(g_crystalhd_cproc_tbl) /
-                                sizeof(struct crystalhd_cmd_tbl);
-       for (i = 0; i < tbl_sz; i++) {
-               if (g_crystalhd_cproc_tbl[i].cmd_id == cmd) {
-                       if ((uc->mode == DTS_MONITOR_MODE) &&
-                           (g_crystalhd_cproc_tbl[i].block_mon)) {
-                               BCMLOG(BCMLOG_INFO, "Blocking cmd %d\n", cmd);
-                               break;
-                       }
-                       cproc = g_crystalhd_cproc_tbl[i].cmd_proc;
-                       break;
-               }
-       }
-
-       return cproc;
-}
-
-/**
- * crystalhd_cmd_interrupt - ISR entry point
- * @ctx: Command layer contextx.
- *
- * Return:
- *     TRUE: If interrupt from bcm70012 device.
- *
- *
- * ISR entry point from OS layer.
- */
-bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx)
-{
-       if (!ctx) {
-               BCMLOG_ERR("Invalid arg..\n");
-               return false;
-       }
-
-       return crystalhd_hw_interrupt(ctx->adp, &ctx->hw_ctx);
-}
diff --git a/drivers/staging/crystalhd/crystalhd_cmds.h b/drivers/staging/crystalhd/crystalhd_cmds.h
deleted file mode 100644 (file)
index b5bf59d..0000000
+++ /dev/null
@@ -1,92 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_cmds . h
- *
- *  Description:
- *             BCM70010 Linux driver user command interfaces.
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#ifndef _CRYSTALHD_CMDS_H_
-#define _CRYSTALHD_CMDS_H_
-
-/*
- * NOTE:: This is the main interface file between the Linux layer
- *        and the hardware layer. This file will use the definitions
- *        from _dts_glob and dts_defs etc.. which are defined for
- *        windows.
- */
-
-#include "crystalhd.h"
-
-enum crystalhd_state {
-       BC_LINK_INVALID         = 0x00,
-       BC_LINK_INIT            = 0x01,
-       BC_LINK_CAP_EN          = 0x02,
-       BC_LINK_FMT_CHG         = 0x04,
-       BC_LINK_SUSPEND         = 0x10,
-       BC_LINK_PAUSED          = 0x20,
-       BC_LINK_READY   = (BC_LINK_INIT | BC_LINK_CAP_EN | BC_LINK_FMT_CHG),
-};
-
-struct crystalhd_user {
-       uint32_t        uid;
-       uint32_t        in_use;
-       uint32_t        mode;
-};
-
-#define DTS_MODE_INV   (-1)
-
-struct crystalhd_cmd {
-       uint32_t                state;
-       struct crystalhd_adp    *adp;
-       struct crystalhd_user   user[BC_LINK_MAX_OPENS];
-
-       spinlock_t              ctx_lock;
-       uint32_t                tx_list_id;
-       uint32_t                cin_wait_exit;
-       uint32_t                pwr_state_change;
-       struct crystalhd_hw     hw_ctx;
-};
-
-typedef enum BC_STATUS(*crystalhd_cmd_proc)(struct crystalhd_cmd *,
-                                        struct crystalhd_ioctl_data *);
-
-struct crystalhd_cmd_tbl {
-       uint32_t                cmd_id;
-       const crystalhd_cmd_proc        cmd_proc;
-       uint32_t                block_mon;
-};
-
-enum BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx,
-                                struct crystalhd_ioctl_data *idata);
-enum BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx);
-crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx,
-                                uint32_t cmd, struct crystalhd_user *uc);
-enum BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
-                                struct crystalhd_user **user_ctx);
-enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx,
-                                struct crystalhd_user *uc);
-enum BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
-                                struct crystalhd_adp *adp);
-enum BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx);
-bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx);
-
-#endif
diff --git a/drivers/staging/crystalhd/crystalhd_fw_if.h b/drivers/staging/crystalhd/crystalhd_fw_if.h
deleted file mode 100644 (file)
index 05615e2..0000000
+++ /dev/null
@@ -1,370 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_fw_if . h
- *
- *  Description:
- *             BCM70012 Firmware interface definitions.
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#ifndef _CRYSTALHD_FW_IF_H_
-#define _CRYSTALHD_FW_IF_H_
-
-/* TBD: Pull in only required defs into this file.. */
-
-/* User Data Header */
-struct user_data {
-       struct user_data        *next;
-       uint32_t                type;
-       uint32_t                size;
-};
-
-/*------------------------------------------------------*
- *    MPEG Extension to the PPB                         *
- *------------------------------------------------------*/
-struct ppb_mpeg {
-       uint32_t                to_be_defined;
-       uint32_t                valid;
-
-       /* Always valid, defaults to picture size if no
-          sequence display extension in the stream. */
-       uint32_t                display_horizontal_size;
-       uint32_t                display_vertical_size;
-
-       /* MPEG_VALID_PANSCAN
-          Offsets are a copy values from the MPEG stream. */
-       uint32_t                offset_count;
-       int32_t         horizontal_offset[3];
-       int32_t         vertical_offset[3];
-
-       /* MPEG_VALID_USERDATA
-          User data is in the form of a linked list. */
-       int32_t         userDataSize;
-       struct user_data        *userData;
-
-};
-
-
-/*------------------------------------------------------*
- *    VC1 Extension to the PPB                   *
- *------------------------------------------------------*/
-struct ppb_vc1 {
-       uint32_t                to_be_defined;
-       uint32_t                valid;
-
-       /* Always valid, defaults to picture size if no
-          sequence display extension in the stream. */
-       uint32_t                display_horizontal_size;
-       uint32_t                display_vertical_size;
-
-       /* VC1 pan scan windows */
-       uint32_t                num_panscan_windows;
-       int32_t         ps_horiz_offset[4];
-       int32_t         ps_vert_offset[4];
-       int32_t         ps_width[4];
-       int32_t         ps_height[4];
-
-       /* VC1_VALID_USERDATA
-          User data is in the form of a linked list. */
-       int32_t         userDataSize;
-       struct user_data        *userData;
-
-};
-
-/*------------------------------------------------------*
- *    H.264 Extension to the PPB                       *
- *------------------------------------------------------*/
-
-/**
- * @brief Film grain SEI message.
- *
- * Content of the film grain SEI message.
- */
-
-/* maximum number of model-values as for Thomson spec(standard says 5) */
-#define MAX_FGT_MODEL_VALUE     (3)
-
-/* maximum number of intervals(as many as 256 intervals?) */
-#define MAX_FGT_VALUE_INTERVAL (256)
-
-struct fgt_sei {
-       struct fgt_sei *next;
-       unsigned char
-                model_values[3][MAX_FGT_VALUE_INTERVAL][MAX_FGT_MODEL_VALUE];
-       unsigned char upper_bound[3][MAX_FGT_VALUE_INTERVAL];
-       unsigned char lower_bound[3][MAX_FGT_VALUE_INTERVAL];
-
-       unsigned char cancel_flag;      /* Cancel flag: 1 no film grain. */
-       unsigned char model_id; /* Model id. */
-
-       /* +unused SE based on Thomson spec */
-       unsigned char color_desc_flag;  /* Separate color description flag. */
-       unsigned char bit_depth_luma;   /* Bit depth luma minus 8. */
-       unsigned char bit_depth_chroma; /* Bit depth chroma minus 8. */
-       unsigned char full_range_flag;  /* Full range flag. */
-       unsigned char color_primaries;  /* Color primaries. */
-       unsigned char transfer_charact; /* Transfer characteristics. */
-       unsigned char matrix_coeff;             /*< Matrix coefficients. */
-       /* -unused SE based on Thomson spec */
-
-       unsigned char blending_mode_id; /* Blending mode. */
-       unsigned char log2_scale_factor;        /* Log2 scale factor (2-7). */
-       unsigned char comp_flag[3];     /* Components [0,2]
-                                        parameters present flag. */
-       unsigned char num_intervals_minus1[3]; /* Number of
-                                        intensity level intervals. */
-       unsigned char num_model_values[3];      /* Number of model values. */
-       uint16_t      repetition_period; /* Repetition period (0-16384) */
-
-};
-
-struct ppb_h264 {
-       /* 'valid' specifies which fields (or sets of
-        * fields) below are valid.  If the corresponding
-        * bit in 'valid' is NOT set then that field(s)
-        * is (are) not initialized. */
-       uint32_t        valid;
-
-       int32_t         poc_top;        /* POC for Top Field/Frame */
-       int32_t         poc_bottom;     /* POC for Bottom Field    */
-       uint32_t                idr_pic_id;
-
-       /* H264_VALID_PANSCAN */
-       uint32_t                pan_scan_count;
-       int32_t         pan_scan_left[3];
-       int32_t         pan_scan_right[3];
-       int32_t         pan_scan_top[3];
-       int32_t         pan_scan_bottom[3];
-
-       /* H264_VALID_CT_TYPE */
-       uint32_t                ct_type_count;
-       uint32_t                ct_type[3];
-
-       /* H264_VALID_SPS_CROP */
-       int32_t         sps_crop_left;
-       int32_t         sps_crop_right;
-       int32_t         sps_crop_top;
-       int32_t         sps_crop_bottom;
-
-       /* H264_VALID_VUI */
-       uint32_t                chroma_top;
-       uint32_t                chroma_bottom;
-
-       /* H264_VALID_USER */
-       uint32_t                user_data_size;
-       struct user_data        *user_data;
-
-       /* H264 VALID FGT */
-       struct fgt_sei  *pfgt;
-
-};
-
-struct ppb {
-       /* Common fields. */
-       uint32_t        picture_number; /* Ordinal display number */
-       uint32_t        video_buffer;   /* Video (picbuf) number */
-       uint32_t        video_address;  /* Address of picbuf Y */
-       uint32_t        video_address_uv; /* Address of picbuf UV */
-       uint32_t        video_stripe;   /* Picbuf stripe */
-       uint32_t        video_width;    /* Picbuf width */
-       uint32_t        video_height;   /* Picbuf height */
-
-       uint32_t        channel_id;     /* Decoder channel ID */
-       uint32_t        status;         /* reserved */
-       uint32_t        width;          /* pixels */
-       uint32_t        height;         /* pixels */
-       uint32_t        chroma_format;  /* see above */
-       uint32_t        pulldown;       /* see above */
-       uint32_t        flags;          /* see above */
-       uint32_t        pts;            /* 32 LSBs of PTS */
-       uint32_t        protocol;       /* protocolXXX (above) */
-
-       uint32_t        frame_rate;     /* see above */
-       uint32_t        matrix_coeff;   /* see above */
-       uint32_t        aspect_ratio;   /* see above */
-       uint32_t        colour_primaries; /* see above */
-       uint32_t        transfer_char;  /* see above */
-       uint32_t        pcr_offset;     /* 45kHz if PCR type; else 27MHz */
-       uint32_t        n_drop;         /* Number of pictures to be dropped */
-
-       uint32_t        custom_aspect_ratio_width_height;
-       /* upper 16-bits is Y and lower 16-bits is X */
-
-       uint32_t        picture_tag;    /* Indexing tag from BUD packets */
-       uint32_t        picture_done_payload;
-       uint32_t        picture_meta_payload;
-       uint32_t        reserved[1];
-
-       /* Protocol-specific extensions. */
-       union {
-               struct ppb_h264 h264;
-               struct ppb_mpeg mpeg;
-               struct ppb_vc1   vc1;
-       } other;
-
-};
-
-struct c011_pib {
-       uint32_t        bFormatChange;
-       uint32_t        resolution;
-       uint32_t        channelId;
-       uint32_t        ppbPtr;
-       int32_t ptsStcOffset;
-       uint32_t        zeroPanscanValid;
-       uint32_t        dramOutBufAddr;
-       uint32_t        yComponent;
-       struct ppb      ppb;
-
-};
-
-struct dec_rsp_channel_start_video {
-       uint32_t        command;
-       uint32_t        sequence;
-       uint32_t        status;
-       uint32_t        picBuf;
-       uint32_t        picRelBuf;
-       uint32_t        picInfoDeliveryQ;
-       uint32_t        picInfoReleaseQ;
-       uint32_t        channelStatus;
-       uint32_t        userDataDeliveryQ;
-       uint32_t        userDataReleaseQ;
-       uint32_t        transportStreamCaptureAddr;
-       uint32_t        asyncEventQ;
-
-};
-
-#define eCMD_C011_CMD_BASE       (0x73763000)
-
-/* host commands */
-enum  c011_ts_cmd {
-       eCMD_TS_GET_NEXT_PIC    = 0x7376F100, /* debug get next picture */
-       eCMD_TS_GET_LAST_PIC    = 0x7376F102, /* debug get last pic status */
-       eCMD_TS_READ_WRITE_MEM  = 0x7376F104, /* debug read write memory */
-
-       /* New API commands */
-       /* General commands */
-       eCMD_C011_INIT          = eCMD_C011_CMD_BASE + 0x01,
-       eCMD_C011_RESET         = eCMD_C011_CMD_BASE + 0x02,
-       eCMD_C011_SELF_TEST             = eCMD_C011_CMD_BASE + 0x03,
-       eCMD_C011_GET_VERSION   = eCMD_C011_CMD_BASE + 0x04,
-       eCMD_C011_GPIO          = eCMD_C011_CMD_BASE + 0x05,
-       eCMD_C011_DEBUG_SETUP   = eCMD_C011_CMD_BASE + 0x06,
-
-       /* Decoding commands */
-       eCMD_C011_DEC_CHAN_OPEN                 = eCMD_C011_CMD_BASE + 0x100,
-       eCMD_C011_DEC_CHAN_CLOSE                = eCMD_C011_CMD_BASE + 0x101,
-       eCMD_C011_DEC_CHAN_ACTIVATE             = eCMD_C011_CMD_BASE + 0x102,
-       eCMD_C011_DEC_CHAN_STATUS               = eCMD_C011_CMD_BASE + 0x103,
-       eCMD_C011_DEC_CHAN_FLUSH                = eCMD_C011_CMD_BASE + 0x104,
-       eCMD_C011_DEC_CHAN_TRICK_PLAY           = eCMD_C011_CMD_BASE + 0x105,
-       eCMD_C011_DEC_CHAN_TS_PIDS              = eCMD_C011_CMD_BASE + 0x106,
-       eCMD_C011_DEC_CHAN_PS_STREAM_ID         = eCMD_C011_CMD_BASE + 0x107,
-       eCMD_C011_DEC_CHAN_INPUT_PARAMS         = eCMD_C011_CMD_BASE + 0x108,
-       eCMD_C011_DEC_CHAN_VIDEO_OUTPUT         = eCMD_C011_CMD_BASE + 0x109,
-       eCMD_C011_DEC_CHAN_OUTPUT_FORMAT        = eCMD_C011_CMD_BASE + 0x10A,
-       eCMD_C011_DEC_CHAN_SCALING_FILTERS      = eCMD_C011_CMD_BASE + 0x10B,
-       eCMD_C011_DEC_CHAN_OSD_MODE             = eCMD_C011_CMD_BASE + 0x10D,
-       eCMD_C011_DEC_CHAN_DROP                 = eCMD_C011_CMD_BASE + 0x10E,
-       eCMD_C011_DEC_CHAN_RELEASE              = eCMD_C011_CMD_BASE + 0x10F,
-       eCMD_C011_DEC_CHAN_STREAM_SETTINGS      = eCMD_C011_CMD_BASE + 0x110,
-       eCMD_C011_DEC_CHAN_PAUSE_OUTPUT         = eCMD_C011_CMD_BASE + 0x111,
-       eCMD_C011_DEC_CHAN_CHANGE               = eCMD_C011_CMD_BASE + 0x112,
-       eCMD_C011_DEC_CHAN_SET_STC              = eCMD_C011_CMD_BASE + 0x113,
-       eCMD_C011_DEC_CHAN_SET_PTS              = eCMD_C011_CMD_BASE + 0x114,
-       eCMD_C011_DEC_CHAN_CC_MODE              = eCMD_C011_CMD_BASE + 0x115,
-       eCMD_C011_DEC_CREATE_AUDIO_CONTEXT      = eCMD_C011_CMD_BASE + 0x116,
-       eCMD_C011_DEC_COPY_AUDIO_CONTEXT        = eCMD_C011_CMD_BASE + 0x117,
-       eCMD_C011_DEC_DELETE_AUDIO_CONTEXT      = eCMD_C011_CMD_BASE + 0x118,
-       eCMD_C011_DEC_CHAN_SET_DECYPTION        = eCMD_C011_CMD_BASE + 0x119,
-       eCMD_C011_DEC_CHAN_START_VIDEO          = eCMD_C011_CMD_BASE + 0x11A,
-       eCMD_C011_DEC_CHAN_STOP_VIDEO           = eCMD_C011_CMD_BASE + 0x11B,
-       eCMD_C011_DEC_CHAN_PIC_CAPTURE          = eCMD_C011_CMD_BASE + 0x11C,
-       eCMD_C011_DEC_CHAN_PAUSE                = eCMD_C011_CMD_BASE + 0x11D,
-       eCMD_C011_DEC_CHAN_PAUSE_STATE          = eCMD_C011_CMD_BASE + 0x11E,
-       eCMD_C011_DEC_CHAN_SET_SLOWM_RATE       = eCMD_C011_CMD_BASE + 0x11F,
-       eCMD_C011_DEC_CHAN_GET_SLOWM_RATE       = eCMD_C011_CMD_BASE + 0x120,
-       eCMD_C011_DEC_CHAN_SET_FF_RATE          = eCMD_C011_CMD_BASE + 0x121,
-       eCMD_C011_DEC_CHAN_GET_FF_RATE          = eCMD_C011_CMD_BASE + 0x122,
-       eCMD_C011_DEC_CHAN_FRAME_ADVANCE        = eCMD_C011_CMD_BASE + 0x123,
-       eCMD_C011_DEC_CHAN_SET_SKIP_PIC_MODE    = eCMD_C011_CMD_BASE + 0x124,
-       eCMD_C011_DEC_CHAN_GET_SKIP_PIC_MODE    = eCMD_C011_CMD_BASE + 0x125,
-       eCMD_C011_DEC_CHAN_FILL_PIC_BUF         = eCMD_C011_CMD_BASE + 0x126,
-       eCMD_C011_DEC_CHAN_SET_CONTINUITY_CHECK = eCMD_C011_CMD_BASE + 0x127,
-       eCMD_C011_DEC_CHAN_GET_CONTINUITY_CHECK = eCMD_C011_CMD_BASE + 0x128,
-       eCMD_C011_DEC_CHAN_SET_BRCM_TRICK_MODE  = eCMD_C011_CMD_BASE + 0x129,
-       eCMD_C011_DEC_CHAN_GET_BRCM_TRICK_MODE  = eCMD_C011_CMD_BASE + 0x12A,
-       eCMD_C011_DEC_CHAN_REVERSE_FIELD_STATUS = eCMD_C011_CMD_BASE + 0x12B,
-       eCMD_C011_DEC_CHAN_I_PICTURE_FOUND      = eCMD_C011_CMD_BASE + 0x12C,
-       eCMD_C011_DEC_CHAN_SET_PARAMETER        = eCMD_C011_CMD_BASE + 0x12D,
-       eCMD_C011_DEC_CHAN_SET_USER_DATA_MODE   = eCMD_C011_CMD_BASE + 0x12E,
-       eCMD_C011_DEC_CHAN_SET_PAUSE_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x12F,
-       eCMD_C011_DEC_CHAN_SET_SLOW_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x130,
-       eCMD_C011_DEC_CHAN_SET_FF_DISPLAY_MODE  = eCMD_C011_CMD_BASE + 0x131,
-       eCMD_C011_DEC_CHAN_SET_DISPLAY_TIMING_MODE = eCMD_C011_CMD_BASE +
-                                                                0x132,
-       eCMD_C011_DEC_CHAN_SET_DISPLAY_MODE     = eCMD_C011_CMD_BASE + 0x133,
-       eCMD_C011_DEC_CHAN_GET_DISPLAY_MODE     = eCMD_C011_CMD_BASE + 0x134,
-       eCMD_C011_DEC_CHAN_SET_REVERSE_FIELD    = eCMD_C011_CMD_BASE + 0x135,
-       eCMD_C011_DEC_CHAN_STREAM_OPEN          = eCMD_C011_CMD_BASE + 0x136,
-       eCMD_C011_DEC_CHAN_SET_PCR_PID          = eCMD_C011_CMD_BASE + 0x137,
-       eCMD_C011_DEC_CHAN_SET_VID_PID          = eCMD_C011_CMD_BASE + 0x138,
-       eCMD_C011_DEC_CHAN_SET_PAN_SCAN_MODE    = eCMD_C011_CMD_BASE + 0x139,
-       eCMD_C011_DEC_CHAN_START_DISPLAY_AT_PTS = eCMD_C011_CMD_BASE + 0x140,
-       eCMD_C011_DEC_CHAN_STOP_DISPLAY_AT_PTS  = eCMD_C011_CMD_BASE + 0x141,
-       eCMD_C011_DEC_CHAN_SET_DISPLAY_ORDER    = eCMD_C011_CMD_BASE + 0x142,
-       eCMD_C011_DEC_CHAN_GET_DISPLAY_ORDER    = eCMD_C011_CMD_BASE + 0x143,
-       eCMD_C011_DEC_CHAN_SET_HOST_TRICK_MODE  = eCMD_C011_CMD_BASE + 0x144,
-       eCMD_C011_DEC_CHAN_SET_OPERATION_MODE   = eCMD_C011_CMD_BASE + 0x145,
-       eCMD_C011_DEC_CHAN_DISPLAY_PAUSE_UNTO_PTS = eCMD_C011_CMD_BASE + 0x146,
-       eCMD_C011_DEC_CHAN_SET_PTS_STC_DIFF_THRESHOLD = eCMD_C011_CMD_BASE +
-                                                                0x147,
-       eCMD_C011_DEC_CHAN_SEND_COMPRESSED_BUF  = eCMD_C011_CMD_BASE + 0x148,
-       eCMD_C011_DEC_CHAN_SET_CLIPPING         = eCMD_C011_CMD_BASE + 0x149,
-       eCMD_C011_DEC_CHAN_SET_PARAMETERS_FOR_HARD_RESET_INTERRUPT_TO_HOST
-               = eCMD_C011_CMD_BASE + 0x150,
-
-       /* Decoder RevD commands */
-       eCMD_C011_DEC_CHAN_SET_CSC      = eCMD_C011_CMD_BASE + 0x180, /* color
-                                                        space conversion */
-       eCMD_C011_DEC_CHAN_SET_RANGE_REMAP      = eCMD_C011_CMD_BASE + 0x181,
-       eCMD_C011_DEC_CHAN_SET_FGT              = eCMD_C011_CMD_BASE + 0x182,
-       /* Note: 0x183 not implemented yet in Rev D main */
-       eCMD_C011_DEC_CHAN_SET_LASTPICTURE_PADDING = eCMD_C011_CMD_BASE +
-                                                                0x183,
-
-       /* Decoder 7412 commands (7412-only) */
-       eCMD_C011_DEC_CHAN_SET_CONTENT_KEY      = eCMD_C011_CMD_BASE + 0x190,
-       eCMD_C011_DEC_CHAN_SET_SESSION_KEY      = eCMD_C011_CMD_BASE + 0x191,
-       eCMD_C011_DEC_CHAN_FMT_CHANGE_ACK       = eCMD_C011_CMD_BASE + 0x192,
-
-       eCMD_C011_DEC_CHAN_CUSTOM_VIDOUT    = eCMD_C011_CMD_BASE + 0x1FF,
-
-       /* Encoding commands */
-       eCMD_C011_ENC_CHAN_OPEN         = eCMD_C011_CMD_BASE + 0x200,
-       eCMD_C011_ENC_CHAN_CLOSE                = eCMD_C011_CMD_BASE + 0x201,
-       eCMD_C011_ENC_CHAN_ACTIVATE             = eCMD_C011_CMD_BASE + 0x202,
-       eCMD_C011_ENC_CHAN_CONTROL              = eCMD_C011_CMD_BASE + 0x203,
-       eCMD_C011_ENC_CHAN_STATISTICS   = eCMD_C011_CMD_BASE + 0x204,
-
-       eNOTIFY_C011_ENC_CHAN_EVENT             = eCMD_C011_CMD_BASE + 0x210,
-
-};
-
-#endif
diff --git a/drivers/staging/crystalhd/crystalhd_hw.c b/drivers/staging/crystalhd/crystalhd_hw.c
deleted file mode 100644 (file)
index 4765d52..0000000
+++ /dev/null
@@ -1,2458 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_hw . c
- *
- *  Description:
- *             BCM70010 Linux driver HW layer.
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#include "crystalhd.h"
-
-#include <linux/pci.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-
-/* Functions internal to this file */
-
-static void crystalhd_enable_uarts(struct crystalhd_adp *adp)
-{
-       bc_dec_reg_wr(adp, UartSelectA, BSVS_UART_STREAM);
-       bc_dec_reg_wr(adp, UartSelectB, BSVS_UART_DEC_OUTER);
-}
-
-
-static void crystalhd_start_dram(struct crystalhd_adp *adp)
-{
-       bc_dec_reg_wr(adp, SDRAM_PARAM, ((40 / 5 - 1) <<  0) |
-       /* tras (40ns tras)/(5ns period) -1 ((15/5 - 1) <<  4) | // trcd */
-                     ((15 / 5 - 1) <<  7) |    /* trp */
-                     ((10 / 5 - 1) << 10) |    /* trrd */
-                     ((15 / 5 + 1) << 12) |    /* twr */
-                     ((2 + 1) << 16) |         /* twtr */
-                     ((70 / 5 - 2) << 19) |    /* trfc */
-                     (0 << 23));
-
-       bc_dec_reg_wr(adp, SDRAM_PRECHARGE, 0);
-       bc_dec_reg_wr(adp, SDRAM_EXT_MODE, 2);
-       bc_dec_reg_wr(adp, SDRAM_MODE, 0x132);
-       bc_dec_reg_wr(adp, SDRAM_PRECHARGE, 0);
-       bc_dec_reg_wr(adp, SDRAM_REFRESH, 0);
-       bc_dec_reg_wr(adp, SDRAM_REFRESH, 0);
-       bc_dec_reg_wr(adp, SDRAM_MODE, 0x32);
-       /* setting the refresh rate here */
-       bc_dec_reg_wr(adp, SDRAM_REF_PARAM, ((1 << 12) | 96));
-}
-
-
-static bool crystalhd_bring_out_of_rst(struct crystalhd_adp *adp)
-{
-       union link_misc_perst_deco_ctrl rst_deco_cntrl;
-       union link_misc_perst_clk_ctrl rst_clk_cntrl;
-       uint32_t temp;
-
-       /*
-        * Link clocks: MISC_PERST_CLOCK_CTRL Clear PLL power down bit,
-        * delay to allow PLL to lock Clear alternate clock, stop clock bits
-        */
-       rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
-       rst_clk_cntrl.pll_pwr_dn = 0;
-       crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
-       msleep_interruptible(50);
-
-       rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
-       rst_clk_cntrl.stop_core_clk = 0;
-       rst_clk_cntrl.sel_alt_clk = 0;
-
-       crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
-       msleep_interruptible(50);
-
-       /*
-        * Bus Arbiter Timeout: GISB_ARBITER_TIMER
-        * Set internal bus arbiter timeout to 40us based on core clock speed
-        * (63MHz * 40us = 0x9D8)
-        */
-       crystalhd_reg_wr(adp, GISB_ARBITER_TIMER, 0x9D8);
-
-       /*
-        * Decoder clocks: MISC_PERST_DECODER_CTRL
-        * Enable clocks while 7412 reset is asserted, delay
-        * De-assert 7412 reset
-        */
-       rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp,
-                                        MISC_PERST_DECODER_CTRL);
-       rst_deco_cntrl.stop_bcm_7412_clk = 0;
-       rst_deco_cntrl.bcm7412_rst = 1;
-       crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL,
-                                        rst_deco_cntrl.whole_reg);
-       msleep_interruptible(10);
-
-       rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp,
-                                        MISC_PERST_DECODER_CTRL);
-       rst_deco_cntrl.bcm7412_rst = 0;
-       crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL,
-                                        rst_deco_cntrl.whole_reg);
-       msleep_interruptible(50);
-
-       /* Disable OTP_CONTENT_MISC to 0 to disable all secure modes */
-       crystalhd_reg_wr(adp, OTP_CONTENT_MISC, 0);
-
-       /* Clear bit 29 of 0x404 */
-       temp = crystalhd_reg_rd(adp, PCIE_TL_TRANSACTION_CONFIGURATION);
-       temp &= ~BC_BIT(29);
-       crystalhd_reg_wr(adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp);
-
-       /* 2.5V regulator must be set to 2.6 volts (+6%) */
-       /* FIXME: jarod: what's the point of this reg read? */
-       temp = crystalhd_reg_rd(adp, MISC_PERST_VREG_CTRL);
-       crystalhd_reg_wr(adp, MISC_PERST_VREG_CTRL, 0xF3);
-
-       return true;
-}
-
-static bool crystalhd_put_in_reset(struct crystalhd_adp *adp)
-{
-       union link_misc_perst_deco_ctrl rst_deco_cntrl;
-       union link_misc_perst_clk_ctrl  rst_clk_cntrl;
-       uint32_t                  temp;
-
-       /*
-        * Decoder clocks: MISC_PERST_DECODER_CTRL
-        * Assert 7412 reset, delay
-        * Assert 7412 stop clock
-        */
-       rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp,
-                                        MISC_PERST_DECODER_CTRL);
-       rst_deco_cntrl.stop_bcm_7412_clk = 1;
-       crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL,
-                                        rst_deco_cntrl.whole_reg);
-       msleep_interruptible(50);
-
-       /* Bus Arbiter Timeout: GISB_ARBITER_TIMER
-        * Set internal bus arbiter timeout to 40us based on core clock speed
-        * (6.75MHZ * 40us = 0x10E)
-        */
-       crystalhd_reg_wr(adp, GISB_ARBITER_TIMER, 0x10E);
-
-       /* Link clocks: MISC_PERST_CLOCK_CTRL
-        * Stop core clk, delay
-        * Set alternate clk, delay, set PLL power down
-        */
-       rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
-       rst_clk_cntrl.stop_core_clk = 1;
-       rst_clk_cntrl.sel_alt_clk = 1;
-       crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
-       msleep_interruptible(50);
-
-       rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
-       rst_clk_cntrl.pll_pwr_dn = 1;
-       crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
-
-       /*
-        * Read and restore the Transaction Configuration Register
-        * after core reset
-        */
-       temp = crystalhd_reg_rd(adp, PCIE_TL_TRANSACTION_CONFIGURATION);
-
-       /*
-        * Link core soft reset: MISC3_RESET_CTRL
-        * - Write BIT[0]=1 and read it back for core reset to take place
-        */
-       crystalhd_reg_wr(adp, MISC3_RESET_CTRL, 1);
-       rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC3_RESET_CTRL);
-       msleep_interruptible(50);
-
-       /* restore the transaction configuration register */
-       crystalhd_reg_wr(adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp);
-
-       return true;
-}
-
-static void crystalhd_disable_interrupts(struct crystalhd_adp *adp)
-{
-       union intr_mask_reg   intr_mask;
-       intr_mask.whole_reg = crystalhd_reg_rd(adp, INTR_INTR_MSK_STS_REG);
-       intr_mask.mask_pcie_err = 1;
-       intr_mask.mask_pcie_rbusmast_err = 1;
-       intr_mask.mask_pcie_rgr_bridge   = 1;
-       intr_mask.mask_rx_done = 1;
-       intr_mask.mask_rx_err  = 1;
-       intr_mask.mask_tx_done = 1;
-       intr_mask.mask_tx_err  = 1;
-       crystalhd_reg_wr(adp, INTR_INTR_MSK_SET_REG, intr_mask.whole_reg);
-
-       return;
-}
-
-static void crystalhd_enable_interrupts(struct crystalhd_adp *adp)
-{
-       union intr_mask_reg   intr_mask;
-       intr_mask.whole_reg = crystalhd_reg_rd(adp, INTR_INTR_MSK_STS_REG);
-       intr_mask.mask_pcie_err = 1;
-       intr_mask.mask_pcie_rbusmast_err = 1;
-       intr_mask.mask_pcie_rgr_bridge   = 1;
-       intr_mask.mask_rx_done = 1;
-       intr_mask.mask_rx_err  = 1;
-       intr_mask.mask_tx_done = 1;
-       intr_mask.mask_tx_err  = 1;
-       crystalhd_reg_wr(adp, INTR_INTR_MSK_CLR_REG, intr_mask.whole_reg);
-
-       return;
-}
-
-static void crystalhd_clear_errors(struct crystalhd_adp *adp)
-{
-       uint32_t reg;
-
-       /* FIXME: jarod: wouldn't we want to write a 0 to the reg?
-        Or does the write clear the bits specified? */
-       reg = crystalhd_reg_rd(adp, MISC1_Y_RX_ERROR_STATUS);
-       if (reg)
-               crystalhd_reg_wr(adp, MISC1_Y_RX_ERROR_STATUS, reg);
-
-       reg = crystalhd_reg_rd(adp, MISC1_UV_RX_ERROR_STATUS);
-       if (reg)
-               crystalhd_reg_wr(adp, MISC1_UV_RX_ERROR_STATUS, reg);
-
-       reg = crystalhd_reg_rd(adp, MISC1_TX_DMA_ERROR_STATUS);
-       if (reg)
-               crystalhd_reg_wr(adp, MISC1_TX_DMA_ERROR_STATUS, reg);
-}
-
-static void crystalhd_clear_interrupts(struct crystalhd_adp *adp)
-{
-       uint32_t intr_sts = crystalhd_reg_rd(adp, INTR_INTR_STATUS);
-
-       if (intr_sts) {
-               crystalhd_reg_wr(adp, INTR_INTR_CLR_REG, intr_sts);
-
-               /* Write End Of Interrupt for PCIE */
-               crystalhd_reg_wr(adp, INTR_EOI_CTRL, 1);
-       }
-}
-
-static void crystalhd_soft_rst(struct crystalhd_adp *adp)
-{
-       uint32_t val;
-
-       /* Assert c011 soft reset*/
-       bc_dec_reg_wr(adp, DecHt_HostSwReset, 0x00000001);
-       msleep_interruptible(50);
-
-       /* Release c011 soft reset*/
-       bc_dec_reg_wr(adp, DecHt_HostSwReset, 0x00000000);
-
-       /* Disable Stuffing..*/
-       val = crystalhd_reg_rd(adp, MISC2_GLOBAL_CTRL);
-       val |= BC_BIT(8);
-       crystalhd_reg_wr(adp, MISC2_GLOBAL_CTRL, val);
-}
-
-static bool crystalhd_load_firmware_config(struct crystalhd_adp *adp)
-{
-       uint32_t i = 0, reg;
-
-       crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (BC_DRAM_FW_CFG_ADDR >> 19));
-
-       crystalhd_reg_wr(adp, AES_CMD, 0);
-       crystalhd_reg_wr(adp, AES_CONFIG_INFO,
-                (BC_DRAM_FW_CFG_ADDR & 0x7FFFF));
-       crystalhd_reg_wr(adp, AES_CMD, 0x1);
-
-       /* FIXME: jarod: I've seen this fail,
-        and introducing extra delays helps... */
-       for (i = 0; i < 100; ++i) {
-               reg = crystalhd_reg_rd(adp, AES_STATUS);
-               if (reg & 0x1)
-                       return true;
-               msleep_interruptible(10);
-       }
-
-       return false;
-}
-
-
-static bool crystalhd_start_device(struct crystalhd_adp *adp)
-{
-       uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0;
-
-       BCMLOG(BCMLOG_INFO, "Starting BCM70012 Device\n");
-
-       reg_pwrmgmt = crystalhd_reg_rd(adp, PCIE_DLL_DATA_LINK_CONTROL);
-       reg_pwrmgmt &= ~ASPM_L1_ENABLE;
-
-       crystalhd_reg_wr(adp, PCIE_DLL_DATA_LINK_CONTROL, reg_pwrmgmt);
-
-       if (!crystalhd_bring_out_of_rst(adp)) {
-               BCMLOG_ERR("Failed To Bring Link Out Of Reset\n");
-               return false;
-       }
-
-       crystalhd_disable_interrupts(adp);
-
-       crystalhd_clear_errors(adp);
-
-       crystalhd_clear_interrupts(adp);
-
-       crystalhd_enable_interrupts(adp);
-
-       /* Enable the option for getting the total no. of DWORDS
-        * that have been transferred by the RXDMA engine
-        */
-       dbg_options = crystalhd_reg_rd(adp, MISC1_DMA_DEBUG_OPTIONS_REG);
-       dbg_options |= 0x10;
-       crystalhd_reg_wr(adp, MISC1_DMA_DEBUG_OPTIONS_REG, dbg_options);
-
-       /* Enable PCI Global Control options */
-       glb_cntrl = crystalhd_reg_rd(adp, MISC2_GLOBAL_CTRL);
-       glb_cntrl |= 0x100;
-       glb_cntrl |= 0x8000;
-       crystalhd_reg_wr(adp, MISC2_GLOBAL_CTRL, glb_cntrl);
-
-       crystalhd_enable_interrupts(adp);
-
-       crystalhd_soft_rst(adp);
-       crystalhd_start_dram(adp);
-       crystalhd_enable_uarts(adp);
-
-       return true;
-}
-
-static bool crystalhd_stop_device(struct crystalhd_adp *adp)
-{
-       uint32_t reg;
-
-       BCMLOG(BCMLOG_INFO, "Stopping BCM70012 Device\n");
-       /* Clear and disable interrupts */
-       crystalhd_disable_interrupts(adp);
-       crystalhd_clear_errors(adp);
-       crystalhd_clear_interrupts(adp);
-
-       if (!crystalhd_put_in_reset(adp))
-               BCMLOG_ERR("Failed to Put Link To Reset State\n");
-
-       reg = crystalhd_reg_rd(adp, PCIE_DLL_DATA_LINK_CONTROL);
-       reg |= ASPM_L1_ENABLE;
-       crystalhd_reg_wr(adp, PCIE_DLL_DATA_LINK_CONTROL, reg);
-
-       /* Set PCI Clk Req */
-       reg = crystalhd_reg_rd(adp, PCIE_CLK_REQ_REG);
-       reg |= PCI_CLK_REQ_ENABLE;
-       crystalhd_reg_wr(adp, PCIE_CLK_REQ_REG, reg);
-
-       return true;
-}
-
-static struct crystalhd_rx_dma_pkt *crystalhd_hw_alloc_rx_pkt(
-                                       struct crystalhd_hw *hw)
-{
-       unsigned long flags = 0;
-       struct crystalhd_rx_dma_pkt *temp = NULL;
-
-       if (!hw)
-               return NULL;
-
-       spin_lock_irqsave(&hw->lock, flags);
-       temp = hw->rx_pkt_pool_head;
-       if (temp) {
-               hw->rx_pkt_pool_head = hw->rx_pkt_pool_head->next;
-               temp->dio_req = NULL;
-               temp->pkt_tag = 0;
-               temp->flags = 0;
-       }
-       spin_unlock_irqrestore(&hw->lock, flags);
-
-       return temp;
-}
-
-static void crystalhd_hw_free_rx_pkt(struct crystalhd_hw *hw,
-                                  struct crystalhd_rx_dma_pkt *pkt)
-{
-       unsigned long flags = 0;
-
-       if (!hw || !pkt)
-               return;
-
-       spin_lock_irqsave(&hw->lock, flags);
-       pkt->next = hw->rx_pkt_pool_head;
-       hw->rx_pkt_pool_head = pkt;
-       spin_unlock_irqrestore(&hw->lock, flags);
-}
-
-/*
- * Call back from TX - IOQ deletion.
- *
- * This routine will release the TX DMA rings allocated
- * during setup_dma rings interface.
- *
- * Memory is allocated per DMA ring basis. This is just
- * a place holder to be able to create the dio queues.
- */
-static void crystalhd_tx_desc_rel_call_back(void *context, void *data)
-{
-}
-
-/*
- * Rx Packet release callback..
- *
- * Release All user mapped capture buffers and Our DMA packets
- * back to our free pool. The actual cleanup of the DMA
- * ring descriptors happen during dma ring release.
- */
-static void crystalhd_rx_pkt_rel_call_back(void *context, void *data)
-{
-       struct crystalhd_hw *hw = (struct crystalhd_hw *)context;
-       struct crystalhd_rx_dma_pkt *pkt = (struct crystalhd_rx_dma_pkt *)data;
-
-       if (!pkt || !hw) {
-               BCMLOG_ERR("Invalid arg - %p %p\n", hw, pkt);
-               return;
-       }
-
-       if (pkt->dio_req)
-               crystalhd_unmap_dio(hw->adp, pkt->dio_req);
-       else
-               BCMLOG_ERR("Missing dio_req: 0x%x\n", pkt->pkt_tag);
-
-       crystalhd_hw_free_rx_pkt(hw, pkt);
-}
-
-#define crystalhd_hw_delete_ioq(adp, q)                \
-do {                                           \
-       if (q) {                                \
-               crystalhd_delete_dioq(adp, q);  \
-               q = NULL;                       \
-       }                                       \
-} while (0)
-
-static void crystalhd_hw_delete_ioqs(struct crystalhd_hw *hw)
-{
-       if (!hw)
-               return;
-
-       BCMLOG(BCMLOG_DBG, "Deleting IOQs\n");
-       crystalhd_hw_delete_ioq(hw->adp, hw->tx_actq);
-       crystalhd_hw_delete_ioq(hw->adp, hw->tx_freeq);
-       crystalhd_hw_delete_ioq(hw->adp, hw->rx_actq);
-       crystalhd_hw_delete_ioq(hw->adp, hw->rx_freeq);
-       crystalhd_hw_delete_ioq(hw->adp, hw->rx_rdyq);
-}
-
-#define crystalhd_hw_create_ioq(sts, hw, q, cb)                        \
-do {                                                           \
-       sts = crystalhd_create_dioq(hw->adp, &q, cb, hw);       \
-       if (sts != BC_STS_SUCCESS)                              \
-               goto hw_create_ioq_err;                         \
-} while (0)
-
-/*
- * Create IOQs..
- *
- * TX - Active & Free
- * RX - Active, Ready and Free.
- */
-static enum BC_STATUS crystalhd_hw_create_ioqs(struct crystalhd_hw   *hw)
-{
-       enum BC_STATUS   sts = BC_STS_SUCCESS;
-
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       crystalhd_hw_create_ioq(sts, hw, hw->tx_freeq,
-                             crystalhd_tx_desc_rel_call_back);
-       crystalhd_hw_create_ioq(sts, hw, hw->tx_actq,
-                             crystalhd_tx_desc_rel_call_back);
-
-       crystalhd_hw_create_ioq(sts, hw, hw->rx_freeq,
-                             crystalhd_rx_pkt_rel_call_back);
-       crystalhd_hw_create_ioq(sts, hw, hw->rx_rdyq,
-                             crystalhd_rx_pkt_rel_call_back);
-       crystalhd_hw_create_ioq(sts, hw, hw->rx_actq,
-                             crystalhd_rx_pkt_rel_call_back);
-
-       return sts;
-
-hw_create_ioq_err:
-       crystalhd_hw_delete_ioqs(hw);
-
-       return sts;
-}
-
-
-static bool crystalhd_code_in_full(struct crystalhd_adp *adp,
-                uint32_t needed_sz, bool b_188_byte_pkts,  uint8_t flags)
-{
-       uint32_t base, end, writep, readp;
-       uint32_t cpbSize, cpbFullness, fifoSize;
-
-       if (flags & 0x02) { /* ASF Bit is set */
-               base   = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Base);
-               end    = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2End);
-               writep = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Wrptr);
-               readp  = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Rdptr);
-       } else if (b_188_byte_pkts) { /*Encrypted 188 byte packets*/
-               base   = bc_dec_reg_rd(adp, REG_Dec_TsUser0Base);
-               end    = bc_dec_reg_rd(adp, REG_Dec_TsUser0End);
-               writep = bc_dec_reg_rd(adp, REG_Dec_TsUser0Wrptr);
-               readp  = bc_dec_reg_rd(adp, REG_Dec_TsUser0Rdptr);
-       } else {
-               base   = bc_dec_reg_rd(adp, REG_DecCA_RegCinBase);
-               end    = bc_dec_reg_rd(adp, REG_DecCA_RegCinEnd);
-               writep = bc_dec_reg_rd(adp, REG_DecCA_RegCinWrPtr);
-               readp  = bc_dec_reg_rd(adp, REG_DecCA_RegCinRdPtr);
-       }
-
-       cpbSize = end - base;
-       if (writep >= readp)
-               cpbFullness = writep - readp;
-       else
-               cpbFullness = (end - base) - (readp - writep);
-
-       fifoSize = cpbSize - cpbFullness;
-
-       if (fifoSize < BC_INFIFO_THRESHOLD)
-               return true;
-
-       if (needed_sz > (fifoSize - BC_INFIFO_THRESHOLD))
-               return true;
-
-       return false;
-}
-
-static enum BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw,
-                                        uint32_t list_id, enum BC_STATUS cs)
-{
-       struct tx_dma_pkt *tx_req;
-
-       if (!hw || !list_id) {
-               BCMLOG_ERR("Invalid Arg..\n");
-               return BC_STS_INV_ARG;
-       }
-
-       hw->pwr_lock--;
-
-       tx_req = (struct tx_dma_pkt *)crystalhd_dioq_find_and_fetch(
-                                       hw->tx_actq, list_id);
-       if (!tx_req) {
-               if (cs != BC_STS_IO_USER_ABORT)
-                       BCMLOG_ERR("Find and Fetch Did not find req\n");
-               return BC_STS_NO_DATA;
-       }
-
-       if (tx_req->call_back) {
-               tx_req->call_back(tx_req->dio_req, tx_req->cb_event, cs);
-               tx_req->dio_req   = NULL;
-               tx_req->cb_event  = NULL;
-               tx_req->call_back = NULL;
-       } else {
-               BCMLOG(BCMLOG_DBG, "Missing Tx Callback - %X\n",
-                      tx_req->list_tag);
-       }
-
-       /* Now put back the tx_list back in FreeQ */
-       tx_req->list_tag = 0;
-
-       return crystalhd_dioq_add(hw->tx_freeq, tx_req, false, 0);
-}
-
-static bool crystalhd_tx_list0_handler(struct crystalhd_hw *hw,
-                                        uint32_t err_sts)
-{
-       uint32_t err_mask, tmp;
-       unsigned long flags = 0;
-
-       err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK |
-               MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK |
-               MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
-
-       if (!(err_sts & err_mask))
-               return false;
-
-       BCMLOG_ERR("Error on Tx-L0 %x\n", err_sts);
-
-       tmp = err_mask;
-
-       if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK)
-               tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
-
-       if (tmp) {
-               spin_lock_irqsave(&hw->lock, flags);
-               /* reset list index.*/
-               hw->tx_list_post_index = 0;
-               spin_unlock_irqrestore(&hw->lock, flags);
-       }
-
-       tmp = err_sts & err_mask;
-       crystalhd_reg_wr(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp);
-
-       return true;
-}
-
-static bool crystalhd_tx_list1_handler(struct crystalhd_hw *hw,
-                                        uint32_t err_sts)
-{
-       uint32_t err_mask, tmp;
-       unsigned long flags = 0;
-
-       err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK |
-               MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK |
-               MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
-
-       if (!(err_sts & err_mask))
-               return false;
-
-       BCMLOG_ERR("Error on Tx-L1 %x\n", err_sts);
-
-       tmp = err_mask;
-
-       if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK)
-               tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
-
-       if (tmp) {
-               spin_lock_irqsave(&hw->lock, flags);
-               /* reset list index.*/
-               hw->tx_list_post_index = 0;
-               spin_unlock_irqrestore(&hw->lock, flags);
-       }
-
-       tmp = err_sts & err_mask;
-       crystalhd_reg_wr(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp);
-
-       return true;
-}
-
-static void crystalhd_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts)
-{
-       uint32_t err_sts;
-
-       if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK)
-               crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
-                                          BC_STS_SUCCESS);
-
-       if (int_sts & INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK)
-               crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1,
-                                          BC_STS_SUCCESS);
-
-       if (!(int_sts & (INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK |
-                       INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK))) {
-                       /* No error mask set.. */
-                       return;
-       }
-
-       /* Handle Tx errors. */
-       err_sts = crystalhd_reg_rd(hw->adp, MISC1_TX_DMA_ERROR_STATUS);
-
-       if (crystalhd_tx_list0_handler(hw, err_sts))
-               crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
-                                          BC_STS_ERROR);
-
-       if (crystalhd_tx_list1_handler(hw, err_sts))
-               crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1,
-                                          BC_STS_ERROR);
-
-       hw->stats.tx_errors++;
-}
-
-static void crystalhd_hw_dump_desc(struct dma_descriptor *p_dma_desc,
-                                uint32_t ul_desc_index, uint32_t cnt)
-{
-       uint32_t ix, ll = 0;
-
-       if (!p_dma_desc || !cnt)
-               return;
-
-       /* FIXME: jarod: perhaps a modparam desc_debug to enable this,
-        rather than setting ll (log level, I presume) to non-zero? */
-       if (!ll)
-               return;
-
-       for (ix = ul_desc_index; ix < (ul_desc_index + cnt); ix++) {
-               BCMLOG(ll,
-                "%s[%d] Buff[%x:%x] Next:[%x:%x] XferSz:%x Intr:%x,Last:%x\n",
-                ((p_dma_desc[ul_desc_index].dma_dir) ? "TDesc" : "RDesc"),
-                      ul_desc_index,
-                      p_dma_desc[ul_desc_index].buff_addr_high,
-                      p_dma_desc[ul_desc_index].buff_addr_low,
-                      p_dma_desc[ul_desc_index].next_desc_addr_high,
-                      p_dma_desc[ul_desc_index].next_desc_addr_low,
-                      p_dma_desc[ul_desc_index].xfer_size,
-                      p_dma_desc[ul_desc_index].intr_enable,
-                      p_dma_desc[ul_desc_index].last_rec_indicator);
-       }
-
-}
-
-static enum BC_STATUS crystalhd_hw_fill_desc(struct crystalhd_dio_req *ioreq,
-                                     struct dma_descriptor *desc,
-                                     dma_addr_t desc_paddr_base,
-                                     uint32_t sg_cnt, uint32_t sg_st_ix,
-                                     uint32_t sg_st_off, uint32_t xfr_sz)
-{
-       uint32_t count = 0, ix = 0, sg_ix = 0, len = 0, last_desc_ix = 0;
-       dma_addr_t desc_phy_addr = desc_paddr_base;
-       union addr_64 addr_temp;
-
-       if (!ioreq || !desc || !desc_paddr_base || !xfr_sz ||
-           (!sg_cnt && !ioreq->uinfo.dir_tx)) {
-               BCMLOG_ERR("Invalid Args\n");
-               return BC_STS_INV_ARG;
-       }
-
-       for (ix = 0; ix < sg_cnt; ix++) {
-
-               /* Setup SGLE index. */
-               sg_ix = ix + sg_st_ix;
-
-               /* Get SGLE length */
-               len = crystalhd_get_sgle_len(ioreq, sg_ix);
-               if (len % 4) {
-                       BCMLOG_ERR(" len in sg %d %d %d\n", len, sg_ix,
-                                sg_cnt);
-                       return BC_STS_NOT_IMPL;
-               }
-               /* Setup DMA desc with Phy addr & Length at current index. */
-               addr_temp.full_addr = crystalhd_get_sgle_paddr(ioreq, sg_ix);
-               if (sg_ix == sg_st_ix) {
-                       addr_temp.full_addr += sg_st_off;
-                       len -= sg_st_off;
-               }
-               memset(&desc[ix], 0, sizeof(desc[ix]));
-               desc[ix].buff_addr_low  = addr_temp.low_part;
-               desc[ix].buff_addr_high = addr_temp.high_part;
-               desc[ix].dma_dir        = ioreq->uinfo.dir_tx;
-
-               /* Chain DMA descriptor.  */
-               addr_temp.full_addr = desc_phy_addr +
-                                        sizeof(struct dma_descriptor);
-               desc[ix].next_desc_addr_low = addr_temp.low_part;
-               desc[ix].next_desc_addr_high = addr_temp.high_part;
-
-               if ((count + len) > xfr_sz)
-                       len = xfr_sz - count;
-
-               /* Debug.. */
-               if ((!len) || (len > crystalhd_get_sgle_len(ioreq, sg_ix))) {
-                       BCMLOG_ERR(
-                        "inv-len(%x) Ix(%d) count:%x xfr_sz:%x sg_cnt:%d\n",
-                        len, ix, count, xfr_sz, sg_cnt);
-                       return BC_STS_ERROR;
-               }
-               /* Length expects Multiple of 4 */
-               desc[ix].xfer_size = (len / 4);
-
-               crystalhd_hw_dump_desc(desc, ix, 1);
-
-               count += len;
-               desc_phy_addr += sizeof(struct dma_descriptor);
-       }
-
-       last_desc_ix = ix - 1;
-
-       if (ioreq->fb_size) {
-               memset(&desc[ix], 0, sizeof(desc[ix]));
-               addr_temp.full_addr     = ioreq->fb_pa;
-               desc[ix].buff_addr_low  = addr_temp.low_part;
-               desc[ix].buff_addr_high = addr_temp.high_part;
-               desc[ix].dma_dir        = ioreq->uinfo.dir_tx;
-               desc[ix].xfer_size      = 1;
-               desc[ix].fill_bytes     = 4 - ioreq->fb_size;
-               count += ioreq->fb_size;
-               last_desc_ix++;
-       }
-
-       /* setup last descriptor..*/
-       desc[last_desc_ix].last_rec_indicator  = 1;
-       desc[last_desc_ix].next_desc_addr_low  = 0;
-       desc[last_desc_ix].next_desc_addr_high = 0;
-       desc[last_desc_ix].intr_enable = 1;
-
-       crystalhd_hw_dump_desc(desc, last_desc_ix, 1);
-
-       if (count != xfr_sz) {
-               BCMLOG_ERR("internal error sz curr:%x exp:%x\n", count, xfr_sz);
-               return BC_STS_ERROR;
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS crystalhd_xlat_sgl_to_dma_desc(
-                                             struct crystalhd_dio_req *ioreq,
-                                             struct dma_desc_mem *pdesc_mem,
-                                             uint32_t *uv_desc_index)
-{
-       struct dma_descriptor *desc = NULL;
-       dma_addr_t desc_paddr_base = 0;
-       uint32_t sg_cnt = 0, sg_st_ix = 0, sg_st_off = 0;
-       uint32_t xfr_sz = 0;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       /* Check params.. */
-       if (!ioreq || !pdesc_mem || !uv_desc_index) {
-               BCMLOG_ERR("Invalid Args\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (!pdesc_mem->sz || !pdesc_mem->pdma_desc_start ||
-           !ioreq->sg || (!ioreq->sg_cnt && !ioreq->uinfo.dir_tx)) {
-               BCMLOG_ERR("Invalid Args\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if ((ioreq->uinfo.dir_tx) && (ioreq->uinfo.uv_offset)) {
-               BCMLOG_ERR("UV offset for TX??\n");
-               return BC_STS_INV_ARG;
-
-       }
-
-       desc = pdesc_mem->pdma_desc_start;
-       desc_paddr_base = pdesc_mem->phy_addr;
-
-       if (ioreq->uinfo.dir_tx || (ioreq->uinfo.uv_offset == 0)) {
-               sg_cnt = ioreq->sg_cnt;
-               xfr_sz = ioreq->uinfo.xfr_len;
-       } else {
-               sg_cnt = ioreq->uinfo.uv_sg_ix + 1;
-               xfr_sz = ioreq->uinfo.uv_offset;
-       }
-
-       sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt,
-                                  sg_st_ix, sg_st_off, xfr_sz);
-
-       if ((sts != BC_STS_SUCCESS) || !ioreq->uinfo.uv_offset)
-               return sts;
-
-       /* Prepare for UV mapping.. */
-       desc = &pdesc_mem->pdma_desc_start[sg_cnt];
-       desc_paddr_base = pdesc_mem->phy_addr +
-                         (sg_cnt * sizeof(struct dma_descriptor));
-
-       /* Done with desc addr.. now update sg stuff.*/
-       sg_cnt    = ioreq->sg_cnt - ioreq->uinfo.uv_sg_ix;
-       xfr_sz    = ioreq->uinfo.xfr_len - ioreq->uinfo.uv_offset;
-       sg_st_ix  = ioreq->uinfo.uv_sg_ix;
-       sg_st_off = ioreq->uinfo.uv_sg_off;
-
-       sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt,
-                                  sg_st_ix, sg_st_off, xfr_sz);
-       if (sts != BC_STS_SUCCESS)
-               return sts;
-
-       *uv_desc_index = sg_st_ix;
-
-       return sts;
-}
-
-static void crystalhd_start_tx_dma_engine(struct crystalhd_hw *hw)
-{
-       uint32_t dma_cntrl;
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS);
-       if (!(dma_cntrl & DMA_START_BIT)) {
-               dma_cntrl |= DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS,
-                              dma_cntrl);
-       }
-
-       return;
-}
-
-/* _CHECK_THIS_
- *
- * Verify if the Stop generates a completion interrupt or not.
- * if it does not generate an interrupt, then add polling here.
- */
-static enum BC_STATUS crystalhd_stop_tx_dma_engine(struct crystalhd_hw *hw)
-{
-       uint32_t dma_cntrl, cnt = 30;
-       uint32_t l1 = 1, l2 = 1;
-       unsigned long flags = 0;
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS);
-
-       BCMLOG(BCMLOG_DBG, "Stopping TX DMA Engine..\n");
-
-       if (!(dma_cntrl & DMA_START_BIT)) {
-               BCMLOG(BCMLOG_DBG, "Already Stopped\n");
-               return BC_STS_SUCCESS;
-       }
-
-       crystalhd_disable_interrupts(hw->adp);
-
-       /* Issue stop to HW */
-       /* This bit when set gave problems. Please check*/
-       dma_cntrl &= ~DMA_START_BIT;
-       crystalhd_reg_wr(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-
-       BCMLOG(BCMLOG_DBG, "Cleared the DMA Start bit\n");
-
-       /* Poll for 3seconds (30 * 100ms) on both the lists..*/
-       while ((l1 || l2) && cnt) {
-
-               if (l1) {
-                       l1 = crystalhd_reg_rd(hw->adp,
-                                MISC1_TX_FIRST_DESC_L_ADDR_LIST0);
-                       l1 &= DMA_START_BIT;
-               }
-
-               if (l2) {
-                       l2 = crystalhd_reg_rd(hw->adp,
-                                MISC1_TX_FIRST_DESC_L_ADDR_LIST1);
-                       l2 &= DMA_START_BIT;
-               }
-
-               msleep_interruptible(100);
-
-               cnt--;
-       }
-
-       if (!cnt) {
-               BCMLOG_ERR("Failed to stop TX DMA.. l1 %d, l2 %d\n", l1, l2);
-               crystalhd_enable_interrupts(hw->adp);
-               return BC_STS_ERROR;
-       }
-
-       spin_lock_irqsave(&hw->lock, flags);
-       hw->tx_list_post_index = 0;
-       spin_unlock_irqrestore(&hw->lock, flags);
-       BCMLOG(BCMLOG_DBG, "stopped TX DMA..\n");
-       crystalhd_enable_interrupts(hw->adp);
-
-       return BC_STS_SUCCESS;
-}
-
-static uint32_t crystalhd_get_pib_avail_cnt(struct crystalhd_hw *hw)
-{
-       /*
-       * Position of the PIB Entries can be found at
-       * 0th and the 1st location of the Circular list.
-       */
-       uint32_t Q_addr;
-       uint32_t pib_cnt, r_offset, w_offset;
-
-       Q_addr = hw->pib_del_Q_addr;
-
-       /* Get the Read Pointer */
-       crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset);
-
-       /* Get the Write Pointer */
-       crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset);
-
-       if (r_offset == w_offset)
-               return 0;       /* Queue is empty */
-
-       if (w_offset > r_offset)
-               pib_cnt = w_offset - r_offset;
-       else
-               pib_cnt = (w_offset + MAX_PIB_Q_DEPTH) -
-                         (r_offset + MIN_PIB_Q_DEPTH);
-
-       if (pib_cnt > MAX_PIB_Q_DEPTH) {
-               BCMLOG_ERR("Invalid PIB Count (%u)\n", pib_cnt);
-               return 0;
-       }
-
-       return pib_cnt;
-}
-
-static uint32_t crystalhd_get_addr_from_pib_Q(struct crystalhd_hw *hw)
-{
-       uint32_t Q_addr;
-       uint32_t addr_entry, r_offset, w_offset;
-
-       Q_addr = hw->pib_del_Q_addr;
-
-       /* Get the Read Pointer 0Th Location is Read Pointer */
-       crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset);
-
-       /* Get the Write Pointer 1st Location is Write pointer */
-       crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset);
-
-       /* Queue is empty */
-       if (r_offset == w_offset)
-               return 0;
-
-       if ((r_offset < MIN_PIB_Q_DEPTH) || (r_offset >= MAX_PIB_Q_DEPTH))
-               return 0;
-
-       /* Get the Actual Address of the PIB */
-       crystalhd_mem_rd(hw->adp, Q_addr + (r_offset * sizeof(uint32_t)),
-                      1, &addr_entry);
-
-       /* Increment the Read Pointer */
-       r_offset++;
-
-       if (MAX_PIB_Q_DEPTH == r_offset)
-               r_offset = MIN_PIB_Q_DEPTH;
-
-       /* Write back the read pointer to It's Location */
-       crystalhd_mem_wr(hw->adp, Q_addr, 1, &r_offset);
-
-       return addr_entry;
-}
-
-static bool crystalhd_rel_addr_to_pib_Q(struct crystalhd_hw *hw,
-                                        uint32_t addr_to_rel)
-{
-       uint32_t Q_addr;
-       uint32_t r_offset, w_offset, n_offset;
-
-       Q_addr = hw->pib_rel_Q_addr;
-
-       /* Get the Read Pointer */
-       crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset);
-
-       /* Get the Write Pointer */
-       crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset);
-
-       if ((r_offset < MIN_PIB_Q_DEPTH) ||
-           (r_offset >= MAX_PIB_Q_DEPTH))
-               return false;
-
-       n_offset = w_offset + 1;
-
-       if (MAX_PIB_Q_DEPTH == n_offset)
-               n_offset = MIN_PIB_Q_DEPTH;
-
-       if (r_offset == n_offset)
-               return false; /* should never happen */
-
-       /* Write the DRAM ADDR to the Queue at Next Offset */
-       crystalhd_mem_wr(hw->adp, Q_addr + (w_offset * sizeof(uint32_t)),
-                      1, &addr_to_rel);
-
-       /* Put the New value of the write pointer in Queue */
-       crystalhd_mem_wr(hw->adp, Q_addr + sizeof(uint32_t), 1, &n_offset);
-
-       return true;
-}
-
-static void cpy_pib_to_app(struct c011_pib *src_pib,
-                                        struct BC_PIC_INFO_BLOCK *dst_pib)
-{
-       if (!src_pib || !dst_pib) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return;
-       }
-
-       dst_pib->timeStamp           = 0;
-       dst_pib->picture_number      = src_pib->ppb.picture_number;
-       dst_pib->width               = src_pib->ppb.width;
-       dst_pib->height              = src_pib->ppb.height;
-       dst_pib->chroma_format       = src_pib->ppb.chroma_format;
-       dst_pib->pulldown            = src_pib->ppb.pulldown;
-       dst_pib->flags               = src_pib->ppb.flags;
-       dst_pib->sess_num            = src_pib->ptsStcOffset;
-       dst_pib->aspect_ratio        = src_pib->ppb.aspect_ratio;
-       dst_pib->colour_primaries     = src_pib->ppb.colour_primaries;
-       dst_pib->picture_meta_payload = src_pib->ppb.picture_meta_payload;
-       dst_pib->frame_rate             = src_pib->resolution;
-       return;
-}
-
-static void crystalhd_hw_proc_pib(struct crystalhd_hw *hw)
-{
-       unsigned int cnt;
-       struct c011_pib src_pib;
-       uint32_t pib_addr, pib_cnt;
-       struct BC_PIC_INFO_BLOCK *AppPib;
-       struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
-
-       pib_cnt = crystalhd_get_pib_avail_cnt(hw);
-
-       if (!pib_cnt)
-               return;
-
-       for (cnt = 0; cnt < pib_cnt; cnt++) {
-
-               pib_addr = crystalhd_get_addr_from_pib_Q(hw);
-               crystalhd_mem_rd(hw->adp, pib_addr, sizeof(struct c011_pib) / 4,
-                              (uint32_t *)&src_pib);
-
-               if (src_pib.bFormatChange) {
-                       rx_pkt = (struct crystalhd_rx_dma_pkt *)
-                                       crystalhd_dioq_fetch(hw->rx_freeq);
-                       if (!rx_pkt)
-                               return;
-                       rx_pkt->flags = 0;
-                       rx_pkt->flags |= COMP_FLAG_PIB_VALID |
-                                        COMP_FLAG_FMT_CHANGE;
-                       AppPib = &rx_pkt->pib;
-                       cpy_pib_to_app(&src_pib, AppPib);
-
-                       BCMLOG(BCMLOG_DBG,
-                              "App PIB:%x %x %x %x %x %x %x %x %x %x\n",
-                              rx_pkt->pib.picture_number,
-                              rx_pkt->pib.aspect_ratio,
-                              rx_pkt->pib.chroma_format,
-                              rx_pkt->pib.colour_primaries,
-                              rx_pkt->pib.frame_rate,
-                              rx_pkt->pib.height,
-                              rx_pkt->pib.height,
-                              rx_pkt->pib.n_drop,
-                              rx_pkt->pib.pulldown,
-                              rx_pkt->pib.ycom);
-
-                       crystalhd_dioq_add(hw->rx_rdyq, (void *)rx_pkt, true,
-                                        rx_pkt->pkt_tag);
-
-               }
-
-               crystalhd_rel_addr_to_pib_Q(hw, pib_addr);
-       }
-}
-
-static void crystalhd_start_rx_dma_engine(struct crystalhd_hw *hw)
-{
-       uint32_t        dma_cntrl;
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp,
-                        MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
-       if (!(dma_cntrl & DMA_START_BIT)) {
-               dma_cntrl |= DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp,
-                        MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-       }
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp,
-                        MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
-       if (!(dma_cntrl & DMA_START_BIT)) {
-               dma_cntrl |= DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp,
-                        MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-       }
-
-       return;
-}
-
-static void crystalhd_stop_rx_dma_engine(struct crystalhd_hw *hw)
-{
-       uint32_t dma_cntrl = 0, count = 30;
-       uint32_t l0y = 1, l0uv = 1, l1y = 1, l1uv = 1;
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp,
-                        MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
-       if ((dma_cntrl & DMA_START_BIT)) {
-               dma_cntrl &= ~DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp,
-                        MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-       }
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp,
-                        MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
-       if ((dma_cntrl & DMA_START_BIT)) {
-               dma_cntrl &= ~DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp,
-                        MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-       }
-
-       /* Poll for 3seconds (30 * 100ms) on both the lists..*/
-       while ((l0y || l0uv || l1y || l1uv) && count) {
-
-               if (l0y) {
-                       l0y = crystalhd_reg_rd(hw->adp,
-                                MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0);
-                       l0y &= DMA_START_BIT;
-                       if (!l0y)
-                               hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
-               }
-
-               if (l1y) {
-                       l1y = crystalhd_reg_rd(hw->adp,
-                                MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1);
-                       l1y &= DMA_START_BIT;
-                       if (!l1y)
-                               hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
-               }
-
-               if (l0uv) {
-                       l0uv = crystalhd_reg_rd(hw->adp,
-                                MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0);
-                       l0uv &= DMA_START_BIT;
-                       if (!l0uv)
-                               hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
-               }
-
-               if (l1uv) {
-                       l1uv = crystalhd_reg_rd(hw->adp,
-                                MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1);
-                       l1uv &= DMA_START_BIT;
-                       if (!l1uv)
-                               hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
-               }
-               msleep_interruptible(100);
-               count--;
-       }
-
-       hw->rx_list_post_index = 0;
-
-       BCMLOG(BCMLOG_SSTEP, "Capture Stop: %d List0:Sts:%x List1:Sts:%x\n",
-              count, hw->rx_list_sts[0], hw->rx_list_sts[1]);
-}
-
-static enum BC_STATUS crystalhd_hw_prog_rxdma(struct crystalhd_hw *hw,
-                                        struct crystalhd_rx_dma_pkt *rx_pkt)
-{
-       uint32_t y_low_addr_reg, y_high_addr_reg;
-       uint32_t uv_low_addr_reg, uv_high_addr_reg;
-       union addr_64 desc_addr;
-       unsigned long flags;
-
-       if (!hw || !rx_pkt) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (hw->rx_list_post_index >= DMA_ENGINE_CNT) {
-               BCMLOG_ERR("List Out Of bounds %x\n", hw->rx_list_post_index);
-               return BC_STS_INV_ARG;
-       }
-
-       spin_lock_irqsave(&hw->rx_lock, flags);
-       /* FIXME: jarod: sts_free is an enum for 0,
-        in crystalhd_hw.h... yuk... */
-       if (sts_free != hw->rx_list_sts[hw->rx_list_post_index]) {
-               spin_unlock_irqrestore(&hw->rx_lock, flags);
-               return BC_STS_BUSY;
-       }
-
-       if (!hw->rx_list_post_index) {
-               y_low_addr_reg   = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0;
-               y_high_addr_reg  = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0;
-               uv_low_addr_reg  = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0;
-               uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0;
-       } else {
-               y_low_addr_reg   = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1;
-               y_high_addr_reg  = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1;
-               uv_low_addr_reg  = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1;
-               uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1;
-       }
-       rx_pkt->pkt_tag = hw->rx_pkt_tag_seed + hw->rx_list_post_index;
-       hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_y_intr;
-       if (rx_pkt->uv_phy_addr)
-               hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_uv_intr;
-       hw->rx_list_post_index = (hw->rx_list_post_index + 1) % DMA_ENGINE_CNT;
-       spin_unlock_irqrestore(&hw->rx_lock, flags);
-
-       crystalhd_dioq_add(hw->rx_actq, (void *)rx_pkt, false,
-                        rx_pkt->pkt_tag);
-
-       crystalhd_start_rx_dma_engine(hw);
-       /* Program the Y descriptor */
-       desc_addr.full_addr = rx_pkt->desc_mem.phy_addr;
-       crystalhd_reg_wr(hw->adp, y_high_addr_reg, desc_addr.high_part);
-       crystalhd_reg_wr(hw->adp, y_low_addr_reg, desc_addr.low_part | 0x01);
-
-       if (rx_pkt->uv_phy_addr) {
-               /* Program the UV descriptor */
-               desc_addr.full_addr = rx_pkt->uv_phy_addr;
-               crystalhd_reg_wr(hw->adp, uv_high_addr_reg,
-                        desc_addr.high_part);
-               crystalhd_reg_wr(hw->adp, uv_low_addr_reg,
-                        desc_addr.low_part | 0x01);
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-static enum BC_STATUS crystalhd_hw_post_cap_buff(struct crystalhd_hw *hw,
-                                         struct crystalhd_rx_dma_pkt *rx_pkt)
-{
-       enum BC_STATUS sts = crystalhd_hw_prog_rxdma(hw, rx_pkt);
-
-       if (sts == BC_STS_BUSY)
-               crystalhd_dioq_add(hw->rx_freeq, (void *)rx_pkt,
-                                false, rx_pkt->pkt_tag);
-
-       return sts;
-}
-
-static void crystalhd_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index,
-                            uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz)
-{
-       uint32_t y_dn_sz_reg, uv_dn_sz_reg;
-
-       if (!list_index) {
-               y_dn_sz_reg  = MISC1_Y_RX_LIST0_CUR_BYTE_CNT;
-               uv_dn_sz_reg = MISC1_UV_RX_LIST0_CUR_BYTE_CNT;
-       } else {
-               y_dn_sz_reg  = MISC1_Y_RX_LIST1_CUR_BYTE_CNT;
-               uv_dn_sz_reg = MISC1_UV_RX_LIST1_CUR_BYTE_CNT;
-       }
-
-       *y_dw_dnsz  = crystalhd_reg_rd(hw->adp, y_dn_sz_reg);
-       *uv_dw_dnsz = crystalhd_reg_rd(hw->adp, uv_dn_sz_reg);
-}
-
-/*
- * This function should be called only after making sure that the two DMA
- * lists are free. This function does not check if DMA's are active, before
- * turning off the DMA.
- */
-static void crystalhd_hw_finalize_pause(struct crystalhd_hw *hw)
-{
-       uint32_t dma_cntrl, aspm;
-
-       hw->stop_pending = 0;
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp,
-                        MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
-       if (dma_cntrl & DMA_START_BIT) {
-               dma_cntrl &= ~DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp,
-                        MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-       }
-
-       dma_cntrl = crystalhd_reg_rd(hw->adp,
-                        MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
-       if (dma_cntrl & DMA_START_BIT) {
-               dma_cntrl &= ~DMA_START_BIT;
-               crystalhd_reg_wr(hw->adp,
-                        MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
-       }
-       hw->rx_list_post_index = 0;
-
-       aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL);
-       aspm |= ASPM_L1_ENABLE;
-       /* NAREN BCMLOG(BCMLOG_INFO, "aspm on\n"); */
-       crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm);
-}
-
-static enum BC_STATUS crystalhd_rx_pkt_done(struct crystalhd_hw *hw,
-                        uint32_t list_index, enum BC_STATUS comp_sts)
-{
-       struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
-       uint32_t y_dw_dnsz, uv_dw_dnsz;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       if (!hw || list_index >= DMA_ENGINE_CNT) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       rx_pkt = crystalhd_dioq_find_and_fetch(hw->rx_actq,
-                                            hw->rx_pkt_tag_seed + list_index);
-       if (!rx_pkt) {
-               BCMLOG_ERR(
-               "Act-Q:PostIx:%x L0Sts:%x L1Sts:%x current L:%x tag:%x comp:%x\n",
-                          hw->rx_list_post_index, hw->rx_list_sts[0],
-                          hw->rx_list_sts[1], list_index,
-                          hw->rx_pkt_tag_seed + list_index, comp_sts);
-               return BC_STS_INV_ARG;
-       }
-
-       if (comp_sts == BC_STS_SUCCESS) {
-               crystalhd_get_dnsz(hw, list_index, &y_dw_dnsz, &uv_dw_dnsz);
-               rx_pkt->dio_req->uinfo.y_done_sz = y_dw_dnsz;
-               rx_pkt->flags = COMP_FLAG_DATA_VALID;
-               if (rx_pkt->uv_phy_addr)
-                       rx_pkt->dio_req->uinfo.uv_done_sz = uv_dw_dnsz;
-               crystalhd_dioq_add(hw->rx_rdyq, rx_pkt, true,
-                               hw->rx_pkt_tag_seed + list_index);
-               return sts;
-       }
-
-       /* Check if we can post this DIO again. */
-       return crystalhd_hw_post_cap_buff(hw, rx_pkt);
-}
-
-static bool crystalhd_rx_list0_handler(struct crystalhd_hw *hw,
-                uint32_t int_sts, uint32_t y_err_sts, uint32_t uv_err_sts)
-{
-       uint32_t tmp;
-       enum list_sts tmp_lsts;
-
-       if (!(y_err_sts & GET_Y0_ERR_MSK) && !(uv_err_sts & GET_UV0_ERR_MSK))
-               return false;
-
-       tmp_lsts = hw->rx_list_sts[0];
-
-       /* Y0 - DMA */
-       tmp = y_err_sts & GET_Y0_ERR_MSK;
-       if (int_sts & INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
-               hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
-
-       if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
-               hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
-               tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
-       }
-
-       if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
-               hw->rx_list_sts[0] &= ~rx_y_mask;
-               hw->rx_list_sts[0] |= rx_y_error;
-               tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
-       }
-
-       if (tmp) {
-               hw->rx_list_sts[0] &= ~rx_y_mask;
-               hw->rx_list_sts[0] |= rx_y_error;
-               hw->rx_list_post_index = 0;
-       }
-
-       /* UV0 - DMA */
-       tmp = uv_err_sts & GET_UV0_ERR_MSK;
-       if (int_sts & INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK)
-               hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
-
-       if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
-               hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
-               tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
-       }
-
-       if (uv_err_sts &
-        MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
-               hw->rx_list_sts[0] &= ~rx_uv_mask;
-               hw->rx_list_sts[0] |= rx_uv_error;
-               tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
-       }
-
-       if (tmp) {
-               hw->rx_list_sts[0] &= ~rx_uv_mask;
-               hw->rx_list_sts[0] |= rx_uv_error;
-               hw->rx_list_post_index = 0;
-       }
-
-       if (y_err_sts & GET_Y0_ERR_MSK) {
-               tmp = y_err_sts & GET_Y0_ERR_MSK;
-               crystalhd_reg_wr(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp);
-       }
-
-       if (uv_err_sts & GET_UV0_ERR_MSK) {
-               tmp = uv_err_sts & GET_UV0_ERR_MSK;
-               crystalhd_reg_wr(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp);
-       }
-
-       return tmp_lsts != hw->rx_list_sts[0];
-}
-
-static bool crystalhd_rx_list1_handler(struct crystalhd_hw *hw,
-                uint32_t int_sts, uint32_t y_err_sts, uint32_t uv_err_sts)
-{
-       uint32_t tmp;
-       enum list_sts tmp_lsts;
-
-       if (!(y_err_sts & GET_Y1_ERR_MSK) && !(uv_err_sts & GET_UV1_ERR_MSK))
-               return false;
-
-       tmp_lsts = hw->rx_list_sts[1];
-
-       /* Y1 - DMA */
-       tmp = y_err_sts & GET_Y1_ERR_MSK;
-       if (int_sts & INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK)
-               hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
-
-       if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
-               hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
-               tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
-       }
-
-       if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
-               /* Add retry-support..*/
-               hw->rx_list_sts[1] &= ~rx_y_mask;
-               hw->rx_list_sts[1] |= rx_y_error;
-               tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
-       }
-
-       if (tmp) {
-               hw->rx_list_sts[1] &= ~rx_y_mask;
-               hw->rx_list_sts[1] |= rx_y_error;
-               hw->rx_list_post_index = 0;
-       }
-
-       /* UV1 - DMA */
-       tmp = uv_err_sts & GET_UV1_ERR_MSK;
-       if (int_sts & INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK)
-               hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
-
-       if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
-               hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
-               tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
-       }
-
-       if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
-               /* Add retry-support*/
-               hw->rx_list_sts[1] &= ~rx_uv_mask;
-               hw->rx_list_sts[1] |= rx_uv_error;
-               tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
-       }
-
-       if (tmp) {
-               hw->rx_list_sts[1] &= ~rx_uv_mask;
-               hw->rx_list_sts[1] |= rx_uv_error;
-               hw->rx_list_post_index = 0;
-       }
-
-       if (y_err_sts & GET_Y1_ERR_MSK) {
-               tmp = y_err_sts & GET_Y1_ERR_MSK;
-               crystalhd_reg_wr(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp);
-       }
-
-       if (uv_err_sts & GET_UV1_ERR_MSK) {
-               tmp = uv_err_sts & GET_UV1_ERR_MSK;
-               crystalhd_reg_wr(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp);
-       }
-
-       return tmp_lsts != hw->rx_list_sts[1];
-}
-
-
-static void crystalhd_rx_isr(struct crystalhd_hw *hw, uint32_t intr_sts)
-{
-       unsigned long flags;
-       uint32_t i, list_avail = 0;
-       enum BC_STATUS comp_sts = BC_STS_NO_DATA;
-       uint32_t y_err_sts, uv_err_sts, y_dn_sz = 0, uv_dn_sz = 0;
-       bool ret = false;
-
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return;
-       }
-
-       if (!(intr_sts & GET_RX_INTR_MASK))
-               return;
-
-       y_err_sts = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_ERROR_STATUS);
-       uv_err_sts = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_ERROR_STATUS);
-
-       for (i = 0; i < DMA_ENGINE_CNT; i++) {
-               /* Update States..*/
-               spin_lock_irqsave(&hw->rx_lock, flags);
-               if (i == 0)
-                       ret = crystalhd_rx_list0_handler(hw, intr_sts,
-                                        y_err_sts, uv_err_sts);
-               else
-                       ret = crystalhd_rx_list1_handler(hw, intr_sts,
-                                        y_err_sts, uv_err_sts);
-               if (ret) {
-                       switch (hw->rx_list_sts[i]) {
-                       case sts_free:
-                               comp_sts = BC_STS_SUCCESS;
-                               list_avail = 1;
-                               break;
-                       case rx_y_error:
-                       case rx_uv_error:
-                       case rx_sts_error:
-                               /* We got error on both or Y or uv. */
-                               hw->stats.rx_errors++;
-                               crystalhd_get_dnsz(hw, i, &y_dn_sz, &uv_dn_sz);
-                               /* FIXME: jarod: this is where
-                                my mini pci-e card is tripping up */
-                               BCMLOG(BCMLOG_DBG, "list_index:%x rx[%d] Y:%x UV:%x Int:%x YDnSz:%x UVDnSz:%x\n",
-                                      i, hw->stats.rx_errors, y_err_sts,
-                                      uv_err_sts, intr_sts, y_dn_sz,
-                                      uv_dn_sz);
-                               hw->rx_list_sts[i] = sts_free;
-                               comp_sts = BC_STS_ERROR;
-                               break;
-                       default:
-                               /* Wait for completion..*/
-                               comp_sts = BC_STS_NO_DATA;
-                               break;
-                       }
-               }
-               spin_unlock_irqrestore(&hw->rx_lock, flags);
-
-               /* handle completion...*/
-               if (comp_sts != BC_STS_NO_DATA) {
-                       crystalhd_rx_pkt_done(hw, i, comp_sts);
-                       comp_sts = BC_STS_NO_DATA;
-               }
-       }
-
-       if (list_avail) {
-               if (hw->stop_pending) {
-                       if ((hw->rx_list_sts[0] == sts_free) &&
-                           (hw->rx_list_sts[1] == sts_free))
-                               crystalhd_hw_finalize_pause(hw);
-               } else {
-                       crystalhd_hw_start_capture(hw);
-               }
-       }
-}
-
-static enum BC_STATUS crystalhd_fw_cmd_post_proc(struct crystalhd_hw *hw,
-                                         struct BC_FW_CMD *fw_cmd)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       struct dec_rsp_channel_start_video *st_rsp = NULL;
-
-       switch (fw_cmd->cmd[0]) {
-       case eCMD_C011_DEC_CHAN_START_VIDEO:
-               st_rsp = (struct dec_rsp_channel_start_video *)fw_cmd->rsp;
-               hw->pib_del_Q_addr = st_rsp->picInfoDeliveryQ;
-               hw->pib_rel_Q_addr = st_rsp->picInfoReleaseQ;
-               BCMLOG(BCMLOG_DBG, "DelQAddr:%x RelQAddr:%x\n",
-                      hw->pib_del_Q_addr, hw->pib_rel_Q_addr);
-               break;
-       case eCMD_C011_INIT:
-               if (!(crystalhd_load_firmware_config(hw->adp))) {
-                       BCMLOG_ERR("Invalid Params.\n");
-                       sts = BC_STS_FW_AUTH_FAILED;
-               }
-               break;
-       default:
-               break;
-       }
-       return sts;
-}
-
-static enum BC_STATUS crystalhd_put_ddr2sleep(struct crystalhd_hw *hw)
-{
-       uint32_t reg;
-       union link_misc_perst_decoder_ctrl rst_cntrl_reg;
-
-       /* Pulse reset pin of 7412 (MISC_PERST_DECODER_CTRL) */
-       rst_cntrl_reg.whole_reg = crystalhd_reg_rd(hw->adp,
-                                        MISC_PERST_DECODER_CTRL);
-
-       rst_cntrl_reg.bcm_7412_rst = 1;
-       crystalhd_reg_wr(hw->adp, MISC_PERST_DECODER_CTRL,
-                                        rst_cntrl_reg.whole_reg);
-       msleep_interruptible(50);
-
-       rst_cntrl_reg.bcm_7412_rst = 0;
-       crystalhd_reg_wr(hw->adp, MISC_PERST_DECODER_CTRL,
-                                        rst_cntrl_reg.whole_reg);
-
-       /* Close all banks, put DDR in idle */
-       bc_dec_reg_wr(hw->adp, SDRAM_PRECHARGE, 0);
-
-       /* Set bit 25 (drop CKE pin of DDR) */
-       reg = bc_dec_reg_rd(hw->adp, SDRAM_PARAM);
-       reg |= 0x02000000;
-       bc_dec_reg_wr(hw->adp, SDRAM_PARAM, reg);
-
-       /* Reset the audio block */
-       bc_dec_reg_wr(hw->adp, AUD_DSP_MISC_SOFT_RESET, 0x1);
-
-       /* Power down Raptor PLL */
-       reg = bc_dec_reg_rd(hw->adp, DecHt_PllCCtl);
-       reg |= 0x00008000;
-       bc_dec_reg_wr(hw->adp, DecHt_PllCCtl, reg);
-
-       /* Power down all Audio PLL */
-       bc_dec_reg_wr(hw->adp, AIO_MISC_PLL_RESET, 0x1);
-
-       /* Power down video clock (75MHz) */
-       reg = bc_dec_reg_rd(hw->adp, DecHt_PllECtl);
-       reg |= 0x00008000;
-       bc_dec_reg_wr(hw->adp, DecHt_PllECtl, reg);
-
-       /* Power down video clock (75MHz) */
-       reg = bc_dec_reg_rd(hw->adp, DecHt_PllDCtl);
-       reg |= 0x00008000;
-       bc_dec_reg_wr(hw->adp, DecHt_PllDCtl, reg);
-
-       /* Power down core clock (200MHz) */
-       reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl);
-       reg |= 0x00008000;
-       bc_dec_reg_wr(hw->adp, DecHt_PllACtl, reg);
-
-       /* Power down core clock (200MHz) */
-       reg = bc_dec_reg_rd(hw->adp, DecHt_PllBCtl);
-       reg |= 0x00008000;
-       bc_dec_reg_wr(hw->adp, DecHt_PllBCtl, reg);
-
-       return BC_STS_SUCCESS;
-}
-
-/************************************************
-**
-*************************************************/
-
-enum BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp, void *buffer,
-                                        uint32_t sz)
-{
-       uint32_t reg_data, cnt, *temp_buff;
-       uint32_t fw_sig_len = 36;
-       uint32_t dram_offset = BC_FWIMG_ST_ADDR, sig_reg;
-
-
-       if (!adp || !buffer || !sz) {
-               BCMLOG_ERR("Invalid Params.\n");
-               return BC_STS_INV_ARG;
-       }
-
-       reg_data = crystalhd_reg_rd(adp, OTP_CMD);
-       if (!(reg_data & 0x02)) {
-               BCMLOG_ERR("Invalid hw config.. otp not programmed\n");
-               return BC_STS_ERROR;
-       }
-
-       reg_data = 0;
-       crystalhd_reg_wr(adp, DCI_CMD, 0);
-       reg_data |= BC_BIT(0);
-       crystalhd_reg_wr(adp, DCI_CMD, reg_data);
-
-       reg_data = 0;
-       cnt = 1000;
-       msleep_interruptible(10);
-
-       while (reg_data != BC_BIT(4)) {
-               reg_data = crystalhd_reg_rd(adp, DCI_STATUS);
-               reg_data &= BC_BIT(4);
-               if (--cnt == 0) {
-                       BCMLOG_ERR("Firmware Download RDY Timeout.\n");
-                       return BC_STS_TIMEOUT;
-               }
-       }
-
-       msleep_interruptible(10);
-       /*  Load the FW to the FW_ADDR field in the DCI_FIRMWARE_ADDR */
-       crystalhd_reg_wr(adp, DCI_FIRMWARE_ADDR, dram_offset);
-       temp_buff = (uint32_t *)buffer;
-       for (cnt = 0; cnt < (sz - fw_sig_len); cnt += 4) {
-               crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (dram_offset >> 19));
-               crystalhd_reg_wr(adp, DCI_FIRMWARE_DATA, *temp_buff);
-               dram_offset += 4;
-               temp_buff++;
-       }
-       msleep_interruptible(10);
-
-       temp_buff++;
-
-       sig_reg = (uint32_t)DCI_SIGNATURE_DATA_7;
-       for (cnt = 0; cnt < 8; cnt++) {
-               uint32_t swapped_data = *temp_buff;
-               swapped_data = bswap_32_1(swapped_data);
-               crystalhd_reg_wr(adp, sig_reg, swapped_data);
-               sig_reg -= 4;
-               temp_buff++;
-       }
-       msleep_interruptible(10);
-
-       reg_data = 0;
-       reg_data |= BC_BIT(1);
-       crystalhd_reg_wr(adp, DCI_CMD, reg_data);
-       msleep_interruptible(10);
-
-       reg_data = 0;
-       reg_data = crystalhd_reg_rd(adp, DCI_STATUS);
-
-       if ((reg_data & BC_BIT(9)) == BC_BIT(9)) {
-               cnt = 1000;
-               while ((reg_data & BC_BIT(0)) != BC_BIT(0)) {
-                       reg_data = crystalhd_reg_rd(adp, DCI_STATUS);
-                       reg_data &= BC_BIT(0);
-                       if (!(--cnt))
-                               break;
-                       msleep_interruptible(10);
-               }
-               reg_data = 0;
-               reg_data = crystalhd_reg_rd(adp, DCI_CMD);
-               reg_data |= BC_BIT(4);
-               crystalhd_reg_wr(adp, DCI_CMD, reg_data);
-
-       } else {
-               BCMLOG_ERR("F/w Signature mismatch\n");
-               return BC_STS_FW_AUTH_FAILED;
-       }
-
-       BCMLOG(BCMLOG_INFO, "Firmware Downloaded Successfully\n");
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw,
-                               struct BC_FW_CMD *fw_cmd)
-{
-       uint32_t cnt = 0, cmd_res_addr;
-       uint32_t *cmd_buff, *res_buff;
-       wait_queue_head_t fw_cmd_event;
-       int rc = 0;
-       enum BC_STATUS sts;
-
-       crystalhd_create_event(&fw_cmd_event);
-
-       if (!hw || !fw_cmd) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       cmd_buff = fw_cmd->cmd;
-       res_buff = fw_cmd->rsp;
-
-       if (!cmd_buff || !res_buff) {
-               BCMLOG_ERR("Invalid Parameters for F/W Command\n");
-               return BC_STS_INV_ARG;
-       }
-
-       hw->pwr_lock++;
-
-       hw->fwcmd_evt_sts = 0;
-       hw->pfw_cmd_event = &fw_cmd_event;
-
-       /*Write the command to the memory*/
-       crystalhd_mem_wr(hw->adp, TS_Host2CpuSnd, FW_CMD_BUFF_SZ, cmd_buff);
-
-       /*Memory Read for memory arbitrator flush*/
-       crystalhd_mem_rd(hw->adp, TS_Host2CpuSnd, 1, &cnt);
-
-       /* Write the command address to mailbox */
-       bc_dec_reg_wr(hw->adp, Hst2CpuMbx1, TS_Host2CpuSnd);
-       msleep_interruptible(50);
-
-       crystalhd_wait_on_event(&fw_cmd_event, hw->fwcmd_evt_sts, 20000, rc, 0);
-
-       if (!rc) {
-               sts = BC_STS_SUCCESS;
-       } else if (rc == -EBUSY) {
-               BCMLOG_ERR("Firmware command T/O\n");
-               sts = BC_STS_TIMEOUT;
-       } else if (rc == -EINTR) {
-               BCMLOG(BCMLOG_DBG, "FwCmd Wait Signal int.\n");
-               sts = BC_STS_IO_USER_ABORT;
-       } else {
-               BCMLOG_ERR("FwCmd IO Error.\n");
-               sts = BC_STS_IO_ERROR;
-       }
-
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("FwCmd Failed.\n");
-               hw->pwr_lock--;
-               return sts;
-       }
-
-       /*Get the Response Address*/
-       cmd_res_addr = bc_dec_reg_rd(hw->adp, Cpu2HstMbx1);
-
-       /*Read the Response*/
-       crystalhd_mem_rd(hw->adp, cmd_res_addr, FW_CMD_BUFF_SZ, res_buff);
-
-       hw->pwr_lock--;
-
-       if (res_buff[2] != C011_RET_SUCCESS) {
-               BCMLOG_ERR("res_buff[2] != C011_RET_SUCCESS\n");
-               return BC_STS_FW_CMD_ERR;
-       }
-
-       sts = crystalhd_fw_cmd_post_proc(hw, fw_cmd);
-       if (sts != BC_STS_SUCCESS)
-               BCMLOG_ERR("crystalhd_fw_cmd_post_proc Failed.\n");
-
-       return sts;
-}
-
-bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw)
-{
-       uint32_t intr_sts = 0;
-       uint32_t deco_intr = 0;
-       bool rc = false;
-
-       if (!adp || !hw->dev_started)
-               return rc;
-
-       hw->stats.num_interrupts++;
-       hw->pwr_lock++;
-
-       deco_intr = bc_dec_reg_rd(adp, Stream2Host_Intr_Sts);
-       intr_sts  = crystalhd_reg_rd(adp, INTR_INTR_STATUS);
-
-       if (intr_sts) {
-               /* let system know we processed interrupt..*/
-               rc = true;
-               hw->stats.dev_interrupts++;
-       }
-
-       if (deco_intr && (deco_intr != 0xdeaddead)) {
-
-               if (deco_intr & 0x80000000) {
-                       /*Set the Event and the status flag*/
-                       if (hw->pfw_cmd_event) {
-                               hw->fwcmd_evt_sts = 1;
-                               crystalhd_set_event(hw->pfw_cmd_event);
-                       }
-               }
-
-               if (deco_intr & BC_BIT(1))
-                       crystalhd_hw_proc_pib(hw);
-
-               bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, deco_intr);
-               /* FIXME: jarod: No udelay? might this be
-                the real reason mini pci-e cards were stalling out? */
-               bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, 0);
-               rc = true;
-       }
-
-       /* Rx interrupts */
-       crystalhd_rx_isr(hw, intr_sts);
-
-       /* Tx interrupts*/
-       crystalhd_tx_isr(hw, intr_sts);
-
-       /* Clear interrupts */
-       if (rc) {
-               if (intr_sts)
-                       crystalhd_reg_wr(adp, INTR_INTR_CLR_REG, intr_sts);
-
-               crystalhd_reg_wr(adp, INTR_EOI_CTRL, 1);
-       }
-
-       hw->pwr_lock--;
-
-       return rc;
-}
-
-enum BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw,
-                        struct crystalhd_adp *adp)
-{
-       if (!hw || !adp) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (hw->dev_started)
-               return BC_STS_SUCCESS;
-
-       memset(hw, 0, sizeof(struct crystalhd_hw));
-
-       hw->adp = adp;
-       spin_lock_init(&hw->lock);
-       spin_lock_init(&hw->rx_lock);
-       /* FIXME: jarod: what are these magic numbers?!? */
-       hw->tx_ioq_tag_seed = 0x70023070;
-       hw->rx_pkt_tag_seed = 0x70029070;
-
-       hw->stop_pending = 0;
-       crystalhd_start_device(hw->adp);
-       hw->dev_started = true;
-
-       /* set initial core clock  */
-       hw->core_clock_mhz = CLOCK_PRESET;
-       hw->prev_n = 0;
-       hw->pwr_lock = 0;
-       crystalhd_hw_set_core_clock(hw);
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw)
-{
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if (!hw->dev_started)
-               return BC_STS_SUCCESS;
-
-       /* Stop and DDR sleep will happen in here */
-       crystalhd_hw_suspend(hw);
-       hw->dev_started = false;
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw)
-{
-       unsigned int i;
-       void *mem;
-       size_t mem_len;
-       dma_addr_t phy_addr;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       struct crystalhd_rx_dma_pkt *rpkt;
-
-       if (!hw || !hw->adp) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       sts = crystalhd_hw_create_ioqs(hw);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("Failed to create IOQs..\n");
-               return sts;
-       }
-
-       mem_len = BC_LINK_MAX_SGLS * sizeof(struct dma_descriptor);
-
-       for (i = 0; i < BC_TX_LIST_CNT; i++) {
-               mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr);
-               if (mem) {
-                       memset(mem, 0, mem_len);
-               } else {
-                       BCMLOG_ERR("Insufficient Memory For TX\n");
-                       crystalhd_hw_free_dma_rings(hw);
-                       return BC_STS_INSUFF_RES;
-               }
-               /* rx_pkt_pool -- static memory allocation  */
-               hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = mem;
-               hw->tx_pkt_pool[i].desc_mem.phy_addr = phy_addr;
-               hw->tx_pkt_pool[i].desc_mem.sz = BC_LINK_MAX_SGLS *
-                                                sizeof(struct dma_descriptor);
-               hw->tx_pkt_pool[i].list_tag = 0;
-
-               /* Add TX dma requests to Free Queue..*/
-               sts = crystalhd_dioq_add(hw->tx_freeq,
-                                      &hw->tx_pkt_pool[i], false, 0);
-               if (sts != BC_STS_SUCCESS) {
-                       crystalhd_hw_free_dma_rings(hw);
-                       return sts;
-               }
-       }
-
-       for (i = 0; i < BC_RX_LIST_CNT; i++) {
-               rpkt = kzalloc(sizeof(*rpkt), GFP_KERNEL);
-               if (!rpkt) {
-                       BCMLOG_ERR("Insufficient Memory For RX\n");
-                       crystalhd_hw_free_dma_rings(hw);
-                       return BC_STS_INSUFF_RES;
-               }
-
-               mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr);
-               if (mem) {
-                       memset(mem, 0, mem_len);
-               } else {
-                       BCMLOG_ERR("Insufficient Memory For RX\n");
-                       crystalhd_hw_free_dma_rings(hw);
-                       kfree(rpkt);
-                       return BC_STS_INSUFF_RES;
-               }
-               rpkt->desc_mem.pdma_desc_start = mem;
-               rpkt->desc_mem.phy_addr = phy_addr;
-               rpkt->desc_mem.sz  = BC_LINK_MAX_SGLS *
-                                        sizeof(struct dma_descriptor);
-               rpkt->pkt_tag = hw->rx_pkt_tag_seed + i;
-               crystalhd_hw_free_rx_pkt(hw, rpkt);
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *hw)
-{
-       unsigned int i;
-       struct crystalhd_rx_dma_pkt *rpkt = NULL;
-
-       if (!hw || !hw->adp) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       /* Delete all IOQs.. */
-       crystalhd_hw_delete_ioqs(hw);
-
-       for (i = 0; i < BC_TX_LIST_CNT; i++) {
-               if (hw->tx_pkt_pool[i].desc_mem.pdma_desc_start) {
-                       bc_kern_dma_free(hw->adp,
-                               hw->tx_pkt_pool[i].desc_mem.sz,
-                               hw->tx_pkt_pool[i].desc_mem.pdma_desc_start,
-                               hw->tx_pkt_pool[i].desc_mem.phy_addr);
-
-                       hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = NULL;
-               }
-       }
-
-       BCMLOG(BCMLOG_DBG, "Releasing RX Pkt pool\n");
-       do {
-               rpkt = crystalhd_hw_alloc_rx_pkt(hw);
-               if (!rpkt)
-                       break;
-               bc_kern_dma_free(hw->adp, rpkt->desc_mem.sz,
-                                rpkt->desc_mem.pdma_desc_start,
-                                rpkt->desc_mem.phy_addr);
-               kfree(rpkt);
-       } while (rpkt);
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw,
-                            struct crystalhd_dio_req *ioreq,
-                            hw_comp_callback call_back,
-                            wait_queue_head_t *cb_event, uint32_t *list_id,
-                            uint8_t data_flags)
-{
-       struct tx_dma_pkt *tx_dma_packet = NULL;
-       uint32_t first_desc_u_addr, first_desc_l_addr;
-       uint32_t low_addr, high_addr;
-       union addr_64 desc_addr;
-       enum BC_STATUS sts, add_sts;
-       uint32_t dummy_index = 0;
-       unsigned long flags;
-       bool rc;
-
-       if (!hw || !ioreq || !call_back || !cb_event || !list_id) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       /*
-        * Since we hit code in busy condition very frequently,
-        * we will check the code in status first before
-        * checking the availability of free elem.
-        *
-        * This will avoid the Q fetch/add in normal condition.
-        */
-       rc = crystalhd_code_in_full(hw->adp, ioreq->uinfo.xfr_len,
-                                 false, data_flags);
-       if (rc) {
-               hw->stats.cin_busy++;
-               return BC_STS_BUSY;
-       }
-
-       /* Get a list from TxFreeQ */
-       tx_dma_packet = (struct tx_dma_pkt *)crystalhd_dioq_fetch(
-                                               hw->tx_freeq);
-       if (!tx_dma_packet) {
-               BCMLOG_ERR("No empty elements..\n");
-               return BC_STS_ERR_USAGE;
-       }
-
-       sts = crystalhd_xlat_sgl_to_dma_desc(ioreq,
-                                          &tx_dma_packet->desc_mem,
-                                          &dummy_index);
-       if (sts != BC_STS_SUCCESS) {
-               add_sts = crystalhd_dioq_add(hw->tx_freeq, tx_dma_packet,
-                                          false, 0);
-               if (add_sts != BC_STS_SUCCESS)
-                       BCMLOG_ERR("double fault..\n");
-
-               return sts;
-       }
-
-       hw->pwr_lock++;
-
-       desc_addr.full_addr = tx_dma_packet->desc_mem.phy_addr;
-       low_addr = desc_addr.low_part;
-       high_addr = desc_addr.high_part;
-
-       tx_dma_packet->call_back = call_back;
-       tx_dma_packet->cb_event  = cb_event;
-       tx_dma_packet->dio_req   = ioreq;
-
-       spin_lock_irqsave(&hw->lock, flags);
-
-       if (hw->tx_list_post_index == 0) {
-               first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST0;
-               first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST0;
-       } else {
-               first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST1;
-               first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST1;
-       }
-
-       *list_id = tx_dma_packet->list_tag = hw->tx_ioq_tag_seed +
-                                            hw->tx_list_post_index;
-
-       hw->tx_list_post_index = (hw->tx_list_post_index + 1) % DMA_ENGINE_CNT;
-
-       spin_unlock_irqrestore(&hw->lock, flags);
-
-
-       /* Insert in Active Q..*/
-       crystalhd_dioq_add(hw->tx_actq, tx_dma_packet, false,
-                        tx_dma_packet->list_tag);
-
-       /*
-        * Interrupt will come as soon as you write
-        * the valid bit. So be ready for that. All
-        * the initialization should happen before that.
-        */
-       crystalhd_start_tx_dma_engine(hw);
-       crystalhd_reg_wr(hw->adp, first_desc_u_addr, desc_addr.high_part);
-
-       crystalhd_reg_wr(hw->adp, first_desc_l_addr, desc_addr.low_part |
-                                        0x01);
-                                       /* Be sure we set the valid bit ^^^^ */
-
-       return BC_STS_SUCCESS;
-}
-
-/*
- * This is a force cancel and we are racing with ISR.
- *
- * Will try to remove the req from ActQ before ISR gets it.
- * If ISR gets it first then the completion happens in the
- * normal path and we will return _STS_NO_DATA from here.
- *
- * FIX_ME: Not Tested the actual condition..
- */
-enum BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw,
-                                        uint32_t list_id)
-{
-       if (!hw || !list_id) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       crystalhd_stop_tx_dma_engine(hw);
-       crystalhd_hw_tx_req_complete(hw, list_id, BC_STS_IO_USER_ABORT);
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,
-                                struct crystalhd_dio_req *ioreq, bool en_post)
-{
-       struct crystalhd_rx_dma_pkt *rpkt;
-       uint32_t tag, uv_desc_ix = 0;
-       enum BC_STATUS sts;
-
-       if (!hw || !ioreq) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       rpkt = crystalhd_hw_alloc_rx_pkt(hw);
-       if (!rpkt) {
-               BCMLOG_ERR("Insufficient resources\n");
-               return BC_STS_INSUFF_RES;
-       }
-
-       rpkt->dio_req = ioreq;
-       tag = rpkt->pkt_tag;
-
-       sts = crystalhd_xlat_sgl_to_dma_desc(ioreq, &rpkt->desc_mem,
-                                        &uv_desc_ix);
-       if (sts != BC_STS_SUCCESS)
-               return sts;
-
-       rpkt->uv_phy_addr = 0;
-
-       /* Store the address of UV in the rx packet for post*/
-       if (uv_desc_ix)
-               rpkt->uv_phy_addr = rpkt->desc_mem.phy_addr +
-                        (sizeof(struct dma_descriptor) * (uv_desc_ix + 1));
-
-       if (en_post)
-               sts = crystalhd_hw_post_cap_buff(hw, rpkt);
-       else
-               sts = crystalhd_dioq_add(hw->rx_freeq, rpkt, false, tag);
-
-       return sts;
-}
-
-enum BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,
-                                   struct BC_PIC_INFO_BLOCK *pib,
-                                   struct crystalhd_dio_req **ioreq)
-{
-       struct crystalhd_rx_dma_pkt *rpkt;
-       uint32_t timeout = BC_PROC_OUTPUT_TIMEOUT / 1000;
-       uint32_t sig_pending = 0;
-
-
-       if (!hw || !ioreq || !pib) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       rpkt = crystalhd_dioq_fetch_wait(hw->rx_rdyq, timeout, &sig_pending);
-       if (!rpkt) {
-               if (sig_pending) {
-                       BCMLOG(BCMLOG_INFO, "wait on frame time out %d\n",
-                                        sig_pending);
-                       return BC_STS_IO_USER_ABORT;
-               } else {
-                       return BC_STS_TIMEOUT;
-               }
-       }
-
-       rpkt->dio_req->uinfo.comp_flags = rpkt->flags;
-
-       if (rpkt->flags & COMP_FLAG_PIB_VALID)
-               memcpy(pib, &rpkt->pib, sizeof(*pib));
-
-       *ioreq = rpkt->dio_req;
-
-       crystalhd_hw_free_rx_pkt(hw, rpkt);
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw)
-{
-       struct crystalhd_rx_dma_pkt *rx_pkt;
-       enum BC_STATUS sts;
-       uint32_t i;
-
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       /* This is start of capture.. Post to both the lists.. */
-       for (i = 0; i < DMA_ENGINE_CNT; i++) {
-               rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq);
-               if (!rx_pkt)
-                       return BC_STS_NO_DATA;
-               sts = crystalhd_hw_post_cap_buff(hw, rx_pkt);
-               if (BC_STS_SUCCESS != sts)
-                       break;
-
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw)
-{
-       void *temp = NULL;
-
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       crystalhd_stop_rx_dma_engine(hw);
-
-       do {
-               temp = crystalhd_dioq_fetch(hw->rx_freeq);
-               if (temp)
-                       crystalhd_rx_pkt_rel_call_back(hw, temp);
-       } while (temp);
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw)
-{
-       hw->stats.pause_cnt++;
-       hw->stop_pending = 1;
-
-       if ((hw->rx_list_sts[0] == sts_free) &&
-           (hw->rx_list_sts[1] == sts_free))
-               crystalhd_hw_finalize_pause(hw);
-
-       return BC_STS_SUCCESS;
-}
-
-enum BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw)
-{
-       enum BC_STATUS sts;
-       uint32_t aspm;
-
-       hw->stop_pending = 0;
-
-       aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL);
-       aspm &= ~ASPM_L1_ENABLE;
-/* NAREN BCMLOG(BCMLOG_INFO, "aspm off\n"); */
-       crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm);
-
-       sts = crystalhd_hw_start_capture(hw);
-       return sts;
-}
-
-enum BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw)
-{
-       enum BC_STATUS sts;
-
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       sts = crystalhd_put_ddr2sleep(hw);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("Failed to Put DDR To Sleep!!\n");
-               return BC_STS_ERROR;
-       }
-
-       if (!crystalhd_stop_device(hw->adp)) {
-               BCMLOG_ERR("Failed to Stop Device!!\n");
-               return BC_STS_ERROR;
-       }
-
-       return BC_STS_SUCCESS;
-}
-
-void crystalhd_hw_stats(struct crystalhd_hw *hw,
-                struct crystalhd_hw_stats *stats)
-{
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return;
-       }
-
-       /* if called w/NULL stats, its a req to zero out the stats */
-       if (!stats) {
-               memset(&hw->stats, 0, sizeof(hw->stats));
-               return;
-       }
-
-       hw->stats.freeq_count = crystalhd_dioq_count(hw->rx_freeq);
-       hw->stats.rdyq_count  = crystalhd_dioq_count(hw->rx_rdyq);
-       memcpy(stats, &hw->stats, sizeof(*stats));
-}
-
-enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *hw)
-{
-       uint32_t reg, n, i;
-       uint32_t vco_mg, refresh_reg;
-
-       if (!hw) {
-               BCMLOG_ERR("Invalid Arguments\n");
-               return BC_STS_INV_ARG;
-       }
-
-       /* FIXME: jarod: wha? */
-       /*n = (hw->core_clock_mhz * 3) / 20 + 1; */
-       n = hw->core_clock_mhz/5;
-
-       if (n == hw->prev_n)
-               return BC_STS_CLK_NOCHG;
-
-       if (hw->pwr_lock > 0) {
-               /* BCMLOG(BCMLOG_INFO,"pwr_lock is %u\n", hw->pwr_lock) */
-               return BC_STS_CLK_NOCHG;
-       }
-
-       i = n * 27;
-       if (i < 560)
-               vco_mg = 0;
-       else if (i < 900)
-               vco_mg = 1;
-       else if (i < 1030)
-               vco_mg = 2;
-       else
-               vco_mg = 3;
-
-       reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl);
-
-       reg &= 0xFFFFCFC0;
-       reg |= n;
-       reg |= vco_mg << 12;
-
-       BCMLOG(BCMLOG_INFO, "clock is moving to %d with n %d with vco_mg %d\n",
-              hw->core_clock_mhz, n, vco_mg);
-
-       /* Change the DRAM refresh rate to accommodate the new frequency */
-       /* refresh reg = ((refresh_rate * clock_rate)/16) - 1; rounding up*/
-       refresh_reg = (7 * hw->core_clock_mhz / 16);
-       bc_dec_reg_wr(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | refresh_reg));
-
-       bc_dec_reg_wr(hw->adp, DecHt_PllACtl, reg);
-
-       i = 0;
-
-       for (i = 0; i < 10; i++) {
-               reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl);
-
-               if (reg & 0x00020000) {
-                       hw->prev_n = n;
-                       /* FIXME: jarod: outputting
-                        a random "C" is... confusing... */
-                       BCMLOG(BCMLOG_INFO, "C");
-                       return BC_STS_SUCCESS;
-               } else {
-                       msleep_interruptible(10);
-               }
-       }
-       BCMLOG(BCMLOG_INFO, "clk change failed\n");
-       return BC_STS_CLK_NOCHG;
-}
diff --git a/drivers/staging/crystalhd/crystalhd_hw.h b/drivers/staging/crystalhd/crystalhd_hw.h
deleted file mode 100644 (file)
index d5cb68d..0000000
+++ /dev/null
@@ -1,407 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_hw . h
- *
- *  Description:
- *             BCM70012 Linux driver hardware layer.
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#ifndef _CRYSTALHD_HW_H_
-#define _CRYSTALHD_HW_H_
-
-#include "crystalhd.h"
-
-/* HW constants..*/
-#define DMA_ENGINE_CNT         2
-#define MAX_PIB_Q_DEPTH                64
-#define MIN_PIB_Q_DEPTH                2
-#define WR_POINTER_OFF         4
-
-#define ASPM_L1_ENABLE         (BC_BIT(27))
-
-/*************************************************
-  7412 Decoder  Registers.
-**************************************************/
-#define FW_CMD_BUFF_SZ         64
-#define TS_Host2CpuSnd         0x00000100
-#define Hst2CpuMbx1            0x00100F00
-#define Cpu2HstMbx1            0x00100F04
-#define MbxStat1               0x00100F08
-#define Stream2Host_Intr_Sts   0x00100F24
-#define C011_RET_SUCCESS       0x0 /* Return status of firmware command. */
-
-/* TS input status register */
-#define TS_StreamAFIFOStatus   0x0010044C
-#define TS_StreamBFIFOStatus   0x0010084C
-
-/*UART Selection definitions*/
-#define UartSelectA            0x00100300
-#define UartSelectB            0x00100304
-
-#define BSVS_UART_DEC_NONE     0x00
-#define BSVS_UART_DEC_OUTER    0x01
-#define BSVS_UART_DEC_INNER    0x02
-#define BSVS_UART_STREAM       0x03
-
-/* Code-In fifo */
-#define REG_DecCA_RegCinCTL    0xa00
-#define REG_DecCA_RegCinBase   0xa0c
-#define REG_DecCA_RegCinEnd    0xa10
-#define REG_DecCA_RegCinWrPtr  0xa04
-#define REG_DecCA_RegCinRdPtr  0xa08
-
-#define REG_Dec_TsUser0Base    0x100864
-#define REG_Dec_TsUser0Rdptr   0x100868
-#define REG_Dec_TsUser0Wrptr   0x10086C
-#define REG_Dec_TsUser0End     0x100874
-
-/* ASF Case ...*/
-#define REG_Dec_TsAudCDB2Base  0x10036c
-#define REG_Dec_TsAudCDB2Rdptr  0x100378
-#define REG_Dec_TsAudCDB2Wrptr  0x100374
-#define REG_Dec_TsAudCDB2End   0x100370
-
-/* DRAM bringup Registers */
-#define SDRAM_PARAM            0x00040804
-#define SDRAM_PRECHARGE                0x000408B0
-#define SDRAM_EXT_MODE         0x000408A4
-#define SDRAM_MODE             0x000408A0
-#define SDRAM_REFRESH          0x00040890
-#define SDRAM_REF_PARAM                0x00040808
-
-#define DecHt_PllACtl          0x34000C
-#define DecHt_PllBCtl          0x340010
-#define DecHt_PllCCtl          0x340014
-#define DecHt_PllDCtl          0x340034
-#define DecHt_PllECtl          0x340038
-#define AUD_DSP_MISC_SOFT_RESET        0x00240104
-#define AIO_MISC_PLL_RESET     0x0026000C
-#define PCIE_CLK_REQ_REG       0xDC
-#define        PCI_CLK_REQ_ENABLE      (BC_BIT(8))
-
-/*************************************************
-  F/W Copy engine definitions..
-**************************************************/
-#define BC_FWIMG_ST_ADDR       0x00000000
-/* FIXME: jarod: there's a kernel function that'll do this for us... */
-#define rotr32_1(x, n)         (((x) >> n) | ((x) << (32 - n)))
-#define bswap_32_1(x) ((rotr32_1((x), 24) & 0x00ff00ff) | (rotr32_1((x), 8) & 0xff00ff00))
-
-#define DecHt_HostSwReset      0x340000
-#define BC_DRAM_FW_CFG_ADDR    0x001c2000
-
-union addr_64 {
-       struct {
-               uint32_t        low_part;
-               uint32_t        high_part;
-       };
-
-       uint64_t        full_addr;
-
-};
-
-union intr_mask_reg {
-       struct {
-               uint32_t        mask_tx_done:1;
-               uint32_t        mask_tx_err:1;
-               uint32_t        mask_rx_done:1;
-               uint32_t        mask_rx_err:1;
-               uint32_t        mask_pcie_err:1;
-               uint32_t        mask_pcie_rbusmast_err:1;
-               uint32_t        mask_pcie_rgr_bridge:1;
-               uint32_t        reserved:25;
-       };
-
-       uint32_t        whole_reg;
-
-};
-
-union link_misc_perst_deco_ctrl {
-       struct {
-               uint32_t        bcm7412_rst:1;  /* 1 -> BCM7412 is held
-                                               in reset. Reset value 1.*/
-               uint32_t        reserved0:3;            /* Reserved.No Effect*/
-               uint32_t        stop_bcm_7412_clk:1;    /* 1 ->Stops branch of
-                                               27MHz clk used to clk BCM7412*/
-               uint32_t        reserved1:27;           /* Reserved. No Effect*/
-       };
-
-       uint32_t        whole_reg;
-
-};
-
-union link_misc_perst_clk_ctrl {
-       struct {
-               uint32_t        sel_alt_clk:1;    /* When set, selects a
-                                6.75MHz clock as the source of core_clk */
-               uint32_t        stop_core_clk:1;  /* When set, stops the branch
-                of core_clk that is not needed for low power operation */
-               uint32_t        pll_pwr_dn:1;     /* When set, powers down the
-                        main PLL. The alternate clock bit should be set to
-                        select an alternate clock before setting this bit.*/
-               uint32_t        reserved0:5;      /* Reserved */
-               uint32_t        pll_mult:8;       /* This setting controls
-                                                the multiplier for the PLL. */
-               uint32_t        pll_div:4;        /* This setting controls
-                                                the divider for the PLL. */
-               uint32_t        reserved1:12;     /* Reserved */
-       };
-
-       uint32_t        whole_reg;
-
-};
-
-union link_misc_perst_decoder_ctrl {
-       struct {
-               uint32_t        bcm_7412_rst:1; /* 1 -> BCM7412 is held
-                                                in reset. Reset value 1.*/
-               uint32_t        res0:3; /* Reserved.No Effect*/
-               uint32_t        stop_7412_clk:1; /* 1 ->Stops branch of 27MHz
-                                                clk used to clk BCM7412*/
-               uint32_t        res1:27; /* Reserved. No Effect */
-       };
-
-       uint32_t        whole_reg;
-
-};
-
-union desc_low_addr_reg {
-       struct {
-               uint32_t        list_valid:1;
-               uint32_t        reserved:4;
-               uint32_t        low_addr:27;
-       };
-
-       uint32_t        whole_reg;
-
-};
-
-struct dma_descriptor {        /* 8 32-bit values */
-       /* 0th u32 */
-       uint32_t sdram_buff_addr:28;    /* bits 0-27:  SDRAM Address */
-       uint32_t res0:4;                /* bits 28-31: Reserved */
-
-       /* 1st u32 */
-       uint32_t buff_addr_low;         /* 1 buffer address low */
-       uint32_t buff_addr_high;        /* 2 buffer address high */
-
-       /* 3rd u32 */
-       uint32_t res2:2;                /* 0-1 - Reserved */
-       uint32_t xfer_size:23;          /* 2-24 = Xfer size in words */
-       uint32_t res3:6;                /* 25-30 reserved */
-       uint32_t intr_enable:1;         /* 31 - Interrupt After this desc */
-
-       /* 4th u32 */
-       uint32_t endian_xlat_align:2;   /* 0-1 Endian Translation */
-       uint32_t next_desc_cont:1;      /* 2 - Next desc is in contig memory */
-       uint32_t res4:25;               /* 3 - 27 Reserved bits */
-       uint32_t fill_bytes:2;          /* 28-29 Bits Fill Bytes */
-       uint32_t dma_dir:1;             /* 30 bit DMA Direction */
-       uint32_t last_rec_indicator:1;  /* 31 bit Last Record Indicator */
-
-       /* 5th u32 */
-       uint32_t next_desc_addr_low;    /* 32-bits Next Desc Addr lower */
-
-       /* 6th u32 */
-       uint32_t next_desc_addr_high;   /* 32-bits Next Desc Addr Higher */
-
-       /* 7th u32 */
-       uint32_t res8;                  /* Last 32bits reserved */
-
-};
-
-/*
- * We will allocate the memory in 4K pages
- * the linked list will be a list of 32 byte descriptors.
- * The  virtual address will determine what should be freed.
- */
-struct dma_desc_mem {
-       struct dma_descriptor   *pdma_desc_start; /* 32-bytes for dma
-                                descriptor. should be first element */
-       dma_addr_t              phy_addr;       /* physical address
-                                                of each DMA desc */
-       uint32_t                sz;
-       struct _dma_desc_mem_   *Next; /* points to Next Descriptor in chain */
-
-};
-
-enum list_sts {
-       sts_free = 0,
-
-       /* RX-Y Bits 0:7 */
-       rx_waiting_y_intr       = 0x00000001,
-       rx_y_error              = 0x00000004,
-
-       /* RX-UV Bits 8:16 */
-       rx_waiting_uv_intr      = 0x0000100,
-       rx_uv_error             = 0x0000400,
-
-       rx_sts_waiting          = (rx_waiting_y_intr|rx_waiting_uv_intr),
-       rx_sts_error            = (rx_y_error|rx_uv_error),
-
-       rx_y_mask               = 0x000000FF,
-       rx_uv_mask              = 0x0000FF00,
-};
-
-struct tx_dma_pkt {
-       struct dma_desc_mem     desc_mem;
-       hw_comp_callback        call_back;
-       struct crystalhd_dio_req        *dio_req;
-       wait_queue_head_t       *cb_event;
-       uint32_t                list_tag;
-};
-
-struct crystalhd_rx_dma_pkt {
-       struct dma_desc_mem             desc_mem;
-       struct crystalhd_dio_req        *dio_req;
-       uint32_t                        pkt_tag;
-       uint32_t                        flags;
-       struct BC_PIC_INFO_BLOCK        pib;
-       dma_addr_t                      uv_phy_addr;
-       struct crystalhd_rx_dma_pkt     *next;
-};
-
-struct crystalhd_hw_stats {
-       uint32_t        rx_errors;
-       uint32_t        tx_errors;
-       uint32_t        freeq_count;
-       uint32_t        rdyq_count;
-       uint32_t        num_interrupts;
-       uint32_t        dev_interrupts;
-       uint32_t        cin_busy;
-       uint32_t        pause_cnt;
-};
-
-struct crystalhd_hw {
-       struct tx_dma_pkt       tx_pkt_pool[DMA_ENGINE_CNT];
-       spinlock_t              lock;
-
-       uint32_t                tx_ioq_tag_seed;
-       uint32_t                tx_list_post_index;
-
-       struct crystalhd_rx_dma_pkt *rx_pkt_pool_head;
-       uint32_t                rx_pkt_tag_seed;
-
-       bool                    dev_started;
-       void                    *adp;
-
-       wait_queue_head_t       *pfw_cmd_event;
-       int                     fwcmd_evt_sts;
-
-       uint32_t                pib_del_Q_addr;
-       uint32_t                pib_rel_Q_addr;
-
-       struct crystalhd_dioq   *tx_freeq;
-       struct crystalhd_dioq   *tx_actq;
-
-       /* Rx DMA Engine Specific Locks */
-       spinlock_t              rx_lock;
-       uint32_t                rx_list_post_index;
-       enum list_sts           rx_list_sts[DMA_ENGINE_CNT];
-       struct crystalhd_dioq   *rx_rdyq;
-       struct crystalhd_dioq   *rx_freeq;
-       struct crystalhd_dioq   *rx_actq;
-       uint32_t                stop_pending;
-
-       /* HW counters.. */
-       struct crystalhd_hw_stats       stats;
-
-       /* Core clock in MHz */
-       uint32_t                core_clock_mhz;
-       uint32_t                prev_n;
-       uint32_t                pwr_lock;
-};
-
-/* Clock defines for power control */
-#define CLOCK_PRESET 175
-
-/* DMA engine register BIT mask wrappers.. */
-#define DMA_START_BIT  MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK
-
-#define GET_RX_INTR_MASK (INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK |        \
-       INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK |  \
-       INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK |            \
-       INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK |           \
-       INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK |           \
-       INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK |  \
-       INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK |            \
-       INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
-
-#define GET_Y0_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \
-       MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK |             \
-       MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK |       \
-       MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
-
-#define GET_UV0_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \
-       MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK |            \
-       MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK |      \
-       MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
-
-#define GET_Y1_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \
-       MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK |             \
-       MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK |       \
-       MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
-
-#define GET_UV1_ERR_MSK        (MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \
-       MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK |            \
-       MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK |      \
-       MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
-
-
-/**** API Exposed to the other layers ****/
-enum BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp,
-                             void *buffer, uint32_t sz);
-enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw,
-                                struct BC_FW_CMD *fw_cmd);
-bool crystalhd_hw_interrupt(struct crystalhd_adp *adp,
-                                struct crystalhd_hw *hw);
-enum BC_STATUS crystalhd_hw_open(struct crystalhd_hw *,
-                                struct crystalhd_adp *);
-enum BC_STATUS crystalhd_hw_close(struct crystalhd_hw *);
-enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *);
-enum BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *);
-
-
-enum BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw,
-                            struct crystalhd_dio_req *ioreq,
-                            hw_comp_callback call_back,
-                            wait_queue_head_t *cb_event,
-                            uint32_t *list_id, uint8_t data_flags);
-
-enum BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw);
-enum BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw);
-enum BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw);
-enum BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw,
-                                uint32_t list_id);
-enum BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,
-                        struct crystalhd_dio_req *ioreq, bool en_post);
-enum BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,
-                                   struct BC_PIC_INFO_BLOCK *pib,
-                                   struct crystalhd_dio_req **ioreq);
-enum BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw);
-enum BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw);
-void crystalhd_hw_stats(struct crystalhd_hw *hw,
-                        struct crystalhd_hw_stats *stats);
-
-/* API to program the core clock on the decoder */
-enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *);
-
-#endif
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.c b/drivers/staging/crystalhd/crystalhd_lnx.c
deleted file mode 100644 (file)
index e6fb331..0000000
+++ /dev/null
@@ -1,782 +0,0 @@
-/***************************************************************************
-  BCM70010 Linux driver
-  Copyright (c) 2005-2009, Broadcom Corporation.
-
-  This driver is free software; you can redistribute it and/or modify
-  it under the terms of the GNU General Public License as published by
-  the Free Software Foundation, version 2 of the License.
-
-  This driver is distributed in the hope that it will be useful,
-  but WITHOUT ANY WARRANTY; without even the implied warranty of
-  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU General Public License for more details.
-
-  You should have received a copy of the GNU General Public License
-  along with this driver.  If not, see <http://www.gnu.org/licenses/>.
-***************************************************************************/
-
-#include "crystalhd.h"
-
-#include <linux/mutex.h>
-#include <linux/slab.h>
-
-
-static DEFINE_MUTEX(chd_dec_mutex);
-static struct class *crystalhd_class;
-
-static struct crystalhd_adp *g_adp_info;
-
-static irqreturn_t chd_dec_isr(int irq, void *arg)
-{
-       struct crystalhd_adp *adp = arg;
-       int rc = 0;
-       if (adp)
-               rc = crystalhd_cmd_interrupt(&adp->cmds);
-
-       return IRQ_RETVAL(rc);
-}
-
-static int chd_dec_enable_int(struct crystalhd_adp *adp)
-{
-       int rc = 0;
-
-       if (!adp || !adp->pdev) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return -EINVAL;
-       }
-
-       if (adp->pdev->msi_enabled)
-               adp->msi = 1;
-       else
-               adp->msi = pci_enable_msi(adp->pdev);
-
-       rc = request_irq(adp->pdev->irq, chd_dec_isr, IRQF_SHARED,
-                        adp->name, (void *)adp);
-       if (rc) {
-               BCMLOG_ERR("Interrupt request failed..\n");
-               pci_disable_msi(adp->pdev);
-       }
-
-       return rc;
-}
-
-static int chd_dec_disable_int(struct crystalhd_adp *adp)
-{
-       if (!adp || !adp->pdev) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return -EINVAL;
-       }
-
-       free_irq(adp->pdev->irq, adp);
-
-       if (adp->msi)
-               pci_disable_msi(adp->pdev);
-
-       return 0;
-}
-
-static struct
-crystalhd_ioctl_data *chd_dec_alloc_iodata(struct crystalhd_adp *adp,
-                                          bool isr)
-{
-       unsigned long flags = 0;
-       struct crystalhd_ioctl_data *temp;
-
-       if (!adp)
-               return NULL;
-
-       spin_lock_irqsave(&adp->lock, flags);
-
-       temp = adp->idata_free_head;
-       if (temp) {
-               adp->idata_free_head = adp->idata_free_head->next;
-               memset(temp, 0, sizeof(*temp));
-       }
-
-       spin_unlock_irqrestore(&adp->lock, flags);
-       return temp;
-}
-
-static void chd_dec_free_iodata(struct crystalhd_adp *adp,
-                               struct crystalhd_ioctl_data *iodata, bool isr)
-{
-       unsigned long flags = 0;
-
-       if (!adp || !iodata)
-               return;
-
-       spin_lock_irqsave(&adp->lock, flags);
-       iodata->next = adp->idata_free_head;
-       adp->idata_free_head = iodata;
-       spin_unlock_irqrestore(&adp->lock, flags);
-}
-
-static inline int crystalhd_user_data(void __user *ud, void *dr,
-                                     int size, int set)
-{
-       int rc;
-
-       if (!ud || !dr) {
-               BCMLOG_ERR("Invalid arg\n");
-               return -EINVAL;
-       }
-
-       if (set)
-               rc = copy_to_user(ud, dr, size);
-       else
-               rc = copy_from_user(dr, ud, size);
-
-       if (rc) {
-               BCMLOG_ERR("Invalid args for command\n");
-               rc = -EFAULT;
-       }
-
-       return rc;
-}
-
-static int chd_dec_fetch_cdata(struct crystalhd_adp *adp,
-                              struct crystalhd_ioctl_data *io, uint32_t m_sz,
-                              unsigned long ua)
-{
-       unsigned long ua_off;
-       int rc = 0;
-
-       if (!adp || !io || !ua || !m_sz) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return -EINVAL;
-       }
-
-       io->add_cdata = vmalloc(m_sz);
-       if (!io->add_cdata) {
-               BCMLOG_ERR("kalloc fail for sz:%x\n", m_sz);
-               return -ENOMEM;
-       }
-
-       io->add_cdata_sz = m_sz;
-       ua_off = ua + sizeof(io->udata);
-       rc = crystalhd_user_data((void __user *)ua_off, io->add_cdata,
-                                io->add_cdata_sz, 0);
-       if (rc) {
-               BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
-                          io->add_cdata_sz, (unsigned int)ua_off);
-               vfree(io->add_cdata);
-               io->add_cdata = NULL;
-               return -ENODATA;
-       }
-
-       return rc;
-}
-
-static int chd_dec_release_cdata(struct crystalhd_adp *adp,
-                                struct crystalhd_ioctl_data *io,
-                                unsigned long ua)
-{
-       unsigned long ua_off;
-       int rc;
-
-       if (!adp || !io || !ua) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return -EINVAL;
-       }
-
-       if (io->cmd != BCM_IOC_FW_DOWNLOAD) {
-               ua_off = ua + sizeof(io->udata);
-               rc = crystalhd_user_data((void __user *)ua_off, io->add_cdata,
-                                        io->add_cdata_sz, 1);
-               if (rc) {
-                       BCMLOG_ERR(
-                               "failed to push add_cdata sz:%x ua_off:%x\n",
-                                io->add_cdata_sz, (unsigned int)ua_off);
-                       return -ENODATA;
-               }
-       }
-
-       if (io->add_cdata) {
-               vfree(io->add_cdata);
-               io->add_cdata = NULL;
-       }
-
-       return 0;
-}
-
-static int chd_dec_proc_user_data(struct crystalhd_adp *adp,
-                                 struct crystalhd_ioctl_data *io,
-                                 unsigned long ua, int set)
-{
-       int rc;
-       uint32_t m_sz = 0;
-
-       if (!adp || !io || !ua) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return -EINVAL;
-       }
-
-       rc = crystalhd_user_data((void __user *)ua, &io->udata,
-                                sizeof(io->udata), set);
-       if (rc) {
-               BCMLOG_ERR("failed to %s iodata\n", (set ? "set" : "get"));
-               return rc;
-       }
-
-       switch (io->cmd) {
-       case BCM_IOC_MEM_RD:
-       case BCM_IOC_MEM_WR:
-       case BCM_IOC_FW_DOWNLOAD:
-               m_sz = io->udata.u.devMem.NumDwords * 4;
-               if (set)
-                       rc = chd_dec_release_cdata(adp, io, ua);
-               else
-                       rc = chd_dec_fetch_cdata(adp, io, m_sz, ua);
-               break;
-       default:
-               break;
-       }
-
-       return rc;
-}
-
-static int chd_dec_api_cmd(struct crystalhd_adp *adp, unsigned long ua,
-                          uint32_t uid, uint32_t cmd, crystalhd_cmd_proc func)
-{
-       int rc;
-       struct crystalhd_ioctl_data *temp;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       temp = chd_dec_alloc_iodata(adp, 0);
-       if (!temp) {
-               BCMLOG_ERR("Failed to get iodata..\n");
-               return -EINVAL;
-       }
-
-       temp->u_id = uid;
-       temp->cmd  = cmd;
-
-       rc = chd_dec_proc_user_data(adp, temp, ua, 0);
-       if (!rc) {
-               sts = func(&adp->cmds, temp);
-               if (sts == BC_STS_PENDING)
-                       sts = BC_STS_NOT_IMPL;
-               temp->udata.RetSts = sts;
-               rc = chd_dec_proc_user_data(adp, temp, ua, 1);
-       }
-
-       chd_dec_free_iodata(adp, temp, 0);
-
-       return rc;
-}
-
-/* API interfaces */
-static long chd_dec_ioctl(struct file *fd, unsigned int cmd, unsigned long ua)
-{
-       struct crystalhd_adp *adp = chd_get_adp();
-       crystalhd_cmd_proc cproc;
-       struct crystalhd_user *uc;
-       int ret;
-
-       if (!adp || !fd) {
-               BCMLOG_ERR("Invalid adp\n");
-               return -EINVAL;
-       }
-
-       uc = fd->private_data;
-       if (!uc) {
-               BCMLOG_ERR("Failed to get uc\n");
-               return -ENODATA;
-       }
-
-       mutex_lock(&chd_dec_mutex);
-       cproc = crystalhd_get_cmd_proc(&adp->cmds, cmd, uc);
-       if (!cproc) {
-               BCMLOG_ERR("Unhandled command: %d\n", cmd);
-               mutex_unlock(&chd_dec_mutex);
-               return -EINVAL;
-       }
-
-       ret = chd_dec_api_cmd(adp, ua, uc->uid, cmd, cproc);
-       mutex_unlock(&chd_dec_mutex);
-       return ret;
-}
-
-static int chd_dec_open(struct inode *in, struct file *fd)
-{
-       struct crystalhd_adp *adp = chd_get_adp();
-       int rc = 0;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       struct crystalhd_user *uc = NULL;
-
-       if (!adp) {
-               BCMLOG_ERR("Invalid adp\n");
-               return -EINVAL;
-       }
-
-       if (adp->cfg_users >= BC_LINK_MAX_OPENS) {
-               BCMLOG(BCMLOG_INFO, "Already in use.%d\n", adp->cfg_users);
-               return -EBUSY;
-       }
-
-       sts = crystalhd_user_open(&adp->cmds, &uc);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("cmd_user_open - %d\n", sts);
-               rc = -EBUSY;
-       }
-
-       adp->cfg_users++;
-
-       fd->private_data = uc;
-
-       return rc;
-}
-
-static int chd_dec_close(struct inode *in, struct file *fd)
-{
-       struct crystalhd_adp *adp = chd_get_adp();
-       struct crystalhd_user *uc;
-
-       if (!adp) {
-               BCMLOG_ERR("Invalid adp\n");
-               return -EINVAL;
-       }
-
-       uc = fd->private_data;
-       if (!uc) {
-               BCMLOG_ERR("Failed to get uc\n");
-               return -ENODATA;
-       }
-
-       crystalhd_user_close(&adp->cmds, uc);
-
-       adp->cfg_users--;
-
-       return 0;
-}
-
-static const struct file_operations chd_dec_fops = {
-       .owner   = THIS_MODULE,
-       .unlocked_ioctl = chd_dec_ioctl,
-       .open    = chd_dec_open,
-       .release = chd_dec_close,
-       .llseek = noop_llseek,
-};
-
-static int chd_dec_init_chdev(struct crystalhd_adp *adp)
-{
-       struct crystalhd_ioctl_data *temp;
-       struct device *dev;
-       int rc = -ENODEV, i = 0;
-
-       if (!adp)
-               goto fail;
-
-       adp->chd_dec_major = register_chrdev(0, CRYSTALHD_API_NAME,
-                                            &chd_dec_fops);
-       if (adp->chd_dec_major < 0) {
-               BCMLOG_ERR("Failed to create config dev\n");
-               rc = adp->chd_dec_major;
-               goto fail;
-       }
-
-       /* register crystalhd class */
-       crystalhd_class = class_create(THIS_MODULE, "crystalhd");
-       if (IS_ERR(crystalhd_class)) {
-               rc = PTR_ERR(crystalhd_class);
-               BCMLOG_ERR("failed to create class\n");
-               goto class_create_fail;
-       }
-
-       dev = device_create(crystalhd_class, NULL,
-                           MKDEV(adp->chd_dec_major, 0), NULL, "crystalhd");
-       if (IS_ERR(dev)) {
-               rc = PTR_ERR(dev);
-               BCMLOG_ERR("failed to create device\n");
-               goto device_create_fail;
-       }
-
-       rc = crystalhd_create_elem_pool(adp, BC_LINK_ELEM_POOL_SZ);
-       if (rc) {
-               BCMLOG_ERR("failed to create device\n");
-               goto elem_pool_fail;
-       }
-
-       /* Allocate general purpose ioctl pool. */
-       for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
-               temp = kzalloc(sizeof(*temp), GFP_KERNEL);
-               if (!temp) {
-                       BCMLOG_ERR("ioctl data pool kzalloc failed\n");
-                       rc = -ENOMEM;
-                       goto kzalloc_fail;
-               }
-               /* Add to global pool.. */
-               chd_dec_free_iodata(adp, temp, 0);
-       }
-
-       return 0;
-
-kzalloc_fail:
-       crystalhd_delete_elem_pool(adp);
-elem_pool_fail:
-       device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0));
-device_create_fail:
-       class_destroy(crystalhd_class);
-class_create_fail:
-       unregister_chrdev(adp->chd_dec_major, CRYSTALHD_API_NAME);
-fail:
-       return rc;
-}
-
-static void chd_dec_release_chdev(struct crystalhd_adp *adp)
-{
-       struct crystalhd_ioctl_data *temp = NULL;
-       if (!adp)
-               return;
-
-       if (adp->chd_dec_major > 0) {
-               /* unregister crystalhd class */
-               device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0));
-               unregister_chrdev(adp->chd_dec_major, CRYSTALHD_API_NAME);
-               BCMLOG(BCMLOG_INFO, "released api device - %d\n",
-                      adp->chd_dec_major);
-               class_destroy(crystalhd_class);
-       }
-       adp->chd_dec_major = 0;
-
-       /* Clear iodata pool.. */
-       do {
-               temp = chd_dec_alloc_iodata(adp, 0);
-               kfree(temp);
-       } while (temp);
-
-       crystalhd_delete_elem_pool(adp);
-}
-
-static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
-{
-       int rc;
-       unsigned long bar2 = pci_resource_start(pinfo->pdev, 2);
-       uint32_t mem_len   = pci_resource_len(pinfo->pdev, 2);
-       unsigned long bar0 = pci_resource_start(pinfo->pdev, 0);
-       uint32_t i2o_len   = pci_resource_len(pinfo->pdev, 0);
-
-       BCMLOG(BCMLOG_SSTEP, "bar2:0x%lx-0x%08x  bar0:0x%lx-0x%08x\n",
-              bar2, mem_len, bar0, i2o_len);
-
-       rc = check_mem_region(bar2, mem_len);
-       if (rc) {
-               BCMLOG_ERR("No valid mem region...\n");
-               return -ENOMEM;
-       }
-
-       pinfo->addr = ioremap_nocache(bar2, mem_len);
-       if (!pinfo->addr) {
-               BCMLOG_ERR("Failed to remap mem region...\n");
-               return -ENOMEM;
-       }
-
-       pinfo->pci_mem_start = bar2;
-       pinfo->pci_mem_len   = mem_len;
-
-       rc = check_mem_region(bar0, i2o_len);
-       if (rc) {
-               BCMLOG_ERR("No valid mem region...\n");
-               return -ENOMEM;
-       }
-
-       pinfo->i2o_addr = ioremap_nocache(bar0, i2o_len);
-       if (!pinfo->i2o_addr) {
-               BCMLOG_ERR("Failed to remap mem region...\n");
-               return -ENOMEM;
-       }
-
-       pinfo->pci_i2o_start = bar0;
-       pinfo->pci_i2o_len   = i2o_len;
-
-       rc = pci_request_regions(pinfo->pdev, pinfo->name);
-       if (rc < 0) {
-               BCMLOG_ERR("Region request failed: %d\n", rc);
-               return rc;
-       }
-
-       BCMLOG(BCMLOG_SSTEP, "Mapped addr:0x%08lx  i2o_addr:0x%08lx\n",
-              (unsigned long)pinfo->addr, (unsigned long)pinfo->i2o_addr);
-
-       return 0;
-}
-
-static void chd_pci_release_mem(struct crystalhd_adp *pinfo)
-{
-       if (!pinfo)
-               return;
-
-       if (pinfo->addr)
-               iounmap(pinfo->addr);
-
-       if (pinfo->i2o_addr)
-               iounmap(pinfo->i2o_addr);
-
-       pci_release_regions(pinfo->pdev);
-}
-
-
-static void chd_dec_pci_remove(struct pci_dev *pdev)
-{
-       struct crystalhd_adp *pinfo;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       pinfo = pci_get_drvdata(pdev);
-       if (!pinfo) {
-               BCMLOG_ERR("could not get adp\n");
-               return;
-       }
-
-       sts = crystalhd_delete_cmd_context(&pinfo->cmds);
-       if (sts != BC_STS_SUCCESS)
-               BCMLOG_ERR("cmd delete :%d\n", sts);
-
-       chd_dec_release_chdev(pinfo);
-
-       chd_dec_disable_int(pinfo);
-
-       chd_pci_release_mem(pinfo);
-       pci_disable_device(pinfo->pdev);
-
-       kfree(pinfo);
-       g_adp_info = NULL;
-}
-
-static int chd_dec_pci_probe(struct pci_dev *pdev,
-                            const struct pci_device_id *entry)
-{
-       struct crystalhd_adp *pinfo;
-       int rc;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       BCMLOG(BCMLOG_DBG,
-              "PCI_INFO: Vendor:0x%04x Device:0x%04x s_vendor:0x%04x s_device: 0x%04x\n",
-              pdev->vendor, pdev->device, pdev->subsystem_vendor,
-              pdev->subsystem_device);
-
-       pinfo = kzalloc(sizeof(*pinfo), GFP_KERNEL);
-       if (!pinfo) {
-               BCMLOG_ERR("Failed to allocate memory\n");
-               return -ENOMEM;
-       }
-
-       pinfo->pdev = pdev;
-
-       rc = pci_enable_device(pdev);
-       if (rc) {
-               BCMLOG_ERR("Failed to enable PCI device\n");
-               goto err;
-       }
-
-       snprintf(pinfo->name, sizeof(pinfo->name), "crystalhd_pci_e:%d:%d:%d",
-                pdev->bus->number, PCI_SLOT(pdev->devfn),
-                PCI_FUNC(pdev->devfn));
-
-       rc = chd_pci_reserve_mem(pinfo);
-       if (rc) {
-               BCMLOG_ERR("Failed to setup memory regions.\n");
-               pci_disable_device(pdev);
-               rc = -ENOMEM;
-               goto err;
-       }
-
-       pinfo->present  = 1;
-       pinfo->drv_data = entry->driver_data;
-
-       /* Setup adapter level lock.. */
-       spin_lock_init(&pinfo->lock);
-
-       /* setup api stuff.. */
-       chd_dec_init_chdev(pinfo);
-       rc = chd_dec_enable_int(pinfo);
-       if (rc) {
-               BCMLOG_ERR("_enable_int err:%d\n", rc);
-               pci_disable_device(pdev);
-               rc = -ENODEV;
-               goto err;
-       }
-
-       /* Set dma mask... */
-       if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
-               pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
-               pinfo->dmabits = 64;
-       } else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
-               pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
-               pinfo->dmabits = 32;
-       } else {
-               BCMLOG_ERR("Unabled to setup DMA %d\n", rc);
-               pci_disable_device(pdev);
-               rc = -ENODEV;
-               goto err;
-       }
-
-       sts = crystalhd_setup_cmd_context(&pinfo->cmds, pinfo);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("cmd setup :%d\n", sts);
-               pci_disable_device(pdev);
-               rc = -ENODEV;
-               goto err;
-       }
-
-       pci_set_master(pdev);
-
-       pci_set_drvdata(pdev, pinfo);
-
-       g_adp_info = pinfo;
-
-       return 0;
-
-err:
-       kfree(pinfo);
-       return rc;
-}
-
-#ifdef CONFIG_PM
-static int chd_dec_pci_suspend(struct pci_dev *pdev, pm_message_t state)
-{
-       struct crystalhd_adp *adp;
-       struct crystalhd_ioctl_data *temp;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-
-       adp = pci_get_drvdata(pdev);
-       if (!adp) {
-               BCMLOG_ERR("could not get adp\n");
-               return -ENODEV;
-       }
-
-       temp = chd_dec_alloc_iodata(adp, false);
-       if (!temp) {
-               BCMLOG_ERR("could not get ioctl data\n");
-               return -ENODEV;
-       }
-
-       sts = crystalhd_suspend(&adp->cmds, temp);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("BCM70012 Suspend %d\n", sts);
-               return -ENODEV;
-       }
-
-       chd_dec_free_iodata(adp, temp, false);
-       chd_dec_disable_int(adp);
-       pci_save_state(pdev);
-
-       /* Disable IO/bus master/irq router */
-       pci_disable_device(pdev);
-       pci_set_power_state(pdev, pci_choose_state(pdev, state));
-       return 0;
-}
-
-static int chd_dec_pci_resume(struct pci_dev *pdev)
-{
-       struct crystalhd_adp *adp;
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       int rc;
-
-       adp = pci_get_drvdata(pdev);
-       if (!adp) {
-               BCMLOG_ERR("could not get adp\n");
-               return -ENODEV;
-       }
-
-       pci_set_power_state(pdev, PCI_D0);
-       pci_restore_state(pdev);
-
-       /* device's irq possibly is changed, driver should take care */
-       if (pci_enable_device(pdev)) {
-               BCMLOG_ERR("Failed to enable PCI device\n");
-               return 1;
-       }
-
-       pci_set_master(pdev);
-
-       rc = chd_dec_enable_int(adp);
-       if (rc) {
-               BCMLOG_ERR("_enable_int err:%d\n", rc);
-               pci_disable_device(pdev);
-               return -ENODEV;
-       }
-
-       sts = crystalhd_resume(&adp->cmds);
-       if (sts != BC_STS_SUCCESS) {
-               BCMLOG_ERR("BCM70012 Resume %d\n", sts);
-               pci_disable_device(pdev);
-               return -ENODEV;
-       }
-
-       return 0;
-}
-#endif
-
-static const struct pci_device_id chd_dec_pci_id_table[] = {
-       { PCI_VDEVICE(BROADCOM, 0x1612), 8 },
-       { 0, },
-};
-MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
-
-static struct pci_driver bc_chd_70012_driver = {
-       .name     = "Broadcom 70012 Decoder",
-       .probe    = chd_dec_pci_probe,
-       .remove   = chd_dec_pci_remove,
-       .id_table = chd_dec_pci_id_table,
-#ifdef CONFIG_PM
-       .suspend  = chd_dec_pci_suspend,
-       .resume   = chd_dec_pci_resume
-#endif
-};
-
-void chd_set_log_level(struct crystalhd_adp *adp, char *arg)
-{
-       if ((!arg) || (strlen(arg) < 3))
-               g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA;
-       else if (!strncmp(arg, "sstep", 5))
-               g_linklog_level = BCMLOG_INFO | BCMLOG_DATA | BCMLOG_DBG |
-                                 BCMLOG_SSTEP | BCMLOG_ERROR;
-       else if (!strncmp(arg, "info", 4))
-               g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA | BCMLOG_INFO;
-       else if (!strncmp(arg, "debug", 5))
-               g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA | BCMLOG_INFO |
-                                 BCMLOG_DBG;
-       else if (!strncmp(arg, "pball", 5))
-               g_linklog_level = 0xFFFFFFFF & ~(BCMLOG_SPINLOCK);
-       else if (!strncmp(arg, "silent", 6))
-               g_linklog_level = 0;
-       else
-               g_linklog_level = 0;
-}
-
-struct crystalhd_adp *chd_get_adp(void)
-{
-       return g_adp_info;
-}
-
-static int __init chd_dec_module_init(void)
-{
-       int rc;
-
-       chd_set_log_level(NULL, "debug");
-       BCMLOG(BCMLOG_DATA, "Loading crystalhd %d.%d.%d\n",
-              crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev);
-
-       rc = pci_register_driver(&bc_chd_70012_driver);
-
-       if (rc < 0)
-               BCMLOG_ERR("Could not find any devices. err:%d\n", rc);
-
-       return rc;
-}
-module_init(chd_dec_module_init);
-
-static void __exit chd_dec_module_cleanup(void)
-{
-       BCMLOG(BCMLOG_DATA, "unloading crystalhd %d.%d.%d\n",
-              crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev);
-
-       pci_unregister_driver(&bc_chd_70012_driver);
-}
-module_exit(chd_dec_module_cleanup);
-
-MODULE_AUTHOR("Naren Sankar <nsankar@broadcom.com>");
-MODULE_AUTHOR("Prasad Bolisetty <prasadb@broadcom.com>");
-MODULE_DESCRIPTION(CRYSTAL_HD_NAME);
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("bcm70012");
diff --git a/drivers/staging/crystalhd/crystalhd_lnx.h b/drivers/staging/crystalhd/crystalhd_lnx.h
deleted file mode 100644 (file)
index 49e1ef3..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_lnx . h
- *
- *  Description:
- *             BCM70012 Linux driver
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#ifndef _CRYSTALHD_LNX_H_
-#define _CRYSTALHD_LNX_H_
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/mm.h>
-#include <linux/tty.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <linux/fb.h>
-#include <linux/pci.h>
-#include <linux/interrupt.h>
-#include <linux/pagemap.h>
-#include <linux/vmalloc.h>
-
-#include <linux/io.h>
-#include <asm/irq.h>
-#include <asm/pgtable.h>
-#include <linux/uaccess.h>
-
-#include "crystalhd.h"
-
-#define CRYSTAL_HD_NAME                "Broadcom Crystal HD Decoder (BCM70012) Driver"
-
-/* OS specific PCI information structure and adapter information. */
-struct crystalhd_adp {
-       /* Hardware board/PCI specifics */
-       char                    name[32];
-       struct pci_dev          *pdev;
-
-       unsigned long           pci_mem_start;
-       uint32_t                pci_mem_len;
-       void __iomem            *addr;
-
-       unsigned long           pci_i2o_start;
-       uint32_t                pci_i2o_len;
-       void __iomem            *i2o_addr;
-
-       unsigned int            drv_data;
-       unsigned int            dmabits;        /* 32 | 64 */
-       unsigned int            registered;
-       unsigned int            present;
-       unsigned int            msi;
-
-       spinlock_t              lock;
-
-       /* API Related */
-       int             chd_dec_major;
-       unsigned int            cfg_users;
-
-       struct crystalhd_ioctl_data     *idata_free_head; /* ioctl data pool */
-       struct crystalhd_elem   *elem_pool_head; /* Queue element pool */
-
-       struct crystalhd_cmd    cmds;
-
-       struct crystalhd_dio_req        *ua_map_free_head;
-       struct pci_pool         *fill_byte_pool;
-};
-
-
-struct crystalhd_adp *chd_get_adp(void);
-void chd_set_log_level(struct crystalhd_adp *adp, char *arg);
-
-#endif
-
diff --git a/drivers/staging/crystalhd/crystalhd_misc.c b/drivers/staging/crystalhd/crystalhd_misc.c
deleted file mode 100644 (file)
index 3aabf75..0000000
+++ /dev/null
@@ -1,1044 +0,0 @@
-/***************************************************************************
- *        Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_misc . c
- *
- *  Description:
- *             BCM70012 Linux driver misc routines.
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#include "crystalhd.h"
-
-#include <linux/slab.h>
-
-uint32_t g_linklog_level;
-
-static inline uint32_t crystalhd_dram_rd(struct crystalhd_adp *adp,
-                                        uint32_t mem_off)
-{
-       crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
-       return bc_dec_reg_rd(adp, (0x00380000 | (mem_off & 0x0007FFFF)));
-}
-
-static inline void crystalhd_dram_wr(struct crystalhd_adp *adp,
-                                        uint32_t mem_off, uint32_t val)
-{
-       crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
-       bc_dec_reg_wr(adp, (0x00380000 | (mem_off & 0x0007FFFF)), val);
-}
-
-static inline enum BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp,
-                                        uint32_t start_off, uint32_t cnt)
-{
-       return BC_STS_SUCCESS;
-}
-
-static struct crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp)
-{
-       unsigned long flags = 0;
-       struct crystalhd_dio_req *temp = NULL;
-
-       if (!adp) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return temp;
-       }
-
-       spin_lock_irqsave(&adp->lock, flags);
-       temp = adp->ua_map_free_head;
-       if (temp)
-               adp->ua_map_free_head = adp->ua_map_free_head->next;
-       spin_unlock_irqrestore(&adp->lock, flags);
-
-       return temp;
-}
-
-static void crystalhd_free_dio(struct crystalhd_adp *adp,
-                                        struct crystalhd_dio_req *dio)
-{
-       unsigned long flags = 0;
-
-       if (!adp || !dio)
-               return;
-       spin_lock_irqsave(&adp->lock, flags);
-       dio->sig = crystalhd_dio_inv;
-       dio->page_cnt = 0;
-       dio->fb_size = 0;
-       memset(&dio->uinfo, 0, sizeof(dio->uinfo));
-       dio->next = adp->ua_map_free_head;
-       adp->ua_map_free_head = dio;
-       spin_unlock_irqrestore(&adp->lock, flags);
-}
-
-static struct crystalhd_elem *crystalhd_alloc_elem(struct crystalhd_adp *adp)
-{
-       unsigned long flags = 0;
-       struct crystalhd_elem *temp = NULL;
-
-       if (!adp)
-               return temp;
-       spin_lock_irqsave(&adp->lock, flags);
-       temp = adp->elem_pool_head;
-       if (temp) {
-               adp->elem_pool_head = adp->elem_pool_head->flink;
-               memset(temp, 0, sizeof(*temp));
-       }
-       spin_unlock_irqrestore(&adp->lock, flags);
-
-       return temp;
-}
-static void crystalhd_free_elem(struct crystalhd_adp *adp,
-                                        struct crystalhd_elem *elem)
-{
-       unsigned long flags = 0;
-
-       if (!adp || !elem)
-               return;
-       spin_lock_irqsave(&adp->lock, flags);
-       elem->flink = adp->elem_pool_head;
-       adp->elem_pool_head = elem;
-       spin_unlock_irqrestore(&adp->lock, flags);
-}
-
-static inline void crystalhd_set_sg(struct scatterlist *sg, struct page *page,
-                                 unsigned int len, unsigned int offset)
-{
-       sg_set_page(sg, page, len, offset);
-#ifdef CONFIG_X86_64
-       sg->dma_length = len;
-#endif
-}
-
-static inline void crystalhd_init_sg(struct scatterlist *sg,
-                                        unsigned int entries)
-{
-       /* http://lkml.org/lkml/2007/11/27/68 */
-       sg_init_table(sg, entries);
-}
-
-/*========================== Extern ========================================*/
-/**
- * bc_dec_reg_rd - Read 7412's device register.
- * @adp: Adapter instance
- * @reg_off: Register offset.
- *
- * Return:
- *     32bit value read
- *
- * 7412's device register read routine. This interface use
- * 7412's device access range mapped from BAR-2 (4M) of PCIe
- * configuration space.
- */
-uint32_t bc_dec_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
-{
-       if (!adp || (reg_off > adp->pci_mem_len)) {
-               BCMLOG_ERR("dec_rd_reg_off outof range: 0x%08x\n", reg_off);
-               return 0;
-       }
-
-       return readl(adp->addr + reg_off);
-}
-
-/**
- * bc_dec_reg_wr - Write 7412's device register
- * @adp: Adapter instance
- * @reg_off: Register offset.
- * @val: Dword value to be written.
- *
- * Return:
- *     none.
- *
- * 7412's device register write routine. This interface use
- * 7412's device access range mapped from BAR-2 (4M) of PCIe
- * configuration space.
- */
-void bc_dec_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val)
-{
-       if (!adp || (reg_off > adp->pci_mem_len)) {
-               BCMLOG_ERR("dec_wr_reg_off outof range: 0x%08x\n", reg_off);
-               return;
-       }
-       writel(val, adp->addr + reg_off);
-       udelay(8);
-}
-
-/**
- * crystalhd_reg_rd - Read Link's device register.
- * @adp: Adapter instance
- * @reg_off: Register offset.
- *
- * Return:
- *     32bit value read
- *
- * Link device register  read routine. This interface use
- * Link's device access range mapped from BAR-1 (64K) of PCIe
- * configuration space.
- *
- */
-uint32_t crystalhd_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
-{
-       if (!adp || (reg_off > adp->pci_i2o_len)) {
-               BCMLOG_ERR("link_rd_reg_off outof range: 0x%08x\n", reg_off);
-               return 0;
-       }
-       return readl(adp->i2o_addr + reg_off);
-}
-
-/**
- * crystalhd_reg_wr - Write Link's device register
- * @adp: Adapter instance
- * @reg_off: Register offset.
- * @val: Dword value to be written.
- *
- * Return:
- *     none.
- *
- * Link device register  write routine. This interface use
- * Link's device access range mapped from BAR-1 (64K) of PCIe
- * configuration space.
- *
- */
-void crystalhd_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off,
-                                        uint32_t val)
-{
-       if (!adp || (reg_off > adp->pci_i2o_len)) {
-               BCMLOG_ERR("link_wr_reg_off outof range: 0x%08x\n", reg_off);
-               return;
-       }
-       writel(val, adp->i2o_addr + reg_off);
-}
-
-/**
- * crystalhd_mem_rd - Read data from 7412's DRAM area.
- * @adp: Adapter instance
- * @start_off: Start offset.
- * @dw_cnt: Count in dwords.
- * @rd_buff: Buffer to copy the data from dram.
- *
- * Return:
- *     Status.
- *
- * 7412's Dram read routine.
- */
-enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *adp, uint32_t start_off,
-                        uint32_t dw_cnt, uint32_t *rd_buff)
-{
-       uint32_t ix = 0;
-
-       if (!adp || !rd_buff ||
-           (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) {
-               BCMLOG_ERR("Invalid arg\n");
-               return BC_STS_INV_ARG;
-       }
-       for (ix = 0; ix < dw_cnt; ix++)
-               rd_buff[ix] = crystalhd_dram_rd(adp, (start_off + (ix * 4)));
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_mem_wr - Write data to 7412's DRAM area.
- * @adp: Adapter instance
- * @start_off: Start offset.
- * @dw_cnt: Count in dwords.
- * @wr_buff: Data Buffer to be written.
- *
- * Return:
- *     Status.
- *
- * 7412's Dram write routine.
- */
-enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *adp, uint32_t start_off,
-                        uint32_t dw_cnt, uint32_t *wr_buff)
-{
-       uint32_t ix = 0;
-
-       if (!adp || !wr_buff ||
-           (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) {
-               BCMLOG_ERR("Invalid arg\n");
-               return BC_STS_INV_ARG;
-       }
-
-       for (ix = 0; ix < dw_cnt; ix++)
-               crystalhd_dram_wr(adp, (start_off + (ix * 4)), wr_buff[ix]);
-
-       return BC_STS_SUCCESS;
-}
-/**
- * crystalhd_pci_cfg_rd - PCIe config read
- * @adp: Adapter instance
- * @off: PCI config space offset.
- * @len: Size -- Byte, Word & dword.
- * @val: Value read
- *
- * Return:
- *     Status.
- *
- * Get value from Link's PCIe config space.
- */
-enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off,
-                            uint32_t len, uint32_t *val)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       int rc = 0;
-
-       if (!adp || !val) {
-               BCMLOG_ERR("Invalid arg\n");
-               return BC_STS_INV_ARG;
-       }
-
-       switch (len) {
-       case 1:
-               rc = pci_read_config_byte(adp->pdev, off, (u8 *)val);
-               break;
-       case 2:
-               rc = pci_read_config_word(adp->pdev, off, (u16 *)val);
-               break;
-       case 4:
-               rc = pci_read_config_dword(adp->pdev, off, (u32 *)val);
-               break;
-       default:
-               rc = -EINVAL;
-               sts = BC_STS_INV_ARG;
-               BCMLOG_ERR("Invalid len:%d\n", len);
-       }
-
-       if (rc && (sts == BC_STS_SUCCESS))
-               sts = BC_STS_ERROR;
-
-       return sts;
-}
-
-/**
- * crystalhd_pci_cfg_wr - PCIe config write
- * @adp: Adapter instance
- * @off: PCI config space offset.
- * @len: Size -- Byte, Word & dword.
- * @val: Value to be written
- *
- * Return:
- *     Status.
- *
- * Set value to Link's PCIe config space.
- */
-enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off,
-                            uint32_t len, uint32_t val)
-{
-       enum BC_STATUS sts = BC_STS_SUCCESS;
-       int rc = 0;
-
-       if (!adp || !val) {
-               BCMLOG_ERR("Invalid arg\n");
-               return BC_STS_INV_ARG;
-       }
-
-       switch (len) {
-       case 1:
-               rc = pci_write_config_byte(adp->pdev, off, (u8)val);
-               break;
-       case 2:
-               rc = pci_write_config_word(adp->pdev, off, (u16)val);
-               break;
-       case 4:
-               rc = pci_write_config_dword(adp->pdev, off, val);
-               break;
-       default:
-               rc = -EINVAL;
-               sts = BC_STS_INV_ARG;
-               BCMLOG_ERR("Invalid len:%d\n", len);
-       }
-
-       if (rc && (sts == BC_STS_SUCCESS))
-               sts = BC_STS_ERROR;
-
-       return sts;
-}
-
-/**
- * bc_kern_dma_alloc - Allocate memory for Dma rings
- * @adp: Adapter instance
- * @sz: Size of the memory to allocate.
- * @phy_addr: Physical address of the memory allocated.
- *        Typedef to system's dma_addr_t (u64)
- *
- * Return:
- *  Pointer to allocated memory..
- *
- * Wrapper to Linux kernel interface.
- *
- */
-void *bc_kern_dma_alloc(struct crystalhd_adp *adp, uint32_t sz,
-                       dma_addr_t *phy_addr)
-{
-       void *temp = NULL;
-
-       if (!adp || !sz || !phy_addr) {
-               BCMLOG_ERR("Invalid Arg..\n");
-               return temp;
-       }
-
-       temp = pci_alloc_consistent(adp->pdev, sz, phy_addr);
-       if (temp)
-               memset(temp, 0, sz);
-
-       return temp;
-}
-
-/**
- * bc_kern_dma_free - Release Dma ring memory.
- * @adp: Adapter instance
- * @sz: Size of the memory to allocate.
- * @ka: Kernel virtual address returned during _dio_alloc()
- * @phy_addr: Physical address of the memory allocated.
- *        Typedef to system's dma_addr_t (u64)
- *
- * Return:
- *     none.
- */
-void bc_kern_dma_free(struct crystalhd_adp *adp, uint32_t sz, void *ka,
-                     dma_addr_t phy_addr)
-{
-       if (!adp || !ka || !sz || !phy_addr) {
-               BCMLOG_ERR("Invalid Arg..\n");
-               return;
-       }
-
-       pci_free_consistent(adp->pdev, sz, ka, phy_addr);
-}
-
-/**
- * crystalhd_create_dioq - Create Generic DIO queue
- * @adp: Adapter instance
- * @dioq_hnd: Handle to the dio queue created
- * @cb : Optional - Call back To free the element.
- * @cbctx: Context to pass to callback.
- *
- * Return:
- *  status
- *
- * Initialize Generic DIO queue to hold any data. Callback
- * will be used to free elements while deleting the queue.
- */
-enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp,
-                             struct crystalhd_dioq **dioq_hnd,
-                             crystalhd_data_free_cb cb, void *cbctx)
-{
-       struct crystalhd_dioq *dioq = NULL;
-
-       if (!adp || !dioq_hnd) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       dioq = kzalloc(sizeof(*dioq), GFP_KERNEL);
-       if (!dioq)
-               return BC_STS_INSUFF_RES;
-
-       spin_lock_init(&dioq->lock);
-       dioq->sig = BC_LINK_DIOQ_SIG;
-       dioq->head = (struct crystalhd_elem *)&dioq->head;
-       dioq->tail = (struct crystalhd_elem *)&dioq->head;
-       crystalhd_create_event(&dioq->event);
-       dioq->adp = adp;
-       dioq->data_rel_cb = cb;
-       dioq->cb_context = cbctx;
-       *dioq_hnd = dioq;
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_delete_dioq - Delete Generic DIO queue
- * @adp: Adapter instance
- * @dioq: DIOQ instance..
- *
- * Return:
- *  None.
- *
- * Release Generic DIO queue. This function will remove
- * all the entries from the Queue and will release data
- * by calling the call back provided during creation.
- *
- */
-void crystalhd_delete_dioq(struct crystalhd_adp *adp,
-                        struct crystalhd_dioq *dioq)
-{
-       void *temp;
-
-       if (!dioq || (dioq->sig != BC_LINK_DIOQ_SIG))
-               return;
-
-       do {
-               temp = crystalhd_dioq_fetch(dioq);
-               if (temp && dioq->data_rel_cb)
-                       dioq->data_rel_cb(dioq->cb_context, temp);
-       } while (temp);
-       dioq->sig = 0;
-       kfree(dioq);
-}
-
-/**
- * crystalhd_dioq_add - Add new DIO request element.
- * @ioq: DIO queue instance
- * @t: DIO request to be added.
- * @wake: True - Wake up suspended process.
- * @tag: Special tag to assign - For search and get.
- *
- * Return:
- *  Status.
- *
- * Insert new element to Q tail.
- */
-enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq, void *data,
-                          bool wake, uint32_t tag)
-{
-       unsigned long flags = 0;
-       struct crystalhd_elem *tmp;
-
-       if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !data) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       tmp = crystalhd_alloc_elem(ioq->adp);
-       if (!tmp) {
-               BCMLOG_ERR("No free elements.\n");
-               return BC_STS_INSUFF_RES;
-       }
-
-       tmp->data = data;
-       tmp->tag = tag;
-       spin_lock_irqsave(&ioq->lock, flags);
-       tmp->flink = (struct crystalhd_elem *)&ioq->head;
-       tmp->blink = ioq->tail;
-       tmp->flink->blink = tmp;
-       tmp->blink->flink = tmp;
-       ioq->count++;
-       spin_unlock_irqrestore(&ioq->lock, flags);
-
-       if (wake)
-               crystalhd_set_event(&ioq->event);
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_dioq_fetch - Fetch element from head.
- * @ioq: DIO queue instance
- *
- * Return:
- *     data element from the head..
- *
- * Remove an element from Queue.
- */
-void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq)
-{
-       unsigned long flags = 0;
-       struct crystalhd_elem *tmp;
-       struct crystalhd_elem *ret = NULL;
-       void *data = NULL;
-
-       if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return data;
-       }
-
-       spin_lock_irqsave(&ioq->lock, flags);
-       tmp = ioq->head;
-       if (tmp != (struct crystalhd_elem *)&ioq->head) {
-               ret = tmp;
-               tmp->flink->blink = tmp->blink;
-               tmp->blink->flink = tmp->flink;
-               ioq->count--;
-       }
-       spin_unlock_irqrestore(&ioq->lock, flags);
-       if (ret) {
-               data = ret->data;
-               crystalhd_free_elem(ioq->adp, ret);
-       }
-
-       return data;
-}
-/**
- * crystalhd_dioq_find_and_fetch - Search the tag and Fetch element
- * @ioq: DIO queue instance
- * @tag: Tag to search for.
- *
- * Return:
- *     element from the head..
- *
- * Search TAG and remove the element.
- */
-void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq, uint32_t tag)
-{
-       unsigned long flags = 0;
-       struct crystalhd_elem *tmp;
-       struct crystalhd_elem *ret = NULL;
-       void *data = NULL;
-
-       if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return data;
-       }
-
-       spin_lock_irqsave(&ioq->lock, flags);
-       tmp = ioq->head;
-       while (tmp != (struct crystalhd_elem *)&ioq->head) {
-               if (tmp->tag == tag) {
-                       ret = tmp;
-                       tmp->flink->blink = tmp->blink;
-                       tmp->blink->flink = tmp->flink;
-                       ioq->count--;
-                       break;
-               }
-               tmp = tmp->flink;
-       }
-       spin_unlock_irqrestore(&ioq->lock, flags);
-
-       if (ret) {
-               data = ret->data;
-               crystalhd_free_elem(ioq->adp, ret);
-       }
-
-       return data;
-}
-
-/**
- * crystalhd_dioq_fetch_wait - Fetch element from Head.
- * @ioq: DIO queue instance
- * @to_secs: Wait timeout in seconds..
- *
- * Return:
- *     element from the head..
- *
- * Return element from head if Q is not empty. Wait for new element
- * if Q is empty for Timeout seconds.
- */
-void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq, uint32_t to_secs,
-                             uint32_t *sig_pend)
-{
-       unsigned long flags = 0;
-       int rc = 0, count;
-       void *tmp = NULL;
-
-       if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !to_secs || !sig_pend) {
-               BCMLOG_ERR("Invalid arg!!\n");
-               return tmp;
-       }
-
-       count = to_secs;
-       spin_lock_irqsave(&ioq->lock, flags);
-       while ((ioq->count == 0) && count) {
-               spin_unlock_irqrestore(&ioq->lock, flags);
-
-               crystalhd_wait_on_event(&ioq->event,
-                                (ioq->count > 0), 1000, rc, 0);
-               if (rc == 0) {
-                       goto out;
-               } else if (rc == -EINTR) {
-                       BCMLOG(BCMLOG_INFO, "Cancelling fetch wait\n");
-                       *sig_pend = 1;
-                       return tmp;
-               }
-               spin_lock_irqsave(&ioq->lock, flags);
-               count--;
-       }
-       spin_unlock_irqrestore(&ioq->lock, flags);
-
-out:
-       return crystalhd_dioq_fetch(ioq);
-}
-
-/**
- * crystalhd_map_dio - Map user address for DMA
- * @adp:       Adapter instance
- * @ubuff:     User buffer to map.
- * @ubuff_sz:  User buffer size.
- * @uv_offset: UV buffer offset.
- * @en_422mode: TRUE:422 FALSE:420 Capture mode.
- * @dir_tx:    TRUE for Tx (To device from host)
- * @dio_hnd:   Handle to mapped DIO request.
- *
- * Return:
- *     Status.
- *
- * This routine maps user address and lock pages for DMA.
- *
- */
-enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
-                         uint32_t ubuff_sz, uint32_t uv_offset,
-                         bool en_422mode, bool dir_tx,
-                         struct crystalhd_dio_req **dio_hnd)
-{
-       struct crystalhd_dio_req        *dio;
-       /* FIXME: jarod: should some of these
-        unsigned longs be uint32_t or uintptr_t? */
-       unsigned long start = 0, end = 0, uaddr = 0, count = 0;
-       unsigned long spsz = 0, uv_start = 0;
-       int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0;
-
-       if (!adp || !ubuff || !ubuff_sz || !dio_hnd) {
-               BCMLOG_ERR("Invalid arg\n");
-               return BC_STS_INV_ARG;
-       }
-       /* Compute pages */
-       uaddr = (unsigned long)ubuff;
-       count = (unsigned long)ubuff_sz;
-       end = (uaddr + count + PAGE_SIZE - 1) >> PAGE_SHIFT;
-       start = uaddr >> PAGE_SHIFT;
-       nr_pages = end - start;
-
-       if (!count || ((uaddr + count) < uaddr)) {
-               BCMLOG_ERR("User addr overflow!!\n");
-               return BC_STS_INV_ARG;
-       }
-
-       dio = crystalhd_alloc_dio(adp);
-       if (!dio) {
-               BCMLOG_ERR("dio pool empty..\n");
-               return BC_STS_INSUFF_RES;
-       }
-
-       if (dir_tx) {
-               rw = WRITE;
-               dio->direction = DMA_TO_DEVICE;
-       } else {
-               rw = READ;
-               dio->direction = DMA_FROM_DEVICE;
-       }
-
-       if (nr_pages > dio->max_pages) {
-               BCMLOG_ERR("max_pages(%d) exceeded(%d)!!\n",
-                          dio->max_pages, nr_pages);
-               crystalhd_unmap_dio(adp, dio);
-               return BC_STS_INSUFF_RES;
-       }
-
-       if (uv_offset) {
-               uv_start = (uaddr + (unsigned long)uv_offset)  >> PAGE_SHIFT;
-               dio->uinfo.uv_sg_ix = uv_start - start;
-               dio->uinfo.uv_sg_off = ((uaddr + (unsigned long)uv_offset) &
-                                        ~PAGE_MASK);
-       }
-
-       dio->fb_size = ubuff_sz & 0x03;
-       if (dio->fb_size) {
-               res = copy_from_user(dio->fb_va,
-                                    (void __user *)(uaddr + count - dio->fb_size),
-                                    dio->fb_size);
-               if (res) {
-                       BCMLOG_ERR("failed %d to copy %u fill bytes from %p\n",
-                                  res, dio->fb_size,
-                                  (void *)(uaddr + count-dio->fb_size));
-                       crystalhd_unmap_dio(adp, dio);
-                       return BC_STS_INSUFF_RES;
-               }
-       }
-
-       down_read(&current->mm->mmap_sem);
-       res = get_user_pages(current, current->mm, uaddr, nr_pages, rw == READ,
-                            0, dio->pages, NULL);
-       up_read(&current->mm->mmap_sem);
-
-       /* Save for release..*/
-       dio->sig = crystalhd_dio_locked;
-       if (res < nr_pages) {
-               BCMLOG_ERR("get pages failed: %d-%d\n", nr_pages, res);
-               dio->page_cnt = res;
-               crystalhd_unmap_dio(adp, dio);
-               return BC_STS_ERROR;
-       }
-
-       dio->page_cnt = nr_pages;
-       /* Get scatter/gather */
-       crystalhd_init_sg(dio->sg, dio->page_cnt);
-       crystalhd_set_sg(&dio->sg[0], dio->pages[0], 0, uaddr & ~PAGE_MASK);
-       if (nr_pages > 1) {
-               dio->sg[0].length = PAGE_SIZE - dio->sg[0].offset;
-
-#ifdef CONFIG_X86_64
-               dio->sg[0].dma_length = dio->sg[0].length;
-#endif
-               count -= dio->sg[0].length;
-               for (i = 1; i < nr_pages; i++) {
-                       if (count < 4) {
-                               spsz = count;
-                               skip_fb_sg = 1;
-                       } else {
-                               spsz = (count < PAGE_SIZE) ?
-                                       (count & ~0x03) : PAGE_SIZE;
-                       }
-                       crystalhd_set_sg(&dio->sg[i], dio->pages[i], spsz, 0);
-                       count -= spsz;
-               }
-       } else {
-               if (count < 4) {
-                       dio->sg[0].length = count;
-                       skip_fb_sg = 1;
-               } else {
-                       dio->sg[0].length = count - dio->fb_size;
-               }
-#ifdef CONFIG_X86_64
-               dio->sg[0].dma_length = dio->sg[0].length;
-#endif
-       }
-       dio->sg_cnt = pci_map_sg(adp->pdev, dio->sg,
-                                dio->page_cnt, dio->direction);
-       if (dio->sg_cnt <= 0) {
-               BCMLOG_ERR("sg map %d-%d\n", dio->sg_cnt, dio->page_cnt);
-               crystalhd_unmap_dio(adp, dio);
-               return BC_STS_ERROR;
-       }
-       if (dio->sg_cnt && skip_fb_sg)
-               dio->sg_cnt -= 1;
-       dio->sig = crystalhd_dio_sg_mapped;
-       /* Fill in User info.. */
-       dio->uinfo.xfr_len   = ubuff_sz;
-       dio->uinfo.xfr_buff  = ubuff;
-       dio->uinfo.uv_offset = uv_offset;
-       dio->uinfo.b422mode  = en_422mode;
-       dio->uinfo.dir_tx    = dir_tx;
-
-       *dio_hnd = dio;
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_unmap_sgl - Release mapped resources
- * @adp: Adapter instance
- * @dio: DIO request instance
- *
- * Return:
- *     Status.
- *
- * This routine is to unmap the user buffer pages.
- */
-enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp,
-                                struct crystalhd_dio_req *dio)
-{
-       struct page *page = NULL;
-       int j = 0;
-
-       if (!adp || !dio) {
-               BCMLOG_ERR("Invalid arg\n");
-               return BC_STS_INV_ARG;
-       }
-
-       if ((dio->page_cnt > 0) && (dio->sig != crystalhd_dio_inv)) {
-               for (j = 0; j < dio->page_cnt; j++) {
-                       page = dio->pages[j];
-                       if (page) {
-                               if (!PageReserved(page) &&
-                                   (dio->direction == DMA_FROM_DEVICE))
-                                       SetPageDirty(page);
-                               page_cache_release(page);
-                       }
-               }
-       }
-       if (dio->sig == crystalhd_dio_sg_mapped)
-               pci_unmap_sg(adp->pdev, dio->sg, dio->page_cnt,
-                        dio->direction);
-
-       crystalhd_free_dio(adp, dio);
-
-       return BC_STS_SUCCESS;
-}
-
-/**
- * crystalhd_create_dio_pool - Allocate mem pool for DIO management.
- * @adp: Adapter instance
- * @max_pages: Max pages for size calculation.
- *
- * Return:
- *     system error.
- *
- * This routine creates a memory pool to hold dio context for
- * for HW Direct IO operation.
- */
-int crystalhd_create_dio_pool(struct crystalhd_adp *adp, uint32_t max_pages)
-{
-       uint32_t asz = 0, i = 0;
-       uint8_t *temp;
-       struct crystalhd_dio_req *dio;
-
-       if (!adp || !max_pages) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return -EINVAL;
-       }
-
-       /* Get dma memory for fill byte handling..*/
-       adp->fill_byte_pool = pci_pool_create("crystalhd_fbyte",
-                                             adp->pdev, 8, 8, 0);
-       if (!adp->fill_byte_pool) {
-               BCMLOG_ERR("failed to create fill byte pool\n");
-               return -ENOMEM;
-       }
-
-       /* Get the max size from user based on 420/422 modes */
-       asz =  (sizeof(*dio->pages) * max_pages) +
-              (sizeof(*dio->sg) * max_pages) + sizeof(*dio);
-
-       BCMLOG(BCMLOG_DBG, "Initializing Dio pool %d %d %x %p\n",
-              BC_LINK_SG_POOL_SZ, max_pages, asz, adp->fill_byte_pool);
-
-       for (i = 0; i < BC_LINK_SG_POOL_SZ; i++) {
-               temp = kzalloc(asz, GFP_KERNEL);
-               if ((temp) == NULL) {
-                       BCMLOG_ERR("Failed to alloc %d mem\n", asz);
-                       return -ENOMEM;
-               }
-
-               dio = (struct crystalhd_dio_req *)temp;
-               temp += sizeof(*dio);
-               dio->pages = (struct page **)temp;
-               temp += (sizeof(*dio->pages) * max_pages);
-               dio->sg = (struct scatterlist *)temp;
-               dio->max_pages = max_pages;
-               dio->fb_va = pci_pool_alloc(adp->fill_byte_pool, GFP_KERNEL,
-                                           &dio->fb_pa);
-               if (!dio->fb_va) {
-                       BCMLOG_ERR("fill byte alloc failed.\n");
-                       return -ENOMEM;
-               }
-
-               crystalhd_free_dio(adp, dio);
-       }
-
-       return 0;
-}
-
-/**
- * crystalhd_destroy_dio_pool - Release DIO mem pool.
- * @adp: Adapter instance
- *
- * Return:
- *     none.
- *
- * This routine releases dio memory pool during close.
- */
-void crystalhd_destroy_dio_pool(struct crystalhd_adp *adp)
-{
-       struct crystalhd_dio_req *dio;
-       int count = 0;
-
-       if (!adp) {
-               BCMLOG_ERR("Invalid Arg!!\n");
-               return;
-       }
-
-       do {
-               dio = crystalhd_alloc_dio(adp);
-               if (dio) {
-                       if (dio->fb_va)
-                               pci_pool_free(adp->fill_byte_pool,
-                                             dio->fb_va, dio->fb_pa);
-                       count++;
-                       kfree(dio);
-               }
-       } while (dio);
-
-       if (adp->fill_byte_pool) {
-               pci_pool_destroy(adp->fill_byte_pool);
-               adp->fill_byte_pool = NULL;
-       }
-
-       BCMLOG(BCMLOG_DBG, "Released dio pool %d\n", count);
-}
-
-/**
- * crystalhd_create_elem_pool - List element pool creation.
- * @adp: Adapter instance
- * @pool_size: Number of elements in the pool.
- *
- * Return:
- *     0 - success, <0 error
- *
- * Create general purpose list element pool to hold pending,
- * and active requests.
- */
-int crystalhd_create_elem_pool(struct crystalhd_adp *adp,
-               uint32_t pool_size)
-{
-       uint32_t i;
-       struct crystalhd_elem *temp;
-
-       if (!adp || !pool_size)
-               return -EINVAL;
-
-       for (i = 0; i < pool_size; i++) {
-               temp = kzalloc(sizeof(*temp), GFP_KERNEL);
-               if (!temp) {
-                       BCMLOG_ERR("kalloc failed\n");
-                       return -ENOMEM;
-               }
-               crystalhd_free_elem(adp, temp);
-       }
-       BCMLOG(BCMLOG_DBG, "allocated %d elem\n", pool_size);
-       return 0;
-}
-
-/**
- * crystalhd_delete_elem_pool - List element pool deletion.
- * @adp: Adapter instance
- *
- * Return:
- *     none
- *
- * Delete general purpose list element pool.
- */
-void crystalhd_delete_elem_pool(struct crystalhd_adp *adp)
-{
-       struct crystalhd_elem *temp;
-       int dbg_cnt = 0;
-
-       if (!adp)
-               return;
-
-       do {
-               temp = crystalhd_alloc_elem(adp);
-               if (temp) {
-                       kfree(temp);
-                       dbg_cnt++;
-               }
-       } while (temp);
-
-       BCMLOG(BCMLOG_DBG, "released %d elem\n", dbg_cnt);
-}
-
-/*================ Debug support routines.. ================================*/
-void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount)
-{
-       uint32_t i, k = 1;
-
-       for (i = 0; i < dwcount; i++) {
-               if (k == 1)
-                       BCMLOG(BCMLOG_DATA, "0x%08X : ", off);
-
-               BCMLOG(BCMLOG_DATA, " 0x%08X ", *((uint32_t *)buff));
-
-               buff += sizeof(uint32_t);
-               off  += sizeof(uint32_t);
-               k++;
-               if ((i == dwcount - 1) || (k > 4)) {
-                       BCMLOG(BCMLOG_DATA, "\n");
-                       k = 1;
-               }
-       }
-}
diff --git a/drivers/staging/crystalhd/crystalhd_misc.h b/drivers/staging/crystalhd/crystalhd_misc.h
deleted file mode 100644 (file)
index 0f63827..0000000
+++ /dev/null
@@ -1,232 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2005-2009, Broadcom Corporation.
- *
- *  Name: crystalhd_misc . h
- *
- *  Description:
- *             BCM70012 Linux driver general purpose routines.
- *             Includes reg/mem read and write routines.
- *
- *  HISTORY:
- *
- **********************************************************************
- * This file is part of the crystalhd device driver.
- *
- * This driver is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, version 2 of the License.
- *
- * This driver is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
- **********************************************************************/
-
-#ifndef _CRYSTALHD_MISC_H_
-#define _CRYSTALHD_MISC_H_
-
-#include "crystalhd.h"
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/ioctl.h>
-#include <linux/dma-mapping.h>
-#include <linux/sched.h>
-#include "bc_dts_glob_lnx.h"
-
-/* Global log level variable defined in crystal_misc.c file */
-extern uint32_t g_linklog_level;
-
-/* Global element pool for all Queue management.
- * TX: Active = BC_TX_LIST_CNT, Free = BC_TX_LIST_CNT.
- * RX: Free = BC_RX_LIST_CNT, Active = 2
- * FW-CMD: 4
- */
-#define        BC_LINK_ELEM_POOL_SZ    ((BC_TX_LIST_CNT * 2) + BC_RX_LIST_CNT + 2 + 4)
-
-/* Driver's IODATA pool count */
-#define        CHD_IODATA_POOL_SZ    (BC_IOCTL_DATA_POOL_SIZE * BC_LINK_MAX_OPENS)
-
-/* Scatter Gather memory pool size for Tx and Rx */
-#define BC_LINK_SG_POOL_SZ    (BC_TX_LIST_CNT + BC_RX_LIST_CNT)
-
-enum crystalhd_dio_sig {
-       crystalhd_dio_inv = 0,
-       crystalhd_dio_locked,
-       crystalhd_dio_sg_mapped,
-};
-
-struct crystalhd_dio_user_info {
-       void                    *xfr_buff;
-       uint32_t                xfr_len;
-       uint32_t                uv_offset;
-       bool                    dir_tx;
-
-       uint32_t                uv_sg_ix;
-       uint32_t                uv_sg_off;
-       int                     comp_sts;
-       int                     ev_sts;
-       uint32_t                y_done_sz;
-       uint32_t                uv_done_sz;
-       uint32_t                comp_flags;
-       bool                    b422mode;
-};
-
-struct crystalhd_dio_req {
-       uint32_t                        sig;
-       uint32_t                        max_pages;
-       struct page                     **pages;
-       struct scatterlist              *sg;
-       int                             sg_cnt;
-       int                             page_cnt;
-       int                             direction;
-       struct crystalhd_dio_user_info  uinfo;
-       void                            *fb_va;
-       uint32_t                        fb_size;
-       dma_addr_t                      fb_pa;
-       struct crystalhd_dio_req        *next;
-};
-
-#define BC_LINK_DIOQ_SIG       (0x09223280)
-
-struct crystalhd_elem {
-       struct crystalhd_elem   *flink;
-       struct crystalhd_elem   *blink;
-       void                    *data;
-       uint32_t                tag;
-};
-
-typedef void (*crystalhd_data_free_cb)(void *context, void *data);
-
-struct crystalhd_dioq {
-       uint32_t                sig;
-       struct crystalhd_adp    *adp;
-       struct crystalhd_elem           *head;
-       struct crystalhd_elem           *tail;
-       uint32_t                count;
-       spinlock_t              lock;
-       wait_queue_head_t       event;
-       crystalhd_data_free_cb  data_rel_cb;
-       void                    *cb_context;
-};
-
-typedef void (*hw_comp_callback)(struct crystalhd_dio_req *,
-                                wait_queue_head_t *event, enum BC_STATUS sts);
-
-/*========= Decoder (7412) register access routines.================= */
-uint32_t bc_dec_reg_rd(struct crystalhd_adp *, uint32_t);
-void bc_dec_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t);
-
-/*========= Link (70012) register access routines.. =================*/
-uint32_t crystalhd_reg_rd(struct crystalhd_adp *, uint32_t);
-void crystalhd_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t);
-
-/*========= Decoder (7412) memory access routines..=================*/
-enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *,
-                        uint32_t, uint32_t, uint32_t *);
-enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *,
-                        uint32_t, uint32_t, uint32_t *);
-
-/*==========Link (70012) PCIe Config access routines.================*/
-enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *,
-                        uint32_t, uint32_t, uint32_t *);
-enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *,
-                        uint32_t, uint32_t, uint32_t);
-
-/*========= Linux Kernel Interface routines. ======================= */
-void *bc_kern_dma_alloc(struct crystalhd_adp *, uint32_t, dma_addr_t *);
-void bc_kern_dma_free(struct crystalhd_adp *, uint32_t,
-                     void *, dma_addr_t);
-#define crystalhd_create_event(_ev)    init_waitqueue_head(_ev)
-#define crystalhd_set_event(_ev)               wake_up_interruptible(_ev)
-#define crystalhd_wait_on_event(ev, condition, timeout, ret, nosig)    \
-do {                                                                   \
-       DECLARE_WAITQUEUE(entry, current);                              \
-       unsigned long end = jiffies + ((timeout * HZ) / 1000);          \
-               ret = 0;                                                \
-       add_wait_queue(ev, &entry);                                     \
-       for (;;) {                                                      \
-               __set_current_state(TASK_INTERRUPTIBLE);                \
-               if (condition) {                                        \
-                       break;                                          \
-               }                                                       \
-               if (time_after_eq(jiffies, end)) {                      \
-                       ret = -EBUSY;                                   \
-                       break;                                          \
-               }                                                       \
-               schedule_timeout((HZ / 100 > 1) ? HZ / 100 : 1);        \
-               if (!nosig && signal_pending(current)) {                \
-                       ret = -EINTR;                                   \
-                       break;                                          \
-               }                                                       \
-       }                                                               \
-       __set_current_state(TASK_RUNNING);                              \
-       remove_wait_queue(ev, &entry);                                  \
-} while (0)
-
-/*================ Direct IO mapping routines ==================*/
-extern int crystalhd_create_dio_pool(struct crystalhd_adp *, uint32_t);
-extern void crystalhd_destroy_dio_pool(struct crystalhd_adp *);
-extern enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *, void *,
-                uint32_t, uint32_t, bool, bool, struct crystalhd_dio_req**);
-
-extern enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *,
-                                        struct crystalhd_dio_req*);
-#define crystalhd_get_sgle_paddr(_dio, _ix) (sg_dma_address(&_dio->sg[_ix]))
-#define crystalhd_get_sgle_len(_dio, _ix) (sg_dma_len(&_dio->sg[_ix]))
-
-/*================ General Purpose Queues ==================*/
-extern enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *,
-                struct crystalhd_dioq **, crystalhd_data_free_cb , void *);
-extern void crystalhd_delete_dioq(struct crystalhd_adp *,
-                struct crystalhd_dioq *);
-extern enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq,
-                void *data, bool wake, uint32_t tag);
-extern void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq);
-extern void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq,
-                uint32_t tag);
-extern void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq,
-                uint32_t to_secs, uint32_t *sig_pend);
-
-#define crystalhd_dioq_count(_ioq)     ((_ioq) ? _ioq->count : 0)
-
-extern int crystalhd_create_elem_pool(struct crystalhd_adp *, uint32_t);
-extern void crystalhd_delete_elem_pool(struct crystalhd_adp *);
-
-
-/*================ Debug routines/macros .. ================================*/
-extern void crystalhd_show_buffer(uint32_t off, uint8_t *buff,
-                uint32_t dwcount);
-
-enum _chd_log_levels {
-       BCMLOG_ERROR            = 0x80000000,   /* Don't disable this option */
-       BCMLOG_DATA             = 0x40000000,   /* Data, enable by default */
-       BCMLOG_SPINLOCK         = 0x20000000,   /* Special case for Spin locks*/
-
-       /* Following are allowed only in debug mode */
-       BCMLOG_INFO             = 0x00000001,   /* Generic informational */
-       BCMLOG_DBG              = 0x00000002,   /* First level Debug info */
-       BCMLOG_SSTEP            = 0x00000004,   /* Stepping information */
-};
-
-
-#define BCMLOG(trace, fmt, args...)    \
-do {                                   \
-       if (g_linklog_level & trace)    \
-               printk(fmt, ##args);    \
-} while (0)
-
-
-#define BCMLOG_ERR(fmt, args...)                               \
-do {                                                           \
-       if (g_linklog_level & BCMLOG_ERROR)                     \
-               pr_err("*ERR*:%s:%d: "fmt,                      \
-                               __FILE__, __LINE__, ##args);    \
-} while (0)
-
-#endif
diff --git a/drivers/staging/cxt1e1/Kconfig b/drivers/staging/cxt1e1/Kconfig
deleted file mode 100644 (file)
index 947f42a..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-config CXT1E1
-       tristate "SBE wanPMC-C[421]E1T1 hardware support"
-       depends on HDLC && PCI
-       ---help---
-      This driver supports the SBE wanPMC-CxT1E1 1, 2 and 4 port T3
-      channelized stream WAN adapter card which contains a HDLC/Transparent
-      mode controller.
-
-      If you want to compile this driver as a module say M here.
-      The module will be called 'cxt1e1'.
-
-      If unsure, say N.
-
-config SBE_PMCC4_NCOMM
-       bool "SBE PMCC4 NCOMM support"
-       depends on CXT1E1
-       ---help---
-      SBE supplies optional support for NCOMM products.
-
-      If you have purchased this optional support you must say Y
-      here to allow the driver to operate with the NCOMM product.
diff --git a/drivers/staging/cxt1e1/Makefile b/drivers/staging/cxt1e1/Makefile
deleted file mode 100644 (file)
index b879e7b..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-obj-$(CONFIG_CXT1E1)   += cxt1e1.o
-
-ccflags-y := -DSBE_PMCC4_ENABLE
-ccflags-y += -DSBE_ISR_TASKLET
-
-cxt1e1-y :=    \
-  musycc.o             \
-  pmcc4_drv.o          \
-  comet.o              \
-  linux.o              \
-  functions.o          \
-  hwprobe.o            \
-  pmc93x6_eeprom.o     \
-  sbecrc.o             \
-  comet_tables.o       \
-  sbeid.o
-
-cxt1e1-$(CONFIG_PROC_FS) += sbeproc.o
diff --git a/drivers/staging/cxt1e1/comet.c b/drivers/staging/cxt1e1/comet.c
deleted file mode 100644 (file)
index 7005ad0..0000000
+++ /dev/null
@@ -1,596 +0,0 @@
-/* Copyright (C) 2003-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/io.h>
-#include <linux/hdlc.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4.h"
-#include "comet.h"
-#include "comet_tables.h"
-
-
-#define COMET_NUM_SAMPLES   24  /* Number of entries in the waveform table */
-#define COMET_NUM_UNITS     5   /* Number of points per entry in table */
-
-/* forward references */
-static void SetPwrLevel(struct s_comet_reg *comet);
-static void WrtRcvEqualizerTbl(ci_t *ci, struct s_comet_reg *comet,
-                               u_int32_t *table);
-static void WrtXmtWaveformTbl(ci_t *ci, struct s_comet_reg *comet,
-                               u_int8_t table[COMET_NUM_SAMPLES]
-                               [COMET_NUM_UNITS]);
-
-
-static void *TWV_table[12] = {
-       TWVLongHaul0DB, TWVLongHaul7_5DB, TWVLongHaul15DB, TWVLongHaul22_5DB,
-       TWVShortHaul0, TWVShortHaul1, TWVShortHaul2, TWVShortHaul3,
-       TWVShortHaul4, TWVShortHaul5,
-       /** PORT POINT - 75 Ohm not supported **/
-       TWV_E1_75Ohm,
-       TWV_E1_120Ohm
-};
-
-
-static int
-lbo_tbl_lkup(int t1, int lbo) {
-       /* error switches to default */
-       if ((lbo < CFG_LBO_LH0) || (lbo > CFG_LBO_E120)) {
-               if (t1)
-                       /* default T1 waveform table */
-                       lbo = CFG_LBO_LH0;
-
-               else
-                       /* default E1 waveform table */
-                       lbo = CFG_LBO_E120;
-       }
-       /* make index ZERO relative */
-       return lbo - 1;
-}
-
-void init_comet(void *ci, struct s_comet_reg *comet, u_int32_t port_mode,
-               int clockmaster, u_int8_t moreParams)
-{
-       u_int8_t isT1mode;
-       /* T1 default */
-       u_int8_t    tix = CFG_LBO_LH0;
-       isT1mode = IS_FRAME_ANY_T1(port_mode);
-       /* T1 or E1 */
-       if (isT1mode) {
-               /* Select T1 Mode & PIO output enabled */
-               pci_write_32((u_int32_t *) &comet->gbl_cfg, 0xa0);
-               /* default T1 waveform table */
-               tix = lbo_tbl_lkup(isT1mode, CFG_LBO_LH0);
-       } else {
-               /* Select E1 Mode & PIO output enabled */
-               pci_write_32((u_int32_t *) &comet->gbl_cfg, 0x81);
-               /* default E1 waveform table */
-               tix = lbo_tbl_lkup(isT1mode, CFG_LBO_E120);
-       }
-
-       if (moreParams & CFG_LBO_MASK)
-               /* dial-in requested waveform table */
-               tix = lbo_tbl_lkup(isT1mode, moreParams & CFG_LBO_MASK);
-       /* Tx line Intfc cfg Set for analog & no special patterns */
-       /* Transmit Line Interface Config. */
-       pci_write_32((u_int32_t *) &comet->tx_line_cfg, 0x00);
-       /* master test Ignore Test settings for now */
-       /* making sure it's Default value */
-       pci_write_32((u_int32_t *) &comet->mtest, 0x00);
-       /* Turn on Center (CENT) and everything else off */
-       /* RJAT cfg */
-       pci_write_32((u_int32_t *) &comet->rjat_cfg, 0x10);
-       /* Set Jitter Attenuation to recommend T1 values */
-       if (isT1mode) {
-               /* RJAT Divider N1 Control */
-               pci_write_32((u_int32_t *) &comet->rjat_n1clk, 0x2F);
-               /* RJAT Divider N2 Control */
-               pci_write_32((u_int32_t *) &comet->rjat_n2clk, 0x2F);
-       } else {
-               /* RJAT Divider N1 Control */
-               pci_write_32((u_int32_t *) &comet->rjat_n1clk, 0xFF);
-               /* RJAT Divider N2 Control */
-               pci_write_32((u_int32_t *) &comet->rjat_n2clk, 0xFF);
-       }
-
-       /* Turn on Center (CENT) and everything else off */
-       /* TJAT Config. */
-       pci_write_32((u_int32_t *) &comet->tjat_cfg, 0x10);
-
-       /* Do not bypass jitter attenuation and bypass elastic store */
-       /* rx opts */
-       pci_write_32((u_int32_t *) &comet->rx_opt, 0x00);
-
-       /* TJAT ctrl & TJAT divider ctrl */
-       /* Set Jitter Attenuation to recommended T1 values */
-       if (isT1mode) {
-               /* TJAT Divider N1 Control */
-               pci_write_32((u_int32_t *) &comet->tjat_n1clk, 0x2F);
-               /* TJAT Divider N2  Control */
-               pci_write_32((u_int32_t *) &comet->tjat_n2clk, 0x2F);
-       } else {
-               /* TJAT Divider N1 Control */
-               pci_write_32((u_int32_t *) &comet->tjat_n1clk, 0xFF);
-               /* TJAT Divider N2 Control */
-               pci_write_32((u_int32_t *) &comet->tjat_n2clk, 0xFF);
-       }
-
-       /* 1c: rx ELST cfg   20: tx ELST cfg  28&38: rx&tx data link ctrl */
-
-       /* Select 193-bit frame format */
-       if (isT1mode) {
-               pci_write_32((u_int32_t *) &comet->rx_elst_cfg, 0x00);
-               pci_write_32((u_int32_t *) &comet->tx_elst_cfg, 0x00);
-       } else {
-               /* Select 256-bit frame format */
-               pci_write_32((u_int32_t *) &comet->rx_elst_cfg, 0x03);
-               pci_write_32((u_int32_t *) &comet->tx_elst_cfg, 0x03);
-               /* disable T1 data link receive */
-               pci_write_32((u_int32_t *) &comet->rxce1_ctl, 0x00);
-               /* disable T1 data link transmit */
-               pci_write_32((u_int32_t *) &comet->txci1_ctl, 0x00);
-       }
-
-    /* the following is a default value */
-    /* Enable 8 out of 10 validation */
-        /* t1RBOC enable(BOC:BitOriented Code) */
-       pci_write_32((u_int32_t *) &comet->t1_rboc_ena, 0x00);
-       if (isT1mode) {
-               /* IBCD cfg: aka Inband Code Detection ** loopback code length
-                * set to
-                */
-               /* 6 bit down, 5 bit up (assert) */
-               pci_write_32((u_int32_t *) &comet->ibcd_cfg, 0x04);
-               /* line loopback activate pattern */
-               pci_write_32((u_int32_t *) &comet->ibcd_act, 0x08);
-               /* deactivate code pattern (i.e.001) */
-               pci_write_32((u_int32_t *) &comet->ibcd_deact, 0x24);
-       }
-    /* 10: CDRC cfg 28&38: rx&tx data link 1 ctrl 48: t1 frmr cfg  */
-    /* 50: SIGX cfg, COSS (change of signaling state) 54: XBAS cfg  */
-    /* 60: t1 ALMI cfg */
-    /* Configure Line Coding */
-
-       switch (port_mode) {
-       /* 1 - T1 B8ZS */
-       case CFG_FRAME_SF:
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->t1_frmr_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               /* 5:B8ZS */
-               pci_write_32((u_int32_t *) &comet->t1_xbas_cfg, 0x20);
-               pci_write_32((u_int32_t *) &comet->t1_almi_cfg, 0);
-               break;
-       /* 2 - T1 B8ZS */
-       case CFG_FRAME_ESF:
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
-               /* Bit 5: T1 DataLink Enable */
-               pci_write_32((u_int32_t *) &comet->rxce1_ctl, 0x20);
-               /* 5: T1 DataLink Enable */
-               pci_write_32((u_int32_t *) &comet->txci1_ctl, 0x20);
-               /* 4:ESF  5:ESFFA */
-               pci_write_32((u_int32_t *) &comet->t1_frmr_cfg, 0x30);
-               /* 2:ESF */
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0x04);
-               /* 4:ESF  5:B8ZS */
-               pci_write_32((u_int32_t *) &comet->t1_xbas_cfg, 0x30);
-               /* 4:ESF */
-               pci_write_32((u_int32_t *) &comet->t1_almi_cfg, 0x10);
-               break;
-       /* 3 - HDB3 */
-       case CFG_FRAME_E1PLAIN:
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0x40);
-               break;
-       /* 4 - HDB3 */
-       case CFG_FRAME_E1CAS:
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0x60);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0);
-               break;
-       /* 5 - HDB3 */
-       case CFG_FRAME_E1CRC:
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0x10);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0xc2);
-               break;
-       /* 6 - HDB3 */
-       case CFG_FRAME_E1CRC_CAS:
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0x70);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0x82);
-               break;
-       /* 7 - T1 AMI */
-       case CFG_FRAME_SF_AMI:
-               /* Enable AMI Line Decoding */
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0x80);
-               pci_write_32((u_int32_t *) &comet->t1_frmr_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->t1_xbas_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->t1_almi_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               break;
-       /* 8 - T1 AMI */
-       case CFG_FRAME_ESF_AMI:
-               /* Enable AMI Line Decoding */
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0x80);
-               /* 5: T1 DataLink Enable */
-               pci_write_32((u_int32_t *) &comet->rxce1_ctl, 0x20);
-               /* 5: T1 DataLink Enable */
-               pci_write_32((u_int32_t *) &comet->txci1_ctl, 0x20);
-               /* Bit 4:ESF  5:ESFFA */
-               pci_write_32((u_int32_t *) &comet->t1_frmr_cfg, 0x30);
-               /* 2:ESF */
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0x04);
-               /* 4:ESF */
-               pci_write_32((u_int32_t *) &comet->t1_xbas_cfg, 0x10);
-               /* 4:ESF */
-               pci_write_32((u_int32_t *) &comet->t1_almi_cfg, 0x10);
-               break;
-       /* 9 - AMI */
-       case CFG_FRAME_E1PLAIN_AMI:
-               /* Enable AMI Line Decoding */
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0x80);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0x80);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0x40);
-               break;
-       /* 10 - AMI */
-       case CFG_FRAME_E1CAS_AMI:
-               /* Enable AMI Line Decoding */
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0x80);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0xe0);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0);
-               break;
-       /* 11 - AMI */
-       case CFG_FRAME_E1CRC_AMI:
-               /* Enable AMI Line Decoding */
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0x80);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0x90);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0xc2);
-               break;
-       /* 12 - AMI */
-       case CFG_FRAME_E1CRC_CAS_AMI:
-               /* Enable AMI Line Decoding */
-               pci_write_32((u_int32_t *) &comet->cdrc_cfg, 0x80);
-               pci_write_32((u_int32_t *) &comet->sigx_cfg, 0);
-               pci_write_32((u_int32_t *) &comet->e1_tran_cfg, 0xf0);
-               pci_write_32((u_int32_t *) &comet->e1_frmr_aopts, 0x82);
-               break;
-       }       /* end switch */
-
-    /***
-     * Set Full Frame mode (NXDSO[1] = 0, NXDSO[0] = 0)
-     * CMODE=1: Clock slave mode with BRCLK as an input,
-     * DE=0: Use falling edge of BRCLK for data,
-     * FE=0: Use falling edge of BRCLK for frame,
-     * CMS=0: Use backplane freq,
-     * RATE[1:0]=0,0: T1
-     ***/
-
-
-    /* 0x30: "BRIF cfg"; 0x20 is 'CMODE', 0x03 is (bit) rate */
-    /* note "rate bits can only be set once after reset" */
-       if (clockmaster) {
-               /* CMODE == clockMode, 0=clock master
-                * (so all 3 others should be slave)
-                */
-               /* rate = 1.544 Mb/s */
-               if (isT1mode)
-                       /* Comet 0 Master Mode(CMODE=0) */
-                       pci_write_32((u_int32_t *) &comet->brif_cfg, 0x00);
-               /* rate = 2.048 Mb/s */
-               else
-                       /* Comet 0 Master Mode(CMODE=0) */
-                       pci_write_32((u_int32_t *) &comet->brif_cfg, 0x01);
-
-               /* 31: BRIF frame pulse cfg  06: tx timing options */
-
-               /* Master Mode i.e.FPMODE=0 (@0x20) */
-               pci_write_32((u_int32_t *) &comet->brif_fpcfg, 0x00);
-               if ((moreParams & CFG_CLK_PORT_MASK) == CFG_CLK_PORT_INTERNAL) {
-                       if (cxt1e1_log_level >= LOG_SBEBUG12)
-                               pr_info(">> %s: clockmaster internal clock\n",
-                                       __func__);
-                       /* internal oscillator */
-                       pci_write_32((u_int32_t *) &comet->tx_time, 0x0d);
-               } else {
-                       /* external clock source */
-                       if (cxt1e1_log_level >= LOG_SBEBUG12)
-                               pr_info(">> %s: clockmaster external clock\n",
-                                       __func__);
-                       /* loop timing(external) */
-                       pci_write_32((u_int32_t *) &comet->tx_time, 0x09);
-               }
-
-       } else  {
-               /* slave */
-               if (isT1mode)
-                       /* Slave Mode(CMODE=1, see above) */
-                       pci_write_32((u_int32_t *) &comet->brif_cfg, 0x20);
-               else
-                       /* Slave Mode(CMODE=1)*/
-                       pci_write_32((u_int32_t *) &comet->brif_cfg, 0x21);
-               /* Slave Mode i.e. FPMODE=1 (@0x20) */
-               pci_write_32((u_int32_t *) &comet->brif_fpcfg, 0x20);
-       if (cxt1e1_log_level >= LOG_SBEBUG12)
-               pr_info(">> %s: clockslave internal clock\n", __func__);
-       /* oscillator timing */
-       pci_write_32((u_int32_t *) &comet->tx_time, 0x0d);
-       }
-
-       /* 32: BRIF parity F-bit cfg */
-       /* Totem-pole operation */
-       /* Receive Backplane Parity/F-bit */
-       pci_write_32((u_int32_t *) &comet->brif_pfcfg, 0x01);
-
-    /* dc: RLPS equalizer V ref */
-    /* Configuration */
-       if (isT1mode)
-               /* RLPS Equalizer Voltage  */
-               pci_write_32((u_int32_t *) &comet->rlps_eqvr, 0x2c);
-       else
-               /* RLPS Equalizer Voltage  */
-               pci_write_32((u_int32_t *) &comet->rlps_eqvr, 0x34);
-
-    /* Reserved bit set and SQUELCH enabled */
-    /* f8: RLPS cfg & status  f9: RLPS ALOS detect/clear threshold */
-       /* RLPS Configuration Status */
-       pci_write_32((u_int32_t *) &comet->rlps_cfgsts, 0x11);
-       if (isT1mode)
-               /* ? */
-               pci_write_32((u_int32_t *) &comet->rlps_alos_thresh, 0x55);
-       else
-               /* ? */
-               pci_write_32((u_int32_t *) &comet->rlps_alos_thresh, 0x22);
-
-
-    /* Set Full Frame mode (NXDSO[1] = 0, NXDSO[0] = 0) */
-    /* CMODE=0: Clock slave mode with BTCLK as an input, DE=1: Use rising */
-    /* edge of BTCLK for data, FE=1: Use rising edge of BTCLK for frame, */
-    /* CMS=0: Use backplane freq, RATE[1:0]=0,0: T1 */
-    /***    Transmit side is always an Input, Slave Clock*/
-    /* 40: BTIF cfg  41: loop timing(external) */
-       /*BTIF frame pulse cfg */
-       if (isT1mode)
-               /* BTIF Configuration  Reg. */
-               pci_write_32((u_int32_t *) &comet->btif_cfg, 0x38);
-       else
-               /* BTIF Configuration  Reg. */
-               pci_write_32((u_int32_t *) &comet->btif_cfg, 0x39);
-       /* BTIF Frame Pulse Config. */
-       pci_write_32((u_int32_t *) &comet->btif_fpcfg, 0x01);
-
-    /* 0a: master diag  06: tx timing options */
-    /* if set Comet to loop back */
-
-    /* Comets set to normal */
-       pci_write_32((u_int32_t *) &comet->mdiag, 0x00);
-
-    /* BTCLK driven by TCLKI internally (crystal driven) and Xmt Elasted  */
-    /* Store is enabled. */
-
-       WrtXmtWaveformTbl(ci, comet, TWV_table[tix]);
-       if (isT1mode)
-               WrtRcvEqualizerTbl((ci_t *) ci, comet, &T1_Equalizer[0]);
-       else
-               WrtRcvEqualizerTbl((ci_t *) ci, comet, &E1_Equalizer[0]);
-       SetPwrLevel(comet);
-}
-
-/*
-** Name:        WrtXmtWaveform
-** Description: Formulate the Data for the Pulse Waveform Storage
-**                Write register, (F2), from the sample and unit inputs.
-**                Write the data to the Pulse Waveform Storage Data register.
-** Returns:     Nothing
-*/
-static void
-WrtXmtWaveform(ci_t *ci, struct s_comet_reg *comet, u_int32_t sample,
-               u_int32_t unit, u_int8_t data)
-{
-       u_int8_t    WaveformAddr;
-
-       WaveformAddr = (sample << 3) + (unit & 7);
-       pci_write_32((u_int32_t *) &comet->xlpg_pwave_addr, WaveformAddr);
-       /* for write order preservation when Optimizing driver */
-       pci_flush_write(ci);
-       pci_write_32((u_int32_t *) &comet->xlpg_pwave_data, 0x7F & data);
-}
-
-/*
-** Name:        WrtXmtWaveformTbl
-** Description: Fill in the Transmit Waveform Values
-**                for driving the transmitter DAC.
-** Returns:     Nothing
-*/
-static void
-WrtXmtWaveformTbl(ci_t *ci, struct s_comet_reg *comet,
-                 u_int8_t table[COMET_NUM_SAMPLES][COMET_NUM_UNITS])
-{
-       u_int32_t sample, unit;
-
-       for (sample = 0; sample < COMET_NUM_SAMPLES; sample++) {
-               for (unit = 0; unit < COMET_NUM_UNITS; unit++)
-                       WrtXmtWaveform(ci, comet, sample, unit,
-                                       table[sample][unit]);
-               }
-
-    /* Enable transmitter and set output amplitude */
-       pci_write_32((u_int32_t *) &comet->xlpg_cfg,
-                       table[COMET_NUM_SAMPLES][0]);
-}
-
-
-/*
-** Name:        WrtXmtWaveform
-** Description: Fill in the Receive Equalizer RAM from the desired
-**                table.
-** Returns:     Nothing
-**
-** Remarks:  Per PM4351 Device Errata, Receive Equalizer RAM Initialization
-**           is coded with early setup of indirect address.
-*/
-
-static void
-WrtRcvEqualizerTbl(ci_t *ci, struct s_comet_reg *comet, u_int32_t *table)
-{
-       u_int32_t   ramaddr;
-       u_int32_t value;
-
-       for (ramaddr = 0; ramaddr < 256; ramaddr++) {
-               /*** the following lines are per Errata 7, 2.5 ***/
-               {
-               /* Set up for a read operation */
-               pci_write_32((u_int32_t *) &comet->rlps_eq_rwsel, 0x80);
-               /* for write order preservation when Optimizing driver */
-               pci_flush_write(ci);
-               /* write the addr, initiate a read */
-               pci_write_32((u_int32_t *) &comet->rlps_eq_iaddr,
-                               (u_int8_t) ramaddr);
-               /* for write order preservation when Optimizing driver */
-               pci_flush_write(ci);
-               /*
-               * wait 3 line rate clock cycles to ensure address bits are
-               * captured by T1/E1 clock
-               */
-
-               /* 683ns * 3 = 1366 ns, approx 2us (but use 4us) */
-               OS_uwait(4, "wret");
-       }
-
-       value = *table++;
-       pci_write_32((u_int32_t *) &comet->rlps_idata3,
-                       (u_int8_t) (value >> 24));
-       pci_write_32((u_int32_t *) &comet->rlps_idata2,
-                       (u_int8_t) (value >> 16));
-       pci_write_32((u_int32_t *) &comet->rlps_idata1,
-                       (u_int8_t) (value >> 8));
-       pci_write_32((u_int32_t *) &comet->rlps_idata0, (u_int8_t) value);
-        /* for write order preservation when Optimizing driver */
-       pci_flush_write(ci);
-
-       /* Storing RAM address, causes RAM to be updated */
-
-               /* Set up for a write operation */
-               pci_write_32((u_int32_t *) &comet->rlps_eq_rwsel, 0);
-               /* for write order preservation when optimizing driver */
-               pci_flush_write(ci);
-               /* write the addr, initiate a read */
-               pci_write_32((u_int32_t *) &comet->rlps_eq_iaddr,
-                               (u_int8_t) ramaddr);
-                /* for write order preservation when optimizing driver */
-               pci_flush_write(ci);
-
-       /*
-       * wait 3 line rate clock cycles to ensure address bits are captured
-       * by T1/E1 clock
-       */
-               /* 683ns * 3 = 1366 ns, approx 2us (but use 4us) */
-               OS_uwait(4, "wret");
-       }
-
-       /* Enable Equalizer & set it to use 256 periods */
-       pci_write_32((u_int32_t *) &comet->rlps_eq_cfg, 0xCB);
-}
-
-
-/*
-** Name:        SetPwrLevel
-** Description: Implement power level setting algorithm described below
-** Returns:     Nothing
-*/
-
-static void
-SetPwrLevel(struct s_comet_reg *comet)
-{
-       u_int32_t temp;
-
-/*
-**    Algorithm to Balance the Power Distribution of Ttip Tring
-**
-**    Zero register F6
-**    Write 0x01 to register F4
-**    Write another 0x01 to register F4
-**    Read register F4
-**    Remove the 0x01 bit by Anding register F4 with 0xFE
-**    Write the resultant value to register F4
-**    Repeat these steps for register F5
-**    Write 0x01 to register F6
-*/
-       /* XLPG Fuse Data Select */
-       pci_write_32((u_int32_t *) &comet->xlpg_fdata_sel, 0x00);
-       /* XLPG Analog Test Positive control */
-       pci_write_32((u_int32_t *) &comet->xlpg_atest_pctl, 0x01);
-       pci_write_32((u_int32_t *) &comet->xlpg_atest_pctl, 0x01);
-       temp = pci_read_32((u_int32_t *) &comet->xlpg_atest_pctl) & 0xfe;
-       pci_write_32((u_int32_t *) &comet->xlpg_atest_pctl, temp);
-       pci_write_32((u_int32_t *) &comet->xlpg_atest_nctl, 0x01);
-       pci_write_32((u_int32_t *) &comet->xlpg_atest_nctl, 0x01);
-       /* XLPG Analog Test Negative control */
-       temp = pci_read_32((u_int32_t *) &comet->xlpg_atest_nctl) & 0xfe;
-       pci_write_32((u_int32_t *) &comet->xlpg_atest_nctl, temp);
-       /* XLPG */
-       pci_write_32((u_int32_t *) &comet->xlpg_fdata_sel, 0x01);
-}
-
-
-/*
-** Name:        SetCometOps
-** Description: Set up the selected Comet's clock edge drive for both
-**                the transmit out the analog side and receive to the
-**                backplane side.
-** Returns:     Nothing
-*/
-#if 0
-static void
-SetCometOps(struct s_comet_reg *comet)
-{
-       u_int8_t rd_value;
-
-       if (comet == mConfig.C4Func1Base + (COMET0_OFFSET >> 2)) {
-               /* read the BRIF Configuration */
-               rd_value = (u_int8_t) pci_read_32((u_int32_t *)
-                               &comet->brif_cfg);
-               rd_value &= ~0x20;
-               pci_write_32((u_int32_t *) &comet->brif_cfg,
-                               (u_int32_t) rd_value);
-               /* read the BRIF Frame Pulse Configuration */
-               rd_value = (u_int8_t) pci_read_32((u_int32_t *)
-                               &comet->brif_fpcfg);
-               rd_value &= ~0x20;
-               pci_write_32((u_int32_t *) &comet->brif_fpcfg,
-                               (u_int8_t) rd_value);
-       } else {
-       /* read the BRIF Configuration */
-       rd_value = (u_int8_t) pci_read_32((u_int32_t *) &comet->brif_cfg);
-       rd_value |= 0x20;
-       pci_write_32((u_int32_t *) &comet->brif_cfg, (u_int32_t) rd_value);
-       /* read the BRIF Frame Pulse Configuration */
-       rd_value = (u_int8_t) pci_read_32((u_int32_t *) &comet->brif_fpcfg);
-       rd_value |= 0x20;
-       pci_write_32(u_int32_t *) & comet->brif_fpcfg, (u_int8_t) rd_value);
-       }
-}
-#endif
-
-/***  End-of-File  ***/
diff --git a/drivers/staging/cxt1e1/comet.h b/drivers/staging/cxt1e1/comet.h
deleted file mode 100644 (file)
index d5d286e..0000000
+++ /dev/null
@@ -1,353 +0,0 @@
-#ifndef _INC_COMET_H_
-#define _INC_COMET_H_
-
-/*-----------------------------------------------------------------------------
- * comet.h -
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/types.h>
-
-#define VINT32  volatile u_int32_t
-
-struct s_comet_reg {
-       VINT32 gbl_cfg;      /* 00  Global Cfg */
-       VINT32 clkmon;       /* 01  Clk Monitor */
-       VINT32 rx_opt;       /* 02  RX Options */
-       VINT32 rx_line_cfg;  /* 03  RX Line Interface Cfg */
-       VINT32 tx_line_cfg;  /* 04  TX Line Interface Cfg */
-       VINT32 tx_frpass;    /* 05  TX Framing & Bypass Options */
-       VINT32 tx_time;      /* 06  TX Timing Options */
-       VINT32 intr_1;       /* 07  Intr Source #1 */
-       VINT32 intr_2;       /* 08  Intr Source #2 */
-       VINT32 intr_3;       /* 09  Intr Source #3 */
-       VINT32 mdiag;        /* 0A  Master Diagnostics */
-       VINT32 mtest;        /* 0B  Master Test */
-       VINT32 adiag;        /* 0C  Analog Diagnostics */
-       VINT32 rev_id;       /* 0D  Rev/Chip Id/Global PMON Update */
-#define pmon  rev_id
-       VINT32 reset;        /* 0E  Reset */
-       VINT32 prgd_phctl;   /* 0F  PRGD Positioning/Ctl & HDLC Ctl */
-       VINT32 cdrc_cfg;     /* 10  CDRC Cfg */
-       VINT32 cdrc_ien;     /* 11  CDRC Intr Enable */
-       VINT32 cdrc_ists;    /* 12  CDRC Intr Sts */
-       VINT32 cdrc_alos;    /* 13  CDRC Alternate Loss of Signal */
-
-       VINT32 rjat_ists;    /* 14  RJAT Intr Sts */
-       VINT32 rjat_n1clk;   /* 15  RJAT Reference Clk Divisor (N1) Ctl */
-       VINT32 rjat_n2clk;   /* 16  RJAT Output Clk Divisor (N2) Ctl */
-       VINT32 rjat_cfg;     /* 17  RJAT Cfg */
-
-       VINT32 tjat_ists;    /* 18  TJAT Intr Sts */
-       VINT32 tjat_n1clk;   /* 19  TJAT Reference Clk Divisor (N1) Ctl */
-       VINT32 tjat_n2clk;   /* 1A  TJAT Output Clk Divisor (N2) Ctl */
-       VINT32 tjat_cfg;     /* 1B  TJAT Cfg */
-
-       VINT32 rx_elst_cfg;      /* 1C  RX-ELST Cfg */
-       VINT32 rx_elst_ists;     /* 1D  RX-ELST Intr Sts */
-       VINT32 rx_elst_idle;     /* 1E  RX-ELST Idle Code */
-       VINT32 _rx_elst_res1f;   /* 1F     RX-ELST Reserved */
-
-       VINT32 tx_elst_cfg;      /* 20  TX-ELST Cfg */
-       VINT32 tx_elst_ists;     /* 21  TX-ELST Intr Sts */
-       VINT32 _tx_elst_res22;   /* 22     TX-ELST Reserved */
-       VINT32 _tx_elst_res23;   /* 23     TX-ELST Reserved */
-       VINT32 __res24;          /* 24     Reserved */
-       VINT32 __res25;          /* 25     Reserved */
-       VINT32 __res26;          /* 26     Reserved */
-       VINT32 __res27;          /* 27     Reserved */
-
-       VINT32 rxce1_ctl;        /* 28  RXCE RX Data Link 1 Ctl */
-       VINT32 rxce1_bits;       /* 29  RXCE RX Data Link 1 Bit Select */
-       VINT32 rxce2_ctl;        /* 2A  RXCE RX Data Link 2 Ctl */
-       VINT32 rxce2_bits;       /* 2B  RXCE RX Data Link 2 Bit Select */
-       VINT32 rxce3_ctl;        /* 2C  RXCE RX Data Link 3 Ctl */
-       VINT32 rxce3_bits;       /* 2D  RXCE RX Data Link 3 Bit Select */
-       VINT32 _rxce_res2E;      /* 2E     RXCE Reserved */
-       VINT32 _rxce_res2F;      /* 2F     RXCE Reserved */
-
-       VINT32 brif_cfg;         /* 30  BRIF RX Backplane Cfg */
-       VINT32 brif_fpcfg;       /* 31  BRIF RX Backplane Frame Pulse Cfg */
-       VINT32 brif_pfcfg;       /* 32  BRIF RX Backplane Parity/F-Bit Cfg */
-       VINT32 brif_tsoff;       /* 33  BRIF RX Backplane Time Slot Offset */
-       VINT32 brif_boff;        /* 34  BRIF RX Backplane Bit Offset */
-       VINT32 _brif_res35;      /* 35     BRIF RX Backplane Reserved */
-       VINT32 _brif_res36;      /* 36     BRIF RX Backplane Reserved */
-       VINT32 _brif_res37;      /* 37     BRIF RX Backplane Reserved */
-
-       VINT32 txci1_ctl;        /* 38  TXCI TX Data Link 1 Ctl */
-       VINT32 txci1_bits;       /* 39  TXCI TX Data Link 2 Bit Select */
-       VINT32 txci2_ctl;        /* 3A  TXCI TX Data Link 1 Ctl */
-       VINT32 txci2_bits;       /* 3B  TXCI TX Data Link 2 Bit Select */
-       VINT32 txci3_ctl;        /* 3C  TXCI TX Data Link 1 Ctl */
-       VINT32 txci3_bits;       /* 3D  TXCI TX Data Link 2 Bit Select */
-       VINT32 _txci_res3E;      /* 3E     TXCI Reserved */
-       VINT32 _txci_res3F;      /* 3F     TXCI Reserved */
-
-       VINT32 btif_cfg;         /* 40  BTIF TX Backplane Cfg */
-       VINT32 btif_fpcfg;       /* 41  BTIF TX Backplane Frame Pulse Cfg */
-       VINT32 btif_pcfgsts;     /* 42  BTIF TX Backplane Parity Cfg & Sts */
-       VINT32 btif_tsoff;       /* 43  BTIF TX Backplane Time Slot Offset */
-       VINT32 btif_boff;        /* 44  BTIF TX Backplane Bit Offset */
-       VINT32 _btif_res45;      /* 45     BTIF TX Backplane Reserved */
-       VINT32 _btif_res46;      /* 46     BTIF TX Backplane Reserved */
-       VINT32 _btif_res47;      /* 47     BTIF TX Backplane Reserved */
-       VINT32 t1_frmr_cfg;      /* 48  T1 FRMR Cfg */
-       VINT32 t1_frmr_ien;      /* 49  T1 FRMR Intr Enable */
-       VINT32 t1_frmr_ists;     /* 4A  T1 FRMR Intr Sts */
-       VINT32 __res_4B;         /* 4B     Reserved */
-       VINT32 ibcd_cfg;         /* 4C  IBCD Cfg */
-       VINT32 ibcd_ies;         /* 4D  IBCD Intr Enable/Sts */
-       VINT32 ibcd_act;         /* 4E  IBCD Activate Code */
-       VINT32 ibcd_deact;       /* 4F  IBCD Deactivate Code */
-
-       VINT32 sigx_cfg;         /* 50  SIGX Cfg/Change of Signaling State */
-       VINT32 sigx_acc_cos;     /* 51  SIGX
-                                 * uP Access Sts/Change of Signaling State */
-       VINT32 sigx_iac_cos;     /* 52  SIGX Channel Indirect
-                                 * Addr/Ctl/Change of Signaling State */
-       VINT32 sigx_idb_cos;     /* 53  SIGX Channel Indirect Data
-                                 * Buffer/Change of Signaling State */
-
-       VINT32 t1_xbas_cfg;      /* 54  T1 XBAS Cfg */
-       VINT32 t1_xbas_altx;     /* 55  T1 XBAS Alarm TX */
-       VINT32 t1_xibc_ctl;      /* 56  T1 XIBC Ctl */
-       VINT32 t1_xibc_lbcode;   /* 57  T1 XIBC Loopback Code */
-
-       VINT32 pmon_ies;         /* 58  PMON Intr Enable/Sts */
-       VINT32 pmon_fberr;       /* 59  PMON Framing Bit Err Cnt */
-       VINT32 pmon_feb_lsb;     /* 5A  PMON
-                                 * OFF/COFA/Far End Block Err Cnt (LSB) */
-       VINT32 pmon_feb_msb;     /* 5B  PMON
-                                 * OFF/COFA/Far End Block Err Cnt (MSB) */
-       VINT32 pmon_bed_lsb;     /* 5C  PMON Bit/Err/CRCE Cnt (LSB) */
-       VINT32 pmon_bed_msb;     /* 5D  PMON Bit/Err/CRCE Cnt (MSB) */
-       VINT32 pmon_lvc_lsb;     /* 5E  PMON LVC Cnt (LSB) */
-       VINT32 pmon_lvc_msb;     /* 5F  PMON LVC Cnt (MSB) */
-
-       VINT32 t1_almi_cfg;      /* 60  T1 ALMI Cfg */
-       VINT32 t1_almi_ien;      /* 61  T1 ALMI Intr Enable */
-       VINT32 t1_almi_ists;     /* 62  T1 ALMI Intr Sts */
-       VINT32 t1_almi_detsts;   /* 63  T1 ALMI Alarm Detection Sts */
-
-       VINT32 _t1_pdvd_res64;   /* 64     T1 PDVD Reserved */
-       VINT32 t1_pdvd_ies;      /* 65  T1 PDVD Intr Enable/Sts */
-       VINT32 _t1_xboc_res66;   /* 66     T1 XBOC Reserved */
-       VINT32 t1_xboc_code;     /* 67  T1 XBOC Code */
-       VINT32 _t1_xpde_res68;   /* 68     T1 XPDE Reserved */
-       VINT32 t1_xpde_ies;      /* 69  T1 XPDE Intr Enable/Sts */
-
-       VINT32 t1_rboc_ena;      /* 6A  T1 RBOC Enable */
-       VINT32 t1_rboc_sts;      /* 6B  T1 RBOC Code Sts */
-
-       VINT32 t1_tpsc_cfg;      /* 6C  TPSC Cfg */
-       VINT32 t1_tpsc_sts;      /* 6D  TPSC uP Access Sts */
-       VINT32 t1_tpsc_ciaddr;   /* 6E  TPSC Channel Indirect
-                                 * Addr/Ctl */
-       VINT32 t1_tpsc_cidata;   /* 6F  TPSC Channel Indirect Data
-                                 * Buffer */
-       VINT32 t1_rpsc_cfg;      /* 70  RPSC Cfg */
-       VINT32 t1_rpsc_sts;      /* 71  RPSC uP Access Sts */
-       VINT32 t1_rpsc_ciaddr;   /* 72  RPSC Channel Indirect
-                                 * Addr/Ctl */
-       VINT32 t1_rpsc_cidata;   /* 73  RPSC Channel Indirect Data
-                                 * Buffer */
-       VINT32 __res74;          /* 74     Reserved */
-       VINT32 __res75;          /* 75     Reserved */
-       VINT32 __res76;          /* 76     Reserved */
-       VINT32 __res77;          /* 77     Reserved */
-
-       VINT32 t1_aprm_cfg;      /* 78  T1 APRM Cfg/Ctl */
-       VINT32 t1_aprm_load;     /* 79  T1 APRM Manual Load */
-       VINT32 t1_aprm_ists;     /* 7A  T1 APRM Intr Sts */
-       VINT32 t1_aprm_1sec_2;   /* 7B  T1 APRM One Second Content Octet 2 */
-       VINT32 t1_aprm_1sec_3;   /* 7C  T1 APRM One Second Content Octet 3 */
-       VINT32 t1_aprm_1sec_4;   /* 7D  T1 APRM One Second Content Octet 4 */
-       VINT32 t1_aprm_1sec_5;   /* 7E  T1 APRM
-                                 * One Second Content MSB (Octect 5) */
-       VINT32 t1_aprm_1sec_6;   /* 7F  T1 APRM
-                                 * One Second Content MSB (Octect 6) */
-
-       VINT32 e1_tran_cfg;      /* 80  E1 TRAN Cfg */
-       VINT32 e1_tran_txalarm;  /* 81  E1 TRAN TX Alarm/Diagnostic Ctl */
-       VINT32 e1_tran_intctl;   /* 82  E1 TRAN International Ctl */
-       VINT32 e1_tran_extrab;   /* 83  E1 TRAN Extra Bits Ctl */
-       VINT32 e1_tran_ien;      /* 84  E1 TRAN Intr Enable */
-       VINT32 e1_tran_ists;     /* 85  E1 TRAN Intr Sts */
-       VINT32 e1_tran_nats;     /* 86  E1 TRAN National Bit Codeword
-                                 * Select */
-       VINT32 e1_tran_nat;      /* 87  E1 TRAN National Bit Codeword */
-       VINT32 __res88;          /* 88     Reserved */
-       VINT32 __res89;          /* 89     Reserved */
-       VINT32 __res8A;          /* 8A     Reserved */
-       VINT32 __res8B;          /* 8B     Reserved */
-
-       VINT32 _t1_frmr_res8C;   /* 8C     T1 FRMR Reserved */
-       VINT32 _t1_frmr_res8D;   /* 8D     T1 FRMR Reserved */
-       VINT32 __res8E;          /* 8E     Reserved */
-       VINT32 __res8F;          /* 8F     Reserved */
-
-       VINT32 e1_frmr_aopts;    /* 90  E1 FRMR Frame Alignment Options */
-       VINT32 e1_frmr_mopts;    /* 91  E1 FRMR Maintenance Mode Options */
-       VINT32 e1_frmr_ien;      /* 92  E1 FRMR Framing Sts Intr Enable */
-       VINT32 e1_frmr_mien;     /* 93  E1 FRMR
-                                 * Maintenance/Alarm Sts Intr Enable */
-       VINT32 e1_frmr_ists;     /* 94  E1 FRMR Framing Sts Intr Indication */
-       VINT32 e1_frmr_mists;    /* 95  E1 FRMR
-                                 * Maintenance/Alarm Sts Indication Enable */
-       VINT32 e1_frmr_sts;      /* 96  E1 FRMR Framing Sts */
-       VINT32 e1_frmr_masts;    /* 97  E1 FRMR Maintenance/Alarm Sts */
-       VINT32 e1_frmr_nat_bits; /* 98  E1 FRMR International/National Bits */
-       VINT32 e1_frmr_crc_lsb;  /* 99  E1 FRMR CRC Err Cnt - LSB */
-       VINT32 e1_frmr_crc_msb;  /* 9A  E1 FRMR CRC Err Cnt - MSB */
-       VINT32 e1_frmr_nat_ien;  /* 9B  E1 FRMR
-                                 * National Bit Codeword Intr Enables */
-       VINT32 e1_frmr_nat_ists; /* 9C  E1 FRMR
-                                 * National Bit Codeword Intr/Sts */
-       VINT32 e1_frmr_nat;      /* 9D  E1 FRMR National Bit Codewords */
-       VINT32 e1_frmr_fp_ien;   /* 9E  E1 FRMR
-                                 * Frame Pulse/Alarm Intr Enables */
-       VINT32 e1_frmr_fp_ists;  /* 9F  E1 FRMR Frame Pulse/Alarm Intr/Sts */
-
-       VINT32 __resA0;          /* A0     Reserved */
-       VINT32 __resA1;          /* A1     Reserved */
-       VINT32 __resA2;          /* A2     Reserved */
-       VINT32 __resA3;          /* A3     Reserved */
-       VINT32 __resA4;          /* A4     Reserved */
-       VINT32 __resA5;          /* A5     Reserved */
-       VINT32 __resA6;          /* A6     Reserved */
-       VINT32 __resA7;          /* A7     Reserved */
-
-       VINT32 tdpr1_cfg;        /* A8  TDPR #1 Cfg */
-       VINT32 tdpr1_utl;        /* A9  TDPR #1 Upper TX Threshold */
-       VINT32 tdpr1_ltl;        /* AA  TDPR #1 Lower TX Threshold */
-       VINT32 tdpr1_ien;        /* AB  TDPR #1 Intr Enable */
-       VINT32 tdpr1_ists;       /* AC  TDPR #1 Intr Sts/UDR Clear */
-       VINT32 tdpr1_data;       /* AD  TDPR #1 TX Data */
-       VINT32 __resAE;          /* AE     Reserved */
-       VINT32 __resAF;          /* AF     Reserved */
-       VINT32 tdpr2_cfg;        /* B0  TDPR #2 Cfg */
-       VINT32 tdpr2_utl;        /* B1  TDPR #2 Upper TX Threshold */
-       VINT32 tdpr2_ltl;        /* B2  TDPR #2 Lower TX Threshold */
-       VINT32 tdpr2_ien;        /* B3  TDPR #2 Intr Enable */
-       VINT32 tdpr2_ists;       /* B4  TDPR #2 Intr Sts/UDR Clear */
-       VINT32 tdpr2_data;       /* B5  TDPR #2 TX Data */
-       VINT32 __resB6;          /* B6     Reserved */
-       VINT32 __resB7;          /* B7     Reserved1 */
-       VINT32 tdpr3_cfg;        /* B8  TDPR #3 Cfg */
-       VINT32 tdpr3_utl;        /* B9  TDPR #3 Upper TX Threshold */
-       VINT32 tdpr3_ltl;        /* BA  TDPR #3 Lower TX Threshold */
-       VINT32 tdpr3_ien;        /* BB  TDPR #3 Intr Enable */
-       VINT32 tdpr3_ists;       /* BC  TDPR #3 Intr Sts/UDR Clear */
-       VINT32 tdpr3_data;       /* BD  TDPR #3 TX Data */
-       VINT32 __resBE;          /* BE     Reserved */
-       VINT32 __resBF;          /* BF     Reserved */
-
-       VINT32 rdlc1_cfg;        /* C0  RDLC #1 Cfg */
-       VINT32 rdlc1_intctl;     /* C1  RDLC #1 Intr Ctl */
-       VINT32 rdlc1_sts;        /* C2  RDLC #1 Sts */
-       VINT32 rdlc1_data;       /* C3  RDLC #1 Data */
-       VINT32 rdlc1_paddr;      /* C4  RDLC #1 Primary Addr Match */
-       VINT32 rdlc1_saddr;      /* C5  RDLC #1 Secondary Addr Match */
-       VINT32 __resC6;          /* C6     Reserved */
-       VINT32 __resC7;          /* C7     Reserved */
-       VINT32 rdlc2_cfg;        /* C8  RDLC #2 Cfg */
-       VINT32 rdlc2_intctl;     /* C9  RDLC #2 Intr Ctl */
-       VINT32 rdlc2_sts;        /* CA  RDLC #2 Sts */
-       VINT32 rdlc2_data;       /* CB  RDLC #2 Data */
-       VINT32 rdlc2_paddr;      /* CC  RDLC #2 Primary Addr Match */
-       VINT32 rdlc2_saddr;      /* CD  RDLC #2 Secondary Addr Match */
-       VINT32 __resCE;          /* CE     Reserved */
-       VINT32 __resCF;          /* CF     Reserved */
-       VINT32 rdlc3_cfg;        /* D0  RDLC #3 Cfg */
-       VINT32 rdlc3_intctl;     /* D1  RDLC #3 Intr Ctl */
-       VINT32 rdlc3_sts;        /* D2  RDLC #3 Sts */
-       VINT32 rdlc3_data;       /* D3  RDLC #3 Data */
-       VINT32 rdlc3_paddr;      /* D4  RDLC #3 Primary Addr Match */
-       VINT32 rdlc3_saddr;      /* D5  RDLC #3 Secondary Addr Match */
-
-       VINT32 csu_cfg;          /* D6  CSU Cfg */
-       VINT32 _csu_resD7;       /* D7     CSU Reserved */
-
-       VINT32 rlps_idata3;      /* D8  RLPS Indirect Data, 24-31 */
-       VINT32 rlps_idata2;      /* D9  RLPS Indirect Data, 16-23 */
-       VINT32 rlps_idata1;      /* DA  RLPS Indirect Data, 8-15 */
-       VINT32 rlps_idata0;      /* DB  RLPS Indirect Data, 0-7 */
-       VINT32 rlps_eqvr;        /* DC  RLPS Equalizer Voltage Reference
-                                 *    (E1 missing) */
-       VINT32 _rlps_resDD;      /* DD     RLPS Reserved */
-       VINT32 _rlps_resDE;      /* DE     RLPS Reserved */
-       VINT32 _rlps_resDF;      /* DF     RLPS Reserved */
-
-       VINT32 prgd_ctl;         /* E0  PRGD Ctl */
-       VINT32 prgd_ies;         /* E1  PRGD Intr Enable/Sts */
-       VINT32 prgd_shift_len;   /* E2  PRGD Shift Length */
-       VINT32 prgd_tap;         /* E3  PRGD Tap */
-       VINT32 prgd_errin;       /* E4  PRGD Err Insertion */
-       VINT32 _prgd_resE5;      /* E5     PRGD Reserved */
-       VINT32 _prgd_resE6;      /* E6     PRGD Reserved */
-       VINT32 _prgd_resE7;      /* E7     PRGD Reserved */
-       VINT32 prgd_patin1;      /* E8  PRGD Pattern Insertion #1 */
-       VINT32 prgd_patin2;      /* E9  PRGD Pattern Insertion #2 */
-       VINT32 prgd_patin3;      /* EA  PRGD Pattern Insertion #3 */
-       VINT32 prgd_patin4;      /* EB  PRGD Pattern Insertion #4 */
-       VINT32 prgd_patdet1;     /* EC  PRGD Pattern Detector #1 */
-       VINT32 prgd_patdet2;     /* ED  PRGD Pattern Detector #2 */
-       VINT32 prgd_patdet3;     /* EE  PRGD Pattern Detector #3 */
-       VINT32 prgd_patdet4;     /* EF  PRGD Pattern Detector #4 */
-
-       VINT32 xlpg_cfg;         /* F0  XLPG Line Driver Cfg */
-       VINT32 xlpg_ctlsts;      /* F1  XLPG Ctl/Sts */
-       VINT32 xlpg_pwave_addr;  /* F2  XLPG
-                                 * Pulse Waveform Storage Write Addr */
-       VINT32 xlpg_pwave_data;  /* F3  XLPG Pulse Waveform Storage Data */
-       VINT32 xlpg_atest_pctl;  /* F4  XLPG Analog Test Positive Ctl */
-       VINT32 xlpg_atest_nctl;  /* F5  XLPG Analog Test Negative Ctl */
-       VINT32 xlpg_fdata_sel;   /* F6  XLPG Fuse Data Select */
-       VINT32 _xlpg_resF7;      /* F7     XLPG Reserved */
-
-       VINT32 rlps_cfgsts;      /* F8  RLPS Cfg & Sts */
-       VINT32 rlps_alos_thresh; /* F9  RLPS
-                                 * ALOS Detection/Clearance Threshold */
-       VINT32 rlps_alos_dper;   /* FA  RLPS ALOS Detection Period */
-       VINT32 rlps_alos_cper;   /* FB  RLPS ALOS Clearance Period */
-       VINT32 rlps_eq_iaddr;    /* FC  RLPS Equalization Indirect Addr */
-       VINT32 rlps_eq_rwsel;    /* FD  RLPS Equalization Read/WriteB Select */
-       VINT32 rlps_eq_ctlsts;   /* FE  RLPS Equalizer Loop Sts & Ctl */
-       VINT32 rlps_eq_cfg;      /* FF  RLPS Equalizer Cfg */
-};
-
-/* 00AH: MDIAG Register bit definitions */
-#define COMET_MDIAG_ID5        0x40
-#define COMET_MDIAG_LBMASK     0x3F
-#define COMET_MDIAG_PAYLB      0x20
-#define COMET_MDIAG_LINELB     0x10
-#define COMET_MDIAG_RAIS       0x08
-#define COMET_MDIAG_DDLB       0x04
-#define COMET_MDIAG_TXMFP      0x02
-#define COMET_MDIAG_TXLOS      0x01
-#define COMET_MDIAG_LBOFF      0x00
-
-#undef VINT32
-
-#ifdef __KERNEL__
-extern void
-init_comet(void *, struct s_comet_reg *, u_int32_t, int, u_int8_t);
-#endif
-
-#endif                          /* _INC_COMET_H_ */
diff --git a/drivers/staging/cxt1e1/comet_tables.c b/drivers/staging/cxt1e1/comet_tables.c
deleted file mode 100644 (file)
index e96665e..0000000
+++ /dev/null
@@ -1,538 +0,0 @@
-/*-----------------------------------------------------------------------------
- * comet_tables.c - waveform tables for the PM4351 'COMET'
- *
- * Copyright (C) 2003-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/types.h>
-#include "comet_tables.h"
-
-/*****************************************************************************
-*
-*  Array names:
-*
-*       TWVLongHaul0DB
-*       TWVLongHaul7_5DB
-*       TWVLongHaul15DB
-*       TWVLongHaul22_5DB
-*       TWVShortHaul0
-*       TWVShortHaul1
-*       TWVShortHaul2
-*       TWVShortHaul3
-*       TWVShortHaul4
-*       TWVShortHaul5
-*       TWV_E1_120Ohm
-*       TWV_E1_75Ohm   <not supported>
-*       T1_Equalizer
-*       E1_Equalizer
-*
-*****************************************************************************/
-
-u_int8_t TWVLongHaul0DB[25][5] =/* T1 Long Haul 0 DB */
-{
-    {0x00, 0x44, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x20, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x32, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3E, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x3D, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x3C, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x3B, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x39, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x39, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x38, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x37, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x36, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x34, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x29, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x4F, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x4C, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x49, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x0C}                              /* PMC's suggested value */
-/*  {0x14}                    Output Amplitude */
-};
-
-u_int8_t    TWVLongHaul7_5DB[25][5] =   /* T1 Long Haul 7.5 DB */
-{
-    {0x00, 0x10, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x01, 0x0E, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x02, 0x0C, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x04, 0x0A, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x08, 0x08, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x0C, 0x06, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x10, 0x04, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x16, 0x02, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x1A, 0x01, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x1E, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x22, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x26, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x2A, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x2B, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x2C, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x2D, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x2C, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x28, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x24, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x20, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x1C, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x18, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x14, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x12, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x07}                      /* PMC's suggested value */
-/*  { 0x0A }                        Output Amplitude */
-};
-
-u_int8_t    TWVLongHaul15DB[25][5] =    /* T1 Long Haul 15 DB */
-{
-    {0x00, 0x2A, 0x09, 0x01, 0x00},     /* Sample 0 */
-    {0x00, 0x28, 0x08, 0x01, 0x00},     /* Sample 1 */
-    {0x00, 0x26, 0x08, 0x01, 0x00},     /* Sample 2 */
-    {0x00, 0x24, 0x07, 0x01, 0x00},     /* Sample 3 */
-    {0x01, 0x22, 0x07, 0x01, 0x00},     /* Sample 4 */
-    {0x02, 0x20, 0x06, 0x01, 0x00},     /* Sample 5 */
-    {0x04, 0x1E, 0x06, 0x01, 0x00},     /* Sample 6 */
-    {0x07, 0x1C, 0x05, 0x00, 0x00},     /* Sample 7 */
-    {0x0A, 0x1B, 0x05, 0x00, 0x00},     /* Sample 8 */
-    {0x0D, 0x19, 0x05, 0x00, 0x00},     /* Sample 9 */
-    {0x10, 0x18, 0x04, 0x00, 0x00},     /* Sample 10 */
-    {0x14, 0x16, 0x04, 0x00, 0x00},     /* Sample 11 */
-    {0x18, 0x15, 0x04, 0x00, 0x00},     /* Sample 12 */
-    {0x1B, 0x13, 0x03, 0x00, 0x00},     /* Sample 13 */
-    {0x1E, 0x12, 0x03, 0x00, 0x00},     /* Sample 14 */
-    {0x21, 0x10, 0x03, 0x00, 0x00},     /* Sample 15 */
-    {0x24, 0x0F, 0x03, 0x00, 0x00},     /* Sample 16 */
-    {0x27, 0x0D, 0x03, 0x00, 0x00},     /* Sample 17 */
-    {0x2A, 0x0D, 0x02, 0x00, 0x00},     /* Sample 18 */
-    {0x2D, 0x0B, 0x02, 0x00, 0x00},     /* Sample 19 */
-    {0x30, 0x0B, 0x02, 0x00, 0x00},     /* Sample 20 */
-    {0x30, 0x0A, 0x02, 0x00, 0x00},     /* Sample 21 */
-    {0x2E, 0x0A, 0x02, 0x00, 0x00},     /* Sample 22 */
-    {0x2C, 0x09, 0x02, 0x00, 0x00},     /* Sample 23 */
-    {0x03}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVLongHaul22_5DB[25][5] =  /* T1 Long Haul 22.5 DB */
-{
-    {0x00, 0x1F, 0x16, 0x06, 0x01},     /* Sample 0 */
-    {0x00, 0x20, 0x15, 0x05, 0x01},     /* Sample 1 */
-    {0x00, 0x21, 0x15, 0x05, 0x01},     /* Sample 2 */
-    {0x00, 0x22, 0x14, 0x05, 0x01},     /* Sample 3 */
-    {0x00, 0x22, 0x13, 0x04, 0x00},     /* Sample 4 */
-    {0x00, 0x23, 0x12, 0x04, 0x00},     /* Sample 5 */
-    {0x01, 0x23, 0x12, 0x04, 0x00},     /* Sample 6 */
-    {0x01, 0x24, 0x11, 0x03, 0x00},     /* Sample 7 */
-    {0x01, 0x23, 0x10, 0x03, 0x00},     /* Sample 8 */
-    {0x02, 0x23, 0x10, 0x03, 0x00},     /* Sample 9 */
-    {0x03, 0x22, 0x0F, 0x03, 0x00},     /* Sample 10 */
-    {0x05, 0x22, 0x0E, 0x03, 0x00},     /* Sample 11 */
-    {0x07, 0x21, 0x0E, 0x02, 0x00},     /* Sample 12 */
-    {0x09, 0x20, 0x0D, 0x02, 0x00},     /* Sample 13 */
-    {0x0B, 0x1E, 0x0C, 0x02, 0x00},     /* Sample 14 */
-    {0x0E, 0x1D, 0x0C, 0x02, 0x00},     /* Sample 15 */
-    {0x10, 0x1B, 0x0B, 0x02, 0x00},     /* Sample 16 */
-    {0x13, 0x1B, 0x0A, 0x02, 0x00},     /* Sample 17 */
-    {0x15, 0x1A, 0x0A, 0x02, 0x00},     /* Sample 18 */
-    {0x17, 0x19, 0x09, 0x01, 0x00},     /* Sample 19 */
-    {0x19, 0x19, 0x08, 0x01, 0x00},     /* Sample 20 */
-    {0x1B, 0x18, 0x08, 0x01, 0x00},     /* Sample 21 */
-    {0x1D, 0x17, 0x07, 0x01, 0x00},     /* Sample 22 */
-    {0x1E, 0x17, 0x06, 0x01, 0x00},     /* Sample 23 */
-    {0x02}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVShortHaul0[25][5] =      /* T1 Short Haul 0 - 110 ft */
-{
-    {0x00, 0x45, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x20, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x3C, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x3B, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x39, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x39, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x38, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x37, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x36, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x34, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x29, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x59, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x55, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x50, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x4D, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x48, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x0C}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVShortHaul1[25][5] =      /* T1 Short Haul 110 - 220 ft */
-{
-    {0x00, 0x44, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x36, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x34, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x30, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x2F, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x2E, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x2D, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x2C, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x2B, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x2A, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x28, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x26, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x68, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x54, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x4F, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x49, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x10}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVShortHaul2[25][5] =      /* T1 Short Haul 220 - 330 ft */
-{
-    {0x00, 0x44, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3A, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3A, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x38, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x30, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x2F, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x2E, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x2D, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x2C, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x2B, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x2A, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x29, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x23, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x6C, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x60, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x4F, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x49, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x11}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVShortHaul3[25][5] =      /* T1 Short Haul 330 - 440 ft */
-{
-    {0x00, 0x44, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x2F, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x2E, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x2D, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x2C, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x2B, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x2A, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x29, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x28, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x19, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x7F, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x60, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x4F, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x49, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x12}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVShortHaul4[25][5] =      /* T1 Short Haul 440 - 550 ft */
-{
-    {0x00, 0x44, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x30, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x2B, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x2A, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x29, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x28, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x27, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x26, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x26, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x24, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x7F, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x7F, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x4F, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x49, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x14}                      /* Output Amplitude */
-};
-
-u_int8_t    TWVShortHaul5[25][5] =      /* T1 Short Haul 550 - 660 ft */
-{
-    {0x00, 0x44, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x0A, 0x44, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3F, 0x43, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x3F, 0x42, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x3F, 0x41, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x30, 0x41, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x2A, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x29, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x28, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x27, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x26, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x25, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x24, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x4A, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x7F, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x7F, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x5F, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x50, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x49, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x47, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x46, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x15}                      /* Output Amplitude */
-};
-
-u_int8_t    TWV_E1_120Ohm[25][5] =      /* E1 120 Ohm */
-{
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x0A, 0x00, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x3F, 0x00, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3F, 0x00, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x39, 0x00, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x38, 0x00, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x36, 0x00, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x36, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x35, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x35, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x35, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x35, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x35, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x35, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x2D, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-    {0x0C}                      /* PMC's suggested value */
-/*  { 0x10 }                Output Amplitude */
-};
-
-
-
-u_int8_t    TWV_E1_75Ohm[25][5] =       /* E1 75 Ohm */
-{
-#ifdef PMCC4_DOES_NOT_SUPPORT
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 0 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 1 */
-    {0x0A, 0x00, 0x00, 0x00, 0x00},     /* Sample 2 */
-    {0x28, 0x00, 0x00, 0x00, 0x00},     /* Sample 3 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 4 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 5 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 6 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 7 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 8 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 9 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 10 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 11 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 12 */
-    {0x3A, 0x00, 0x00, 0x00, 0x00},     /* Sample 13 */
-    {0x32, 0x00, 0x00, 0x00, 0x00},     /* Sample 14 */
-    {0x14, 0x00, 0x00, 0x00, 0x00},     /* Sample 15 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 16 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 17 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 18 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 19 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 20 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 21 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 22 */
-    {0x00, 0x00, 0x00, 0x00, 0x00},     /* Sample 23 */
-#endif
-    {0x0C}                      /* Output Amplitude */
-};
-
-
-u_int32_t T1_Equalizer[256] =   /* T1 Receiver Equalizer */
-{
-    0x03FE1840, 0x03F61840, 0x03EE1840, 0x03E61840,     /* 000 - 003 */
-        0x03DE1840, 0x03D61840, 0x03D61840, 0x03D61840, /* 004 - 007 */
-        0x03CE1840, 0x03CE1840, 0x03CE1840, 0x03CE1840, /* 008 - 011 */
-        0x03C61840, 0x03C61840, 0x03C61840, 0x0BBE1840, /* 012 - 015 */
-        0x0BBE1840, 0x0BBE1840, 0x0BBE1840, 0x0BB61840, /* 016 - 019 */
-        0x0BB61840, 0x0BB61840, 0x0BB61840, 0x13AE1838, /* 020 - 023 */
-        0x13AE183C, 0x13AE1840, 0x13AE1840, 0x13AE1840, /* 024 - 027 */
-        0x13AE1840, 0x1BB618B8, 0x1BAE18B8, 0x1BAE18BC, /* 028 - 031 */
-        0x1BAE18C0, 0x1BAE18C0, 0x23A618C0, 0x23A618C0, /* 032 - 035 */
-        0x23A618C0, 0x23A618C0, 0x23A618C0, 0x239E18C0, /* 036 - 039 */
-        0x239E18C0, 0x239E18C0, 0x239E18C0, 0x239E18C0, /* 040 - 043 */
-        0x2B9618C0, 0x2B9618C0, 0x2B9618C0, 0x33961940, /* 044 - 047 */
-        0x37961940, 0x37961940, 0x37961940, 0x3F9E19C0, /* 048 - 051 */
-        0x3F9E19C0, 0x3F9E19C0, 0x3FA61A40, 0x3FA61A40, /* 052 - 055 */
-        0x3FA61A40, 0x3FA61A40, 0x3F9619C0, 0x3F9619C0, /* 056 - 059 */
-        0x3F9619C0, 0x3F9619C0, 0x479E1A40, 0x479E1A40, /* 060 - 063 */
-        0x479E1A40, 0x47961A40, 0x47961A40, 0x47961A40, /* 064 - 067 */
-        0x47961A40, 0x4F8E1A40, 0x4F8E1A40, 0x4F8E1A40, /* 068 - 071 */
-        0x4F8E1A40, 0x4F8E1A40, 0x57861A40, 0x57861A40, /* 072 - 075 */
-        0x57861A40, 0x57861A40, 0x57861A40, 0x5F861AC0, /* 076 - 079 */
-        0x5F861AC0, 0x5F861AC0, 0x5F861AC0, 0x5F861AC0, /* 080 - 083 */
-        0x5F861AC0, 0x5F7E1AC0, 0x5F7E1AC0, 0x5F7E1AC0, /* 084 - 087 */
-        0x5F7E1AC0, 0x5F7E1AC0, 0x677E2AC0, 0x677E2AC0, /* 088 - 091 */
-        0x677E2AC0, 0x677E2AC0, 0x67762AC0, 0x67762AC0, /* 092 - 095 */
-        0x67762AC0, 0x67762AC0, 0x67762AC0, 0x6F6E2AC0, /* 096 - 099 */
-        0x6F6E2AC0, 0x6F6E2AC0, 0x6F6E2AC0, 0x776E3AC0, /* 100 - 103 */
-        0x776E3AC0, 0x776E3AC0, 0x776E3AC0, 0x7F663AC0, /* 104 - 107 */
-        0x7F663AC0, 0x7F664AC0, 0x7F664AC0, 0x7F664AC0, /* 108 - 111 */
-        0x7F664AC0, 0x87665AC0, 0x87665AC0, 0x87665AC0, /* 112 - 115 */
-        0x87665AC0, 0x87665AC0, 0x875E5AC0, 0x875E5AC0, /* 116 - 119 */
-        0x875E5AC0, 0x875E5AC0, 0x875E5AC0, 0x8F5E6AC0, /* 120 - 123 */
-        0x8F5E6AC0, 0x8F5E6AC0, 0x8F5E6AC0, 0x975E7AC0, /* 124 - 127 */
-        0x975E7AC0, 0x975E7AC0, 0x975E7AC0, 0x9F5E8AC0, /* 128 - 131 */
-        0x9F5E8AC0, 0x9F5E8AC0, 0x9F5E8AC0, 0x9F5E8AC0, /* 132 - 135 */
-        0xA7569AC0, 0xA7569AC0, 0xA7569AC0, 0xA7569AC0, /* 136 - 139 */
-        0xA756AAC0, 0xA756AAC0, 0xA756AAC0, 0xAF4EAAC0, /* 140 - 143 */
-        0xAF4EAAC0, 0xAF4EAAC0, 0xAF4EAAC0, 0xAF4EAAC0, /* 144 - 147 */
-        0xB746AAC0, 0xB746AAC0, 0xB746AAC0, 0xB746AAC0, /* 148 - 151 */
-        0xB746AAC0, 0xB746AAC0, 0xB746AAC0, 0xB746BAC0, /* 152 - 155 */
-        0xB746BAC0, 0xB746BAC0, 0xBF4EBB40, 0xBF4EBB40, /* 156 - 159 */
-        0xBF4EBB40, 0xBF4EBB40, 0xBF4EBB40, 0xBF4EBB40, /* 160 - 163 */
-        0xBF4EBB40, 0xBF4EBB40, 0xBF4EBB40, 0xBE46CB40, /* 164 - 167 */
-        0xBE46CB40, 0xBE46CB40, 0xBE46CB40, 0xBE46CB40, /* 168 - 171 */
-        0xBE46CB40, 0xBE46DB40, 0xBE46DB40, 0xBE46DB40, /* 172 - 175 */
-        0xC63ECB40, 0xC63ECB40, 0xC63EDB40, 0xC63EDB40, /* 176 - 179 */
-        0xC63EDB40, 0xC644DB40, 0xC644DB40, 0xC644DB40, /* 180 - 183 */
-        0xC644DB40, 0xC63CDB40, 0xC63CDB40, 0xC63CDB40, /* 184 - 187 */
-        0xC63CDB40, 0xD634DB40, 0xD634DB40, 0xD634DB40, /* 188 - 191 */
-        0xD634DB40, 0xD634DB40, 0xDE2CDB3C, 0xDE2CDB3C, /* 192 - 195 */
-        0xDE2CDB3C, 0xE62CDB40, 0xE62CDB40, 0xE62CDB40, /* 196 - 199 */
-        0xE62CDB40, 0xE62CDB40, 0xE62CEB40, 0xE62CEB40, /* 200 - 203 */
-        0xE62CEB40, 0xEE2CFB40, 0xEE2CFB40, 0xEE2CFB40, /* 204 - 207 */
-        0xEE2D0B40, 0xEE2D0B40, 0xEE2D0B40, 0xEE2D0B40, /* 208 - 211 */
-        0xEE2D0B40, 0xF5250B38, 0xF5250B3C, 0xF5250B40, /* 212 - 215 */
-        0xF5251B40, 0xF5251B40, 0xF5251B40, 0xF5251B40, /* 216 - 219 */
-        0xF5251B40, 0xFD252B40, 0xFD252B40, 0xFD252B40, /* 220 - 223 */
-        0xFD252B40, 0xFD252740, 0xFD252740, 0xFD252740, /* 224 - 227 */
-        0xFD252340, 0xFD252340, 0xFD252340, 0xFD253340, /* 228 - 231 */
-        0xFD253340, 0xFD253340, 0xFD253340, 0xFD253340, /* 232 - 235 */
-        0xFD253340, 0xFD253340, 0xFD253340, 0xFC254340, /* 236 - 239 */
-        0xFD254340, 0xFD254340, 0xFD254344, 0xFC254348, /* 240 - 243 */
-        0xFC25434C, 0xFD2543BC, 0xFD2543C0, 0xFC2543C0, /* 244 - 247 */
-        0xFC2343C0, 0xFC2343C0, 0xFD2343C0, 0xFC2143C0, /* 248 - 251 */
-        0xFC2143C0, 0xFC2153C0, 0xFD2153C0, 0xFC2153C0  /* 252 - 255 */
-};
-
-
-u_int32_t   E1_Equalizer[256] = /* E1 Receiver Equalizer */
-{
-    0x07DE182C, 0x07DE182C, 0x07D6182C, 0x07D6182C,     /* 000 - 003 */
-    0x07D6182C, 0x07CE182C, 0x07CE182C, 0x07CE182C,     /* 004 - 007 */
-    0x07C6182C, 0x07C6182C, 0x07C6182C, 0x07BE182C,     /* 008 - 011 */
-    0x07BE182C, 0x07BE182C, 0x07BE182C, 0x07BE182C,     /* 012 - 015 */
-    0x07B6182C, 0x07B6182C, 0x07B6182C, 0x07B6182C,     /* 016 - 019 */
-    0x07B6182C, 0x07AE182C, 0x07AE182C, 0x07AE182C,     /* 020 - 023 */
-    0x07AE182C, 0x07AE182C, 0x07B618AC, 0x07AE18AC,     /* 024 - 027 */
-    0x07AE18AC, 0x07AE18AC, 0x07AE18AC, 0x07A618AC,     /* 028 - 031 */
-    0x07A618AC, 0x07A618AC, 0x07A618AC, 0x079E18AC,     /* 032 - 035 */
-    0x07A6192C, 0x07A6192C, 0x07A6192C, 0x0FA6192C,     /* 036 - 039 */
-    0x0FA6192C, 0x0F9E192C, 0x0F9E192C, 0x0F9E192C,     /* 040 - 043 */
-    0x179E192C, 0x17A619AC, 0x179E19AC, 0x179E19AC,     /* 044 - 047 */
-    0x179619AC, 0x1F9619AC, 0x1F9619AC, 0x1F8E19AC,     /* 048 - 051 */
-    0x1F8E19AC, 0x1F8E19AC, 0x278E19AC, 0x278E1A2C,     /* 052 - 055 */
-    0x278E1A2C, 0x278E1A2C, 0x278E1A2C, 0x2F861A2C,     /* 056 - 059 */
-    0x2F861A2C, 0x2F861A2C, 0x2F7E1A2C, 0x2F7E1A2C,     /* 060 - 063 */
-    0x2F7E1A2C, 0x377E1A2C, 0x377E1AAC, 0x377E1AAC,     /* 064 - 067 */
-    0x377E1AAC, 0x377E1AAC, 0x3F7E2AAC, 0x3F7E2AAC,     /* 068 - 071 */
-    0x3F762AAC, 0x3F862B2C, 0x3F7E2B2C, 0x477E2B2C,     /* 072 - 075 */
-    0x477E2F2C, 0x477E2F2C, 0x477E2F2C, 0x47762F2C,     /* 076 - 079 */
-    0x4F762F2C, 0x4F762F2C, 0x4F6E2F2C, 0x4F6E2F2C,     /* 080 - 083 */
-    0x4F6E2F2C, 0x576E2F2C, 0x576E2F2C, 0x576E3F2C,     /* 084 - 087 */
-    0x576E3F2C, 0x576E3F2C, 0x5F6E3F2C, 0x5F6E4F2C,     /* 088 - 091 */
-    0x5F6E4F2C, 0x5F6E4F2C, 0x5F664F2C, 0x67664F2C,     /* 092 - 095 */
-    0x67664F2C, 0x675E4F2C, 0x675E4F2C, 0x67664F2C,     /* 096 - 099 */
-    0x67664F2C, 0x67665F2C, 0x6F6E5F2C, 0x6F6E6F2C,     /* 100 - 103 */
-    0x6F6E6F2C, 0x6F6E7F2C, 0x6F6E7F2C, 0x6F6E7F2C,     /* 104 - 107 */
-    0x77667F2C, 0x77667F2C, 0x775E6F2C, 0x775E7F2C,     /* 108 - 111 */
-    0x775E7F2C, 0x7F5E7F2C, 0x7F5E8F2C, 0x7F5E8F2C,     /* 112 - 115 */
-    0x7F5E8F2C, 0x87568F2C, 0x87568F2C, 0x87568F2C,     /* 116 - 119 */
-    0x874E8F2C, 0x874E8F2C, 0x874E8F2C, 0x8F4E9F2C,     /* 120 - 123 */
-    0x8F4E9F2C, 0x8F4EAF2C, 0x8F4EAF2C, 0x8F4EAF2C,     /* 124 - 127 */
-    0x974EAF2C, 0x974EAF2C, 0x974EAB2C, 0x974EAB2C,     /* 128 - 131 */
-    0x974EAB2C, 0x9F4EAB2C, 0x9F4EBB2C, 0x9F4EBB2C,     /* 132 - 135 */
-    0x9F4EBB2C, 0x9F4ECB2C, 0xA74ECB2C, 0xA74ECB2C,     /* 136 - 139 */
-    0xA746CB2C, 0xA746CB2C, 0xA746CB2C, 0xA746DB2C,     /* 140 - 143 */
-    0xAF46DB2C, 0xAF46EB2C, 0xAF46EB2C, 0xAF4EEB2C,     /* 144 - 147 */
-    0xAE4EEB2C, 0xAE4EEB2C, 0xB546FB2C, 0xB554FB2C,     /* 148 - 151 */
-    0xB54CEB2C, 0xB554FB2C, 0xB554FB2C, 0xBD54FB2C,     /* 152 - 155 */
-    0xBD4CFB2C, 0xBD4CFB2C, 0xBD4CFB2C, 0xBD44EB2C,     /* 156 - 159 */
-    0xC544FB2C, 0xC544FB2C, 0xC544FB2C, 0xC5450B2C,     /* 160 - 163 */
-    0xC5450B2C, 0xC5450B2C, 0xCD450B2C, 0xCD450B2C,     /* 164 - 167 */
-    0xCD3D0B2C, 0xCD3D0B2C, 0xCD3D0B2C, 0xD53D0B2C,     /* 168 - 171 */
-    0xD53D0B2C, 0xD53D1B2C, 0xD53D1B2C, 0xD53D1B2C,     /* 172 - 175 */
-    0xDD3D1B2C, 0xDD3D1B2C, 0xDD351B2C, 0xDD351B2C,     /* 176 - 179 */
-    0xDD351B2C, 0xE5351B2C, 0xE5351B2C, 0xE52D1B2C,     /* 180 - 183 */
-    0xE52D1B2C, 0xE52D3B2C, 0xED2D4B2C, 0xED2D1BA8,     /* 184 - 187 */
-    0xED2D1BAC, 0xED2D17AC, 0xED2D17AC, 0xED2D27AC,     /* 188 - 191 */
-    0xF52D27AC, 0xF52D27AC, 0xF52D2BAC, 0xF52D2BAC,     /* 192 - 195 */
-    0xF52D2BAC, 0xFD2D2BAC, 0xFD2B2BAC, 0xFD2B2BAC,     /* 196 - 199 */
-    0xFD2B2BAC, 0xFD2B2BAC, 0xFD232BAC, 0xFD232BAC,     /* 200 - 203 */
-    0xFD232BAC, 0xFD212BAC, 0xFD212BAC, 0xFD292BAC,     /* 204 - 207 */
-    0xFD292BAC, 0xFD2927AC, 0xFD2937AC, 0xFD2923AC,     /* 208 - 211 */
-    0xFD2923AC, 0xFD2923AC, 0xFD2923AC, 0xFD2123AC,     /* 212 - 215 */
-    0xFD2123AC, 0xFD2123AC, 0xFD2133AC, 0xFD2133AC,     /* 216 - 219 */
-    0xFD2133AC, 0xFD2143AC, 0xFD2143AC, 0xFD2143AC,     /* 220 - 223 */
-    0xFC2143AC, 0xFC2143AC, 0xFC1943AC, 0xFC1943AC,     /* 224 - 227 */
-    0xFC1943AC, 0xFC1943AC, 0xFC1953AC, 0xFC1953AC,     /* 228 - 231 */
-    0xFC1953AC, 0xFC1953AC, 0xFC1963AC, 0xFC1963AC,     /* 232 - 235 */
-    0xFC1963AC, 0xFC1973AC, 0xFC1973AC, 0xFC1973AC,     /* 236 - 239 */
-    0xFC1973AC, 0xFC1973AC, 0xFC1983AC, 0xFC1983AC,     /* 240 - 243 */
-    0xFC1983AC, 0xFC1983AC, 0xFC1983AC, 0xFC1993AC,     /* 244 - 247 */
-    0xFC1993AC, 0xFC1993AC, 0xFC19A3AC, 0xFC19A3AC,     /* 248 - 251 */
-    0xFC19B3AC, 0xFC19B3AC, 0xFC19B3AC, 0xFC19B3AC      /* 252 - 255 */
-};
-
-/*** End-of-Files ***/
diff --git a/drivers/staging/cxt1e1/comet_tables.h b/drivers/staging/cxt1e1/comet_tables.h
deleted file mode 100644 (file)
index 3e2e5ba..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef _INC_COMET_TBLS_H_
-#define _INC_COMET_TBLS_H_
-
-/*-----------------------------------------------------------------------------
- * comet_tables.h - Waveform Tables for the PM4351 'COMET'
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-
-/*****************************************************************************
-*
-*  Array names:
-*
-*       TWVLongHaul0DB
-*       TWVLongHaul7_5DB
-*       TWVLongHaul15DB
-*       TWVLongHaul22_5DB
-*       TWVShortHaul0
-*       TWVShortHaul1
-*       TWVShortHaul2
-*       TWVShortHaul3
-*       TWVShortHaul4
-*       TWVShortHaul5
-*       TWV_E1_120Ohm
-*       TWV_E1_75Ohm    <not supported>
-*       T1_Equalizer
-*       E1_Equalizer
-*
-*****************************************************************************/
-
-extern u_int8_t TWVLongHaul0DB[25][5];      /* T1 Long Haul 0 DB */
-extern u_int8_t TWVLongHaul7_5DB[25][5];    /* T1 Long Haul 7.5 DB */
-extern u_int8_t TWVLongHaul15DB[25][5];     /* T1 Long Haul 15 DB */
-extern u_int8_t TWVLongHaul22_5DB[25][5];   /* T1 Long Haul 22.5 DB */
-extern u_int8_t TWVShortHaul0[25][5];       /* T1 Short Haul 0-110 ft */
-extern u_int8_t TWVShortHaul1[25][5];       /* T1 Short Haul 110-220 ft */
-extern u_int8_t TWVShortHaul2[25][5];       /* T1 Short Haul 220-330 ft */
-extern u_int8_t TWVShortHaul3[25][5];       /* T1 Short Haul 330-440 ft */
-extern u_int8_t TWVShortHaul4[25][5];       /* T1 Short Haul 440-550 ft */
-extern u_int8_t TWVShortHaul5[25][5];       /* T1 Short Haul 550-660 ft */
-extern u_int8_t TWV_E1_75Ohm[25][5];        /* E1 75 Ohm */
-extern u_int8_t TWV_E1_120Ohm[25][5];       /* E1 120 Ohm */
-extern u_int32_t T1_Equalizer[256];    /* T1 Receiver Equalizer */
-extern u_int32_t E1_Equalizer[256];    /* E1 Receiver Equalizer */
-
-#endif                          /* _INC_COMET_TBLS_H_ */
diff --git a/drivers/staging/cxt1e1/functions.c b/drivers/staging/cxt1e1/functions.c
deleted file mode 100644 (file)
index 65b6fc3..0000000
+++ /dev/null
@@ -1,318 +0,0 @@
-/* Copyright (C) 2003-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/slab.h>
-#include <linux/io.h>
-#include <asm/byteorder.h>
-#include <linux/netdevice.h>
-#include <linux/delay.h>
-#include <linux/hdlc.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4.h"
-
-
-#ifndef USE_MAX_INT_DELAY
-static int  dummy = 0;
-
-#endif
-
-extern int  drvr_state;
-
-
-#if 1
-u_int32_t
-pci_read_32(u_int32_t *p)
-{
-#ifdef FLOW_DEBUG
-       u_int32_t   v;
-
-       FLUSH_PCI_READ();
-       v = le32_to_cpu(*p);
-       if (cxt1e1_log_level >= LOG_DEBUG)
-               pr_info("pci_read : %x = %x\n", (u_int32_t) p, v);
-       return v;
-#else
-       FLUSH_PCI_READ();              /* */
-       return le32_to_cpu(*p);
-#endif
-}
-
-void
-pci_write_32(u_int32_t *p, u_int32_t v)
-{
-#ifdef FLOW_DEBUG
-       if (cxt1e1_log_level >= LOG_DEBUG)
-               pr_info("pci_write: %x = %x\n", (u_int32_t) p, v);
-#endif
-       *p = cpu_to_le32 (v);
-       FLUSH_PCI_WRITE();             /* This routine is called from routines
-                                       * which do multiple register writes
-                                       * which themselves need flushing between
-                                       * writes in order to guarantee write
-                                       * ordering.  It is less code-cumbersome
-                                       * to flush here-in then to investigate
-                                       * and code the many other register
-                                       * writing routines. */
-}
-#endif
-
-
-void
-pci_flush_write(ci_t *ci)
-{
-       volatile u_int32_t v;
-
-    /* issue a PCI read to flush PCI write thru bridge */
-       v = *(u_int32_t *) &ci->reg->glcd;  /* any address would do */
-
-    /*
-     * return nothing, this just reads PCI bridge interface to flush
-     * previously written data
-     */
-}
-
-
-static void
-watchdog_func(unsigned long arg)
-{
-       struct watchdog *wd = (void *) arg;
-
-       if (drvr_state != SBE_DRVR_AVAILABLE) {
-               if (cxt1e1_log_level >= LOG_MONITOR)
-                       pr_warning("%s: drvr not available (%x)\n",
-                                  __func__, drvr_state);
-               return;
-       }
-       schedule_work(&wd->work);
-       mod_timer(&wd->h, jiffies + wd->ticks);
-}
-
-int OS_init_watchdog(struct watchdog *wdp, void (*f) (void *),
-                    void *c, int usec)
-{
-       wdp->func = f;
-       wdp->softc = c;
-       wdp->ticks = (HZ) * (usec / 1000) / 1000;
-       INIT_WORK(&wdp->work, (void *)f);
-       init_timer(&wdp->h);
-       {
-               ci_t       *ci = (ci_t *) c;
-
-               wdp->h.data = (unsigned long) &ci->wd;
-       }
-       wdp->h.function = watchdog_func;
-       return 0;
-}
-
-void
-OS_uwait(int usec, char *description)
-{
-       int         tmp;
-
-       if (usec >= 1000) {
-               mdelay(usec / 1000);
-               /* now delay residual */
-               tmp = (usec / 1000) * 1000; /* round */
-               tmp = usec - tmp;           /* residual */
-               if (tmp) {                           /* wait on residual */
-                       udelay(tmp);
-               }
-       } else {
-               udelay(usec);
-       }
-}
-
-/* dummy short delay routine called as a subroutine so that compiler
- * does not optimize/remove its intent (a short delay)
- */
-
-void
-OS_uwait_dummy(void)
-{
-#ifndef USE_MAX_INT_DELAY
-       dummy++;
-#else
-       udelay(1);
-#endif
-}
-
-
-void
-OS_sem_init(void *sem, int state)
-{
-       switch (state) {
-       case SEM_TAKEN:
-           sema_init((struct semaphore *) sem, 0);
-           break;
-       case SEM_AVAILABLE:
-           sema_init((struct semaphore *) sem, 1);
-           break;
-       default:                        /* otherwise, set sem.count to state's
-                                       * value */
-           sema_init(sem, state);
-           break;
-       }
-}
-
-
-int
-sd_line_is_ok(void *user)
-{
-       struct net_device *ndev = (struct net_device *) user;
-
-       return netif_carrier_ok(ndev);
-}
-
-void
-sd_line_is_up(void *user)
-{
-       struct net_device *ndev = (struct net_device *) user;
-
-       netif_carrier_on(ndev);
-       return;
-}
-
-void
-sd_line_is_down(void *user)
-{
-       struct net_device *ndev = (struct net_device *) user;
-
-       netif_carrier_off(ndev);
-       return;
-}
-
-void
-sd_disable_xmit(void *user)
-{
-       struct net_device *dev = (struct net_device *) user;
-
-       netif_stop_queue(dev);
-       return;
-}
-
-void
-sd_enable_xmit(void *user)
-{
-       struct net_device *dev = (struct net_device *) user;
-
-       netif_wake_queue(dev);
-       return;
-}
-
-int
-sd_queue_stopped(void *user)
-{
-       struct net_device *ndev = (struct net_device *) user;
-
-       return netif_queue_stopped(ndev);
-}
-
-void sd_recv_consume(void *token, size_t len, void *user)
-{
-       struct net_device *ndev = user;
-       struct sk_buff *skb = token;
-
-       skb->dev = ndev;
-       skb_put(skb, len);
-       skb->protocol = hdlc_type_trans(skb, ndev);
-       netif_rx(skb);
-}
-
-
-/**
- ** Read some reserved location w/in the COMET chip as a usable
- ** VMETRO trigger point or other trace marking event.
- **/
-
-#include "comet.h"
-
-extern ci_t *CI;                /* dummy pointer to board ZERO's data */
-void
-VMETRO_TRIGGER(ci_t *ci, int x)
-{
-       struct s_comet_reg    *comet;
-       volatile u_int32_t data;
-
-       comet = ci->port[0].cometbase;  /* default to COMET # 0 */
-
-       switch (x) {
-       default:
-       case 0:
-           data = pci_read_32((u_int32_t *) &comet->__res24);     /* 0x90 */
-           break;
-       case 1:
-           data = pci_read_32((u_int32_t *) &comet->__res25);     /* 0x94 */
-           break;
-       case 2:
-           data = pci_read_32((u_int32_t *) &comet->__res26);     /* 0x98 */
-           break;
-       case 3:
-           data = pci_read_32((u_int32_t *) &comet->__res27);     /* 0x9C */
-           break;
-       case 4:
-           data = pci_read_32((u_int32_t *) &comet->__res88);     /* 0x220 */
-           break;
-       case 5:
-           data = pci_read_32((u_int32_t *) &comet->__res89);     /* 0x224 */
-           break;
-       case 6:
-           data = pci_read_32((u_int32_t *) &comet->__res8A);     /* 0x228 */
-           break;
-       case 7:
-           data = pci_read_32((u_int32_t *) &comet->__res8B);     /* 0x22C */
-           break;
-       case 8:
-           data = pci_read_32((u_int32_t *) &comet->__resA0);     /* 0x280 */
-           break;
-       case 9:
-           data = pci_read_32((u_int32_t *) &comet->__resA1);     /* 0x284 */
-           break;
-       case 10:
-           data = pci_read_32((u_int32_t *) &comet->__resA2);     /* 0x288 */
-           break;
-       case 11:
-           data = pci_read_32((u_int32_t *) &comet->__resA3);     /* 0x28C */
-           break;
-       case 12:
-           data = pci_read_32((u_int32_t *) &comet->__resA4);     /* 0x290 */
-           break;
-       case 13:
-           data = pci_read_32((u_int32_t *) &comet->__resA5);     /* 0x294 */
-           break;
-       case 14:
-           data = pci_read_32((u_int32_t *) &comet->__resA6);     /* 0x298 */
-           break;
-       case 15:
-           data = pci_read_32((u_int32_t *) &comet->__resA7);     /* 0x29C */
-           break;
-       case 16:
-           data = pci_read_32((u_int32_t *) &comet->__res74);     /* 0x1D0 */
-           break;
-       case 17:
-           data = pci_read_32((u_int32_t *) &comet->__res75);     /* 0x1D4 */
-           break;
-       case 18:
-           data = pci_read_32((u_int32_t *) &comet->__res76);     /* 0x1D8 */
-           break;
-       case 19:
-           data = pci_read_32((u_int32_t *) &comet->__res77);     /* 0x1DC */
-           break;
-       }
-}
-
-
-/***  End-of-File  ***/
diff --git a/drivers/staging/cxt1e1/hwprobe.c b/drivers/staging/cxt1e1/hwprobe.c
deleted file mode 100644 (file)
index 4fa27c8..0000000
+++ /dev/null
@@ -1,382 +0,0 @@
-/* Copyright (C) 2007  One Stop Systems
- * Copyright (C) 2003-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/netdevice.h>
-#include <linux/hdlc.h>
-#include <linux/if_arp.h>
-#include <asm/uaccess.h>
-#include <linux/rtnetlink.h>
-#include <linux/pci.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4_private.h"
-#include "pmcc4.h"
-#include "pmcc4_ioctls.h"
-#include "pmc93x6_eeprom.h"
-#ifdef CONFIG_PROC_FS
-#include "sbeproc.h"
-#endif
-
-extern int  error_flag;
-extern int  drvr_state;
-
-/* forward references */
-void        c4_stopwd(ci_t *);
-struct net_device * __init c4_add_dev(hdw_info_t *, int, unsigned long,
-                                     unsigned long, int, int);
-
-
-struct s_hdw_info hdw_info[MAX_BOARDS];
-
-
-void __init
-show_two(hdw_info_t *hi, int brdno)
-{
-       ci_t       *ci;
-       struct pci_dev *pdev;
-       char       *bid;
-       char       banner[80];
-       char    sn[6] = {0,};
-
-       ci = (ci_t *)(netdev_priv(hi->ndev));
-       bid = sbeid_get_bdname(ci);
-       switch (hi->promfmt) {
-       case PROM_FORMAT_TYPE1:
-               memcpy(sn, hi->mfg_info.pft1.Serial, 6);
-               break;
-       case PROM_FORMAT_TYPE2:
-               memcpy(sn, hi->mfg_info.pft2.Serial, 6);
-               break;
-       }
-
-       sprintf(banner, "%s: %s  S/N %06X, MUSYCC Rev %02X",
-               hi->devname, bid,
-               ((sn[3] << 16) & 0xff0000) |
-               ((sn[4] << 8) & 0x00ff00) |
-               (sn[5] & 0x0000ff),
-               (u_int8_t) hi->revid[0]);
-
-       pr_info("%s\n", banner);
-
-       pdev = hi->pdev[0];
-       pr_info("%s: %s at v/p=%lx/%lx (%02x:%02x.%x) irq %d\n",
-               hi->devname, "MUSYCC",
-               (unsigned long) hi->addr_mapped[0], hi->addr[0],
-               hi->pci_busno, (u_int8_t) PCI_SLOT(pdev->devfn),
-               (u_int8_t) PCI_FUNC(pdev->devfn), pdev->irq);
-
-       pdev = hi->pdev[1];
-       pr_info("%s: %s at v/p=%lx/%lx (%02x:%02x.%x) irq %d\n",
-               hi->devname, "EBUS  ",
-               (unsigned long) hi->addr_mapped[1], hi->addr[1],
-               hi->pci_busno, (u_int8_t) PCI_SLOT(pdev->devfn),
-               (u_int8_t) PCI_FUNC(pdev->devfn), pdev->irq);
-}
-
-
-void __init
-hdw_sn_get(hdw_info_t *hi, int brdno)
-{
-       /* obtain hardware EEPROM information */
-       long        addr;
-
-       addr = (long) hi->addr_mapped[1] + EEPROM_OFFSET;
-
-       /* read EEPROM with largest known format size... */
-       pmc_eeprom_read_buffer(addr, 0, (char *)hi->mfg_info.data,
-                              sizeof(FLD_TYPE2));
-
-#if 0
-       {
-               unsigned char *ucp = (unsigned char *) &hi->mfg_info.data;
-
-               pr_info("eeprom[00]:  %02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       *(ucp + 0), *(ucp + 1), *(ucp + 2), *(ucp + 3),
-                       *(ucp + 4), *(ucp + 5), *(ucp + 6), *(ucp + 7));
-               pr_info("eeprom[08]:  %02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       *(ucp + 8), *(ucp + 9), *(ucp + 10), *(ucp + 11),
-                       *(ucp + 12), *(ucp + 13), *(ucp + 14), *(ucp + 15));
-               pr_info("eeprom[16]:  %02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       *(ucp + 16), *(ucp + 17), *(ucp + 18), *(ucp + 19),
-                       *(ucp + 20), *(ucp + 21), *(ucp + 22), *(ucp + 23));
-               pr_info("eeprom[24]:  %02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       *(ucp + 24), *(ucp + 25), *(ucp + 26), *(ucp + 27),
-                       *(ucp + 28), *(ucp + 29), *(ucp + 30), *(ucp + 31));
-               pr_info("eeprom[32]:  %02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       *(ucp + 32), *(ucp + 33), *(ucp + 34), *(ucp + 35),
-                       *(ucp + 36), *(ucp + 37), *(ucp + 38), *(ucp + 39));
-               pr_info("eeprom[40]:  %02x %02x %02x %02x  %02x %02x %02x %02x\n",
-                       *(ucp + 40), *(ucp + 41), *(ucp + 42), *(ucp + 43),
-                       *(ucp + 44), *(ucp + 45), *(ucp + 46), *(ucp + 47));
-       }
-#endif
-#if 0
-       pr_info("sn: %x %x %x %x %x %x\n",
-                       hi->mfg_info.Serial[0],
-                       hi->mfg_info.Serial[1],
-                       hi->mfg_info.Serial[2],
-                       hi->mfg_info.Serial[3],
-                       hi->mfg_info.Serial[4],
-                       hi->mfg_info.Serial[5]);
-#endif
-
-       hi->promfmt = pmc_verify_cksum(&hi->mfg_info.data);
-       if (hi->promfmt == PROM_FORMAT_Unk) {
-               /* bad crc, data is suspect */
-               if (cxt1e1_log_level >= LOG_WARN)
-                       pr_info("%s: EEPROM cksum error\n", hi->devname);
-               hi->mfg_info_sts = EEPROM_CRCERR;
-       } else
-               hi->mfg_info_sts = EEPROM_OK;
-}
-
-
-       void __init
-prep_hdw_info(void)
-{
-       hdw_info_t *hi;
-       int         i;
-
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               hi->pci_busno = 0xff;
-               hi->pci_slot = 0xff;
-               hi->pci_pin[0] = 0;
-               hi->pci_pin[1] = 0;
-               hi->ndev = NULL;
-               hi->addr[0] = 0L;
-               hi->addr[1] = 0L;
-               hi->addr_mapped[0] = NULL;
-               hi->addr_mapped[1] = NULL;
-       }
-}
-
-void
-cleanup_ioremap(void)
-{
-       hdw_info_t *hi;
-       int         i;
-
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               if (hi->pci_slot == 0xff)
-                       break;
-               if (hi->addr_mapped[0]) {
-                       iounmap(hi->addr_mapped[0]);
-                       release_mem_region((long) hi->addr[0], hi->len[0]);
-                       hi->addr_mapped[0] = NULL;
-               }
-               if (hi->addr_mapped[1]) {
-                       iounmap(hi->addr_mapped[1]);
-                       release_mem_region((long) hi->addr[1], hi->len[1]);
-                       hi->addr_mapped[1] = NULL;
-               }
-       }
-}
-
-
-void
-cleanup_devs(void)
-{
-       hdw_info_t *hi;
-       int         i;
-
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               if (hi->pci_slot == 0xff || !hi->ndev)
-                       break;
-               c4_stopwd(netdev_priv(hi->ndev));
-#ifdef CONFIG_PROC_FS
-               sbecom_proc_brd_cleanup(netdev_priv(hi->ndev));
-#endif
-               unregister_netdev(hi->ndev);
-               free_irq(hi->pdev[0]->irq, hi->ndev);
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-               free_irq(hi->pdev[1]->irq, hi->ndev);
-#endif
-               kfree(hi->ndev);
-       }
-}
-
-
-static int  __init
-c4_hdw_init(struct pci_dev *pdev, int found)
-{
-       hdw_info_t *hi;
-       int         i;
-       int         fun, slot;
-       unsigned char busno = 0xff;
-
-       /* our MUSYCC chip supports two functions, 0 & 1 */
-       fun = PCI_FUNC(pdev->devfn);
-       if (fun > 1) {
-               pr_warning("unexpected devfun: 0x%x\n", pdev->devfn);
-               return 0;
-       }
-
-       /* obtain bus number */
-       if (pdev->bus)
-               busno = pdev->bus->number;
-       else
-               busno = 0; /* default for system PCI inconsistency */
-       slot = pdev->devfn & ~0x07;
-
-       /*
-        * Functions 0 & 1 for a given board (identified by same bus(busno) and
-        * slot(slot)) are placed into the same 'hardware' structure.  The first
-        * part of the board's functionality will be placed into an unpopulated
-        * element, identified by "slot==(0xff)".  The second part of a board's
-        * functionality will match the previously loaded slot/busno.
-        */
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               /*
-                * match with board's first found interface, otherwise this is
-                * fisrt found
-                */
-               if ((hi->pci_slot == 0xff) ||   /* new board */
-                   ((hi->pci_slot == slot) && (hi->bus == pdev->bus)))
-                       break;                  /* found for-loop exit */
-       }
-
-       /* no match in above loop means MAX exceeded */
-       if (i == MAX_BOARDS) {
-               pr_warning("exceeded number of allowed devices (>%d)?\n",
-                          MAX_BOARDS);
-               return 0;
-       }
-
-       if (pdev->bus)
-               hi->pci_busno = pdev->bus->number;
-       else
-               hi->pci_busno = 0; /* default for system PCI inconsistency */
-
-       hi->pci_slot = slot;
-       pci_read_config_byte(pdev, PCI_INTERRUPT_PIN, &hi->pci_pin[fun]);
-       pci_read_config_byte(pdev, PCI_REVISION_ID, &hi->revid[fun]);
-       hi->bus = pdev->bus;
-       hi->addr[fun] = pci_resource_start(pdev, 0);
-       hi->len[fun] = pci_resource_end(pdev, 0) - hi->addr[fun] + 1;
-       hi->pdev[fun] = pdev;
-
-       {
-               /*
-                * create device name from module name, plus add the appropriate
-                * board number
-                */
-               char       *cp = hi->devname;
-
-               strcpy(cp, KBUILD_MODNAME);
-               cp += strlen(cp);          /* reposition */
-               *cp++ = '-';
-               *cp++ = '0' + (found / 2);  /* there are two found interfaces per
-               * board */
-               *cp = 0;                    /* termination */
-       }
-
-       return 1;
-}
-
-status_t __init
-c4hw_attach_all(void)
-{
-       hdw_info_t *hi;
-       struct pci_dev *pdev = NULL;
-       int         found = 0, i, j;
-
-       error_flag = 0;
-       prep_hdw_info();
-       /*** scan PCI bus for all possible boards */
-       while ((pdev = pci_get_device(PCI_VENDOR_ID_CONEXANT,
-                                     PCI_DEVICE_ID_CN8474,
-                                     pdev))) {
-               if (c4_hdw_init(pdev, found))
-                       found++;
-       }
-
-       if (!found) {
-               pr_warning("No boards found\n");
-               return -ENODEV;
-       }
-
-       /* sanity check for consistent hardware found */
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               if (hi->pci_slot != 0xff && (!hi->addr[0] || !hi->addr[1])) {
-                       pr_warning("%s: something very wrong with pci_get_device\n",
-                                  hi->devname);
-                       return -EIO;
-               }
-       }
-       /* bring board's memory regions on/line */
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               if (hi->pci_slot == 0xff)
-                       break;
-               for (j = 0; j < 2; j++) {
-                       if (!request_mem_region(hi->addr[j], hi->len[j], hi->devname)) {
-                               pr_warning("%s: memory in use, addr=0x%lx, len=0x%lx ?\n",
-                                          hi->devname, hi->addr[j], hi->len[j]);
-                               cleanup_ioremap();
-                               return -ENOMEM;
-                       }
-
-                       hi->addr_mapped[j] = ioremap(hi->addr[j], hi->len[j]);
-                       if (!hi->addr_mapped[j]) {
-                               pr_warning("%s: ioremap fails, addr=0x%lx, len=0x%lx ?\n",
-                                          hi->devname, hi->addr[j], hi->len[j]);
-                               cleanup_ioremap();
-                               return -ENOMEM;
-                       }
-#ifdef SBE_MAP_DEBUG
-                       pr_warning("%s: io remapped from phys %x to virt %x\n",
-                                  hi->devname, (u_int32_t) hi->addr[j],
-                                  (u_int32_t) hi->addr_mapped[j]);
-#endif
-               }
-       }
-
-       drvr_state = SBE_DRVR_AVAILABLE;
-
-       /* Have now memory mapped all boards.  Now allow board's access to system */
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               if (hi->pci_slot == 0xff)
-                       break;
-               if (pci_enable_device(hi->pdev[0]) ||
-                   pci_enable_device(hi->pdev[1])) {
-                       drvr_state = SBE_DRVR_DOWN;
-                       pr_warning("%s: failed to enable card %d slot %d\n",
-                                  hi->devname, i, hi->pci_slot);
-                       cleanup_devs();
-                       cleanup_ioremap();
-                       return -EIO;
-               }
-               pci_set_master(hi->pdev[0]);
-               pci_set_master(hi->pdev[1]);
-               hi->ndev = c4_add_dev(hi, i, (long) hi->addr_mapped[0],
-                                     (long) hi->addr_mapped[1],
-                                     hi->pdev[0]->irq,
-                                     hi->pdev[1]->irq);
-               if (!hi->ndev) {
-                       drvr_state = SBE_DRVR_DOWN;
-                       cleanup_ioremap();
-                       /* NOTE: c4_add_dev() does its own device cleanup */
-#if 0
-                       cleanup_devs();
-#endif
-                       return error_flag; /* error_flag set w/in add_dev() */
-               }
-               show_two(hi, i); /* displays found information */
-       }
-       return 0;
-}
-
-/***  End-of-File  ***/
diff --git a/drivers/staging/cxt1e1/libsbew.h b/drivers/staging/cxt1e1/libsbew.h
deleted file mode 100644 (file)
index bd2bfba..0000000
+++ /dev/null
@@ -1,549 +0,0 @@
-#ifndef _INC_LIBSBEW_H_
-#define _INC_LIBSBEW_H_
-
-/*-----------------------------------------------------------------------------
- * libsbew.h - common library elements, charge across mulitple boards
- *
- *   This file contains common Ioctl structures and contents definitions.
- *
- * Copyright (C) 2004-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-/********************************/
-/**  set driver logging level  **/
-/********************************/
-
-/* routine/ioctl: wancfg_set_loglevel() - SBE_IOC_SET_LOGLEVEL */
-
-#define LOG_NONE          0
-#define LOG_ERROR         1
-#define LOG_SBEBUG3       3     /* hidden, for development/debug usage */
-#define LOG_LSCHANGE      5     /* line state change logging */
-#define LOG_LSIMMEDIATE   6     /* line state change logging w/o hysterisis */
-#define LOG_WARN          8
-#define LOG_MONITOR      10
-#define LOG_SBEBUG12     12     /* hidden, for development/debug usage */
-#define LOG_MONITOR2     14     /* hidden, for development/debug usage */
-#define LOG_DEBUG        16
-
-    /* TEMPORARY DEFINES *//* RLD DEBUG */
-#define c4_LOG_NONE      LOG_NONE
-#define c4_LOG_ERROR     LOG_ERROR
-#define c4_LOG_WARN      LOG_WARN
-#define c4_LOG_sTrace    LOG_MONITOR    /* do some trace logging into
-                                         * functions */
-#define c4_LOG_DEBUG     LOG_DEBUG
-#define c4_LOG_MAX       LOG_DEBUG
-
-
-
-/******************************/
-/**  get driver information  **/
-/******************************/
-
-/* routine/ioctl: wancfg_get_drvinfo() - SBE_IOC_GET_DRVINFO */
-
-#define REL_STRLEN   80
-    struct sbe_drv_info
-    {
-        int         rel_strlen;
-        char        release[REL_STRLEN];
-    };
-
-
-/*****************************/
-/**  get board information  **/
-/*****************************/
-
-/* routine/ioctl: wancfg_get_brdinfo() - SBE_IOC_GET_BRDINFO */
-
-#define CHNM_STRLEN   16
-    struct sbe_brd_info
-    {
-        u_int32_t brd_id;       /* SBE's unique PCI VENDOR/DEVID */
-        u_int32_t   brd_sn;
-        int         brd_chan_cnt;       /* number of channels being used */
-        int         brd_port_cnt;       /* number of ports being used */
-        unsigned char brdno;    /* our board number */
-        unsigned char brd_pci_speed;    /* PCI speed, 33/66Mhz */
-                    u_int8_t brd_mac_addr[6];
-        char        first_iname[CHNM_STRLEN];   /* first assigned channel's
-                                                 * interface name */
-        char        last_iname[CHNM_STRLEN];    /* last assigned channel's
-                                                 * interface name */
-        u_int8_t    brd_hdw_id; /* on/board unique hdw ID */
-        u_int8_t    reserved8[3];       /* alignment preservation */
-        u_int32_t   reserved32[3];      /* size preservation */
-    };
-
-/* These IDs are sometimes available thru pci_ids.h, but not currently. */
-
-#define PCI_VENDOR_ID_SBE              0x1176
-#define PCI_DEVICE_ID_WANPMC_C4T1E1    0x0701   /* BID 0x0X, BTYP 0x0X */
-#define PCI_DEVICE_ID_WANPTMC_C4T1E1   0x0702   /* BID 0x41 */
-#define PCI_DEVICE_ID_WANADAPT_HC4T1E1 0x0703   /* BID 0x44 */
-#define PCI_DEVICE_ID_WANPTMC_256T3_T1 0x0704   /* BID 0x42 (T1 Version) */
-#define PCI_DEVICE_ID_WANPCI_C4T1E1    0x0705   /* BID 0x1X, BTYP 0x0X */
-#define PCI_DEVICE_ID_WANPMC_C1T3      0x0706   /* BID 0x45 */
-#define PCI_DEVICE_ID_WANPCI_C2T1E1    0x0707   /* BID 0x1X, BTYP 0x2X */
-#define PCI_DEVICE_ID_WANPCI_C1T1E1    0x0708   /* BID 0x1X, BTYP 0x1X */
-#define PCI_DEVICE_ID_WANPMC_C2T1E1    0x0709   /* BID 0x0X, BTYP 0x2X */
-#define PCI_DEVICE_ID_WANPMC_C1T1E1    0x070A   /* BID 0x0X, BTYP 0x1X */
-#define PCI_DEVICE_ID_WANPTMC_256T3_E1 0x070B   /* BID 0x46 (E1 Version) */
-#define PCI_DEVICE_ID_WANPTMC_C24TE1   0x070C   /* BID 0x47 */
-#define PCI_DEVICE_ID_WANPMC_C4T1E1_L  0x070D   /* BID 0x2X, BTYPE 0x0X w/FP
-                                                 * LEDs */
-#define PCI_DEVICE_ID_WANPMC_C2T1E1_L  0x070E   /* BID 0x2X, BTYPE 0x2X w/FP
-                                                 * LEDs */
-#define PCI_DEVICE_ID_WANPMC_C1T1E1_L  0x070F   /* BID 0x2X, BTYPE 0x1X w/FP
-                                                 * LEDs */
-#define PCI_DEVICE_ID_WANPMC_2SSI      0x0801
-#define PCI_DEVICE_ID_WANPCI_4SSI      0x0802
-#define PCI_DEVICE_ID_WANPMC_2T3E3     0x0900   /* BID 0x43 */
-#define SBE_BOARD_ID(v,id)           ((v<<16) | id)
-
-#define BINFO_PCI_SPEED_unk     0
-#define BINFO_PCI_SPEED_33      1
-#define BINFO_PCI_SPEED_66      2
-
-/***************************/
-/**  obtain interface ID  **/
-/***************************/
-
-/* routine/ioctl: wancfg_get_iid() - SBE_IOC_IID_GET */
-
-    struct sbe_iid_info
-    {
-        u_int32_t   channum;    /* channel requested */
-        char        iname[CHNM_STRLEN]; /* channel's interface name */
-    };
-
-/**************************************/
-/**  get board address information  **/
-/**************************************/
-
-/* routine/ioctl: wancfg_get_brdaddr() - SBE_IOC_BRDADDR_GET */
-
-    struct sbe_brd_addr
-    {
-        unsigned char func;     /* select PCI address space function */
-        unsigned char brdno;    /* returns brdno requested */
-        unsigned char irq;
-        unsigned char size;     /* returns size of address */
-#define BRDADDR_SIZE_64  1
-#define BRDADDR_SIZE_32  2
-        int         reserved1;  /* mod64 align, reserved for future use */
-
-        union
-        {
-            unsigned long virt64;       /* virtual/mapped address */
-            u_int32_t   virt32[2];
-        }           v;
-        union
-        {
-            unsigned long phys64;       /* physical bus address */
-            u_int32_t   phys32[2];
-        }           p;
-        int         reserved2[4];       /* reserved for future use */
-    };
-
-/**********************************/
-/**  read/write board registers  **/
-/**********************************/
-
-/* routine/ioctl: wancfg_read_vec() - SBE_IOC_READ_VEC */
-/* routine/ioctl: wancfg_write_vec() - SBE_IOC_WRITE_VEC */
-
-    struct sbecom_wrt_vec
-    {
-        u_int32_t   reg;
-        u_int32_t   data;
-    };
-
-#define C1T3_CHIP_MSCC_32        0x01000000
-#define C1T3_CHIP_TECT3_8        0x02000000
-#define C1T3_CHIP_CPLD_8         0x03000000
-#define C1T3_CHIP_EEPROM_8       0x04000000
-
-#define W256T3_CHIP_MUSYCC_32    0x02000000
-#define W256T3_CHIP_TEMUX_8      0x10000000
-#define W256T3_CHIP_T8110_8      0x20000000
-#define W256T3_CHIP_T8110_32     0x22000000
-#define W256T3_CHIP_CPLD_8       0x30000000
-#define W256T3_CHIP_EEPROM_8     0x40000000
-
-
-/**********************************/
-/**  read write port parameters  **/
-/**********************************/
-
-/* routine/ioctl: wancfg_getset_port_param() - SBE_IOC_PORT_GET */
-/* routine/ioctl: wancfg_set_port_param() - SBE_IOC_PORT_SET */
-
-/* NOTE: this structure supports hardware which supports individual per/port control */
-
-struct sbecom_port_param
-{
-    u_int8_t    portnum;
-    u_int8_t    port_mode;           /* variations of T1 or E1 mode */
-    u_int8_t    portStatus;
-    u_int8_t    portP;          /* more port parameters (clock source - 0x80;
-                                 * and LBO - 0xf; */
-                                /* bits 0x70 are reserved for future use ) */
-#ifdef SBE_PMCC4_ENABLE
-       u_int32_t   hypersize;  /* RLD DEBUG - add this in until I learn how to make this entry obsolete */
-#endif
-    int         reserved[3-1];    /* reserved for future use */
-    int    _res[4];
-};
-
-#define CFG_CLK_PORT_MASK      0x80     /* Loop timing */
-#define CFG_CLK_PORT_INTERNAL  0x80     /* Loop timing */
-#define CFG_CLK_PORT_EXTERNAL  0x00     /* Loop timing */
-
-#define CFG_LBO_MASK      0x0F
-#define CFG_LBO_unk       0     /* <not defined> */
-#define CFG_LBO_LH0       1     /* T1 Long Haul (default) */
-#define CFG_LBO_LH7_5     2     /* T1 Long Haul */
-#define CFG_LBO_LH15      3     /* T1 Long Haul */
-#define CFG_LBO_LH22_5    4     /* T1 Long Haul */
-#define CFG_LBO_SH110     5     /* T1 Short Haul */
-#define CFG_LBO_SH220     6     /* T1 Short Haul */
-#define CFG_LBO_SH330     7     /* T1 Short Haul */
-#define CFG_LBO_SH440     8     /* T1 Short Haul */
-#define CFG_LBO_SH550     9     /* T1 Short Haul */
-#define CFG_LBO_SH660     10    /* T1 Short Haul */
-#define CFG_LBO_E75       11    /* E1 75 Ohm */
-#define CFG_LBO_E120      12    /* E1 120 Ohm (default) */
-
-
-/*************************************/
-/**  read write channel parameters  **/
-/*************************************/
-
-/* routine/ioctl: wancfg_getset_chan_param() - SBE_IOC_CHAN_GET */
-/* routine/ioctl: wancfg_set_chan_param() - SBE_IOC_CHAN_SET */
-
-/* NOTE: this structure supports hardware which supports individual per/channel control */
-
-    struct sbecom_chan_param
-    {
-        u_int32_t   channum;    /* 0: */
-#ifdef SBE_PMCC4_ENABLE
-       u_int32_t   card;  /* RLD DEBUG - add this in until I learn how to make this entry obsolete */
-       u_int32_t   port;  /* RLD DEBUG - add this in until I learn how to make this entry obsolete */
-       u_int8_t bitmask[32];
-#endif
-        u_int32_t   intr_mask;  /* 4: interrupt mask, specify ored
-                                 * (SS7_)INTR_* to disable */
-        u_int8_t    status;     /* 8: channel transceiver status (TX_ENABLED,
-                                 * RX_ENABLED) */
-        u_int8_t    chan_mode;  /* 9: protocol mode */
-        u_int8_t    idlecode;   /* A: idle code, in (FLAG_7E, FLAG_FF,
-                                 * FLAG_00) */
-        u_int8_t    pad_fill_count;     /* B: pad fill count (1-127), 0 - pad
-                                         * fill disabled */
-        u_int8_t    data_inv;   /* C: channel data inversion selection */
-        u_int8_t    mode_56k;   /* D: 56kbps mode */
-        u_int8_t    reserved[2 + 8];    /* E: */
-    };
-
-/* SS7 interrupt signals <intr_mask> */
-#define SS7_INTR_SFILT      0x00000020
-#define SS7_INTR_SDEC       0x00000040
-#define SS7_INTR_SINC       0x00000080
-#define SS7_INTR_SUERR      0x00000100
-/* Other interrupts that can be masked */
-#define INTR_BUFF           0x00000002
-#define INTR_EOM            0x00000004
-#define INTR_MSG            0x00000008
-#define INTR_IDLE           0x00000010
-
-/* transceiver status flags <status> */
-#define TX_ENABLED          0x01
-#define RX_ENABLED          0x02
-
-/* Protocol modes <mode> */
-#define CFG_CH_PROTO_TRANS         0
-#define CFG_CH_PROTO_SS7           1
-#define CFG_CH_PROTO_HDLC_FCS16    2
-#define CFG_CH_PROTO_HDLC_FCS32    3
-#define CFG_CH_PROTO_ISLP_MODE     4
-
-/* Possible idle code assignments <idlecode> */
-#define CFG_CH_FLAG_7E      0
-#define CFG_CH_FLAG_FF      1
-#define CFG_CH_FLAG_00      2
-
-/* data inversion selection <data_inv> */
-#define CFG_CH_DINV_NONE    0x00
-#define CFG_CH_DINV_RX      0x01
-#define CFG_CH_DINV_TX      0x02
-
-
-/* Possible resettable chipsets/functions */
-#define RESET_DEV_TEMUX     1
-#define RESET_DEV_TECT3     RESET_DEV_TEMUX
-#define RESET_DEV_PLL       2
-
-
-/*********************************************/
-/**  read reset channel thruput statistics  **/
-/*********************************************/
-
-/* routine/ioctl: wancfg_get_chan_stats() - SBE_IOC_CHAN_GET_STAT */
-/* routine/ioctl: wancfg_del_chan_stats() - SBE_IOC_CHAN_DEL_STAT */
-/* routine/ioctl: wancfg_get_card_chan_stats() - SBE_IOC_CARD_CHAN_STAT */
-
-    struct sbecom_chan_stats
-    {
-        unsigned long rx_packets;       /* total packets received       */
-        unsigned long tx_packets;       /* total packets transmitted    */
-        unsigned long rx_bytes; /* total bytes received         */
-        unsigned long tx_bytes; /* total bytes transmitted      */
-        unsigned long rx_errors;/* bad packets received         */
-        unsigned long tx_errors;/* packet transmit problems     */
-        unsigned long rx_dropped;       /* no space in linux buffers    */
-        unsigned long tx_dropped;       /* no space available in linux  */
-
-        /* detailed rx_errors: */
-        unsigned long rx_length_errors;
-        unsigned long rx_over_errors;   /* receiver ring buff overflow  */
-        unsigned long rx_crc_errors;    /* recved pkt with crc error    */
-        unsigned long rx_frame_errors;  /* recv'd frame alignment error */
-        unsigned long rx_fifo_errors;   /* recv'r fifo overrun          */
-        unsigned long rx_missed_errors; /* receiver missed packet       */
-
-        /* detailed tx_errors */
-        unsigned long tx_aborted_errors;
-        unsigned long tx_fifo_errors;
-        unsigned long tx_pending;
-    };
-
-
-/****************************************/
-/**  read write card level parameters  **/
-/****************************************/
-
- /* NOTE: this structure supports hardware which supports per/card control */
-
-    struct sbecom_card_param
-    {
-        u_int8_t    framing_type;       /* 0: CBP or M13 */
-        u_int8_t    loopback;   /* 1: one of LOOPBACK_* */
-        u_int8_t    line_build_out;     /* 2: boolean */
-        u_int8_t    receive_eq; /* 3: boolean */
-        u_int8_t    transmit_ones;      /* 4: boolean */
-        u_int8_t    clock;      /* 5: 0 - internal, i>0 - external (recovered
-                                 * from framer i) */
-        u_int8_t    h110enable; /* 6: */
-        u_int8_t    disable_leds;       /* 7: */
-        u_int8_t    reserved1;  /* 8: available - old 256t3 hypersized, but
-                                 * never used */
-        u_int8_t    rear_io;    /* 9: rear I/O off/on */
-        u_int8_t    disable_tx; /* A: disable TX off/on */
-        u_int8_t    mute_los;   /* B: mute LOS off/on */
-        u_int8_t    los_threshold;      /* C: LOS threshold norm/low
-                                         * (default: norm) */
-        u_int8_t    ds1_mode;   /* D: DS1 mode T1/E1 (default: T1) */
-        u_int8_t    ds3_unchan; /* E: DS3 unchannelized mode off/on */
-        u_int8_t    reserved[1 + 16];   /* reserved for expansion - must be
-                                         * ZERO filled */
-    };
-
-/* framing types <framing_type> */
-#define FRAMING_M13                0
-#define FRAMING_CBP                1
-
-/* card level loopback options <loopback> */
-#define CFG_CARD_LOOPBACK_NONE     0x00
-#define CFG_CARD_LOOPBACK_DIAG     0x01
-#define CFG_CARD_LOOPBACK_LINE     0x02
-#define CFG_CARD_LOOPBACK_PAYLOAD  0x03
-
-/* line level loopback options <loopback> */
-#define CFG_LIU_LOOPBACK_NONE      0x00
-#define CFG_LIU_LOOPBACK_ANALOG    0x10
-#define CFG_LIU_LOOPBACK_DIGITAL   0x11
-#define CFG_LIU_LOOPBACK_REMOTE    0x12
-
-/* card level clock options <clock> */
-#define CFG_CLK_INTERNAL           0x00
-#define CFG_CLK_EXTERNAL           0x01
-
-/* legacy 256T3 loopback values */
-#define LOOPBACK_NONE              0
-#define LOOPBACK_LIU_ANALOG        1
-#define LOOPBACK_LIU_DIGITAL       2
-#define LOOPBACK_FRAMER_DS3        3
-#define LOOPBACK_FRAMER_T1         4
-#define LOOPBACK_LIU_REMOTE        5
-
-/* DS1 mode <ds1_mode> */
-#define CFG_DS1_MODE_MASK          0x0f
-#define CFG_DS1_MODE_T1            0x00
-#define CFG_DS1_MODE_E1            0x01
-#define CFG_DS1_MODE_CHANGE        0x80
-
-/* DS3 unchannelized values <ds1_unchan> */
-#define CFG_DS3_UNCHAN_MASK        0x01
-#define CFG_DS3_UNCHAN_OFF         0x00
-#define CFG_DS3_UNCHAN_ON          0x01
-
-
-/************************************/
-/**  read write framer parameters  **/
-/************************************/
-
-/* routine/ioctl: wancfg_get_framer() - SBE_IOC_FRAMER_GET */
-/* routine/ioctl: wancfg_set_framer() - SBE_IOC_FRAMER_SET */
-
-    struct sbecom_framer_param
-    {
-        u_int8_t    framer_num;
-        u_int8_t    frame_type; /* SF, ESF, E1PLAIN, E1CAS, E1CRC, E1CRC+CAS */
-        u_int8_t    loopback_type;      /* DIGITAL, LINE, PAYLOAD */
-        u_int8_t    auto_alarms;/* auto alarms */
-        u_int8_t    reserved[12];       /* reserved for expansion - must be
-                                         * ZERO filled */
-    };
-
-/* frame types <frame_type> */
-#define CFG_FRAME_NONE             0
-#define CFG_FRAME_SF               1    /* T1 B8ZS */
-#define CFG_FRAME_ESF              2    /* T1 B8ZS */
-#define CFG_FRAME_E1PLAIN          3    /* HDB3 w/o CAS,CRC */
-#define CFG_FRAME_E1CAS            4    /* HDB3 */
-#define CFG_FRAME_E1CRC            5    /* HDB3 */
-#define CFG_FRAME_E1CRC_CAS        6    /* HDB3 */
-#define CFG_FRAME_SF_AMI           7    /* T1 AMI */
-#define CFG_FRAME_ESF_AMI          8    /* T1 AMI */
-#define CFG_FRAME_E1PLAIN_AMI      9    /* E1 AMI w/o CAS,CRC */
-#define CFG_FRAME_E1CAS_AMI       10    /* E1 AMI */
-#define CFG_FRAME_E1CRC_AMI       11    /* E1 AMI */
-#define CFG_FRAME_E1CRC_CAS_AMI   12    /* E1 AMI */
-
-#define IS_FRAME_ANY_T1(field) \
-                    (((field) == CFG_FRAME_NONE) || \
-                     ((field) == CFG_FRAME_SF)   || \
-                     ((field) == CFG_FRAME_ESF)  || \
-                     ((field) == CFG_FRAME_SF_AMI) || \
-                     ((field) == CFG_FRAME_ESF_AMI))
-
-#define IS_FRAME_ANY_T1ESF(field) \
-                    (((field) == CFG_FRAME_ESF) || \
-                     ((field) == CFG_FRAME_ESF_AMI))
-
-#define IS_FRAME_ANY_E1(field) \
-                    (((field) == CFG_FRAME_E1PLAIN) || \
-                     ((field) == CFG_FRAME_E1CAS)   || \
-                     ((field) == CFG_FRAME_E1CRC)   || \
-                     ((field) == CFG_FRAME_E1CRC_CAS) || \
-                     ((field) == CFG_FRAME_E1PLAIN_AMI) || \
-                     ((field) == CFG_FRAME_E1CAS_AMI) || \
-                     ((field) == CFG_FRAME_E1CRC_AMI) || \
-                     ((field) == CFG_FRAME_E1CRC_CAS_AMI))
-
-#define IS_FRAME_ANY_AMI(field) \
-                    (((field) == CFG_FRAME_SF_AMI) || \
-                     ((field) == CFG_FRAME_ESF_AMI) || \
-                     ((field) == CFG_FRAME_E1PLAIN_AMI) || \
-                     ((field) == CFG_FRAME_E1CAS_AMI) || \
-                     ((field) == CFG_FRAME_E1CRC_AMI) || \
-                     ((field) == CFG_FRAME_E1CRC_CAS_AMI))
-
-/* frame level loopback options <loopback_type> */
-#define CFG_FRMR_LOOPBACK_NONE     0
-#define CFG_FRMR_LOOPBACK_DIAG     1
-#define CFG_FRMR_LOOPBACK_LINE     2
-#define CFG_FRMR_LOOPBACK_PAYLOAD  3
-
-
-/****************************************/
-/**  read reset card error statistics  **/
-/****************************************/
-
-/* routine/ioctl: wancfg_get_card_stats() - SBE_IOC_CARD_GET_STAT */
-/* routine/ioctl: wancfg_del_card_stats() - SBE_IOC_CARD_DEL_STAT */
-
-    struct temux_card_stats
-    {
-        struct temux_stats
-        {
-            /* TEMUX DS3 PMON counters */
-            u_int32_t   lcv;
-            u_int32_t   err_framing;
-            u_int32_t   febe;
-            u_int32_t   err_cpbit;
-            u_int32_t   err_parity;
-            /* TEMUX DS3 FRMR status */
-            u_int8_t    los;
-            u_int8_t    oof;
-            u_int8_t    red;
-            u_int8_t    yellow;
-            u_int8_t    idle;
-            u_int8_t    ais;
-            u_int8_t    cbit;
-            /* TEMUX DS3 FEAC receiver */
-            u_int8_t    feac;
-            u_int8_t    feac_last;
-        }           t;
-        u_int32_t   tx_pending; /* total */
-    };
-
-/**************************************************************/
-
-    struct wancfg
-    {
-        int         cs, ds;
-        char       *p;
-    };
-    typedef struct wancfg wcfg_t;
-
-    extern wcfg_t *wancfg_init(char *, char *);
-    extern int wancfg_card_blink(wcfg_t *, int);
-    extern int wancfg_ctl(wcfg_t *, int, void *, int, void *, int);
-    extern int wancfg_del_card_stats(wcfg_t *);
-    extern int wancfg_del_chan_stats(wcfg_t *, int);
-    extern int wancfg_enable_ports(wcfg_t *, int);
-    extern int wancfg_free(wcfg_t *);
-    extern int wancfg_get_brdaddr(wcfg_t *, struct sbe_brd_addr *);
-    extern int wancfg_get_brdinfo(wcfg_t *, struct sbe_brd_info *);
-    extern int wancfg_get_card(wcfg_t *, struct sbecom_card_param *);
-    extern int wancfg_get_card_chan_stats(wcfg_t *, struct sbecom_chan_stats *);
-    extern int wancfg_get_card_sn(wcfg_t *);
-    extern int wancfg_get_card_stats(wcfg_t *, struct temux_card_stats *);
-    extern int wancfg_get_chan(wcfg_t *, int, struct sbecom_chan_param *);
-    extern int wancfg_get_chan_stats(wcfg_t *, int, struct sbecom_chan_stats *);
-    extern int wancfg_get_drvinfo(wcfg_t *, int, struct sbe_drv_info *);
-    extern int wancfg_get_framer(wcfg_t *, int, struct sbecom_framer_param *);
-    extern int wancfg_get_iid(wcfg_t *, int, struct sbe_iid_info *);
-    extern int wancfg_get_sn(wcfg_t *, unsigned int *);
-    extern int wancfg_read(wcfg_t *, int, struct sbecom_wrt_vec *);
-    extern int wancfg_reset_device(wcfg_t *, int);
-    extern int wancfg_set_card(wcfg_t *, struct sbecom_card_param *);
-    extern int wancfg_set_chan(wcfg_t *, int, struct sbecom_chan_param *);
-    extern int wancfg_set_framer(wcfg_t *, int, struct sbecom_framer_param *);
-    extern int wancfg_set_loglevel(wcfg_t *, uint);
-    extern int wancfg_write(wcfg_t *, int, struct sbecom_wrt_vec *);
-
-#ifdef NOT_YET_COMMON
-    extern int  wancfg_get_tsioc(wcfg_t *, struct wanc1t3_ts_hdr *, struct wanc1t3_ts_param *);
-    extern int  wancfg_set_tsioc(wcfg_t *, struct wanc1t3_ts_param *);
-#endif
-
-#endif                          /*** _INC_LIBSBEW_H_ ***/
diff --git a/drivers/staging/cxt1e1/linux.c b/drivers/staging/cxt1e1/linux.c
deleted file mode 100644 (file)
index 09f3d5c..0000000
+++ /dev/null
@@ -1,1142 +0,0 @@
-/* Copyright (C) 2007-2008  One Stop Systems
- * Copyright (C) 2003-2006  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/types.h>
-#include <linux/netdevice.h>
-#include <linux/module.h>
-#include <linux/hdlc.h>
-#include <linux/if_arp.h>
-#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/rtnetlink.h>
-#include <linux/skbuff.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4.h"
-#include "pmcc4_ioctls.h"
-#include "pmcc4_private.h"
-#include "sbeproc.h"
-
-/*******************************************************************************
- * Error out early if we have compiler trouble.
- *
- *   (This section is included from the kernel's init/main.c as a friendly
- *   spiderman recommendation...)
- *
- * Versions of gcc older than that listed below may actually compile and link
- * okay, but the end product can have subtle run time bugs.  To avoid associated
- * bogus bug reports, we flatly refuse to compile with a gcc that is known to be
- * too old from the very beginning.
- */
-#if (__GNUC__ < 3) || (__GNUC__ == 3 && __GNUC_MINOR__ < 2)
-#error Sorry, your GCC is too old. It builds incorrect kernels.
-#endif
-
-#if __GNUC__ == 4 && __GNUC_MINOR__ == 1 && __GNUC_PATCHLEVEL__ == 0
-#warning gcc-4.1.0 is known to miscompile the kernel.  A different compiler version is recommended.
-#endif
-
-/*******************************************************************************/
-
-#define CHANNAME "hdlc"
-
-/*******************************************************************/
-/* forward references */
-status_t    c4_chan_work_init(mpi_t *, mch_t *);
-void        musycc_wq_chan_restart(void *);
-status_t __init c4_init(ci_t *, u_char *, u_char *);
-status_t __init c4_init2(ci_t *);
-int __init  c4hw_attach_all(void);
-void __init hdw_sn_get(hdw_info_t *, int);
-
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-irqreturn_t c4_ebus_intr_th_handler(void *);
-
-#endif
-int         c4_frame_rw(ci_t *, struct sbecom_port_param *);
-status_t    c4_get_port(ci_t *, int);
-int         c4_loop_port(ci_t *, int, u_int8_t);
-int         c4_musycc_rw(ci_t *, struct c4_musycc_param *);
-int         c4_new_chan(ci_t *, int, int, void *);
-status_t    c4_set_port(ci_t *, int);
-int         c4_pld_rw(ci_t *, struct sbecom_port_param *);
-void        cleanup_devs(void);
-void        cleanup_ioremap(void);
-status_t    musycc_chan_down(ci_t *, int);
-irqreturn_t musycc_intr_th_handler(void *);
-int         musycc_start_xmit(ci_t *, int, void *);
-
-extern ci_t *CI;
-extern struct s_hdw_info hdw_info[];
-
-int         error_flag;         /* module load error reporting */
-int         cxt1e1_log_level = LOG_ERROR;
-static int  log_level_default = LOG_ERROR;
-module_param(cxt1e1_log_level, int, 0444);
-
-int         cxt1e1_max_mru = MUSYCC_MRU;
-static int  max_mru_default = MUSYCC_MRU;
-module_param(cxt1e1_max_mru, int, 0444);
-
-int         cxt1e1_max_mtu = MUSYCC_MTU;
-int         max_mtu_default = MUSYCC_MTU;
-module_param(cxt1e1_max_mtu, int, 0444);
-
-int         max_txdesc_used = MUSYCC_TXDESC_MIN;
-int         max_txdesc_default = MUSYCC_TXDESC_MIN;
-module_param(max_txdesc_used, int, 0444);
-
-int         max_rxdesc_used = MUSYCC_RXDESC_MIN;
-int         max_rxdesc_default = MUSYCC_RXDESC_MIN;
-module_param(max_rxdesc_used, int, 0444);
-
-/****************************************************************************/
-/****************************************************************************/
-/****************************************************************************/
-
-void *
-getuserbychan(int channum)
-{
-       mch_t      *ch;
-
-       ch = c4_find_chan(channum);
-       return ch ? ch->user : NULL;
-}
-
-
-char *
-get_hdlc_name(hdlc_device *hdlc)
-{
-       struct c4_priv *priv = hdlc->priv;
-       struct net_device *dev = getuserbychan(priv->channum);
-
-       return dev->name;
-}
-
-/***************************************************************************/
-#include <linux/workqueue.h>
-
-/***
- * One workqueue (wq) per port (since musycc allows simultaneous group
- * commands), with individual data for each channel:
- *
- *   mpi_t -> struct workqueue_struct *wq_port;  (dynamically allocated using
- *                                               create_workqueue())
- *
- * With work structure (work) statically allocated for each channel:
- *
- *   mch_t -> struct work_struct ch_work;  (statically allocated using ???)
- *
- ***/
-
-
-/*
- * Called by the start transmit routine when a channel TX_ENABLE is to be
- * issued.  This queues the transmission start request among other channels
- * within a port's group.
- */
-void
-c4_wk_chan_restart(mch_t *ch)
-{
-       mpi_t      *pi = ch->up;
-
-#ifdef RLD_RESTART_DEBUG
-       pr_info(">> %s: queueing Port %d Chan %d, mch_t @ %p\n",
-               __func__, pi->portnum, ch->channum, ch);
-#endif
-
-       /* create new entry w/in workqueue for this channel and let'er rip */
-
-       /** queue_work(struct workqueue_struct *queue,
-        **            struct work_struct *work);
-        **/
-       queue_work(pi->wq_port, &ch->ch_work);
-}
-
-status_t
-c4_wk_chan_init(mpi_t *pi, mch_t *ch)
-{
-       /*
-        * this will be used to restart a stopped channel
-        */
-
-       /** INIT_WORK(struct work_struct *work,
-        **           void (*function)(void *),
-        **           void *data);
-        **/
-       INIT_WORK(&ch->ch_work, (void *)musycc_wq_chan_restart);
-       return 0;                       /* success */
-}
-
-status_t
-c4_wq_port_init(mpi_t *pi)
-{
-
-       char        name[16];  /* NOTE: name of the queue limited by system
-                                    * to 10 characters */
-       if (pi->wq_port)
-               return 0;                   /* already initialized */
-
-       /* IE pmcc4-01 */
-       snprintf(name, sizeof(name), "%s%d", pi->up->devname, pi->portnum);
-
-#ifdef RLD_RESTART_DEBUG
-       pr_info(">> %s: creating workqueue <%s> for Port %d.\n",
-               __func__, name, pi->portnum); /* RLD DEBUG */
-#endif
-       pi->wq_port = create_singlethread_workqueue(name);
-       if (!pi->wq_port)
-               return -ENOMEM;
-       return 0;                       /* success */
-}
-
-void
-c4_wq_port_cleanup(mpi_t *pi)
-{
-       /*
-        * PORT POINT: cannot call this if WQ is statically allocated w/in
-        * structure since it calls kfree(wq);
-        */
-       if (pi->wq_port) {
-               destroy_workqueue(pi->wq_port);        /* this also calls
-                                                       * flush_workqueue() */
-               pi->wq_port = NULL;
-       }
-}
-
-/***************************************************************************/
-
-static irqreturn_t
-c4_linux_interrupt(int irq, void *dev_instance)
-{
-       struct net_device *ndev = dev_instance;
-
-       return musycc_intr_th_handler(netdev_priv(ndev));
-}
-
-
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-static irqreturn_t
-c4_ebus_interrupt(int irq, void *dev_instance)
-{
-       struct net_device *ndev = dev_instance;
-
-       return c4_ebus_intr_th_handler(netdev_priv(ndev));
-}
-#endif
-
-
-static int
-void_open(struct net_device *ndev)
-{
-       pr_info("%s: trying to open master device !\n", ndev->name);
-       return -1;
-}
-
-
-static int
-chan_open(struct net_device *ndev)
-{
-       hdlc_device *hdlc = dev_to_hdlc(ndev);
-       const struct c4_priv *priv = hdlc->priv;
-       int         ret;
-
-       ret = hdlc_open(ndev);
-       if (ret) {
-               pr_info("hdlc_open failure, err %d.\n", ret);
-               return ret;
-       }
-
-       ret = c4_chan_up(priv->ci, priv->channum);
-       if (ret < 0)
-               return ret;
-       try_module_get(THIS_MODULE);
-       netif_start_queue(ndev);
-       return 0;                       /* no error = success */
-}
-
-
-static int
-chan_close(struct net_device *ndev)
-{
-       hdlc_device *hdlc = dev_to_hdlc(ndev);
-       const struct c4_priv *priv = hdlc->priv;
-
-       netif_stop_queue(ndev);
-       musycc_chan_down((ci_t *) 0, priv->channum);
-       hdlc_close(ndev);
-       module_put(THIS_MODULE);
-       return 0;
-}
-
-
-static int
-chan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
-{
-       return hdlc_ioctl(dev, ifr, cmd);
-}
-
-
-static int
-chan_attach_noop(struct net_device *ndev, unsigned short foo_1,
-                unsigned short foo_2)
-{
-       /* our driver has nothing to do here, show's
-        * over, go home
-        */
-       return 0;
-}
-
-
-static struct net_device_stats *
-chan_get_stats(struct net_device *ndev)
-{
-       mch_t      *ch;
-       struct net_device_stats *nstats;
-       struct sbecom_chan_stats *stats;
-       int         channum;
-
-       {
-               struct c4_priv *priv;
-
-               priv = (struct c4_priv *)dev_to_hdlc(ndev)->priv;
-               channum = priv->channum;
-       }
-
-       ch = c4_find_chan(channum);
-       if (ch == NULL)
-               return NULL;
-
-       nstats = &ndev->stats;
-       stats = &ch->s;
-
-       memset(nstats, 0, sizeof(struct net_device_stats));
-       nstats->rx_packets = stats->rx_packets;
-       nstats->tx_packets = stats->tx_packets;
-       nstats->rx_bytes = stats->rx_bytes;
-       nstats->tx_bytes = stats->tx_bytes;
-       nstats->rx_errors = stats->rx_length_errors +
-               stats->rx_over_errors +
-               stats->rx_crc_errors +
-               stats->rx_frame_errors +
-               stats->rx_fifo_errors +
-               stats->rx_missed_errors;
-       nstats->tx_errors = stats->tx_dropped +
-               stats->tx_aborted_errors +
-               stats->tx_fifo_errors;
-       nstats->rx_dropped = stats->rx_dropped;
-       nstats->tx_dropped = stats->tx_dropped;
-
-       nstats->rx_length_errors = stats->rx_length_errors;
-       nstats->rx_over_errors = stats->rx_over_errors;
-       nstats->rx_crc_errors = stats->rx_crc_errors;
-       nstats->rx_frame_errors = stats->rx_frame_errors;
-       nstats->rx_fifo_errors = stats->rx_fifo_errors;
-       nstats->rx_missed_errors = stats->rx_missed_errors;
-
-       nstats->tx_aborted_errors = stats->tx_aborted_errors;
-       nstats->tx_fifo_errors = stats->tx_fifo_errors;
-
-       return nstats;
-}
-
-
-static ci_t *
-get_ci_by_dev(struct net_device *ndev)
-{
-       return (ci_t *)(netdev_priv(ndev));
-}
-
-
-static int
-c4_linux_xmit(struct sk_buff *skb, struct net_device *ndev)
-{
-       const struct c4_priv *priv;
-       int         rval;
-
-       hdlc_device *hdlc = dev_to_hdlc(ndev);
-
-       priv = hdlc->priv;
-
-       rval = musycc_start_xmit(priv->ci, priv->channum, skb);
-       return rval;
-}
-
-static const struct net_device_ops chan_ops = {
-       .ndo_open       = chan_open,
-       .ndo_stop       = chan_close,
-       .ndo_start_xmit = c4_linux_xmit,
-       .ndo_do_ioctl   = chan_dev_ioctl,
-       .ndo_get_stats  = chan_get_stats,
-};
-
-static struct net_device *
-create_chan(struct net_device *ndev, ci_t *ci,
-           struct sbecom_chan_param *cp)
-{
-       hdlc_device *hdlc;
-       struct net_device *dev;
-       hdw_info_t *hi;
-       int         ret;
-
-       if (c4_find_chan(cp->channum))
-               return NULL;                   /* channel already exists */
-
-       {
-               struct c4_priv *priv;
-
-               /* allocate then fill in private data structure */
-               priv = kzalloc(sizeof(struct c4_priv), GFP_KERNEL);
-               if (!priv) {
-                       pr_warning("%s: no memory for net_device !\n",
-                                  ci->devname);
-                       return NULL;
-               }
-               dev = alloc_hdlcdev(priv);
-               if (!dev) {
-                       pr_warning("%s: no memory for hdlc_device !\n",
-                                  ci->devname);
-                       kfree(priv);
-                       return NULL;
-               }
-               priv->ci = ci;
-               priv->channum = cp->channum;
-       }
-
-       hdlc = dev_to_hdlc(dev);
-
-       dev->base_addr = 0;             /* not I/O mapped */
-       dev->irq = ndev->irq;
-       dev->type = ARPHRD_RAWHDLC;
-       *dev->name = 0;                 /* default ifconfig name = "hdlc" */
-
-       hi = (hdw_info_t *)ci->hdw_info;
-       if (hi->mfg_info_sts == EEPROM_OK) {
-               switch (hi->promfmt) {
-               case PROM_FORMAT_TYPE1:
-                       memcpy(dev->dev_addr,
-                              (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
-                       break;
-               case PROM_FORMAT_TYPE2:
-                       memcpy(dev->dev_addr,
-                              (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
-                       break;
-               default:
-                       memset(dev->dev_addr, 0, 6);
-                       break;
-               }
-       } else
-               memset(dev->dev_addr, 0, 6);
-
-       hdlc->xmit = c4_linux_xmit;
-
-       dev->netdev_ops = &chan_ops;
-       /*
-        * The native hdlc stack calls this 'attach' routine during
-        * hdlc_raw_ioctl(), passing parameters for line encoding and parity.
-        * Since hdlc_raw_ioctl() stack does not interrogate whether an 'attach'
-        * routine is actually registered or not, we supply a dummy routine which
-        * does nothing (since encoding and parity are setup for our driver via a
-        * special configuration application).
-        */
-
-       hdlc->attach = chan_attach_noop;
-
-       /* needed due to Ioctl calling sequence */
-       rtnl_unlock();
-       ret = register_hdlc_device(dev);
-       /* NOTE: <stats> setting must occur AFTER registration in order to "take" */
-       dev->tx_queue_len = MAX_DEFAULT_IFQLEN;
-
-       /* needed due to Ioctl calling sequence */
-       rtnl_lock();
-       if (ret) {
-               if (cxt1e1_log_level >= LOG_WARN)
-                       pr_info("%s: create_chan[%d] registration error = %d.\n",
-                               ci->devname, cp->channum, ret);
-               /* cleanup */
-               free_netdev(dev);
-               /* failed to register */
-               return NULL;
-       }
-       return dev;
-}
-
-
-/* the idea here is to get port information and pass it back (using pointer) */
-static status_t
-do_get_port(struct net_device *ndev, void *data)
-{
-       int         ret;
-       ci_t       *ci;             /* ci stands for card information */
-       struct sbecom_port_param pp;/* copy data to kernel land */
-
-       if (copy_from_user(&pp, data, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       if (pp.portnum >= MUSYCC_NPORTS)
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;             /* get card info */
-
-       ret = c4_get_port(ci, pp.portnum);
-       if (ret < 0)
-               return ret;
-       if (copy_to_user(data, &ci->port[pp.portnum].p,
-                        sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       return 0;
-}
-
-/* this function copys the user data and then calls the real action function */
-static status_t
-do_set_port(struct net_device *ndev, void *data)
-{
-       ci_t       *ci;             /* ci stands for card information */
-       struct sbecom_port_param pp;/* copy data to kernel land */
-
-       if (copy_from_user(&pp, data, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       if (pp.portnum >= MUSYCC_NPORTS)
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;             /* get card info */
-
-       if (pp.portnum >= ci->max_port) /* sanity check */
-               return -ENXIO;
-
-       memcpy(&ci->port[pp.portnum].p, &pp, sizeof(struct sbecom_port_param));
-       return c4_set_port(ci, pp.portnum);
-}
-
-/* work the port loopback mode as per directed */
-static status_t
-do_port_loop(struct net_device *ndev, void *data)
-{
-       struct sbecom_port_param pp;
-       ci_t       *ci;
-
-       if (copy_from_user(&pp, data, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-       return c4_loop_port(ci, pp.portnum, pp.port_mode);
-}
-
-/* set the specified register with the given value / or just read it */
-static status_t
-do_framer_rw(struct net_device *ndev, void *data)
-{
-       struct sbecom_port_param pp;
-       ci_t       *ci;
-       int         ret;
-
-       if (copy_from_user(&pp, data, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-       ret = c4_frame_rw(ci, &pp);
-       if (ret < 0)
-               return ret;
-       if (copy_to_user(data, &pp, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       return 0;
-}
-
-/* set the specified register with the given value / or just read it */
-static status_t
-do_pld_rw(struct net_device *ndev, void *data)
-{
-       struct sbecom_port_param pp;
-       ci_t       *ci;
-       int         ret;
-
-       if (copy_from_user(&pp, data, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-
-       ret = c4_pld_rw(ci, &pp);
-       if (ret)
-               return ret;
-       if (copy_to_user(data, &pp, sizeof(struct sbecom_port_param)))
-               return -EFAULT;
-       return 0;
-}
-
-/* set the specified register with the given value / or just read it */
-static status_t
-do_musycc_rw(struct net_device *ndev, void *data)
-{
-       struct c4_musycc_param mp;
-       ci_t       *ci;
-       int         ret;
-
-       if (copy_from_user(&mp, data, sizeof(struct c4_musycc_param)))
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-       ret = c4_musycc_rw(ci, &mp);
-       if (ret < 0)
-               return ret;
-       if (copy_to_user(data, &mp, sizeof(struct c4_musycc_param)))
-               return -EFAULT;
-       return 0;
-}
-
-static status_t
-do_get_chan(struct net_device *ndev, void *data)
-{
-       struct sbecom_chan_param cp;
-       int         ret;
-
-       if (copy_from_user(&cp, data,
-                               sizeof(struct sbecom_chan_param)))
-               return -EFAULT;
-
-       ret = c4_get_chan(cp.channum, &cp);
-       if (ret < 0)
-               return ret;
-
-       if (copy_to_user(data, &cp, sizeof(struct sbecom_chan_param)))
-               return -EFAULT;
-       return 0;
-}
-
-static status_t
-do_set_chan(struct net_device *ndev, void *data)
-{
-       struct sbecom_chan_param cp;
-       ci_t       *ci;
-
-       if (copy_from_user(&cp, data, sizeof(struct sbecom_chan_param)))
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-       return c4_set_chan(cp.channum, &cp);
-}
-
-static status_t
-do_create_chan(struct net_device *ndev, void *data)
-{
-       ci_t       *ci;
-       struct net_device *dev;
-       struct sbecom_chan_param cp;
-       int         ret;
-
-       if (copy_from_user(&cp, data, sizeof(struct sbecom_chan_param)))
-               return -EFAULT;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-       dev = create_chan(ndev, ci, &cp);
-       if (!dev)
-               return -EBUSY;
-       ret = c4_new_chan(ci, cp.port, cp.channum, dev);
-       if (ret < 0) {
-               /* needed due to Ioctl calling sequence */
-               rtnl_unlock();
-               unregister_hdlc_device(dev);
-               /* needed due to Ioctl calling sequence */
-               rtnl_lock();
-               free_netdev(dev);
-       }
-       return ret;
-}
-
-static status_t
-do_get_chan_stats(struct net_device *ndev, void *data)
-{
-       struct c4_chan_stats_wrap ccs;
-       int         ret;
-
-       if (copy_from_user(&ccs, data,
-                          sizeof(struct c4_chan_stats_wrap)))
-               return -EFAULT;
-
-       ret = c4_get_chan_stats(ccs.channum, &ccs.stats);
-       if (ret < 0)
-               return ret;
-
-       if (copy_to_user(data, &ccs,
-                        sizeof(struct c4_chan_stats_wrap)))
-               return -EFAULT;
-       return 0;
-}
-static status_t
-do_set_loglevel(struct net_device *ndev, void *data)
-{
-       unsigned int cxt1e1_log_level;
-
-       if (copy_from_user(&cxt1e1_log_level, data, sizeof(int)))
-               return -EFAULT;
-       sbecom_set_loglevel(cxt1e1_log_level);
-       return 0;
-}
-
-static status_t
-do_deluser(struct net_device *ndev, int lockit)
-{
-       if (ndev->flags & IFF_UP)
-               return -EBUSY;
-
-       {
-               ci_t       *ci;
-               mch_t      *ch;
-               const struct c4_priv *priv;
-               int         channum;
-
-               priv = (struct c4_priv *)dev_to_hdlc(ndev)->priv;
-               ci = priv->ci;
-               channum = priv->channum;
-
-               ch = c4_find_chan(channum);
-               if (ch == NULL)
-                       return -ENOENT;
-               ch->user = NULL;        /* will be freed, below */
-       }
-
-       /* needed if Ioctl calling sequence */
-       if (lockit)
-               rtnl_unlock();
-       unregister_hdlc_device(ndev);
-       /* needed if Ioctl calling sequence */
-       if (lockit)
-               rtnl_lock();
-       free_netdev(ndev);
-       return 0;
-}
-
-int
-do_del_chan(struct net_device *musycc_dev, void *data)
-{
-       struct sbecom_chan_param cp;
-       char        buf[sizeof(CHANNAME) + 3];
-       struct net_device *dev;
-       int         ret;
-
-       if (copy_from_user(&cp, data,
-                          sizeof(struct sbecom_chan_param)))
-               return -EFAULT;
-       if (cp.channum > 999)
-               return -EINVAL;
-       snprintf(buf, sizeof(buf), CHANNAME "%d", cp.channum);
-       dev = __dev_get_by_name(&init_net, buf);
-       if (!dev)
-               return -ENODEV;
-       ret = do_deluser(dev, 1);
-       if (ret)
-               return ret;
-       return c4_del_chan(cp.channum);
-}
-int c4_reset_board(void *);
-
-int
-do_reset(struct net_device *musycc_dev, void *data)
-{
-       const struct c4_priv *priv;
-       int         i;
-
-       for (i = 0; i < 128; i++) {
-               struct net_device *ndev;
-               char        buf[sizeof(CHANNAME) + 3];
-
-               sprintf(buf, CHANNAME "%d", i);
-               ndev = __dev_get_by_name(&init_net, buf);
-               if (!ndev)
-                       continue;
-               priv = dev_to_hdlc(ndev)->priv;
-
-               if ((unsigned long) (priv->ci) ==
-                       (unsigned long) (netdev_priv(musycc_dev))) {
-                       ndev->flags &= ~IFF_UP;
-                       netif_stop_queue(ndev);
-                       do_deluser(ndev, 1);
-               }
-       }
-       return 0;
-}
-
-int
-do_reset_chan_stats(struct net_device *musycc_dev, void *data)
-{
-       struct sbecom_chan_param cp;
-
-       if (copy_from_user(&cp, data,
-                          sizeof(struct sbecom_chan_param)))
-               return -EFAULT;
-       return c4_del_chan_stats(cp.channum);
-}
-
-static status_t
-c4_ioctl(struct net_device *ndev, struct ifreq *ifr, int cmd)
-{
-       ci_t       *ci;
-       void       *data;
-       int         iocmd, iolen;
-       status_t    ret;
-       static struct data {
-               union {
-                       u_int8_t c;
-                       u_int32_t i;
-                       struct sbe_brd_info bip;
-                       struct sbe_drv_info dip;
-                       struct sbe_iid_info iip;
-                       struct sbe_brd_addr bap;
-                       struct sbecom_chan_stats stats;
-                       struct sbecom_chan_param param;
-                       struct temux_card_stats cards;
-                       struct sbecom_card_param cardp;
-                       struct sbecom_framer_param frp;
-               } u;
-       } arg;
-
-
-       if (!capable(CAP_SYS_ADMIN))
-               return -EPERM;
-       if (cmd != SIOCDEVPRIVATE + 15)
-               return -EINVAL;
-       ci = get_ci_by_dev(ndev);
-       if (!ci)
-               return -EINVAL;
-       if (ci->state != C_RUNNING)
-               return -ENODEV;
-       if (copy_from_user(&iocmd, ifr->ifr_data, sizeof(iocmd)))
-               return -EFAULT;
-#if 0
-       if (copy_from_user(&len, ifr->ifr_data + sizeof(iocmd), sizeof(len)))
-               return -EFAULT;
-#endif
-
-#if 0
-       pr_info("c4_ioctl: iocmd %x, dir %x type %x nr %x iolen %d.\n", iocmd,
-               _IOC_DIR(iocmd), _IOC_TYPE(iocmd), _IOC_NR(iocmd),
-               _IOC_SIZE(iocmd));
-#endif
-       iolen = _IOC_SIZE(iocmd);
-       if (iolen > sizeof(arg))
-               return -EFAULT;
-       data = ifr->ifr_data + sizeof(iocmd);
-       if (copy_from_user(&arg, data, iolen))
-               return -EFAULT;
-
-       ret = 0;
-       switch (iocmd) {
-       case SBE_IOC_PORT_GET:
-               ret = do_get_port(ndev, data);
-               break;
-       case SBE_IOC_PORT_SET:
-               ret = do_set_port(ndev, data);
-               break;
-       case SBE_IOC_CHAN_GET:
-               ret = do_get_chan(ndev, data);
-               break;
-       case SBE_IOC_CHAN_SET:
-               ret = do_set_chan(ndev, data);
-               break;
-       case C4_DEL_CHAN:
-               ret = do_del_chan(ndev, data);
-               break;
-       case SBE_IOC_CHAN_NEW:
-               ret = do_create_chan(ndev, data);
-               break;
-       case SBE_IOC_CHAN_GET_STAT:
-               ret = do_get_chan_stats(ndev, data);
-               break;
-       case SBE_IOC_LOGLEVEL:
-               ret = do_set_loglevel(ndev, data);
-               break;
-       case SBE_IOC_RESET_DEV:
-               ret = do_reset(ndev, data);
-               break;
-       case SBE_IOC_CHAN_DEL_STAT:
-               ret = do_reset_chan_stats(ndev, data);
-               break;
-       case C4_LOOP_PORT:
-               ret = do_port_loop(ndev, data);
-               break;
-       case C4_RW_FRMR:
-               ret = do_framer_rw(ndev, data);
-               break;
-       case C4_RW_MSYC:
-               ret = do_musycc_rw(ndev, data);
-               break;
-       case C4_RW_PLD:
-               ret = do_pld_rw(ndev, data);
-               break;
-       case SBE_IOC_IID_GET:
-               ret = (iolen == sizeof(struct sbe_iid_info)) ?
-                      c4_get_iidinfo(ci, &arg.u.iip) : -EFAULT;
-               if (ret == 0)               /* no error, copy data */
-                       if (copy_to_user(data, &arg, iolen))
-                               return -EFAULT;
-               break;
-       default:
-               ret = -EINVAL;
-               break;
-       }
-       return ret;
-}
-
-static const struct net_device_ops c4_ops = {
-       .ndo_open       = void_open,
-       .ndo_start_xmit = c4_linux_xmit,
-       .ndo_do_ioctl   = c4_ioctl,
-};
-
-static void c4_setup(struct net_device *dev)
-{
-       dev->type = ARPHRD_VOID;
-       dev->netdev_ops = &c4_ops;
-}
-
-struct net_device *__init
-c4_add_dev(hdw_info_t *hi, int brdno, unsigned long f0, unsigned long f1,
-          int irq0, int irq1)
-{
-       struct net_device *ndev;
-       ci_t       *ci;
-
-       ndev = alloc_netdev(sizeof(ci_t), SBE_IFACETMPL, c4_setup);
-       if (!ndev) {
-               pr_warning("%s: no memory for struct net_device !\n",
-                          hi->devname);
-               error_flag = -ENOMEM;
-               return NULL;
-       }
-       ci = (ci_t *)(netdev_priv(ndev));
-       ndev->irq = irq0;
-
-       ci->hdw_info = hi;
-       ci->state = C_INIT;         /* mark as hardware not available */
-       ci->next = c4_list;
-       c4_list = ci;
-       ci->brdno = ci->next ? ci->next->brdno + 1 : 0;
-
-       if (!CI)
-               CI = ci;                    /* DEBUG, only board 0 usage */
-
-       strcpy(ci->devname, hi->devname);
-
-       /* tasklet */
-#if defined(SBE_ISR_TASKLET)
-       tasklet_init(&ci->ci_musycc_isr_tasklet,
-                    (void (*) (unsigned long)) musycc_intr_bh_tasklet,
-                    (unsigned long) ci);
-
-       if (atomic_read(&ci->ci_musycc_isr_tasklet.count) == 0)
-               tasklet_disable_nosync(&ci->ci_musycc_isr_tasklet);
-#elif defined(SBE_ISR_IMMEDIATE)
-       ci->ci_musycc_isr_tq.routine = (void *)(unsigned long)musycc_intr_bh_tasklet;
-       ci->ci_musycc_isr_tq.data = ci;
-#endif
-
-
-       if (register_netdev(ndev) ||
-               (c4_init(ci, (u_char *) f0, (u_char *) f1) != SBE_DRVR_SUCCESS)) {
-               kfree(netdev_priv(ndev));
-               kfree(ndev);
-               error_flag = -ENODEV;
-               return NULL;
-       }
-       /*************************************************************
-        *  int request_irq(unsigned int irq,
-        *                  void (*handler)(int, void *, struct pt_regs *),
-        *                  unsigned long flags, const char *dev_name, void *dev_id);
-        *  wherein:
-        *  irq      -> The interrupt number that is being requested.
-        *  handler  -> Pointer to handling function being installed.
-        *  flags    -> A bit mask of options related to interrupt management.
-        *  dev_name -> String used in /proc/interrupts to show owner of interrupt.
-        *  dev_id   -> Pointer (for shared interrupt lines) to point to its own
-        *              private data area (to identify which device is interrupting).
-        *
-        *  extern void free_irq(unsigned int irq, void *dev_id);
-        **************************************************************/
-
-       if (request_irq(irq0, &c4_linux_interrupt,
-                       IRQF_SHARED,
-                       ndev->name, ndev)) {
-               pr_warning("%s: MUSYCC could not get irq: %d\n",
-                          ndev->name, irq0);
-               unregister_netdev(ndev);
-               kfree(netdev_priv(ndev));
-               kfree(ndev);
-               error_flag = -EIO;
-               return NULL;
-       }
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-       if (request_irq(irq1, &c4_ebus_interrupt, IRQF_SHARED, ndev->name, ndev)) {
-               pr_warning("%s: EBUS could not get irq: %d\n", hi->devname, irq1);
-               unregister_netdev(ndev);
-               free_irq(irq0, ndev);
-               kfree(netdev_priv(ndev));
-               kfree(ndev);
-               error_flag = -EIO;
-               return NULL;
-       }
-#endif
-
-       /* setup board identification information */
-
-       {
-               u_int32_t   tmp;
-
-               /* also sets PROM format type (promfmt) for later usage */
-               hdw_sn_get(hi, brdno);
-
-               switch (hi->promfmt) {
-               case PROM_FORMAT_TYPE1:
-                       memcpy(ndev->dev_addr,
-                              (FLD_TYPE1 *) (hi->mfg_info.pft1.Serial), 6);
-                       /* unaligned data acquisition */
-                       memcpy(&tmp, (FLD_TYPE1 *) (hi->mfg_info.pft1.Id), 4);
-                       ci->brd_id = cpu_to_be32(tmp);
-                       break;
-               case PROM_FORMAT_TYPE2:
-                       memcpy(ndev->dev_addr,
-                              (FLD_TYPE2 *) (hi->mfg_info.pft2.Serial), 6);
-                       /* unaligned data acquisition */
-                       memcpy(&tmp, (FLD_TYPE2 *) (hi->mfg_info.pft2.Id), 4);
-                       ci->brd_id = cpu_to_be32(tmp);
-                       break;
-               default:
-                       ci->brd_id = 0;
-                       memset(ndev->dev_addr, 0, 6);
-                       break;
-               }
-
-#if 1
-               /* requires bid to be preset */
-               sbeid_set_hdwbid(ci);
-#else
-               /* requires hdw_bid to be preset */
-               sbeid_set_bdtype(ci);
-#endif
-       }
-
-#ifdef CONFIG_PROC_FS
-       sbecom_proc_brd_init(ci);
-#endif
-#if defined(SBE_ISR_TASKLET)
-       tasklet_enable(&ci->ci_musycc_isr_tasklet);
-#endif
-
-       error_flag = c4_init2(ci);
-       if (error_flag != SBE_DRVR_SUCCESS) {
-#ifdef CONFIG_PROC_FS
-               sbecom_proc_brd_cleanup(ci);
-#endif
-               unregister_netdev(ndev);
-               free_irq(irq1, ndev);
-               free_irq(irq0, ndev);
-               kfree(netdev_priv(ndev));
-               kfree(ndev);
-               /* failure, error_flag is set */
-               return NULL;
-       }
-       return ndev;
-}
-
-static int  __init
-c4_mod_init(void)
-{
-       int         rtn;
-
-       rtn = c4hw_attach_all();
-       if (rtn)
-               return -rtn; /* installation failure - see system log */
-
-       /* housekeeping notifications */
-       if (cxt1e1_log_level != log_level_default)
-               pr_info("NOTE: driver parameter <cxt1e1_log_level> changed from default %d to %d.\n",
-                       log_level_default, cxt1e1_log_level);
-       if (cxt1e1_max_mru != max_mru_default)
-               pr_info("NOTE: driver parameter <cxt1e1_max_mru> changed from default %d to %d.\n",
-                       max_mru_default, cxt1e1_max_mru);
-       if (cxt1e1_max_mtu != max_mtu_default)
-               pr_info("NOTE: driver parameter <cxt1e1_max_mtu> changed from default %d to %d.\n",
-                       max_mtu_default, cxt1e1_max_mtu);
-       if (max_rxdesc_used != max_rxdesc_default) {
-               if (max_rxdesc_used > 2000)
-                       max_rxdesc_used = 2000; /* out-of-bounds reset */
-               pr_info("NOTE: driver parameter <max_rxdesc_used> changed from default %d to %d.\n",
-                       max_rxdesc_default, max_rxdesc_used);
-       }
-       if (max_txdesc_used != max_txdesc_default) {
-               if (max_txdesc_used > 1000)
-                       max_txdesc_used = 1000; /* out-of-bounds reset */
-               pr_info("NOTE: driver parameter <max_txdesc_used> changed from default %d to %d.\n",
-                       max_txdesc_default, max_txdesc_used);
-       }
-       return 0;                       /* installation success */
-}
-
-
- /*
-  * find any still allocated hdlc registrations and unregister via call to
-  * do_deluser()
-  */
-
-static void __exit
-cleanup_hdlc(void)
-{
-       hdw_info_t *hi;
-       ci_t       *ci;
-       struct net_device *ndev;
-       int         i, j, k;
-
-       for (i = 0, hi = hdw_info; i < MAX_BOARDS; i++, hi++) {
-               if (hi->ndev) {          /* a board has been attached */
-                       ci = (ci_t *)(netdev_priv(hi->ndev));
-                       for (j = 0; j < ci->max_port; j++)
-                               for (k = 0; k < MUSYCC_NCHANS; k++) {
-                                       ndev = ci->port[j].chan[k]->user;
-                                       if (ndev)
-                                               do_deluser(ndev, 0);
-                               }
-               }
-       }
-}
-
-
-static void __exit
-c4_mod_remove(void)
-{
-       cleanup_hdlc();            /* delete any missed channels */
-       cleanup_devs();
-       c4_cleanup();
-       cleanup_ioremap();
-       pr_info("SBE - driver removed.\n");
-}
-
-module_init(c4_mod_init);
-module_exit(c4_mod_remove);
-
-MODULE_AUTHOR("SBE Technical Services <support@sbei.com>");
-MODULE_DESCRIPTION("wanPCI-CxT1E1 Generic HDLC WAN Driver module");
-#ifdef MODULE_LICENSE
-MODULE_LICENSE("GPL");
-#endif
-
-/***  End-of-File  ***/
diff --git a/drivers/staging/cxt1e1/musycc.c b/drivers/staging/cxt1e1/musycc.c
deleted file mode 100644 (file)
index 0bcbd8a..0000000
+++ /dev/null
@@ -1,1720 +0,0 @@
-static unsigned int max_intcnt;
-static unsigned int max_bh;
-
-/*-----------------------------------------------------------------------------
- * musycc.c -
- *
- * Copyright (C) 2007  One Stop Systems, Inc.
- * Copyright (C) 2003-2006  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@onestopsystems.com
- * One Stop Systems, Inc.  Escondido, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/types.h>
-#include "pmcc4_sysdep.h"
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/init.h>
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4_private.h"
-#include "pmcc4.h"
-#include "musycc.h"
-
-#define sd_find_chan(ci,ch)   c4_find_chan(ch)
-
-
-/*******************************************************************/
-/* global driver variables */
-extern ci_t *c4_list;
-extern int  drvr_state;
-
-extern int  cxt1e1_max_mru;
-extern int  cxt1e1_max_mtu;
-extern int  max_rxdesc_used;
-extern int  max_txdesc_used;
-extern ci_t *CI;                /* dummy pointr to board ZEROE's data - DEBUG
-                                * USAGE */
-
-
-/*******************************************************************/
-/* forward references */
-void        c4_fifo_free(mpi_t *, int);
-void        c4_wk_chan_restart(mch_t *);
-void        musycc_bh_tx_eom(mpi_t *, int);
-int         musycc_chan_up(ci_t *, int);
-status_t __init musycc_init(ci_t *);
-void        musycc_intr_bh_tasklet(ci_t *);
-void        musycc_serv_req(mpi_t *, u_int32_t);
-void        musycc_update_timeslots(mpi_t *);
-
-/*******************************************************************/
-
-static int
-musycc_dump_rxbuffer_ring(mch_t *ch, int lockit)
-{
-       struct mdesc *m;
-       unsigned long flags = 0;
-
-       u_int32_t status;
-       int         n;
-
-#ifdef RLD_DUMP_BUFDATA
-       u_int32_t *dp;
-       int len = 0;
-#endif
-       if (lockit)
-               spin_lock_irqsave(&ch->ch_rxlock, flags);
-       if (ch->rxd_num == 0)
-               pr_info("  ZERO receive buffers allocated for this channel.");
-       else {
-               FLUSH_MEM_READ();
-               m = &ch->mdr[ch->rxix_irq_srv];
-               for (n = ch->rxd_num; n; n--) {
-                       status = le32_to_cpu(m->status);
-                       pr_info("%c  %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n",
-                               (m == &ch->mdr[ch->rxix_irq_srv]) ? 'F' : ' ',
-                               (unsigned long) m, n,
-                               status,
-                               m->data ? (status & HOST_RX_OWNED ? 'H' : 'M') : '-',
-                               status & POLL_DISABLED ? 'P' : '-',
-                               status & EOBIRQ_ENABLE ? 'b' : '-',
-                               status & EOMIRQ_ENABLE ? 'm' : '-',
-                               status & LENGTH_MASK,
-                               le32_to_cpu(m->data), le32_to_cpu(m->next));
-#ifdef RLD_DUMP_BUFDATA
-                               len = status & LENGTH_MASK;
-
-#if 1
-                               if (m->data && (status & HOST_RX_OWNED))
-#else
-                               /* always dump regardless of valid RX data */
-                               if (m->data)
-#endif
-                               {
-                                       dp = (u_int32_t *)OS_phystov((void *)(le32_to_cpu(m->data)));
-                                       if (len >= 0x10)
-                                               pr_info("    %x[%x]: %08X %08X %08X %08x\n",
-                                                       (u_int32_t)dp, len,
-                                                       *dp, *(dp + 1),
-                                                       *(dp + 2), *(dp + 3));
-                                       else if (len >= 0x08)
-                                               pr_info("    %x[%x]: %08X %08X\n",
-                                                       (u_int32_t)dp, len,
-                                                       *dp, *(dp + 1));
-                                       else
-                                               pr_info("    %x[%x]: %08X\n",
-                                                       (u_int32_t)dp,
-                                                       len, *dp);
-                               }
-#endif
-                       m = m->snext;
-               }
-       }
-       pr_info("\n");
-
-       if (lockit)
-               spin_unlock_irqrestore(&ch->ch_rxlock, flags);
-       return 0;
-}
-
-static int
-musycc_dump_txbuffer_ring(mch_t *ch, int lockit)
-{
-       struct mdesc *m;
-       unsigned long flags = 0;
-       u_int32_t   status;
-       int         n;
-#ifdef RLD_DUMP_BUFDATA
-       u_int32_t *dp;
-       int len = 0;
-#endif
-
-       if (lockit)
-               spin_lock_irqsave(&ch->ch_txlock, flags);
-       if (ch->txd_num == 0)
-               pr_info("  ZERO transmit buffers allocated for this channel.");
-       else {
-               FLUSH_MEM_READ();
-               m = ch->txd_irq_srv;
-               for (n = ch->txd_num; n; n--) {
-                       status = le32_to_cpu(m->status);
-                       pr_info("%c%c %08lx[%2d]: sts %08x (%c%c%c%c:%d.) Data [%08x] Next [%08x]\n",
-                               (m == ch->txd_usr_add) ? 'F' : ' ',
-                               (m == ch->txd_irq_srv) ? 'L' : ' ',
-                               (unsigned long) m, n,
-                               status,
-                               m->data ? (status & MUSYCC_TX_OWNED ? 'M' : 'H') : '-',
-                               status & POLL_DISABLED ? 'P' : '-',
-                               status & EOBIRQ_ENABLE ? 'b' : '-',
-                               status & EOMIRQ_ENABLE ? 'm' : '-',
-                               status & LENGTH_MASK,
-                               le32_to_cpu(m->data), le32_to_cpu(m->next));
-#ifdef RLD_DUMP_BUFDATA
-                       len = status & LENGTH_MASK;
-
-                       if (m->data) {
-                               dp = (u_int32_t *)OS_phystov((void *)(le32_to_cpu(m->data)));
-                               if (len >= 0x10)
-                                       pr_info("    %x[%x]: %08X %08X %08X %08x\n",
-                                               (u_int32_t) dp, len,
-                                               *dp, *(dp + 1),
-                                               *(dp + 2), *(dp + 3));
-                               else if (len >= 0x08)
-                                       pr_info("    %x[%x]: %08X %08X\n",
-                                               (u_int32_t)dp, len,
-                                               *dp, *(dp + 1));
-                               else
-                                       pr_info("    %x[%x]: %08X\n",
-                                               (u_int32_t)dp, len, *dp);
-                       }
-#endif
-                       m = m->snext;
-               }
-       }                               /* -for- */
-       pr_info("\n");
-
-       if (lockit)
-               spin_unlock_irqrestore(&ch->ch_txlock, flags);
-       return 0;
-}
-
-/*
- * The following supports a backdoor debug facility which can be used to
- * display the state of a board's channel.
- */
-
-status_t
-musycc_dump_ring(ci_t *ci, unsigned int chan)
-{
-       mch_t      *ch;
-       int bh;
-
-       if (chan >= MAX_CHANS_USED)
-               return SBE_DRVR_FAIL;       /* E2BIG */
-
-       bh = atomic_read(&ci->bh_pending);
-       pr_info(">> bh_pend %d [%d] ihead %d itail %d [%d] th_cnt %d bh_cnt %d wdcnt %d note %d\n",
-               bh, max_bh, ci->iqp_headx, ci->iqp_tailx, max_intcnt,
-               ci->intlog.drvr_intr_thcount,
-               ci->intlog.drvr_intr_bhcount,
-               ci->wdcount, ci->wd_notify);
-       max_bh = 0;                 /* reset counter */
-       max_intcnt = 0;             /* reset counter */
-
-       ch = sd_find_chan(dummy, chan);
-       if (!ch) {
-               pr_info(">> musycc_dump_ring: channel %d not up.\n", chan);
-               return ENOENT;
-       }
-       pr_info(">> CI %p CHANNEL %3d @ %p: state %x status/p %x/%x\n",
-               ci, chan, ch, ch->state,
-               ch->status, ch->p.status);
-       pr_info("--------------------------------\n");
-       pr_info("TX Buffer Ring - Channel %d, txd_num %d. (bd/ch pend %d %d), TXD required %d, txpkt %lu\n",
-               chan, ch->txd_num,
-               (u_int32_t)atomic_read(&ci->tx_pending),
-               (u_int32_t)atomic_read(&ch->tx_pending),
-               ch->txd_required, ch->s.tx_packets);
-       pr_info("++ User 0x%p IRQ_SRV 0x%p USR_ADD 0x%p QStopped %x, start_tx %x tx_full %d txd_free %d mode %x\n",
-               ch->user, ch->txd_irq_srv, ch->txd_usr_add,
-               sd_queue_stopped(ch->user),
-               ch->ch_start_tx, ch->tx_full, ch->txd_free, ch->p.chan_mode);
-       musycc_dump_txbuffer_ring(ch, 1);
-       pr_info("RX Buffer Ring - Channel %d, rxd_num %d. IRQ_SRV[%d] 0x%p, start_rx %x rxpkt %lu\n",
-               chan, ch->rxd_num, ch->rxix_irq_srv,
-               &ch->mdr[ch->rxix_irq_srv], ch->ch_start_rx, ch->s.rx_packets);
-       musycc_dump_rxbuffer_ring(ch, 1);
-
-       return SBE_DRVR_SUCCESS;
-}
-
-
-status_t
-musycc_dump_rings(ci_t *ci, unsigned int start_chan)
-{
-       unsigned int chan;
-
-       for (chan = start_chan; chan < (start_chan + 5); chan++)
-               musycc_dump_ring(ci, chan);
-       return SBE_DRVR_SUCCESS;
-}
-
-
-/*
- * NOTE on musycc_init_mdt():  These MUSYCC writes are only operational after
- * a MUSYCC GROUP_INIT command has been issued.
- */
-
-void
-musycc_init_mdt(mpi_t *pi)
-{
-       u_int32_t  *addr, cfg;
-       int         i;
-
-       /*
-        * This Idle Code insertion takes effect prior to channel's first
-        * transmitted  message.  After that, each message contains its own Idle
-        * Code information which is to be issued after the message is
-        * transmitted (Ref.MUSYCC 5.2.2.3: MCENBL bit in Group Configuration
-        * Descriptor).
-        */
-
-       addr = (u_int32_t *) ((u_long) pi->reg + MUSYCC_MDT_BASE03_ADDR);
-       cfg = CFG_CH_FLAG_7E << IDLE_CODE;
-
-       for (i = 0; i < 32; addr++, i++)
-               pci_write_32(addr, cfg);
-}
-
-
-/* Set TX thp to the next unprocessed md */
-
-void
-musycc_update_tx_thp(mch_t *ch)
-{
-       struct mdesc *md;
-       unsigned long flags;
-
-       spin_lock_irqsave(&ch->ch_txlock, flags);
-       while (1) {
-               md = ch->txd_irq_srv;
-               FLUSH_MEM_READ();
-               if (!md->data) {
-                       /* No MDs with buffers to process */
-                       spin_unlock_irqrestore(&ch->ch_txlock, flags);
-                       return;
-               }
-               if ((le32_to_cpu(md->status)) & MUSYCC_TX_OWNED) {
-                       /* this is the MD to restart TX with */
-                       break;
-               }
-               /*
-                * Otherwise, we have a valid, host-owned message descriptor which
-                * has been successfully transmitted and whose buffer can be freed,
-                * so... process this MD, it's owned by the host.  (This might give
-                * as a new, updated txd_irq_srv.)
-                */
-               musycc_bh_tx_eom(ch->up, ch->gchan);
-       }
-       md = ch->txd_irq_srv;
-       ch->up->regram->thp[ch->gchan] = cpu_to_le32(OS_vtophys(md));
-       FLUSH_MEM_WRITE();
-
-       if (ch->tx_full) {
-               ch->tx_full = 0;
-               ch->txd_required = 0;
-               sd_enable_xmit(ch->user);  /* re-enable to catch flow controlled
-                                           * channel */
-       }
-       spin_unlock_irqrestore(&ch->ch_txlock, flags);
-
-#ifdef RLD_TRANS_DEBUG
-       pr_info("++ musycc_update_tx_thp[%d]: setting thp = %p, sts %x\n",
-               ch->channum, md, md->status);
-#endif
-}
-
-
-/*
- * This is the workq task executed by the OS when our queue_work() is
- * scheduled and run.  It can fire off either RX or TX ACTIVATION depending
- * upon the channel's ch_start_tx and ch_start_rx variables.  This routine
- * is implemented as a work queue so that the call to the service request is
- * able to sleep, awaiting an interrupt acknowledgment response (SACK) from
- * the hardware.
- */
-
-void
-musycc_wq_chan_restart(void *arg)      /* channel private structure */
-{
-       mch_t      *ch;
-       mpi_t      *pi;
-       struct mdesc *md;
-
-#if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG)
-       static int hereb4 = 7;
-#endif
-
-       ch = container_of(arg, struct c4_chan_info, ch_work);
-       pi = ch->up;
-
-#ifdef RLD_TRANS_DEBUG
-       pr_info("wq_chan_restart[%d]: start_RT[%d/%d] status %x\n",
-               ch->channum, ch->ch_start_rx, ch->ch_start_tx, ch->status);
-
-#endif
-
-       /**********************************/
-       /** check for RX restart request **/
-       /**********************************/
-
-       if ((ch->ch_start_rx) && (ch->status & RX_ENABLED)) {
-
-               ch->ch_start_rx = 0;
-#if defined(RLD_TRANS_DEBUG) || defined(RLD_RXACT_DEBUG)
-               if (hereb4) {            /* RLD DEBUG */
-                       hereb4--;
-#ifdef RLD_TRANS_DEBUG
-                       md = &ch->mdr[ch->rxix_irq_srv];
-                       pr_info("++ musycc_wq_chan_restart[%d] CHAN RX ACTIVATE: rxix_irq_srv %d, md %p sts %x, rxpkt %lu\n",
-                               ch->channum, ch->rxix_irq_srv, md,
-                               le32_to_cpu(md->status), ch->s.rx_packets);
-#elif defined(RLD_RXACT_DEBUG)
-                       md = &ch->mdr[ch->rxix_irq_srv];
-                       pr_info("++ musycc_wq_chan_restart[%d] CHAN RX ACTIVATE: rxix_irq_srv %d, md %p sts %x, rxpkt %lu\n",
-                               ch->channum, ch->rxix_irq_srv,
-                               md, le32_to_cpu(md->status),
-                               ch->s.rx_packets);
-                       musycc_dump_rxbuffer_ring(ch, 1);      /* RLD DEBUG */
-#endif
-               }
-#endif
-               musycc_serv_req(pi, SR_CHANNEL_ACTIVATE |
-                               SR_RX_DIRECTION | ch->gchan);
-       }
-       /**********************************/
-       /** check for TX restart request **/
-       /**********************************/
-
-       if ((ch->ch_start_tx) && (ch->status & TX_ENABLED)) {
-               /* find next unprocessed message, then set TX thp to it */
-               musycc_update_tx_thp(ch);
-
-               md = ch->txd_irq_srv;
-               if (!md) {
-#ifdef RLD_TRANS_DEBUG
-                       pr_info("-- musycc_wq_chan_restart[%d]: WARNING, starting NULL md\n",
-                               ch->channum);
-#endif
-               } else if (md->data && ((le32_to_cpu(md->status)) &
-                          MUSYCC_TX_OWNED)) {
-                       ch->ch_start_tx = 0;
-
-#ifdef RLD_TRANS_DEBUG
-                       pr_info("++ musycc_wq_chan_restart() CHAN TX ACTIVATE: chan %d txd_irq_srv %p = sts %x, txpkt %lu\n",
-                               ch->channum, ch->txd_irq_srv,
-                               ch->txd_irq_srv->status, ch->s.tx_packets);
-#endif
-                       musycc_serv_req(pi, SR_CHANNEL_ACTIVATE |
-                                       SR_TX_DIRECTION | ch->gchan);
-               }
-#ifdef RLD_RESTART_DEBUG
-               else {
-                       /* retain request to start until retried and we have data to xmit */
-                       pr_info("-- musycc_wq_chan_restart[%d]: DELAYED due to md %p sts %x data %x, start_tx %x\n",
-                               ch->channum, md,
-                               le32_to_cpu(md->status),
-                               le32_to_cpu(md->data), ch->ch_start_tx);
-                       musycc_dump_txbuffer_ring(ch, 0);
-               }
-#endif
-       }
-}
-
-
- /*
-  * Channel restart either fires of a workqueue request (2.6) or lodges a
-  * watchdog activation sequence (2.4).
-  */
-
-void
-musycc_chan_restart(mch_t *ch)
-{
-#ifdef RLD_RESTART_DEBUG
-       pr_info("++ musycc_chan_restart[%d]: txd_irq_srv @ %p = sts %x\n",
-               ch->channum, ch->txd_irq_srv, ch->txd_irq_srv->status);
-#endif
-
-       /* 2.6 - find next unprocessed message, then set TX thp to it */
-#ifdef RLD_RESTART_DEBUG
-       pr_info(">> musycc_chan_restart: scheduling Chan %x workQ @ %p\n",
-               ch->channum, &ch->ch_work);
-#endif
-       c4_wk_chan_restart(ch);        /* work queue mechanism fires off: Ref:
-                                       * musycc_wq_chan_restart () */
-}
-
-
-void
-rld_put_led(mpi_t *pi, u_int32_t ledval)
-{
-       static u_int32_t led;
-
-       if (ledval == 0)
-               led = 0;
-       else
-               led |= ledval;
-
-       /* RLD DEBUG TRANHANG */
-       pci_write_32((u_int32_t *) &pi->up->cpldbase->leds, led);
-}
-
-
-#define MUSYCC_SR_RETRY_CNT  9
-
-void
-musycc_serv_req(mpi_t *pi, u_int32_t req)
-{
-       volatile u_int32_t r;
-       int         rcnt;
-
-       /*
-        * PORT NOTE: Semaphore protect service loop guarantees only a single
-        * operation at a time.  Per MUSYCC Manual - "Issuing service requests to
-        * the same channel group without first receiving ACK from each request
-        * may cause the host to lose track of which service request has been
-        * acknowledged."
-        */
-
-       SD_SEM_TAKE(&pi->sr_sem_busy, "serv");     /* only 1 thru here, per
-                                                   * group */
-
-       if (pi->sr_last == req) {
-#ifdef RLD_TRANS_DEBUG
-               pr_info(">> same SR, Port %d Req %x\n", pi->portnum, req);
-#endif
-
-               /*
-                * The most likely repeated request is the channel activation command
-                * which follows the occurrence of a Transparent mode TX ONR or a
-                * BUFF error.  If the previous command was a CHANNEL ACTIVATE,
-                * precede it with a NOOP command in order maintain coherent control
-                * of this current (re)ACTIVATE.
-                */
-
-               r = (pi->sr_last & ~SR_GCHANNEL_MASK);
-               if ((r == (SR_CHANNEL_ACTIVATE | SR_TX_DIRECTION)) ||
-                   (r == (SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION))) {
-#ifdef RLD_TRANS_DEBUG
-                       pr_info(">> same CHAN ACT SR, Port %d Req %x => issue SR_NOOP CMD\n", pi->portnum, req);
-#endif
-                       /* allow this next request */
-                       SD_SEM_GIVE(&pi->sr_sem_busy);
-                       musycc_serv_req(pi, SR_NOOP);
-                       /* relock & continue w/ original req */
-                       SD_SEM_TAKE(&pi->sr_sem_busy, "serv");
-               } else if (req == SR_NOOP) {
-                       /* no need to issue back-to-back
-                        * SR_NOOP commands at this time
-                        */
-#ifdef RLD_TRANS_DEBUG
-                       pr_info(">> same Port SR_NOOP skipped, Port %d\n",
-                               pi->portnum);
-#endif
-                       /* allow this next request */
-                       SD_SEM_GIVE(&pi->sr_sem_busy);
-                       return;
-               }
-       }
-       rcnt = 0;
-       pi->sr_last = req;
-rewrite:
-       pci_write_32((u_int32_t *) &pi->reg->srd, req);
-       FLUSH_MEM_WRITE();
-
-       /*
-        * Per MUSYCC Manual, Section 6.1,2 - "When writing an SCR service
-        * request, the host must ensure at least one PCI bus clock cycle has
-        * elapsed before writing another service request.  To meet this minimum
-        * elapsed service request write timing interval, it is recommended that
-        * the host follow any SCR write with another operation which reads from
-        * the same address."
-        */
-
-       /* adhere to write timing imposition */
-       r = pci_read_32((u_int32_t *) &pi->reg->srd);
-
-
-       if ((r != req) && (req != SR_CHIP_RESET) &&
-           (++rcnt <= MUSYCC_SR_RETRY_CNT)) {
-               if (cxt1e1_log_level >= LOG_MONITOR)
-                       pr_info("%s: %d - reissue srv req/last %x/%x (hdw reads %x), Chan %d.\n",
-                               pi->up->devname, rcnt, req, pi->sr_last, r,
-                               (pi->portnum * MUSYCC_NCHANS) + (req & 0x1f));
-               /* this delay helps reduce reissue counts
-                * (reason not yet researched)
-                */
-               OS_uwait_dummy();
-               goto rewrite;
-       }
-       if (rcnt > MUSYCC_SR_RETRY_CNT) {
-               pr_warning("%s: failed service request (#%d)= %x, group %d.\n",
-                          pi->up->devname, MUSYCC_SR_RETRY_CNT,
-                          req, pi->portnum);
-               SD_SEM_GIVE(&pi->sr_sem_busy); /* allow any next request */
-               return;
-       }
-       if (req == SR_CHIP_RESET) {
-               /*
-                * PORT NOTE: the CHIP_RESET command is NOT ack'd by the MUSYCC, thus
-                * the upcoming delay is used.  Though the MUSYCC documentation
-                * suggests a read-after-write would supply the required delay, it's
-                * unclear what CPU/BUS clock speeds might have been assumed when
-                * suggesting this 'lack of ACK' workaround.  Thus the use of uwait.
-                */
-               OS_uwait(100000, "icard"); /* 100ms */
-       } else {
-               FLUSH_MEM_READ();
-               /* sleep until SACK interrupt occurs */
-               SD_SEM_TAKE(&pi->sr_sem_wait, "sakack");
-       }
-       SD_SEM_GIVE(&pi->sr_sem_busy); /* allow any next request */
-}
-
-
-#ifdef  SBE_PMCC4_ENABLE
-void
-musycc_update_timeslots(mpi_t *pi)
-{
-       int         i, ch;
-       char        e1mode = IS_FRAME_ANY_E1(pi->p.port_mode);
-
-       for (i = 0; i < 32; i++) {
-               int         usedby = 0, last = 0, ts, j, bits[8];
-
-               u_int8_t lastval = 0;
-
-               if (((i == 0) && e1mode) || /* disable if  E1 mode */
-                   ((i == 16) && ((pi->p.port_mode == CFG_FRAME_E1CRC_CAS) ||
-                   (pi->p.port_mode == CFG_FRAME_E1CRC_CAS_AMI))) ||
-                   ((i > 23) && (!e1mode))) /* disable if T1 mode */
-                       /* make tslot unavailable for this mode */
-                       pi->tsm[i] = 0xff;
-               else
-                       /* make tslot available for assignment */
-                       pi->tsm[i] = 0x00;
-               for (j = 0; j < 8; j++)
-                       bits[j] = -1;
-               for (ch = 0; ch < MUSYCC_NCHANS; ch++) {
-                       if ((pi->chan[ch]->state == UP) &&
-                           (pi->chan[ch]->p.bitmask[i])) {
-                               usedby++;
-                               last = ch;
-                               lastval = pi->chan[ch]->p.bitmask[i];
-                               for (j = 0; j < 8; j++)
-                                       if (lastval & (1 << j))
-                                               bits[j] = ch;
-                               pi->tsm[i] |= lastval;
-                       }
-               }
-               if (!usedby)
-                       ts = 0;
-               else if ((usedby == 1) && (lastval == 0xff))
-                       ts = (4 << 5) | last;
-               else if ((usedby == 1) && (lastval == 0x7f))
-                       ts = (5 << 5) | last;
-               else {
-                       int         idx;
-
-                       if (bits[0] < 0)
-                               ts = (6 << 5) | (idx = last);
-                       else
-                               ts = (7 << 5) | (idx = bits[0]);
-                       for (j = 1; j < 8; j++) {
-                               pi->regram->rscm[idx * 8 + j] =
-                                       (bits[j] < 0) ? 0 : (0x80 | bits[j]);
-                               pi->regram->tscm[idx * 8 + j] =
-                                       (bits[j] < 0) ? 0 : (0x80 | bits[j]);
-                       }
-               }
-               pi->regram->rtsm[i] = ts;
-               pi->regram->ttsm[i] = ts;
-       }
-       FLUSH_MEM_WRITE();
-
-       musycc_serv_req(pi, SR_TIMESLOT_MAP | SR_RX_DIRECTION);
-       musycc_serv_req(pi, SR_TIMESLOT_MAP | SR_TX_DIRECTION);
-       musycc_serv_req(pi, SR_SUBCHANNEL_MAP | SR_RX_DIRECTION);
-       musycc_serv_req(pi, SR_SUBCHANNEL_MAP | SR_TX_DIRECTION);
-}
-#endif
-
-
-#ifdef SBE_WAN256T3_ENABLE
-       void
-musycc_update_timeslots(mpi_t *pi)
-{
-       mch_t      *ch;
-
-       u_int8_t    ts, hmask, tsen;
-       int         gchan;
-       int         i;
-
-#ifdef SBE_PMCC4_ENABLE
-       hmask = (0x1f << pi->up->p.hypersize) & 0x1f;
-#endif
-#ifdef SBE_WAN256T3_ENABLE
-       hmask = (0x1f << hyperdummy) & 0x1f;
-#endif
-       for (i = 0; i < 128; i++) {
-               gchan = ((pi->portnum * MUSYCC_NCHANS) +
-                       (i & hmask)) % MUSYCC_NCHANS;
-               ch = pi->chan[gchan];
-               if (ch->p.mode_56k)
-                       tsen = MODE_56KBPS;
-               else
-                       tsen = MODE_64KBPS;     /* also the default */
-               ts = ((pi->portnum % 4) == (i / 32)) ? (tsen << 5) | (i & hmask) : 0;
-               pi->regram->rtsm[i] = ts;
-               pi->regram->ttsm[i] = ts;
-       }
-       FLUSH_MEM_WRITE();
-       musycc_serv_req(pi, SR_TIMESLOT_MAP | SR_RX_DIRECTION);
-       musycc_serv_req(pi, SR_TIMESLOT_MAP | SR_TX_DIRECTION);
-}
-#endif
-
-
- /*
-  * This routine converts a generic library channel configuration parameter
-  * into a hardware specific register value (IE. MUSYCC CCD Register).
-  */
-u_int32_t
-musycc_chan_proto(int proto)
-{
-       int         reg;
-
-       switch (proto) {
-       case CFG_CH_PROTO_TRANS:        /* 0 */
-               reg = MUSYCC_CCD_TRANS;
-               break;
-       case CFG_CH_PROTO_SS7:          /* 1 */
-               reg = MUSYCC_CCD_SS7;
-               break;
-       default:
-       case CFG_CH_PROTO_ISLP_MODE:   /* 4 */
-       case CFG_CH_PROTO_HDLC_FCS16:  /* 2 */
-               reg = MUSYCC_CCD_HDLC_FCS16;
-               break;
-       case CFG_CH_PROTO_HDLC_FCS32:  /* 3 */
-               reg = MUSYCC_CCD_HDLC_FCS32;
-               break;
-       }
-
-       return reg;
-}
-
-#ifdef SBE_WAN256T3_ENABLE
-static void __init
-musycc_init_port(mpi_t *pi)
-{
-       pci_write_32((u_int32_t *) &pi->reg->gbp, OS_vtophys(pi->regram));
-
-       pi->regram->grcd =
-               __constant_cpu_to_le32(MUSYCC_GRCD_RX_ENABLE |
-                                      MUSYCC_GRCD_TX_ENABLE |
-                                      MUSYCC_GRCD_SF_ALIGN |
-                                      MUSYCC_GRCD_SUBCHAN_DISABLE |
-                                      MUSYCC_GRCD_OOFMP_DISABLE |
-                                      MUSYCC_GRCD_COFAIRQ_DISABLE |
-                                      MUSYCC_GRCD_MC_ENABLE |
-                                      (MUSYCC_GRCD_POLLTH_32 << MUSYCC_GRCD_POLLTH_SHIFT));
-
-       pi->regram->pcd =
-               __constant_cpu_to_le32(MUSYCC_PCD_E1X4_MODE |
-                                      MUSYCC_PCD_TXDATA_RISING |
-                                      MUSYCC_PCD_TX_DRIVEN);
-
-       /* Message length descriptor */
-       pi->regram->mld = __constant_cpu_to_le32(cxt1e1_max_mru | (cxt1e1_max_mru << 16));
-       FLUSH_MEM_WRITE();
-
-       musycc_serv_req(pi, SR_GROUP_INIT | SR_RX_DIRECTION);
-       musycc_serv_req(pi, SR_GROUP_INIT | SR_TX_DIRECTION);
-
-       musycc_init_mdt(pi);
-
-       musycc_update_timeslots(pi);
-}
-#endif
-
-
-status_t    __init
-musycc_init(ci_t *ci)
-{
-       char       *regaddr;        /* temp for address boundary calculations */
-       int         i, gchan;
-
-       OS_sem_init(&ci->sem_wdbusy, SEM_AVAILABLE); /* watchdog exclusion */
-
-       /*
-        * Per MUSYCC manual, Section 6.3.4 - "The host must allocate a dword
-        * aligned memory segment for interrupt queue pointers."
-        */
-
-#define INT_QUEUE_BOUNDARY  4
-
-       regaddr = kzalloc((INT_QUEUE_SIZE + 1) * sizeof(u_int32_t),
-                         GFP_KERNEL | GFP_DMA);
-       if (!regaddr)
-               return -ENOMEM;
-       ci->iqd_p_saved = regaddr;      /* save orig value for free's usage */
-       /* this calculates closest boundary */
-       ci->iqd_p = (u_int32_t *) ((unsigned long)(regaddr + INT_QUEUE_BOUNDARY - 1) &
-                                  (~(INT_QUEUE_BOUNDARY - 1)));
-
-       for (i = 0; i < INT_QUEUE_SIZE; i++)
-               ci->iqd_p[i] = __constant_cpu_to_le32(INT_EMPTY_ENTRY);
-
-       for (i = 0; i < ci->max_port; i++) {
-               mpi_t      *pi = &ci->port[i];
-
-               /*
-                * Per MUSYCC manual, Section 6.3.2 - "The host must allocate a 2KB
-                * bound memory segment for Channel Group 0."
-                */
-
-#define GROUP_BOUNDARY   0x800
-
-               regaddr = kzalloc(sizeof(struct musycc_groupr) + GROUP_BOUNDARY,
-                                 GFP_KERNEL | GFP_DMA);
-               if (!regaddr) {
-                       for (gchan = 0; gchan < i; gchan++) {
-                               pi = &ci->port[gchan];
-                               kfree(pi->reg);
-                               pi->reg = NULL;
-                       }
-                       return -ENOMEM;
-               }
-               pi->regram_saved = regaddr; /* save orig value for free's usage */
-               /* this calculates closest boundary */
-               pi->regram = (struct musycc_groupr *) ((unsigned long)(regaddr + GROUP_BOUNDARY - 1) &
-                               (~(GROUP_BOUNDARY - 1)));
-       }
-
-       /* any board centric MUSYCC commands will use group ZERO as its "home" */
-       ci->regram = ci->port[0].regram;
-       musycc_serv_req(&ci->port[0], SR_CHIP_RESET);
-
-       pci_write_32((u_int32_t *) &ci->reg->gbp, OS_vtophys(ci->regram));
-       pci_flush_write(ci);
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-       ci->regram->__glcd = __constant_cpu_to_le32(GCD_MAGIC);
-#else
-       /* standard driver POLLS for INTB via CPLD register */
-       ci->regram->__glcd = __constant_cpu_to_le32(GCD_MAGIC |
-                                                   MUSYCC_GCD_INTB_DISABLE);
-#endif
-
-       ci->regram->__iqp = cpu_to_le32(OS_vtophys(&ci->iqd_p[0]));
-       ci->regram->__iql = __constant_cpu_to_le32(INT_QUEUE_SIZE - 1);
-       pci_write_32((u_int32_t *) &ci->reg->dacbp, 0);
-       FLUSH_MEM_WRITE();
-
-       ci->state = C_RUNNING;          /* mark as full interrupt processing
-                                        * available */
-
-       musycc_serv_req(&ci->port[0], SR_GLOBAL_INIT); /* FIRST INTERRUPT ! */
-
-       /* sanity check settable parameters */
-
-       if (cxt1e1_max_mru > 0xffe) {
-               pr_warning("Maximum allowed MRU exceeded, resetting %d to %d.\n",
-                          cxt1e1_max_mru, 0xffe);
-               cxt1e1_max_mru = 0xffe;
-       }
-       if (cxt1e1_max_mtu > 0xffe) {
-               pr_warning("Maximum allowed MTU exceeded, resetting %d to %d.\n",
-                          cxt1e1_max_mtu, 0xffe);
-               cxt1e1_max_mtu = 0xffe;
-       }
-#ifdef SBE_WAN256T3_ENABLE
-       for (i = 0; i < MUSYCC_NPORTS; i++)
-               musycc_init_port(&ci->port[i]);
-#endif
-
-       return SBE_DRVR_SUCCESS;        /* no error */
-}
-
-
-void
-musycc_bh_tx_eom(mpi_t *pi, int gchan)
-{
-       mch_t      *ch;
-       struct mdesc *md;
-
-       volatile u_int32_t status;
-
-       ch = pi->chan[gchan];
-       if (!ch || ch->state != UP) {
-               if (cxt1e1_log_level >= LOG_ERROR)
-                       pr_info("%s: intr: xmit EOM on uninitialized channel %d\n",
-                               pi->up->devname, gchan);
-       }
-       if (!ch || !ch->mdt)
-               return;                     /* note: mdt==0 implies a malloc()
-                                            * failure w/in chan_up() routine */
-
-       do {
-               FLUSH_MEM_READ();
-               md = ch->txd_irq_srv;
-               status = le32_to_cpu(md->status);
-
-               /*
-                * Note: Per MUSYCC Ref 6.4.9, the host does not poll a host-owned
-                * Transmit Buffer Descriptor during Transparent Mode.
-                */
-               if (status & MUSYCC_TX_OWNED) {
-                       int         readCount, loopCount;
-
-                       /***********************************************************/
-                       /* HW Bug Fix                                              */
-                       /* ----------                                              */
-                       /* Under certain PCI Bus loading conditions, the data      */
-                       /* associated with an update of Shared Memory is delayed   */
-                       /* relative to its PCI Interrupt.  This is caught when     */
-                       /* the host determines it does not yet OWN the descriptor. */
-                       /***********************************************************/
-
-                       readCount = 0;
-                       while (status & MUSYCC_TX_OWNED) {
-                               for (loopCount = 0; loopCount < 0x30; loopCount++)
-                                       /* use call to avoid optimization
-                                        * removal of dummy delay */
-                                       OS_uwait_dummy();
-                               FLUSH_MEM_READ();
-                               status = le32_to_cpu(md->status);
-                               if (readCount++ > 40)
-                                       break; /* don't wait any longer */
-                       }
-                       if (status & MUSYCC_TX_OWNED) {
-                               if (cxt1e1_log_level >= LOG_MONITOR) {
-                                       pr_info("%s: Port %d Chan %2d - unexpected TX msg ownership intr (md %p sts %x)\n",
-                                               pi->up->devname, pi->portnum,
-                                               ch->channum, md, status);
-                                       pr_info("++ User 0x%p IRQ_SRV 0x%p USR_ADD 0x%p QStopped %x, start_tx %x tx_full %d txd_free %d mode %x\n",
-                                               ch->user, ch->txd_irq_srv,
-                                               ch->txd_usr_add,
-                                               sd_queue_stopped(ch->user),
-                                               ch->ch_start_tx, ch->tx_full,
-                                               ch->txd_free, ch->p.chan_mode);
-                                       musycc_dump_txbuffer_ring(ch, 0);
-                               }
-                               break;              /* Not our mdesc, done */
-                       } else {
-                               if (cxt1e1_log_level >= LOG_MONITOR)
-                                       pr_info("%s: Port %d Chan %2d - recovered TX msg ownership [%d] (md %p sts %x)\n",
-                                               pi->up->devname, pi->portnum,
-                                               ch->channum, readCount,
-                                               md, status);
-                       }
-               }
-               ch->txd_irq_srv = md->snext;
-
-               md->data = 0;
-               if (md->mem_token) {
-                       /* upcount channel */
-                       atomic_sub(OS_mem_token_tlen(md->mem_token),
-                                  &ch->tx_pending);
-                       /* upcount card */
-                       atomic_sub(OS_mem_token_tlen(md->mem_token),
-                                  &pi->up->tx_pending);
-#ifdef SBE_WAN256T3_ENABLE
-                       if (!atomic_read(&pi->up->tx_pending))
-                               wan256t3_led(pi->up, LED_TX, 0);
-#endif
-                       OS_mem_token_free_irq(md->mem_token);
-                       md->mem_token = NULL;
-               }
-               md->status = 0;
-#ifdef RLD_TXFULL_DEBUG
-               if (cxt1e1_log_level >= LOG_MONITOR2)
-                       pr_info("~~ tx_eom: tx_full %x  txd_free %d -> %d\n",
-                               ch->tx_full, ch->txd_free, ch->txd_free + 1);
-#endif
-               ++ch->txd_free;
-               FLUSH_MEM_WRITE();
-
-               if ((ch->p.chan_mode != CFG_CH_PROTO_TRANS) &&
-                   (status & EOBIRQ_ENABLE)) {
-                       if (cxt1e1_log_level >= LOG_MONITOR)
-                               pr_info("%s: Mode (%x) incorrect EOB status (%x)\n",
-                                       pi->up->devname, ch->p.chan_mode,
-                                       status);
-                       if ((status & EOMIRQ_ENABLE) == 0)
-                               break;
-               }
-       } while ((ch->p.chan_mode != CFG_CH_PROTO_TRANS) &&
-                ((status & EOMIRQ_ENABLE) == 0));
-       /*
-        * NOTE: (The above 'while' is coupled w/ previous 'do', way above.) Each
-        * Transparent data buffer has the EOB bit, and NOT the EOM bit, set and
-        * will furthermore have a separate IQD associated with each messages
-        * buffer.
-        */
-
-       FLUSH_MEM_READ();
-       /*
-        * Smooth flow control hysterisis by maintaining task stoppage until half
-        * the available write buffers are available.
-        */
-       if (ch->tx_full && (ch->txd_free >= (ch->txd_num / 2))) {
-               /*
-                * Then, only releave task stoppage if we actually have enough
-                * buffers to service the last requested packet.  It may require MORE
-                * than half the available!
-                */
-               if (ch->txd_free >= ch->txd_required) {
-
-#ifdef RLD_TXFULL_DEBUG
-                       if (cxt1e1_log_level >= LOG_MONITOR2)
-                               pr_info("tx_eom[%d]: enable xmit tx_full no more, txd_free %d txd_num/2 %d\n",
-                                       ch->channum,
-                                       ch->txd_free, ch->txd_num / 2);
-#endif
-                       ch->tx_full = 0;
-                       ch->txd_required = 0;
-                       /* re-enable to catch flow controlled channel */
-                       sd_enable_xmit(ch->user);
-               }
-       }
-#ifdef RLD_TXFULL_DEBUG
-       else if (ch->tx_full) {
-               if (cxt1e1_log_level >= LOG_MONITOR2)
-                       pr_info("tx_eom[%d]: bypass TX enable though room available? (txd_free %d txd_num/2 %d)\n",
-                               ch->channum,
-                               ch->txd_free, ch->txd_num / 2);
-       }
-#endif
-
-       FLUSH_MEM_WRITE();
-}
-
-
-static void
-musycc_bh_rx_eom(mpi_t *pi, int gchan)
-{
-       mch_t      *ch;
-       void       *m, *m2;
-       struct mdesc *md;
-       volatile u_int32_t status;
-       u_int32_t   error;
-
-       ch = pi->chan[gchan];
-       if (!ch || ch->state != UP) {
-               if (cxt1e1_log_level > LOG_ERROR)
-                       pr_info("%s: intr: receive EOM on uninitialized channel %d\n",
-                               pi->up->devname, gchan);
-               return;
-       }
-       if (!ch->mdr)
-               return;                     /* can this happen ? */
-
-       for (;;) {
-               FLUSH_MEM_READ();
-               md = &ch->mdr[ch->rxix_irq_srv];
-               status = le32_to_cpu(md->status);
-               if (!(status & HOST_RX_OWNED))
-                       break;                  /* Not our mdesc, done */
-               m = md->mem_token;
-               error = (status >> 16) & 0xf;
-               if (error == 0) {
-                       {
-                               m2 = OS_mem_token_alloc(cxt1e1_max_mru);
-                               if (m2) {
-                                       /* substitute the mbuf+cluster */
-                                       md->mem_token = m2;
-                                       md->data = cpu_to_le32(OS_vtophys(
-                                                              OS_mem_token_data(m2)));
-
-                                       /* pass the received mbuf upward */
-                                       sd_recv_consume(m, status & LENGTH_MASK,
-                                                       ch->user);
-                                       ch->s.rx_packets++;
-                                       ch->s.rx_bytes += status & LENGTH_MASK;
-                               } else
-                                       ch->s.rx_dropped++;
-                       }
-               } else if (error == ERR_FCS)
-                       ch->s.rx_crc_errors++;
-               else if (error == ERR_ALIGN)
-                       ch->s.rx_missed_errors++;
-               else if (error == ERR_ABT)
-                       ch->s.rx_missed_errors++;
-               else if (error == ERR_LNG)
-                       ch->s.rx_length_errors++;
-               else if (error == ERR_SHT)
-                       ch->s.rx_length_errors++;
-               FLUSH_MEM_WRITE();
-               status = cxt1e1_max_mru;
-               if (ch->p.chan_mode == CFG_CH_PROTO_TRANS)
-                       status |= EOBIRQ_ENABLE;
-               md->status = cpu_to_le32(status);
-
-               /* Check next mdesc in the ring */
-               if (++ch->rxix_irq_srv >= ch->rxd_num)
-                       ch->rxix_irq_srv = 0;
-               FLUSH_MEM_WRITE();
-       }
-}
-
-
-irqreturn_t
-musycc_intr_th_handler(void *devp)
-{
-       ci_t       *ci = (ci_t *) devp;
-       volatile u_int32_t status, currInt = 0;
-       u_int32_t   nextInt, intCnt;
-
-       /*
-        * Hardware not available, potential interrupt hang.  But since interrupt
-        * might be shared, just return.
-        */
-       if (ci->state == C_INIT)
-               return IRQ_NONE;
-       /*
-        * Marked as hardware available. Don't service interrupts, just clear the
-        * event.
-        */
-
-       if (ci->state == C_IDLE) {
-               status = pci_read_32((u_int32_t *) &ci->reg->isd);
-
-               /* clear the interrupt but process nothing else */
-               pci_write_32((u_int32_t *) &ci->reg->isd, status);
-               return IRQ_HANDLED;
-       }
-       FLUSH_PCI_READ();
-       FLUSH_MEM_READ();
-
-       status = pci_read_32((u_int32_t *) &ci->reg->isd);
-       nextInt = INTRPTS_NEXTINT(status);
-       intCnt = INTRPTS_INTCNT(status);
-       ci->intlog.drvr_intr_thcount++;
-
-       /*********************************************************/
-       /* HW Bug Fix                                            */
-       /* ----------                                            */
-       /* Under certain PCI Bus loading conditions, the         */
-       /* MUSYCC looses the data associated with an update      */
-       /* of its ISD and erroneously returns the immediately    */
-       /* preceding 'nextInt' value.  However, the 'intCnt'     */
-       /* value appears to be correct.  By not starting service */
-       /* where the 'missing' 'nextInt' SHOULD point causes     */
-       /* the IQD not to be serviced - the 'not serviced'       */
-       /* entries then remain and continue to increase as more  */
-       /* incorrect ISD's are encountered.                      */
-       /*********************************************************/
-
-       if (nextInt != INTRPTS_NEXTINT(ci->intlog.this_status_new)) {
-               if (cxt1e1_log_level >= LOG_MONITOR) {
-                       pr_info("%s: note - updated ISD from %08x to %08x\n",
-                               ci->devname, status,
-                               (status & (~INTRPTS_NEXTINT_M)) |
-                               ci->intlog.this_status_new);
-               }
-               /*
-                * Replace bogus status with software corrected value.
-                *
-                * It's not known whether, during this problem occurrence, if the
-                * INTFULL bit is correctly reported or not.
-                */
-               status = (status & (~INTRPTS_NEXTINT_M)) |
-                        (ci->intlog.this_status_new);
-               nextInt = INTRPTS_NEXTINT(status);
-       }
-       /**********************************************/
-       /* Cn847x Bug Fix                             */
-       /* --------------                             */
-       /* Fix for inability to write back same index */
-       /* as read for a full interrupt queue.        */
-       /**********************************************/
-
-       if (intCnt == INT_QUEUE_SIZE)
-               currInt = ((intCnt - 1) + nextInt) & (INT_QUEUE_SIZE - 1);
-       else
-               /************************************************/
-               /* Interrupt Write Location Issues              */
-               /* -------------------------------              */
-               /* When the interrupt status descriptor is      */
-               /* written, the interrupt line is de-asserted   */
-               /* by the Cn847x.  In the case of MIPS          */
-               /* microprocessors, this must occur at the      */
-               /* beginning of the interrupt handler so that   */
-               /* the interrupt handle is not re-entered due   */
-               /* to interrupt dis-assertion latency.          */
-               /* In the case of all other processors, this    */
-               /* action should occur at the end of the        */
-               /* interrupt handler to avoid overwriting the   */
-               /* interrupt queue.                             */
-               /************************************************/
-
-               if (intCnt)
-                       currInt = (intCnt + nextInt) & (INT_QUEUE_SIZE - 1);
-               else {
-                       /*
-                        * NOTE: Servicing an interrupt whose ISD contains a count of ZERO
-                        * can be indicative of a Shared Interrupt chain.  Our driver can be
-                        * called from the system's interrupt handler as a matter of the OS
-                        * walking the chain.  As the chain is walked, the interrupt will
-                        * eventually be serviced by the correct driver/handler.
-                        */
-                       return IRQ_NONE;
-               }
-
-       ci->iqp_tailx = currInt;
-
-       currInt <<= INTRPTS_NEXTINT_S;
-       ci->intlog.last_status_new = ci->intlog.this_status_new;
-       ci->intlog.this_status_new = currInt;
-
-       if ((cxt1e1_log_level >= LOG_WARN) && (status & INTRPTS_INTFULL_M))
-               pr_info("%s: Interrupt queue full condition occurred\n",
-                       ci->devname);
-       if (cxt1e1_log_level >= LOG_DEBUG)
-               pr_info("%s: interrupts pending, isd @ 0x%p: %x curr %d cnt %d NEXT %d\n",
-                       ci->devname, &ci->reg->isd,
-                       status, nextInt, intCnt,
-                       (intCnt + nextInt) & (INT_QUEUE_SIZE - 1));
-
-       FLUSH_MEM_WRITE();
-#if defined(SBE_ISR_TASKLET)
-       pci_write_32((u_int32_t *) &ci->reg->isd, currInt);
-       atomic_inc(&ci->bh_pending);
-       tasklet_schedule(&ci->ci_musycc_isr_tasklet);
-#elif defined(SBE_ISR_IMMEDIATE)
-       pci_write_32((u_int32_t *) &ci->reg->isd, currInt);
-       atomic_inc(&ci->bh_pending);
-       queue_task(&ci->ci_musycc_isr_tq, &tq_immediate);
-       mark_bh(IMMEDIATE_BH);
-#elif defined(SBE_ISR_INLINE)
-       (void) musycc_intr_bh_tasklet(ci);
-       pci_write_32((u_int32_t *) &ci->reg->isd, currInt);
-#endif
-       return IRQ_HANDLED;
-}
-
-
-#if defined(SBE_ISR_IMMEDIATE)
-unsigned long
-#else
-void
-#endif
-musycc_intr_bh_tasklet(ci_t *ci)
-{
-       mpi_t      *pi;
-       mch_t      *ch;
-       unsigned int intCnt;
-       volatile u_int32_t currInt = 0;
-       volatile unsigned int headx, tailx;
-       int         readCount, loopCount;
-       int         group, gchan, event, err, tx;
-       u_int32_t   badInt = INT_EMPTY_ENTRY;
-       u_int32_t   badInt2 = INT_EMPTY_ENTRY2;
-
-       /*
-        * Hardware not available, potential interrupt hang.  But since interrupt
-        * might be shared, just return.
-        */
-       if ((drvr_state != SBE_DRVR_AVAILABLE) || (ci->state == C_INIT)) {
-#if defined(SBE_ISR_IMMEDIATE)
-               return 0L;
-#else
-               return;
-#endif
-       }
-#if defined(SBE_ISR_TASKLET) || defined(SBE_ISR_IMMEDIATE)
-       if (drvr_state != SBE_DRVR_AVAILABLE) {
-#if defined(SBE_ISR_TASKLET)
-               return;
-#elif defined(SBE_ISR_IMMEDIATE)
-               return 0L;
-#endif
-       }
-#elif defined(SBE_ISR_INLINE)
-       /* no semaphore taken, no double checks */
-#endif
-
-       ci->intlog.drvr_intr_bhcount++;
-       FLUSH_MEM_READ();
-       {
-               unsigned int bh = atomic_read(&ci->bh_pending);
-
-               max_bh = max(bh, max_bh);
-       }
-       atomic_set(&ci->bh_pending, 0);/* if here, no longer pending */
-       while ((headx = ci->iqp_headx) != (tailx = ci->iqp_tailx)) {
-               intCnt = (tailx >= headx) ? (tailx - headx) : (tailx - headx + INT_QUEUE_SIZE);
-               currInt = le32_to_cpu(ci->iqd_p[headx]);
-
-               max_intcnt = max(intCnt, max_intcnt);  /* RLD DEBUG */
-
-               /**************************************************/
-               /* HW Bug Fix                                     */
-               /* ----------                                     */
-               /* The following code checks for the condition    */
-               /* of interrupt assertion before interrupt        */
-               /* queue update.  This is a problem on several    */
-               /* PCI-Local bridge chips found on some products. */
-               /**************************************************/
-
-               readCount = 0;
-               if ((currInt == badInt) || (currInt == badInt2))
-                       ci->intlog.drvr_int_failure++;
-
-               while ((currInt == badInt) || (currInt == badInt2)) {
-                       for (loopCount = 0; loopCount < 0x30; loopCount++)
-                               /* use call to avoid optimization
-                                * removal of dummy delay
-                                */
-                               OS_uwait_dummy();
-                       FLUSH_MEM_READ();
-                       currInt = le32_to_cpu(ci->iqd_p[headx]);
-                       if (readCount++ > 20)
-                               break;
-               }
-
-               /* catch failure of Bug Fix checking */
-               if ((currInt == badInt) || (currInt == badInt2)) {
-                       if (cxt1e1_log_level >= LOG_WARN)
-                               pr_info("%s: Illegal Interrupt Detected @ 0x%p, mod %d.)\n",
-                                       ci->devname, &ci->iqd_p[headx], headx);
-
-                       /*
-                        * If the descriptor has not recovered, then leaving the EMPTY
-                        * entry set will not signal to the MUSYCC that this descriptor
-                        * has been serviced. The Interrupt Queue can then start losing
-                        * available descriptors and MUSYCC eventually encounters and
-                        * reports the INTFULL condition.  Per manual, changing any bit
-                        * marks descriptor as available, thus the use of different
-                        * EMPTY_ENTRY values.
-                        */
-
-                       if (currInt == badInt)
-                               ci->iqd_p[headx] = __constant_cpu_to_le32(INT_EMPTY_ENTRY2);
-                       else
-                               ci->iqd_p[headx] = __constant_cpu_to_le32(INT_EMPTY_ENTRY);
-                       /* insure wrapness */
-                       ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1);
-                       FLUSH_MEM_WRITE();
-                       FLUSH_MEM_READ();
-                       continue;
-               }
-               group = INTRPT_GRP(currInt);
-               gchan = INTRPT_CH(currInt);
-               event = INTRPT_EVENT(currInt);
-               err = INTRPT_ERROR(currInt);
-               tx = currInt & INTRPT_DIR_M;
-
-               ci->iqd_p[headx] = __constant_cpu_to_le32(INT_EMPTY_ENTRY);
-               FLUSH_MEM_WRITE();
-
-               if (cxt1e1_log_level >= LOG_DEBUG) {
-                       if (err != 0)
-                               pr_info(" %08x -> err: %2d,", currInt, err);
-
-                       pr_info("+ interrupt event: %d, grp: %d, chan: %2d, side: %cX\n",
-                               event, group, gchan, tx ? 'T' : 'R');
-               }
-               /* notice that here we assume 1-1 group - port mapping */
-               pi = &ci->port[group];
-               ch = pi->chan[gchan];
-               switch (event) {
-               case EVE_SACK:              /* Service Request Acknowledge */
-                       if (cxt1e1_log_level >= LOG_DEBUG) {
-                               volatile u_int32_t r;
-
-                               r = pci_read_32((u_int32_t *) &pi->reg->srd);
-                               pr_info("- SACK cmd: %08x (hdw= %08x)\n",
-                                       pi->sr_last, r);
-                       }
-                       /* wake up waiting process */
-                       SD_SEM_GIVE(&pi->sr_sem_wait);
-                       break;
-               case EVE_CHABT: /* Change To Abort Code (0x7e -> 0xff) */
-               case EVE_CHIC:  /* Change To Idle Code (0xff -> 0x7e) */
-                       break;
-               case EVE_EOM:   /* End Of Message */
-               case EVE_EOB:   /* End Of Buffer (Transparent mode) */
-                       if (tx)
-                               musycc_bh_tx_eom(pi, gchan);
-                       else
-                               musycc_bh_rx_eom(pi, gchan);
-                       /*
-                        * MUSYCC Interrupt Descriptor section states that EOB and EOM
-                        * can be combined with the NONE error (as well as others).  So
-                        * drop thru to catch this...
-                        */
-               case EVE_NONE:
-                       if (err == ERR_SHT)
-                               ch->s.rx_length_errors++;
-                       break;
-               default:
-                       if (cxt1e1_log_level >= LOG_WARN)
-                               pr_info("%s: unexpected interrupt event: %d, iqd[%d]: %08x, port: %d\n", ci->devname,
-                                       event, headx, currInt, group);
-                       break;
-               }                           /* switch on event */
-
-
-               /*
-                * Per MUSYCC Manual, Section 6.4.8.3 [Transmit Errors], TX errors
-                * are service-affecting and require action to resume normal
-                * bit-level processing.
-                */
-
-               switch (err) {
-               case ERR_ONR:
-                       /*
-                        * Per MUSYCC manual, Section  6.4.8.3 [Transmit Errors], this
-                        * error requires Transmit channel reactivation.
-                        *
-                        * Per MUSYCC manual, Section  6.4.8.4 [Receive Errors], this error
-                        * requires Receive channel reactivation.
-                        */
-                       if (tx) {
-
-                               /*
-                                * TX ONR Error only occurs when channel is configured for
-                                * Transparent Mode.  However, this code will catch and
-                                * re-activate on ANY TX ONR error.
-                                */
-
-                               /*
-                                * Set flag to re-enable on any next transmit attempt.
-                                */
-                               ch->ch_start_tx = CH_START_TX_ONR;
-
-#ifdef RLD_TRANS_DEBUG
-                               if (1 || cxt1e1_log_level >= LOG_MONITOR)
-#else
-                               if (cxt1e1_log_level >= LOG_MONITOR)
-#endif
-                               {
-                                       pr_info("%s: TX buffer underflow [ONR] on channel %d, mode %x QStopped %x free %d\n",
-                                               ci->devname, ch->channum,
-                                               ch->p.chan_mode,
-                                               sd_queue_stopped(ch->user),
-                                               ch->txd_free);
-#ifdef RLD_DEBUG
-                                       /* problem = ONR on HDLC mode */
-                                       if (ch->p.chan_mode == 2) {
-                                               pr_info("++ Failed Last %x Next %x QStopped %x, start_tx %x tx_full %d txd_free %d mode %x\n",
-                                                       (u_int32_t)ch->txd_irq_srv,
-                                                       (u_int32_t)ch->txd_usr_add,
-                                                       sd_queue_stopped(ch->user),
-                                                       ch->ch_start_tx,
-                                                       ch->tx_full,
-                                                       ch->txd_free,
-                                                       ch->p.chan_mode);
-                                               musycc_dump_txbuffer_ring(ch, 0);
-                                       }
-#endif
-                               }
-                       } else {                 /* RX buffer overrun */
-                               /*
-                                * Per MUSYCC manual, Section 6.4.8.4 [Receive Errors],
-                                * channel recovery for this RX ONR error IS required.  It is
-                                * also suggested to increase the number of receive buffers
-                                * for this channel.  Receive channel reactivation IS
-                                * required, and data has been lost.
-                                */
-                               ch->s.rx_over_errors++;
-                               ch->ch_start_rx = CH_START_RX_ONR;
-
-                               if (cxt1e1_log_level >= LOG_WARN) {
-                                       pr_info("%s: RX buffer overflow [ONR] on channel %d, mode %x\n",
-                                               ci->devname, ch->channum,
-                                               ch->p.chan_mode);
-#ifdef RLD_DEBUG
-                                       musycc_dump_rxbuffer_ring(ch, 0);
-#endif
-                               }
-                       }
-                       musycc_chan_restart(ch);
-                       break;
-               case ERR_BUF:
-                       if (tx) {
-                               ch->s.tx_fifo_errors++;
-                               ch->ch_start_tx = CH_START_TX_BUF;
-                               /*
-                                * Per MUSYCC manual, Section  6.4.8.3 [Transmit Errors],
-                                * this BUFF error requires Transmit channel reactivation.
-                                */
-                               if (cxt1e1_log_level >= LOG_MONITOR)
-                                       pr_info("%s: TX buffer underrun [BUFF] on channel %d, mode %x\n",
-                                               ci->devname, ch->channum,
-                                               ch->p.chan_mode);
-                       } else {                 /* RX buffer overrun */
-                               ch->s.rx_over_errors++;
-                               /*
-                                * Per MUSYCC manual, Section 6.4.8.4 [Receive Errors], HDLC
-                                * mode requires NO recovery for this RX BUFF error is
-                                * required.  It is suggested to increase the FIFO buffer
-                                * space for this channel.  Receive channel reactivation is
-                                * not required, but data has been lost.
-                                */
-                               if (cxt1e1_log_level >= LOG_WARN)
-                                       pr_info("%s: RX buffer overrun [BUFF] on channel %d, mode %x\n",
-                                               ci->devname, ch->channum,
-                                               ch->p.chan_mode);
-                               /*
-                                * Per MUSYCC manual, Section 6.4.9.4 [Receive Errors],
-                                * Transparent mode DOES require recovery for the RX BUFF
-                                * error.  It is suggested to increase the FIFO buffer space
-                                * for this channel.  Receive channel reactivation IS
-                                * required and data has been lost.
-                                */
-                               if (ch->p.chan_mode == CFG_CH_PROTO_TRANS)
-                                       ch->ch_start_rx = CH_START_RX_BUF;
-                       }
-
-                       if (tx || (ch->p.chan_mode == CFG_CH_PROTO_TRANS))
-                               musycc_chan_restart(ch);
-                       break;
-               default:
-                       break;
-               }                           /* switch on err */
-
-               /* Check for interrupt lost condition */
-               if ((currInt & INTRPT_ILOST_M) &&
-                   (cxt1e1_log_level >= LOG_ERROR))
-                       pr_info("%s: Interrupt queue overflow - ILOST asserted\n",
-                               ci->devname);
-               /* insure wrapness */
-               ci->iqp_headx = (headx + 1) & (INT_QUEUE_SIZE - 1);
-               FLUSH_MEM_WRITE();
-               FLUSH_MEM_READ();
-       }                               /* while */
-       if ((cxt1e1_log_level >= LOG_MONITOR2) &&
-           (ci->iqp_headx != ci->iqp_tailx)) {
-               int         bh;
-
-               bh = atomic_read(&CI->bh_pending);
-               pr_info("_bh_: late arrivals, head %d != tail %d, pending %d\n",
-                       ci->iqp_headx, ci->iqp_tailx, bh);
-       }
-#if defined(SBE_ISR_IMMEDIATE)
-       return 0L;
-#endif
-       /* else, nothing returned */
-}
-
-#ifdef SBE_PMCC4_ENABLE
-       status_t
-musycc_chan_down(ci_t *dummy, int channum)
-{
-       mpi_t      *pi;
-       mch_t      *ch;
-       int         i, gchan;
-
-       ch = sd_find_chan(dummy, channum);
-       if (!ch)
-               return -EINVAL;
-       pi = ch->up;
-       gchan = ch->gchan;
-
-       /* Deactivate the channel */
-       musycc_serv_req(pi, SR_CHANNEL_DEACTIVATE | SR_RX_DIRECTION | gchan);
-       ch->ch_start_rx = 0;
-       musycc_serv_req(pi, SR_CHANNEL_DEACTIVATE | SR_TX_DIRECTION | gchan);
-       ch->ch_start_tx = 0;
-
-       if (ch->state == DOWN)
-               return 0;
-       ch->state = DOWN;
-
-       pi->regram->thp[gchan] = 0;
-       pi->regram->tmp[gchan] = 0;
-       pi->regram->rhp[gchan] = 0;
-       pi->regram->rmp[gchan] = 0;
-       FLUSH_MEM_WRITE();
-       for (i = 0; i < ch->txd_num; i++)
-               if (ch->mdt[i].mem_token)
-                       OS_mem_token_free(ch->mdt[i].mem_token);
-
-       for (i = 0; i < ch->rxd_num; i++)
-               if (ch->mdr[i].mem_token)
-                       OS_mem_token_free(ch->mdr[i].mem_token);
-
-       kfree(ch->mdr);
-       ch->mdr = NULL;
-       ch->rxd_num = 0;
-       kfree(ch->mdt);
-       ch->mdt = NULL;
-       ch->txd_num = 0;
-
-       musycc_update_timeslots(pi);
-       c4_fifo_free(pi, ch->gchan);
-
-       pi->openchans--;
-       return 0;
-}
-#endif
-
-int
-musycc_start_xmit(ci_t *ci, int channum, void *mem_token)
-{
-       mch_t      *ch;
-       struct mdesc *md;
-       void       *m2;
-       int         txd_need_cnt;
-       u_int32_t   len;
-
-       ch = sd_find_chan(ci, channum);
-       if (!ch)
-               return -ENOENT;
-
-       /* full interrupt processing available */
-       if (ci->state != C_RUNNING)
-               return -EINVAL;
-       if (ch->state != UP)
-               return -EINVAL;
-
-       /* how else to flag unwritable state ? */
-       if (!(ch->status & TX_ENABLED))
-               return -EROFS;
-
-#ifdef RLD_TRANS_DEBUG
-       if (1 || cxt1e1_log_level >= LOG_MONITOR2)
-#else
-       if (cxt1e1_log_level >= LOG_MONITOR2)
-#endif
-       {
-               pr_info("++ start_xmt[%d]: state %x start %x full %d free %d required %d stopped %x\n",
-                       channum, ch->state, ch->ch_start_tx, ch->tx_full,
-                       ch->txd_free, ch->txd_required,
-                       sd_queue_stopped(ch->user));
-       }
-       /***********************************************/
-       /** Determine total amount of data to be sent **/
-       /***********************************************/
-       m2 = mem_token;
-       txd_need_cnt = 0;
-       for (len = OS_mem_token_tlen(m2); len > 0;
-            m2 = (void *) OS_mem_token_next(m2)) {
-               if (!OS_mem_token_len(m2))
-                       continue;
-               txd_need_cnt++;
-               len -= OS_mem_token_len(m2);
-       }
-
-       if (txd_need_cnt == 0) {
-               if (cxt1e1_log_level >= LOG_MONITOR2)
-                       pr_info("%s channel %d: no TX data in User buffer\n",
-                               ci->devname, channum);
-               OS_mem_token_free(mem_token);
-               return 0;                   /* no data to send */
-       }
-       /*************************************************/
-       /** Are there sufficient descriptors available? **/
-       /*************************************************/
-       if (txd_need_cnt > ch->txd_num) { /* never enough descriptors for this
-                                          * large a buffer */
-               if (cxt1e1_log_level >= LOG_DEBUG)
-                       pr_info("start_xmit: discarding buffer, insufficient descriptor cnt %d, need %d.\n",
-                               ch->txd_num, txd_need_cnt + 1);
-               ch->s.tx_dropped++;
-               OS_mem_token_free(mem_token);
-               return 0;
-       }
-
-       /************************************************************/
-       /** flow control the line if not enough descriptors remain **/
-       /************************************************************/
-       if (txd_need_cnt > ch->txd_free) {
-               if (cxt1e1_log_level >= LOG_MONITOR2)
-                       pr_info("start_xmit[%d]: EBUSY - need more descriptors, have %d of %d need %d\n",
-                               channum, ch->txd_free,
-                               ch->txd_num, txd_need_cnt);
-               ch->tx_full = 1;
-               ch->txd_required = txd_need_cnt;
-               sd_disable_xmit(ch->user);
-               return -EBUSY;               /* tell user to try again later */
-       }
-       /**************************************************/
-       /** Put the user data into MUSYCC data buffer(s) **/
-       /**************************************************/
-       m2 = mem_token;
-       md = ch->txd_usr_add;           /* get current available descriptor */
-
-       for (len = OS_mem_token_tlen(m2); len > 0; m2 = OS_mem_token_next(m2)) {
-               int         u = OS_mem_token_len(m2);
-
-               if (!u)
-                       continue;
-               len -= u;
-
-               /*
-                * Enable following chunks, yet wait to enable the FIRST chunk until
-                * after ALL subsequent chunks are setup.
-                */
-               if (md != ch->txd_usr_add)  /* not first chunk */
-                       /* transfer ownership from HOST to MUSYCC */
-                       u |= MUSYCC_TX_OWNED;
-
-               if (len)                    /* not last chunk */
-                       u |= EOBIRQ_ENABLE;
-               else if (ch->p.chan_mode == CFG_CH_PROTO_TRANS) {
-                       /*
-                        * Per MUSYCC Ref 6.4.9 for Transparent Mode, the host must
-                        * always clear EOMIRQ_ENABLE in every Transmit Buffer Descriptor
-                        * (IE. don't set herein).
-                        */
-                       u |= EOBIRQ_ENABLE;
-               } else
-                       u |= EOMIRQ_ENABLE;     /* EOM, last HDLC chunk */
-
-
-               /* last chunk in hdlc mode */
-               u |= (ch->p.idlecode << IDLE_CODE);
-               if (ch->p.pad_fill_count) {
-                       u |= (PADFILL_ENABLE | (ch->p.pad_fill_count << EXTRA_FLAGS));
-               }
-               /* Fill in mds on last segment, others set ZERO
-                * so that entire token is removed ONLY when ALL
-                * segments have been transmitted.
-                */
-               md->mem_token = len ? NULL : mem_token;
-
-               md->data = cpu_to_le32(OS_vtophys(OS_mem_token_data(m2)));
-               FLUSH_MEM_WRITE();
-               md->status = cpu_to_le32(u);
-               --ch->txd_free;
-               md = md->snext;
-       }
-       FLUSH_MEM_WRITE();
-
-
-       /*
-        * Now transfer ownership of first chunk from HOST to MUSYCC in order to
-        * fire-off this XMIT.
-        */
-       ch->txd_usr_add->status |= __constant_cpu_to_le32(MUSYCC_TX_OWNED);
-       FLUSH_MEM_WRITE();
-       ch->txd_usr_add = md;
-
-       len = OS_mem_token_tlen(mem_token);
-       atomic_add(len, &ch->tx_pending);
-       atomic_add(len, &ci->tx_pending);
-       ch->s.tx_packets++;
-       ch->s.tx_bytes += len;
-       /*
-        * If an ONR was seen, then channel requires poking to restart
-        * transmission.
-        */
-       if (ch->ch_start_tx)
-               musycc_chan_restart(ch);
-#ifdef SBE_WAN256T3_ENABLE
-       wan256t3_led(ci, LED_TX, LEDV_G);
-#endif
-       return 0;
-}
-
-
-/*** End-of-File ***/
diff --git a/drivers/staging/cxt1e1/musycc.h b/drivers/staging/cxt1e1/musycc.h
deleted file mode 100644 (file)
index 56fb42f..0000000
+++ /dev/null
@@ -1,427 +0,0 @@
-#ifndef _INC_MUSYCC_H_
-#define _INC_MUSYCC_H_
-
-/*-----------------------------------------------------------------------------
- * musycc.h - Multichannel Synchronous Communications Controller
- *            CN8778/8474A/8472A/8471A
- *
- * Copyright (C) 2002-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/types.h>
-
-#define VINT8   volatile u_int8_t
-#define VINT32  volatile u_int32_t
-
-#include "pmcc4_defs.h"
-
-
-/*------------------------------------------------------------------------
-//      Vendor, Board Identification definitions
-//------------------------------------------------------------------------
-*/
-
-#define PCI_VENDOR_ID_CONEXANT   0x14f1
-#define PCI_DEVICE_ID_CN8471     0x8471
-#define PCI_DEVICE_ID_CN8472     0x8472
-#define PCI_DEVICE_ID_CN8474     0x8474
-#define PCI_DEVICE_ID_CN8478     0x8478
-#define PCI_DEVICE_ID_CN8500     0x8500
-#define PCI_DEVICE_ID_CN8501     0x8501
-#define PCI_DEVICE_ID_CN8502     0x8502
-#define PCI_DEVICE_ID_CN8503     0x8503
-
-#define INT_QUEUE_SIZE    MUSYCC_NIQD
-
-/* RAM image of MUSYCC registers laid out as a C structure */
-struct musycc_groupr {
-       VINT32      thp[32];    /* Transmit Head Pointer [5-29]           */
-       VINT32      tmp[32];    /* Transmit Message Pointer [5-30]        */
-       VINT32      rhp[32];    /* Receive Head Pointer [5-29]            */
-       VINT32      rmp[32];    /* Receive Message Pointer [5-30]         */
-       VINT8       ttsm[128];  /* Time Slot Map [5-22]                   */
-       VINT8       tscm[256];  /* Subchannel Map [5-24]                  */
-       VINT32      tcct[32];   /* Channel Configuration [5-26]           */
-       VINT8       rtsm[128];  /* Time Slot Map [5-22]                   */
-       VINT8       rscm[256];  /* Subchannel Map [5-24]                  */
-       VINT32      rcct[32];   /* Channel Configuration [5-26]           */
-       VINT32      __glcd;     /* Global Configuration Descriptor [5-10] */
-       VINT32      __iqp;      /* Interrupt Queue Pointer [5-36]         */
-       VINT32      __iql;      /* Interrupt Queue Length [5-36]          */
-       VINT32      grcd;       /* Group Configuration Descriptor [5-16]  */
-       VINT32      mpd;        /* Memory Protection Descriptor [5-18]    */
-       VINT32      mld;        /* Message Length Descriptor [5-20]       */
-       VINT32      pcd;        /* Port Configuration Descriptor [5-19]   */
-};
-
-/* hardware MUSYCC registers laid out as a C structure */
-struct musycc_globalr {
-       VINT32      gbp;        /* Group Base Pointer                     */
-       VINT32      dacbp;      /* Dual Address Cycle Base Pointer        */
-       VINT32      srd;        /* Service Request Descriptor             */
-       VINT32      isd;        /* Interrupt Service Descriptor           */
-       /*
-        * adjust __thp due to above 4 registers, which are not contained
-        * within musycc_groupr[]. All __XXX[] are just place holders,
-        * anyhow.
-        */
-       VINT32      __thp[32 - 4];      /* Transmit Head Pointer [5-29]           */
-       VINT32      __tmp[32];  /* Transmit Message Pointer [5-30]        */
-       VINT32      __rhp[32];  /* Receive Head Pointer [5-29]            */
-       VINT32      __rmp[32];  /* Receive Message Pointer [5-30]         */
-       VINT8       ttsm[128];  /* Time Slot Map [5-22]                   */
-       VINT8       tscm[256];  /* Subchannel Map [5-24]                  */
-       VINT32      tcct[32];   /* Channel Configuration [5-26]           */
-       VINT8       rtsm[128];  /* Time Slot Map [5-22]                   */
-       VINT8       rscm[256];  /* Subchannel Map [5-24]                  */
-       VINT32      rcct[32];   /* Channel Configuration [5-26]           */
-       VINT32      glcd;       /* Global Configuration Descriptor [5-10] */
-       VINT32      iqp;        /* Interrupt Queue Pointer [5-36]         */
-       VINT32      iql;        /* Interrupt Queue Length [5-36]          */
-       VINT32      grcd;       /* Group Configuration Descriptor [5-16]  */
-       VINT32      mpd;        /* Memory Protection Descriptor [5-18]    */
-       VINT32      mld;        /* Message Length Descriptor [5-20]       */
-       VINT32      pcd;        /* Port Configuration Descriptor [5-19]   */
-       VINT32      rbist;      /* Receive BIST status [5-4]              */
-       VINT32      tbist;      /* Receive BIST status [5-4]              */
-};
-
-/* Global Config Descriptor bit macros */
-#define MUSYCC_GCD_ECLK_ENABLE  0x00000800      /* EBUS clock enable */
-#define MUSYCC_GCD_INTEL_SELECT 0x00000400      /* MPU type select */
-#define MUSYCC_GCD_INTA_DISABLE 0x00000008      /* PCI INTA disable */
-#define MUSYCC_GCD_INTB_DISABLE 0x00000004      /* PCI INTB disable */
-#define MUSYCC_GCD_BLAPSE       12      /* Position index for BLAPSE bit
-                                        * field */
-#define MUSYCC_GCD_ALAPSE       8       /* Position index for ALAPSE bit
-                                        * field */
-#define MUSYCC_GCD_ELAPSE       4       /* Position index for ELAPSE bit
-                                        * field */
-#define MUSYCC_GCD_PORTMAP_3    3       /* Reserved */
-#define MUSYCC_GCD_PORTMAP_2    2       /* Port 0=>Grp 0,1,2,3; Port 1=>Grp
-                                        * 4,5,6,7 */
-#define MUSYCC_GCD_PORTMAP_1    1       /* Port 0=>Grp 0,1; Port 1=>Grp 2,3,
-                                        * etc... */
-#define MUSYCC_GCD_PORTMAP_0    0       /* Port 0=>Grp 0; Port 1=>Grp 2,
-                                        * etc... */
-
-/* and board specific assignments... */
-#ifdef SBE_WAN256T3_ENABLE
-#define BLAPSE_VAL      0
-#define ALAPSE_VAL      0
-#define ELAPSE_VAL      7
-#define PORTMAP_VAL     MUSYCC_GCD_PORTMAP_2
-#endif
-
-#ifdef SBE_PMCC4_ENABLE
-#define BLAPSE_VAL      7
-#define ALAPSE_VAL      3
-#define ELAPSE_VAL      7
-#define PORTMAP_VAL     MUSYCC_GCD_PORTMAP_0
-#endif
-
-#define GCD_MAGIC   (((BLAPSE_VAL)<<(MUSYCC_GCD_BLAPSE)) | \
-                    ((ALAPSE_VAL)<<(MUSYCC_GCD_ALAPSE)) | \
-                    ((ELAPSE_VAL)<<(MUSYCC_GCD_ELAPSE)) | \
-                    (MUSYCC_GCD_ECLK_ENABLE) | PORTMAP_VAL)
-
-/* Group Config Descriptor bit macros */
-#define MUSYCC_GRCD_RX_ENABLE       0x00000001  /* Enable receive processing */
-#define MUSYCC_GRCD_TX_ENABLE       0x00000002  /* Enable transmit processing */
-#define MUSYCC_GRCD_SUBCHAN_DISABLE 0x00000004  /* Master disable for
-                                                * subchanneling */
-#define MUSYCC_GRCD_OOFMP_DISABLE   0x00000008  /* Out of Frame message
-                                                * processing disabled all
-                                                * channels */
-#define MUSYCC_GRCD_OOFIRQ_DISABLE  0x00000010  /* Out of Frame/In Frame irqs
-                                                * disabled */
-#define MUSYCC_GRCD_COFAIRQ_DISABLE 0x00000020  /* Change of Frame Alignment
-                                                * irq disabled */
-#define MUSYCC_GRCD_INHRBSD         0x00000100  /* Receive Buffer Status
-                                                * overwrite disabled */
-#define MUSYCC_GRCD_INHTBSD         0x00000200  /* Transmit Buffer Status
-                                                * overwrite disabled */
-#define MUSYCC_GRCD_SF_ALIGN        0x00008000  /* External frame sync */
-#define MUSYCC_GRCD_MC_ENABLE       0x00000040  /* Message configuration bits
-                                                * copy enable. Conexant sez
-                                                * turn this on */
-#define MUSYCC_GRCD_POLLTH_16       0x00000001  /* Poll every 16th frame */
-#define MUSYCC_GRCD_POLLTH_32       0x00000002  /* Poll every 32nd frame */
-#define MUSYCC_GRCD_POLLTH_64       0x00000003  /* Poll every 64th frame */
-#define MUSYCC_GRCD_POLLTH_SHIFT    10  /* Position index for poll throttle
-                                        * bit field */
-#define MUSYCC_GRCD_SUERM_THRESH_SHIFT 16       /* Position index for SUERM
-                                                * count threshold */
-
-/* Port Config Descriptor bit macros */
-#define MUSYCC_PCD_E1X2_MODE       2    /* Port mode in bits 0-2. T1 and E1 */
-#define MUSYCC_PCD_E1X4_MODE       3    /* are defined in cn847x.h */
-#define MUSYCC_PCD_NX64_MODE       4
-#define MUSYCC_PCD_TXDATA_RISING   0x00000010   /* Sample Tx data on TCLK
-                                                * rising edge */
-#define MUSYCC_PCD_TXSYNC_RISING   0x00000020   /* Sample Tx frame sync on
-                                                * TCLK rising edge */
-#define MUSYCC_PCD_RXDATA_RISING   0x00000040   /* Sample Rx data on RCLK
-                                                * rising edge */
-#define MUSYCC_PCD_RXSYNC_RISING   0x00000080   /* Sample Rx frame sync on
-                                                * RCLK rising edge */
-#define MUSYCC_PCD_ROOF_RISING     0x00000100   /* Sample Rx Out Of Frame
-                                                * signal on RCLK rising edge */
-#define MUSYCC_PCD_TX_DRIVEN       0x00000200   /* No mapped timeslots causes
-                                                * logic 1 on output, else
-                                                * tristate */
-#define MUSYCC_PCD_PORTMODE_MASK   0xfffffff8   /* For changing the port mode
-                                                * between E1 and T1 */
-
-/* Time Slot Descriptor bit macros */
-#define MUSYCC_TSD_MODE_64KBPS              4
-#define MUSYCC_TSD_MODE_56KBPS              5
-#define MUSYCC_TSD_SUBCHANNEL_WO_FIRST      6
-#define MUSYCC_TSD_SUBCHANNEL_WITH_FIRST    7
-
-/* Message Descriptor bit macros */
-#define MUSYCC_MDT_BASE03_ADDR     0x00006000
-
-/* Channel Config Descriptor bit macros */
-#define MUSYCC_CCD_BUFIRQ_DISABLE  0x00000002   /* BUFF and ONR irqs disabled */
-#define MUSYCC_CCD_EOMIRQ_DISABLE  0x00000004   /* EOM irq disabled */
-#define MUSYCC_CCD_MSGIRQ_DISABLE  0x00000008   /* LNG, FCS, ALIGN, and ABT
-                                                * irqs disabled */
-#define MUSYCC_CCD_IDLEIRQ_DISABLE 0x00000010   /* CHABT, CHIC, and SHT irqs
-                                                * disabled */
-#define MUSYCC_CCD_FILTIRQ_DISABLE 0x00000020   /* SFILT irq disabled */
-#define MUSYCC_CCD_SDECIRQ_DISABLE 0x00000040   /* SDEC irq disabled */
-#define MUSYCC_CCD_SINCIRQ_DISABLE 0x00000080   /* SINC irq disabled */
-#define MUSYCC_CCD_SUERIRQ_DISABLE 0x00000100   /* SUERR irq disabled */
-#define MUSYCC_CCD_FCS_XFER        0x00000200   /* Propagate FCS along with
-                                                * received data */
-#define MUSYCC_CCD_PROTO_SHIFT     12   /* Position index for protocol bit
-                                        * field */
-#define MUSYCC_CCD_TRANS           0    /* Protocol mode in bits 12-14 */
-#define MUSYCC_CCD_SS7             1
-#define MUSYCC_CCD_HDLC_FCS16      2
-#define MUSYCC_CCD_HDLC_FCS32      3
-#define MUSYCC_CCD_EOPIRQ_DISABLE  0x00008000   /* EOP irq disabled */
-#define MUSYCC_CCD_INVERT_DATA     0x00800000   /* Invert data */
-#define MUSYCC_CCD_MAX_LENGTH      10   /* Position index for max length bit
-                                        * field */
-#define MUSYCC_CCD_BUFFER_LENGTH   16   /* Position index for internal data
-                                        * buffer length */
-#define MUSYCC_CCD_BUFFER_LOC      24   /* Position index for internal data
-                                        * buffer starting location */
-
-/****************************************************************************
- * Interrupt Descriptor Information */
-
-#define INT_EMPTY_ENTRY     0xfeedface
-#define INT_EMPTY_ENTRY2    0xdeadface
-
-/****************************************************************************
- * Interrupt Status Descriptor
- *
- * NOTE: One must first fetch the value of the interrupt status descriptor
- * into a local variable, then pass that value into the read macros. This
- * is required to avoid race conditions.
- ***/
-
-#define INTRPTS_NEXTINT_M      0x7FFF0000
-#define INTRPTS_NEXTINT_S      16
-#define INTRPTS_NEXTINT(x)     ((x & INTRPTS_NEXTINT_M) >> INTRPTS_NEXTINT_S)
-
-#define INTRPTS_INTFULL_M      0x00008000
-#define INTRPTS_INTFULL_S      15
-#define INTRPTS_INTFULL(x)     ((x & INTRPTS_INTFULL_M) >> INTRPTS_INTFULL_S)
-
-#define INTRPTS_INTCNT_M       0x00007FFF
-#define INTRPTS_INTCNT_S       0
-#define INTRPTS_INTCNT(x)      ((x & INTRPTS_INTCNT_M) >> INTRPTS_INTCNT_S)
-
-
-/****************************************************************************
- * Interrupt Descriptor
- ***/
-
-#define INTRPT_DIR_M           0x80000000
-#define INTRPT_DIR_S           31
-#define INTRPT_DIR(x)          ((x & INTRPT_DIR_M) >> INTRPT_DIR_S)
-
-#define INTRPT_GRP_M           0x60000000
-#define INTRPT_GRP_MSB_M       0x00004000
-#define INTRPT_GRP_S           29
-#define INTRPT_GRP_MSB_S       12
-#define INTRPT_GRP(x)          (((x & INTRPT_GRP_M) >> INTRPT_GRP_S) | \
-                              ((x & INTRPT_GRP_MSB_M) >> INTRPT_GRP_MSB_S))
-
-#define INTRPT_CH_M            0x1F000000
-#define INTRPT_CH_S            24
-#define INTRPT_CH(x)           ((x & INTRPT_CH_M) >> INTRPT_CH_S)
-
-#define INTRPT_EVENT_M         0x00F00000
-#define INTRPT_EVENT_S         20
-#define INTRPT_EVENT(x)        ((x & INTRPT_EVENT_M) >> INTRPT_EVENT_S)
-
-#define INTRPT_ERROR_M         0x000F0000
-#define INTRPT_ERROR_S         16
-#define INTRPT_ERROR(x)        ((x & INTRPT_ERROR_M) >> INTRPT_ERROR_S)
-
-#define INTRPT_ILOST_M         0x00008000
-#define INTRPT_ILOST_S         15
-#define INTRPT_ILOST(x)        ((x & INTRPT_ILOST_M) >> INTRPT_ILOST_S)
-
-#define INTRPT_PERR_M          0x00004000
-#define INTRPT_PERR_S          14
-#define INTRPT_PERR(x)         ((x & INTRPT_PERR_M) >> INTRPT_PERR_S)
-
-#define INTRPT_BLEN_M          0x00003FFF
-#define INTRPT_BLEN_S          0
-#define INTRPT_BLEN(x)         ((x & INTRPT_BLEN_M) >> INTRPT_BLEN_S)
-
-
-/* Buffer Descriptor bit macros */
-#define OWNER_BIT       0x80000000      /* Set for MUSYCC owner on xmit, host
-                                        * owner on receive */
-#define HOST_TX_OWNED   0x00000000      /* Host owns descriptor */
-#define MUSYCC_TX_OWNED 0x80000000      /* MUSYCC owns descriptor */
-#define HOST_RX_OWNED   0x80000000      /* Host owns descriptor */
-#define MUSYCC_RX_OWNED 0x00000000      /* MUSYCC owns descriptor */
-
-#define POLL_DISABLED   0x40000000      /* MUSYCC not allowed to poll buffer
-                                        * for ownership */
-#define EOMIRQ_ENABLE   0x20000000      /* This buffer contains the end of
-                                        * the message */
-#define EOBIRQ_ENABLE   0x10000000      /* EOB irq enabled */
-#define PADFILL_ENABLE  0x01000000      /* Enable padfill */
-#define REPEAT_BIT      0x00008000      /* Bit on for FISU descriptor */
-#define LENGTH_MASK         0X3fff      /* This part of status descriptor is
-                                        * length */
-#define IDLE_CODE               25      /* Position index for idle code (2
-                                        * bits) */
-#define EXTRA_FLAGS             16      /* Position index for minimum flags
-                                        * between messages (8 bits) */
-#define IDLE_CODE_MASK        0x03      /* Gets rid of garbage before the
-                                        * pattern is OR'd in */
-#define EXTRA_FLAGS_MASK      0xff      /* Gets rid of garbage before the
-                                        * pattern is OR'd in */
-#define PCI_PERMUTED_OWNER_BIT  0x00000080      /* For flipping the bit on
-                                                * the polled mode descriptor */
-
-/* Service Request Descriptor bit macros */
-#define SREQ  8                 /* Position index for service request bit
-                                * field */
-#define SR_NOOP                 (0<<(SREQ))     /* No Operation. Generates SACK */
-#define SR_CHIP_RESET           (1<<(SREQ))     /* Soft chip reset */
-#define SR_GROUP_RESET          (2<<(SREQ))     /* Group reset */
-#define SR_GLOBAL_INIT          (4<<(SREQ))     /* Global init: read global
-                                                * config deswc and interrupt
-                                                * queue desc */
-#define SR_GROUP_INIT           (5<<(SREQ))     /* Group init: read Timeslot
-                                                * and Subchannel maps,
-                                                * Channel Config, */
-    /*
-     * Group Config, Memory Protect, Message Length, and Port Config
-     * Descriptors
-     */
-#define SR_CHANNEL_ACTIVATE     (8<<(SREQ))     /* Init channel, read Head
-                                                * Pointer, process first
-                                                * Message Descriptor */
-#define SR_GCHANNEL_MASK        0x001F          /* channel portion (gchan) */
-#define SR_CHANNEL_DEACTIVATE   (9<<(SREQ))     /* Stop channel processing */
-#define SR_JUMP                 (10<<(SREQ))    /* a: Process new Message
-                                                * List */
-#define SR_CHANNEL_CONFIG       (11<<(SREQ))    /* b: Read channel
-                                                * Configuration Descriptor */
-#define SR_GLOBAL_CONFIG        (16<<(SREQ))    /* 10: Read Global
-                                                * Configuration Descriptor */
-#define SR_INTERRUPT_Q          (17<<(SREQ))    /* 11: Read Interrupt Queue
-                                                * Descriptor */
-#define SR_GROUP_CONFIG         (18<<(SREQ))    /* 12: Read Group
-                                                * Configuration Descriptor */
-#define SR_MEMORY_PROTECT       (19<<(SREQ))    /* 13: Read Memory Protection
-                                                * Descriptor */
-#define SR_MESSAGE_LENGTH       (20<<(SREQ))    /* 14: Read Message Length
-                                                * Descriptor */
-#define SR_PORT_CONFIG          (21<<(SREQ))    /* 15: Read Port
-                                                * Configuration Descriptor */
-#define SR_TIMESLOT_MAP         (24<<(SREQ))    /* 18: Read Timeslot Map */
-#define SR_SUBCHANNEL_MAP       (25<<(SREQ))    /* 19: Read Subchannel Map */
-#define SR_CHAN_CONFIG_TABLE    (26<<(SREQ))    /* 20: Read Channel
-                                                * Configuration Table for
-                                                * the group */
-#define SR_TX_DIRECTION         0x00000020      /* Transmit direction bit.
-                                                * Bit off indicates receive
-                                                * direction */
-#define SR_RX_DIRECTION         0x00000000
-
-/* Interrupt Descriptor bit macros */
-#define GROUP10                     29  /* Position index for the 2 LS group
-                                        * bits */
-#define CHANNEL                     24  /* Position index for channel bits */
-#define INT_IQD_TX          0x80000000
-#define INT_IQD_GRP         0x60000000
-#define INT_IQD_CHAN        0x1f000000
-#define INT_IQD_EVENT       0x00f00000
-#define INT_IQD_ERROR       0x000f0000
-#define INT_IQD_ILOST       0x00008000
-#define INT_IQD_PERR        0x00004000
-#define INT_IQD_BLEN        0x00003fff
-
-/* Interrupt Descriptor Events */
-#define EVE_EVENT               20      /* Position index for event bits */
-#define EVE_NONE                0       /* No event to report in this
-                                        * interrupt */
-#define EVE_SACK                1       /* Service Request acknowledge */
-#define EVE_EOB                 2       /* End of Buffer */
-#define EVE_EOM                 3       /* End of Message */
-#define EVE_EOP                 4       /* End of Padfill */
-#define EVE_CHABT               5       /* Change to Abort Code */
-#define EVE_CHIC                6       /* Change to Idle Code */
-#define EVE_FREC                7       /* Frame Recovery */
-#define EVE_SINC                8       /* MTP2 SUERM Increment */
-#define EVE_SDEC                9       /* MTP2 SUERM Decrement */
-#define EVE_SFILT               10      /* MTP2 SUERM Filtered Message */
-/* Interrupt Descriptor Errors */
-#define ERR_ERRORS              16      /* Position index for error bits */
-#define ERR_BUF                 1       /* Buffer Error */
-#define ERR_COFA                2       /* Change of Frame Alignment Error */
-#define ERR_ONR                 3       /* Owner Bit Error */
-#define ERR_PROT                4       /* Memory Protection Error */
-#define ERR_OOF                 8       /* Out of Frame Error */
-#define ERR_FCS                 9       /* FCS Error */
-#define ERR_ALIGN               10      /* Octet Alignment Error */
-#define ERR_ABT                 11      /* Abort Termination */
-#define ERR_LNG                 12      /* Long Message Error */
-#define ERR_SHT                 13      /* Short Message Error */
-#define ERR_SUERR               14      /* SUERM threshold exceeded */
-#define ERR_PERR                15      /* PCI Parity Error */
-/* Other Stuff */
-#define TRANSMIT_DIRECTION  0x80000000  /* Transmit direction bit. Bit off
-                                        * indicates receive direction */
-#define ILOST               0x00008000  /* Interrupt Lost */
-#define GROUPMSB            0x00004000  /* Group number MSB */
-#define SACK_IMAGE          0x00100000  /* Used in IRQ for semaphore test */
-#define INITIAL_STATUS      0x10000     /* IRQ status should be this after
-                                        * reset */
-
-/*  This must be defined on an entire channel group (Port) basis */
-#define SUERM_THRESHOLD     0x1f
-
-#undef VINT32
-#undef VINT8
-
-#endif                          /*** _INC_MUSYCC_H_ ***/
-
-/*** End-of-File ***/
diff --git a/drivers/staging/cxt1e1/pmc93x6_eeprom.c b/drivers/staging/cxt1e1/pmc93x6_eeprom.c
deleted file mode 100644 (file)
index ba588f1..0000000
+++ /dev/null
@@ -1,532 +0,0 @@
-/* pmc93x6_eeprom.c - PMC's 93LC46 EEPROM Device
- *
- *    The 93LC46 is a low-power, serial Electrically Erasable and
- *    Programmable Read Only Memory organized as 128 8-bit bytes.
- *
- *    Accesses to the 93LC46 are done in a bit serial stream, organized
- *    in a 3 wire format.  Writes are internally timed by the device
- *    (the In data bit is pulled low until the write is complete and
- *    then is pulled high) and take about 6 milliseconds.
- *
- * Copyright (C) 2003-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/types.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "pmcc4.h"
-#include "sbe_promformat.h"
-#include "pmc93x6_eeprom.h"
-
-#ifndef TRUE
-#define TRUE   1
-#define FALSE  0
-#endif
-
-/*------------------------------------------------------------------------
- *      EEPROM address definitions
- *------------------------------------------------------------------------
- *
- *      The offset in the definitions below allows the test to skip over
- *      areas of the EEPROM that other programs (such a VxWorks) are
- *      using.
- */
-
-#define EE_MFG      (long)0    /* Index to manufacturing record */
-#define EE_FIRST    0x28       /* Index to start testing at */
-#define EE_LIMIT    128                /* Index to end testing at */
-
-/*  Bit Ordering for Instructions
- *
- *  A0, A1, A2, A3, A4, A5, A6, OP0, OP1, SB   (lsb, or 1st bit out)
- *
- */
-
-#define EPROM_EWEN      0x0019 /* Erase/Write enable (reversed) */
-#define EPROM_EWDS      0x0001 /* Erase/Write disable (reversed) */
-#define EPROM_READ      0x0003 /* Read (reversed) */
-#define EPROM_WRITE     0x0005 /* Write (reversed) */
-#define EPROM_ERASE     0x0007 /* Erase (reversed) */
-#define EPROM_ERAL      0x0009 /* Erase All (reversed) */
-#define EPROM_WRAL      0x0011 /* Write All (reversed) */
-
-#define EPROM_ADR_SZ    7      /* Number of bits in offset address */
-#define EPROM_OP_SZ     3      /* Number of bits in command */
-#define SIZE_ADDR_OP    (EPROM_ADR_SZ + EPROM_OP_SZ)
-#define LC46A_MAX_OPS   10     /* Number of bits in Instruction */
-#define NUM_OF_BITS     8      /* Number of bits in data */
-
-/* EEPROM signal bits */
-#define EPROM_ACTIVE_OUT_BIT    0x0001 /* Out data bit */
-#define EPROM_ACTIVE_IN_BIT     0x0002 /* In data bit */
-#define ACTIVE_IN_BIT_SHIFT     0x0001 /* Shift In data bit to LSB */
-#define EPROM_ENCS              0x0004 /* Set EEPROM CS during operation */
-
-/*------------------------------------------------------------------------
- *      The ByteReverse table is used to reverses the 8 bits within a byte
- *------------------------------------------------------------------------
- */
-
-static unsigned char ByteReverse[256];
-static int ByteReverseBuilt = FALSE;
-
-/*------------------------------------------------------------------------
- *      mfg_template - initial serial EEPROM data structure
- *------------------------------------------------------------------------
- */
-
-static u8 mfg_template[sizeof(FLD_TYPE2)] = {
-       PROM_FORMAT_TYPE2,      /* type; */
-       0x00, 0x1A,             /* length[2]; */
-       0x00, 0x00, 0x00, 0x00, /* Crc32[4]; */
-       0x11, 0x76,             /* Id[2]; */
-       0x07, 0x05,             /* SubId[2] E1; */
-       0x00, 0xA0, 0xD6, 0x00, 0x00, 0x00,     /* Serial[6]; */
-       0x00, 0x00, 0x00, 0x00, /* CreateTime[4]; */
-       0x00, 0x00, 0x00, 0x00, /* HeatRunTime[4]; */
-       0x00, 0x00, 0x00, 0x00, /* HeatRunIterations[4]; */
-       0x00, 0x00, 0x00, 0x00, /* HeatRunErrors[4]; */
-};
-
-/*------------------------------------------------------------------------
- *      BuildByteReverse - build the 8-bit reverse table
- *------------------------------------------------------------------------
- *
- *      The 'ByteReverse' table reverses the 8 bits within a byte
- *      (the MSB becomes the LSB etc.).
- */
-
-static void BuildByteReverse(void)
-{
-       /* Used to build by powers to 2 */
-       long half;
-       int i;
-
-       ByteReverse[0] = 0;
-
-       for (half = 1; half < sizeof(ByteReverse); half <<= 1)
-               for (i = 0; i < half; i++)
-                       ByteReverse[half + i] =
-                           (char)(ByteReverse[i] | (0x80 / half));
-
-       ByteReverseBuilt = TRUE;
-}
-
-/*------------------------------------------------------------------------
- *      eeprom_delay - small delay for EEPROM timing
- *------------------------------------------------------------------------
- */
-
-static void eeprom_delay(void)
-{
-       int timeout;
-
-       for (timeout = 20; timeout; --timeout)
-               OS_uwait_dummy();
-}
-
-/*------------------------------------------------------------------------
- *      eeprom_put_byte - Send a byte to the EEPROM serially
- *------------------------------------------------------------------------
- *
- *      Given the PCI address and the data, this routine serially sends
- *      the data to the EEPROM.
- */
-
-static void eeprom_put_byte(long addr, long data, int count)
-{
-       u_int32_t output;
-
-       while (--count >= 0) {
-               /* Get next data bit */
-               output = (data & EPROM_ACTIVE_OUT_BIT) ? 1 : 0;
-               /* Add Chip Select */
-               output |= EPROM_ENCS;
-               data >>= 1;
-
-               eeprom_delay();
-               /* Output it */
-               pci_write_32((u_int32_t *) addr, output);
-       }
-}
-
-/*------------------------------------------------------------------------
- *      eeprom_get_byte - Receive a byte from the EEPROM serially
- *------------------------------------------------------------------------
- *
- *      Given the PCI address, this routine serially fetches the data
- *      from the  EEPROM.
- */
-
-static u_int32_t eeprom_get_byte(long addr)
-{
-       u_int32_t input;
-       u_int32_t data;
-       int count;
-
-/*  Start the Reading of DATA
- *
- *  The first read is a dummy as the data is latched in the
- *  EPLD and read on the next read access to the EEPROM.
- */
-
-       input = pci_read_32((u_int32_t *) addr);
-
-       data = 0;
-       count = NUM_OF_BITS;
-       while (--count >= 0) {
-               eeprom_delay();
-               input = pci_read_32((u_int32_t *) addr);
-
-               /* Shift data over */
-               data <<= 1;
-               data |= (input & EPROM_ACTIVE_IN_BIT) ? 1 : 0;
-
-       }
-
-       return data;
-}
-
-/*------------------------------------------------------------------------
- *      disable_pmc_eeprom - Disable writes to the EEPROM
- *------------------------------------------------------------------------
- *
- *      Issue the EEPROM command to disable writes.
- */
-
-static void disable_pmc_eeprom(long addr)
-{
-       eeprom_put_byte(addr, EPROM_EWDS, SIZE_ADDR_OP);
-
-       /* this removes Chip Select from EEPROM */
-       pci_write_32((u_int32_t *) addr, 0);
-}
-
-/*------------------------------------------------------------------------
- *      enable_pmc_eeprom - Enable writes to the EEPROM
- *------------------------------------------------------------------------
- *
- *      Issue the EEPROM command to enable writes.
- */
-
-static void enable_pmc_eeprom(long addr)
-{
-       eeprom_put_byte(addr, EPROM_EWEN, SIZE_ADDR_OP);
-
-       /* this removes Chip Select from EEPROM */
-       pci_write_32((u_int32_t *) addr, 0);
-}
-
-/*------------------------------------------------------------------------
- *      pmc_eeprom_read - EEPROM location read
- *------------------------------------------------------------------------
- *
- *      Given a EEPROM PCI address and location offset, this routine returns
- *      the contents of the specified location to the calling routine.
- */
-
-static u_int32_t pmc_eeprom_read(long addr, long mem_offset)
-{
-       /* Data from chip */
-       u_int32_t data;
-
-       if (!ByteReverseBuilt)
-               BuildByteReverse();
-
-       /* Reverse address */
-       mem_offset = ByteReverse[0x7F & mem_offset];
-
-       /*
-        * NOTE: The max offset address is 128 or half the reversal table. So
-        * the LSB is always zero and counts as a built in shift of one bit.
-        * So even though we need to shift 3 bits to make room for the command,
-        * we only need to shift twice more because of the built in shift.
-        */
-
-       /* Shift for command */
-       mem_offset <<= 2;
-       /* Add command */
-       mem_offset |= EPROM_READ;
-
-       /* Output chip address */
-       eeprom_put_byte(addr, mem_offset, SIZE_ADDR_OP);
-
-       /* Read chip data */
-       data = eeprom_get_byte(addr);
-
-       /* Remove Chip Select from EEPROM */
-       pci_write_32((u_int32_t *) addr, 0);
-
-       return (data & 0x000000FF);
-}
-
-/*------------------------------------------------------------------------
- *      pmc_eeprom_write - EEPROM location write
- *------------------------------------------------------------------------
- *
- *      Given a EEPROM PCI address, location offset and value, this
- *      routine writes the value to the specified location.
- *
- *      Note: it is up to the caller to determine if the write
- *      operation succeeded.
- */
-
-static int pmc_eeprom_write(long addr, long mem_offset, u_int32_t data)
-{
-       u_int32_t temp;
-       int count;
-
-       if (!ByteReverseBuilt)
-               BuildByteReverse();
-
-       /* Reverse address */
-       mem_offset = ByteReverse[0x7F & mem_offset];
-
-       /*
-        * NOTE: The max offset address is 128 or half the reversal table. So
-        * the LSB is always zero and counts as a built in shift of one bit.
-        * So even though we need to shift 3 bits to make room for the command,
-        * we only need to shift twice more because of the built in shift.
-        */
-
-       /* Shift for command */
-       mem_offset <<= 2;
-       /* Add command */
-       mem_offset |= EPROM_WRITE;
-
-       /* Output chip address */
-       eeprom_put_byte(addr, mem_offset, SIZE_ADDR_OP);
-
-       /* Reverse data */
-       data = ByteReverse[0xFF & data];
-       /* Output chip data */
-       eeprom_put_byte(addr, data, NUM_OF_BITS);
-
-       /* Remove Chip Select from EEPROM */
-       pci_write_32((u_int32_t *) addr, 0);
-
-/*
- *  Must see Data In at a low state before completing this transaction.
- *
- *  Afterwards, the data bit will return to a high state, ~6 ms, terminating
- *  the operation.
- */
-       /* Re-enable Chip Select */
-       pci_write_32((u_int32_t *) addr, EPROM_ENCS);
-       /* discard first read */
-       temp = pci_read_32((u_int32_t *) addr);
-       temp = pci_read_32((u_int32_t *) addr);
-       if (temp & EPROM_ACTIVE_IN_BIT) {
-               temp = pci_read_32((u_int32_t *) addr);
-               if (temp & EPROM_ACTIVE_IN_BIT) {
-                       /* Remove Chip Select from EEPROM */
-                       pci_write_32((u_int32_t *) addr, 0);
-                       return 1;
-               }
-       }
-       count = 1000;
-       while (count--) {
-               for (temp = 0; temp < 0x10; temp++)
-                       OS_uwait_dummy();
-
-               if (pci_read_32((u_int32_t *) addr) & EPROM_ACTIVE_IN_BIT)
-                       break;
-       }
-
-       if (count == -1)
-               return 2;
-
-       return 0;
-}
-
-/*------------------------------------------------------------------------
- *      pmcGetBuffValue - read the specified value from buffer
- *------------------------------------------------------------------------
- */
-
-static long pmcGetBuffValue(char *ptr, int size)
-{
-       long value = 0;
-       int index;
-
-       for (index = 0; index < size; ++index) {
-               value <<= 8;
-               value |= ptr[index] & 0xFF;
-       }
-
-       return value;
-}
-
-/*------------------------------------------------------------------------
- *      pmcSetBuffValue - save the specified value to buffer
- *------------------------------------------------------------------------
- */
-
-static void pmcSetBuffValue(char *ptr, long value, int size)
-{
-       int index = size;
-
-       while (--index >= 0) {
-               ptr[index] = (char)(value & 0xFF);
-               value >>= 8;
-       }
-}
-
-/*------------------------------------------------------------------------
- *      pmc_eeprom_read_buffer - read EEPROM data into specified buffer
- *------------------------------------------------------------------------
- */
-
-void
-pmc_eeprom_read_buffer(long addr, long mem_offset, char *dest_ptr, int size)
-{
-       while (--size >= 0)
-               *dest_ptr++ = (char)pmc_eeprom_read(addr, mem_offset++);
-}
-
-/*------------------------------------------------------------------------
- *      pmc_eeprom_write_buffer - write EEPROM data from specified buffer
- *------------------------------------------------------------------------
- */
-
-void
-pmc_eeprom_write_buffer(long addr, long mem_offset, char *dest_ptr, int size)
-{
-       enable_pmc_eeprom(addr);
-
-       while (--size >= 0)
-               pmc_eeprom_write(addr, mem_offset++, *dest_ptr++);
-
-       disable_pmc_eeprom(addr);
-}
-
-/*------------------------------------------------------------------------
- *      pmcCalcCrc - calculate the CRC for the serial EEPROM structure
- *------------------------------------------------------------------------
- */
-
-static u_int32_t pmcCalcCrc_T01(void *bufp)
-{
-       FLD_TYPE2 *buf = bufp;
-       /* CRC of the structure */
-       u_int32_t crc;
-
-       /* Calc CRC for type and length fields */
-       sbeCrc((u_int8_t *) &buf->type,
-              (u_int32_t) STRUCT_OFFSET(FLD_TYPE1, Crc32),
-              (u_int32_t) 0, (u_int32_t *) &crc);
-
-#ifdef EEPROM_TYPE_DEBUG
-       /* RLD DEBUG */
-       pr_info("sbeCrc: crc 1 calculated as %08x\n", crc);
-#endif
-       return ~crc;
-}
-
-static u_int32_t pmcCalcCrc_T02(void *bufp)
-{
-       FLD_TYPE2 *buf = bufp;
-       /* CRC of the structure */
-       u_int32_t crc;
-
-       /* Calc CRC for type and length fields */
-       sbeCrc((u_int8_t *) &buf->type,
-              (u_int32_t) STRUCT_OFFSET(FLD_TYPE2, Crc32),
-              (u_int32_t) 0, (u_int32_t *) &crc);
-
-       /* Calc CRC for remaining fields */
-       sbeCrc((u_int8_t *) &buf->Id[0],
-              (u_int32_t) (sizeof(FLD_TYPE2) - STRUCT_OFFSET(FLD_TYPE2, Id)),
-              (u_int32_t) crc, (u_int32_t *) &crc);
-
-#ifdef EEPROM_TYPE_DEBUG
-       /* RLD DEBUG */
-       pr_info("sbeCrc: crc 2 calculated as %08x\n", crc);
-#endif
-       return crc;
-}
-
-/*------------------------------------------------------------------------
- *      pmc_init_seeprom - initialize the serial EEPROM structure
- *------------------------------------------------------------------------
- *
- *      At the front of the serial EEPROM there is a record that contains
- *      manufacturing information.  If the info does not already exist, it
- *      is created.  The only field modifiable by the operator is the
- *      serial number field.
- */
-
-void pmc_init_seeprom(u_int32_t addr, u_int32_t serialNum)
-{
-       /* Memory image of structure */
-       PROMFORMAT buffer;
-       /* CRC of structure */
-       u_int32_t crc;
-       time_t createTime;
-
-       createTime = get_seconds();
-
-       /* use template data */
-       memcpy(&buffer.fldType2, mfg_template, sizeof(buffer.fldType2));
-
-       /* Update serial number field in buffer */
-       pmcSetBuffValue(&buffer.fldType2.Serial[3], serialNum, 3);
-
-       /* Update create time field in buffer */
-       pmcSetBuffValue(&buffer.fldType2.CreateTime[0], createTime, 4);
-
-       /* Update CRC field in buffer */
-       crc = pmcCalcCrc_T02(&buffer);
-       pmcSetBuffValue(&buffer.fldType2.Crc32[0], crc, 4);
-
-#ifdef DEBUG
-       for (i = 0; i < sizeof(FLD_TYPE2); ++i)
-               pr_info("[%02X] = %02X\n", i, buffer.bytes[i] & 0xFF);
-#endif
-
-       /* Write structure to serial EEPROM */
-       pmc_eeprom_write_buffer(addr, EE_MFG, (char *)&buffer,
-                               sizeof(FLD_TYPE2));
-}
-
-char pmc_verify_cksum(void *bufp)
-{
-       FLD_TYPE1 *buf1 = bufp;
-       FLD_TYPE2 *buf2 = bufp;
-       /* CRC read from EEPROM */
-       u_int32_t crc1, crc2;
-
-       /* Retrieve contents of CRC field */
-       crc1 = pmcGetBuffValue(&buf1->Crc32[0], sizeof(buf1->Crc32));
-#ifdef EEPROM_TYPE_DEBUG
-       /* RLD DEBUG */
-       pr_info("EEPROM: chksum 1 reads   as %08x\n", crc1);
-#endif
-       if ((buf1->type == PROM_FORMAT_TYPE1) &&
-           (pmcCalcCrc_T01((void *)buf1) == crc1))
-               return PROM_FORMAT_TYPE1;       /* checksum type 1 verified */
-
-       crc2 = pmcGetBuffValue(&buf2->Crc32[0], sizeof(buf2->Crc32));
-#ifdef EEPROM_TYPE_DEBUG
-       /* RLD DEBUG */
-       pr_info("EEPROM: chksum 2 reads   as %08x\n", crc2);
-#endif
-       if ((buf2->type == PROM_FORMAT_TYPE2) &&
-           (pmcCalcCrc_T02((void *)buf2) == crc2))
-               return PROM_FORMAT_TYPE2;       /* checksum type 2 verified */
-
-       /* failed to validate */
-       return PROM_FORMAT_Unk;
-}
diff --git a/drivers/staging/cxt1e1/pmc93x6_eeprom.h b/drivers/staging/cxt1e1/pmc93x6_eeprom.h
deleted file mode 100644 (file)
index 96c48cb..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef _INC_PMC93X6_EEPROM_H_
-#define _INC_PMC93X6_EEPROM_H_
-
-/*-----------------------------------------------------------------------------
- * pmc93x6_eeprom.h -
- *
- * Copyright (C) 2002-2004  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/types.h>
-
-#ifdef __KERNEL__
-
-#include "pmcc4_private.h"
-
-void        pmc_eeprom_read_buffer (long, long, char *, int);
-void        pmc_eeprom_write_buffer (long, long, char *, int);
-void        pmc_init_seeprom (u_int32_t, u_int32_t);
-char        pmc_verify_cksum (void *);
-
-#endif    /*** __KERNEL__ ***/
-
-#endif
-
-/*** End-of-File ***/
diff --git a/drivers/staging/cxt1e1/pmcc4.h b/drivers/staging/cxt1e1/pmcc4.h
deleted file mode 100644 (file)
index b4b5e5a..0000000
+++ /dev/null
@@ -1,108 +0,0 @@
-#ifndef _INC_PMCC4_H_
-#define _INC_PMCC4_H_
-
-/*-----------------------------------------------------------------------------
- * pmcc4.h -
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/types.h>
-
-typedef int status_t;
-
-#define SBE_DRVR_FAIL     0
-#define SBE_DRVR_SUCCESS  1
-
-/********************/
-/* PMCC4 memory Map */
-/********************/
-
-#define COMET_OFFSET(x) (0x80000+(x)*0x10000)
-#define EEPROM_OFFSET   0xC0000
-#define CPLD_OFFSET     0xD0000
-
-    struct pmcc4_timeslot_param
-    {
-        u_int8_t    card;       /* the card number */
-        u_int8_t    port;       /* the port number */
-        u_int8_t    _reserved1;
-        u_int8_t    _reserved2;
-
-        /*
-         * each byte in bitmask below represents one timeslot (bitmask[0] is
-         * for timeslot 0 and so on), each bit in the byte selects timeslot
-         * bits for this channel (0xff - whole timeslot, 0x7f - 56kbps mode)
-         */
-        u_int8_t    bitmask[32];
-    };
-
-    struct c4_musycc_param
-    {
-        u_int8_t    RWportnum;
-                    u_int16_t offset;
-        u_int32_t   value;
-    };
-
-/*Alarm values */
-#define sbeE1RMAI      0x100
-#define sbeYelAlm      0x04
-#define sbeRedAlm      0x02
-#define sbeAISAlm      0x01
-
-#define sbeE1errSMF    0x02
-#define sbeE1CRC       0x01
-
-#ifdef __KERNEL__
-
-/*
- * Device Driver interface, routines are for internal use only.
- */
-
-#include "pmcc4_private.h"
-
-char       *get_hdlc_name (hdlc_device *);
-
-/*
- * external interface
- */
-
-void        c4_cleanup (void);
-status_t    c4_chan_up (ci_t *, int channum);
-status_t    c4_del_chan_stats (int channum);
-status_t    c4_del_chan (int channum);
-status_t    c4_get_iidinfo (ci_t *ci, struct sbe_iid_info *iip);
-int         c4_is_chan_up (int channum);
-
-void       *getuserbychan (int channum);
-void        pci_flush_write (ci_t *ci);
-void        sbecom_set_loglevel (int debuglevel);
-char       *sbeid_get_bdname (ci_t *ci);
-void        sbeid_set_bdtype (ci_t *ci);
-void        sbeid_set_hdwbid (ci_t *ci);
-u_int32_t   sbeCrc (u_int8_t *, u_int32_t, u_int32_t, u_int32_t *);
-
-void        VMETRO_TRIGGER (ci_t *, int);       /* Note: int = 0(default)
-                                                 * thru 15 */
-
-#if defined (SBE_ISR_TASKLET)
-void        musycc_intr_bh_tasklet (ci_t *);
-
-#endif
-
-#endif                          /*** __KERNEL __ ***/
-#endif                          /* _INC_PMCC4_H_ */
diff --git a/drivers/staging/cxt1e1/pmcc4_cpld.h b/drivers/staging/cxt1e1/pmcc4_cpld.h
deleted file mode 100644 (file)
index a51209b..0000000
+++ /dev/null
@@ -1,91 +0,0 @@
-#ifndef _INC_PMCC4_CPLD_H_
-#define _INC_PMCC4_CPLD_H_
-
-/*-----------------------------------------------------------------------------
- * pmcc4_cpld.h -
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/types.h>
-
-/********************************/
-/* iSPLD control chip registers */
-/********************************/
-
-#if 0
-#define CPLD_MCSR    0x0
-#define CPLD_MCLK    0x1
-#define CPLD_LEDS    0x2
-#define CPLD_INTR    0x3
-#endif
-
-    struct c4_cpld
-    {
-        volatile u_int32_t mcsr;/* r/w: Master Clock Source Register */
-        volatile u_int32_t mclk;/* r/w: Master Clock Register */
-        volatile u_int32_t leds;/* r/w: LED Register */
-        volatile u_int32_t intr;/* r: Interrupt Register */
-    };
-
-    typedef struct c4_cpld c4cpld_t;
-
-/* mcsr note: sourcing COMET must be initialized to Master Mode */
-#define PMCC4_CPLD_MCSR_IND     0       /* ports used individual BP Clk as
-                                         * source, no slaves */
-#define PMCC4_CPLD_MCSR_CMT_1   1       /* COMET 1 BP Clk is source, 2,3,4
-                                         * are Clk slaves */
-#define PMCC4_CPLD_MCSR_CMT_2   2       /* COMET 2 BP Clk is source, 1,3,4
-                                         * are Clk slaves */
-#define PMCC4_CPLD_MCSR_CMT_3   3       /* COMET 3 BP Clk is source, 1,2,4
-                                         * are Clk slaves */
-#define PMCC4_CPLD_MCSR_CMT_4   4       /* COMET 4 BP Clk is source, 1,2,3
-                                         * are Clk slaves */
-
-#define PMCC4_CPLD_MCLK_MASK    0x0f
-#define PMCC4_CPLD_MCLK_P1      0x1
-#define PMCC4_CPLD_MCLK_P2      0x2
-#define PMCC4_CPLD_MCLK_P3      0x4
-#define PMCC4_CPLD_MCLK_P4      0x8
-#define PMCC4_CPLD_MCLK_T1      0x00
-#define PMCC4_CPLD_MCLK_P1_E1   0x01
-#define PMCC4_CPLD_MCLK_P2_E1   0x02
-#define PMCC4_CPLD_MCLK_P3_E1   0x04
-#define PMCC4_CPLD_MCLK_P4_E1   0x08
-
-#define PMCC4_CPLD_LED_OFF      0
-#define PMCC4_CPLD_LED_ON       1
-#define PMCC4_CPLD_LED_GP0      0x01    /* port 0, green  */
-#define PMCC4_CPLD_LED_YP0      0x02    /* port 0, yellow */
-#define PMCC4_CPLD_LED_GP1      0x04    /* port 1, green  */
-#define PMCC4_CPLD_LED_YP1      0x08    /* port 1, yellow */
-#define PMCC4_CPLD_LED_GP2      0x10    /* port 2, green  */
-#define PMCC4_CPLD_LED_YP2      0x20    /* port 2, yellow */
-#define PMCC4_CPLD_LED_GP3      0x40    /* port 3, green  */
-#define PMCC4_CPLD_LED_YP3      0x80    /* port 3, yellow */
-#define PMCC4_CPLD_LED_GREEN   (PMCC4_CPLD_LED_GP0 | PMCC4_CPLD_LED_GP1 | \
-                                PMCC4_CPLD_LED_GP2 | PMCC4_CPLD_LED_GP3 )
-#define PMCC4_CPLD_LED_YELLOW  (PMCC4_CPLD_LED_YP0 | PMCC4_CPLD_LED_YP1 | \
-                                PMCC4_CPLD_LED_YP2 | PMCC4_CPLD_LED_YP3)
-
-#define PMCC4_CPLD_INTR_MASK    0x0f
-#define PMCC4_CPLD_INTR_CMT_1   0x01
-#define PMCC4_CPLD_INTR_CMT_2   0x02
-#define PMCC4_CPLD_INTR_CMT_3   0x04
-#define PMCC4_CPLD_INTR_CMT_4   0x08
-
-#endif                          /* _INC_PMCC4_CPLD_H_ */
diff --git a/drivers/staging/cxt1e1/pmcc4_defs.h b/drivers/staging/cxt1e1/pmcc4_defs.h
deleted file mode 100644 (file)
index 83ceae4..0000000
+++ /dev/null
@@ -1,68 +0,0 @@
-#ifndef _INC_PMCC4_DEFS_H_
-#define _INC_PMCC4_DEFS_H_
-
-/*-----------------------------------------------------------------------------
- * c4_defs.h -
- *
- *   Implementation elements of the wanPMC-C4T1E1 device driver
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-
-#define MAX_BOARDS          8
-#define MAX_CHANS_USED      128
-
-#ifdef  SBE_PMCC4_ENABLE
-#define MUSYCC_NPORTS       4     /* CN8474 */
-#endif
-#ifdef SBE_WAN256T3_ENABLE
-#define MUSYCC_NPORTS       8     /* CN8478 */
-#endif
-#define MUSYCC_NCHANS       32    /* actually, chans per port */
-
-#define MUSYCC_NIQD         0x1000    /* power of 2 */
-#define MUSYCC_MRU          2048  /* default */
-#define MUSYCC_MTU          2048  /* default */
-#define MUSYCC_TXDESC_MIN   10    /* HDLC mode default */
-#define MUSYCC_RXDESC_MIN   18    /* HDLC mode default */
-#define MUSYCC_TXDESC_TRANS 4     /* Transparent mode minimum # of TX descriptors */
-#define MUSYCC_RXDESC_TRANS 12    /* Transparent mode minimum # of RX descriptors */
-
-#define MAX_DEFAULT_IFQLEN  32    /* network qlen */
-
-
-#define SBE_IFACETMPL        "pmcc4-%d"
-#ifdef IFNAMSIZ
-#define SBE_IFACETMPL_SIZE    IFNAMSIZ
-#else
-#define SBE_IFACETMPL_SIZE    16
-#endif
-
-/* we want the PMCC4 watchdog to fire off every 250ms */
-#define WATCHDOG_TIMEOUT      250000
-
-/* if we restart the watchdog every 250ms, then we'll time out
- * an additional 300ms later */
-#define WATCHDOG_UTIMEOUT     (WATCHDOG_TIMEOUT+300000)
-
-#if !defined(SBE_ISR_TASKLET) && !defined(SBE_ISR_IMMEDIATE) && !defined(SBE_ISR_INLINE)
-#define SBE_ISR_TASKLET
-#endif
-
-#endif   /*** _INC_PMCC4_DEFS_H_ ***/
-
diff --git a/drivers/staging/cxt1e1/pmcc4_drv.c b/drivers/staging/cxt1e1/pmcc4_drv.c
deleted file mode 100644 (file)
index 76bebdd..0000000
+++ /dev/null
@@ -1,1613 +0,0 @@
-/*-----------------------------------------------------------------------------
- * pmcc4_drv.c -
- *
- * Copyright (C) 2007  One Stop Systems, Inc.
- * Copyright (C) 2002-2006  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@onestopsystems.com
- * One Stop Systems, Inc.  Escondido, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/types.h>
-#include "pmcc4_sysdep.h"
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/sched.h>        /* include for timer */
-#include <linux/timer.h>        /* include for timer */
-#include <linux/hdlc.h>
-#include <linux/io.h>
-
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4_private.h"
-#include "pmcc4.h"
-#include "pmcc4_ioctls.h"
-#include "musycc.h"
-#include "comet.h"
-#include "sbe_bid.h"
-
-#define KERN_WARN KERN_WARNING
-
-/* forward references */
-status_t    c4_wk_chan_init (mpi_t *, mch_t *);
-void        c4_wq_port_cleanup (mpi_t *);
-status_t    c4_wq_port_init (mpi_t *);
-
-int         c4_loop_port (ci_t *, int, u_int8_t);
-status_t    c4_set_port (ci_t *, int);
-status_t    musycc_chan_down (ci_t *, int);
-
-u_int32_t musycc_chan_proto (int);
-status_t    musycc_dump_ring (ci_t *, unsigned int);
-status_t __init musycc_init (ci_t *);
-void        musycc_init_mdt (mpi_t *);
-void        musycc_serv_req (mpi_t *, u_int32_t);
-void        musycc_update_timeslots (mpi_t *);
-
-extern void musycc_update_tx_thp (mch_t *);
-extern int  cxt1e1_log_level;
-extern int  cxt1e1_max_mru;
-extern int  cxt1e1_max_mtu;
-extern int  max_rxdesc_used, max_rxdesc_default;
-extern int  max_txdesc_used, max_txdesc_default;
-
-#if defined (__powerpc__)
-extern void *memset (void *s, int c, size_t n);
-
-#endif
-
-int         drvr_state = SBE_DRVR_INIT;
-ci_t       *c4_list = NULL;
-ci_t       *CI;                 /* dummy pointer to board ZEROE's data -
-                                 * DEBUG USAGE */
-
-
-void
-sbecom_set_loglevel (int d)
-{
-    /*
-     * The code within the following -if- clause is a backdoor debug facility
-     * which can be used to display the state of a board's channel.
-     */
-    if (d > LOG_DEBUG)
-    {
-        unsigned int channum = d - (LOG_DEBUG + 1);     /* convert to ZERO
-                                                         * relativity */
-
-        (void) musycc_dump_ring ((ci_t *) CI, channum); /* CI implies support
-                                                         * for card 0 only */
-    } else
-    {
-        if (cxt1e1_log_level != d)
-        {
-            pr_info("log level changed from %d to %d\n", cxt1e1_log_level, d);
-            cxt1e1_log_level = d;          /* set new */
-        } else
-            pr_info("log level is %d\n", cxt1e1_log_level);
-    }
-}
-
-
-mch_t      *
-c4_find_chan (int channum)
-{
-    ci_t       *ci;
-    mch_t      *ch;
-    int         portnum, gchan;
-
-    for (ci = c4_list; ci; ci = ci->next)
-        for (portnum = 0; portnum < ci->max_port; portnum++)
-            for (gchan = 0; gchan < MUSYCC_NCHANS; gchan++)
-            {
-               ch = ci->port[portnum].chan[gchan];
-               if (ch) {
-                       if ((ch->state != UNASSIGNED) &&
-                          (ch->channum == channum))
-                               return ch;
-               }
-            }
-    return NULL;
-}
-
-/***
- * Check port state and set LED states using watchdog or ioctl...
- * also check for in-band SF loopback commands (& cause results if they are there)
- *
- * Alarm function depends on comet bits indicating change in
- * link status (linkMask) to keep the link status indication straight.
- *
- * Indications are only LED and system log -- except when ioctl is invoked.
- *
- * "alarmed" record (a.k.a. copyVal, in some cases below) decodes as:
- *
- *   RMAI  (E1 only) 0x100
- *   alarm LED on    0x80
- *   link LED on     0x40
- *   link returned   0x20 (link was down, now it's back and 'port get' hasn't run)
- *   change in LED   0x10 (update LED register because value has changed)
- *   link is down    0x08
- *   YelAlm(RAI)     0x04
- *   RedAlm          0x02
- *   AIS(blue)Alm    0x01
- *
- * note "link has returned" indication is reset on read
- * (e.g. by use of the c4_control port get command)
- */
-
-#define sbeLinkMask       0x41  /* change in signal status (lost/recovered) +
-                                 * state */
-#define sbeLinkChange     0x40
-#define sbeLinkDown       0x01
-#define sbeAlarmsMask     0x07  /* red / yellow / blue alarm conditions */
-#define sbeE1AlarmsMask   0x107 /* alarm conditions */
-
-#define COMET_LBCMD_READ  0x80  /* read only (do not set, return read value) */
-
-void
-checkPorts (ci_t *ci)
-{
-#ifndef CONFIG_SBE_PMCC4_NCOMM
-    /*
-     * PORT POINT - NCOMM needs to avoid this code since the polling of
-     * alarms conflicts with NCOMM's interrupt servicing implementation.
-     */
-
-    struct s_comet_reg    *comet;
-    volatile u_int32_t value;
-    u_int32_t   copyVal, LEDval;
-
-    u_int8_t portnum;
-
-    LEDval = 0;
-    for (portnum = 0; portnum < ci->max_port; portnum++)
-    {
-        copyVal = 0x12f & (ci->alarmed[portnum]);       /* port's alarm record */
-        comet = ci->port[portnum].cometbase;
-        value = pci_read_32 ((u_int32_t *) &comet->cdrc_ists) & sbeLinkMask;    /* link loss reg */
-
-        if (value & sbeLinkChange)  /* is there a change in the link stuff */
-        {
-            /* if there's been a change (above) and yet it's the same (below) */
-            if (!(((copyVal >> 3) & sbeLinkDown) ^ (value & sbeLinkDown)))
-            {
-                if (value & sbeLinkDown)
-                    pr_warning("%s: Port %d momentarily recovered.\n",
-                               ci->devname, portnum);
-                else
-                    pr_warning("%s: Warning: Port %d link was briefly down.\n",
-                               ci->devname, portnum);
-            } else if (value & sbeLinkDown)
-                pr_warning("%s: Warning: Port %d link is down.\n",
-                           ci->devname, portnum);
-            else
-            {
-                pr_warning("%s: Port %d link has recovered.\n",
-                           ci->devname, portnum);
-                copyVal |= 0x20;    /* record link transition to up */
-            }
-            copyVal |= 0x10;        /* change (link) --> update LEDs  */
-        }
-        copyVal &= 0x137;           /* clear LED & link old history bits &
-                                     * save others */
-        if (value & sbeLinkDown)
-            copyVal |= 0x08;        /* record link status (now) */
-        else
-        {                           /* if link is up, do this */
-            copyVal |= 0x40;        /* LED indicate link is up    */
-            /* Alarm things & the like ... first if E1, then if T1 */
-            if (IS_FRAME_ANY_E1 (ci->port[portnum].p.port_mode))
-            {
-                /*
-                 * first check Codeword (SaX) changes & CRC and
-                 * sub-multi-frame errors
-                 */
-                /*
-                 * note these errors are printed every time they are detected
-                 * vs. alarms
-                 */
-                value = pci_read_32 ((u_int32_t *) &comet->e1_frmr_nat_ists);   /* codeword */
-                if (value & 0x1f)
-                {                   /* if errors (crc or smf only) */
-                    if (value & 0x10)
-                        pr_warning("%s: E1 Port %d Codeword Sa4 change detected.\n",
-                                   ci->devname, portnum);
-                    if (value & 0x08)
-                        pr_warning("%s: E1 Port %d Codeword Sa5 change detected.\n",
-                                   ci->devname, portnum);
-                    if (value & 0x04)
-                        pr_warning("%s: E1 Port %d Codeword Sa6 change detected.\n",
-                                   ci->devname, portnum);
-                    if (value & 0x02)
-                        pr_warning("%s: E1 Port %d Codeword Sa7 change detected.\n",
-                                   ci->devname, portnum);
-                    if (value & 0x01)
-                        pr_warning("%s: E1 Port %d Codeword Sa8 change detected.\n",
-                                   ci->devname, portnum);
-                }
-                value = pci_read_32 ((u_int32_t *) &comet->e1_frmr_mists);      /* crc & smf */
-                if (value & 0x3)
-                {                   /* if errors (crc or smf only) */
-                    if (value & sbeE1CRC)
-                        pr_warning("%s: E1 Port %d CRC-4 error(s) detected.\n",
-                                   ci->devname, portnum);
-                    if (value & sbeE1errSMF)    /* error in sub-multiframe */
-                        pr_warning("%s: E1 Port %d received errored SMF.\n",
-                                   ci->devname, portnum);
-                }
-                value = pci_read_32 ((u_int32_t *) &comet->e1_frmr_masts) & 0xcc; /* alarms */
-                /*
-                 * pack alarms together (bitmiser), and construct similar to
-                 * T1
-                 */
-                /* RAI,RMAI,.,.,LOF,AIS,.,. ==>  RMAI,.,.,.,.,.,RAI,LOF,AIS */
-                /* see 0x97 */
-                value = (value >> 2);
-                if (value & 0x30)
-                {
-                    if (value & 0x20)
-                        value |= 0x40;  /* RAI */
-                    if (value & 0x10)
-                        value |= 0x100; /* RMAI */
-                    value &= ~0x30;
-                }                   /* finished packing alarm in handy order */
-                if (value != (copyVal & sbeE1AlarmsMask))
-                {                   /* if alarms changed */
-                    copyVal |= 0x10;/* change LED status   */
-                    if ((copyVal & sbeRedAlm) && !(value & sbeRedAlm))
-                    {
-                        copyVal &= ~sbeRedAlm;
-                        pr_warning("%s: E1 Port %d LOF alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeRedAlm) && (value & sbeRedAlm))
-                    {
-                        copyVal |= sbeRedAlm;
-                        pr_warning("%s: E1 Warning: Port %d LOF alarm.\n",
-                                   ci->devname, portnum);
-                    } else if ((copyVal & sbeYelAlm) && !(value & sbeYelAlm))
-                    {
-                        copyVal &= ~sbeYelAlm;
-                        pr_warning("%s: E1 Port %d RAI alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeYelAlm) && (value & sbeYelAlm))
-                    {
-                        copyVal |= sbeYelAlm;
-                        pr_warning("%s: E1 Warning: Port %d RAI alarm.\n",
-                                   ci->devname, portnum);
-                    } else if ((copyVal & sbeE1RMAI) && !(value & sbeE1RMAI))
-                    {
-                        copyVal &= ~sbeE1RMAI;
-                        pr_warning("%s: E1 Port %d RMAI alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeE1RMAI) && (value & sbeE1RMAI))
-                    {
-                        copyVal |= sbeE1RMAI;
-                        pr_warning("%s: E1 Warning: Port %d RMAI alarm.\n",
-                                   ci->devname, portnum);
-                    } else if ((copyVal & sbeAISAlm) && !(value & sbeAISAlm))
-                    {
-                        copyVal &= ~sbeAISAlm;
-                        pr_warning("%s: E1 Port %d AIS alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeAISAlm) && (value & sbeAISAlm))
-                    {
-                        copyVal |= sbeAISAlm;
-                        pr_warning("%s: E1 Warning: Port %d AIS alarm.\n",
-                                   ci->devname, portnum);
-                    }
-                }
-                /* end of E1 alarm code */
-            } else
-            {                       /* if a T1 mode */
-                value = pci_read_32 ((u_int32_t *) &comet->t1_almi_ists);       /* alarms */
-                value &= sbeAlarmsMask;
-                if (value != (copyVal & sbeAlarmsMask))
-                {                   /* if alarms changed */
-                    copyVal |= 0x10;/* change LED status   */
-                    if ((copyVal & sbeRedAlm) && !(value & sbeRedAlm))
-                    {
-                        copyVal &= ~sbeRedAlm;
-                        pr_warning("%s: Port %d red alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeRedAlm) && (value & sbeRedAlm))
-                    {
-                        copyVal |= sbeRedAlm;
-                        pr_warning("%s: Warning: Port %d red alarm.\n",
-                                   ci->devname, portnum);
-                    } else if ((copyVal & sbeYelAlm) && !(value & sbeYelAlm))
-                    {
-                        copyVal &= ~sbeYelAlm;
-                        pr_warning("%s: Port %d yellow (RAI) alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeYelAlm) && (value & sbeYelAlm))
-                    {
-                        copyVal |= sbeYelAlm;
-                        pr_warning("%s: Warning: Port %d yellow (RAI) alarm.\n",
-                                   ci->devname, portnum);
-                    } else if ((copyVal & sbeAISAlm) && !(value & sbeAISAlm))
-                    {
-                        copyVal &= ~sbeAISAlm;
-                        pr_warning("%s: Port %d blue (AIS) alarm ended.\n",
-                                   ci->devname, portnum);
-                    } else if (!(copyVal & sbeAISAlm) && (value & sbeAISAlm))
-                    {
-                        copyVal |= sbeAISAlm;
-                        pr_warning("%s: Warning: Port %d blue (AIS) alarm.\n",
-                                   ci->devname, portnum);
-                    }
-                }
-            }                       /* end T1 mode alarm checks */
-        }
-        if (copyVal & sbeAlarmsMask)
-            copyVal |= 0x80;        /* if alarm turn yel LED on */
-        if (copyVal & 0x10)
-            LEDval |= 0x100;        /* tag if LED values have changed  */
-        LEDval |= ((copyVal & 0xc0) >> (6 - (portnum * 2)));
-
-        ci->alarmed[portnum] &= 0xfffff000;     /* out with the old (it's fff
-                                                 * ... foo) */
-        ci->alarmed[portnum] |= (copyVal);      /* in with the new */
-
-        /*
-         * enough with the alarms and LED's, now let's check for loopback
-         * requests
-         */
-
-        if (IS_FRAME_ANY_T1 (ci->port[portnum].p.port_mode))
-        {                           /* if a T1 mode  */
-            /*
-             * begin in-band (SF) loopback code detection -- start by reading
-             * command
-             */
-            value = pci_read_32 ((u_int32_t *) &comet->ibcd_ies);       /* detect reg. */
-            value &= 0x3;           /* trim to handy bits */
-            if (value & 0x2)
-            {                       /* activate loopback (sets for deactivate
-                                     * code length) */
-                copyVal = c4_loop_port (ci, portnum, COMET_LBCMD_READ); /* read line loopback
-                                                                         * mode */
-                if (copyVal != COMET_MDIAG_LINELB)      /* don't do it again if
-                                                         * already in that mode */
-                    c4_loop_port (ci, portnum, COMET_MDIAG_LINELB);     /* put port in line
-                                                                         * loopback mode */
-            }
-            if (value & 0x1)
-            {                       /* deactivate loopback (sets for activate
-                                     * code length) */
-                copyVal = c4_loop_port (ci, portnum, COMET_LBCMD_READ); /* read line loopback
-                                                                         * mode */
-                if (copyVal != COMET_MDIAG_LBOFF)       /* don't do it again if
-                                                         * already in that mode */
-                    c4_loop_port (ci, portnum, COMET_MDIAG_LBOFF);      /* take port out of any
-                                                                         * loopback mode */
-            }
-        }
-        if (IS_FRAME_ANY_T1ESF (ci->port[portnum].p.port_mode))
-        {                           /* if a T1 ESF mode  */
-            /* begin ESF loopback code */
-            value = pci_read_32 ((u_int32_t *) &comet->t1_rboc_sts) & 0x3f;     /* read command */
-            if (value == 0x07)
-                c4_loop_port (ci, portnum, COMET_MDIAG_LINELB); /* put port in line
-                                                                 * loopback mode */
-            if (value == 0x0a)
-                c4_loop_port (ci, portnum, COMET_MDIAG_PAYLB);  /* put port in payload
-                                                                 * loopbk mode */
-            if ((value == 0x1c) || (value == 0x19) || (value == 0x12))
-                c4_loop_port (ci, portnum, COMET_MDIAG_LBOFF);  /* take port out of any
-                                                                 * loopbk mode */
-            if (cxt1e1_log_level >= LOG_DEBUG)
-                if (value != 0x3f)
-                    pr_warning("%s: BOC value = %x on Port %d\n",
-                               ci->devname, value, portnum);
-            /* end ESF loopback code */
-        }
-    }
-
-    /* if something is new, update LED's */
-    if (LEDval & 0x100)
-        pci_write_32 ((u_int32_t *) &ci->cpldbase->leds, LEDval & 0xff);
-#endif                              /*** CONFIG_SBE_PMCC4_NCOMM ***/
-}
-
-
-static void
-c4_watchdog (ci_t *ci)
-{
-    if (drvr_state != SBE_DRVR_AVAILABLE)
-    {
-        if (cxt1e1_log_level >= LOG_MONITOR)
-            pr_info("drvr not available (%x)\n", drvr_state);
-        return;
-    }
-    ci->wdcount++;
-    checkPorts (ci);
-    ci->wd_notify = 0;
-}
-
-
-void
-c4_cleanup (void)
-{
-    ci_t       *ci, *next;
-    mpi_t      *pi;
-    int         portnum, j;
-
-    ci = c4_list;
-    while (ci)
-    {
-        next = ci->next;            /* protect <next> from upcoming <free> */
-        pci_write_32 ((u_int32_t *) &ci->cpldbase->leds, PMCC4_CPLD_LED_OFF);
-        for (portnum = 0; portnum < ci->max_port; portnum++)
-        {
-            pi = &ci->port[portnum];
-            c4_wq_port_cleanup (pi);
-            for (j = 0; j < MUSYCC_NCHANS; j++)
-            {
-                if (pi->chan[j])
-                    kfree(pi->chan[j]);     /* free mch_t struct */
-            }
-            kfree(pi->regram_saved);
-        }
-        kfree(ci->iqd_p_saved);
-        kfree(ci);
-        ci = next;                  /* cleanup next board, if any */
-    }
-}
-
-
-/*
- * This function issues a write to all comet chips and expects the same data
- * to be returned from the subsequent read.  This determines the board build
- * to be a 1-port, 2-port, or 4-port build.  The value returned represents a
- * bit-mask of the found ports.  Only certain configurations are considered
- * VALID or LEGAL builds.
- */
-
-int
-c4_get_portcfg (ci_t *ci)
-{
-    struct s_comet_reg    *comet;
-    int         portnum, mask;
-    u_int32_t   wdata, rdata;
-
-    wdata = COMET_MDIAG_LBOFF;      /* take port out of any loopback mode */
-
-    mask = 0;
-    for (portnum = 0; portnum < MUSYCC_NPORTS; portnum++)
-    {
-        comet = ci->port[portnum].cometbase;
-        pci_write_32 ((u_int32_t *) &comet->mdiag, wdata);
-        rdata = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
-        if (wdata == rdata)
-            mask |= 1 << portnum;
-    }
-    return mask;
-}
-
-
-/* nothing herein should generate interrupts */
-
-status_t    __init
-c4_init (ci_t *ci, u_char *func0, u_char *func1)
-{
-    mpi_t      *pi;
-    mch_t      *ch;
-    static u_int32_t count = 0;
-    int         portnum, j;
-
-    ci->state = C_INIT;
-    ci->brdno = count++;
-    ci->intlog.this_status_new = 0;
-    atomic_set (&ci->bh_pending, 0);
-
-    ci->reg = (struct musycc_globalr *) func0;
-    ci->eeprombase = (u_int32_t *) (func1 + EEPROM_OFFSET);
-    ci->cpldbase = (c4cpld_t *) ((u_int32_t *) (func1 + ISPLD_OFFSET));
-
-    /*** PORT POINT - the following is the first access of any type to the hardware ***/
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-    /* NCOMM driver uses INTB interrupt to monitor CPLD register */
-    pci_write_32 ((u_int32_t *) &ci->reg->glcd, GCD_MAGIC);
-#else
-    /* standard driver POLLS for INTB via CPLD register */
-    pci_write_32 ((u_int32_t *) &ci->reg->glcd, GCD_MAGIC | MUSYCC_GCD_INTB_DISABLE);
-#endif
-
-    {
-        int         pmsk;
-
-        /* need comet addresses available for determination of hardware build */
-        for (portnum = 0; portnum < MUSYCC_NPORTS; portnum++)
-        {
-            pi = &ci->port[portnum];
-            pi->cometbase = (struct s_comet_reg *) ((u_int32_t *) (func1 + COMET_OFFSET (portnum)));
-            pi->reg = (struct musycc_globalr *) ((u_char *) ci->reg + (portnum * 0x800));
-            pi->portnum = portnum;
-            pi->p.portnum = portnum;
-            pi->openchans = 0;
-#ifdef SBE_MAP_DEBUG
-            pr_info("Comet-%d: addr = %p\n", portnum, pi->cometbase);
-#endif
-        }
-        pmsk = c4_get_portcfg (ci);
-        switch (pmsk)
-        {
-        case 0x1:
-            ci->max_port = 1;
-            break;
-        case 0x3:
-            ci->max_port = 2;
-            break;
-#if 0
-        case 0x7:                   /* not built, but could be... */
-            ci->max_port = 3;
-            break;
-#endif
-        case 0xf:
-            ci->max_port = 4;
-            break;
-        default:
-            ci->max_port = 0;
-            pr_warning("%s: illegal port configuration (%x)\n",
-                       ci->devname, pmsk);
-            return SBE_DRVR_FAIL;
-        }
-#ifdef SBE_MAP_DEBUG
-        pr_info(">> %s: c4_get_build - pmsk %x max_port %x\n",
-                ci->devname, pmsk, ci->max_port);
-#endif
-    }
-
-    for (portnum = 0; portnum < ci->max_port; portnum++)
-    {
-        pi = &ci->port[portnum];
-        pi->up = ci;
-        pi->sr_last = 0xffffffff;
-        pi->p.port_mode = CFG_FRAME_SF; /* T1 B8ZS, the default */
-        pi->p.portP = (CFG_CLK_PORT_EXTERNAL | CFG_LBO_LH0);    /* T1 defaults */
-
-        OS_sem_init (&pi->sr_sem_busy, SEM_AVAILABLE);
-        OS_sem_init (&pi->sr_sem_wait, SEM_TAKEN);
-
-        for (j = 0; j < 32; j++)
-        {
-            pi->fifomap[j] = -1;
-            pi->tsm[j] = 0;         /* no assignments, all available */
-        }
-
-        /* allocate channel structures for this port */
-        for (j = 0; j < MUSYCC_NCHANS; j++)
-        {
-               ch = kzalloc(sizeof(mch_t), GFP_KERNEL | GFP_DMA);
-            if (ch)
-            {
-                pi->chan[j] = ch;
-                ch->state = UNASSIGNED;
-                ch->up = pi;
-                ch->gchan = (-1);   /* channel assignment not yet known */
-                ch->channum = (-1); /* channel assignment not yet known */
-                ch->p.card = ci->brdno;
-                ch->p.port = portnum;
-                ch->p.channum = (-1);   /* channel assignment not yet known */
-                ch->p.mode_56k = 0; /* default is 64kbps mode */
-            } else
-            {
-                pr_warning("failed mch_t malloc, port %d channel %d size %u.\n",
-                           portnum, j, (unsigned int) sizeof (mch_t));
-                break;
-            }
-        }
-    }
-
-
-    {
-        /*
-         * Set LEDs through their paces to supply visual proof that LEDs are
-         * functional and not burnt out nor broken.
-         *
-         * YELLOW + GREEN -> OFF.
-         */
-
-        pci_write_32 ((u_int32_t *) &ci->cpldbase->leds,
-                      PMCC4_CPLD_LED_GREEN | PMCC4_CPLD_LED_YELLOW);
-        OS_uwait (750000, "leds");
-        pci_write_32 ((u_int32_t *) &ci->cpldbase->leds, PMCC4_CPLD_LED_OFF);
-    }
-
-    OS_init_watchdog (&ci->wd, (void (*) (void *)) c4_watchdog, ci, WATCHDOG_TIMEOUT);
-    return SBE_DRVR_SUCCESS;
-}
-
-
-/* better be fully setup to handle interrupts when you call this */
-
-status_t    __init
-c4_init2 (ci_t *ci)
-{
-    status_t    ret;
-
-    /* PORT POINT: this routine generates first interrupt */
-       ret = musycc_init(ci);
-       if (ret != SBE_DRVR_SUCCESS)
-               return ret;
-
-#if 0
-    ci->p.framing_type = FRAMING_CBP;
-    ci->p.h110enable = 1;
-#if 0
-    ci->p.hypersize = 0;
-#else
-    hyperdummy = 0;
-#endif
-    ci->p.clock = 0;                /* Use internal clocking until set to
-                                     * external */
-    c4_card_set_params (ci, &ci->p);
-#endif
-    OS_start_watchdog (&ci->wd);
-    return SBE_DRVR_SUCCESS;
-}
-
-
-/* This function sets the loopback mode (or clears it, as the case may be). */
-
-int
-c4_loop_port (ci_t *ci, int portnum, u_int8_t cmd)
-{
-    struct s_comet_reg    *comet;
-    volatile u_int32_t loopValue;
-
-    comet = ci->port[portnum].cometbase;
-    loopValue = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
-
-    if (cmd & COMET_LBCMD_READ)
-        return loopValue;           /* return the read value */
-
-    if (loopValue != cmd)
-    {
-        switch (cmd)
-        {
-        case COMET_MDIAG_LINELB:
-            /* set(SF)loopback down (turn off) code length to 6 bits */
-            pci_write_32 ((u_int32_t *) &comet->ibcd_cfg, 0x05);
-            break;
-        case COMET_MDIAG_LBOFF:
-            /* set (SF) loopback up (turn on) code length to 5 bits */
-            pci_write_32 ((u_int32_t *) &comet->ibcd_cfg, 0x00);
-            break;
-        }
-
-        pci_write_32 ((u_int32_t *) &comet->mdiag, cmd);
-        if (cxt1e1_log_level >= LOG_WARN)
-            pr_info("%s: loopback mode changed to %2x from %2x on Port %d\n",
-                    ci->devname, cmd, loopValue, portnum);
-        loopValue = pci_read_32 ((u_int32_t *) &comet->mdiag) & COMET_MDIAG_LBMASK;
-        if (loopValue != cmd)
-        {
-            if (cxt1e1_log_level >= LOG_ERROR)
-                pr_info("%s: write to loop register failed, unknown state for Port %d\n",
-                        ci->devname, portnum);
-        }
-    } else
-    {
-        if (cxt1e1_log_level >= LOG_WARN)
-            pr_info("%s: loopback already in that mode (%2x)\n",
-                    ci->devname, loopValue);
-    }
-    return 0;
-}
-
-
-/* c4_frame_rw: read or write the comet register specified
- * (modifies use of port_param to non-standard use of struct)
- * Specifically:
- *   pp.portnum     (one guess)
- *   pp.port_mode   offset of register
- *   pp.portP       write (or not, i.e. read)
- *   pp.portStatus  write value
- * BTW:
- *   pp.portStatus  also used to return read value
- *   pp.portP       also used during write, to return old reg value
- */
-
-status_t
-c4_frame_rw (ci_t *ci, struct sbecom_port_param *pp)
-{
-    struct s_comet_reg    *comet;
-    volatile u_int32_t data;
-
-    if (pp->portnum >= ci->max_port)/* sanity check */
-        return -ENXIO;
-
-    comet = ci->port[pp->portnum].cometbase;
-    data = pci_read_32 ((u_int32_t *) comet + pp->port_mode) & 0xff;
-
-    if (pp->portP)
-    {                               /* control says this is a register
-                                     * _write_ */
-        if (pp->portStatus == data)
-            pr_info("%s: Port %d already that value!  Writing again anyhow.\n",
-                    ci->devname, pp->portnum);
-        pp->portP = (u_int8_t) data;
-        pci_write_32 ((u_int32_t *) comet + pp->port_mode,
-                      pp->portStatus);
-        data = pci_read_32 ((u_int32_t *) comet + pp->port_mode) & 0xff;
-    }
-    pp->portStatus = (u_int8_t) data;
-    return 0;
-}
-
-
-/* c4_pld_rw: read or write the pld register specified
- * (modifies use of port_param to non-standard use of struct)
- * Specifically:
- *   pp.port_mode   offset of register
- *   pp.portP       write (or not, i.e. read)
- *   pp.portStatus  write value
- * BTW:
- *   pp.portStatus  also used to return read value
- *   pp.portP       also used during write, to return old reg value
- */
-
-status_t
-c4_pld_rw (ci_t *ci, struct sbecom_port_param *pp)
-{
-    volatile u_int32_t *regaddr;
-    volatile u_int32_t data;
-    int         regnum = pp->port_mode;
-
-    regaddr = (u_int32_t *) ci->cpldbase + regnum;
-    data = pci_read_32 ((u_int32_t *) regaddr) & 0xff;
-
-    if (pp->portP)
-    {                               /* control says this is a register
-                                     * _write_ */
-        pp->portP = (u_int8_t) data;
-        pci_write_32 ((u_int32_t *) regaddr, pp->portStatus);
-        data = pci_read_32 ((u_int32_t *) regaddr) & 0xff;
-    }
-    pp->portStatus = (u_int8_t) data;
-    return 0;
-}
-
-/* c4_musycc_rw: read or write the musycc register specified
- * (modifies use of port_param to non-standard use of struct)
- * Specifically:
- *    mcp.RWportnum   port number and write indication bit (0x80)
- *    mcp.offset      offset of register
- *    mcp.value       write value going in and read value returning
- */
-
-/* PORT POINT: TX Subchannel Map registers are write-only
- * areas within the MUSYCC and always return FF */
-/* PORT POINT: regram and reg structures are minorly different and <offset> ioctl
- * settings are aligned with the <reg> struct musycc_globalr{} usage.
- * Also, regram is separately allocated shared memory, allocated for each port.
- * PORT POINT: access offsets of 0x6000 for Msg Cfg Desc Tbl are for 4-port MUSYCC
- * only.  (An 8-port MUSYCC has 0x16000 offsets for accessing its upper 4 tables.)
- */
-
-status_t
-c4_musycc_rw (ci_t *ci, struct c4_musycc_param *mcp)
-{
-    mpi_t      *pi;
-    volatile u_int32_t *dph;    /* hardware implemented register */
-    u_int32_t *dpr = NULL;     /* RAM image of registers for group command
-                                 * usage */
-    int         offset = mcp->offset % 0x800;   /* group relative address
-                                                 * offset, mcp->portnum is
-                                                 * not used */
-    int         portnum, ramread = 0;
-    volatile u_int32_t data;
-
-    /*
-     * Sanity check hardware accessibility.  The 0x6000 portion handles port
-     * numbers associated with Msg Descr Tbl decoding.
-     */
-    portnum = (mcp->offset % 0x6000) / 0x800;
-    if (portnum >= ci->max_port)
-        return -ENXIO;
-    pi = &ci->port[portnum];
-    if (mcp->offset >= 0x6000)
-        offset += 0x6000;           /* put back in MsgCfgDesc address offset */
-    dph = (u_int32_t *) ((u_long) pi->reg + offset);
-
-    /* read of TX are from RAM image, since hardware returns FF */
-    dpr = (u_int32_t *) ((u_long) pi->regram + offset);
-    if (mcp->offset < 0x6000)       /* non MsgDesc Tbl accesses might require
-                                     * RAM access */
-    {
-        if (offset >= 0x200 && offset < 0x380)
-            ramread = 1;
-        if (offset >= 0x10 && offset < 0x200)
-            ramread = 1;
-    }
-    /* read register from RAM or hardware, depending... */
-    if (ramread)
-    {
-        data = *dpr;
-        //pr_info("c4_musycc_rw: RAM addr %p  read data %x (portno %x offset %x RAM ramread %x)\n", dpr, data, portnum, offset, ramread); /* RLD DEBUG */
-    } else
-    {
-        data = pci_read_32 ((u_int32_t *) dph);
-        //pr_info("c4_musycc_rw: REG addr %p  read data %x (portno %x offset %x RAM ramread %x)\n", dph, data, portnum, offset, ramread); /* RLD DEBUG */
-    }
-
-
-    if (mcp->RWportnum & 0x80)
-    {                               /* control says this is a register
-                                     * _write_ */
-        if (mcp->value == data)
-            pr_info("%s: musycc grp%d already that value! writing again anyhow.\n",
-                    ci->devname, (mcp->RWportnum & 0x7));
-        /* write register RAM */
-        if (ramread)
-            *dpr = mcp->value;
-        /* write hardware register */
-        pci_write_32 ((u_int32_t *) dph, mcp->value);
-    }
-    mcp->value = data;              /* return the read value (or the 'old
-                                     * value', if is write) */
-    return 0;
-}
-
-status_t
-c4_get_port (ci_t *ci, int portnum)
-{
-    if (portnum >= ci->max_port)    /* sanity check */
-        return -ENXIO;
-
-    SD_SEM_TAKE (&ci->sem_wdbusy, "_wd_");      /* only 1 thru here, per
-                                                 * board */
-    checkPorts (ci);
-    ci->port[portnum].p.portStatus = (u_int8_t) ci->alarmed[portnum];
-    ci->alarmed[portnum] &= 0xdf;
-    SD_SEM_GIVE (&ci->sem_wdbusy);  /* release per-board hold */
-    return 0;
-}
-
-status_t
-c4_set_port (ci_t *ci, int portnum)
-{
-    mpi_t      *pi;
-    struct sbecom_port_param *pp;
-    int         e1mode;
-    u_int8_t    clck;
-    int         i;
-
-    if (portnum >= ci->max_port)    /* sanity check */
-        return -ENXIO;
-
-    pi = &ci->port[portnum];
-    pp = &ci->port[portnum].p;
-    e1mode = IS_FRAME_ANY_E1 (pp->port_mode);
-    if (cxt1e1_log_level >= LOG_MONITOR2)
-    {
-        pr_info("%s: c4_set_port[%d]:  entered, e1mode = %x, openchans %d.\n",
-                ci->devname,
-                portnum, e1mode, pi->openchans);
-    }
-    if (pi->openchans)
-        return -EBUSY;               /* group needs initialization only for
-                                     * first channel of a group */
-
-    {
-        status_t    ret;
-
-       ret = c4_wq_port_init(pi);
-       if (ret)       /* create/init workqueue_struct */
-               return ret;
-    }
-
-    init_comet (ci, pi->cometbase, pp->port_mode, 1 /* clockmaster == true */ , pp->portP);
-    clck = pci_read_32 ((u_int32_t *) &ci->cpldbase->mclk) & PMCC4_CPLD_MCLK_MASK;
-    if (e1mode)
-        clck |= 1 << portnum;
-    else
-        clck &= 0xf ^ (1 << portnum);
-
-    pci_write_32 ((u_int32_t *) &ci->cpldbase->mclk, clck);
-    pci_write_32 ((u_int32_t *) &ci->cpldbase->mcsr, PMCC4_CPLD_MCSR_IND);
-    pci_write_32 ((u_int32_t *) &pi->reg->gbp, OS_vtophys (pi->regram));
-
-    /*********************************************************************/
-    /* ERRATA: If transparent mode is used, do not set OOFMP_DISABLE bit */
-    /*********************************************************************/
-
-    pi->regram->grcd =
-        __constant_cpu_to_le32 (MUSYCC_GRCD_RX_ENABLE |
-                                MUSYCC_GRCD_TX_ENABLE |
-                                MUSYCC_GRCD_OOFMP_DISABLE |
-                                MUSYCC_GRCD_SF_ALIGN |  /* per MUSYCC ERRATA,
-                                                         * for T1 * fix */
-                                MUSYCC_GRCD_COFAIRQ_DISABLE |
-                                MUSYCC_GRCD_MC_ENABLE |
-                       (MUSYCC_GRCD_POLLTH_32 << MUSYCC_GRCD_POLLTH_SHIFT));
-
-    pi->regram->pcd =
-        __constant_cpu_to_le32 ((e1mode ? 1 : 0) |
-                                MUSYCC_PCD_TXSYNC_RISING |
-                                MUSYCC_PCD_RXSYNC_RISING |
-                                MUSYCC_PCD_RXDATA_RISING);
-
-    /* Message length descriptor */
-       pi->regram->mld = __constant_cpu_to_le32 (cxt1e1_max_mru | (cxt1e1_max_mru << 16));
-
-    /* tsm algorithm */
-    for (i = 0; i < 32; i++)
-    {
-
-        /*** ASSIGNMENT NOTES:                             ***/
-        /*** Group's channel  ZERO  unavailable if E1.     ***/
-        /*** Group's channel  16    unavailable if E1 CAS. ***/
-        /*** Group's channels 24-31 unavailable if T1.     ***/
-
-        if (((i == 0) && e1mode) ||
-            ((i == 16) && ((pp->port_mode == CFG_FRAME_E1CRC_CAS) || (pp->port_mode == CFG_FRAME_E1CRC_CAS_AMI)))
-            || ((i > 23) && (!e1mode)))
-        {
-            pi->tsm[i] = 0xff;      /* make tslot unavailable for this mode */
-        } else
-        {
-            pi->tsm[i] = 0x00;      /* make tslot available for assignment */
-        }
-    }
-    for (i = 0; i < MUSYCC_NCHANS; i++)
-    {
-        pi->regram->ttsm[i] = 0;
-        pi->regram->rtsm[i] = 0;
-    }
-    FLUSH_MEM_WRITE ();
-    musycc_serv_req (pi, SR_GROUP_INIT | SR_RX_DIRECTION);
-    musycc_serv_req (pi, SR_GROUP_INIT | SR_TX_DIRECTION);
-
-    musycc_init_mdt (pi);
-
-    pi->group_is_set = 1;
-    pi->p = *pp;
-    return 0;
-}
-
-
-unsigned int max_int = 0;
-
-status_t
-c4_new_chan (ci_t *ci, int portnum, int channum, void *user)
-{
-    mpi_t      *pi;
-    mch_t      *ch;
-    int         gchan;
-
-    if (c4_find_chan (channum))     /* a new channel shouldn't already exist */
-        return -EEXIST;
-
-    if (portnum >= ci->max_port)    /* sanity check */
-        return -ENXIO;
-
-    pi = &(ci->port[portnum]);
-    /* find any available channel within this port */
-    for (gchan = 0; gchan < MUSYCC_NCHANS; gchan++)
-    {
-        ch = pi->chan[gchan];
-        if (ch && ch->state == UNASSIGNED)      /* no assignment is good! */
-            break;
-    }
-    if (gchan == MUSYCC_NCHANS)     /* exhausted table, all were assigned */
-        return -ENFILE;
-
-    ch->up = pi;
-
-    /* NOTE: mch_t already cleared during OS_kmalloc() */
-    ch->state = DOWN;
-    ch->user = user;
-    ch->gchan = gchan;
-    ch->channum = channum;          /* mark our channel assignment */
-    ch->p.channum = channum;
-#if 1
-    ch->p.card = ci->brdno;
-    ch->p.port = portnum;
-#endif
-    ch->p.chan_mode = CFG_CH_PROTO_HDLC_FCS16;
-    ch->p.idlecode = CFG_CH_FLAG_7E;
-    ch->p.pad_fill_count = 2;
-    spin_lock_init (&ch->ch_rxlock);
-    spin_lock_init (&ch->ch_txlock);
-
-    {
-        status_t    ret;
-
-       ret = c4_wk_chan_init(pi, ch);
-       if (ret)
-               return ret;
-    }
-
-    /* save off interface assignments which bound a board */
-    if (!ci->first_if)         /* first channel registered is assumed to
-                                     * be the lowest channel */
-    {
-        ci->first_if = ci->last_if = user;
-        ci->first_channum = ci->last_channum = channum;
-    } else
-    {
-        ci->last_if = user;
-        if (ci->last_channum < channum) /* higher number channel found */
-            ci->last_channum = channum;
-    }
-    return 0;
-}
-
-status_t
-c4_del_chan (int channum)
-{
-    mch_t      *ch;
-
-       ch = c4_find_chan(channum);
-       if (!ch)
-               return -ENOENT;
-
-    if (ch->state == UP)
-        musycc_chan_down ((ci_t *) 0, channum);
-    ch->state = UNASSIGNED;
-    ch->gchan = (-1);
-    ch->channum = (-1);
-    ch->p.channum = (-1);
-    return 0;
-}
-
-status_t
-c4_del_chan_stats (int channum)
-{
-    mch_t      *ch;
-
-       ch = c4_find_chan(channum);
-       if (!ch)
-               return -ENOENT;
-
-    memset (&ch->s, 0, sizeof (struct sbecom_chan_stats));
-    return 0;
-}
-
-
-status_t
-c4_set_chan (int channum, struct sbecom_chan_param *p)
-{
-    mch_t      *ch;
-    int         i, x = 0;
-
-       ch = c4_find_chan(channum);
-       if (!ch)
-               return -ENOENT;
-
-#if 1
-    if (ch->p.card != p->card ||
-        ch->p.port != p->port ||
-        ch->p.channum != p->channum)
-        return -EINVAL;
-#endif
-
-    if (!(ch->up->group_is_set))
-    {
-        return -EIO;                 /* out of order, SET_PORT command
-                                     * required prior to first group's
-                                     * SET_CHAN command */
-    }
-    /*
-     * Check for change of parameter settings in order to invoke closing of
-     * channel prior to hardware poking.
-     */
-
-    if (ch->p.status != p->status || ch->p.chan_mode != p->chan_mode ||
-        ch->p.data_inv != p->data_inv || ch->p.intr_mask != p->intr_mask ||
-        ch->txd_free < ch->txd_num) /* to clear out queued messages */
-        x = 1;                      /* we have a change requested */
-    for (i = 0; i < 32; i++)        /* check for timeslot mapping changes */
-        if (ch->p.bitmask[i] != p->bitmask[i])
-            x = 1;                  /* we have a change requested */
-    ch->p = *p;
-    if (x && (ch->state == UP))     /* if change request and channel is
-                                     * open... */
-    {
-        status_t    ret;
-
-       ret = musycc_chan_down((ci_t *)0, channum);
-       if (ret)
-               return ret;
-       ret = c4_chan_up(ch->up->up, channum);
-       if (ret)
-               return ret;
-        sd_enable_xmit (ch->user);  /* re-enable to catch flow controlled
-                                     * channel */
-    }
-    return 0;
-}
-
-
-status_t
-c4_get_chan (int channum, struct sbecom_chan_param *p)
-{
-    mch_t      *ch;
-
-       ch = c4_find_chan(channum);
-       if (!ch)
-               return -ENOENT;
-
-    *p = ch->p;
-    return 0;
-}
-
-status_t
-c4_get_chan_stats (int channum, struct sbecom_chan_stats *p)
-{
-    mch_t      *ch;
-
-       ch = c4_find_chan(channum);
-       if (!ch)
-               return -ENOENT;
-
-    *p = ch->s;
-    p->tx_pending = atomic_read (&ch->tx_pending);
-    return 0;
-}
-
-static int
-c4_fifo_alloc (mpi_t *pi, int chan, int *len)
-{
-    int         i, l = 0, start = 0, max = 0, maxstart = 0;
-
-    for (i = 0; i < 32; i++)
-    {
-        if (pi->fifomap[i] != -1)
-        {
-            l = 0;
-            start = i + 1;
-            continue;
-        }
-        ++l;
-        if (l > max)
-        {
-            max = l;
-            maxstart = start;
-        }
-        if (max == *len)
-            break;
-    }
-    if (max != *len)
-    {
-        if (cxt1e1_log_level >= LOG_WARN)
-            pr_info("%s: wanted to allocate %d fifo space, but got only %d\n",
-                    pi->up->devname, *len, max);
-        *len = max;
-    }
-    if (cxt1e1_log_level >= LOG_DEBUG)
-        pr_info("%s: allocated %d fifo at %d for channel %d/%d\n",
-                pi->up->devname, max, start, chan, pi->p.portnum);
-    for (i = maxstart; i < (maxstart + max); i++)
-        pi->fifomap[i] = chan;
-    return start;
-}
-
-void
-c4_fifo_free (mpi_t *pi, int chan)
-{
-    int         i;
-
-    if (cxt1e1_log_level >= LOG_DEBUG)
-        pr_info("%s: deallocated fifo for channel %d/%d\n",
-                pi->up->devname, chan, pi->p.portnum);
-    for (i = 0; i < 32; i++)
-        if (pi->fifomap[i] == chan)
-            pi->fifomap[i] = -1;
-}
-
-
-status_t
-c4_chan_up (ci_t *ci, int channum)
-{
-    mpi_t      *pi;
-    mch_t      *ch;
-    struct mbuf *m;
-    struct mdesc *md;
-    int         nts, nbuf, txnum, rxnum;
-    int         addr, i, j, gchan;
-    u_int32_t   tmp;            /* for optimizing conversion across BE
-                                 * platform */
-
-       ch = c4_find_chan(channum);
-       if (!ch)
-               return -ENOENT;
-
-    if (ch->state == UP)
-    {
-        if (cxt1e1_log_level >= LOG_MONITOR)
-            pr_info("%s: channel already UP, graceful early exit\n",
-                    ci->devname);
-        return 0;
-    }
-    pi = ch->up;
-    gchan = ch->gchan;
-    /* find nts ('number of timeslots') */
-    nts = 0;
-    for (i = 0; i < 32; i++)
-    {
-        if (ch->p.bitmask[i] & pi->tsm[i])
-        {
-            if (1 || cxt1e1_log_level >= LOG_WARN)
-            {
-                pr_info("%s: c4_chan_up[%d] EINVAL (attempt to cfg in-use or unavailable TimeSlot[%d])\n",
-                        ci->devname, channum, i);
-                pr_info("+ ask4 %x, currently %x\n",
-                        ch->p.bitmask[i], pi->tsm[i]);
-            }
-            return -EINVAL;
-        }
-        for (j = 0; j < 8; j++)
-            if (ch->p.bitmask[i] & (1 << j))
-                nts++;
-    }
-
-    nbuf = nts / 8 ? nts / 8 : 1;
-    if (!nbuf)
-    {
-        /* if( cxt1e1_log_level >= LOG_WARN)  */
-        pr_info("%s: c4_chan_up[%d] ENOBUFS (no TimeSlots assigned)\n",
-                ci->devname, channum);
-        return -ENOBUFS;             /* this should not happen */
-    }
-    addr = c4_fifo_alloc (pi, gchan, &nbuf);
-    ch->state = UP;
-
-    /* Setup the Time Slot Map */
-    musycc_update_timeslots (pi);
-
-    /* ch->tx_limit = nts; */
-    ch->s.tx_pending = 0;
-
-    /* Set Channel Configuration Descriptors */
-    {
-        u_int32_t   ccd;
-
-        ccd = musycc_chan_proto (ch->p.chan_mode) << MUSYCC_CCD_PROTO_SHIFT;
-        if ((ch->p.chan_mode == CFG_CH_PROTO_ISLP_MODE) ||
-            (ch->p.chan_mode == CFG_CH_PROTO_TRANS))
-        {
-            ccd |= MUSYCC_CCD_FCS_XFER; /* Non FSC Mode */
-        }
-        ccd |= 2 << MUSYCC_CCD_MAX_LENGTH;      /* Select second MTU */
-        ccd |= ch->p.intr_mask;
-        ccd |= addr << MUSYCC_CCD_BUFFER_LOC;
-        if (ch->p.chan_mode == CFG_CH_PROTO_TRANS)
-            ccd |= (nbuf) << MUSYCC_CCD_BUFFER_LENGTH;
-        else
-            ccd |= (nbuf - 1) << MUSYCC_CCD_BUFFER_LENGTH;
-
-        if (ch->p.data_inv & CFG_CH_DINV_TX)
-            ccd |= MUSYCC_CCD_INVERT_DATA;      /* Invert data */
-        pi->regram->tcct[gchan] = cpu_to_le32 (ccd);
-
-        if (ch->p.data_inv & CFG_CH_DINV_RX)
-            ccd |= MUSYCC_CCD_INVERT_DATA;      /* Invert data */
-        else
-            ccd &= ~MUSYCC_CCD_INVERT_DATA;     /* take away data inversion */
-        pi->regram->rcct[gchan] = cpu_to_le32 (ccd);
-        FLUSH_MEM_WRITE ();
-    }
-
-    /* Reread the Channel Configuration Descriptor for this channel */
-    musycc_serv_req (pi, SR_CHANNEL_CONFIG | SR_RX_DIRECTION | gchan);
-    musycc_serv_req (pi, SR_CHANNEL_CONFIG | SR_TX_DIRECTION | gchan);
-
-    /*
-     * Figure out how many buffers we want.  If the customer has changed from
-     * the defaults, then use the changed values.  Otherwise, use Transparent
-     * mode's specific minimum default settings.
-     */
-    if (ch->p.chan_mode == CFG_CH_PROTO_TRANS)
-    {
-        if (max_rxdesc_used == max_rxdesc_default)      /* use default setting */
-            max_rxdesc_used = MUSYCC_RXDESC_TRANS;
-        if (max_txdesc_used == max_txdesc_default)      /* use default setting */
-            max_txdesc_used = MUSYCC_TXDESC_TRANS;
-    }
-    /*
-     * Increase counts when hyperchanneling, since this implies an increase
-     * in throughput per channel
-     */
-    rxnum = max_rxdesc_used + (nts / 4);
-    txnum = max_txdesc_used + (nts / 4);
-
-#if 0
-    /* DEBUG INFO */
-    if (cxt1e1_log_level >= LOG_MONITOR)
-        pr_info("%s: mode %x rxnum %d (rxused %d def %d) txnum %d (txused %d def %d)\n",
-                ci->devname, ch->p.chan_mode,
-                rxnum, max_rxdesc_used, max_rxdesc_default,
-                txnum, max_txdesc_used, max_txdesc_default);
-#endif
-
-    ch->rxd_num = rxnum;
-    ch->txd_num = txnum;
-    ch->rxix_irq_srv = 0;
-
-       ch->mdr = kzalloc(sizeof(struct mdesc) * rxnum, GFP_KERNEL | GFP_DMA);
-       ch->mdt = kzalloc(sizeof(struct mdesc) * txnum, GFP_KERNEL | GFP_DMA);
-    if (ch->p.chan_mode == CFG_CH_PROTO_TRANS)
-               tmp = __constant_cpu_to_le32 (cxt1e1_max_mru | EOBIRQ_ENABLE);
-    else
-               tmp = __constant_cpu_to_le32 (cxt1e1_max_mru);
-
-    for (i = 0, md = ch->mdr; i < rxnum; i++, md++)
-    {
-        if (i == (rxnum - 1))
-        {
-            md->snext = &ch->mdr[0];/* wrapness */
-        } else
-        {
-            md->snext = &ch->mdr[i + 1];
-        }
-        md->next = cpu_to_le32 (OS_vtophys (md->snext));
-
-       m = OS_mem_token_alloc(cxt1e1_max_mru);
-       if (!m) {
-               if (cxt1e1_log_level >= LOG_MONITOR)
-                       pr_info(
-                       "%s: c4_chan_up[%d] - token alloc failure, size = %d.\n",
-                       ci->devname, channum, cxt1e1_max_mru);
-               goto errfree;
-        }
-        md->mem_token = m;
-        md->data = cpu_to_le32 (OS_vtophys (OS_mem_token_data (m)));
-        md->status = tmp | MUSYCC_RX_OWNED;     /* MUSYCC owns RX descriptor **
-                                                 * CODING NOTE:
-                                                 * MUSYCC_RX_OWNED = 0 so no
-                                                 * need to byteSwap */
-    }
-
-    for (i = 0, md = ch->mdt; i < txnum; i++, md++)
-    {
-        md->status = HOST_TX_OWNED; /* Host owns TX descriptor ** CODING
-                                     * NOTE: HOST_TX_OWNED = 0 so no need to
-                                     * byteSwap */
-        md->mem_token = NULL;
-        md->data = 0;
-        if (i == (txnum - 1))
-        {
-            md->snext = &ch->mdt[0];/* wrapness */
-        } else
-        {
-            md->snext = &ch->mdt[i + 1];
-        }
-        md->next = cpu_to_le32 (OS_vtophys (md->snext));
-    }
-    ch->txd_irq_srv = ch->txd_usr_add = &ch->mdt[0];
-    ch->txd_free = txnum;
-    ch->tx_full = 0;
-    ch->txd_required = 0;
-
-    /* Configure it into the chip */
-    tmp = cpu_to_le32 (OS_vtophys (&ch->mdt[0]));
-    pi->regram->thp[gchan] = tmp;
-    pi->regram->tmp[gchan] = tmp;
-
-    tmp = cpu_to_le32 (OS_vtophys (&ch->mdr[0]));
-    pi->regram->rhp[gchan] = tmp;
-    pi->regram->rmp[gchan] = tmp;
-
-    /* Activate the Channel */
-    FLUSH_MEM_WRITE ();
-    if (ch->p.status & RX_ENABLED)
-    {
-#ifdef RLD_TRANS_DEBUG
-        pr_info("++ c4_chan_up() CHAN RX ACTIVATE: chan %d\n", ch->channum);
-#endif
-        ch->ch_start_rx = 0;        /* we are restarting RX... */
-        musycc_serv_req (pi, SR_CHANNEL_ACTIVATE | SR_RX_DIRECTION | gchan);
-    }
-    if (ch->p.status & TX_ENABLED)
-    {
-#ifdef RLD_TRANS_DEBUG
-        pr_info("++ c4_chan_up() CHAN TX ACTIVATE: chan %d <delayed>\n", ch->channum);
-#endif
-        ch->ch_start_tx = CH_START_TX_1ST;      /* we are delaying start
-                                                 * until receipt from user of
-                                                 * first packet to transmit. */
-    }
-    ch->status = ch->p.status;
-    pi->openchans++;
-    return 0;
-
-errfree:
-    while (i > 0)
-    {
-        /* Don't leak all the previously allocated mbufs in this loop */
-        i--;
-        OS_mem_token_free (ch->mdr[i].mem_token);
-    }
-    kfree(ch->mdt);
-    ch->mdt = NULL;
-    ch->txd_num = 0;
-    kfree(ch->mdr);
-    ch->mdr = NULL;
-    ch->rxd_num = 0;
-    ch->state = DOWN;
-    return -ENOBUFS;
-}
-
-/* stop the hardware from servicing & interrupting */
-
-void
-c4_stopwd (ci_t *ci)
-{
-    OS_stop_watchdog (&ci->wd);
-    SD_SEM_TAKE (&ci->sem_wdbusy, "_stop_");    /* ensure WD not running */
-    SD_SEM_GIVE (&ci->sem_wdbusy);
-}
-
-
-void
-sbecom_get_brdinfo (ci_t *ci, struct sbe_brd_info *bip, u_int8_t *bsn)
-{
-    char       *np;
-    u_int32_t   sn = 0;
-    int         i;
-
-    bip->brdno = ci->brdno;         /* our board number */
-    bip->brd_id = ci->brd_id;
-    bip->brd_hdw_id = ci->hdw_bid;
-    bip->brd_chan_cnt = MUSYCC_NCHANS *ci->max_port;   /* number of channels
-                                                         * being used */
-    bip->brd_port_cnt = ci->max_port;   /* number of ports being used */
-    bip->brd_pci_speed = BINFO_PCI_SPEED_unk;   /* PCI speed not yet
-                                                 * determinable */
-
-    if (ci->first_if)
-    {
-        {
-            struct net_device *dev;
-
-            dev = (struct net_device *) ci->first_if;
-            np = (char *) dev->name;
-        }
-        strncpy (bip->first_iname, np, CHNM_STRLEN - 1);
-    } else
-        strcpy (bip->first_iname, "<NULL>");
-    if (ci->last_if)
-    {
-        {
-            struct net_device *dev;
-
-            dev = (struct net_device *) ci->last_if;
-            np = (char *) dev->name;
-        }
-        strncpy (bip->last_iname, np, CHNM_STRLEN - 1);
-    } else
-        strcpy (bip->last_iname, "<NULL>");
-
-    if (bsn)
-    {
-        for (i = 0; i < 3; i++)
-        {
-            bip->brd_mac_addr[i] = *bsn++;
-        }
-        for (; i < 6; i++)
-        {
-            bip->brd_mac_addr[i] = *bsn;
-            sn = (sn << 8) | *bsn++;
-        }
-    } else
-    {
-        for (i = 0; i < 6; i++)
-            bip->brd_mac_addr[i] = 0;
-    }
-    bip->brd_sn = sn;
-}
-
-
-status_t
-c4_get_iidinfo (ci_t *ci, struct sbe_iid_info *iip)
-{
-    struct net_device *dev;
-    char       *np;
-
-       dev = getuserbychan(iip->channum);
-       if (!dev)
-               return -ENOENT;
-
-    np = dev->name;
-    strncpy (iip->iname, np, CHNM_STRLEN - 1);
-    iip->iname[CHNM_STRLEN - 1] = '\0';
-    return 0;
-}
-
-
-#ifdef CONFIG_SBE_PMCC4_NCOMM
-void        (*nciInterrupt[MAX_BOARDS][4]) (void);
-extern void wanpmcC4T1E1_hookInterrupt (int cardID, int deviceID, void *handler);
-
-void
-wanpmcC4T1E1_hookInterrupt (int cardID, int deviceID, void *handler)
-{
-    if (cardID < MAX_BOARDS)    /* sanity check */
-        nciInterrupt[cardID][deviceID] = handler;
-}
-
-irqreturn_t
-c4_ebus_intr_th_handler (void *devp)
-{
-    ci_t       *ci = (ci_t *) devp;
-    volatile u_int32_t ists;
-    int         handled = 0;
-    int         brdno;
-
-    /* which COMET caused the interrupt */
-    brdno = ci->brdno;
-    ists = pci_read_32 ((u_int32_t *) &ci->cpldbase->intr);
-    if (ists & PMCC4_CPLD_INTR_CMT_1)
-    {
-        handled = 0x1;
-        if (nciInterrupt[brdno][0] != NULL)
-            (*nciInterrupt[brdno][0]) ();
-    }
-    if (ists & PMCC4_CPLD_INTR_CMT_2)
-    {
-        handled |= 0x2;
-        if (nciInterrupt[brdno][1] != NULL)
-            (*nciInterrupt[brdno][1]) ();
-    }
-    if (ists & PMCC4_CPLD_INTR_CMT_3)
-    {
-        handled |= 0x4;
-        if (nciInterrupt[brdno][2] != NULL)
-            (*nciInterrupt[brdno][2]) ();
-    }
-    if (ists & PMCC4_CPLD_INTR_CMT_4)
-    {
-        handled |= 0x8;
-        if (nciInterrupt[brdno][3] != NULL)
-            (*nciInterrupt[brdno][3]) ();
-    }
-#if 0
-    /*** Test code just de-implements the asserted interrupt.  Alternate
-    vendor will supply COMET interrupt handling code herein or such.
-    ***/
-    pci_write_32 ((u_int32_t *) &ci->reg->glcd, GCD_MAGIC | MUSYCC_GCD_INTB_DISABLE);
-#endif
-
-    return IRQ_RETVAL (handled);
-}
-
-
-unsigned long
-wanpmcC4T1E1_getBaseAddress (int cardID, int deviceID)
-{
-    ci_t       *ci;
-    unsigned long base = 0;
-
-    ci = c4_list;
-    while (ci)
-    {
-        if (ci->brdno == cardID)    /* found valid device */
-        {
-            if (deviceID < ci->max_port)        /* comet is supported */
-                base = ((unsigned long) ci->port[deviceID].cometbase);
-            break;
-        }
-        ci = ci->next;              /* next board, if any */
-    }
-    return base;
-}
-
-#endif                          /*** CONFIG_SBE_PMCC4_NCOMM ***/
-
-
-/***  End-of-File  ***/
diff --git a/drivers/staging/cxt1e1/pmcc4_ioctls.h b/drivers/staging/cxt1e1/pmcc4_ioctls.h
deleted file mode 100644 (file)
index 56a1ee3..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef _INC_PMCC4_IOCTLS_H_
-#define _INC_PMCC4_IOCTLS_H_
-
-/*-----------------------------------------------------------------------------
- * pmcc4_ioctls.h -
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-#include "sbew_ioc.h"
-
-enum
-{
-    // C4_GET_PORT = 0,
-    // C4_SET_PORT,
-    // C4_GET_CHAN,
-    // C4_SET_CHAN,
-    C4_DEL_CHAN = 0,
-    // C4_CREATE_CHAN,
-    // C4_GET_CHAN_STATS,
-    // C4_RESET,
-    // C4_DEBUG,
-    C4_RESET_STATS,
-    C4_LOOP_PORT,
-    C4_RW_FRMR,
-    C4_RW_MSYC,
-    C4_RW_PLD
-};
-
-#define C4_GET_PORT          SBE_IOC_PORT_GET
-#define C4_SET_PORT          SBE_IOC_PORT_SET
-#define C4_GET_CHAN          SBE_IOC_CHAN_GET
-#define C4_SET_CHAN          SBE_IOC_CHAN_SET
-// #define C4_DEL_CHAN          XXX
-#define C4_CREATE_CHAN       SBE_IOC_CHAN_NEW
-#define C4_GET_CHAN_STATS    SBE_IOC_CHAN_GET_STAT
-#define C4_RESET             SBE_IOC_RESET_DEV
-#define C4_DEBUG             SBE_IOC_LOGLEVEL
-// #define C4_RESET_STATS       XXX
-// #define C4_LOOP_PORT         XXX
-// #define C4_RW_FRMR           XXX
-// #define C4_RW_MSYC           XXX
-// #define C4_RW_PLD            XXX
-
-struct c4_chan_stats_wrap
-{
-    int         channum;
-    struct sbecom_chan_stats stats;
-};
-
-#endif   /* _INC_PMCC4_IOCTLS_H_ */
diff --git a/drivers/staging/cxt1e1/pmcc4_private.h b/drivers/staging/cxt1e1/pmcc4_private.h
deleted file mode 100644 (file)
index 451f12f..0000000
+++ /dev/null
@@ -1,295 +0,0 @@
-#ifndef _INC_PMCC4_PRIVATE_H_
-#define _INC_PMCC4_PRIVATE_H_
-
-/*-----------------------------------------------------------------------------
- * pmcc4_private.h -
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/semaphore.h>
-#include <linux/spinlock.h>
-#include <linux/interrupt.h>    /* support for tasklets */
-#include <linux/timer.h>        /* support for timer */
-#include <linux/workqueue.h>
-#include <linux/hdlc.h>
-
-#include "libsbew.h"
-#include "pmcc4_defs.h"
-#include "pmcc4_cpld.h"
-#include "musycc.h"
-#include "sbe_promformat.h"
-#include "comet.h"
-
-
-/* driver state */
-#define SBE_DRVR_INIT        0x0
-#define SBE_DRVR_AVAILABLE   0x69734F4E
-#define SBE_DRVR_DOWN        0x1
-
-/******************************************************************************
- * MUSYCC Message Descriptor - coupled to hardware implementation, the first
- * three u_int32 must not be reordered.
- */
-
-struct mdesc
-{
-    volatile u_int32_t status;  /* Buffer Descriptor */
-    u_int32_t   data;           /* Data Pointer */
-    u_int32_t   next;           /* MUSYCC view of Next Pointer */
-    void       *mem_token;      /* Data */
-    struct mdesc *snext;
-};
-
-
-/*************************************************************************
- * Private driver data structures, internal use only.
- */
-
-struct c4_chan_info
-{
-    int         gchan;          /* channel number within group/port 0-31 */
-    int         channum;        /* absolute channel number 0-128 */
-    u_int8_t    status;
-#define TX_RECOVERY_MASK   0x0f
-#define TX_ONR_RECOVERY    0x01
-#define TX_BUFF_RECOVERY   0x02
-#define RX_RECOVERY_MASK   0xf0
-#define RX_ONR_RECOVERY    0x10
-
-    unsigned char ch_start_rx;
-#define CH_START_RX_NOW    1
-#define CH_START_RX_ONR    2
-#define CH_START_RX_BUF    3
-
-    unsigned char ch_start_tx;
-#define CH_START_TX_1ST    1
-#define CH_START_TX_ONR    2
-#define CH_START_TX_BUF    3
-
-    char        tx_full;        /* boolean */
-    short       txd_free;       /* count of TX Desc available */
-    short       txd_required;   /* count of TX Desc needed by mesg */
-    unsigned short rxd_num;     /* must support range up to 2000 */
-    unsigned short txd_num;     /* must support range up to 1000 */
-    int         rxix_irq_srv;
-
-    enum
-    {
-        UNASSIGNED,             /* AVAILABLE, NOTINUSE */
-        DOWN,                   /* ASSIGNED, NOTINUSE */
-        UP                      /* ASSIGNED and INUSE */
-    }           state;
-
-    struct c4_port_info *up;
-    void       *user;
-
-    struct work_struct ch_work;
-    struct mdesc *mdt;
-    struct mdesc *mdr;
-    struct mdesc *txd_irq_srv;
-    struct mdesc *txd_usr_add;
-
-#if 0
-    /*
-     * FUTURE CODE MIGHT SEPARATE TIMESLOT MAP SETUPS INTO SINGLE IOCTL and
-     * REMOVE MAPS FROM CHANNEL PARAMETER STRUCTURE
-     */
-    /*
-     * each byte in bitmask below represents one timeslot (bitmask[0] is for
-     * timeslot 0 and so on), each bit in the byte selects timeslot bits for
-     * this channel (0xff - whole timeslot, 0x7f - 56kbps mode)
-     */
-
-    u_int8_t    ts_bitmask[32];
-#endif
-    spinlock_t  ch_rxlock;
-    spinlock_t  ch_txlock;
-    atomic_t    tx_pending;
-
-    struct sbecom_chan_stats s;
-    struct sbecom_chan_param p;
-};
-typedef struct c4_chan_info mch_t;
-
-struct c4_port_info
-{
-
-    struct musycc_globalr *reg;
-    struct musycc_groupr *regram;
-    void       *regram_saved;   /* Original malloc value may have non-2KB
-                                 * boundary.  Need to save for use when
-                                 * freeing. */
-    struct s_comet_reg    *cometbase;
-    struct sbe_card_info *up;
-
-    /*
-     * The workqueue is used for TX restart of ONR'd channels when in
-     * Transparent mode.
-     */
-
-    struct workqueue_struct *wq_port;   /* chan restart work queue */
-    struct semaphore sr_sem_busy;       /* service request exclusion
-                                         * semaphore */
-    struct semaphore sr_sem_wait;       /* service request handshake
-                                         * semaphore */
-    u_int32_t   sr_last;
-    short       openchans;
-    char        portnum;
-    char        group_is_set;   /* GROUP_INIT command issued to MUSYCC,
-                                 * otherwise SET_CHAN Ioctl fails */
-
-    mch_t      *chan[MUSYCC_NCHANS];
-    struct sbecom_port_param p;
-
-    /*
-     * The MUSYCC timeslot mappings are maintained within the driver and are
-     * modified and reloaded as each of a group's channels are configured.
-     */
-    u_int8_t    tsm[32];        /* tsm (time slot map) */
-    int         fifomap[32];
-};
-typedef struct c4_port_info mpi_t;
-
-
-#define COMET_OFFSET(x) (0x80000+(x)*0x10000)
-#define EEPROM_OFFSET   0xC0000
-#define ISPLD_OFFSET    0xD0000
-
-/* iSPLD control chip registers */
-#define ISPLD_MCSR  0x0
-#define ISPLD_MCLK  0x1
-#define ISPLD_LEDS  0x2
-#define ISPLD_INTR  0x3
-#define ISPLD_MAX   0x3
-
-struct sbe_card_info
-{
-    struct musycc_globalr *reg;
-    struct musycc_groupr *regram;
-    u_int32_t  *iqd_p;          /* pointer to dword aligned interrupt queue
-                                 * descriptors */
-    void       *iqd_p_saved;    /* Original malloc value may have non-dword
-                                 * aligned boundary.  Need to save for use
-                                 * when freeing. */
-    unsigned int iqp_headx, iqp_tailx;
-
-    struct semaphore sem_wdbusy;/* watchdog exclusion semaphore */
-    struct watchdog wd;         /* statically allocated watchdog structure */
-    atomic_t    bh_pending;     /* bh queued, but not yet running */
-    u_int32_t   brd_id;         /* unique PCI ID */
-    u_int16_t   hdw_bid;      /* on/board hardware ID */
-    unsigned short wdcount;
-    unsigned char max_port;
-    unsigned char brdno;        /* our board number */
-    unsigned char wd_notify;
-#define WD_NOTIFY_1TX       1
-#define WD_NOTIFY_BUF       2
-#define WD_NOTIFY_ONR       4
-    enum                        /* state as regards interrupt processing */
-    {
-        C_INIT,                 /* of-board-address not configured or are in
-                                 * process of being removed, don't access
-                                 * hardware */
-        C_IDLE,                 /* off-board-addresses are configured, but
-                                 * don't service interrupts, just clear them
-                                 * from hardware */
-        C_RUNNING               /* life is good, service away */
-    }           state;
-
-    struct sbe_card_info *next;
-    u_int32_t  *eeprombase;     /* mapped address of board's EEPROM */
-    c4cpld_t   *cpldbase;       /* mapped address of board's CPLD hardware */
-    void       *hdw_info;
-#ifdef CONFIG_PROC_FS
-    struct proc_dir_entry *dir_dev;
-#endif
-
-    /* saved off interface assignments which bound a board */
-    hdlc_device *first_if;
-    hdlc_device *last_if;
-    short       first_channum, last_channum;
-
-    struct intlog
-    {
-        u_int32_t   this_status_new;
-        u_int32_t   last_status_new;
-        u_int32_t   drvr_intr_thcount;
-        u_int32_t   drvr_intr_bhcount;
-        u_int32_t   drvr_int_failure;
-    }           intlog;
-
-    mpi_t       port[MUSYCC_NPORTS];
-    char        devname[SBE_IFACETMPL_SIZE + 1];
-    atomic_t    tx_pending;
-    u_int32_t   alarmed[4];     /* dpm211 */
-
-#if defined(SBE_ISR_TASKLET)
-    struct tasklet_struct ci_musycc_isr_tasklet;
-#elif defined(SBE_ISR_IMMEDIATE)
-    struct tq_struct ci_musycc_isr_tq;
-#endif
-};
-typedef struct sbe_card_info ci_t;
-
-struct s_hdw_info
-{
-    u_int8_t    pci_busno;
-    u_int8_t    pci_slot;
-    u_int8_t    pci_pin[2];
-    u_int8_t    revid[2];
-    u_int8_t    mfg_info_sts;
-#define EEPROM_OK          0x00
-#define EEPROM_CRCERR      0x01
-    char        promfmt;        /* prom type, from sbe_promformat.h */
-
-    char        devname[SBE_IFACETMPL_SIZE];
-    struct pci_bus *bus;
-    struct net_device *ndev;
-    struct pci_dev *pdev[2];
-
-    unsigned long addr[2];
-    void __iomem *addr_mapped[2];
-    unsigned long len[2];
-
-    union
-    {
-        char        data[128];
-        FLD_TYPE1   pft1;       /* prom field, type #1 */
-        FLD_TYPE2   pft2;       /* prom field, type #2 */
-    }           mfg_info;
-};
-typedef struct s_hdw_info hdw_info_t;
-
-/*****************************************************************/
-
-struct c4_priv
-{
-    int         channum;
-    struct sbe_card_info *ci;
-};
-
-
-/*****************************************************************/
-
-extern ci_t *c4_list;
-
-mch_t      *c4_find_chan (int);
-int         c4_set_chan (int channum, struct sbecom_chan_param *);
-int         c4_get_chan (int channum, struct sbecom_chan_param *);
-int         c4_get_chan_stats (int channum, struct sbecom_chan_stats *);
-
-#endif                          /* _INC_PMCC4_PRIVATE_H_ */
diff --git a/drivers/staging/cxt1e1/pmcc4_sysdep.h b/drivers/staging/cxt1e1/pmcc4_sysdep.h
deleted file mode 100644 (file)
index 2916c2c..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-#ifndef _INC_PMCC4_SYSDEP_H_
-#define _INC_PMCC4_SYSDEP_H_
-
-/*-----------------------------------------------------------------------------
- * pmcc4_sysdep.h -
- *
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-/* reduce multiple autoconf entries to a single definition */
-
-#ifdef CONFIG_SBE_PMCC4_HDLC_V7_MODULE
-#undef CONFIG_SBE_PMCC4_HDLC_V7
-#define CONFIG_SBE_PMCC4_HDLC_V7  1
-#endif
-
-#ifdef CONFIG_SBE_PMCC4_NCOMM_MODULE
-#undef CONFIG_SBE_PMCC4_NCOMM
-#define CONFIG_SBE_PMCC4_NCOMM  1
-#endif
-
-
-/* FLUSH MACROS - if using ioremap_nocache(), then these can be NOOPS,
- * otherwise a memory barrier needs to be inserted.
- */
-
-#define FLUSH_PCI_READ()     rmb()
-#define FLUSH_PCI_WRITE()    wmb()
-#define FLUSH_MEM_READ()     rmb()
-#define FLUSH_MEM_WRITE()    wmb()
-
-
-/*
- * System dependent callbacks routines, not inlined...
- * For inlined system dependent routines, see include/sbecom_inlinux_linux.h
- */
-
-/*
- * passes received memory token back to the system, <user> is parameter from
- * sd_new_chan() used to create the channel which the data arrived on
- */
-
-void sd_recv_consume(void *token, size_t len, void *user);
-
-void        sd_disable_xmit (void *user);
-void        sd_enable_xmit (void *user);
-int         sd_line_is_ok (void *user);
-void        sd_line_is_up (void *user);
-void        sd_line_is_down (void *user);
-int         sd_queue_stopped (void *user);
-
-#endif                          /*** _INC_PMCC4_SYSDEP_H_ ***/
-extern int  cxt1e1_log_level;
diff --git a/drivers/staging/cxt1e1/sbe_bid.h b/drivers/staging/cxt1e1/sbe_bid.h
deleted file mode 100644 (file)
index abc2e55..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#ifndef _INC_SBEBID_H_
-#define _INC_SBEBID_H_
-
-/*-----------------------------------------------------------------------------
- * sbe_bid.h -
- *
- * Copyright (C) 2004-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *
- *-----------------------------------------------------------------------------
- */
-
-#define SBE_BID_REG        0x00000000   /* Board ID Register */
-
-#define SBE_BID_256T3_E1         0x46   /* SBE wanPTMC-256T3 (E1 Version) */
-#define SBE_BID_256T3_T1         0x42   /* SBE wanPTMC-256T3 (T1 Version) */
-#define SBE_BID_2T3E3            0x43   /* SBE wanPMC-2T3E3 */
-#define SBE_BID_C1T3             0x45   /* SBE wanPMC-C1T3 */
-#define SBE_BID_C24TE1           0x47   /* SBE wanPTMC-C24TE1  */
-#define SBE_BID_C24TE1_RTM_24    0x48   /* C24TE1 RTM (24 Port) */
-#define SBE_BID_C24TE1_RTM_12    0x49   /* C24TE1 RTM (12 Port) */
-#define SBE_BID_C24TE1_RTM_12DSU 0x4A   /* C24TE1 RTM (12 Port/DSU) */
-#define SBE_BID_C24TE1_RTM_T3    0x4B   /* C24TE1 RTM (T3) */
-#define SBE_BID_C4T1E1           0x41   /* SBE wanPTMC-C4T1E1 */
-#define SBE_BID_HC4T1E1          0x44   /* SBE wanADAPT-HC4T1E1 */
-
-/* bogus temporary usage values */
-#define SBE_BID_PMC_C4T1E1       0xC4   /* SBE wanPMC-C4T1E1 (4 Port) */
-#define SBE_BID_PMC_C2T1E1       0xC2   /* SBE wanPMC-C2T1E1 (2 Port) */
-#define SBE_BID_PMC_C1T1E1       0xC1   /* SBE wanPMC-C1T1E1 (1 Port) */
-#define SBE_BID_PCI_C4T1E1       0x04   /* SBE wanPCI-C4T1E1 (4 Port) */
-#define SBE_BID_PCI_C2T1E1       0x02   /* SBE wanPCI-C2T1E1 (2 Port) */
-#define SBE_BID_PCI_C1T1E1       0x01   /* SBE wanPCI-C1T1E1 (1 Port) */
-
-#endif                          /*** _INC_SBEBID_H_ ***/
diff --git a/drivers/staging/cxt1e1/sbe_promformat.h b/drivers/staging/cxt1e1/sbe_promformat.h
deleted file mode 100644 (file)
index aad411d..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef _INC_SBE_PROMFORMAT_H_
-#define _INC_SBE_PROMFORMAT_H_
-
-/*-----------------------------------------------------------------------------
- * sbe_promformat.h - Contents of seeprom used by dvt and manufacturing tests
- *
- * Copyright (C) 2002-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *
- *-----------------------------------------------------------------------------
- */
-
-
-/***
- *  PMCC4 SAMPLE EEPROM IMAGE
- *
- *  eeprom[00]:  01 11 76 07  01 00 a0 d6
- *  eeprom[08]:  22 34 56 3e  5b c1 1c 3e
- *  eeprom[16]:  5b e1 b6 00  00 00 01 00
- *  eeprom[24]:  00 08 46 d3  7b 5e a8 fb
- *  eeprom[32]:  f7 ef df bf  7f 55 00 01
- *  eeprom[40]:  02 04 08 10  20 40 80 ff
- *  eeprom[48]:  fe fd fb f7  ef df bf 7f
- *
- ***/
-
-
-/*------------------------------------------------------------------------
- *          Type 1 Format
- * byte:
- * 0    1  2    3  4      5   6   7    8  9  10    11 12 13 14    15 16 17 18
- * -------------------------------------------------------------------------
- * 01   11 76   SS SS     00 0A D6 <SERIAL NUM>    <Create TIME>  <Heatrun TIME>
- *       SBE    SUB       SERIAL #    (BCD)         (time_t)       (time_t)
- *       ID     VENDOR                              (format)       (format)
- *
- *  19 20 21 22    23 24 25 26
- *  Heat Run        Heat Run
- *  Iterations      Errors
- *------------------------------------------------------------------------
- *
- *
- *
- *           Type 2 Format  - Added length, CRC in fixed position
- * byte:
- * 0    1  2       3  4  5  6      7  8        9  10     11 12 13 14 15 16
- * -------------------------------------------------------------------------
- * 02   00 1A      CC CC CC CC    11  76       07 03    00 0A D6 <SERIAL NUM>
- *      Payload    SBE Crc32      SUB System   System    SERIAL/MAC
- *      Length                    VENDOR ID    ID
- *
- *  17 18 19 20     21 22 23 24     25 26 27 28    29 39 31 32
- * --------------------------------------------------------------------------
- *  <Create TIME>   <Heatrun TIME>   Heat Run      Heat Run
- *  (time_t)         (time_t)        Iterations    Errors
- *
- */
-
-#define STRUCT_OFFSET(type, symbol)  ((long)&(((type *)0)->symbol))
-
-/*------------------------------------------------------------------------
- *  Historically different Prom format types.
- *
- *  For diagnostic and failure purposes, do not create a type 0x00 or a
- *  type 0xff
- *------------------------------------------------------------------------
- */
-#define PROM_FORMAT_Unk   (-1)
-#define PROM_FORMAT_TYPE1   1
-#define PROM_FORMAT_TYPE2   2
-
-
-/****** bit fields  for a type 1 formatted seeprom **************************/
-    typedef struct
-    {
-        char        type;       /* 0x00 */
-        char        Id[2];      /* 0x01-0x02 */
-        char        SubId[2];   /* 0x03-0x04 */
-        char        Serial[6];  /* 0x05-0x0a */
-        char        CreateTime[4];      /* 0x0b-0x0e */
-        char        HeatRunTime[4];     /* 0x0f-0x12 */
-        char        HeatRunIterations[4];       /* 0x13-0x16 */
-        char        HeatRunErrors[4];   /* 0x17-0x1a */
-        char        Crc32[4];   /* 0x1b-0x1e */
-    }           FLD_TYPE1;
-
-
-/****** bit fields  for a type 2 formatted seeprom **************************/
-    typedef struct
-    {
-        char        type;       /* 0x00 */
-        char        length[2];  /* 0x01-0x02 */
-        char        Crc32[4];   /* 0x03-0x06 */
-        char        Id[2];      /* 0x07-0x08 */
-        char        SubId[2];   /* 0x09-0x0a */
-        char        Serial[6];  /* 0x0b-0x10 */
-        char        CreateTime[4];      /* 0x11-0x14 */
-        char        HeatRunTime[4];     /* 0x15-0x18 */
-        char        HeatRunIterations[4];       /* 0x19-0x1c */
-        char        HeatRunErrors[4];   /* 0x1d-0x20 */
-    }           FLD_TYPE2;
-
-
-
-/***** this union allows us to access the seeprom as an array of bytes ***/
-/***** or as individual fields                                         ***/
-
-#define SBE_EEPROM_SIZE    128
-#define SBE_MFG_INFO_SIZE  sizeof(FLD_TYPE2)
-
-    typedef union
-    {
-        char        bytes[128];
-        FLD_TYPE1   fldType1;
-        FLD_TYPE2   fldType2;
-    }           PROMFORMAT;
-
-#endif                          /*** _INC_SBE_PROMFORMAT_H_ ***/
diff --git a/drivers/staging/cxt1e1/sbecom_inline_linux.h b/drivers/staging/cxt1e1/sbecom_inline_linux.h
deleted file mode 100644 (file)
index f5835c2..0000000
+++ /dev/null
@@ -1,193 +0,0 @@
-#ifndef _INC_SBECOM_INLNX_H_
-#define _INC_SBECOM_INLNX_H_
-
-/*-----------------------------------------------------------------------------
- * sbecom_inline_linux.h - SBE common Linux inlined routines
- *
- * Copyright (C) 2007  One Stop Systems, Inc.
- * Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@onestopsystems.com
- * One Stop Systems, Inc.  Escondido, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-
-#include <linux/types.h>
-#include <linux/module.h>
-#include <linux/kernel.h>       /* resolves kmalloc references */
-#include <linux/skbuff.h>       /* resolves skb references */
-#include <linux/netdevice.h>    /* resolves dev_kree_skb_any */
-#include <asm/byteorder.h>      /* resolves cpu_to_le32 */
-
-/* forward reference */
-u_int32_t   pci_read_32 (u_int32_t *p);
-void        pci_write_32 (u_int32_t *p, u_int32_t v);
-
-
-/*
- * system dependent callbacks
- */
-
-/****************/
-/* memory token */
-/****************/
-
-static inline void *
-OS_mem_token_alloc (size_t size)
-{
-    struct sk_buff *skb;
-
-    skb = dev_alloc_skb (size);
-    if (!skb)
-    {
-        //pr_warning("no mem in OS_mem_token_alloc !\n");
-        return NULL;
-    }
-    return skb;
-}
-
-
-static inline void
-OS_mem_token_free (void *token)
-{
-    dev_kfree_skb_any (token);
-}
-
-
-static inline void
-OS_mem_token_free_irq (void *token)
-{
-    dev_kfree_skb_irq (token);
-}
-
-
-static inline void *
-OS_mem_token_data (void *token)
-{
-    return ((struct sk_buff *) token)->data;
-}
-
-
-static inline void *
-OS_mem_token_next (void *token)
-{
-    return NULL;
-}
-
-
-static inline int
-OS_mem_token_len (void *token)
-{
-    return ((struct sk_buff *) token)->len;
-}
-
-
-static inline int
-OS_mem_token_tlen (void *token)
-{
-    return ((struct sk_buff *) token)->len;
-}
-
-
-/***************************************/
-/* virtual to physical addr conversion */
-/***************************************/
-
-static inline u_long
-OS_phystov (void *addr)
-{
-    return (u_long) __va (addr);
-}
-
-
-static inline u_long
-OS_vtophys (void *addr)
-{
-    return __pa (addr);
-}
-
-
-/**********/
-/* semops */
-/**********/
-
-void        OS_sem_init (void *, int);
-
-
-static inline void
-OS_sem_free (void *sem)
-{
-    /*
-     * NOOP - since semaphores structures predeclared w/in structures, no
-     * longer malloc'd
-     */
-}
-
-#define SD_SEM_TAKE(sem,desc)  down(sem)
-#define SD_SEM_GIVE(sem)       up(sem)
-#define SEM_AVAILABLE     1
-#define SEM_TAKEN         0
-
-
-/**********************/
-/* watchdog functions */
-/**********************/
-
-struct watchdog
-{
-    struct timer_list h;
-    struct work_struct work;
-    void       *softc;
-    void        (*func) (void *softc);
-    int         ticks;
-    int         init_tq;
-};
-
-
-static inline int
-OS_start_watchdog (struct watchdog *wd)
-{
-    wd->h.expires = jiffies + wd->ticks;
-    add_timer (&wd->h);
-    return 0;
-}
-
-
-static inline int
-OS_stop_watchdog (struct watchdog *wd)
-{
-    del_timer_sync (&wd->h);
-    return 0;
-}
-
-
-static inline int
-OS_free_watchdog (struct watchdog *wd)
-{
-    OS_stop_watchdog (wd);
-    kfree(wd);
-    return 0;
-}
-
-
-/* sleep in microseconds */
-void        OS_uwait (int usec, char *description);
-void        OS_uwait_dummy (void);
-
-
-/* watchdog functions */
-int OS_init_watchdog(struct watchdog *wdp, void (*f) (void *), void *ci, int usec);
-
-
-#endif                          /*** _INC_SBECOM_INLNX_H_ ***/
diff --git a/drivers/staging/cxt1e1/sbecrc.c b/drivers/staging/cxt1e1/sbecrc.c
deleted file mode 100644 (file)
index a51780f..0000000
+++ /dev/null
@@ -1,133 +0,0 @@
-/*   Based on "File Verification Using CRC" by Mark R. Nelson in Dr. Dobbs'
- *   Journal, May 1992, pp. 64-67.  This algorithm generates the same CRC
- *   values as ZMODEM and PKZIP
- *
- * Copyright (C) 2002-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#include <linux/types.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "sbe_promformat.h"
-
-/* defines */
-#define CRC32_POLYNOMIAL                0xEDB88320L
-#define CRC_TABLE_ENTRIES                       256
-
-
-
-static      u_int32_t crcTableInit;
-
-#ifdef STATIC_CRC_TABLE
-static u_int32_t CRCTable[CRC_TABLE_ENTRIES];
-
-#endif
-
-
-/***************************************************************************
-*
-* genCrcTable - fills in CRCTable, as used by sbeCrc()
-*
-* RETURNS: N/A
-*
-* ERRNO: N/A
-***************************************************************************/
-
-static void
-genCrcTable(u_int32_t *CRCTable)
-{
-       int         ii, jj;
-       u_int32_t      crc;
-
-       for (ii = 0; ii < CRC_TABLE_ENTRIES; ii++) {
-               crc = ii;
-               for (jj = 8; jj > 0; jj--) {
-                       if (crc & 1)
-                               crc = (crc >> 1) ^ CRC32_POLYNOMIAL;
-                       else
-                               crc >>= 1;
-               }
-               CRCTable[ii] = crc;
-       }
-
-       crcTableInit++;
-}
-
-
-/***************************************************************************
-*
-* sbeCrc - generates a CRC on a given buffer, and initial CRC
-*
-* This routine calculates the CRC for a buffer of data using the
-* table lookup method. It accepts an original value for the crc,
-* and returns the updated value. This permits "catenation" of
-* discontiguous buffers. An original value of 0 for the "first"
-* buffer is the norm.
-*
-* Based on "File Verification Using CRC" by Mark R. Nelson in Dr. Dobb's
-* Journal, May 1992, pp. 64-67.  This algorithm generates the same CRC
-* values as ZMODEM and PKZIP.
-*
-* RETURNS: calculated crc of block
-*
-*/
-
-void
-sbeCrc(u_int8_t *buffer,          /* data buffer to crc */
-       u_int32_t count,           /* length of block in bytes */
-       u_int32_t initialCrc,      /* starting CRC */
-       u_int32_t *result)
-{
-       u_int32_t     *tbl = NULL;
-       u_int32_t      temp1, temp2, crc;
-
-       /*
-       * if table not yet created, do so. Don't care about "extra" time
-       * checking this every time sbeCrc() is called, since CRC calculations
-       * are already time consuming
-       */
-       if (!crcTableInit) {
-#ifdef STATIC_CRC_TABLE
-               tbl = &CRCTable;
-               genCrcTable(tbl);
-#else
-               tbl = kzalloc(CRC_TABLE_ENTRIES * sizeof(u_int32_t),
-                             GFP_KERNEL);
-               if (!tbl) {
-                       *result = 0;   /* dummy up return value due to malloc
-                                       * failure */
-                       return;
-               }
-               genCrcTable(tbl);
-#endif
-       }
-       /* inverting bits makes ZMODEM & PKZIP compatible */
-       crc = initialCrc ^ 0xFFFFFFFFL;
-
-       while (count-- != 0) {
-               temp1 = (crc >> 8) & 0x00FFFFFFL;
-               temp2 = tbl[((int) crc ^ *buffer++) & 0xff];
-               crc = temp1 ^ temp2;
-       }
-
-       crc ^= 0xFFFFFFFFL;
-
-       *result = crc;
-
-#ifndef STATIC_CRC_TABLE
-       crcTableInit = 0;
-       kfree(tbl);
-#endif
-}
-
-/*** End-of-File ***/
diff --git a/drivers/staging/cxt1e1/sbeid.c b/drivers/staging/cxt1e1/sbeid.c
deleted file mode 100644 (file)
index 97c5c6e..0000000
+++ /dev/null
@@ -1,205 +0,0 @@
-/* Copyright (C) 2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#include <linux/types.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "libsbew.h"
-#include "pmcc4_private.h"
-#include "pmcc4.h"
-#include "sbe_bid.h"
-
-char       *
-sbeid_get_bdname(ci_t *ci)
-{
-       char       *np = NULL;
-
-       switch (ci->brd_id) {
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_E1):
-               np = "wanPTMC-256T3 <E1>";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_T1):
-               np = "wanPTMC-256T3 <T1>";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1_L):
-               np = "wanPMC-C4T1E1";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1_L):
-               np = "wanPMC-C2T1E1";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1_L):
-               np = "wanPMC-C1T1E1";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C4T1E1):
-               np = "wanPCI-C4T1E1";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C2T1E1):
-               np = "wanPCI-C2T1E1";
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C1T1E1):
-               np = "wanPCI-C1T1E1";
-               break;
-       default:
-               /*** np = "<unknown>";  ***/
-               np = "wanPCI-CxT1E1";
-               break;
-       }
-
-       return np;
-}
-
-
-/* given the presetting of brd_id, set the corresponding hdw_id */
-
-void
-sbeid_set_hdwbid(ci_t *ci)
-{
-       /*
-        * set SBE's unique hardware identification (for legacy boards might not
-        * have this register implemented)
-        */
-
-       switch (ci->brd_id) {
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_E1):
-               ci->hdw_bid = SBE_BID_256T3_E1; /* 0x46 - SBE wanPTMC-256T3 (E1
-                                                * Version) */
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_T1):
-               ci->hdw_bid = SBE_BID_256T3_T1; /* 0x42 - SBE wanPTMC-256T3 (T1
-                                                * Version) */
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1_L):
-               /*
-                * This Board ID is a generic identification.  Use the found number
-                * of ports to further define this hardware.
-                */
-               switch (ci->max_port) {
-               default:                    /* shouldn't need a default, but have one
-                                            * anyway */
-               case 4:
-                       ci->hdw_bid = SBE_BID_PMC_C4T1E1;   /* 0xC4 - SBE wanPMC-C4T1E1 */
-                       break;
-               case 2:
-                       ci->hdw_bid = SBE_BID_PMC_C2T1E1;   /* 0xC2 - SBE wanPMC-C2T1E1 */
-                       ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1);
-                       break;
-               case 1:
-                       ci->hdw_bid = SBE_BID_PMC_C1T1E1;   /* 0xC1 - SBE wanPMC-C1T1E1 */
-                       ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1);
-                       break;
-               }
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1_L):
-               ci->hdw_bid = SBE_BID_PMC_C2T1E1;       /* 0xC2 - SBE wanPMC-C2T1E1 */
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1_L):
-               ci->hdw_bid = SBE_BID_PMC_C1T1E1;       /* 0xC1 - SBE wanPMC-C1T1E1 */
-               break;
-#ifdef SBE_PMCC4_ENABLE
-               /*
-                * This case is entered as a result of the inability to obtain the
-                * <bid> from the board's EEPROM.  Assume a PCI board and set
-                * <hdsbid> according to the number ofr found ports.
-                */
-       case 0:
-               /* start by assuming 4-port for ZERO casing */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C4T1E1);
-               /* drop thru to set hdw_bid and alternate PCI CxT1E1 settings */
-#endif
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C4T1E1):
-               /*
-                * This Board ID is a generic identification.  Use the number of
-                * found ports to further define this hardware.
-                */
-               switch (ci->max_port) {
-               default:                    /* shouldn't need a default, but have one
-                                            * anyway */
-               case 4:
-                       ci->hdw_bid = SBE_BID_PCI_C4T1E1;   /* 0x04 - SBE wanPCI-C4T1E1 */
-                       break;
-               case 2:
-                       ci->hdw_bid = SBE_BID_PCI_C2T1E1;   /* 0x02 - SBE wanPCI-C2T1E1 */
-                       ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C2T1E1);
-                       break;
-               case 1:
-                       ci->hdw_bid = SBE_BID_PCI_C1T1E1;   /* 0x01 - SBE wanPCI-C1T1E1 */
-                       ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C1T1E1);
-                       break;
-               }
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C2T1E1):
-               ci->hdw_bid = SBE_BID_PCI_C2T1E1;       /* 0x02 - SBE wanPCI-C2T1E1 */
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C1T1E1):
-               ci->hdw_bid = SBE_BID_PCI_C1T1E1;       /* 0x01 - SBE wanPCI-C1T1E1 */
-               break;
-       default:
-               /*** bid = "<unknown>";  ***/
-               ci->hdw_bid = SBE_BID_PMC_C4T1E1;       /* 0x41 - SBE wanPTMC-C4T1E1 */
-               break;
-       }
-}
-
-/* given the presetting of hdw_bid, set the corresponding brd_id */
-
-void
-sbeid_set_bdtype(ci_t *ci)
-{
-       /* set SBE's unique PCI VENDOR/DEVID */
-       switch (ci->hdw_bid) {
-       case SBE_BID_C1T3:      /* SBE wanPMC-C1T3 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T3);
-               break;
-       case SBE_BID_C24TE1:            /* SBE wanPTMC-C24TE1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_C24TE1);
-               break;
-       case SBE_BID_256T3_E1:          /* SBE wanPTMC-256T3 E1 Version */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_E1);
-               break;
-       case SBE_BID_256T3_T1:          /* SBE wanPTMC-256T3 T1 Version */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_T1);
-               break;
-       case SBE_BID_PMC_C4T1E1:        /* 0xC4 - SBE wanPMC-C4T1E1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1);
-               break;
-       case SBE_BID_PMC_C2T1E1:        /* 0xC2 - SBE wanPMC-C2T1E1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1);
-               break;
-       case SBE_BID_PMC_C1T1E1:        /* 0xC1 - SBE wanPMC-C1T1E1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1);
-               break;
-       case SBE_BID_PCI_C4T1E1:        /* 0x04 - SBE wanPCI-C4T1E1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C4T1E1);
-               break;
-       case SBE_BID_PCI_C2T1E1:        /* 0x02 - SBE wanPCI-C2T1E1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C2T1E1);
-               break;
-       case SBE_BID_PCI_C1T1E1:        /* 0x01 - SBE wanPCI-C1T1E1 */
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C1T1E1);
-               break;
-
-       default:
-               /*** hdw_bid = "<unknown>";  ***/
-               ci->brd_id = SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C4T1E1);
-               break;
-       }
-}
-
-
-/***  End-of-File  ***/
diff --git a/drivers/staging/cxt1e1/sbeproc.c b/drivers/staging/cxt1e1/sbeproc.c
deleted file mode 100644 (file)
index 1c2e52e..0000000
+++ /dev/null
@@ -1,219 +0,0 @@
-/* Copyright (C) 2004-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- */
-
-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
-#include <linux/types.h>
-#include <linux/module.h>
-#include <linux/errno.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/sched.h>
-#include <asm/uaccess.h>
-#include "pmcc4_sysdep.h"
-#include "sbecom_inline_linux.h"
-#include "pmcc4_private.h"
-#include "sbeproc.h"
-
-extern void sbecom_get_brdinfo(ci_t *, struct sbe_brd_info *, u_int8_t *);
-extern struct s_hdw_info hdw_info[MAX_BOARDS];
-
-void sbecom_proc_brd_cleanup(ci_t *ci)
-{
-       if (ci->dir_dev) {
-               char dir[7 + SBE_IFACETMPL_SIZE + 1];
-               snprintf(dir, sizeof(dir), "driver/%s", ci->devname);
-               remove_proc_entry("info", ci->dir_dev);
-               remove_proc_entry(dir, NULL);
-               ci->dir_dev = NULL;
-       }
-}
-
-static void sbecom_proc_get_brdinfo(ci_t *ci, struct sbe_brd_info *bip)
-{
-       hdw_info_t *hi = &hdw_info[ci->brdno];
-       u_int8_t *bsn = NULL;
-
-       switch (hi->promfmt)
-       {
-       case PROM_FORMAT_TYPE1:
-               bsn = (u_int8_t *) hi->mfg_info.pft1.Serial;
-               break;
-       case PROM_FORMAT_TYPE2:
-               bsn = (u_int8_t *) hi->mfg_info.pft2.Serial;
-               break;
-       }
-
-       sbecom_get_brdinfo (ci, bip, bsn);
-
-       pr_devel(">> sbecom_get_brdinfo: returned, first_if %p <%s> last_if %p <%s>\n",
-                bip->first_iname, bip->first_iname,
-                bip->last_iname, bip->last_iname);
-}
-
-/*
- * Describe the driver state through /proc
- */
-static int sbecom_proc_get_sbe_info(struct seq_file *m, void *v)
-{
-       ci_t       *ci = m->private;
-       char       *spd;
-       struct sbe_brd_info *bip;
-
-       bip = kzalloc(sizeof(struct sbe_brd_info), GFP_KERNEL | GFP_DMA);
-       if (!bip)
-               return -ENOMEM;
-
-       pr_devel(">> sbecom_proc_get_sbe_info: entered\n");
-
-       sbecom_proc_get_brdinfo(ci, bip);
-
-       seq_puts(m, "Board Type:    ");
-       switch (bip->brd_id) {
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T3):
-               seq_puts(m, "wanPMC-C1T3");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_E1):
-               seq_puts(m, "wanPTMC-256T3 <E1>");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_256T3_T1):
-               seq_puts(m, "wanPTMC-256T3 <T1>");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPTMC_C24TE1):
-               seq_puts(m, "wanPTMC-C24TE1");
-               break;
-
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C4T1E1_L):
-               seq_puts(m, "wanPMC-C4T1E1");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C2T1E1_L):
-               seq_puts(m, "wanPMC-C2T1E1");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1):
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPMC_C1T1E1_L):
-               seq_puts(m, "wanPMC-C1T1E1");
-               break;
-
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C4T1E1):
-               seq_puts(m, "wanPCI-C4T1E1");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C2T1E1):
-               seq_puts(m, "wanPCI-C2T1E1");
-               break;
-       case SBE_BOARD_ID(PCI_VENDOR_ID_SBE, PCI_DEVICE_ID_WANPCI_C1T1E1):
-               seq_puts(m, "wanPCI-C1T1E1");
-               break;
-
-       default:
-               seq_puts(m, "unknown");
-               break;
-       }
-
-       seq_printf(m, "  [%08X]\n", bip->brd_id);
-
-       seq_printf(m, "Board Number:  %d\n", bip->brdno);
-       seq_printf(m, "Hardware ID:   0x%02X\n", ci->hdw_bid);
-       seq_printf(m, "Board SN:      %06X\n", bip->brd_sn);
-       seq_printf(m, "Board MAC:     %pMF\n", bip->brd_mac_addr);
-       seq_printf(m, "Ports:         %d\n", ci->max_port);
-       seq_printf(m, "Channels:      %d\n", bip->brd_chan_cnt);
-#if 1
-       seq_printf(m, "Interface:     %s -> %s\n",
-                  bip->first_iname, bip->last_iname);
-#else
-       seq_printf(m, "Interface:     <not available> 1st %p lst %p\n",
-                  bip->first_iname, bip->last_iname);
-#endif
-
-       switch (bip->brd_pci_speed) {
-       case BINFO_PCI_SPEED_33:
-               spd = "33Mhz";
-               break;
-       case BINFO_PCI_SPEED_66:
-               spd = "66Mhz";
-               break;
-       default:
-               spd = "<not available>";
-               break;
-       }
-       seq_printf(m, "PCI Bus Speed: %s\n", spd);
-
-#ifdef SBE_PMCC4_ENABLE
-       {
-               extern int cxt1e1_max_mru;
-#if 0
-               extern int max_chans_used;
-               extern int cxt1e1_max_mtu;
-#endif
-               extern int max_rxdesc_used, max_txdesc_used;
-
-               seq_printf(m, "\ncxt1e1_max_mru:         %d\n", cxt1e1_max_mru);
-#if 0
-               seq_printf(m, "\nmax_chans_used:  %d\n", max_chans_used);
-               seq_printf(m, "cxt1e1_max_mtu:         %d\n", cxt1e1_max_mtu);
-#endif
-               seq_printf(m, "max_rxdesc_used: %d\n", max_rxdesc_used);
-               seq_printf(m, "max_txdesc_used: %d\n", max_txdesc_used);
-       }
-#endif
-
-       kfree(bip);
-
-       pr_devel(">> proc_fs: finished\n");
-       return 0;
-}
-
-/*
- * seq_file wrappers for procfile show routines.
- */
-static int sbecom_proc_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, sbecom_proc_get_sbe_info, PDE_DATA(inode));
-}
-
-static const struct file_operations sbecom_proc_fops = {
-       .open           = sbecom_proc_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-};
-
-/*
- * Initialize the /proc subsystem for the specific SBE driver
- */
-int __init sbecom_proc_brd_init(ci_t *ci)
-{
-       char dir[7 + SBE_IFACETMPL_SIZE + 1];
-
-       snprintf(dir, sizeof(dir), "driver/%s", ci->devname);
-       ci->dir_dev = proc_mkdir(dir, NULL);
-       if (!ci->dir_dev) {
-               pr_err("Unable to create directory /proc/driver/%s\n", ci->devname);
-               goto fail;
-       }
-
-       if (!proc_create_data("info", S_IFREG | S_IRUGO, ci->dir_dev,
-                             &sbecom_proc_fops, ci)) {
-               pr_err("Unable to create entry /proc/driver/%s/info\n", ci->devname);
-               goto fail;
-       }
-       return 0;
-
-fail:
-       sbecom_proc_brd_cleanup(ci);
-       return 1;
-}
diff --git a/drivers/staging/cxt1e1/sbeproc.h b/drivers/staging/cxt1e1/sbeproc.h
deleted file mode 100644 (file)
index 37285df..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-#ifndef _INC_SBEPROC_H_
-#define _INC_SBEPROC_H_
-
-/*-----------------------------------------------------------------------------
- * sbeproc.h -
- *
- * Copyright (C) 2004-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *-----------------------------------------------------------------------------
- */
-
-
-#ifdef CONFIG_PROC_FS
-void        sbecom_proc_brd_cleanup (ci_t *);
-int __init  sbecom_proc_brd_init (ci_t *);
-
-#else
-
-static inline void sbecom_proc_brd_cleanup(ci_t *ci)
-{
-}
-
-static inline int __init sbecom_proc_brd_init(ci_t *ci)
-{
-       return 0;
-}
-
-#endif                          /*** CONFIG_PROC_FS ***/
-
-#endif                          /*** _INC_SBEPROC_H_ ***/
diff --git a/drivers/staging/cxt1e1/sbew_ioc.h b/drivers/staging/cxt1e1/sbew_ioc.h
deleted file mode 100644 (file)
index e1e5bfc..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef _INC_SBEWIOC_H_
-#define _INC_SBEWIOC_H_
-
-/*-----------------------------------------------------------------------------
- * sbew_ioc.h -
- *
- * Copyright (C) 2002-2005  SBE, Inc.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- * For further information, contact via email: support@sbei.com
- * SBE, Inc.  San Ramon, California  U.S.A.
- *
- *-----------------------------------------------------------------------------
- */
-
-#include <linux/ioctl.h>
-
-#define SBE_LOCKFILE   "/tmp/.sbewan.LCK"
-
-#define SBE_IOC_COOKIE     0x19780926
-#define SBE_IOC_MAGIC      ('s')
-
-/* IOW write - data has to go into driver from application */
-/* IOR read - data has to be returned to application from driver */
-
-/*
- * Note: for an IOWR Ioctl, the read and write data do not have to
- * be the same size, but the entity declared within the IOC must be
- * the larger of the two.
- */
-
-#define SBE_IOC_LOGLEVEL       _IOW(SBE_IOC_MAGIC, 0x00, int)
-#define SBE_IOC_CHAN_NEW       _IOW(SBE_IOC_MAGIC, 0x01, int)    /* unused */
-#define SBE_IOC_CHAN_UP        _IOW(SBE_IOC_MAGIC, 0x02, int)    /* unused */
-#define SBE_IOC_CHAN_DOWN      _IOW(SBE_IOC_MAGIC, 0x03, int)    /* unused */
-#define SBE_IOC_CHAN_GET       _IOWR(SBE_IOC_MAGIC, 0x04, struct sbecom_chan_param)
-#define SBE_IOC_CHAN_SET       _IOW(SBE_IOC_MAGIC, 0x05, struct sbecom_chan_param)
-#define SBE_IOC_CHAN_GET_STAT  _IOWR(SBE_IOC_MAGIC, 0x06, struct sbecom_chan_stats)
-#define SBE_IOC_CHAN_DEL_STAT  _IOW(SBE_IOC_MAGIC, 0x07, int)
-#define SBE_IOC_PORTS_ENABLE   _IOW(SBE_IOC_MAGIC, 0x0A, int)
-#define SBE_IOC_PORT_GET       _IOWR(SBE_IOC_MAGIC, 0x0C, struct sbecom_port_param)
-#define SBE_IOC_PORT_SET       _IOW(SBE_IOC_MAGIC, 0x0D, struct sbecom_port_param)
-#define SBE_IOC_READ_VEC       _IOWR(SBE_IOC_MAGIC, 0x10, struct sbecom_wrt_vec)
-#define SBE_IOC_WRITE_VEC      _IOWR(SBE_IOC_MAGIC, 0x11, struct sbecom_wrt_vec)
-#define SBE_IOC_GET_SN         _IOR(SBE_IOC_MAGIC, 0x12, u_int32_t)
-#define SBE_IOC_RESET_DEV      _IOW(SBE_IOC_MAGIC, 0x13, int)
-#define SBE_IOC_FRAMER_GET     _IOWR(SBE_IOC_MAGIC, 0x14, struct sbecom_framer_param)
-#define SBE_IOC_FRAMER_SET     _IOW(SBE_IOC_MAGIC, 0x15, struct sbecom_framer_param)
-#define SBE_IOC_CARD_GET       _IOR(SBE_IOC_MAGIC, 0x20, struct sbecom_card_param)
-#define SBE_IOC_CARD_SET       _IOW(SBE_IOC_MAGIC, 0x21, struct sbecom_card_param)
-#define SBE_IOC_CARD_GET_STAT  _IOR(SBE_IOC_MAGIC, 0x22, struct temux_card_stats)
-#define SBE_IOC_CARD_DEL_STAT  _IO(SBE_IOC_MAGIC,  0x23)
-#define SBE_IOC_CARD_CHAN_STAT _IOR(SBE_IOC_MAGIC, 0x24, struct sbecom_chan_stats)
-#define SBE_IOC_CARD_BLINK     _IOW(SBE_IOC_MAGIC, 0x30, int)
-#define SBE_IOC_DRVINFO_GET    _IOWR(SBE_IOC_MAGIC, 0x31, struct sbe_drv_info)
-#define SBE_IOC_BRDINFO_GET    _IOR(SBE_IOC_MAGIC, 0x32, struct sbe_brd_info)
-#define SBE_IOC_IID_GET        _IOWR(SBE_IOC_MAGIC, 0x33, struct sbe_iid_info)
-#define SBE_IOC_BRDADDR_GET    _IOWR(SBE_IOC_MAGIC, 0x34, struct sbe_brd_addr)
-
-#ifdef NOT_YET_COMMON
-#define SBE_IOC_TSIOC_GET      _IOWR(SBE_IOC_MAGIC, 0x16, struct wanc1t3_ts_param)
-#define SBE_IOC_TSIOC_SET      _IOW(SBE_IOC_MAGIC, 0x17, struct wanc1t3_ts_param)
-#endif
-
-/*
- * Restrict SBE_IOC_WRITE_VEC & READ_VEC to a single parameter pair, application
- * then must issue multiple Ioctls for large blocks of contiguous data.
- */
-
-#define SBE_IOC_MAXVEC    1
-
-#endif                          /*** _INC_SBEWIOC_H_ ***/
index 170d6f3e42218214bf869e15163d253aa4c98a82..d4f80afe947d00ba43d5d91531507b86025595fc 100644 (file)
@@ -70,14 +70,15 @@ MODULE_SUPPORTED_DEVICE("dgap");
 
 static int dgap_start(void);
 static void dgap_init_globals(void);
-static int dgap_found_board(struct pci_dev *pdev, int id);
+static struct board_t *dgap_found_board(struct pci_dev *pdev, int id,
+                                       int boardnum);
 static void dgap_cleanup_board(struct board_t *brd);
 static void dgap_poll_handler(ulong dummy);
 static int dgap_init_pci(void);
 static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
 static void dgap_remove_one(struct pci_dev *dev);
-static int dgap_probe1(struct pci_dev *pdev, int card_type);
 static int dgap_do_remap(struct board_t *brd);
+static void dgap_release_remap(struct board_t *brd);
 static irqreturn_t dgap_intr(int irq, void *voidbrd);
 
 static int dgap_tty_open(struct tty_struct *tty, struct file *file);
@@ -123,8 +124,10 @@ static int dgap_tty_put_char(struct tty_struct *tty, unsigned char c);
 static void dgap_tty_send_xchar(struct tty_struct *tty, char ch);
 
 static int dgap_tty_register(struct board_t *brd);
+static void dgap_tty_unregister(struct board_t *brd);
 static int dgap_tty_init(struct board_t *);
-static void dgap_tty_uninit(struct board_t *);
+static void dgap_tty_free(struct board_t *);
+static void dgap_cleanup_tty(struct board_t *);
 static void dgap_carrier(struct channel_t *ch);
 static void dgap_input(struct channel_t *ch);
 
@@ -175,7 +178,7 @@ static void dgap_remove_tty_sysfs(struct device *c);
 /*
  * Function prototypes from dgap_parse.h
  */
-static int dgap_parsefile(char **in, int remove);
+static int dgap_parsefile(char **in);
 static struct cnode *dgap_find_config(int type, int bus, int slot);
 static uint dgap_config_get_num_prts(struct board_t *bd);
 static char *dgap_create_config_string(struct board_t *bd, char *string);
@@ -188,15 +191,18 @@ static void dgap_do_fep_load(struct board_t *brd, const u8 *ufep, int len);
 #ifdef DIGI_CONCENTRATORS_SUPPORTED
 static void dgap_do_conc_load(struct board_t *brd, u8 *uaddr, int len);
 #endif
-static int dgap_after_config_loaded(int board);
-static int dgap_finalize_board_init(struct board_t *brd);
+static int dgap_alloc_flipbuf(struct board_t *brd);
+static void dgap_free_flipbuf(struct board_t *brd);
+static int dgap_request_irq(struct board_t *brd);
+static void dgap_free_irq(struct board_t *brd);
 
 static void dgap_get_vpd(struct board_t *brd);
 static void dgap_do_reset_board(struct board_t *brd);
 static int dgap_test_bios(struct board_t *brd);
 static int dgap_test_fep(struct board_t *brd);
 static int dgap_tty_register_ports(struct board_t *brd);
-static int dgap_firmware_load(struct pci_dev *pdev, int card_type);
+static int dgap_firmware_load(struct pci_dev *pdev, int card_type,
+                             struct board_t* brd);
 
 static void dgap_cleanup_module(void);
 
@@ -212,7 +218,6 @@ static const struct file_operations dgap_board_fops = {
 static uint dgap_numboards;
 static struct board_t *dgap_board[MAXBOARDS];
 static ulong dgap_poll_counter;
-static char *dgap_config_buf;
 static int dgap_driver_state = DRIVER_INITIALIZED;
 static wait_queue_head_t dgap_dl_wait;
 static int dgap_poll_tick = 20;        /* Poll interval - 20 ms */
@@ -569,6 +574,7 @@ static int dgap_init_pci(void)
 static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 {
        int rc;
+       struct board_t* brd;
 
        if (dgap_numboards >= MAXBOARDS)
                return -EPERM;
@@ -577,17 +583,57 @@ static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (rc)
                return -EIO;
 
-       rc = dgap_probe1(pdev, ent->driver_data);
+       brd = dgap_found_board(pdev, ent->driver_data, dgap_numboards);
+       if (IS_ERR(brd))
+               return PTR_ERR(brd);
+
+       rc = dgap_firmware_load(pdev, ent->driver_data, brd);
        if (rc)
-               return rc;
+               goto cleanup_brd;
 
-       dgap_numboards++;
-       return dgap_firmware_load(pdev, ent->driver_data);
-}
+       rc = dgap_alloc_flipbuf(brd);
+       if (rc)
+               goto cleanup_brd;
 
-static int dgap_probe1(struct pci_dev *pdev, int card_type)
-{
-       return dgap_found_board(pdev, card_type);
+       rc = dgap_tty_register(brd);
+       if (rc)
+               goto free_flipbuf;
+
+       rc = dgap_request_irq(brd);
+       if (rc)
+               goto unregister_tty;
+
+       /*
+        * Do tty device initialization.
+        */
+       rc = dgap_tty_init(brd);
+       if (rc < 0)
+               goto free_irq;
+
+       rc = dgap_tty_register_ports(brd);
+       if (rc)
+               goto tty_free;
+
+       brd->state = BOARD_READY;
+       brd->dpastatus = BD_RUNNING;
+
+       dgap_board[dgap_numboards++] = brd;
+
+       return 0;
+
+tty_free:
+       dgap_tty_free(brd);
+free_irq:
+       dgap_free_irq(brd);
+unregister_tty:
+       dgap_tty_unregister(brd);
+free_flipbuf:
+       dgap_free_flipbuf(brd);
+cleanup_brd:
+       dgap_release_remap(brd);
+       kfree(brd);
+
+       return rc;
 }
 
 static void dgap_remove_one(struct pci_dev *dev)
@@ -620,7 +666,7 @@ static void dgap_cleanup_module(void)
 
        for (i = 0; i < dgap_numboards; ++i) {
                dgap_remove_ports_sysfiles(dgap_board[i]);
-               dgap_tty_uninit(dgap_board[i]);
+               dgap_cleanup_tty(dgap_board[i]);
                dgap_cleanup_board(dgap_board[i]);
        }
 
@@ -640,8 +686,7 @@ static void dgap_cleanup_board(struct board_t *brd)
        if (!brd || brd->magic != DGAP_BOARD_MAGIC)
                return;
 
-       if (brd->intr_used && brd->irq)
-               free_irq(brd->irq, brd);
+       dgap_free_irq(brd);
 
        tasklet_kill(&brd->helper_tasklet);
 
@@ -674,23 +719,22 @@ static void dgap_cleanup_board(struct board_t *brd)
  *
  * A board has been found, init it.
  */
-static int dgap_found_board(struct pci_dev *pdev, int id)
+static struct board_t *dgap_found_board(struct pci_dev *pdev, int id,
+                                       int boardnum)
 {
        struct board_t *brd;
        unsigned int pci_irq;
        int i;
+       int ret;
 
        /* get the board structure and prep it */
        brd = kzalloc(sizeof(struct board_t), GFP_KERNEL);
        if (!brd)
-               return -ENOMEM;
-
-       dgap_board[dgap_numboards] = brd;
+               return ERR_PTR(-ENOMEM);
 
        /* store the info for the board we've found */
        brd->magic = DGAP_BOARD_MAGIC;
-       brd->boardnum = dgap_numboards;
-       brd->firstminor = 0;
+       brd->boardnum = boardnum;
        brd->vendor = dgap_pci_tbl[id].vendor;
        brd->device = dgap_pci_tbl[id].device;
        brd->pdev = pdev;
@@ -734,8 +778,10 @@ static int dgap_found_board(struct pci_dev *pdev, int id)
                brd->membase_end = pci_resource_end(pdev, 0);
        }
 
-       if (!brd->membase)
-               return -ENODEV;
+       if (!brd->membase) {
+               ret = -ENODEV;
+               goto free_brd;
+       }
 
        if (brd->membase & 1)
                brd->membase &= ~3;
@@ -776,18 +822,23 @@ static int dgap_found_board(struct pci_dev *pdev, int id)
        tasklet_init(&brd->helper_tasklet, dgap_poll_tasklet,
                        (unsigned long) brd);
 
-       i = dgap_do_remap(brd);
-       if (i)
-               brd->state = BOARD_FAILED;
+       ret = dgap_do_remap(brd);
+       if (ret)
+               goto free_brd;
 
        pr_info("dgap: board %d: %s (rev %d), irq %ld\n",
-               dgap_numboards, brd->name, brd->rev, brd->irq);
+               boardnum, brd->name, brd->rev, brd->irq);
 
-       return 0;
+       return brd;
+
+free_brd:
+       kfree(brd);
+
+       return ERR_PTR(ret);
 }
 
 
-static int dgap_finalize_board_init(struct board_t *brd)
+static int dgap_request_irq(struct board_t *brd)
 {
        int rc;
 
@@ -814,17 +865,24 @@ static int dgap_finalize_board_init(struct board_t *brd)
        return 0;
 }
 
-static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
+static void dgap_free_irq(struct board_t *brd)
+{
+       if (brd->intr_used && brd->irq)
+               free_irq(brd->irq, brd);
+}
+
+static int dgap_firmware_load(struct pci_dev *pdev, int card_type,
+                             struct board_t* brd)
 {
-       struct board_t *brd = dgap_board[dgap_numboards - 1];
        const struct firmware *fw;
        char *tmp_ptr;
        int ret;
+       char *dgap_config_buf;
 
        dgap_get_vpd(brd);
        dgap_do_reset_board(brd);
 
-       if ((fw_info[card_type].conf_name) && !dgap_config_buf) {
+       if (fw_info[card_type].conf_name) {
                ret = request_firmware(&fw, fw_info[card_type].conf_name,
                                         &pdev->dev);
                if (ret) {
@@ -849,16 +907,13 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
                 */
                tmp_ptr = dgap_config_buf;
 
-               if (dgap_parsefile(&tmp_ptr, TRUE) != 0) {
+               if (dgap_parsefile(&tmp_ptr) != 0) {
                        kfree(dgap_config_buf);
                        return -EINVAL;
                }
                kfree(dgap_config_buf);
        }
 
-       ret = dgap_after_config_loaded(brd->boardnum);
-       if (ret)
-               return ret;
        /*
         * Match this board to a config the user created for us.
         */
@@ -880,14 +935,6 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
                return -EINVAL;
        }
 
-       ret = dgap_tty_register(brd);
-       if (ret)
-               return ret;
-
-       ret = dgap_finalize_board_init(brd);
-       if (ret)
-               return ret;
-
        if (fw_info[card_type].bios_name) {
                ret = request_firmware(&fw, fw_info[card_type].bios_name,
                                        &pdev->dev);
@@ -950,21 +997,6 @@ static int dgap_firmware_load(struct pci_dev *pdev, int card_type)
                release_firmware(fw);
        }
 #endif
-       /*
-        * Do tty device initialization.
-        */
-       ret = dgap_tty_init(brd);
-       if (ret < 0) {
-               dgap_tty_uninit(brd);
-               return ret;
-       }
-
-       ret = dgap_tty_register_ports(brd);
-       if (ret)
-               return ret;
-
-       brd->state = BOARD_READY;
-       brd->dpastatus = BD_RUNNING;
 
        return 0;
 }
@@ -1004,6 +1036,12 @@ static int dgap_do_remap(struct board_t *brd)
        return 0;
 }
 
+static void dgap_release_remap(struct board_t *brd)
+{
+       release_mem_region(brd->membase, 0x200000);
+       release_mem_region(brd->membase + PCI_IO_OFFSET, 0x200000);
+       iounmap(brd->re_map_membase);
+}
 /*****************************************************************************
 *
 * Function:
@@ -1311,6 +1349,14 @@ free_serial_drv:
        return rc;
 }
 
+static void dgap_tty_unregister(struct board_t *brd)
+{
+       tty_unregister_driver(brd->print_driver);
+       tty_unregister_driver(brd->serial_driver);
+       put_tty_driver(brd->print_driver);
+       put_tty_driver(brd->serial_driver);
+}
+
 /*
  * dgap_tty_init()
  *
@@ -1327,6 +1373,7 @@ static int dgap_tty_init(struct board_t *brd)
        struct channel_t *ch;
        struct bs_t __iomem *bs;
        struct cm_t __iomem *cm;
+       int ret;
 
        if (!brd)
                return -EIO;
@@ -1376,11 +1423,11 @@ static int dgap_tty_init(struct board_t *brd)
         * when the driver was first loaded.
         */
        for (i = 0; i < brd->nasync; i++) {
+               brd->channels[i] =
+                       kzalloc(sizeof(struct channel_t), GFP_KERNEL);
                if (!brd->channels[i]) {
-                       brd->channels[i] =
-                               kzalloc(sizeof(struct channel_t), GFP_KERNEL);
-                       if (!brd->channels[i])
-                               return -ENOMEM;
+                       ret = -ENOMEM;
+                       goto free_chan;
                }
        }
 
@@ -1395,9 +1442,6 @@ static int dgap_tty_init(struct board_t *brd)
        /* Set up channel variables */
        for (i = 0; i < brd->nasync; i++, ch = brd->channels[i], bs++) {
 
-               if (!brd->channels[i])
-                       continue;
-
                spin_lock_init(&ch->ch_lock);
 
                /* Store all our magic numbers */
@@ -1480,15 +1524,34 @@ static int dgap_tty_init(struct board_t *brd)
        }
 
        return 0;
+
+free_chan:
+       while (--i >= 0) {
+               kfree(brd->channels[i]);
+               brd->channels[i] = NULL;
+       }
+       return ret;
 }
 
 /*
- * dgap_tty_uninit()
+ * dgap_tty_free()
+ *
+ * Free the channles which are allocated in dgap_tty_init().
+ */
+static void dgap_tty_free(struct board_t *brd)
+{
+       int i;
+
+       for (i = 0; i < brd->nasync; i++)
+               kfree(brd->channels[i]);
+}
+/*
+ * dgap_cleanup_tty()
  *
  * Uninitialize the TTY portion of this driver.  Free all memory and
  * resources.
  */
-static void dgap_tty_uninit(struct board_t *brd)
+static void dgap_cleanup_tty(struct board_t *brd)
 {
        struct device *dev;
        int i;
@@ -4107,29 +4170,35 @@ static int dgap_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
        }
 }
 
-static int dgap_after_config_loaded(int board)
+static int dgap_alloc_flipbuf(struct board_t *brd)
 {
        /*
         * Initialize KME waitqueues...
         */
-       init_waitqueue_head(&(dgap_board[board]->kme_wait));
+       init_waitqueue_head(&brd->kme_wait);
 
        /*
         * allocate flip buffer for board.
         */
-       dgap_board[board]->flipbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
-       if (!dgap_board[board]->flipbuf)
+       brd->flipbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
+       if (!brd->flipbuf)
                return -ENOMEM;
 
-       dgap_board[board]->flipflagbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
-       if (!dgap_board[board]->flipflagbuf) {
-               kfree(dgap_board[board]->flipbuf);
+       brd->flipflagbuf = kmalloc(MYFLIPLEN, GFP_KERNEL);
+       if (!brd->flipflagbuf) {
+               kfree(brd->flipbuf);
                return -ENOMEM;
        }
 
        return 0;
 }
 
+static void dgap_free_flipbuf(struct board_t *brd)
+{
+       kfree(brd->flipbuf);
+       kfree(brd->flipflagbuf);
+}
+
 /*
  * Create pr and tty device entries
  */
@@ -4137,6 +4206,7 @@ static int dgap_tty_register_ports(struct board_t *brd)
 {
        struct channel_t *ch;
        int i;
+       int ret;
 
        brd->serial_ports = kcalloc(brd->nasync, sizeof(*brd->serial_ports),
                                        GFP_KERNEL);
@@ -4146,8 +4216,8 @@ static int dgap_tty_register_ports(struct board_t *brd)
        brd->printer_ports = kcalloc(brd->nasync, sizeof(*brd->printer_ports),
                                        GFP_KERNEL);
        if (!brd->printer_ports) {
-               kfree(brd->serial_ports);
-               return -ENOMEM;
+               ret = -ENOMEM;
+               goto free_serial_ports;
        }
 
        for (i = 0; i < brd->nasync; i++) {
@@ -4161,15 +4231,25 @@ static int dgap_tty_register_ports(struct board_t *brd)
                struct device *classp;
 
                classp = tty_port_register_device(&brd->serial_ports[i],
-                                       brd->serial_driver,
-                                       brd->firstminor + i, NULL);
+                                                 brd->serial_driver,
+                                                 i, NULL);
+
+               if (IS_ERR(classp)) {
+                       ret = PTR_ERR(classp);
+                       goto unregister_ttys;
+               }
 
                dgap_create_tty_sysfs(&ch->ch_tun, classp);
                ch->ch_tun.un_sysfs = classp;
 
                classp = tty_port_register_device(&brd->printer_ports[i],
-                                       brd->print_driver,
-                                       brd->firstminor + i, NULL);
+                                                 brd->print_driver,
+                                                 i, NULL);
+
+               if (IS_ERR(classp)) {
+                       ret = PTR_ERR(classp);
+                       goto unregister_ttys;
+               }
 
                dgap_create_tty_sysfs(&ch->ch_pun, classp);
                ch->ch_pun.un_sysfs = classp;
@@ -4177,6 +4257,35 @@ static int dgap_tty_register_ports(struct board_t *brd)
        dgap_create_ports_sysfiles(brd);
 
        return 0;
+
+unregister_ttys:
+       while (i >= 0) {
+               ch = brd->channels[i];
+               if (ch->ch_tun.un_sysfs) {
+                       dgap_remove_tty_sysfs(ch->ch_tun.un_sysfs);
+                       tty_unregister_device(brd->serial_driver, i);
+               }
+
+               if (ch->ch_pun.un_sysfs) {
+                       dgap_remove_tty_sysfs(ch->ch_pun.un_sysfs);
+                       tty_unregister_device(brd->print_driver, i);
+               }
+               i--;
+       }
+
+       for (i = 0; i < brd->nasync; i++) {
+               tty_port_destroy(&brd->serial_ports[i]);
+               tty_port_destroy(&brd->printer_ports[i]);
+       }
+
+       kfree(brd->printer_ports);
+       brd->printer_ports = NULL;
+
+free_serial_ports:
+       kfree(brd->serial_ports);
+       brd->serial_ports = NULL;
+
+       return ret;
 }
 
 /*
@@ -6381,7 +6490,7 @@ static void dgap_remove_tty_sysfs(struct device *c)
 /*
  * Parse a configuration file read into memory as a string.
  */
-static int dgap_parsefile(char **in, int remove)
+static int dgap_parsefile(char **in)
 {
        struct cnode *p, *brd, *line, *conc;
        int rc;
index 03c020e35f888846f376205e1253f71105f7dc86..c00b2e2ddc8d4154e65bc69adf452482ffaa8394 100644 (file)
@@ -529,7 +529,6 @@ struct macounter {
 struct board_t {
        int             magic;          /* Board Magic number.  */
        int             boardnum;       /* Board number: 0-3 */
-       int             firstminor;     /* First minor, e.g. 0, 30, 60 */
 
        int             type;           /* Type of board */
        char            *name;          /* Product Name */
index 5af8300dfb0d984d9be53d393aec41dc03fddf1a..68460af9e169feb2d4d99ea21856be1dadc8fd16 100644 (file)
@@ -88,8 +88,7 @@ module_exit(dgnc_cleanup_module);
 /*
  * File operations permitted on Control/Management major.
  */
-static const struct file_operations dgnc_BoardFops =
-{
+static const struct file_operations dgnc_BoardFops = {
        .owner          =       THIS_MODULE,
        .unlocked_ioctl =       dgnc_mgmt_ioctl,
        .open           =       dgnc_mgmt_open,
@@ -407,7 +406,7 @@ static void dgnc_cleanup_board(struct dgnc_board *brd)
 {
        int i = 0;
 
-       if(!brd || brd->magic != DGNC_BOARD_MAGIC)
+       if (!brd || brd->magic != DGNC_BOARD_MAGIC)
                return;
 
        switch (brd->device) {
@@ -480,7 +479,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
        /* get the board structure and prep it */
        brd = dgnc_Board[dgnc_NumBoards] =
                kzalloc(sizeof(*brd), GFP_KERNEL);
-       if (!brd) 
+       if (!brd)
                return -ENOMEM;
 
        /* make a temporary message buffer for the boot messages */
@@ -523,7 +522,7 @@ static int dgnc_found_board(struct pci_dev *pdev, int id)
        brd->irq = pci_irq;
 
 
-       switch(brd->device) {
+       switch (brd->device) {
 
        case PCI_DEVICE_CLASSIC_4_DID:
        case PCI_DEVICE_CLASSIC_8_DID:
@@ -710,7 +709,8 @@ failed:
 }
 
 
-static int dgnc_finalize_board_init(struct dgnc_board *brd) {
+static int dgnc_finalize_board_init(struct dgnc_board *brd)
+{
        int rc = 0;
 
        DPR_INIT(("dgnc_finalize_board_init() - start\n"));
@@ -886,7 +886,7 @@ int dgnc_ms_sleep(ulong ms)
  */
 char *dgnc_ioctl_name(int cmd)
 {
-       switch(cmd) {
+       switch (cmd) {
 
        case TCGETA:            return "TCGETA";
        case TCGETS:            return "TCGETS";
diff --git a/drivers/staging/dgrp/Kconfig b/drivers/staging/dgrp/Kconfig
deleted file mode 100644 (file)
index e4c4155..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-config DGRP
-       tristate "Digi Realport driver"
-       default n
-       depends on SYSFS && TTY
-       ---help---
-       Support for Digi Realport devices.  These devices allow you to
-       access remote serial ports as if they are local tty devices.  This
-       will build the kernel driver, you will still need the userspace
-       component to make your Realport device work.
diff --git a/drivers/staging/dgrp/Makefile b/drivers/staging/dgrp/Makefile
deleted file mode 100644 (file)
index d9c3b88..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-obj-$(CONFIG_DGRP) += dgrp.o
-
-dgrp-y :=                      \
-       dgrp_common.o           \
-       dgrp_dpa_ops.o          \
-       dgrp_driver.o           \
-       dgrp_mon_ops.o          \
-       dgrp_net_ops.o          \
-       dgrp_ports_ops.o        \
-       dgrp_specproc.o         \
-       dgrp_tty.o              \
-       dgrp_sysfs.o
diff --git a/drivers/staging/dgrp/README b/drivers/staging/dgrp/README
deleted file mode 100644 (file)
index 1d8aaee..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-The user space code to work with this driver is located at
-https://github.com/wfp5p/dgrp-utils
diff --git a/drivers/staging/dgrp/TODO b/drivers/staging/dgrp/TODO
deleted file mode 100644 (file)
index 3ef2611..0000000
+++ /dev/null
@@ -1,13 +0,0 @@
-- Use configfs for config stuff.  This will require changes to the
-  user space code.
-
-- dgrp_send() and dgrp_receive() could use some refactoring
-
-- Don't automatically create CHAN_MAX (64) channel array entries for
-  every device as many devices are going to have much less than 64
-  channels.
-
-- The locking needs to be checked.  It seems haphazardly done in most
-  places.
-
-- Check Kconfig dependencies
diff --git a/drivers/staging/dgrp/dgrp_common.c b/drivers/staging/dgrp/dgrp_common.c
deleted file mode 100644 (file)
index 9a9b456..0000000
+++ /dev/null
@@ -1,169 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     James Puzzo <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_common.c
- *
- *  Description:
- *
- *     Definitions of global variables and functions which are either
- *     shared by the tty, mon, and net drivers; or which cross them
- *     functionally (like the poller).
- *
- *  Author:
- *
- *     James A. Puzzo
- *
- */
-
-#include <linux/errno.h>
-#include <linux/tty.h>
-#include <linux/sched.h>
-#include <linux/cred.h>
-
-#include "dgrp_common.h"
-
-/**
- * dgrp_carrier -- check for carrier change state and act
- * @ch: struct ch_struct *
- */
-void dgrp_carrier(struct ch_struct *ch)
-{
-       struct nd_struct *nd;
-
-       int virt_carrier = 0;
-       int phys_carrier = 0;
-
-       /* fix case when the tty has already closed. */
-
-       if (!ch)
-               return;
-       nd  = ch->ch_nd;
-       if (!nd)
-               return;
-
-       /*
-        *  If we are currently waiting to determine the status of the port,
-        *  we don't yet know the state of the modem lines.  As a result,
-        *  we ignore state changes when we are waiting for the modem lines
-        *  to be established.  We know, as a result of code in dgrp_net_ops,
-        *  that we will be called again immediately following the reception
-        *  of the status message with the true modem status flags in it.
-        */
-       if (ch->ch_expect & RR_STATUS)
-               return;
-
-       /*
-        * If CH_HANGUP is set, we gotta keep trying to get all the processes
-        * that have the port open to close the port.
-        * So lets just keep sending a hangup every time we get here.
-        */
-       if ((ch->ch_flag & CH_HANGUP) &&
-           (ch->ch_tun.un_open_count > 0))
-               tty_hangup(ch->ch_tun.un_tty);
-
-       /*
-        *  Compute the effective state of both the physical and virtual
-        *  senses of carrier.
-        */
-
-       if (ch->ch_s_mlast & DM_CD)
-               phys_carrier = 1;
-
-       if ((ch->ch_s_mlast & DM_CD) ||
-           (ch->ch_digi.digi_flags & DIGI_FORCEDCD) ||
-           (ch->ch_flag & CH_CLOCAL))
-               virt_carrier = 1;
-
-       /*
-        *  Test for a VIRTUAL carrier transition to HIGH.
-        *
-        *  The CH_HANGUP condition is intended to prevent any action
-        *  except for close.  As a result, we ignore positive carrier
-        *  transitions during CH_HANGUP.
-        */
-       if (((ch->ch_flag & CH_HANGUP)  == 0) &&
-           ((ch->ch_flag & CH_VIRT_CD) == 0) &&
-           (virt_carrier == 1)) {
-               /*
-                * When carrier rises, wake any threads waiting
-                * for carrier in the open routine.
-                */
-               nd->nd_tx_work = 1;
-
-               if (waitqueue_active(&ch->ch_flag_wait))
-                       wake_up_interruptible(&ch->ch_flag_wait);
-       }
-
-       /*
-        *  Test for a PHYSICAL transition to low, so long as we aren't
-        *  currently ignoring physical transitions (which is what "virtual
-        *  carrier" indicates).
-        *
-        *  The transition of the virtual carrier to low really doesn't
-        *  matter... it really only means "ignore carrier state", not
-        *  "make pretend that carrier is there".
-        */
-       if ((virt_carrier == 0) &&
-           ((ch->ch_flag & CH_PHYS_CD) != 0) &&
-           (phys_carrier == 0)) {
-               /*
-                * When carrier drops:
-                *
-                *   Do a Hard Hangup if that is called for.
-                *
-                *   Drop carrier on all open units.
-                *
-                *   Flush queues, waking up any task waiting in the
-                *   line discipline.
-                *
-                *   Send a hangup to the control terminal.
-                *
-                *   Enable all select calls.
-                */
-
-               nd->nd_tx_work = 1;
-
-               ch->ch_flag &= ~(CH_LOW | CH_EMPTY | CH_DRAIN | CH_INPUT);
-
-               if (waitqueue_active(&ch->ch_flag_wait))
-                       wake_up_interruptible(&ch->ch_flag_wait);
-
-               if (ch->ch_tun.un_open_count > 0)
-                       tty_hangup(ch->ch_tun.un_tty);
-
-               if (ch->ch_pun.un_open_count > 0)
-                       tty_hangup(ch->ch_pun.un_tty);
-       }
-
-       /*
-        *  Make sure that our cached values reflect the current reality.
-        */
-       if (virt_carrier == 1)
-               ch->ch_flag |= CH_VIRT_CD;
-       else
-               ch->ch_flag &= ~CH_VIRT_CD;
-
-       if (phys_carrier == 1)
-               ch->ch_flag |= CH_PHYS_CD;
-       else
-               ch->ch_flag &= ~CH_PHYS_CD;
-
-}
diff --git a/drivers/staging/dgrp/dgrp_common.h b/drivers/staging/dgrp/dgrp_common.h
deleted file mode 100644 (file)
index 23aba6c..0000000
+++ /dev/null
@@ -1,150 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     James Puzzo <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-#ifndef __DGRP_COMMON_H
-#define __DGRP_COMMON_H
-
-#define DIGI_VERSION "1.9-29"
-
-#include <linux/fs.h>
-#include <linux/timer.h>
-#include "drp.h"
-
-#define DGRP_TTIME 100
-#define DGRP_RTIME 100
-
-/************************************************************************
- * All global storage allocation.
- ************************************************************************/
-
-extern int dgrp_register_cudevices; /* enable legacy cu devices */
-extern int dgrp_register_prdevices; /* enable transparent print devices */
-extern int dgrp_poll_tick;          /* Poll interval - in ms */
-
-extern struct list_head nd_struct_list;
-
-struct dgrp_poll_data {
-       spinlock_t poll_lock;
-       struct timer_list timer;
-       int poll_tick;
-       ulong poll_round;       /* Timer rouding factor */
-       long node_active_count;
-};
-
-extern struct dgrp_poll_data dgrp_poll_data;
-extern void dgrp_poll_handler(unsigned long arg);
-
-/* from dgrp_mon_ops.c */
-extern const struct file_operations dgrp_mon_ops;
-
-/* from dgrp_tty.c */
-extern int dgrp_tty_init(struct nd_struct *nd);
-extern void dgrp_tty_uninit(struct nd_struct *nd);
-
-/* from dgrp_ports_ops.c */
-extern const struct file_operations dgrp_ports_ops;
-
-/* from dgrp_net_ops.c */
-extern const struct file_operations dgrp_net_ops;
-
-/* from dgrp_dpa_ops.c */
-extern const struct file_operations dgrp_dpa_ops;
-extern void dgrp_dpa_data(struct nd_struct *, int, u8 *, int);
-
-/* from dgrp_sysfs.c */
-extern int dgrp_create_class_sysfs_files(void);
-extern void dgrp_remove_class_sysfs_files(void);
-
-extern void dgrp_create_node_class_sysfs_files(struct nd_struct *nd);
-extern void dgrp_remove_node_class_sysfs_files(struct nd_struct *nd);
-
-extern void dgrp_create_tty_sysfs(struct un_struct *un, struct device *c);
-extern void dgrp_remove_tty_sysfs(struct device *c);
-
-/* from dgrp_specproc.c */
-extern void dgrp_unregister_proc(void);
-extern void dgrp_register_proc(void);
-
-/*-----------------------------------------------------------------------*
- *
- *  Declarations for common operations:
- *
- *      (either used by more than one of net, mon, or tty,
- *       or in interrupt context (i.e. the poller))
- *
- *-----------------------------------------------------------------------*/
-
-void dgrp_carrier(struct ch_struct *ch);
-
-
-/*
- *  ID manipulation macros (where c1 & c2 are characters, i is
- *  a long integer, and s is a character array of at least three members
- */
-
-static inline void ID_TO_CHAR(long i, char *s)
-{
-       s[0] = ((i & 0xff00)>>8);
-       s[1] = (i & 0xff);
-       s[2] = 0;
-}
-
-static inline long CHAR_TO_ID(char *s)
-{
-       return ((s[0] & 0xff) << 8) | (s[1] & 0xff);
-}
-
-static inline struct nd_struct *nd_struct_get(long major)
-{
-       struct nd_struct *nd;
-
-       list_for_each_entry(nd, &nd_struct_list, list) {
-               if (major == nd->nd_major)
-                       return nd;
-       }
-
-       return NULL;
-}
-
-static inline int nd_struct_add(struct nd_struct *entry)
-{
-       struct nd_struct *ptr;
-
-       ptr = nd_struct_get(entry->nd_major);
-
-       if (ptr)
-               return -EBUSY;
-
-       list_add_tail(&entry->list, &nd_struct_list);
-
-       return 0;
-}
-
-static inline int nd_struct_del(struct nd_struct *entry)
-{
-       struct nd_struct *nd;
-
-       nd = nd_struct_get(entry->nd_major);
-
-       if (!nd)
-               return -ENODEV;
-
-       list_del(&nd->list);
-       return 0;
-}
-
-#endif /* __DGRP_COMMON_H */
diff --git a/drivers/staging/dgrp/dgrp_dpa_ops.c b/drivers/staging/dgrp/dgrp_dpa_ops.c
deleted file mode 100644 (file)
index 69bfe30..0000000
+++ /dev/null
@@ -1,534 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     James Puzzo <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_dpa_ops.c
- *
- *  Description:
- *
- *     Handle the file operations required for the "dpa" devices.
- *     Includes those functions required to register the "dpa" devices
- *     in "/proc".
- *
- *  Author:
- *
- *     James A. Puzzo
- *
- */
-
-#include <linux/module.h>
-#include <linux/proc_fs.h>
-#include <linux/tty.h>
-#include <linux/poll.h>
-#include <linux/cred.h>
-#include <linux/sched.h>
-#include <linux/ratelimit.h>
-#include <linux/slab.h>
-#include <asm/unaligned.h>
-
-#include "dgrp_common.h"
-
-/* File operation declarations */
-static int dgrp_dpa_open(struct inode *, struct file *);
-static int dgrp_dpa_release(struct inode *, struct file *);
-static ssize_t dgrp_dpa_read(struct file *, char __user *, size_t, loff_t *);
-static long dgrp_dpa_ioctl(struct file *file, unsigned int cmd,
-                          unsigned long arg);
-static unsigned int dgrp_dpa_select(struct file *, struct poll_table_struct *);
-
-const struct file_operations dgrp_dpa_ops = {
-       .owner   =  THIS_MODULE,
-       .read    =  dgrp_dpa_read,
-       .poll    =  dgrp_dpa_select,
-       .unlocked_ioctl =  dgrp_dpa_ioctl,
-       .open    =  dgrp_dpa_open,
-       .release =  dgrp_dpa_release,
-};
-
-struct digi_node {
-       uint    nd_state;               /* Node state: 1 = up, 0 = down. */
-       uint    nd_chan_count;          /* Number of channels found */
-       uint    nd_tx_byte;             /* Tx data count */
-       uint    nd_rx_byte;             /* RX data count */
-       u8      nd_ps_desc[MAX_DESC_LEN]; /* Description from PS */
-};
-
-#define DIGI_GETNODE      (('d'<<8) | 249)     /* get board info */
-
-
-struct digi_chan {
-       uint    ch_port;        /* Port number to get info on */
-       uint    ch_open;        /* 1 if open, 0 if not */
-       uint    ch_txcount;     /* TX data count  */
-       uint    ch_rxcount;     /* RX data count  */
-       uint    ch_s_brate;     /* Realport BRATE */
-       uint    ch_s_estat;     /* Realport ELAST */
-       uint    ch_s_cflag;     /* Realport CFLAG */
-       uint    ch_s_iflag;     /* Realport IFLAG */
-       uint    ch_s_oflag;     /* Realport OFLAG */
-       uint    ch_s_xflag;     /* Realport XFLAG */
-       uint    ch_s_mstat;     /* Realport MLAST */
-};
-
-#define DIGI_GETCHAN      (('d'<<8) | 248)     /* get channel info */
-
-
-struct digi_vpd {
-       int vpd_len;
-       char vpd_data[VPDSIZE];
-};
-
-#define DIGI_GETVPD       (('d'<<8) | 246)     /* get VPD info */
-
-
-struct digi_debug {
-       int onoff;
-       int port;
-};
-
-#define DIGI_SETDEBUG      (('d'<<8) | 247)    /* set debug info */
-
-
-/*
- * dgrp_dpa_open -- open the DPA device for a particular PortServer
- */
-static int dgrp_dpa_open(struct inode *inode, struct file *file)
-{
-       struct nd_struct *nd;
-       int rtn = 0;
-
-       rtn = try_module_get(THIS_MODULE);
-       if (!rtn)
-               return -ENXIO;
-
-       rtn = 0;
-
-       if (!capable(CAP_SYS_ADMIN)) {
-               rtn = -EPERM;
-               goto done;
-       }
-
-       /*
-        *  Make sure that the "private_data" field hasn't already been used.
-        */
-       if (file->private_data) {
-               rtn = -EINVAL;
-               goto done;
-       }
-
-       /*
-        *  Get the node pointer, and fail if it doesn't exist.
-        */
-       nd = PDE_DATA(inode);
-       if (!nd) {
-               rtn = -ENXIO;
-               goto done;
-       }
-
-       file->private_data = (void *) nd;
-
-       /*
-        * Allocate the DPA buffer.
-        */
-
-       if (nd->nd_dpa_buf) {
-               rtn = -EBUSY;
-       } else {
-               nd->nd_dpa_buf = kmalloc(DPA_MAX, GFP_KERNEL);
-
-               if (!nd->nd_dpa_buf) {
-                       rtn = -ENOMEM;
-               } else {
-                       nd->nd_dpa_out = 0;
-                       nd->nd_dpa_in = 0;
-                       nd->nd_dpa_lbolt = jiffies;
-               }
-       }
-
-done:
-
-       if (rtn)
-               module_put(THIS_MODULE);
-       return rtn;
-}
-
-/*
- * dgrp_dpa_release -- close the DPA device for a particular PortServer
- */
-static int dgrp_dpa_release(struct inode *inode, struct file *file)
-{
-       struct nd_struct *nd;
-       u8 *buf;
-       unsigned long lock_flags;
-
-       /*
-        *  Get the node pointer, and quit if it doesn't exist.
-        */
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               goto done;
-
-       /*
-        *  Free the dpa buffer.
-        */
-
-       spin_lock_irqsave(&nd->nd_dpa_lock, lock_flags);
-
-       buf = nd->nd_dpa_buf;
-
-       nd->nd_dpa_buf = NULL;
-       nd->nd_dpa_out = nd->nd_dpa_in;
-
-       /*
-        *  Wakeup any thread waiting for buffer space.
-        */
-
-       if (nd->nd_dpa_flag & DPA_WAIT_SPACE) {
-               nd->nd_dpa_flag &= ~DPA_WAIT_SPACE;
-               wake_up_interruptible(&nd->nd_dpa_wqueue);
-       }
-
-       spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-
-       kfree(buf);
-
-done:
-       module_put(THIS_MODULE);
-       file->private_data = NULL;
-       return 0;
-}
-
-/*
- * dgrp_dpa_read
- *
- * Copy data from the monitoring buffer to the user, freeing space
- * in the monitoring buffer for more messages
- */
-static ssize_t dgrp_dpa_read(struct file *file, char __user *buf, size_t count,
-                            loff_t *ppos)
-{
-       struct nd_struct *nd;
-       int n;
-       int r;
-       int offset = 0;
-       int res = 0;
-       ssize_t rtn;
-       unsigned long lock_flags;
-
-       /*
-        *  Get the node pointer, and quit if it doesn't exist.
-        */
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               return -ENXIO;
-
-       /*
-        *  Wait for some data to appear in the buffer.
-        */
-
-       spin_lock_irqsave(&nd->nd_dpa_lock, lock_flags);
-
-       for (;;) {
-               n = (nd->nd_dpa_in - nd->nd_dpa_out) & DPA_MASK;
-
-               if (n != 0)
-                       break;
-
-               nd->nd_dpa_flag |= DPA_WAIT_DATA;
-
-               spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-
-               /*
-                * Go to sleep waiting until the condition becomes true.
-                */
-               rtn = wait_event_interruptible(nd->nd_dpa_wqueue,
-                       ((nd->nd_dpa_flag & DPA_WAIT_DATA) == 0));
-
-               if (rtn)
-                       return rtn;
-
-               spin_lock_irqsave(&nd->nd_dpa_lock, lock_flags);
-       }
-
-       /*
-        *  Read whatever is there.
-        */
-
-       if (n > count)
-               n = count;
-
-       res = n;
-
-       r = DPA_MAX - nd->nd_dpa_out;
-
-       if (r <= n) {
-
-               spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-               rtn = copy_to_user((void __user *)buf,
-                                  nd->nd_dpa_buf + nd->nd_dpa_out, r);
-               spin_lock_irqsave(&nd->nd_dpa_lock, lock_flags);
-
-               if (rtn) {
-                       rtn = -EFAULT;
-                       goto done;
-               }
-
-               nd->nd_dpa_out = 0;
-               n -= r;
-               offset = r;
-       }
-
-       spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-       rtn = copy_to_user((void __user *)buf + offset,
-                          nd->nd_dpa_buf + nd->nd_dpa_out, n);
-       spin_lock_irqsave(&nd->nd_dpa_lock, lock_flags);
-
-       if (rtn) {
-               rtn = -EFAULT;
-               goto done;
-       }
-
-       nd->nd_dpa_out += n;
-
-       *ppos += res;
-
-       rtn = res;
-
-       /*
-        *  Wakeup any thread waiting for buffer space.
-        */
-
-       n = (nd->nd_dpa_in - nd->nd_dpa_out) & DPA_MASK;
-
-       if (nd->nd_dpa_flag & DPA_WAIT_SPACE &&
-           (DPA_MAX - n) > DPA_HIGH_WATER) {
-               nd->nd_dpa_flag &= ~DPA_WAIT_SPACE;
-               wake_up_interruptible(&nd->nd_dpa_wqueue);
-       }
-
- done:
-       spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-       return rtn;
-}
-
-static unsigned int dgrp_dpa_select(struct file *file,
-                                   struct poll_table_struct *table)
-{
-       unsigned int retval = 0;
-       struct nd_struct *nd = file->private_data;
-
-       if (nd->nd_dpa_out != nd->nd_dpa_in)
-               retval |= POLLIN | POLLRDNORM; /* Conditionally readable */
-
-       retval |= POLLOUT | POLLWRNORM;        /* Always writeable */
-
-       return retval;
-}
-
-static long dgrp_dpa_ioctl(struct file *file, unsigned int cmd,
-                          unsigned long arg)
-{
-
-       struct nd_struct  *nd;
-       struct digi_chan getchan;
-       struct digi_node getnode;
-       struct ch_struct *ch;
-       struct digi_debug setdebug;
-       struct digi_vpd vpd;
-       unsigned int port;
-       void __user *uarg = (void __user *) arg;
-
-       nd = file->private_data;
-
-       switch (cmd) {
-       case DIGI_GETCHAN:
-               if (copy_from_user(&getchan, uarg, sizeof(struct digi_chan)))
-                       return -EFAULT;
-
-               port = getchan.ch_port;
-
-               if (port > nd->nd_chan_count)
-                       return -EINVAL;
-
-               ch = nd->nd_chan + port;
-
-               getchan.ch_open = (ch->ch_open_count > 0) ? 1 : 0;
-               getchan.ch_txcount = ch->ch_txcount;
-               getchan.ch_rxcount = ch->ch_rxcount;
-               getchan.ch_s_brate = ch->ch_s_brate;
-               getchan.ch_s_estat = ch->ch_s_elast;
-               getchan.ch_s_cflag = ch->ch_s_cflag;
-               getchan.ch_s_iflag = ch->ch_s_iflag;
-               getchan.ch_s_oflag = ch->ch_s_oflag;
-               getchan.ch_s_xflag = ch->ch_s_xflag;
-               getchan.ch_s_mstat = ch->ch_s_mlast;
-
-               if (copy_to_user(uarg, &getchan, sizeof(struct digi_chan)))
-                       return -EFAULT;
-               break;
-
-
-       case DIGI_GETNODE:
-               getnode.nd_state = (nd->nd_state & NS_READY) ? 1 : 0;
-               getnode.nd_chan_count = nd->nd_chan_count;
-               getnode.nd_tx_byte = nd->nd_tx_byte;
-               getnode.nd_rx_byte = nd->nd_rx_byte;
-
-               memset(&getnode.nd_ps_desc, 0, MAX_DESC_LEN);
-               strlcpy(getnode.nd_ps_desc, nd->nd_ps_desc, MAX_DESC_LEN);
-
-               if (copy_to_user(uarg, &getnode, sizeof(struct digi_node)))
-                       return -EFAULT;
-               break;
-
-
-       case DIGI_SETDEBUG:
-               if (copy_from_user(&setdebug, uarg, sizeof(struct digi_debug)))
-                       return -EFAULT;
-
-               nd->nd_dpa_debug = setdebug.onoff;
-               nd->nd_dpa_port = setdebug.port;
-               break;
-
-
-       case DIGI_GETVPD:
-               memset(&vpd, 0, sizeof(vpd));
-               if (nd->nd_vpd_len > 0) {
-                       vpd.vpd_len = nd->nd_vpd_len;
-                       memcpy(&vpd.vpd_data, &nd->nd_vpd, nd->nd_vpd_len);
-               } else {
-                       vpd.vpd_len = 0;
-               }
-
-               if (copy_to_user(uarg, &vpd, sizeof(struct digi_vpd)))
-                       return -EFAULT;
-               break;
-       }
-
-       return 0;
-}
-
-/**
- * dgrp_dpa() -- send data to the device monitor queue
- * @nd: pointer to a node structure
- * @buf: buffer of data to copy to the monitoring buffer
- * @len: number of bytes to transfer to the buffer
- *
- * Called by the net device routines to send data to the device
- * monitor queue.  If the device monitor buffer is too full to
- * accept the data, it waits until the buffer is ready.
- */
-static void dgrp_dpa(struct nd_struct *nd, u8 *buf, int nbuf)
-{
-       int n;
-       int r;
-       unsigned long lock_flags;
-
-       /*
-        *  Grab DPA lock.
-        */
-       spin_lock_irqsave(&nd->nd_dpa_lock, lock_flags);
-
-       /*
-        *  Loop while data remains.
-        */
-       while (nbuf > 0 && nd->nd_dpa_buf != NULL) {
-
-               n = (nd->nd_dpa_out - nd->nd_dpa_in - 1) & DPA_MASK;
-
-               /*
-                * Enforce flow control on the DPA device.
-                */
-               if (n < (DPA_MAX - DPA_HIGH_WATER))
-                       nd->nd_dpa_flag |= DPA_WAIT_SPACE;
-
-               /*
-                * This should never happen, as the flow control above
-                * should have stopped things before they got to this point.
-                */
-               if (n == 0) {
-                       spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-                       return;
-               }
-
-               /*
-                * Copy as much data as will fit.
-                */
-
-               if (n > nbuf)
-                       n = nbuf;
-
-               r = DPA_MAX - nd->nd_dpa_in;
-
-               if (r <= n) {
-                       memcpy(nd->nd_dpa_buf + nd->nd_dpa_in, buf, r);
-
-                       n -= r;
-
-                       nd->nd_dpa_in = 0;
-
-                       buf += r;
-                       nbuf -= r;
-               }
-
-               memcpy(nd->nd_dpa_buf + nd->nd_dpa_in, buf, n);
-
-               nd->nd_dpa_in += n;
-
-               buf += n;
-               nbuf -= n;
-
-               if (nd->nd_dpa_in >= DPA_MAX)
-                       pr_info_ratelimited("%s - nd->nd_dpa_in (%i) >= DPA_MAX\n",
-                                           __func__, nd->nd_dpa_in);
-
-               /*
-                *  Wakeup any thread waiting for data
-                */
-               if (nd->nd_dpa_flag & DPA_WAIT_DATA) {
-                       nd->nd_dpa_flag &= ~DPA_WAIT_DATA;
-                       wake_up_interruptible(&nd->nd_dpa_wqueue);
-               }
-       }
-
-       /*
-        *  Release the DPA lock.
-        */
-       spin_unlock_irqrestore(&nd->nd_dpa_lock, lock_flags);
-}
-
-/**
- * dgrp_monitor_data() -- builds a DPA data packet
- * @nd: pointer to a node structure
- * @type: type of message to be logged in the DPA buffer
- * @buf: buffer of data to be logged in the DPA buffer
- * @size -- number of bytes in the "buf" buffer
- */
-void dgrp_dpa_data(struct nd_struct *nd, int type, u8 *buf, int size)
-{
-       u8 header[5];
-
-       header[0] = type;
-
-       put_unaligned_be32(size, header + 1);
-
-       dgrp_dpa(nd, header, sizeof(header));
-       dgrp_dpa(nd, buf, size);
-}
diff --git a/drivers/staging/dgrp/dgrp_driver.c b/drivers/staging/dgrp/dgrp_driver.c
deleted file mode 100644 (file)
index b60a8da..0000000
+++ /dev/null
@@ -1,105 +0,0 @@
-/*
- *
- * Copyright 1999-2003 Digi International (www.digi.com)
- *     Jeff Randall
- *     James Puzzo  <jamesp at digi dot com>
- *     Scott Kilau  <Scott_Kilau at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *     Driver specific includes
- */
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/tty.h>
-
-/*
- *  PortServer includes
- */
-#include "dgrp_common.h"
-
-
-MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Digi International, http://www.digi.com");
-MODULE_DESCRIPTION("RealPort driver for Digi's ethernet-based serial connectivity product line");
-MODULE_VERSION(DIGI_VERSION);
-
-struct list_head nd_struct_list;
-struct dgrp_poll_data dgrp_poll_data;
-
-int dgrp_register_cudevices = 1;/* Turn on/off registering legacy cu devices */
-int dgrp_register_prdevices = 1;/* Turn on/off registering transparent print */
-int dgrp_poll_tick = 20;       /* Poll interval - in ms */
-
-module_param_named(register_cudevices, dgrp_register_cudevices, int, 0644);
-MODULE_PARM_DESC(register_cudevices, "Turn on/off registering legacy cu devices");
-
-module_param_named(register_prdevices, dgrp_register_prdevices, int, 0644);
-MODULE_PARM_DESC(register_prdevices, "Turn on/off registering transparent print devices");
-
-module_param_named(pollrate, dgrp_poll_tick, int, 0644);
-MODULE_PARM_DESC(pollrate, "Poll interval in ms");
-
-/*
- * init_module()
- *
- * Module load.  This is where it all starts.
- */
-static int __init dgrp_init_module(void)
-{
-       int ret;
-
-       INIT_LIST_HEAD(&nd_struct_list);
-
-       spin_lock_init(&dgrp_poll_data.poll_lock);
-       init_timer(&dgrp_poll_data.timer);
-       dgrp_poll_data.poll_tick = dgrp_poll_tick;
-       dgrp_poll_data.timer.function = dgrp_poll_handler;
-       dgrp_poll_data.timer.data = (unsigned long) &dgrp_poll_data;
-
-       ret = dgrp_create_class_sysfs_files();
-       if (ret)
-               return ret;
-
-       dgrp_register_proc();
-
-       return 0;
-}
-
-
-/*
- *     Module unload.  This is where it all ends.
- */
-static void __exit dgrp_cleanup_module(void)
-{
-       struct nd_struct *nd, *next;
-
-       /*
-        *      Attempting to free resources in backwards
-        *      order of allocation, in case that helps
-        *      memory pool fragmentation.
-        */
-       dgrp_unregister_proc();
-
-       dgrp_remove_class_sysfs_files();
-
-
-       list_for_each_entry_safe(nd, next, &nd_struct_list, list) {
-               dgrp_tty_uninit(nd);
-               kfree(nd);
-       }
-}
-
-module_init(dgrp_init_module);
-module_exit(dgrp_cleanup_module);
diff --git a/drivers/staging/dgrp/dgrp_mon_ops.c b/drivers/staging/dgrp/dgrp_mon_ops.c
deleted file mode 100644 (file)
index d18be41..0000000
+++ /dev/null
@@ -1,327 +0,0 @@
-/*****************************************************************************
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     James Puzzo <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_mon_ops.c
- *
- *  Description:
- *
- *     Handle the file operations required for the "monitor" devices.
- *     Includes those functions required to register the "mon" devices
- *     in "/proc".
- *
- *  Author:
- *
- *     James A. Puzzo
- *
- */
-
-#include <linux/module.h>
-#include <linux/tty.h>
-#include <linux/sched.h>
-#include <asm/unaligned.h>
-#include <linux/slab.h>
-#include <linux/proc_fs.h>
-#include <linux/uaccess.h>
-
-#include "dgrp_common.h"
-
-/* File operation declarations */
-static int dgrp_mon_open(struct inode *, struct file *);
-static int dgrp_mon_release(struct inode *, struct file *);
-static ssize_t dgrp_mon_read(struct file *, char __user *, size_t, loff_t *);
-static long dgrp_mon_ioctl(struct file *file, unsigned int cmd,
-                          unsigned long arg);
-
-const struct file_operations dgrp_mon_ops = {
-       .owner   = THIS_MODULE,
-       .read    = dgrp_mon_read,
-       .unlocked_ioctl = dgrp_mon_ioctl,
-       .open    = dgrp_mon_open,
-       .release = dgrp_mon_release,
-};
-
-/**
- * dgrp_mon_open() -- open /proc/dgrp/ports device for a PortServer
- * @inode: struct inode *
- * @file: struct file *
- *
- * Open function to open the /proc/dgrp/ports device for a PortServer.
- */
-static int dgrp_mon_open(struct inode *inode, struct file *file)
-{
-       struct nd_struct *nd;
-       struct timeval tv;
-       uint32_t time;
-       u8 *buf;
-       int rtn;
-
-       rtn = try_module_get(THIS_MODULE);
-       if (!rtn)
-               return -ENXIO;
-
-       rtn = 0;
-
-       if (!capable(CAP_SYS_ADMIN)) {
-               rtn = -EPERM;
-               goto done;
-       }
-
-       /*
-        *  Make sure that the "private_data" field hasn't already been used.
-        */
-       if (file->private_data) {
-               rtn = -EINVAL;
-               goto done;
-       }
-
-       /*
-        *  Get the node pointer, and fail if it doesn't exist.
-        */
-       nd = PDE_DATA(inode);
-       if (!nd) {
-               rtn = -ENXIO;
-               goto done;
-       }
-
-       file->private_data = (void *) nd;
-
-       /*
-        * Allocate the monitor buffer.
-        */
-
-       /*
-        *  Grab the MON lock.
-        */
-       down(&nd->nd_mon_semaphore);
-
-       if (nd->nd_mon_buf) {
-               rtn = -EBUSY;
-               goto done_up;
-       }
-
-       nd->nd_mon_buf = kmalloc(MON_MAX, GFP_KERNEL);
-
-       if (!nd->nd_mon_buf) {
-               rtn = -ENOMEM;
-               goto done_up;
-       }
-
-       /*
-        *  Enter an RPDUMP file header into the buffer.
-        */
-
-       buf = nd->nd_mon_buf;
-
-       strcpy(buf, RPDUMP_MAGIC);
-       buf += strlen(buf) + 1;
-
-       do_gettimeofday(&tv);
-
-       /*
-        *  tv.tv_sec might be a 64 bit quantity.  Pare
-        *  it down to 32 bits before attempting to encode
-        *  it.
-        */
-       time = (uint32_t) (tv.tv_sec & 0xffffffff);
-
-       put_unaligned_be32(time, buf);
-       put_unaligned_be16(0, buf + 4);
-       buf += 6;
-
-       if (nd->nd_tx_module) {
-               buf[0] = RPDUMP_CLIENT;
-               put_unaligned_be32(0, buf + 1);
-               put_unaligned_be16(1, buf + 5);
-               buf[7] = 0xf0 + nd->nd_tx_module;
-               buf += 8;
-       }
-
-       if (nd->nd_rx_module) {
-               buf[0] = RPDUMP_SERVER;
-               put_unaligned_be32(0, buf + 1);
-               put_unaligned_be16(1, buf + 5);
-               buf[7] = 0xf0 + nd->nd_rx_module;
-               buf += 8;
-       }
-
-       nd->nd_mon_out = 0;
-       nd->nd_mon_in  = buf - nd->nd_mon_buf;
-       nd->nd_mon_lbolt = jiffies;
-
-done_up:
-       up(&nd->nd_mon_semaphore);
-
-done:
-       if (rtn)
-               module_put(THIS_MODULE);
-       return rtn;
-}
-
-
-/**
- * dgrp_mon_release() - Close the MON device for a particular PortServer
- * @inode: struct inode *
- * @file: struct file *
- */
-static int dgrp_mon_release(struct inode *inode, struct file *file)
-{
-       struct nd_struct *nd;
-
-       /*
-        *  Get the node pointer, and quit if it doesn't exist.
-        */
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               goto done;
-
-       /*
-        *  Free the monitor buffer.
-        */
-
-       down(&nd->nd_mon_semaphore);
-
-       kfree(nd->nd_mon_buf);
-       nd->nd_mon_buf = NULL;
-       nd->nd_mon_out = nd->nd_mon_in;
-
-       /*
-        *  Wakeup any thread waiting for buffer space.
-        */
-
-       if (nd->nd_mon_flag & MON_WAIT_SPACE) {
-               nd->nd_mon_flag &= ~MON_WAIT_SPACE;
-               wake_up_interruptible(&nd->nd_mon_wqueue);
-       }
-
-       up(&nd->nd_mon_semaphore);
-
-       /*
-        *  Make sure there is no thread in the middle of writing a packet.
-        */
-       down(&nd->nd_net_semaphore);
-       up(&nd->nd_net_semaphore);
-
-done:
-       module_put(THIS_MODULE);
-       file->private_data = NULL;
-       return 0;
-}
-
-/**
- * dgrp_mon_read() -- Copy data from the monitoring buffer to the user
- */
-static ssize_t dgrp_mon_read(struct file *file, char __user *buf, size_t count,
-                            loff_t *ppos)
-{
-       struct nd_struct *nd;
-       int r;
-       int offset = 0;
-       int res = 0;
-       ssize_t rtn;
-
-       /*
-        *  Get the node pointer, and quit if it doesn't exist.
-        */
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               return -ENXIO;
-
-       /*
-        *  Wait for some data to appear in the buffer.
-        */
-
-       down(&nd->nd_mon_semaphore);
-
-       for (;;) {
-               res = (nd->nd_mon_in - nd->nd_mon_out) & MON_MASK;
-
-               if (res)
-                       break;
-
-               nd->nd_mon_flag |= MON_WAIT_DATA;
-
-               up(&nd->nd_mon_semaphore);
-
-               /*
-                * Go to sleep waiting until the condition becomes true.
-                */
-               rtn = wait_event_interruptible(nd->nd_mon_wqueue,
-                                              ((nd->nd_mon_flag & MON_WAIT_DATA) == 0));
-
-               if (rtn)
-                       return rtn;
-
-               down(&nd->nd_mon_semaphore);
-       }
-
-       /*
-        *  Read whatever is there.
-        */
-
-       if (res > count)
-               res = count;
-
-       r = MON_MAX - nd->nd_mon_out;
-
-       if (r <= res) {
-               rtn = copy_to_user((void __user *)buf,
-                                  nd->nd_mon_buf + nd->nd_mon_out, r);
-               if (rtn) {
-                       up(&nd->nd_mon_semaphore);
-                       return -EFAULT;
-               }
-
-               nd->nd_mon_out = 0;
-               res -= r;
-               offset = r;
-       }
-
-       rtn = copy_to_user((void __user *) buf + offset,
-                          nd->nd_mon_buf + nd->nd_mon_out, res);
-       if (rtn) {
-               up(&nd->nd_mon_semaphore);
-               return -EFAULT;
-       }
-
-       nd->nd_mon_out += res;
-
-       *ppos += res;
-
-       up(&nd->nd_mon_semaphore);
-
-       /*
-        *  Wakeup any thread waiting for buffer space.
-        */
-
-       if (nd->nd_mon_flag & MON_WAIT_SPACE) {
-               nd->nd_mon_flag &= ~MON_WAIT_SPACE;
-               wake_up_interruptible(&nd->nd_mon_wqueue);
-       }
-
-       return res;
-}
-
-/*  ioctl is not valid on monitor device */
-static long dgrp_mon_ioctl(struct file *file, unsigned int cmd,
-                          unsigned long arg)
-{
-       return -EINVAL;
-}
diff --git a/drivers/staging/dgrp/dgrp_net_ops.c b/drivers/staging/dgrp/dgrp_net_ops.c
deleted file mode 100644 (file)
index 33ac7fb..0000000
+++ /dev/null
@@ -1,3666 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     James Puzzo  <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_net_ops.c
- *
- *  Description:
- *
- *     Handle the file operations required for the "network" devices.
- *     Includes those functions required to register the "net" devices
- *     in "/proc".
- *
- *  Author:
- *
- *     James A. Puzzo
- *
- */
-
-#include <linux/module.h>
-#include <linux/proc_fs.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <linux/device.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/spinlock.h>
-#include <linux/poll.h>
-#include <linux/sched.h>
-#include <linux/ratelimit.h>
-#include <asm/unaligned.h>
-
-#define MYFLIPLEN      TBUF_MAX
-
-#include "dgrp_common.h"
-
-#define TTY_FLIPBUF_SIZE 512
-#define DEVICE_NAME_SIZE 50
-
-/*
- *  Generic helper function declarations
- */
-static void   parity_scan(struct ch_struct *ch, unsigned char *cbuf,
-                               unsigned char *fbuf, int *len);
-
-/*
- *  File operation declarations
- */
-static int dgrp_net_open(struct inode *, struct file *);
-static int dgrp_net_release(struct inode *, struct file *);
-static ssize_t dgrp_net_read(struct file *, char __user *, size_t, loff_t *);
-static ssize_t dgrp_net_write(struct file *, const char __user *, size_t,
-                             loff_t *);
-static long dgrp_net_ioctl(struct file *file, unsigned int cmd,
-                          unsigned long arg);
-static unsigned int dgrp_net_select(struct file *file,
-                                   struct poll_table_struct *table);
-
-const struct file_operations dgrp_net_ops = {
-       .owner   =  THIS_MODULE,
-       .read    =  dgrp_net_read,
-       .write   =  dgrp_net_write,
-       .poll    =  dgrp_net_select,
-       .unlocked_ioctl =  dgrp_net_ioctl,
-       .open    =  dgrp_net_open,
-       .release =  dgrp_net_release,
-};
-
-/**
- * dgrp_dump() -- prints memory for debugging purposes.
- * @mem: Memory location which should be printed to the console
- * @len: Number of bytes to be dumped
- */
-static void dgrp_dump(u8 *mem, int len)
-{
-       int i;
-
-       pr_debug("dgrp dump length = %d, data = ", len);
-       for (i = 0; i < len; ++i)
-               pr_debug("%.2x ", mem[i]);
-       pr_debug("\n");
-}
-
-/**
- * dgrp_read_data_block() -- Read a data block
- * @ch: struct ch_struct *
- * @flipbuf: u8 *
- * @flipbuf_size: size of flipbuf
- */
-static void dgrp_read_data_block(struct ch_struct *ch, u8 *flipbuf,
-                                int flipbuf_size)
-{
-       int t;
-       int n;
-
-       if (flipbuf_size <= 0)
-               return;
-
-       t = RBUF_MAX - ch->ch_rout;
-       n = flipbuf_size;
-
-       if (n >= t) {
-               memcpy(flipbuf, ch->ch_rbuf + ch->ch_rout, t);
-               flipbuf += t;
-               n -= t;
-               ch->ch_rout = 0;
-       }
-
-       memcpy(flipbuf, ch->ch_rbuf + ch->ch_rout, n);
-       flipbuf += n;
-       ch->ch_rout += n;
-}
-
-
-/**
- * dgrp_input() -- send data to the line disipline
- * @ch: pointer to channel struct
- *
- * Copys the rbuf to the flipbuf and sends to line discipline.
- * Sends input buffer data to the line discipline.
- *
- */
-static void dgrp_input(struct ch_struct *ch)
-{
-       struct nd_struct *nd;
-       struct tty_struct *tty;
-       int data_len;
-       int len;
-       int tty_count;
-       ulong lock_flags;
-       u8  *myflipbuf;
-       u8  *myflipflagbuf;
-
-       if (!ch)
-               return;
-
-       nd = ch->ch_nd;
-
-       if (!nd)
-               return;
-
-       spin_lock_irqsave(&nd->nd_lock, lock_flags);
-
-       myflipbuf = nd->nd_inputbuf;
-       myflipflagbuf = nd->nd_inputflagbuf;
-
-       if (!ch->ch_open_count) {
-               ch->ch_rout = ch->ch_rin;
-               goto out;
-       }
-
-       if (ch->ch_tun.un_flag & UN_CLOSING) {
-               ch->ch_rout = ch->ch_rin;
-               goto out;
-       }
-
-       tty = (ch->ch_tun).un_tty;
-
-
-       if (!tty || tty->magic != TTY_MAGIC) {
-               ch->ch_rout = ch->ch_rin;
-               goto out;
-       }
-
-       tty_count = tty->count;
-       if (!tty_count) {
-               ch->ch_rout = ch->ch_rin;
-               goto out;
-       }
-
-       if (tty->closing || test_bit(TTY_CLOSING, &tty->flags)) {
-               ch->ch_rout = ch->ch_rin;
-               goto out;
-       }
-
-       spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-
-       /* data_len should be the number of chars that we read in */
-       data_len = (ch->ch_rin - ch->ch_rout) & RBUF_MASK;
-
-       /* len is the amount of data we are going to transfer here */
-       len = tty_buffer_request_room(&ch->port, data_len);
-
-       /* Check DPA flow control */
-       if ((nd->nd_dpa_debug) &&
-           (nd->nd_dpa_flag & DPA_WAIT_SPACE) &&
-           (nd->nd_dpa_port == MINOR(tty_devnum(ch->ch_tun.un_tty))))
-               len = 0;
-
-       if ((len) && !(ch->ch_flag & CH_RXSTOP)) {
-
-               dgrp_read_data_block(ch, myflipbuf, len);
-
-               if (I_PARMRK(tty) || I_BRKINT(tty) || I_INPCK(tty))
-                       parity_scan(ch, myflipbuf, myflipflagbuf, &len);
-               else
-                       memset(myflipflagbuf, TTY_NORMAL, len);
-
-               if ((nd->nd_dpa_debug) &&
-                   (nd->nd_dpa_port == PORT_NUM(MINOR(tty_devnum(tty)))))
-                       dgrp_dpa_data(nd, 1, myflipbuf, len);
-
-               tty_insert_flip_string_flags(&ch->port, myflipbuf,
-                                            myflipflagbuf, len);
-               tty_flip_buffer_push(&ch->port);
-
-               ch->ch_rxcount += len;
-       }
-
-       /*
-        * Wake up any sleepers (maybe dgrp close) that might be waiting
-        * for a channel flag state change.
-        */
-       wake_up_interruptible(&ch->ch_flag_wait);
-       return;
-
-out:
-       spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-}
-
-
-/*
- *  parity_scan
- *
- *  Loop to inspect each single character or 0xFF escape.
- *
- *  if PARMRK & ~DOSMODE:
- *     0xFF  0xFF           Normal 0xFF character, escaped
- *                          to eliminate confusion.
- *     0xFF  0x00  0x00     Break
- *     0xFF  0x00  CC       Error character CC.
- *     CC                   Normal character CC.
- *
- *  if PARMRK & DOSMODE:
- *     0xFF  0x18  0x00     Break
- *     0xFF  0x08  0x00     Framing Error
- *     0xFF  0x04  0x00     Parity error
- *     0xFF  0x0C  0x00     Both Framing and Parity error
- *
- *  TODO:  do we need to do the XMODEM, XOFF, XON, XANY processing??
- *         as per protocol
- */
-static void parity_scan(struct ch_struct *ch, unsigned char *cbuf,
-                       unsigned char *fbuf, int *len)
-{
-       int l = *len;
-       int count = 0;
-       int DOS = ((ch->ch_iflag & IF_DOSMODE) == 0 ? 0 : 1);
-       unsigned char *cout; /* character buffer */
-       unsigned char *fout; /* flag buffer */
-       unsigned char *in;
-       unsigned char c;
-
-       in = cbuf;
-       cout = cbuf;
-       fout = fbuf;
-
-       while (l--) {
-               c = *in;
-               in++;
-
-               switch (ch->ch_pscan_state) {
-               default:
-                       /* reset to sanity and fall through */
-                       ch->ch_pscan_state = 0;
-
-               case 0:
-                       /* No FF seen yet */
-                       if (c == 0xff) /* delete this character from stream */
-                               ch->ch_pscan_state = 1;
-                       else {
-                               *cout++ = c;
-                               *fout++ = TTY_NORMAL;
-                               count += 1;
-                       }
-                       break;
-
-               case 1:
-                       /* first FF seen */
-                       if (c == 0xff) {
-                               /* doubled ff, transform to single ff */
-                               *cout++ = c;
-                               *fout++ = TTY_NORMAL;
-                               count += 1;
-                               ch->ch_pscan_state = 0;
-                       } else {
-                               /* save value examination in next state */
-                               ch->ch_pscan_savechar = c;
-                               ch->ch_pscan_state = 2;
-                       }
-                       break;
-
-               case 2:
-                       /* third character of ff sequence */
-                       *cout++ = c;
-                       if (DOS) {
-                               if (ch->ch_pscan_savechar & 0x10)
-                                       *fout++ = TTY_BREAK;
-                               else if (ch->ch_pscan_savechar & 0x08)
-                                       *fout++ = TTY_FRAME;
-                               else
-                                       /*
-                                        * either marked as a parity error,
-                                        * indeterminate, or not in DOSMODE
-                                        * call it a parity error
-                                        */
-                                       *fout++ = TTY_PARITY;
-                       } else {
-                               /* case FF XX ?? where XX is not 00 */
-                               if (ch->ch_pscan_savechar & 0xff) {
-                                       /* this should not happen */
-                                       pr_info("%s: parity_scan: error unexpected byte\n",
-                                               __func__);
-                                       *fout++ = TTY_PARITY;
-                               }
-                               /* case FF 00 XX where XX is not 00 */
-                               else if (c == 0xff)
-                                       *fout++ = TTY_PARITY;
-                               /* case FF 00 00 */
-                               else
-                                       *fout++ = TTY_BREAK;
-
-                       }
-                       count += 1;
-                       ch->ch_pscan_state = 0;
-               }
-       }
-       *len = count;
-}
-
-
-/**
- * dgrp_net_idle() -- Idle the network connection
- * @nd: pointer to node structure to idle
- */
-static void dgrp_net_idle(struct nd_struct *nd)
-{
-       struct ch_struct *ch;
-       int i;
-
-       nd->nd_tx_work = 1;
-
-       nd->nd_state = NS_IDLE;
-       nd->nd_flag = 0;
-
-       for (i = nd->nd_seq_out; ; i = (i + 1) & SEQ_MASK) {
-               if (!nd->nd_seq_wait[i]) {
-                       nd->nd_seq_wait[i] = 0;
-                       wake_up_interruptible(&nd->nd_seq_wque[i]);
-               }
-
-               if (i == nd->nd_seq_in)
-                       break;
-       }
-
-       nd->nd_seq_out = nd->nd_seq_in;
-
-       nd->nd_unack = 0;
-       nd->nd_remain = 0;
-
-       nd->nd_tx_module = 0x10;
-       nd->nd_rx_module = 0x00;
-
-       for (i = 0, ch = nd->nd_chan; i < CHAN_MAX; i++, ch++) {
-               ch->ch_state = CS_IDLE;
-
-               ch->ch_otype = 0;
-               ch->ch_otype_waiting = 0;
-       }
-}
-
-/*
- *  Increase the number of channels, waking up any
- *  threads that might be waiting for the channels
- *  to appear.
- */
-static void increase_channel_count(struct nd_struct *nd, int n)
-{
-       struct ch_struct *ch;
-       struct device *classp;
-       char name[DEVICE_NAME_SIZE];
-       int ret;
-       u8 *buf;
-       int i;
-
-       for (i = nd->nd_chan_count; i < n; ++i) {
-               ch = nd->nd_chan + i;
-
-               /* FIXME: return a useful error instead! */
-               buf = kmalloc(TBUF_MAX, GFP_KERNEL);
-               if (!buf)
-                       return;
-
-               if (ch->ch_tbuf)
-                       pr_info_ratelimited("%s - ch_tbuf was not NULL\n",
-                                           __func__);
-
-               ch->ch_tbuf = buf;
-
-               buf = kmalloc(RBUF_MAX, GFP_KERNEL);
-               if (!buf)
-                       return;
-
-               if (ch->ch_rbuf)
-                       pr_info("%s - ch_rbuf was not NULL\n",
-                               __func__);
-               ch->ch_rbuf = buf;
-
-               classp = tty_port_register_device(&ch->port,
-                                                 nd->nd_serial_ttdriver, i,
-                                                 NULL);
-
-               ch->ch_tun.un_sysfs = classp;
-               snprintf(name, DEVICE_NAME_SIZE, "tty_%d", i);
-
-               dgrp_create_tty_sysfs(&ch->ch_tun, classp);
-               ret = sysfs_create_link(&nd->nd_class_dev->kobj,
-                                       &classp->kobj, name);
-
-               /* NOTE: We don't support "cu" devices anymore,
-                * so you will notice we don't register them
-                * here anymore. */
-               if (dgrp_register_prdevices) {
-                       classp = tty_register_device(nd->nd_xprint_ttdriver,
-                                                    i, NULL);
-                       ch->ch_pun.un_sysfs = classp;
-                       snprintf(name, DEVICE_NAME_SIZE, "pr_%d", i);
-
-                       dgrp_create_tty_sysfs(&ch->ch_pun, classp);
-                       ret = sysfs_create_link(&nd->nd_class_dev->kobj,
-                                               &classp->kobj, name);
-               }
-
-               nd->nd_chan_count = i + 1;
-               wake_up_interruptible(&ch->ch_flag_wait);
-       }
-}
-
-/*
- * Decrease the number of channels, and wake up any threads that might
- * be waiting on the channels that vanished.
- */
-static void decrease_channel_count(struct nd_struct *nd, int n)
-{
-       struct ch_struct *ch;
-       char name[DEVICE_NAME_SIZE];
-       int i;
-
-       for (i = nd->nd_chan_count - 1; i >= n; --i) {
-               ch = nd->nd_chan + i;
-
-               /*
-                *  Make any open ports inoperative.
-                */
-               ch->ch_state = CS_IDLE;
-
-               ch->ch_otype = 0;
-               ch->ch_otype_waiting = 0;
-
-               /*
-                *  Only "HANGUP" if we care about carrier
-                *  transitions and we are already open.
-                */
-               if (ch->ch_open_count != 0) {
-                       ch->ch_flag |= CH_HANGUP;
-                       dgrp_carrier(ch);
-               }
-
-               /*
-                * Unlike the CH_HANGUP flag above, use another
-                * flag to indicate to the RealPort state machine
-                * that this port has disappeared.
-                */
-               if (ch->ch_open_count != 0)
-                       ch->ch_flag |= CH_PORT_GONE;
-
-               wake_up_interruptible(&ch->ch_flag_wait);
-
-               nd->nd_chan_count = i;
-
-               kfree(ch->ch_tbuf);
-               ch->ch_tbuf = NULL;
-
-               kfree(ch->ch_rbuf);
-               ch->ch_rbuf = NULL;
-
-               nd->nd_chan_count = i;
-
-               dgrp_remove_tty_sysfs(ch->ch_tun.un_sysfs);
-               snprintf(name, DEVICE_NAME_SIZE, "tty_%d", i);
-               sysfs_remove_link(&nd->nd_class_dev->kobj, name);
-               tty_unregister_device(nd->nd_serial_ttdriver, i);
-
-               /*
-                * NOTE: We don't support "cu" devices anymore, so don't
-                * unregister them here anymore.
-                */
-
-               if (dgrp_register_prdevices) {
-                       dgrp_remove_tty_sysfs(ch->ch_pun.un_sysfs);
-                       snprintf(name, DEVICE_NAME_SIZE, "pr_%d", i);
-                       sysfs_remove_link(&nd->nd_class_dev->kobj, name);
-                       tty_unregister_device(nd->nd_xprint_ttdriver, i);
-               }
-       }
-}
-
-/**
- * dgrp_chan_count() -- Adjust the node channel count.
- * @nd: pointer to a node structure
- * @n: new value for channel count
- *
- * Adjusts the node channel count.  If new ports have appeared, it tries
- * to signal those processes that might have been waiting for ports to
- * appear.  If ports have disappeared it tries to signal those processes
- * that might be hung waiting for a response for the now non-existant port.
- */
-static void dgrp_chan_count(struct nd_struct *nd, int n)
-{
-       if (n == nd->nd_chan_count)
-               return;
-
-       if (n > nd->nd_chan_count)
-               increase_channel_count(nd, n);
-
-       if (n < nd->nd_chan_count)
-               decrease_channel_count(nd, n);
-}
-
-/**
- * dgrp_monitor() -- send data to the device monitor queue
- * @nd: pointer to a node structure
- * @buf: data to copy to the monitoring buffer
- * @len: number of bytes to transfer to the buffer
- *
- * Called by the net device routines to send data to the device
- * monitor queue.  If the device monitor buffer is too full to
- * accept the data, it waits until the buffer is ready.
- */
-static void dgrp_monitor(struct nd_struct *nd, u8 *buf, int len)
-{
-       int n;
-       int r;
-       int rtn;
-
-       /*
-        *  Grab monitor lock.
-        */
-       down(&nd->nd_mon_semaphore);
-
-       /*
-        *  Loop while data remains.
-        */
-       while ((len > 0) && (nd->nd_mon_buf)) {
-               /*
-                *  Determine the amount of available space left in the
-                *  buffer.  If there's none, wait until some appears.
-                */
-
-               n = (nd->nd_mon_out - nd->nd_mon_in - 1) & MON_MASK;
-
-               if (!n) {
-                       nd->nd_mon_flag |= MON_WAIT_SPACE;
-
-                       up(&nd->nd_mon_semaphore);
-
-                       /*
-                        * Go to sleep waiting until the condition becomes true.
-                        */
-                       rtn = wait_event_interruptible(nd->nd_mon_wqueue,
-                                                      ((nd->nd_mon_flag & MON_WAIT_SPACE) == 0));
-
-/* FIXME: really ignore rtn? */
-
-                       /*
-                        *  We can't exit here if we receive a signal, since
-                        *  to do so would trash the debug stream.
-                        */
-
-                       down(&nd->nd_mon_semaphore);
-
-                       continue;
-               }
-
-               /*
-                * Copy as much data as will fit.
-                */
-
-               if (n > len)
-                       n = len;
-
-               r = MON_MAX - nd->nd_mon_in;
-
-               if (r <= n) {
-                       memcpy(nd->nd_mon_buf + nd->nd_mon_in, buf, r);
-
-                       n -= r;
-
-                       nd->nd_mon_in = 0;
-
-                       buf += r;
-                       len -= r;
-               }
-
-               memcpy(nd->nd_mon_buf + nd->nd_mon_in, buf, n);
-
-               nd->nd_mon_in += n;
-
-               buf += n;
-               len -= n;
-
-               if (nd->nd_mon_in >= MON_MAX)
-                       pr_info_ratelimited("%s - nd_mon_in (%i) >= MON_MAX\n",
-                                           __func__, nd->nd_mon_in);
-
-               /*
-                *  Wakeup any thread waiting for data
-                */
-
-               if (nd->nd_mon_flag & MON_WAIT_DATA) {
-                       nd->nd_mon_flag &= ~MON_WAIT_DATA;
-                       wake_up_interruptible(&nd->nd_mon_wqueue);
-               }
-       }
-
-       /*
-        *  Release the monitor lock.
-        */
-       up(&nd->nd_mon_semaphore);
-}
-
-/**
- * dgrp_encode_time() -- Encodes rpdump time into a 4-byte quantity.
- * @nd: pointer to a node structure
- * @buf: destination buffer
- *
- * Encodes "rpdump" time into a 4-byte quantity.  Time is measured since
- * open.
- */
-static void dgrp_encode_time(struct nd_struct *nd, u8 *buf)
-{
-       ulong t;
-
-       /*
-        *  Convert time in HZ since open to time in milliseconds
-        *  since open.
-        */
-       t = jiffies - nd->nd_mon_lbolt;
-       t = 1000 * (t / HZ) + 1000 * (t % HZ) / HZ;
-
-       put_unaligned_be32((uint)(t & 0xffffffff), buf);
-}
-
-
-
-/**
- * dgrp_monitor_message() -- Builds a rpdump style message.
- * @nd: pointer to a node structure
- * @message: destination buffer
- */
-static void dgrp_monitor_message(struct nd_struct *nd, char *message)
-{
-       u8 header[7];
-       int n;
-
-       header[0] = RPDUMP_MESSAGE;
-
-       dgrp_encode_time(nd, header + 1);
-
-       n = strlen(message);
-
-       put_unaligned_be16(n, header + 5);
-
-       dgrp_monitor(nd, header, sizeof(header));
-       dgrp_monitor(nd, (u8 *) message, n);
-}
-
-
-
-/**
- * dgrp_monitor_reset() -- Note a reset in the monitoring buffer.
- * @nd: pointer to a node structure
- */
-static void dgrp_monitor_reset(struct nd_struct *nd)
-{
-       u8 header[5];
-
-       header[0] = RPDUMP_RESET;
-
-       dgrp_encode_time(nd, header + 1);
-
-       dgrp_monitor(nd, header, sizeof(header));
-}
-
-/**
- * dgrp_monitor_data() -- builds a monitor data packet
- * @nd: pointer to a node structure
- * @type: type of message to be logged
- * @buf: data to be logged
- * @size: number of bytes in the buffer
- */
-static void dgrp_monitor_data(struct nd_struct *nd, u8 type, u8 *buf, int size)
-{
-       u8 header[7];
-
-       header[0] = type;
-
-       dgrp_encode_time(nd, header + 1);
-
-       put_unaligned_be16(size, header + 5);
-
-       dgrp_monitor(nd, header, sizeof(header));
-       dgrp_monitor(nd, buf, size);
-}
-
-static int alloc_nd_buffers(struct nd_struct *nd)
-{
-
-       nd->nd_iobuf = NULL;
-       nd->nd_writebuf = NULL;
-       nd->nd_inputbuf = NULL;
-       nd->nd_inputflagbuf = NULL;
-
-       /*
-        *  Allocate the network read/write buffer.
-        */
-       nd->nd_iobuf = kzalloc(UIO_MAX + 10, GFP_KERNEL);
-       if (!nd->nd_iobuf)
-               goto out_err;
-
-       /*
-        * Allocate a buffer for doing the copy from user space to
-        * kernel space in the write routines.
-        */
-       nd->nd_writebuf = kzalloc(WRITEBUFLEN, GFP_KERNEL);
-       if (!nd->nd_writebuf)
-               goto out_err;
-
-       /*
-        * Allocate a buffer for doing the copy from kernel space to
-        * tty buffer space in the read routines.
-        */
-       nd->nd_inputbuf = kzalloc(MYFLIPLEN, GFP_KERNEL);
-       if (!nd->nd_inputbuf)
-               goto out_err;
-
-       /*
-        * Allocate a buffer for doing the copy from kernel space to
-        * tty buffer space in the read routines.
-        */
-       nd->nd_inputflagbuf = kzalloc(MYFLIPLEN, GFP_KERNEL);
-       if (!nd->nd_inputflagbuf)
-               goto out_err;
-
-       return 0;
-
-out_err:
-       kfree(nd->nd_iobuf);
-       kfree(nd->nd_writebuf);
-       kfree(nd->nd_inputbuf);
-       kfree(nd->nd_inputflagbuf);
-       return -ENOMEM;
-}
-
-/*
- * dgrp_net_open() -- Open the NET device for a particular PortServer
- */
-static int dgrp_net_open(struct inode *inode, struct file *file)
-{
-       struct nd_struct *nd;
-       ulong  lock_flags;
-       int rtn;
-
-       rtn = try_module_get(THIS_MODULE);
-       if (!rtn)
-               return -EAGAIN;
-
-       if (!capable(CAP_SYS_ADMIN)) {
-               rtn = -EPERM;
-               goto done;
-       }
-
-       /*
-        *  Make sure that the "private_data" field hasn't already been used.
-        */
-       if (file->private_data) {
-               rtn = -EINVAL;
-               goto done;
-       }
-
-       /*
-        *  Get the node pointer, and fail if it doesn't exist.
-        */
-       nd = PDE_DATA(inode);
-       if (!nd) {
-               rtn = -ENXIO;
-               goto done;
-       }
-
-       file->private_data = (void *) nd;
-
-       /*
-        *  Grab the NET lock.
-        */
-       down(&nd->nd_net_semaphore);
-
-       if (nd->nd_state != NS_CLOSED) {
-               rtn = -EBUSY;
-               goto unlock;
-       }
-
-       /*
-        *  Initialize the link speed parameters.
-        */
-
-       nd->nd_link.lk_fast_rate = UIO_MAX;
-       nd->nd_link.lk_slow_rate = UIO_MAX;
-
-       nd->nd_link.lk_fast_delay = 1000;
-       nd->nd_link.lk_slow_delay = 1000;
-
-       nd->nd_link.lk_header_size = 46;
-
-
-       rtn = alloc_nd_buffers(nd);
-       if (rtn)
-               goto unlock;
-
-       /*
-        *  The port is now open, so move it to the IDLE state
-        */
-       dgrp_net_idle(nd);
-
-       nd->nd_tx_time = jiffies;
-
-       /*
-        *  If the polling routing is not running, start it running here
-        */
-       spin_lock_irqsave(&dgrp_poll_data.poll_lock, lock_flags);
-
-       if (!dgrp_poll_data.node_active_count) {
-               dgrp_poll_data.node_active_count = 2;
-               dgrp_poll_data.timer.expires = jiffies +
-                       dgrp_poll_tick * HZ / 1000;
-               add_timer(&dgrp_poll_data.timer);
-       }
-
-       spin_unlock_irqrestore(&dgrp_poll_data.poll_lock, lock_flags);
-
-       dgrp_monitor_message(nd, "Net Open");
-
-unlock:
-       /*
-        *  Release the NET lock.
-        */
-       up(&nd->nd_net_semaphore);
-
-done:
-       if (rtn)
-               module_put(THIS_MODULE);
-
-       return rtn;
-}
-
-/* dgrp_net_release() -- close the NET device for a particular PortServer */
-static int dgrp_net_release(struct inode *inode, struct file *file)
-{
-       struct nd_struct *nd;
-       ulong  lock_flags;
-
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               goto done;
-
-/* TODO : historical locking placeholder */
-/*
- *  In the HPUX version of the RealPort driver (which served as a basis
- *  for this driver) this locking code was used.  Saved if ever we need
- *  to review the locking under Linux.
- */
-/*     spinlock(&nd->nd_lock); */
-
-
-       /*
-        *  Grab the NET lock.
-        */
-       down(&nd->nd_net_semaphore);
-
-       /*
-        *  Before "closing" the internal connection, make sure all
-        *  ports are "idle".
-        */
-       dgrp_net_idle(nd);
-
-       nd->nd_state = NS_CLOSED;
-       nd->nd_flag = 0;
-
-       /*
-        *  TODO ... must the wait queue be reset on close?
-        *  should any pending waiters be reset?
-        *  Let's decide to assert that the waitq is empty... and see
-        *  how soon we break.
-        */
-       if (waitqueue_active(&nd->nd_tx_waitq))
-               pr_info("%s - expected waitqueue_active to be false\n",
-                       __func__);
-
-       nd->nd_send = 0;
-
-       kfree(nd->nd_iobuf);
-       nd->nd_iobuf = NULL;
-
-/* TODO : historical locking placeholder */
-/*
- *  In the HPUX version of the RealPort driver (which served as a basis
- *  for this driver) this locking code was used.  Saved if ever we need
- *  to review the locking under Linux.
- */
-/*     spinunlock( &nd->nd_lock ); */
-
-
-       kfree(nd->nd_writebuf);
-       nd->nd_writebuf = NULL;
-
-       kfree(nd->nd_inputbuf);
-       nd->nd_inputbuf = NULL;
-
-       kfree(nd->nd_inputflagbuf);
-       nd->nd_inputflagbuf = NULL;
-
-/* TODO : historical locking placeholder */
-/*
- *  In the HPUX version of the RealPort driver (which served as a basis
- *  for this driver) this locking code was used.  Saved if ever we need
- *  to review the locking under Linux.
- */
-/*     spinlock(&nd->nd_lock); */
-
-       /*
-        *  Set the active port count to zero.
-        */
-       dgrp_chan_count(nd, 0);
-
-/* TODO : historical locking placeholder */
-/*
- *  In the HPUX version of the RealPort driver (which served as a basis
- *  for this driver) this locking code was used.  Saved if ever we need
- *  to review the locking under Linux.
- */
-/*     spinunlock(&nd->nd_lock); */
-
-       /*
-        *  Release the NET lock.
-        */
-       up(&nd->nd_net_semaphore);
-
-       /*
-        *  Cause the poller to stop scheduling itself if this is
-        *  the last active node.
-        */
-       spin_lock_irqsave(&dgrp_poll_data.poll_lock, lock_flags);
-
-       if (dgrp_poll_data.node_active_count == 2) {
-               del_timer(&dgrp_poll_data.timer);
-               dgrp_poll_data.node_active_count = 0;
-       }
-
-       spin_unlock_irqrestore(&dgrp_poll_data.poll_lock, lock_flags);
-
-       down(&nd->nd_net_semaphore);
-
-       dgrp_monitor_message(nd, "Net Close");
-
-       up(&nd->nd_net_semaphore);
-
-done:
-       module_put(THIS_MODULE);
-       file->private_data = NULL;
-       return 0;
-}
-
-/* used in dgrp_send to setup command header */
-static inline u8 *set_cmd_header(u8 *b, u8 port, u8 cmd)
-{
-       *b++ = 0xb0 + (port & 0x0f);
-       *b++ = cmd;
-       return b;
-}
-
-/**
- * dgrp_send() -- build a packet for transmission to the server
- * @nd: pointer to a node structure
- * @tmax: maximum bytes to transmit
- *
- * returns number of bytes sent
- */
-static int dgrp_send(struct nd_struct *nd, long tmax)
-{
-       struct ch_struct *ch = nd->nd_chan;
-       u8 *b;
-       u8 *buf;
-       u8 *mbuf;
-       u8 port;
-       int mod;
-       long send;
-       int maxport;
-       long lastport = -1;
-       ushort rwin;
-       long in;
-       ushort n;
-       long t;
-       long ttotal;
-       long tchan;
-       long tsend;
-       ushort tsafe;
-       long work;
-       long send_sync;
-       long wanted_sync_port = -1;
-       ushort tdata[CHAN_MAX];
-       long used_buffer;
-
-       mbuf = nd->nd_iobuf + UIO_BASE;
-       buf = b = mbuf;
-
-       send_sync = nd->nd_link.lk_slow_rate < UIO_MAX;
-
-       ttotal = 0;
-       tchan = 0;
-
-       memset(tdata, 0, sizeof(tdata));
-
-
-       /*
-        * If there are any outstanding requests to be serviced,
-        * service them here.
-        */
-       if (nd->nd_send & NR_PASSWORD) {
-
-               /*
-                *  Send Password response.
-                */
-
-               b[0] = 0xfc;
-               b[1] = 0x20;
-               put_unaligned_be16(strlen(nd->password), b + 2);
-               b += 4;
-               b += strlen(nd->password);
-               nd->nd_send &= ~(NR_PASSWORD);
-       }
-
-
-       /*
-        *  Loop over all modules to generate commands, and determine
-        *  the amount of data queued for transmit.
-        */
-
-       for (mod = 0, port = 0; port < nd->nd_chan_count; mod++) {
-               /*
-                *  If this is not the current module, enter a module select
-                *  code in the buffer.
-                */
-
-               if (mod != nd->nd_tx_module)
-                       mbuf = ++b;
-
-               /*
-                *  Loop to process one module.
-                */
-
-               maxport = port + 16;
-
-               if (maxport > nd->nd_chan_count)
-                       maxport = nd->nd_chan_count;
-
-               for (; port < maxport; port++, ch++) {
-                       /*
-                        *  Switch based on channel state.
-                        */
-
-                       switch (ch->ch_state) {
-                       /*
-                        *  Send requests when the port is closed, and there
-                        *  are no Open, Close or Cancel requests expected.
-                        */
-
-                       case CS_IDLE:
-                               /*
-                                * Wait until any open error code
-                                * has been delivered to all
-                                * associated ports.
-                                */
-
-                               if (ch->ch_open_error) {
-                                       if (ch->ch_wait_count[ch->ch_otype]) {
-                                               work = 1;
-                                               break;
-                                       }
-
-                                       ch->ch_open_error = 0;
-                               }
-
-                               /*
-                                *  Wait until the channel HANGUP flag is reset
-                                *  before sending the first open.  We can only
-                                *  get to this state after a server disconnect.
-                                */
-
-                               if ((ch->ch_flag & CH_HANGUP) != 0)
-                                       break;
-
-                               /*
-                                *  If recovering from a TCP disconnect, or if
-                                *  there is an immediate open pending, send an
-                                *  Immediate Open request.
-                                */
-                               if ((ch->ch_flag & CH_PORT_GONE) ||
-                                   ch->ch_wait_count[OTYPE_IMMEDIATE] != 0) {
-                                       b = set_cmd_header(b, port, 10);
-                                       *b++ = 0;
-
-                                       ch->ch_state = CS_WAIT_OPEN;
-                                       ch->ch_otype = OTYPE_IMMEDIATE;
-                                       break;
-                               }
-
-       /*
-        *  If there is no Persistent or Incoming Open on the wait
-        *  list in the server, and a thread is waiting for a
-        *  Persistent or Incoming Open, send a Persistent or Incoming
-        *  Open Request.
-        */
-                               if (ch->ch_otype_waiting == 0) {
-                                       if (ch->ch_wait_count[OTYPE_PERSISTENT] != 0) {
-                                               b = set_cmd_header(b, port, 10);
-                                               *b++ = 1;
-
-                                               ch->ch_state = CS_WAIT_OPEN;
-                                               ch->ch_otype = OTYPE_PERSISTENT;
-                                       } else if (ch->ch_wait_count[OTYPE_INCOMING] != 0) {
-                                               b = set_cmd_header(b, port, 10);
-                                               *b++ = 2;
-
-                                               ch->ch_state = CS_WAIT_OPEN;
-                                               ch->ch_otype = OTYPE_INCOMING;
-                                       }
-                                       break;
-                               }
-
-                               /*
-                                *  If a Persistent or Incoming Open is pending in
-                                *  the server, but there is no longer an open
-                                *  thread waiting for it, cancel the request.
-                                */
-
-                               if (ch->ch_wait_count[ch->ch_otype_waiting] == 0) {
-                                       b = set_cmd_header(b, port, 10);
-                                       *b++ = 4;
-
-                                       ch->ch_state = CS_WAIT_CANCEL;
-                                       ch->ch_otype = ch->ch_otype_waiting;
-                               }
-                               break;
-
-                               /*
-                                *  Send port parameter queries.
-                                */
-                       case CS_SEND_QUERY:
-                               /*
-                                *  Clear out all FEP state that might remain
-                                *  from the last connection.
-                                */
-
-                               ch->ch_flag |= CH_PARAM;
-
-                               ch->ch_flag &= ~CH_RX_FLUSH;
-
-                               ch->ch_expect = 0;
-
-                               ch->ch_s_tin   = 0;
-                               ch->ch_s_tpos  = 0;
-                               ch->ch_s_tsize = 0;
-                               ch->ch_s_treq  = 0;
-                               ch->ch_s_elast = 0;
-
-                               ch->ch_s_rin   = 0;
-                               ch->ch_s_rwin  = 0;
-                               ch->ch_s_rsize = 0;
-
-                               ch->ch_s_tmax  = 0;
-                               ch->ch_s_ttime = 0;
-                               ch->ch_s_rmax  = 0;
-                               ch->ch_s_rtime = 0;
-                               ch->ch_s_rlow  = 0;
-                               ch->ch_s_rhigh = 0;
-
-                               ch->ch_s_brate = 0;
-                               ch->ch_s_iflag = 0;
-                               ch->ch_s_cflag = 0;
-                               ch->ch_s_oflag = 0;
-                               ch->ch_s_xflag = 0;
-
-                               ch->ch_s_mout  = 0;
-                               ch->ch_s_mflow = 0;
-                               ch->ch_s_mctrl = 0;
-                               ch->ch_s_xon   = 0;
-                               ch->ch_s_xoff  = 0;
-                               ch->ch_s_lnext = 0;
-                               ch->ch_s_xxon  = 0;
-                               ch->ch_s_xxoff = 0;
-
-                               /* Send Sequence Request */
-                               b = set_cmd_header(b, port, 14);
-
-                               /* Configure Event Conditions Packet */
-                               b = set_cmd_header(b, port, 42);
-                               put_unaligned_be16(0x02c0, b);
-                               b += 2;
-                               *b++ = (DM_DTR | DM_RTS | DM_CTS |
-                                       DM_DSR | DM_RI | DM_CD);
-
-                               /* Send Status Request */
-                               b = set_cmd_header(b, port, 16);
-
-                               /* Send Buffer Request  */
-                               b = set_cmd_header(b, port, 20);
-
-                               /* Send Port Capability Request */
-                               b = set_cmd_header(b, port, 22);
-
-                               ch->ch_expect = (RR_SEQUENCE |
-                                                RR_STATUS  |
-                                                RR_BUFFER |
-                                                RR_CAPABILITY);
-
-                               ch->ch_state = CS_WAIT_QUERY;
-
-                               /* Raise modem signals */
-                               b = set_cmd_header(b, port, 44);
-
-                               if (ch->ch_flag & CH_PORT_GONE)
-                                       ch->ch_s_mout = ch->ch_mout;
-                               else
-                                       ch->ch_s_mout = ch->ch_mout = DM_DTR | DM_RTS;
-
-                               *b++ = ch->ch_mout;
-                               *b++ = ch->ch_s_mflow = 0;
-                               *b++ = ch->ch_s_mctrl = ch->ch_mctrl = 0;
-
-                               if (ch->ch_flag & CH_PORT_GONE)
-                                       ch->ch_flag &= ~CH_PORT_GONE;
-
-                               break;
-
-                       /*
-                        *  Handle normal open and ready mode.
-                        */
-
-                       case CS_READY:
-
-                               /*
-                                *  If the port is not open, and there are no
-                                *  no longer any ports requesting an open,
-                                *  then close the port.
-                                */
-
-                               if (ch->ch_open_count == 0 &&
-                                   ch->ch_wait_count[ch->ch_otype] == 0) {
-                                       goto send_close;
-                               }
-
-       /*
-        *  Process waiting input.
-        *
-        *  If there is no one to read it, discard the data.
-        *
-        *  Otherwise if we are not in fastcook mode, or if there is a
-        *  fastcook thread waiting for data, send the data to the
-        *  line discipline.
-        */
-                               if (ch->ch_rin != ch->ch_rout) {
-                                       if (ch->ch_tun.un_open_count == 0 ||
-                                            (ch->ch_tun.un_flag & UN_CLOSING) ||
-                                           (ch->ch_cflag & CF_CREAD) == 0) {
-                                               ch->ch_rout = ch->ch_rin;
-                                       } else if ((ch->ch_flag & CH_FAST_READ) == 0 ||
-                                                       ch->ch_inwait != 0) {
-                                               dgrp_input(ch);
-
-                                               if (ch->ch_rin != ch->ch_rout)
-                                                       work = 1;
-                                       }
-                               }
-
-                               /*
-                                *  Handle receive flush, and changes to
-                                *  server port parameters.
-                                */
-
-                               if (ch->ch_flag & (CH_RX_FLUSH | CH_PARAM)) {
-                               /*
-                                *  If we are in receive flush mode,
-                                *  and enough data has gone by, reset
-                                *  receive flush mode.
-                                */
-                                       if (ch->ch_flag & CH_RX_FLUSH) {
-                                               if (((ch->ch_flush_seq - nd->nd_seq_out) & SEQ_MASK) >
-                                                   ((nd->nd_seq_in - nd->nd_seq_out) & SEQ_MASK))
-                                                       ch->ch_flag &= ~CH_RX_FLUSH;
-                                               else
-                                                       work = 1;
-                                       }
-
-                                       /*
-                                        *  Send TMAX, TTIME.
-                                        */
-
-                                       if (ch->ch_s_tmax  != ch->ch_tmax ||
-                                           ch->ch_s_ttime != ch->ch_ttime) {
-                                               b = set_cmd_header(b, port, 48);
-
-                                               ch->ch_s_tmax = ch->ch_tmax;
-                                               ch->ch_s_ttime = ch->ch_ttime;
-
-                                               put_unaligned_be16(ch->ch_s_tmax,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_ttime,
-                                                                  b);
-                                               b += 2;
-                                       }
-
-                                       /*
-                                        *  Send RLOW, RHIGH.
-                                        */
-
-                                       if (ch->ch_s_rlow  != ch->ch_rlow ||
-                                           ch->ch_s_rhigh != ch->ch_rhigh) {
-                                               b = set_cmd_header(b, port, 45);
-
-                                               ch->ch_s_rlow  = ch->ch_rlow;
-                                               ch->ch_s_rhigh = ch->ch_rhigh;
-
-                                               put_unaligned_be16(ch->ch_s_rlow,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_rhigh,
-                                                                  b);
-                                               b += 2;
-                                       }
-
-                                       /*
-                                        *  Send BRATE, CFLAG, IFLAG,
-                                        *  OFLAG, XFLAG.
-                                        */
-
-                                       if (ch->ch_s_brate != ch->ch_brate ||
-                                           ch->ch_s_cflag != ch->ch_cflag ||
-                                           ch->ch_s_iflag != ch->ch_iflag ||
-                                           ch->ch_s_oflag != ch->ch_oflag ||
-                                           ch->ch_s_xflag != ch->ch_xflag) {
-                                               b = set_cmd_header(b, port, 40);
-
-                                               ch->ch_s_brate = ch->ch_brate;
-                                               ch->ch_s_cflag = ch->ch_cflag;
-                                               ch->ch_s_iflag = ch->ch_iflag;
-                                               ch->ch_s_oflag = ch->ch_oflag;
-                                               ch->ch_s_xflag = ch->ch_xflag;
-
-                                               put_unaligned_be16(ch->ch_s_brate,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_cflag,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_iflag,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_oflag,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_xflag,
-                                                                  b);
-                                               b += 2;
-                                       }
-
-                                       /*
-                                        *  Send MOUT, MFLOW, MCTRL.
-                                        */
-
-                                       if (ch->ch_s_mout  != ch->ch_mout  ||
-                                           ch->ch_s_mflow != ch->ch_mflow ||
-                                           ch->ch_s_mctrl != ch->ch_mctrl) {
-                                               b = set_cmd_header(b, port, 44);
-
-                                               *b++ = ch->ch_s_mout  = ch->ch_mout;
-                                               *b++ = ch->ch_s_mflow = ch->ch_mflow;
-                                               *b++ = ch->ch_s_mctrl = ch->ch_mctrl;
-                                       }
-
-                                       /*
-                                        *  Send Flow control characters.
-                                        */
-
-                                       if (ch->ch_s_xon   != ch->ch_xon   ||
-                                           ch->ch_s_xoff  != ch->ch_xoff  ||
-                                           ch->ch_s_lnext != ch->ch_lnext ||
-                                           ch->ch_s_xxon  != ch->ch_xxon  ||
-                                           ch->ch_s_xxoff != ch->ch_xxoff) {
-                                               b = set_cmd_header(b, port, 46);
-
-                                               *b++ = ch->ch_s_xon   = ch->ch_xon;
-                                               *b++ = ch->ch_s_xoff  = ch->ch_xoff;
-                                               *b++ = ch->ch_s_lnext = ch->ch_lnext;
-                                               *b++ = ch->ch_s_xxon  = ch->ch_xxon;
-                                               *b++ = ch->ch_s_xxoff = ch->ch_xxoff;
-                                       }
-
-                                       /*
-                                        *  Send RMAX, RTIME.
-                                        */
-
-                                       if (ch->ch_s_rmax != ch->ch_rmax ||
-                                           ch->ch_s_rtime != ch->ch_rtime) {
-                                               b = set_cmd_header(b, port, 47);
-
-                                               ch->ch_s_rmax  = ch->ch_rmax;
-                                               ch->ch_s_rtime = ch->ch_rtime;
-
-                                               put_unaligned_be16(ch->ch_s_rmax,
-                                                                  b);
-                                               b += 2;
-
-                                               put_unaligned_be16(ch->ch_s_rtime,
-                                                                  b);
-                                               b += 2;
-                                       }
-
-                                       ch->ch_flag &= ~CH_PARAM;
-                                       wake_up_interruptible(&ch->ch_flag_wait);
-                               }
-
-
-                               /*
-                                *  Handle action commands.
-                                */
-
-                               if (ch->ch_send != 0) {
-                                       /* int send = ch->ch_send & ~ch->ch_expect; */
-                                       send = ch->ch_send & ~ch->ch_expect;
-
-                                       /* Send character immediate */
-                                       if ((send & RR_TX_ICHAR) != 0) {
-                                               b = set_cmd_header(b, port, 60);
-
-                                               *b++ = ch->ch_xon;
-                                               ch->ch_expect |= RR_TX_ICHAR;
-                                       }
-
-                                       /* BREAK request */
-                                       if ((send & RR_TX_BREAK) != 0) {
-                                               if (ch->ch_break_time != 0) {
-                                                       b = set_cmd_header(b, port, 61);
-                                                       put_unaligned_be16(ch->ch_break_time,
-                                                                          b);
-                                                       b += 2;
-
-                                                       ch->ch_expect |= RR_TX_BREAK;
-                                                       ch->ch_break_time = 0;
-                                               } else {
-                                                       ch->ch_send &= ~RR_TX_BREAK;
-                                                       ch->ch_flag &= ~CH_TX_BREAK;
-                                                       wake_up_interruptible(&ch->ch_flag_wait);
-                                               }
-                                       }
-
-                                       /*
-                                        *  Flush input/output buffers.
-                                        */
-
-                                       if ((send & (RR_RX_FLUSH | RR_TX_FLUSH)) != 0) {
-                                               b = set_cmd_header(b, port, 62);
-
-                                               *b++ = ((send & RR_TX_FLUSH) == 0 ? 1 :
-                                                       (send & RR_RX_FLUSH) == 0 ? 2 : 3);
-
-                                               if (send & RR_RX_FLUSH) {
-                                                       ch->ch_flush_seq = nd->nd_seq_in;
-                                                       ch->ch_flag |= CH_RX_FLUSH;
-                                                       work = 1;
-                                                       send_sync = 1;
-                                                       wanted_sync_port = port;
-                                               }
-
-                                               ch->ch_send &= ~(RR_RX_FLUSH | RR_TX_FLUSH);
-                                       }
-
-                                       /*  Pause input/output */
-                                       if ((send & (RR_RX_STOP | RR_TX_STOP)) != 0) {
-                                               b = set_cmd_header(b, port, 63);
-                                               *b = 0;
-
-                                               if ((send & RR_TX_STOP) != 0)
-                                                       *b |= EV_OPU;
-
-                                               if ((send & RR_RX_STOP) != 0)
-                                                       *b |= EV_IPU;
-
-                                               b++;
-
-                                               ch->ch_send &= ~(RR_RX_STOP | RR_TX_STOP);
-                                       }
-
-                                       /* Start input/output */
-                                       if ((send & (RR_RX_START | RR_TX_START)) != 0) {
-                                               b = set_cmd_header(b, port, 64);
-                                               *b = 0;
-
-                                               if ((send & RR_TX_START) != 0)
-                                                       *b |= EV_OPU | EV_OPS | EV_OPX;
-
-                                               if ((send & RR_RX_START) != 0)
-                                                       *b |= EV_IPU | EV_IPS;
-
-                                               b++;
-
-                                               ch->ch_send &= ~(RR_RX_START | RR_TX_START);
-                                       }
-                               }
-
-
-                               /*
-                                *  Send a window sequence to acknowledge received data.
-                                */
-
-                               rwin = (ch->ch_s_rin +
-                                       ((ch->ch_rout - ch->ch_rin - 1) & RBUF_MASK));
-
-                               n = (rwin - ch->ch_s_rwin) & 0xffff;
-
-                               if (n >= RBUF_MAX / 4) {
-                                       b[0] = 0xa0 + (port & 0xf);
-                                       ch->ch_s_rwin = rwin;
-                                       put_unaligned_be16(rwin, b + 1);
-                                       b += 3;
-                               }
-
-                               /*
-                                *  If the terminal is waiting on LOW
-                                *  water or EMPTY, and the condition
-                                *  is now satisfied, call the line
-                                *  discipline to put more data in the
-                                *  buffer.
-                                */
-
-                               n = (ch->ch_tin - ch->ch_tout) & TBUF_MASK;
-
-                               if ((ch->ch_tun.un_flag & (UN_EMPTY|UN_LOW)) != 0) {
-                                       if ((ch->ch_tun.un_flag & UN_LOW) != 0 ?
-                                           (n <= TBUF_LOW) :
-                                           (n == 0 && ch->ch_s_tpos == ch->ch_s_tin)) {
-                                               ch->ch_tun.un_flag &= ~(UN_EMPTY|UN_LOW);
-
-                                               if (waitqueue_active(&((ch->ch_tun.un_tty)->write_wait)))
-                                                       wake_up_interruptible(&((ch->ch_tun.un_tty)->write_wait));
-                                               tty_wakeup(ch->ch_tun.un_tty);
-                                               n = (ch->ch_tin - ch->ch_tout) & TBUF_MASK;
-                                       }
-                               }
-
-                               /*
-                                * If the printer is waiting on LOW
-                                * water, TIME, EMPTY or PWAIT, and is
-                                * now ready to put more data in the
-                                * buffer, call the line discipline to
-                                * do the job.
-                                */
-
-                               /* FIXME: jiffies - ch->ch_waketime can never
-                                  be < 0. Someone needs to work out what is
-                                  actually intended here */
-                               if (ch->ch_pun.un_open_count &&
-                                   (ch->ch_pun.un_flag &
-                                   (UN_EMPTY|UN_TIME|UN_LOW|UN_PWAIT)) != 0) {
-
-                                       if ((ch->ch_pun.un_flag & UN_LOW) != 0 ?
-                                           (n <= TBUF_LOW) :
-                                           (ch->ch_pun.un_flag & UN_TIME) != 0 ?
-                                           time_is_before_jiffies(ch->ch_waketime) :
-                                           (n == 0 && ch->ch_s_tpos == ch->ch_s_tin) &&
-                                           ((ch->ch_pun.un_flag & UN_EMPTY) != 0 ||
-                                           ((ch->ch_tun.un_open_count &&
-                                             ch->ch_tun.un_tty->ops->chars_in_buffer) ?
-                                            (ch->ch_tun.un_tty->ops->chars_in_buffer)(ch->ch_tun.un_tty) == 0
-                                            : 1
-                                           )
-                                           )) {
-                                               ch->ch_pun.un_flag &= ~(UN_EMPTY | UN_TIME | UN_LOW | UN_PWAIT);
-
-                                               if (waitqueue_active(&((ch->ch_pun.un_tty)->write_wait)))
-                                                       wake_up_interruptible(&((ch->ch_pun.un_tty)->write_wait));
-                                               tty_wakeup(ch->ch_pun.un_tty);
-                                               n = (ch->ch_tin - ch->ch_tout) & TBUF_MASK;
-
-                                       } else if ((ch->ch_pun.un_flag & UN_TIME) != 0) {
-                                               work = 1;
-                                       }
-                               }
-
-
-                               /*
-                                *  Determine the max number of bytes
-                                *  this port can send, including
-                                *  packet header overhead.
-                                */
-
-                               t = ((ch->ch_s_tsize + ch->ch_s_tpos - ch->ch_s_tin) & 0xffff);
-
-                               if (n > t)
-                                       n = t;
-
-                               if (n != 0) {
-                                       n += (n <= 8 ? 1 : n <= 255 ? 2 : 3);
-
-                                       tdata[tchan++] = n;
-                                       ttotal += n;
-                               }
-                               break;
-
-                       /*
-                        *  Close the port.
-                        */
-
-send_close:
-                       case CS_SEND_CLOSE:
-                               b = set_cmd_header(b, port, 10);
-                               if (ch->ch_otype == OTYPE_IMMEDIATE)
-                                       *b++ = 3;
-                               else
-                                       *b++ = 4;
-
-                               ch->ch_state = CS_WAIT_CLOSE;
-                               break;
-
-                       /*
-                        *  Wait for a previous server request.
-                        */
-
-                       case CS_WAIT_OPEN:
-                       case CS_WAIT_CANCEL:
-                       case CS_WAIT_FAIL:
-                       case CS_WAIT_QUERY:
-                       case CS_WAIT_CLOSE:
-                               break;
-
-                       default:
-                               pr_info("%s - unexpected channel state (%i)\n",
-                                       __func__, ch->ch_state);
-                       }
-               }
-
-               /*
-                *  If a module select code is needed, drop one in.  If space
-                *  was reserved for one, but none is needed, recover the space.
-                */
-
-               if (mod != nd->nd_tx_module) {
-                       if (b != mbuf) {
-                               mbuf[-1] = 0xf0 | mod;
-                               nd->nd_tx_module = mod;
-                       } else {
-                               b--;
-                       }
-               }
-       }
-
-       /*
-        *  Adjust "tmax" so that under worst case conditions we do
-        *  not overflow either the daemon buffer or the internal
-        *  buffer in the loop that follows.   Leave a safe area
-        *  of 64 bytes so we start getting asserts before we start
-        *  losing data or clobbering memory.
-        */
-
-       n = UIO_MAX - UIO_BASE;
-
-       if (tmax > n)
-               tmax = n;
-
-       tmax -= 64;
-
-       tsafe = tmax;
-
-       /*
-        *  Allocate space for 5 Module Selects, 1 Sequence Request,
-        *  and 1 Set TREQ for each active channel.
-        */
-
-       tmax -= 5 + 3 + 4 * nd->nd_chan_count;
-
-       /*
-        *  Further reduce "tmax" to the available transmit credit.
-        *  Note that this is a soft constraint;  The transmit credit
-        *  can go negative for a time and then recover.
-        */
-
-       n = nd->nd_tx_deposit - nd->nd_tx_charge - nd->nd_link.lk_header_size;
-
-       if (tmax > n)
-               tmax = n;
-
-       /*
-        *  Finally reduce tmax by the number of bytes already in
-        *  the buffer.
-        */
-
-       tmax -= b - buf;
-
-       /*
-        *  Suspend data transmit unless every ready channel can send
-        *  at least 1 character.
-        */
-       if (tmax < 2 * nd->nd_chan_count) {
-               tsend = 1;
-
-       } else if (tchan > 1 && ttotal > tmax) {
-
-               /*
-                *  If transmit is limited by the credit budget, find the
-                *  largest number of characters we can send without driving
-                *  the credit negative.
-                */
-
-               long tm = tmax;
-               int tc = tchan;
-               int try;
-
-               tsend = tm / tc;
-
-               for (try = 0; try < 3; try++) {
-                       int i;
-                       int c = 0;
-
-                       for (i = 0; i < tc; i++) {
-                               if (tsend < tdata[i])
-                                       tdata[c++] = tdata[i];
-                               else
-                                       tm -= tdata[i];
-                       }
-
-                       if (c == tc)
-                               break;
-
-                       tsend = tm / c;
-
-                       if (c == 1)
-                               break;
-
-                       tc = c;
-               }
-
-               tsend = tm / nd->nd_chan_count;
-
-               if (tsend < 2)
-                       tsend = 1;
-
-       } else {
-               /*
-                *  If no budgetary constraints, or only one channel ready
-                *  to send, set the character limit to the remaining
-                *  buffer size.
-                */
-
-               tsend = tmax;
-       }
-
-       tsend -= (tsend <= 9) ? 1 : (tsend <= 257) ? 2 : 3;
-
-       /*
-        *  Loop over all channels, sending queued data.
-        */
-
-       port = 0;
-       ch = nd->nd_chan;
-       used_buffer = tmax;
-
-       for (mod = 0; port < nd->nd_chan_count; mod++) {
-               /*
-                *  If this is not the current module, enter a module select
-                *  code in the buffer.
-                */
-
-               if (mod != nd->nd_tx_module)
-                       mbuf = ++b;
-
-               /*
-                *  Loop to process one module.
-                */
-
-               maxport = port + 16;
-
-               if (maxport > nd->nd_chan_count)
-                       maxport = nd->nd_chan_count;
-
-               for (; port < maxport; port++, ch++) {
-                       if (ch->ch_state != CS_READY)
-                               continue;
-
-                       lastport = port;
-
-                       n = (ch->ch_tin - ch->ch_tout) & TBUF_MASK;
-
-                       /*
-                        *  If there is data that can be sent, send it.
-                        */
-
-                       if (n != 0 && used_buffer > 0) {
-                               t = (ch->ch_s_tsize + ch->ch_s_tpos - ch->ch_s_tin) & 0xffff;
-
-                               if (n > t)
-                                       n = t;
-
-                               if (n > tsend) {
-                                       work = 1;
-                                       n = tsend;
-                               }
-
-                               if (n > used_buffer) {
-                                       work = 1;
-                                       n = used_buffer;
-                               }
-
-                               if (n <= 0)
-                                       continue;
-
-                               /*
-                                *  Create the correct size transmit header,
-                                *  depending on the amount of data to transmit.
-                                */
-
-                               if (n <= 8) {
-
-                                       b[0] = ((n - 1) << 4) + (port & 0xf);
-                                       b += 1;
-
-                               } else if (n <= 255) {
-
-                                       b[0] = 0x80 + (port & 0xf);
-                                       b[1] = n;
-                                       b += 2;
-
-                               } else {
-
-                                       b[0] = 0x90 + (port & 0xf);
-                                       put_unaligned_be16(n, b + 1);
-                                       b += 3;
-                               }
-
-                               ch->ch_s_tin = (ch->ch_s_tin + n) & 0xffff;
-
-                               /*
-                                *  Copy transmit data to the packet.
-                                */
-
-                               t = TBUF_MAX - ch->ch_tout;
-
-                               if (n >= t) {
-                                       memcpy(b, ch->ch_tbuf + ch->ch_tout, t);
-                                       b += t;
-                                       n -= t;
-                                       used_buffer -= t;
-                                       ch->ch_tout = 0;
-                               }
-
-                               memcpy(b, ch->ch_tbuf + ch->ch_tout, n);
-                               b += n;
-                               used_buffer -= n;
-                               ch->ch_tout += n;
-                               n = (ch->ch_tin - ch->ch_tout) & TBUF_MASK;
-                       }
-
-                       /*
-                        *  Wake any terminal unit process waiting in the
-                        *  dgrp_write routine for low water.
-                        */
-
-                       if (n > TBUF_LOW)
-                               continue;
-
-                       if ((ch->ch_flag & CH_LOW) != 0) {
-                               ch->ch_flag &= ~CH_LOW;
-                               wake_up_interruptible(&ch->ch_flag_wait);
-                       }
-
-                       /* selwakeup tty_sel */
-                       if (ch->ch_tun.un_open_count) {
-                               struct tty_struct *tty = (ch->ch_tun.un_tty);
-
-                               if (waitqueue_active(&tty->write_wait))
-                                       wake_up_interruptible(&tty->write_wait);
-
-                               tty_wakeup(tty);
-                       }
-
-                       if (ch->ch_pun.un_open_count) {
-                               struct tty_struct *tty = (ch->ch_pun.un_tty);
-
-                               if (waitqueue_active(&tty->write_wait))
-                                       wake_up_interruptible(&tty->write_wait);
-
-                               tty_wakeup(tty);
-                       }
-
-                       /*
-                        *  Do EMPTY processing.
-                        */
-
-                       if (n != 0)
-                               continue;
-
-                       if ((ch->ch_flag & (CH_EMPTY | CH_DRAIN)) != 0 ||
-                           (ch->ch_pun.un_flag & UN_EMPTY) != 0) {
-                               /*
-                                *  If there is still data in the server, ask the server
-                                *  to notify us when its all gone.
-                                */
-
-                               if (ch->ch_s_treq != ch->ch_s_tin) {
-                                       b = set_cmd_header(b, port, 43);
-
-                                       ch->ch_s_treq = ch->ch_s_tin;
-                                       put_unaligned_be16(ch->ch_s_treq,
-                                                          b);
-                                       b += 2;
-                               }
-
-                               /*
-                                *  If there is a thread waiting for buffer empty,
-                                *  and we are truly empty, wake the thread.
-                                */
-
-                               else if ((ch->ch_flag & CH_EMPTY) != 0 &&
-                                       (ch->ch_send & RR_TX_BREAK) == 0) {
-                                       ch->ch_flag &= ~CH_EMPTY;
-
-                                       wake_up_interruptible(&ch->ch_flag_wait);
-                               }
-                       }
-               }
-
-               /*
-                *  If a module select code is needed, drop one in.  If space
-                *  was reserved for one, but none is needed, recover the space.
-                */
-
-               if (mod != nd->nd_tx_module) {
-                       if (b != mbuf) {
-                               mbuf[-1] = 0xf0 | mod;
-                               nd->nd_tx_module = mod;
-                       } else {
-                               b--;
-                       }
-               }
-       }
-
-       /*
-        *  Send a synchronization sequence associated with the last open
-        *  channel that sent data, and remember the time when the data was
-        *  sent.
-        */
-
-       in = nd->nd_seq_in;
-
-       if ((send_sync || nd->nd_seq_wait[in] != 0) && lastport >= 0) {
-               u8 *bb = b;
-
-               /*
-                * Attempt the use the port that really wanted the sync.
-                * This gets around a race condition where the "lastport" is in
-                * the middle of the close() routine, and by the time we
-                * send this command, it will have already acked the close, and
-                * thus not send the sync response.
-                */
-               if (wanted_sync_port >= 0)
-                       lastport = wanted_sync_port;
-               /*
-                * Set a flag just in case the port is in the middle of a close,
-                * it will not be permitted to actually close until we get an
-                * sync response, and clear the flag there.
-                */
-               ch = nd->nd_chan + lastport;
-               ch->ch_flag |= CH_WAITING_SYNC;
-
-               mod = lastport >> 4;
-
-               if (mod != nd->nd_tx_module) {
-                       bb[0] = 0xf0 + mod;
-                       bb += 1;
-
-                       nd->nd_tx_module = mod;
-               }
-
-               bb = set_cmd_header(bb, lastport, 12);
-               *bb++ = in;
-
-               nd->nd_seq_size[in] = bb - buf;
-               nd->nd_seq_time[in] = jiffies;
-
-               if (++in >= SEQ_MAX)
-                       in = 0;
-
-               if (in != nd->nd_seq_out) {
-                       b = bb;
-                       nd->nd_seq_in = in;
-                       nd->nd_unack += b - buf;
-               }
-       }
-
-       /*
-        *  If there are no open ports, a sync cannot be sent.
-        *  There is nothing left to wait for anyway, so wake any
-        *  thread waiting for an acknowledgement.
-        */
-
-       else if (nd->nd_seq_wait[in] != 0) {
-               nd->nd_seq_wait[in] = 0;
-
-               wake_up_interruptible(&nd->nd_seq_wque[in]);
-       }
-
-       /*
-        *  If there is no traffic for an interval of IDLE_MAX, then
-        *  send a single byte packet.
-        */
-
-       if (b != buf) {
-               nd->nd_tx_time = jiffies;
-       } else if ((ulong)(jiffies - nd->nd_tx_time) >= IDLE_MAX) {
-               *b++ = 0xf0 | nd->nd_tx_module;
-               nd->nd_tx_time = jiffies;
-       }
-
-       n = b - buf;
-
-       if (n >= tsafe)
-               pr_info("%s - n(%i) >= tsafe(%i)\n",
-                       __func__, n, tsafe);
-
-       if (tsend < 0)
-               dgrp_dump(buf, n);
-
-       nd->nd_tx_work = work;
-
-       return n;
-}
-
-/*
- * dgrp_net_read()
- * Data to be sent TO the PortServer from the "async." half of the driver.
- */
-static ssize_t dgrp_net_read(struct file *file, char __user *buf, size_t count,
-                            loff_t *ppos)
-{
-       struct nd_struct *nd;
-       long n;
-       u8 *local_buf;
-       u8 *b;
-       ssize_t rtn;
-
-       /*
-        *  Get the node pointer, and quit if it doesn't exist.
-        */
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               return -ENXIO;
-
-       if (count < UIO_MIN)
-               return -EINVAL;
-
-       /*
-        *  Only one read/write operation may be in progress at
-        *  any given time.
-        */
-
-       /*
-        *  Grab the NET lock.
-        */
-       down(&nd->nd_net_semaphore);
-
-       nd->nd_read_count++;
-
-       nd->nd_tx_ready = 0;
-
-       /*
-        *  Determine the effective size of the buffer.
-        */
-
-       if (nd->nd_remain > UIO_BASE)
-               pr_info_ratelimited("%s - nd_remain(%i) > UIO_BASE\n",
-                                   __func__, nd->nd_remain);
-
-       b = local_buf = nd->nd_iobuf + UIO_BASE;
-
-       /*
-        *  Generate data according to the node state.
-        */
-
-       switch (nd->nd_state) {
-       /*
-        *  Initialize the connection.
-        */
-
-       case NS_IDLE:
-               if (nd->nd_mon_buf)
-                       dgrp_monitor_reset(nd);
-
-               /*
-                *  Request a Product ID Packet.
-                */
-
-               b[0] = 0xfb;
-               b[1] = 0x01;
-               b += 2;
-
-               nd->nd_expect |= NR_IDENT;
-
-               /*
-                *  Request a Server Capability ID Response.
-                */
-
-               b[0] = 0xfb;
-               b[1] = 0x02;
-               b += 2;
-
-               nd->nd_expect |= NR_CAPABILITY;
-
-               /*
-                *  Request a Server VPD Response.
-                */
-
-               b[0] = 0xfb;
-               b[1] = 0x18;
-               b += 2;
-
-               nd->nd_expect |= NR_VPD;
-
-               nd->nd_state = NS_WAIT_QUERY;
-               break;
-
-       /*
-        *  We do serious communication with the server only in
-        *  the READY state.
-        */
-
-       case NS_READY:
-               b = dgrp_send(nd, count) + local_buf;
-               break;
-
-       /*
-        *  Send off an error after receiving a bogus message
-        *  from the server.
-        */
-
-       case NS_SEND_ERROR:
-               n = strlen(nd->nd_error);
-
-               b[0] = 0xff;
-               b[1] = n;
-               memcpy(b + 2, nd->nd_error, n);
-               b += 2 + n;
-
-               dgrp_net_idle(nd);
-               /*
-                *  Set the active port count to zero.
-                */
-               dgrp_chan_count(nd, 0);
-               break;
-
-       default:
-               break;
-       }
-
-       n = b - local_buf;
-
-       if (n != 0) {
-               nd->nd_send_count++;
-
-               nd->nd_tx_byte   += n + nd->nd_link.lk_header_size;
-               nd->nd_tx_charge += n + nd->nd_link.lk_header_size;
-       }
-
-       rtn = copy_to_user((void __user *)buf, local_buf, n);
-       if (rtn) {
-               rtn = -EFAULT;
-               goto done;
-       }
-
-       *ppos += n;
-
-       rtn = n;
-
-       if (nd->nd_mon_buf)
-               dgrp_monitor_data(nd, RPDUMP_CLIENT, local_buf, n);
-
-       /*
-        *  Release the NET lock.
-        */
-done:
-       up(&nd->nd_net_semaphore);
-
-       return rtn;
-}
-
-/**
- * dgrp_receive() -- decode data packets received from the remote PortServer.
- * @nd: pointer to a node structure
- */
-static void dgrp_receive(struct nd_struct *nd)
-{
-       struct ch_struct *ch;
-       u8 *buf;
-       u8 *b;
-       u8 *dbuf;
-       char *error;
-       long port;
-       long dlen;
-       long plen;
-       long remain;
-       long n;
-       long mlast;
-       long elast;
-       long mstat;
-       long estat;
-
-       char ID[3];
-
-       nd->nd_tx_time = jiffies;
-
-       ID_TO_CHAR(nd->nd_ID, ID);
-
-       b = buf = nd->nd_iobuf;
-       remain = nd->nd_remain;
-
-       /*
-        *  Loop to process Realport protocol packets.
-        */
-
-       while (remain > 0) {
-               int n0 = b[0] >> 4;
-               int n1 = b[0] & 0x0f;
-
-               if (n0 <= 12) {
-                       port = (nd->nd_rx_module << 4) + n1;
-
-                       if (port >= nd->nd_chan_count) {
-                               error = "Improper Port Number";
-                               goto prot_error;
-                       }
-
-                       ch = nd->nd_chan + port;
-               } else {
-                       port = -1;
-                       ch = NULL;
-               }
-
-               /*
-                *  Process by major packet type.
-                */
-
-               switch (n0) {
-
-               /*
-                *  Process 1-byte header data packet.
-                */
-
-               case 0:
-               case 1:
-               case 2:
-               case 3:
-               case 4:
-               case 5:
-               case 6:
-               case 7:
-                       dlen = n0 + 1;
-                       plen = dlen + 1;
-
-                       dbuf = b + 1;
-                       goto data;
-
-               /*
-                *  Process 2-byte header data packet.
-                */
-
-               case 8:
-                       if (remain < 3)
-                               goto done;
-
-                       dlen = b[1];
-                       plen = dlen + 2;
-
-                       dbuf = b + 2;
-                       goto data;
-
-               /*
-                *  Process 3-byte header data packet.
-                */
-
-               case 9:
-                       if (remain < 4)
-                               goto done;
-
-                       dlen = get_unaligned_be16(b + 1);
-                       plen = dlen + 3;
-
-                       dbuf = b + 3;
-
-               /*
-                *  Common packet handling code.
-                */
-
-data:
-                       nd->nd_tx_work = 1;
-
-                       /*
-                        *  Otherwise data should appear only when we are
-                        *  in the CS_READY state.
-                        */
-
-                       if (ch->ch_state < CS_READY) {
-                               error = "Data received before RWIN established";
-                               goto prot_error;
-                       }
-
-                       /*
-                        *  Assure that the data received is within the
-                        *  allowable window.
-                        */
-
-                       n = (ch->ch_s_rwin - ch->ch_s_rin) & 0xffff;
-
-                       if (dlen > n) {
-                               error = "Receive data overrun";
-                               goto prot_error;
-                       }
-
-                       /*
-                        *  If we received 3 or less characters,
-                        *  assume it is a human typing, and set RTIME
-                        *  to 10 milliseconds.
-                        *
-                        *  If we receive 10 or more characters,
-                        *  assume its not a human typing, and set RTIME
-                        *  to 100 milliseconds.
-                        */
-
-                       if (ch->ch_edelay != DGRP_RTIME) {
-                               if (ch->ch_rtime != ch->ch_edelay) {
-                                       ch->ch_rtime = ch->ch_edelay;
-                                       ch->ch_flag |= CH_PARAM;
-                               }
-                       } else if (dlen <= 3) {
-                               if (ch->ch_rtime != 10) {
-                                       ch->ch_rtime = 10;
-                                       ch->ch_flag |= CH_PARAM;
-                               }
-                       } else {
-                               if (ch->ch_rtime != DGRP_RTIME) {
-                                       ch->ch_rtime = DGRP_RTIME;
-                                       ch->ch_flag |= CH_PARAM;
-                               }
-                       }
-
-                       /*
-                        *  If a portion of the packet is outside the
-                        *  buffer, shorten the effective length of the
-                        *  data packet to be the amount of data received.
-                        */
-
-                       if (remain < plen)
-                               dlen -= plen - remain;
-
-                       /*
-                        *  Detect if receive flush is now complete.
-                        */
-
-                       if ((ch->ch_flag & CH_RX_FLUSH) != 0 &&
-                           ((ch->ch_flush_seq - nd->nd_seq_out) & SEQ_MASK) >=
-                           ((nd->nd_seq_in    - nd->nd_seq_out) & SEQ_MASK)) {
-                               ch->ch_flag &= ~CH_RX_FLUSH;
-                       }
-
-                       /*
-                        *  If we are ready to receive, move the data into
-                        *  the receive buffer.
-                        */
-
-                       ch->ch_s_rin = (ch->ch_s_rin + dlen) & 0xffff;
-
-                       if (ch->ch_state == CS_READY &&
-                           (ch->ch_tun.un_open_count != 0) &&
-                           (ch->ch_tun.un_flag & UN_CLOSING) == 0 &&
-                           (ch->ch_cflag & CF_CREAD) != 0 &&
-                           (ch->ch_flag & (CH_BAUD0 | CH_RX_FLUSH)) == 0 &&
-                           (ch->ch_send & RR_RX_FLUSH) == 0) {
-
-                               if (ch->ch_rin + dlen >= RBUF_MAX) {
-                                       n = RBUF_MAX - ch->ch_rin;
-
-                                       memcpy(ch->ch_rbuf + ch->ch_rin, dbuf, n);
-
-                                       ch->ch_rin = 0;
-                                       dbuf += n;
-                                       dlen -= n;
-                               }
-
-                               memcpy(ch->ch_rbuf + ch->ch_rin, dbuf, dlen);
-
-                               ch->ch_rin += dlen;
-
-
-                               /*
-                                *  If we are not in fastcook mode, or
-                                *  if there is a fastcook thread
-                                *  waiting for data, send the data to
-                                *  the line discipline.
-                                */
-
-                               if ((ch->ch_flag & CH_FAST_READ) == 0 ||
-                                   ch->ch_inwait != 0) {
-                                       dgrp_input(ch);
-                               }
-
-                               /*
-                                *  If there is a read thread waiting
-                                *  in select, and we are in fastcook
-                                *  mode, wake him up.
-                                */
-
-                               if (waitqueue_active(&ch->ch_tun.un_tty->read_wait) &&
-                                   (ch->ch_flag & CH_FAST_READ) != 0)
-                                       wake_up_interruptible(&ch->ch_tun.un_tty->read_wait);
-
-                               /*
-                                * Wake any thread waiting in the
-                                * fastcook loop.
-                                */
-
-                               if ((ch->ch_flag & CH_INPUT) != 0) {
-                                       ch->ch_flag &= ~CH_INPUT;
-
-                                       wake_up_interruptible(&ch->ch_flag_wait);
-                               }
-                       }
-
-                       /*
-                        *  Fabricate and insert a data packet header to
-                        *  preced the remaining data when it comes in.
-                        */
-
-                       if (remain < plen) {
-                               dlen = plen - remain;
-                               b = buf;
-
-                               b[0] = 0x90 + n1;
-                               put_unaligned_be16(dlen, b + 1);
-
-                               remain = 3;
-                               goto done;
-                       }
-                       break;
-
-               /*
-                *  Handle Window Sequence packets.
-                */
-
-               case 10:
-                       plen = 3;
-                       if (remain < plen)
-                               goto done;
-
-                       nd->nd_tx_work = 1;
-
-                       {
-                               ushort tpos   = get_unaligned_be16(b + 1);
-
-                               ushort ack    = (tpos          - ch->ch_s_tpos) & 0xffff;
-                               ushort unack  = (ch->ch_s_tin  - ch->ch_s_tpos) & 0xffff;
-                               ushort notify = (ch->ch_s_treq - ch->ch_s_tpos) & 0xffff;
-
-                               if (ch->ch_state < CS_READY || ack > unack) {
-                                       error = "Improper Window Sequence";
-                                       goto prot_error;
-                               }
-
-                               ch->ch_s_tpos = tpos;
-
-                               if (notify <= ack)
-                                       ch->ch_s_treq = tpos;
-                       }
-                       break;
-
-               /*
-                *  Handle Command response packets.
-                */
-
-               case 11:
-
-                       /*
-                        * RealPort engine fix - 03/11/2004
-                        *
-                        * This check did not used to be here.
-                        *
-                        * We were using b[1] without verifying that the data
-                        * is actually there and valid. On a split packet, it
-                        * might not be yet.
-                        *
-                        * NOTE:  I have never actually seen the failure happen
-                        *        under Linux,  but since I have seen it occur
-                        *        under both Solaris and HP-UX,  the assumption
-                        *        is that it *could* happen here as well...
-                        */
-                       if (remain < 2)
-                               goto done;
-
-
-                       switch (b[1]) {
-
-                       /*
-                        *  Handle Open Response.
-                        */
-
-                       case 11:
-                               plen = 6;
-                               if (remain < plen)
-                                       goto done;
-
-                               nd->nd_tx_work = 1;
-
-                               {
-                                       int req = b[2];
-                                       int resp = b[3];
-                                       port = get_unaligned_be16(b + 4);
-
-                                       if (port >= nd->nd_chan_count) {
-                                               error = "Open channel number out of range";
-                                               goto prot_error;
-                                       }
-
-                                       ch = nd->nd_chan + port;
-
-                                       /*
-                                        *  How we handle an open response depends primarily
-                                        *  on our current channel state.
-                                        */
-
-                                       switch (ch->ch_state) {
-                                       case CS_IDLE:
-
-                                               /*
-                                                *  Handle a delayed open.
-                                                */
-
-                                               if (ch->ch_otype_waiting != 0 &&
-                                                   req == ch->ch_otype_waiting &&
-                                                   resp == 0) {
-                                                       ch->ch_otype = req;
-                                                       ch->ch_otype_waiting = 0;
-                                                       ch->ch_state = CS_SEND_QUERY;
-                                                       break;
-                                               }
-                                               goto open_error;
-
-                                       case CS_WAIT_OPEN:
-
-                                               /*
-                                                *  Handle the open response.
-                                                */
-
-                                               if (req == ch->ch_otype) {
-                                                       switch (resp) {
-
-                                                       /*
-                                                        *  On successful response, open the
-                                                        *  port and proceed normally.
-                                                        */
-
-                                                       case 0:
-                                                               ch->ch_state = CS_SEND_QUERY;
-                                                               break;
-
-                                                       /*
-                                                        *  On a busy response to a persistent open,
-                                                        *  remember that the open is pending.
-                                                        */
-
-                                                       case 1:
-                                                       case 2:
-                                                               if (req != OTYPE_IMMEDIATE) {
-                                                                       ch->ch_otype_waiting = req;
-                                                                       ch->ch_state = CS_IDLE;
-                                                                       break;
-                                                               }
-
-                                                       /*
-                                                        *  Otherwise the server open failed.  If
-                                                        *  the Unix port is open, hang it up.
-                                                        */
-
-                                                       default:
-                                                               if (ch->ch_open_count != 0) {
-                                                                       ch->ch_flag |= CH_HANGUP;
-                                                                       dgrp_carrier(ch);
-                                                                       ch->ch_state = CS_IDLE;
-                                                                       break;
-                                                               }
-
-                                                               ch->ch_open_error = resp;
-                                                               ch->ch_state = CS_IDLE;
-
-                                                               wake_up_interruptible(&ch->ch_flag_wait);
-                                                       }
-                                                       break;
-                                               }
-
-                                               /*
-                                                *  Handle delayed response arrival preceding
-                                                *  the open response we are waiting for.
-                                                */
-
-                                               if (ch->ch_otype_waiting != 0 &&
-                                                   req == ch->ch_otype_waiting &&
-                                                   resp == 0) {
-                                                       ch->ch_otype = ch->ch_otype_waiting;
-                                                       ch->ch_otype_waiting = 0;
-                                                       ch->ch_state = CS_WAIT_FAIL;
-                                                       break;
-                                               }
-                                               goto open_error;
-
-
-                                       case CS_WAIT_FAIL:
-
-                                               /*
-                                                *  Handle response to immediate open arriving
-                                                *  after a delayed open success.
-                                                */
-
-                                               if (req == OTYPE_IMMEDIATE) {
-                                                       ch->ch_state = CS_SEND_QUERY;
-                                                       break;
-                                               }
-                                               goto open_error;
-
-
-                                       case CS_WAIT_CANCEL:
-                                               /*
-                                                *  Handle delayed open response arriving before
-                                                *  the cancel response.
-                                                */
-
-                                               if (req == ch->ch_otype_waiting &&
-                                                   resp == 0) {
-                                                       ch->ch_otype_waiting = 0;
-                                                       break;
-                                               }
-
-                                               /*
-                                                *  Handle cancel response.
-                                                */
-
-                                               if (req == 4 && resp == 0) {
-                                                       ch->ch_otype_waiting = 0;
-                                                       ch->ch_state = CS_IDLE;
-                                                       break;
-                                               }
-                                               goto open_error;
-
-
-                                       case CS_WAIT_CLOSE:
-                                               /*
-                                                *  Handle a successful response to a port
-                                                *  close.
-                                                */
-
-                                               if (req >= 3) {
-                                                       ch->ch_state = CS_IDLE;
-                                                       break;
-                                               }
-                                               goto open_error;
-
-open_error:
-                                       default:
-                                               {
-                                                       error = "Improper Open Response";
-                                                       goto prot_error;
-                                               }
-                                       }
-                               }
-                               break;
-
-                       /*
-                        *  Handle Synchronize Response.
-                        */
-
-                       case 13:
-                               plen = 3;
-                               if (remain < plen)
-                                       goto done;
-                               {
-                                       int seq = b[2];
-                                       int s;
-
-                                       /*
-                                        * If channel was waiting for this sync response,
-                                        * unset the flag, and wake up anyone waiting
-                                        * on the event.
-                                        */
-                                       if (ch->ch_flag & CH_WAITING_SYNC) {
-                                               ch->ch_flag &= ~(CH_WAITING_SYNC);
-                                               wake_up_interruptible(&ch->ch_flag_wait);
-                                       }
-
-                                       if (((seq - nd->nd_seq_out) & SEQ_MASK) >=
-                                           ((nd->nd_seq_in - nd->nd_seq_out) & SEQ_MASK)) {
-                                               break;
-                                       }
-
-                                       for (s = nd->nd_seq_out;; s = (s + 1) & SEQ_MASK) {
-                                               if (nd->nd_seq_wait[s] != 0) {
-                                                       nd->nd_seq_wait[s] = 0;
-
-                                                       wake_up_interruptible(&nd->nd_seq_wque[s]);
-                                               }
-
-                                               nd->nd_unack -= nd->nd_seq_size[s];
-
-                                               if (s == seq)
-                                                       break;
-                                       }
-
-                                       nd->nd_seq_out = (seq + 1) & SEQ_MASK;
-                               }
-                               break;
-
-                       /*
-                        *  Handle Sequence Response.
-                        */
-
-                       case 15:
-                               plen = 6;
-                               if (remain < plen)
-                                       goto done;
-
-                               {
-                               /* Record that we have received the Sequence
-                                * Response, but we aren't interested in the
-                                * sequence numbers.  We were using RIN like it
-                                * was ROUT and that was causing problems,
-                                * fixed 7-13-2001 David Fries. See comment in
-                                * drp.h for ch_s_rin variable.
-                                       int rin = get_unaligned_be16(b + 2);
-                                       int tpos = get_unaligned_be16(b + 4);
-                               */
-
-                                       ch->ch_send   &= ~RR_SEQUENCE;
-                                       ch->ch_expect &= ~RR_SEQUENCE;
-                               }
-                               goto check_query;
-
-                       /*
-                        *  Handle Status Response.
-                        */
-
-                       case 17:
-                               plen = 5;
-                               if (remain < plen)
-                                       goto done;
-
-                               {
-                                       ch->ch_s_elast = get_unaligned_be16(b + 2);
-                                       ch->ch_s_mlast = b[4];
-
-                                       ch->ch_expect &= ~RR_STATUS;
-                                       ch->ch_send   &= ~RR_STATUS;
-
-                                       /*
-                                        *  CH_PHYS_CD is cleared because something _could_ be
-                                        *  waiting for the initial sense of carrier... and if
-                                        *  carrier is high immediately, we want to be sure to
-                                        *  wake them as soon as possible.
-                                        */
-                                       ch->ch_flag &= ~CH_PHYS_CD;
-
-                                       dgrp_carrier(ch);
-                               }
-                               goto check_query;
-
-                       /*
-                        *  Handle Line Error Response.
-                        */
-
-                       case 19:
-                               plen = 14;
-                               if (remain < plen)
-                                       goto done;
-
-                               break;
-
-                       /*
-                        *  Handle Buffer Response.
-                        */
-
-                       case 21:
-                               plen = 6;
-                               if (remain < plen)
-                                       goto done;
-
-                               {
-                                       ch->ch_s_rsize = get_unaligned_be16(b + 2);
-                                       ch->ch_s_tsize = get_unaligned_be16(b + 4);
-
-                                       ch->ch_send   &= ~RR_BUFFER;
-                                       ch->ch_expect &= ~RR_BUFFER;
-                               }
-                               goto check_query;
-
-                       /*
-                        *  Handle Port Capability Response.
-                        */
-
-                       case 23:
-                               plen = 32;
-                               if (remain < plen)
-                                       goto done;
-
-                               {
-                                       ch->ch_send   &= ~RR_CAPABILITY;
-                                       ch->ch_expect &= ~RR_CAPABILITY;
-                               }
-
-                       /*
-                        *  When all queries are complete, set those parameters
-                        *  derived from the query results, then transition
-                        *  to the READY state.
-                        */
-
-check_query:
-                               if (ch->ch_state == CS_WAIT_QUERY &&
-                                   (ch->ch_expect & (RR_SEQUENCE |
-                                                       RR_STATUS |
-                                                       RR_BUFFER |
-                                                       RR_CAPABILITY)) == 0) {
-                                       ch->ch_tmax  = ch->ch_s_tsize / 4;
-
-                                       if (ch->ch_edelay == DGRP_TTIME)
-                                               ch->ch_ttime = DGRP_TTIME;
-                                       else
-                                               ch->ch_ttime = ch->ch_edelay;
-
-                                       ch->ch_rmax = ch->ch_s_rsize / 4;
-
-                                       if (ch->ch_edelay == DGRP_RTIME)
-                                               ch->ch_rtime = DGRP_RTIME;
-                                       else
-                                               ch->ch_rtime = ch->ch_edelay;
-
-                                       ch->ch_rlow  = 2 * ch->ch_s_rsize / 8;
-                                       ch->ch_rhigh = 6 * ch->ch_s_rsize / 8;
-
-                                       ch->ch_state = CS_READY;
-
-                                       nd->nd_tx_work = 1;
-                                       wake_up_interruptible(&ch->ch_flag_wait);
-
-                               }
-                               break;
-
-                       default:
-                               goto decode_error;
-                       }
-                       break;
-
-               /*
-                *  Handle Events.
-                */
-
-               case 12:
-                       plen = 4;
-                       if (remain < plen)
-                               goto done;
-
-                       mlast = ch->ch_s_mlast;
-                       elast = ch->ch_s_elast;
-
-                       mstat = ch->ch_s_mlast = b[1];
-                       estat = ch->ch_s_elast = get_unaligned_be16(b + 2);
-
-                       /*
-                        *  Handle modem changes.
-                        */
-
-                       if (((mstat ^ mlast) & DM_CD) != 0)
-                               dgrp_carrier(ch);
-
-
-                       /*
-                        *  Handle received break.
-                        */
-
-                       if ((estat & ~elast & EV_RXB) != 0 &&
-                           (ch->ch_tun.un_open_count != 0) &&
-                           I_BRKINT(ch->ch_tun.un_tty) &&
-                           !(I_IGNBRK(ch->ch_tun.un_tty))) {
-
-                               tty_buffer_request_room(&ch->port, 1);
-                               tty_insert_flip_char(&ch->port, 0, TTY_BREAK);
-                               tty_flip_buffer_push(&ch->port);
-
-                       }
-
-                       /*
-                        *  On transmit break complete, if more break traffic
-                        *  is waiting then send it.  Otherwise wake any threads
-                        *  waiting for transmitter empty.
-                        */
-
-                       if ((~estat & elast & EV_TXB) != 0 &&
-                           (ch->ch_expect & RR_TX_BREAK) != 0) {
-
-                               nd->nd_tx_work = 1;
-
-                               ch->ch_expect &= ~RR_TX_BREAK;
-
-                               if (ch->ch_break_time != 0) {
-                                       ch->ch_send |= RR_TX_BREAK;
-                               } else {
-                                       ch->ch_send &= ~RR_TX_BREAK;
-                                       ch->ch_flag &= ~CH_TX_BREAK;
-                                       wake_up_interruptible(&ch->ch_flag_wait);
-                               }
-                       }
-                       break;
-
-               case 13:
-               case 14:
-                       error = "Unrecognized command";
-                       goto prot_error;
-
-               /*
-                *  Decode Special Codes.
-                */
-
-               case 15:
-                       switch (n1) {
-                       /*
-                        *  One byte module select.
-                        */
-
-                       case 0:
-                       case 1:
-                       case 2:
-                       case 3:
-                       case 4:
-                       case 5:
-                       case 6:
-                       case 7:
-                               plen = 1;
-                               nd->nd_rx_module = n1;
-                               break;
-
-                       /*
-                        *  Two byte module select.
-                        */
-
-                       case 8:
-                               plen = 2;
-                               if (remain < plen)
-                                       goto done;
-
-                               nd->nd_rx_module = b[1];
-                               break;
-
-                       /*
-                        *  ID Request packet.
-                        */
-
-                       case 11:
-                               if (remain < 4)
-                                       goto done;
-
-                               plen = get_unaligned_be16(b + 2);
-
-                               if (plen < 12 || plen > 1000) {
-                                       error = "Response Packet length error";
-                                       goto prot_error;
-                               }
-
-                               nd->nd_tx_work = 1;
-
-                               switch (b[1]) {
-                               /*
-                                *  Echo packet.
-                                */
-
-                               case 0:
-                                       nd->nd_send |= NR_ECHO;
-                                       break;
-
-                               /*
-                                *  ID Response packet.
-                                */
-
-                               case 1:
-                                       nd->nd_send |= NR_IDENT;
-                                       break;
-
-                               /*
-                                *  ID Response packet.
-                                */
-
-                               case 32:
-                                       nd->nd_send |= NR_PASSWORD;
-                                       break;
-
-                               }
-                               break;
-
-                       /*
-                        *  Various node-level response packets.
-                        */
-
-                       case 12:
-                               if (remain < 4)
-                                       goto done;
-
-                               plen = get_unaligned_be16(b + 2);
-
-                               if (plen < 4 || plen > 1000) {
-                                       error = "Response Packet length error";
-                                       goto prot_error;
-                               }
-
-                               nd->nd_tx_work = 1;
-
-                               switch (b[1]) {
-                               /*
-                                *  Echo packet.
-                                */
-
-                               case 0:
-                                       nd->nd_expect &= ~NR_ECHO;
-                                       break;
-
-                               /*
-                                *  Product Response Packet.
-                                */
-
-                               case 1:
-                                       {
-                                               int desclen;
-
-                                               nd->nd_hw_ver = (b[8] << 8) | b[9];
-                                               nd->nd_sw_ver = (b[10] << 8) | b[11];
-                                               nd->nd_hw_id = b[6];
-                                               desclen = (plen - 12 > MAX_DESC_LEN - 1) ? MAX_DESC_LEN - 1 :
-                                                       plen - 12;
-
-                                               if (desclen <= 0) {
-                                                       error = "Response Packet desclen error";
-                                                       goto prot_error;
-                                               }
-
-                                               strncpy(nd->nd_ps_desc, b + 12, desclen);
-                                               nd->nd_ps_desc[desclen] = 0;
-                                       }
-
-                                       nd->nd_expect &= ~NR_IDENT;
-                                       break;
-
-                               /*
-                                *  Capability Response Packet.
-                                */
-
-                               case 2:
-                                       {
-                                               int nn = get_unaligned_be16(b + 4);
-
-                                               if (nn > CHAN_MAX)
-                                                       nn = CHAN_MAX;
-
-                                               dgrp_chan_count(nd, nn);
-                                       }
-
-                                       nd->nd_expect &= ~NR_CAPABILITY;
-                                       break;
-
-                               /*
-                                *  VPD Response Packet.
-                                */
-
-                               case 15:
-                                       /*
-                                        * NOTE: case 15 is here ONLY because the EtherLite
-                                        * is broken, and sends a response to 24 back as 15.
-                                        * To resolve this, the EtherLite firmware is now
-                                        * fixed to send back 24 correctly, but, for backwards
-                                        * compatibility, we now have reserved 15 for the
-                                        * bad EtherLite response to 24 as well.
-                                        */
-
-                                       /* Fallthru! */
-
-                               case 24:
-
-                                       /*
-                                        * If the product doesn't support VPD,
-                                        * it will send back a null IDRESP,
-                                        * which is a length of 4 bytes.
-                                        */
-                                       if (plen > 4) {
-                                               memcpy(nd->nd_vpd, b + 4, min(plen - 4, (long) VPDSIZE));
-                                               nd->nd_vpd_len = min(plen - 4, (long) VPDSIZE);
-                                       }
-
-                                       nd->nd_expect &= ~NR_VPD;
-                                       break;
-
-                               default:
-                                       goto decode_error;
-                               }
-
-                               if (nd->nd_expect == 0 &&
-                                   nd->nd_state == NS_WAIT_QUERY) {
-                                       nd->nd_state = NS_READY;
-                               }
-                               break;
-
-                       /*
-                        *  Debug packet.
-                        */
-
-                       case 14:
-                               if (remain < 4)
-                                       goto done;
-
-                               plen = get_unaligned_be16(b + 2) + 4;
-
-                               if (plen > 1000) {
-                                       error = "Debug Packet too large";
-                                       goto prot_error;
-                               }
-
-                               if (remain < plen)
-                                       goto done;
-                               break;
-
-                       /*
-                        *  Handle reset packet.
-                        */
-
-                       case 15:
-                               if (remain < 2)
-                                       goto done;
-
-                               plen = 2 + b[1];
-
-                               if (remain < plen)
-                                       goto done;
-
-                               nd->nd_tx_work = 1;
-
-                               n = b[plen];
-                               b[plen] = 0;
-
-                               b[plen] = n;
-
-                               error = "Client Reset Acknowledge";
-                               goto prot_error;
-
-                       default:
-                               goto decode_error;
-                       }
-                       break;
-
-               default:
-                       goto decode_error;
-               }
-
-               b += plen;
-               remain -= plen;
-       }
-
-       /*
-        *  When the buffer is exhausted, copy any data left at the
-        *  top of the buffer back down to the bottom for the next
-        *  read request.
-        */
-
-done:
-       if (remain > 0 && b != buf)
-               memcpy(buf, b, remain);
-
-       nd->nd_remain = remain;
-       return;
-
-/*
- *  Handle a decode error.
- */
-
-decode_error:
-       error = "Protocol decode error";
-
-/*
- *  Handle a general protocol error.
- */
-
-prot_error:
-       nd->nd_remain = 0;
-       nd->nd_state = NS_SEND_ERROR;
-       nd->nd_error = error;
-}
-
-/*
- * dgrp_net_write() -- write data to the network device.
- *
- * A zero byte write indicates that the connection to the RealPort
- * device has been broken.
- *
- * A non-zero write indicates data from the RealPort device.
- */
-static ssize_t dgrp_net_write(struct file *file, const char __user *buf,
-                             size_t count, loff_t *ppos)
-{
-       struct nd_struct *nd;
-       ssize_t rtn = 0;
-       long n;
-       long total = 0;
-
-       /*
-        *  Get the node pointer, and quit if it doesn't exist.
-        */
-       nd = (struct nd_struct *)(file->private_data);
-       if (!nd)
-               return -ENXIO;
-
-       /*
-        *  Grab the NET lock.
-        */
-       down(&nd->nd_net_semaphore);
-
-       nd->nd_write_count++;
-
-       /*
-        *  Handle disconnect.
-        */
-
-       if (count == 0) {
-               dgrp_net_idle(nd);
-               /*
-                *  Set the active port count to zero.
-                */
-               dgrp_chan_count(nd, 0);
-               goto unlock;
-       }
-
-       /*
-        *  Loop to process entire receive packet.
-        */
-
-       while (count > 0) {
-               n = UIO_MAX - nd->nd_remain;
-
-               if (n > count)
-                       n = count;
-
-               nd->nd_rx_byte += n + nd->nd_link.lk_header_size;
-
-               rtn = copy_from_user(nd->nd_iobuf + nd->nd_remain,
-                                    (void __user *) buf + total, n);
-               if (rtn) {
-                       rtn = -EFAULT;
-                       goto unlock;
-               }
-
-               *ppos += n;
-
-               total += n;
-
-               count -= n;
-
-               if (nd->nd_mon_buf)
-                       dgrp_monitor_data(nd, RPDUMP_SERVER,
-                                         nd->nd_iobuf + nd->nd_remain, n);
-
-               nd->nd_remain += n;
-
-               dgrp_receive(nd);
-       }
-
-       rtn = total;
-
-unlock:
-       /*
-        *  Release the NET lock.
-        */
-       up(&nd->nd_net_semaphore);
-
-       return rtn;
-}
-
-
-/*
- * dgrp_net_select()
- *  Determine whether a device is ready to be read or written to, and
- *  sleep if not.
- */
-static unsigned int dgrp_net_select(struct file *file,
-                                   struct poll_table_struct *table)
-{
-       unsigned int retval = 0;
-       struct nd_struct *nd = file->private_data;
-
-       poll_wait(file, &nd->nd_tx_waitq, table);
-
-       if (nd->nd_tx_ready)
-               retval |= POLLIN | POLLRDNORM; /* Conditionally readable */
-
-       retval |= POLLOUT | POLLWRNORM;        /* Always writeable */
-
-       return retval;
-}
-
-/*
- * dgrp_net_ioctl
- *
- * Implement those functions which allow the network daemon to control
- * the network parameters in the driver.  The ioctls include ones to
- * get and set the link speed parameters for the PortServer.
- */
-static long dgrp_net_ioctl(struct file *file, unsigned int cmd,
-                          unsigned long arg)
-{
-       struct nd_struct  *nd;
-       int    rtn = 0;
-       long   size = _IOC_SIZE(cmd);
-       struct link_struct link;
-
-       nd = file->private_data;
-
-       if (_IOC_DIR(cmd) & _IOC_READ)
-               rtn = access_ok(VERIFY_WRITE, (void __user *) arg, size);
-       else if (_IOC_DIR(cmd) & _IOC_WRITE)
-               rtn = access_ok(VERIFY_READ,  (void __user *) arg, size);
-
-       if (!rtn)
-               return rtn;
-
-       switch (cmd) {
-       case DIGI_SETLINK:
-               if (size != sizeof(struct link_struct))
-                       return -EINVAL;
-
-               if (copy_from_user(&link, (void __user *)arg, size))
-                       return -EFAULT;
-
-               if (link.lk_fast_rate < 9600)
-                       link.lk_fast_rate = 9600;
-
-               if (link.lk_slow_rate < 2400)
-                       link.lk_slow_rate = 2400;
-
-               if (link.lk_fast_rate > 10000000)
-                       link.lk_fast_rate = 10000000;
-
-               if (link.lk_slow_rate > link.lk_fast_rate)
-                       link.lk_slow_rate = link.lk_fast_rate;
-
-               if (link.lk_fast_delay > 2000)
-                       link.lk_fast_delay = 2000;
-
-               if (link.lk_slow_delay > 10000)
-                       link.lk_slow_delay = 10000;
-
-               if (link.lk_fast_delay < 60)
-                       link.lk_fast_delay = 60;
-
-               if (link.lk_slow_delay < link.lk_fast_delay)
-                       link.lk_slow_delay = link.lk_fast_delay;
-
-               if (link.lk_header_size < 2)
-                       link.lk_header_size = 2;
-
-               if (link.lk_header_size > 128)
-                       link.lk_header_size = 128;
-
-               link.lk_fast_rate /= 8 * 1000 / dgrp_poll_tick;
-               link.lk_slow_rate /= 8 * 1000 / dgrp_poll_tick;
-
-               link.lk_fast_delay /= dgrp_poll_tick;
-               link.lk_slow_delay /= dgrp_poll_tick;
-
-               nd->nd_link = link;
-
-               break;
-
-       case DIGI_GETLINK:
-               if (size != sizeof(struct link_struct))
-                       return -EINVAL;
-
-               if (copy_to_user((void __user *)arg, (void *)(&nd->nd_link),
-                                size))
-                       return -EFAULT;
-
-               break;
-
-       default:
-               return -EINVAL;
-
-       }
-
-       return 0;
-}
-
-/**
- * dgrp_poll_handler() -- handler for poll timer
- *
- * As each timer expires, it determines (a) whether the "transmit"
- * waiter needs to be woken up, and (b) whether the poller needs to
- * be rescheduled.
- */
-void dgrp_poll_handler(unsigned long arg)
-{
-       struct dgrp_poll_data *poll_data;
-       struct nd_struct *nd;
-       struct link_struct *lk;
-       ulong time;
-       ulong poll_time;
-       ulong freq;
-       ulong lock_flags;
-
-       poll_data = (struct dgrp_poll_data *) arg;
-       freq = 1000 / poll_data->poll_tick;
-       poll_data->poll_round += 17;
-
-       if (poll_data->poll_round >= freq)
-               poll_data->poll_round -= freq;
-
-       /*
-        * Loop to process all open nodes.
-        *
-        * For each node, determine the rate at which it should
-        * be transmitting data.  Then if the node should wake up
-        * and transmit data now, enable the net receive select
-        * to get the transmit going.
-        */
-
-       list_for_each_entry(nd, &nd_struct_list, list) {
-
-               lk = &nd->nd_link;
-
-               /*
-                * Decrement statistics.  These are only for use with
-                * KME, so don't worry that the operations are done
-                * unlocked, and so the results are occasionally wrong.
-                */
-
-               nd->nd_read_count -= (nd->nd_read_count +
-                                     poll_data->poll_round) / freq;
-               nd->nd_write_count -= (nd->nd_write_count +
-                                      poll_data->poll_round) / freq;
-               nd->nd_send_count -= (nd->nd_send_count +
-                                     poll_data->poll_round) / freq;
-               nd->nd_tx_byte -= (nd->nd_tx_byte +
-                                  poll_data->poll_round) / freq;
-               nd->nd_rx_byte -= (nd->nd_rx_byte +
-                                  poll_data->poll_round) / freq;
-
-               /*
-                * Wake the daemon to transmit data only when there is
-                * enough byte credit to send data.
-                *
-                * The results are approximate because the operations
-                * are performed unlocked, and we are inspecting
-                * data asynchronously updated elsewhere.  The whole
-                * thing is just approximation anyway, so that should
-                * be okay.
-                */
-
-               if (lk->lk_slow_rate >= UIO_MAX) {
-
-                       nd->nd_delay = 0;
-                       nd->nd_rate = UIO_MAX;
-
-                       nd->nd_tx_deposit = nd->nd_tx_charge + 3 * UIO_MAX;
-                       nd->nd_tx_credit  = 3 * UIO_MAX;
-
-               } else {
-
-                       long rate;
-                       long delay;
-                       long deposit;
-                       long charge;
-                       long size;
-                       long excess;
-
-                       long seq_in = nd->nd_seq_in;
-                       long seq_out = nd->nd_seq_out;
-
-                       /*
-                        * If there are no outstanding packets, run at the
-                        * fastest rate.
-                        */
-
-                       if (seq_in == seq_out) {
-                               delay = 0;
-                               rate = lk->lk_fast_rate;
-                       }
-
-                       /*
-                        * Otherwise compute the transmit rate based on the
-                        * delay since the oldest packet.
-                        */
-
-                       else {
-                               /*
-                                * The actual delay is computed as the
-                                * time since the oldest unacknowledged
-                                * packet was sent, minus the time it
-                                * took to send that packet to the server.
-                                */
-
-                               delay = ((jiffies - nd->nd_seq_time[seq_out])
-                                       - (nd->nd_seq_size[seq_out] /
-                                       lk->lk_fast_rate));
-
-                               /*
-                                * If the delay is less than the "fast"
-                                * delay, transmit full speed.  If greater
-                                * than the "slow" delay, transmit at the
-                                * "slow" speed.   In between, interpolate
-                                * between the fast and slow speeds.
-                                */
-
-                               rate =
-                                 (delay <= lk->lk_fast_delay ?
-                                   lk->lk_fast_rate :
-                                   delay >= lk->lk_slow_delay ?
-                                     lk->lk_slow_rate :
-                                     (lk->lk_slow_rate +
-                                      (lk->lk_slow_delay - delay) *
-                                      (lk->lk_fast_rate - lk->lk_slow_rate) /
-                                      (lk->lk_slow_delay - lk->lk_fast_delay)
-                                     )
-                                 );
-                       }
-
-                       nd->nd_delay = delay;
-                       nd->nd_rate = rate;
-
-                       /*
-                        * Increase the transmit credit by depositing the
-                        * current transmit rate.
-                        */
-
-                       deposit = nd->nd_tx_deposit;
-                       charge  = nd->nd_tx_charge;
-
-                       deposit += rate;
-
-                       /*
-                        * If the available transmit credit becomes too large,
-                        * reduce the deposit to correct the value.
-                        *
-                        * Too large is the max of:
-                        *              6 times the header size
-                        *              3 times the current transmit rate.
-                        */
-
-                       size = 2 * nd->nd_link.lk_header_size;
-
-                       if (size < rate)
-                               size = rate;
-
-                       size *= 3;
-
-                       excess = deposit - charge - size;
-
-                       if (excess > 0)
-                               deposit -= excess;
-
-                       nd->nd_tx_deposit = deposit;
-                       nd->nd_tx_credit  = deposit - charge;
-
-                       /*
-                        * Wake the transmit task only if the transmit credit
-                        * is at least 3 times the transmit header size.
-                        */
-
-                       size = 3 * lk->lk_header_size;
-
-                       if (nd->nd_tx_credit < size)
-                               continue;
-               }
-
-
-               /*
-                * Enable the READ select to wake the daemon if there
-                * is useful work for the drp_read routine to perform.
-                */
-
-               if (waitqueue_active(&nd->nd_tx_waitq) &&
-                   (nd->nd_tx_work != 0 ||
-                   (ulong)(jiffies - nd->nd_tx_time) >= IDLE_MAX)) {
-                       nd->nd_tx_ready = 1;
-
-                       wake_up_interruptible(&nd->nd_tx_waitq);
-
-                       /* not needed */
-                       /* nd->nd_flag &= ~ND_SELECT; */
-               }
-       }
-
-
-       /*
-        * Schedule ourself back at the nominal wakeup interval.
-        */
-       spin_lock_irqsave(&poll_data->poll_lock, lock_flags);
-
-       poll_data->node_active_count--;
-       if (poll_data->node_active_count > 0) {
-               poll_data->node_active_count++;
-               poll_time = poll_data->timer.expires +
-                       poll_data->poll_tick * HZ / 1000;
-
-               time = poll_time - jiffies;
-
-               if (time >= 2 * poll_data->poll_tick)
-                       poll_time = jiffies + dgrp_poll_tick * HZ / 1000;
-
-               poll_data->timer.expires = poll_time;
-               add_timer(&poll_data->timer);
-       }
-
-       spin_unlock_irqrestore(&poll_data->poll_lock, lock_flags);
-}
diff --git a/drivers/staging/dgrp/dgrp_ports_ops.c b/drivers/staging/dgrp/dgrp_ports_ops.c
deleted file mode 100644 (file)
index 4ce0308..0000000
+++ /dev/null
@@ -1,156 +0,0 @@
-/*
- *
- * Copyright 1999-2000 Digi International (www.digi.com)
- *     James Puzzo <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_ports_ops.c
- *
- *  Description:
- *
- *     Handle the file operations required for the /proc/dgrp/ports/...
- *     devices.  Basically gathers tty status for the node and returns it.
- *
- *  Author:
- *
- *     James A. Puzzo
- *
- */
-
-#include <linux/module.h>
-#include <linux/proc_fs.h>
-#include <linux/tty.h>
-#include <linux/sched.h>
-#include <linux/seq_file.h>
-
-#include "dgrp_common.h"
-
-/* File operation declarations */
-static int dgrp_ports_open(struct inode *, struct file *);
-
-const struct file_operations dgrp_ports_ops = {
-       .owner   = THIS_MODULE,
-       .open    = dgrp_ports_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = seq_release
-};
-
-static void *dgrp_ports_seq_start(struct seq_file *seq, loff_t *pos)
-{
-       if (*pos == 0)
-               seq_puts(seq, "#num tty_open pr_open tot_wait MSTAT  IFLAG  OFLAG  CFLAG  BPS    DIGIFLAGS\n");
-
-       return pos;
-}
-
-static void *dgrp_ports_seq_next(struct seq_file *seq, void *v, loff_t *pos)
-{
-       struct nd_struct *nd = seq->private;
-
-       if (*pos >= nd->nd_chan_count)
-               return NULL;
-
-       *pos += 1;
-
-       return pos;
-}
-
-static void dgrp_ports_seq_stop(struct seq_file *seq, void *v)
-{
-}
-
-static int dgrp_ports_seq_show(struct seq_file *seq, void *v)
-{
-       loff_t *pos = v;
-       struct nd_struct *nd;
-       struct ch_struct *ch;
-       struct un_struct *tun, *pun;
-       unsigned int totcnt;
-
-       nd = seq->private;
-       if (!nd)
-               return 0;
-
-       if (*pos >= nd->nd_chan_count)
-               return 0;
-
-       ch = &nd->nd_chan[*pos];
-       tun = &ch->ch_tun;
-       pun = &ch->ch_pun;
-
-       /*
-        * If port is not open and no one is waiting to
-        * open it, the modem signal values can't be
-        * trusted, and will be zeroed.
-        */
-       totcnt = tun->un_open_count +
-               pun->un_open_count +
-               ch->ch_wait_count[0] +
-               ch->ch_wait_count[1] +
-               ch->ch_wait_count[2];
-
-       seq_printf(seq, "%02d      %02d      %02d      %02d     0x%04X 0x%04X 0x%04X 0x%04X %-6d 0x%04X\n",
-                  (int) *pos,
-                  tun->un_open_count,
-                  pun->un_open_count,
-                  ch->ch_wait_count[0] +
-                  ch->ch_wait_count[1] +
-                  ch->ch_wait_count[2],
-                  (totcnt ? ch->ch_s_mlast : 0),
-                  ch->ch_s_iflag,
-                  ch->ch_s_oflag,
-                  ch->ch_s_cflag,
-                  (ch->ch_s_brate ? (1843200 / ch->ch_s_brate) : 0),
-                  ch->ch_digi.digi_flags);
-
-       return 0;
-}
-
-static const struct seq_operations ports_seq_ops = {
-       .start = dgrp_ports_seq_start,
-       .next  = dgrp_ports_seq_next,
-       .stop  = dgrp_ports_seq_stop,
-       .show  = dgrp_ports_seq_show,
-};
-
-/**
- * dgrp_ports_open -- open the /proc/dgrp/ports/... device
- * @inode: struct inode *
- * @file: struct file *
- *
- * Open function to open the /proc/dgrp/ports device for a PortServer.
- * This is the open function for struct file_operations
- */
-static int dgrp_ports_open(struct inode *inode, struct file *file)
-{
-       struct seq_file *seq;
-       int rtn;
-
-       rtn = seq_open(file, &ports_seq_ops);
-       if (!rtn) {
-               seq = file->private_data;
-               seq->private = PDE_DATA(inode);
-       }
-
-       return rtn;
-}
diff --git a/drivers/staging/dgrp/dgrp_specproc.c b/drivers/staging/dgrp/dgrp_specproc.c
deleted file mode 100644 (file)
index 205d80e..0000000
+++ /dev/null
@@ -1,541 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     James Puzzo  <jamesp at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_specproc.c
- *
- *  Description:
- *
- *     Handle the "config" proc entry for the linux realport device driver
- *     and provide slots for the "net" and "mon" devices
- *
- *  Author:
- *
- *     James A. Puzzo
- *
- */
-
-#include <linux/module.h>
-#include <linux/tty.h>
-#include <linux/sched.h>
-#include <linux/cred.h>
-#include <linux/proc_fs.h>
-#include <linux/slab.h>
-#include <linux/ctype.h>
-#include <linux/seq_file.h>
-#include <linux/uaccess.h>
-#include <linux/vmalloc.h>
-
-#include "dgrp_common.h"
-
-static struct proc_dir_entry *dgrp_proc_dir_entry;
-
-static int dgrp_add_id(long id);
-static int dgrp_remove_nd(struct nd_struct *nd);
-static struct proc_dir_entry *add_proc_file(struct nd_struct *node,
-                                struct proc_dir_entry *root,
-                                const struct file_operations *fops);
-
-/* File operation declarations */
-static int parse_write_config(char *);
-
-static ssize_t dgrp_config_proc_write(struct file *file,
-                                     const char __user *buffer,
-                                     size_t count, loff_t *pos);
-
-static int dgrp_nodeinfo_proc_open(struct inode *inode, struct file *file);
-static int dgrp_info_proc_open(struct inode *inode, struct file *file);
-static int dgrp_config_proc_open(struct inode *inode, struct file *file);
-
-static const struct file_operations config_proc_file_ops = {
-       .owner   = THIS_MODULE,
-       .open    = dgrp_config_proc_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = seq_release,
-       .write   = dgrp_config_proc_write,
-};
-
-static const struct file_operations info_proc_file_ops = {
-       .owner   = THIS_MODULE,
-       .open    = dgrp_info_proc_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = single_release,
-};
-
-static const struct file_operations nodeinfo_proc_file_ops = {
-       .owner   = THIS_MODULE,
-       .open    = dgrp_nodeinfo_proc_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = seq_release,
-};
-
-static struct proc_dir_entry *net_entry_pointer;
-static struct proc_dir_entry *mon_entry_pointer;
-static struct proc_dir_entry *dpa_entry_pointer;
-static struct proc_dir_entry *ports_entry_pointer;
-
-static void remove_files(struct nd_struct *nd)
-{
-       char buf[3];
-       ID_TO_CHAR(nd->nd_ID, buf);
-       dgrp_remove_node_class_sysfs_files(nd);
-       if (nd->nd_net_de)
-               remove_proc_entry(buf, net_entry_pointer);
-       if (nd->nd_mon_de)
-               remove_proc_entry(buf, mon_entry_pointer);
-       if (nd->nd_dpa_de)
-               remove_proc_entry(buf, dpa_entry_pointer);
-       if (nd->nd_ports_de)
-               remove_proc_entry(buf, ports_entry_pointer);
-}
-
-void dgrp_unregister_proc(void)
-{
-       net_entry_pointer = NULL;
-       mon_entry_pointer = NULL;
-       dpa_entry_pointer = NULL;
-       ports_entry_pointer = NULL;
-
-       if (dgrp_proc_dir_entry) {
-               struct nd_struct *nd;
-               list_for_each_entry(nd, &nd_struct_list, list)
-                       remove_files(nd);
-               remove_proc_entry("dgrp/config", NULL);
-               remove_proc_entry("dgrp/info", NULL);
-               remove_proc_entry("dgrp/nodeinfo", NULL);
-               remove_proc_entry("dgrp/net", NULL);
-               remove_proc_entry("dgrp/mon", NULL);
-               remove_proc_entry("dgrp/dpa", NULL);
-               remove_proc_entry("dgrp/ports", NULL);
-               remove_proc_entry("dgrp", NULL);
-               dgrp_proc_dir_entry = NULL;
-       }
-}
-
-void dgrp_register_proc(void)
-{
-       /*
-        *      Register /proc/dgrp
-        */
-       dgrp_proc_dir_entry = proc_mkdir("dgrp", NULL);
-       if (!dgrp_proc_dir_entry)
-               return;
-       proc_create("dgrp/config", 0644, NULL, &config_proc_file_ops);
-       proc_create("dgrp/info", 0644, NULL, &info_proc_file_ops);
-       proc_create("dgrp/nodeinfo", 0644, NULL, &nodeinfo_proc_file_ops);
-       net_entry_pointer = proc_mkdir_mode("dgrp/net", 0500, NULL);
-       mon_entry_pointer = proc_mkdir_mode("dgrp/mon", 0500, NULL);
-       dpa_entry_pointer = proc_mkdir_mode("dgrp/dpa", 0500, NULL);
-       ports_entry_pointer = proc_mkdir_mode("dgrp/ports", 0500, NULL);
-}
-
-static void *dgrp_config_proc_start(struct seq_file *m, loff_t *pos)
-{
-       return seq_list_start_head(&nd_struct_list, *pos);
-}
-
-static void *dgrp_config_proc_next(struct seq_file *p, void *v, loff_t *pos)
-{
-       return seq_list_next(v, &nd_struct_list, pos);
-}
-
-static void dgrp_config_proc_stop(struct seq_file *m, void *v)
-{
-}
-
-static int dgrp_config_proc_show(struct seq_file *m, void *v)
-{
-       struct nd_struct *nd;
-       char tmp_id[4];
-
-       if (v == &nd_struct_list) {
-               seq_puts(m, "#-----------------------------------------------------------------------------\n");
-               seq_puts(m, "#                        Avail\n");
-               seq_puts(m, "# ID  Major  State       Ports\n");
-               return 0;
-       }
-
-       nd = list_entry(v, struct nd_struct, list);
-
-       ID_TO_CHAR(nd->nd_ID, tmp_id);
-
-       seq_printf(m, "  %-2.2s  %-5ld  %-10.10s  %-5d\n",
-                  tmp_id,
-                  nd->nd_major,
-                  ND_STATE_STR(nd->nd_state),
-                  nd->nd_chan_count);
-
-       return 0;
-}
-
-static const struct seq_operations proc_config_ops = {
-       .start = dgrp_config_proc_start,
-       .next  = dgrp_config_proc_next,
-       .stop  = dgrp_config_proc_stop,
-       .show  = dgrp_config_proc_show,
-};
-
-static int dgrp_config_proc_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &proc_config_ops);
-}
-
-
-/*
- *  When writing configuration information, each "record" (i.e. each
- *  write) is treated as an independent request.  See the "parse"
- *  description for more details.
- */
-static ssize_t dgrp_config_proc_write(struct file *file,
-                                     const char __user *buffer,
-                                     size_t count, loff_t *pos)
-{
-       ssize_t retval;
-       char *inbuf, *sp;
-       char *line, *ldelim;
-
-       if (count > 32768)
-               return -EINVAL;
-
-       inbuf = sp = vzalloc(count + 1);
-       if (!inbuf)
-               return -ENOMEM;
-
-       if (copy_from_user(inbuf, buffer, count)) {
-               retval = -EFAULT;
-               goto done;
-       }
-
-       inbuf[count] = 0;
-
-       ldelim = "\n";
-
-       line = strpbrk(sp, ldelim);
-       while (line) {
-               *line = 0;
-               retval = parse_write_config(sp);
-               if (retval)
-                       goto done;
-
-               sp = line + 1;
-               line = strpbrk(sp, ldelim);
-       }
-
-       retval = count;
-done:
-       vfree(inbuf);
-       return retval;
-}
-
-/*
- *  ------------------------------------------------------------------------
- *
- *  The following are the functions to parse input
- *
- *  ------------------------------------------------------------------------
- */
-static inline char *skip_past_ws(const char *str)
-{
-       while ((*str) && !isspace(*str))
-               ++str;
-
-       return skip_spaces(str);
-}
-
-static int parse_id(char **c, char *cID)
-{
-       int tmp = **c;
-
-       if (isalnum(tmp) || (tmp == '_'))
-               cID[0] = tmp;
-       else
-               return -EINVAL;
-
-       (*c)++; tmp = **c;
-
-       if (isalnum(tmp) || (tmp == '_')) {
-               cID[1] = tmp;
-               (*c)++;
-       } else
-               cID[1] = 0;
-
-       return 0;
-}
-
-static int parse_add_config(char *buf)
-{
-       char *c = buf;
-       int  retval;
-       char cID[2];
-       long ID;
-
-       c = skip_past_ws(c);
-
-       retval = parse_id(&c, cID);
-       if (retval < 0)
-               return retval;
-
-       ID = CHAR_TO_ID(cID);
-
-       c = skip_past_ws(c);
-
-       return dgrp_add_id(ID);
-}
-
-static int parse_del_config(char *buf)
-{
-       char *c = buf;
-       int  retval;
-       struct nd_struct *nd;
-       char cID[2];
-       long ID;
-       long major;
-
-       c = skip_past_ws(c);
-
-       retval = parse_id(&c, cID);
-       if (retval < 0)
-               return retval;
-
-       ID = CHAR_TO_ID(cID);
-
-       c = skip_past_ws(c);
-
-       retval = kstrtol(c, 10, &major);
-       if (retval)
-               return retval;
-
-       nd = nd_struct_get(major);
-       if (!nd)
-               return -EINVAL;
-
-       if ((nd->nd_major != major) || (nd->nd_ID != ID))
-               return -EINVAL;
-
-       return dgrp_remove_nd(nd);
-}
-
-static int parse_chg_config(char *buf)
-{
-       return -EINVAL;
-}
-
-/*
- *  The passed character buffer represents a single configuration request.
- *  If the first character is a "+", it is parsed as a request to add a
- *     PortServer
- *  If the first character is a "-", it is parsed as a request to delete a
- *     PortServer
- *  If the first character is a "*", it is parsed as a request to change a
- *     PortServer
- *  Any other character (including whitespace) causes the record to be
- *     ignored.
- */
-static int parse_write_config(char *buf)
-{
-       int retval;
-
-       switch (buf[0]) {
-       case '+':
-               retval = parse_add_config(buf);
-               break;
-       case '-':
-               retval = parse_del_config(buf);
-               break;
-       case '*':
-               retval = parse_chg_config(buf);
-               break;
-       default:
-               retval = -EINVAL;
-       }
-
-       return retval;
-}
-
-static int dgrp_info_proc_show(struct seq_file *m, void *v)
-{
-       seq_printf(m, "version: %s\n", DIGI_VERSION);
-       seq_puts(m, "register_with_sysfs: 1\n");
-       seq_printf(m, "pollrate: 0x%08x\t(%d)\n",
-                  dgrp_poll_tick, dgrp_poll_tick);
-
-       return 0;
-}
-
-static int dgrp_info_proc_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, dgrp_info_proc_show, NULL);
-}
-
-
-static void *dgrp_nodeinfo_start(struct seq_file *m, loff_t *pos)
-{
-       return seq_list_start_head(&nd_struct_list, *pos);
-}
-
-static void *dgrp_nodeinfo_next(struct seq_file *p, void *v, loff_t *pos)
-{
-       return seq_list_next(v, &nd_struct_list, pos);
-}
-
-static void dgrp_nodeinfo_stop(struct seq_file *m, void *v)
-{
-}
-
-static int dgrp_nodeinfo_show(struct seq_file *m, void *v)
-{
-       struct nd_struct *nd;
-       char hwver[8];
-       char swver[8];
-       char tmp_id[4];
-
-       if (v == &nd_struct_list) {
-               seq_puts(m, "#-----------------------------------------------------------------------------\n");
-               seq_puts(m, "#                 HW       HW   SW\n");
-               seq_puts(m, "# ID  State       Version  ID   Version  Description\n");
-               return 0;
-       }
-
-       nd = list_entry(v, struct nd_struct, list);
-
-       ID_TO_CHAR(nd->nd_ID, tmp_id);
-
-       if (nd->nd_state == NS_READY) {
-               sprintf(hwver, "%d.%d", (nd->nd_hw_ver >> 8) & 0xff,
-                       nd->nd_hw_ver & 0xff);
-               sprintf(swver, "%d.%d", (nd->nd_sw_ver >> 8) & 0xff,
-                       nd->nd_sw_ver & 0xff);
-               seq_printf(m, "  %-2.2s  %-10.10s  %-7.7s  %-3d  %-7.7s  %-35.35s\n",
-                          tmp_id,
-                          ND_STATE_STR(nd->nd_state),
-                          hwver,
-                          nd->nd_hw_id,
-                          swver,
-                          nd->nd_ps_desc);
-
-       } else {
-               seq_printf(m, "  %-2.2s  %-10.10s\n",
-                          tmp_id,
-                          ND_STATE_STR(nd->nd_state));
-       }
-
-       return 0;
-}
-
-
-static const struct seq_operations nodeinfo_ops = {
-       .start = dgrp_nodeinfo_start,
-       .next  = dgrp_nodeinfo_next,
-       .stop  = dgrp_nodeinfo_stop,
-       .show  = dgrp_nodeinfo_show,
-};
-
-static int dgrp_nodeinfo_proc_open(struct inode *inode, struct file *file)
-{
-       return seq_open(file, &nodeinfo_ops);
-}
-
-/**
- * dgrp_add_id() -- creates new nd struct and adds it to list
- * @id: id of device to add
- */
-static int dgrp_add_id(long id)
-{
-       struct nd_struct *nd;
-       int ret;
-       int i;
-
-       nd = kzalloc(sizeof(struct nd_struct), GFP_KERNEL);
-       if (!nd)
-               return -ENOMEM;
-
-       nd->nd_major = 0;
-       nd->nd_ID = id;
-
-       spin_lock_init(&nd->nd_lock);
-
-       init_waitqueue_head(&nd->nd_tx_waitq);
-       init_waitqueue_head(&nd->nd_mon_wqueue);
-       init_waitqueue_head(&nd->nd_dpa_wqueue);
-       sema_init(&nd->nd_mon_semaphore, 1);
-       sema_init(&nd->nd_net_semaphore, 1);
-       spin_lock_init(&nd->nd_dpa_lock);
-       nd->nd_state = NS_CLOSED;
-       for (i = 0; i < SEQ_MAX; i++)
-               init_waitqueue_head(&nd->nd_seq_wque[i]);
-
-       /* setup the structures to get the major number */
-       ret = dgrp_tty_init(nd);
-       if (ret)
-               goto error_out;
-
-       nd->nd_major = nd->nd_serial_ttdriver->major;
-
-       ret = nd_struct_add(nd);
-       if (ret)
-               goto error_out;
-
-       dgrp_create_node_class_sysfs_files(nd);
-       nd->nd_net_de = add_proc_file(nd, net_entry_pointer, &dgrp_net_ops);
-       nd->nd_mon_de = add_proc_file(nd, mon_entry_pointer, &dgrp_mon_ops);
-       nd->nd_dpa_de = add_proc_file(nd, dpa_entry_pointer, &dgrp_dpa_ops);
-       nd->nd_ports_de = add_proc_file(nd, ports_entry_pointer,
-                                       &dgrp_ports_ops);
-       return 0;
-
-       /* FIXME this guy should free the tty driver stored in nd and destroy
-        * all channel ports */
-error_out:
-       kfree(nd);
-       return ret;
-
-}
-
-static int dgrp_remove_nd(struct nd_struct *nd)
-{
-       int ret;
-
-       /* Check to see if the selected structure is in use */
-       if (nd->nd_tty_ref_cnt)
-               return -EBUSY;
-
-       remove_files(nd);
-
-       dgrp_tty_uninit(nd);
-
-       ret = nd_struct_del(nd);
-       if (ret)
-               return ret;
-
-       kfree(nd);
-       return 0;
-}
-
-static struct proc_dir_entry *add_proc_file(struct nd_struct *node,
-                                struct proc_dir_entry *root,
-                                const struct file_operations *fops)
-{
-       char buf[3];
-       ID_TO_CHAR(node->nd_ID, buf);
-       return proc_create_data(buf, 0600, root, fops, node);
-}
diff --git a/drivers/staging/dgrp/dgrp_sysfs.c b/drivers/staging/dgrp/dgrp_sysfs.c
deleted file mode 100644 (file)
index 2f9345f..0000000
+++ /dev/null
@@ -1,558 +0,0 @@
-/*
- * Copyright 2004 Digi International (www.digi.com)
- *      Scott H Kilau <Scott_Kilau at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-#include "dgrp_common.h"
-
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/ctype.h>
-#include <linux/string.h>
-#include <linux/serial_reg.h>
-#include <linux/pci.h>
-#include <linux/kdev_t.h>
-
-
-#define PORTSERVER_DIVIDEND 1843200
-#define SERIAL_TYPE_NORMAL      1
-#define SERIAL_TYPE_CALLOUT     2
-#define SERIAL_TYPE_XPRINT      3
-
-
-static struct class *dgrp_class;
-static struct device *dgrp_class_nodes_dev;
-static struct device *dgrp_class_global_settings_dev;
-
-
-static ssize_t dgrp_class_version_show(struct class *class,
-                                      struct class_attribute *attr, char *buf)
-{
-       return snprintf(buf, PAGE_SIZE, "%s\n", DIGI_VERSION);
-}
-static CLASS_ATTR(driver_version, 0400, dgrp_class_version_show, NULL);
-
-
-static ssize_t dgrp_class_register_with_sysfs_show(struct device *c,
-                                                  struct device_attribute *attr,
-                                                  char *buf)
-{
-       return snprintf(buf, PAGE_SIZE, "1\n");
-}
-static DEVICE_ATTR(register_with_sysfs, 0400,
-                  dgrp_class_register_with_sysfs_show, NULL);
-
-
-static ssize_t dgrp_class_pollrate_show(struct device *c,
-                                       struct device_attribute *attr,
-                                       char *buf)
-{
-       return snprintf(buf, PAGE_SIZE, "%d\n", dgrp_poll_tick);
-}
-
-static ssize_t dgrp_class_pollrate_store(struct device *c,
-                                        struct device_attribute *attr,
-                                        const char *buf, size_t count)
-{
-       if (sscanf(buf, "0x%x\n", &dgrp_poll_tick) != 1)
-               return -EINVAL;
-
-       return count;
-}
-static DEVICE_ATTR(pollrate, 0600, dgrp_class_pollrate_show,
-                  dgrp_class_pollrate_store);
-
-static struct attribute *dgrp_sysfs_global_settings_entries[] = {
-       &dev_attr_pollrate.attr,
-       &dev_attr_register_with_sysfs.attr,
-       NULL
-};
-
-
-static struct attribute_group dgrp_global_settings_attribute_group = {
-       .name = NULL,
-       .attrs = dgrp_sysfs_global_settings_entries,
-};
-
-
-
-int dgrp_create_class_sysfs_files(void)
-{
-       int ret = 0;
-       int max_majors = 1U << (32 - MINORBITS);
-
-       dgrp_class = class_create(THIS_MODULE, "digi_realport");
-       if (IS_ERR(dgrp_class))
-               return PTR_ERR(dgrp_class);
-       ret = class_create_file(dgrp_class, &class_attr_driver_version);
-       if (ret)
-               goto err_class;
-
-       dgrp_class_global_settings_dev = device_create(dgrp_class, NULL,
-               MKDEV(0, max_majors + 1), NULL, "driver_settings");
-       if (IS_ERR(dgrp_class_global_settings_dev)) {
-               ret = PTR_ERR(dgrp_class_global_settings_dev);
-               goto err_file;
-       }
-       ret = sysfs_create_group(&dgrp_class_global_settings_dev->kobj,
-               &dgrp_global_settings_attribute_group);
-       if (ret) {
-               pr_alert("%s: failed to create sysfs global settings device attributes.\n",
-                       __func__);
-               goto err_dev1;
-       }
-
-       dgrp_class_nodes_dev = device_create(dgrp_class, NULL,
-               MKDEV(0, max_majors + 2), NULL, "nodes");
-       if (IS_ERR(dgrp_class_nodes_dev)) {
-               ret = PTR_ERR(dgrp_class_nodes_dev);
-               goto err_group;
-       }
-
-       return 0;
-err_group:
-       sysfs_remove_group(&dgrp_class_global_settings_dev->kobj,
-               &dgrp_global_settings_attribute_group);
-err_dev1:
-       device_destroy(dgrp_class, MKDEV(0, max_majors + 1));
-err_file:
-       class_remove_file(dgrp_class, &class_attr_driver_version);
-err_class:
-       class_destroy(dgrp_class);
-       return ret;
-}
-
-
-void dgrp_remove_class_sysfs_files(void)
-{
-       struct nd_struct *nd;
-       int max_majors = 1U << (32 - MINORBITS);
-
-       list_for_each_entry(nd, &nd_struct_list, list)
-               dgrp_remove_node_class_sysfs_files(nd);
-
-       sysfs_remove_group(&dgrp_class_global_settings_dev->kobj,
-               &dgrp_global_settings_attribute_group);
-
-       class_remove_file(dgrp_class, &class_attr_driver_version);
-
-       device_destroy(dgrp_class, MKDEV(0, max_majors + 1));
-       device_destroy(dgrp_class, MKDEV(0, max_majors + 2));
-       class_destroy(dgrp_class);
-}
-
-static ssize_t dgrp_node_state_show(struct device *c,
-                                   struct device_attribute *attr, char *buf)
-{
-       struct nd_struct *nd;
-
-       if (!c)
-               return 0;
-       nd = dev_get_drvdata(c);
-       if (!nd)
-               return 0;
-
-       return snprintf(buf, PAGE_SIZE, "%s\n", ND_STATE_STR(nd->nd_state));
-}
-
-static DEVICE_ATTR(state, 0600, dgrp_node_state_show, NULL);
-
-static ssize_t dgrp_node_description_show(struct device *c,
-                                         struct device_attribute *attr,
-                                         char *buf)
-{
-       struct nd_struct *nd;
-
-       if (!c)
-               return 0;
-       nd = dev_get_drvdata(c);
-       if (!nd)
-               return 0;
-
-       if (nd->nd_state == NS_READY)
-               return snprintf(buf, PAGE_SIZE, "%s\n", nd->nd_ps_desc);
-       return 0;
-}
-static DEVICE_ATTR(description_info, 0600, dgrp_node_description_show, NULL);
-
-static ssize_t dgrp_node_hw_version_show(struct device *c,
-                                        struct device_attribute *attr,
-                                        char *buf)
-{
-       struct nd_struct *nd;
-
-       if (!c)
-               return 0;
-       nd = dev_get_drvdata(c);
-       if (!nd)
-               return 0;
-
-       if (nd->nd_state == NS_READY)
-               return snprintf(buf, PAGE_SIZE, "%d.%d\n",
-                               (nd->nd_hw_ver >> 8) & 0xff,
-                               nd->nd_hw_ver & 0xff);
-
-       return 0;
-}
-static DEVICE_ATTR(hw_version_info, 0600, dgrp_node_hw_version_show, NULL);
-
-static ssize_t dgrp_node_hw_id_show(struct device *c,
-                                   struct device_attribute *attr, char *buf)
-{
-       struct nd_struct *nd;
-
-       if (!c)
-               return 0;
-       nd = dev_get_drvdata(c);
-       if (!nd)
-               return 0;
-
-
-       if (nd->nd_state == NS_READY)
-               return snprintf(buf, PAGE_SIZE, "%d\n", nd->nd_hw_id);
-       return 0;
-}
-static DEVICE_ATTR(hw_id_info, 0600, dgrp_node_hw_id_show, NULL);
-
-static ssize_t dgrp_node_sw_version_show(struct device *c,
-                                        struct device_attribute *attr,
-                                        char *buf)
-{
-       struct nd_struct *nd;
-
-       if (!c)
-               return 0;
-
-       nd = dev_get_drvdata(c);
-       if (!nd)
-               return 0;
-
-       if (nd->nd_state == NS_READY)
-               return snprintf(buf, PAGE_SIZE, "%d.%d\n",
-                               (nd->nd_sw_ver >> 8) & 0xff,
-                               nd->nd_sw_ver & 0xff);
-
-       return 0;
-}
-static DEVICE_ATTR(sw_version_info, 0600, dgrp_node_sw_version_show, NULL);
-
-
-static struct attribute *dgrp_sysfs_node_entries[] = {
-       &dev_attr_state.attr,
-       &dev_attr_description_info.attr,
-       &dev_attr_hw_version_info.attr,
-       &dev_attr_hw_id_info.attr,
-       &dev_attr_sw_version_info.attr,
-       NULL
-};
-
-
-static struct attribute_group dgrp_node_attribute_group = {
-       .name = NULL,
-       .attrs = dgrp_sysfs_node_entries,
-};
-
-
-void dgrp_create_node_class_sysfs_files(struct nd_struct *nd)
-{
-       int ret;
-       char name[10];
-
-       if (nd->nd_ID)
-               ID_TO_CHAR(nd->nd_ID, name);
-       else
-               sprintf(name, "node%ld", nd->nd_major);
-
-       nd->nd_class_dev = device_create(dgrp_class, dgrp_class_nodes_dev,
-               MKDEV(0, nd->nd_major), NULL, "%s", name);
-
-       ret = sysfs_create_group(&nd->nd_class_dev->kobj,
-                                &dgrp_node_attribute_group);
-
-       if (ret) {
-               pr_alert("%s: failed to create sysfs node device attributes.\n",
-                       __func__);
-               sysfs_remove_group(&nd->nd_class_dev->kobj,
-                                  &dgrp_node_attribute_group);
-               return;
-       }
-
-       dev_set_drvdata(nd->nd_class_dev, nd);
-
-}
-
-
-void dgrp_remove_node_class_sysfs_files(struct nd_struct *nd)
-{
-       if (nd->nd_class_dev) {
-               sysfs_remove_group(&nd->nd_class_dev->kobj,
-                                  &dgrp_node_attribute_group);
-
-               device_destroy(dgrp_class, MKDEV(0, nd->nd_major));
-               nd->nd_class_dev = NULL;
-       }
-}
-
-
-
-static ssize_t dgrp_tty_state_show(struct device *d,
-                                  struct device_attribute *attr, char *buf)
-{
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-
-       return snprintf(buf, PAGE_SIZE, "%s\n",
-                       un->un_open_count ? "Open" : "Closed");
-}
-static DEVICE_ATTR(state_info, 0600, dgrp_tty_state_show, NULL);
-
-static ssize_t dgrp_tty_baud_show(struct device *d,
-                                 struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%d\n",
-               un->un_open_count ? (PORTSERVER_DIVIDEND / ch->ch_s_brate) : 0);
-}
-static DEVICE_ATTR(baud_info, 0400, dgrp_tty_baud_show, NULL);
-
-
-static ssize_t dgrp_tty_msignals_show(struct device *d,
-                                     struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-
-       if (ch->ch_open_count) {
-               return snprintf(buf, PAGE_SIZE, "%s %s %s %s %s %s\n",
-                       (ch->ch_s_mlast & DM_RTS) ? "RTS" : "",
-                       (ch->ch_s_mlast & DM_CTS) ? "CTS" : "",
-                       (ch->ch_s_mlast & DM_DTR) ? "DTR" : "",
-                       (ch->ch_s_mlast & DM_DSR) ? "DSR" : "",
-                       (ch->ch_s_mlast & DM_CD) ? "DCD" : "",
-                       (ch->ch_s_mlast & DM_RI)  ? "RI"  : "");
-       }
-       return 0;
-}
-static DEVICE_ATTR(msignals_info, 0400, dgrp_tty_msignals_show, NULL);
-
-
-static ssize_t dgrp_tty_iflag_show(struct device *d,
-                                  struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_s_iflag);
-}
-static DEVICE_ATTR(iflag_info, 0600, dgrp_tty_iflag_show, NULL);
-
-
-static ssize_t dgrp_tty_cflag_show(struct device *d,
-                                  struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_s_cflag);
-}
-static DEVICE_ATTR(cflag_info, 0600, dgrp_tty_cflag_show, NULL);
-
-
-static ssize_t dgrp_tty_oflag_show(struct device *d,
-                                  struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_s_oflag);
-}
-static DEVICE_ATTR(oflag_info, 0600, dgrp_tty_oflag_show, NULL);
-
-
-static ssize_t dgrp_tty_digi_flag_show(struct device *d,
-                                      struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%x\n", ch->ch_digi.digi_flags);
-}
-static DEVICE_ATTR(digi_flag_info, 0600, dgrp_tty_digi_flag_show, NULL);
-
-
-static ssize_t dgrp_tty_rxcount_show(struct device *d,
-                                    struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%d\n", ch->ch_rxcount);
-}
-static DEVICE_ATTR(rxcount_info, 0600, dgrp_tty_rxcount_show, NULL);
-
-
-static ssize_t dgrp_tty_txcount_show(struct device *d,
-                                    struct device_attribute *attr, char *buf)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       return snprintf(buf, PAGE_SIZE, "%d\n", ch->ch_txcount);
-}
-static DEVICE_ATTR(txcount_info, 0600, dgrp_tty_txcount_show, NULL);
-
-
-static ssize_t dgrp_tty_name_show(struct device *d,
-                                 struct device_attribute *attr, char *buf)
-{
-       struct nd_struct *nd;
-       struct ch_struct *ch;
-       struct un_struct *un;
-       char name[10];
-
-       if (!d)
-               return 0;
-       un = dev_get_drvdata(d);
-       if (!un)
-               return 0;
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-       nd = ch->ch_nd;
-       if (!nd)
-               return 0;
-
-       ID_TO_CHAR(nd->nd_ID, name);
-
-       return snprintf(buf, PAGE_SIZE, "%s%s%02d\n",
-               un->un_type == SERIAL_TYPE_XPRINT ? "pr" : "tty",
-               name, ch->ch_portnum);
-}
-static DEVICE_ATTR(custom_name, 0600, dgrp_tty_name_show, NULL);
-
-
-static struct attribute *dgrp_sysfs_tty_entries[] = {
-       &dev_attr_state_info.attr,
-       &dev_attr_baud_info.attr,
-       &dev_attr_msignals_info.attr,
-       &dev_attr_iflag_info.attr,
-       &dev_attr_cflag_info.attr,
-       &dev_attr_oflag_info.attr,
-       &dev_attr_digi_flag_info.attr,
-       &dev_attr_rxcount_info.attr,
-       &dev_attr_txcount_info.attr,
-       &dev_attr_custom_name.attr,
-       NULL
-};
-
-
-static struct attribute_group dgrp_tty_attribute_group = {
-       .name = NULL,
-       .attrs = dgrp_sysfs_tty_entries,
-};
-
-
-void dgrp_create_tty_sysfs(struct un_struct *un, struct device *c)
-{
-       int ret;
-
-       ret = sysfs_create_group(&c->kobj, &dgrp_tty_attribute_group);
-       if (ret) {
-               pr_alert("%s: failed to create sysfs tty device attributes.\n",
-                       __func__);
-               sysfs_remove_group(&c->kobj, &dgrp_tty_attribute_group);
-               return;
-       }
-
-       dev_set_drvdata(c, un);
-
-}
-
-
-void dgrp_remove_tty_sysfs(struct device *c)
-{
-       sysfs_remove_group(&c->kobj, &dgrp_tty_attribute_group);
-}
diff --git a/drivers/staging/dgrp/dgrp_tty.c b/drivers/staging/dgrp/dgrp_tty.c
deleted file mode 100644 (file)
index 30d2602..0000000
+++ /dev/null
@@ -1,3337 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     Gene Olson    <Gene_Olson at digi dot com>
- *     James Puzzo   <jamesp at digi dot com>
- *     Jeff Randall
- *     Scott Kilau   <scottk at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/*
- *
- *  Filename:
- *
- *     dgrp_tty.c
- *
- *  Description:
- *
- *     This file implements the tty driver functionality for the
- *     RealPort driver software.
- *
- *  Author:
- *
- *     James A. Puzzo
- *     Ann-Marie Westgate
- *
- */
-
-#include <linux/slab.h>
-#include <linux/tty.h>
-#include <linux/tty_flip.h>
-#include <linux/device.h>
-#include <linux/sched.h>
-#include <linux/uaccess.h>
-
-#include "dgrp_common.h"
-
-#ifndef _POSIX_VDISABLE
-#define   _POSIX_VDISABLE ('\0')
-#endif
-
-/*
- *     forward declarations
- */
-
-static void drp_param(struct ch_struct *);
-static void dgrp_tty_close(struct tty_struct *, struct file *);
-
-/* ioctl helper functions */
-static int set_modem_info(struct ch_struct *, unsigned int, unsigned int *);
-static int get_modem_info(struct ch_struct *, unsigned int *);
-static void dgrp_set_custom_speed(struct ch_struct *, int);
-static int dgrp_tty_digigetedelay(struct tty_struct *, int *);
-static int dgrp_tty_digisetedelay(struct tty_struct *, int *);
-static int dgrp_send_break(struct ch_struct *, int);
-
-static ushort  tty_to_ch_flags(struct tty_struct *, char);
-static tcflag_t ch_to_tty_flags(unsigned short, char);
-
-static void dgrp_tty_input_start(struct tty_struct *);
-static void dgrp_tty_input_stop(struct tty_struct *);
-
-static void drp_wmove(struct ch_struct *, int, void*, int);
-
-static int dgrp_tty_open(struct tty_struct *, struct file *);
-static void dgrp_tty_close(struct tty_struct *, struct file *);
-static int dgrp_tty_write(struct tty_struct *, const unsigned char *, int);
-static int dgrp_tty_write_room(struct tty_struct *);
-static void dgrp_tty_flush_buffer(struct tty_struct *);
-static int dgrp_tty_chars_in_buffer(struct tty_struct *);
-static int dgrp_tty_ioctl(struct tty_struct *, unsigned int, unsigned long);
-static void dgrp_tty_set_termios(struct tty_struct *, struct ktermios *);
-static void dgrp_tty_stop(struct tty_struct *);
-static void dgrp_tty_start(struct tty_struct *);
-static void dgrp_tty_throttle(struct tty_struct *);
-static void dgrp_tty_unthrottle(struct tty_struct *);
-static void dgrp_tty_hangup(struct tty_struct *);
-static int dgrp_tty_put_char(struct tty_struct *, unsigned char);
-static int dgrp_tty_tiocmget(struct tty_struct *);
-static int dgrp_tty_tiocmset(struct tty_struct *, unsigned int, unsigned int);
-static int dgrp_tty_send_break(struct tty_struct *, int);
-static void dgrp_tty_send_xchar(struct tty_struct *, char);
-
-/*
- *     tty defines
- */
-#define        SERIAL_TYPE_NORMAL      1
-#define        SERIAL_TYPE_CALLOUT     2
-#define        SERIAL_TYPE_XPRINT      3
-
-
-/*
- *     tty globals/statics
- */
-
-
-#define PORTSERVER_DIVIDEND    1843200
-
-/*
- *  Default transparent print information.
- */
-static struct digi_struct digi_init = {
-       .digi_flags   = DIGI_COOK,      /* Flags                        */
-       .digi_maxcps  = 100,            /* Max CPS                      */
-       .digi_maxchar = 50,             /* Max chars in print queue     */
-       .digi_bufsize = 100,            /* Printer buffer size          */
-       .digi_onlen   = 4,              /* size of printer on string    */
-       .digi_offlen  = 4,              /* size of printer off string   */
-       .digi_onstr   = "\033[5i",      /* ANSI printer on string       */
-       .digi_offstr  = "\033[4i",      /* ANSI printer off string      */
-       .digi_term    = "ansi"          /* default terminal type        */
-};
-
-/*
- *     Define a local default termios struct. All ports will be created
- *     with this termios initially.
- *
- *     This defines a raw port at 9600 baud, 8 data bits, no parity,
- *     1 stop bit.
- */
-static struct ktermios DefaultTermios = {
-       .c_iflag = (ICRNL | IXON),
-       .c_oflag = (OPOST | ONLCR),
-       .c_cflag = (B9600 | CS8 | CREAD | HUPCL | CLOCAL),
-       .c_lflag = (ISIG | ICANON | ECHO | ECHOE | ECHOK | ECHOCTL
-                   | ECHOKE | IEXTEN),
-       .c_cc    = INIT_C_CC,
-       .c_line  = 0,
-};
-
-/* Define our tty operations struct */
-static const struct tty_operations dgrp_tty_ops = {
-       .open            = dgrp_tty_open,
-       .close           = dgrp_tty_close,
-       .write           = dgrp_tty_write,
-       .write_room      = dgrp_tty_write_room,
-       .flush_buffer    = dgrp_tty_flush_buffer,
-       .chars_in_buffer = dgrp_tty_chars_in_buffer,
-       .flush_chars     = NULL,
-       .ioctl           = dgrp_tty_ioctl,
-       .set_termios     = dgrp_tty_set_termios,
-       .stop            = dgrp_tty_stop,
-       .start           = dgrp_tty_start,
-       .throttle        = dgrp_tty_throttle,
-       .unthrottle      = dgrp_tty_unthrottle,
-       .hangup          = dgrp_tty_hangup,
-       .put_char        = dgrp_tty_put_char,
-       .tiocmget        = dgrp_tty_tiocmget,
-       .tiocmset        = dgrp_tty_tiocmset,
-       .break_ctl       = dgrp_tty_send_break,
-       .send_xchar      = dgrp_tty_send_xchar
-};
-
-
-static int calc_baud_rate(struct un_struct *un)
-{
-       int i;
-       int brate;
-
-       struct baud_rates {
-               unsigned int rate;
-               unsigned int cflag;
-       };
-
-       static struct baud_rates baud_rates[] = {
-               { 921600, B921600 },
-               { 460800, B460800 },
-               { 230400, B230400 },
-               { 115200, B115200 },
-               {  57600, B57600  },
-               {  38400, B38400  },
-               {  19200, B19200  },
-               {   9600, B9600   },
-               {   4800, B4800   },
-               {   2400, B2400   },
-               {   1200, B1200   },
-               {    600, B600    },
-               {    300, B300    },
-               {    200, B200    },
-               {    150, B150    },
-               {    134, B134    },
-               {    110, B110    },
-               {     75, B75     },
-               {     50, B50     },
-               {      0, B9600  }
-       };
-
-       brate = C_BAUD(un->un_tty);
-
-       for (i = 0; baud_rates[i].rate; i++) {
-               if (baud_rates[i].cflag == brate)
-                       break;
-       }
-
-       return baud_rates[i].rate;
-}
-
-static int calc_fastbaud_rate(struct un_struct *un, struct ktermios *uts)
-{
-       int i;
-       int brate;
-
-       ulong bauds[2][16] = {
-               { /* fastbaud*/
-                       0,      57600,   76800, 115200,
-                       131657, 153600, 230400, 460800,
-                       921600, 1200,   1800,   2400,
-                       4800,   9600,   19200,  38400 },
-               { /* fastbaud & CBAUDEX */
-                       0,      57600,  115200, 230400,
-                       460800, 150,    200,    921600,
-                       600,    1200,   1800,   2400,
-                       4800,   9600,   19200,  38400 }
-       };
-
-       brate = C_BAUD(un->un_tty) & 0xff;
-
-       i = (uts->c_cflag & CBAUDEX) ? 1 : 0;
-
-
-       if ((i >= 0) && (i < 2) && (brate >= 0) && (brate < 16))
-               brate = bauds[i][brate];
-       else
-               brate = 0;
-
-       return brate;
-}
-
-/**
- * drp_param() -- send parameter values to be sent to the node
- * @ch: channel structure of port to modify
- *
- * Interprets the tty and modem changes made by an application
- * program (by examining the termios structures) and sets up
- * parameter values to be sent to the node.
- */
-static void drp_param(struct ch_struct *ch)
-{
-       struct nd_struct *nd;
-       struct un_struct *un;
-       int   brate;
-       int   mflow;
-       int   xflag;
-       int   iflag;
-       struct ktermios *tts, *pts, *uts;
-
-       nd = ch->ch_nd;
-
-       /*
-        *  If the terminal device is open, use it to set up all tty
-        *  modes and functions.  Otherwise use the printer device.
-        */
-
-       if (ch->ch_tun.un_open_count) {
-
-               un = &ch->ch_tun;
-               tts = &ch->ch_tun.un_tty->termios;
-
-               /*
-                *  If both devices are open, copy critical line
-                *  parameters from the tty device to the printer,
-                *  so that if the tty is closed, the printer will
-                *  continue without disruption.
-                */
-
-               if (ch->ch_pun.un_open_count) {
-
-                       pts = &ch->ch_pun.un_tty->termios;
-
-                       pts->c_cflag ^=
-                               (pts->c_cflag ^ tts->c_cflag) &
-                               (CBAUD  | CSIZE | CSTOPB | CREAD | PARENB |
-                                PARODD | HUPCL | CLOCAL);
-
-                       pts->c_iflag ^=
-                               (pts->c_iflag ^ tts->c_iflag) &
-                               (IGNBRK | BRKINT | IGNPAR | PARMRK | INPCK |
-                                ISTRIP | IXON   | IXANY  | IXOFF);
-
-                       pts->c_cc[VSTART] = tts->c_cc[VSTART];
-                       pts->c_cc[VSTOP] = tts->c_cc[VSTOP];
-               }
-       } else if (ch->ch_pun.un_open_count == 0) {
-               pr_warn("%s - ch_pun.un_open_count shouldn't be 0\n",
-                      __func__);
-               return;
-       } else {
-               un = &ch->ch_pun;
-       }
-
-       uts = &un->un_tty->termios;
-
-       /*
-        * Determine if FAST writes can be performed.
-        */
-
-       if ((ch->ch_digi.digi_flags & DIGI_COOK) != 0 &&
-           (ch->ch_tun.un_open_count != 0)  &&
-           !((un->un_tty)->ldisc->ops->flags & LDISC_FLAG_DEFINED) &&
-           !(L_XCASE(un->un_tty))) {
-               ch->ch_flag |= CH_FAST_WRITE;
-       } else {
-               ch->ch_flag &= ~CH_FAST_WRITE;
-       }
-
-       /*
-        *  If FAST writes can be performed, and OPOST is on in the
-        *  terminal device, do OPOST handling in the server.
-        */
-
-       if ((ch->ch_flag & CH_FAST_WRITE) &&
-             O_OPOST(un->un_tty) != 0) {
-               int oflag = tty_to_ch_flags(un->un_tty, 'o');
-
-               /* add to ch_ocook any processing flags set in the termio */
-               ch->ch_ocook |= oflag & (OF_OLCUC |
-                                        OF_ONLCR |
-                                        OF_OCRNL |
-                                        OF_ONLRET |
-                                        OF_TABDLY);
-
-               /*
-                * the hpux driver clears any flags set in ch_ocook
-                * from the termios oflag.  It is STILL reported though
-                * by a TCGETA
-                */
-
-               oflag = ch_to_tty_flags(ch->ch_ocook, 'o');
-               uts->c_oflag &= ~oflag;
-
-       } else {
-               /* clear the ch->ch_ocook flag */
-               int oflag = ch_to_tty_flags(ch->ch_ocook, 'o');
-               uts->c_oflag |= oflag;
-               ch->ch_ocook = 0;
-       }
-
-       ch->ch_oflag = ch->ch_ocook;
-
-
-       ch->ch_flag &= ~CH_FAST_READ;
-
-       /*
-        *  Generate channel flags
-        */
-
-       if (C_BAUD(un->un_tty) == B0) {
-               if (!(ch->ch_flag & CH_BAUD0)) {
-                       /* TODO : the HPUX driver flushes line */
-                       /* TODO : discipline, I assume I don't have to */
-
-                       ch->ch_tout = ch->ch_tin;
-                       ch->ch_rout = ch->ch_rin;
-
-                       ch->ch_break_time = 0;
-
-                       ch->ch_send |= RR_TX_FLUSH | RR_RX_FLUSH;
-
-                       ch->ch_mout &= ~(DM_DTR | DM_RTS);
-
-                       ch->ch_flag |= CH_BAUD0;
-               }
-       } else if (ch->ch_custom_speed) {
-               ch->ch_brate = PORTSERVER_DIVIDEND / ch->ch_custom_speed;
-
-               if (ch->ch_flag & CH_BAUD0) {
-                       ch->ch_mout |= DM_DTR | DM_RTS;
-
-                       ch->ch_flag &= ~CH_BAUD0;
-               }
-       } else {
-               /*
-                * Baud rate mapping.
-                *
-                * If FASTBAUD isn't on, we can scan the new baud rate list
-                * as required.
-                *
-                * However, if FASTBAUD is on, we must go to the old
-                * baud rate mapping that existed many many moons ago,
-                * for compatibility reasons.
-                */
-
-               if (!(ch->ch_digi.digi_flags & DIGI_FAST))
-                       brate = calc_baud_rate(un);
-               else
-                       brate = calc_fastbaud_rate(un, uts);
-
-               if (brate == 0)
-                       brate = 9600;
-
-               ch->ch_brate = PORTSERVER_DIVIDEND / brate;
-
-               if (ch->ch_flag & CH_BAUD0) {
-                       ch->ch_mout |= DM_DTR | DM_RTS;
-
-                       ch->ch_flag &= ~CH_BAUD0;
-               }
-       }
-
-       /*
-        *  Generate channel cflags from the termio.
-        */
-
-       ch->ch_cflag = tty_to_ch_flags(un->un_tty, 'c');
-
-       /*
-        *  Generate channel iflags from the termio.
-        */
-
-       iflag = (int) tty_to_ch_flags(un->un_tty, 'i');
-
-       if (START_CHAR(un->un_tty) == _POSIX_VDISABLE ||
-           STOP_CHAR(un->un_tty) == _POSIX_VDISABLE) {
-               iflag &= ~(IF_IXON | IF_IXANY | IF_IXOFF);
-       }
-
-       ch->ch_iflag = iflag;
-
-       /*
-        *  Generate flow control characters
-        */
-
-       /*
-        * From the POSIX.1 spec (7.1.2.6): "If {_POSIX_VDISABLE}
-        * is defined for the terminal device file, and the value
-        * of one of the changeable special control characters (see
-        * 7.1.1.9) is {_POSIX_VDISABLE}, that function shall be
-        * disabled, that is, no input data shall be recognized as
-        * the disabled special character."
-        *
-        * OK, so we don't ever assign S/DXB XON or XOFF to _POSIX_VDISABLE.
-        */
-
-       if (uts->c_cc[VSTART] != _POSIX_VDISABLE)
-               ch->ch_xon = uts->c_cc[VSTART];
-       if (uts->c_cc[VSTOP] != _POSIX_VDISABLE)
-               ch->ch_xoff = uts->c_cc[VSTOP];
-
-       ch->ch_lnext = (uts->c_cc[VLNEXT] == _POSIX_VDISABLE ? 0 :
-                       uts->c_cc[VLNEXT]);
-
-       /*
-        * Also, if either c_cc[START] or c_cc[STOP] is set to
-        * _POSIX_VDISABLE, we can't really do software flow
-        * control--in either direction--so we turn it off as
-        * far as S/DXB is concerned.  In essence, if you disable
-        * one, you disable the other too.
-        */
-       if ((uts->c_cc[VSTART] == _POSIX_VDISABLE) ||
-           (uts->c_cc[VSTOP] == _POSIX_VDISABLE))
-               ch->ch_iflag &= ~(IF_IXOFF | IF_IXON);
-
-       /*
-        *  Update xflags.
-        */
-
-       xflag = 0;
-
-       if (ch->ch_digi.digi_flags & DIGI_AIXON)
-               xflag = XF_XIXON;
-
-       if ((ch->ch_xxon == _POSIX_VDISABLE) ||
-           (ch->ch_xxoff == _POSIX_VDISABLE))
-               xflag &= ~XF_XIXON;
-
-       ch->ch_xflag = xflag;
-
-
-       /*
-        *  Figure effective DCD value.
-        */
-
-       if (C_CLOCAL(un->un_tty))
-               ch->ch_flag |= CH_CLOCAL;
-       else
-               ch->ch_flag &= ~CH_CLOCAL;
-
-       /*
-        *  Check modem signals
-        */
-
-       dgrp_carrier(ch);
-
-       /*
-        *  Get hardware handshake value.
-        */
-
-       mflow = 0;
-
-       if (C_CRTSCTS(un->un_tty))
-               mflow |= (DM_RTS | DM_CTS);
-
-       if (ch->ch_digi.digi_flags & RTSPACE)
-               mflow |= DM_RTS;
-
-       if (ch->ch_digi.digi_flags & DTRPACE)
-               mflow |= DM_DTR;
-
-       if (ch->ch_digi.digi_flags & CTSPACE)
-               mflow |= DM_CTS;
-
-       if (ch->ch_digi.digi_flags & DSRPACE)
-               mflow |= DM_DSR;
-
-       if (ch->ch_digi.digi_flags & DCDPACE)
-               mflow |= DM_CD;
-
-       if (ch->ch_digi.digi_flags & DIGI_RTS_TOGGLE)
-               mflow |= DM_RTS_TOGGLE;
-
-       ch->ch_mflow = mflow;
-
-       /*
-        *  Send the changes to the server.
-        */
-
-       ch->ch_flag |= CH_PARAM;
-       (ch->ch_nd)->nd_tx_work = 1;
-
-       if (waitqueue_active(&ch->ch_flag_wait))
-               wake_up_interruptible(&ch->ch_flag_wait);
-}
-
-/*
- * This function is just used as a callback for timeouts
- * waiting on the ch_sleep flag.
- */
-static void wake_up_drp_sleep_timer(unsigned long ptr)
-{
-       struct ch_struct *ch = (struct ch_struct *) ptr;
-       if (ch)
-               wake_up(&ch->ch_sleep);
-}
-
-
-/*
- * Set up our own sleep that can't be cancelled
- * until our timeout occurs.
- */
-static void drp_my_sleep(struct ch_struct *ch)
-{
-       struct timer_list drp_wakeup_timer;
-       DECLARE_WAITQUEUE(wait, current);
-
-       /*
-        * First make sure we're ready to receive the wakeup.
-        */
-
-       add_wait_queue(&ch->ch_sleep, &wait);
-       current->state = TASK_UNINTERRUPTIBLE;
-
-       /*
-        * Since we are uninterruptible, set a timer to
-        * unset the uninterruptable state in 1 second.
-        */
-
-       init_timer(&drp_wakeup_timer);
-       drp_wakeup_timer.function = wake_up_drp_sleep_timer;
-       drp_wakeup_timer.data = (unsigned long) ch;
-       drp_wakeup_timer.expires = jiffies + (1 * HZ);
-       add_timer(&drp_wakeup_timer);
-
-       schedule();
-
-       del_timer(&drp_wakeup_timer);
-
-       remove_wait_queue(&ch->ch_sleep, &wait);
-}
-
-/*
- * dgrp_tty_open()
- *
- * returns:
- *    -EBUSY    - this is a callout device and the normal device is active
- *              - there is an error in opening the tty
- *    -ENODEV   - the channel does not exist
- *    -EAGAIN   - we are in the middle of hanging up or closing
- *              - IMMEDIATE_OPEN fails
- *    -ENXIO or -EAGAIN
- *              - if the port is outside physical range
- *    -EINTR    - the open is interrupted
- *
- */
-static int dgrp_tty_open(struct tty_struct *tty, struct file *file)
-{
-       int    retval = 0;
-       struct nd_struct  *nd;
-       struct ch_struct *ch;
-       struct un_struct  *un;
-       int    port;
-       int    delay_error;
-       int    otype;
-       int    unf;
-       int    wait_carrier;
-       int    category;
-       int    counts_were_incremented = 0;
-       ulong lock_flags;
-       DECLARE_WAITQUEUE(wait, current);
-
-       /*
-        * Do some initial checks to see if the node and port exist
-        */
-
-       nd = nd_struct_get(MAJOR(tty_devnum(tty)));
-       port = PORT_NUM(MINOR(tty_devnum(tty)));
-       category = OPEN_CATEGORY(MINOR(tty_devnum(tty)));
-
-       if (!nd)
-               return -ENODEV;
-
-       if (port >= CHAN_MAX)
-               return -ENODEV;
-
-       /*
-        *  The channel exists.
-        */
-
-       ch = nd->nd_chan + port;
-
-       un = IS_PRINT(MINOR(tty_devnum(tty))) ? &ch->ch_pun : &ch->ch_tun;
-       un->un_tty = tty;
-       tty->driver_data = un;
-
-       /*
-        * If we are in the middle of hanging up,
-        * then return an error
-        */
-       if (tty_hung_up_p(file)) {
-               retval = ((un->un_flag & UN_HUP_NOTIFY) ?
-                          -EAGAIN : -ERESTARTSYS);
-               goto done;
-       }
-
-       /*
-        * If the port is in the middle of closing, then block
-        * until it is done, then try again.
-        */
-       retval = wait_event_interruptible(un->un_close_wait,
-                       ((un->un_flag & UN_CLOSING) == 0));
-
-       if (retval)
-               goto done;
-
-       /*
-        * If the port is in the middle of a reopen after a network disconnect,
-        * wait until it is done, then try again.
-        */
-       retval = wait_event_interruptible(ch->ch_flag_wait,
-                       ((ch->ch_flag & CH_PORT_GONE) == 0));
-
-       if (retval)
-               goto done;
-
-       /*
-        * If this is a callout device, then just make sure the normal
-        * device isn't being used.
-        */
-
-       if (tty->driver->subtype == SERIAL_TYPE_CALLOUT) {
-               if (un->un_flag & UN_NORMAL_ACTIVE) {
-                       retval = -EBUSY;
-                       goto done;
-               } else {
-                       un->un_flag |= UN_CALLOUT_ACTIVE;
-               }
-       }
-
-       /*
-        *  Loop waiting until the open can be successfully completed.
-        */
-
-       spin_lock_irqsave(&nd->nd_lock, lock_flags);
-
-       nd->nd_tx_work = 1;
-
-       for (;;) {
-               wait_carrier = 0;
-
-               /*
-                * Determine the open type from the flags provided.
-                */
-
-               /*
-                * If the port is not enabled, then exit
-                */
-               if (test_bit(TTY_IO_ERROR, &tty->flags)) {
-                       /* there was an error in opening the tty */
-                       if (un->un_flag & UN_CALLOUT_ACTIVE)
-                               retval = -EBUSY;
-                       else
-                               un->un_flag |= UN_NORMAL_ACTIVE;
-                       goto unlock;
-               }
-
-               if (file->f_flags & O_NONBLOCK) {
-
-                       /*
-                        * if the O_NONBLOCK is set, errors on read and write
-                        * must return -EAGAIN immediately and NOT sleep
-                        * on the waitqs.
-                        */
-                       otype = OTYPE_IMMEDIATE;
-                       delay_error = -EAGAIN;
-
-               } else if (!OPEN_WAIT_AVAIL(category) ||
-                         (file->f_flags & O_NDELAY) != 0) {
-                       otype = OTYPE_IMMEDIATE;
-                       delay_error = -EBUSY;
-
-               } else if (!OPEN_WAIT_CARRIER(category) ||
-                         ((ch->ch_digi.digi_flags & DIGI_FORCEDCD) != 0) ||
-                         C_CLOCAL(tty)) {
-                       otype = OTYPE_PERSISTENT;
-                       delay_error = 0;
-
-               } else {
-                       otype = OTYPE_INCOMING;
-                       delay_error = 0;
-               }
-
-               /*
-                * Handle port currently outside physical port range.
-                */
-
-               if (port >= nd->nd_chan_count) {
-                       if (otype == OTYPE_IMMEDIATE) {
-                               retval = (nd->nd_state == NS_READY) ?
-                                               -ENXIO : -EAGAIN;
-                               goto unlock;
-                       }
-               }
-
-               /*
-                *  Handle port not currently open.
-                */
-
-               else if (ch->ch_open_count == 0) {
-                       /*
-                        * Return an error when an Incoming Open
-                        * response indicates the port is busy.
-                        */
-
-                       if (ch->ch_open_error != 0 && otype == ch->ch_otype) {
-                               retval = (ch->ch_open_error <= 2) ?
-                                         delay_error : -ENXIO;
-                               goto unlock;
-                       }
-
-                       /*
-                        * Fail any new Immediate open if we do not have
-                        * a normal connection to the server.
-                        */
-
-                       if (nd->nd_state != NS_READY &&
-                           otype == OTYPE_IMMEDIATE) {
-                               retval = -EAGAIN;
-                               goto unlock;
-                       }
-
-                       /*
-                        * If a Realport open of the correct type has
-                        * succeeded, complete the open.
-                        */
-
-                       if (ch->ch_state == CS_READY && ch->ch_otype == otype)
-                               break;
-               }
-
-               /*
-                * Handle port already open and active as a device
-                * of same category.
-                */
-
-               else if ((ch->ch_category == category) ||
-                         IS_PRINT(MINOR(tty_devnum(tty)))) {
-                       /*
-                        * Fail if opening the device now would
-                        * violate exclusive use.
-                        */
-                       unf = ch->ch_tun.un_flag | ch->ch_pun.un_flag;
-
-                       if ((file->f_flags & O_EXCL) || (unf & UN_EXCL)) {
-                               retval = -EBUSY;
-                               goto unlock;
-                       }
-
-                       /*
-                        * If the open device is in the hangup state, all
-                        * system calls fail except close().
-                        */
-
-                       /* TODO : check on hangup_p calls */
-
-                       if (ch->ch_flag & CH_HANGUP) {
-                               retval = -ENXIO;
-                               goto unlock;
-                       }
-
-                       /*
-                        * If the port is ready, and carrier is ignored
-                        * or present, then complete the open.
-                        */
-
-                       if (ch->ch_state == CS_READY &&
-                           (otype != OTYPE_INCOMING ||
-                           ch->ch_flag & CH_VIRT_CD))
-                               break;
-
-                       wait_carrier = 1;
-               }
-
-               /*
-                *  Handle port active with a different category device.
-                */
-
-               else {
-                       if (otype == OTYPE_IMMEDIATE) {
-                               retval = delay_error;
-                               goto unlock;
-                       }
-               }
-
-               /*
-                * Wait until conditions change, then take another
-                * try at the open.
-                */
-
-               ch->ch_wait_count[otype]++;
-
-               if (wait_carrier)
-                       ch->ch_wait_carrier++;
-
-               /*
-                * Prepare the task to accept the wakeup, then
-                * release our locks and release control.
-                */
-
-               add_wait_queue(&ch->ch_flag_wait, &wait);
-               current->state = TASK_INTERRUPTIBLE;
-
-               spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-
-               /*
-                * Give up control, we'll come back if we're
-                * interrupted or are woken up.
-                */
-               schedule();
-               remove_wait_queue(&ch->ch_flag_wait, &wait);
-
-               spin_lock_irqsave(&nd->nd_lock, lock_flags);
-
-               current->state = TASK_RUNNING;
-
-               ch->ch_wait_count[otype]--;
-
-               if (wait_carrier)
-                       ch->ch_wait_carrier--;
-
-               nd->nd_tx_work = 1;
-
-               if (signal_pending(current)) {
-                       retval = -EINTR;
-                       goto unlock;
-               }
-       } /* end for(;;) */
-
-       /*
-        *  The open has succeeded.  No turning back.
-        */
-       counts_were_incremented = 1;
-       un->un_open_count++;
-       ch->ch_open_count++;
-
-       /*
-        * Initialize the channel, if it's not already open.
-        */
-
-       if (ch->ch_open_count == 1) {
-               ch->ch_flag = 0;
-               ch->ch_inwait = 0;
-               ch->ch_category = category;
-               ch->ch_pscan_state = 0;
-
-               /* TODO : find out what PS-1 bug Gene was referring to */
-               /* TODO : in the following comment. */
-
-               ch->ch_send = RR_TX_START | RR_RX_START;  /* PS-1 bug */
-
-               if (C_CLOCAL(tty) ||
-                   ch->ch_s_mlast & DM_CD ||
-                   ch->ch_digi.digi_flags & DIGI_FORCEDCD)
-                       ch->ch_flag |= CH_VIRT_CD;
-               else if (OPEN_FORCES_CARRIER(category))
-                       ch->ch_flag |= CH_VIRT_CD;
-
-       }
-
-       /*
-        *  Initialize the unit, if it is not already open.
-        */
-
-       if (un->un_open_count == 1) {
-               /*
-                *  Since all terminal options are always sticky in Linux,
-                *  we don't need the UN_STICKY flag to be handled specially.
-                */
-               /* clears all the digi flags, leaves serial flags */
-               un->un_flag &= ~UN_DIGI_MASK;
-
-               if (file->f_flags & O_EXCL)
-                       un->un_flag |= UN_EXCL;
-
-               /* TODO : include "session" and "pgrp" */
-
-               /*
-                *  In Linux, all terminal parameters are intended to be sticky.
-                *  as a result, we "remove" the code which once reset the ports
-                *  to sane values.
-                */
-
-               drp_param(ch);
-
-       }
-
-       un->un_flag |= UN_INITIALIZED;
-
-       retval = 0;
-
-unlock:
-
-       spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-
-done:
-       /*
-        * Linux does a close for every open, even failed ones!
-        */
-       if (!counts_were_incremented) {
-               un->un_open_count++;
-               ch->ch_open_count++;
-       }
-
-       if (retval)
-               dev_err(tty->dev, "tty open bad return (%i)\n", retval);
-
-       return retval;
-}
-
-
-
-
-/*
- * dgrp_tty_close() -- close function for tty_operations
- */
-static void dgrp_tty_close(struct tty_struct *tty, struct file *file)
-{
-       struct ch_struct *ch;
-       struct un_struct *un;
-       struct nd_struct *nd;
-       int     tpos;
-       int     port;
-       int     err = 0;
-       int     s = 0;
-       ulong  waketime;
-       ulong  lock_flags;
-       int sent_printer_offstr = 0;
-
-       port = PORT_NUM(MINOR(tty_devnum(tty)));
-
-       un = tty->driver_data;
-
-       if (!un)
-               return;
-
-       ch = un->un_ch;
-
-       if (!ch)
-               return;
-
-       nd = ch->ch_nd;
-
-       if (!nd)
-               return;
-
-       spin_lock_irqsave(&nd->nd_lock, lock_flags);
-
-
-       /* Used to be on channel basis, now we check on a unit basis. */
-       if (un->un_open_count != 1)
-               goto unlock;
-
-       /*
-        * OK, its the last close on the unit
-        */
-       un->un_flag |= UN_CLOSING;
-
-       /*
-        * Notify the discipline to only process XON/XOFF characters.
-        */
-       tty->closing = 1;
-
-       /*
-        * Wait for output to drain only if this is
-        * the last close against the channel
-        */
-
-       if (ch->ch_open_count == 1) {
-               /*
-                * If its the print device, we need to ensure at all costs that
-                * the offstr will fit. If it won't, flush our tbuf.
-                */
-               if (IS_PRINT(MINOR(tty_devnum(tty))) &&
-                   (((ch->ch_tout - ch->ch_tin - 1) & TBUF_MASK) <
-                   ch->ch_digi.digi_offlen))
-                       ch->ch_tin = ch->ch_tout;
-
-               /*
-                * Turn off the printer.  Don't bother checking to see if its
-                * IS_PRINT... Since this is the last close the flag is going
-                * to be cleared, so we MUST make sure the offstr gets inserted
-                * into tbuf.
-                */
-
-               if ((ch->ch_flag & CH_PRON) != 0) {
-                       drp_wmove(ch, 0, ch->ch_digi.digi_offstr,
-                                 ch->ch_digi.digi_offlen);
-                       ch->ch_flag &= ~CH_PRON;
-                       sent_printer_offstr = 1;
-               }
-       }
-
-       /*
-        *  Wait until either the output queue has drained, or we see
-        *  absolutely no progress for 15 seconds.
-        */
-
-       tpos = ch->ch_s_tpos;
-
-       waketime = jiffies + 15 * HZ;
-
-       for (;;) {
-
-               /*
-                *  Make sure the port still exists.
-                */
-
-               if (port >= nd->nd_chan_count) {
-                       err = 1;
-                       break;
-               }
-
-               if (signal_pending(current)) {
-                       err = 1;
-                       break;
-               }
-
-               /*
-                * If the port is idle (not opened on the server), we have
-                * no way of draining/flushing/closing the port on that server.
-                * So break out of loop.
-                */
-               if (ch->ch_state == CS_IDLE)
-                       break;
-
-               nd->nd_tx_work = 1;
-
-               /*
-                *  Exit if the queues for this unit are empty,
-                *  and either the other unit is still open or all
-                *  data has drained.
-                */
-
-               if ((un->un_tty)->ops->chars_in_buffer ?
-                   ((un->un_tty)->ops->chars_in_buffer)(un->un_tty) == 0 : 1) {
-
-                       /*
-                        * We don't need to wait for a buffer to drain
-                        * if the other unit is open.
-                        */
-
-                       if (ch->ch_open_count != un->un_open_count)
-                               break;
-
-                       /*
-                        *  The wait is complete when all queues are
-                        *  drained, and any break in progress is complete.
-                        */
-
-                       if (ch->ch_tin == ch->ch_tout &&
-                           ch->ch_s_tin == ch->ch_s_tpos &&
-                           (ch->ch_send & RR_TX_BREAK) == 0) {
-                               break;
-                       }
-               }
-
-               /*
-                * Flush TX data and exit the wait if NDELAY is set,
-                * or this is not a DIGI printer, and the close timeout
-                * expires.
-                */
-
-               if ((file->f_flags & (O_NDELAY | O_NONBLOCK)) ||
-                   ((long)(jiffies - waketime) >= 0 &&
-                     (ch->ch_digi.digi_flags & DIGI_PRINTER) == 0)) {
-
-                               /*
-                                * If we sent the printer off string, we cannot
-                                * flush our internal buffers, or we might lose
-                                * the offstr.
-                                */
-                               if (!sent_printer_offstr)
-                                       dgrp_tty_flush_buffer(tty);
-
-                               spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-                               tty_ldisc_flush(tty);
-                               spin_lock_irqsave(&nd->nd_lock, lock_flags);
-                               break;
-               }
-
-               /*
-                *  Otherwise take a short nap.
-                */
-
-               ch->ch_flag |= CH_DRAIN;
-
-               spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-
-               schedule_timeout_interruptible(1);
-               s = signal_pending(current);
-
-               spin_lock_irqsave(&nd->nd_lock, lock_flags);
-
-               if (s) {
-                       /*
-                        * If we had sent the printer off string, we now have
-                        * some problems.
-                        *
-                        * The system won't let us sleep since we got an error
-                        * back from sleep, presumably because the user did
-                        * a ctrl-c...
-                        * But we need to ensure that the offstr gets sent!
-                        * Thus, we have to do something else besides sleeping.
-                        * The plan:
-                        * 1) Make this task uninterruptable.
-                        * 2) Set up a timer to go off in 1 sec.
-                        * 3) Act as tho we just got out of the sleep above.
-                        *
-                        * Thankfully, in the real world, this just
-                        * never happens.
-                        */
-
-                       if (sent_printer_offstr) {
-                               spin_unlock_irqrestore(&nd->nd_lock,
-                                                      lock_flags);
-                               drp_my_sleep(ch);
-                               spin_lock_irqsave(&nd->nd_lock, lock_flags);
-                       } else {
-                               err = 1;
-                               break;
-                       }
-               }
-
-               /*
-                *  Restart the wait if any progress is seen.
-                */
-
-               if (ch->ch_s_tpos != tpos) {
-                       tpos = ch->ch_s_tpos;
-
-                       /* TODO:  this gives us timeout problems with nist ?? */
-                       waketime = jiffies + 15 * HZ;
-               }
-       }
-
-       /*
-        *  Close the line discipline
-        */
-
-       /* this is done in tty_io.c */
-       /* if ((un->un_tty)->ldisc.close)
-        *      ((un->un_tty)->ldisc.close)(un->un_tty);
-        */
-
-       /* don't do this here */
-       /* un->un_flag = 0; */
-
-       /*
-        *  Flush the receive buffer on terminal unit close only.
-        */
-
-       if (!IS_PRINT(MINOR(tty_devnum(tty))))
-               ch->ch_rout = ch->ch_rin;
-
-
-       /*
-        * Don't permit the close to happen until we get any pending
-        * sync request responses.
-        * There could be other ports depending upon the response as well.
-        *
-        * Also, don't permit the close to happen until any parameter
-        * changes have been sent out from the state machine as well.
-        * This is required because of a ditty -a race with -HUPCL
-        * We MUST make sure all channel parameters have been sent to the
-        * Portserver before sending a close.
-        */
-
-       if ((err != 1) && (ch->ch_state != CS_IDLE)) {
-               spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-               s = wait_event_interruptible(ch->ch_flag_wait,
-                       ((ch->ch_flag & (CH_WAITING_SYNC | CH_PARAM)) == 0));
-               spin_lock_irqsave(&nd->nd_lock, lock_flags);
-       }
-
-       /*
-        * Cleanup the channel if last unit open.
-        */
-
-       if (ch->ch_open_count == 1) {
-               ch->ch_flag = 0;
-               ch->ch_category = 0;
-               ch->ch_send = 0;
-               ch->ch_expect = 0;
-               ch->ch_tout = ch->ch_tin;
-               /* (un->un_tty)->device = 0; */
-
-               if (ch->ch_state == CS_READY)
-                       ch->ch_state = CS_SEND_CLOSE;
-       }
-
-       /*
-        * Send the changes to the server
-        */
-       if (ch->ch_state != CS_IDLE) {
-               ch->ch_flag |= CH_PARAM;
-               wake_up_interruptible(&ch->ch_flag_wait);
-       }
-
-       nd->nd_tx_work = 1;
-       nd->nd_tx_ready = 1;
-
-unlock:
-       tty->closing = 0;
-
-       if (ch->ch_open_count <= 0)
-               dev_info(tty->dev,
-                        "%s - unexpected value for ch->ch_open_count: %i\n",
-                        __func__, ch->ch_open_count);
-       else
-               ch->ch_open_count--;
-
-       if (un->un_open_count <= 0)
-               dev_info(tty->dev,
-                        "%s - unexpected value for un->un_open_count: %i\n",
-                        __func__, un->un_open_count);
-       else
-               un->un_open_count--;
-
-       un->un_flag &= ~(UN_NORMAL_ACTIVE | UN_CALLOUT_ACTIVE | UN_CLOSING);
-       if (waitqueue_active(&un->un_close_wait))
-               wake_up_interruptible(&un->un_close_wait);
-
-       spin_unlock_irqrestore(&nd->nd_lock, lock_flags);
-
-       return;
-
-}
-
-static void drp_wmove(struct ch_struct *ch, int from_user, void *buf, int count)
-{
-       int n;
-       int ret = 0;
-
-       ch->ch_nd->nd_tx_work = 1;
-
-       n = TBUF_MAX - ch->ch_tin;
-
-       if (count >= n) {
-               if (from_user)
-                       ret = copy_from_user(ch->ch_tbuf + ch->ch_tin,
-                                            (void __user *) buf, n);
-               else
-                       memcpy(ch->ch_tbuf + ch->ch_tin, buf, n);
-
-               buf = (char *) buf + n;
-               count -= n;
-               ch->ch_tin = 0;
-       }
-
-       if (from_user)
-               ret = copy_from_user(ch->ch_tbuf + ch->ch_tin,
-                                    (void __user *) buf, count);
-       else
-               memcpy(ch->ch_tbuf + ch->ch_tin, buf, count);
-
-       ch->ch_tin += count;
-}
-
-
-static int dgrp_calculate_txprint_bounds(struct ch_struct *ch, int space,
-                                        int *un_flag)
-{
-       clock_t tt;
-       clock_t mt;
-       unsigned short tmax = 0;
-
-       /*
-        * If the terminal device is busy, reschedule when
-        * the terminal device becomes idle.
-        */
-
-       if (ch->ch_tun.un_open_count != 0 &&
-           ch->ch_tun.un_tty->ops->chars_in_buffer &&
-           ((ch->ch_tun.un_tty->ops->chars_in_buffer)
-            (ch->ch_tun.un_tty) != 0)) {
-               *un_flag = UN_PWAIT;
-               return 0;
-       }
-
-       /*
-        * Assure that whenever there is printer data in the output
-        * buffer, there always remains enough space after it to
-        * turn the printer off.
-        */
-       space -= ch->ch_digi.digi_offlen;
-
-       if (space <= 0) {
-               *un_flag = UN_EMPTY;
-               return 0;
-       }
-
-       /*
-        * We measure printer CPS speed by incrementing
-        * ch_cpstime by (HZ / digi_maxcps) for every
-        * character we output, restricting output so
-        * that ch_cpstime never exceeds lbolt.
-        *
-        * However if output has not been done for some
-        * time, lbolt will grow to very much larger than
-        * ch_cpstime, which would allow essentially
-        * unlimited amounts of output until ch_cpstime
-        * finally caught up.   To avoid this, we adjust
-        * cps_time when necessary so the difference
-        * between lbolt and ch_cpstime never results
-        * in sending more than digi_bufsize characters.
-        *
-        * This nicely models a printer with an internal
-        * buffer of digi_bufsize characters.
-        *
-        * Get the time between lbolt and ch->ch_cpstime;
-        */
-
-       tt = jiffies - ch->ch_cpstime;
-
-       /*
-        * Compute the time required to send digi_bufsize
-        * characters.
-        */
-
-       mt = HZ * ch->ch_digi.digi_bufsize / ch->ch_digi.digi_maxcps;
-
-       /*
-        * Compute the number of characters that can be sent
-        * without violating the time constraint.   If the
-        * direct calculation of this number is bigger than
-        * digi_bufsize, limit the number to digi_bufsize,
-        * and adjust cpstime to match.
-        */
-
-       if ((clock_t)(tt + HZ) > (clock_t)(mt + HZ)) {
-               tmax = ch->ch_digi.digi_bufsize;
-               ch->ch_cpstime = jiffies - mt;
-       } else {
-               tmax = ch->ch_digi.digi_maxcps * tt / HZ;
-       }
-
-       /*
-        * If the time constraint now binds, limit the transmit
-        * count accordingly, and tentatively arrange to be
-        * rescheduled based on time.
-        */
-
-       if (tmax < space) {
-               *un_flag = UN_TIME;
-               space = tmax;
-       }
-
-       /*
-        * Compute the total number of characters we can
-        * output before the total number of characters known
-        * to be in the output queue exceeds digi_maxchar.
-        */
-
-       tmax = (ch->ch_digi.digi_maxchar -
-               ((ch->ch_tin - ch->ch_tout) & TBUF_MASK) -
-               ((ch->ch_s_tin - ch->ch_s_tpos) & 0xffff));
-
-
-       /*
-        * If the digi_maxchar constraint now holds, limit
-        * the transmit count accordingly, and arrange to
-        * be rescheduled when the queue becomes empty.
-        */
-
-       if (space > tmax) {
-               *un_flag = UN_EMPTY;
-               space = tmax;
-       }
-
-       if (space <= 0)
-               *un_flag |= UN_EMPTY;
-
-       return space;
-}
-
-
-static int dgrp_tty_write(struct tty_struct *tty,
-                         const unsigned char *buf,
-                         int count)
-{
-       struct nd_struct *nd;
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int     space;
-       int     n;
-       int     t;
-       int sendcount;
-       int un_flag;
-       ulong lock_flags;
-
-       if (tty == NULL)
-               return 0;
-
-       un = tty->driver_data;
-       if (!un)
-               return 0;
-
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-
-       nd = ch->ch_nd;
-       if (!nd)
-               return 0;
-
-       /*
-        * Ignore the request if the channel is not ready.
-        */
-       if (ch->ch_state != CS_READY)
-               return 0;
-
-       spin_lock_irqsave(&dgrp_poll_data.poll_lock, lock_flags);
-
-       /*
-        * Ignore the request if output is blocked.
-        */
-       if ((un->un_flag & (UN_EMPTY | UN_LOW | UN_TIME | UN_PWAIT)) != 0) {
-               count = 0;
-               goto out;
-       }
-
-       /*
-        * Also ignore the request if DPA has this port open,
-        * and is flow controlled on reading more data.
-        */
-       if (nd->nd_dpa_debug && nd->nd_dpa_flag & DPA_WAIT_SPACE &&
-               nd->nd_dpa_port == MINOR(tty_devnum(ch->ch_tun.un_tty))) {
-               count = 0;
-               goto out;
-       }
-
-       /*
-        *      Limit amount we will write to the amount of space
-        *      available in the channel buffer.
-        */
-       sendcount = 0;
-
-       space = (ch->ch_tout - ch->ch_tin - 1) & TBUF_MASK;
-
-       /*
-        * Handle the printer device.
-        */
-
-       un_flag = UN_LOW;
-
-       if (IS_PRINT(MINOR(tty_devnum(tty)))) {
-               clock_t tt;
-               clock_t mt;
-               unsigned short tmax = 0;
-
-               /*
-                * If the terminal device is busy, reschedule when
-                * the terminal device becomes idle.
-                */
-
-               if (ch->ch_tun.un_open_count != 0 &&
-                   ((ch->ch_tun.un_tty->ops->chars_in_buffer)
-                    (ch->ch_tun.un_tty) != 0)) {
-                       un->un_flag |= UN_PWAIT;
-                       count = 0;
-                       goto out;
-               }
-
-               /*
-                * Assure that whenever there is printer data in the output
-                * buffer, there always remains enough space after it to
-                * turn the printer off.
-                */
-               space -= ch->ch_digi.digi_offlen;
-
-               /*
-                * Output the printer on string.
-                */
-
-               if ((ch->ch_flag & CH_PRON) == 0) {
-                       space -= ch->ch_digi.digi_onlen;
-
-                       if (space < 0) {
-                               un->un_flag |= UN_EMPTY;
-                               (ch->ch_nd)->nd_tx_work = 1;
-                               count = 0;
-                               goto out;
-                       }
-
-                       drp_wmove(ch, 0, ch->ch_digi.digi_onstr,
-                               ch->ch_digi.digi_onlen);
-
-                       ch->ch_flag |= CH_PRON;
-               }
-
-               /*
-                * We measure printer CPS speed by incrementing
-                * ch_cpstime by (HZ / digi_maxcps) for every
-                * character we output, restricting output so
-                * that ch_cpstime never exceeds lbolt.
-                *
-                * However if output has not been done for some
-                * time, lbolt will grow to very much larger than
-                * ch_cpstime, which would allow essentially
-                * unlimited amounts of output until ch_cpstime
-                * finally caught up.   To avoid this, we adjust
-                * cps_time when necessary so the difference
-                * between lbolt and ch_cpstime never results
-                * in sending more than digi_bufsize characters.
-                *
-                * This nicely models a printer with an internal
-                * buffer of digi_bufsize characters.
-                *
-                * Get the time between lbolt and ch->ch_cpstime;
-                */
-
-               tt = jiffies - ch->ch_cpstime;
-
-               /*
-                * Compute the time required to send digi_bufsize
-                * characters.
-                */
-
-               mt = HZ * ch->ch_digi.digi_bufsize / ch->ch_digi.digi_maxcps;
-
-               /*
-                * Compute the number of characters that can be sent
-                * without violating the time constraint.   If the
-                * direct calculation of this number is bigger than
-                * digi_bufsize, limit the number to digi_bufsize,
-                * and adjust cpstime to match.
-                */
-
-               if ((clock_t)(tt + HZ) > (clock_t)(mt + HZ)) {
-                       tmax = ch->ch_digi.digi_bufsize;
-                       ch->ch_cpstime = jiffies - mt;
-               } else {
-                       tmax = ch->ch_digi.digi_maxcps * tt / HZ;
-               }
-
-               /*
-                * If the time constraint now binds, limit the transmit
-                * count accordingly, and tentatively arrange to be
-                * rescheduled based on time.
-                */
-
-               if (tmax < space) {
-                       space = tmax;
-                       un_flag = UN_TIME;
-               }
-
-               /*
-                * Compute the total number of characters we can
-                * output before the total number of characters known
-                * to be in the output queue exceeds digi_maxchar.
-                */
-
-               tmax = (ch->ch_digi.digi_maxchar -
-                       ((ch->ch_tin - ch->ch_tout) & TBUF_MASK) -
-                       ((ch->ch_s_tin - ch->ch_s_tpos) & 0xffff));
-
-
-               /*
-                * If the digi_maxchar constraint now holds, limit
-                * the transmit count accordingly, and arrange to
-                * be rescheduled when the queue becomes empty.
-                */
-
-               if (space > tmax) {
-                       space = tmax;
-                       un_flag = UN_EMPTY;
-               }
-
-       }
-       /*
-        * Handle the terminal device.
-        */
-       else {
-
-               /*
-                * If the printer device is on, turn it off.
-                */
-
-               if ((ch->ch_flag & CH_PRON) != 0) {
-
-                       space -= ch->ch_digi.digi_offlen;
-
-                       drp_wmove(ch, 0, ch->ch_digi.digi_offstr,
-                                 ch->ch_digi.digi_offlen);
-
-                       ch->ch_flag &= ~CH_PRON;
-               }
-       }
-
-       /*
-        *      If space is 0 and its because the ch->tbuf
-        *      is full, then Linux will handle a callback when queue
-        *      space becomes available.
-        *      tty_write returns count = 0
-        */
-
-       if (space <= 0) {
-               /* the linux tty_io.c handles this if we return 0 */
-               /* if (fp->flags & O_NONBLOCK) return -EAGAIN; */
-
-               un->un_flag |= UN_EMPTY;
-               (ch->ch_nd)->nd_tx_work = 1;
-               count = 0;
-               goto out;
-       }
-
-       count = min(count, space);
-
-       if (count > 0) {
-
-               un->un_tbusy++;
-
-               /*
-                *      Copy the buffer contents to the ch_tbuf
-                *      being careful to wrap around the circular queue
-                */
-
-               t = TBUF_MAX - ch->ch_tin;
-               n = count;
-
-               if (n >= t) {
-                       memcpy(ch->ch_tbuf + ch->ch_tin, buf, t);
-                       if (nd->nd_dpa_debug && nd->nd_dpa_port ==
-                               PORT_NUM(MINOR(tty_devnum(un->un_tty))))
-                               dgrp_dpa_data(nd, 0, (char *) buf, t);
-                       buf += t;
-                       n -= t;
-                       ch->ch_tin = 0;
-                       sendcount += n;
-               }
-
-               memcpy(ch->ch_tbuf + ch->ch_tin, buf, n);
-               if (nd->nd_dpa_debug && nd->nd_dpa_port ==
-                       PORT_NUM(MINOR(tty_devnum(un->un_tty))))
-                       dgrp_dpa_data(nd, 0, (char *) buf, n);
-               buf += n;
-               ch->ch_tin += n;
-               sendcount += n;
-
-               un->un_tbusy--;
-               (ch->ch_nd)->nd_tx_work = 1;
-               if (ch->ch_edelay != DGRP_RTIME) {
-                       (ch->ch_nd)->nd_tx_ready = 1;
-                       wake_up_interruptible(&nd->nd_tx_waitq);
-               }
-       }
-
-       ch->ch_txcount += count;
-
-       if (IS_PRINT(MINOR(tty_devnum(tty)))) {
-
-               /*
-                * Adjust ch_cpstime to account
-                * for the characters just output.
-                */
-
-               if (sendcount > 0) {
-                       int cc = HZ * sendcount + ch->ch_cpsrem;
-
-                       ch->ch_cpstime += cc / ch->ch_digi.digi_maxcps;
-                       ch->ch_cpsrem   = cc % ch->ch_digi.digi_maxcps;
-               }
-
-               /*
-                * If we are now waiting on time, schedule ourself
-                * back when we'll be able to send a block of
-                * digi_maxchar characters.
-                */
-
-               if ((un_flag & UN_TIME) != 0) {
-                       ch->ch_waketime = (ch->ch_cpstime +
-                               (ch->ch_digi.digi_maxchar * HZ /
-                               ch->ch_digi.digi_maxcps));
-               }
-       }
-
-       /*
-        * If the printer unit is waiting for completion
-        * of terminal output, get him going again.
-        */
-
-       if ((ch->ch_pun.un_flag & UN_PWAIT) != 0)
-               (ch->ch_nd)->nd_tx_work = 1;
-
-out:
-       spin_unlock_irqrestore(&dgrp_poll_data.poll_lock, lock_flags);
-
-       return count;
-}
-
-
-/*
- *     Put a character into ch->ch_buf
- *
- *     - used by the line discipline for OPOST processing
- */
-
-static int dgrp_tty_put_char(struct tty_struct *tty, unsigned char new_char)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       ulong  lock_flags;
-       int space;
-       int retval = 0;
-
-       if (tty == NULL)
-               return 0;
-
-       un = tty->driver_data;
-       if (!un)
-               return 0;
-
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-
-       if (ch->ch_state != CS_READY)
-               return 0;
-
-       spin_lock_irqsave(&dgrp_poll_data.poll_lock, lock_flags);
-
-
-       /*
-        *      If space is 0 and its because the ch->tbuf
-        *      Warn and dump the character, there isn't anything else
-        *      we can do about it.  David_Fries@digi.com
-        */
-
-       space = (ch->ch_tout - ch->ch_tin - 1) & TBUF_MASK;
-
-       un->un_tbusy++;
-
-       /*
-        * Output the printer on string if device is TXPrint.
-        */
-       if (IS_PRINT(MINOR(tty_devnum(tty))) && (ch->ch_flag & CH_PRON) == 0) {
-               if (space < ch->ch_digi.digi_onlen) {
-                       un->un_tbusy--;
-                       goto out;
-               }
-               space -= ch->ch_digi.digi_onlen;
-               drp_wmove(ch, 0, ch->ch_digi.digi_onstr,
-                         ch->ch_digi.digi_onlen);
-               ch->ch_flag |= CH_PRON;
-       }
-
-       /*
-        * Output the printer off string if device is NOT TXPrint.
-        */
-
-       if (!IS_PRINT(MINOR(tty_devnum(tty))) &&
-           ((ch->ch_flag & CH_PRON) != 0)) {
-               if (space < ch->ch_digi.digi_offlen) {
-                       un->un_tbusy--;
-                       goto out;
-               }
-
-               space -= ch->ch_digi.digi_offlen;
-               drp_wmove(ch, 0, ch->ch_digi.digi_offstr,
-                         ch->ch_digi.digi_offlen);
-               ch->ch_flag &= ~CH_PRON;
-       }
-
-       if (!space) {
-               un->un_tbusy--;
-               goto out;
-       }
-
-       /*
-        *      Copy the character to the ch_tbuf being
-        *      careful to wrap around the circular queue
-        */
-       ch->ch_tbuf[ch->ch_tin] = new_char;
-       ch->ch_tin = (1 + ch->ch_tin) & TBUF_MASK;
-
-       if (IS_PRINT(MINOR(tty_devnum(tty)))) {
-
-               /*
-                * Adjust ch_cpstime to account
-                * for the character just output.
-                */
-
-               int cc = HZ + ch->ch_cpsrem;
-
-               ch->ch_cpstime += cc / ch->ch_digi.digi_maxcps;
-               ch->ch_cpsrem   = cc % ch->ch_digi.digi_maxcps;
-
-               /*
-                * If we are now waiting on time, schedule ourself
-                * back when we'll be able to send a block of
-                * digi_maxchar characters.
-                */
-
-               ch->ch_waketime = (ch->ch_cpstime +
-                       (ch->ch_digi.digi_maxchar * HZ /
-                       ch->ch_digi.digi_maxcps));
-       }
-
-
-       un->un_tbusy--;
-       (ch->ch_nd)->nd_tx_work = 1;
-
-       retval = 1;
-out:
-       spin_unlock_irqrestore(&dgrp_poll_data.poll_lock, lock_flags);
-       return retval;
-}
-
-
-
-/*
- *     Flush TX buffer (make in == out)
- *
- *     check tty_ioctl.c  -- this is called after TCOFLUSH
- */
-static void dgrp_tty_flush_buffer(struct tty_struct *tty)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-       un = tty->driver_data;
-       if (!un)
-               return;
-
-       ch = un->un_ch;
-       if (!ch)
-               return;
-
-       ch->ch_tout = ch->ch_tin;
-       /* do NOT do this here! */
-       /* ch->ch_s_tpos = ch->ch_s_tin = 0; */
-
-       /* send the flush output command now */
-       ch->ch_send |= RR_TX_FLUSH;
-       (ch->ch_nd)->nd_tx_ready = 1;
-       (ch->ch_nd)->nd_tx_work = 1;
-       wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-
-       if (waitqueue_active(&tty->write_wait))
-               wake_up_interruptible(&tty->write_wait);
-
-       tty_wakeup(tty);
-
-}
-
-/*
- *     Return space available in Tx buffer
- *     count = ( ch->ch_tout - ch->ch_tin ) mod (TBUF_MAX - 1)
- */
-static int dgrp_tty_write_room(struct tty_struct *tty)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int     count;
-
-       if (!tty)
-               return 0;
-
-       un = tty->driver_data;
-       if (!un)
-               return 0;
-
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-
-       count = (ch->ch_tout - ch->ch_tin - 1) & TBUF_MASK;
-
-       /* We *MUST* check this, and return 0 if the Printer Unit cannot
-        * take any more data within its time constraints...  If we don't
-        * return 0 and the printer has hit it time constraint, the ld will
-        * call us back doing a put_char, which cannot be rejected!!!
-        */
-       if (IS_PRINT(MINOR(tty_devnum(tty)))) {
-               int un_flag = 0;
-               count = dgrp_calculate_txprint_bounds(ch, count, &un_flag);
-               if (count <= 0)
-                       count = 0;
-
-               ch->ch_pun.un_flag |= un_flag;
-               (ch->ch_nd)->nd_tx_work = 1;
-       }
-
-       return count;
-}
-
-/*
- *     Return number of characters that have not been transmitted yet.
- *     chars_in_buffer = ( ch->ch_tin - ch->ch_tout ) mod (TBUF_MAX - 1)
- *                     + ( ch->ch_s_tin - ch->ch_s_tout ) mod (0xffff)
- *                     = number of characters "in transit"
- *
- * Remember that sequence number math is always with a sixteen bit
- * mask, not the TBUF_MASK.
- */
-
-static int dgrp_tty_chars_in_buffer(struct tty_struct *tty)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int     count;
-       int     count1;
-
-       if (!tty)
-               return 0;
-
-       un = tty->driver_data;
-       if (!un)
-               return 0;
-
-       ch = un->un_ch;
-       if (!ch)
-               return 0;
-
-       count1 = count = (ch->ch_tin - ch->ch_tout) & TBUF_MASK;
-       count += (ch->ch_s_tin - ch->ch_s_tpos) & 0xffff;
-       /* one for tbuf, one for the PS */
-
-       /*
-        * If we are busy transmitting add 1
-        */
-       count += un->un_tbusy;
-
-       return count;
-}
-
-
-/*****************************************************************************
- *
- * Helper applications for dgrp_tty_ioctl()
- *
- *****************************************************************************
- */
-
-
-/**
- * ch_to_tty_flags() -- convert channel flags to termio flags
- * @ch_flag: Digi channel flags
- * @flagtype: type of ch_flag (iflag, oflag or cflag)
- *
- * take the channel flags of the specified type and return the
- * corresponding termio flag
- */
-static tcflag_t ch_to_tty_flags(ushort ch_flag, char flagtype)
-{
-       tcflag_t retval = 0;
-
-       switch (flagtype) {
-       case 'i':
-               retval = ((ch_flag & IF_IGNBRK) ? IGNBRK : 0)
-                    | ((ch_flag & IF_BRKINT) ? BRKINT : 0)
-                    | ((ch_flag & IF_IGNPAR) ? IGNPAR : 0)
-                    | ((ch_flag & IF_PARMRK) ? PARMRK : 0)
-                    | ((ch_flag & IF_INPCK) ? INPCK  : 0)
-                    | ((ch_flag & IF_ISTRIP) ? ISTRIP : 0)
-                    | ((ch_flag & IF_IXON) ? IXON   : 0)
-                    | ((ch_flag & IF_IXANY) ? IXANY  : 0)
-                    | ((ch_flag & IF_IXOFF) ? IXOFF  : 0);
-               break;
-
-       case 'o':
-               retval = ((ch_flag & OF_OLCUC) ? OLCUC : 0)
-                    | ((ch_flag & OF_ONLCR) ? ONLCR  : 0)
-                    | ((ch_flag & OF_OCRNL) ? OCRNL  : 0)
-                    | ((ch_flag & OF_ONOCR) ? ONOCR  : 0)
-                    | ((ch_flag & OF_ONLRET) ? ONLRET : 0)
-                 /* | ((ch_flag & OF_OTAB3) ? OFILL  : 0) */
-                    | ((ch_flag & OF_TABDLY) ? TABDLY : 0);
-               break;
-
-       case 'c':
-               retval = ((ch_flag & CF_CSTOPB) ? CSTOPB : 0)
-                    | ((ch_flag & CF_CREAD) ? CREAD  : 0)
-                    | ((ch_flag & CF_PARENB) ? PARENB : 0)
-                    | ((ch_flag & CF_PARODD) ? PARODD : 0)
-                    | ((ch_flag & CF_HUPCL) ? HUPCL  : 0);
-
-               switch (ch_flag & CF_CSIZE) {
-               case CF_CS5:
-                       retval |= CS5;
-                       break;
-               case CF_CS6:
-                       retval |= CS6;
-                       break;
-               case CF_CS7:
-                       retval |= CS7;
-                       break;
-               case CF_CS8:
-                       retval |= CS8;
-                       break;
-               default:
-                       retval |= CS8;
-                       break;
-               }
-               break;
-       case 'x':
-               break;
-       case 'l':
-               break;
-       default:
-               return 0;
-       }
-
-       return retval;
-}
-
-
-/**
- * tty_to_ch_flags() -- convert termio flags to digi channel flags
- * @tty: pointer to a TTY structure holding flag to be converted
- * @flagtype: identifies which flag (iflags, oflags, or cflags) should
- *                 be converted
- *
- * take the termio flag of the specified type and return the
- * corresponding Digi version of the flags
- */
-static ushort tty_to_ch_flags(struct tty_struct *tty, char flagtype)
-{
-       ushort retval = 0;
-       tcflag_t tflag = 0;
-
-       switch (flagtype) {
-       case 'i':
-               tflag  = tty->termios.c_iflag;
-               retval = (I_IGNBRK(tty) ? IF_IGNBRK : 0)
-                     | (I_BRKINT(tty) ? IF_BRKINT : 0)
-                     | (I_IGNPAR(tty) ? IF_IGNPAR : 0)
-                     | (I_PARMRK(tty) ? IF_PARMRK : 0)
-                     | (I_INPCK(tty)  ? IF_INPCK  : 0)
-                     | (I_ISTRIP(tty) ? IF_ISTRIP : 0)
-                     | (I_IXON(tty)   ? IF_IXON   : 0)
-                     | (I_IXANY(tty)  ? IF_IXANY  : 0)
-                     | (I_IXOFF(tty)  ? IF_IXOFF  : 0);
-               break;
-       case 'o':
-               tflag  = tty->termios.c_oflag;
-               /*
-                * If OPOST is set, then do the post processing in the
-                * firmware by setting all the processing flags on.
-                * If ~OPOST, then make sure we are not doing any
-                * output processing!!
-                */
-               if (!O_OPOST(tty))
-                       retval = 0;
-               else
-                       retval = (O_OLCUC(tty) ? OF_OLCUC : 0)
-                            | (O_ONLCR(tty)  ? OF_ONLCR  : 0)
-                            | (O_OCRNL(tty)  ? OF_OCRNL  : 0)
-                            | (O_ONOCR(tty)  ? OF_ONOCR  : 0)
-                            | (O_ONLRET(tty) ? OF_ONLRET : 0)
-                         /* | (O_OFILL(tty)  ? OF_TAB3   : 0) */
-                            | (O_TABDLY(tty) ? OF_TABDLY : 0);
-               break;
-       case 'c':
-               tflag  = tty->termios.c_cflag;
-               retval = (C_CSTOPB(tty) ? CF_CSTOPB : 0)
-                    | (C_CREAD(tty)  ? CF_CREAD  : 0)
-                    | (C_PARENB(tty) ? CF_PARENB : 0)
-                    | (C_PARODD(tty) ? CF_PARODD : 0)
-                    | (C_HUPCL(tty)  ? CF_HUPCL  : 0);
-               switch (C_CSIZE(tty)) {
-               case CS8:
-                       retval |= CF_CS8;
-                       break;
-               case CS7:
-                       retval |= CF_CS7;
-                       break;
-               case CS6:
-                       retval |= CF_CS6;
-                       break;
-               case CS5:
-                       retval |= CF_CS5;
-                       break;
-               default:
-                       retval |= CF_CS8;
-                       break;
-               }
-               break;
-       case 'x':
-               break;
-       case 'l':
-               break;
-       default:
-               return 0;
-       }
-
-       return retval;
-}
-
-
-static int dgrp_tty_send_break(struct tty_struct *tty, int msec)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int ret = -EIO;
-
-       if (!tty)
-               return ret;
-
-       un = tty->driver_data;
-       if (!un)
-               return ret;
-
-       ch = un->un_ch;
-       if (!ch)
-               return ret;
-
-       dgrp_send_break(ch, msec);
-       return 0;
-}
-
-
-/*
- * This routine sends a break character out the serial port.
- *
- * duration is in 1/1000's of a second
- */
-static int dgrp_send_break(struct ch_struct *ch, int msec)
-{
-       ulong x;
-
-       wait_event_interruptible(ch->ch_flag_wait,
-               ((ch->ch_flag & CH_TX_BREAK) == 0));
-       ch->ch_break_time += max(msec, 250);
-       ch->ch_send |= RR_TX_BREAK;
-       ch->ch_flag |= CH_TX_BREAK;
-       (ch->ch_nd)->nd_tx_work = 1;
-
-       x = (msec * HZ) / 1000;
-       wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-
-       return 0;
-}
-
-
-/*
- * Return modem signals to ld.
- */
-static int dgrp_tty_tiocmget(struct tty_struct *tty)
-{
-       unsigned int mlast;
-       struct un_struct *un = tty->driver_data;
-       struct ch_struct *ch;
-
-       if (!un)
-               return -ENODEV;
-
-       ch = un->un_ch;
-       if (!ch)
-               return -ENODEV;
-
-       mlast = ((ch->ch_s_mlast & ~(DM_RTS | DM_DTR)) |
-               (ch->ch_mout & (DM_RTS | DM_DTR)));
-
-       /* defined in /usr/include/asm/termios.h */
-       mlast =   ((mlast & DM_RTS) ? TIOCM_RTS : 0)
-               | ((mlast & DM_DTR) ? TIOCM_DTR : 0)
-               | ((mlast & DM_CD)  ? TIOCM_CAR : 0)
-               | ((mlast & DM_RI)  ? TIOCM_RNG : 0)
-               | ((mlast & DM_DSR) ? TIOCM_DSR : 0)
-               | ((mlast & DM_CTS) ? TIOCM_CTS : 0);
-
-       return mlast;
-}
-
-
-/*
- *      Set modem lines
- */
-static int dgrp_tty_tiocmset(struct tty_struct *tty,
-                            unsigned int set, unsigned int clear)
-{
-       ulong lock_flags;
-       struct un_struct *un = tty->driver_data;
-       struct ch_struct *ch;
-
-       if (!un)
-               return -ENODEV;
-
-       ch = un->un_ch;
-       if (!ch)
-               return -ENODEV;
-
-       if (set & TIOCM_RTS)
-               ch->ch_mout |= DM_RTS;
-
-       if (set & TIOCM_DTR)
-               ch->ch_mout |= DM_DTR;
-
-       if (clear & TIOCM_RTS)
-               ch->ch_mout &= ~(DM_RTS);
-
-       if (clear & TIOCM_DTR)
-               ch->ch_mout &= ~(DM_DTR);
-
-       spin_lock_irqsave(&(ch->ch_nd)->nd_lock, lock_flags);
-       ch->ch_flag |= CH_PARAM;
-       (ch->ch_nd)->nd_tx_work = 1;
-       wake_up_interruptible(&ch->ch_flag_wait);
-
-       spin_unlock_irqrestore(&(ch->ch_nd)->nd_lock, lock_flags);
-
-       return 0;
-}
-
-
-
-/*
- *      Get current modem status
- */
-static int get_modem_info(struct ch_struct *ch, unsigned int *value)
-{
-       unsigned int mlast;
-
-       mlast = ((ch->ch_s_mlast & ~(DM_RTS | DM_DTR)) |
-               (ch->ch_mout    &  (DM_RTS | DM_DTR)));
-
-       /* defined in /usr/include/asm/termios.h */
-       mlast =   ((mlast & DM_RTS) ? TIOCM_RTS : 0)
-               | ((mlast & DM_DTR) ? TIOCM_DTR : 0)
-               | ((mlast & DM_CD)  ? TIOCM_CAR : 0)
-               | ((mlast & DM_RI)  ? TIOCM_RNG : 0)
-               | ((mlast & DM_DSR) ? TIOCM_DSR : 0)
-               | ((mlast & DM_CTS) ? TIOCM_CTS : 0);
-       return put_user(mlast, (unsigned int __user *) value);
-}
-
-/*
- *      Set modem lines
- */
-static int set_modem_info(struct ch_struct *ch, unsigned int command,
-                         unsigned int *value)
-{
-       int error;
-       unsigned int arg;
-       int mval = 0;
-       ulong lock_flags;
-
-       error = access_ok(VERIFY_READ, (void __user *) value, sizeof(int));
-       if (error == 0)
-               return -EFAULT;
-
-       if (get_user(arg, (unsigned int __user *) value))
-               return -EFAULT;
-       mval |= ((arg & TIOCM_RTS) ? DM_RTS : 0)
-               | ((arg & TIOCM_DTR) ? DM_DTR : 0);
-
-       switch (command) {
-       case TIOCMBIS:  /* set flags */
-               ch->ch_mout |= mval;
-               break;
-       case TIOCMBIC:  /* clear flags */
-               ch->ch_mout &= ~mval;
-               break;
-       case TIOCMSET:
-               ch->ch_mout = mval;
-               break;
-       default:
-               return -EINVAL;
-       }
-
-       spin_lock_irqsave(&(ch->ch_nd)->nd_lock, lock_flags);
-
-       ch->ch_flag |= CH_PARAM;
-       (ch->ch_nd)->nd_tx_work = 1;
-       wake_up_interruptible(&ch->ch_flag_wait);
-
-       spin_unlock_irqrestore(&(ch->ch_nd)->nd_lock, lock_flags);
-
-       return 0;
-}
-
-
-/*
- *  Assign the custom baud rate to the channel structure
- */
-static void dgrp_set_custom_speed(struct ch_struct *ch, int newrate)
-{
-       int testdiv;
-       int testrate_high;
-       int testrate_low;
-
-       int deltahigh, deltalow;
-
-       if (newrate < 0)
-               newrate = 0;
-
-       /*
-        * Since the divisor is stored in a 16-bit integer, we make sure
-        * we don't allow any rates smaller than a 16-bit integer would allow.
-        * And of course, rates above the dividend won't fly.
-        */
-       if (newrate && newrate < ((PORTSERVER_DIVIDEND / 0xFFFF) + 1))
-               newrate = ((PORTSERVER_DIVIDEND / 0xFFFF) + 1);
-       if (newrate && newrate > PORTSERVER_DIVIDEND)
-               newrate = PORTSERVER_DIVIDEND;
-
-       while (newrate > 0) {
-               testdiv = PORTSERVER_DIVIDEND / newrate;
-
-               /*
-                * If we try to figure out what rate the PortServer would use
-                * with the test divisor, it will be either equal or higher
-                * than the requested baud rate.  If we then determine the
-                * rate with a divisor one higher, we will get the next lower
-                * supported rate below the requested.
-                */
-               testrate_high = PORTSERVER_DIVIDEND / testdiv;
-               testrate_low  = PORTSERVER_DIVIDEND / (testdiv + 1);
-
-               /*
-                * If the rate for the requested divisor is correct, just
-                * use it and be done.
-                */
-               if (testrate_high == newrate)
-                       break;
-
-               /*
-                * Otherwise, pick the rate that is closer (i.e. whichever rate
-                * has a smaller delta).
-                */
-               deltahigh = testrate_high - newrate;
-               deltalow = newrate - testrate_low;
-
-               if (deltahigh < deltalow)
-                       newrate = testrate_high;
-               else
-                       newrate = testrate_low;
-
-               break;
-       }
-
-       ch->ch_custom_speed = newrate;
-
-       drp_param(ch);
-
-       return;
-}
-
-
-/*
- # dgrp_tty_digiseta()
- *
- * Ioctl to set the information from ditty.
- *
- * NOTE: DIGI_IXON, DSRPACE, DCDPACE, and DTRPACE are unsupported.  JAR 990922
- */
-static int dgrp_tty_digiseta(struct tty_struct *tty,
-                            struct digi_struct *new_info)
-{
-       struct un_struct *un = tty->driver_data;
-       struct ch_struct *ch;
-
-       if (!un)
-               return -ENODEV;
-
-       ch = un->un_ch;
-       if (!ch)
-               return -ENODEV;
-
-       if (copy_from_user(&ch->ch_digi, (void __user *) new_info,
-                          sizeof(struct digi_struct)))
-               return -EFAULT;
-
-       if ((ch->ch_digi.digi_flags & RTSPACE) ||
-           (ch->ch_digi.digi_flags & CTSPACE))
-               tty->termios.c_cflag |= CRTSCTS;
-       else
-               tty->termios.c_cflag &= ~CRTSCTS;
-
-       if (ch->ch_digi.digi_maxcps < 1)
-               ch->ch_digi.digi_maxcps = 1;
-
-       if (ch->ch_digi.digi_maxcps > 10000)
-               ch->ch_digi.digi_maxcps = 10000;
-
-       if (ch->ch_digi.digi_bufsize < 10)
-               ch->ch_digi.digi_bufsize = 10;
-
-       if (ch->ch_digi.digi_maxchar < 1)
-               ch->ch_digi.digi_maxchar = 1;
-
-       if (ch->ch_digi.digi_maxchar > ch->ch_digi.digi_bufsize)
-               ch->ch_digi.digi_maxchar = ch->ch_digi.digi_bufsize;
-
-       if (ch->ch_digi.digi_onlen > DIGI_PLEN)
-               ch->ch_digi.digi_onlen = DIGI_PLEN;
-
-       if (ch->ch_digi.digi_offlen > DIGI_PLEN)
-               ch->ch_digi.digi_offlen = DIGI_PLEN;
-
-       /* make the changes now */
-       drp_param(ch);
-
-       return 0;
-}
-
-
-
-/*
- * dgrp_tty_digigetedelay()
- *
- * Ioctl to get the current edelay setting.
- *
- *
- *
- */
-static int dgrp_tty_digigetedelay(struct tty_struct *tty, int *retinfo)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int tmp;
-
-       if (!retinfo)
-               return -EFAULT;
-
-       if (!tty || tty->magic != TTY_MAGIC)
-               return -EFAULT;
-
-       un = tty->driver_data;
-
-       if (!un)
-               return -ENODEV;
-
-       ch = un->un_ch;
-       if (!ch)
-               return -ENODEV;
-
-       tmp = ch->ch_edelay;
-
-       if (copy_to_user((void __user *) retinfo, &tmp, sizeof(*retinfo)))
-               return -EFAULT;
-
-       return 0;
-}
-
-
-/*
- * dgrp_tty_digisetedelay()
- *
- * Ioctl to set the EDELAY setting
- *
- */
-static int dgrp_tty_digisetedelay(struct tty_struct *tty, int *new_info)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int new_digi;
-
-       if (!tty || tty->magic != TTY_MAGIC)
-               return -EFAULT;
-
-       un = tty->driver_data;
-
-       if (!un)
-               return -ENODEV;
-
-       ch = un->un_ch;
-       if (!ch)
-               return -ENODEV;
-
-       if (copy_from_user(&new_digi, (void __user *)new_info, sizeof(int)))
-               return -EFAULT;
-
-       ch->ch_edelay = new_digi;
-
-       /* make the changes now */
-       drp_param(ch);
-
-       return 0;
-}
-
-
-/*
- *     The usual assortment of ioctl's
- *
- *     note:  use tty_check_change to make sure that we are not
- *     changing the state of a terminal when we are not a process
- *     in the forground.  See tty_io.c
- *             rc = tty_check_change(tty);
- *             if (rc) return rc;
- */
-static int dgrp_tty_ioctl(struct tty_struct *tty, unsigned int cmd,
-                         unsigned long arg)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-       int rc;
-       struct digiflow_struct   dflow;
-
-       if (!tty)
-               return -ENODEV;
-
-       un = tty->driver_data;
-       if (!un)
-               return -ENODEV;
-
-       ch = un->un_ch;
-       if (!ch)
-               return -ENODEV;
-
-       switch (cmd) {
-
-       /*
-        * Here are all the standard ioctl's that we MUST implement
-        */
-
-       case TCSBRK:
-               /*
-                * TCSBRK is SVID version: non-zero arg --> no break
-                * this behaviour is exploited by tcdrain().
-                *
-                * According to POSIX.1 spec (7.2.2.1.2) breaks should be
-                * between 0.25 and 0.5 seconds
-                */
-
-               rc = tty_check_change(tty);
-               if (rc)
-                       return rc;
-               tty_wait_until_sent(tty, 0);
-
-               if (!arg)
-                       rc = dgrp_send_break(ch, 250); /* 1/4 second */
-
-               if (dgrp_tty_chars_in_buffer(tty) != 0)
-                       return -EINTR;
-
-               return 0;
-
-       case TCSBRKP:
-               /* support for POSIX tcsendbreak()
-                *
-                * According to POSIX.1 spec (7.2.2.1.2) breaks should be
-                * between 0.25 and 0.5 seconds so we'll ask for something
-                * in the middle: 0.375 seconds.
-                */
-               rc = tty_check_change(tty);
-               if (rc)
-                       return rc;
-               tty_wait_until_sent(tty, 0);
-
-               rc = dgrp_send_break(ch, arg ? arg*250 : 250);
-
-               if (dgrp_tty_chars_in_buffer(tty) != 0)
-                       return -EINTR;
-               return 0;
-
-       case TIOCSBRK:
-               rc = tty_check_change(tty);
-               if (rc)
-                       return rc;
-               tty_wait_until_sent(tty, 0);
-
-               /*
-                * RealPort doesn't support turning on a break unconditionally.
-                * The RealPort device will stop sending a break automatically
-                * after the specified time value that we send in.
-                */
-               rc = dgrp_send_break(ch, 250); /* 1/4 second */
-
-               if (dgrp_tty_chars_in_buffer(tty) != 0)
-                       return -EINTR;
-               return 0;
-
-       case TIOCCBRK:
-               /*
-                * RealPort doesn't support turning off a break unconditionally.
-                * The RealPort device will stop sending a break automatically
-                * after the specified time value that was sent when turning on
-                * the break.
-                */
-               return 0;
-
-       case TIOCMGET:
-               rc = access_ok(VERIFY_WRITE, (void __user *) arg,
-                                sizeof(unsigned int));
-               if (rc == 0)
-                       return -EFAULT;
-               return get_modem_info(ch, (unsigned int *) arg);
-
-       case TIOCMBIS:
-       case TIOCMBIC:
-       case TIOCMSET:
-               return set_modem_info(ch, cmd, (unsigned int *) arg);
-
-       /*
-        * Here are any additional ioctl's that we want to implement
-        */
-
-       case TCFLSH:
-               /*
-                * The linux tty driver doesn't have a flush
-                * input routine for the driver, assuming all backed
-                * up data is in the line disc. buffers.  However,
-                * we all know that's not the case.  Here, we
-                * act on the ioctl, but then lie and say we didn't
-                * so the line discipline will process the flush
-                * also.
-                */
-               rc = tty_check_change(tty);
-               if (rc)
-                       return rc;
-
-               switch (arg) {
-               case TCIFLUSH:
-               case TCIOFLUSH:
-                       /* only flush input if this is the only open unit */
-                       if (!IS_PRINT(MINOR(tty_devnum(tty)))) {
-                               ch->ch_rout = ch->ch_rin;
-                               ch->ch_send |= RR_RX_FLUSH;
-                               (ch->ch_nd)->nd_tx_work = 1;
-                               (ch->ch_nd)->nd_tx_ready = 1;
-                               wake_up_interruptible(
-                                       &(ch->ch_nd)->nd_tx_waitq);
-                       }
-                       if (arg == TCIFLUSH)
-                               break;
-
-               case TCOFLUSH: /* flush output, or the receive buffer */
-                       /*
-                        * This is handled in the tty_ioctl.c code
-                        * calling tty_flush_buffer
-                        */
-                       break;
-
-               default:
-                       /* POSIX.1 says return EINVAL if we got a bad arg */
-                       return -EINVAL;
-               }
-               /* pretend we didn't recognize this IOCTL */
-               return -ENOIOCTLCMD;
-
-#ifdef TIOCGETP
-       case TIOCGETP:
-#endif
-       /*****************************************
-       Linux           HPUX            Function
-       TCSETA          TCSETA          - set the termios
-       TCSETAF         TCSETAF         - wait for drain first, then set termios
-       TCSETAW         TCSETAW         - wait for drain,
-                                       flush the input queue, then set termios
-       - looking at the tty_ioctl code, these command all call our
-       tty_set_termios at the driver's end, when a TCSETA* is sent,
-       it is expecting the tty to have a termio structure,
-       NOT a termios structure.  These two structures differ in size
-       and the tty_ioctl code does a conversion before processing them both.
-       - we should treat the TCSETAW TCSETAF ioctls the same, and let
-       the tty_ioctl code do the conversion stuff.
-
-       TCSETS
-       TCSETSF         (none)
-       TCSETSW
-       - the associated tty structure has a termios structure.
-       *****************************************/
-
-       case TCGETS:
-       case TCGETA:
-               return -ENOIOCTLCMD;
-
-       case TCSETAW:
-       case TCSETAF:
-       case TCSETSF:
-       case TCSETSW:
-               /*
-                * The linux tty driver doesn't have a flush
-                * input routine for the driver, assuming all backed
-                * up data is in the line disc. buffers.  However,
-                * we all know that's not the case.  Here, we
-                * act on the ioctl, but then lie and say we didn't
-                * so the line discipline will process the flush
-                * also.
-                */
-
-               /*
-                * Also, now that we have TXPrint, we have to check
-                * if this is the TXPrint device and the terminal
-                * device is open. If so, do NOT run check_change,
-                * as the terminal device is ALWAYS the parent.
-                */
-               if (!IS_PRINT(MINOR(tty_devnum(tty))) ||
-                   !ch->ch_tun.un_open_count) {
-                       rc = tty_check_change(tty);
-                       if (rc)
-                               return rc;
-               }
-
-               /* wait for all the characters in tbuf to drain */
-               tty_wait_until_sent(tty, 0);
-
-               if ((cmd == TCSETSF) || (cmd == TCSETAF)) {
-                       /* flush the contents of the rbuf queue */
-                       /* TODO:  check if this is print device? */
-                       ch->ch_send |= RR_RX_FLUSH;
-                       (ch->ch_nd)->nd_tx_ready = 1;
-                       (ch->ch_nd)->nd_tx_work = 1;
-                       wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-                       /* do we need to do this?  just to be safe! */
-                       ch->ch_rout = ch->ch_rin;
-               }
-
-               /* pretend we didn't recognize this */
-               return -ENOIOCTLCMD;
-
-       case TCXONC:
-               /*
-                * The Linux Line Discipline (LD) would do this for us if we
-                * let it, but we have the special firmware options to do this
-                * the "right way" regardless of hardware or software flow
-                * control so we'll do it outselves instead of letting the LD
-                * do it.
-                */
-               rc = tty_check_change(tty);
-               if (rc)
-                       return rc;
-
-               switch (arg) {
-               case TCOON:
-                       dgrp_tty_start(tty);
-                       return 0;
-               case TCOOFF:
-                       dgrp_tty_stop(tty);
-                       return 0;
-               case TCION:
-                       dgrp_tty_input_start(tty);
-                       return 0;
-               case TCIOFF:
-                       dgrp_tty_input_stop(tty);
-                       return 0;
-               default:
-                       return -EINVAL;
-               }
-
-       case DIGI_GETA:
-               /* get information for ditty */
-               if (copy_to_user((struct digi_struct __user *) arg,
-                                &ch->ch_digi, sizeof(struct digi_struct)))
-                       return -EFAULT;
-               break;
-
-       case DIGI_SETAW:
-       case DIGI_SETAF:
-               /* wait for all the characters in tbuf to drain */
-               tty_wait_until_sent(tty, 0);
-
-               if (cmd == DIGI_SETAF) {
-                       /* flush the contents of the rbuf queue */
-                       /* send down a packet with RR_RX_FLUSH set */
-                       ch->ch_send |= RR_RX_FLUSH;
-                       (ch->ch_nd)->nd_tx_ready = 1;
-                       (ch->ch_nd)->nd_tx_work = 1;
-                       wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-                       /* do we need to do this?  just to be safe! */
-                       ch->ch_rout = ch->ch_rin;
-               }
-
-               /* pretend we didn't recognize this */
-               /* fall-through */
-
-       case DIGI_SETA:
-               return dgrp_tty_digiseta(tty, (struct digi_struct *) arg);
-
-       case DIGI_SEDELAY:
-               return dgrp_tty_digisetedelay(tty, (int *) arg);
-
-       case DIGI_GEDELAY:
-               return dgrp_tty_digigetedelay(tty, (int *) arg);
-
-       case DIGI_GETFLOW:
-       case DIGI_GETAFLOW:
-               if (cmd == (DIGI_GETFLOW)) {
-                       dflow.startc = tty->termios.c_cc[VSTART];
-                       dflow.stopc = tty->termios.c_cc[VSTOP];
-               } else {
-                       dflow.startc = ch->ch_xxon;
-                       dflow.stopc = ch->ch_xxoff;
-               }
-
-               if (copy_to_user((char __user *)arg, &dflow, sizeof(dflow)))
-                       return -EFAULT;
-               break;
-
-       case DIGI_SETFLOW:
-       case DIGI_SETAFLOW:
-
-               if (copy_from_user(&dflow, (char __user *)arg, sizeof(dflow)))
-                       return -EFAULT;
-
-               if (cmd == (DIGI_SETFLOW)) {
-                       tty->termios.c_cc[VSTART] = dflow.startc;
-                       tty->termios.c_cc[VSTOP] = dflow.stopc;
-               } else {
-                       ch->ch_xxon = dflow.startc;
-                       ch->ch_xxoff = dflow.stopc;
-               }
-               break;
-
-       case DIGI_GETCUSTOMBAUD:
-               if (put_user(ch->ch_custom_speed, (unsigned int __user *) arg))
-                       return -EFAULT;
-               break;
-
-       case DIGI_SETCUSTOMBAUD:
-       {
-               int new_rate;
-
-               if (get_user(new_rate, (unsigned int __user *) arg))
-                       return -EFAULT;
-               dgrp_set_custom_speed(ch, new_rate);
-
-               break;
-       }
-
-       default:
-               return -ENOIOCTLCMD;
-       }
-
-       return 0;
-}
-
-/*
- *  This routine allows the tty driver to be notified when
- *  the device's termios setting have changed.  Note that we
- *  should be prepared to accept the case where old == NULL
- *  and try to do something rational.
- *
- *  So we need to make sure that our copies of ch_oflag,
- *  ch_clag, and ch_iflag reflect the tty->termios flags.
- */
-static void dgrp_tty_set_termios(struct tty_struct *tty, struct ktermios *old)
-{
-       struct ktermios *ts;
-       struct ch_struct *ch;
-       struct un_struct *un;
-
-       /* seems silly, but we have to check all these! */
-       if (!tty)
-               return;
-
-       un = tty->driver_data;
-       if (!un)
-               return;
-
-       ts = &tty->termios;
-
-       ch = un->un_ch;
-       if (!ch)
-               return;
-
-       drp_param(ch);
-
-       /* the CLOCAL flag has just been set */
-       if (!(old->c_cflag & CLOCAL) && C_CLOCAL(tty))
-               wake_up_interruptible(&un->un_open_wait);
-}
-
-
-/*
- *     Throttle receiving data.  We just set a bit and stop reading
- *     data out of the channel buffer.  It will back up and the
- *     FEP will do whatever is necessary to stop the far end.
- */
-static void dgrp_tty_throttle(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       ch = ((struct un_struct *) tty->driver_data)->un_ch;
-       if (!ch)
-               return;
-
-       ch->ch_flag |= CH_RXSTOP;
-}
-
-
-static void dgrp_tty_unthrottle(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       ch = ((struct un_struct *) tty->driver_data)->un_ch;
-       if (!ch)
-               return;
-
-       ch->ch_flag &= ~CH_RXSTOP;
-}
-
-/*
- *     Stop the transmitter
- */
-static void dgrp_tty_stop(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       ch = ((struct un_struct *) tty->driver_data)->un_ch;
-       if (!ch)
-               return;
-
-       ch->ch_send |= RR_TX_STOP;
-       ch->ch_send &= ~RR_TX_START;
-
-       /* make the change NOW! */
-       (ch->ch_nd)->nd_tx_ready = 1;
-       if (waitqueue_active(&(ch->ch_nd)->nd_tx_waitq))
-               wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-}
-
-/*
- *     Start the transmitter
- */
-static void dgrp_tty_start(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       ch = ((struct un_struct *) tty->driver_data)->un_ch;
-       if (!ch)
-               return;
-
-       /* TODO: don't do anything if the transmitter is not stopped */
-
-       ch->ch_send |= RR_TX_START;
-       ch->ch_send &= ~RR_TX_STOP;
-
-       /* make the change NOW! */
-       (ch->ch_nd)->nd_tx_ready = 1;
-       (ch->ch_nd)->nd_tx_work = 1;
-       if (waitqueue_active(&(ch->ch_nd)->nd_tx_waitq))
-               wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-
-}
-
-/*
- *     Stop the receiver
- */
-static void dgrp_tty_input_stop(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       ch = ((struct un_struct *) tty->driver_data)->un_ch;
-       if (!ch)
-               return;
-
-       ch->ch_send |= RR_RX_STOP;
-       ch->ch_send &= ~RR_RX_START;
-       (ch->ch_nd)->nd_tx_ready = 1;
-       if (waitqueue_active(&(ch->ch_nd)->nd_tx_waitq))
-               wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-
-}
-
-
-static void dgrp_tty_send_xchar(struct tty_struct *tty, char c)
-{
-       struct un_struct *un;
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       un = tty->driver_data;
-       if (!un)
-               return;
-
-       ch = un->un_ch;
-       if (!ch)
-               return;
-       if (c == STOP_CHAR(tty))
-               ch->ch_send |= RR_RX_STOP;
-       else if (c == START_CHAR(tty))
-               ch->ch_send |= RR_RX_START;
-
-       ch->ch_nd->nd_tx_ready = 1;
-       ch->ch_nd->nd_tx_work = 1;
-
-       return;
-}
-
-
-static void dgrp_tty_input_start(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-
-       if (!tty)
-               return;
-
-       ch = ((struct un_struct *) tty->driver_data)->un_ch;
-       if (!ch)
-               return;
-
-       ch->ch_send |= RR_RX_START;
-       ch->ch_send &= ~RR_RX_STOP;
-       (ch->ch_nd)->nd_tx_ready = 1;
-       (ch->ch_nd)->nd_tx_work = 1;
-       if (waitqueue_active(&(ch->ch_nd)->nd_tx_waitq))
-               wake_up_interruptible(&(ch->ch_nd)->nd_tx_waitq);
-
-}
-
-
-/*
- *     Hangup the port.  Like a close, but don't wait for output
- *     to drain.
- *
- *     How do we close all the channels that are open?
- */
-static void dgrp_tty_hangup(struct tty_struct *tty)
-{
-       struct ch_struct *ch;
-       struct nd_struct *nd;
-       struct un_struct *un;
-
-       if (!tty)
-               return;
-
-       un = tty->driver_data;
-       if (!un)
-               return;
-
-       ch = un->un_ch;
-       if (!ch)
-               return;
-
-       nd = ch->ch_nd;
-
-       if (C_HUPCL(tty)) {
-               /* LOWER DTR */
-               ch->ch_mout &= ~DM_DTR;
-               /* Don't do this here */
-               /* ch->ch_flag |= CH_HANGUP; */
-               ch->ch_nd->nd_tx_ready = 1;
-               ch->ch_nd->nd_tx_work  = 1;
-               if (waitqueue_active(&ch->ch_flag_wait))
-                       wake_up_interruptible(&ch->ch_flag_wait);
-       }
-
-}
-
-/************************************************************************/
-/*                                                                      */
-/*       TTY Initialization/Cleanup Functions                           */
-/*                                                                      */
-/************************************************************************/
-
-/*
- *     Uninitialize the TTY portion of the supplied node.  Free all
- *      memory and resources associated with this node.  Do it in reverse
- *      allocation order: this might possibly result in less fragmentation
- *      of memory, though I don't know this for sure.
- */
-void
-dgrp_tty_uninit(struct nd_struct *nd)
-{
-       unsigned int i;
-       char id[3];
-
-       ID_TO_CHAR(nd->nd_ID, id);
-
-       if (nd->nd_ttdriver_flags & SERIAL_TTDRV_REG) {
-               tty_unregister_driver(nd->nd_serial_ttdriver);
-
-               kfree(nd->nd_serial_ttdriver->ttys);
-               nd->nd_serial_ttdriver->ttys = NULL;
-
-               put_tty_driver(nd->nd_serial_ttdriver);
-               nd->nd_ttdriver_flags &= ~SERIAL_TTDRV_REG;
-       }
-
-       if (nd->nd_ttdriver_flags & CALLOUT_TTDRV_REG) {
-               tty_unregister_driver(nd->nd_callout_ttdriver);
-
-               kfree(nd->nd_callout_ttdriver->ttys);
-               nd->nd_callout_ttdriver->ttys = NULL;
-
-               put_tty_driver(nd->nd_callout_ttdriver);
-               nd->nd_ttdriver_flags &= ~CALLOUT_TTDRV_REG;
-       }
-
-       if (nd->nd_ttdriver_flags & XPRINT_TTDRV_REG) {
-               tty_unregister_driver(nd->nd_xprint_ttdriver);
-
-               kfree(nd->nd_xprint_ttdriver->ttys);
-               nd->nd_xprint_ttdriver->ttys = NULL;
-
-               put_tty_driver(nd->nd_xprint_ttdriver);
-               nd->nd_ttdriver_flags &= ~XPRINT_TTDRV_REG;
-       }
-       for (i = 0; i < CHAN_MAX; i++)
-               tty_port_destroy(&nd->nd_chan[i].port);
-}
-
-
-
-/*
- *     Initialize the TTY portion of the supplied node.
- */
-int
-dgrp_tty_init(struct nd_struct *nd)
-{
-       char id[3];
-       int  rc;
-       int  i;
-
-       ID_TO_CHAR(nd->nd_ID, id);
-
-       /*
-        *  Initialize the TTDRIVER structures.
-        */
-
-       nd->nd_serial_ttdriver = alloc_tty_driver(CHAN_MAX);
-       if (!nd->nd_serial_ttdriver)
-               return -ENOMEM;
-
-       sprintf(nd->nd_serial_name,  "tty_dgrp_%s_", id);
-
-       nd->nd_serial_ttdriver->owner = THIS_MODULE;
-       nd->nd_serial_ttdriver->name = nd->nd_serial_name;
-       nd->nd_serial_ttdriver->name_base = 0;
-       nd->nd_serial_ttdriver->major = 0;
-       nd->nd_serial_ttdriver->minor_start = 0;
-       nd->nd_serial_ttdriver->type = TTY_DRIVER_TYPE_SERIAL;
-       nd->nd_serial_ttdriver->subtype = SERIAL_TYPE_NORMAL;
-       nd->nd_serial_ttdriver->init_termios = DefaultTermios;
-       nd->nd_serial_ttdriver->driver_name = "dgrp";
-       nd->nd_serial_ttdriver->flags = (TTY_DRIVER_REAL_RAW |
-                                        TTY_DRIVER_DYNAMIC_DEV |
-                                        TTY_DRIVER_HARDWARE_BREAK);
-
-       /* The kernel wants space to store pointers to tty_structs. */
-       nd->nd_serial_ttdriver->ttys =
-               kzalloc(CHAN_MAX * sizeof(struct tty_struct *), GFP_KERNEL);
-       if (!nd->nd_serial_ttdriver->ttys)
-               return -ENOMEM;
-
-       tty_set_operations(nd->nd_serial_ttdriver, &dgrp_tty_ops);
-
-       if (!(nd->nd_ttdriver_flags & SERIAL_TTDRV_REG)) {
-               /*
-                *   Register tty devices
-                */
-               rc = tty_register_driver(nd->nd_serial_ttdriver);
-               if (rc < 0) {
-                       /*
-                        * If errno is EBUSY, this means there are no more
-                        * slots available to have us auto-majored.
-                        * (Which is currently supported up to 256)
-                        *
-                        * We can still request majors above 256,
-                        * we just have to do it manually.
-                        */
-                       if (rc == -EBUSY) {
-                               int i;
-                               int max_majors = 1U << (32 - MINORBITS);
-                               for (i = 256; i < max_majors; i++) {
-                                       nd->nd_serial_ttdriver->major = i;
-                                       rc = tty_register_driver
-                                               (nd->nd_serial_ttdriver);
-                                       if (rc >= 0)
-                                               break;
-                               }
-                               /* Really fail now, since we ran out
-                                * of majors to try. */
-                               if (i == max_majors)
-                                       return rc;
-
-                       } else {
-                               return rc;
-                       }
-               }
-               nd->nd_ttdriver_flags |= SERIAL_TTDRV_REG;
-       }
-
-       nd->nd_callout_ttdriver = alloc_tty_driver(CHAN_MAX);
-       if (!nd->nd_callout_ttdriver)
-               return -ENOMEM;
-
-       sprintf(nd->nd_callout_name, "cu_dgrp_%s_",  id);
-
-       nd->nd_callout_ttdriver->owner = THIS_MODULE;
-       nd->nd_callout_ttdriver->name = nd->nd_callout_name;
-       nd->nd_callout_ttdriver->name_base = 0;
-       nd->nd_callout_ttdriver->major = nd->nd_serial_ttdriver->major;
-       nd->nd_callout_ttdriver->minor_start = 0x40;
-       nd->nd_callout_ttdriver->type = TTY_DRIVER_TYPE_SERIAL;
-       nd->nd_callout_ttdriver->subtype = SERIAL_TYPE_CALLOUT;
-       nd->nd_callout_ttdriver->init_termios = DefaultTermios;
-       nd->nd_callout_ttdriver->driver_name = "dgrp";
-       nd->nd_callout_ttdriver->flags = (TTY_DRIVER_REAL_RAW |
-                                         TTY_DRIVER_DYNAMIC_DEV |
-                                         TTY_DRIVER_HARDWARE_BREAK);
-
-       /* The kernel wants space to store pointers to tty_structs. */
-       nd->nd_callout_ttdriver->ttys =
-               kzalloc(CHAN_MAX * sizeof(struct tty_struct *), GFP_KERNEL);
-       if (!nd->nd_callout_ttdriver->ttys)
-               return -ENOMEM;
-
-       tty_set_operations(nd->nd_callout_ttdriver, &dgrp_tty_ops);
-
-       if (dgrp_register_cudevices) {
-               if (!(nd->nd_ttdriver_flags & CALLOUT_TTDRV_REG)) {
-                       /*
-                        *   Register cu devices
-                        */
-                       rc = tty_register_driver(nd->nd_callout_ttdriver);
-                       if (rc < 0)
-                               return rc;
-                       nd->nd_ttdriver_flags |= CALLOUT_TTDRV_REG;
-               }
-       }
-
-
-       nd->nd_xprint_ttdriver = alloc_tty_driver(CHAN_MAX);
-       if (!nd->nd_xprint_ttdriver)
-               return -ENOMEM;
-
-       sprintf(nd->nd_xprint_name,  "pr_dgrp_%s_", id);
-
-       nd->nd_xprint_ttdriver->owner = THIS_MODULE;
-       nd->nd_xprint_ttdriver->name = nd->nd_xprint_name;
-       nd->nd_xprint_ttdriver->name_base = 0;
-       nd->nd_xprint_ttdriver->major = nd->nd_serial_ttdriver->major;
-       nd->nd_xprint_ttdriver->minor_start = 0x80;
-       nd->nd_xprint_ttdriver->type = TTY_DRIVER_TYPE_SERIAL;
-       nd->nd_xprint_ttdriver->subtype = SERIAL_TYPE_XPRINT;
-       nd->nd_xprint_ttdriver->init_termios = DefaultTermios;
-       nd->nd_xprint_ttdriver->driver_name = "dgrp";
-       nd->nd_xprint_ttdriver->flags = (TTY_DRIVER_REAL_RAW |
-                                        TTY_DRIVER_DYNAMIC_DEV |
-                                        TTY_DRIVER_HARDWARE_BREAK);
-
-       /* The kernel wants space to store pointers to tty_structs. */
-       nd->nd_xprint_ttdriver->ttys =
-               kzalloc(CHAN_MAX * sizeof(struct tty_struct *), GFP_KERNEL);
-       if (!nd->nd_xprint_ttdriver->ttys)
-               return -ENOMEM;
-
-       tty_set_operations(nd->nd_xprint_ttdriver, &dgrp_tty_ops);
-
-       if (dgrp_register_prdevices) {
-               if (!(nd->nd_ttdriver_flags & XPRINT_TTDRV_REG)) {
-                       /*
-                        *   Register transparent print devices
-                        */
-                       rc = tty_register_driver(nd->nd_xprint_ttdriver);
-                       if (rc < 0)
-                               return rc;
-                       nd->nd_ttdriver_flags |= XPRINT_TTDRV_REG;
-               }
-       }
-
-       for (i = 0; i < CHAN_MAX; i++) {
-               struct ch_struct *ch = nd->nd_chan + i;
-
-               ch->ch_nd = nd;
-               ch->ch_digi = digi_init;
-               ch->ch_edelay = 100;
-               ch->ch_custom_speed = 0;
-               ch->ch_portnum = i;
-               ch->ch_tun.un_ch = ch;
-               ch->ch_pun.un_ch = ch;
-               ch->ch_tun.un_type = SERIAL_TYPE_NORMAL;
-               ch->ch_pun.un_type = SERIAL_TYPE_XPRINT;
-
-               init_waitqueue_head(&(ch->ch_flag_wait));
-               init_waitqueue_head(&(ch->ch_sleep));
-
-               init_waitqueue_head(&(ch->ch_tun.un_open_wait));
-               init_waitqueue_head(&(ch->ch_tun.un_close_wait));
-
-               init_waitqueue_head(&(ch->ch_pun.un_open_wait));
-               init_waitqueue_head(&(ch->ch_pun.un_close_wait));
-               tty_port_init(&ch->port);
-       }
-       return 0;
-}
diff --git a/drivers/staging/dgrp/digirp.h b/drivers/staging/dgrp/digirp.h
deleted file mode 100644 (file)
index 33c1394..0000000
+++ /dev/null
@@ -1,129 +0,0 @@
-/************************************************************************
- * HP-UX Realport Daemon interface file.
- *
- * Copyright (C) 1998, by Digi International.  All Rights Reserved.
- ************************************************************************/
-
-#ifndef _DIGIDRP_H
-#define _DIGIDRP_H
-
-/************************************************************************
- * This file contains defines for the ioctl() interface to
- * the realport driver.   This ioctl() interface is used by the
- * daemon to set speed setup parameters honored by the driver.
- ************************************************************************/
-
-struct link_struct {
-       int lk_fast_rate;  /* Fast line rate to be used
-                             when the delay is less-equal
-                             to lk_fast_delay */
-
-       int lk_fast_delay; /* Fast line rate delay in
-                             milliseconds */
-
-       int lk_slow_rate;  /* Slow line rate to be used when
-                             the delay is greater-equal
-                             to lk_slow_delay */
-
-       int lk_slow_delay; /* Slow line rate delay in
-                             milliseconds */
-
-       int lk_header_size; /* Estimated packet header size
-                              when sent across the slowest
-                              link.  */
-};
-
-#define DIGI_GETLINK   _IOW('e', 103, struct link_struct)      /* Get link parameters */
-#define DIGI_SETLINK   _IOW('e', 104, struct link_struct)      /* Set link parameters */
-
-
-/************************************************************************
- * This module provides application access to special Digi
- * serial line enhancements which are not standard UNIX(tm) features.
- ************************************************************************/
-
-struct digiflow_struct {
-       unsigned char   startc;                         /* flow cntl start char */
-       unsigned char   stopc;                          /* flow cntl stop char  */
-};
-
-/************************************************************************
- * Values for digi_flags
- ************************************************************************/
-#define DIGI_IXON      0x0001          /* Handle IXON in the FEP       */
-#define DIGI_FAST      0x0002          /* Fast baud rates              */
-#define RTSPACE                0x0004          /* RTS input flow control       */
-#define CTSPACE                0x0008          /* CTS output flow control      */
-#define DSRPACE                0x0010          /* DSR output flow control      */
-#define DCDPACE                0x0020          /* DCD output flow control      */
-#define DTRPACE                0x0040          /* DTR input flow control       */
-#define DIGI_COOK      0x0080          /* Cooked processing done in FEP */
-#define DIGI_FORCEDCD  0x0100          /* Force carrier                */
-#define        DIGI_ALTPIN     0x0200          /* Alternate RJ-45 pin config   */
-#define        DIGI_AIXON      0x0400          /* Aux flow control in fep      */
-#define        DIGI_PRINTER    0x0800          /* Hold port open for flow cntrl */
-#define DIGI_PP_INPUT  0x1000          /* Change parallel port to input */
-#define DIGI_422       0x4000          /* Change parallel port to input */
-#define DIGI_RTS_TOGGLE        0x8000          /* Support RTS Toggle            */
-
-
-/************************************************************************
- * Values associated with transparent print
- ************************************************************************/
-#define DIGI_PLEN      8               /* String length */
-#define        DIGI_TSIZ       10              /* Terminal string len */
-
-
-/************************************************************************
- * Structure used with ioctl commands for DIGI parameters.
- ************************************************************************/
-struct digi_struct {
-       unsigned short  digi_flags;             /* Flags (see above)    */
-       unsigned short  digi_maxcps;            /* Max printer CPS      */
-       unsigned short  digi_maxchar;           /* Max chars in print queue */
-       unsigned short  digi_bufsize;           /* Buffer size          */
-       unsigned char   digi_onlen;             /* Length of ON string  */
-       unsigned char   digi_offlen;            /* Length of OFF string */
-       char            digi_onstr[DIGI_PLEN];  /* Printer on string    */
-       char            digi_offstr[DIGI_PLEN]; /* Printer off string   */
-       char            digi_term[DIGI_TSIZ];   /* terminal string      */
-};
-
-/************************************************************************
- * Ioctl command arguments for DIGI parameters.
- ************************************************************************/
-/* Read params */
-#define DIGI_GETA      _IOR('e', 94, struct digi_struct)
-
-/* Set params */
-#define DIGI_SETA      _IOW('e', 95, struct digi_struct)
-
-/* Drain & set params  */
-#define DIGI_SETAW     _IOW('e', 96, struct digi_struct)
-
-/* Drain, flush & set params */
-#define DIGI_SETAF     _IOW('e', 97, struct digi_struct)
-
-/* Get startc/stopc flow control characters */
-#define        DIGI_GETFLOW    _IOR('e', 99, struct digiflow_struct)
-
-/* Set startc/stopc flow control characters */
-#define        DIGI_SETFLOW    _IOW('e', 100, struct digiflow_struct)
-
-/* Get Aux. startc/stopc flow control chars */
-#define        DIGI_GETAFLOW   _IOR('e', 101, struct digiflow_struct)
-
-/* Set Aux. startc/stopc flow control chars */
-#define        DIGI_SETAFLOW   _IOW('e', 102, struct digiflow_struct)
-
-/* Set integer baud rate */
-#define        DIGI_SETCUSTOMBAUD      _IOW('e', 106, int)
-
-/* Get integer baud rate */
-#define        DIGI_GETCUSTOMBAUD      _IOR('e', 107, int)
-
-#define        DIGI_GEDELAY    _IOR('d', 246, int)     /* Get edelay */
-#define        DIGI_SEDELAY    _IOW('d', 247, int)     /* Get edelay */
-
-
-#endif /* _DIGIDRP_H */
diff --git a/drivers/staging/dgrp/drp.h b/drivers/staging/dgrp/drp.h
deleted file mode 100644 (file)
index 4024b48..0000000
+++ /dev/null
@@ -1,693 +0,0 @@
-/*
- *
- * Copyright 1999 Digi International (www.digi.com)
- *     Gene Olson  <gene at digi dot com>
- *     James Puzzo <jamesp at digi dot com>
- *     Scott Kilau <scottk at digi dot com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED; without even the
- * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
- * PURPOSE.  See the GNU General Public License for more details.
- *
- */
-
-/************************************************************************
- * Master include file for Linux Realport Driver.
- ************************************************************************/
-
-#ifndef __DRP_H
-#define __DRP_H
-
-#include <linux/types.h>
-#include <linux/wait.h>
-#include <linux/semaphore.h>
-#include <linux/tty.h>
-
-
-#include "digirp.h"
-
-/************************************************************************
- * Tuning parameters.
- ************************************************************************/
-
-#define CHAN_MAX       64              /* Max # ports per server */
-
-#define SEQ_MAX                128             /* Max # transmit sequences (2^n) */
-#define SEQ_MASK       (SEQ_MAX-1)     /* Sequence buffer modulus mask */
-
-#define TBUF_MAX       4096            /* Size of transmit buffer (2^n) */
-#define RBUF_MAX       4096            /* Size of receive buffer (2^n) */
-
-#define TBUF_MASK      (TBUF_MAX-1)    /* Transmit buffer modulus mask */
-#define RBUF_MASK      (RBUF_MAX-1)    /* Receive buffer modulus mask */
-
-#define TBUF_LOW       1000            /* Transmit low water mark */
-
-#define UIO_BASE       1000            /* Base for write operations */
-#define UIO_MIN                2000            /* Minimum size application buffer */
-#define UIO_MAX                8100            /* Unix I/O buffer size */
-
-#define MON_MAX                65536           /* Monitor buffer size (2^n) */
-#define MON_MASK       (MON_MAX-1)     /* Monitor wrap mask */
-
-#define DPA_MAX                65536           /* DPA buffer size (2^n) */
-#define DPA_MASK       (DPA_MAX-1)     /* DPA wrap mask */
-#define DPA_HIGH_WATER 58000           /* Enforce flow control when
-                                        * over this amount
-                                        */
-
-#define IDLE_MAX       (20 * HZ)       /* Max TCP link idle time */
-
-#define MAX_DESC_LEN   100             /* Maximum length of stored PS
-                                        * description
-                                        */
-
-#define WRITEBUFLEN    ((4096) + 4)    /* 4 extra for alignment play space */
-
-#define VPDSIZE                512
-
-/************************************************************************
- * Minor device decoding conventions.
- ************************************************************************
- *
- * For Linux, the net and mon devices are handled via "proc", so we
- * only have to mux the "tty" devices.  Since every PortServer will
- * have an individual major number, the PortServer number does not
- * need to be encoded, and in fact, does not need to exist.
- *
- */
-
-/*
- * Port device decoding conventions:
- *
- *     Device 00 - 3f        64 dial-in modem devices. (tty)
- *     Device 40 - 7f        64 dial-out tty devices.  (cu)
- *     Device 80 - bf        64 dial-out printer devices.
- *
- *  IS_PRINT(dev)              This is a printer device.
- *
- *  OPEN_CATEGORY(dev)         Specifies the device category.  No two
- *                             devices of different categories may be open
- *                             at the same time.
- *
- * The following require the category returned by OPEN_CATEGORY().
- *
- *  OPEN_WAIT_AVAIL(cat)       Waits on open until the device becomes
- *                             available.  Fails if NDELAY specified.
- *
- *  OPEN_WAIT_CARRIER(cat)     Waits on open if carrier is not present.
- *                             Succeeds if NDELAY is given.
- *
- *  OPEN_FORCES_CARRIER(cat)   Carrier is forced high on open.
- *
- */
-
-#define PORT_NUM(dev)                  ((dev) & 0x3f)
-
-#define OPEN_CATEGORY(dev)             ((((dev) & 0x80) & 0x40))
-#define IS_PRINT(dev)                  (((dev) & 0xff) >= 0x80)
-
-#define OPEN_WAIT_AVAIL(cat)           (((cat) & 0x40) == 0x000)
-#define OPEN_WAIT_CARRIER(cat)         (((cat) & 0x40) == 0x000)
-#define OPEN_FORCES_CARRIER(cat)       (((cat) & 0x40) != 0x000)
-
-
-/************************************************************************
- * Modem signal defines for 16450/16550 compatible FEP.
- * set in ch_mout, ch_mflow, ch_mlast etc
- ************************************************************************/
-
-/* TODO : Re-verify that these modem signal definitions are correct */
-
-#define DM_DTR         0x01
-#define DM_RTS         0x02
-#define DM_RTS_TOGGLE  0x04
-
-#define DM_OUT1                0x04
-#define DM_OUT2                0x08
-
-#define DM_CTS         0x10
-#define DM_DSR         0x20
-#define DM_RI          0x40
-#define DM_CD          0x80            /* This is the DCD flag */
-
-
-/************************************************************************
- * Realport Event Flags.
- ************************************************************************/
-
-#define EV_OPU         0x0001          /* Ouput paused by client */
-#define EV_OPS         0x0002          /* Output paused by XOFF */
-#define EV_OPX         0x0004          /* Output paused by XXOFF */
-#define EV_OPH         0x0008          /* Output paused by MFLOW */
-#define EV_IPU         0x0010          /* Input paused by client */
-#define EV_IPS         0x0020          /* Input paused by hi/low water */
-#define EV_TXB         0x0040          /* Transmit break pending */
-#define EV_TXI         0x0080          /* Transmit immediate pending */
-#define EV_TXF         0x0100          /* Transmit flow control pending */
-#define EV_RXB         0x0200          /* Break received */
-
-
-/************************************************************************
- * Realport CFLAGS.
- ************************************************************************/
-
-#define CF_CS5         0x0000          /* 5 bit characters */
-#define CF_CS6         0x0010          /* 6 bit characters */
-#define CF_CS7         0x0020          /* 7 bit characters */
-#define CF_CS8         0x0030          /* 8 bit characters */
-#define CF_CSIZE       0x0030          /* Character size */
-#define CF_CSTOPB      0x0040          /* Two stop bits */
-#define CF_CREAD       0x0080          /* Enable receiver */
-#define CF_PARENB      0x0100          /* Enable parity */
-#define CF_PARODD      0x0200          /* Odd parity */
-#define CF_HUPCL       0x0400          /* Drop DTR on close */
-
-
-/************************************************************************
- * Realport XFLAGS.
- ************************************************************************/
-
-#define XF_XPAR                0x0001          /* Enable Mark/Space Parity */
-#define XF_XMODEM      0x0002          /* Enable in-band modem signalling */
-#define XF_XCASE       0x0004          /* Convert special characters */
-#define XF_XEDATA      0x0008          /* Error data in stream */
-#define XF_XTOSS       0x0010          /* Toss IXANY characters */
-#define XF_XIXON       0x0020          /* xxon/xxoff enable */
-
-
-/************************************************************************
- * Realport IFLAGS.
- ************************************************************************/
-
-#define IF_IGNBRK      0x0001          /* Ignore input break */
-#define IF_BRKINT      0x0002          /* Break interrupt */
-#define IF_IGNPAR      0x0004          /* Ignore error characters */
-#define IF_PARMRK      0x0008          /* Error chars marked with 0xff */
-#define IF_INPCK       0x0010          /* Input parity checking enabled */
-#define IF_ISTRIP      0x0020          /* Input chars masked with 0x7F */
-#define IF_IXON                0x0400          /* Output software flow control */
-#define IF_IXANY       0x0800          /* Restart output on any char */
-#define        IF_IXOFF        0x1000          /* Input software flow control */
-#define IF_DOSMODE     0x8000          /* 16450-compatible errors */
-
-
-/************************************************************************
- * Realport OFLAGS.
- ************************************************************************/
-
-#define OF_OLCUC       0x0002          /* Map lower to upper case */
-#define OF_ONLCR       0x0004          /* Map NL to CR-NL */
-#define OF_OCRNL       0x0008          /* Map CR to NL */
-#define OF_ONOCR       0x0010          /* No CR output at column 0 */
-#define OF_ONLRET      0x0020          /* Assume NL does NL/CR */
-#define OF_TAB3                0x1800          /* Tabs expand to 8 spaces */
-#define OF_TABDLY      0x1800          /* Tab delay */
-
-/************************************************************************
- * Unit flag definitions for un_flag.
- ************************************************************************/
-
-/* These are the DIGI unit flags */
-#define UN_EXCL                0x00010000      /* Exclusive open */
-#define UN_STICKY      0x00020000      /* TTY Settings are now sticky */
-#define UN_BUSY                0x00040000      /* Some work this channel */
-#define UN_PWAIT       0x00080000      /* Printer waiting for terminal */
-#define UN_TIME                0x00100000      /* Waiting on time */
-#define UN_EMPTY       0x00200000      /* Waiting output queue empty */
-#define UN_LOW         0x00400000      /* Waiting output low water */
-#define UN_DIGI_MASK   0x00FF0000      /* Waiting output low water */
-
-/*
- * Definitions for async_struct (and serial_struct) flags field
- *
- * these are the ASYNC flags copied from serial.h
- *
- */
-#define UN_HUP_NOTIFY  0x0001 /* Notify getty on hangups and
-                               * closes on the callout port
-                               */
-#define UN_FOURPORT    0x0002  /* Set OU1, OUT2 per AST Fourport settings */
-#define UN_SAK         0x0004  /* Secure Attention Key (Orange book) */
-#define UN_SPLIT_TERMIOS 0x0008 /* Separate termios for dialin/callout */
-
-#define UN_SPD_MASK    0x0030
-#define UN_SPD_HI      0x0010  /* Use 56000 instead of 38400 bps */
-#define UN_SPD_VHI     0x0020  /* Use 115200 instead of 38400 bps */
-#define UN_SPD_CUST    0x0030  /* Use user-specified divisor */
-
-#define UN_SKIP_TEST   0x0040 /* Skip UART test during autoconfiguration */
-#define UN_AUTO_IRQ    0x0080 /* Do automatic IRQ during autoconfiguration */
-
-#define UN_SESSION_LOCKOUT 0x0100 /* Lock out cua opens based on session */
-#define UN_PGRP_LOCKOUT           0x0200 /* Lock out cua opens based on pgrp */
-#define UN_CALLOUT_NOHUP   0x0400 /* Don't do hangups for cua device */
-
-#define UN_FLAGS       0x0FFF  /* Possible legal async flags */
-#define UN_USR_MASK    0x0430  /* Legal flags that non-privileged
-                                * users can set or reset
-                                */
-
-#define UN_INITIALIZED         0x80000000 /* Serial port was initialized */
-#define UN_CALLOUT_ACTIVE      0x40000000 /* Call out device is active */
-#define UN_NORMAL_ACTIVE       0x20000000 /* Normal device is active */
-#define UN_BOOT_AUTOCONF       0x10000000 /* Autoconfigure port on bootup */
-#define UN_CLOSING             0x08000000 /* Serial port is closing */
-#define UN_CTS_FLOW            0x04000000 /* Do CTS flow control */
-#define UN_CHECK_CD            0x02000000 /* i.e., CLOCAL */
-#define UN_SHARE_IRQ           0x01000000 /* for multifunction cards */
-
-
-/************************************************************************
- * Structure for terminal or printer unit.  struct un_struct
- *
- * Note that in some places the code assumes the "tty_t" is placed
- * first in the structure.
- ************************************************************************/
-
-struct un_struct {
-       struct tty_struct *un_tty;              /* System TTY struct */
-       struct ch_struct *un_ch;                /* Associated channel */
-
-       ushort     un_open_count;               /* Successful open count */
-       int             un_flag;                /* Unit flags */
-       ushort     un_tbusy;            /* Busy transmit count */
-
-       wait_queue_head_t  un_open_wait;
-       wait_queue_head_t  un_close_wait;
-       ushort  un_type;
-       struct device *un_sysfs;
-};
-
-
-/************************************************************************
- * Channel State Numbers for ch_state.
- ************************************************************************/
-
-/*
- * The ordering is important.
- *
- *    state <= CS_WAIT_CANCEL implies the channel is definitely closed.
- *
- *    state >= CS_WAIT_FAIL  implies the channel is definitely open.
- *
- *    state >= CS_READY implies data is allowed on the channel.
- */
-
-enum dgrp_ch_state_t {
-       CS_IDLE = 0,        /* Channel is idle */
-       CS_WAIT_OPEN = 1,   /* Waiting for Immediate Open Resp */
-       CS_WAIT_CANCEL = 2, /* Waiting for Per/Incom Cancel Resp */
-       CS_WAIT_FAIL = 3,   /* Waiting for Immed Open Failure */
-       CS_SEND_QUERY = 4,  /* Ready to send Port Query */
-       CS_WAIT_QUERY = 5,  /* Waiting for Port Query Response */
-       CS_READY = 6,       /* Ready to accept commands and data */
-       CS_SEND_CLOSE = 7,  /* Ready to send Close Request */
-       CS_WAIT_CLOSE = 8   /* Waiting for Close Response */
-};
-
-/************************************************************************
- * Device flag definitions for ch_flag.
- ************************************************************************/
-
-/*
- *  Note that the state of the two carrier based flags is key. When
- *  we check for carrier state transitions, we look at the current
- *  physical state of the DCD line and compare it with PHYS_CD (which
- *  was the state the last time we checked), and we also determine
- *  a new virtual state (composite of the physical state, FORCEDCD,
- *  CLOCAL, etc.) and compare it with VIRT_CD.
- *
- *  VIRTUAL transitions high will have the side effect of waking blocked
- *  opens.
- *
- *  PHYSICAL transitions low will cause hangups to occur _IF_ the virtual
- *  state is also low. We DON'T want to hangup on a PURE virtual drop.
- */
-
-#define CH_HANGUP      0x00002         /* Server port ready to close */
-
-#define CH_VIRT_CD     0x00004         /* Carrier was virtually present */
-#define CH_PHYS_CD     0x00008         /* Carrier was physically present */
-
-#define CH_CLOCAL      0x00010         /* CLOCAL set in cflags */
-#define CH_BAUD0       0x00020         /* Baud rate zero hangup */
-
-#define CH_FAST_READ   0x00040         /* Fast reads are enabled */
-#define CH_FAST_WRITE  0x00080         /* Fast writes are enabled */
-
-#define CH_PRON                0x00100         /* Printer on string active */
-#define CH_RX_FLUSH    0x00200         /* Flushing receive data */
-#define CH_LOW         0x00400         /* Thread waiting for LOW water */
-#define CH_EMPTY       0x00800         /* Thread waiting for EMPTY */
-#define CH_DRAIN       0x01000         /* Close is waiting to drain */
-#define CH_INPUT       0x02000         /* Thread waiting for INPUT */
-#define CH_RXSTOP      0x04000         /* Stop output to ldisc */
-#define CH_PARAM       0x08000         /* A parameter was updated */
-#define CH_WAITING_SYNC 0x10000                /* A pending sync was assigned
-                                        * to this port.
-                                        */
-#define CH_PORT_GONE   0x20000         /* Port has disappeared */
-#define CH_TX_BREAK    0x40000         /* TX Break to be sent,
-                                        * but has not yet.
-                                        */
-
-/************************************************************************
- * Types of Open Requests for ch_otype.
- ************************************************************************/
-
-#define OTYPE_IMMEDIATE          0             /* Immediate Open */
-#define OTYPE_PERSISTENT  1            /* Persistent Open */
-#define OTYPE_INCOMING   2             /* Incoming Open */
-
-
-/************************************************************************
- * Request/Response flags.
- ************************************************************************/
-
-#define RR_SEQUENCE    0x0001          /* Get server RLAST, TIN */
-#define RR_STATUS      0x0002          /* Get server MINT, EINT */
-#define RR_BUFFER      0x0004          /* Get server RSIZE, TSIZE */
-#define RR_CAPABILITY  0x0008          /* Get server port capabilities */
-
-#define RR_TX_FLUSH    0x0040          /* Flush output buffers */
-#define RR_RX_FLUSH    0x0080          /* Flush input buffers */
-
-#define RR_TX_STOP     0x0100          /* Pause output */
-#define RR_RX_STOP     0x0200          /* Pause input */
-#define RR_TX_START    0x0400          /* Start output */
-#define RR_RX_START    0x0800          /* Start input */
-
-#define RR_TX_BREAK    0x1000          /* Send BREAK */
-#define RR_TX_ICHAR    0x2000          /* Send character immediate */
-
-
-/************************************************************************
- * Channel information structure.   struct ch_struct
- ************************************************************************/
-
-struct ch_struct {
-       struct digi_struct ch_digi;             /* Digi variables */
-       int     ch_edelay;              /* Digi edelay */
-
-       struct tty_port port;
-       struct un_struct ch_tun;        /* Terminal unit info */
-       struct un_struct ch_pun;        /* Printer unit info */
-
-       struct nd_struct *ch_nd;        /* Node pointer */
-       u8  *ch_tbuf;           /* Local Transmit Buffer */
-       u8  *ch_rbuf;           /* Local Receive Buffer */
-       ulong   ch_cpstime;             /* Printer CPS time */
-       ulong   ch_waketime;            /* Printer wake time */
-
-       ulong   ch_flag;                /* CH_* flags */
-
-       enum dgrp_ch_state_t ch_state;          /* CS_* Protocol state */
-       ushort  ch_send;                /* Bit vector of RR_* requests */
-       ushort  ch_expect;              /* Bit vector of RR_* responses */
-       ushort  ch_wait_carrier;        /* Thread count waiting for carrier */
-       ushort  ch_wait_count[3];       /* Thread count waiting by otype */
-
-       ushort  ch_portnum;             /* Port number */
-       ushort  ch_open_count;          /* Successful open count */
-       ushort  ch_category;            /* Device category */
-       ushort  ch_open_error;          /* Last open error number */
-       ushort  ch_break_time;          /* Pending break request time */
-       ushort  ch_cpsrem;              /* Printer CPS remainder */
-       ushort  ch_ocook;               /* Realport fastcook oflags */
-       ushort  ch_inwait;              /* Thread count in CLIST input */
-
-       ushort  ch_tin;                 /* Local transmit buffer in ptr */
-       ushort  ch_tout;                /* Local transmit buffer out ptr */
-       ushort  ch_s_tin;               /* Realport TIN */
-       ushort  ch_s_tpos;              /* Realport TPOS */
-       ushort  ch_s_tsize;             /* Realport TSIZE */
-       ushort  ch_s_treq;              /* Realport TREQ */
-       ushort  ch_s_elast;             /* Realport ELAST */
-
-       ushort  ch_rin;                 /* Local receive buffer in ptr */
-       ushort  ch_rout;                /* Local receive buffer out ptr */
-       ushort  ch_s_rin;               /* Realport RIN */
-       /* David Fries 7-13-2001, ch_s_rin should be renamed ch_s_rout because
-        * the variable we want to represent is the PortServer's ROUT, which is
-        * the sequence number for the next byte the PortServer will send us.
-        * RIN is the sequence number for the next byte the PortServer will
-        * receive from the uart.  The port server will send data as long as
-        * ROUT is less than RWIN.  What would happen is the port is opened, it
-        * receives data, it gives the value of RIN, we set the RWIN to
-        * RIN+RBUF_MAX-1, it sends us RWIN-ROUT bytes which overflows.  ROUT
-        * is set to zero when the port is opened, so we start at zero and
-        * count up as data is received.
-        */
-       ushort  ch_s_rwin;              /* Realport RWIN */
-       ushort  ch_s_rsize;             /* Realport RSIZE */
-
-       ushort  ch_tmax;                /* Local TMAX */
-       ushort  ch_ttime;               /* Local TTIME */
-       ushort  ch_rmax;                /* Local RMAX */
-       ushort  ch_rtime;               /* Local RTIME */
-       ushort  ch_rlow;                /* Local RLOW */
-       ushort  ch_rhigh;               /* Local RHIGH */
-
-       ushort  ch_s_tmax;              /* Realport TMAX */
-       ushort  ch_s_ttime;             /* Realport TTIME */
-       ushort  ch_s_rmax;              /* Realport RMAX */
-       ushort  ch_s_rtime;             /* Realport RTIME */
-       ushort  ch_s_rlow;              /* Realport RLOW */
-       ushort  ch_s_rhigh;             /* Realport RHIGH */
-
-       ushort  ch_brate;               /* Local baud rate */
-       ushort  ch_cflag;               /* Local tty cflags */
-       ushort  ch_iflag;               /* Local tty iflags */
-       ushort  ch_oflag;               /* Local tty oflags */
-       ushort  ch_xflag;               /* Local tty xflags */
-
-       ushort  ch_s_brate;             /* Realport BRATE */
-       ushort  ch_s_cflag;             /* Realport CFLAG */
-       ushort  ch_s_iflag;             /* Realport IFLAG */
-       ushort  ch_s_oflag;             /* Realport OFLAG */
-       ushort  ch_s_xflag;             /* Realport XFLAG */
-
-       u8      ch_otype;               /* Open request type */
-       u8      ch_pscan_savechar;      /* Last character read by parity scan */
-       u8      ch_pscan_state;         /* PScan State based on last 2 chars */
-       u8      ch_otype_waiting;       /* Type of open pending in server */
-       u8      ch_flush_seq;           /* Receive flush end sequence */
-       u8      ch_s_mlast;             /* Realport MLAST */
-
-       u8      ch_mout;                /* Local MOUT */
-       u8      ch_mflow;               /* Local MFLOW */
-       u8      ch_mctrl;               /* Local MCTRL */
-       u8      ch_xon;                 /* Local XON */
-       u8      ch_xoff;                /* Local XOFF */
-       u8      ch_lnext;               /* Local LNEXT */
-       u8      ch_xxon;                /* Local XXON */
-       u8      ch_xxoff;               /* Local XXOFF */
-
-       u8      ch_s_mout;              /* Realport MOUT */
-       u8      ch_s_mflow;             /* Realport MFLOW */
-       u8      ch_s_mctrl;             /* Realport MCTRL */
-       u8      ch_s_xon;               /* Realport XON */
-       u8      ch_s_xoff;              /* Realport XOFF */
-       u8      ch_s_lnext;             /* Realport LNEXT */
-       u8      ch_s_xxon;              /* Realport XXON */
-       u8      ch_s_xxoff;             /* Realport XXOFF */
-
-       wait_queue_head_t ch_flag_wait; /* Wait queue for ch_flag changes */
-       wait_queue_head_t ch_sleep;     /* Wait queue for my_sleep() */
-
-       int     ch_custom_speed;        /* Realport custom speed */
-       int     ch_txcount;             /* Running TX count */
-       int     ch_rxcount;             /* Running RX count */
-};
-
-
-/************************************************************************
- * Node State definitions.
- ************************************************************************/
-
-enum dgrp_nd_state_t {
-       NS_CLOSED = 0,     /* Network device is closed */
-       NS_IDLE = 1,       /* Network connection inactive */
-       NS_SEND_QUERY = 2, /* Send server query */
-       NS_WAIT_QUERY = 3, /* Wait for query response */
-       NS_READY = 4,      /* Network ready */
-       NS_SEND_ERROR = 5  /* Must send error hangup */
-};
-
-#define ND_STATE_STR(x) \
-       ((x) == NS_CLOSED     ? "CLOSED"     : \
-       ((x) == NS_IDLE       ? "IDLE"       : \
-       ((x) == NS_SEND_QUERY ? "SEND_QUERY" : \
-       ((x) == NS_WAIT_QUERY ? "WAIT_QUERY" : \
-       ((x) == NS_READY      ? "READY"      : \
-       ((x) == NS_SEND_ERROR ? "SEND_ERROR" : "UNKNOWN"))))))
-
-/************************************************************************
- * Node Flag definitions.
- ************************************************************************/
-
-#define ND_SELECT      0x0001          /* Multiple net read selects */
-#define ND_DEB_WAIT    0x0002          /* Debug Device waiting */
-
-
-/************************************************************************
- * Monitoring flag definitions.
- ************************************************************************/
-
-#define MON_WAIT_DATA  0x0001          /* Waiting for buffer data */
-#define MON_WAIT_SPACE 0x0002          /* Waiting for buffer space */
-
-/************************************************************************
- * DPA flag definitions.
- ************************************************************************/
-
-#define DPA_WAIT_DATA  0x0001          /* Waiting for buffer data */
-#define DPA_WAIT_SPACE 0x0002          /* Waiting for buffer space */
-
-
-/************************************************************************
- * Definitions taken from Realport Dump.
- ************************************************************************/
-
-#define RPDUMP_MAGIC   "Digi-RealPort-1.0"
-
-#define RPDUMP_MESSAGE 0xE2            /* Descriptive message */
-#define RPDUMP_RESET   0xE7            /* Connection reset */
-#define RPDUMP_CLIENT  0xE8            /* Client data */
-#define RPDUMP_SERVER  0xE9            /* Server data */
-
-
-/************************************************************************
- * Node request/response definitions.
- ************************************************************************/
-
-#define NR_ECHO                0x0001          /* Server echo packet */
-#define NR_IDENT       0x0002          /* Server Product ID */
-#define NR_CAPABILITY  0x0004          /* Server Capabilties */
-#define NR_VPD         0x0008          /* Server VPD, if any */
-#define NR_PASSWORD    0x0010          /* Server Password */
-
-/************************************************************************
- * Registration status of the node's Linux struct tty_driver structures.
- ************************************************************************/
-#define SERIAL_TTDRV_REG   0x0001     /* nd_serial_ttdriver registered */
-#define CALLOUT_TTDRV_REG  0x0002     /* nd_callout_ttdriver registered */
-#define XPRINT_TTDRV_REG   0x0004     /* nd_xprint_ttdriver registered */
-
-
-/************************************************************************
- * Node structure.  There exists one of these for each associated
- * realport server.
- ************************************************************************/
-
-struct nd_struct {
-       struct list_head        list;
-       long          nd_major;            /* Node's major number           */
-       long          nd_ID;               /* Node's ID code                */
-
-       char          nd_serial_name[50];   /* "tty_dgrp_<id>_" + null      */
-       char          nd_callout_name[50];  /* "cu_dgrp_<id>_" + null       */
-       char          nd_xprint_name[50];   /* "pr_dgrp_<id>_" + null       */
-
-       char         password[16];        /* Password for server, if needed */
-       int          nd_tty_ref_cnt;      /* Linux tty reference count     */
-
-       struct proc_dir_entry *nd_net_de; /* Dir entry for /proc/dgrp/net  */
-       struct proc_dir_entry *nd_mon_de; /* Dir entry for /proc/dgrp/mon  */
-       struct proc_dir_entry *nd_ports_de; /* Dir entry for /proc/dgrp/ports*/
-       struct proc_dir_entry *nd_dpa_de; /* Dir entry for /proc/dgrp/dpa  */
-
-       spinlock_t nd_lock;               /* General node lock             */
-
-       struct semaphore nd_net_semaphore; /* Net read/write lock           */
-       struct semaphore nd_mon_semaphore; /* Monitor buffer lock           */
-       spinlock_t nd_dpa_lock;         /* DPA buffer lock           */
-
-       enum dgrp_nd_state_t nd_state;    /* NS_* network state */
-       int           nd_chan_count;       /* # active channels             */
-       int           nd_flag;             /* Node flags                    */
-       int           nd_send;             /* Responses to send             */
-       int           nd_expect;           /* Responses we expect           */
-
-       u8       *nd_iobuf;            /* Network R/W Buffer            */
-       wait_queue_head_t nd_tx_waitq;    /* Network select wait queue     */
-
-       u8       *nd_inputbuf;         /* Input Buffer                  */
-       u8       *nd_inputflagbuf;     /* Input Flags Buffer            */
-
-       int           nd_tx_deposit;       /* Accumulated transmit deposits */
-       int           nd_tx_charge;        /* Accumulated transmit charges  */
-       int           nd_tx_credit;        /* Current TX credit             */
-       int           nd_tx_ready;         /* Ready to transmit             */
-       int           nd_tx_work;          /* TX work waiting               */
-       ulong        nd_tx_time;          /* Last transmit time            */
-       ulong        nd_poll_time;        /* Next scheduled poll time      */
-
-       int           nd_delay;            /* Current TX delay              */
-       int           nd_rate;             /* Current TX rate               */
-       struct link_struct nd_link;             /* Link speed params.            */
-
-       int           nd_seq_in;           /* TX seq in ptr                 */
-       int           nd_seq_out;          /* TX seq out ptr                */
-       int           nd_unack;            /* Unacknowledged byte count     */
-       int           nd_remain;           /* Remaining receive bytes       */
-       int           nd_tx_module;        /* Current TX module #           */
-       int           nd_rx_module;        /* Current RX module #           */
-       char         *nd_error;            /* Protocol error message        */
-
-       int           nd_write_count;      /* drp_write() call count        */
-       int           nd_read_count;       /* drp_read() count              */
-       int           nd_send_count;       /* TCP message sent              */
-       int           nd_tx_byte;          /* Transmit byte count           */
-       int           nd_rx_byte;          /* Receive byte count            */
-
-       ulong        nd_mon_lbolt;       /* Monitor start time             */
-       int           nd_mon_flag;        /* Monitor flags                  */
-       int           nd_mon_in;          /* Monitor in pointer             */
-       int           nd_mon_out;         /* Monitor out pointer            */
-       wait_queue_head_t nd_mon_wqueue;  /* Monitor wait queue (on flags)  */
-       u8       *nd_mon_buf;         /* Monitor buffer                 */
-
-       ulong        nd_dpa_lbolt;      /* DPA start time             */
-       int          nd_dpa_flag;       /* DPA flags                  */
-       int          nd_dpa_in;         /* DPA in pointer             */
-       int          nd_dpa_out;        /* DPA out pointer            */
-       wait_queue_head_t nd_dpa_wqueue; /* DPA wait queue (on flags)  */
-       u8        *nd_dpa_buf;  /* DPA buffer                 */
-
-       uint         nd_dpa_debug;
-       uint         nd_dpa_port;
-
-       wait_queue_head_t nd_seq_wque[SEQ_MAX];   /* TX thread wait queues */
-       u8        nd_seq_wait[SEQ_MAX];   /* Transmit thread wait count */
-
-       ushort       nd_seq_size[SEQ_MAX];   /* Transmit seq packet size   */
-       ulong        nd_seq_time[SEQ_MAX];   /* Transmit seq packet time   */
-
-       ushort       nd_hw_ver;           /* HW version returned from PS   */
-       ushort       nd_sw_ver;           /* SW version returned from PS   */
-       uint         nd_hw_id;            /* HW ID returned from PS        */
-       u8        nd_ps_desc[MAX_DESC_LEN];  /* Description from PS     */
-       uint         nd_vpd_len;                /* VPD len, if any */
-       u8           nd_vpd[VPDSIZE];           /* VPD, if any */
-
-       ulong        nd_ttdriver_flags;   /* Registration status            */
-       struct tty_driver *nd_serial_ttdriver;  /* Linux TTYDRIVER structure */
-       struct tty_driver *nd_callout_ttdriver; /* Linux TTYDRIVER structure */
-       struct tty_driver *nd_xprint_ttdriver;  /* Linux TTYDRIVER structure */
-
-       u8           *nd_writebuf;              /* Used to cache data read
-                                                * from user
-                                                */
-       struct ch_struct nd_chan[CHAN_MAX];  /* Channel array               */
-       struct device *nd_class_dev;    /* Hang our sysfs stuff off of here */
-};
-
-#endif /* __DRP_H */
diff --git a/drivers/staging/emxx_udc/Kconfig b/drivers/staging/emxx_udc/Kconfig
new file mode 100644 (file)
index 0000000..9bc6d3d
--- /dev/null
@@ -0,0 +1,10 @@
+config USB_EMXX
+       boolean "EMXX USB Function Device Controller"
+       depends on USB_GADGET && (ARCH_SHMOBILE || (ARM && COMPILE_TEST))
+       help
+          The Emma Mobile series of SoCs from Renesas Electronics and
+          former NEC Electronics include USB Function hardware.
+
+          Say "y" to link the driver statically, or "m" to build a
+          dynamically linked module called "emxx_udc" and force all
+          gadget drivers to also be dynamically linked.
diff --git a/drivers/staging/emxx_udc/Makefile b/drivers/staging/emxx_udc/Makefile
new file mode 100644 (file)
index 0000000..6352724
--- /dev/null
@@ -0,0 +1 @@
+obj-$(CONFIG_USB_EMXX) := emxx_udc.o
diff --git a/drivers/staging/emxx_udc/TODO b/drivers/staging/emxx_udc/TODO
new file mode 100644 (file)
index 0000000..1319379
--- /dev/null
@@ -0,0 +1,4 @@
+* add clock framework support (platform device with CCF needs special care)
+* break out board-specific VBUS GPIO to work with multiplatform
+* DT bindings
+* move driver into drivers/usb/gadget/
diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
new file mode 100644 (file)
index 0000000..ce1b95b
--- /dev/null
@@ -0,0 +1,3520 @@
+/*
+ *  drivers/usb/gadget/emxx_udc.c
+ *     EMXX FCD (Function Controller Driver) for USB.
+ *
+ *  Copyright (C) 2010 Renesas Electronics Corporation
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2
+ *  as published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software Foundation,
+ *  Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
+ */
+
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/slab.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/proc_fs.h>
+#include <linux/clk.h>
+#include <linux/ctype.h>
+#include <linux/string.h>
+#include <linux/dma-mapping.h>
+#include <linux/workqueue.h>
+#include <linux/device.h>
+
+#include <linux/usb/ch9.h>
+#include <linux/usb/gadget.h>
+
+#include <linux/irq.h>
+#include <linux/gpio.h>
+
+#include "emxx_udc.h"
+
+#define        DRIVER_DESC     "EMXX UDC driver"
+#define        DMA_ADDR_INVALID        (~(dma_addr_t)0)
+
+static const char      driver_name[] = "emxx_udc";
+static const char      driver_desc[] = DRIVER_DESC;
+
+/*===========================================================================*/
+/* Prototype */
+static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *, struct nbu2ss_ep *);
+static void _nbu2ss_ep0_enable(struct nbu2ss_udc *);
+/*static void _nbu2ss_ep0_disable(struct nbu2ss_udc *);*/
+static void _nbu2ss_ep_done(struct nbu2ss_ep *, struct nbu2ss_req *, int);
+static void _nbu2ss_set_test_mode(struct nbu2ss_udc *, u32 mode);
+static void _nbu2ss_endpoint_toggle_reset(struct nbu2ss_udc *udc, u8 ep_adrs);
+
+static int _nbu2ss_pullup(struct nbu2ss_udc *, int);
+static void _nbu2ss_fifo_flush(struct nbu2ss_udc *, struct nbu2ss_ep *);
+
+/*===========================================================================*/
+/* Macro */
+#define        _nbu2ss_zero_len_pkt(udc, epnum)        \
+       _nbu2ss_ep_in_end(udc, epnum, 0, 0)
+
+
+/*===========================================================================*/
+/* Global */
+struct nbu2ss_udc udc_controller;
+
+
+/*-------------------------------------------------------------------------*/
+/* Read */
+static inline u32 _nbu2ss_readl(void *address)
+{
+       return __raw_readl(address) ;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Write */
+static inline void _nbu2ss_writel(void *address, u32 udata)
+{
+       __raw_writel(udata, address) ;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Set Bit */
+static inline void _nbu2ss_bitset(void *address, u32 udata)
+{
+       u32     reg_dt = __raw_readl(address) | (udata);
+       __raw_writel(reg_dt, address) ;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Clear Bit */
+static inline void _nbu2ss_bitclr(void *address, u32 udata)
+{
+       u32     reg_dt = __raw_readl(address) & ~(udata);
+       __raw_writel(reg_dt, address) ;
+}
+
+#ifdef UDC_DEBUG_DUMP
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_dump_register(struct nbu2ss_udc *udc)
+{
+       int             i;
+       u32 reg_data;
+
+       pr_info("=== %s()\n", __func__);
+
+       if (udc == NULL) {
+               ERR("%s udc == NULL\n", __func__);
+               return;
+       }
+
+       spin_unlock(&udc->lock);
+
+       printk(KERN_DEBUG "\n-USB REG-\n");
+       for (i = 0x0 ; i < USB_BASE_SIZE ; i += 16) {
+               reg_data =   _nbu2ss_readl(
+                       (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i));
+               printk(KERN_DEBUG "USB%04x =%08x", i, (int)reg_data);
+
+               reg_data =  _nbu2ss_readl(
+                       (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 4));
+               printk(KERN_DEBUG " %08x", (int)reg_data);
+
+               reg_data =  _nbu2ss_readl(
+                       (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 8));
+               printk(KERN_DEBUG " %08x", (int)reg_data);
+
+               reg_data =  _nbu2ss_readl(
+                       (u32 *)IO_ADDRESS(USB_BASE_ADDRESS + i + 12));
+               printk(KERN_DEBUG " %08x\n", (int)reg_data);
+
+       }
+
+       spin_lock(&udc->lock);
+}
+#endif /* UDC_DEBUG_DUMP */
+
+/*-------------------------------------------------------------------------*/
+/* Endpoint 0 Callback (Complete) */
+static void _nbu2ss_ep0_complete(struct usb_ep *_ep, struct usb_request *_req)
+{
+       u8              recipient;
+       u16             selector;
+       u32             test_mode;
+       struct usb_ctrlrequest  *p_ctrl;
+       struct nbu2ss_udc *udc;
+
+       if ((_ep == NULL) || (_req == NULL))
+               return;
+
+       udc = (struct nbu2ss_udc *)_req->context;
+       p_ctrl = &udc->ctrl;
+       if ((p_ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
+
+               if (p_ctrl->bRequest == USB_REQ_SET_FEATURE) {
+                       /*-------------------------------------------------*/
+                       /* SET_FEATURE */
+                       recipient = (u8)(p_ctrl->bRequestType & USB_RECIP_MASK);
+                       selector  = p_ctrl->wValue;
+                       if ((recipient == USB_RECIP_DEVICE) &&
+                               (selector == USB_DEVICE_TEST_MODE)) {
+                               test_mode = (u32)(p_ctrl->wIndex >> 8);
+                               _nbu2ss_set_test_mode(udc, test_mode);
+                       }
+               }
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+/* Initialization usb_request */
+static void _nbu2ss_create_ep0_packet(
+       struct nbu2ss_udc *udc,
+       void *p_buf,
+       unsigned length
+)
+{
+       udc->ep0_req.req.buf            = p_buf;
+       udc->ep0_req.req.length         = length;
+       udc->ep0_req.req.dma            = 0;
+       udc->ep0_req.req.zero           = TRUE;
+       udc->ep0_req.req.complete       = _nbu2ss_ep0_complete;
+       udc->ep0_req.req.status         = -EINPROGRESS;
+       udc->ep0_req.req.context        = udc;
+       udc->ep0_req.req.actual         = 0;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Acquisition of the first address of RAM(FIFO) */
+static u32 _nbu2ss_get_begin_ram_address(struct nbu2ss_udc *udc)
+{
+       u32             num, buf_type;
+       u32             data, last_ram_adr, use_ram_size;
+
+       PT_EP_REGS      p_ep_regs;
+
+       last_ram_adr = (D_RAM_SIZE_CTRL / sizeof(u32)) * 2;
+       use_ram_size = 0;
+
+       for (num = 0; num < NUM_ENDPOINTS - 1; num++) {
+               p_ep_regs = &udc->p_regs->EP_REGS[num];
+               data = _nbu2ss_readl(&p_ep_regs->EP_PCKT_ADRS);
+               buf_type = _nbu2ss_readl(&p_ep_regs->EP_CONTROL) & EPn_BUF_TYPE;
+               if (buf_type == 0) {
+                       /* Single Buffer */
+                       use_ram_size += (data & EPn_MPKT) / sizeof(u32);
+               } else {
+                       /* Double Buffer */
+                       use_ram_size += ((data & EPn_MPKT) / sizeof(u32)) * 2;
+               }
+
+               if ((data >> 16) > last_ram_adr)
+                       last_ram_adr = data>>16;
+       }
+
+       return last_ram_adr + use_ram_size;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Construction of Endpoint */
+static int _nbu2ss_ep_init(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
+{
+       u32             num;
+       u32             data;
+       u32             begin_adrs;
+
+       if (ep->epnum == 0)
+               return  -EINVAL;
+
+       num = ep->epnum - 1;
+
+       /*-------------------------------------------------------------*/
+       /* RAM Transfer Address */
+       begin_adrs = _nbu2ss_get_begin_ram_address(udc);
+       data = (begin_adrs << 16) | ep->ep.maxpacket;
+       _nbu2ss_writel(&udc->p_regs->EP_REGS[num].EP_PCKT_ADRS, data);
+
+       /*-------------------------------------------------------------*/
+       /* Interrupt Enable */
+       data = 1 << (ep->epnum + 8);
+       _nbu2ss_bitset(&udc->p_regs->USB_INT_ENA, data);
+
+       /*-------------------------------------------------------------*/
+       /* Endpoint Type(Mode) */
+       /*   Bulk, Interrupt, ISO */
+       switch (ep->ep_type) {
+       case USB_ENDPOINT_XFER_BULK:
+               data = EPn_BULK;
+               break;
+
+       case USB_ENDPOINT_XFER_INT:
+               data = EPn_BUF_SINGLE | EPn_INTERRUPT;
+               break;
+
+       case USB_ENDPOINT_XFER_ISOC:
+               data = EPn_ISO;
+               break;
+
+       default:
+               data = 0;
+               break;
+       }
+
+       _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+       _nbu2ss_endpoint_toggle_reset(udc, (ep->epnum|ep->direct));
+
+       if (ep->direct == USB_DIR_OUT) {
+               /*---------------------------------------------------------*/
+               /* OUT */
+               data = EPn_EN | EPn_BCLR | EPn_DIR0;
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = (EPn_ONAK | EPn_OSTL_EN | EPn_OSTL);
+               _nbu2ss_bitclr(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = (EPn_OUT_EN | EPn_OUT_END_EN);
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_INT_ENA, data);
+       } else {
+               /*---------------------------------------------------------*/
+               /* IN */
+               data = (EPn_EN | EPn_BCLR | EPn_AUTO);
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = (EPn_ISTL);
+               _nbu2ss_bitclr(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = (EPn_IN_EN | EPn_IN_END_EN);
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_INT_ENA, data);
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Release of Endpoint */
+static int _nbu2ss_epn_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
+{
+       u32             num;
+       u32             data;
+
+       if ((ep->epnum == 0) || (udc->vbus_active == 0))
+               return  -EINVAL;
+
+       num = ep->epnum - 1;
+
+       /*-------------------------------------------------------------*/
+       /* RAM Transfer Address */
+       _nbu2ss_writel(&udc->p_regs->EP_REGS[num].EP_PCKT_ADRS, 0);
+
+       /*-------------------------------------------------------------*/
+       /* Interrupt Disable */
+       data = 1 << (ep->epnum + 8);
+       _nbu2ss_bitclr(&udc->p_regs->USB_INT_ENA, data);
+
+       if (ep->direct == USB_DIR_OUT) {
+               /*---------------------------------------------------------*/
+               /* OUT */
+               data = EPn_ONAK | EPn_BCLR;
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = EPn_EN | EPn_DIR0;
+               _nbu2ss_bitclr(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = EPn_OUT_EN | EPn_OUT_END_EN;
+               _nbu2ss_bitclr(&udc->p_regs->EP_REGS[num].EP_INT_ENA, data);
+       } else {
+               /*---------------------------------------------------------*/
+               /* IN */
+               data = EPn_BCLR;
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = EPn_EN | EPn_AUTO;
+               _nbu2ss_bitclr(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+
+               data = EPn_IN_EN | EPn_IN_END_EN;
+               _nbu2ss_bitclr(&udc->p_regs->EP_REGS[num].EP_INT_ENA, data);
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+/* DMA setting (without Endpoint 0) */
+static void _nbu2ss_ep_dma_init(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
+{
+       u32             num;
+       u32             data;
+
+       data = _nbu2ss_readl(&udc->p_regs->USBSSCONF);
+       if (((ep->epnum == 0) || (data & (1 << ep->epnum)) == 0))
+               return;         /* Not Support DMA */
+
+       num = ep->epnum - 1;
+
+       if (ep->direct == USB_DIR_OUT) {
+               /*---------------------------------------------------------*/
+               /* OUT */
+               data = ep->ep.maxpacket;
+               _nbu2ss_writel(&udc->p_regs->EP_DCR[num].EP_DCR2, data);
+
+               /*---------------------------------------------------------*/
+               /* Transfer Direct */
+               data = DCR1_EPn_DIR0;
+               _nbu2ss_bitset(&udc->p_regs->EP_DCR[num].EP_DCR1, data);
+
+               /*---------------------------------------------------------*/
+               /* DMA Mode etc. */
+               data = EPn_STOP_MODE | EPn_STOP_SET  | EPn_DMAMODE0;
+               _nbu2ss_writel(&udc->p_regs->EP_REGS[num].EP_DMA_CTRL, data);
+       } else {
+               /*---------------------------------------------------------*/
+               /* IN */
+               _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, EPn_AUTO);
+
+               /*---------------------------------------------------------*/
+               /* DMA Mode etc. */
+               data = EPn_BURST_SET | EPn_DMAMODE0;
+               _nbu2ss_writel(&udc->p_regs->EP_REGS[num].EP_DMA_CTRL, data);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+/* DMA setting release */
+static void _nbu2ss_ep_dma_exit(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
+{
+       u32             num;
+       u32             data;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (udc->vbus_active == 0)
+               return;         /* VBUS OFF */
+
+       data = _nbu2ss_readl(&preg->USBSSCONF);
+       if ((ep->epnum == 0) || ((data & (1 << ep->epnum)) == 0))
+               return;         /* Not Support DMA */
+
+       num = ep->epnum - 1;
+
+       _nbu2ss_ep_dma_abort(udc, ep);
+
+       if (ep->direct == USB_DIR_OUT) {
+               /*---------------------------------------------------------*/
+               /* OUT */
+               _nbu2ss_writel(&preg->EP_DCR[num].EP_DCR2, 0);
+               _nbu2ss_bitclr(&preg->EP_DCR[num].EP_DCR1, DCR1_EPn_DIR0);
+               _nbu2ss_writel(&preg->EP_REGS[num].EP_DMA_CTRL, 0);
+       } else {
+               /*---------------------------------------------------------*/
+               /* IN */
+               _nbu2ss_bitclr(&preg->EP_REGS[num].EP_CONTROL, EPn_AUTO);
+               _nbu2ss_writel(&preg->EP_REGS[num].EP_DMA_CTRL, 0);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+/* Abort DMA */
+static void _nbu2ss_ep_dma_abort(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
+{
+       PT_FC_REGS      preg = udc->p_regs;
+
+       _nbu2ss_bitclr(&preg->EP_DCR[ep->epnum-1].EP_DCR1, DCR1_EPn_REQEN);
+       mdelay(DMA_DISABLE_TIME);       /* DCR1_EPn_REQEN Clear */
+       _nbu2ss_bitclr(&preg->EP_REGS[ep->epnum-1].EP_DMA_CTRL, EPn_DMA_EN);
+}
+
+/*-------------------------------------------------------------------------*/
+/* Start IN Transfer */
+static void _nbu2ss_ep_in_end(
+       struct nbu2ss_udc *udc,
+       u32 epnum,
+       u32 data32,
+       u32 length
+)
+{
+       u32             data;
+       u32             num;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (length >= sizeof(u32))
+               return;
+
+       if (epnum == 0) {
+               _nbu2ss_bitclr(&preg->EP0_CONTROL, EP0_AUTO);
+
+               /* Writing of 1-4 bytes */
+               if (length)
+                       _nbu2ss_writel(&preg->EP0_WRITE, data32);
+
+               data = ((length << 5) & EP0_DW) | EP0_DEND;
+               _nbu2ss_writel(&preg->EP0_CONTROL, data);
+
+               _nbu2ss_bitset(&preg->EP0_CONTROL, EP0_AUTO);
+       } else {
+               num = epnum - 1;
+
+               _nbu2ss_bitclr(&preg->EP_REGS[num].EP_CONTROL, EPn_AUTO);
+
+               /* Writing of 1-4 bytes */
+               if (length)
+                       _nbu2ss_writel(&preg->EP_REGS[num].EP_WRITE, data32);
+
+               data = (((((u32)length) << 5) & EPn_DW) | EPn_DEND);
+               _nbu2ss_bitset(&preg->EP_REGS[num].EP_CONTROL, data);
+
+               _nbu2ss_bitset(&preg->EP_REGS[num].EP_CONTROL, EPn_AUTO);
+       }
+
+       return;
+}
+
+#ifdef USE_DMA
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_dma_map_single(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u8              direct
+)
+{
+       if (req->req.dma == DMA_ADDR_INVALID) {
+               if (req->unaligned)
+                       req->req.dma = ep->phys_buf;
+               else {
+                       req->req.dma = dma_map_single(
+                               udc->gadget.dev.parent,
+                               req->req.buf,
+                               req->req.length,
+                               (direct == USB_DIR_IN)
+                               ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
+               }
+               req->mapped = 1;
+       } else {
+               if (!req->unaligned)
+                       dma_sync_single_for_device(
+                               udc->gadget.dev.parent,
+                               req->req.dma,
+                               req->req.length,
+                               (direct == USB_DIR_IN)
+                               ? DMA_TO_DEVICE : DMA_FROM_DEVICE);
+
+               req->mapped = 0;
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_dma_unmap_single(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u8              direct
+)
+{
+       u8              data[4];
+       u8              *p;
+       u32             count = 0;
+
+       if (direct == USB_DIR_OUT) {
+               count = req->req.actual % 4;
+               if (count) {
+                       p = req->req.buf;
+                       p += (req->req.actual - count);
+                       memcpy(data, p, count);
+               }
+       }
+
+       if (req->mapped) {
+               if (req->unaligned) {
+                       if (direct == USB_DIR_OUT)
+                               memcpy(req->req.buf, ep->virt_buf,
+                                       req->req.actual & 0xfffffffc);
+               } else
+                       dma_unmap_single(udc->gadget.dev.parent,
+                               req->req.dma, req->req.length,
+                               (direct == USB_DIR_IN)
+                               ? DMA_TO_DEVICE
+                               : DMA_FROM_DEVICE);
+               req->req.dma = DMA_ADDR_INVALID;
+               req->mapped = 0;
+       } else {
+               if (!req->unaligned)
+                       dma_sync_single_for_cpu(udc->gadget.dev.parent,
+                               req->req.dma, req->req.length,
+                               (direct == USB_DIR_IN)
+                               ? DMA_TO_DEVICE
+                               : DMA_FROM_DEVICE);
+       }
+
+       if (count) {
+               p = req->req.buf;
+               p += (req->req.actual - count);
+               memcpy(p, data, count);
+       }
+}
+#endif
+
+/*-------------------------------------------------------------------------*/
+/* Endpoint 0 OUT Transfer (PIO) */
+static int EP0_out_PIO(struct nbu2ss_udc *udc, u8* pBuf, u32 length)
+{
+       u32             i;
+       int             nret   = 0;
+       u32             iWordLength = 0;
+       USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf;
+
+       /*------------------------------------------------------------*/
+       /* Read Length */
+       iWordLength = length / sizeof(u32);
+
+       /*------------------------------------------------------------*/
+       /* PIO Read */
+       if (iWordLength) {
+               for (i = 0; i < iWordLength; i++) {
+                       pBuf32->dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
+                       pBuf32++;
+               }
+               nret = iWordLength * sizeof(u32);
+       }
+
+       return nret;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Endpoint 0 OUT Transfer (PIO, OverBytes) */
+static int EP0_out_OverBytes(struct nbu2ss_udc *udc, u8* pBuf, u32 length)
+{
+       u32             i;
+       u32             iReadSize = 0;
+       USB_REG_ACCESS  Temp32;
+       USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf;
+
+       if ((0 < length) && (length < sizeof(u32))) {
+               Temp32.dw = _nbu2ss_readl(&udc->p_regs->EP0_READ);
+               for (i = 0 ; i < length ; i++)
+                       pBuf32->byte.DATA[i] = Temp32.byte.DATA[i];
+               iReadSize += length;
+       }
+
+       return iReadSize;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Endpoint 0 IN Transfer (PIO) */
+static int EP0_in_PIO(struct nbu2ss_udc *udc, u8 *pBuf, u32 length)
+{
+       u32             i;
+       u32             iMaxLength   = EP0_PACKETSIZE;
+       u32             iWordLength  = 0;
+       u32             iWriteLength = 0;
+       USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf;
+
+       /*------------------------------------------------------------*/
+       /* Transfer Length */
+       if (iMaxLength < length)
+               iWordLength = iMaxLength / sizeof(u32);
+       else
+               iWordLength = length / sizeof(u32);
+
+       /*------------------------------------------------------------*/
+       /* PIO */
+       for (i = 0; i < iWordLength; i++) {
+               _nbu2ss_writel(&udc->p_regs->EP0_WRITE, pBuf32->dw);
+               pBuf32++;
+               iWriteLength += sizeof(u32);
+       }
+
+       return iWriteLength;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Endpoint 0 IN Transfer (PIO, OverBytes) */
+static int EP0_in_OverBytes(struct nbu2ss_udc *udc, u8 *pBuf, u32 iRemainSize)
+{
+       u32             i;
+       USB_REG_ACCESS Temp32;
+       USB_REG_ACCESS* pBuf32 = (USB_REG_ACCESS *)pBuf;
+
+       if ((0 < iRemainSize) && (iRemainSize < sizeof(u32))) {
+               for (i = 0 ; i < iRemainSize ; i++)
+                       Temp32.byte.DATA[i] = pBuf32->byte.DATA[i];
+               _nbu2ss_ep_in_end(udc, 0, Temp32.dw, iRemainSize);
+
+               return iRemainSize;
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Transfer NULL Packet (Epndoint 0) */
+static int EP0_send_NULL(struct nbu2ss_udc *udc, bool pid_flag)
+{
+       u32             data;
+
+       data = _nbu2ss_readl(&udc->p_regs->EP0_CONTROL);
+       data &= ~(u32)EP0_INAK;
+
+       if (pid_flag)
+               data |= (EP0_INAK_EN | EP0_PIDCLR | EP0_DEND);
+       else
+               data |= (EP0_INAK_EN | EP0_DEND);
+
+       _nbu2ss_writel(&udc->p_regs->EP0_CONTROL, data);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Receive NULL Packet (Endpoint 0) */
+static int EP0_receive_NULL(struct nbu2ss_udc *udc, bool pid_flag)
+{
+       u32             data;
+
+       data = _nbu2ss_readl(&udc->p_regs->EP0_CONTROL);
+       data &= ~(u32)EP0_ONAK;
+
+       if (pid_flag)
+               data |= EP0_PIDCLR;
+
+       _nbu2ss_writel(&udc->p_regs->EP0_CONTROL, data);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_ep0_in_transfer(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req
+)
+{
+       u8              *pBuffer;                       /* IN Data Buffer */
+       u32             data;
+       u32             iRemainSize = 0;
+       int             result = 0;
+
+       /*-------------------------------------------------------------*/
+       /* End confirmation */
+       if (req->req.actual == req->req.length) {
+               if ((req->req.actual % EP0_PACKETSIZE) == 0) {
+                       if (req->zero) {
+                               req->zero = 0;
+                               EP0_send_NULL(udc, FALSE);
+                               return 1;
+                       }
+               }
+
+               return 0;               /* Transfer End */
+       }
+
+       /*-------------------------------------------------------------*/
+       /* NAK release */
+       data = _nbu2ss_readl(&udc->p_regs->EP0_CONTROL);
+       data |= EP0_INAK_EN;
+       data &= ~(u32)EP0_INAK;
+       _nbu2ss_writel(&udc->p_regs->EP0_CONTROL, data);
+
+       iRemainSize = req->req.length - req->req.actual;
+       pBuffer = (u8 *)req->req.buf;
+       pBuffer += req->req.actual;
+
+       /*-------------------------------------------------------------*/
+       /* Data transfer */
+       result = EP0_in_PIO(udc, pBuffer, iRemainSize);
+
+       req->div_len = result;
+       iRemainSize -= result;
+
+       if (iRemainSize == 0) {
+               EP0_send_NULL(udc, FALSE);
+               return result;
+       }
+
+       if ((iRemainSize < sizeof(u32)) && (result != EP0_PACKETSIZE)) {
+               pBuffer += result;
+               result += EP0_in_OverBytes(udc, pBuffer, iRemainSize);
+               req->div_len = result;
+       }
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_ep0_out_transfer(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req
+)
+{
+       u8              *pBuffer;
+       u32             iRemainSize;
+       u32             iRecvLength;
+       int             result = 0;
+       int             fRcvZero;
+
+       /*-------------------------------------------------------------*/
+       /* Receive data confirmation */
+       iRecvLength = _nbu2ss_readl(&udc->p_regs->EP0_LENGTH) & EP0_LDATA;
+       if (iRecvLength != 0) {
+
+               fRcvZero = 0;
+
+               iRemainSize = req->req.length - req->req.actual;
+               pBuffer = (u8 *)req->req.buf;
+               pBuffer += req->req.actual;
+
+               result = EP0_out_PIO(udc, pBuffer
+                                       , min(iRemainSize, iRecvLength));
+               if (result < 0)
+                       return result;
+
+               req->req.actual += result;
+               iRecvLength -= result;
+
+               if ((0 < iRecvLength) && (iRecvLength < sizeof(u32))) {
+                       pBuffer += result;
+                       iRemainSize -= result;
+
+                       result = EP0_out_OverBytes(udc, pBuffer
+                                       , min(iRemainSize, iRecvLength));
+                       req->req.actual += result;
+               }
+       } else {
+               fRcvZero = 1;
+       }
+
+       /*-------------------------------------------------------------*/
+       /* End confirmation */
+       if (req->req.actual == req->req.length) {
+               if ((req->req.actual % EP0_PACKETSIZE) == 0) {
+                       if (req->zero) {
+                               req->zero = 0;
+                               EP0_receive_NULL(udc, FALSE);
+                               return 1;
+                       }
+               }
+
+               return 0;               /* Transfer End */
+       }
+
+       if ((req->req.actual % EP0_PACKETSIZE) != 0)
+               return 0;               /* Short Packet Transfer End */
+
+       if (req->req.actual > req->req.length) {
+               ERR(" *** Overrun Error\n");
+               return -EOVERFLOW;
+       }
+
+       if (fRcvZero != 0) {
+               iRemainSize = _nbu2ss_readl(&udc->p_regs->EP0_CONTROL);
+               if (iRemainSize & EP0_ONAK) {
+                       /*---------------------------------------------------*/
+                       /* NACK release */
+                       _nbu2ss_bitclr(&udc->p_regs->EP0_CONTROL, EP0_ONAK);
+               }
+               result = 1;
+       }
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_out_dma(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_req *req,
+       u32             num,
+       u32             length
+)
+{
+       u8              *pBuffer;
+       u32             mpkt;
+       u32             lmpkt;
+       u32             dmacnt;
+       u32             burst = 1;
+       u32             data;
+       int             result = -EINVAL;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (req->dma_flag)
+               return 1;               /* DMA is forwarded */
+
+       req->dma_flag = TRUE;
+       pBuffer = (u8 *)req->req.dma;
+       pBuffer += req->req.actual;
+
+       /* DMA Address */
+       _nbu2ss_writel(&preg->EP_DCR[num].EP_TADR, (u32)pBuffer);
+
+       /* Number of transfer packets */
+       mpkt = _nbu2ss_readl(&preg->EP_REGS[num].EP_PCKT_ADRS) & EPn_MPKT;
+       dmacnt = (length / mpkt);
+       lmpkt = (length % mpkt) & ~(u32)0x03;
+
+       if (DMA_MAX_COUNT < dmacnt) {
+               dmacnt = DMA_MAX_COUNT;
+               lmpkt = 0;
+       } else if (0 != lmpkt) {
+               if (0 == dmacnt)
+                       burst = 0;      /* Burst OFF */
+               dmacnt++;
+       }
+
+       data = mpkt | (lmpkt << 16);
+       _nbu2ss_writel(&preg->EP_DCR[num].EP_DCR2, data);
+
+       data = ((dmacnt & 0xff) << 16) | DCR1_EPn_DIR0 | DCR1_EPn_REQEN;
+       _nbu2ss_writel(&preg->EP_DCR[num].EP_DCR1, data);
+
+       if (0 == burst) {
+               _nbu2ss_writel(&preg->EP_REGS[num].EP_LEN_DCNT, 0);
+               _nbu2ss_bitclr(&preg->EP_REGS[num].EP_DMA_CTRL, EPn_BURST_SET);
+       } else {
+               _nbu2ss_writel(&preg->EP_REGS[num].EP_LEN_DCNT
+                               , (dmacnt << 16));
+               _nbu2ss_bitset(&preg->EP_REGS[num].EP_DMA_CTRL, EPn_BURST_SET);
+       }
+       _nbu2ss_bitset(&preg->EP_REGS[num].EP_DMA_CTRL, EPn_DMA_EN);
+
+       result = length & ~(u32)0x03;
+       req->div_len = result;
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_epn_out_pio(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u32             length
+)
+{
+       u8              *pBuffer;
+       u32             i;
+       u32             data;
+       u32             iWordLength;
+       USB_REG_ACCESS  Temp32;
+       USB_REG_ACCESS  *pBuf32;
+       int             result = 0;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (req->dma_flag)
+               return 1;               /* DMA is forwarded */
+
+       if (length == 0)
+               return 0;
+
+       pBuffer = (u8 *)req->req.buf;
+       pBuf32 = (USB_REG_ACCESS *)(pBuffer + req->req.actual);
+
+       iWordLength = length / sizeof(u32);
+       if (iWordLength > 0) {
+               /*---------------------------------------------------------*/
+               /* Copy of every four bytes */
+               for (i = 0; i < iWordLength; i++) {
+                       pBuf32->dw =
+                       _nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_READ);
+                       pBuf32++;
+               }
+               result = iWordLength * sizeof(u32);
+       }
+
+       data = length - result;
+       if (data > 0) {
+               /*---------------------------------------------------------*/
+               /* Copy of fraction byte */
+               Temp32.dw = _nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_READ);
+               for (i = 0 ; i < data ; i++)
+                       pBuf32->byte.DATA[i] = Temp32.byte.DATA[i];
+               result += data;
+       }
+
+       req->req.actual += result;
+
+       if ((req->req.actual == req->req.length)
+                       || ((req->req.actual % ep->ep.maxpacket) != 0)) {
+
+               result = 0;
+       }
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_epn_out_data(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u32             data_size
+)
+{
+       u32             num;
+       u32             iBufSize;
+       int             nret = 1;
+
+       if (ep->epnum == 0)
+               return -EINVAL;
+
+       num = ep->epnum - 1;
+
+       iBufSize = min((req->req.length - req->req.actual), data_size);
+
+       if ((ep->ep_type != USB_ENDPOINT_XFER_INT)
+               && (req->req.dma != 0)
+               && (iBufSize  >= sizeof(u32))) {
+               nret = _nbu2ss_out_dma(udc, req, num, iBufSize);
+       } else {
+               iBufSize = min(iBufSize, (u32)ep->ep.maxpacket);
+               nret = _nbu2ss_epn_out_pio(udc, ep, req, iBufSize);
+       }
+
+       return nret;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_epn_out_transfer(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req
+)
+{
+       u32             num;
+       u32             iRecvLength;
+       int             result = 1;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (ep->epnum == 0)
+               return -EINVAL;
+
+       num = ep->epnum - 1;
+
+       /*-------------------------------------------------------------*/
+       /* Receive Length */
+       iRecvLength
+               = _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT) & EPn_LDATA;
+
+       if (iRecvLength != 0) {
+               result = _nbu2ss_epn_out_data(udc, ep, req, iRecvLength);
+               if (iRecvLength < ep->ep.maxpacket) {
+                       if (iRecvLength == result) {
+                               req->req.actual += result;
+                               result = 0;
+                       }
+               }
+       } else {
+               if ((req->req.actual == req->req.length)
+                       || ((req->req.actual % ep->ep.maxpacket) != 0)) {
+
+                       result = 0;
+               }
+       }
+
+       if (result == 0) {
+               if ((req->req.actual % ep->ep.maxpacket) == 0) {
+                       if (req->zero) {
+                               req->zero = 0;
+                               return 1;
+                       }
+               }
+       }
+
+       if (req->req.actual > req->req.length) {
+               ERR(" *** Overrun Error\n");
+               ERR(" *** actual = %d, length = %d\n",
+                       req->req.actual, req->req.length);
+               result = -EOVERFLOW;
+       }
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_in_dma(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u32             num,
+       u32             length
+)
+{
+       u8              *pBuffer;
+       u32             mpkt;           /* MaxPacketSize */
+       u32             lmpkt;          /* Last Packet Data Size */
+       u32             dmacnt;         /* IN Data Size */
+       u32             iWriteLength;
+       u32             data;
+       int             result = -EINVAL;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (req->dma_flag)
+               return 1;               /* DMA is forwarded */
+
+#ifdef USE_DMA
+       if (req->req.actual == 0)
+               _nbu2ss_dma_map_single(udc, ep, req, USB_DIR_IN);
+#endif
+       req->dma_flag = TRUE;
+
+       /* MAX Packet Size */
+       mpkt = _nbu2ss_readl(&preg->EP_REGS[num].EP_PCKT_ADRS) & EPn_MPKT;
+
+       if ((DMA_MAX_COUNT * mpkt) < length)
+               iWriteLength = DMA_MAX_COUNT * mpkt;
+       else
+               iWriteLength = length;
+
+       /*------------------------------------------------------------*/
+       /* Number of transmission packets */
+       if (mpkt < iWriteLength) {
+               dmacnt = iWriteLength / mpkt;
+               lmpkt  = (iWriteLength % mpkt) & ~(u32)0x3;
+               if (lmpkt != 0)
+                       dmacnt++;
+               else
+                       lmpkt = mpkt & ~(u32)0x3;
+
+       } else {
+               dmacnt = 1;
+               lmpkt  = iWriteLength & ~(u32)0x3;
+       }
+
+       /* Packet setting */
+       data = mpkt | (lmpkt << 16);
+       _nbu2ss_writel(&preg->EP_DCR[num].EP_DCR2, data);
+
+       /* Address setting */
+       pBuffer = (u8 *)req->req.dma;
+       pBuffer += req->req.actual;
+       _nbu2ss_writel(&preg->EP_DCR[num].EP_TADR, (u32)pBuffer);
+
+       /* Packet and DMA setting */
+       data = ((dmacnt & 0xff) << 16) | DCR1_EPn_REQEN;
+       _nbu2ss_writel(&preg->EP_DCR[num].EP_DCR1, data);
+
+       /* Packet setting of EPC */
+       data = dmacnt << 16;
+       _nbu2ss_writel(&preg->EP_REGS[num].EP_LEN_DCNT, data);
+
+       /*DMA setting of EPC */
+       _nbu2ss_bitset(&preg->EP_REGS[num].EP_DMA_CTRL, EPn_DMA_EN);
+
+       result = iWriteLength & ~(u32)0x3;
+       req->div_len = result;
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_epn_in_pio(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u32             length
+)
+{
+       u8              *pBuffer;
+       u32             i;
+       u32             data;
+       u32             iWordLength;
+       USB_REG_ACCESS  Temp32;
+       USB_REG_ACCESS  *pBuf32 = NULL;
+       int             result = 0;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (req->dma_flag)
+               return 1;               /* DMA is forwarded */
+
+       if (length > 0) {
+               pBuffer = (u8 *)req->req.buf;
+               pBuf32 = (USB_REG_ACCESS *)(pBuffer + req->req.actual);
+
+               iWordLength = length / sizeof(u32);
+               if (iWordLength > 0) {
+                       for (i = 0; i < iWordLength; i++) {
+                               _nbu2ss_writel(
+                                       &preg->EP_REGS[ep->epnum-1].EP_WRITE
+                                       , pBuf32->dw
+                               );
+
+                               pBuf32++;
+                       }
+                       result = iWordLength * sizeof(u32);
+               }
+       }
+
+       if (result != ep->ep.maxpacket) {
+               data = length - result;
+               Temp32.dw = 0;
+               for (i = 0 ; i < data ; i++)
+                       Temp32.byte.DATA[i] = pBuf32->byte.DATA[i];
+
+               _nbu2ss_ep_in_end(udc, ep->epnum, Temp32.dw, data);
+               result += data;
+       }
+
+       req->div_len = result;
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_epn_in_data(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       u32             data_size
+)
+{
+       u32             num;
+       int             nret = 1;
+
+       if (ep->epnum == 0)
+               return -EINVAL;
+
+       num = ep->epnum - 1;
+
+       if ((ep->ep_type != USB_ENDPOINT_XFER_INT)
+               && (req->req.dma != 0)
+               && (data_size >= sizeof(u32))) {
+               nret = _nbu2ss_in_dma(udc, ep, req, num, data_size);
+       } else {
+               data_size = min(data_size, (u32)ep->ep.maxpacket);
+               nret = _nbu2ss_epn_in_pio(udc, ep, req, data_size);
+       }
+
+       return nret;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_epn_in_transfer(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req
+)
+{
+       u32             num;
+       u32             iBufSize;
+       int             result = 0;
+       u32             status;
+
+       if (ep->epnum == 0)
+               return -EINVAL;
+
+       num = ep->epnum - 1;
+
+       status = _nbu2ss_readl(&udc->p_regs->EP_REGS[num].EP_STATUS);
+
+       /*-------------------------------------------------------------*/
+       /* State confirmation of FIFO */
+       if (req->req.actual == 0) {
+               if ((status & EPn_IN_EMPTY) == 0)
+                       return 1;       /* Not Empty */
+
+       } else {
+               if ((status & EPn_IN_FULL) != 0)
+                       return 1;       /* Not Empty */
+       }
+
+       /*-------------------------------------------------------------*/
+       /* Start tranfer */
+       iBufSize = req->req.length - req->req.actual;
+       if (iBufSize > 0)
+               result = _nbu2ss_epn_in_data(udc, ep, req, iBufSize);
+       else if (req->req.length == 0)
+               _nbu2ss_zero_len_pkt(udc, ep->epnum);
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_start_transfer(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       bool    bflag)
+{
+       int             nret = -EINVAL;
+
+       req->dma_flag = FALSE;
+       req->div_len = 0;
+
+       if (req->req.length == 0)
+               req->zero = 0;
+       else {
+               if ((req->req.length % ep->ep.maxpacket) == 0)
+                       req->zero = req->req.zero;
+               else
+                       req->zero = 0;
+       }
+
+       if (ep->epnum == 0) {
+               /* EP0 */
+               switch (udc->ep0state) {
+               case EP0_IN_DATA_PHASE:
+                       nret = _nbu2ss_ep0_in_transfer(udc, ep, req);
+                       break;
+
+               case EP0_OUT_DATA_PHASE:
+                       nret = _nbu2ss_ep0_out_transfer(udc, ep, req);
+                       break;
+
+               case EP0_IN_STATUS_PHASE:
+                       nret = EP0_send_NULL(udc, TRUE);
+                       break;
+
+               default:
+                       break;
+               }
+
+       } else {
+               /* EPn */
+               if (ep->direct == USB_DIR_OUT) {
+                       /* OUT */
+                       if (bflag == FALSE)
+                               nret = _nbu2ss_epn_out_transfer(udc, ep, req);
+               } else {
+                       /* IN */
+                       nret = _nbu2ss_epn_in_transfer(udc, ep, req);
+               }
+       }
+
+       return nret;
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_restert_transfer(struct nbu2ss_ep *ep)
+{
+       u32             length;
+       bool    bflag = FALSE;
+       struct nbu2ss_req *req;
+
+       if (list_empty(&ep->queue))
+               req = NULL;
+       else
+               req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
+
+       if (req == NULL)
+               return;
+
+       if (ep->epnum > 0) {
+               length = _nbu2ss_readl(
+                       &ep->udc->p_regs->EP_REGS[ep->epnum-1].EP_LEN_DCNT);
+
+               length &= EPn_LDATA;
+               if (length < ep->ep.maxpacket)
+                       bflag = TRUE;
+       }
+
+       _nbu2ss_start_transfer(ep->udc, ep, req, bflag);
+}
+
+/*-------------------------------------------------------------------------*/
+/*     Endpoint Toggle Reset */
+static void _nbu2ss_endpoint_toggle_reset(
+       struct nbu2ss_udc *udc,
+       u8 ep_adrs)
+{
+       u8              num;
+       u32             data;
+
+       if ((ep_adrs == 0) || (ep_adrs == 0x80))
+               return;
+
+       num = (ep_adrs & 0x7F) - 1;
+
+       if (ep_adrs & USB_DIR_IN)
+               data = EPn_IPIDCLR;
+       else
+               data = EPn_BCLR | EPn_OPIDCLR;
+
+       _nbu2ss_bitset(&udc->p_regs->EP_REGS[num].EP_CONTROL, data);
+}
+
+/*-------------------------------------------------------------------------*/
+/*     Endpoint STALL set */
+static void _nbu2ss_set_endpoint_stall(
+       struct nbu2ss_udc *udc,
+       u8 ep_adrs,
+       bool bstall)
+{
+       u8              num, epnum;
+       u32             data;
+       struct nbu2ss_ep *ep;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if ((ep_adrs == 0) || (ep_adrs == 0x80)) {
+               if (bstall) {
+                       /* Set STALL */
+                       _nbu2ss_bitset(&preg->EP0_CONTROL, EP0_STL);
+               } else {
+                       /* Clear STALL */
+                       _nbu2ss_bitclr(&preg->EP0_CONTROL, EP0_STL);
+               }
+       } else {
+               epnum = ep_adrs & USB_ENDPOINT_NUMBER_MASK;
+               num = epnum - 1;
+               ep = &udc->ep[epnum];
+
+               if (bstall) {
+                       /* Set STALL */
+                       ep->halted = TRUE;
+
+                       if (ep_adrs & USB_DIR_IN)
+                               data = EPn_BCLR | EPn_ISTL;
+                       else
+                               data = EPn_OSTL_EN | EPn_OSTL;
+
+                       _nbu2ss_bitset(&preg->EP_REGS[num].EP_CONTROL, data);
+               } else {
+                       /* Clear STALL */
+                       ep->stalled = FALSE;
+                       if (ep_adrs & USB_DIR_IN) {
+                               _nbu2ss_bitclr(&preg->EP_REGS[num].EP_CONTROL
+                                               , EPn_ISTL);
+                       } else {
+                               data =
+                               _nbu2ss_readl(&preg->EP_REGS[num].EP_CONTROL);
+
+                               data &= ~EPn_OSTL;
+                               data |= EPn_OSTL_EN;
+
+                               _nbu2ss_writel(&preg->EP_REGS[num].EP_CONTROL
+                                               , data);
+                       }
+
+                       ep->stalled = FALSE;
+                       if (ep->halted) {
+                               ep->halted = FALSE;
+                               _nbu2ss_restert_transfer(ep);
+                       }
+               }
+       }
+
+       return;
+}
+
+
+/*-------------------------------------------------------------------------*/
+/* Device Descriptor */
+static struct usb_device_descriptor device_desc = {
+       .bLength              = sizeof(device_desc),
+       .bDescriptorType      = USB_DT_DEVICE,
+       .bcdUSB               = __constant_cpu_to_le16(0x0200),
+       .bDeviceClass         = USB_CLASS_VENDOR_SPEC,
+       .bDeviceSubClass      = 0x00,
+       .bDeviceProtocol      = 0x00,
+       .bMaxPacketSize0      = 64,
+       .idVendor             = __constant_cpu_to_le16 (0x0409),
+       .idProduct            = __constant_cpu_to_le16 (0xfff0),
+       .bcdDevice            = 0xffff,
+       .iManufacturer        = 0x00,
+       .iProduct             = 0x00,
+       .iSerialNumber        = 0x00,
+       .bNumConfigurations   = 0x01,
+};
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_set_test_mode(struct nbu2ss_udc *udc, u32 mode)
+{
+       u32             data;
+
+       if (mode > MAX_TEST_MODE_NUM)
+               return;
+
+       pr_info("SET FEATURE : test mode = %d\n", mode);
+
+       data = _nbu2ss_readl(&udc->p_regs->USB_CONTROL);
+       data &= ~TEST_FORCE_ENABLE;
+       data |= mode << TEST_MODE_SHIFT;
+
+       _nbu2ss_writel(&udc->p_regs->USB_CONTROL, data);
+       _nbu2ss_bitset(&udc->p_regs->TEST_CONTROL, CS_TESTMODEEN);
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_set_feature_device(
+       struct nbu2ss_udc *udc,
+       u16 selector,
+       u16 wIndex
+)
+{
+       int     result = -EOPNOTSUPP;
+
+       switch (selector) {
+       case USB_DEVICE_REMOTE_WAKEUP:
+               if (0x0000 == wIndex) {
+                       udc->remote_wakeup = U2F_ENABLE;
+                       result = 0;
+               }
+               break;
+
+       case USB_DEVICE_TEST_MODE:
+               wIndex = wIndex >> 8;
+               if (wIndex <= MAX_TEST_MODE_NUM)
+                       result = 0;
+               break;
+
+       default:
+               break;
+       }
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_get_ep_stall(struct nbu2ss_udc *udc, u8 ep_adrs)
+{
+       u8              epnum;
+       u32             data = 0, bit_data;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       epnum = ep_adrs & ~USB_ENDPOINT_DIR_MASK;
+       if (epnum == 0) {
+               data = _nbu2ss_readl(&preg->EP0_CONTROL);
+               bit_data = EP0_STL;
+
+       } else {
+               data = _nbu2ss_readl(&preg->EP_REGS[epnum-1].EP_CONTROL);
+               if ((data & EPn_EN) == 0)
+                       return -1;
+
+               if (ep_adrs & USB_ENDPOINT_DIR_MASK)
+                       bit_data = EPn_ISTL;
+               else
+                       bit_data = EPn_OSTL;
+       }
+
+       if ((data & bit_data) == 0)
+               return 0;
+       else
+               return 1;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline int _nbu2ss_req_feature(struct nbu2ss_udc *udc, bool bset)
+{
+       u8      recipient = (u8)(udc->ctrl.bRequestType & USB_RECIP_MASK);
+       u8      direction = (u8)(udc->ctrl.bRequestType & USB_DIR_IN);
+       u16     selector  = udc->ctrl.wValue;
+       u16     wIndex    = udc->ctrl.wIndex;
+       u8      ep_adrs;
+       int     result = -EOPNOTSUPP;
+
+       if ((0x0000 != udc->ctrl.wLength) ||
+                       (USB_DIR_OUT != direction)) {
+               return -EINVAL;
+       }
+
+       switch (recipient) {
+       case USB_RECIP_DEVICE:
+               if (bset)
+                       result =
+                       _nbu2ss_set_feature_device(udc, selector, wIndex);
+               break;
+
+       case USB_RECIP_ENDPOINT:
+               if (0x0000 == (wIndex & 0xFF70)) {
+                       if (USB_ENDPOINT_HALT == selector) {
+                               ep_adrs = wIndex & 0xFF;
+                               if (bset == FALSE) {
+                                       _nbu2ss_endpoint_toggle_reset(
+                                               udc, ep_adrs);
+                               }
+
+                               _nbu2ss_set_endpoint_stall(
+                                       udc, ep_adrs, bset);
+
+                               result = 0;
+                       }
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       if (result >= 0)
+               _nbu2ss_create_ep0_packet(udc, udc->ep0_buf, 0);
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline enum usb_device_speed _nbu2ss_get_speed(struct nbu2ss_udc *udc)
+{
+       u32             data;
+       enum usb_device_speed speed = USB_SPEED_FULL;
+
+       data = _nbu2ss_readl(&udc->p_regs->USB_STATUS);
+       if (data & HIGH_SPEED)
+               speed = USB_SPEED_HIGH;
+
+       return speed;
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_epn_set_stall(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep
+)
+{
+       u8      ep_adrs;
+       u32     regdata;
+       int     limit_cnt = 0;
+
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (ep->direct == USB_DIR_IN) {
+               for (limit_cnt = 0
+                       ; limit_cnt < IN_DATA_EMPTY_COUNT
+                       ; limit_cnt++) {
+
+                       regdata = _nbu2ss_readl(
+                               &preg->EP_REGS[ep->epnum-1].EP_STATUS);
+
+                       if ((regdata & EPn_IN_DATA) == 0)
+                               break;
+
+                       mdelay(1);
+               }
+       }
+
+       ep_adrs = ep->epnum | ep->direct;
+       _nbu2ss_set_endpoint_stall(udc, ep_adrs, 1);
+}
+
+/*-------------------------------------------------------------------------*/
+static int std_req_get_status(struct nbu2ss_udc *udc)
+{
+       u32     length;
+       u16     status_data = 0;
+       u8      recipient = (u8)(udc->ctrl.bRequestType & USB_RECIP_MASK);
+       u8      direction = (u8)(udc->ctrl.bRequestType & USB_DIR_IN);
+       u8      ep_adrs;
+       int     result = -EINVAL;
+
+       if ((0x0000 != udc->ctrl.wValue)
+               || (USB_DIR_IN != direction)) {
+
+               return result;
+       }
+
+       length = min(udc->ctrl.wLength, (u16)sizeof(status_data));
+
+       switch (recipient) {
+       case USB_RECIP_DEVICE:
+               if (udc->ctrl.wIndex == 0x0000) {
+                       if (udc->self_powered)
+                               status_data |= (1 << USB_DEVICE_SELF_POWERED);
+
+                       if (udc->remote_wakeup)
+                               status_data |= (1 << USB_DEVICE_REMOTE_WAKEUP);
+
+                       result = 0;
+               }
+               break;
+
+       case USB_RECIP_ENDPOINT:
+               if (0x0000 == (udc->ctrl.wIndex & 0xFF70)) {
+                       ep_adrs = (u8)(udc->ctrl.wIndex & 0xFF);
+                       result = _nbu2ss_get_ep_stall(udc, ep_adrs);
+
+                       if (result > 0)
+                               status_data |= (1 << USB_ENDPOINT_HALT);
+               }
+               break;
+
+       default:
+               break;
+       }
+
+       if (result >= 0) {
+               memcpy(udc->ep0_buf, &status_data, length);
+               _nbu2ss_create_ep0_packet(udc, udc->ep0_buf, length);
+               _nbu2ss_ep0_in_transfer(udc, &udc->ep[0], &udc->ep0_req);
+
+       } else {
+               ERR("*** Error GET_STATUS\n");
+       }
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int std_req_clear_feature(struct nbu2ss_udc *udc)
+{
+       return _nbu2ss_req_feature(udc, FALSE);
+}
+
+/*-------------------------------------------------------------------------*/
+static int std_req_set_feature(struct nbu2ss_udc *udc)
+{
+       return _nbu2ss_req_feature(udc, TRUE);
+}
+
+/*-------------------------------------------------------------------------*/
+static int std_req_set_address(struct nbu2ss_udc *udc)
+{
+       int             result = 0;
+       u32             wValue = udc->ctrl.wValue;
+
+       if ((0x00 != udc->ctrl.bRequestType)    ||
+               (0x0000 != udc->ctrl.wIndex)    ||
+               (0x0000 != udc->ctrl.wLength)) {
+               return -EINVAL;
+       }
+
+       if (wValue != (wValue & 0x007F))
+               return -EINVAL;
+
+       wValue = wValue << USB_ADRS_SHIFT;
+
+       _nbu2ss_writel(&udc->p_regs->USB_ADDRESS, wValue);
+       _nbu2ss_create_ep0_packet(udc, udc->ep0_buf, 0);
+
+       return result;
+}
+
+/*-------------------------------------------------------------------------*/
+static int std_req_set_configuration(struct nbu2ss_udc *udc)
+{
+       u32 ConfigValue = (u32)(udc->ctrl.wValue & 0x00ff);
+
+       if ((0x0000 != udc->ctrl.wIndex)        ||
+               (0x0000 != udc->ctrl.wLength)   ||
+               (0x00 != udc->ctrl.bRequestType)) {
+               return -EINVAL;
+       }
+
+       udc->curr_config = ConfigValue;
+
+       if (ConfigValue > 0) {
+               _nbu2ss_bitset(&udc->p_regs->USB_CONTROL, CONF);
+               udc->devstate = USB_STATE_CONFIGURED;
+
+       } else {
+               _nbu2ss_bitclr(&udc->p_regs->USB_CONTROL, CONF);
+               udc->devstate = USB_STATE_ADDRESS;
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_read_request_data(struct nbu2ss_udc *udc, u32 *pdata)
+{
+       if ((udc == NULL) && (pdata == NULL))
+               return;
+
+       *pdata = _nbu2ss_readl(&udc->p_regs->SETUP_DATA0);
+       pdata++;
+       *pdata = _nbu2ss_readl(&udc->p_regs->SETUP_DATA1);
+}
+
+/*-------------------------------------------------------------------------*/
+static inline int _nbu2ss_decode_request(struct nbu2ss_udc *udc)
+{
+       bool                    bcall_back = TRUE;
+       int                     nret = -EINVAL;
+       struct usb_ctrlrequest  *p_ctrl;
+
+       p_ctrl = &udc->ctrl;
+       _nbu2ss_read_request_data(udc, (u32 *)p_ctrl);
+
+       /* ep0 state control */
+       if (p_ctrl->wLength == 0) {
+               udc->ep0state = EP0_IN_STATUS_PHASE;
+
+       } else {
+               if (p_ctrl->bRequestType & USB_DIR_IN)
+                       udc->ep0state = EP0_IN_DATA_PHASE;
+               else
+                       udc->ep0state = EP0_OUT_DATA_PHASE;
+       }
+
+       if ((p_ctrl->bRequestType & USB_TYPE_MASK) == USB_TYPE_STANDARD) {
+               switch (p_ctrl->bRequest) {
+               case USB_REQ_GET_STATUS:
+                       nret = std_req_get_status(udc);
+                       bcall_back = FALSE;
+                       break;
+
+               case USB_REQ_CLEAR_FEATURE:
+                       nret = std_req_clear_feature(udc);
+                       bcall_back = FALSE;
+                       break;
+
+               case USB_REQ_SET_FEATURE:
+                       nret = std_req_set_feature(udc);
+                       bcall_back = FALSE;
+                       break;
+
+               case USB_REQ_SET_ADDRESS:
+                       nret = std_req_set_address(udc);
+                       bcall_back = FALSE;
+                       break;
+
+               case USB_REQ_SET_CONFIGURATION:
+                       nret = std_req_set_configuration(udc);
+                       break;
+
+               default:
+                       break;
+               }
+       }
+
+       if (bcall_back == FALSE) {
+               if (udc->ep0state == EP0_IN_STATUS_PHASE) {
+                       if (nret >= 0) {
+                               /*--------------------------------------*/
+                               /* Status Stage */
+                               nret = EP0_send_NULL(udc, TRUE);
+                       }
+               }
+
+       } else {
+               spin_unlock(&udc->lock);
+               nret = udc->driver->setup(&udc->gadget, &udc->ctrl);
+               spin_lock(&udc->lock);
+       }
+
+       if (nret < 0)
+               udc->ep0state = EP0_IDLE;
+
+       return nret;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline int _nbu2ss_ep0_in_data_stage(struct nbu2ss_udc *udc)
+{
+       int                     nret;
+       struct nbu2ss_req       *req;
+       struct nbu2ss_ep        *ep = &udc->ep[0];
+
+       if (list_empty(&ep->queue))
+               req = NULL;
+       else
+               req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
+
+       if (req == NULL)
+               req = &udc->ep0_req;
+
+       req->req.actual += req->div_len;
+       req->div_len = 0;
+
+       nret = _nbu2ss_ep0_in_transfer(udc, ep, req);
+       if (nret == 0) {
+               udc->ep0state = EP0_OUT_STATUS_PAHSE;
+               EP0_receive_NULL(udc, TRUE);
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline int _nbu2ss_ep0_out_data_stage(struct nbu2ss_udc *udc)
+{
+       int                     nret;
+       struct nbu2ss_req       *req;
+       struct nbu2ss_ep        *ep = &udc->ep[0];
+
+       if (list_empty(&ep->queue))
+               req = NULL;
+       else
+               req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
+
+       if (req == NULL)
+               req = &udc->ep0_req;
+
+       nret = _nbu2ss_ep0_out_transfer(udc, ep, req);
+       if (nret == 0) {
+               udc->ep0state = EP0_IN_STATUS_PHASE;
+               EP0_send_NULL(udc, TRUE);
+
+       } else if (nret < 0) {
+               _nbu2ss_bitset(&udc->p_regs->EP0_CONTROL, EP0_BCLR);
+               req->req.status = nret;
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline int _nbu2ss_ep0_status_stage(struct nbu2ss_udc *udc)
+{
+       struct nbu2ss_req       *req;
+       struct nbu2ss_ep        *ep = &udc->ep[0];
+
+       if (list_empty(&ep->queue))
+               req = NULL;
+       else
+               req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
+
+       if (req == NULL) {
+               req = &udc->ep0_req;
+               if (req->req.complete)
+                       req->req.complete(&ep->ep, &req->req);
+
+       } else {
+               if (req->req.complete)
+                       _nbu2ss_ep_done(ep, req, 0);
+       }
+
+       udc->ep0state = EP0_IDLE;
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_ep0_int(struct nbu2ss_udc *udc)
+{
+       int             i;
+       u32             status;
+       u32             intr;
+       int             nret = -1;
+
+       status = _nbu2ss_readl(&udc->p_regs->EP0_STATUS);
+       intr = status & EP0_STATUS_RW_BIT;
+       _nbu2ss_writel(&udc->p_regs->EP0_STATUS, ~(u32)intr);
+
+       status &= (SETUP_INT | EP0_IN_INT | EP0_OUT_INT
+                       | STG_END_INT | EP0_OUT_NULL_INT);
+
+       if (status == 0) {
+               pr_info("--- %s Not Decode Interrupt\n", __func__);
+               pr_info("--- EP0_STATUS = 0x%08x\n", intr);
+               return;
+       }
+
+       if (udc->gadget.speed == USB_SPEED_UNKNOWN)
+               udc->gadget.speed = _nbu2ss_get_speed(udc);
+
+       for (i = 0; i < EP0_END_XFER; i++) {
+               switch (udc->ep0state) {
+               case EP0_IDLE:
+                       if (status & SETUP_INT) {
+                               status = 0;
+                               nret = _nbu2ss_decode_request(udc);
+                       }
+                       break;
+
+               case EP0_IN_DATA_PHASE:
+                       if (status & EP0_IN_INT) {
+                               status &= ~EP0_IN_INT;
+                               nret = _nbu2ss_ep0_in_data_stage(udc);
+                       }
+                       break;
+
+               case EP0_OUT_DATA_PHASE:
+                       if (status & EP0_OUT_INT) {
+                               status &= ~EP0_OUT_INT;
+                               nret = _nbu2ss_ep0_out_data_stage(udc);
+                       }
+                       break;
+
+               case EP0_IN_STATUS_PHASE:
+                       if ((status & STG_END_INT) || (status & SETUP_INT)) {
+                               status &= ~(STG_END_INT | EP0_IN_INT);
+                               nret = _nbu2ss_ep0_status_stage(udc);
+                       }
+                       break;
+
+               case EP0_OUT_STATUS_PAHSE:
+                       if ((status & STG_END_INT)
+                       || (status & SETUP_INT)
+                       || (status & EP0_OUT_NULL_INT)) {
+                               status &= ~(STG_END_INT
+                                               | EP0_OUT_INT
+                                               | EP0_OUT_NULL_INT);
+
+                               nret = _nbu2ss_ep0_status_stage(udc);
+                       }
+
+                       break;
+
+               default:
+                       status = 0;
+                       break;
+               }
+
+               if (status == 0)
+                       break;
+       }
+
+       if (nret < 0) {
+               /* Send Stall */
+               _nbu2ss_set_endpoint_stall(udc, 0, TRUE);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_ep_done(
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req,
+       int status)
+{
+       struct nbu2ss_udc *udc = ep->udc;
+
+       list_del_init(&req->queue);
+
+       if (status == -ECONNRESET)
+               _nbu2ss_fifo_flush(udc, ep);
+
+       if (likely(req->req.status == -EINPROGRESS))
+               req->req.status = status;
+
+       if (ep->stalled)
+               _nbu2ss_epn_set_stall(udc, ep);
+       else {
+               if (!list_empty(&ep->queue))
+                       _nbu2ss_restert_transfer(ep);
+       }
+
+#ifdef USE_DMA
+       if ((ep->direct == USB_DIR_OUT) && (ep->epnum > 0) &&
+                       (req->req.dma != 0))
+               _nbu2ss_dma_unmap_single(udc, ep, req, USB_DIR_OUT);
+#endif
+
+       spin_unlock(&udc->lock);
+       req->req.complete(&ep->ep, &req->req);
+       spin_lock(&udc->lock);
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_epn_in_int(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req)
+{
+       int     result = 0;
+       u32     status;
+
+       PT_FC_REGS      preg = udc->p_regs;
+
+       if (req->dma_flag)
+               return;         /* DMA is forwarded */
+
+       req->req.actual += req->div_len;
+       req->div_len = 0;
+
+       if (req->req.actual != req->req.length) {
+               /*---------------------------------------------------------*/
+               /* remainder of data */
+               result = _nbu2ss_epn_in_transfer(udc, ep, req);
+
+       } else {
+               if ((req->zero != 0)
+               && ((req->req.actual % ep->ep.maxpacket) == 0)) {
+
+                       status =
+                       _nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_STATUS);
+
+                       if ((status & EPn_IN_FULL) == 0) {
+                               /*-----------------------------------------*/
+                               /* 0 Length Packet */
+                               req->zero = 0;
+                               _nbu2ss_zero_len_pkt(udc, ep->epnum);
+                       }
+                       return;
+               }
+       }
+
+       if (result <= 0) {
+               /*---------------------------------------------------------*/
+               /* Complete */
+               _nbu2ss_ep_done(ep, req, result);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_epn_out_int(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req)
+{
+       int     result;
+
+       result = _nbu2ss_epn_out_transfer(udc, ep, req);
+       if (result <= 0)
+               _nbu2ss_ep_done(ep, req, result);
+
+       return;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_epn_in_dma_int(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req)
+{
+       u32             mpkt;
+       u32             size;
+       struct usb_request *preq;
+
+       preq = &req->req;
+
+       if (req->dma_flag == FALSE)
+               return;
+
+       preq->actual += req->div_len;
+       req->div_len = 0;
+       req->dma_flag = FALSE;
+
+#ifdef USE_DMA
+       _nbu2ss_dma_unmap_single(udc, ep, req, USB_DIR_IN);
+#endif
+
+       if (preq->actual != preq->length) {
+               _nbu2ss_epn_in_transfer(udc, ep, req);
+       } else {
+               mpkt = ep->ep.maxpacket;
+               size = preq->actual % mpkt;
+               if (size > 0) {
+                       if (((preq->actual & 0x03) == 0) && (size < mpkt))
+                               _nbu2ss_ep_in_end(udc, ep->epnum, 0, 0);
+               } else {
+                       _nbu2ss_epn_in_int(udc, ep, req);
+               }
+       }
+
+       return;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_epn_out_dma_int(
+       struct nbu2ss_udc *udc,
+       struct nbu2ss_ep *ep,
+       struct nbu2ss_req *req)
+{
+       int             i;
+       u32             num;
+       u32             dmacnt, ep_dmacnt;
+       u32             mpkt;
+       PT_FC_REGS      preg = udc->p_regs;
+
+       num = ep->epnum - 1;
+
+       if (req->req.actual == req->req.length) {
+               if ((req->req.length % ep->ep.maxpacket)
+                               && (req->zero == 0)) {
+                       req->div_len = 0;
+                       req->dma_flag = FALSE;
+                       _nbu2ss_ep_done(ep, req, 0);
+                       return;
+               }
+       }
+
+       ep_dmacnt = _nbu2ss_readl(&preg->EP_REGS[num].EP_LEN_DCNT)
+                & EPn_DMACNT;
+       ep_dmacnt >>= 16;
+
+       for (i = 0; i < EPC_PLL_LOCK_COUNT; i++) {
+               dmacnt = _nbu2ss_readl(&preg->EP_DCR[num].EP_DCR1)
+                        & DCR1_EPn_DMACNT;
+               dmacnt >>= 16;
+               if (ep_dmacnt == dmacnt)
+                       break;
+       }
+
+       _nbu2ss_bitclr(&preg->EP_DCR[num].EP_DCR1, DCR1_EPn_REQEN);
+
+       if (dmacnt != 0) {
+               mpkt = ep->ep.maxpacket;
+               if ((req->div_len % mpkt) == 0)
+                       req->div_len -= mpkt * dmacnt;
+       }
+
+       if ((req->req.actual % ep->ep.maxpacket) > 0) {
+               if (req->req.actual == req->div_len) {
+                       req->div_len = 0;
+                       req->dma_flag = FALSE;
+                       _nbu2ss_ep_done(ep, req, 0);
+                       return;
+               }
+       }
+
+       req->req.actual += req->div_len;
+       req->div_len = 0;
+       req->dma_flag = FALSE;
+
+       _nbu2ss_epn_out_int(udc, ep, req);
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_epn_int(struct nbu2ss_udc *udc, u32 epnum)
+{
+       u32     num;
+       u32     status;
+
+       struct nbu2ss_req       *req;
+       struct nbu2ss_ep        *ep = &udc->ep[epnum];
+
+       num = epnum - 1;
+
+       /* Interrupt Status */
+       status = _nbu2ss_readl(&udc->p_regs->EP_REGS[num].EP_STATUS);
+
+       /* Interrupt Clear */
+       _nbu2ss_writel(&udc->p_regs->EP_REGS[num].EP_STATUS, ~(u32)status);
+
+       if (list_empty(&ep->queue))
+               req = NULL;
+       else
+               req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
+
+       if (req == NULL) {
+               /* pr_warning("=== %s(%d) req == NULL\n", __func__, epnum); */
+               return;
+       }
+
+       if (status & EPn_OUT_END_INT) {
+               status &= ~EPn_OUT_INT;
+               _nbu2ss_epn_out_dma_int(udc, ep, req);
+       }
+
+       if (status & EPn_OUT_INT)
+               _nbu2ss_epn_out_int(udc, ep, req);
+
+       if (status & EPn_IN_END_INT) {
+               status &= ~EPn_IN_INT;
+               _nbu2ss_epn_in_dma_int(udc, ep, req);
+       }
+
+       if (status & EPn_IN_INT)
+               _nbu2ss_epn_in_int(udc, ep, req);
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_ep_int(struct nbu2ss_udc *udc, u32 epnum)
+{
+       if (epnum == 0)
+               _nbu2ss_ep0_int(udc);
+       else
+               _nbu2ss_epn_int(udc, epnum);
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_ep0_enable(struct nbu2ss_udc *udc)
+{
+       _nbu2ss_bitset(&udc->p_regs->EP0_CONTROL, (EP0_AUTO | EP0_BCLR));
+       _nbu2ss_writel(&udc->p_regs->EP0_INT_ENA, EP0_INT_EN_BIT);
+
+       return;
+}
+
+#if 0
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_ep0_disable(struct nbu2ss_udc *udc)
+{
+       _nbu2ss_bitclr(&udc->p_regs->EP0_INT_ENA, EP0_INT_EN_BIT);
+
+       _nbu2ss_bitset(&udc->p_regs->EP0_CONTROL
+                       , (EP0_BCLR | EP0_INAK | EP0_ONAK | EP0_BCLR));
+
+       _nbu2ss_bitclr(&udc->p_regs->EP0_CONTROL, EP0_AUTO);
+
+       return;
+}
+#endif
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_nuke(struct nbu2ss_udc *udc,
+                       struct nbu2ss_ep *ep,
+                       int status)
+{
+       struct nbu2ss_req *req;
+
+       /* Endpoint Disable */
+       _nbu2ss_epn_exit(udc, ep);
+
+       /* DMA Disable */
+       _nbu2ss_ep_dma_exit(udc, ep);
+
+       if (list_empty(&ep->queue))
+               return 0;
+
+       /* called with irqs blocked */
+       while (!list_empty(&ep->queue)) {
+               req = list_entry(ep->queue.next, struct nbu2ss_req, queue);
+               _nbu2ss_ep_done(ep, req, status);
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_quiesce(struct nbu2ss_udc *udc)
+{
+       struct nbu2ss_ep        *ep;
+
+       udc->gadget.speed = USB_SPEED_UNKNOWN;
+
+       _nbu2ss_nuke(udc, &udc->ep[0], -ESHUTDOWN);
+
+       /* Endpoint n */
+       list_for_each_entry(ep, &udc->gadget.ep_list, ep.ep_list) {
+               _nbu2ss_nuke(udc, ep, -ESHUTDOWN);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_pullup(struct nbu2ss_udc *udc, int is_on)
+{
+       u32     reg_dt;
+
+       if (!udc) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       if (udc->vbus_active == 0)
+               return -ESHUTDOWN;
+
+       if (is_on) {
+               /* D+ Pullup */
+/*             INFO(" --- D+ Pullup\n"); */
+
+               if (udc->driver) {
+                       reg_dt = (_nbu2ss_readl(&udc->p_regs->USB_CONTROL)
+                               | PUE2) & ~(u32)CONNECTB;
+
+                       _nbu2ss_writel(&udc->p_regs->USB_CONTROL, reg_dt);
+               }
+
+       } else {
+               /* D+ Pulldown */
+/*             INFO(" --- D+ Pulldown\n"); */
+
+               reg_dt = (_nbu2ss_readl(&udc->p_regs->USB_CONTROL) | CONNECTB)
+                       & ~(u32)PUE2;
+
+               _nbu2ss_writel(&udc->p_regs->USB_CONTROL, reg_dt);
+               udc->gadget.speed = USB_SPEED_UNKNOWN;
+       }
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_fifo_flush(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep)
+{
+       PT_FC_REGS      p = udc->p_regs;
+
+       if (udc->vbus_active == 0)
+               return;
+
+       if (ep->epnum == 0) {
+               /* EP0 */
+               _nbu2ss_bitset(&p->EP0_CONTROL, EP0_BCLR);
+
+       } else {
+               /* EPn */
+               _nbu2ss_ep_dma_abort(udc, ep);
+               _nbu2ss_bitset(&p->EP_REGS[ep->epnum - 1].EP_CONTROL, EPn_BCLR);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static int _nbu2ss_enable_controller(struct nbu2ss_udc *udc)
+{
+       int     waitcnt = 0;
+
+       if (udc->udc_enabled)
+               return 0;
+
+#if 0
+       emxx_open_clockgate(EMXX_CLK_USB1);
+       /* emxx_clkctrl_off(EMXX_CLKCTRL_USB1); */
+       /* emxx_clkctrl_on(EMXX_CLKCTRL_USB1); */
+       emxx_unreset_device(EMXX_RST_USB1);
+#endif
+       /*
+               Reset
+       */
+       _nbu2ss_bitset(&udc->p_regs->EPCTR, (DIRPD | EPC_RST));
+       udelay(EPC_RST_DISABLE_TIME);   /* 1us wait */
+
+       _nbu2ss_bitclr(&udc->p_regs->EPCTR, DIRPD);
+       mdelay(EPC_DIRPD_DISABLE_TIME); /* 1ms wait */
+
+       _nbu2ss_bitclr(&udc->p_regs->EPCTR, EPC_RST);
+
+       _nbu2ss_writel(&udc->p_regs->AHBSCTR, WAIT_MODE);
+
+#if 0
+       /* DMA Mode Setting */
+       if ((system_rev & EMXX_REV_MASK) == EMXX_REV_ES1) {
+               _nbu2ss_bitset(&udc->p_regs->AHBMCTR, BURST_TYPE);
+               _nbu2ss_bitclr(&udc->p_regs->AHBMCTR, HTRANS_MODE);
+       } else
+#endif
+               _nbu2ss_writel(&udc->p_regs->AHBMCTR,
+                       HBUSREQ_MODE | HTRANS_MODE | WBURST_TYPE);
+
+       while (!(_nbu2ss_readl(&udc->p_regs->EPCTR) & PLL_LOCK)) {
+               waitcnt++;
+               udelay(1);      /* 1us wait */
+               if (waitcnt == EPC_PLL_LOCK_COUNT) {
+                       ERR("*** Reset Cancel failed\n");
+                       return -EINVAL;
+               }
+       };
+
+#if 0
+       if ((system_rev & EMXX_REV_MASK) < EMXX_REV_ES3)
+#endif
+               _nbu2ss_bitset(&udc->p_regs->UTMI_CHARACTER_1, USB_SQUSET);
+
+       _nbu2ss_bitset(&udc->p_regs->USB_CONTROL, (INT_SEL | SOF_RCV));
+
+       /* EP0 */
+       _nbu2ss_ep0_enable(udc);
+
+       /* USB Interrupt Enable */
+       _nbu2ss_bitset(&udc->p_regs->USB_INT_ENA, USB_INT_EN_BIT);
+
+       udc->udc_enabled = TRUE;
+
+       return 0;
+}
+
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_reset_controller(struct nbu2ss_udc *udc)
+{
+       _nbu2ss_bitset(&udc->p_regs->EPCTR, EPC_RST);
+       _nbu2ss_bitclr(&udc->p_regs->EPCTR, EPC_RST);
+}
+
+/*-------------------------------------------------------------------------*/
+static void _nbu2ss_disable_controller(struct nbu2ss_udc *udc)
+{
+       if (udc->udc_enabled) {
+               udc->udc_enabled = FALSE;
+               _nbu2ss_reset_controller(udc);
+               _nbu2ss_bitset(&udc->p_regs->EPCTR, (DIRPD | EPC_RST));
+       }
+#if 0
+       emxx_reset_device(EMXX_RST_USB1);
+       /* emxx_clkctrl_on(EMXX_CLKCTRL_USB1); */
+       emxx_close_clockgate(EMXX_CLK_USB1);
+#endif
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_check_vbus(struct nbu2ss_udc *udc)
+{
+       int     nret;
+       u32     reg_dt;
+
+       /* chattering */
+       mdelay(VBUS_CHATTERING_MDELAY);         /* wait (ms) */
+
+       /* VBUS ON Check*/
+       reg_dt = gpio_get_value(VBUS_VALUE);
+       if (reg_dt == 0) {
+
+               udc->linux_suspended = 0;
+
+               _nbu2ss_reset_controller(udc);
+               pr_info(" ----- VBUS OFF\n");
+
+               if (udc->vbus_active == 1) {
+                       /* VBUS OFF */
+                       udc->vbus_active = 0;
+                       if (udc->usb_suspended) {
+                               udc->usb_suspended = 0;
+                               /* _nbu2ss_reset_controller(udc); */
+                       }
+                       udc->devstate = USB_STATE_NOTATTACHED;
+
+                       _nbu2ss_quiesce(udc);
+                       if (udc->driver) {
+                               spin_unlock(&udc->lock);
+                               udc->driver->disconnect(&udc->gadget);
+                               spin_lock(&udc->lock);
+                       }
+
+                       _nbu2ss_disable_controller(udc);
+               }
+       } else {
+               mdelay(5);              /* wait (5ms) */
+               reg_dt = gpio_get_value(VBUS_VALUE);
+               if (reg_dt == 0)
+                       return;
+
+               pr_info(" ----- VBUS ON\n");
+
+               if (udc->linux_suspended)
+                       return;
+
+               if (udc->vbus_active == 0) {
+                       /* VBUS ON */
+                       udc->vbus_active = 1;
+                       udc->devstate = USB_STATE_POWERED;
+
+                       nret = _nbu2ss_enable_controller(udc);
+                       if (nret < 0) {
+                               _nbu2ss_disable_controller(udc);
+                               udc->vbus_active = 0;
+                               return;
+                       }
+
+                       _nbu2ss_pullup(udc, 1);
+
+#ifdef UDC_DEBUG_DUMP
+                       _nbu2ss_dump_register(udc);
+#endif /* UDC_DEBUG_DUMP */
+
+               } else {
+                       if (udc->devstate == USB_STATE_POWERED)
+                               _nbu2ss_pullup(udc, 1);
+               }
+       }
+
+       return;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_int_bus_reset(struct nbu2ss_udc *udc)
+{
+       udc->devstate           = USB_STATE_DEFAULT;
+       udc->remote_wakeup      = 0;
+
+       _nbu2ss_quiesce(udc);
+
+       udc->ep0state = EP0_IDLE;
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_int_usb_resume(struct nbu2ss_udc *udc)
+{
+       if (udc->usb_suspended == 1) {
+               udc->usb_suspended = 0;
+               if (udc->driver && udc->driver->resume) {
+                       spin_unlock(&udc->lock);
+                       udc->driver->resume(&udc->gadget);
+                       spin_lock(&udc->lock);
+               }
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static inline void _nbu2ss_int_usb_suspend(struct nbu2ss_udc *udc)
+{
+       u32     reg_dt;
+
+       if (udc->usb_suspended == 0) {
+               reg_dt = gpio_get_value(VBUS_VALUE);
+
+               if (reg_dt == 0)
+                       return;
+
+               udc->usb_suspended = 1;
+               if (udc->driver && udc->driver->suspend) {
+                       spin_unlock(&udc->lock);
+                       udc->driver->suspend(&udc->gadget);
+                       spin_lock(&udc->lock);
+               }
+
+               _nbu2ss_bitset(&udc->p_regs->USB_CONTROL, SUSPEND);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+/* VBUS (GPIO153) Interrupt */
+static irqreturn_t _nbu2ss_vbus_irq(int irq, void *_udc)
+{
+       struct nbu2ss_udc       *udc = (struct nbu2ss_udc *)_udc;
+
+       spin_lock(&udc->lock);
+       _nbu2ss_check_vbus(udc);
+       spin_unlock(&udc->lock);
+
+       return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+/* Interrupt (udc) */
+static irqreturn_t _nbu2ss_udc_irq(int irq, void *_udc)
+{
+       u8      suspend_flag = 0;
+       u32     status;
+       u32     epnum, int_bit;
+
+       struct nbu2ss_udc       *udc = (struct nbu2ss_udc *)_udc;
+       PT_FC_REGS              preg = udc->p_regs;
+
+       if (gpio_get_value(VBUS_VALUE) == 0) {
+               _nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW);
+               _nbu2ss_writel(&preg->USB_INT_ENA, 0);
+               return IRQ_HANDLED;
+       }
+
+       spin_lock(&udc->lock);
+
+       for (;;) {
+               if (gpio_get_value(VBUS_VALUE) == 0) {
+                       _nbu2ss_writel(&preg->USB_INT_STA, ~USB_INT_STA_RW);
+                       _nbu2ss_writel(&preg->USB_INT_ENA, 0);
+                       status = 0;
+               } else
+                       status = _nbu2ss_readl(&preg->USB_INT_STA);
+
+               if (status == 0)
+                       break;
+
+               _nbu2ss_writel(&preg->USB_INT_STA, ~(status & USB_INT_STA_RW));
+
+               if (status & USB_RST_INT) {
+                       /* USB Reset */
+                       _nbu2ss_int_bus_reset(udc);
+               }
+
+               if (status & RSUM_INT) {
+                       /* Resume */
+                       _nbu2ss_int_usb_resume(udc);
+               }
+
+               if (status & SPND_INT) {
+                       /* Suspend */
+                       suspend_flag = 1;
+               }
+
+               if (status & EPn_INT) {
+                       /* EP INT */
+                       int_bit = status >> 8;
+
+                       for (epnum = 0; epnum < NUM_ENDPOINTS; epnum++) {
+
+                               if (0x01 & int_bit)
+                                       _nbu2ss_ep_int(udc, epnum);
+
+                               int_bit >>= 1;
+
+                               if (int_bit == 0)
+                                       break;
+                       }
+               }
+       }
+
+       if (suspend_flag)
+               _nbu2ss_int_usb_suspend(udc);
+
+       spin_unlock(&udc->lock);
+
+       return IRQ_HANDLED;
+}
+
+/*-------------------------------------------------------------------------*/
+/* usb_ep_ops */
+static int nbu2ss_ep_enable(
+       struct usb_ep *_ep,
+       const struct usb_endpoint_descriptor *desc)
+{
+       u8              ep_type;
+       unsigned long   flags;
+
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+
+       if ((_ep == NULL) || (desc == NULL)) {
+               ERR(" *** %s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       if ((ep == NULL) || (ep->udc == NULL)) {
+               ERR(" *** %s, ep == NULL !!\n", __func__);
+               return -EINVAL;
+       }
+
+       ep_type = desc->bmAttributes & USB_ENDPOINT_XFERTYPE_MASK;
+       if ((ep_type == USB_ENDPOINT_XFER_CONTROL)
+               || (ep_type == USB_ENDPOINT_XFER_ISOC)) {
+
+               ERR(" *** %s, bat bmAttributes\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = ep->udc;
+       if (udc->vbus_active == 0)
+               return -ESHUTDOWN;
+
+       if ((udc->driver == NULL)
+               || (udc->gadget.speed == USB_SPEED_UNKNOWN)) {
+
+               ERR(" *** %s, udc !!\n", __func__);
+               return -ESHUTDOWN;
+       }
+
+       spin_lock_irqsave(&udc->lock, flags);
+
+       ep->desc = desc;
+       ep->epnum = desc->bEndpointAddress & USB_ENDPOINT_NUMBER_MASK;
+       ep->direct = desc->bEndpointAddress & USB_ENDPOINT_DIR_MASK;
+       ep->ep_type = ep_type;
+       ep->wedged = 0;
+       ep->halted = FALSE;
+       ep->stalled = FALSE;
+
+       ep->ep.maxpacket = le16_to_cpu(desc->wMaxPacketSize);
+
+       /* DMA setting */
+       _nbu2ss_ep_dma_init(udc, ep);
+
+       /* Endpoint setting */
+       _nbu2ss_ep_init(udc, ep);
+
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_ep_disable(struct usb_ep *_ep)
+{
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+
+       if (_ep == NULL) {
+               ERR(" *** %s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       if ((ep == NULL) || (ep->udc == NULL)) {
+               ERR(" *** %s, ep == NULL !!\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = ep->udc;
+       if (udc->vbus_active == 0)
+               return -ESHUTDOWN;
+
+       spin_lock_irqsave(&udc->lock, flags);
+       _nbu2ss_nuke(udc, ep, -EINPROGRESS);            /* dequeue request */
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static struct usb_request *nbu2ss_ep_alloc_request(
+       struct usb_ep *ep,
+       gfp_t gfp_flags)
+{
+       struct nbu2ss_req *req;
+
+       req = kzalloc(sizeof(*req), gfp_flags);
+       if (!req)
+               return 0;
+
+#ifdef USE_DMA
+       req->req.dma = DMA_ADDR_INVALID;
+#endif
+       INIT_LIST_HEAD(&req->queue);
+
+       return &req->req;
+}
+
+/*-------------------------------------------------------------------------*/
+static void nbu2ss_ep_free_request(
+       struct usb_ep *_ep,
+       struct usb_request *_req)
+{
+       struct nbu2ss_req *req;
+
+       if (_req != NULL) {
+               req = container_of(_req, struct nbu2ss_req, req);
+
+               if (req != NULL)
+                       kfree(req);
+       }
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_ep_queue(
+       struct usb_ep *_ep,
+       struct usb_request *_req,
+       gfp_t gfp_flags)
+{
+       struct nbu2ss_req       *req;
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+       bool                    bflag;
+       int                     result = -EINVAL;
+
+       /* catch various bogus parameters */
+       if ((_ep == NULL) || (_req == NULL)) {
+               if (_ep == NULL)
+                       ERR("*** %s --- _ep == NULL\n", __func__);
+
+               if (_req == NULL)
+                       ERR("*** %s --- _req == NULL\n", __func__);
+
+               return -EINVAL;
+       }
+
+       req = container_of(_req, struct nbu2ss_req, req);
+       if (unlikely
+           (!_req->complete || !_req->buf
+            || !list_empty(&req->queue))) {
+
+               if (!_req->complete)
+                       ERR("*** %s --- !_req->complete\n", __func__);
+
+               if (!_req->buf)
+                       ERR("*** %s --- !_req->buf\n", __func__);
+
+               if (!list_empty(&req->queue))
+                       ERR("*** %s --- !list_empty(&req->queue)\n", __func__);
+
+               return -EINVAL;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       udc = ep->udc;
+
+/*     INFO("=== %s(ep%d), zero=%d\n", __func__, ep->epnum, _req->zero); */
+
+       if (udc->vbus_active == 0) {
+               pr_info("Can't ep_queue (VBUS OFF)\n");
+               return -ESHUTDOWN;
+       }
+
+       if (unlikely(!udc->driver)) {
+               ERR("%s, bogus device state %p\n", __func__, udc->driver);
+               return -ESHUTDOWN;
+       }
+
+       spin_lock_irqsave(&udc->lock, flags);
+
+#ifdef USE_DMA
+       if ((u32)req->req.buf & 0x3)
+               req->unaligned = TRUE;
+       else
+               req->unaligned = FALSE;
+
+       if (req->unaligned) {
+               if (ep->virt_buf == NULL)
+                       ep->virt_buf = (u8 *)dma_alloc_coherent(
+                               NULL, PAGE_SIZE,
+                               &ep->phys_buf, GFP_KERNEL | GFP_DMA);
+               if (ep->epnum > 0)  {
+                       if (ep->direct == USB_DIR_IN)
+                               memcpy(ep->virt_buf, req->req.buf,
+                                       req->req.length);
+               }
+       }
+
+       if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT) &&
+                       (req->req.dma != 0))
+               _nbu2ss_dma_map_single(udc, ep, req, USB_DIR_OUT);
+#endif
+
+       _req->status = -EINPROGRESS;
+       _req->actual = 0;
+
+       bflag = list_empty(&ep->queue);
+       list_add_tail(&req->queue, &ep->queue);
+
+       if ((bflag != FALSE) && (ep->stalled == FALSE)) {
+
+               result = _nbu2ss_start_transfer(udc, ep, req, FALSE);
+               if (result < 0) {
+                       ERR(" *** %s, result = %d\n", __func__, result);
+                       list_del(&req->queue);
+               } else if ((ep->epnum > 0) && (ep->direct == USB_DIR_OUT)) {
+#ifdef USE_DMA
+                       if (req->req.length < 4 &&
+                               req->req.length == req->req.actual)
+#else
+                       if (req->req.length == req->req.actual)
+#endif
+                               _nbu2ss_ep_done(ep, req, result);
+               }
+       }
+
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_ep_dequeue(
+       struct usb_ep *_ep,
+       struct usb_request *_req)
+{
+       struct nbu2ss_req       *req;
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+       unsigned long flags;
+
+       /*INFO("=== %s()\n", __func__);*/
+
+       /* catch various bogus parameters */
+       if ((_ep == NULL) || (_req == NULL)) {
+               /* ERR("%s, bad param(1)\n", __func__); */
+               return -EINVAL;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       if (!ep) {
+               ERR("%s, ep == NULL !!\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = ep->udc;
+       if (udc == NULL)
+               return -EINVAL;
+
+       spin_lock_irqsave(&udc->lock, flags);
+
+       /* make sure it's actually queued on this endpoint */
+       list_for_each_entry(req, &ep->queue, queue) {
+               if (&req->req == _req)
+                       break;
+       }
+       if (&req->req != _req) {
+               spin_unlock_irqrestore(&udc->lock, flags);
+               pr_debug("%s no queue(EINVAL)\n", __func__);
+               return -EINVAL;
+       }
+
+       _nbu2ss_ep_done(ep, req, -ECONNRESET);
+
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_ep_set_halt(struct usb_ep *_ep, int value)
+{
+       u8              ep_adrs;
+       unsigned long   flags;
+
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (!_ep) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       if (!ep) {
+               ERR("%s, bad ep\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = ep->udc;
+       if (!udc) {
+               ERR(" *** %s, bad udc\n", __func__);
+               return -EINVAL;
+       }
+
+       spin_lock_irqsave(&udc->lock, flags);
+
+       ep_adrs = ep->epnum | ep->direct;
+       if (value == 0) {
+               _nbu2ss_set_endpoint_stall(udc, ep_adrs, value);
+               ep->stalled = FALSE;
+       } else {
+               if (list_empty(&ep->queue))
+                       _nbu2ss_epn_set_stall(udc, ep);
+               else
+                       ep->stalled = TRUE;
+       }
+
+       if (value == 0)
+               ep->wedged = 0;
+
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+static int nbu2ss_ep_set_wedge(struct usb_ep *_ep)
+{
+       return nbu2ss_ep_set_halt(_ep, 1);
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_ep_fifo_status(struct usb_ep *_ep)
+{
+       u32             data;
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+       PT_FC_REGS              preg;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (!_ep) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       if (!ep) {
+               ERR("%s, bad ep\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = ep->udc;
+       if (!udc) {
+               ERR("%s, bad udc\n", __func__);
+               return -EINVAL;
+       }
+
+       preg = udc->p_regs;
+
+       data = gpio_get_value(VBUS_VALUE);
+       if (data == 0)
+               return -EINVAL;
+
+       spin_lock_irqsave(&udc->lock, flags);
+
+       if (ep->epnum == 0) {
+               data = _nbu2ss_readl(&preg->EP0_LENGTH) & EP0_LDATA;
+
+       } else {
+               data = _nbu2ss_readl(&preg->EP_REGS[ep->epnum-1].EP_LEN_DCNT)
+                       & EPn_LDATA;
+       }
+
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static void  nbu2ss_ep_fifo_flush(struct usb_ep *_ep)
+{
+       u32                     data;
+       struct nbu2ss_ep        *ep;
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (!_ep) {
+               ERR("%s, bad param\n", __func__);
+               return;
+       }
+
+       ep = container_of(_ep, struct nbu2ss_ep, ep);
+       if (!_ep) {
+               ERR("%s, bad ep\n", __func__);
+               return;
+       }
+
+       udc = ep->udc;
+       if (!udc) {
+               ERR("%s, bad udc\n", __func__);
+               return;
+       }
+
+       data = gpio_get_value(VBUS_VALUE);
+       if (data == 0)
+               return;
+
+       spin_lock_irqsave(&udc->lock, flags);
+       _nbu2ss_fifo_flush(udc, ep);
+       spin_unlock_irqrestore(&udc->lock, flags);
+}
+
+/*-------------------------------------------------------------------------*/
+static struct usb_ep_ops nbu2ss_ep_ops = {
+       .enable         = nbu2ss_ep_enable,
+       .disable        = nbu2ss_ep_disable,
+
+       .alloc_request  = nbu2ss_ep_alloc_request,
+       .free_request   = nbu2ss_ep_free_request,
+
+       .queue          = nbu2ss_ep_queue,
+       .dequeue        = nbu2ss_ep_dequeue,
+
+       .set_halt       = nbu2ss_ep_set_halt,
+       .set_wedge      = nbu2ss_ep_set_wedge,
+
+       .fifo_status    = nbu2ss_ep_fifo_status,
+       .fifo_flush     = nbu2ss_ep_fifo_flush,
+};
+
+
+/*-------------------------------------------------------------------------*/
+/* usb_gadget_ops */
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_get_frame(struct usb_gadget *pgadget)
+{
+       u32                     data;
+       struct nbu2ss_udc       *udc;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (pgadget == NULL) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = container_of(pgadget, struct nbu2ss_udc, gadget);
+       if (udc == NULL) {
+               ERR("%s, udc == NULL\n", __func__);
+               return -EINVAL;
+       }
+
+       data = gpio_get_value(VBUS_VALUE);
+       if (data == 0)
+               return -EINVAL;
+
+       data = _nbu2ss_readl(&udc->p_regs->USB_ADDRESS) & FRAME;
+
+       return data;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_wakeup(struct usb_gadget *pgadget)
+{
+       int     i;
+       u32     data;
+
+       struct nbu2ss_udc       *udc;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (pgadget == NULL) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = container_of(pgadget, struct nbu2ss_udc, gadget);
+       if (udc == NULL) {
+               ERR("%s, udc == NULL\n", __func__);
+               return -EINVAL;
+       }
+
+       data = gpio_get_value(VBUS_VALUE);
+       if (data == 0) {
+               pr_warning("VBUS LEVEL = %d\n", data);
+               return -EINVAL;
+       }
+
+       _nbu2ss_bitset(&udc->p_regs->EPCTR, PLL_RESUME);
+
+       for (i = 0; i < EPC_PLL_LOCK_COUNT; i++) {
+               data = _nbu2ss_readl(&udc->p_regs->EPCTR);
+
+               if (data & PLL_LOCK)
+                       break;
+       }
+
+       _nbu2ss_bitclr(&udc->p_regs->EPCTR, PLL_RESUME);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_set_selfpowered(struct usb_gadget *pgadget,
+                                       int is_selfpowered)
+{
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (pgadget == NULL) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = container_of(pgadget, struct nbu2ss_udc, gadget);
+
+       spin_lock_irqsave(&udc->lock, flags);
+       udc->self_powered = (is_selfpowered != 0);
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_vbus_session(struct usb_gadget *pgadget, int is_active)
+{
+/*     INFO("=== %s()\n", __func__); */
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_vbus_draw(struct usb_gadget *pgadget, unsigned mA)
+{
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (pgadget == NULL) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = container_of(pgadget, struct nbu2ss_udc, gadget);
+
+       spin_lock_irqsave(&udc->lock, flags);
+       udc->mA = mA;
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_pullup(struct usb_gadget *pgadget, int is_on)
+{
+       struct nbu2ss_udc       *udc;
+       unsigned long           flags;
+
+/*     INFO("=== %s()\n", __func__); */
+
+       if (pgadget == NULL) {
+               ERR("%s, bad param\n", __func__);
+               return -EINVAL;
+       }
+
+       udc = container_of(pgadget, struct nbu2ss_udc, gadget);
+
+       if (udc->driver == NULL) {
+               pr_warning("%s, Not Regist Driver\n", __func__);
+               return -EINVAL;
+       }
+
+       if (udc->vbus_active == 0)
+               return -ESHUTDOWN;
+
+       spin_lock_irqsave(&udc->lock, flags);
+       _nbu2ss_pullup(udc, is_on);
+       spin_unlock_irqrestore(&udc->lock, flags);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_gad_ioctl(
+       struct usb_gadget *pgadget,
+       unsigned code,
+       unsigned long param)
+{
+/*     INFO("=== %s()\n", __func__); */
+       return 0;
+}
+
+
+static const struct usb_gadget_ops nbu2ss_gadget_ops = {
+       .get_frame              = nbu2ss_gad_get_frame,
+       .wakeup                 = nbu2ss_gad_wakeup,
+       .set_selfpowered        = nbu2ss_gad_set_selfpowered,
+       .vbus_session           = nbu2ss_gad_vbus_session,
+       .vbus_draw              = nbu2ss_gad_vbus_draw,
+       .pullup                 = nbu2ss_gad_pullup,
+       .ioctl                  = nbu2ss_gad_ioctl,
+};
+
+static char g_ep0_name[] = "ep0";
+static char g_ep1_name[] = "ep1-bulk";
+static char g_ep2_name[] = "ep2-bulk";
+static char g_ep3_name[] = "ep3in-int";
+static char g_ep4_name[] = "ep4-iso";
+static char g_ep5_name[] = "ep5-iso";
+static char g_ep6_name[] = "ep6-bulk";
+static char g_ep7_name[] = "ep7-bulk";
+static char g_ep8_name[] = "ep8in-int";
+static char g_ep9_name[] = "ep9-iso";
+static char g_epa_name[] = "epa-iso";
+static char g_epb_name[] = "epb-bulk";
+static char g_epc_name[] = "epc-nulk";
+static char g_epd_name[] = "epdin-int";
+
+static char *gp_ep_name[NUM_ENDPOINTS] = {
+       g_ep0_name,
+       g_ep1_name,
+       g_ep2_name,
+       g_ep3_name,
+       g_ep4_name,
+       g_ep5_name,
+       g_ep6_name,
+       g_ep7_name,
+       g_ep8_name,
+       g_ep9_name,
+       g_epa_name,
+       g_epb_name,
+       g_epc_name,
+       g_epd_name,
+};
+
+/*-------------------------------------------------------------------------*/
+static void __init nbu2ss_drv_set_ep_info(
+       struct nbu2ss_udc       *udc,
+       struct nbu2ss_ep        *ep,
+       u8 *name)
+{
+       ep->udc = udc;
+       ep->desc = NULL;
+
+       ep->ep.driver_data = NULL;
+       ep->ep.name = name;
+       ep->ep.ops = &nbu2ss_ep_ops;
+
+       if (isdigit(name[2])) {
+
+               long    num;
+               int     res;
+               char    tempbuf[2];
+
+               tempbuf[0] = name[2];
+               tempbuf[1] = '\0';
+               res = strict_strtol(tempbuf, 16, &num);
+
+               if (num == 0)
+                       ep->ep.maxpacket = EP0_PACKETSIZE;
+               else
+                       ep->ep.maxpacket = EP_PACKETSIZE;
+
+       } else {
+               ep->ep.maxpacket = EP_PACKETSIZE;
+       }
+
+       list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
+       INIT_LIST_HEAD(&ep->queue);
+}
+
+/*-------------------------------------------------------------------------*/
+static void __init nbu2ss_drv_ep_init(struct nbu2ss_udc *udc)
+{
+       int     i;
+
+       INIT_LIST_HEAD(&udc->gadget.ep_list);
+       udc->gadget.ep0 = &udc->ep[0].ep;
+
+
+       for (i = 0; i < NUM_ENDPOINTS; i++)
+               nbu2ss_drv_set_ep_info(udc, &udc->ep[i], gp_ep_name[i]);
+
+       list_del_init(&udc->ep[0].ep.ep_list);
+}
+
+/*-------------------------------------------------------------------------*/
+/* platform_driver */
+static int __init nbu2ss_drv_contest_init(
+       struct platform_device *pdev,
+       struct nbu2ss_udc *udc)
+{
+       spin_lock_init(&udc->lock);
+       udc->dev = &pdev->dev;
+
+       udc->self_powered = 1;
+       udc->devstate = USB_STATE_NOTATTACHED;
+       udc->pdev = pdev;
+       udc->mA = 0;
+
+       udc->pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+
+       /* init Endpoint */
+       nbu2ss_drv_ep_init(udc);
+
+       /* init Gadget */
+       udc->gadget.ops = &nbu2ss_gadget_ops;
+       udc->gadget.ep0 = &udc->ep[0].ep;
+       udc->gadget.speed = USB_SPEED_UNKNOWN;
+       udc->gadget.name = driver_name;
+       //udc->gadget.is_dualspeed = 1;
+
+       device_initialize(&udc->gadget.dev);
+
+       dev_set_name(&udc->gadget.dev, "gadget");
+       udc->gadget.dev.parent = &pdev->dev;
+       udc->gadget.dev.dma_mask = pdev->dev.dma_mask;
+
+       return 0;
+}
+
+/*
+ *     probe - binds to the platform device
+ */
+static int nbu2ss_drv_probe(struct platform_device *pdev)
+{
+       int     status = -ENODEV;
+       struct nbu2ss_udc       *udc;
+       struct resource *r;
+       int irq;
+       void __iomem *mmio_base;
+
+       udc = &udc_controller;
+       memset(udc, 0, sizeof(struct nbu2ss_udc));
+
+       platform_set_drvdata(pdev, udc);
+
+       /* require I/O memory and IRQ to be provided as resources */
+       r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+       mmio_base = devm_ioremap_resource(&pdev->dev, r);
+       if (IS_ERR(mmio_base))
+               return PTR_ERR(mmio_base);
+
+       irq = platform_get_irq(pdev, 0);
+       if (irq < 0) {
+               dev_err(&pdev->dev, "failed to get IRQ\n");
+               return irq;
+       }
+       status = devm_request_irq(&pdev->dev, irq, _nbu2ss_udc_irq,
+                                 0, driver_name, udc);
+
+       /* IO Memory */
+       udc->p_regs = (PT_FC_REGS)mmio_base;
+
+       /* USB Function Controller Interrupt */
+       if (status != 0) {
+               ERR("request_irq(USB_UDC_IRQ_1) failed\n");
+               goto cleanup1;
+       }
+
+       /* Driver Initialization */
+       status = nbu2ss_drv_contest_init(pdev, udc);
+       if (status < 0) {
+               /* Error */
+               goto cleanup1;
+       }
+
+       /* VBUS Interrupt */
+       irq_set_irq_type(INT_VBUS, IRQ_TYPE_EDGE_BOTH);
+       status = request_irq(INT_VBUS,
+                               _nbu2ss_vbus_irq,
+                               IRQF_SHARED,
+                               driver_name,
+                               udc);
+
+       if (status != 0) {
+               ERR("request_irq(INT_VBUS) failed\n");
+               goto cleanup1;
+       }
+
+       return status;
+
+cleanup1:
+       return status;
+}
+
+/*-------------------------------------------------------------------------*/
+static void nbu2ss_drv_shutdown(struct platform_device *pdev)
+{
+       struct nbu2ss_udc       *udc;
+
+       udc = platform_get_drvdata(pdev);
+       if (udc == NULL)
+               return;
+
+       _nbu2ss_disable_controller(udc);
+}
+
+/*-------------------------------------------------------------------------*/
+static int __exit nbu2ss_drv_remove(struct platform_device *pdev)
+{
+       struct nbu2ss_udc       *udc;
+       struct nbu2ss_ep        *ep;
+       int     i;
+
+       udc = &udc_controller;
+
+       for (i = 0; i < NUM_ENDPOINTS; i++) {
+               ep = &udc->ep[i];
+               if (ep->virt_buf)
+                       dma_free_coherent(NULL, PAGE_SIZE,
+                               (void *)ep->virt_buf, ep->phys_buf);
+       }
+
+       /* Interrupt Handler - Release */
+       free_irq(INT_VBUS, udc);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_drv_suspend(struct platform_device *pdev, pm_message_t state)
+{
+       struct nbu2ss_udc       *udc;
+
+       udc = platform_get_drvdata(pdev);
+       if (udc == NULL)
+               return 0;
+
+       if (udc->vbus_active) {
+               udc->vbus_active = 0;
+               udc->devstate = USB_STATE_NOTATTACHED;
+               udc->linux_suspended = 1;
+
+               if (udc->usb_suspended) {
+                       udc->usb_suspended = 0;
+                       _nbu2ss_reset_controller(udc);
+               }
+
+               _nbu2ss_quiesce(udc);
+       }
+       _nbu2ss_disable_controller(udc);
+
+       return 0;
+}
+
+/*-------------------------------------------------------------------------*/
+static int nbu2ss_drv_resume(struct platform_device *pdev)
+{
+       u32     data;
+       struct nbu2ss_udc       *udc;
+
+       udc = platform_get_drvdata(pdev);
+       if (udc == NULL)
+               return 0;
+
+       data = gpio_get_value(VBUS_VALUE);
+       if (data) {
+               udc->vbus_active = 1;
+               udc->devstate = USB_STATE_POWERED;
+               _nbu2ss_enable_controller(udc);
+               _nbu2ss_pullup(udc, 1);
+       }
+
+       udc->linux_suspended = 0;
+
+       return 0;
+}
+
+
+static struct platform_driver udc_driver = {
+       .probe          = nbu2ss_drv_probe,
+       .shutdown       = nbu2ss_drv_shutdown,
+       .remove         = __exit_p(nbu2ss_drv_remove),
+       .suspend        = nbu2ss_drv_suspend,
+       .resume         = nbu2ss_drv_resume,
+       .driver         = {
+               .owner  = THIS_MODULE,
+               .name   = driver_name,
+       },
+};
+
+module_platform_driver(udc_driver);
+
+MODULE_DESCRIPTION(DRIVER_DESC);
+MODULE_AUTHOR("Renesas Electronics Corporation");
+MODULE_LICENSE("GPL");
+
+
diff --git a/drivers/staging/emxx_udc/emxx_udc.h b/drivers/staging/emxx_udc/emxx_udc.h
new file mode 100644 (file)
index 0000000..578fdcf
--- /dev/null
@@ -0,0 +1,653 @@
+/*
+ *  EMXX FCD (Function Controller Driver) for USB.
+ *
+ *  Copyright (C) 2010 Renesas Electronics Corporation
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2
+ *  as published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software Foundation,
+ *  Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
+ */
+
+
+
+
+#ifndef _LINUX_EMXX_H
+#define _LINUX_EMXX_H
+
+
+
+/*---------------------------------------------------------------------------*/
+/*----------------- Default undef */
+#if 0
+#define DEBUG
+#define UDC_DEBUG_DUMP
+#endif
+
+/* #define USE_INT_COUNT_OVER */
+
+/*----------------- Default define */
+#define        USE_DMA 1
+#define USE_SUSPEND_WAIT       1
+
+
+
+#ifndef TRUE
+#define TRUE   1
+#define FALSE  0
+#endif
+
+
+/*------------ Board dependence(Resource) */
+#define        VBUS_VALUE              GPIO_VBUS
+
+/* below hacked up for staging integration */
+#define GPIO_VBUS 0 /* GPIO_P153 on KZM9D */
+#define INT_VBUS 0 /* IRQ for GPIO_P153 */
+
+/*------------ Board dependence(Wait) */
+
+/* CHATTERING wait time ms */
+#define VBUS_CHATTERING_MDELAY         1
+/* DMA Abort wait time ms */
+#define DMA_DISABLE_TIME               10
+
+
+
+/*------------ Controller dependence */
+#define NUM_ENDPOINTS          14              /* Endpoint */
+#define REG_EP_NUM             15              /* Endpoint Register */
+#define DMA_MAX_COUNT          256             /* DMA Block */
+
+
+
+#define EPC_RST_DISABLE_TIME           1       /* 1 usec */
+#define EPC_DIRPD_DISABLE_TIME         1       /* 1 msec */
+#define EPC_PLL_LOCK_COUNT             1000    /* 1000 */
+#define IN_DATA_EMPTY_COUNT            1000    /* 1000 */
+
+#define CHATGER_TIME                   700     /* 700msec */
+#define USB_SUSPEND_TIME               2000    /* 2 sec */
+
+
+/* U2F FLAG */
+#define U2F_ENABLE             1
+#define U2F_DISABLE            0
+
+
+/*------- BIT */
+#define BIT00          0x00000001
+#define BIT01          0x00000002
+#define BIT02          0x00000004
+#define BIT03          0x00000008
+#define BIT04          0x00000010
+#define BIT05          0x00000020
+#define BIT06          0x00000040
+#define BIT07          0x00000080
+#define BIT08          0x00000100
+#define BIT09          0x00000200
+#define BIT10          0x00000400
+#define BIT11          0x00000800
+#define BIT12          0x00001000
+#define BIT13          0x00002000
+#define BIT14          0x00004000
+#define BIT15          0x00008000
+#define BIT16          0x00010000
+#define BIT17          0x00020000
+#define BIT18          0x00040000
+#define BIT19          0x00080000
+#define BIT20          0x00100000
+#define BIT21          0x00200000
+#define BIT22          0x00400000
+#define BIT23          0x00800000
+#define BIT24          0x01000000
+#define BIT25          0x02000000
+#define BIT26          0x04000000
+#define BIT27          0x08000000
+#define BIT28          0x10000000
+#define BIT29          0x20000000
+#define BIT30          0x40000000
+#define BIT31          0x80000000
+
+#if 0
+/*------- (0x0000) USB Control Register */
+#define USBTESTMODE                    (BIT18+BIT17+BIT16)
+#define TEST_J                         BIT16
+#define TEST_K                         BIT17
+#define TEST_SE0_NAK                   (BIT17+BIT16)
+#define TEST_PACKET                    BIT18
+#endif
+#define TEST_FORCE_ENABLE              (BIT18+BIT16)
+
+#define INT_SEL                                BIT10
+#define CONSTFS                                BIT09
+#define SOF_RCV                                BIT08
+#define RSUM_IN                                BIT07
+#define SUSPEND                                BIT06
+#define CONF                           BIT05
+#define DEFAULT                                BIT04
+#define CONNECTB                       BIT03
+#define PUE2                           BIT02
+
+#define MAX_TEST_MODE_NUM              0x05
+#define TEST_MODE_SHIFT                        16
+
+/*------- (0x0004) USB Status Register */
+#define SPEED_MODE                     BIT06
+#define HIGH_SPEED                     BIT06
+
+#define CONF                           BIT05
+#define DEFAULT                                BIT04
+#define USB_RST                                BIT03
+#define SPND_OUT                       BIT02
+#define RSUM_OUT                       BIT01
+
+/*------- (0x0008) USB Address Register */
+#define USB_ADDR                       0x007F0000
+#define SOF_STATUS                     BIT15
+#define UFRAME                         (BIT14+BIT13+BIT12)
+#define FRAME                          0x000007FF
+
+#define USB_ADRS_SHIFT                 16
+
+/*------- (0x000C) UTMI Characteristic 1 Register */
+#define SQUSET                         (BIT07+BIT06+BIT05+BIT04)
+
+#define USB_SQUSET                     (BIT06+BIT05+BIT04)
+
+/*------- (0x0010) TEST Control Register */
+#define FORCEHS                                BIT02
+#define CS_TESTMODEEN                  BIT01
+#define LOOPBACK                       BIT00
+
+/*------- (0x0018) Setup Data 0 Register */
+/*------- (0x001C) Setup Data 1 Register */
+
+/*------- (0x0020) USB Interrupt Status Register */
+#define EPn_INT                                0x00FFFF00
+#define EP15_INT                       BIT23
+#define EP14_INT                       BIT22
+#define EP13_INT                       BIT21
+#define EP12_INT                       BIT20
+#define EP11_INT                       BIT19
+#define EP10_INT                       BIT18
+#define EP9_INT                                BIT17
+#define EP8_INT                                BIT16
+#define EP7_INT                                BIT15
+#define EP6_INT                                BIT14
+#define EP5_INT                                BIT13
+#define EP4_INT                                BIT12
+#define EP3_INT                                BIT11
+#define EP2_INT                                BIT10
+#define EP1_INT                                BIT09
+#define EP0_INT                                BIT08
+#define SPEED_MODE_INT                 BIT06
+#define SOF_ERROR_INT                  BIT05
+#define SOF_INT                                BIT04
+#define USB_RST_INT                    BIT03
+#define SPND_INT                       BIT02
+#define RSUM_INT                       BIT01
+
+#define USB_INT_STA_RW                 0x7E
+
+/*------- (0x0024) USB Interrupt Enable Register */
+#define EP15_0_EN                      0x00FFFF00
+#define EP15_EN                                BIT23
+#define EP14_EN                                BIT22
+#define EP13_EN                                BIT21
+#define EP12_EN                                BIT20
+#define EP11_EN                                BIT19
+#define EP10_EN                                BIT18
+#define EP9_EN                         BIT17
+#define EP8_EN                         BIT16
+#define EP7_EN                         BIT15
+#define EP6_EN                         BIT14
+#define EP5_EN                         BIT13
+#define EP4_EN                         BIT12
+#define EP3_EN                         BIT11
+#define EP2_EN                         BIT10
+#define EP1_EN                         BIT09
+#define EP0_EN                         BIT08
+#define SPEED_MODE_EN                  BIT06
+#define SOF_ERROR_EN                   BIT05
+#define SOF_EN                         BIT04
+#define USB_RST_EN                     BIT03
+#define SPND_EN                                BIT02
+#define RSUM_EN                                BIT01
+
+#define USB_INT_EN_BIT \
+       (EP0_EN|SPEED_MODE_EN|USB_RST_EN|SPND_EN|RSUM_EN)
+
+/*------- (0x0028) EP0 Control Register */
+#define EP0_STGSEL                     BIT18
+#define EP0_OVERSEL                    BIT17
+#define EP0_AUTO                       BIT16
+#define EP0_PIDCLR                     BIT09
+#define EP0_BCLR                       BIT08
+#define EP0_DEND                       BIT07
+#define EP0_DW                         (BIT06+BIT05)
+#define EP0_DW4                                0
+#define EP0_DW3                                (BIT06+BIT05)
+#define EP0_DW2                                BIT06
+#define EP0_DW1                                BIT05
+
+#define EP0_INAK_EN                    BIT04
+#define EP0_PERR_NAK_CLR               BIT03
+#define EP0_STL                                BIT02
+#define EP0_INAK                       BIT01
+#define EP0_ONAK                       BIT00
+
+/*------- (0x002C) EP0 Status Register */
+#define EP0_PID                                BIT18
+#define EP0_PERR_NAK                   BIT17
+#define EP0_PERR_NAK_INT               BIT16
+#define EP0_OUT_NAK_INT                        BIT15
+#define EP0_OUT_NULL                   BIT14
+#define EP0_OUT_FULL                   BIT13
+#define EP0_OUT_EMPTY                  BIT12
+#define EP0_IN_NAK_INT                 BIT11
+#define EP0_IN_DATA                    BIT10
+#define EP0_IN_FULL                    BIT09
+#define EP0_IN_EMPTY                   BIT08
+#define EP0_OUT_NULL_INT               BIT07
+#define EP0_OUT_OR_INT                 BIT06
+#define EP0_OUT_INT                    BIT05
+#define EP0_IN_INT                     BIT04
+#define EP0_STALL_INT                  BIT03
+#define STG_END_INT                    BIT02
+#define STG_START_INT                  BIT01
+#define SETUP_INT                      BIT00
+
+#define EP0_STATUS_RW_BIT      (BIT16|BIT15|BIT11|0xFF)
+
+/*------- (0x0030) EP0 Interrupt Enable Register */
+#define EP0_PERR_NAK_EN                        BIT16
+#define EP0_OUT_NAK_EN                 BIT15
+
+#define EP0_IN_NAK_EN                  BIT11
+
+#define EP0_OUT_NULL_EN                        BIT07
+#define EP0_OUT_OR_EN                  BIT06
+#define EP0_OUT_EN                     BIT05
+#define EP0_IN_EN                      BIT04
+#define EP0_STALL_EN                   BIT03
+#define STG_END_EN                     BIT02
+#define STG_START_EN                   BIT01
+#define SETUP_EN                       BIT00
+
+#define EP0_INT_EN_BIT \
+       (EP0_OUT_OR_EN|EP0_OUT_EN|EP0_IN_EN|STG_END_EN|SETUP_EN)
+
+/*------- (0x0034) EP0 Length Register */
+#define EP0_LDATA                      0x0000007F
+
+/*------- (0x0038) EP0 Read Register */
+/*------- (0x003C) EP0 Write Register */
+
+/*------- (0x0040:) EPn Control Register */
+#define EPn_EN                         BIT31
+#define EPn_BUF_TYPE                   BIT30
+#define EPn_BUF_SINGLE                 BIT30
+
+#define EPn_DIR0                       BIT26
+#define EPn_MODE                       (BIT25+BIT24)
+#define EPn_BULK                       0
+#define EPn_INTERRUPT                  BIT24
+#define EPn_ISO                                BIT25
+
+#define EPn_OVERSEL                    BIT17
+#define EPn_AUTO                       BIT16
+
+#define EPn_IPIDCLR                    BIT11
+#define EPn_OPIDCLR                    BIT10
+#define EPn_BCLR                       BIT09
+#define EPn_CBCLR                      BIT08
+#define EPn_DEND                       BIT07
+#define EPn_DW                         (BIT06+BIT05)
+#define EPn_DW4                                0
+#define EPn_DW3                                (BIT06+BIT05)
+#define EPn_DW2                                BIT06
+#define EPn_DW1                                BIT05
+
+#define EPn_OSTL_EN                    BIT04
+#define EPn_ISTL                       BIT03
+#define EPn_OSTL                       BIT02
+
+#define EPn_ONAK                       BIT00
+
+/*------- (0x0044:) EPn Status Register        */
+#define EPn_ISO_PIDERR                 BIT29           /* R */
+#define EPn_OPID                       BIT28           /* R */
+#define EPn_OUT_NOTKN                  BIT27           /* R */
+#define EPn_ISO_OR                     BIT26           /* R */
+
+#define EPn_ISO_CRC                    BIT24           /* R */
+#define EPn_OUT_END_INT                        BIT23           /* RW */
+#define EPn_OUT_OR_INT                 BIT22           /* RW */
+#define EPn_OUT_NAK_ERR_INT            BIT21           /* RW */
+#define EPn_OUT_STALL_INT              BIT20           /* RW */
+#define EPn_OUT_INT                    BIT19           /* RW */
+#define EPn_OUT_NULL_INT               BIT18           /* RW */
+#define EPn_OUT_FULL                   BIT17           /* R */
+#define EPn_OUT_EMPTY                  BIT16           /* R */
+
+#define EPn_IPID                       BIT10           /* R */
+#define EPn_IN_NOTKN                   BIT09           /* R */
+#define EPn_ISO_UR                     BIT08           /* R */
+#define EPn_IN_END_INT                 BIT07           /* RW */
+
+#define EPn_IN_NAK_ERR_INT             BIT05           /* RW */
+#define EPn_IN_STALL_INT               BIT04           /* RW */
+#define EPn_IN_INT                     BIT03           /* RW */
+#define EPn_IN_DATA                    BIT02           /* R */
+#define EPn_IN_FULL                    BIT01           /* R */
+#define EPn_IN_EMPTY                   BIT00           /* R */
+
+#define EPn_INT_EN     \
+       (EPn_OUT_END_INT|EPn_OUT_INT|EPn_IN_END_INT|EPn_IN_INT)
+
+/*------- (0x0048:) EPn Interrupt Enable Register */
+#define EPn_OUT_END_EN                 BIT23           /* RW */
+#define EPn_OUT_OR_EN                  BIT22           /* RW */
+#define EPn_OUT_NAK_ERR_EN             BIT21           /* RW */
+#define EPn_OUT_STALL_EN               BIT20           /* RW */
+#define EPn_OUT_EN                     BIT19           /* RW */
+#define EPn_OUT_NULL_EN                        BIT18           /* RW */
+
+#define EPn_IN_END_EN                  BIT07           /* RW */
+
+#define EPn_IN_NAK_ERR_EN              BIT05           /* RW */
+#define EPn_IN_STALL_EN                        BIT04           /* RW */
+#define EPn_IN_EN                      BIT03           /* RW */
+
+/*------- (0x004C:) EPn Interrupt Enable Register */
+#define EPn_STOP_MODE                  BIT11
+#define EPn_DEND_SET                   BIT10
+#define EPn_BURST_SET                  BIT09
+#define EPn_STOP_SET                   BIT08
+
+#define EPn_DMA_EN                     BIT04
+
+#define EPn_DMAMODE0                   BIT00
+
+/*------- (0x0050:) EPn MaxPacket & BaseAddress Register */
+#define EPn_BASEAD                     0x1FFF0000
+#define EPn_MPKT                       0x000007FF
+
+/*------- (0x0054:) EPn Length & DMA Count Register */
+#define EPn_DMACNT                     0x01FF0000
+#define EPn_LDATA                      0x000007FF
+
+/*------- (0x0058:) EPn Read Register */
+/*------- (0x005C:) EPn Write Register */
+
+/*------- (0x1000) AHBSCTR Register */
+#define WAIT_MODE                      BIT00
+
+/*------- (0x1004) AHBMCTR Register */
+#define ARBITER_CTR                    BIT31           /* RW */
+#define MCYCLE_RST                     BIT12           /* RW */
+
+#define ENDIAN_CTR                     (BIT09+BIT08)   /* RW */
+#define ENDIAN_BYTE_SWAP               BIT09
+#define ENDIAN_HALF_WORD_SWAP          ENDIAN_CTR
+
+#define HBUSREQ_MODE                   BIT05           /* RW */
+#define HTRANS_MODE                    BIT04           /* RW */
+
+#define WBURST_TYPE                    BIT02           /* RW */
+#define BURST_TYPE                     (BIT01+BIT00)   /* RW */
+#define BURST_MAX_16                   0
+#define BURST_MAX_8                    BIT00
+#define BURST_MAX_4                    BIT01
+#define BURST_SINGLE                   BURST_TYPE
+
+/*------- (0x1008) AHBBINT Register */
+#define DMA_ENDINT                     0xFFFE0000      /* RW */
+
+#define AHB_VBUS_INT                   BIT13           /* RW */
+
+#define MBUS_ERRINT                    BIT06           /* RW */
+
+#define SBUS_ERRINT0                   BIT04           /* RW */
+#define ERR_MASTER                     0x0000000F      /* R */
+
+/*------- (0x100C) AHBBINTEN Register */
+#define DMA_ENDINTEN                   0xFFFE0000      /* RW */
+
+#define VBUS_INTEN                     BIT13           /* RW */
+
+#define MBUS_ERRINTEN                  BIT06           /* RW */
+
+#define SBUS_ERRINT0EN                 BIT04           /* RW */
+
+/*------- (0x1010) EPCTR Register */
+#define DIRPD                          BIT12           /* RW */
+
+#define VBUS_LEVEL                     BIT08           /* R */
+
+#define PLL_RESUME                     BIT05           /* RW */
+#define PLL_LOCK                       BIT04           /* R */
+
+#ifdef CONFIG_MACH_EMGR
+#define PLL_RST                                BIT02           /* RW */
+#endif
+
+#define EPC_RST                                BIT00           /* RW */
+
+/*------- (0x1014) USBF_EPTEST Register */
+#define LINESTATE                      (BIT09+BIT08)   /* R */
+#define DM_LEVEL                       BIT09           /* R */
+#define DP_LEVEL                       BIT08           /* R */
+
+#define PHY_TST                                BIT01           /* RW */
+#define PHY_TSTCLK                     BIT00           /* RW */
+
+/*------- (0x1020) USBSSVER Register */
+#define AHBB_VER                       0x00FF0000      /* R */
+#define EPC_VER                                0x0000FF00      /* R */
+#define SS_VER                         0x000000FF      /* R */
+
+/*------- (0x1024) USBSSCONF Register */
+#define EP_AVAILABLE                   0xFFFF0000      /* R */
+#define DMA_AVAILABLE                  0x0000FFFF      /* R */
+
+/*------- (0x1110:) EPnDCR1 Register */
+#define DCR1_EPn_DMACNT                        0x00FF0000      /* RW */
+
+#define DCR1_EPn_DIR0                  BIT01           /* RW */
+#define DCR1_EPn_REQEN                 BIT00           /* RW */
+
+/*------- (0x1114:) EPnDCR2 Register */
+#define DCR2_EPn_LMPKT                 0x07FF0000      /* RW */
+
+#define DCR2_EPn_MPKT                  0x000007FF      /* RW */
+
+/*------- (0x1118:) EPnTADR Register */
+#define EPn_TADR                       0xFFFFFFFF      /* RW */
+
+
+
+/*===========================================================================*/
+/* Struct */
+/*------- T_EP_REGS */
+typedef struct _T_EP_REGS {
+       u32 EP_CONTROL;                 /* EP Control */
+       u32 EP_STATUS;                  /* EP Status */
+       u32 EP_INT_ENA;                 /* EP Interrupt Enable */
+       u32 EP_DMA_CTRL;                /* EP DMA Control */
+       u32 EP_PCKT_ADRS;               /* EP Maxpacket & BaseAddress */
+       u32 EP_LEN_DCNT;                /* EP Length & DMA count */
+       u32 EP_READ;                    /* EP Read */
+       u32 EP_WRITE;                   /* EP Write */
+} T_EP_REGS, *PT_EP_REGS;
+
+/*------- T_EP_DCR */
+typedef struct _T_EP_DCR {
+       u32 EP_DCR1;                    /* EP_DCR1 */
+       u32 EP_DCR2;                    /* EP_DCR2 */
+       u32 EP_TADR;                    /* EP_TADR */
+       u32 Reserved;                   /* Reserved */
+} T_EP_DCR, *PT_EP_DCR;
+
+/*------- Function Registers */
+typedef struct _T_FC_REGS {
+       u32 USB_CONTROL;                /* (0x0000) USB Control */
+       u32 USB_STATUS;                 /* (0x0004) USB Status */
+       u32 USB_ADDRESS;                /* (0x0008) USB Address */
+       u32 UTMI_CHARACTER_1;           /* (0x000C) UTMI Setting */
+       u32 TEST_CONTROL;               /* (0x0010) TEST Control */
+       u32 Reserved_14;                /* (0x0014) Reserved */
+       u32 SETUP_DATA0;                /* (0x0018) Setup Data0 */
+       u32 SETUP_DATA1;                /* (0x001C) Setup Data1 */
+       u32 USB_INT_STA;                /* (0x0020) USB Interrupt Status */
+       u32 USB_INT_ENA;                /* (0x0024) USB Interrupt Enable */
+       u32 EP0_CONTROL;                /* (0x0028) EP0 Control */
+       u32 EP0_STATUS;                 /* (0x002C) EP0 Status */
+       u32 EP0_INT_ENA;                /* (0x0030) EP0 Interrupt Enable */
+       u32 EP0_LENGTH;                 /* (0x0034) EP0 Length */
+       u32 EP0_READ;                   /* (0x0038) EP0 Read */
+       u32 EP0_WRITE;                  /* (0x003C) EP0 Write */
+
+       T_EP_REGS EP_REGS[REG_EP_NUM];  /* Endpoint Register */
+
+       u8 Reserved220[0x1000-0x220];   /* (0x0220:0x0FFF) Reserved */
+
+       u32 AHBSCTR;                    /* (0x1000) AHBSCTR */
+       u32 AHBMCTR;                    /* (0x1004) AHBMCTR */
+       u32 AHBBINT;                    /* (0x1008) AHBBINT */
+       u32 AHBBINTEN;                  /* (0x100C) AHBBINTEN */
+       u32 EPCTR;                      /* (0x1010) EPCTR */
+       u32 USBF_EPTEST;                /* (0x1014) USBF_EPTEST */
+
+       u8 Reserved1018[0x20-0x18];     /* (0x1018:0x101F) Reserved */
+
+       u32 USBSSVER;                   /* (0x1020) USBSSVER */
+       u32 USBSSCONF;                  /* (0x1024) USBSSCONF */
+
+       u8 Reserved1028[0x110-0x28];    /* (0x1028:0x110F) Reserved */
+
+       T_EP_DCR EP_DCR[REG_EP_NUM];    /* */
+
+       u8 Reserved1200[0x1000-0x200];  /* Reserved */
+
+} __attribute__ ((aligned(32))) T_FC_REGS, *PT_FC_REGS;
+
+
+
+
+
+
+
+
+#define EP0_PACKETSIZE                 64
+#define EP_PACKETSIZE                  1024
+
+/* EPn RAM SIZE */
+#define D_RAM_SIZE_CTRL                        64
+
+/* EPn Bulk Endpoint Max Packet Size */
+#define D_FS_RAM_SIZE_BULK             64
+#define D_HS_RAM_SIZE_BULK             512
+
+
+struct nbu2ss_udc;
+
+
+enum ep0_state {
+       EP0_IDLE,
+       EP0_IN_DATA_PHASE,
+       EP0_OUT_DATA_PHASE,
+       EP0_IN_STATUS_PHASE,
+       EP0_OUT_STATUS_PAHSE,
+       EP0_END_XFER,
+       EP0_SUSPEND,
+       EP0_STALL,
+};
+
+struct nbu2ss_req {
+       struct usb_request              req;
+       struct list_head                queue;
+
+       u32                     div_len;
+       bool            dma_flag;
+       bool            zero;
+
+       bool            unaligned;
+
+       unsigned                        mapped:1;
+};
+
+struct nbu2ss_ep {
+       struct usb_ep                   ep;
+       struct list_head                queue;
+
+       struct nbu2ss_udc               *udc;
+
+       const struct usb_endpoint_descriptor *desc;
+
+       u8              epnum;
+       u8              direct;
+       u8              ep_type;
+
+       unsigned                wedged:1;
+       unsigned                halted:1;
+       unsigned                stalled:1;
+
+       u8              *virt_buf;
+       dma_addr_t      phys_buf;
+};
+
+
+struct nbu2ss_udc {
+       struct usb_gadget gadget;
+       struct usb_gadget_driver *driver;
+       struct platform_device *pdev;
+       struct device *dev;
+       spinlock_t lock;
+       struct completion               *pdone;
+
+       enum ep0_state                  ep0state;
+       enum usb_device_state   devstate;
+       struct usb_ctrlrequest  ctrl;
+       struct nbu2ss_req               ep0_req;
+       u8              ep0_buf[EP0_PACKETSIZE];
+
+       struct nbu2ss_ep        ep[NUM_ENDPOINTS];
+
+       unsigned                softconnect:1;
+       unsigned                vbus_active:1;
+       unsigned                linux_suspended:1;
+       unsigned                linux_resume:1;
+       unsigned                usb_suspended:1;
+       unsigned                self_powered:1;
+       unsigned                remote_wakeup:1;
+       unsigned                udc_enabled:1;
+
+       unsigned                mA;
+
+       u32             curr_config;    /* Current Configuration Number */
+
+       PT_FC_REGS              p_regs;
+};
+
+/* USB register access structure */
+typedef volatile union {
+       struct {
+               unsigned char   DATA[4];
+       } byte;
+       unsigned int            dw;
+} USB_REG_ACCESS;
+
+/*-------------------------------------------------------------------------*/
+#define ERR(stuff...)          printk(KERN_ERR "udc: " stuff)
+
+#endif  /* _LINUX_EMXX_H */
index d44e8583ad1eb71627d9f8c60a357784a3d3e122..afaab07862fb15e4a9ef99d63b667180049c2885 100644 (file)
@@ -15,8 +15,8 @@
    Suite 330, Boston, MA 02111-1307, USA.
   --------------------------------------------------------------------------
 
-   Description:  This module will handshake with the DSP bootloader to
-                 download the DSP runtime image.
+   Description: This module will handshake with the DSP bootloader to
+               download the DSP runtime image.
 
 ---------------------------------------------------------------------------*/
 
index 384758b11e3c15ca6b0c96e07c1c399b23d7d159..af0c3878358cb991ccb792d8d66fc51cc0227ad1 100644 (file)
@@ -785,6 +785,7 @@ static int fwtty_tx(struct fwtty_port *port, bool drain)
                len = dma_fifo_out_level(&port->tx_fifo);
                if (len) {
                        unsigned long delay = (n == -ENOMEM) ? HZ : 1;
+
                        schedule_delayed_work(&port->drain, delay);
                }
                len = dma_fifo_level(&port->tx_fifo);
@@ -1995,6 +1996,7 @@ static struct fwtty_peer *__fwserial_peer_by_node_id(struct fw_card *card,
 
        list_for_each_entry_rcu(peer, &serial->peer_list, list) {
                int g = peer->generation;
+
                smp_rmb();
                if (generation == g && id == peer->node_id)
                        return peer;
@@ -2015,6 +2017,7 @@ static void __dump_peer_list(struct fw_card *card)
 
        list_for_each_entry_rcu(peer, &serial->peer_list, list) {
                int g = peer->generation;
+
                smp_rmb();
                fwtty_dbg(card, "peer(%d:%x) guid: %016llx\n",
                          g, peer->node_id, (unsigned long long) peer->guid);
@@ -2120,6 +2123,7 @@ static int fwserial_add_peer(struct fw_serial *serial, struct fw_unit *unit)
                serial->self = peer;
                if (create_loop_dev) {
                        struct fwtty_port *port;
+
                        port = fwserial_claim_port(peer, num_ttys);
                        if (!IS_ERR(port)) {
                                struct virt_plug_params params;
@@ -2611,7 +2615,6 @@ cleanup:
        if (port)
                fwserial_release_port(port, false);
        kfree(pkt);
-       return;
 }
 
 static void fwserial_handle_unplug_req(struct work_struct *work)
@@ -2663,7 +2666,6 @@ cleanup:
        if (port)
                fwserial_release_port(port, true);
        kfree(pkt);
-       return;
 }
 
 static int fwserial_parse_mgmt_write(struct fwtty_peer *peer,
index 64c55b99fda4594725112d0d17b299ffe78bdbfb..bc6d57419b286ff45822127c77b07d3191dc0729 100644 (file)
@@ -447,6 +447,7 @@ static int gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)
         */
        if (nic_type & NIC_TYPE_F_VLAN) {
                struct vlan_ethhdr *vlan_eth = (struct vlan_ethhdr *)skb->data;
+
                nic->vlan_id = ntohs(vlan_eth->h_vlan_TCI) & VLAN_VID_MASK;
                data_buf = skb->data + (VLAN_ETH_HLEN - ETH_HLEN);
                data_len = skb->len - (VLAN_ETH_HLEN - ETH_HLEN);
@@ -505,6 +506,7 @@ static int gdm_lte_tx(struct sk_buff *skb, struct net_device *dev)
 static struct net_device_stats *gdm_lte_stats(struct net_device *dev)
 {
        struct nic *nic = netdev_priv(dev);
+
        return &nic->stats;
 }
 
index df6f000534d4fc4b37e7a4f9cab3afb356fd50ac..b08c8e10d211b9e27193188b70d1f39faca39cd3 100644 (file)
@@ -100,7 +100,7 @@ void gdm_qos_init(void *nic_ptr)
        for (i = 0; i < QOS_MAX; i++) {
                INIT_LIST_HEAD(&qcb->qos_list[i]);
                qcb->csr[i].qos_buf_count = 0;
-               qcb->csr[i].enabled = 0;
+               qcb->csr[i].enabled = false;
        }
 
        qcb->qos_list_cnt = 0;
@@ -127,7 +127,7 @@ void gdm_qos_release_list(void *nic_ptr)
 
        for (i = 0; i < QOS_MAX; i++) {
                qcb->csr[i].qos_buf_count = 0;
-               qcb->csr[i].enabled = 0;
+               qcb->csr[i].enabled = false;
        }
 
        qcb->qos_list_cnt = 0;
@@ -142,7 +142,7 @@ void gdm_qos_release_list(void *nic_ptr)
        free_qos_entry_list(&free_list);
 }
 
-static u32 chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port)
+static int chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port)
 {
        int i;
 
@@ -188,17 +188,17 @@ static u32 chk_ipv4_rule(struct gdm_wimax_csr_s *csr, u8 *stream, u8 *port)
        return 0;
 }
 
-static u32 get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph)
+static int get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph)
 {
-       u32 IP_ver, i;
+       int ip_ver, i;
        struct qos_cb_s *qcb = &nic->qos;
 
        if (iph == NULL || tcpudph == NULL)
                return -1;
 
-       IP_ver = (iph[0]>>4)&0xf;
+       ip_ver = (iph[0]>>4)&0xf;
 
-       if (IP_ver != 4)
+       if (ip_ver != 4)
                return -1;
 
        for (i = 0; i < QOS_MAX; i++) {
@@ -213,7 +213,7 @@ static u32 get_qos_index(struct nic *nic, u8 *iph, u8 *tcpudph)
        return -1;
 }
 
-static u32 extract_qos_list(struct nic *nic, struct list_head *head)
+static void extract_qos_list(struct nic *nic, struct list_head *head)
 {
        struct qos_cb_s *qcb = &nic->qos;
        struct qos_entry_s *entry;
@@ -238,8 +238,6 @@ static u32 extract_qos_list(struct nic *nic, struct list_head *head)
                if (!list_empty(&qcb->qos_list[i]))
                        netdev_warn(nic->netdev, "Index(%d) is piled!!\n", i);
        }
-
-       return 0;
 }
 
 static void send_qos_list(struct nic *nic, struct list_head *head)
@@ -305,19 +303,19 @@ out:
        return ret;
 }
 
-static u32 get_csr(struct qos_cb_s *qcb, u32 SFID, int mode)
+static int get_csr(struct qos_cb_s *qcb, u32 sfid, int mode)
 {
        int i;
 
        for (i = 0; i < qcb->qos_list_cnt; i++) {
-               if (qcb->csr[i].SFID == SFID)
+               if (qcb->csr[i].sfid == sfid)
                        return i;
        }
 
        if (mode) {
                for (i = 0; i < QOS_MAX; i++) {
-                       if (qcb->csr[i].enabled == 0) {
-                               qcb->csr[i].enabled = 1;
+                       if (!qcb->csr[i].enabled) {
+                               qcb->csr[i].enabled = true;
                                qcb->qos_list_cnt++;
                                return i;
                        }
@@ -333,7 +331,8 @@ static u32 get_csr(struct qos_cb_s *qcb, u32 SFID, int mode)
 void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
 {
        struct nic *nic = nic_ptr;
-       u32 i, SFID, index, pos;
+       int i, index, pos;
+       u32 sfid;
        u8 sub_cmd_evt;
        struct qos_cb_s *qcb = &nic->qos;
        struct qos_entry_s *entry, *n;
@@ -346,11 +345,11 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
        if (sub_cmd_evt == QOS_REPORT) {
                spin_lock_irqsave(&qcb->qos_lock, flags);
                for (i = 0; i < qcb->qos_list_cnt; i++) {
-                       SFID = ((buf[(i*5)+6]<<24)&0xff000000);
-                       SFID += ((buf[(i*5)+7]<<16)&0xff0000);
-                       SFID += ((buf[(i*5)+8]<<8)&0xff00);
-                       SFID += (buf[(i*5)+9]);
-                       index = get_csr(qcb, SFID, 0);
+                       sfid = ((buf[(i*5)+6]<<24)&0xff000000);
+                       sfid += ((buf[(i*5)+7]<<16)&0xff0000);
+                       sfid += ((buf[(i*5)+8]<<8)&0xff00);
+                       sfid += (buf[(i*5)+9]);
+                       index = get_csr(qcb, sfid, 0);
                        if (index == -1) {
                                spin_unlock_irqrestore(&qcb->qos_lock, flags);
                                netdev_err(nic->netdev, "QoS ERROR: No SF\n");
@@ -367,12 +366,12 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
 
        /* sub_cmd_evt == QOS_ADD || sub_cmd_evt == QOS_CHANG_DEL */
        pos = 6;
-       SFID = ((buf[pos++]<<24)&0xff000000);
-       SFID += ((buf[pos++]<<16)&0xff0000);
-       SFID += ((buf[pos++]<<8)&0xff00);
-       SFID += (buf[pos++]);
+       sfid = ((buf[pos++]<<24)&0xff000000);
+       sfid += ((buf[pos++]<<16)&0xff0000);
+       sfid += ((buf[pos++]<<8)&0xff00);
+       sfid += (buf[pos++]);
 
-       index = get_csr(qcb, SFID, 1);
+       index = get_csr(qcb, sfid, 1);
        if (index == -1) {
                netdev_err(nic->netdev,
                           "QoS ERROR: csr Update Error / Wrong index (%d)\n",
@@ -382,10 +381,10 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
 
        if (sub_cmd_evt == QOS_ADD) {
                netdev_dbg(nic->netdev, "QOS_ADD SFID = 0x%x, index=%d\n",
-                          SFID, index);
+                          sfid, index);
 
                spin_lock_irqsave(&qcb->qos_lock, flags);
-               qcb->csr[index].SFID = SFID;
+               qcb->csr[index].sfid = sfid;
                qcb->csr[index].classifier_rule_en = ((buf[pos++]<<8)&0xff00);
                qcb->csr[index].classifier_rule_en += buf[pos++];
                if (qcb->csr[index].classifier_rule_en == 0)
@@ -423,12 +422,12 @@ void gdm_recv_qos_hci_packet(void *nic_ptr, u8 *buf, int size)
                spin_unlock_irqrestore(&qcb->qos_lock, flags);
        } else if (sub_cmd_evt == QOS_CHANGE_DEL) {
                netdev_dbg(nic->netdev, "QOS_CHANGE_DEL SFID = 0x%x, index=%d\n",
-                          SFID, index);
+                          sfid, index);
 
                INIT_LIST_HEAD(&free_list);
 
                spin_lock_irqsave(&qcb->qos_lock, flags);
-               qcb->csr[index].enabled = 0;
+               qcb->csr[index].enabled = false;
                qcb->qos_list_cnt--;
                qcb->qos_limit_size = 254/qcb->qos_list_cnt;
 
index 6543cff2a8765aac6879b88c055266331cf59aad..8f742f320f2285b71bf5625804e0692b4691b905 100644 (file)
@@ -18,8 +18,6 @@
 #include <linux/usb.h>
 #include <linux/list.h>
 
-#define BOOLEAN        u8
-
 #define QOS_MAX                                16
 #define IPTYPEOFSERVICE                        0x8000
 #define        PROTOCOL                        0x4000
@@ -34,8 +32,8 @@
 #define        IEEE802_1QVLANID                0x10
 
 struct gdm_wimax_csr_s {
-       BOOLEAN         enabled;
-       u32             SFID;
+       bool            enabled;
+       u32             sfid;
        u8              qos_buf_count;
        u16             classifier_rule_en;
        u8              ip2s_lo;
@@ -61,11 +59,11 @@ struct qos_entry_s {
 
 struct qos_cb_s {
        struct list_head        qos_list[QOS_MAX];
-       u32                     qos_list_cnt;
-       u32                     qos_null_idx;
+       int                     qos_list_cnt;
+       int                     qos_null_idx;
        struct gdm_wimax_csr_s  csr[QOS_MAX];
        spinlock_t              qos_lock;
-       u32                     qos_limit_size;
+       int                     qos_limit_size;
 };
 
 void gdm_qos_init(void *nic_ptr);
index 7398d451ccc27b4e46f6fdd65b09d7dcf44c6bdd..9d2de6ff79030d7cb373b5d970af34decc77bf3d 100644 (file)
@@ -390,7 +390,8 @@ static int gdm_sdio_send(void *priv_dev, void *data, int len,
        u16 cmd_evt;
        unsigned long flags;
 
-       BUG_ON(len > TX_BUF_SIZE - TYPE_A_HEADER_SIZE);
+       if (len > TX_BUF_SIZE - TYPE_A_HEADER_SIZE)
+               return -EINVAL;
 
        spin_lock_irqsave(&tx->lock, flags);
 
@@ -439,9 +440,7 @@ static int gdm_sdio_send(void *priv_dev, void *data, int len,
        return 0;
 }
 
-/*
- * Handle the HCI, WIMAX_SDU_TX_FLOW.
- */
+/* Handle the HCI, WIMAX_SDU_TX_FLOW. */
 static int control_sdu_tx_flow(struct sdiowm_dev *sdev, u8 *hci_data, int len)
 {
        struct tx_cxt *tx = &sdev->tx;
@@ -462,8 +461,7 @@ static int control_sdu_tx_flow(struct sdiowm_dev *sdev, u8 *hci_data, int len)
                tx->stop_sdu_tx = 0;
                if (tx->can_send)
                        schedule_work(&sdev->ws);
-               /*
-                * If free buffer for sdu tx doesn't exist, then tx queue
+               /* If free buffer for sdu tx doesn't exist, then tx queue
                 * should not be woken. For this reason, don't pass the command,
                 * START_SDU_TX.
                 */
index 78d6667fa0d59b46744657f0c55c81cab08e259f..971976cd8d0cac95be2571546675093120a8b6cd 100644 (file)
@@ -312,7 +312,8 @@ static int gdm_usb_send(void *priv_dev, void *data, int len,
                return -ENODEV;
        }
 
-       BUG_ON(len > TX_BUF_SIZE - padding - 1);
+       if (len > TX_BUF_SIZE - padding - 1)
+               return -EINVAL;
 
        spin_lock_irqsave(&tx->lock, flags);
 
@@ -338,8 +339,7 @@ static int gdm_usb_send(void *priv_dev, void *data, int len,
        t->callback = cb;
        t->cb_data = cb_data;
 
-       /*
-        * In some cases, USB Module of WiMax is blocked when data size is
+       /* In some cases, USB Module of WiMax is blocked when data size is
         * the multiple of 512. So, increment length by one in that case.
         */
        if ((len % 512) == 0)
@@ -439,8 +439,7 @@ static void gdm_usb_rcv_complete(struct urb *urb)
                                list_for_each_entry(t, &tx->sdu_list, list) {
                                        usb_submit_urb(t->urb, GFP_ATOMIC);
                                }
-                               /*
-                                * If free buffer for sdu tx doesn't
+                               /* If free buffer for sdu tx doesn't
                                 * exist, then tx queue should not be
                                 * woken. For this reason, don't pass
                                 * the command, START_SDU_TX.
@@ -632,7 +631,6 @@ static void gdm_usb_disconnect(struct usb_interface *intf)
        if (idProduct != EMERGENCY_PID &&
            bConfigurationValue != DOWNLOAD_CONF_VALUE &&
            (idProduct & B_DOWNLOAD) == 0) {
-
                udev = phy_dev->priv_dev;
                udev->usbdev = NULL;
 
@@ -710,10 +708,8 @@ static int k_mode_thread(void *arg)
        int ret;
 
        while (!k_mode_stop) {
-
                spin_lock_irqsave(&k_lock, flags2);
                while (!list_empty(&k_list)) {
-
                        udev = list_entry(k_list.next, struct usbwm_dev, list);
                        tx = &udev->tx;
                        rx = &udev->rx;
index e5e511585122a3a25c5d6ad203d4c5f185755f3f..41480132e512dcf4c95b865347225c0fcd207f0d 100644 (file)
@@ -291,8 +291,9 @@ static void __gdm_wimax_event_send(struct work_struct *work)
                e = list_entry(wm_event.evtq.next, struct evt_entry, list);
                spin_unlock_irqrestore(&wm_event.evt_lock, flags);
 
-               sscanf(e->dev->name, "wm%d", &idx);
-               netlink_send(wm_event.sock, idx, 0, e->evt_data, e->size);
+               if (sscanf(e->dev->name, "wm%d", &idx) == 1)
+                       netlink_send(wm_event.sock, idx, 0, e->evt_data,
+                                    e->size);
 
                spin_lock_irqsave(&wm_event.evt_lock, flags);
                list_del(&e->list);
@@ -580,8 +581,9 @@ static int gdm_wimax_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                                return ret;
                } else if (req->cmd == SIOCS_DATA) {
                        if (req->data_id == SIOC_DATA_FSM) {
-                               /*NOTE: gdm_update_fsm should be called
-                               before gdm_wimax_ioctl_set_data is called*/
+                               /* NOTE: gdm_update_fsm should be called
+                                * before gdm_wimax_ioctl_set_data is called.
+                                */
                                gdm_update_fsm(dev,
                                               (struct fsm_s *)req->data.buf);
                        }
index 2485a3799123176f1a082350d2308bf8e0a11802..059ba0021d474d3dbabe3c5f3969e9e4aae52438 100644 (file)
 #define W_SCAN_ALL_SUBSCRIPTION                1
 #define W_SCAN_SPECIFIED_SUBSCRIPTION  2
 
-/*
- * TLV
+/* TLV
  *
  * [31:31] indicates the type is composite.
  * [30:16] is the length of the type. 0 length means length is variable.
  * [15:0] is the actual type.
- *
  */
 #define TLV_L(x)               (((x) >> 16) & 0xff)
 #define TLV_T(x)               ((x) & 0xff)
index cbd456770af09cb64a07f73b9ccc4e9772ce092c..a166424b34781c49bc021a53ec47f121ae52d761 100644 (file)
@@ -203,10 +203,10 @@ static int goldfish_audio_open(struct inode *ip, struct file *fp)
                                             AUDIO_INT_WRITE_BUFFER_2_EMPTY);
                AUDIO_WRITE(audio_data, AUDIO_INT_ENABLE, AUDIO_INT_MASK);
                return 0;
-       } else {
-               atomic_dec(&open_count);
-               return -EBUSY;
        }
+
+       atomic_dec(&open_count);
+       return -EBUSY;
 }
 
 static int goldfish_audio_release(struct inode *ip, struct file *fp)
@@ -223,8 +223,8 @@ static long goldfish_audio_ioctl(struct file *fp, unsigned int cmd,
        /* temporary workaround, until we switch to the ALSA API */
        if (cmd == 315)
                return -1;
-       else
-               return 0;
+
+       return 0;
 }
 
 static irqreturn_t goldfish_audio_interrupt(int irq, void *dev_id)
index 40d0ecac047f5a4511ae99a4fb250d2a8ebb3196..044ea196aa6f6bc5b55fb2d56f4a07de160fe797 100644 (file)
@@ -305,9 +305,12 @@ int main(int argc, char **argv)
                read_size = read(fp,
                                 data,
                                 toread*scan_size);
-               if (read_size == -EAGAIN) {
-                       printf("nothing available\n");
-                       continue;
+               if (read_size < 0) {
+                       if (errno == -EAGAIN) {
+                               printf("nothing available\n");
+                               continue;
+                       } else
+                               break;
                }
                for (i = 0; i < read_size/scan_size; i++)
                        process_scan(data + scan_size*i,
index 3a9b000874039d6d5de530d0b7ae922bbf5c0fc2..cb35a97f00c3a0399c3b4fe79adebda5f2b3d537 100644 (file)
@@ -46,6 +46,9 @@ static const char * const iio_chan_type_name_spec[] = {
        [IIO_TIMESTAMP] = "timestamp",
        [IIO_CAPACITANCE] = "capacitance",
        [IIO_ALTVOLTAGE] = "altvoltage",
+       [IIO_CCT] = "cct",
+       [IIO_PRESSURE] = "pressure",
+       [IIO_HUMIDITYRELATIVE] = "humidityrelative",
 };
 
 static const char * const iio_ev_type_text[] = {
@@ -70,6 +73,8 @@ static const char * const iio_modifier_names[] = {
        [IIO_MOD_LIGHT_IR] = "ir",
        [IIO_MOD_ROOT_SUM_SQUARED_X_Y] = "sqrt(x^2+y^2)",
        [IIO_MOD_SUM_SQUARED_X_Y_Z] = "x^2+y^2+z^2",
+       [IIO_MOD_LIGHT_BOTH] = "both",
+       [IIO_MOD_LIGHT_IR] = "ir",
        [IIO_MOD_LIGHT_CLEAR] = "clear",
        [IIO_MOD_LIGHT_RED] = "red",
        [IIO_MOD_LIGHT_GREEN] = "green",
@@ -100,6 +105,9 @@ static bool event_is_known(struct iio_event_data *event)
        case IIO_TIMESTAMP:
        case IIO_CAPACITANCE:
        case IIO_ALTVOLTAGE:
+       case IIO_CCT:
+       case IIO_PRESSURE:
+       case IIO_HUMIDITYRELATIVE:
                break;
        default:
                return false;
@@ -114,6 +122,8 @@ static bool event_is_known(struct iio_event_data *event)
        case IIO_MOD_LIGHT_IR:
        case IIO_MOD_ROOT_SUM_SQUARED_X_Y:
        case IIO_MOD_SUM_SQUARED_X_Y_Z:
+       case IIO_MOD_LIGHT_BOTH:
+       case IIO_MOD_LIGHT_IR:
        case IIO_MOD_LIGHT_CLEAR:
        case IIO_MOD_LIGHT_RED:
        case IIO_MOD_LIGHT_GREEN:
index a9cfc06edb014006091795dee93329ac91b4d6bb..0973a092224a6de0231a3e57af256239c434e66e 100644 (file)
@@ -633,7 +633,7 @@ error_free:
 
 int read_sysfs_float(char *filename, char *basedir, float *val)
 {
-       float ret = 0;
+       int ret = 0;
        FILE  *sysfsfp;
        char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
        if (temp == NULL) {
@@ -653,9 +653,9 @@ error_free:
        return ret;
 }
 
-read_sysfs_string(const char *filename, const char *basedir, char *str)
+int read_sysfs_string(const char *filename, const char *basedir, char *str)
 {
-       float ret = 0;
+       int ret = 0;
        FILE  *sysfsfp;
        char *temp = malloc(strlen(basedir) + strlen(filename) + 2);
        if (temp == NULL) {
index 64e2e08fb4d034e2da93c924b7c064a452dace91..7c0e505e4f04a6f29a49077226475ecdc2815b34 100644 (file)
@@ -31,5 +31,5 @@ consumers.
 Trigger Consumers
 
 Currently triggers are only used for the filling of software
-buffers and as such any device supporting INDIO_RING_TRIGGERED has the
+buffers and as such any device supporting INDIO_BUFFER_TRIGGERED has the
 consumer interface automatically created.
index 79cefe0a516a7316269546a36c2eec1fb3648556..bf33fdead479e6aa5430a2ecc5a2ab953bf2077c 100644 (file)
@@ -31,7 +31,7 @@ irqreturn_t lis3l02dq_data_rdy_trig_poll(int irq, void *private)
        struct lis3l02dq_state *st = iio_priv(indio_dev);
 
        if (st->trigger_on) {
-               iio_trigger_poll(st->trig, iio_get_time_ns());
+               iio_trigger_poll(st->trig);
                return IRQ_HANDLED;
        } else
                return IRQ_WAKE_THREAD;
index 198710651e0ed3c951c1d5116f438d38615f76b0..33f0e9235be72901cff1fc55e7e7fe50e3df3ced 100644 (file)
@@ -141,6 +141,11 @@ static int sca3000_ring_get_bytes_per_datum(struct iio_buffer *r)
        return 6;
 }
 
+static bool sca3000_ring_buf_data_available(struct iio_buffer *r)
+{
+       return r->stufftoread;
+}
+
 static IIO_BUFFER_ENABLE_ATTR;
 static IIO_BUFFER_LENGTH_ATTR;
 
@@ -274,6 +279,7 @@ static const struct iio_buffer_access_funcs sca3000_ring_access_funcs = {
        .read_first_n = &sca3000_read_first_n_hw_rb,
        .get_length = &sca3000_ring_get_length,
        .get_bytes_per_datum = &sca3000_ring_get_bytes_per_datum,
+       .data_available = sca3000_ring_buf_data_available,
        .release = sca3000_ring_release,
 };
 
index 52d7517b342eb80191fc18cf1dab01d4faf477cf..468327f4a7533590f1ffed2ffa2f73bd7870592f 100644 (file)
@@ -1170,7 +1170,7 @@ static irqreturn_t mxs_lradc_handle_irq(int irq, void *data)
                mxs_lradc_handle_touch(lradc);
 
        if (iio_buffer_enabled(iio))
-               iio_trigger_poll(iio->trig, iio_get_time_ns());
+               iio_trigger_poll(iio->trig);
        else if (reg & LRADC_CTRL1_LRADC_IRQ(0))
                complete(&lradc->completion);
 
index c7d0307c8e76110044bf37580f35e963fc46c4da..b7c8351ce2ffc1ba4948d29c6c911b8468a1b51e 100644 (file)
@@ -57,7 +57,7 @@ static int ad9832_write_frequency(struct ad9832_state *st,
 }
 
 static int ad9832_write_phase(struct ad9832_state *st,
-                                 unsigned long addr, unsigned long phase)
+                             unsigned long addr, unsigned long phase)
 {
        if (phase > (1 << AD9832_PHASE_BITS))
                return -EINVAL;
@@ -72,10 +72,8 @@ static int ad9832_write_phase(struct ad9832_state *st,
        return spi_sync(st->spi, &st->phase_msg);
 }
 
-static ssize_t ad9832_write(struct device *dev,
-               struct device_attribute *attr,
-               const char *buf,
-               size_t len)
+static ssize_t ad9832_write(struct device *dev, struct device_attribute *attr,
+                           const char *buf, size_t len)
 {
        struct iio_dev *indio_dev = dev_to_iio_dev(dev);
        struct ad9832_state *st = iio_priv(indio_dev);
@@ -109,11 +107,11 @@ static ssize_t ad9832_write(struct device *dev,
                ret = spi_sync(st->spi, &st->msg);
                break;
        case AD9832_FREQ_SYM:
-               if (val == 1)
+               if (val == 1) {
                        st->ctrl_fp |= AD9832_FREQ;
-               else if (val == 0)
+               } else if (val == 0) {
                        st->ctrl_fp &= ~AD9832_FREQ;
-               else {
+               else {
                        ret = -EINVAL;
                        break;
                }
index af877ff680e9eda37711181842327e93ade39f7f..8727933cafcfc94cfb0ce896b548e35ad400bd9f 100644 (file)
@@ -21,9 +21,6 @@
 
 #define DRV_NAME "ad9850"
 
-#define value_mask (u16)0xf000
-#define addr_shift 12
-
 /* Register format: 4 bits addr + 12 bits value */
 struct ad9850_config {
        u8 control[5];
@@ -50,9 +47,6 @@ static ssize_t ad9850_set_parameter(struct device *dev,
        mutex_lock(&st->lock);
 
        ret = spi_sync_transfer(st->sdev, &xfer, 1);
-       if (ret)
-               goto error_ret;
-error_ret:
        mutex_unlock(&st->lock);
 
        return ret ? ret : len;
index fd334a03a49a3ead72e5c9e7d68e64ac0391d658..bf78e6f0311ff3699818bd42ef055e21e4b2710a 100644 (file)
@@ -550,6 +550,7 @@ error_ret:
 static __init int iio_dummy_init(void)
 {
        int i, ret;
+
        if (instances > 10) {
                instances = 1;
                return -EINVAL;
@@ -577,6 +578,7 @@ module_init(iio_dummy_init);
 static __exit void iio_dummy_exit(void)
 {
        int i;
+
        for (i = 0; i < instances; i++)
                iio_dummy_remove(i);
        kfree(iio_dummy_devs);
index d4f4dd90c69908b627f83727f7be11e9123ee1ce..f595fdcc79b0ba57a1016763314b106f6f0e529d 100644 (file)
@@ -630,7 +630,9 @@ static const struct i2c_device_id hmc5843_id[] = {
 MODULE_DEVICE_TABLE(i2c, hmc5843_id);
 
 static const struct of_device_id hmc5843_of_match[] = {
-       { .compatible = "honeywell,hmc5843" },
+       { .compatible = "honeywell,hmc5843", .data = (void *)HMC5843_ID },
+       { .compatible = "honeywell,hmc5883", .data = (void *)HMC5883_ID },
+       { .compatible = "honeywell,hmc5883l", .data = (void *)HMC5883L_ID },
        {}
 };
 MODULE_DEVICE_TABLE(of, hmc5843_of_match);
index 7a94ddd42f593e7bc1355cd06ebfcb6c400ff014..ea01b8f7a2c31d6ecbddc90637f99477be5df1f3 100644 (file)
@@ -21,7 +21,7 @@
 static irqreturn_t ade7758_data_rdy_trig_poll(int irq, void *private)
 {
        disable_irq_nosync(irq);
-       iio_trigger_poll(private, iio_get_time_ns());
+       iio_trigger_poll(private);
 
        return IRQ_HANDLED;
 }
index 26e1ca0b7800223b88f3102d562d0c7c084087bb..16f1a06bcd89afed9245c40bc06cab7435235634 100644 (file)
@@ -154,7 +154,7 @@ static irqreturn_t iio_bfin_tmr_trigger_isr(int irq, void *devid)
        struct bfin_tmr_state *st = devid;
 
        clear_gptimer_intr(st->t->id);
-       iio_trigger_poll(st->trig, 0);
+       iio_trigger_poll(st->trig);
 
        return IRQ_HANDLED;
 }
index 38ecb4bb6e4c0ee167e5b9cb09822730cda6c741..b1aeb88273c9b5f9ee952ffae357d20c8d7f2577 100644 (file)
@@ -26,16 +26,22 @@ struct iio_prtc_trigger_info {
        struct rtc_device *rtc;
        int frequency;
        struct rtc_task task;
+       bool state;
 };
 
 static int iio_trig_periodic_rtc_set_state(struct iio_trigger *trig, bool state)
 {
        struct iio_prtc_trigger_info *trig_info = iio_trigger_get_drvdata(trig);
-       if (trig_info->frequency == 0)
+       int ret;
+       if (trig_info->frequency == 0 && state)
                return -EINVAL;
-       dev_info(&trig_info->rtc->dev, "trigger frequency is %d\n",
+       dev_dbg(&trig_info->rtc->dev, "trigger frequency is %d\n",
                        trig_info->frequency);
-       return rtc_irq_set_state(trig_info->rtc, &trig_info->task, state);
+       ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, state);
+       if (ret == 0)
+               trig_info->state = state;
+
+       return ret;
 }
 
 static ssize_t iio_trig_periodic_read_freq(struct device *dev,
@@ -61,7 +67,14 @@ static ssize_t iio_trig_periodic_write_freq(struct device *dev,
        if (ret)
                goto error_ret;
 
-       ret = rtc_irq_set_freq(trig_info->rtc, &trig_info->task, val);
+       if (val > 0) {
+               ret = rtc_irq_set_freq(trig_info->rtc, &trig_info->task, val);
+               if (ret == 0 && trig_info->state && trig_info->frequency == 0)
+                       ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, 1);
+       } else if (val == 0) {
+               ret = rtc_irq_set_state(trig_info->rtc, &trig_info->task, 0);
+       } else
+               ret = -EINVAL;
        if (ret)
                goto error_ret;
 
@@ -93,8 +106,7 @@ static const struct attribute_group *iio_trig_prtc_attr_groups[] = {
 
 static void iio_prtc_trigger_poll(void *private_data)
 {
-       /* Timestamp is not provided currently */
-       iio_trigger_poll(private_data, 0);
+       iio_trigger_poll(private_data);
 }
 
 static const struct iio_trigger_ops iio_prtc_trigger_ops = {
@@ -128,8 +140,7 @@ static int iio_trig_periodic_rtc_probe(struct platform_device *dev)
                iio_trigger_set_drvdata(trig, trig_info);
                trig->ops = &iio_prtc_trigger_ops;
                /* RTC access */
-               trig_info->rtc
-                       = rtc_class_open(pdata[i]);
+               trig_info->rtc = rtc_class_open(pdata[i]);
                if (trig_info->rtc == NULL) {
                        ret = -EINVAL;
                        goto error_free_trig_info;
@@ -199,5 +210,5 @@ static struct platform_driver iio_trig_periodic_rtc_driver = {
 module_platform_driver(iio_trig_periodic_rtc_driver);
 
 MODULE_AUTHOR("Jonathan Cameron <jic23@kernel.org>");
-MODULE_DESCRIPTION("Periodic realtime clock  trigger for the iio subsystem");
+MODULE_DESCRIPTION("Periodic realtime clock trigger for the iio subsystem");
 MODULE_LICENSE("GPL v2");
index 12ebde7315cdbe02b7cf1c5815b51f3d3f5e678e..1e2073b28f0f8f2676f8735acd46f1e5255d697d 100644 (file)
@@ -37,6 +37,7 @@ MODULE_DEVICE_TABLE(usb, eucr_usb_ids);
 static int eucr_suspend(struct usb_interface *iface, pm_message_t message)
 {
        struct us_data *us = usb_get_intfdata(iface);
+
        pr_info("--- eucr_suspend ---\n");
        /* Wait until no command is running */
        mutex_lock(&us->dev_mutex);
@@ -51,8 +52,8 @@ static int eucr_suspend(struct usb_interface *iface, pm_message_t message)
 static int eucr_resume(struct usb_interface *iface)
 {
        u8    tmp = 0;
-
        struct us_data *us = usb_get_intfdata(iface);
+
        pr_info("--- eucr_resume---\n");
        mutex_lock(&us->dev_mutex);
 
index ef511c76a6e36eac338098f6209fd7af39856d44..503b2d763595fb02c55b5a5d4bd234463e1164cf 100644 (file)
@@ -663,7 +663,7 @@ static int line6_probe(struct usb_interface *interface,
        case LINE6_DEVID_POCKETPOD:
                switch (interface_number) {
                case 0:
-                       return 0;       /* this interface has no endpoints */
+                       return -ENODEV; /* this interface has no endpoints */
                case 1:
                        alternate = 0;
                        break;
index a63654b660de4523636085c0240a8172d85ef52e..6816aa0ab306c025ae042fd13d69bc8f22c4c9dc 100644 (file)
@@ -280,6 +280,7 @@ typedef struct lnet_libmd {
 
 #define LNET_MD_FLAG_ZOMBIE       (1 << 0)
 #define LNET_MD_FLAG_AUTO_UNLINK      (1 << 1)
+#define LNET_MD_FLAG_ABORTED    (1 << 2)
 
 #ifdef LNET_USE_LIB_FREELIST
 typedef struct {
index 892c41991f83cd27b4aa651b972b11ca1888117e..1a4c9e625641f739d5d4c469377e686c298c13aa 100644 (file)
@@ -2430,8 +2430,6 @@ kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev)
                return -ENOMEM;
        }
 
-       memset(hdev->ibh_mrs, 0, sizeof(*hdev->ibh_mrs) * hdev->ibh_nmrs);
-
        for (i = 0; i < hdev->ibh_nmrs; i++) {
                struct ib_phys_buf ipb;
                __u64         iova;
@@ -2704,7 +2702,6 @@ kiblnd_create_dev(char *ifname)
        if (dev == NULL)
                return NULL;
 
-       memset(dev, 0, sizeof(*dev));
        netdev = dev_get_by_name(&init_net, ifname);
        if (netdev == NULL) {
                dev->ibd_can_failover = 0;
@@ -3088,8 +3085,6 @@ kiblnd_startup (lnet_ni_t *ni)
        if (net == NULL)
                goto failed;
 
-       memset(net, 0, sizeof(*net));
-
        do_gettimeofday(&tv);
        net->ibn_incarnation = (((__u64)tv.tv_sec) * 1000000) + tv.tv_usec;
 
index 775dcd29c200a74c19d514a15f3df9a067d8f988..425c0fb17bc6aa1e52270275360d4062c265b249 100644 (file)
 
 #include "socklnd.h"
 
-lnd_t             the_ksocklnd;
-ksock_nal_data_t       ksocknal_data;
+static lnd_t the_ksocklnd;
+ksock_nal_data_t ksocknal_data;
 
-ksock_interface_t *
+static ksock_interface_t *
 ksocknal_ip2iface(lnet_ni_t *ni, __u32 ip)
 {
        ksock_net_t       *net = ni->ni_data;
@@ -64,7 +64,7 @@ ksocknal_ip2iface(lnet_ni_t *ni, __u32 ip)
        return NULL;
 }
 
-ksock_route_t *
+static ksock_route_t *
 ksocknal_create_route (__u32 ipaddr, int port)
 {
        ksock_route_t *route;
@@ -99,7 +99,7 @@ ksocknal_destroy_route (ksock_route_t *route)
        LIBCFS_FREE (route, sizeof (*route));
 }
 
-int
+static int
 ksocknal_create_peer (ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id)
 {
        ksock_net_t   *net = ni->ni_data;
@@ -113,8 +113,6 @@ ksocknal_create_peer (ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id)
        if (peer == NULL)
                return -ENOMEM;
 
-       memset (peer, 0, sizeof (*peer));       /* NULL pointers/clear flags etc */
-
        peer->ksnp_ni = ni;
        peer->ksnp_id = id;
        atomic_set (&peer->ksnp_refcount, 1);   /* 1 ref for caller */
@@ -216,7 +214,7 @@ ksocknal_find_peer (lnet_ni_t *ni, lnet_process_id_t id)
        return peer;
 }
 
-void
+static void
 ksocknal_unlink_peer_locked (ksock_peer_t *peer)
 {
        int             i;
@@ -246,7 +244,7 @@ ksocknal_unlink_peer_locked (ksock_peer_t *peer)
        ksocknal_peer_decref(peer);
 }
 
-int
+static int
 ksocknal_get_peer_info (lnet_ni_t *ni, int index,
                        lnet_process_id_t *id, __u32 *myip, __u32 *peer_ip,
                        int *port, int *conn_count, int *share_count)
@@ -321,7 +319,7 @@ ksocknal_get_peer_info (lnet_ni_t *ni, int index,
        return rc;
 }
 
-void
+static void
 ksocknal_associate_route_conn_locked(ksock_route_t *route, ksock_conn_t *conn)
 {
        ksock_peer_t      *peer = route->ksnr_peer;
@@ -366,7 +364,7 @@ ksocknal_associate_route_conn_locked(ksock_route_t *route, ksock_conn_t *conn)
        route->ksnr_retry_interval = 0;
 }
 
-void
+static void
 ksocknal_add_route_locked (ksock_peer_t *peer, ksock_route_t *route)
 {
        struct list_head        *tmp;
@@ -407,7 +405,7 @@ ksocknal_add_route_locked (ksock_peer_t *peer, ksock_route_t *route)
        }
 }
 
-void
+static void
 ksocknal_del_route_locked (ksock_route_t *route)
 {
        ksock_peer_t      *peer = route->ksnr_peer;
@@ -509,7 +507,7 @@ ksocknal_add_peer (lnet_ni_t *ni, lnet_process_id_t id, __u32 ipaddr, int port)
        return 0;
 }
 
-void
+static void
 ksocknal_del_peer_locked (ksock_peer_t *peer, __u32 ip)
 {
        ksock_conn_t     *conn;
@@ -564,7 +562,7 @@ ksocknal_del_peer_locked (ksock_peer_t *peer, __u32 ip)
        /* NB peer unlinks itself when last conn/route is removed */
 }
 
-int
+static int
 ksocknal_del_peer (lnet_ni_t *ni, lnet_process_id_t id, __u32 ip)
 {
        LIST_HEAD     (zombies);
@@ -623,7 +621,7 @@ ksocknal_del_peer (lnet_ni_t *ni, lnet_process_id_t id, __u32 ip)
        return rc;
 }
 
-ksock_conn_t *
+static ksock_conn_t *
 ksocknal_get_conn_by_idx (lnet_ni_t *ni, int index)
 {
        ksock_peer_t      *peer;
@@ -660,7 +658,7 @@ ksocknal_get_conn_by_idx (lnet_ni_t *ni, int index)
        return NULL;
 }
 
-ksock_sched_t *
+static ksock_sched_t *
 ksocknal_choose_scheduler_locked(unsigned int cpt)
 {
        struct ksock_sched_info *info = ksocknal_data.ksnd_sched_info[cpt];
@@ -683,7 +681,7 @@ ksocknal_choose_scheduler_locked(unsigned int cpt)
        return sched;
 }
 
-int
+static int
 ksocknal_local_ipvec (lnet_ni_t *ni, __u32 *ipaddrs)
 {
        ksock_net_t       *net = ni->ni_data;
@@ -711,7 +709,7 @@ ksocknal_local_ipvec (lnet_ni_t *ni, __u32 *ipaddrs)
        return nip;
 }
 
-int
+static int
 ksocknal_match_peerip (ksock_interface_t *iface, __u32 *ips, int nips)
 {
        int   best_netmatch = 0;
@@ -743,7 +741,7 @@ ksocknal_match_peerip (ksock_interface_t *iface, __u32 *ips, int nips)
        return best;
 }
 
-int
+static int
 ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips)
 {
        rwlock_t                *global_lock = &ksocknal_data.ksnd_global_lock;
@@ -845,7 +843,7 @@ ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips)
        return n_ips;
 }
 
-void
+static void
 ksocknal_create_routes(ksock_peer_t *peer, int port,
                       __u32 *peer_ipaddrs, int npeer_ipaddrs)
 {
@@ -995,7 +993,7 @@ ksocknal_accept (lnet_ni_t *ni, socket_t *sock)
        return 0;
 }
 
-int
+static int
 ksocknal_connecting (ksock_peer_t *peer, __u32 ipaddr)
 {
        ksock_route_t   *route;
@@ -1040,8 +1038,6 @@ ksocknal_create_conn (lnet_ni_t *ni, ksock_route_t *route,
                goto failed_0;
        }
 
-       memset (conn, 0, sizeof (*conn));
-
        conn->ksnc_peer = NULL;
        conn->ksnc_route = NULL;
        conn->ksnc_sock = sock;
@@ -1853,7 +1849,7 @@ ksocknal_query (lnet_ni_t *ni, lnet_nid_t nid, cfs_time_t *when)
        return;
 }
 
-void
+static void
 ksocknal_push_peer (ksock_peer_t *peer)
 {
        int            index;
@@ -1886,7 +1882,7 @@ ksocknal_push_peer (ksock_peer_t *peer)
        }
 }
 
-int
+static int
 ksocknal_push (lnet_ni_t *ni, lnet_process_id_t id)
 {
        ksock_peer_t      *peer;
@@ -1935,7 +1931,7 @@ ksocknal_push (lnet_ni_t *ni, lnet_process_id_t id)
        return rc;
 }
 
-int
+static int
 ksocknal_add_interface(lnet_ni_t *ni, __u32 ipaddress, __u32 netmask)
 {
        ksock_net_t       *net = ni->ni_data;
@@ -1997,7 +1993,7 @@ ksocknal_add_interface(lnet_ni_t *ni, __u32 ipaddress, __u32 netmask)
        return rc;
 }
 
-void
+static void
 ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr)
 {
        struct list_head         *tmp;
@@ -2038,7 +2034,7 @@ ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr)
        }
 }
 
-int
+static int
 ksocknal_del_interface(lnet_ni_t *ni, __u32 ipaddress)
 {
        ksock_net_t       *net = ni->ni_data;
@@ -2213,7 +2209,7 @@ ksocknal_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg)
        /* not reached */
 }
 
-void
+static void
 ksocknal_free_buffers (void)
 {
        LASSERT (atomic_read(&ksocknal_data.ksnd_nactive_txs) == 0);
@@ -2256,7 +2252,7 @@ ksocknal_free_buffers (void)
        }
 }
 
-void
+static void
 ksocknal_base_shutdown(void)
 {
        struct ksock_sched_info *info;
@@ -2349,7 +2345,7 @@ ksocknal_base_shutdown(void)
        module_put(THIS_MODULE);
 }
 
-__u64
+static __u64
 ksocknal_new_incarnation (void)
 {
        struct timeval tv;
@@ -2364,7 +2360,7 @@ ksocknal_new_incarnation (void)
        return (((__u64)tv.tv_sec) * 1000000) + tv.tv_usec;
 }
 
-int
+static int
 ksocknal_base_startup(void)
 {
        struct ksock_sched_info *info;
@@ -2496,7 +2492,7 @@ ksocknal_base_startup(void)
        return -ENETDOWN;
 }
 
-void
+static void
 ksocknal_debug_peerhash (lnet_ni_t *ni)
 {
        ksock_peer_t    *peer = NULL;
@@ -2603,7 +2599,7 @@ ksocknal_shutdown (lnet_ni_t *ni)
                ksocknal_base_shutdown();
 }
 
-int
+static int
 ksocknal_enumerate_interfaces(ksock_net_t *net)
 {
        char      **names;
@@ -2660,7 +2656,7 @@ ksocknal_enumerate_interfaces(ksock_net_t *net)
        return j;
 }
 
-int
+static int
 ksocknal_search_new_ipif(ksock_net_t *net)
 {
        int     new_ipif = 0;
@@ -2702,7 +2698,7 @@ ksocknal_search_new_ipif(ksock_net_t *net)
        return new_ipif;
 }
 
-int
+static int
 ksocknal_start_schedulers(struct ksock_sched_info *info)
 {
        int     nthrs;
@@ -2748,7 +2744,7 @@ ksocknal_start_schedulers(struct ksock_sched_info *info)
        return rc;
 }
 
-int
+static int
 ksocknal_net_start_threads(ksock_net_t *net, __u32 *cpts, int ncpts)
 {
        int     newif = ksocknal_search_new_ipif(net);
@@ -2860,13 +2856,13 @@ ksocknal_startup (lnet_ni_t *ni)
 }
 
 
-void __exit
+static void __exit
 ksocknal_module_fini (void)
 {
        lnet_unregister_lnd(&the_ksocklnd);
 }
 
-int __init
+static int __init
 ksocknal_module_init (void)
 {
        int    rc;
index 3f878dee2e4287fb36b0bb722ff10282860b6abd..cd6792ea24ef1a57ba2c3dd74a40fd86e547d053 100644 (file)
@@ -60,13 +60,13 @@ static int rnet_htable_size = LNET_REMOTE_NETS_HASH_DEFAULT;
 module_param(rnet_htable_size, int, 0444);
 MODULE_PARM_DESC(rnet_htable_size, "size of remote network hash table");
 
-char *
+static char *
 lnet_get_routes(void)
 {
        return routes;
 }
 
-char *
+static char *
 lnet_get_networks(void)
 {
        char   *nets;
@@ -89,7 +89,7 @@ lnet_get_networks(void)
        return "tcp";
 }
 
-void
+static void
 lnet_init_locks(void)
 {
        spin_lock_init(&the_lnet.ln_eq_wait_lock);
@@ -98,7 +98,7 @@ lnet_init_locks(void)
        mutex_init(&the_lnet.ln_api_mutex);
 }
 
-void
+static void
 lnet_fini_locks(void)
 {
 }
@@ -177,7 +177,7 @@ lnet_create_locks(void)
        return -ENOMEM;
 }
 
-void lnet_assert_wire_constants (void)
+static void lnet_assert_wire_constants (void)
 {
        /* Wire protocol assertions generated by 'wirecheck'
         * running on Linux robert.bartonsoftware.com 2.6.8-1.521
@@ -270,7 +270,7 @@ void lnet_assert_wire_constants (void)
        CLASSERT ((int)sizeof(((lnet_hdr_t *)0)->msg.hello.type) == 4);
 }
 
-lnd_t *
+static lnd_t *
 lnet_find_lnd_by_type (int type)
 {
        lnd_t         *lnd;
@@ -415,7 +415,7 @@ lnet_freelist_fini (lnet_freelist_t *fl)
 
 #endif /* LNET_USE_LIB_FREELIST */
 
-__u64
+static __u64
 lnet_create_interface_cookie (void)
 {
        /* NB the interface cookie in wire handles guards against delayed
@@ -446,7 +446,7 @@ lnet_res_type2str(int type)
        }
 }
 
-void
+static void
 lnet_res_container_cleanup(struct lnet_res_container *rec)
 {
        int     count = 0;
@@ -490,7 +490,7 @@ lnet_res_container_cleanup(struct lnet_res_container *rec)
        rec->rec_type = 0; /* mark it as finalized */
 }
 
-int
+static int
 lnet_res_container_setup(struct lnet_res_container *rec,
                         int cpt, int type, int objnum, int objsz)
 {
@@ -608,7 +608,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh)
 
 int lnet_unprepare(void);
 
-int
+static int
 lnet_prepare(lnet_pid_t requested_pid)
 {
        /* Prepare to bring up the network */
@@ -913,7 +913,7 @@ lnet_ni_tq_credits(lnet_ni_t *ni)
        return credits;
 }
 
-void
+static void
 lnet_shutdown_lndnis (void)
 {
        int             i;
@@ -1030,7 +1030,7 @@ lnet_shutdown_lndnis (void)
        }
 }
 
-int
+static int
 lnet_startup_lndnis (void)
 {
        lnd_t                   *lnd;
index ae643f26933b4a891756476bcd60f436cd369516..d68c6e0b4f16147d2826a591bddaf5014a25b178 100644 (file)
@@ -387,7 +387,8 @@ EXPORT_SYMBOL(LNetMDBind);
 
 /**
  * Unlink the memory descriptor from any ME it may be linked to and release
- * the internal resources associated with it.
+ * the internal resources associated with it. As a result, active messages
+ * associated with the MD may get aborted.
  *
  * This function does not free the memory region associated with the MD;
  * i.e., the memory the user allocated for this MD. If the ME associated with
@@ -433,12 +434,11 @@ LNetMDUnlink (lnet_handle_md_t mdh)
                return -ENOENT;
        }
 
+       md->md_flags |= LNET_MD_FLAG_ABORTED;
        /* If the MD is busy, lnet_md_unlink just marks it for deletion, and
-        * when the NAL is done, the completion event flags that the MD was
+        * when the LND is done, the completion event flags that the MD was
         * unlinked.  Otherwise, we enqueue an event now... */
-
-       if (md->md_eq != NULL &&
-           md->md_refcount == 0) {
+       if (md->md_eq != NULL && md->md_refcount == 0) {
                lnet_build_unlink_event(md, &ev);
                lnet_eq_enqueue_event(md->md_eq, &ev);
        }
index 0081075cabee77cbf3ed931e8be27239db62ba78..0e422099aa9c4a3eb4aafa6ad84886fcc2a4af2c 100644 (file)
@@ -246,11 +246,12 @@ LNetMEUnlink(lnet_handle_me_t meh)
        }
 
        md = me->me_md;
-       if (md != NULL &&
-           md->md_eq != NULL &&
-           md->md_refcount == 0) {
-               lnet_build_unlink_event(md, &ev);
-               lnet_eq_enqueue_event(md->md_eq, &ev);
+       if (md != NULL) {
+               md->md_flags |= LNET_MD_FLAG_ABORTED;
+               if (md->md_eq != NULL && md->md_refcount == 0) {
+                       lnet_build_unlink_event(md, &ev);
+                       lnet_eq_enqueue_event(md->md_eq, &ev);
+               }
        }
 
        lnet_me_unlink(me);
index bbf43ae04ed0268f0fa6019c8a8e323b803e4661..95bf41fd68fc4c24b5a22e30b99030b38dc7f70a 100644 (file)
@@ -773,26 +773,30 @@ lnet_peer_alive_locked(lnet_peer_t *lp)
        return 0;
 }
 
-int
+/**
+ * \param msg The message to be sent.
+ * \param do_send True if lnet_ni_send() should be called in this function.
+ *       lnet_send() is going to lnet_net_unlock immediately after this, so
+ *       it sets do_send FALSE and I don't do the unlock/send/lock bit.
+ *
+ * \retval 0 If \a msg sent or OK to send.
+ * \retval EAGAIN If \a msg blocked for credit.
+ * \retval EHOSTUNREACH If the next hop of the message appears dead.
+ * \retval ECANCELED If the MD of the message has been unlinked.
+ */
+static int
 lnet_post_send_locked(lnet_msg_t *msg, int do_send)
 {
-       /* lnet_send is going to lnet_net_unlock immediately after this,
-        * so it sets do_send FALSE and I don't do the unlock/send/lock bit.
-        * I return EAGAIN if msg blocked, EHOSTUNREACH if msg_txpeer
-        * appears dead, and 0 if sent or OK to send */
-       struct lnet_peer        *lp = msg->msg_txpeer;
-       struct lnet_ni          *ni = lp->lp_ni;
-       struct lnet_tx_queue    *tq;
-       int                     cpt;
+       lnet_peer_t             *lp = msg->msg_txpeer;
+       lnet_ni_t               *ni = lp->lp_ni;
+       int                     cpt = msg->msg_tx_cpt;
+       struct lnet_tx_queue    *tq = ni->ni_tx_queues[cpt];
 
        /* non-lnet_send() callers have checked before */
        LASSERT(!do_send || msg->msg_tx_delayed);
        LASSERT(!msg->msg_receiving);
        LASSERT(msg->msg_tx_committed);
 
-       cpt = msg->msg_tx_cpt;
-       tq = ni->ni_tx_queues[cpt];
-
        /* NB 'lp' is always the next hop */
        if ((msg->msg_target.pid & LNET_PID_USERFLAG) == 0 &&
            lnet_peer_alive_locked(lp) == 0) {
@@ -809,6 +813,20 @@ lnet_post_send_locked(lnet_msg_t *msg, int do_send)
                return EHOSTUNREACH;
        }
 
+       if (msg->msg_md != NULL &&
+           (msg->msg_md->md_flags & LNET_MD_FLAG_ABORTED) != 0) {
+               lnet_net_unlock(cpt);
+
+               CNETERR("Aborting message for %s: LNetM[DE]Unlink() already "
+                       "called on the MD/ME.\n",
+                       libcfs_id2str(msg->msg_target));
+               if (do_send)
+                       lnet_finalize(ni, msg, -ECANCELED);
+
+               lnet_net_lock(cpt);
+               return ECANCELED;
+       }
+
        if (!msg->msg_peertxcredit) {
                LASSERT((lp->lp_txcredits < 0) ==
                         !list_empty(&lp->lp_txq));
@@ -1327,13 +1345,13 @@ lnet_send(lnet_nid_t src_nid, lnet_msg_t *msg, lnet_nid_t rtr_nid)
        rc = lnet_post_send_locked(msg, 0);
        lnet_net_unlock(cpt);
 
-       if (rc == EHOSTUNREACH)
-               return -EHOSTUNREACH;
+       if (rc == EHOSTUNREACH || rc == ECANCELED)
+               return -rc;
 
        if (rc == 0)
                lnet_ni_send(src_ni, msg);
 
-       return 0;
+       return 0; /* rc == 0 or EAGAIN */
 }
 
 static void
@@ -2288,7 +2306,6 @@ LNetGet(lnet_nid_t self, lnet_handle_md_t mdh,
                lnet_res_unlock(cpt);
 
                lnet_msg_free(msg);
-
                return -ENOENT;
        }
 
index 926923a104c559d6343adb070113bb91bce4b880..53d1c7e4f59d24358d7c08e65bebf39edc17274b 100644 (file)
@@ -135,7 +135,7 @@ lnet_notify_locked(lnet_peer_t *lp, int notifylnd, int alive, cfs_time_t when)
        CDEBUG(D_NET, "set %s %d\n", libcfs_nid2str(lp->lp_nid), alive);
 }
 
-void
+static void
 lnet_ni_notify_locked(lnet_ni_t *ni, lnet_peer_t *lp)
 {
        int     alive;
@@ -273,7 +273,7 @@ static void lnet_shuffle_seed(void)
 }
 
 /* NB expects LNET_LOCK held */
-void
+static void
 lnet_add_route_to_rnet (lnet_remotenet_t *rnet, lnet_route_t *route)
 {
        unsigned int      len = 0;
@@ -866,7 +866,6 @@ lnet_create_rc_data_locked(lnet_peer_t *gateway)
        if (pi == NULL)
                goto out;
 
-       memset(pi, 0, LNET_PINGINFO_SIZE);
        for (i = 0; i < LNET_MAX_RTR_NIS; i++) {
                pi->pi_ni[i].ns_nid = LNET_NID_ANY;
                pi->pi_ni[i].ns_status = LNET_NI_STATUS_INVALID;
index 352fc96398d2a4266cf7978cf1518325133ddca2..2aeebbfdc0e350fa05f964d381b115cc4962d490 100644 (file)
@@ -204,9 +204,6 @@ lstcon_group_alloc(char *name, lstcon_group_t **grpp)
        if (grp == NULL)
                return -ENOMEM;
 
-       memset(grp, 0, offsetof(lstcon_group_t,
-                               grp_ndl_hash[LST_NODE_HASHSIZE]));
-
        grp->grp_ref = 1;
        if (name != NULL)
                strcpy(grp->grp_name, name);
@@ -815,8 +812,6 @@ lstcon_group_info(char *name, lstcon_ndlist_ent_t *gents_p,
                return -ENOMEM;
        }
 
-       memset(gentp, 0, sizeof(lstcon_ndlist_ent_t));
-
        list_for_each_entry(ndl, &grp->grp_ndl_list, ndl_link)
                LST_NODE_STATE_COUNTER(ndl->ndl_node, gentp);
 
@@ -971,8 +966,6 @@ lstcon_batch_info(char *name, lstcon_test_batch_ent_t *ent_up, int server,
        if (entp == NULL)
                return -ENOMEM;
 
-       memset(entp, 0, sizeof(lstcon_test_batch_ent_t));
-
        if (test == NULL) {
                entp->u.tbe_batch.bae_ntest = bat->bat_ntest;
                entp->u.tbe_batch.bae_state = bat->bat_state;
@@ -1319,7 +1312,6 @@ lstcon_test_add(char *batch_name, int type, int loop,
                goto out;
        }
 
-       memset(test, 0, offsetof(lstcon_test_t, tes_param[paramlen]));
        test->tes_hdr.tsb_id    = batch->bat_hdr.tsb_id;
        test->tes_batch         = batch;
        test->tes_type          = type;
@@ -1789,8 +1781,6 @@ lstcon_session_info(lst_sid_t *sid_up, int *key_up, unsigned *featp,
        if (entp == NULL)
                return -ENOMEM;
 
-       memset(entp, 0, sizeof(*entp));
-
        list_for_each_entry(ndl, &console_session.ses_ndl_list, ndl_link)
                LST_NODE_STATE_COUNTER(ndl->ndl_node, entp);
 
index 050723a0243a718ace7723134c3eb50634ca74a8..b2b63e93cc505b7439b8d7d92c28d75066b231c3 100644 (file)
@@ -149,7 +149,6 @@ sfw_register_test (srpc_service_t *service, sfw_test_client_ops_t *cliops)
        if (tsc == NULL)
                return -ENOMEM;
 
-       memset(tsc, 0, sizeof(sfw_test_case_t));
        tsc->tsc_cli_ops     = cliops;
        tsc->tsc_srv_service = service;
 
@@ -747,7 +746,6 @@ sfw_add_test_instance (sfw_batch_t *tsb, srpc_server_rpc_t *rpc)
                return -ENOMEM;
        }
 
-       memset(tsi, 0, sizeof(*tsi));
        spin_lock_init(&tsi->tsi_lock);
        atomic_set(&tsi->tsi_nactive, 0);
        INIT_LIST_HEAD(&tsi->tsi_units);
index 209e4c7e6f8a8a8fd3da342f0609be6fc166fae9..4f65ba1158bff7980e5ccccd7d5477eac7214638 100644 (file)
@@ -57,4 +57,5 @@ config LUSTRE_TRANSLATE_ERRNOS
 config LUSTRE_LLITE_LLOOP
        tristate "Lustre virtual block device"
        depends on LUSTRE_FS && BLOCK
+       depends on !PPC_64K_PAGES && !ARM64_64K_PAGES
        default m
index 6f5674d1aa7255c4b07b765405e8ba471c1466e3..20078df5f3779ec7e607cbd28afa651c65165ac9 100644 (file)
@@ -98,9 +98,10 @@ static ssize_t lprocfs_fid_space_seq_write(struct file *file,
                                           const char __user *buffer,
                                           size_t count, loff_t *off)
 {
-       struct lu_client_seq *seq = ((struct seq_file *)file->private_data)->private;
+       struct lu_client_seq *seq;
        int rc;
 
+       seq = ((struct seq_file *)file->private_data)->private;
        LASSERT(seq != NULL);
 
        mutex_lock(&seq->lcs_mutex);
@@ -135,10 +136,11 @@ static ssize_t lprocfs_fid_width_seq_write(struct file *file,
                                           const char __user *buffer,
                                           size_t count, loff_t *off)
 {
-       struct lu_client_seq *seq = ((struct seq_file *)file->private_data)->private;
+       struct lu_client_seq *seq;
        __u64  max;
        int rc, val;
 
+       seq = ((struct seq_file *)file->private_data)->private;
        LASSERT(seq != NULL);
 
        rc = lprocfs_write_helper(buffer, count, &val);
index 1f8abba31428bc524a8e1494e2fcd42db7aad5d2..211430d541c192a1f10ed62f84cd969e20eb13ca 100644 (file)
@@ -324,7 +324,6 @@ void fld_client_proc_fini(struct lu_client_fld *fld)
        return;
 }
 #endif
-
 EXPORT_SYMBOL(fld_client_proc_fini);
 
 static inline int hash_is_sane(int hash)
index 530adde46963b42ce0ab8c64f1eaa4345230e79d..8b366356f77fd8c6da2d85b8302770c630574ba7 100644 (file)
@@ -91,10 +91,11 @@ static ssize_t
 fld_proc_hash_seq_write(struct file *file, const char *buffer,
                        size_t count, loff_t *off)
 {
-       struct lu_client_fld *fld = ((struct seq_file *)file->private_data)->private;
+       struct lu_client_fld *fld;
        struct lu_fld_hash *hash = NULL;
        int i;
 
+       fld = ((struct seq_file *)file->private_data)->private;
        LASSERT(fld != NULL);
 
        for (i = 0; fld_hash[i].fh_name != NULL; i++) {
index 0c6b7841e56d09b47ba168082af285d04991fa46..bf5b2cb792e3e1070c927b10cb2ae4a5317195be 100644 (file)
@@ -1390,7 +1390,7 @@ int ldlm_cli_cancel_req(struct obd_export *exp, struct list_head *head,
 int ldlm_cancel_resource_local(struct ldlm_resource *res,
                               struct list_head *cancels,
                               ldlm_policy_data_t *policy,
-                              ldlm_mode_t mode, int lock_flags,
+                              ldlm_mode_t mode, __u64 lock_flags,
                               ldlm_cancel_flags_t cancel_flags, void *opaque);
 int ldlm_cli_cancel_list_local(struct list_head *cancels, int count,
                               ldlm_cancel_flags_t flags);
index f6b7d10cb78cf64c46652370cf803c4af0e1b6a5..b837d34f0b4d0d545009aa646920a0542a4f28d6 100644 (file)
@@ -1591,7 +1591,8 @@ struct ptlrpc_request {
                rq_replay:1,
                rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1,
                rq_no_delay:1, rq_net_err:1, rq_wait_ctx:1,
-               rq_early:1, rq_must_unlink:1,
+               rq_early:1,
+               rq_req_unlink:1, rq_reply_unlink:1,
                rq_memalloc:1,      /* req originated from "kswapd" */
                /* server-side flags */
                rq_packed_final:1,  /* packed final reply */
@@ -3039,7 +3040,8 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req)
                spin_unlock(&req->rq_lock);
                return 1;
        }
-       rc = req->rq_receiving_reply || req->rq_must_unlink;
+       rc = req->rq_receiving_reply;
+       rc = rc || req->rq_req_unlink || req->rq_reply_unlink;
        spin_unlock(&req->rq_lock);
        return rc;
 }
index e265820c009fa3d8566383899716184755d20c0b..f8a9d7c91e818092a3d8cc1785816ff227ea23ab 100644 (file)
@@ -1818,7 +1818,7 @@ static inline int md_enqueue(struct obd_export *exp,
                             struct lustre_handle *lockh,
                             void *lmm, int lmmsize,
                             struct ptlrpc_request **req,
-                            int extra_lock_flags)
+                            __u64 extra_lock_flags)
 {
        int rc;
 
index af89843c312b490f342d0234b7af80faf59e9562..54ef540451150b97e2792016b6fd89f949d7fec4 100644 (file)
@@ -87,6 +87,10 @@ struct osc_enqueue_args {
        unsigned int          oa_agl:1;
 };
 
+extern void osc_update_enqueue(struct lustre_handle *lov_lockhp,
+                              struct lov_oinfo *loi, __u64 flags,
+                              struct ost_lvb *lvb, __u32 mode, int rc);
+
 #if 0
 int osc_extent_blocking_cb(struct ldlm_lock *lock,
                           struct ldlm_lock_desc *new, void *data,
index 7bbca4bf6b82aa3dd31049738e8aa3eb1411a544..a658116daf2b474e77c996cf29122656977bc79b 100644 (file)
@@ -177,7 +177,7 @@ static int cl_io_get(struct inode *inode, struct lu_env **envout,
                        io->ci_obj = clob;
                        *envout = env;
                        *ioout  = io;
-                       result = +1;
+                       result = 1;
                } else
                        result = PTR_ERR(env);
        } else
@@ -204,7 +204,7 @@ int cl_glimpse_size0(struct inode *inode, int agl)
 
        result = cl_io_get(inode, &env, &io, &refcheck);
        if (result > 0) {
-       again:
+again:
                io->ci_verify_layout = 1;
                result = cl_io_init(env, io, CIT_MISC, io->ci_obj);
                if (result > 0)
index 1b0c216bc5687742198c89c8d6f21b07036a11bb..08d6fbdf6ed9bc31385d9bc9a1551a37b9e94f7d 100644 (file)
@@ -126,6 +126,7 @@ void ccc_key_fini(const struct lu_context *ctx,
                         struct lu_context_key *key, void *data)
 {
        struct ccc_thread_info *info = data;
+
        OBD_SLAB_FREE_PTR(info, ccc_thread_kmem);
 }
 
@@ -144,6 +145,7 @@ void ccc_session_key_fini(const struct lu_context *ctx,
                                 struct lu_context_key *key, void *data)
 {
        struct ccc_session *session = data;
+
        OBD_SLAB_FREE_PTR(session, ccc_session_kmem);
 }
 
@@ -264,7 +266,7 @@ int ccc_req_init(const struct lu_env *env, struct cl_device *dev,
  * fails. Access to this environment is serialized by ccc_inode_fini_guard
  * mutex.
  */
-static struct lu_env *ccc_inode_fini_env = NULL;
+static struct lu_env *ccc_inode_fini_env;
 
 /**
  * A mutex serializing calls to slp_inode_fini() under extreme memory
@@ -572,6 +574,7 @@ void ccc_lock_delete(const struct lu_env *env,
 void ccc_lock_fini(const struct lu_env *env, struct cl_lock_slice *slice)
 {
        struct ccc_lock *clk = cl2ccc_lock(slice);
+
        OBD_SLAB_FREE_PTR(clk, ccc_lock_kmem);
 }
 
@@ -733,6 +736,7 @@ int ccc_io_one_lock(const struct lu_env *env, struct cl_io *io,
                    loff_t start, loff_t end)
 {
        struct cl_object *obj = io->ci_obj;
+
        return ccc_io_one_lock_index(env, io, enqflags, mode,
                                     cl_index(obj, start), cl_index(obj, end));
 }
@@ -817,11 +821,12 @@ int ccc_prep_size(const struct lu_env *env, struct cl_object *obj,
                                 * linux-2.6.18-128.1.1 miss to do that.
                                 * --bug 17336 */
                                loff_t size = cl_isize_read(inode);
-                               unsigned long cur_index = start >> PAGE_CACHE_SHIFT;
+                               loff_t cur_index = start >> PAGE_CACHE_SHIFT;
+                               loff_t size_index = ((size - 1) >> PAGE_CACHE_SHIFT);
 
                                if ((size == 0 && cur_index != 0) ||
-                                   (((size - 1) >> PAGE_CACHE_SHIFT) < cur_index))
-                               *exceed = 1;
+                                   size_index < cur_index)
+                                       *exceed = 1;
                        }
                        return result;
                } else {
@@ -1269,7 +1274,7 @@ struct lov_stripe_md *ccc_inode_lsm_get(struct inode *inode)
        return lov_lsm_get(cl_i2info(inode)->lli_clob);
 }
 
-void inline ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm)
+inline void ccc_inode_lsm_put(struct inode *inode, struct lov_stripe_md *lsm)
 {
        lov_lsm_put(cl_i2info(inode)->lli_clob, lsm);
 }
index 21de1cd2afbaca90db6637205bd13d1cf7f139c9..367bdadee1625f2bd5853647a0bdc50f752036de 100644 (file)
@@ -63,7 +63,7 @@ int cl_init_ea_size(struct obd_export *md_exp, struct obd_export *dt_exp)
        if (rc)
                return rc;
 
-       stripes = min(desc.ld_tgt_count, (__u32)LOV_MAX_STRIPE_COUNT);
+       stripes = min_t(__u32, desc.ld_tgt_count, LOV_MAX_STRIPE_COUNT);
        lsm.lsm_stripe_count = stripes;
        easize = obd_size_diskmd(dt_exp, &lsm);
 
index 8bb59155968f9e8991ba32075ecc1f3161a3d69d..d8ad808fc8dc7ab6604f9e7a2b0fe41ddc8bc2fc 100644 (file)
@@ -74,9 +74,8 @@ static int import_set_conn(struct obd_import *imp, struct obd_uuid *uuid,
 
        if (create) {
                OBD_ALLOC(imp_conn, sizeof(*imp_conn));
-               if (!imp_conn) {
+               if (!imp_conn)
                        GOTO(out_put, rc = -ENOMEM);
-               }
        }
 
        spin_lock(&imp->imp_lock);
@@ -511,7 +510,7 @@ int client_connect_import(const struct lu_env *env,
 
        rc = ptlrpc_connect_import(imp);
        if (rc != 0) {
-               LASSERT (imp->imp_state == LUSTRE_IMP_DISCON);
+               LASSERT(imp->imp_state == LUSTRE_IMP_DISCON);
                GOTO(out_ldlm, rc);
        }
        LASSERT(*exp != NULL && (*exp)->exp_connection);
@@ -662,33 +661,32 @@ void target_send_reply(struct ptlrpc_request *req, int rc, int fail_id)
        struct ptlrpc_reply_state *rs;
        struct obd_export        *exp;
 
-       if (req->rq_no_reply) {
+       if (req->rq_no_reply)
                return;
-       }
 
        svcpt = req->rq_rqbd->rqbd_svcpt;
        rs = req->rq_reply_state;
        if (rs == NULL || !rs->rs_difficult) {
                /* no notifiers */
-               target_send_reply_msg (req, rc, fail_id);
+               target_send_reply_msg(req, rc, fail_id);
                return;
        }
 
        /* must be an export if locks saved */
-       LASSERT (req->rq_export != NULL);
+       LASSERT(req->rq_export != NULL);
        /* req/reply consistent */
        LASSERT(rs->rs_svcpt == svcpt);
 
        /* "fresh" reply */
-       LASSERT (!rs->rs_scheduled);
-       LASSERT (!rs->rs_scheduled_ever);
-       LASSERT (!rs->rs_handled);
-       LASSERT (!rs->rs_on_net);
-       LASSERT (rs->rs_export == NULL);
-       LASSERT (list_empty(&rs->rs_obd_list));
-       LASSERT (list_empty(&rs->rs_exp_list));
-
-       exp = class_export_get (req->rq_export);
+       LASSERT(!rs->rs_scheduled);
+       LASSERT(!rs->rs_scheduled_ever);
+       LASSERT(!rs->rs_handled);
+       LASSERT(!rs->rs_on_net);
+       LASSERT(rs->rs_export == NULL);
+       LASSERT(list_empty(&rs->rs_obd_list));
+       LASSERT(list_empty(&rs->rs_exp_list));
+
+       exp = class_export_get(req->rq_export);
 
        /* disable reply scheduling while I'm setting up */
        rs->rs_scheduled = 1;
index fcc7a99ce395e5c44228c541d13ae5568e084607..3accbce87faf087ae06030e8ec73643cc2314446 100644 (file)
@@ -1768,7 +1768,7 @@ int ldlm_cancel_lru(struct ldlm_namespace *ns, int nr,
 int ldlm_cancel_resource_local(struct ldlm_resource *res,
                               struct list_head *cancels,
                               ldlm_policy_data_t *policy,
-                              ldlm_mode_t mode, int lock_flags,
+                              ldlm_mode_t mode, __u64 lock_flags,
                               ldlm_cancel_flags_t cancel_flags, void *opaque)
 {
        struct ldlm_lock *lock;
index c55d72f79b263fea022eaeb47105bf9e63717f49..25ce0e5f9892a9682f5c4a9ad30cff80b672a9ea 100644 (file)
@@ -194,9 +194,10 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
                                      size_t count, loff_t *off)
 {
        struct ldlm_namespace *ns = ((struct seq_file *)file->private_data)->private;
-       char dummy[MAX_STRING_SIZE + 1], *end;
+       char dummy[MAX_STRING_SIZE + 1];
        unsigned long tmp;
        int lru_resize;
+       int err;
 
        dummy[MAX_STRING_SIZE] = '\0';
        if (copy_from_user(dummy, buffer, MAX_STRING_SIZE))
@@ -228,8 +229,8 @@ static ssize_t lprocfs_lru_size_seq_write(struct file *file, const char *buffer,
                return count;
        }
 
-       tmp = simple_strtoul(dummy, &end, 0);
-       if (dummy == end) {
+       err = kstrtoul(dummy, 10, &tmp);
+       if (err != 0) {
                CERROR("invalid value written\n");
                return -EINVAL;
        }
@@ -854,9 +855,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns,
 {
        int rc;
 
-       if (!ns) {
+       if (!ns)
                return;
-       }
 
        spin_lock(&ns->ns_lock);
        ns->ns_stopping = 1;
@@ -888,9 +888,8 @@ void ldlm_namespace_free_prior(struct ldlm_namespace *ns,
  */
 void ldlm_namespace_free_post(struct ldlm_namespace *ns)
 {
-       if (!ns) {
+       if (!ns)
                return;
-       }
 
        /* Make sure that nobody can find this ns in its list. */
        ldlm_namespace_unregister(ns, ns->ns_client);
index ba43ff7f7900950eb94286ed65fecd381e7f2c5c..f63eac98d54bf3ff891fca204ead08175fa15941 100644 (file)
 #include <linux/libcfs/libcfs.h>
 
 unsigned long cfs_fail_loc = 0;
-unsigned int cfs_fail_val = 0;
-wait_queue_head_t cfs_race_waitq;
-int cfs_race_state;
-
 EXPORT_SYMBOL(cfs_fail_loc);
+
+unsigned int cfs_fail_val = 0;
 EXPORT_SYMBOL(cfs_fail_val);
+
+wait_queue_head_t cfs_race_waitq;
 EXPORT_SYMBOL(cfs_race_waitq);
+
+int cfs_race_state;
 EXPORT_SYMBOL(cfs_race_state);
 
 int __cfs_fail_check_set(__u32 id, __u32 value, int set)
index ac3a444a918d60a5c285522afb2bfeb5f3d2c03b..e52e33aab55b78dbbf1a52091ead65023f3b16c4 100644 (file)
 int
 libcfs_sock_ioctl(int cmd, unsigned long arg)
 {
+       mm_segment_t    oldmm = get_fs();
        struct socket  *sock;
-       int          rc;
+       int             rc;
+       struct file    *sock_filp;
 
        rc = sock_create (PF_INET, SOCK_STREAM, 0, &sock);
        if (rc != 0) {
                CERROR ("Can't create socket: %d\n", rc);
                return rc;
        }
-       rc = kernel_sock_ioctl(sock, cmd, arg);
-       sock_release(sock);
+
+       sock_filp = sock_alloc_file(sock, 0, NULL);
+       if (IS_ERR(sock_filp)) {
+               sock_release(sock);
+               rc = PTR_ERR(sock_filp);
+               goto out;
+       }
+
+       set_fs(KERNEL_DS);
+       if (sock_filp->f_op->unlocked_ioctl)
+               rc = sock_filp->f_op->unlocked_ioctl(sock_filp, cmd, arg);
+       set_fs(oldmm);
+
+       fput(sock_filp);
+out:
        return rc;
 }
 
@@ -183,8 +198,6 @@ libcfs_ipif_enumerate (char ***namesp)
                rc = -ENOMEM;
                goto out1;
        }
-       /* NULL out all names[i] */
-       memset (names, 0, nfound * sizeof(*names));
 
        for (i = 0; i < nfound; i++) {
 
index ae6f61aa4da6f661943b7730f415ff15640b796b..6efaf03196d57bab834c400fc2e0ce57c06dfe36 100644 (file)
@@ -1266,7 +1266,7 @@ static long ll_dir_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
                if (mdtidx < 0)
                        return mdtidx;
 
-               if (put_user((int)mdtidx, (int*)arg))
+               if (put_user((int)mdtidx, (int *)arg))
                        return -EFAULT;
 
                return 0;
@@ -1501,7 +1501,7 @@ out_rmdir:
                                GOTO(out_req, rc = -EFAULT);
                        rc = -EOVERFLOW;
                }
-       skip_lmm:
+skip_lmm:
                if (cmd == IOC_MDC_GETFILEINFO || cmd == LL_IOC_MDC_GETINFO) {
                        struct lov_user_mds_data *lmdp;
                        lstat_t st = { 0 };
@@ -1525,7 +1525,7 @@ out_rmdir:
                                GOTO(out_req, rc = -EFAULT);
                }
 
-       out_req:
+out_req:
                ptlrpc_req_finished(request);
                if (filename)
                        ll_putname(filename);
@@ -1589,9 +1589,9 @@ out_rmdir:
                if (copy_to_user(&lumd->lmd_st, &st, sizeof(st)))
                        GOTO(free_lsm, rc = -EFAULT);
 
-       free_lsm:
+free_lsm:
                obd_free_memmd(sbi->ll_dt_exp, &lsm);
-       free_lmm:
+free_lmm:
                OBD_FREE_LARGE(lmm, lmmsize);
                return rc;
        }
@@ -1653,7 +1653,7 @@ out_rmdir:
                                CDEBUG(D_QUOTA, "copy_to_user failed\n");
                        GOTO(out_poll, rc);
                }
-       out_poll:
+out_poll:
                OBD_FREE_PTR(check);
                return rc;
        }
@@ -1702,9 +1702,9 @@ out_rmdir:
                                rc = -EFAULT;
                }
 
-       out_quotactl_20:
+out_quotactl_20:
                OBD_FREE_PTR(qctl_20);
-       out_quotactl_18:
+out_quotactl_18:
                OBD_FREE_PTR(qctl_18);
                return rc;
        }
@@ -1726,7 +1726,7 @@ out_rmdir:
                if (rc == 0 && copy_to_user((void *)arg,qctl,sizeof(*qctl)))
                        rc = -EFAULT;
 
-       out_quotactl:
+out_quotactl:
                OBD_FREE_PTR(qctl);
                return rc;
        }
@@ -1778,7 +1778,7 @@ out_rmdir:
                        return -EFAULT;
                return 0;
        case LL_IOC_GET_CONNECT_FLAGS: {
-               return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void*)arg);
+               return obd_iocontrol(cmd, sbi->ll_md_exp, 0, NULL, (void *)arg);
        }
        case OBD_IOC_CHANGELOG_SEND:
        case OBD_IOC_CHANGELOG_CLEAR:
index 716e1ee0104f6fe0c2c1323689f216acff807bdc..660fd4d755ebeb3e94c7d5acb5e1ad37bcbf1f9c 100644 (file)
@@ -290,7 +290,7 @@ static int ll_md_close(struct obd_export *md_exp, struct inode *inode,
           we can skip talking to MDS */
        if (file->f_dentry->d_inode) { /* Can this ever be false? */
                int lockmode;
-               int flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
+               __u64 flags = LDLM_FL_BLOCK_GRANTED | LDLM_FL_TEST_LOCK;
                struct lustre_handle lockh;
                struct inode *inode = file->f_dentry->d_inode;
                ldlm_policy_data_t policy = {.l_inodebits={MDS_INODELOCK_OPEN}};
@@ -2623,7 +2623,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
        struct md_op_data *op_data;
        struct lustre_handle lockh = {0};
        ldlm_policy_data_t flock = {{0}};
-       int flags = 0;
+       __u64 flags = 0;
        int rc;
        int rc2 = 0;
 
@@ -2708,7 +2708,7 @@ ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock)
        if (IS_ERR(op_data))
                return PTR_ERR(op_data);
 
-       CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#x, mode=%u, "
+       CDEBUG(D_DLMTRACE, "inode=%lu, pid=%u, flags=%#llx, mode=%u, "
               "start="LPU64", end="LPU64"\n", inode->i_ino, flock.l_flock.pid,
               flags, einfo.ei_mode, flock.l_flock.start, flock.l_flock.end);
 
index d06d0b1ab08afed32af5b019ba90a31c5e74cf7b..2f11cbf5639c5bfe5a759d5c87649b9553bc2e79 100644 (file)
@@ -41,7 +41,7 @@
 #define DEBUG_SUBSYSTEM S_LLITE
 
 #include <linux/fs.h>
-#include <asm/uaccess.h>
+#include <linux/uaccess.h>
 #include <linux/file.h>
 #include <linux/kmod.h>
 
@@ -63,10 +63,10 @@ static struct list_head *ll_capa_list = &capa_list[CAPA_SITE_CLIENT];
 struct timer_list ll_capa_timer;
 /* for debug: indicate whether capa on llite is enabled or not */
 static atomic_t ll_capa_debug = ATOMIC_INIT(0);
-static unsigned long long ll_capa_renewed = 0;
-static unsigned long long ll_capa_renewal_noent = 0;
-static unsigned long long ll_capa_renewal_failed = 0;
-static unsigned long long ll_capa_renewal_retries = 0;
+static unsigned long long ll_capa_renewed;
+static unsigned long long ll_capa_renewal_noent;
+static unsigned long long ll_capa_renewal_failed;
+static unsigned long long ll_capa_renewal_retries;
 
 static int ll_update_capa(struct obd_capa *ocapa, struct lustre_capa *capa);
 
index deca27ea33fea1c95fb1d8fa78e7f9d505ffc9d0..7eadd6007106cf798541c32a56c3cbeb58def78c 100644 (file)
@@ -1537,12 +1537,14 @@ int ll_setattr(struct dentry *de, struct iattr *attr)
              !(attr->ia_mode & S_ISGID))))
                attr->ia_valid |= ATTR_FORCE;
 
-       if ((mode & S_ISUID) &&
+       if ((attr->ia_valid & ATTR_MODE) &&
+           (mode & S_ISUID) &&
            !(attr->ia_mode & S_ISUID) &&
            !(attr->ia_valid & ATTR_KILL_SUID))
                attr->ia_valid |= ATTR_KILL_SUID;
 
-       if (((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) &&
+       if ((attr->ia_valid & ATTR_MODE) &&
+           ((mode & (S_ISGID|S_IXGRP)) == (S_ISGID|S_IXGRP)) &&
            !(attr->ia_mode & S_ISGID) &&
            !(attr->ia_valid & ATTR_KILL_SGID))
                attr->ia_valid |= ATTR_KILL_SGID;
index 77ee9e58cf87c7bc34a9b541ffa9af244342d2f5..d9c874c95ac8633b41b6ebfd143d2901f71760d2 100644 (file)
@@ -811,37 +811,38 @@ static ssize_t ll_xattr_cache_seq_write(struct file *file, const char *buffer,
 LPROC_SEQ_FOPS(ll_xattr_cache);
 
 static struct lprocfs_vars lprocfs_llite_obd_vars[] = {
-       { "uuid",         &ll_sb_uuid_fops,       0, 0 },
+       { "uuid",         &ll_sb_uuid_fops,       NULL, 0 },
        //{ "mntpt_path",   ll_rd_path,      0, 0 },
-       { "fstype",       &ll_fstype_fops,        0, 0 },
-       { "site",         &ll_site_stats_fops,    0, 0 },
-       { "blocksize",    &ll_blksize_fops,       0, 0 },
-       { "kbytestotal",  &ll_kbytestotal_fops,   0, 0 },
-       { "kbytesfree",   &ll_kbytesfree_fops,    0, 0 },
-       { "kbytesavail",  &ll_kbytesavail_fops,   0, 0 },
-       { "filestotal",   &ll_filestotal_fops,    0, 0 },
-       { "filesfree",    &ll_filesfree_fops,     0, 0 },
-       { "client_type",  &ll_client_type_fops,   0, 0 },
+       { "fstype",       &ll_fstype_fops,        NULL, 0 },
+       { "site",         &ll_site_stats_fops,    NULL, 0 },
+       { "blocksize",    &ll_blksize_fops,       NULL, 0 },
+       { "kbytestotal",  &ll_kbytestotal_fops,   NULL, 0 },
+       { "kbytesfree",   &ll_kbytesfree_fops,    NULL, 0 },
+       { "kbytesavail",  &ll_kbytesavail_fops,   NULL, 0 },
+       { "filestotal",   &ll_filestotal_fops,    NULL, 0 },
+       { "filesfree",    &ll_filesfree_fops,     NULL, 0 },
+       { "client_type",  &ll_client_type_fops,   NULL, 0 },
        //{ "filegroups",   lprocfs_rd_filegroups,  0, 0 },
-       { "max_read_ahead_mb", &ll_max_readahead_mb_fops, 0 },
-       { "max_read_ahead_per_file_mb", &ll_max_readahead_per_file_mb_fops, 0 },
-       { "max_read_ahead_whole_mb", &ll_max_read_ahead_whole_mb_fops, 0 },
-       { "max_cached_mb",    &ll_max_cached_mb_fops, 0 },
-       { "checksum_pages",   &ll_checksum_fops, 0 },
-       { "max_rw_chunk",     &ll_max_rw_chunk_fops, 0 },
-       { "stats_track_pid",  &ll_track_pid_fops, 0 },
-       { "stats_track_ppid", &ll_track_ppid_fops, 0 },
-       { "stats_track_gid",  &ll_track_gid_fops, 0 },
-       { "statahead_max",    &ll_statahead_max_fops, 0 },
-       { "statahead_agl",    &ll_statahead_agl_fops, 0 },
-       { "statahead_stats",  &ll_statahead_stats_fops, 0, 0 },
-       { "lazystatfs",       &ll_lazystatfs_fops, 0 },
-       { "max_easize",       &ll_max_easize_fops, 0, 0 },
-       { "default_easize",   &ll_defult_easize_fops, 0, 0 },
-       { "max_cookiesize",   &ll_max_cookiesize_fops, 0, 0 },
-       { "default_cookiesize", &ll_defult_cookiesize_fops, 0, 0 },
-       { "sbi_flags",        &ll_sbi_flags_fops, 0, 0 },
-       { "xattr_cache",      &ll_xattr_cache_fops, 0, 0 },
+       { "max_read_ahead_mb", &ll_max_readahead_mb_fops, NULL },
+       { "max_read_ahead_per_file_mb", &ll_max_readahead_per_file_mb_fops,
+               NULL },
+       { "max_read_ahead_whole_mb", &ll_max_read_ahead_whole_mb_fops, NULL },
+       { "max_cached_mb",    &ll_max_cached_mb_fops, NULL },
+       { "checksum_pages",   &ll_checksum_fops, NULL },
+       { "max_rw_chunk",     &ll_max_rw_chunk_fops, NULL },
+       { "stats_track_pid",  &ll_track_pid_fops, NULL },
+       { "stats_track_ppid", &ll_track_ppid_fops, NULL },
+       { "stats_track_gid",  &ll_track_gid_fops, NULL },
+       { "statahead_max",    &ll_statahead_max_fops, NULL },
+       { "statahead_agl",    &ll_statahead_agl_fops, NULL },
+       { "statahead_stats",  &ll_statahead_stats_fops, NULL, 0 },
+       { "lazystatfs",       &ll_lazystatfs_fops, NULL },
+       { "max_easize",       &ll_max_easize_fops, NULL, 0 },
+       { "default_easize",   &ll_defult_easize_fops, NULL, 0 },
+       { "max_cookiesize",   &ll_max_cookiesize_fops, NULL, 0 },
+       { "default_cookiesize", &ll_defult_cookiesize_fops, NULL, 0 },
+       { "sbi_flags",        &ll_sbi_flags_fops, NULL, 0 },
+       { "xattr_cache",      &ll_xattr_cache_fops, NULL, 0 },
        { 0 }
 };
 
index 0e0b404cb5e6cc3b33dc8b736675485a617cdd55..2539a89e425590afaa56c5c91801584da0741ca0 100644 (file)
@@ -269,8 +269,10 @@ static int vvp_mmap_locks(const struct lu_env *env,
                               descr->cld_mode, descr->cld_start,
                               descr->cld_end);
 
-                       if (result < 0)
+                       if (result < 0) {
+                               up_read(&mm->mmap_sem);
                                return result;
+                       }
 
                        if (vma->vm_end - addr >= count)
                                break;
@@ -622,7 +624,7 @@ static int vvp_io_kernel_fault(struct vvp_fault_io *cfio)
                       page_private(vmf->page), vmf->virtual_address);
                if (unlikely(!(cfio->fault.ft_flags & VM_FAULT_LOCKED))) {
                        lock_page(vmf->page);
-                       cfio->fault.ft_flags &= VM_FAULT_LOCKED;
+                       cfio->fault.ft_flags |= VM_FAULT_LOCKED;
                }
 
                cfio->ft_vmpage = vmf->page;
index c6c27bbb43b42404eacc2deb97945ce3467ad840..c1eff650aa82ec94c315a124e0327d9aa4f949c3 100644 (file)
@@ -246,6 +246,7 @@ int ll_setxattr(struct dentry *dentry, const char *name,
                        int lum_size = (lump->lmm_magic == LOV_USER_MAGIC_V1) ?
                                sizeof(*lump) : sizeof(struct lov_user_md_v3);
 
+                       memset(&f, 0, sizeof(f)); /* f.f_flags is used below */
                        f.f_dentry = dentry;
                        rc = ll_lov_setstripe_ea_info(inode, &f, flags, lump,
                                                      lum_size);
index 4edf8a31221c3f32725af99987dca6ae08e75e00..c17a49ee7d445e289e4e021668952358af161d3f 100644 (file)
@@ -1715,7 +1715,7 @@ static int
 lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo,
                   struct lookup_intent *it, struct md_op_data *op_data,
                   struct lustre_handle *lockh, void *lmm, int lmmsize,
-                  int extra_lock_flags)
+                  __u64 extra_lock_flags)
 {
        struct ptlrpc_request      *req = it->d.lustre.it_data;
        struct obd_device         *obd = exp->exp_obd;
index 38508a5c827f5c43525d57e0c1bc92ea74c54034..22326434d4128fab71a56526784b8d9677137adb 100644 (file)
@@ -252,7 +252,7 @@ int lov_prep_match_set(struct obd_export *exp, struct obd_info *oinfo,
                       ldlm_policy_data_t *policy, __u32 mode,
                       struct lustre_handle *lockh,
                       struct lov_request_set **reqset);
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags);
+int lov_fini_match_set(struct lov_request_set *set, __u32 mode, __u64 flags);
 int lov_prep_cancel_set(struct obd_export *exp, struct obd_info *oinfo,
                        struct lov_stripe_md *lsm,
                        __u32 mode, struct lustre_handle *lockh,
index bd6490d0129cc7f5a56bba734f7d496e67ab4a30..984f4c3e5f044d612975eecb5567886497af6905 100644 (file)
@@ -39,8 +39,8 @@
 #include <linux/libcfs/libcfs.h>
 
 #include <obd_class.h>
+#include <obd_ost.h>
 #include <lustre/lustre_idl.h>
-
 #include "lov_internal.h"
 
 static void lov_init_set(struct lov_request_set *set)
@@ -194,13 +194,9 @@ out:
        return rc;
 }
 
-extern void osc_update_enqueue(struct lustre_handle *lov_lockhp,
-                              struct lov_oinfo *loi, int flags,
-                              struct ost_lvb *lvb, __u32 mode, int rc);
-
 static int lov_update_enqueue_lov(struct obd_export *exp,
                                  struct lustre_handle *lov_lockhp,
-                                 struct lov_oinfo *loi, int flags, int idx,
+                                 struct lov_oinfo *loi, __u64 flags, int idx,
                                  struct ost_id *oi, int rc)
 {
        struct lov_obd *lov = &exp->exp_obd->u.lov;
@@ -443,7 +439,7 @@ out_set:
        return rc;
 }
 
-int lov_fini_match_set(struct lov_request_set *set, __u32 mode, int flags)
+int lov_fini_match_set(struct lov_request_set *set, __u32 mode, __u64 flags)
 {
        int rc = 0;
 
index a806aeffe026188962db81911f4ee39d442273a4..28960f99ebb9d7ce87844dc8f2ac0353ebde422a 100644 (file)
@@ -950,7 +950,10 @@ static int mgc_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc,
 }
 
 /* Not sure where this should go... */
-#define  MGC_ENQUEUE_LIMIT 50
+/* This is the timeout value for MGS_CONNECT request plus a ping interval, such
+ * that we can have a chance to try the secondary MGS if any. */
+#define  MGC_ENQUEUE_LIMIT (INITIAL_CONNECT_TIMEOUT + (AT_OFF ? 0 : at_min) \
+                               + PING_INTERVAL)
 #define  MGC_TARGET_REG_LIMIT 10
 #define  MGC_SEND_PARAM_LIMIT 10
 
index be1c613383a6b1206197a005702cbc2d43e734c4..cf1c4974eda824d58126cf31bd011e959bc27ce6 100644 (file)
@@ -279,6 +279,7 @@ int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key)
        }
        keylen = alg->ha_keylen;
 
+       sg_init_table(&sl, 1);
        sg_set_page(&sl, virt_to_page(capa),
                    offsetof(struct lustre_capa, lc_hmac),
                    (unsigned long)(capa) % PAGE_CACHE_SIZE);
@@ -320,9 +321,11 @@ int capa_encrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen)
                GOTO(out, rc);
        }
 
+       sg_init_table(&sd, 1);
        sg_set_page(&sd, virt_to_page(d), 16,
                    (unsigned long)(d) % PAGE_CACHE_SIZE);
 
+       sg_init_table(&ss, 1);
        sg_set_page(&ss, virt_to_page(s), 16,
                    (unsigned long)(s) % PAGE_CACHE_SIZE);
        desc.tfm   = tfm;
@@ -370,9 +373,11 @@ int capa_decrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen)
                GOTO(out, rc);
        }
 
+       sg_init_table(&sd, 1);
        sg_set_page(&sd, virt_to_page(d), 16,
                    (unsigned long)(d) % PAGE_CACHE_SIZE);
 
+       sg_init_table(&ss, 1);
        sg_set_page(&ss, virt_to_page(s), 16,
                    (unsigned long)(s) % PAGE_CACHE_SIZE);
 
index c1ef0c9b5a1aae9af7c0901b8ad537fcec93c865..140b5706d0fac3689cacfc94e5eafe5a9b8a3065 100644 (file)
@@ -42,8 +42,8 @@
 #include <linux/slab.h>
 #include <linux/stat.h>
 #include <linux/ctype.h>
-#include <asm/bitops.h>
-#include <asm/uaccess.h>
+#include <linux/bitops.h>
+#include <linux/uaccess.h>
 #include <linux/utsname.h>
 
 #define DEBUG_SUBSYSTEM S_CLASS
@@ -196,7 +196,7 @@ int LL_PROC_PROTO(proc_max_dirty_pages_in_mb)
        }
        if (write) {
                rc = lprocfs_write_frac_helper(buffer, *lenp,
-                                              (unsigned int*)table->data,
+                                              (unsigned int *)table->data,
                                               1 << (20 - PAGE_CACHE_SHIFT));
                /* Don't allow them to let dirty pages exceed 90% of system
                 * memory and set a hard minimum of 4MB. */
@@ -214,7 +214,7 @@ int LL_PROC_PROTO(proc_max_dirty_pages_in_mb)
                int len;
 
                len = lprocfs_read_frac_helper(buf, sizeof(buf),
-                                              *(unsigned int*)table->data,
+                                              *(unsigned int *)table->data,
                                               1 << (20 - PAGE_CACHE_SHIFT));
                if (len > *lenp)
                        len = *lenp;
@@ -238,14 +238,14 @@ int LL_PROC_PROTO(proc_alloc_fail_rate)
        }
        if (write) {
                rc = lprocfs_write_frac_helper(buffer, *lenp,
-                                              (unsigned int*)table->data,
+                                              (unsigned int *)table->data,
                                               OBD_ALLOC_FAIL_MULT);
        } else {
                char buf[21];
                int  len;
 
                len = lprocfs_read_frac_helper(buf, 21,
-                                              *(unsigned int*)table->data,
+                                              *(unsigned int *)table->data,
                                               OBD_ALLOC_FAIL_MULT);
                if (len > *lenp)
                        len = *lenp;
@@ -408,18 +408,18 @@ static ctl_table_t parent_table[] = {
 };
 #endif
 
-void obd_sysctl_init (void)
+void obd_sysctl_init(void)
 {
 #ifdef CONFIG_SYSCTL
-       if ( !obd_table_header )
+       if (!obd_table_header)
                obd_table_header = register_sysctl_table(parent_table);
 #endif
 }
 
-void obd_sysctl_clean (void)
+void obd_sysctl_clean(void)
 {
 #ifdef CONFIG_SYSCTL
-       if ( obd_table_header )
+       if (obd_table_header)
                unregister_sysctl_table(obd_table_header);
        obd_table_header = NULL;
 #endif
index a034aee37fc1d6dcb9b6246db814095ad3dd884c..4e77f07de1d5d3752a1de6120864c0291ce2ee27 100644 (file)
@@ -219,7 +219,6 @@ int lustre_start_mgc(struct super_block *sb)
        lnet_nid_t nid;
        char *mgcname = NULL, *niduuid = NULL, *mgssec = NULL;
        char *ptr;
-       int recov_bk;
        int rc = 0, i = 0, j, len;
 
        LASSERT(lsi->lsi_lmd);
@@ -269,6 +268,8 @@ int lustre_start_mgc(struct super_block *sb)
 
        obd = class_name2obd(mgcname);
        if (obd && !obd->obd_stopping) {
+               int recov_bk;
+
                rc = obd_set_info_async(NULL, obd->obd_self_export,
                                        strlen(KEY_MGSSEC), KEY_MGSSEC,
                                        strlen(mgssec), mgssec, NULL);
@@ -429,16 +430,6 @@ int lustre_start_mgc(struct super_block *sb)
           so we know when we can get rid of the mgc. */
        atomic_set(&obd->u.cli.cl_mgc_refcount, 1);
 
-       /* Try all connections, but only once. */
-       recov_bk = 1;
-       rc = obd_set_info_async(NULL, obd->obd_self_export,
-                               sizeof(KEY_INIT_RECOV_BACKUP),
-                               KEY_INIT_RECOV_BACKUP,
-                               sizeof(recov_bk), &recov_bk, NULL);
-       if (rc)
-               /* nonfatal */
-               CWARN("can't set %s %d\n", KEY_INIT_RECOV_BACKUP, rc);
-
        /* We connect to the MGS at setup, and don't disconnect until cleanup */
        data->ocd_connect_flags = OBD_CONNECT_VERSION | OBD_CONNECT_AT |
                                  OBD_CONNECT_FULL20 | OBD_CONNECT_IMP_RECOV |
@@ -1225,7 +1216,9 @@ int lustre_fill_super(struct super_block *sb, void *data, int silent)
 
        if (lmd_is_client(lmd)) {
                CDEBUG(D_MOUNT, "Mounting client %s\n", lmd->lmd_profile);
-               if (!client_fill_super) {
+               if (client_fill_super == NULL)
+                       request_module("lustre");
+               if (client_fill_super == NULL) {
                        LCONSOLE_ERROR_MSG(0x165, "Nothing registered for "
                                           "client mount! Is the 'lustre' "
                                           "module loaded?\n");
@@ -1308,6 +1301,7 @@ struct file_system_type lustre_fs_type = {
        .fs_flags     = FS_BINARY_MOUNTDATA | FS_REQUIRES_DEV |
                        FS_HAS_FIEMAP | FS_RENAME_DOES_D_MOVE,
 };
+MODULE_ALIAS_FS("lustre");
 
 int lustre_register_fs(void)
 {
index 8fe9245a8aad90899c95a1f1fe9c71d0e4ad2f36..c972eb48b10aa2b2433d087838f6cc82e77dc8ac 100644 (file)
@@ -51,7 +51,7 @@ static struct lprocfs_vars lprocfs_echo_module_vars[] = {
 
 void lprocfs_echo_init_vars(struct lprocfs_static_vars *lvars)
 {
-    lvars->module_vars  = lprocfs_echo_module_vars;
-    lvars->obd_vars     = lprocfs_echo_obd_vars;
+       lvars->module_vars  = lprocfs_echo_module_vars;
+       lvars->obd_vars     = lprocfs_echo_obd_vars;
 }
 #endif /* LPROCFS */
index 00f38eeb57865936a9af0877d631afeb5d2ec79d..f075b6982dbe0768ccda15d9ec690af60862f144 100644 (file)
@@ -871,7 +871,8 @@ static int osc_extent_wait(const struct lu_env *env, struct osc_extent *ext,
        LASSERT(sanity_check_nolock(ext) == 0);
        /* `Kick' this extent only if the caller is waiting for it to be
         * written out. */
-       if (state == OES_INV && !ext->oe_urgent && !ext->oe_hp) {
+       if (state == OES_INV && !ext->oe_urgent && !ext->oe_hp &&
+           !ext->oe_trunc_pending) {
                if (ext->oe_state == OES_ACTIVE) {
                        ext->oe_urgent = 1;
                } else if (ext->oe_state == OES_CACHE) {
@@ -922,8 +923,8 @@ static int osc_extent_truncate(struct osc_extent *ext, pgoff_t trunc_index,
        int                 rc       = 0;
 
        LASSERT(sanity_check(ext) == 0);
-       LASSERT(ext->oe_state == OES_TRUNC);
-       LASSERT(!ext->oe_urgent);
+       EASSERT(ext->oe_state == OES_TRUNC, ext);
+       EASSERT(!ext->oe_urgent, ext);
 
        /* Request new lu_env.
         * We can't use that env from osc_cache_truncate_start() because
index a7c1ec0d56feb2d79895bc97eed29f5b035a0fe9..048a5a5cf7f5e5ce360573bb46e31dfe364f1a8a 100644 (file)
@@ -61,32 +61,32 @@ struct lu_kmem_descr osc_caches[] = {
        {
                .ckd_cache = &osc_lock_kmem,
                .ckd_name  = "osc_lock_kmem",
-               .ckd_size  = sizeof (struct osc_lock)
+               .ckd_size  = sizeof(struct osc_lock)
        },
        {
                .ckd_cache = &osc_object_kmem,
                .ckd_name  = "osc_object_kmem",
-               .ckd_size  = sizeof (struct osc_object)
+               .ckd_size  = sizeof(struct osc_object)
        },
        {
                .ckd_cache = &osc_thread_kmem,
                .ckd_name  = "osc_thread_kmem",
-               .ckd_size  = sizeof (struct osc_thread_info)
+               .ckd_size  = sizeof(struct osc_thread_info)
        },
        {
                .ckd_cache = &osc_session_kmem,
                .ckd_name  = "osc_session_kmem",
-               .ckd_size  = sizeof (struct osc_session)
+               .ckd_size  = sizeof(struct osc_session)
        },
        {
                .ckd_cache = &osc_req_kmem,
                .ckd_name  = "osc_req_kmem",
-               .ckd_size  = sizeof (struct osc_req)
+               .ckd_size  = sizeof(struct osc_req)
        },
        {
                .ckd_cache = &osc_extent_kmem,
                .ckd_name  = "osc_extent_kmem",
-               .ckd_size  = sizeof (struct osc_extent)
+               .ckd_size  = sizeof(struct osc_extent)
        },
        {
                .ckd_cache = &osc_quota_kmem,
@@ -132,6 +132,7 @@ static void osc_key_fini(const struct lu_context *ctx,
                         struct lu_context_key *key, void *data)
 {
        struct osc_thread_info *info = data;
+
        OBD_SLAB_FREE_PTR(info, osc_thread_kmem);
 }
 
@@ -156,6 +157,7 @@ static void osc_session_fini(const struct lu_context *ctx,
                             struct lu_context_key *key, void *data)
 {
        struct osc_session *info = data;
+
        OBD_SLAB_FREE_PTR(info, osc_session_kmem);
 }
 
index efc5db47c260c31e029e7de414e122ad5125eb33..9c4a189639ae4a44890f3ca1ce4af25a66a7f1c0 100644 (file)
@@ -112,7 +112,7 @@ int osc_cancel_base(struct lustre_handle *lockh, __u32 mode);
 
 int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
                   __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                  int *flags, void *data, struct lustre_handle *lockh,
+                  __u64 *flags, void *data, struct lustre_handle *lockh,
                   int unref);
 
 int osc_setattr_async_base(struct obd_export *exp, struct obd_info *oinfo,
index 96cb6e2b9c4e22f2af71367104e11aea76f93a1d..71a24473634c48e9db09ab4f6d7be371080c81a3 100644 (file)
@@ -70,7 +70,7 @@ static int osc_page_is_dlocked(const struct lu_env *env,
        struct lustre_handle   *lockh;
        ldlm_policy_data_t     *policy;
        ldlm_mode_t          dlmmode;
-       int                  flags;
+       __u64                   flags;
 
        might_sleep();
 
index 294db843012b9502f75e7324728a18171445b56d..90e8912dbeb51cb8856f1a4a81aaa3b9078081ac 100644 (file)
@@ -635,7 +635,7 @@ static int osc_sync(const struct lu_env *env, struct obd_export *exp,
  * locks added to @cancels list. */
 static int osc_resource_get_unused(struct obd_export *exp, struct obdo *oa,
                                   struct list_head *cancels,
-                                  ldlm_mode_t mode, int lock_flags)
+                                  ldlm_mode_t mode, __u64 lock_flags)
 {
        struct ldlm_namespace *ns = exp->exp_obd->obd_namespace;
        struct ldlm_res_id res_id;
@@ -1570,12 +1570,7 @@ static int osc_brw_fini_request(struct ptlrpc_request *req, int rc)
                        router = libcfs_nid2str(req->rq_bulk->bd_sender);
                }
 
-               if (server_cksum == ~0 && rc > 0) {
-                       CERROR("Protocol error: server %s set the 'checksum' "
-                              "bit, but didn't send a checksum.  Not fatal, "
-                              "but please notify on http://bugs.whamcloud.com/\n",
-                              libcfs_nid2str(peer->nid));
-               } else if (server_cksum != client_cksum) {
+               if (server_cksum != client_cksum) {
                        LCONSOLE_ERROR_MSG(0x133, "%s: BAD READ CHECKSUM: from "
                                           "%s%s%s inode "DFID" object "DOSTID
                                           " extent ["LPU64"-"LPU64"]\n",
@@ -2398,7 +2393,7 @@ static int osc_enqueue_interpret(const struct lu_env *env,
 }
 
 void osc_update_enqueue(struct lustre_handle *lov_lockhp,
-                       struct lov_oinfo *loi, int flags,
+                       struct lov_oinfo *loi, __u64 flags,
                        struct ost_lvb *lvb, __u32 mode, int rc)
 {
        struct ldlm_lock *lock = ldlm_handle2lock(lov_lockhp);
@@ -2462,7 +2457,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
        struct obd_device *obd = exp->exp_obd;
        struct ptlrpc_request *req = NULL;
        int intent = *flags & LDLM_FL_HAS_INTENT;
-       int match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
+       __u64 match_lvb = (agl != 0 ? 0 : LDLM_FL_LVB_READY);
        ldlm_mode_t mode;
        int rc;
 
@@ -2613,11 +2608,11 @@ static int osc_enqueue(struct obd_export *exp, struct obd_info *oinfo,
 
 int osc_match_base(struct obd_export *exp, struct ldlm_res_id *res_id,
                   __u32 type, ldlm_policy_data_t *policy, __u32 mode,
-                  int *flags, void *data, struct lustre_handle *lockh,
+                  __u64 *flags, void *data, struct lustre_handle *lockh,
                   int unref)
 {
        struct obd_device *obd = exp->exp_obd;
-       int lflags = *flags;
+       __u64 lflags = *flags;
        ldlm_mode_t rc;
 
        if (OBD_FAIL_CHECK(OBD_FAIL_OSC_MATCH))
index 7246e8ce9c1965d0e4daba8a753aca761fc20eab..0e0ea5cd5f3695063f2851d6bd269fd4f755e2cd 100644 (file)
@@ -1202,7 +1202,7 @@ static int after_reply(struct ptlrpc_request *req)
 
        LASSERT(obd != NULL);
        /* repbuf must be unlinked */
-       LASSERT(!req->rq_receiving_reply && !req->rq_must_unlink);
+       LASSERT(!req->rq_receiving_reply && !req->rq_reply_unlink);
 
        if (req->rq_reply_truncate) {
                if (ptlrpc_no_resend(req)) {
@@ -1496,6 +1496,8 @@ static inline int ptlrpc_set_producer(struct ptlrpc_request_set *set)
  * and no more replies are expected.
  * (it is possible to get less replies than requests sent e.g. due to timed out
  * requests or requests that we had trouble to send out)
+ *
+ * NOTE: This function contains a potential schedule point (cond_resched()).
  */
 int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
 {
@@ -1513,6 +1515,14 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set)
                int unregistered = 0;
                int rc = 0;
 
+               /* This schedule point is mainly for the ptlrpcd caller of this
+                * function.  Most ptlrpc sets are not long-lived and unbounded
+                * in length, but at the least the set used by the ptlrpcd is.
+                * Since the processing time is unbounded, we need to insert an
+                * explicit schedule point to make the thread well-behaved.
+                */
+               cond_resched();
+
                if (req->rq_phase == RQ_PHASE_NEW &&
                    ptlrpc_send_new_req(req)) {
                        force_timer_recalc = 1;
@@ -2396,9 +2406,10 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async)
                }
 
                LASSERT(rc == -ETIMEDOUT);
-               DEBUG_REQ(D_WARNING, request, "Unexpectedly long timeout "
-                         "rvcng=%d unlnk=%d", request->rq_receiving_reply,
-                         request->rq_must_unlink);
+               DEBUG_REQ(D_WARNING, request,
+                         "Unexpectedly long timeout rvcng=%d unlnk=%d/%d",
+                         request->rq_receiving_reply,
+                         request->rq_req_unlink, request->rq_reply_unlink);
        }
        return 0;
 }
@@ -2530,10 +2541,19 @@ EXPORT_SYMBOL(ptlrpc_cleanup_client);
 void ptlrpc_resend_req(struct ptlrpc_request *req)
 {
        DEBUG_REQ(D_HA, req, "going to resend");
+       spin_lock(&req->rq_lock);
+
+       /* Request got reply but linked to the import list still.
+          Let ptlrpc_check_set() to process it. */
+       if (ptlrpc_client_replied(req)) {
+               spin_unlock(&req->rq_lock);
+               DEBUG_REQ(D_HA, req, "it has reply, so skip it");
+               return;
+       }
+
        lustre_msg_set_handle(req->rq_reqmsg, &(struct lustre_handle){ 0 });
        req->rq_status = -EAGAIN;
 
-       spin_lock(&req->rq_lock);
        req->rq_resend = 1;
        req->rq_net_err = 0;
        req->rq_timedout = 0;
@@ -3062,7 +3082,7 @@ void *ptlrpcd_alloc_work(struct obd_import *imp,
        req->rq_interpret_reply = work_interpreter;
        /* don't want reply */
        req->rq_receiving_reply = 0;
-       req->rq_must_unlink = 0;
+       req->rq_req_unlink = req->rq_reply_unlink = 0;
        req->rq_no_delay = req->rq_no_resend = 1;
        req->rq_pill.rc_fmt = (void *)&worker_format;
 
index aa85239f6cd5a7dffa422114ff574bd2c69e2222..209fcc14429825de4117cb757972b91f335adf6a 100644 (file)
@@ -63,19 +63,20 @@ void request_out_callback(lnet_event_t *ev)
        DEBUG_REQ(D_NET, req, "type %d, status %d", ev->type, ev->status);
 
        sptlrpc_request_out_callback(req);
+       spin_lock(&req->rq_lock);
        req->rq_real_sent = cfs_time_current_sec();
+       if (ev->unlinked)
+               req->rq_req_unlink = 0;
 
        if (ev->type == LNET_EVENT_UNLINK || ev->status != 0) {
 
                /* Failed send: make it seem like the reply timed out, just
                 * like failing sends in client.c does currently...  */
 
-               spin_lock(&req->rq_lock);
                req->rq_net_err = 1;
-               spin_unlock(&req->rq_lock);
-
                ptlrpc_client_wake_req(req);
        }
+       spin_unlock(&req->rq_lock);
 
        ptlrpc_req_finished(req);
 }
@@ -102,7 +103,7 @@ void reply_in_callback(lnet_event_t *ev)
        req->rq_receiving_reply = 0;
        req->rq_early = 0;
        if (ev->unlinked)
-               req->rq_must_unlink = 0;
+               req->rq_reply_unlink = 0;
 
        if (ev->status)
                goto out_wake;
@@ -145,6 +146,8 @@ void reply_in_callback(lnet_event_t *ev)
                /* Real reply */
                req->rq_rep_swab_mask = 0;
                req->rq_replied = 1;
+               /* Got reply, no resend required */
+               req->rq_resend = 0;
                req->rq_reply_off = ev->offset;
                req->rq_nob_received = ev->mlength;
                /* LNetMDUnlink can't be called under the LNET_LOCK,
index 383601cdd4e6c0a0f5a077587255d034a33e9a61..ef44e09d2c3c81bb3cd3ffecc17a6d6de95bb231 100644 (file)
@@ -1687,12 +1687,24 @@ int gss_enlarge_reqbuf_intg(struct ptlrpc_sec *sec,
                if (newbuf == NULL)
                        return -ENOMEM;
 
+               /* Must lock this, so that otherwise unprotected change of
+                * rq_reqmsg is not racing with parallel processing of
+                * imp_replay_list traversing threads. See LU-3333
+                * This is a bandaid at best, we really need to deal with this
+                * in request enlarging code before unpacking that's already
+                * there */
+               if (req->rq_import)
+                       spin_lock(&req->rq_import->imp_lock);
+
                memcpy(newbuf, req->rq_reqbuf, req->rq_reqbuf_len);
 
                OBD_FREE_LARGE(req->rq_reqbuf, req->rq_reqbuf_len);
                req->rq_reqbuf = newbuf;
                req->rq_reqbuf_len = newbuf_size;
                req->rq_reqmsg = lustre_msg_buf(req->rq_reqbuf, 1, 0);
+
+               if (req->rq_import)
+                       spin_unlock(&req->rq_import->imp_lock);
        }
 
        /* do enlargement, from wrapper to embedded, from end to begin */
@@ -1753,6 +1765,8 @@ int gss_enlarge_reqbuf_priv(struct ptlrpc_sec *sec,
                if (newclrbuf_size + newcipbuf_size <= req->rq_reqbuf_len) {
                        void *src, *dst;
 
+                       if (req->rq_import)
+                               spin_lock(&req->rq_import->imp_lock);
                        /* move clear text backward. */
                        src = req->rq_clrbuf;
                        dst = (char *) req->rq_reqbuf + newcipbuf_size;
@@ -1762,6 +1776,9 @@ int gss_enlarge_reqbuf_priv(struct ptlrpc_sec *sec,
                        req->rq_clrbuf = (struct lustre_msg *) dst;
                        req->rq_clrbuf_len = newclrbuf_size;
                        req->rq_reqmsg = lustre_msg_buf(req->rq_clrbuf, 0, 0);
+
+                       if (req->rq_import)
+                               spin_unlock(&req->rq_import->imp_lock);
                } else {
                        /* sadly we have to split out the clear buffer */
                        LASSERT(req->rq_reqbuf_len >= newcipbuf_size);
@@ -1776,6 +1793,15 @@ int gss_enlarge_reqbuf_priv(struct ptlrpc_sec *sec,
                if (newclrbuf == NULL)
                        return -ENOMEM;
 
+               /* Must lock this, so that otherwise unprotected change of
+                * rq_reqmsg is not racing with parallel processing of
+                * imp_replay_list traversing threads. See LU-3333
+                * This is a bandaid at best, we really need to deal with this
+                * in request enlarging code before unpacking that's already
+                * there */
+               if (req->rq_import)
+                       spin_lock(&req->rq_import->imp_lock);
+
                memcpy(newclrbuf, req->rq_clrbuf, req->rq_clrbuf_len);
 
                if (req->rq_reqbuf == NULL ||
@@ -1788,6 +1814,9 @@ int gss_enlarge_reqbuf_priv(struct ptlrpc_sec *sec,
                req->rq_clrbuf = newclrbuf;
                req->rq_clrbuf_len = newclrbuf_size;
                req->rq_reqmsg = lustre_msg_buf(req->rq_clrbuf, 0, 0);
+
+               if (req->rq_import)
+                       spin_unlock(&req->rq_import->imp_lock);
        }
 
        _sptlrpc_enlarge_msg_inplace(req->rq_clrbuf, 0, newmsg_size);
index 8573f328bd2a5ae92abad1e8df5c69ab7469bb55..b4def8a20e251a5886a3492434c897cddff57ad8 100644 (file)
@@ -275,6 +275,7 @@ void ptlrpc_invalidate_import(struct obd_import *imp)
        if (!imp->imp_invalid || imp->imp_obd->obd_no_recov)
                ptlrpc_deactivate_import(imp);
 
+       CFS_FAIL_TIMEOUT(OBD_FAIL_MGS_CONNECT_NET, 3 * cfs_fail_val / 2);
        LASSERT(imp->imp_invalid);
 
        /* Wait forever until inflight == 0. We really can't do it another
@@ -392,6 +393,19 @@ void ptlrpc_activate_import(struct obd_import *imp)
 }
 EXPORT_SYMBOL(ptlrpc_activate_import);
 
+static void ptlrpc_pinger_force(struct obd_import *imp)
+{
+       CDEBUG(D_HA, "%s: waking up pinger s:%s\n", obd2cli_tgt(imp->imp_obd),
+              ptlrpc_import_state_name(imp->imp_state));
+
+       spin_lock(&imp->imp_lock);
+       imp->imp_force_verify = 1;
+       spin_unlock(&imp->imp_lock);
+
+       if (imp->imp_state != LUSTRE_IMP_CONNECTING)
+               ptlrpc_pinger_wake_up();
+}
+
 void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt)
 {
        LASSERT(!imp->imp_dlm_fake);
@@ -406,20 +420,30 @@ void ptlrpc_fail_import(struct obd_import *imp, __u32 conn_cnt)
                        ptlrpc_deactivate_import(imp);
                }
 
-               CDEBUG(D_HA, "%s: waking up pinger\n",
-                      obd2cli_tgt(imp->imp_obd));
-
-               spin_lock(&imp->imp_lock);
-               imp->imp_force_verify = 1;
-               spin_unlock(&imp->imp_lock);
-
-               ptlrpc_pinger_wake_up();
+               ptlrpc_pinger_force(imp);
        }
 }
 EXPORT_SYMBOL(ptlrpc_fail_import);
 
 int ptlrpc_reconnect_import(struct obd_import *imp)
 {
+#ifdef ENABLE_PINGER
+       struct l_wait_info lwi;
+       int secs = cfs_time_seconds(obd_timeout);
+       int rc;
+
+       ptlrpc_pinger_force(imp);
+
+       CDEBUG(D_HA, "%s: recovery started, waiting %u seconds\n",
+              obd2cli_tgt(imp->imp_obd), secs);
+
+       lwi = LWI_TIMEOUT(secs, NULL, NULL);
+       rc = l_wait_event(imp->imp_recovery_waitq,
+                         !ptlrpc_import_in_recovery(imp), &lwi);
+       CDEBUG(D_HA, "%s: recovery finished s:%s\n", obd2cli_tgt(imp->imp_obd),
+              ptlrpc_import_state_name(imp->imp_state));
+       return rc;
+#else
        ptlrpc_set_import_discon(imp, 0);
        /* Force a new connect attempt */
        ptlrpc_invalidate_import(imp);
@@ -444,6 +468,7 @@ int ptlrpc_reconnect_import(struct obd_import *imp)
        /* Attempt a new connect */
        ptlrpc_recover_import(imp, NULL, 0);
        return 0;
+#endif
 }
 EXPORT_SYMBOL(ptlrpc_reconnect_import);
 
index a47a8d807d5b4c52d19e3755c56e5933d35c0ba9..3f0ca23f7b9133790bfa9be9b8096f6a77c41fb0 100644 (file)
@@ -505,11 +505,12 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
        /* If this is a re-transmit, we're required to have disengaged
         * cleanly from the previous attempt */
        LASSERT(!request->rq_receiving_reply);
+       LASSERT(!((lustre_msg_get_flags(request->rq_reqmsg) & MSG_REPLAY) &&
+               (request->rq_import->imp_state == LUSTRE_IMP_FULL)));
 
-       if (request->rq_import->imp_obd &&
-           request->rq_import->imp_obd->obd_fail) {
+       if (unlikely(obd != NULL && obd->obd_fail)) {
                CDEBUG(D_HA, "muting rpc for failed imp obd %s\n",
-                      request->rq_import->imp_obd->obd_name);
+                       obd->obd_name);
                /* this prevents us from waiting in ptlrpc_queue_wait */
                spin_lock(&request->rq_lock);
                request->rq_err = 1;
@@ -579,8 +580,9 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
        spin_lock(&request->rq_lock);
        /* If the MD attach succeeds, there _will_ be a reply_in callback */
        request->rq_receiving_reply = !noreply;
+       request->rq_req_unlink = 1;
        /* We are responsible for unlinking the reply buffer */
-       request->rq_must_unlink = !noreply;
+       request->rq_reply_unlink = !noreply;
        /* Clear any flags that may be present from previous sends. */
        request->rq_replied = 0;
        request->rq_err = 0;
@@ -603,7 +605,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
                reply_md.user_ptr  = &request->rq_reply_cbid;
                reply_md.eq_handle = ptlrpc_eq_h;
 
-               /* We must see the unlink callback to unset rq_must_unlink,
+               /* We must see the unlink callback to unset rq_reply_unlink,
                   so we can't auto-unlink */
                rc = LNetMDAttach(reply_me_h, reply_md, LNET_RETAIN,
                                  &request->rq_reply_md_h);
@@ -625,7 +627,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
 
        /* add references on request for request_out_callback */
        ptlrpc_request_addref(request);
-       if (obd->obd_svc_stats != NULL)
+       if (obd != NULL && obd->obd_svc_stats != NULL)
                lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQACTIVE_CNTR,
                        atomic_read(&request->rq_import->imp_inflight));
 
index 38099d9dfdaeb65f028d3d59492c0ac415c20df4..2898087e9715bfe92378dc1b7467c74a7127eb61 100644 (file)
@@ -224,6 +224,11 @@ static void ptlrpc_pinger_process_import(struct obd_import *imp,
                       "or recovery disabled: %s)\n",
                       imp->imp_obd->obd_uuid.uuid, obd2cli_tgt(imp->imp_obd),
                       ptlrpc_import_state_name(level));
+               if (force) {
+                       spin_lock(&imp->imp_lock);
+                       imp->imp_force_verify = 1;
+                       spin_unlock(&imp->imp_lock);
+               }
        } else if ((imp->imp_pingable && !suppress) || force_next || force) {
                ptlrpc_ping(imp);
        }
index 1213621ca5aa8256f5c8cddce5ecb75ade3845c8..1928bf57222f75c4ecb3eba7a0a4f5f66435cc50 100644 (file)
@@ -55,7 +55,7 @@
 struct proc_dir_entry *sptlrpc_proc_root = NULL;
 EXPORT_SYMBOL(sptlrpc_proc_root);
 
-char *sec_flags2str(unsigned long flags, char *buf, int bufsize)
+static char *sec_flags2str(unsigned long flags, char *buf, int bufsize)
 {
        buf[0] = '\0';
 
index ff1137fe4dd63b11f3d527a6d4c474ad220905ac..ac967cb983cf075b61647d881d3423d5ad1f04dc 100644 (file)
@@ -260,11 +260,22 @@ int null_enlarge_reqbuf(struct ptlrpc_sec *sec,
                if (newbuf == NULL)
                        return -ENOMEM;
 
+               /* Must lock this, so that otherwise unprotected change of
+                * rq_reqmsg is not racing with parallel processing of
+                * imp_replay_list traversing threads. See LU-3333
+                * This is a bandaid at best, we really need to deal with this
+                * in request enlarging code before unpacking that's already
+                * there */
+               if (req->rq_import)
+                       spin_lock(&req->rq_import->imp_lock);
                memcpy(newbuf, req->rq_reqbuf, req->rq_reqlen);
 
                OBD_FREE_LARGE(req->rq_reqbuf, req->rq_reqbuf_len);
                req->rq_reqbuf = req->rq_reqmsg = newbuf;
                req->rq_reqbuf_len = alloc_size;
+
+               if (req->rq_import)
+                       spin_unlock(&req->rq_import->imp_lock);
        }
 
        _sptlrpc_enlarge_msg_inplace(req->rq_reqmsg, segment, newsize);
index 416401be6d4f71821aa9c5133943aeea867c076a..12c6cefe3f8da0ecf4b9baf0498e7507980eca1f 100644 (file)
@@ -669,6 +669,15 @@ int plain_enlarge_reqbuf(struct ptlrpc_sec *sec,
                if (newbuf == NULL)
                        return -ENOMEM;
 
+               /* Must lock this, so that otherwise unprotected change of
+                * rq_reqmsg is not racing with parallel processing of
+                * imp_replay_list traversing threads. See LU-3333
+                * This is a bandaid at best, we really need to deal with this
+                * in request enlarging code before unpacking that's already
+                * there */
+               if (req->rq_import)
+                       spin_lock(&req->rq_import->imp_lock);
+
                memcpy(newbuf, req->rq_reqbuf, req->rq_reqbuf_len);
 
                OBD_FREE_LARGE(req->rq_reqbuf, req->rq_reqbuf_len);
@@ -676,6 +685,9 @@ int plain_enlarge_reqbuf(struct ptlrpc_sec *sec,
                req->rq_reqbuf_len = newbuf_size;
                req->rq_reqmsg = lustre_msg_buf(req->rq_reqbuf,
                                                PLAIN_PACK_MSG_OFF, 0);
+
+               if (req->rq_import)
+                       spin_unlock(&req->rq_import->imp_lock);
        }
 
        _sptlrpc_enlarge_msg_inplace(req->rq_reqbuf, PLAIN_PACK_MSG_OFF,
index d278f2e218030720daa291e0799941d1dc05ca6b..214daa2e4cfa050b45f3cb62155d7b69d1dff25e 100644 (file)
@@ -1100,6 +1100,7 @@ static void ptlrpc_update_export_timer(struct obd_export *exp, long extra_delay)
  */
 static int ptlrpc_check_req(struct ptlrpc_request *req)
 {
+       struct obd_device *obd = req->rq_export->exp_obd;
        int rc = 0;
 
        if (unlikely(lustre_msg_get_conn_cnt(req->rq_reqmsg) <
@@ -1110,24 +1111,23 @@ static int ptlrpc_check_req(struct ptlrpc_request *req)
                          req->rq_export->exp_conn_cnt);
                return -EEXIST;
        }
-       if (unlikely(req->rq_export->exp_obd &&
-                    req->rq_export->exp_obd->obd_fail)) {
+       if (unlikely(obd == NULL || obd->obd_fail)) {
                /*
                 * Failing over, don't handle any more reqs, send
                 * error response instead.
                 */
                CDEBUG(D_RPCTRACE, "Dropping req %p for failed obd %s\n",
-                      req, req->rq_export->exp_obd->obd_name);
+                      req, (obd != NULL) ? obd->obd_name : "unknown");
                rc = -ENODEV;
        } else if (lustre_msg_get_flags(req->rq_reqmsg) &
                   (MSG_REPLAY | MSG_REQ_REPLAY_DONE) &&
-                  !(req->rq_export->exp_obd->obd_recovering)) {
+                  !obd->obd_recovering) {
                        DEBUG_REQ(D_ERROR, req,
                                  "Invalid replay without recovery");
                        class_fail_export(req->rq_export);
                        rc = -ENODEV;
        } else if (lustre_msg_get_transno(req->rq_reqmsg) != 0 &&
-                  !(req->rq_export->exp_obd->obd_recovering)) {
+                  !obd->obd_recovering) {
                        DEBUG_REQ(D_ERROR, req, "Invalid req with transno "
                                  LPU64" without recovery",
                                  lustre_msg_get_transno(req->rq_reqmsg));
index e31cbb81f059329565ca2df9c02989899bac44a8..79da3adf1bd5cbb9944061d25ddeedcc50cd335d 100644 (file)
 #include <asm/irq.h>
 #include <linux/fcntl.h>
 #include <linux/platform_device.h>
-#ifdef LIRC_ON_SA1100
-#include <asm/hardware.h>
-#ifdef CONFIG_SA1100_COLLIE
-#include <asm/arch/tc35143.h>
-#include <asm/ucb1200.h>
-#endif
-#endif
 
 #include <linux/timer.h>
 
@@ -94,35 +87,6 @@ static void init_act200(void);
 static void init_act220(void);
 #endif
 
-/*** SA1100 ***/
-#ifdef LIRC_ON_SA1100
-struct sa1100_ser2_registers {
-       /* HSSP control register */
-       unsigned char hscr0;
-       /* UART registers */
-       unsigned char utcr0;
-       unsigned char utcr1;
-       unsigned char utcr2;
-       unsigned char utcr3;
-       unsigned char utcr4;
-       unsigned char utdr;
-       unsigned char utsr0;
-       unsigned char utsr1;
-} sr;
-
-static int irq = IRQ_Ser2ICP;
-
-#define LIRC_ON_SA1100_TRANSMITTER_LATENCY 0
-
-/* pulse/space ratio of 50/50 */
-static unsigned long pulse_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY);
-/* 1000000/freq-pulse_width */
-static unsigned long space_width = (13-LIRC_ON_SA1100_TRANSMITTER_LATENCY);
-static unsigned int freq = 38000;      /* modulation frequency */
-static unsigned int duty_cycle = 50;   /* duty cycle of 50% */
-
-#endif
-
 #define RBUF_LEN 1024
 #define WBUF_LEN 1024
 
@@ -205,17 +169,6 @@ static void drop_hardware(void);
 static int init_port(void);
 static void drop_port(void);
 
-#ifdef LIRC_ON_SA1100
-static void on(void)
-{
-       PPSR |= PPC_TXD2;
-}
-
-static void off(void)
-{
-       PPSR &= ~PPC_TXD2;
-}
-#else
 static inline unsigned int sinp(int offset)
 {
        return inb(io + offset);
@@ -225,7 +178,6 @@ static inline void soutp(int offset, int value)
 {
        outb(value, io + offset);
 }
-#endif
 
 #ifndef MAX_UDELAY_MS
 #define MAX_UDELAY_US 5000
@@ -305,10 +257,6 @@ static ssize_t lirc_write(struct file *file, const char __user *buf, size_t n,
        if (IS_ERR(tx_buf))
                return PTR_ERR(tx_buf);
        i = 0;
-#ifdef LIRC_ON_SA1100
-       /* disable receiver */
-       Ser2UTCR3 = 0;
-#endif
        local_irq_save(flags);
        while (1) {
                if (i >= count)
@@ -323,15 +271,6 @@ static ssize_t lirc_write(struct file *file, const char __user *buf, size_t n,
                i++;
        }
        local_irq_restore(flags);
-#ifdef LIRC_ON_SA1100
-       off();
-       udelay(1000); /* wait 1ms for IR diode to recover */
-       Ser2UTCR3 = 0;
-       /* clear status register to prevent unwanted interrupts */
-       Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
-       /* enable receiver */
-       Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE;
-#endif
        kfree(tx_buf);
        return count;
 }
@@ -341,25 +280,12 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
        u32 __user *uptr = (u32 __user *)arg;
        int retval = 0;
        u32 value = 0;
-#ifdef LIRC_ON_SA1100
-
-       if (cmd == LIRC_GET_FEATURES)
-               value = LIRC_CAN_SEND_PULSE |
-                       LIRC_CAN_SET_SEND_DUTY_CYCLE |
-                       LIRC_CAN_SET_SEND_CARRIER |
-                       LIRC_CAN_REC_MODE2;
-       else if (cmd == LIRC_GET_SEND_MODE)
-               value = LIRC_MODE_PULSE;
-       else if (cmd == LIRC_GET_REC_MODE)
-               value = LIRC_MODE_MODE2;
-#else
        if (cmd == LIRC_GET_FEATURES)
                value = LIRC_CAN_SEND_PULSE | LIRC_CAN_REC_MODE2;
        else if (cmd == LIRC_GET_SEND_MODE)
                value = LIRC_MODE_PULSE;
        else if (cmd == LIRC_GET_REC_MODE)
                value = LIRC_MODE_MODE2;
-#endif
 
        switch (cmd) {
        case LIRC_GET_FEATURES:
@@ -372,37 +298,6 @@ static long lirc_ioctl(struct file *filep, unsigned int cmd, unsigned long arg)
        case LIRC_SET_REC_MODE:
                retval = get_user(value, uptr);
                break;
-#ifdef LIRC_ON_SA1100
-       case LIRC_SET_SEND_DUTY_CYCLE:
-               retval = get_user(value, uptr);
-               if (retval)
-                       return retval;
-               if (value <= 0 || value > 100)
-                       return -EINVAL;
-               /* (value/100)*(1000000/freq) */
-               duty_cycle = value;
-               pulse_width = (unsigned long) duty_cycle*10000/freq;
-               space_width = (unsigned long) 1000000L/freq-pulse_width;
-               if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY)
-                       pulse_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY;
-               if (space_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY)
-                       space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY;
-               break;
-       case LIRC_SET_SEND_CARRIER:
-               retval = get_user(value, uptr);
-               if (retval)
-                       return retval;
-               if (value > 500000 || value < 20000)
-                       return -EINVAL;
-               freq = value;
-               pulse_width = (unsigned long) duty_cycle*10000/freq;
-               space_width = (unsigned long) 1000000L/freq-pulse_width;
-               if (pulse_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY)
-                       pulse_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY;
-               if (space_width >= LIRC_ON_SA1100_TRANSMITTER_LATENCY)
-                       space_width -= LIRC_ON_SA1100_TRANSMITTER_LATENCY;
-               break;
-#endif
        default:
                retval = -ENOIOCTLCMD;
 
@@ -539,10 +434,8 @@ static void sir_timeout(unsigned long data)
        /* avoid interference with interrupt */
        spin_lock_irqsave(&timer_lock, flags);
        if (last_value) {
-#ifndef LIRC_ON_SA1100
                /* clear unread bits in UART and restart */
                outb(UART_FCR_CLEAR_RCVR, io + UART_FCR);
-#endif
                /* determine 'virtual' pulse end: */
                pulse_end = delta(&last_tv, &last_intr_tv);
                dprintk("timeout add %d for %lu usec\n", last_value, pulse_end);
@@ -558,62 +451,6 @@ static irqreturn_t sir_interrupt(int irq, void *dev_id)
        unsigned char data;
        struct timeval curr_tv;
        static unsigned long deltv;
-#ifdef LIRC_ON_SA1100
-       int status;
-       static int n;
-
-       status = Ser2UTSR0;
-       /*
-        * Deal with any receive errors first.  The bytes in error may be
-        * the only bytes in the receive FIFO, so we do this first.
-        */
-       while (status & UTSR0_EIF) {
-               int bstat;
-
-               if (debug) {
-                       dprintk("EIF\n");
-                       bstat = Ser2UTSR1;
-
-                       if (bstat & UTSR1_FRE)
-                               dprintk("frame error\n");
-                       if (bstat & UTSR1_ROR)
-                               dprintk("receive fifo overrun\n");
-                       if (bstat & UTSR1_PRE)
-                               dprintk("parity error\n");
-               }
-
-               bstat = Ser2UTDR;
-               n++;
-               status = Ser2UTSR0;
-       }
-
-       if (status & (UTSR0_RFS | UTSR0_RID)) {
-               do_gettimeofday(&curr_tv);
-               deltv = delta(&last_tv, &curr_tv);
-               do {
-                       data = Ser2UTDR;
-                       dprintk("%d data: %u\n", n, (unsigned int) data);
-                       n++;
-               } while (status & UTSR0_RID && /* do not empty fifo in order to
-                                               * get UTSR0_RID in any case */
-                     Ser2UTSR1 & UTSR1_RNE); /* data ready */
-
-               if (status&UTSR0_RID) {
-                       add_read_queue(0 , deltv - n * TIME_CONST); /*space*/
-                       add_read_queue(1, n * TIME_CONST); /*pulse*/
-                       n = 0;
-                       last_tv = curr_tv;
-               }
-       }
-
-       if (status & UTSR0_TFS)
-               pr_err("transmit fifo not full, shouldn't happen\n");
-
-       /* We must clear certain bits. */
-       status &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
-       if (status)
-               Ser2UTSR0 = status;
-#else
        unsigned long deltintrtv;
        unsigned long flags;
        int iir, lsr;
@@ -698,44 +535,9 @@ static irqreturn_t sir_interrupt(int irq, void *dev_id)
                        break;
                }
        }
-#endif
        return IRQ_RETVAL(IRQ_HANDLED);
 }
 
-#ifdef LIRC_ON_SA1100
-static void send_pulse(unsigned long length)
-{
-       unsigned long k, delay;
-       int flag;
-
-       if (length == 0)
-               return;
-       /*
-        * this won't give us the carrier frequency we really want
-        * due to integer arithmetic, but we can accept this inaccuracy
-        */
-
-       for (k = flag = 0; k < length; k += delay, flag = !flag) {
-               if (flag) {
-                       off();
-                       delay = space_width;
-               } else {
-                       on();
-                       delay = pulse_width;
-               }
-               safe_udelay(delay);
-       }
-       off();
-}
-
-static void send_space(unsigned long length)
-{
-       if (length == 0)
-               return;
-       off();
-       safe_udelay(length);
-}
-#else
 static void send_space(unsigned long len)
 {
        safe_udelay(len);
@@ -755,31 +557,6 @@ static void send_pulse(unsigned long len)
                        ;
        }
 }
-#endif
-
-#ifdef CONFIG_SA1100_COLLIE
-static int sa1100_irda_set_power_collie(int state)
-{
-       if (state) {
-               /*
-                *  0 - off
-                *  1 - short range, lowest power
-                *  2 - medium range, medium power
-                *  3 - maximum range, high power
-                */
-               ucb1200_set_io_direction(TC35143_GPIO_IR_ON,
-                                        TC35143_IODIR_OUTPUT);
-               ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_LOW);
-               udelay(100);
-       } else {
-               /* OFF */
-               ucb1200_set_io_direction(TC35143_GPIO_IR_ON,
-                                        TC35143_IODIR_OUTPUT);
-               ucb1200_set_io(TC35143_GPIO_IR_ON, TC35143_IODAT_HIGH);
-       }
-       return 0;
-}
-#endif
 
 static int init_hardware(void)
 {
@@ -787,51 +564,7 @@ static int init_hardware(void)
 
        spin_lock_irqsave(&hardware_lock, flags);
        /* reset UART */
-#ifdef LIRC_ON_SA1100
-#ifdef CONFIG_SA1100_COLLIE
-       sa1100_irda_set_power_collie(3);        /* power on */
-#endif
-       sr.hscr0 = Ser2HSCR0;
-
-       sr.utcr0 = Ser2UTCR0;
-       sr.utcr1 = Ser2UTCR1;
-       sr.utcr2 = Ser2UTCR2;
-       sr.utcr3 = Ser2UTCR3;
-       sr.utcr4 = Ser2UTCR4;
-
-       sr.utdr = Ser2UTDR;
-       sr.utsr0 = Ser2UTSR0;
-       sr.utsr1 = Ser2UTSR1;
-
-       /* configure GPIO */
-       /* output */
-       PPDR |= PPC_TXD2;
-       PSDR |= PPC_TXD2;
-       /* set output to 0 */
-       off();
-
-       /* Enable HP-SIR modulation, and ensure that the port is disabled. */
-       Ser2UTCR3 = 0;
-       Ser2HSCR0 = sr.hscr0 & (~HSCR0_HSSP);
-
-       /* clear status register to prevent unwanted interrupts */
-       Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
-
-       /* 7N1 */
-       Ser2UTCR0 = UTCR0_1StpBit|UTCR0_7BitData;
-       /* 115200 */
-       Ser2UTCR1 = 0;
-       Ser2UTCR2 = 1;
-       /* use HPSIR, 1.6 usec pulses */
-       Ser2UTCR4 = UTCR4_HPSIR|UTCR4_Z1_6us;
-
-       /* enable receiver, receive fifo interrupt */
-       Ser2UTCR3 = UTCR3_RXE|UTCR3_RIE;
-
-       /* clear status register to prevent unwanted interrupts */
-       Ser2UTSR0 &= (UTSR0_RID | UTSR0_RBB | UTSR0_REB);
-
-#elif defined(LIRC_SIR_TEKRAM)
+#if defined(LIRC_SIR_TEKRAM)
        /* disable FIFO */
        soutp(UART_FCR,
              UART_FCR_CLEAR_RCVR|
@@ -927,23 +660,9 @@ static void drop_hardware(void)
 
        spin_lock_irqsave(&hardware_lock, flags);
 
-#ifdef LIRC_ON_SA1100
-       Ser2UTCR3 = 0;
-
-       Ser2UTCR0 = sr.utcr0;
-       Ser2UTCR1 = sr.utcr1;
-       Ser2UTCR2 = sr.utcr2;
-       Ser2UTCR4 = sr.utcr4;
-       Ser2UTCR3 = sr.utcr3;
-
-       Ser2HSCR0 = sr.hscr0;
-#ifdef CONFIG_SA1100_COLLIE
-       sa1100_irda_set_power_collie(0);        /* power off */
-#endif
-#else
        /* turn off interrupts */
        outb(0, io + UART_IER);
-#endif
+
        spin_unlock_irqrestore(&hardware_lock, flags);
 }
 
@@ -954,24 +673,18 @@ static int init_port(void)
        int retval;
 
        /* get I/O port access and IRQ line */
-#ifndef LIRC_ON_SA1100
        if (request_region(io, 8, LIRC_DRIVER_NAME) == NULL) {
                pr_err("i/o port 0x%.4x already in use.\n", io);
                return -EBUSY;
        }
-#endif
        retval = request_irq(irq, sir_interrupt, 0,
                             LIRC_DRIVER_NAME, NULL);
        if (retval < 0) {
-#               ifndef LIRC_ON_SA1100
                release_region(io, 8);
-#               endif
                pr_err("IRQ %d already in use.\n", irq);
                return retval;
        }
-#ifndef LIRC_ON_SA1100
        pr_info("I/O port 0x%.4x, IRQ %d.\n", io, irq);
-#endif
 
        init_timer(&timerlist);
        timerlist.function = sir_timeout;
@@ -984,9 +697,7 @@ static void drop_port(void)
 {
        free_irq(irq, NULL);
        del_timer_sync(&timerlist);
-#ifndef LIRC_ON_SA1100
        release_region(io, 8);
-#endif
 }
 
 #ifdef LIRC_SIR_ACTISYS_ACT200L
@@ -1284,9 +995,6 @@ module_exit(lirc_sir_exit);
 #ifdef LIRC_SIR_TEKRAM
 MODULE_DESCRIPTION("Infrared receiver driver for Tekram Irmate 210");
 MODULE_AUTHOR("Christoph Bartelmus");
-#elif defined(LIRC_ON_SA1100)
-MODULE_DESCRIPTION("LIRC driver for StrongARM SA1100 embedded microprocessor");
-MODULE_AUTHOR("Christoph Bartelmus");
 #elif defined(LIRC_SIR_ACTISYS_ACT200L)
 MODULE_DESCRIPTION("LIRC driver for Actisys Act200L");
 MODULE_AUTHOR("Karl Bongers");
@@ -1299,10 +1007,6 @@ MODULE_AUTHOR("Milan Pikula");
 #endif
 MODULE_LICENSE("GPL");
 
-#ifdef LIRC_ON_SA1100
-module_param(irq, int, S_IRUGO);
-MODULE_PARM_DESC(irq, "Interrupt (16)");
-#else
 module_param(io, int, S_IRUGO);
 MODULE_PARM_DESC(io, "I/O address base (0x3f8 or 0x2f8)");
 
@@ -1311,7 +1015,6 @@ MODULE_PARM_DESC(irq, "Interrupt (4 or 3)");
 
 module_param(threshold, int, S_IRUGO);
 MODULE_PARM_DESC(threshold, "space detection threshold (3)");
-#endif
 
 module_param(debug, bool, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(debug, "Enable debugging messages");
index c9aba59258d946cc7406b02adbfcbb666cf34488..10f586befce305ea792a5260900f95067c652bb5 100644 (file)
@@ -1,6 +1,6 @@
 config USB_SN9C102
        tristate "USB SN9C1xx PC Camera Controller support (DEPRECATED)"
-       depends on VIDEO_V4L2 && MEDIA_USB_SUPPORT
+       depends on VIDEO_V4L2 && MEDIA_USB_SUPPORT && USB
        ---help---
          This driver is DEPRECATED, please use the gspca sonixb and
          sonixj modules instead.
index 5e19cd6ccda35eaf0f51df68991d69a09b18f9ca..775e1d0432301fbf810d40742b267125088d31ea 100644 (file)
@@ -756,6 +756,7 @@ static int hci_h4p_reset(struct hci_h4p_info *info)
 static int hci_h4p_hci_flush(struct hci_dev *hdev)
 {
        struct hci_h4p_info *info = hci_get_drvdata(hdev);
+
        skb_queue_purge(&info->txq);
 
        return 0;
index 3f067f189b3d01d3dd9505c4adad07d85975868d..ebfa9c9e71b1580e629ab00e09475db1f3b47b00 100644 (file)
@@ -116,7 +116,34 @@ int cvm_oct_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
        return phy_mii_ioctl(priv->phydev, rq, cmd);
 }
 
-static void cvm_oct_adjust_link(struct net_device *dev)
+static void cvm_oct_note_carrier(struct octeon_ethernet *priv,
+                                cvmx_helper_link_info_t li)
+{
+       if (li.s.link_up) {
+               pr_notice_ratelimited("%s: %u Mbps %s duplex, port %d\n",
+                                     netdev_name(priv->netdev), li.s.speed,
+                                     (li.s.full_duplex) ? "Full" : "Half",
+                                     priv->port);
+       } else {
+               pr_notice_ratelimited("%s: Link down\n",
+                                     netdev_name(priv->netdev));
+       }
+}
+
+void cvm_oct_set_carrier(struct octeon_ethernet *priv,
+                        cvmx_helper_link_info_t link_info)
+{
+       cvm_oct_note_carrier(priv, link_info);
+       if (link_info.s.link_up) {
+               if (!netif_carrier_ok(priv->netdev))
+                       netif_carrier_on(priv->netdev);
+       } else {
+               if (netif_carrier_ok(priv->netdev))
+                       netif_carrier_off(priv->netdev);
+       }
+}
+
+void cvm_oct_adjust_link(struct net_device *dev)
 {
        struct octeon_ethernet *priv = netdev_priv(dev);
        cvmx_helper_link_info_t link_info;
@@ -127,28 +154,32 @@ static void cvm_oct_adjust_link(struct net_device *dev)
                link_info.s.link_up = priv->last_link ? 1 : 0;
                link_info.s.full_duplex = priv->phydev->duplex ? 1 : 0;
                link_info.s.speed = priv->phydev->speed;
+
                cvmx_helper_link_set(priv->port, link_info);
-               if (priv->last_link) {
-                       netif_carrier_on(dev);
-                       if (priv->queue != -1)
-                               printk_ratelimited("%s: %u Mbps %s duplex, "
-                                       "port %2d, queue %2d\n", dev->name,
-                                       priv->phydev->speed,
-                                       priv->phydev->duplex ? "Full" : "Half",
-                                       priv->port, priv->queue);
-                       else
-                               printk_ratelimited("%s: %u Mbps %s duplex, "
-                                       "port %2d, POW\n", dev->name,
-                                       priv->phydev->speed,
-                                       priv->phydev->duplex ? "Full" : "Half",
-                                       priv->port);
-               } else {
-                       netif_carrier_off(dev);
-                       printk_ratelimited("%s: Link down\n", dev->name);
-               }
+               cvm_oct_note_carrier(priv, link_info);
        }
 }
 
+int cvm_oct_common_stop(struct net_device *dev)
+{
+       struct octeon_ethernet *priv = netdev_priv(dev);
+       cvmx_helper_link_info_t link_info;
+
+       priv->poll = NULL;
+
+       if (priv->phydev)
+               phy_disconnect(priv->phydev);
+       priv->phydev = NULL;
+
+       if (priv->last_link) {
+               link_info.u64 = 0;
+               priv->last_link = 0;
+
+               cvmx_helper_link_set(priv->port, link_info);
+               cvm_oct_note_carrier(priv, link_info);
+       }
+       return 0;
+}
 
 /**
  * cvm_oct_phy_setup_device - setup the PHY
@@ -163,11 +194,11 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
        struct device_node *phy_node;
 
        if (!priv->of_node)
-               return 0;
+               goto no_phy;
 
        phy_node = of_parse_phandle(priv->of_node, "phy-handle", 0);
        if (!phy_node)
-               return 0;
+               goto no_phy;
 
        priv->phydev = of_phy_connect(dev, phy_node, cvm_oct_adjust_link, 0,
                                      PHY_INTERFACE_MODE_GMII);
@@ -178,5 +209,11 @@ int cvm_oct_phy_setup_device(struct net_device *dev)
        priv->last_link = 0;
        phy_start_aneg(priv->phydev);
 
+       return 0;
+no_phy:
+       /* If there is no phy, assume a direct MAC connection and that
+        * the link is up.
+        */
+       netif_carrier_on(dev);
        return 0;
 }
index bf666b02319007e02609d8ed812e95ae439372db..964da860f4c45f9af49df0356415311146cb4248 100644 (file)
 static int cvm_oct_fill_hw_skbuff(int pool, int size, int elements)
 {
        int freed = elements;
-       while (freed) {
 
+       while (freed) {
                struct sk_buff *skb = dev_alloc_skb(size + 256);
+
                if (unlikely(skb == NULL))
                        break;
                skb_reserve(skb, 256 - (((unsigned long)skb->data) & 0x7f));
@@ -81,10 +82,10 @@ static void cvm_oct_free_hw_skbuff(int pool, int size, int elements)
 
        if (elements < 0)
                pr_warn("Freeing of pool %u had too many skbuffs (%d)\n",
-                    pool, elements);
+                       pool, elements);
        else if (elements > 0)
                pr_warn("Freeing of pool %u is missing %d skbuffs\n",
-                      pool, elements);
+                       pool, elements);
 }
 
 /**
@@ -115,7 +116,7 @@ static int cvm_oct_fill_hw_memory(int pool, int size, int elements)
                memory = kmalloc(size + 256, GFP_ATOMIC);
                if (unlikely(memory == NULL)) {
                        pr_warn("Unable to allocate %u bytes for FPA pool %d\n",
-                                  elements * size, pool);
+                               elements * size, pool);
                        break;
                }
                fpa = (char *)(((unsigned long)memory + 256) & ~0x7fUL);
@@ -136,6 +137,7 @@ static void cvm_oct_free_hw_memory(int pool, int size, int elements)
 {
        char *memory;
        char *fpa;
+
        do {
                fpa = cvmx_fpa_alloc(pool);
                if (fpa) {
@@ -157,6 +159,7 @@ static void cvm_oct_free_hw_memory(int pool, int size, int elements)
 int cvm_oct_mem_fill_fpa(int pool, int size, int elements)
 {
        int freed;
+
        if (USE_SKBUFFS_IN_HW && pool == CVMX_FPA_PACKET_POOL)
                freed = cvm_oct_fill_hw_skbuff(pool, size, elements);
        else
index 0ec0da328215536656dad17b5cb17129804521cd..651be7e1a8a7f51eac9184a41a01f036baa767d0 100644 (file)
@@ -36,6 +36,7 @@
 #include "ethernet-defines.h"
 #include "octeon-ethernet.h"
 #include "ethernet-util.h"
+#include "ethernet-mdio.h"
 
 #include <asm/octeon/cvmx-helper.h>
 
@@ -302,15 +303,28 @@ int cvm_oct_rgmii_open(struct net_device *dev)
        int interface = INTERFACE(priv->port);
        int index = INDEX(priv->port);
        cvmx_helper_link_info_t link_info;
+       int rv;
+
+       rv = cvm_oct_phy_setup_device(dev);
+       if (rv)
+               return rv;
 
        gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
        gmx_cfg.s.en = 1;
        cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
 
        if (!octeon_is_simulation()) {
-               link_info = cvmx_helper_link_get(priv->port);
-               if (!link_info.s.link_up)
-                       netif_carrier_off(dev);
+               if (priv->phydev) {
+                       int r = phy_read_status(priv->phydev);
+                       if (r == 0 && priv->phydev->link == 0)
+                               netif_carrier_off(dev);
+                       cvm_oct_adjust_link(dev);
+               } else {
+                       link_info = cvmx_helper_link_get(priv->port);
+                       if (!link_info.s.link_up)
+                               netif_carrier_off(dev);
+                       priv->poll = cvm_oct_rgmii_poll;
+               }
        }
 
        return 0;
@@ -326,7 +340,7 @@ int cvm_oct_rgmii_stop(struct net_device *dev)
        gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
        gmx_cfg.s.en = 0;
        cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
-       return 0;
+       return cvm_oct_common_stop(dev);
 }
 
 static void cvm_oct_rgmii_immediate_poll(struct work_struct *work)
@@ -384,7 +398,6 @@ int cvm_oct_rgmii_init(struct net_device *dev)
                        gmx_rx_int_en.s.phy_spd = 1;
                        cvmx_write_csr(CVMX_GMXX_RXX_INT_EN(index, interface),
                                       gmx_rx_int_en.u64);
-                       priv->poll = cvm_oct_rgmii_poll;
                }
        }
 
index d3e82430eba6e081f9b19348fb8363cec41c911b..e1878449e683272d16b4079f47611f5a63d9e260 100644 (file)
@@ -24,6 +24,7 @@
  * This file may also be available under a different license from Cavium.
  * Contact Cavium Networks for more information
 **********************************************************************/
+#include <linux/phy.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
 #include <linux/ratelimit.h>
 #include "ethernet-defines.h"
 #include "octeon-ethernet.h"
 #include "ethernet-util.h"
+#include "ethernet-mdio.h"
 
 #include <asm/octeon/cvmx-helper.h>
 
 #include <asm/octeon/cvmx-gmxx-defs.h>
 
-int cvm_oct_sgmii_open(struct net_device *dev)
-{
-       union cvmx_gmxx_prtx_cfg gmx_cfg;
-       struct octeon_ethernet *priv = netdev_priv(dev);
-       int interface = INTERFACE(priv->port);
-       int index = INDEX(priv->port);
-       cvmx_helper_link_info_t link_info;
-
-       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
-       gmx_cfg.s.en = 1;
-       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
-
-       if (!octeon_is_simulation()) {
-               link_info = cvmx_helper_link_get(priv->port);
-               if (!link_info.s.link_up)
-                       netif_carrier_off(dev);
-       }
-
-       return 0;
-}
-
-int cvm_oct_sgmii_stop(struct net_device *dev)
-{
-       union cvmx_gmxx_prtx_cfg gmx_cfg;
-       struct octeon_ethernet *priv = netdev_priv(dev);
-       int interface = INTERFACE(priv->port);
-       int index = INDEX(priv->port);
-
-       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
-       gmx_cfg.s.en = 0;
-       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
-       return 0;
-}
-
 static void cvm_oct_sgmii_poll(struct net_device *dev)
 {
        struct octeon_ethernet *priv = netdev_priv(dev);
@@ -109,13 +77,58 @@ static void cvm_oct_sgmii_poll(struct net_device *dev)
        }
 }
 
-int cvm_oct_sgmii_init(struct net_device *dev)
+int cvm_oct_sgmii_open(struct net_device *dev)
 {
+       union cvmx_gmxx_prtx_cfg gmx_cfg;
        struct octeon_ethernet *priv = netdev_priv(dev);
+       int interface = INTERFACE(priv->port);
+       int index = INDEX(priv->port);
+       cvmx_helper_link_info_t link_info;
+       int rv;
+
+       rv = cvm_oct_phy_setup_device(dev);
+       if (rv)
+               return rv;
+
+       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
+       gmx_cfg.s.en = 1;
+       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
+
+       if (octeon_is_simulation())
+               return 0;
+
+       if (priv->phydev) {
+               int r = phy_read_status(priv->phydev);
+               if (r == 0 && priv->phydev->link == 0)
+                       netif_carrier_off(dev);
+               cvm_oct_adjust_link(dev);
+       } else {
+               link_info = cvmx_helper_link_get(priv->port);
+               if (!link_info.s.link_up)
+                       netif_carrier_off(dev);
+               priv->poll = cvm_oct_sgmii_poll;
+               cvm_oct_sgmii_poll(dev);
+       }
+       return 0;
+}
+
+int cvm_oct_sgmii_stop(struct net_device *dev)
+{
+       union cvmx_gmxx_prtx_cfg gmx_cfg;
+       struct octeon_ethernet *priv = netdev_priv(dev);
+       int interface = INTERFACE(priv->port);
+       int index = INDEX(priv->port);
+
+       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
+       gmx_cfg.s.en = 0;
+       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
+       return cvm_oct_common_stop(dev);
+}
+
+int cvm_oct_sgmii_init(struct net_device *dev)
+{
        cvm_oct_common_init(dev);
        dev->netdev_ops->ndo_stop(dev);
-       if (!octeon_is_simulation() && priv->phydev == NULL)
-               priv->poll = cvm_oct_sgmii_poll;
 
        /* FIXME: Need autoneg logic */
        return 0;
index 419f8c34ecdf1cbbba2a33431d827656867d64dd..20b3533ef95c4e5bdb91f734fd990eff3e2d2be6 100644 (file)
@@ -24,6 +24,7 @@
  * This file may also be available under a different license from Cavium.
  * Contact Cavium Networks for more information
 **********************************************************************/
+#include <linux/phy.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
 #include <linux/ratelimit.h>
 #include "ethernet-defines.h"
 #include "octeon-ethernet.h"
 #include "ethernet-util.h"
+#include "ethernet-mdio.h"
 
 #include <asm/octeon/cvmx-helper.h>
 
 #include <asm/octeon/cvmx-gmxx-defs.h>
 
-int cvm_oct_xaui_open(struct net_device *dev)
-{
-       union cvmx_gmxx_prtx_cfg gmx_cfg;
-       struct octeon_ethernet *priv = netdev_priv(dev);
-       int interface = INTERFACE(priv->port);
-       int index = INDEX(priv->port);
-       cvmx_helper_link_info_t link_info;
-
-       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
-       gmx_cfg.s.en = 1;
-       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
-
-       if (!octeon_is_simulation()) {
-               link_info = cvmx_helper_link_get(priv->port);
-               if (!link_info.s.link_up)
-                       netif_carrier_off(dev);
-       }
-       return 0;
-}
-
-int cvm_oct_xaui_stop(struct net_device *dev)
-{
-       union cvmx_gmxx_prtx_cfg gmx_cfg;
-       struct octeon_ethernet *priv = netdev_priv(dev);
-       int interface = INTERFACE(priv->port);
-       int index = INDEX(priv->port);
-
-       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
-       gmx_cfg.s.en = 0;
-       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
-       return 0;
-}
-
 static void cvm_oct_xaui_poll(struct net_device *dev)
 {
        struct octeon_ethernet *priv = netdev_priv(dev);
@@ -108,6 +77,54 @@ static void cvm_oct_xaui_poll(struct net_device *dev)
        }
 }
 
+int cvm_oct_xaui_open(struct net_device *dev)
+{
+       union cvmx_gmxx_prtx_cfg gmx_cfg;
+       struct octeon_ethernet *priv = netdev_priv(dev);
+       int interface = INTERFACE(priv->port);
+       int index = INDEX(priv->port);
+       cvmx_helper_link_info_t link_info;
+       int rv;
+
+       rv = cvm_oct_phy_setup_device(dev);
+       if (rv)
+               return rv;
+
+       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
+       gmx_cfg.s.en = 1;
+       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
+
+       if (octeon_is_simulation())
+               return 0;
+
+       if (priv->phydev) {
+               int r = phy_read_status(priv->phydev);
+               if (r == 0 && priv->phydev->link == 0)
+                       netif_carrier_off(dev);
+               cvm_oct_adjust_link(dev);
+       } else {
+               link_info = cvmx_helper_link_get(priv->port);
+               if (!link_info.s.link_up)
+                       netif_carrier_off(dev);
+               priv->poll = cvm_oct_xaui_poll;
+               cvm_oct_xaui_poll(dev);
+       }
+       return 0;
+}
+
+int cvm_oct_xaui_stop(struct net_device *dev)
+{
+       union cvmx_gmxx_prtx_cfg gmx_cfg;
+       struct octeon_ethernet *priv = netdev_priv(dev);
+       int interface = INTERFACE(priv->port);
+       int index = INDEX(priv->port);
+
+       gmx_cfg.u64 = cvmx_read_csr(CVMX_GMXX_PRTX_CFG(index, interface));
+       gmx_cfg.s.en = 0;
+       cvmx_write_csr(CVMX_GMXX_PRTX_CFG(index, interface), gmx_cfg.u64);
+       return cvm_oct_common_stop(dev);
+}
+
 int cvm_oct_xaui_init(struct net_device *dev)
 {
        struct octeon_ethernet *priv = netdev_priv(dev);
index da9dd6bc56600f2fe094df6a59d3836ad491be72..2aa7235621554ed9888b4cba9e42327604cc80c5 100644 (file)
@@ -471,7 +471,6 @@ int cvm_oct_common_init(struct net_device *dev)
        dev->features |= NETIF_F_LLTX;
        dev->ethtool_ops = &cvm_oct_ethtool_ops;
 
-       cvm_oct_phy_setup_device(dev);
        cvm_oct_set_mac_filter(dev);
        dev->netdev_ops->ndo_change_mtu(dev, dev->mtu);
 
@@ -722,6 +721,7 @@ static int cvm_oct_probe(struct platform_device *pdev)
 
                        /* Initialize the device private structure. */
                        priv = netdev_priv(dev);
+                       priv->netdev = dev;
                        priv->of_node = cvm_oct_node_for_port(pip, interface,
                                                                port_index);
 
index 4cf3884070faeaa580b9fbb743a26cc840d1583b..d0e3211199148620fe2998eb77a1a97645f8a74d 100644 (file)
@@ -44,6 +44,8 @@ struct octeon_ethernet {
        int queue;
        /* Hardware fetch and add to count outstanding tx buffers */
        int fau;
+       /* My netdev. */
+       struct net_device *netdev;
        /*
         * Type of port. This is one of the enums in
         * cvmx_helper_interface_mode_t
@@ -85,6 +87,8 @@ extern int cvm_oct_xaui_stop(struct net_device *dev);
 
 extern int cvm_oct_common_init(struct net_device *dev);
 extern void cvm_oct_common_uninit(struct net_device *dev);
+void cvm_oct_adjust_link(struct net_device *dev);
+int cvm_oct_common_stop(struct net_device *dev);
 
 extern int always_use_pow;
 extern int pow_send_group;
index 6a138ff699e9095f69830116e34848e5da188796..2745076f930f0643d81bbbbdfd48f537aba81ce2 100644 (file)
@@ -1,11 +1,9 @@
 r8188eu-y :=                           \
                core/rtw_ap.o           \
-               core/rtw_br_ext.o       \
                core/rtw_cmd.o          \
                core/rtw_debug.o        \
                core/rtw_efuse.o        \
                core/rtw_ieee80211.o    \
-               core/rtw_io.o           \
                core/rtw_ioctl_set.o    \
                core/rtw_iol.o          \
                core/rtw_led.o          \
@@ -25,7 +23,6 @@ r8188eu-y :=                          \
                hal/HalHWImg8188E_MAC.o \
                hal/HalHWImg8188E_BB.o  \
                hal/HalHWImg8188E_RF.o  \
-               hal/HalPhyRf.o          \
                hal/HalPhyRf_8188e.o    \
                hal/HalPwrSeqCmd.o      \
                hal/Hal8188EPwrSeq.o    \
@@ -44,13 +41,11 @@ r8188eu-y :=                                \
                hal/rtl8188e_phycfg.o   \
                hal/rtl8188e_rf6052.o   \
                hal/rtl8188e_rxdesc.o   \
-               hal/rtl8188e_sreset.o   \
                hal/rtl8188e_xmit.o     \
                hal/rtl8188eu_led.o     \
                hal/rtl8188eu_recv.o    \
                hal/rtl8188eu_xmit.o    \
                hal/usb_halinit.o       \
-               hal/usb_ops_linux.o     \
                os_dep/ioctl_linux.o    \
                os_dep/mlme_linux.o     \
                os_dep/os_intfs.o       \
index 85fda6128db9ccc472acce94c3f966c6f204d090..768a35946052998b58db25d6941cb7ac574148d6 100644 (file)
@@ -288,14 +288,14 @@ void      expire_timeout_chk(struct adapter *padapter)
        plist = phead->next;
 
        /* check auth_queue */
-       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, auth_list);
                plist = plist->next;
 
                if (psta->expire_to > 0) {
                        psta->expire_to--;
                        if (psta->expire_to == 0) {
-                               rtw_list_delete(&psta->auth_list);
+                               list_del_init(&psta->auth_list);
                                pstapriv->auth_list_cnt--;
 
                                DBG_88E("auth expire %6ph\n",
@@ -322,7 +322,7 @@ void        expire_timeout_chk(struct adapter *padapter)
        plist = phead->next;
 
        /* check asoc_queue */
-       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, asoc_list);
                plist = plist->next;
 
@@ -365,7 +365,7 @@ void        expire_timeout_chk(struct adapter *padapter)
                                continue;
                        }
 
-                       rtw_list_delete(&psta->asoc_list);
+                       list_del_init(&psta->asoc_list);
                        pstapriv->asoc_list_cnt--;
 
                        DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state);
@@ -421,7 +421,7 @@ void        expire_timeout_chk(struct adapter *padapter)
 
                        DBG_88E("asoc expire %pM, state = 0x%x\n", (psta->hwaddr), psta->state);
                        spin_lock_bh(&pstapriv->asoc_list_lock);
-                       rtw_list_delete(&psta->asoc_list);
+                       list_del_init(&psta->asoc_list);
                        pstapriv->asoc_list_cnt--;
                        updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
                        spin_unlock_bh(&pstapriv->asoc_list_lock);
@@ -548,7 +548,7 @@ static void update_bmc_sta(struct adapter *padapter)
 
                psta->ieee8021x_blocked = 0;
 
-               _rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
+               memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
 
                /* prepare for add_RATid */
                supportRateNum = rtw_get_rateset_len((u8 *)&pcur_network->SupportedRates);
@@ -671,7 +671,7 @@ void update_sta_info_apmode(struct adapter *padapter, struct sta_info *psta)
 
        /* todo: init other variables */
 
-       _rtw_memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
+       memset((void *)&psta->sta_stats, 0, sizeof(struct stainfo_stats));
 
        spin_lock_bh(&psta->lock);
        psta->state |= _FW_LINKED;
@@ -886,7 +886,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 
        pbss_network->IELength = len;
 
-       _rtw_memset(ie, 0, MAX_IE_SZ);
+       memset(ie, 0, MAX_IE_SZ);
 
        memcpy(ie, pbuf, pbss_network->IELength);
 
@@ -900,15 +900,15 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 
        /* beacon interval */
        p = rtw_get_beacon_interval_from_ie(ie);/* 8: TimeStamp, 2: Beacon Interval 2:Capability */
-       pbss_network->Configuration.BeaconPeriod = RTW_GET_LE16(p);
+       pbss_network->Configuration.BeaconPeriod = get_unaligned_le16(p);
 
        /* capability */
-       cap = RTW_GET_LE16(ie);
+       cap = get_unaligned_le16(ie);
 
        /* SSID */
        p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SSID_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
        if (p && ie_len > 0) {
-               _rtw_memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
+               memset(&pbss_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
                memcpy(pbss_network->Ssid.Ssid, (p + 2), ie_len);
                pbss_network->Ssid.SsidLength = ie_len;
        }
@@ -922,7 +922,7 @@ int rtw_check_beacon_data(struct adapter *padapter, u8 *pbuf,  int len)
 
        pbss_network->Configuration.DSConfig = channel;
 
-       _rtw_memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
+       memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
        /*  get supported rates */
        p = rtw_get_ie(ie + _BEACON_IE_OFFSET_, _SUPPORTEDRATES_IE_, &ie_len, (pbss_network->IELength - _BEACON_IE_OFFSET_));
        if (p !=  NULL) {
@@ -1146,7 +1146,7 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
        phead = get_list_head(pacl_node_q);
        plist = phead->next;
 
-       while (!rtw_end_of_queue_search(phead, plist)) {
+       while (phead != plist) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
                plist = plist->next;
 
@@ -1170,13 +1170,13 @@ int rtw_acl_add_sta(struct adapter *padapter, u8 *addr)
                paclnode = &pacl_list->aclnode[i];
 
                if (!paclnode->valid) {
-                       _rtw_init_listhead(&paclnode->list);
+                       INIT_LIST_HEAD(&paclnode->list);
 
                        memcpy(paclnode->addr, addr, ETH_ALEN);
 
                        paclnode->valid = true;
 
-                       rtw_list_insert_tail(&paclnode->list, get_list_head(pacl_node_q));
+                       list_add_tail(&paclnode->list, get_list_head(pacl_node_q));
 
                        pacl_list->num++;
 
@@ -1207,7 +1207,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
        phead = get_list_head(pacl_node_q);
        plist = phead->next;
 
-       while (!rtw_end_of_queue_search(phead, plist)) {
+       while (phead != plist) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
                plist = plist->next;
 
@@ -1215,7 +1215,7 @@ int rtw_acl_remove_sta(struct adapter *padapter, u8 *addr)
                        if (paclnode->valid) {
                                paclnode->valid = false;
 
-                               rtw_list_delete(&paclnode->list);
+                               list_del_init(&paclnode->list);
 
                                pacl_list->num--;
                        }
@@ -1505,7 +1505,7 @@ void associated_clients_update(struct adapter *padapter, u8 updated)
                plist = phead->next;
 
                /* check asoc_queue */
-               while ((rtw_end_of_queue_search(phead, plist)) == false) {
+               while (phead != plist) {
                        psta = container_of(plist, struct sta_info, asoc_list);
 
                        plist = plist->next;
@@ -1779,7 +1779,7 @@ int rtw_ap_inform_ch_switch(struct adapter *padapter, u8 new_ch, u8 ch_offset)
        plist = phead->next;
 
        /* for each sta in asoc_queue */
-       while (!rtw_end_of_queue_search(phead, plist)) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, asoc_list);
                plist = plist->next;
 
@@ -1813,12 +1813,12 @@ int rtw_sta_flush(struct adapter *padapter)
        plist = phead->next;
 
        /* free sta asoc_queue */
-       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, asoc_list);
 
                plist = plist->next;
 
-               rtw_list_delete(&psta->asoc_list);
+               list_del_init(&psta->asoc_list);
                pstapriv->asoc_list_cnt--;
 
                ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
@@ -1910,11 +1910,11 @@ void start_ap_mode(struct adapter *padapter)
        pmlmepriv->p2p_probe_resp_ie = NULL;
 
        /* for ACL */
-       _rtw_init_listhead(&(pacl_list->acl_node_q.queue));
+       INIT_LIST_HEAD(&(pacl_list->acl_node_q.queue));
        pacl_list->num = 0;
        pacl_list->mode = 0;
        for (i = 0; i < NUM_ACL; i++) {
-               _rtw_init_listhead(&pacl_list->aclnode[i].list);
+               INIT_LIST_HEAD(&pacl_list->aclnode[i].list);
                pacl_list->aclnode[i].valid = false;
        }
 }
@@ -1934,7 +1934,7 @@ void stop_ap_mode(struct adapter *padapter)
        pmlmeext->bstart_bss = false;
 
        /* reset and init security priv , this can refine with rtw_reset_securitypriv */
-       _rtw_memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));
+       memset((unsigned char *)&padapter->securitypriv, 0, sizeof(struct security_priv));
        padapter->securitypriv.ndisauthtype = Ndis802_11AuthModeOpen;
        padapter->securitypriv.ndisencryptstatus = Ndis802_11WEPDisabled;
 
@@ -1942,14 +1942,14 @@ void stop_ap_mode(struct adapter *padapter)
        spin_lock_bh(&(pacl_node_q->lock));
        phead = get_list_head(pacl_node_q);
        plist = phead->next;
-       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+       while (phead != plist) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
                plist = plist->next;
 
                if (paclnode->valid) {
                        paclnode->valid = false;
 
-                       rtw_list_delete(&paclnode->list);
+                       list_del_init(&paclnode->list);
 
                        pacl_list->num--;
                }
diff --git a/drivers/staging/rtl8188eu/core/rtw_br_ext.c b/drivers/staging/rtl8188eu/core/rtw_br_ext.c
deleted file mode 100644 (file)
index f97f05f..0000000
+++ /dev/null
@@ -1,1191 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#define _RTW_BR_EXT_C_
-
-#include <linux/if_arp.h>
-#include <net/ip.h>
-#include <net/ipx.h>
-#include <linux/atalk.h>
-#include <linux/udp.h>
-#include <linux/if_pppox.h>
-
-#include <drv_types.h>
-#include "rtw_br_ext.h"
-#include <usb_osintf.h>
-#include <recv_osdep.h>
-
-#ifndef csum_ipv6_magic
-#include <net/ip6_checksum.h>
-#endif
-
-#include <linux/ipv6.h>
-#include <linux/icmpv6.h>
-#include <net/ndisc.h>
-#include <net/checksum.h>
-
-#define NAT25_IPV4             01
-#define NAT25_IPV6             02
-#define NAT25_IPX              03
-#define NAT25_APPLE            04
-#define NAT25_PPPOE            05
-
-#define RTL_RELAY_TAG_LEN (ETH_ALEN)
-#define TAG_HDR_LEN            4
-
-#define MAGIC_CODE             0x8186
-#define MAGIC_CODE_LEN 2
-#define WAIT_TIME_PPPOE        5       /*  waiting time for pppoe server in sec */
-
-/*-----------------------------------------------------------------
-  How database records network address:
-          0    1    2    3    4    5    6    7    8    9   10
-       |----|----|----|----|----|----|----|----|----|----|----|
-  IPv4  |type|                             |      IP addr      |
-  IPX   |type|      Net addr     |          Node addr          |
-  IPX   |type|      Net addr     |Sckt addr|
-  Apple |type| Network |node|
-  PPPoE |type|   SID   |           AC MAC            |
------------------------------------------------------------------*/
-
-
-/* Find a tag in pppoe frame and return the pointer */
-static inline unsigned char *__nat25_find_pppoe_tag(struct pppoe_hdr *ph, unsigned short type)
-{
-       unsigned char *cur_ptr, *start_ptr;
-       unsigned short tagLen, tagType;
-
-       start_ptr = cur_ptr = (unsigned char *)ph->tag;
-       while ((cur_ptr - start_ptr) < ntohs(ph->length)) {
-               /*  prevent un-alignment access */
-               tagType = (unsigned short)((cur_ptr[0] << 8) + cur_ptr[1]);
-               tagLen  = (unsigned short)((cur_ptr[2] << 8) + cur_ptr[3]);
-               if (tagType == type)
-                       return cur_ptr;
-               cur_ptr = cur_ptr + TAG_HDR_LEN + tagLen;
-       }
-       return NULL;
-}
-
-
-static inline int __nat25_add_pppoe_tag(struct sk_buff *skb, struct pppoe_tag *tag)
-{
-       struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN);
-       int data_len;
-
-       data_len = be16_to_cpu(tag->tag_len) + TAG_HDR_LEN;
-       if (skb_tailroom(skb) < data_len) {
-               _DEBUG_ERR("skb_tailroom() failed in add SID tag!\n");
-               return -1;
-       }
-
-       skb_put(skb, data_len);
-       /*  have a room for new tag */
-       memmove(((unsigned char *)ph->tag + data_len), (unsigned char *)ph->tag, ntohs(ph->length));
-       ph->length = htons(ntohs(ph->length) + data_len);
-       memcpy((unsigned char *)ph->tag, tag, data_len);
-       return data_len;
-}
-
-static int skb_pull_and_merge(struct sk_buff *skb, unsigned char *src, int len)
-{
-       int tail_len;
-       unsigned long end, tail;
-
-       if ((src+len) > skb_tail_pointer(skb) || skb->len < len)
-               return -1;
-
-       tail = (unsigned long)skb_tail_pointer(skb);
-       end = (unsigned long)src+len;
-       if (tail < end)
-               return -1;
-
-       tail_len = (int)(tail-end);
-       if (tail_len > 0)
-               memmove(src, src+len, tail_len);
-
-       skb_trim(skb, skb->len-len);
-       return 0;
-}
-
-static inline unsigned long __nat25_timeout(struct adapter *priv)
-{
-       unsigned long timeout;
-
-       timeout = jiffies - NAT25_AGEING_TIME*HZ;
-
-       return timeout;
-}
-
-
-static inline int  __nat25_has_expired(struct adapter *priv,
-                               struct nat25_network_db_entry *fdb)
-{
-       if (time_before_eq(fdb->ageing_timer, __nat25_timeout(priv)))
-               return 1;
-
-       return 0;
-}
-
-
-static inline void __nat25_generate_ipv4_network_addr(unsigned char *networkAddr,
-                               unsigned int *ipAddr)
-{
-       memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
-
-       networkAddr[0] = NAT25_IPV4;
-       memcpy(networkAddr+7, (unsigned char *)ipAddr, 4);
-}
-
-
-static inline void __nat25_generate_ipx_network_addr_with_node(unsigned char *networkAddr,
-                               __be32 *ipxNetAddr, unsigned char *ipxNodeAddr)
-{
-       memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
-
-       networkAddr[0] = NAT25_IPX;
-       memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4);
-       memcpy(networkAddr+5, ipxNodeAddr, 6);
-}
-
-
-static inline void __nat25_generate_ipx_network_addr_with_socket(unsigned char *networkAddr,
-                               __be32 *ipxNetAddr, __be16 *ipxSocketAddr)
-{
-       memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
-
-       networkAddr[0] = NAT25_IPX;
-       memcpy(networkAddr+1, (unsigned char *)ipxNetAddr, 4);
-       memcpy(networkAddr+5, (unsigned char *)ipxSocketAddr, 2);
-}
-
-
-static inline void __nat25_generate_apple_network_addr(unsigned char *networkAddr,
-                               __be16 *network, unsigned char *node)
-{
-       memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
-
-       networkAddr[0] = NAT25_APPLE;
-       memcpy(networkAddr+1, (unsigned char *)network, 2);
-       networkAddr[3] = *node;
-}
-
-static inline void __nat25_generate_pppoe_network_addr(unsigned char *networkAddr,
-                               unsigned char *ac_mac, __be16 *sid)
-{
-       memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
-
-       networkAddr[0] = NAT25_PPPOE;
-       memcpy(networkAddr+1, (unsigned char *)sid, 2);
-       memcpy(networkAddr+3, (unsigned char *)ac_mac, 6);
-}
-
-static  void __nat25_generate_ipv6_network_addr(unsigned char *networkAddr,
-                               __be32 *ipAddr)
-{
-       memset(networkAddr, 0, MAX_NETWORK_ADDR_LEN);
-
-       networkAddr[0] = NAT25_IPV6;
-       memcpy(networkAddr+1, (unsigned char *)ipAddr, 16);
-}
-
-static unsigned char *scan_tlv(unsigned char *data, int len, unsigned char tag, unsigned char len8b)
-{
-       while (len > 0) {
-               if (*data == tag && *(data+1) == len8b && len >= len8b*8)
-                       return data+2;
-
-               len -= (*(data+1))*8;
-               data += (*(data+1))*8;
-       }
-       return NULL;
-}
-
-static int update_nd_link_layer_addr(unsigned char *data, int len, unsigned char *replace_mac)
-{
-       struct icmp6hdr *icmphdr = (struct icmp6hdr *)data;
-       unsigned char *mac;
-
-       if (icmphdr->icmp6_type == NDISC_ROUTER_SOLICITATION) {
-               if (len >= 8) {
-                       mac = scan_tlv(&data[8], len-8, 1, 1);
-                       if (mac) {
-                               _DEBUG_INFO("Router Solicitation, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
-                                       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
-                                       replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
-                               memcpy(mac, replace_mac, 6);
-                               return 1;
-                       }
-               }
-       } else if (icmphdr->icmp6_type == NDISC_ROUTER_ADVERTISEMENT) {
-               if (len >= 16) {
-                       mac = scan_tlv(&data[16], len-16, 1, 1);
-                       if (mac) {
-                               _DEBUG_INFO("Router Advertisement, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
-                                       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
-                                       replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
-                               memcpy(mac, replace_mac, 6);
-                               return 1;
-                       }
-               }
-       } else if (icmphdr->icmp6_type == NDISC_NEIGHBOUR_SOLICITATION) {
-               if (len >= 24) {
-                       mac = scan_tlv(&data[24], len-24, 1, 1);
-                       if (mac) {
-                               _DEBUG_INFO("Neighbor Solicitation, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
-                                       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
-                                       replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
-                               memcpy(mac, replace_mac, 6);
-                               return 1;
-                       }
-               }
-       } else if (icmphdr->icmp6_type == NDISC_NEIGHBOUR_ADVERTISEMENT) {
-               if (len >= 24) {
-                       mac = scan_tlv(&data[24], len-24, 2, 1);
-                       if (mac) {
-                               _DEBUG_INFO("Neighbor Advertisement, replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
-                                       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
-                                       replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
-                               memcpy(mac, replace_mac, 6);
-                               return 1;
-                       }
-               }
-       } else if (icmphdr->icmp6_type == NDISC_REDIRECT) {
-               if (len >= 40) {
-                       mac = scan_tlv(&data[40], len-40, 2, 1);
-                       if (mac) {
-                               _DEBUG_INFO("Redirect,  replace MAC From: %02x:%02x:%02x:%02x:%02x:%02x, To: %02x:%02x:%02x:%02x:%02x:%02x\n",
-                                       mac[0], mac[1], mac[2], mac[3], mac[4], mac[5],
-                                       replace_mac[0], replace_mac[1], replace_mac[2], replace_mac[3], replace_mac[4], replace_mac[5]);
-                               memcpy(mac, replace_mac, 6);
-                               return 1;
-                       }
-               }
-       }
-       return 0;
-}
-
-static inline int __nat25_network_hash(unsigned char *networkAddr)
-{
-       if (networkAddr[0] == NAT25_IPV4) {
-               unsigned long x;
-
-               x = networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10];
-
-               return x & (NAT25_HASH_SIZE - 1);
-       } else if (networkAddr[0] == NAT25_IPX) {
-               unsigned long x;
-
-               x = networkAddr[1] ^ networkAddr[2] ^ networkAddr[3] ^ networkAddr[4] ^ networkAddr[5] ^
-                       networkAddr[6] ^ networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10];
-
-               return x & (NAT25_HASH_SIZE - 1);
-       } else if (networkAddr[0] == NAT25_APPLE) {
-               unsigned long x;
-
-               x = networkAddr[1] ^ networkAddr[2] ^ networkAddr[3];
-
-               return x & (NAT25_HASH_SIZE - 1);
-       } else if (networkAddr[0] == NAT25_PPPOE) {
-               unsigned long x;
-
-               x = networkAddr[0] ^ networkAddr[1] ^ networkAddr[2] ^ networkAddr[3] ^ networkAddr[4] ^ networkAddr[5] ^ networkAddr[6] ^ networkAddr[7] ^ networkAddr[8];
-
-               return x & (NAT25_HASH_SIZE - 1);
-       } else if (networkAddr[0] == NAT25_IPV6) {
-               unsigned long x;
-
-               x = networkAddr[1] ^ networkAddr[2] ^ networkAddr[3] ^ networkAddr[4] ^ networkAddr[5] ^
-                       networkAddr[6] ^ networkAddr[7] ^ networkAddr[8] ^ networkAddr[9] ^ networkAddr[10] ^
-                       networkAddr[11] ^ networkAddr[12] ^ networkAddr[13] ^ networkAddr[14] ^ networkAddr[15] ^
-                       networkAddr[16];
-
-               return x & (NAT25_HASH_SIZE - 1);
-       } else {
-               unsigned long x = 0;
-               int i;
-
-               for (i = 0; i < MAX_NETWORK_ADDR_LEN; i++)
-                       x ^= networkAddr[i];
-
-               return x & (NAT25_HASH_SIZE - 1);
-       }
-}
-
-static inline void __network_hash_link(struct adapter *priv,
-                               struct nat25_network_db_entry *ent, int hash)
-{
-       /*  Caller must spin_lock_bh already! */
-       ent->next_hash = priv->nethash[hash];
-       if (ent->next_hash != NULL)
-               ent->next_hash->pprev_hash = &ent->next_hash;
-       priv->nethash[hash] = ent;
-       ent->pprev_hash = &priv->nethash[hash];
-}
-
-static inline void __network_hash_unlink(struct nat25_network_db_entry *ent)
-{
-       /*  Caller must spin_lock_bh already! */
-       *(ent->pprev_hash) = ent->next_hash;
-       if (ent->next_hash != NULL)
-               ent->next_hash->pprev_hash = ent->pprev_hash;
-       ent->next_hash = NULL;
-       ent->pprev_hash = NULL;
-}
-
-static int __nat25_db_network_lookup_and_replace(struct adapter *priv,
-                               struct sk_buff *skb, unsigned char *networkAddr)
-{
-       struct nat25_network_db_entry *db;
-       spin_lock_bh(&priv->br_ext_lock);
-
-       db = priv->nethash[__nat25_network_hash(networkAddr)];
-       while (db != NULL) {
-               if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
-                       if (!__nat25_has_expired(priv, db)) {
-                               /*  replace the destination mac address */
-                               memcpy(skb->data, db->macAddr, ETH_ALEN);
-                               atomic_inc(&db->use_count);
-
-                               DEBUG_INFO("NAT25: Lookup M:%02x%02x%02x%02x%02x%02x N:%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x"
-                                                       "%02x%02x%02x%02x%02x%02x\n",
-                                       db->macAddr[0],
-                                       db->macAddr[1],
-                                       db->macAddr[2],
-                                       db->macAddr[3],
-                                       db->macAddr[4],
-                                       db->macAddr[5],
-                                       db->networkAddr[0],
-                                       db->networkAddr[1],
-                                       db->networkAddr[2],
-                                       db->networkAddr[3],
-                                       db->networkAddr[4],
-                                       db->networkAddr[5],
-                                       db->networkAddr[6],
-                                       db->networkAddr[7],
-                                       db->networkAddr[8],
-                                       db->networkAddr[9],
-                                       db->networkAddr[10],
-                                       db->networkAddr[11],
-                                       db->networkAddr[12],
-                                       db->networkAddr[13],
-                                       db->networkAddr[14],
-                                       db->networkAddr[15],
-                                       db->networkAddr[16]);
-                       }
-                       spin_unlock_bh(&priv->br_ext_lock);
-                       return 1;
-               }
-               db = db->next_hash;
-       }
-       spin_unlock_bh(&priv->br_ext_lock);
-       return 0;
-}
-
-static void __nat25_db_network_insert(struct adapter *priv,
-                               unsigned char *macAddr, unsigned char *networkAddr)
-{
-       struct nat25_network_db_entry *db;
-       int hash;
-
-       spin_lock_bh(&priv->br_ext_lock);
-       hash = __nat25_network_hash(networkAddr);
-       db = priv->nethash[hash];
-       while (db != NULL) {
-               if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN)) {
-                       ether_addr_copy(db->macAddr, macAddr);
-                       db->ageing_timer = jiffies;
-                       spin_unlock_bh(&priv->br_ext_lock);
-                       return;
-               }
-               db = db->next_hash;
-       }
-       db = (struct nat25_network_db_entry *) rtw_malloc(sizeof(*db));
-       if (db == NULL) {
-               spin_unlock_bh(&priv->br_ext_lock);
-               return;
-       }
-       memcpy(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN);
-       ether_addr_copy(db->macAddr, macAddr);
-       atomic_set(&db->use_count, 1);
-       db->ageing_timer = jiffies;
-
-       __network_hash_link(priv, db, hash);
-
-       spin_unlock_bh(&priv->br_ext_lock);
-}
-
-static void __nat25_db_print(struct adapter *priv)
-{
-}
-
-/*
- *     NAT2.5 interface
- */
-
-void nat25_db_cleanup(struct adapter *priv)
-{
-       int i;
-
-       spin_lock_bh(&priv->br_ext_lock);
-
-       for (i = 0; i < NAT25_HASH_SIZE; i++) {
-               struct nat25_network_db_entry *f;
-               f = priv->nethash[i];
-               while (f != NULL) {
-                       struct nat25_network_db_entry *g;
-
-                       g = f->next_hash;
-                       if (priv->scdb_entry == f) {
-                               memset(priv->scdb_mac, 0, ETH_ALEN);
-                               memset(priv->scdb_ip, 0, 4);
-                               priv->scdb_entry = NULL;
-                       }
-                       __network_hash_unlink(f);
-                       kfree(f);
-                       f = g;
-               }
-       }
-       spin_unlock_bh(&priv->br_ext_lock);
-}
-
-void nat25_db_expire(struct adapter *priv)
-{
-       int i;
-       spin_lock_bh(&priv->br_ext_lock);
-
-       for (i = 0; i < NAT25_HASH_SIZE; i++) {
-               struct nat25_network_db_entry *f;
-               f = priv->nethash[i];
-
-               while (f != NULL) {
-                       struct nat25_network_db_entry *g;
-                       g = f->next_hash;
-
-                       if (__nat25_has_expired(priv, f)) {
-                               if (atomic_dec_and_test(&f->use_count)) {
-                                       if (priv->scdb_entry == f) {
-                                               memset(priv->scdb_mac, 0, ETH_ALEN);
-                                               memset(priv->scdb_ip, 0, 4);
-                                               priv->scdb_entry = NULL;
-                                       }
-                                       __network_hash_unlink(f);
-                                       kfree(f);
-                               }
-                       }
-                       f = g;
-               }
-       }
-       spin_unlock_bh(&priv->br_ext_lock);
-}
-
-int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method)
-{
-       unsigned short protocol;
-       unsigned char networkAddr[MAX_NETWORK_ADDR_LEN];
-       unsigned int tmp;
-
-       if (skb == NULL)
-               return -1;
-
-       if ((method <= NAT25_MIN) || (method >= NAT25_MAX))
-               return -1;
-
-       protocol = be16_to_cpu(*((__be16 *)(skb->data + 2 * ETH_ALEN)));
-
-       /*---------------------------------------------------*/
-       /*                 Handle IP frame                   */
-       /*---------------------------------------------------*/
-       if (protocol == ETH_P_IP) {
-               struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN);
-
-               if (((unsigned char *)(iph) + (iph->ihl<<2)) >= (skb->data + ETH_HLEN + skb->len)) {
-                       DEBUG_WARN("NAT25: malformed IP packet !\n");
-                       return -1;
-               }
-
-               switch (method) {
-               case NAT25_CHECK:
-                       return -1;
-               case NAT25_INSERT:
-                       /* some multicast with source IP is all zero, maybe other case is illegal */
-                       /* in class A, B, C, host address is all zero or all one is illegal */
-                       if (iph->saddr == 0)
-                               return 0;
-                       tmp = be32_to_cpu(iph->saddr);
-                       DEBUG_INFO("NAT25: Insert IP, SA =%08x, DA =%08x\n", tmp, iph->daddr);
-                       __nat25_generate_ipv4_network_addr(networkAddr, &tmp);
-                       /* record source IP address and , source mac address into db */
-                       __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-
-                       __nat25_db_print(priv);
-                       return 0;
-               case NAT25_LOOKUP:
-                       DEBUG_INFO("NAT25: Lookup IP, SA =%08x, DA =%08x\n", iph->saddr, iph->daddr);
-                       tmp = be32_to_cpu(iph->daddr);
-                       __nat25_generate_ipv4_network_addr(networkAddr, &tmp);
-
-                       if (!__nat25_db_network_lookup_and_replace(priv, skb, networkAddr)) {
-                               if (*((unsigned char *)&iph->daddr + 3) == 0xff) {
-                                       /*  L2 is unicast but L3 is broadcast, make L2 bacome broadcast */
-                                       DEBUG_INFO("NAT25: Set DA as broadcast\n");
-                                       memset(skb->data, 0xff, ETH_ALEN);
-                               } else {
-                                       /*  forward unknown IP packet to upper TCP/IP */
-                                       DEBUG_INFO("NAT25: Replace DA with BR's MAC\n");
-                                       if ((*(u32 *)priv->br_mac) == 0 && (*(u16 *)(priv->br_mac+4)) == 0) {
-                                               netdev_info(skb->dev,
-                                                               "Re-init netdev_br_init() due to br_mac == 0!\n");
-                                               netdev_br_init(priv->pnetdev);
-                                       }
-                                       memcpy(skb->data, priv->br_mac, ETH_ALEN);
-                               }
-                       }
-                       return 0;
-               default:
-                       return -1;
-               }
-       } else if (protocol == ETH_P_ARP) {
-               /*---------------------------------------------------*/
-               /*                 Handle ARP frame                  */
-               /*---------------------------------------------------*/
-               struct arphdr *arp = (struct arphdr *)(skb->data + ETH_HLEN);
-               unsigned char *arp_ptr = (unsigned char *)(arp + 1);
-               unsigned int *sender, *target;
-
-               if (arp->ar_pro != __constant_htons(ETH_P_IP)) {
-                       DEBUG_WARN("NAT25: arp protocol unknown (%4x)!\n", be16_to_cpu(arp->ar_pro));
-                       return -1;
-               }
-
-               switch (method) {
-               case NAT25_CHECK:
-                       return 0;       /*  skb_copy for all ARP frame */
-               case NAT25_INSERT:
-                       DEBUG_INFO("NAT25: Insert ARP, MAC =%02x%02x%02x%02x%02x%02x\n", arp_ptr[0],
-                               arp_ptr[1], arp_ptr[2], arp_ptr[3], arp_ptr[4], arp_ptr[5]);
-
-                       /*  change to ARP sender mac address to wlan STA address */
-                       memcpy(arp_ptr, GET_MY_HWADDR(priv), ETH_ALEN);
-                       arp_ptr += arp->ar_hln;
-                       sender = (unsigned int *)arp_ptr;
-                       __nat25_generate_ipv4_network_addr(networkAddr, sender);
-                       __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-                       __nat25_db_print(priv);
-                       return 0;
-               case NAT25_LOOKUP:
-                       DEBUG_INFO("NAT25: Lookup ARP\n");
-
-                       arp_ptr += arp->ar_hln;
-                       sender = (unsigned int *)arp_ptr;
-                       arp_ptr += (arp->ar_hln + arp->ar_pln);
-                       target = (unsigned int *)arp_ptr;
-                       __nat25_generate_ipv4_network_addr(networkAddr, target);
-                       __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-                       /*  change to ARP target mac address to Lookup result */
-                       arp_ptr = (unsigned char *)(arp + 1);
-                       arp_ptr += (arp->ar_hln + arp->ar_pln);
-                       memcpy(arp_ptr, skb->data, ETH_ALEN);
-                       return 0;
-               default:
-                       return -1;
-               }
-       } else if ((protocol == ETH_P_IPX) ||
-                  (protocol <= ETH_FRAME_LEN)) {
-               /*---------------------------------------------------*/
-               /*         Handle IPX and Apple Talk frame           */
-               /*---------------------------------------------------*/
-               unsigned char ipx_header[2] = {0xFF, 0xFF};
-               struct ipxhdr   *ipx = NULL;
-               struct elapaarp *ea = NULL;
-               struct ddpehdr  *ddp = NULL;
-               unsigned char *framePtr = skb->data + ETH_HLEN;
-
-               if (protocol == ETH_P_IPX) {
-                       DEBUG_INFO("NAT25: Protocol = IPX (Ethernet II)\n");
-                       ipx = (struct ipxhdr *)framePtr;
-               } else if (protocol <= ETH_FRAME_LEN) {
-                       if (!memcmp(ipx_header, framePtr, 2)) {
-                               DEBUG_INFO("NAT25: Protocol = IPX (Ethernet 802.3)\n");
-                               ipx = (struct ipxhdr *)framePtr;
-                       } else {
-                               unsigned char ipx_8022_type =  0xE0;
-                               unsigned char snap_8022_type = 0xAA;
-
-                               if (*framePtr == snap_8022_type) {
-                                       unsigned char ipx_snap_id[5] = {0x0, 0x0, 0x0, 0x81, 0x37};             /*  IPX SNAP ID */
-                                       unsigned char aarp_snap_id[5] = {0x00, 0x00, 0x00, 0x80, 0xF3}; /*  Apple Talk AARP SNAP ID */
-                                       unsigned char ddp_snap_id[5] = {0x08, 0x00, 0x07, 0x80, 0x9B};  /*  Apple Talk DDP SNAP ID */
-
-                                       framePtr += 3;  /*  eliminate the 802.2 header */
-
-                                       if (!memcmp(ipx_snap_id, framePtr, 5)) {
-                                               framePtr += 5;  /*  eliminate the SNAP header */
-
-                                               DEBUG_INFO("NAT25: Protocol = IPX (Ethernet SNAP)\n");
-                                               ipx = (struct ipxhdr *)framePtr;
-                                       } else if (!memcmp(aarp_snap_id, framePtr, 5)) {
-                                               framePtr += 5;  /*  eliminate the SNAP header */
-
-                                               ea = (struct elapaarp *)framePtr;
-                                       } else if (!memcmp(ddp_snap_id, framePtr, 5)) {
-                                               framePtr += 5;  /*  eliminate the SNAP header */
-
-                                               ddp = (struct ddpehdr *)framePtr;
-                                       } else {
-                                               DEBUG_WARN("NAT25: Protocol = Ethernet SNAP %02x%02x%02x%02x%02x\n", framePtr[0],
-                                                       framePtr[1], framePtr[2], framePtr[3], framePtr[4]);
-                                               return -1;
-                                       }
-                               } else if (*framePtr == ipx_8022_type) {
-                                       framePtr += 3;  /*  eliminate the 802.2 header */
-
-                                       if (!memcmp(ipx_header, framePtr, 2)) {
-                                               DEBUG_INFO("NAT25: Protocol = IPX (Ethernet 802.2)\n");
-                                               ipx = (struct ipxhdr *)framePtr;
-                                       } else {
-                                               return -1;
-                                       }
-                               } else {
-                                       return -1;
-                               }
-                       }
-               } else {
-                       return -1;
-               }
-
-               /*   IPX   */
-               if (ipx != NULL) {
-                       switch (method) {
-                       case NAT25_CHECK:
-                               if (!memcmp(skb->data+ETH_ALEN, ipx->ipx_source.node, ETH_ALEN))
-                                       DEBUG_INFO("NAT25: Check IPX skb_copy\n");
-                               return 0;
-                       case NAT25_INSERT:
-                               DEBUG_INFO("NAT25: Insert IPX, Dest =%08x,%02x%02x%02x%02x%02x%02x,%04x Source =%08x,%02x%02x%02x%02x%02x%02x,%04x\n",
-                                       ipx->ipx_dest.net,
-                                       ipx->ipx_dest.node[0],
-                                       ipx->ipx_dest.node[1],
-                                       ipx->ipx_dest.node[2],
-                                       ipx->ipx_dest.node[3],
-                                       ipx->ipx_dest.node[4],
-                                       ipx->ipx_dest.node[5],
-                                       ipx->ipx_dest.sock,
-                                       ipx->ipx_source.net,
-                                       ipx->ipx_source.node[0],
-                                       ipx->ipx_source.node[1],
-                                       ipx->ipx_source.node[2],
-                                       ipx->ipx_source.node[3],
-                                       ipx->ipx_source.node[4],
-                                       ipx->ipx_source.node[5],
-                                       ipx->ipx_source.sock);
-
-                               if (!memcmp(skb->data+ETH_ALEN, ipx->ipx_source.node, ETH_ALEN)) {
-                                       DEBUG_INFO("NAT25: Use IPX Net, and Socket as network addr\n");
-
-                                       __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_source.net, &ipx->ipx_source.sock);
-
-                                       /*  change IPX source node addr to wlan STA address */
-                                       memcpy(ipx->ipx_source.node, GET_MY_HWADDR(priv), ETH_ALEN);
-                               } else {
-                                       __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_source.net, ipx->ipx_source.node);
-                               }
-                               __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-                               __nat25_db_print(priv);
-                               return 0;
-                       case NAT25_LOOKUP:
-                               if (!memcmp(GET_MY_HWADDR(priv), ipx->ipx_dest.node, ETH_ALEN)) {
-                                       DEBUG_INFO("NAT25: Lookup IPX, Modify Destination IPX Node addr\n");
-
-                                       __nat25_generate_ipx_network_addr_with_socket(networkAddr, &ipx->ipx_dest.net, &ipx->ipx_dest.sock);
-
-                                       __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-
-                                       /*  replace IPX destination node addr with Lookup destination MAC addr */
-                                       memcpy(ipx->ipx_dest.node, skb->data, ETH_ALEN);
-                               } else {
-                                       __nat25_generate_ipx_network_addr_with_node(networkAddr, &ipx->ipx_dest.net, ipx->ipx_dest.node);
-
-                                       __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-                               }
-                               return 0;
-                       default:
-                               return -1;
-                       }
-               } else if (ea != NULL) {
-                       /* Sanity check fields. */
-                       if (ea->hw_len != ETH_ALEN || ea->pa_len != AARP_PA_ALEN) {
-                               DEBUG_WARN("NAT25: Appletalk AARP Sanity check fail!\n");
-                               return -1;
-                       }
-
-                       switch (method) {
-                       case NAT25_CHECK:
-                               return 0;
-                       case NAT25_INSERT:
-                               /*  change to AARP source mac address to wlan STA address */
-                               memcpy(ea->hw_src, GET_MY_HWADDR(priv), ETH_ALEN);
-
-                               DEBUG_INFO("NAT25: Insert AARP, Source =%d,%d Destination =%d,%d\n",
-                                       ea->pa_src_net,
-                                       ea->pa_src_node,
-                                       ea->pa_dst_net,
-                                       ea->pa_dst_node);
-
-                               __nat25_generate_apple_network_addr(networkAddr, &ea->pa_src_net, &ea->pa_src_node);
-
-                               __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-
-                               __nat25_db_print(priv);
-                               return 0;
-                       case NAT25_LOOKUP:
-                               DEBUG_INFO("NAT25: Lookup AARP, Source =%d,%d Destination =%d,%d\n",
-                                       ea->pa_src_net,
-                                       ea->pa_src_node,
-                                       ea->pa_dst_net,
-                                       ea->pa_dst_node);
-
-                               __nat25_generate_apple_network_addr(networkAddr, &ea->pa_dst_net, &ea->pa_dst_node);
-
-                               __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-
-                               /*  change to AARP destination mac address to Lookup result */
-                               memcpy(ea->hw_dst, skb->data, ETH_ALEN);
-                               return 0;
-                       default:
-                               return -1;
-                       }
-               } else if (ddp != NULL) {
-                       switch (method) {
-                       case NAT25_CHECK:
-                               return -1;
-                       case NAT25_INSERT:
-                               DEBUG_INFO("NAT25: Insert DDP, Source =%d,%d Destination =%d,%d\n",
-                                       ddp->deh_snet,
-                                       ddp->deh_snode,
-                                       ddp->deh_dnet,
-                                       ddp->deh_dnode);
-
-                               __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_snet, &ddp->deh_snode);
-
-                               __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-
-                               __nat25_db_print(priv);
-                               return 0;
-                       case NAT25_LOOKUP:
-                               DEBUG_INFO("NAT25: Lookup DDP, Source =%d,%d Destination =%d,%d\n",
-                                       ddp->deh_snet,
-                                       ddp->deh_snode,
-                                       ddp->deh_dnet,
-                                       ddp->deh_dnode);
-                               __nat25_generate_apple_network_addr(networkAddr, &ddp->deh_dnet, &ddp->deh_dnode);
-                               __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-                               return 0;
-                       default:
-                               return -1;
-                       }
-               }
-
-               return -1;
-       } else if ((protocol == ETH_P_PPP_DISC) ||
-                  (protocol == ETH_P_PPP_SES)) {
-               /*---------------------------------------------------*/
-               /*                Handle PPPoE frame                 */
-               /*---------------------------------------------------*/
-               struct pppoe_hdr *ph = (struct pppoe_hdr *)(skb->data + ETH_HLEN);
-               __be16 *pMagic;
-
-               switch (method) {
-               case NAT25_CHECK:
-                       if (ph->sid == 0)
-                               return 0;
-                       return 1;
-               case NAT25_INSERT:
-                       if (ph->sid == 0) {     /*  Discovery phase according to tag */
-                               if (ph->code == PADI_CODE || ph->code == PADR_CODE) {
-                                       if (priv->ethBrExtInfo.addPPPoETag) {
-                                               struct pppoe_tag *tag, *pOldTag;
-                                               unsigned char tag_buf[40];
-                                               int old_tag_len = 0;
-
-                                               tag = (struct pppoe_tag *)tag_buf;
-                                               pOldTag = (struct pppoe_tag *)__nat25_find_pppoe_tag(ph, ntohs(PTT_RELAY_SID));
-                                               if (pOldTag) { /*  if SID existed, copy old value and delete it */
-                                                       old_tag_len = ntohs(pOldTag->tag_len);
-                                                       if (old_tag_len+TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN > sizeof(tag_buf)) {
-                                                               DEBUG_ERR("SID tag length too long!\n");
-                                                               return -1;
-                                                       }
-
-                                                       memcpy(tag->tag_data+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN,
-                                                               pOldTag->tag_data, old_tag_len);
-
-                                                       if (skb_pull_and_merge(skb, (unsigned char *)pOldTag, TAG_HDR_LEN+old_tag_len) < 0) {
-                                                               DEBUG_ERR("call skb_pull_and_merge() failed in PADI/R packet!\n");
-                                                               return -1;
-                                                       }
-                                                       ph->length = htons(ntohs(ph->length)-TAG_HDR_LEN-old_tag_len);
-                                               }
-
-                                               tag->tag_type = PTT_RELAY_SID;
-                                               tag->tag_len = htons(MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN+old_tag_len);
-
-                                               /*  insert the magic_code+client mac in relay tag */
-                                               pMagic = (__be16 *)tag->tag_data;
-                                               *pMagic = htons(MAGIC_CODE);
-                                               memcpy(tag->tag_data+MAGIC_CODE_LEN, skb->data+ETH_ALEN, ETH_ALEN);
-
-                                               /* Add relay tag */
-                                               if (__nat25_add_pppoe_tag(skb, tag) < 0)
-                                                       return -1;
-
-                                               DEBUG_INFO("NAT25: Insert PPPoE, forward %s packet\n",
-                                                                               (ph->code == PADI_CODE ? "PADI" : "PADR"));
-                                       } else { /*  not add relay tag */
-                                               if (priv->pppoe_connection_in_progress &&
-                                                               memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN))  {
-                                                       DEBUG_ERR("Discard PPPoE packet due to another PPPoE connection is in progress!\n");
-                                                       return -2;
-                                               }
-
-                                               if (priv->pppoe_connection_in_progress == 0)
-                                                       memcpy(priv->pppoe_addr, skb->data+ETH_ALEN, ETH_ALEN);
-
-                                               priv->pppoe_connection_in_progress = WAIT_TIME_PPPOE;
-                                       }
-                               } else {
-                                       return -1;
-                               }
-                       } else {        /*  session phase */
-                               DEBUG_INFO("NAT25: Insert PPPoE, insert session packet to %s\n", skb->dev->name);
-
-                               __nat25_generate_pppoe_network_addr(networkAddr, skb->data, &(ph->sid));
-
-                               __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-
-                               __nat25_db_print(priv);
-
-                               if (!priv->ethBrExtInfo.addPPPoETag &&
-                                   priv->pppoe_connection_in_progress &&
-                                   !memcmp(skb->data+ETH_ALEN, priv->pppoe_addr, ETH_ALEN))
-                                       priv->pppoe_connection_in_progress = 0;
-                       }
-                       return 0;
-               case NAT25_LOOKUP:
-                       if (ph->code == PADO_CODE || ph->code == PADS_CODE) {
-                               if (priv->ethBrExtInfo.addPPPoETag) {
-                                       struct pppoe_tag *tag;
-                                       unsigned char *ptr;
-                                       unsigned short tagType, tagLen;
-                                       int offset = 0;
-
-                                       ptr = __nat25_find_pppoe_tag(ph, ntohs(PTT_RELAY_SID));
-                                       if (ptr == NULL) {
-                                               DEBUG_ERR("Fail to find PTT_RELAY_SID in FADO!\n");
-                                               return -1;
-                                       }
-
-                                       tag = (struct pppoe_tag *)ptr;
-                                       tagType = (unsigned short)((ptr[0] << 8) + ptr[1]);
-                                       tagLen = (unsigned short)((ptr[2] << 8) + ptr[3]);
-
-                                       if ((tagType != ntohs(PTT_RELAY_SID)) || (tagLen < (MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN))) {
-                                               DEBUG_ERR("Invalid PTT_RELAY_SID tag length [%d]!\n", tagLen);
-                                               return -1;
-                                       }
-
-                                       pMagic = (__be16 *)tag->tag_data;
-                                       if (ntohs(*pMagic) != MAGIC_CODE) {
-                                               DEBUG_ERR("Can't find MAGIC_CODE in %s packet!\n",
-                                                       (ph->code == PADO_CODE ? "PADO" : "PADS"));
-                                               return -1;
-                                       }
-
-                                       memcpy(skb->data, tag->tag_data+MAGIC_CODE_LEN, ETH_ALEN);
-
-                                       if (tagLen > MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN)
-                                               offset = TAG_HDR_LEN;
-
-                                       if (skb_pull_and_merge(skb, ptr+offset, TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN-offset) < 0) {
-                                               DEBUG_ERR("call skb_pull_and_merge() failed in PADO packet!\n");
-                                               return -1;
-                                       }
-                                       ph->length = htons(ntohs(ph->length)-(TAG_HDR_LEN+MAGIC_CODE_LEN+RTL_RELAY_TAG_LEN-offset));
-                                       if (offset > 0)
-                                               tag->tag_len = htons(tagLen-MAGIC_CODE_LEN-RTL_RELAY_TAG_LEN);
-
-                                       DEBUG_INFO("NAT25: Lookup PPPoE, forward %s Packet from %s\n",
-                                               (ph->code == PADO_CODE ? "PADO" : "PADS"),      skb->dev->name);
-                               } else { /*  not add relay tag */
-                                       if (!priv->pppoe_connection_in_progress) {
-                                               DEBUG_ERR("Discard PPPoE packet due to no connection in progress!\n");
-                                               return -1;
-                                       }
-                                       memcpy(skb->data, priv->pppoe_addr, ETH_ALEN);
-                                       priv->pppoe_connection_in_progress = WAIT_TIME_PPPOE;
-                               }
-                       } else {
-                               if (ph->sid != 0) {
-                                       DEBUG_INFO("NAT25: Lookup PPPoE, lookup session packet from %s\n", skb->dev->name);
-                                       __nat25_generate_pppoe_network_addr(networkAddr, skb->data+ETH_ALEN, &(ph->sid));
-                                       __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-                                       __nat25_db_print(priv);
-                               } else {
-                                       return -1;
-                               }
-                       }
-                       return 0;
-               default:
-                       return -1;
-               }
-       } else if (protocol == 0x888e) {
-               /*---------------------------------------------------*/
-               /*                 Handle EAP frame                  */
-               /*---------------------------------------------------*/
-               switch (method) {
-               case NAT25_CHECK:
-                       return -1;
-               case NAT25_INSERT:
-                       return 0;
-               case NAT25_LOOKUP:
-                       return 0;
-               default:
-                       return -1;
-               }
-       } else if ((protocol == 0xe2ae) || (protocol == 0xe2af)) {
-               /*---------------------------------------------------*/
-               /*         Handle C-Media proprietary frame          */
-               /*---------------------------------------------------*/
-               switch (method) {
-               case NAT25_CHECK:
-                       return -1;
-               case NAT25_INSERT:
-                       return 0;
-               case NAT25_LOOKUP:
-                       return 0;
-               default:
-                       return -1;
-               }
-       } else if (protocol == ETH_P_IPV6) {
-               /*------------------------------------------------*/
-               /*         Handle IPV6 frame                      */
-               /*------------------------------------------------*/
-               struct ipv6hdr *iph = (struct ipv6hdr *)(skb->data + ETH_HLEN);
-
-               if (sizeof(*iph) >= (skb->len - ETH_HLEN)) {
-                       DEBUG_WARN("NAT25: malformed IPv6 packet !\n");
-                       return -1;
-               }
-
-               switch (method) {
-               case NAT25_CHECK:
-                       if (skb->data[0] & 1)
-                               return 0;
-                       return -1;
-               case NAT25_INSERT:
-                       DEBUG_INFO("NAT25: Insert IP, SA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x,"
-                                                       " DA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
-                               iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16[2], iph->saddr.s6_addr16[3],
-                               iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16[6], iph->saddr.s6_addr16[7],
-                               iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3],
-                               iph->daddr.s6_addr16[4], iph->daddr.s6_addr16[5], iph->daddr.s6_addr16[6], iph->daddr.s6_addr16[7]);
-
-                       if (memcmp(&iph->saddr, "\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0\x0", 16)) {
-                               __nat25_generate_ipv6_network_addr(networkAddr, (__be32 *)&iph->saddr);
-                               __nat25_db_network_insert(priv, skb->data+ETH_ALEN, networkAddr);
-                               __nat25_db_print(priv);
-
-                               if (iph->nexthdr == IPPROTO_ICMPV6 &&
-                                               skb->len > (ETH_HLEN +  sizeof(*iph) + 4)) {
-                                       if (update_nd_link_layer_addr(skb->data + ETH_HLEN + sizeof(*iph),
-                                                                     skb->len - ETH_HLEN - sizeof(*iph), GET_MY_HWADDR(priv))) {
-                                               struct icmp6hdr  *hdr = (struct icmp6hdr *)(skb->data + ETH_HLEN + sizeof(*iph));
-                                               hdr->icmp6_cksum = 0;
-                                               hdr->icmp6_cksum = csum_ipv6_magic(&iph->saddr, &iph->daddr,
-                                                                               be16_to_cpu(iph->payload_len),
-                                                                               IPPROTO_ICMPV6,
-                                                                               csum_partial((__u8 *)hdr,
-                                                                               be16_to_cpu(iph->payload_len), 0));
-                                       }
-                               }
-                       }
-                       return 0;
-               case NAT25_LOOKUP:
-                       DEBUG_INFO("NAT25: Lookup IP, SA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x, DA =%4x:%4x:%4x:%4x:%4x:%4x:%4x:%4x\n",
-                                  iph->saddr.s6_addr16[0], iph->saddr.s6_addr16[1], iph->saddr.s6_addr16[2], iph->saddr.s6_addr16[3],
-                                  iph->saddr.s6_addr16[4], iph->saddr.s6_addr16[5], iph->saddr.s6_addr16[6], iph->saddr.s6_addr16[7],
-                                  iph->daddr.s6_addr16[0], iph->daddr.s6_addr16[1], iph->daddr.s6_addr16[2], iph->daddr.s6_addr16[3],
-                                  iph->daddr.s6_addr16[4], iph->daddr.s6_addr16[5], iph->daddr.s6_addr16[6], iph->daddr.s6_addr16[7]);
-                       __nat25_generate_ipv6_network_addr(networkAddr, (__be32 *)&iph->daddr);
-                       __nat25_db_network_lookup_and_replace(priv, skb, networkAddr);
-                       return 0;
-               default:
-                       return -1;
-               }
-       }
-       return -1;
-}
-
-int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb)
-{
-       if (!(skb->data[0] & 1)) {
-               int is_vlan_tag = 0, i, retval = 0;
-               unsigned short vlan_hdr = 0;
-               unsigned short protocol;
-
-               protocol = be16_to_cpu(*((__be16 *)(skb->data + 2 * ETH_ALEN)));
-               if (protocol == ETH_P_8021Q) {
-                       is_vlan_tag = 1;
-                       vlan_hdr = *((unsigned short *)(skb->data+ETH_ALEN*2+2));
-                       for (i = 0; i < 6; i++)
-                               *((unsigned short *)(skb->data+ETH_ALEN*2+2-i*2)) = *((unsigned short *)(skb->data+ETH_ALEN*2-2-i*2));
-                       skb_pull(skb, 4);
-               }
-
-               if (!priv->ethBrExtInfo.nat25_disable) {
-                       spin_lock_bh(&priv->br_ext_lock);
-                       /*
-                        *      This function look up the destination network address from
-                        *      the NAT2.5 database. Return value = -1 means that the
-                        *      corresponding network protocol is NOT support.
-                        */
-                       if (!priv->ethBrExtInfo.nat25sc_disable &&
-                           (be16_to_cpu(*((__be16 *)(skb->data+ETH_ALEN*2))) == ETH_P_IP) &&
-                           !memcmp(priv->scdb_ip, skb->data+ETH_HLEN+16, 4)) {
-                               memcpy(skb->data, priv->scdb_mac, ETH_ALEN);
-
-                               spin_unlock_bh(&priv->br_ext_lock);
-                       } else {
-                               spin_unlock_bh(&priv->br_ext_lock);
-
-                               retval = nat25_db_handle(priv, skb, NAT25_LOOKUP);
-                       }
-               } else {
-                       if (((be16_to_cpu(*((__be16 *)(skb->data+ETH_ALEN*2))) == ETH_P_IP) &&
-                           !memcmp(priv->br_ip, skb->data+ETH_HLEN+16, 4)) ||
-                           ((be16_to_cpu(*((__be16 *)(skb->data+ETH_ALEN*2))) == ETH_P_ARP) &&
-                           !memcmp(priv->br_ip, skb->data+ETH_HLEN+24, 4))) {
-                               /*  for traffic to upper TCP/IP */
-                               retval = nat25_db_handle(priv, skb, NAT25_LOOKUP);
-                       }
-               }
-
-               if (is_vlan_tag) {
-                       skb_push(skb, 4);
-                       for (i = 0; i < 6; i++)
-                               *((unsigned short *)(skb->data+i*2)) = *((unsigned short *)(skb->data+4+i*2));
-                       *((__be16 *)(skb->data+ETH_ALEN*2)) = __constant_htons(ETH_P_8021Q);
-                       *((unsigned short *)(skb->data+ETH_ALEN*2+2)) = vlan_hdr;
-               }
-
-               if (retval == -1) {
-                       /* DEBUG_ERR("NAT25: Lookup fail!\n"); */
-                       return -1;
-               }
-       }
-
-       return 0;
-}
-
-#define SERVER_PORT                    67
-#define CLIENT_PORT                    68
-#define DHCP_MAGIC                     0x63825363
-#define BROADCAST_FLAG         0x8000
-
-struct dhcpMessage {
-       u_int8_t op;
-       u_int8_t htype;
-       u_int8_t hlen;
-       u_int8_t hops;
-       __be32 xid;
-       __be16 secs;
-       __be16 flags;
-       __be32 ciaddr;
-       __be32 yiaddr;
-       __be32 siaddr;
-       __be32 giaddr;
-       u_int8_t chaddr[16];
-       u_int8_t sname[64];
-       u_int8_t file[128];
-       __be32 cookie;
-       u_int8_t options[308]; /* 312 - cookie */
-};
-
-void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb)
-{
-       if (skb == NULL)
-               return;
-
-       if (!priv->ethBrExtInfo.dhcp_bcst_disable) {
-               __be16 protocol = *((__be16 *)(skb->data + 2 * ETH_ALEN));
-
-               if (protocol == __constant_htons(ETH_P_IP)) { /*  IP */
-                       struct iphdr *iph = (struct iphdr *)(skb->data + ETH_HLEN);
-
-                       if (iph->protocol == IPPROTO_UDP) { /*  UDP */
-                               struct udphdr *udph = (struct udphdr *)((size_t)iph + (iph->ihl << 2));
-
-                               if ((udph->source == __constant_htons(CLIENT_PORT)) &&
-                                   (udph->dest == __constant_htons(SERVER_PORT))) { /*  DHCP request */
-                                       struct dhcpMessage *dhcph =
-                                               (struct dhcpMessage *)((size_t)udph + sizeof(struct udphdr));
-                                       u32 cookie = be32_to_cpu((__be32)dhcph->cookie);
-
-                                       if (cookie == DHCP_MAGIC) { /*  match magic word */
-                                               if (!(dhcph->flags & htons(BROADCAST_FLAG))) {
-                                                       /*  if not broadcast */
-                                                       register int sum = 0;
-
-                                                       DEBUG_INFO("DHCP: change flag of DHCP request to broadcast.\n");
-                                                       /*  or BROADCAST flag */
-                                                       dhcph->flags |= htons(BROADCAST_FLAG);
-                                                       /*  recalculate checksum */
-                                                       sum = ~(udph->check) & 0xffff;
-                                                       sum += be16_to_cpu(dhcph->flags);
-                                                       while (sum >> 16)
-                                                               sum = (sum & 0xffff) + (sum >> 16);
-                                                       udph->check = ~sum;
-                                               }
-                                       }
-                               }
-                       }
-               }
-       }
-}
-
-
-void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
-                               unsigned char *ipAddr)
-{
-       unsigned char networkAddr[MAX_NETWORK_ADDR_LEN];
-       struct nat25_network_db_entry *db;
-       int hash;
-
-       __nat25_generate_ipv4_network_addr(networkAddr, (unsigned int *)ipAddr);
-       hash = __nat25_network_hash(networkAddr);
-       db = priv->nethash[hash];
-       while (db != NULL) {
-               if (!memcmp(db->networkAddr, networkAddr, MAX_NETWORK_ADDR_LEN))
-                       return (void *)db;
-
-               db = db->next_hash;
-       }
-
-       return NULL;
-}
index 1e0b8b49fc1270c0073a440f1b282a4e89ff1b2f..aeaa873bfeb1c500edcff29b12e7ed9cec5afb0c 100644 (file)
@@ -24,7 +24,6 @@
 #include <recv_osdep.h>
 #include <cmd_osdep.h>
 #include <mlme_osdep.h>
-#include <rtw_br_ext.h>
 #include <rtw_mlme_ext.h>
 
 /*
@@ -48,7 +47,7 @@ int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 
        pcmdpriv->cmd_seq = 1;
 
-       pcmdpriv->cmd_allocated_buf = rtw_zmalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ);
+       pcmdpriv->cmd_allocated_buf = kzalloc(MAX_CMDSZ + CMDBUFF_ALIGN_SZ, GFP_KERNEL);
 
        if (pcmdpriv->cmd_allocated_buf == NULL) {
                res = _FAIL;
@@ -57,7 +56,7 @@ int _rtw_init_cmd_priv(struct cmd_priv *pcmdpriv)
 
        pcmdpriv->cmd_buf = pcmdpriv->cmd_allocated_buf  +  CMDBUFF_ALIGN_SZ - ((size_t)(pcmdpriv->cmd_allocated_buf) & (CMDBUFF_ALIGN_SZ-1));
 
-       pcmdpriv->rsp_allocated_buf = rtw_zmalloc(MAX_RSPSZ + 4);
+       pcmdpriv->rsp_allocated_buf = kzalloc(MAX_RSPSZ + 4, GFP_KERNEL);
 
        if (pcmdpriv->rsp_allocated_buf == NULL) {
                res = _FAIL;
@@ -97,7 +96,7 @@ void rtw_free_evt_priv(struct evt_priv *pevtpriv)
 
        RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("+rtw_free_evt_priv\n"));
 
-       _cancel_workitem_sync(&pevtpriv->c2h_wk);
+       cancel_work_sync(&pevtpriv->c2h_wk);
        while (pevtpriv->c2h_wk_alive)
                msleep(10);
 
@@ -139,7 +138,7 @@ int _rtw_enqueue_cmd(struct __queue *queue, struct cmd_obj *obj)
 
        spin_lock_irqsave(&queue->lock, irqL);
 
-       rtw_list_insert_tail(&obj->list, &queue->queue);
+       list_add_tail(&obj->list, &queue->queue);
 
        spin_unlock_irqrestore(&queue->lock, irqL);
 
@@ -156,11 +155,11 @@ struct    cmd_obj *_rtw_dequeue_cmd(struct __queue *queue)
 
 
        spin_lock_irqsave(&queue->lock, irqL);
-       if (rtw_is_list_empty(&(queue->queue))) {
+       if (list_empty(&(queue->queue))) {
                obj = NULL;
        } else {
                obj = container_of((&queue->queue)->next, struct cmd_obj, list);
-               rtw_list_delete(&obj->list);
+               list_del_init(&obj->list);
        }
 
        spin_unlock_irqrestore(&queue->lock, irqL);
@@ -286,8 +285,7 @@ int rtw_cmd_thread(void *context)
        struct adapter *padapter = (struct adapter *)context;
        struct cmd_priv *pcmdpriv = &(padapter->cmdpriv);
 
-
-       thread_enter("RTW_CMD_THREAD");
+       allow_signal(SIGTERM);
 
        pcmdbuf = pcmdpriv->cmd_buf;
 
@@ -325,7 +323,7 @@ _next:
 
                pcmdpriv->cmd_issued_cnt++;
 
-               pcmd->cmdsz = _RND4((pcmd->cmdsz));/* _RND4 */
+               pcmd->cmdsz = round_up(pcmd->cmdsz, 4);
 
                memcpy(pcmdbuf, pcmd->parmbuf, pcmd->cmdsz);
 
@@ -361,7 +359,8 @@ post_process:
                        rtw_free_cmd_obj(pcmd);
                }
 
-               flush_signals_thread();
+               if (signal_pending(current))
+                       flush_signals(current);
 
                goto _next;
        }
@@ -438,11 +437,11 @@ u8 rtw_sitesurvey_cmd(struct adapter  *padapter, struct ndis_802_11_ssid *ssid,
        if (check_fwstate(pmlmepriv, _FW_LINKED) == true)
                p2p_ps_wk_cmd(padapter, P2P_PS_SCAN, 1);
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL)
                return _FAIL;
 
-       psurveyPara = (struct sitesurvey_parm *)rtw_zmalloc(sizeof(struct sitesurvey_parm));
+       psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_KERNEL);
        if (psurveyPara == NULL) {
                kfree(ph2c);
                return _FAIL;
@@ -507,13 +506,13 @@ u8 rtw_setdatarate_cmd(struct adapter *padapter, u8 *rateset)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pbsetdataratepara = (struct setdatarate_parm *)rtw_zmalloc(sizeof(struct setdatarate_parm));
+       pbsetdataratepara = kzalloc(sizeof(struct setdatarate_parm), GFP_KERNEL);
        if (pbsetdataratepara == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -538,12 +537,12 @@ u8 rtw_setbasicrate_cmd(struct adapter *padapter, u8 *rateset)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
-       pssetbasicratepara = (struct setbasicrate_parm *)rtw_zmalloc(sizeof(struct setbasicrate_parm));
+       pssetbasicratepara = kzalloc(sizeof(struct setbasicrate_parm), GFP_KERNEL);
 
        if (pssetbasicratepara == NULL) {
                kfree(ph2c);
@@ -578,12 +577,12 @@ u8 rtw_setphy_cmd(struct adapter *padapter, u8 modem, u8 ch)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
                }
-       psetphypara = (struct setphy_parm *)rtw_zmalloc(sizeof(struct setphy_parm));
+       psetphypara = kzalloc(sizeof(struct setphy_parm), GFP_KERNEL);
 
        if (psetphypara == NULL) {
                kfree(ph2c);
@@ -610,12 +609,12 @@ u8 rtw_setbbreg_cmd(struct adapter *padapter, u8 offset, u8 val)
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
                }
-       pwritebbparm = (struct writeBB_parm *)rtw_zmalloc(sizeof(struct writeBB_parm));
+       pwritebbparm = kzalloc(sizeof(struct writeBB_parm), GFP_KERNEL);
 
        if (pwritebbparm == NULL) {
                kfree(ph2c);
@@ -640,19 +639,19 @@ u8 rtw_getbbreg_cmd(struct adapter  *padapter, u8 offset, u8 *pval)
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
                }
-       prdbbparm = (struct readBB_parm *)rtw_zmalloc(sizeof(struct readBB_parm));
+       prdbbparm = kzalloc(sizeof(struct readBB_parm), GFP_KERNEL);
 
        if (prdbbparm == NULL) {
                kfree(ph2c);
                return _FAIL;
        }
 
-       _rtw_init_listhead(&ph2c->list);
+       INIT_LIST_HEAD(&ph2c->list);
        ph2c->cmdcode = GEN_CMD_CODE(_GetBBReg);
        ph2c->parmbuf = (unsigned char *)prdbbparm;
        ph2c->cmdsz =  sizeof(struct readBB_parm);
@@ -672,12 +671,12 @@ u8 rtw_setrfreg_cmd(struct adapter  *padapter, u8 offset, u32 val)
        struct writeRF_parm *pwriterfparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
-       pwriterfparm = (struct writeRF_parm *)rtw_zmalloc(sizeof(struct writeRF_parm));
+       pwriterfparm = kzalloc(sizeof(struct writeRF_parm), GFP_KERNEL);
 
        if (pwriterfparm == NULL) {
                kfree(ph2c);
@@ -703,20 +702,20 @@ u8 rtw_getrfreg_cmd(struct adapter  *padapter, u8 offset, u8 *pval)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       prdrfparm = (struct readRF_parm *)rtw_zmalloc(sizeof(struct readRF_parm));
+       prdrfparm = kzalloc(sizeof(struct readRF_parm), GFP_KERNEL);
        if (prdrfparm == NULL) {
                kfree(ph2c);
                res = _FAIL;
                goto exit;
        }
 
-       _rtw_init_listhead(&ph2c->list);
+       INIT_LIST_HEAD(&ph2c->list);
        ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg);
        ph2c->parmbuf = (unsigned char *)prdrfparm;
        ph2c->cmdsz =  sizeof(struct readRF_parm);
@@ -769,13 +768,13 @@ u8 rtw_createbss_cmd(struct adapter  *padapter)
        else
                RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, (" createbss for SSid:%s\n", pmlmepriv->assoc_ssid.Ssid));
 
-       pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       _rtw_init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        pcmd->cmdcode = _CreateBss_CMD_;
        pcmd->parmbuf = (unsigned char *)pdev_network;
        pcmd->cmdsz = get_wlan_bssid_ex_sz((struct wlan_bssid_ex *)pdev_network);
@@ -796,13 +795,13 @@ u8 rtw_createbss_cmd_ex(struct adapter  *padapter, unsigned char *pbss, unsigned
        u8      res = _SUCCESS;
 
 
-       pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       _rtw_init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        pcmd->cmdcode = GEN_CMD_CODE(_CreateBss);
        pcmd->parmbuf = pbss;
        pcmd->cmdsz =  sz;
@@ -841,7 +840,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
        else
                RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+Join cmd: SSid =[%s]\n", pmlmepriv->assoc_ssid.Ssid));
 
-       pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd == NULL) {
                res = _FAIL;
                RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("rtw_joinbss_cmd: memory allocate for cmd_obj fail!!!\n"));
@@ -879,7 +878,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
                goto exit;
        }
 
-       _rtw_memset(psecnetwork, 0, t_len);
+       memset(psecnetwork, 0, t_len);
 
        memcpy(psecnetwork, &pnetwork->network, get_wlan_bssid_ex_sz(&pnetwork->network));
 
@@ -945,7 +944,7 @@ u8 rtw_joinbss_cmd(struct adapter  *padapter, struct wlan_network *pnetwork)
 
        pcmd->cmdsz = get_wlan_bssid_ex_sz(psecnetwork);/* get cmdsz before endian conversion */
 
-       _rtw_init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        pcmd->cmdcode = _JoinBss_CMD_;/* GEN_CMD_CODE(_JoinBss) */
        pcmd->parmbuf = (unsigned char *)psecnetwork;
        pcmd->rsp = NULL;
@@ -970,7 +969,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
        RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_disassoc_cmd\n"));
 
        /* prepare cmd parameter */
-       param = (struct disconnect_parm *)rtw_zmalloc(sizeof(*param));
+       param = kzalloc(sizeof(*param), GFP_KERNEL);
        if (param == NULL) {
                res = _FAIL;
                goto exit;
@@ -979,7 +978,7 @@ u8 rtw_disassoc_cmd(struct adapter *padapter, u32 deauth_timeout_ms, bool enqueu
 
        if (enqueue) {
                /* need enqueue, prepare cmd_obj and enqueue */
-               cmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(*cmdobj));
+               cmdobj = kzalloc(sizeof(*cmdobj), GFP_KERNEL);
                if (cmdobj == NULL) {
                        res = _FAIL;
                        kfree(param);
@@ -1009,12 +1008,12 @@ u8 rtw_setopmode_cmd(struct adapter  *padapter, enum ndis_802_11_network_infra n
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = false;
                goto exit;
        }
-       psetop = (struct setopmode_parm *)rtw_zmalloc(sizeof(struct setopmode_parm));
+       psetop = kzalloc(sizeof(struct setopmode_parm), GFP_KERNEL);
 
        if (psetop == NULL) {
                kfree(ph2c);
@@ -1046,20 +1045,20 @@ u8 rtw_setstakey_cmd(struct adapter *padapter, u8 *psta, u8 unicast_key)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       psetstakey_para = (struct set_stakey_parm *)rtw_zmalloc(sizeof(struct set_stakey_parm));
+       psetstakey_para = kzalloc(sizeof(struct set_stakey_parm), GFP_KERNEL);
        if (psetstakey_para == NULL) {
                kfree(ph2c);
                res = _FAIL;
                goto exit;
        }
 
-       psetstakey_rsp = (struct set_stakey_rsp *)rtw_zmalloc(sizeof(struct set_stakey_rsp));
+       psetstakey_rsp = kzalloc(sizeof(struct set_stakey_rsp), GFP_KERNEL);
        if (psetstakey_rsp == NULL) {
                kfree(ph2c);
                kfree(psetstakey_para);
@@ -1107,20 +1106,20 @@ u8 rtw_clearstakey_cmd(struct adapter *padapter, u8 *psta, u8 entry, u8 enqueue)
        if (!enqueue) {
                clear_cam_entry(padapter, entry);
        } else {
-               ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (ph2c == NULL) {
                        res = _FAIL;
                        goto exit;
                }
 
-               psetstakey_para = (struct set_stakey_parm *)rtw_zmalloc(sizeof(struct set_stakey_parm));
+               psetstakey_para = kzalloc(sizeof(struct set_stakey_parm), GFP_KERNEL);
                if (psetstakey_para == NULL) {
                        kfree(ph2c);
                        res = _FAIL;
                        goto exit;
                }
 
-               psetstakey_rsp = (struct set_stakey_rsp *)rtw_zmalloc(sizeof(struct set_stakey_rsp));
+               psetstakey_rsp = kzalloc(sizeof(struct set_stakey_rsp), GFP_KERNEL);
                if (psetstakey_rsp == NULL) {
                        kfree(ph2c);
                        kfree(psetstakey_para);
@@ -1153,12 +1152,12 @@ u8 rtw_setrttbl_cmd(struct adapter  *padapter, struct setratable_parm *prate_tab
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
-       psetrttblparm = (struct setratable_parm *)rtw_zmalloc(sizeof(struct setratable_parm));
+       psetrttblparm = kzalloc(sizeof(struct setratable_parm), GFP_KERNEL);
 
        if (psetrttblparm == NULL) {
                kfree(ph2c);
@@ -1182,12 +1181,12 @@ u8 rtw_getrttbl_cmd(struct adapter  *padapter, struct getratable_rsp *pval)
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
-       pgetrttblparm = (struct getratable_parm *)rtw_zmalloc(sizeof(struct getratable_parm));
+       pgetrttblparm = kzalloc(sizeof(struct getratable_parm), GFP_KERNEL);
 
        if (pgetrttblparm == NULL) {
                kfree(ph2c);
@@ -1195,7 +1194,7 @@ u8 rtw_getrttbl_cmd(struct adapter  *padapter, struct getratable_rsp *pval)
                goto exit;
        }
 
-       _rtw_init_listhead(&ph2c->list);
+       INIT_LIST_HEAD(&ph2c->list);
        ph2c->cmdcode = GEN_CMD_CODE(_GetRaTable);
        ph2c->parmbuf = (unsigned char *)pgetrttblparm;
        ph2c->cmdsz =  sizeof(struct getratable_parm);
@@ -1219,20 +1218,20 @@ u8 rtw_setassocsta_cmd(struct adapter  *padapter, u8 *mac_addr)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       psetassocsta_para = (struct set_assocsta_parm *)rtw_zmalloc(sizeof(struct set_assocsta_parm));
+       psetassocsta_para = kzalloc(sizeof(struct set_assocsta_parm), GFP_KERNEL);
        if (psetassocsta_para == NULL) {
                kfree(ph2c);
                res = _FAIL;
                goto exit;
        }
 
-       psetassocsta_rsp = (struct set_stakey_rsp *)rtw_zmalloc(sizeof(struct set_assocsta_rsp));
+       psetassocsta_rsp = kzalloc(sizeof(struct set_assocsta_rsp), GFP_KERNEL);
        if (psetassocsta_rsp == NULL) {
                kfree(ph2c);
                kfree(psetassocsta_para);
@@ -1261,13 +1260,13 @@ u8 rtw_addbareq_cmd(struct adapter *padapter, u8 tid, u8 *addr)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       paddbareq_parm = (struct addBaReq_parm *)rtw_zmalloc(sizeof(struct addBaReq_parm));
+       paddbareq_parm = kzalloc(sizeof(struct addBaReq_parm), GFP_KERNEL);
        if (paddbareq_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -1298,13 +1297,13 @@ u8 rtw_dynamic_chk_wk_cmd(struct adapter *padapter)
        u8      res = _SUCCESS;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+       pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
        if (pdrvextra_cmd_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -1339,7 +1338,7 @@ u8 rtw_set_ch_cmd(struct adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 enque
        /* check input parameter */
 
        /* prepare cmd parameter */
-       set_ch_parm = (struct set_ch_parm *)rtw_zmalloc(sizeof(*set_ch_parm));
+       set_ch_parm = kzalloc(sizeof(*set_ch_parm), GFP_KERNEL);
        if (set_ch_parm == NULL) {
                res = _FAIL;
                goto exit;
@@ -1350,7 +1349,7 @@ u8 rtw_set_ch_cmd(struct adapter *padapter, u8 ch, u8 bw, u8 ch_offset, u8 enque
 
        if (enqueue) {
                /* need enqueue, prepare cmd_obj and enqueue */
-               pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct   cmd_obj));
+               pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (pcmdobj == NULL) {
                        kfree(set_ch_parm);
                        res = _FAIL;
@@ -1395,7 +1394,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue)
        }
 
        /* prepare cmd parameter */
-       setChannelPlan_param = (struct  SetChannelPlan_param *)rtw_zmalloc(sizeof(struct SetChannelPlan_param));
+       setChannelPlan_param = kzalloc(sizeof(struct SetChannelPlan_param), GFP_KERNEL);
        if (setChannelPlan_param == NULL) {
                res = _FAIL;
                goto exit;
@@ -1404,7 +1403,7 @@ u8 rtw_set_chplan_cmd(struct adapter *padapter, u8 chplan, u8 enqueue)
 
        if (enqueue) {
                /* need enqueue, prepare cmd_obj and enqueue */
-               pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct   cmd_obj));
+               pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (pcmdobj == NULL) {
                        kfree(setChannelPlan_param);
                        res = _FAIL;
@@ -1442,13 +1441,13 @@ u8 rtw_set_csa_cmd(struct adapter *padapter, u8 new_ch_no)
 
        RT_TRACE(_module_rtl871x_cmd_c_, _drv_notice_, ("+rtw_set_csa_cmd\n"));
 
-       pcmdobj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct   cmd_obj));
+       pcmdobj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmdobj == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       setChannelSwitch_param = (struct SetChannelSwitch_param *)rtw_zmalloc(sizeof(struct     SetChannelSwitch_param));
+       setChannelSwitch_param = kzalloc(sizeof(struct  SetChannelSwitch_param), GFP_KERNEL);
        if (setChannelSwitch_param == NULL) {
                kfree(pcmdobj);
                res = _FAIL;
@@ -1542,8 +1541,6 @@ static void dynamic_chk_wk_hdl(struct adapter *padapter, u8 *pbuf, int sz)
                expire_timeout_chk(padapter);
 #endif
 
-       rtw_hal_sreset_xmit_status_check(padapter);
-
        linked_status_chk(padapter);
        traffic_status_watchdog(padapter);
 
@@ -1605,13 +1602,13 @@ u8 rtw_lps_ctrl_wk_cmd(struct adapter *padapter, u8 lps_ctrl_type, u8 enqueue)
        u8      res = _SUCCESS;
 
        if (enqueue) {
-               ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (ph2c == NULL) {
                        res = _FAIL;
                        goto exit;
                }
 
-               pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+               pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
                if (pdrvextra_cmd_parm == NULL) {
                        kfree(ph2c);
                        res = _FAIL;
@@ -1648,13 +1645,13 @@ u8 rtw_rpt_timer_cfg_cmd(struct adapter *padapter, u16 min_time)
 
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+       pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
        if (pdrvextra_cmd_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -1690,13 +1687,13 @@ u8 rtw_antenna_select_cmd(struct adapter *padapter, u8 antenna, u8 enqueue)
                return res;
 
        if (enqueue) {
-               ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (ph2c == NULL) {
                        res = _FAIL;
                        goto exit;
                }
 
-               pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+               pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
                if (pdrvextra_cmd_parm == NULL) {
                        kfree(ph2c);
                        res = _FAIL;
@@ -1736,13 +1733,13 @@ u8 p2p_protocol_wk_cmd(struct adapter *padapter, int intCmdType)
        if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
                return res;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+       pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
        if (pdrvextra_cmd_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -1772,13 +1769,13 @@ u8 rtw_ps_cmd(struct adapter *padapter)
 
        u8      res = _SUCCESS;
 
-       ppscmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ppscmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ppscmd == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+       pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
        if (pdrvextra_cmd_parm == NULL) {
                kfree(ppscmd);
                res = _FAIL;
@@ -1846,13 +1843,13 @@ u8 rtw_chk_hi_queue_cmd(struct adapter *padapter)
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+       pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
        if (pdrvextra_cmd_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -1878,13 +1875,13 @@ u8 rtw_c2h_wk_cmd(struct adapter *padapter, u8 *c2h_evt)
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8      res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+       pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
        if (pdrvextra_cmd_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -2061,8 +2058,7 @@ void rtw_disassoc_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 
                RT_TRACE(_module_rtl871x_cmd_c_, _drv_err_, ("\n ***Error: disconnect_cmd_callback Fail ***\n."));
                return;
-       } else /* clear bridge database */
-               nat25_db_cleanup(padapter);
+       }
 
        /*  free cmd */
        rtw_free_cmd_obj(pcmd);
@@ -2088,7 +2084,6 @@ void rtw_joinbss_cmd_callback(struct adapter *padapter,  struct cmd_obj *pcmd)
 
 void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
 {
-       u8 timer_cancelled;
        struct sta_info *psta = NULL;
        struct wlan_network *pwlan = NULL;
        struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -2101,7 +2096,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
                _set_timer(&pmlmepriv->assoc_timer, 1);
        }
 
-       _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled);
+       del_timer_sync(&pmlmepriv->assoc_timer);
 
        spin_lock_bh(&pmlmepriv->lock);
 
@@ -2128,7 +2123,7 @@ void rtw_createbss_cmd_callback(struct adapter *padapter, struct cmd_obj *pcmd)
                        }
                        pwlan->last_scanned = jiffies;
                } else {
-                       rtw_list_insert_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
+                       list_add_tail(&(pwlan->list), &pmlmepriv->scanned_queue.queue);
                }
 
                pnetwork->Length = get_wlan_bssid_ex_sz(pnetwork);
index 2beb2695e0f2ab206b273d717cc7a8384359be7a..1f72f7d8097ead3e44e8d3fd95f08bdfef8a5a58 100644 (file)
@@ -20,7 +20,7 @@
 #define _RTW_DEBUG_C_
 
 #include <rtw_debug.h>
-#include <rtw_version.h>
+#include <usb_ops_linux.h>
 
 int proc_get_drv_version(char *page, char **start,
                          off_t offset, int count,
@@ -64,13 +64,13 @@ int proc_set_write_reg(struct file *file, const char __user *buffer,
                }
                switch (len) {
                case 1:
-                       rtw_write8(padapter, addr, (u8)val);
+                       usb_write8(padapter, addr, (u8)val);
                        break;
                case 2:
-                       rtw_write16(padapter, addr, (u16)val);
+                       usb_write16(padapter, addr, (u16)val);
                        break;
                case 4:
-                       rtw_write32(padapter, addr, val);
+                       usb_write32(padapter, addr, val);
                        break;
                default:
                        DBG_88E("error write length =%d", len);
@@ -99,13 +99,13 @@ int proc_get_read_reg(char *page, char **start,
 
        switch (proc_get_read_len) {
        case 1:
-               len += snprintf(page + len, count - len, "rtw_read8(0x%x)=0x%x\n", proc_get_read_addr, rtw_read8(padapter, proc_get_read_addr));
+               len += snprintf(page + len, count - len, "usb_read8(0x%x)=0x%x\n", proc_get_read_addr, usb_read8(padapter, proc_get_read_addr));
                break;
        case 2:
-               len += snprintf(page + len, count - len, "rtw_read16(0x%x)=0x%x\n", proc_get_read_addr, rtw_read16(padapter, proc_get_read_addr));
+               len += snprintf(page + len, count - len, "usb_read16(0x%x)=0x%x\n", proc_get_read_addr, usb_read16(padapter, proc_get_read_addr));
                break;
        case 4:
-               len += snprintf(page + len, count - len, "rtw_read32(0x%x)=0x%x\n", proc_get_read_addr, rtw_read32(padapter, proc_get_read_addr));
+               len += snprintf(page + len, count - len, "usb_read32(0x%x)=0x%x\n", proc_get_read_addr, usb_read32(padapter, proc_get_read_addr));
                break;
        default:
                len += snprintf(page + len, count - len, "error read length=%d\n", proc_get_read_len);
@@ -327,7 +327,7 @@ int proc_get_mac_reg_dump1(char *page, char **start,
        for (i = 0x0; i < 0x300; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -350,7 +350,7 @@ int proc_get_mac_reg_dump2(char *page, char **start,
        for (i = 0x300; i < 0x600; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -373,7 +373,7 @@ int proc_get_mac_reg_dump3(char *page, char **start,
        for (i = 0x600; i < 0x800; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -395,7 +395,7 @@ int proc_get_bb_reg_dump1(char *page, char **start,
        for (i = 0x800; i < 0xB00; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -416,7 +416,7 @@ int proc_get_bb_reg_dump2(char *page, char **start,
        for (i = 0xB00; i < 0xE00; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -437,7 +437,7 @@ int proc_get_bb_reg_dump3(char *page, char **start,
        for (i = 0xE00; i < 0x1000; i += 4) {
                if (j%4 == 1)
                        len += snprintf(page + len, count - len, "0x%02x", i);
-               len += snprintf(page + len, count - len, " 0x%08x ", rtw_read32(padapter, i));
+               len += snprintf(page + len, count - len, " 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        len += snprintf(page + len, count - len, "\n");
        }
@@ -853,7 +853,7 @@ int proc_get_all_sta_info(char *page, char **start,
                phead = &(pstapriv->sta_hash[i]);
                plist = phead->next;
 
-               while ((rtw_end_of_queue_search(phead, plist)) == false) {
+               while (phead != plist) {
                        psta = container_of(plist, struct sta_info, hash_list);
 
                        plist = plist->next;
index 40afe48a12efad6b360d8cd1524dd6bf819620c5..82a54b56aff6186bff1dd87d401d13dcbe43d777 100644 (file)
 #include <osdep_service.h>
 #include <drv_types.h>
 #include <rtw_efuse.h>
+#include <usb_ops_linux.h>
+#include <rtl8188e_hal.h>
+#include <rtw_iol.h>
 
-
-
-/*------------------------Define local variable------------------------------*/
-u8 fakeEfuseBank;
-u32 fakeEfuseUsedBytes;
-u8 fakeEfuseContent[EFUSE_MAX_HW_SIZE] = {0};
-u8 fakeEfuseInitMap[EFUSE_MAX_MAP_LEN] = {0};
-u8 fakeEfuseModifiedMap[EFUSE_MAX_MAP_LEN] = {0};
-
-u32 BTEfuseUsedBytes;
-u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
-u8 BTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN] = {0};
-u8 BTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
-
-u32 fakeBTEfuseUsedBytes;
-u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
-u8 fakeBTEfuseInitMap[EFUSE_BT_MAX_MAP_LEN] = {0};
-u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN] = {0};
-/*------------------------Define local variable------------------------------*/
-
-/*  */
 #define REG_EFUSE_CTRL         0x0030
 #define EFUSE_CTRL                     REG_EFUSE_CTRL          /*  E-Fuse Control. */
-/*  */
-
-bool
-Efuse_Read1ByteFromFakeContent(
-                       struct adapter *pAdapter,
-                       u16 Offset,
-               u8 *Value);
-bool
-Efuse_Read1ByteFromFakeContent(
-                       struct adapter *pAdapter,
-                       u16 Offset,
-               u8 *Value)
-{
-       if (Offset >= EFUSE_MAX_HW_SIZE)
-               return false;
-       if (fakeEfuseBank == 0)
-               *Value = fakeEfuseContent[Offset];
-       else
-               *Value = fakeBTEfuseContent[fakeEfuseBank-1][Offset];
-       return true;
-}
 
-static bool
-Efuse_Write1ByteToFakeContent(
-                       struct adapter *pAdapter,
-                       u16 Offset,
-                       u8 Value)
-{
-       if (Offset >= EFUSE_MAX_HW_SIZE)
-               return false;
-       if (fakeEfuseBank == 0)
-               fakeEfuseContent[Offset] = Value;
-       else
-               fakeBTEfuseContent[fakeEfuseBank-1][Offset] = Value;
-       return true;
-}
+enum{
+               VOLTAGE_V25                                             = 0x03,
+               LDOE25_SHIFT                                            = 28 ,
+       };
 
-/*-----------------------------------------------------------------------------
+/*
  * Function:   Efuse_PowerSwitch
  *
  * Overview:   When we want to enable write operation, we should change to
  *                             pwr on state. When we stop write, we should switch to 500k mode
  *                             and disable LDO 2.5V.
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/17/2008  MHC             Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-void
-Efuse_PowerSwitch(
+ */
+
+void Efuse_PowerSwitch(
                struct adapter *pAdapter,
-               u8 write,
+               u8 bWrite,
                u8 PwrState)
 {
-       pAdapter->HalFunc.EfusePowerSwitch(pAdapter, write, PwrState);
+       u8 tempval;
+       u16     tmpV16;
+
+       if (PwrState) {
+               usb_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON);
+
+               /*  1.2V Power: From VDDON with Power Cut(0x0000h[15]), defualt valid */
+               tmpV16 = usb_read16(pAdapter, REG_SYS_ISO_CTRL);
+               if (!(tmpV16 & PWC_EV12V)) {
+                       tmpV16 |= PWC_EV12V;
+                        usb_write16(pAdapter, REG_SYS_ISO_CTRL, tmpV16);
+               }
+               /*  Reset: 0x0000h[28], default valid */
+               tmpV16 =  usb_read16(pAdapter, REG_SYS_FUNC_EN);
+               if (!(tmpV16 & FEN_ELDR)) {
+                       tmpV16 |= FEN_ELDR;
+                       usb_write16(pAdapter, REG_SYS_FUNC_EN, tmpV16);
+               }
+
+               /*  Clock: Gated(0x0008h[5]) 8M(0x0008h[1]) clock from ANA, default valid */
+               tmpV16 = usb_read16(pAdapter, REG_SYS_CLKR);
+               if ((!(tmpV16 & LOADER_CLK_EN))  || (!(tmpV16 & ANA8M))) {
+                       tmpV16 |= (LOADER_CLK_EN | ANA8M);
+                       usb_write16(pAdapter, REG_SYS_CLKR, tmpV16);
+               }
+
+               if (bWrite) {
+                       /*  Enable LDO 2.5V before read/write action */
+                       tempval = usb_read8(pAdapter, EFUSE_TEST+3);
+                       tempval &= 0x0F;
+                       tempval |= (VOLTAGE_V25 << 4);
+                       usb_write8(pAdapter, EFUSE_TEST+3, (tempval | 0x80));
+               }
+       } else {
+               usb_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
+
+               if (bWrite) {
+                       /*  Disable LDO 2.5V after read/write action */
+                       tempval = usb_read8(pAdapter, EFUSE_TEST+3);
+                       usb_write8(pAdapter, EFUSE_TEST+3, (tempval & 0x7F));
+               }
+       }
 }
 
-/*-----------------------------------------------------------------------------
- * Function:   efuse_GetCurrentSize
- *
- * Overview:   Get current efuse size!!!
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/16/2008  MHC             Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-u16
-Efuse_GetCurrentSize(
-       struct adapter *pAdapter,
-       u8 efuseType,
-       bool pseudo)
+static void
+efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
 {
-       u16 ret = 0;
+       u8 *efuseTbl = NULL;
+       u8 rtemp8;
+       u16     eFuse_Addr = 0;
+       u8 offset, wren;
+       u16     i, j;
+       u16     **eFuseWord = NULL;
+       u16     efuse_utilized = 0;
+       u8 u1temp = 0;
+
+       efuseTbl = kzalloc(EFUSE_MAP_LEN_88E, GFP_KERNEL);
+       if (efuseTbl == NULL) {
+               DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
+               goto exit;
+       }
 
-       ret = pAdapter->HalFunc.EfuseGetCurrentSize(pAdapter, efuseType, pseudo);
+       eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
+       if (eFuseWord == NULL) {
+               DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
+               goto exit;
+       }
 
-       return ret;
+       /*  0. Refresh efuse init map as all oxFF. */
+       for (i = 0; i < EFUSE_MAX_SECTION_88E; i++)
+               for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++)
+                       eFuseWord[i][j] = 0xFFFF;
+
+       /*  */
+       /*  1. Read the first byte to check if efuse is empty!!! */
+       /*  */
+       /*  */
+       rtemp8 = *(phymap+eFuse_Addr);
+       if (rtemp8 != 0xFF) {
+               efuse_utilized++;
+               eFuse_Addr++;
+       } else {
+               DBG_88E("EFUSE is empty efuse_Addr-%d efuse_data =%x\n", eFuse_Addr, rtemp8);
+               goto exit;
+       }
+
+       /*  */
+       /*  2. Read real efuse content. Filter PG header and every section data. */
+       /*  */
+       while ((rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) {
+               /*  Check PG header for section num. */
+               if ((rtemp8 & 0x1F) == 0x0F) {          /* extended header */
+                       u1temp = ((rtemp8 & 0xE0) >> 5);
+                       rtemp8 = *(phymap+eFuse_Addr);
+                       if ((rtemp8 & 0x0F) == 0x0F) {
+                               eFuse_Addr++;
+                               rtemp8 = *(phymap+eFuse_Addr);
+
+                               if (rtemp8 != 0xFF && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E))
+                                       eFuse_Addr++;
+                               continue;
+                       } else {
+                               offset = ((rtemp8 & 0xF0) >> 1) | u1temp;
+                               wren = (rtemp8 & 0x0F);
+                               eFuse_Addr++;
+                       }
+               } else {
+                       offset = ((rtemp8 >> 4) & 0x0f);
+                       wren = (rtemp8 & 0x0f);
+               }
+
+               if (offset < EFUSE_MAX_SECTION_88E) {
+                       /*  Get word enable value from PG header */
+                       for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
+                               /*  Check word enable condition in the section */
+                               if (!(wren & 0x01)) {
+                                       rtemp8 = *(phymap+eFuse_Addr);
+                                       eFuse_Addr++;
+                                       efuse_utilized++;
+                                       eFuseWord[offset][i] = (rtemp8 & 0xff);
+                                       if (eFuse_Addr >= EFUSE_REAL_CONTENT_LEN_88E)
+                                               break;
+                                       rtemp8 = *(phymap+eFuse_Addr);
+                                       eFuse_Addr++;
+                                       efuse_utilized++;
+                                       eFuseWord[offset][i] |= (((u16)rtemp8 << 8) & 0xff00);
+
+                                       if (eFuse_Addr >= EFUSE_REAL_CONTENT_LEN_88E)
+                                               break;
+                               }
+                               wren >>= 1;
+                       }
+               }
+               /*  Read next PG header */
+               rtemp8 = *(phymap+eFuse_Addr);
+
+               if (rtemp8 != 0xFF && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) {
+                       efuse_utilized++;
+                       eFuse_Addr++;
+               }
+       }
+
+       /*  */
+       /*  3. Collect 16 sections and 4 word unit into Efuse map. */
+       /*  */
+       for (i = 0; i < EFUSE_MAX_SECTION_88E; i++) {
+               for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++) {
+                       efuseTbl[(i*8)+(j*2)] = (eFuseWord[i][j] & 0xff);
+                       efuseTbl[(i*8)+((j*2)+1)] = ((eFuseWord[i][j] >> 8) & 0xff);
+               }
+       }
+
+       /*  */
+       /*  4. Copy from Efuse map to output pointer memory!!! */
+       /*  */
+       for (i = 0; i < _size_byte; i++)
+               pbuf[i] = efuseTbl[_offset+i];
+
+       /*  */
+       /*  5. Calculate Efuse utilization. */
+       /*  */
+
+exit:
+       kfree(efuseTbl);
+
+       if (eFuseWord)
+               kfree(eFuseWord);
 }
 
-/*  11/16/2008 MH Add description. Get current efuse area enabled word!!. */
-u8
-Efuse_CalculateWordCnts(u8 word_en)
+static void efuse_read_phymap_from_txpktbuf(
+       struct adapter  *adapter,
+       int bcnhead,    /* beacon head, where FW store len(2-byte) and efuse physical map. */
+       u8 *content,    /* buffer to store efuse physical map */
+       u16 *size       /* for efuse content: the max byte to read. will update to byte read */
+       )
 {
-       u8 word_cnts = 0;
-       if (!(word_en & BIT(0)))
-               word_cnts++; /*  0 : write enable */
-       if (!(word_en & BIT(1)))
-               word_cnts++;
-       if (!(word_en & BIT(2)))
-               word_cnts++;
-       if (!(word_en & BIT(3)))
-               word_cnts++;
-       return word_cnts;
+       u16 dbg_addr = 0;
+       u32 start  = 0, passing_time = 0;
+       u8 reg_0x143 = 0;
+       u32 lo32 = 0, hi32 = 0;
+       u16 len = 0, count = 0;
+       int i = 0;
+       u16 limit = *size;
+
+       u8 *pos = content;
+
+       if (bcnhead < 0) /* if not valid */
+               bcnhead = usb_read8(adapter, REG_TDECTRL+1);
+
+       DBG_88E("%s bcnhead:%d\n", __func__, bcnhead);
+
+       usb_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
+
+       dbg_addr = bcnhead*128/8; /* 8-bytes addressing */
+
+       while (1) {
+               usb_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr+i);
+
+               usb_write8(adapter, REG_TXPKTBUF_DBG, 0);
+               start = jiffies;
+               while (!(reg_0x143 = usb_read8(adapter, REG_TXPKTBUF_DBG)) &&
+                      (passing_time = rtw_get_passing_time_ms(start)) < 1000) {
+                       DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143, usb_read8(adapter, 0x106));
+                       msleep(1);
+               }
+
+               lo32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_L);
+               hi32 = usb_read32(adapter, REG_PKTBUF_DBG_DATA_H);
+
+               if (i == 0) {
+                       u8 lenc[2];
+                       u16 lenbak, aaabak;
+                       u16 aaa;
+                       lenc[0] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L);
+                       lenc[1] = usb_read8(adapter, REG_PKTBUF_DBG_DATA_L+1);
+
+                       aaabak = le16_to_cpup((__le16 *)lenc);
+                       lenbak = le16_to_cpu(*((__le16 *)lenc));
+                       aaa = le16_to_cpup((__le16 *)&lo32);
+                       len = le16_to_cpu(*((__le16 *)&lo32));
+
+                       limit = (len-2 < limit) ? len-2 : limit;
+
+                       DBG_88E("%s len:%u, lenbak:%u, aaa:%u, aaabak:%u\n", __func__, len, lenbak, aaa, aaabak);
+
+                       memcpy(pos, ((u8 *)&lo32)+2, (limit >= count+2) ? 2 : limit-count);
+                       count += (limit >= count+2) ? 2 : limit-count;
+                       pos = content+count;
+
+               } else {
+                       memcpy(pos, ((u8 *)&lo32), (limit >= count+4) ? 4 : limit-count);
+                       count += (limit >= count+4) ? 4 : limit-count;
+                       pos = content+count;
+               }
+
+               if (limit > count && len-2 > count) {
+                       memcpy(pos, (u8 *)&hi32, (limit >= count+4) ? 4 : limit-count);
+                       count += (limit >= count+4) ? 4 : limit-count;
+                       pos = content+count;
+               }
+
+               if (limit <= count || len-2 <= count)
+                       break;
+               i++;
+       }
+       usb_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, DISABLE_TRXPKT_BUF_ACCESS);
+       DBG_88E("%s read count:%u\n", __func__, count);
+       *size = count;
 }
 
-/*
- * Description:
- * Execute E-Fuse read byte operation.
- * Referred from SD1 Richard.
- * Assumption:
- *             1. Boot from E-Fuse and successfully auto-load.
- *             2. PASSIVE_LEVEL (USB interface)
- * Created by Roger, 2008.10.21.
- */
-void
-ReadEFuseByte(
-               struct adapter *Adapter,
-               u16 _offset,
-               u8 *pbuf,
-               bool pseudo)
-{
-       u32 value32;
-       u8 readbyte;
-       u16 retry;
-
-       if (pseudo) {
-               Efuse_Read1ByteFromFakeContent(Adapter, _offset, pbuf);
-               return;
+static s32 iol_read_efuse(struct adapter *padapter, u8 txpktbuf_bndy, u16 offset, u16 size_byte, u8 *logical_map)
+{
+       s32 status = _FAIL;
+       u8 physical_map[512];
+       u16 size = 512;
+
+       usb_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
+       memset(physical_map, 0xFF, 512);
+       usb_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
+       status = iol_execute(padapter, CMD_READ_EFUSE_MAP);
+       if (status == _SUCCESS)
+               efuse_read_phymap_from_txpktbuf(padapter, txpktbuf_bndy, physical_map, &size);
+       efuse_phymap_to_logical(physical_map, offset, size_byte, logical_map);
+       return status;
+}
+
+void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf)
+{
+
+       if (rtw_IOL_applied(Adapter)) {
+               rtw_hal_power_on(Adapter);
+               iol_mode_enable(Adapter, 1);
+               iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
+               iol_mode_enable(Adapter, 0);
        }
+       return;
+}
 
-       /* Write Address */
-       rtw_write8(Adapter, EFUSE_CTRL+1, (_offset & 0xff));
-       readbyte = rtw_read8(Adapter, EFUSE_CTRL+2);
-       rtw_write8(Adapter, EFUSE_CTRL+2, ((_offset >> 8) & 0x03) | (readbyte & 0xfc));
-
-       /* Write bit 32 0 */
-       readbyte = rtw_read8(Adapter, EFUSE_CTRL+3);
-       rtw_write8(Adapter, EFUSE_CTRL+3, (readbyte & 0x7f));
-
-       /* Check bit 32 read-ready */
-       retry = 0;
-       value32 = rtw_read32(Adapter, EFUSE_CTRL);
-       while (!(((value32 >> 24) & 0xff) & 0x80)  && (retry < 10000)) {
-               value32 = rtw_read32(Adapter, EFUSE_CTRL);
-               retry++;
+/* Do not support BT */
+void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut)
+{
+       switch (type) {
+       case TYPE_EFUSE_MAX_SECTION:
+               {
+                       u8 *pMax_section;
+                       pMax_section = (u8 *)pOut;
+                       *pMax_section = EFUSE_MAX_SECTION_88E;
+               }
+               break;
+       case TYPE_EFUSE_REAL_CONTENT_LEN:
+               {
+                       u16 *pu2Tmp;
+                       pu2Tmp = (u16 *)pOut;
+                       *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
+               }
+               break;
+       case TYPE_EFUSE_CONTENT_LEN_BANK:
+               {
+                       u16 *pu2Tmp;
+                       pu2Tmp = (u16 *)pOut;
+                       *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
+               }
+               break;
+       case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
+               {
+                       u16 *pu2Tmp;
+                       pu2Tmp = (u16 *)pOut;
+                       *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
+               }
+               break;
+       case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
+               {
+                       u16 *pu2Tmp;
+                       pu2Tmp = (u16 *)pOut;
+                       *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
+               }
+               break;
+       case TYPE_EFUSE_MAP_LEN:
+               {
+                       u16 *pu2Tmp;
+                       pu2Tmp = (u16 *)pOut;
+                       *pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
+               }
+               break;
+       case TYPE_EFUSE_PROTECT_BYTES_BANK:
+               {
+                       u8 *pu1Tmp;
+                       pu1Tmp = (u8 *)pOut;
+                       *pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
+               }
+               break;
+       default:
+               {
+                       u8 *pu1Tmp;
+                       pu1Tmp = (u8 *)pOut;
+                       *pu1Tmp = 0;
+               }
+               break;
        }
+}
 
-       /*  20100205 Joseph: Add delay suggested by SD1 Victor. */
-       /*  This fix the problem that Efuse read error in high temperature condition. */
-       /*  Designer says that there shall be some delay after ready bit is set, or the */
-       /*  result will always stay on last data we read. */
-       udelay(50);
-       value32 = rtw_read32(Adapter, EFUSE_CTRL);
-
-       *pbuf = (u8)(value32 & 0xff);
-}
-
-/* Description:
- *     1. Execute E-Fuse read byte operation according as map offset and
- *     save to E-Fuse table.
- *     2. Referred from SD1 Richard.
- * Assumption:
- *     1. Boot from E-Fuse and successfully auto-load.
- *     2. PASSIVE_LEVEL (USB interface)
- *     Created by Roger, 2008.10.21.
- * 2008/12/12 MH
- *     1. Reorganize code flow and reserve bytes. and add description.
- *     2. Add efuse utilization collect.
- * 2008/12/22 MH
- *     Read Efuse must check if we write section 1 data again!!!
- *     Sec1 write addr must be after sec5.
- */
+u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data)
+{
+       u16     tmpaddr = 0;
+       u16     start_addr = efuse_addr;
+       u8 badworden = 0x0F;
+       u8 tmpdata[8];
+
+       memset((void *)tmpdata, 0xff, PGPKT_DATA_SIZE);
+
+       if (!(word_en&BIT0)) {
+               tmpaddr = start_addr;
+               efuse_OneByteWrite(pAdapter, start_addr++, data[0]);
+               efuse_OneByteWrite(pAdapter, start_addr++, data[1]);
+
+               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[0]);
+               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[1]);
+               if ((data[0] != tmpdata[0]) || (data[1] != tmpdata[1]))
+                       badworden &= (~BIT0);
+       }
+       if (!(word_en&BIT1)) {
+               tmpaddr = start_addr;
+               efuse_OneByteWrite(pAdapter, start_addr++, data[2]);
+               efuse_OneByteWrite(pAdapter, start_addr++, data[3]);
+
+               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[2]);
+               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[3]);
+               if ((data[2] != tmpdata[2]) || (data[3] != tmpdata[3]))
+                       badworden &= (~BIT1);
+       }
+       if (!(word_en&BIT2)) {
+               tmpaddr = start_addr;
+               efuse_OneByteWrite(pAdapter, start_addr++, data[4]);
+               efuse_OneByteWrite(pAdapter, start_addr++, data[5]);
+
+               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[4]);
+               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[5]);
+               if ((data[4] != tmpdata[4]) || (data[5] != tmpdata[5]))
+                       badworden &= (~BIT2);
+       }
+       if (!(word_en&BIT3)) {
+               tmpaddr = start_addr;
+               efuse_OneByteWrite(pAdapter, start_addr++, data[6]);
+               efuse_OneByteWrite(pAdapter, start_addr++, data[7]);
+
+               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[6]);
+               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[7]);
+               if ((data[6] != tmpdata[6]) || (data[7] != tmpdata[7]))
+                       badworden &= (~BIT3);
+       }
+       return badworden;
+}
 
-static void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool pseudo)
+u16 Efuse_GetCurrentSize(struct adapter *pAdapter)
 {
-       Adapter->HalFunc.ReadEFuse(Adapter, efuseType, _offset, _size_byte, pbuf, pseudo);
+       int     bContinual = true;
+       u16     efuse_addr = 0;
+       u8 hoffset = 0, hworden = 0;
+       u8 efuse_data, word_cnts = 0;
+
+       rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
+
+       while (bContinual &&
+              efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) &&
+              AVAILABLE_EFUSE_ADDR(efuse_addr)) {
+               if (efuse_data != 0xFF) {
+                       if ((efuse_data&0x1F) == 0x0F) {                /* extended header */
+                               hoffset = efuse_data;
+                               efuse_addr++;
+                               efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data);
+                               if ((efuse_data & 0x0F) == 0x0F) {
+                                       efuse_addr++;
+                                       continue;
+                               } else {
+                                       hoffset = ((hoffset & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
+                                       hworden = efuse_data & 0x0F;
+                               }
+                       } else {
+                               hoffset = (efuse_data>>4) & 0x0F;
+                               hworden =  efuse_data & 0x0F;
+                       }
+                       word_cnts = Efuse_CalculateWordCnts(hworden);
+                       /* read next header */
+                       efuse_addr = efuse_addr + (word_cnts*2)+1;
+               } else {
+                       bContinual = false;
+               }
+       }
+
+       rtw_hal_set_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
+
+       return efuse_addr;
 }
 
-void EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool pseudo
-       )
+int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data)
 {
-       pAdapter->HalFunc.EFUSEGetEfuseDefinition(pAdapter, efuseType, type, pOut, pseudo);
+       u8 ReadState = PG_STATE_HEADER;
+       int     bContinual = true;
+       int     bDataEmpty = true;
+       u8 efuse_data, word_cnts = 0;
+       u16     efuse_addr = 0;
+       u8 hoffset = 0, hworden = 0;
+       u8 tmpidx = 0;
+       u8 tmpdata[8];
+       u8 max_section = 0;
+       u8 tmp_header = 0;
+
+       EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section);
+
+       if (data == NULL)
+               return false;
+       if (offset > max_section)
+               return false;
+
+       memset((void *)data, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
+       memset((void *)tmpdata, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
+
+       /*  <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */
+       /*  Skip dummy parts to prevent unexpected data read from Efuse. */
+       /*  By pass right now. 2009.02.19. */
+       while (bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr)) {
+               /*   Header Read ------------- */
+               if (ReadState & PG_STATE_HEADER) {
+                       if (efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data) && (efuse_data != 0xFF)) {
+                               if (EXT_HEADER(efuse_data)) {
+                                       tmp_header = efuse_data;
+                                       efuse_addr++;
+                                       efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data);
+                                       if (!ALL_WORDS_DISABLED(efuse_data)) {
+                                               hoffset = ((tmp_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
+                                               hworden = efuse_data & 0x0F;
+                                       } else {
+                                               DBG_88E("Error, All words disabled\n");
+                                               efuse_addr++;
+                                               continue;
+                                       }
+                               } else {
+                                       hoffset = (efuse_data>>4) & 0x0F;
+                                       hworden =  efuse_data & 0x0F;
+                               }
+                               word_cnts = Efuse_CalculateWordCnts(hworden);
+                               bDataEmpty = true;
+
+                               if (hoffset == offset) {
+                                       for (tmpidx = 0; tmpidx < word_cnts*2; tmpidx++) {
+                                               if (efuse_OneByteRead(pAdapter, efuse_addr+1+tmpidx, &efuse_data)) {
+                                                       tmpdata[tmpidx] = efuse_data;
+                                                       if (efuse_data != 0xff)
+                                                               bDataEmpty = false;
+                                               }
+                                       }
+                                       if (bDataEmpty == false) {
+                                               ReadState = PG_STATE_DATA;
+                                       } else {/* read next header */
+                                               efuse_addr = efuse_addr + (word_cnts*2)+1;
+                                               ReadState = PG_STATE_HEADER;
+                                       }
+                               } else {/* read next header */
+                                       efuse_addr = efuse_addr + (word_cnts*2)+1;
+                                       ReadState = PG_STATE_HEADER;
+                               }
+                       } else {
+                               bContinual = false;
+                       }
+               } else if (ReadState & PG_STATE_DATA) {
+               /*   Data section Read ------------- */
+                       efuse_WordEnableDataRead(hworden, tmpdata, data);
+                       efuse_addr = efuse_addr + (word_cnts*2)+1;
+                       ReadState = PG_STATE_HEADER;
+               }
+
+       }
+
+       if ((data[0] == 0xff) && (data[1] == 0xff) && (data[2] == 0xff)  && (data[3] == 0xff) &&
+           (data[4] == 0xff) && (data[5] == 0xff) && (data[6] == 0xff)  && (data[7] == 0xff))
+               return false;
+       else
+               return true;
 }
 
-/*-----------------------------------------------------------------------------
- * Function:   EFUSE_Read1Byte
- *
- * Overview:   Copy from WMAC fot EFUSE read 1 byte.
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 09/23/2008  MHC             Copy from WMAC.
- *
- *---------------------------------------------------------------------------*/
-u8 EFUSE_Read1Byte(struct adapter *Adapter, u16 Address)
-{
-       u8 data;
-       u8 Bytetemp = {0x00};
-       u8 temp = {0x00};
-       u32 k = 0;
-       u16 contentLen = 0;
-
-       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI , TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&contentLen, false);
-
-       if (Address < contentLen) {     /* E-fuse 512Byte */
-               /* Write E-fuse Register address bit0~7 */
-               temp = Address & 0xFF;
-               rtw_write8(Adapter, EFUSE_CTRL+1, temp);
-               Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+2);
-               /* Write E-fuse Register address bit8~9 */
-               temp = ((Address >> 8) & 0x03) | (Bytetemp & 0xFC);
-               rtw_write8(Adapter, EFUSE_CTRL+2, temp);
-
-               /* Write 0x30[31]= 0 */
-               Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
-               temp = Bytetemp & 0x7F;
-               rtw_write8(Adapter, EFUSE_CTRL+3, temp);
-
-               /* Wait Write-ready (0x30[31]= 1) */
-               Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
-               while (!(Bytetemp & 0x80)) {
-                       Bytetemp = rtw_read8(Adapter, EFUSE_CTRL+3);
-                       k++;
-                       if (k == 1000) {
-                               k = 0;
+static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, struct pgpkt *pFixPkt, u16 *pAddr)
+{
+       u8 originaldata[8], badworden = 0;
+       u16     efuse_addr = *pAddr;
+       u32     PgWriteSuccess = 0;
+
+       memset((void *)originaldata, 0xff, 8);
+
+       if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata)) {
+               /* check if data exist */
+               badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pFixPkt->word_en, originaldata);
+
+               if (badworden != 0xf) { /*  write fail */
+                       PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata);
+
+                       if (!PgWriteSuccess)
+                               return false;
+                       else
+                               efuse_addr = Efuse_GetCurrentSize(pAdapter);
+               } else {
+                       efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1;
+               }
+       } else {
+               efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1;
+       }
+       *pAddr = efuse_addr;
+       return true;
+}
+
+static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt)
+{
+       bool bRet = false;
+       u16     efuse_addr = *pAddr, efuse_max_available_len = 0;
+       u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0;
+       u8 repeatcnt = 0;
+
+       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len);
+
+       while (efuse_addr < efuse_max_available_len) {
+               pg_header = ((pTargetPkt->offset & 0x07) << 5) | 0x0F;
+               efuse_OneByteWrite(pAdapter, efuse_addr, pg_header);
+               efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header);
+
+               while (tmp_header == 0xFF) {
+                       if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
+                               return false;
+
+                       efuse_OneByteWrite(pAdapter, efuse_addr, pg_header);
+                       efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header);
+               }
+
+               /* to write ext_header */
+               if (tmp_header == pg_header) {
+                       efuse_addr++;
+                       pg_header_temp = pg_header;
+                       pg_header = ((pTargetPkt->offset & 0x78) << 1) | pTargetPkt->word_en;
+
+                       efuse_OneByteWrite(pAdapter, efuse_addr, pg_header);
+                       efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header);
+
+                       while (tmp_header == 0xFF) {
+                               if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
+                                       return false;
+
+                               efuse_OneByteWrite(pAdapter, efuse_addr, pg_header);
+                               efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header);
+                       }
+
+                       if ((tmp_header & 0x0F) == 0x0F) {      /* word_en PG fail */
+                               if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
+                                       return false;
+                               } else {
+                                       efuse_addr++;
+                                       continue;
+                               }
+                       } else if (pg_header != tmp_header) {   /* offset PG fail */
+                               struct pgpkt    fixPkt;
+                               fixPkt.offset = ((pg_header_temp & 0xE0) >> 5) | ((tmp_header & 0xF0) >> 1);
+                               fixPkt.word_en = tmp_header & 0x0F;
+                               fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
+                               if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr))
+                                       return false;
+                       } else {
+                               bRet = true;
                                break;
                        }
+               } else if ((tmp_header & 0x1F) == 0x0F) {               /* wrong extended header */
+                       efuse_addr += 2;
+                       continue;
                }
-               data = rtw_read8(Adapter, EFUSE_CTRL);
-               return data;
-       } else {
-               return 0xFF;
        }
 
-} /* EFUSE_Read1Byte */
+       *pAddr = efuse_addr;
+       return bRet;
+}
 
-/*  11/16/2008 MH Read one byte from real Efuse. */
-u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data, bool pseudo)
+static bool hal_EfusePgPacketWrite1ByteHeader(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt)
 {
-       u8 tmpidx = 0;
-       u8 result;
+       bool bRet = false;
+       u8 pg_header = 0, tmp_header = 0;
+       u16     efuse_addr = *pAddr;
+       u8 repeatcnt = 0;
 
-       if (pseudo) {
-               result = Efuse_Read1ByteFromFakeContent(pAdapter, addr, data);
-               return result;
+       pg_header = ((pTargetPkt->offset << 4) & 0xf0) | pTargetPkt->word_en;
+
+       efuse_OneByteWrite(pAdapter, efuse_addr, pg_header);
+       efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header);
+
+       while (tmp_header == 0xFF) {
+               if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
+                       return false;
+               efuse_OneByteWrite(pAdapter, efuse_addr, pg_header);
+               efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header);
        }
-       /*  -----------------e-fuse reg ctrl --------------------------------- */
-       /* address */
-       rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr & 0xff));
-       rtw_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) & 0x03)) |
-                  (rtw_read8(pAdapter, EFUSE_CTRL+2) & 0xFC));
 
-       rtw_write8(pAdapter, EFUSE_CTRL+3,  0x72);/* read cmd */
+       if (pg_header == tmp_header) {
+               bRet = true;
+       } else {
+               struct pgpkt    fixPkt;
+               fixPkt.offset = (tmp_header>>4) & 0x0F;
+               fixPkt.word_en = tmp_header & 0x0F;
+               fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
+               if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr))
+                       return false;
+       }
 
-       while (!(0x80 & rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100))
-               tmpidx++;
-       if (tmpidx < 100) {
-               *data = rtw_read8(pAdapter, EFUSE_CTRL);
-               result = true;
+       *pAddr = efuse_addr;
+       return bRet;
+}
+
+static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt)
+{
+       u16     efuse_addr = *pAddr;
+       u8 badworden = 0;
+       u32     PgWriteSuccess = 0;
+
+       badworden = 0x0f;
+       badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pTargetPkt->word_en, pTargetPkt->data);
+       if (badworden == 0x0F) {
+               /*  write ok */
+               return true;
        } else {
-               *data = 0xff;
-               result = false;
+               /* reorganize other pg packet */
+               PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data);
+               if (!PgWriteSuccess)
+                       return false;
+               else
+                       return true;
        }
-       return result;
 }
 
-/*  11/16/2008 MH Write one byte to reald Efuse. */
-u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data, bool pseudo)
+static bool
+hal_EfusePgPacketWriteHeader(
+                               struct adapter *pAdapter,
+                               u8 efuseType,
+                               u16                             *pAddr,
+                               struct pgpkt *pTargetPkt)
 {
-       u8 tmpidx = 0;
-       u8 result;
+       bool bRet = false;
+
+       if (pTargetPkt->offset >= EFUSE_MAX_SECTION_BASE)
+               bRet = hal_EfusePgPacketWrite2ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt);
+       else
+               bRet = hal_EfusePgPacketWrite1ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt);
+
+       return bRet;
+}
+
+static bool wordEnMatched(struct pgpkt *pTargetPkt, struct pgpkt *pCurPkt,
+                         u8 *pWden)
+{
+       u8 match_word_en = 0x0F;        /*  default all words are disabled */
+
+       /*  check if the same words are enabled both target and current PG packet */
+       if (((pTargetPkt->word_en & BIT0) == 0) &&
+           ((pCurPkt->word_en & BIT0) == 0))
+               match_word_en &= ~BIT0;                         /*  enable word 0 */
+       if (((pTargetPkt->word_en & BIT1) == 0) &&
+           ((pCurPkt->word_en & BIT1) == 0))
+               match_word_en &= ~BIT1;                         /*  enable word 1 */
+       if (((pTargetPkt->word_en & BIT2) == 0) &&
+           ((pCurPkt->word_en & BIT2) == 0))
+               match_word_en &= ~BIT2;                         /*  enable word 2 */
+       if (((pTargetPkt->word_en & BIT3) == 0) &&
+           ((pCurPkt->word_en & BIT3) == 0))
+               match_word_en &= ~BIT3;                         /*  enable word 3 */
+
+       *pWden = match_word_en;
+
+       if (match_word_en != 0xf)
+               return true;
+       else
+               return false;
+}
 
-       if (pseudo) {
-               result = Efuse_Write1ByteToFakeContent(pAdapter, addr, data);
-               return result;
+static bool hal_EfuseCheckIfDatafollowed(struct adapter *pAdapter, u8 word_cnts, u16 startAddr)
+{
+       bool bRet = false;
+       u8 i, efuse_data;
+
+       for (i = 0; i < (word_cnts*2); i++) {
+               if (efuse_OneByteRead(pAdapter, (startAddr+i), &efuse_data) && (efuse_data != 0xFF))
+                       bRet = true;
        }
+       return bRet;
+}
 
-       /*  -----------------e-fuse reg ctrl --------------------------------- */
-       /* address */
-       rtw_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
-       rtw_write8(pAdapter, EFUSE_CTRL+2,
-                  (rtw_read8(pAdapter, EFUSE_CTRL+2) & 0xFC) |
-                  (u8)((addr>>8) & 0x03));
-       rtw_write8(pAdapter, EFUSE_CTRL, data);/* data */
+static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt)
+{
+       bool bRet = false;
+       u8 i, efuse_data = 0, cur_header = 0;
+       u8 matched_wden = 0, badworden = 0;
+       u16     startAddr = 0, efuse_max_available_len = 0, efuse_max = 0;
+       struct pgpkt curPkt;
 
-       rtw_write8(pAdapter, EFUSE_CTRL+3, 0xF2);/* write cmd */
+       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len);
+       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&efuse_max);
 
-       while ((0x80 &  rtw_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100))
-               tmpidx++;
+       rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr);
+       startAddr %= EFUSE_REAL_CONTENT_LEN;
 
-       if (tmpidx < 100)
-               result = true;
-       else
-               result = false;
+       while (1) {
+               if (startAddr >= efuse_max_available_len) {
+                       bRet = false;
+                       break;
+               }
 
-       return result;
+               if (efuse_OneByteRead(pAdapter, startAddr, &efuse_data) && (efuse_data != 0xFF)) {
+                       if (EXT_HEADER(efuse_data)) {
+                               cur_header = efuse_data;
+                               startAddr++;
+                               efuse_OneByteRead(pAdapter, startAddr, &efuse_data);
+                               if (ALL_WORDS_DISABLED(efuse_data)) {
+                                       bRet = false;
+                                       break;
+                               } else {
+                                       curPkt.offset = ((cur_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
+                                       curPkt.word_en = efuse_data & 0x0F;
+                               }
+                       } else {
+                               cur_header  =  efuse_data;
+                               curPkt.offset = (cur_header>>4) & 0x0F;
+                               curPkt.word_en = cur_header & 0x0F;
+                       }
+
+                       curPkt.word_cnts = Efuse_CalculateWordCnts(curPkt.word_en);
+                       /*  if same header is found but no data followed */
+                       /*  write some part of data followed by the header. */
+                       if ((curPkt.offset == pTargetPkt->offset) &&
+                           (!hal_EfuseCheckIfDatafollowed(pAdapter, curPkt.word_cnts, startAddr+1)) &&
+                           wordEnMatched(pTargetPkt, &curPkt, &matched_wden)) {
+                               /*  Here to write partial data */
+                               badworden = Efuse_WordEnableDataWrite(pAdapter, startAddr+1, matched_wden, pTargetPkt->data);
+                               if (badworden != 0x0F) {
+                                       u32     PgWriteSuccess = 0;
+                                       /*  if write fail on some words, write these bad words again */
+
+                                       PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data);
+
+                                       if (!PgWriteSuccess) {
+                                               bRet = false;   /*  write fail, return */
+                                               break;
+                                       }
+                               }
+                               /*  partial write ok, update the target packet for later use */
+                               for (i = 0; i < 4; i++) {
+                                       if ((matched_wden & (0x1<<i)) == 0)     /*  this word has been written */
+                                               pTargetPkt->word_en |= (0x1<<i);        /*  disable the word */
+                               }
+                               pTargetPkt->word_cnts = Efuse_CalculateWordCnts(pTargetPkt->word_en);
+                       }
+                       /*  read from next header */
+                       startAddr = startAddr + (curPkt.word_cnts*2) + 1;
+               } else {
+                       /*  not used header, 0xff */
+                       *pAddr = startAddr;
+                       bRet = true;
+                       break;
+               }
+       }
+       return bRet;
 }
 
-int Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool pseudo)
+static bool
+hal_EfusePgCheckAvailableAddr(
+               struct adapter *pAdapter,
+               u8 efuseType
+       )
 {
-       int     ret = 0;
+       u16     efuse_max_available_len = 0;
 
-       ret =  pAdapter->HalFunc.Efuse_PgPacketRead(pAdapter, offset, data, pseudo);
+       /* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */
+       EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len);
 
-       return ret;
+       if (Efuse_GetCurrentSize(pAdapter) >= efuse_max_available_len)
+               return false;
+       return true;
 }
 
-int Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool pseudo)
+static void hal_EfuseConstructPGPkt(u8 offset, u8 word_en, u8 *pData, struct pgpkt *pTargetPkt)
 {
-       int ret;
+       memset((void *)pTargetPkt->data, 0xFF, sizeof(u8)*8);
+       pTargetPkt->offset = offset;
+       pTargetPkt->word_en = word_en;
+       efuse_WordEnableDataRead(word_en, pData, pTargetPkt->data);
+       pTargetPkt->word_cnts = Efuse_CalculateWordCnts(pTargetPkt->word_en);
+}
 
-       ret =  pAdapter->HalFunc.Efuse_PgPacketWrite(pAdapter, offset, word_en, data, pseudo);
+bool Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *pData)
+{
+       struct pgpkt    targetPkt;
+       u16                     startAddr = 0;
+       u8 efuseType = EFUSE_WIFI;
 
-       return ret;
+       if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType))
+               return false;
+
+       hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt);
+
+       if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt))
+               return false;
+
+       if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt))
+               return false;
+
+       if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt))
+               return false;
+
+       return true;
 }
 
+u8 Efuse_CalculateWordCnts(u8 word_en)
+{
+       u8 word_cnts = 0;
+       if (!(word_en & BIT(0)))
+               word_cnts++; /*  0 : write enable */
+       if (!(word_en & BIT(1)))
+               word_cnts++;
+       if (!(word_en & BIT(2)))
+               word_cnts++;
+       if (!(word_en & BIT(3)))
+               word_cnts++;
+       return word_cnts;
+}
 
-static int Efuse_PgPacketWrite_BT(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool pseudo)
+u8 efuse_OneByteRead(struct adapter *pAdapter, u16 addr, u8 *data)
 {
-       int ret;
+       u8 tmpidx = 0;
+       u8 result;
 
-       ret =  pAdapter->HalFunc.Efuse_PgPacketWrite_BT(pAdapter, offset, word_en, data, pseudo);
+       usb_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr & 0xff));
+       usb_write8(pAdapter, EFUSE_CTRL+2, ((u8)((addr>>8) & 0x03)) |
+                  (usb_read8(pAdapter, EFUSE_CTRL+2) & 0xFC));
 
-       return ret;
+       usb_write8(pAdapter, EFUSE_CTRL+3,  0x72);/* read cmd */
+
+       while (!(0x80 & usb_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100))
+               tmpidx++;
+       if (tmpidx < 100) {
+               *data = usb_read8(pAdapter, EFUSE_CTRL);
+               result = true;
+       } else {
+               *data = 0xff;
+               result = false;
+       }
+       return result;
 }
 
-/*-----------------------------------------------------------------------------
- * Function:   efuse_WordEnableDataRead
- *
- * Overview:   Read allowed word in current efuse section data.
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/16/2008  MHC             Create Version 0.
- * 11/21/2008  MHC             Fix Write bug when we only enable late word.
- *
- *---------------------------------------------------------------------------*/
+u8 efuse_OneByteWrite(struct adapter *pAdapter, u16 addr, u8 data)
+{
+       u8 tmpidx = 0;
+       u8 result;
+
+       usb_write8(pAdapter, EFUSE_CTRL+1, (u8)(addr&0xff));
+       usb_write8(pAdapter, EFUSE_CTRL+2,
+                  (usb_read8(pAdapter, EFUSE_CTRL+2) & 0xFC) |
+                  (u8)((addr>>8) & 0x03));
+       usb_write8(pAdapter, EFUSE_CTRL, data);/* data */
+
+       usb_write8(pAdapter, EFUSE_CTRL+3, 0xF2);/* write cmd */
+
+       while ((0x80 &  usb_read8(pAdapter, EFUSE_CTRL+3)) && (tmpidx < 100))
+               tmpidx++;
+
+       if (tmpidx < 100)
+               result = true;
+       else
+               result = false;
+
+       return result;
+}
+
+/*
+ * Overview:   Read allowed word in current efuse section data.
+ */
 void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
 {
        if (!(word_en&BIT(0))) {
@@ -419,23 +982,14 @@ void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata)
        }
 }
 
-u8 Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data, bool pseudo)
-{
-       u8 ret = 0;
-
-       ret =  pAdapter->HalFunc.Efuse_WordEnableDataWrite(pAdapter, efuse_addr, word_en, data, pseudo);
-
-       return ret;
-}
-
 static u8 efuse_read8(struct adapter *padapter, u16 address, u8 *value)
 {
-       return efuse_OneByteRead(padapter, address, value, false);
+       return efuse_OneByteRead(padapter, address, value);
 }
 
 static u8 efuse_write8(struct adapter *padapter, u16 address, u8 *value)
 {
-       return efuse_OneByteWrite(padapter, address, *value, false);
+       return efuse_OneByteWrite(padapter, address, *value);
 }
 
 /*
@@ -448,8 +1002,8 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
        u8 res = _FAIL;
        u8 (*rw8)(struct adapter *, u16, u8*);
 
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len, false);
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&real_content_len);
+       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
 
        if (start_addr > real_content_len)
                return _FAIL;
@@ -480,59 +1034,41 @@ u8 rtw_efuse_access(struct adapter *padapter, u8 write, u16 start_addr, u16 cnts
 
        return res;
 }
-/*  */
+
 u16 efuse_GetMaxSize(struct adapter *padapter)
 {
        u16 max_size;
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size, false);
+       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI , TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_size);
        return max_size;
 }
-/*  */
+
 u8 efuse_GetCurrentSize(struct adapter *padapter, u16 *size)
 {
        Efuse_PowerSwitch(padapter, false, true);
-       *size = Efuse_GetCurrentSize(padapter, EFUSE_WIFI, false);
+       *size = Efuse_GetCurrentSize(padapter);
        Efuse_PowerSwitch(padapter, false, false);
 
        return _SUCCESS;
 }
-/*  */
+
 u8 rtw_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 {
        u16 mapLen = 0;
 
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
+       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
 
        if ((addr + cnts) > mapLen)
                return _FAIL;
 
        Efuse_PowerSwitch(padapter, false, true);
 
-       efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data, false);
+       efuse_ReadEFuse(padapter, EFUSE_WIFI, addr, cnts, data);
 
        Efuse_PowerSwitch(padapter, false, false);
 
        return _SUCCESS;
 }
 
-u8 rtw_BT_efuse_map_read(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
-{
-       u16 mapLen = 0;
-
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
-
-       if ((addr + cnts) > mapLen)
-               return _FAIL;
-
-       Efuse_PowerSwitch(padapter, false, true);
-
-       efuse_ReadEFuse(padapter, EFUSE_BT, addr, cnts, data, false);
-
-       Efuse_PowerSwitch(padapter, false, false);
-
-       return _SUCCESS;
-}
-/*  */
 u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 {
        u8 offset, word_en;
@@ -542,12 +1078,12 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
        u8 ret = _SUCCESS;
        u16 mapLen = 0;
 
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
+       EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
 
        if ((addr + cnts) > mapLen)
                return _FAIL;
 
-       map = rtw_zmalloc(mapLen);
+       map = kzalloc(mapLen, GFP_KERNEL);
        if (map == NULL)
                return _FAIL;
 
@@ -559,7 +1095,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
 
        offset = (addr >> 3);
        word_en = 0xF;
-       _rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE + 1);
+       memset(newdata, 0xFF, PGPKT_DATA_SIZE + 1);
        i = addr & 0x7; /*  index of one package */
        idx = 0;        /*  data index */
 
@@ -599,7 +1135,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
                }
 
                if (word_en != 0xF) {
-                       ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata, false);
+                       ret = Efuse_PgPacketWrite(padapter, offset, word_en, newdata);
                        DBG_88E("offset=%x\n", offset);
                        DBG_88E("word_en=%x\n", word_en);
 
@@ -615,7 +1151,7 @@ u8 rtw_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
                offset++;
                i = 0;
                word_en = 0xF;
-               _rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
+               memset(newdata, 0xFF, PGPKT_DATA_SIZE);
        } while (1);
 
        Efuse_PowerSwitch(padapter, true, false);
@@ -624,121 +1160,13 @@ exit:
        return ret;
 }
 
-/*  */
-u8 rtw_BT_efuse_map_write(struct adapter *padapter, u16 addr, u16 cnts, u8 *data)
-{
-       u8 offset, word_en;
-       u8 *map;
-       u8 newdata[PGPKT_DATA_SIZE + 1];
-       s32     i, idx;
-       u8 ret = _SUCCESS;
-       u16 mapLen = 0;
-
-       EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, false);
-
-       if ((addr + cnts) > mapLen)
-               return _FAIL;
-
-       map = rtw_zmalloc(mapLen);
-       if (map == NULL)
-               return _FAIL;
-
-       ret = rtw_BT_efuse_map_read(padapter, 0, mapLen, map);
-       if (ret == _FAIL)
-               goto exit;
-
-       Efuse_PowerSwitch(padapter, true, true);
-
-       offset = (addr >> 3);
-       word_en = 0xF;
-       _rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE + 1);
-       i = addr & 0x7; /*  index of one package */
-       idx = 0;        /*  data index */
-
-       if (i & 0x1) {
-               /*  odd start */
-               if (data[idx] != map[addr+idx]) {
-                       word_en &= ~BIT(i >> 1);
-                       newdata[i-1] = map[addr+idx-1];
-                       newdata[i] = data[idx];
-               }
-               i++;
-               idx++;
-       }
-       do {
-               for (; i < PGPKT_DATA_SIZE; i += 2) {
-                       if (cnts == idx)
-                               break;
-                       if ((cnts - idx) == 1) {
-                               if (data[idx] != map[addr+idx]) {
-                                       word_en &= ~BIT(i >> 1);
-                                       newdata[i] = data[idx];
-                                       newdata[i+1] = map[addr+idx+1];
-                               }
-                               idx++;
-                               break;
-                       } else {
-                               if ((data[idx] != map[addr+idx]) ||
-                                   (data[idx+1] != map[addr+idx+1])) {
-                                       word_en &= ~BIT(i >> 1);
-                                       newdata[i] = data[idx];
-                                       newdata[i+1] = data[idx + 1];
-                               }
-                               idx += 2;
-                       }
-                       if (idx == cnts)
-                               break;
-               }
-
-               if (word_en != 0xF) {
-                       DBG_88E("%s: offset=%#X\n", __func__, offset);
-                       DBG_88E("%s: word_en=%#X\n", __func__, word_en);
-                       DBG_88E("%s: data=", __func__);
-                       for (i = 0; i < PGPKT_DATA_SIZE; i++)
-                               DBG_88E("0x%02X ", newdata[i]);
-                       DBG_88E("\n");
-
-                       ret = Efuse_PgPacketWrite_BT(padapter, offset, word_en, newdata, false);
-                       if (ret == _FAIL)
-                               break;
-               }
-
-               if (idx == cnts)
-                       break;
-
-               offset++;
-               i = 0;
-               word_en = 0xF;
-               _rtw_memset(newdata, 0xFF, PGPKT_DATA_SIZE);
-       } while (1);
-
-       Efuse_PowerSwitch(padapter, true, false);
-
-exit:
-
-       kfree(map);
-
-       return ret;
-}
-
-/*-----------------------------------------------------------------------------
- * Function:   efuse_ShadowRead1Byte
- *                     efuse_ShadowRead2Byte
- *                     efuse_ShadowRead4Byte
- *
- * Overview:   Read from efuse init map by one/two/four bytes !!!!!
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/12/2008  MHC             Create Version 0.
+/*
+ * Function:   efuse_ShadowRead1Byte
+ *             efuse_ShadowRead2Byte
+ *             efuse_ShadowRead4Byte
  *
- *---------------------------------------------------------------------------*/
+ * Overview:   Read from efuse init map by one/two/four bytes !!!!!
+ */
 static void
 efuse_ShadowRead1Byte(
                struct adapter *pAdapter,
@@ -749,9 +1177,8 @@ efuse_ShadowRead1Byte(
 
        *Value = pEEPROM->efuse_eeprom_data[Offset];
 
-}      /*  EFUSE_ShadowRead1Byte */
+}
 
-/* Read Two Bytes */
 static void
 efuse_ShadowRead2Byte(
                struct adapter *pAdapter,
@@ -763,9 +1190,8 @@ efuse_ShadowRead2Byte(
        *Value = pEEPROM->efuse_eeprom_data[Offset];
        *Value |= pEEPROM->efuse_eeprom_data[Offset+1]<<8;
 
-}      /*  EFUSE_ShadowRead2Byte */
+}
 
-/* Read Four Bytes */
 static void
 efuse_ShadowRead4Byte(
                struct adapter *pAdapter,
@@ -779,85 +1205,45 @@ efuse_ShadowRead4Byte(
        *Value |= pEEPROM->efuse_eeprom_data[Offset+2]<<16;
        *Value |= pEEPROM->efuse_eeprom_data[Offset+3]<<24;
 
-}      /*  efuse_ShadowRead4Byte */
+}
 
-/*-----------------------------------------------------------------------------
- * Function:   Efuse_ReadAllMap
- *
+/*
  * Overview:   Read All Efuse content
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/11/2008  MHC             Create Version 0.
- *
- *---------------------------------------------------------------------------*/
-static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse, bool pseudo)
+ */
+static void Efuse_ReadAllMap(struct adapter *pAdapter, u8 efuseType, u8 *Efuse)
 {
        u16 mapLen = 0;
 
        Efuse_PowerSwitch(pAdapter, false, true);
 
-       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
+       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
 
-       efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse, pseudo);
+       efuse_ReadEFuse(pAdapter, efuseType, 0, mapLen, Efuse);
 
        Efuse_PowerSwitch(pAdapter, false, false);
 }
 
-/*-----------------------------------------------------------------------------
- * Function:   EFUSE_ShadowMapUpdate
- *
+/*
  * Overview:   Transfer current EFUSE content to shadow init and modify map.
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/13/2008  MHC             Create Version 0.
- *
- *---------------------------------------------------------------------------*/
+ */
 void EFUSE_ShadowMapUpdate(
        struct adapter *pAdapter,
-       u8 efuseType,
-       bool pseudo)
+       u8 efuseType)
 {
        struct eeprom_priv *pEEPROM = GET_EEPROM_EFUSE_PRIV(pAdapter);
        u16 mapLen = 0;
 
-       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen, pseudo);
+       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_MAP_LEN, (void *)&mapLen);
 
        if (pEEPROM->bautoload_fail_flag)
-               _rtw_memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
+               memset(pEEPROM->efuse_eeprom_data, 0xFF, mapLen);
        else
-               Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data, pseudo);
-} /*  EFUSE_ShadowMapUpdate */
+               Efuse_ReadAllMap(pAdapter, efuseType, pEEPROM->efuse_eeprom_data);
+}
 
-/*-----------------------------------------------------------------------------
- * Function:   EFUSE_ShadowRead
- *
+/*
  * Overview:   Read from efuse init map !!!!!
- *
- * Input:       NONE
- *
- * Output:      NONE
- *
- * Return:      NONE
- *
- * Revised History:
- * When                        Who             Remark
- * 11/12/2008  MHC             Create Version 0.
- *
- *---------------------------------------------------------------------------*/
+ */
 void EFUSE_ShadowRead(struct adapter *pAdapter, u8 Type, u16 Offset, u32 *Value)
 {
        if (Type == 1)
@@ -866,5 +1252,4 @@ void EFUSE_ShadowRead(struct adapter *pAdapter, u8 Type, u16 Offset, u32 *Value)
                efuse_ShadowRead2Byte(pAdapter, Offset, (u16 *)Value);
        else if (Type == 4)
                efuse_ShadowRead4Byte(pAdapter, Offset, (u32 *)Value);
-
-}      /*  EFUSE_ShadowRead */
+}
index 0552019d1cf7d5afa7d07be6bd6f169cbd4dc5c0..54ebf34245727eed5efdc42a5d8abab38ea5eda6 100644 (file)
@@ -206,8 +206,8 @@ inline u8 *rtw_set_ie_mesh_ch_switch_parm(u8 *buf, u32 *buf_len, u8 ttl,
 
        ie_data[0] = ttl;
        ie_data[1] = flags;
-       RTW_PUT_LE16((u8 *)&ie_data[2], reason);
-       RTW_PUT_LE16((u8 *)&ie_data[4], precedence);
+       *(u16 *)(ie_data+2) = cpu_to_le16(reason);
+       *(u16 *)(ie_data+4) = cpu_to_le16(precedence);
 
        return rtw_set_ie(buf, 0x118,  6, ie_data, buf_len);
 }
@@ -334,7 +334,7 @@ exit:
 void rtw_set_supported_rate(u8 *SupportedRates, uint mode)
 {
 
-       _rtw_memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
+       memset(SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
 
        switch (mode) {
        case WIRELESS_11B:
@@ -551,7 +551,7 @@ int rtw_parse_wpa_ie(u8 *wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwis
 
        /* pairwise_cipher */
        if (left >= 2) {
-               count = RTW_GET_LE16(pos);
+               count = get_unaligned_le16(pos);
                pos += 2;
                left -= 2;
 
@@ -619,7 +619,7 @@ int rtw_parse_wpa2_ie(u8 *rsn_ie, int rsn_ie_len, int *group_cipher, int *pairwi
 
        /* pairwise_cipher */
        if (left >= 2) {
-               count = RTW_GET_LE16(pos);
+               count = get_unaligned_le16(pos);
                pos += 2;
                left -= 2;
 
@@ -807,8 +807,8 @@ u8 *rtw_get_wps_attr(u8 *wps_ie, uint wps_ielen, u16 target_attr_id , u8 *buf_at
 
        while (attr_ptr - wps_ie < wps_ielen) {
                /*  4 = 2(Attribute ID) + 2(Length) */
-               u16 attr_id = RTW_GET_BE16(attr_ptr);
-               u16 attr_data_len = RTW_GET_BE16(attr_ptr + 2);
+               u16 attr_id = get_unaligned_be16(attr_ptr);
+               u16 attr_data_len = get_unaligned_be16(attr_ptr + 2);
                u16 attr_len = attr_data_len + 4;
 
                if (attr_id == target_attr_id) {
@@ -957,7 +957,7 @@ enum parse_res rtw_ieee802_11_parse_elems(u8 *start, uint len,
        u8 *pos = start;
        int unknown = 0;
 
-       _rtw_memset(elems, 0, sizeof(*elems));
+       memset(elems, 0, sizeof(*elems));
 
        while (left >= 2) {
                u8 id, elen;
@@ -1156,8 +1156,8 @@ void dump_wps_ie(u8 *ie, u32 ie_len)
 
        pos += 6;
        while (pos-ie < ie_len) {
-               id = RTW_GET_BE16(pos);
-               len = RTW_GET_BE16(pos + 2);
+               id = get_unaligned_be16(pos);
+               len = get_unaligned_be16(pos + 2);
                DBG_88E("%s ID:0x%04x, LEN:%u\n", __func__, id, len);
                pos += (4+len);
        }
@@ -1179,7 +1179,7 @@ void dump_p2p_ie(u8 *ie, u32 ie_len)
        pos += 6;
        while (pos-ie < ie_len) {
                id = *pos;
-               len = RTW_GET_LE16(pos+1);
+               len = get_unaligned_le16(pos+1);
                DBG_88E("%s ID:%u, LEN:%u\n", __func__, id, len);
                pos += (3+len);
        }
@@ -1253,7 +1253,7 @@ u8 *rtw_get_p2p_attr(u8 *p2p_ie, uint p2p_ielen, u8 target_attr_id , u8 *buf_att
        while (attr_ptr - p2p_ie < p2p_ielen) {
                /*  3 = 1(Attribute ID) + 2(Length) */
                u8 attr_id = *attr_ptr;
-               u16 attr_data_len = RTW_GET_LE16(attr_ptr + 1);
+               u16 attr_data_len = get_unaligned_le16(attr_ptr + 1);
                u16 attr_len = attr_data_len + 3;
 
                if (attr_id == target_attr_id) {
@@ -1310,8 +1310,7 @@ u32 rtw_set_p2p_attr_content(u8 *pbuf, u8 attr_id, u16 attr_len, u8 *pdata_attr)
 
        *pbuf = attr_id;
 
-       /* u16*)(pbuf + 1) = cpu_to_le16(attr_len); */
-       RTW_PUT_LE16(pbuf + 1, attr_len);
+       *(u16 *)(pbuf + 1) = cpu_to_le16(attr_len);
 
        if (pdata_attr)
                memcpy(pbuf + 3, pdata_attr, attr_len);
@@ -1333,9 +1332,9 @@ static uint rtw_p2p_attr_remove(u8 *ie, uint ielen_ori, u8 attr_id)
                        u8 *next_attr = target_attr+target_attr_len;
                        uint remain_len = ielen-(next_attr-ie);
 
-                       _rtw_memset(target_attr, 0, target_attr_len);
+                       memset(target_attr, 0, target_attr_len);
                        memcpy(target_attr, next_attr, remain_len);
-                       _rtw_memset(target_attr+remain_len, 0, target_attr_len);
+                       memset(target_attr+remain_len, 0, target_attr_len);
                        *(ie+1) -= target_attr_len;
                        ielen -= target_attr_len;
                } else {
@@ -1359,7 +1358,7 @@ void rtw_wlan_bssid_ex_remove_p2p_attr(struct wlan_bssid_ex *bss_ex, u8 attr_id)
                        uint remain_len = bss_ex->IELength-(next_ie_ori-bss_ex->IEs);
 
                        memcpy(next_ie, next_ie_ori, remain_len);
-                       _rtw_memset(next_ie+remain_len, 0, p2p_ielen_ori-p2p_ielen);
+                       memset(next_ie+remain_len, 0, p2p_ielen_ori-p2p_ielen);
                        bss_ex->IELength -= p2p_ielen_ori-p2p_ielen;
                }
        }
diff --git a/drivers/staging/rtl8188eu/core/rtw_io.c b/drivers/staging/rtl8188eu/core/rtw_io.c
deleted file mode 100644 (file)
index 7530532..0000000
+++ /dev/null
@@ -1,301 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-/*
-
-The purpose of rtw_io.c
-
-a. provides the API
-
-b. provides the protocol engine
-
-c. provides the software interface between caller and the hardware interface
-
-
-Compiler Flag Option:
-
-USB:
-   a. USE_ASYNC_IRP: Both sync/async operations are provided.
-
-Only sync read/rtw_write_mem operations are provided.
-
-jackson@realtek.com.tw
-
-*/
-
-#define _RTW_IO_C_
-#include <osdep_service.h>
-#include <drv_types.h>
-#include <rtw_io.h>
-#include <osdep_intf.h>
-#include <usb_ops.h>
-
-#define rtw_le16_to_cpu(val)           le16_to_cpu(val)
-#define rtw_le32_to_cpu(val)           le32_to_cpu(val)
-#define rtw_cpu_to_le16(val)           cpu_to_le16(val)
-#define rtw_cpu_to_le32(val)           cpu_to_le32(val)
-
-
-u8 _rtw_read8(struct adapter *adapter, u32 addr)
-{
-       u8 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl *pintfhdl = &(pio_priv->intf);
-       u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
-
-       _read8 = pintfhdl->io_ops._read8;
-       r_val = _read8(pintfhdl, addr);
-       return r_val;
-}
-
-u16 _rtw_read16(struct adapter *adapter, u32 addr)
-{
-       u16 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
-       _read16 = pintfhdl->io_ops._read16;
-
-       r_val = _read16(pintfhdl, addr);
-       return r_val;
-}
-
-u32 _rtw_read32(struct adapter *adapter, u32 addr)
-{
-       u32 r_val;
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       u32     (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
-       _read32 = pintfhdl->io_ops._read32;
-
-       r_val = _read32(pintfhdl, addr);
-       return r_val;
-}
-
-int _rtw_write8(struct adapter *adapter, u32 addr, u8 val)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
-       int ret;
-       _write8 = pintfhdl->io_ops._write8;
-
-       ret = _write8(pintfhdl, addr, val);
-
-       return RTW_STATUS_CODE(ret);
-}
-
-int _rtw_write16(struct adapter *adapter, u32 addr, u16 val)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
-       int ret;
-       _write16 = pintfhdl->io_ops._write16;
-
-       ret = _write16(pintfhdl, addr, val);
-
-       return RTW_STATUS_CODE(ret);
-}
-int _rtw_write32(struct adapter *adapter, u32 addr, u32 val)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
-       int ret;
-       _write32 = pintfhdl->io_ops._write32;
-
-       ret = _write32(pintfhdl, addr, val);
-
-       return RTW_STATUS_CODE(ret);
-}
-
-int _rtw_writeN(struct adapter *adapter, u32 addr , u32 length , u8 *pdata)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl *pintfhdl = (struct intf_hdl *)(&(pio_priv->intf));
-       int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata);
-       int ret;
-       _writeN = pintfhdl->io_ops._writeN;
-
-       ret = _writeN(pintfhdl, addr, length, pdata);
-
-       return RTW_STATUS_CODE(ret);
-}
-int _rtw_write8_async(struct adapter *adapter, u32 addr, u8 val)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
-       int ret;
-       _write8_async = pintfhdl->io_ops._write8_async;
-
-       ret = _write8_async(pintfhdl, addr, val);
-
-       return RTW_STATUS_CODE(ret);
-}
-
-int _rtw_write16_async(struct adapter *adapter, u32 addr, u16 val)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
-       int ret;
-
-       _write16_async = pintfhdl->io_ops._write16_async;
-       ret = _write16_async(pintfhdl, addr, val);
-
-       return RTW_STATUS_CODE(ret);
-}
-
-int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val)
-{
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
-       int ret;
-
-       _write32_async = pintfhdl->io_ops._write32_async;
-       ret = _write32_async(pintfhdl, addr, val);
-
-       return RTW_STATUS_CODE(ret);
-}
-
-void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-
-       if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
-               RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
-                        ("rtw_read_mem:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
-                        adapter->bDriverStopped, adapter->bSurpriseRemoved));
-            return;
-       }
-       _read_mem = pintfhdl->io_ops._read_mem;
-       _read_mem(pintfhdl, addr, cnt, pmem);
-}
-
-void _rtw_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-
-
-       _write_mem = pintfhdl->io_ops._write_mem;
-
-       _write_mem(pintfhdl, addr, cnt, pmem);
-
-}
-
-void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-
-
-       if (adapter->bDriverStopped || adapter->bSurpriseRemoved) {
-               RT_TRACE(_module_rtl871x_io_c_, _drv_info_,
-                        ("rtw_read_port:bDriverStopped(%d) OR bSurpriseRemoved(%d)",
-                        adapter->bDriverStopped, adapter->bSurpriseRemoved));
-            return;
-       }
-
-       _read_port = pintfhdl->io_ops._read_port;
-
-       _read_port(pintfhdl, addr, cnt, pmem);
-
-}
-
-void _rtw_read_port_cancel(struct adapter *adapter)
-{
-       void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &(pio_priv->intf);
-
-       _read_port_cancel = pintfhdl->io_ops._read_port_cancel;
-
-       if (_read_port_cancel)
-               _read_port_cancel(pintfhdl);
-}
-
-u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem)
-{
-       u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct  intf_hdl                *pintfhdl = &(pio_priv->intf);
-       u32 ret = _SUCCESS;
-
-
-       _write_port = pintfhdl->io_ops._write_port;
-
-       ret = _write_port(pintfhdl, addr, cnt, pmem);
-
-
-       return ret;
-}
-
-u32 _rtw_write_port_and_wait(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem, int timeout_ms)
-{
-       int ret = _SUCCESS;
-       struct xmit_buf *pxmitbuf = (struct xmit_buf *)pmem;
-       struct submit_ctx sctx;
-
-       rtw_sctx_init(&sctx, timeout_ms);
-       pxmitbuf->sctx = &sctx;
-
-       ret = _rtw_write_port(adapter, addr, cnt, pmem);
-
-       if (ret == _SUCCESS)
-               ret = rtw_sctx_wait(&sctx);
-
-       return ret;
-}
-
-void _rtw_write_port_cancel(struct adapter *adapter)
-{
-       void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
-       struct io_priv *pio_priv = &adapter->iopriv;
-       struct intf_hdl *pintfhdl = &(pio_priv->intf);
-
-       _write_port_cancel = pintfhdl->io_ops._write_port_cancel;
-
-       if (_write_port_cancel)
-               _write_port_cancel(pintfhdl);
-}
-
-int rtw_init_io_priv(struct adapter *padapter, void (*set_intf_ops)(struct _io_ops *pops))
-{
-       struct io_priv  *piopriv = &padapter->iopriv;
-       struct intf_hdl *pintf = &piopriv->intf;
-
-       if (set_intf_ops == NULL)
-               return _FAIL;
-
-       piopriv->padapter = padapter;
-       pintf->padapter = padapter;
-       pintf->pintf_dev = adapter_to_dvobj(padapter);
-
-       set_intf_ops(&pintf->io_ops);
-
-       return _SUCCESS;
-}
index f1398ab01d7ba2d974ad0a43a8f5e175854fbf78..a97da87f317cabe65fdd578325c83a2089021c9a 100644 (file)
@@ -26,7 +26,6 @@
 #include <hal_intf.h>
 
 #include <usb_osintf.h>
-#include <usb_ops.h>
 
 extern void indicate_wx_scan_complete_event(struct adapter *padapter);
 
@@ -86,7 +85,7 @@ u8 rtw_do_join(struct adapter *padapter)
 
        pmlmepriv->to_join = true;
 
-       if (_rtw_queue_empty(queue)) {
+       if (list_empty(&queue->queue)) {
                spin_unlock_bh(&(pmlmepriv->scanned_queue.lock));
                _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
 
@@ -127,7 +126,7 @@ u8 rtw_do_join(struct adapter *padapter)
 
                                pibss = padapter->registrypriv.dev_network.MacAddress;
 
-                               _rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
+                               memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
                                memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
 
                                rtw_update_registrypriv_dev_network(padapter);
@@ -606,7 +605,7 @@ u8 rtw_set_802_11_remove_wep(struct adapter *padapter, u32 keyindex)
                int res;
                struct security_priv *psecuritypriv = &(padapter->securitypriv);
                if (keyindex < 4) {
-                       _rtw_memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
+                       memset(&psecuritypriv->dot11DefKey[keyindex], 0, 16);
                        res = rtw_set_key(padapter, psecuritypriv, keyindex, 0);
                        psecuritypriv->dot11DefKeylen[keyindex] = 0;
                        if (res == _FAIL)
@@ -870,9 +869,9 @@ u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key)
                        ret = _FAIL;
                        goto exit;
                }
-               _rtw_memset(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
-               _rtw_memset(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
-               _rtw_memset(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
+               memset(&padapter->securitypriv.dot118021XGrpKey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
+               memset(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
+               memset(&padapter->securitypriv.dot118021XGrprxmickey[(u8)((key->KeyIndex) & 0x03)], 0, 16);
 
                if ((key->KeyIndex & 0x10000000)) {
                        memcpy(&padapter->securitypriv.dot118021XGrptxmickey[(u8)((key->KeyIndex) & 0x03)], key->KeyMaterial + 16, 8);
@@ -932,7 +931,7 @@ u8 rtw_set_802_11_add_key(struct adapter *padapter, struct ndis_802_11_key *key)
                stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
 
                if (stainfo != NULL) {
-                       _rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16);/*  clear keybuffer */
+                       memset(&stainfo->dot118021x_UncstKey, 0, 16);/*  clear keybuffer */
 
                        memcpy(&stainfo->dot118021x_UncstKey, key->KeyMaterial, 16);
 
@@ -989,7 +988,7 @@ u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove
        if (bgroup) {
                /*  clear group key by index */
 
-               _rtw_memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
+               memset(&padapter->securitypriv.dot118021XGrpKey[keyIndex], 0, 16);
 
                /*  \todo Send a H2C Command to Firmware for removing this Key in CAM Entry. */
        } else {
@@ -997,7 +996,7 @@ u8 rtw_set_802_11_remove_key(struct adapter *padapter, struct ndis_802_11_remove
                stainfo = rtw_get_stainfo(&padapter->stapriv, pbssid);
                if (stainfo) {
                        /*  clear key by BSSID */
-                       _rtw_memset(&stainfo->dot118021x_UncstKey, 0, 16);
+                       memset(&stainfo->dot118021x_UncstKey, 0, 16);
 
                        /*  \todo Send a H2C Command to Firmware for disable this Key in CAM Entry. */
                } else {
index 87d6f063476b1535c4be14b7ebeb8754ab5b4679..384be22052e58b8e3d0f4eaba1b2c1d2620e8fe1 100644 (file)
@@ -88,8 +88,8 @@ void InitLed871x(struct adapter *padapter, struct LED_871x *pLed)
 /*  */
 void DeInitLed871x(struct LED_871x *pLed)
 {
-       _cancel_workitem_sync(&(pLed->BlinkWorkItem));
-       _cancel_timer_ex(&(pLed->BlinkTimer));
+       cancel_work_sync(&(pLed->BlinkWorkItem));
+       del_timer_sync(&(pLed->BlinkTimer));
        ResetLedStatus(pLed);
 }
 
@@ -251,11 +251,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                        if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
                                return;
                        if (pLed->bLedLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedBlinkInProgress = false;
                        }
 
@@ -273,11 +273,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                        if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
                                return;
                        if (pLed->bLedNoLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedNoLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedBlinkInProgress = false;
                        }
                        pLed->bLedLinkBlinkInProgress = true;
@@ -296,15 +296,15 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                        if (IS_LED_WPS_BLINKING(pLed))
                                return;
                        if (pLed->bLedNoLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedNoLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                 pLed->bLedLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedBlinkInProgress = false;
                        }
                        pLed->bLedScanBlinkInProgress = true;
@@ -323,11 +323,11 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                        if (pLed->CurrLedState == LED_BLINK_SCAN || IS_LED_WPS_BLINKING(pLed))
                                return;
                        if (pLed->bLedNoLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedNoLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedLinkBlinkInProgress = false;
                        }
                        pLed->bLedBlinkInProgress = true;
@@ -344,19 +344,19 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
        case LED_CTL_START_WPS_BOTTON:
                 if (!pLed->bLedWPSBlinkInProgress) {
                        if (pLed->bLedNoLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedNoLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedLinkBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                 pLed->bLedLinkBlinkInProgress = false;
                        }
                        if (pLed->bLedBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedBlinkInProgress = false;
                        }
                        if (pLed->bLedScanBlinkInProgress) {
-                               _cancel_timer_ex(&(pLed->BlinkTimer));
+                               del_timer_sync(&(pLed->BlinkTimer));
                                pLed->bLedScanBlinkInProgress = false;
                        }
                        pLed->bLedWPSBlinkInProgress = true;
@@ -370,23 +370,23 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                break;
        case LED_CTL_STOP_WPS:
                if (pLed->bLedNoLinkBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedNoLinkBlinkInProgress = false;
                }
                if (pLed->bLedLinkBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                         pLed->bLedLinkBlinkInProgress = false;
                }
                if (pLed->bLedBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedBlinkInProgress = false;
                }
                if (pLed->bLedScanBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedScanBlinkInProgress = false;
                }
                if (pLed->bLedWPSBlinkInProgress)
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                else
                        pLed->bLedWPSBlinkInProgress = true;
                pLed->CurrLedState = LED_BLINK_WPS_STOP;
@@ -400,7 +400,7 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                break;
        case LED_CTL_STOP_WPS_FAIL:
                if (pLed->bLedWPSBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedWPSBlinkInProgress = false;
                }
                pLed->bLedNoLinkBlinkInProgress = true;
@@ -415,23 +415,23 @@ static void SwLedControlMode1(struct adapter *padapter, enum LED_CTL_MODE LedAct
                pLed->CurrLedState = RTW_LED_OFF;
                pLed->BlinkingLedState = RTW_LED_OFF;
                if (pLed->bLedNoLinkBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedNoLinkBlinkInProgress = false;
                }
                if (pLed->bLedLinkBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedLinkBlinkInProgress = false;
                }
                if (pLed->bLedBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedBlinkInProgress = false;
                }
                if (pLed->bLedWPSBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedWPSBlinkInProgress = false;
                }
                if (pLed->bLedScanBlinkInProgress) {
-                       _cancel_timer_ex(&(pLed->BlinkTimer));
+                       del_timer_sync(&(pLed->BlinkTimer));
                        pLed->bLedScanBlinkInProgress = false;
                }
                SwLedOff(padapter, pLed);
index 155282ef78fb895504d514755f5139af0d1780f6..0cb9e152cc5ec86020fc820ccca5a0f264ba4d24 100644 (file)
@@ -59,7 +59,7 @@ int _rtw_init_mlme_priv(struct adapter *padapter)
 
        set_scanned_network_val(pmlmepriv, 0);
 
-       _rtw_memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
+       memset(&pmlmepriv->assoc_ssid, 0, sizeof(struct ndis_802_11_ssid));
 
        pbuf = vzalloc(MAX_BSS_CNT * (sizeof(struct wlan_network)));
 
@@ -72,9 +72,9 @@ int _rtw_init_mlme_priv(struct adapter *padapter)
        pnetwork = (struct wlan_network *)pbuf;
 
        for (i = 0; i < MAX_BSS_CNT; i++) {
-               _rtw_init_listhead(&(pnetwork->list));
+               INIT_LIST_HEAD(&(pnetwork->list));
 
-               rtw_list_insert_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue));
+               list_add_tail(&(pnetwork->list), &(pmlmepriv->free_bss_pool.queue));
 
                pnetwork++;
        }
@@ -135,7 +135,7 @@ int _rtw_enqueue_network(struct __queue *queue, struct wlan_network *pnetwork)
 
        spin_lock_bh(&queue->lock);
 
-       rtw_list_insert_tail(&pnetwork->list, &queue->queue);
+       list_add_tail(&pnetwork->list, &queue->queue);
 
        spin_unlock_bh(&queue->lock);
 
@@ -149,12 +149,12 @@ struct    wlan_network *_rtw_dequeue_network(struct __queue *queue)
 
        spin_lock_bh(&queue->lock);
 
-       if (_rtw_queue_empty(queue)) {
+       if (list_empty(&queue->queue)) {
                pnetwork = NULL;
        } else {
                pnetwork = container_of((&queue->queue)->next, struct wlan_network, list);
 
-               rtw_list_delete(&(pnetwork->list));
+               list_del_init(&(pnetwork->list));
        }
 
        spin_unlock_bh(&queue->lock);
@@ -170,7 +170,7 @@ struct      wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
 
        spin_lock_bh(&free_queue->lock);
 
-       if (_rtw_queue_empty(free_queue) == true) {
+       if (list_empty(&free_queue->queue)) {
                pnetwork = NULL;
                goto exit;
        }
@@ -178,7 +178,7 @@ struct      wlan_network *_rtw_alloc_network(struct mlme_priv *pmlmepriv)/* _queue *f
 
        pnetwork = container_of(plist , struct wlan_network, list);
 
-       rtw_list_delete(&pnetwork->list);
+       list_del_init(&pnetwork->list);
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("_rtw_alloc_network: ptr=%p\n", plist));
        pnetwork->network_type = 0;
@@ -216,8 +216,8 @@ void _rtw_free_network(struct       mlme_priv *pmlmepriv , struct wlan_network *pnetwo
                        return;
        }
        spin_lock_bh(&free_queue->lock);
-       rtw_list_delete(&(pnetwork->list));
-       rtw_list_insert_tail(&(pnetwork->list), &(free_queue->queue));
+       list_del_init(&(pnetwork->list));
+       list_add_tail(&(pnetwork->list), &(free_queue->queue));
        pmlmepriv->num_of_scanned--;
        spin_unlock_bh(&free_queue->lock);
 }
@@ -230,8 +230,8 @@ void _rtw_free_network_nolock(struct        mlme_priv *pmlmepriv, struct wlan_network *
                return;
        if (pnetwork->fixed)
                return;
-       rtw_list_delete(&(pnetwork->list));
-       rtw_list_insert_tail(&(pnetwork->list), get_list_head(free_queue));
+       list_del_init(&(pnetwork->list));
+       list_add_tail(&(pnetwork->list), get_list_head(free_queue));
        pmlmepriv->num_of_scanned--;
 }
 
@@ -278,7 +278,7 @@ void _rtw_free_network_queue(struct adapter *padapter, u8 isfreeall)
        phead = get_list_head(scanned_queue);
        plist = phead->next;
 
-       while (rtw_end_of_queue_search(phead, plist) == false) {
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
 
                plist = plist->next;
@@ -438,7 +438,7 @@ struct      wlan_network    *rtw_get_oldest_wlan_network(struct __queue *scanned_queue)
        plist = phead->next;
 
        while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
+               if (phead == plist)
                        break;
 
                pwlan = container_of(plist, struct wlan_network, list);
@@ -522,10 +522,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork        = container_of(plist, struct wlan_network, list);
 
                if (is_same_network(&(pnetwork->network), target))
@@ -537,8 +534,8 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
        }
        /* If we didn't find a match, then get a new network slot to initialize
         * with this beacon's information */
-       if (rtw_end_of_queue_search(phead, plist) == true) {
-               if (_rtw_queue_empty(&(pmlmepriv->free_bss_pool)) == true) {
+       if (phead == plist) {
+               if (list_empty(&(pmlmepriv->free_bss_pool.queue))) {
                        /* If there are no more slots, expire the oldest */
                        pnetwork = oldest;
 
@@ -575,7 +572,7 @@ void rtw_update_scanned_network(struct adapter *adapter, struct wlan_bssid_ex *t
                        /* bss info not receiving from the right channel */
                        if (pnetwork->network.PhyInfo.SignalQuality == 101)
                                pnetwork->network.PhyInfo.SignalQuality = 0;
-                       rtw_list_insert_tail(&(pnetwork->list), &(queue->queue));
+                       list_add_tail(&(pnetwork->list), &(queue->queue));
                }
        } else {
                /* we have an entry and we are going to update it. But this entry may
@@ -728,10 +725,7 @@ void rtw_surveydone_event_callback(struct adapter  *adapter, u8 *pbuf)
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_surveydone_event_callback: fw_state:%x\n\n", get_fwstate(pmlmepriv)));
 
        if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
-               u8 timer_cancelled;
-
-               _cancel_timer(&pmlmepriv->scan_to_timer, &timer_cancelled);
-
+               del_timer_sync(&pmlmepriv->scan_to_timer);
                _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
        } else {
                RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("nic status=%x, survey done event comes too late!\n", get_fwstate(pmlmepriv)));
@@ -754,7 +748,7 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
 
                                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("switching to adhoc master\n"));
 
-                                       _rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
+                                       memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
                                        memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
 
                                        rtw_update_registrypriv_dev_network(adapter);
@@ -804,8 +798,6 @@ void rtw_surveydone_event_callback(struct adapter   *adapter, u8 *pbuf)
        rtw_os_xmit_schedule(adapter);
 
        pmlmeext = &adapter->mlmeextpriv;
-       if (pmlmeext->sitesurvey_res.bss_cnt == 0)
-               rtw_hal_sreset_reset(adapter);
 }
 
 void rtw_dummy_event_callback(struct adapter *adapter , u8 *pbuf)
@@ -831,8 +823,8 @@ static void free_scanqueue(struct   mlme_priv *pmlmepriv)
 
        while (plist != phead) {
                ptemp = plist->next;
-               rtw_list_delete(plist);
-               rtw_list_insert_tail(plist, &free_queue->queue);
+               list_del_init(plist);
+               list_add_tail(plist, &free_queue->queue);
                plist = ptemp;
                pmlmepriv->num_of_scanned--;
        }
@@ -1002,11 +994,11 @@ static struct sta_info *rtw_joinbss_update_stainfo(struct adapter *padapter, str
                        padapter->securitypriv.bgrpkey_handshake = false;
                        psta->ieee8021x_blocked = true;
                        psta->dot118021XPrivacy = padapter->securitypriv.dot11PrivacyAlgrthm;
-                       _rtw_memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof(union Keytype));
-                       _rtw_memset((u8 *)&psta->dot11tkiprxmickey, 0, sizeof(union Keytype));
-                       _rtw_memset((u8 *)&psta->dot11tkiptxmickey, 0, sizeof(union Keytype));
-                       _rtw_memset((u8 *)&psta->dot11txpn, 0, sizeof(union pn48));
-                       _rtw_memset((u8 *)&psta->dot11rxpn, 0, sizeof(union pn48));
+                       memset((u8 *)&psta->dot118021x_UncstKey, 0, sizeof(union Keytype));
+                       memset((u8 *)&psta->dot11tkiprxmickey, 0, sizeof(union Keytype));
+                       memset((u8 *)&psta->dot11tkiptxmickey, 0, sizeof(union Keytype));
+                       memset((u8 *)&psta->dot11txpn, 0, sizeof(union pn48));
+                       memset((u8 *)&psta->dot11rxpn, 0, sizeof(union pn48));
                }
                /*
                 * Commented by Albert 2012/07/21
@@ -1108,7 +1100,6 @@ static void rtw_joinbss_update_network(struct adapter *padapter, struct wlan_net
 
 void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
 {
-       u8 timer_cancelled;
        struct sta_info *ptarget_sta = NULL, *pcur_sta = NULL;
        struct  sta_priv *pstapriv = &adapter->stapriv;
        struct  mlme_priv       *pmlmepriv = &(adapter->mlmepriv);
@@ -1201,7 +1192,7 @@ void rtw_joinbss_event_prehandle(struct adapter *adapter, u8 *pbuf)
                                }
 
                        /* s5. Cancle assoc_timer */
-                       _cancel_timer(&pmlmepriv->assoc_timer, &timer_cancelled);
+                       del_timer_sync(&pmlmepriv->assoc_timer);
 
                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("Cancle assoc_timer\n"));
 
@@ -1421,7 +1412,7 @@ void rtw_stadel_event_callback(struct adapter *adapter, u8 *pbuf)
 
                        memcpy(pdev_network, &tgt_network->network, get_wlan_bssid_ex_sz(&tgt_network->network));
 
-                       _rtw_memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
+                       memset(&pdev_network->Ssid, 0, sizeof(struct ndis_802_11_ssid));
                        memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid, sizeof(struct ndis_802_11_ssid));
 
                        rtw_update_registrypriv_dev_network(adapter);
@@ -1518,7 +1509,6 @@ static void rtw_auto_scan_handler(struct adapter *padapter)
 
 void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
 {
-       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        struct registry_priv *pregistrypriv = &adapter->registrypriv;
 
        if (!adapter)
@@ -1541,23 +1531,6 @@ void rtw_dynamic_check_timer_handlder(struct adapter *adapter)
                        rtw_auto_scan_handler(adapter);
                }
        }
-
-       rcu_read_lock();
-
-       if (rcu_dereference(adapter->pnetdev->rx_handler_data) &&
-           (check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE) == true)) {
-               /*  expire NAT2.5 entry */
-               nat25_db_expire(adapter);
-
-               if (adapter->pppoe_connection_in_progress > 0)
-                       adapter->pppoe_connection_in_progress--;
-
-               /*  due to rtw_dynamic_check_timer_handlder() is called every 2 seconds */
-               if (adapter->pppoe_connection_in_progress > 0)
-                       adapter->pppoe_connection_in_progress--;
-       }
-
-       rcu_read_unlock();
 }
 
 #define RTW_SCAN_RESULT_EXPIRE 2000
@@ -1635,7 +1608,7 @@ int rtw_select_and_join_from_scanned_queue(struct mlme_priv *pmlmepriv)
        phead = get_list_head(queue);
        adapter = (struct adapter *)pmlmepriv->nic_hdl;
        pmlmepriv->pscanned = phead->next;
-       while (!rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) {
+       while (phead != pmlmepriv->pscanned) {
                pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
                if (pnetwork == NULL) {
                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_, ("%s return _FAIL:(pnetwork==NULL)\n", __func__));
@@ -1689,26 +1662,26 @@ int rtw_set_auth(struct adapter *adapter, struct security_priv *psecuritypriv)
        struct  cmd_priv *pcmdpriv = &(adapter->cmdpriv);
        int             res = _SUCCESS;
 
-       pcmd = (struct  cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd == NULL) {
                res = _FAIL;  /* try again */
                goto exit;
        }
 
-       psetauthparm = (struct setauth_parm *)rtw_zmalloc(sizeof(struct setauth_parm));
+       psetauthparm = kzalloc(sizeof(struct setauth_parm), GFP_KERNEL);
        if (psetauthparm == NULL) {
                kfree(pcmd);
                res = _FAIL;
                goto exit;
        }
-       _rtw_memset(psetauthparm, 0, sizeof(struct setauth_parm));
+       memset(psetauthparm, 0, sizeof(struct setauth_parm));
        psetauthparm->mode = (unsigned char)psecuritypriv->dot11AuthAlgrthm;
        pcmd->cmdcode = _SetAuth_CMD_;
        pcmd->parmbuf = (unsigned char *)psetauthparm;
        pcmd->cmdsz =  (sizeof(struct setauth_parm));
        pcmd->rsp = NULL;
        pcmd->rspsz = 0;
-       _rtw_init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
                 ("after enqueue set_auth_cmd, auth_mode=%x\n",
                 psecuritypriv->dot11AuthAlgrthm));
@@ -1726,17 +1699,17 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
        struct mlme_priv                *pmlmepriv = &(adapter->mlmepriv);
        int     res = _SUCCESS;
 
-       pcmd = (struct  cmd_obj *)rtw_zmalloc(sizeof(struct     cmd_obj));
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd == NULL)
                return _FAIL;  /* try again */
 
-       psetkeyparm = (struct setkey_parm *)rtw_zmalloc(sizeof(struct setkey_parm));
+       psetkeyparm = kzalloc(sizeof(struct setkey_parm), GFP_KERNEL);
        if (psetkeyparm == NULL) {
                res = _FAIL;
                goto err_free_cmd;
        }
 
-       _rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm));
+       memset(psetkeyparm, 0, sizeof(struct setkey_parm));
 
        if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X) {
                psetkeyparm->algorithm = (unsigned char)psecuritypriv->dot118021XGrpPrivacy;
@@ -1789,7 +1762,7 @@ int rtw_set_key(struct adapter *adapter, struct security_priv *psecuritypriv, in
        pcmd->cmdsz =  (sizeof(struct setkey_parm));
        pcmd->rsp = NULL;
        pcmd->rspsz = 0;
-       _rtw_init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        res = rtw_enqueue_cmd(pcmdpriv, pcmd);
        return res;
 
@@ -2070,7 +2043,7 @@ unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_
 
                out_len = *pout_len;
 
-               _rtw_memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
+               memset(&ht_capie, 0, sizeof(struct rtw_ieee80211_ht_cap));
 
                ht_capie.cap_info = IEEE80211_HT_CAP_SUP_WIDTH |
                                    IEEE80211_HT_CAP_SGI_20 |
index f5b49f351a6ade13a909a34b3b2f243040feb6ff..dc194324899d3bd2ba377a2e754074891a1719c9 100644 (file)
@@ -256,7 +256,7 @@ static void init_mlme_ext_priv_value(struct adapter *padapter)
        pmlmeinfo->enc_algo = _NO_PRIVACY_;
        pmlmeinfo->authModeToggle = 0;
 
-       _rtw_memset(pmlmeinfo->chg_txt, 0, 128);
+       memset(pmlmeinfo->chg_txt, 0, 128);
 
        pmlmeinfo->slotTime = SHORT_SLOT_TIME;
        pmlmeinfo->preamble_mode = PREAMBLE_AUTO;
@@ -328,7 +328,7 @@ static u8 init_channel_set(struct adapter *padapter, u8 ChannelPlan, struct rt_c
        u8 b2_4GBand = false;
        u8 Index2G = 0;
 
-       _rtw_memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM);
+       memset(channel_set, 0, sizeof(struct rt_channel_info) * MAX_CHANNEL_NUM);
 
        if (ChannelPlan >= RT_CHANNEL_DOMAIN_MAX && ChannelPlan != RT_CHANNEL_DOMAIN_REALTEK_DEFINE) {
                DBG_88E("ChannelPlan ID %x error !!!!!\n", ChannelPlan);
@@ -408,9 +408,8 @@ void free_mlme_ext_priv(struct mlme_ext_priv *pmlmeext)
                return;
 
        if (padapter->bDriverStopped) {
-               _cancel_timer_ex(&pmlmeext->survey_timer);
-               _cancel_timer_ex(&pmlmeext->link_timer);
-               /* _cancel_timer_ex(&pmlmeext->ADDBA_timer); */
+               del_timer_sync(&pmlmeext->survey_timer);
+               del_timer_sync(&pmlmeext->link_timer);
        }
 }
 
@@ -817,8 +816,8 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
                pstat->auth_seq = 0;
        } else {
                spin_lock_bh(&pstapriv->asoc_list_lock);
-               if (!rtw_is_list_empty(&pstat->asoc_list)) {
-                       rtw_list_delete(&pstat->asoc_list);
+               if (!list_empty(&pstat->asoc_list)) {
+                       list_del_init(&pstat->asoc_list);
                        pstapriv->asoc_list_cnt--;
                }
                spin_unlock_bh(&pstapriv->asoc_list_lock);
@@ -829,8 +828,8 @@ unsigned int OnAuth(struct adapter *padapter, struct recv_frame *precv_frame)
        }
 
        spin_lock_bh(&pstapriv->auth_list_lock);
-       if (rtw_is_list_empty(&pstat->auth_list)) {
-               rtw_list_insert_tail(&pstat->auth_list, &pstapriv->auth_list);
+       if (list_empty(&pstat->auth_list)) {
+               list_add_tail(&pstat->auth_list, &pstapriv->auth_list);
                pstapriv->auth_list_cnt++;
        }
        spin_unlock_bh(&pstapriv->auth_list_lock);
@@ -914,7 +913,7 @@ auth_fail:
                rtw_free_stainfo(padapter , pstat);
 
        pstat = &stat;
-       _rtw_memset((char *)pstat, '\0', sizeof(stat));
+       memset((char *)pstat, '\0', sizeof(stat));
        pstat->auth_seq = 2;
        memcpy(pstat->hwaddr, sa, 6);
 
@@ -1054,7 +1053,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
                goto asoc_class2_error;
        }
 
-       capab_info = RTW_GET_LE16(pframe + WLAN_HDR_A3_LEN);
+       capab_info = get_unaligned_le16(pframe + WLAN_HDR_A3_LEN);
 
        left = pkt_len - (IEEE80211_3ADDR_LEN + ie_offset);
        pos = pframe + (IEEE80211_3ADDR_LEN + ie_offset);
@@ -1146,7 +1145,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
        pstat->wpa2_group_cipher = 0;
        pstat->wpa_pairwise_cipher = 0;
        pstat->wpa2_pairwise_cipher = 0;
-       _rtw_memset(pstat->wpa_ie, 0, sizeof(pstat->wpa_ie));
+       memset(pstat->wpa_ie, 0, sizeof(pstat->wpa_ie));
        if ((psecuritypriv->wpa_psk & BIT(1)) && elems.rsn_ie) {
                int group_cipher = 0, pairwise_cipher = 0;
 
@@ -1314,7 +1313,7 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
        }
 
        /* save HT capabilities in the sta object */
-       _rtw_memset(&pstat->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
+       memset(&pstat->htpriv.ht_cap, 0, sizeof(struct rtw_ieee80211_ht_cap));
        if (elems.ht_capabilities && elems.ht_capabilities_len >= sizeof(struct rtw_ieee80211_ht_cap)) {
                pstat->flags |= WLAN_STA_HT;
 
@@ -1407,16 +1406,16 @@ unsigned int OnAssocReq(struct adapter *padapter, struct recv_frame *precv_frame
        pstat->state |= WIFI_FW_ASSOC_SUCCESS;
 
        spin_lock_bh(&pstapriv->auth_list_lock);
-       if (!rtw_is_list_empty(&pstat->auth_list)) {
-               rtw_list_delete(&pstat->auth_list);
+       if (!list_empty(&pstat->auth_list)) {
+               list_del_init(&pstat->auth_list);
                pstapriv->auth_list_cnt--;
        }
        spin_unlock_bh(&pstapriv->auth_list_lock);
 
        spin_lock_bh(&pstapriv->asoc_list_lock);
-       if (rtw_is_list_empty(&pstat->asoc_list)) {
+       if (list_empty(&pstat->asoc_list)) {
                pstat->expire_to = pstapriv->expire_to;
-               rtw_list_insert_tail(&pstat->asoc_list, &pstapriv->asoc_list);
+               list_add_tail(&pstat->asoc_list, &pstapriv->asoc_list);
                pstapriv->asoc_list_cnt++;
        }
        spin_unlock_bh(&pstapriv->asoc_list_lock);
@@ -1495,7 +1494,7 @@ unsigned int OnAssocRsp(struct adapter *padapter, struct recv_frame *precv_frame
        if (pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS)
                return _SUCCESS;
 
-       _cancel_timer_ex(&pmlmeext->link_timer);
+       del_timer_sync(&pmlmeext->link_timer);
 
        /* status */
        status = le16_to_cpu(*(__le16 *)(pframe + WLAN_HDR_A3_LEN + 2));
@@ -1578,7 +1577,7 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
 
 #ifdef CONFIG_88EU_P2P
        if (pwdinfo->rx_invitereq_info.scan_op_ch_only) {
-               _cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey);
+               del_timer_sync(&pwdinfo->reset_ch_sitesurvey);
                _set_timer(&pwdinfo->reset_ch_sitesurvey, 10);
        }
 #endif /* CONFIG_88EU_P2P */
@@ -1600,8 +1599,8 @@ unsigned int OnDeAuth(struct adapter *padapter, struct recv_frame *precv_frame)
                        u8 updated = 0;
 
                        spin_lock_bh(&pstapriv->asoc_list_lock);
-                       if (!rtw_is_list_empty(&psta->asoc_list)) {
-                               rtw_list_delete(&psta->asoc_list);
+                       if (!list_empty(&psta->asoc_list)) {
+                               list_del_init(&psta->asoc_list);
                                pstapriv->asoc_list_cnt--;
                                updated = ap_free_sta(padapter, psta, false, reason);
                        }
@@ -1642,7 +1641,7 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
 
 #ifdef CONFIG_88EU_P2P
        if (pwdinfo->rx_invitereq_info.scan_op_ch_only) {
-               _cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey);
+               del_timer_sync(&pwdinfo->reset_ch_sitesurvey);
                _set_timer(&pwdinfo->reset_ch_sitesurvey, 10);
        }
 #endif /* CONFIG_88EU_P2P */
@@ -1664,8 +1663,8 @@ unsigned int OnDisassoc(struct adapter *padapter, struct recv_frame *precv_frame
                        u8 updated = 0;
 
                        spin_lock_bh(&pstapriv->asoc_list_lock);
-                       if (!rtw_is_list_empty(&psta->asoc_list)) {
-                               rtw_list_delete(&psta->asoc_list);
+                       if (!list_empty(&psta->asoc_list)) {
+                               list_del_init(&psta->asoc_list);
                                pstapriv->asoc_list_cnt--;
                                updated = ap_free_sta(padapter, psta, false, reason);
                        }
@@ -1789,7 +1788,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
                                issue_action_BA(padapter, addr, RTW_WLAN_ACTION_ADDBA_RESP, 37);/* reject ADDBA Req */
                        break;
                case RTW_WLAN_ACTION_ADDBA_RESP: /* ADDBA response */
-                       status = RTW_GET_LE16(&frame_body[3]);
+                       status = get_unaligned_le16(&frame_body[3]);
                        tid = ((frame_body[5] >> 2) & 0x7);
                        if (status == 0) {      /* successful */
                                DBG_88E("agg_enable for TID=%d\n", tid);
@@ -1803,7 +1802,7 @@ unsigned int OnAction_back(struct adapter *padapter, struct recv_frame *precv_fr
                        if ((frame_body[3] & BIT(3)) == 0) {
                                psta->htpriv.agg_enable_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf));
                                psta->htpriv.candidate_tid_bitmap &= ~(1 << ((frame_body[3] >> 4) & 0xf));
-                               reason_code = RTW_GET_LE16(&frame_body[4]);
+                               reason_code = get_unaligned_le16(&frame_body[4]);
                        } else if ((frame_body[3] & BIT(3)) == BIT(3)) {
                                tid = (frame_body[3] >> 4) & 0x0F;
                                preorder_ctrl =  &psta->recvreorder_ctrl[tid];
@@ -1861,7 +1860,7 @@ void issue_p2p_GO_request(struct adapter *padapter, u8 *raddr)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -2208,7 +2207,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -2241,7 +2240,7 @@ static void issue_p2p_GO_response(struct adapter *padapter, u8 *raddr, u8 *frame
        rtw_get_wps_attr_content(wpsie, wpsielen, WPS_ATTR_DEVICE_PWID, (u8 *)&be_tmp, &wps_devicepassword_id_len);
        wps_devicepassword_id = be16_to_cpu(be_tmp);
 
-       _rtw_memset(wpsie, 0x00, 255);
+       memset(wpsie, 0x00, 255);
        wpsielen = 0;
 
        /*      WPS Section */
@@ -2570,7 +2569,7 @@ static void issue_p2p_GO_confirm(struct adapter *padapter, u8 *raddr, u8 result)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -2737,7 +2736,7 @@ void issue_p2p_invitation_request(struct adapter *padapter, u8 *raddr)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -2990,7 +2989,7 @@ void issue_p2p_invitation_response(struct adapter *padapter, u8 *raddr, u8 dialo
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -3185,7 +3184,7 @@ void issue_p2p_provision_request(struct adapter *padapter, u8 *pssid, u8 ussidle
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -3297,7 +3296,7 @@ void issue_probersp_p2p(struct adapter *padapter, unsigned char *da)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -3549,7 +3548,7 @@ static int _issue_probereq_p2p(struct adapter *padapter, u8 *da, int wait_ack)
        update_mgntframe_attrib(padapter, pattrib);
 
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -3912,7 +3911,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                return _FAIL;
 
 #ifdef CONFIG_88EU_P2P
-       _cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey);
+       del_timer_sync(&pwdinfo->reset_ch_sitesurvey);
        /*      Do nothing if the driver doesn't enable the P2P function. */
        if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE) || rtw_p2p_chk_state(pwdinfo, P2P_STATE_IDLE))
                return _SUCCESS;
@@ -3922,7 +3921,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
        switch (frame_body[6]) { /* OUI Subtype */
        case P2P_GO_NEGO_REQ:
                DBG_88E("[%s] Got GO Nego Req Frame\n", __func__);
-               _rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
+               memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
 
                if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_REQ))
                        rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
@@ -3930,7 +3929,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_FAIL)) {
                        /*      Commented by Albert 20110526 */
                        /*      In this case, this means the previous nego fail doesn't be reset yet. */
-                       _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
+                       del_timer_sync(&pwdinfo->restore_p2p_state_timer);
                        /*      Restore the previous p2p state */
                        rtw_p2p_set_state(pwdinfo, rtw_p2p_pre_state(pwdinfo));
                        DBG_88E("[%s] Restore the previous p2p state to %d\n", __func__, rtw_p2p_state(pwdinfo));
@@ -3960,7 +3959,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                if (rtw_p2p_chk_state(pwdinfo, P2P_STATE_GONEGO_ING)) {
                        /*      Commented by Albert 20110425 */
                        /*      The restore timer is enabled when issuing the nego request frame of rtw_p2p_connect function. */
-                       _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
+                       del_timer_sync(&pwdinfo->restore_p2p_state_timer);
                        pwdinfo->nego_req_info.benable = false;
                        result = process_p2p_group_negotation_resp(pwdinfo, frame_body, len);
                        issue_p2p_GO_confirm(pwdinfo->padapter, GetAddr2Ptr(pframe), result);
@@ -4023,7 +4022,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                                if (invitation_flag & P2P_INVITATION_FLAGS_PERSISTENT) {
                                        /*      Re-invoke the persistent group. */
 
-                                       _rtw_memset(&group_id, 0x00, sizeof(struct group_id_info));
+                                       memset(&group_id, 0x00, sizeof(struct group_id_info));
                                        rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *)&group_id, &attr_contentlen);
                                        if (attr_contentlen) {
                                                if (!memcmp(group_id.go_device_addr, myid(&padapter->eeprompriv), ETH_ALEN)) {
@@ -4071,7 +4070,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                                } else {
                                        /*      Received the invitation to join a P2P group. */
 
-                                       _rtw_memset(&group_id, 0x00, sizeof(struct group_id_info));
+                                       memset(&group_id, 0x00, sizeof(struct group_id_info));
                                        rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, (u8 *)&group_id, &attr_contentlen);
                                        if (attr_contentlen) {
                                                if (!memcmp(group_id.go_device_addr, myid(&padapter->eeprompriv), ETH_ALEN)) {
@@ -4111,7 +4110,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                u32     attr_contentlen = 0;
 
                DBG_88E("[%s] Got invite response frame!\n", __func__);
-               _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
+               del_timer_sync(&pwdinfo->restore_p2p_state_timer);
                p2p_ie = rtw_get_p2p_ie(frame_body + _PUBLIC_ACTION_IE_OFFSET_, len - _PUBLIC_ACTION_IE_OFFSET_, NULL, &p2p_ielen);
                if (p2p_ie) {
                        rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_STATUS, &attr_content, &attr_contentlen);
@@ -4169,7 +4168,7 @@ static unsigned int on_action_public_p2p(struct recv_frame *precv_frame)
                DBG_88E("[%s] Got Provisioning Discovery Response Frame\n", __func__);
                /*      Commented by Albert 20110426 */
                /*      The restore timer is enabled when issuing the provisioing request frame in rtw_p2p_prov_disc function. */
-               _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
+               del_timer_sync(&pwdinfo->restore_p2p_state_timer);
                rtw_p2p_set_state(pwdinfo, P2P_STATE_RX_PROVISION_DIS_RSP);
                process_p2p_provdisc_resp(pwdinfo, pframe);
                _set_timer(&pwdinfo->restore_p2p_state_timer, P2P_PROVISION_TIMEOUT);
@@ -4361,7 +4360,7 @@ void update_mgntframe_attrib(struct adapter *padapter, struct pkt_attrib *pattri
 {
        struct mlme_ext_priv    *pmlmeext = &(padapter->mlmeextpriv);
 
-       _rtw_memset((u8 *)(pattrib), 0, sizeof(struct pkt_attrib));
+       memset((u8 *)(pattrib), 0, sizeof(struct pkt_attrib));
 
        pattrib->hdrlen = 24;
        pattrib->nr_frags = 1;
@@ -4464,7 +4463,7 @@ static int update_hidden_ssid(u8 *ies, u32 ies_len, u8 hidden_ssid_mode)
                        break;
                }
                case 2:
-                       _rtw_memset(&ssid_ie[2], 0, ssid_len_ori);
+                       memset(&ssid_ie[2], 0, ssid_len_ori);
                        break;
                default:
                        break;
@@ -4506,7 +4505,7 @@ void issue_beacon(struct adapter *padapter, int timeout_ms)
        update_mgntframe_attrib(padapter, pattrib);
        pattrib->qsel = 0x10;
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -4732,7 +4731,7 @@ void issue_probersp(struct adapter *padapter, unsigned char *da, u8 is_valid_p2p
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -4889,7 +4888,7 @@ static int _issue_probereq(struct adapter *padapter, struct ndis_802_11_ssid *ps
        update_mgntframe_attrib(padapter, pattrib);
 
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -5025,7 +5024,7 @@ void issue_auth(struct adapter *padapter, struct sta_info *psta, unsigned short
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -5169,7 +5168,7 @@ void issue_asocrsp(struct adapter *padapter, unsigned short status, struct sta_i
        update_mgntframe_attrib(padapter, pattrib);
 
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -5308,7 +5307,7 @@ void issue_assocreq(struct adapter *padapter)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
 
@@ -5639,7 +5638,7 @@ static int _issue_nulldata(struct adapter *padapter, unsigned char *da, unsigned
        update_mgntframe_attrib(padapter, pattrib);
        pattrib->retry_ctrl = false;
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -5755,7 +5754,7 @@ static int _issue_qos_nulldata(struct adapter *padapter, unsigned char *da, u16
        pattrib->ack_policy = 0;
        pattrib->mdata = 0;
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -5866,7 +5865,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
 
 #ifdef CONFIG_88EU_P2P
        if (!(rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) && (pwdinfo->rx_invitereq_info.scan_op_ch_only)) {
-               _cancel_timer_ex(&pwdinfo->reset_ch_sitesurvey);
+               del_timer_sync(&pwdinfo->reset_ch_sitesurvey);
                _set_timer(&pwdinfo->reset_ch_sitesurvey, 10);
        }
 #endif /* CONFIG_88EU_P2P */
@@ -5880,7 +5879,7 @@ static int _issue_deauth(struct adapter *padapter, unsigned char *da, unsigned s
        update_mgntframe_attrib(padapter, pattrib);
        pattrib->retry_ctrl = false;
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -5982,7 +5981,7 @@ void issue_action_spct_ch_switch (struct adapter *padapter, u8 *ra, u8 new_ch, u
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -6052,7 +6051,7 @@ void issue_action_BA(struct adapter *padapter, unsigned char *raddr, unsigned ch
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -6194,7 +6193,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -6228,7 +6227,7 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
 
 
        /*  */
-       _rtw_memset(ICS, 0, sizeof(ICS));
+       memset(ICS, 0, sizeof(ICS));
        if (pmlmepriv->num_sta_no_ht > 0) {
                int i;
 
@@ -6237,14 +6236,11 @@ static void issue_action_BSSCoexistPacket(struct adapter *padapter)
                phead = get_list_head(queue);
                plist = phead->next;
 
-               while (1) {
+               while (phead != plist) {
                        int len;
                        u8 *p;
                        struct wlan_bssid_ex *pbss_network;
 
-                       if (rtw_end_of_queue_search(phead, plist))
-                               break;
-
                        pnetwork = container_of(plist, struct wlan_network, list);
 
                        plist = plist->next;
@@ -6557,7 +6553,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
        if (len > MAX_IE_SZ)
                return _FAIL;
 
-       _rtw_memset(bssid, 0, sizeof(struct wlan_bssid_ex));
+       memset(bssid, 0, sizeof(struct wlan_bssid_ex));
 
        subtype = GetFrameSubType(pframe);
 
@@ -6608,7 +6604,7 @@ u8 collect_bss_info(struct adapter *padapter, struct recv_frame *precv_frame, st
                bssid->Ssid.SsidLength = 0;
        }
 
-       _rtw_memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
+       memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
 
        /* checking rate info... */
        i = 0;
@@ -6816,7 +6812,7 @@ void start_clnt_auth(struct adapter *padapter)
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-       _cancel_timer_ex(&pmlmeext->link_timer);
+       del_timer_sync(&pmlmeext->link_timer);
 
        pmlmeinfo->state &= (~WIFI_FW_AUTH_NULL);
        pmlmeinfo->state |= WIFI_FW_AUTH_STATE;
@@ -6847,7 +6843,7 @@ void start_clnt_assoc(struct adapter *padapter)
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-       _cancel_timer_ex(&pmlmeext->link_timer);
+       del_timer_sync(&pmlmeext->link_timer);
 
        pmlmeinfo->state &= (~(WIFI_FW_AUTH_NULL | WIFI_FW_AUTH_STATE));
        pmlmeinfo->state |= (WIFI_FW_AUTH_SUCCESS | WIFI_FW_ASSOC_STATE);
@@ -6912,7 +6908,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
                p = ie;
                ie += len;
 
-               _rtw_memset(country, 0, 4);
+               memset(country, 0, 4);
                memcpy(country, p, 3);
                p += 3;
                RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
@@ -6937,7 +6933,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid
 
                memcpy(chplan_sta, pmlmeext->channel_set, sizeof(chplan_sta));
 
-               _rtw_memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set));
+               memset(pmlmeext->channel_set, 0, sizeof(pmlmeext->channel_set));
                chplan_new = pmlmeext->channel_set;
 
                i = 0;
@@ -7058,18 +7054,18 @@ void report_survey_event(struct adapter *padapter,
        pcmdpriv = &padapter->cmdpriv;
 
 
-       pcmd_obj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd_obj == NULL)
                return;
 
        cmdsz = (sizeof(struct survey_event) + sizeof(struct C2HEvent_Header));
-       pevtcmd = (u8 *)rtw_zmalloc(cmdsz);
+       pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
        if (pevtcmd == NULL) {
                kfree(pcmd_obj);
                return;
        }
 
-       _rtw_init_listhead(&pcmd_obj->list);
+       INIT_LIST_HEAD(&pcmd_obj->list);
 
        pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
        pcmd_obj->cmdsz = cmdsz;
@@ -7110,18 +7106,18 @@ void report_surveydone_event(struct adapter *padapter)
        struct mlme_ext_priv            *pmlmeext = &padapter->mlmeextpriv;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd_obj == NULL)
                return;
 
        cmdsz = (sizeof(struct surveydone_event) + sizeof(struct C2HEvent_Header));
-       pevtcmd = (u8 *)rtw_zmalloc(cmdsz);
+       pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
        if (pevtcmd == NULL) {
                kfree(pcmd_obj);
                return;
        }
 
-       _rtw_init_listhead(&pcmd_obj->list);
+       INIT_LIST_HEAD(&pcmd_obj->list);
 
        pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
        pcmd_obj->cmdsz = cmdsz;
@@ -7156,18 +7152,18 @@ void report_join_res(struct adapter *padapter, int res)
        struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd_obj == NULL)
                return;
 
        cmdsz = (sizeof(struct joinbss_event) + sizeof(struct C2HEvent_Header));
-       pevtcmd = (u8 *)rtw_zmalloc(cmdsz);
+       pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
        if (pevtcmd == NULL) {
                kfree(pcmd_obj);
                return;
        }
 
-       _rtw_init_listhead(&pcmd_obj->list);
+       INIT_LIST_HEAD(&pcmd_obj->list);
 
        pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
        pcmd_obj->cmdsz = cmdsz;
@@ -7209,18 +7205,18 @@ void report_del_sta_event(struct adapter *padapter, unsigned char *MacAddr, unsi
        struct mlme_ext_priv            *pmlmeext = &padapter->mlmeextpriv;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd_obj == NULL)
                return;
 
        cmdsz = (sizeof(struct stadel_event) + sizeof(struct C2HEvent_Header));
-       pevtcmd = (u8 *)rtw_zmalloc(cmdsz);
+       pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
        if (pevtcmd == NULL) {
                kfree(pcmd_obj);
                return;
        }
 
-       _rtw_init_listhead(&pcmd_obj->list);
+       INIT_LIST_HEAD(&pcmd_obj->list);
 
        pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
        pcmd_obj->cmdsz = cmdsz;
@@ -7264,18 +7260,18 @@ void report_add_sta_event(struct adapter *padapter, unsigned char *MacAddr, int
        struct mlme_ext_priv            *pmlmeext = &padapter->mlmeextpriv;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (pcmd_obj == NULL)
                return;
 
        cmdsz = (sizeof(struct stassoc_event) + sizeof(struct C2HEvent_Header));
-       pevtcmd = (u8 *)rtw_zmalloc(cmdsz);
+       pevtcmd = kzalloc(cmdsz, GFP_KERNEL);
        if (pevtcmd == NULL) {
                kfree(pcmd_obj);
                return;
        }
 
-       _rtw_init_listhead(&pcmd_obj->list);
+       INIT_LIST_HEAD(&pcmd_obj->list);
 
        pcmd_obj->cmdcode = GEN_CMD_CODE(_Set_MLME_EVT);
        pcmd_obj->cmdsz = cmdsz;
@@ -7494,7 +7490,7 @@ void mlmeext_sta_del_event_callback(struct adapter *padapter)
                /* set MSR to no link state -> infra. mode */
                Set_MSR(padapter, _HW_STATE_STATION_);
 
-               _cancel_timer_ex(&pmlmeext->link_timer);
+               del_timer_sync(&pmlmeext->link_timer);
        }
 }
 
@@ -7549,8 +7545,6 @@ void linked_status_chk(struct adapter *padapter)
        if (padapter->bRxRSSIDisplay)
                _linked_rx_signal_strehgth_display(padapter);
 
-       rtw_hal_sreset_linked_status_check(padapter);
-
        if (is_client_associated_to_ap(padapter)) {
                /* linked infrastructure client mode */
 
@@ -7691,11 +7685,11 @@ void survey_timer_hdl(struct adapter *padapter)
                        pmlmeext->scan_abort = false;/* reset */
                }
 
-               ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (ph2c == NULL)
                        goto exit_survey_timer_hdl;
 
-               psurveyPara = (struct sitesurvey_parm *)rtw_zmalloc(sizeof(struct sitesurvey_parm));
+               psurveyPara = kzalloc(sizeof(struct sitesurvey_parm), GFP_KERNEL);
                if (psurveyPara == NULL) {
                        kfree(ph2c);
                        goto exit_survey_timer_hdl;
@@ -7834,7 +7828,7 @@ u8 createbss_hdl(struct adapter *padapter, u8 *pbuf)
                /* rtw_hal_set_hwreg(padapter, HW_VAR_INITIAL_GAIN, (u8 *)(&initialgain)); */
 
                /* cancel link timer */
-               _cancel_timer_ex(&pmlmeext->link_timer);
+               del_timer_sync(&pmlmeext->link_timer);
 
                /* clear CAM */
                flush_all_cam_entry(padapter);
@@ -7874,7 +7868,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
                /* clear CAM */
                flush_all_cam_entry(padapter);
 
-               _cancel_timer_ex(&pmlmeext->link_timer);
+               del_timer_sync(&pmlmeext->link_timer);
 
                /* set MSR to nolink -> infra. mode */
                Set_MSR(padapter, _HW_STATE_STATION_);
@@ -7960,7 +7954,7 @@ u8 join_cmd_hdl(struct adapter *padapter, u8 *pbuf)
        rtw_hal_set_hwreg(padapter, HW_VAR_MLME_JOIN, (u8 *)(&join_type));
 
        /* cancel link timer */
-       _cancel_timer_ex(&pmlmeext->link_timer);
+       del_timer_sync(&pmlmeext->link_timer);
 
        start_clnt_join(padapter);
 
@@ -8004,7 +7998,7 @@ u8 disconnect_hdl(struct adapter *padapter, unsigned char *pbuf)
 
        flush_all_cam_entry(padapter);
 
-       _cancel_timer_ex(&pmlmeext->link_timer);
+       del_timer_sync(&pmlmeext->link_timer);
 
        rtw_free_uc_swdec_pending_queue(padapter);
 
@@ -8019,7 +8013,7 @@ static int rtw_scan_ch_decision(struct adapter *padapter, struct rtw_ieee80211_c
        struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
 
        /* clear out first */
-       _rtw_memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num);
+       memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num);
 
        /* acquire channels from in */
        j = 0;
@@ -8273,13 +8267,13 @@ u8 set_tx_beacon_cmd(struct adapter *padapter)
        int len_diff = 0;
 
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       ptxBeacon_parm = (struct Tx_Beacon_param *)rtw_zmalloc(sizeof(struct Tx_Beacon_param));
+       ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_KERNEL);
        if (ptxBeacon_parm == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -8379,12 +8373,12 @@ u8 tx_beacon_hdl(struct adapter *padapter, unsigned char *pbuf)
                        xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
                        xmitframe_plist = xmitframe_phead->next;
 
-                       while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+                       while (xmitframe_phead != xmitframe_plist) {
                                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
                                xmitframe_plist = xmitframe_plist->next;
 
-                               rtw_list_delete(&pxmitframe->list);
+                               list_del_init(&pxmitframe->list);
 
                                psta_bmc->sleepq_len--;
                                if (psta_bmc->sleepq_len > 0)
index 17427a68b66c0e3ef3dd05b18e5c7575b28220b5..d879948e0a60e0983e548e2831c0840c3490f9d9 100644 (file)
@@ -20,7 +20,7 @@
 #define _RTW_MP_C_
 
 #include <drv_types.h>
-
+#include <usb_ops_linux.h>
 #include "rtl8188e_hal.h"
 #include <linux/vmalloc.h>
 
@@ -30,13 +30,13 @@ u32 read_macreg(struct adapter *padapter, u32 addr, u32 sz)
 
        switch (sz) {
        case 1:
-               val = rtw_read8(padapter, addr);
+               val = usb_read8(padapter, addr);
                break;
        case 2:
-               val = rtw_read16(padapter, addr);
+               val = usb_read16(padapter, addr);
                break;
        case 4:
-               val = rtw_read32(padapter, addr);
+               val = usb_read32(padapter, addr);
                break;
        default:
                val = 0xffffffff;
@@ -50,13 +50,13 @@ void write_macreg(struct adapter *padapter, u32 addr, u32 val, u32 sz)
 {
        switch (sz) {
        case 1:
-               rtw_write8(padapter, addr, (u8)val);
+               usb_write8(padapter, addr, (u8)val);
                break;
        case 2:
-               rtw_write16(padapter, addr, (u16)val);
+               usb_write16(padapter, addr, (u16)val);
                break;
        case 4:
-               rtw_write32(padapter, addr, val);
+               usb_write32(padapter, addr, val);
                break;
        default:
                break;
@@ -97,7 +97,7 @@ static void _init_mp_priv_(struct mp_priv *pmp_priv)
 {
        struct wlan_bssid_ex *pnetwork;
 
-       _rtw_memset(pmp_priv, 0, sizeof(struct mp_priv));
+       memset(pmp_priv, 0, sizeof(struct mp_priv));
 
        pmp_priv->mode = MP_OFF;
 
@@ -138,12 +138,12 @@ static void mp_init_xmit_attrib(struct mp_tx *pmptx, struct adapter *padapter)
 
        /*  init xmitframe attribute */
        pattrib = &pmptx->attrib;
-       _rtw_memset(pattrib, 0, sizeof(struct pkt_attrib));
+       memset(pattrib, 0, sizeof(struct pkt_attrib));
        desc = &pmptx->desc;
-       _rtw_memset(desc, 0, TXDESC_SIZE);
+       memset(desc, 0, TXDESC_SIZE);
 
        pattrib->ether_type = 0x8712;
-       _rtw_memset(pattrib->dst, 0xFF, ETH_ALEN);
+       memset(pattrib->dst, 0xFF, ETH_ALEN);
        pattrib->ack_policy = 0;
        pattrib->hdrlen = WLAN_HDR_A3_LEN;
        pattrib->subtype = WIFI_DATA;
@@ -221,7 +221,7 @@ s32 MPT_InitializeAdapter(struct adapter *pAdapter, u8 Channel)
        /*  */
 
        /*  Don't accept any packets */
-       rtw_write32(pAdapter, REG_RCR, 0);
+       usb_write32(pAdapter, REG_RCR, 0);
 
        PHY_IQCalibrate(pAdapter, false);
        dm_CheckTXPowerTracking(&pHalData->odmpriv);    /* trigger thermal meter */
@@ -234,8 +234,8 @@ s32 MPT_InitializeAdapter(struct adapter *pAdapter, u8 Channel)
        pMptCtx->backup0x52_RF_B = (u8)PHY_QueryRFReg(pAdapter, RF_PATH_A, RF_0x52, 0x000F0);
 
        /* set ant to wifi side in mp mode */
-       rtw_write16(pAdapter, 0x870, 0x300);
-       rtw_write16(pAdapter, 0x860, 0x110);
+       usb_write16(pAdapter, 0x870, 0x300);
+       usb_write16(pAdapter, 0x860, 0x110);
 
        if (pAdapter->registrypriv.mp_mode == 1)
                pmlmepriv->fw_state = WIFI_MP_STATE;
@@ -302,9 +302,9 @@ static void disable_dm(struct adapter *padapter)
 
        /* 3 1. disable firmware dynamic mechanism */
        /*  disable Power Training, Rate Adaptive */
-       v8 = rtw_read8(padapter, REG_BCN_CTRL);
+       v8 = usb_read8(padapter, REG_BCN_CTRL);
        v8 &= ~EN_BCN_FUNCTION;
-       rtw_write8(padapter, REG_BCN_CTRL, v8);
+       usb_write8(padapter, REG_BCN_CTRL, v8);
 
        /* 3 2. disable driver dynamic mechanism */
        /*  disable Dynamic Initial Gain */
@@ -362,7 +362,6 @@ s32 mp_start_test(struct adapter *padapter)
        mpt_ProStartTest(padapter);
 
        /* 3 1. initialize a new struct wlan_bssid_ex */
-/*     _rtw_memset(&bssid, 0, sizeof(struct wlan_bssid_ex)); */
        memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
        bssid.Ssid.SsidLength = strlen("mp_pseudo_adhoc");
        memcpy(bssid.Ssid.Ssid, (u8 *)"mp_pseudo_adhoc", bssid.Ssid.SsidLength);
@@ -421,9 +420,9 @@ end_of_mp_start_test:
 
        if (res == _SUCCESS) {
                /*  set MSR to WIFI_FW_ADHOC_STATE */
-               val8 = rtw_read8(padapter, MSR) & 0xFC; /*  0x0102 */
+               val8 = usb_read8(padapter, MSR) & 0xFC; /*  0x0102 */
                val8 |= WIFI_FW_ADHOC_STATE;
-               rtw_write8(padapter, MSR, val8); /*  Link in ad hoc network */
+               usb_write8(padapter, MSR, val8); /*  Link in ad hoc network */
        }
        return res;
 }
@@ -454,7 +453,7 @@ void mp_stop_test(struct adapter *padapter)
                pmlmepriv->fw_state = pmppriv->prev_fw_state; /*  WIFI_STATION_STATE; */
 
                /* flush the cur_network */
-               _rtw_memset(tgt_network, 0, sizeof(struct wlan_network));
+               memset(tgt_network, 0, sizeof(struct wlan_network));
 
                _clr_fwstate_(pmlmepriv, WIFI_MP_STATE);
 
@@ -598,7 +597,7 @@ static int mp_xmit_packet_thread(void *context)
        padapter = pmp_priv->papdater;
        pxmitpriv = &(padapter->xmitpriv);
 
-       thread_enter("RTW_MP_THREAD");
+       allow_signal(SIGTERM);
 
        /* DBG_88E("%s:pkTx Start\n", __func__); */
        while (1) {
@@ -630,7 +629,8 @@ static int mp_xmit_packet_thread(void *context)
                    (pmptx->count == pmptx->sended))
                        goto exit;
 
-               flush_signals_thread();
+               if (signal_pending(current))
+                       flush_signals(current);
        }
 
 exit:
@@ -688,7 +688,7 @@ void SetPacketTx(struct adapter *padapter)
        kfree(pmp_priv->tx.pallocated_buf);
        pmp_priv->tx.write_size = pkt_size;
        pmp_priv->tx.buf_size = pkt_size + XMITBUF_ALIGN_SZ;
-       pmp_priv->tx.pallocated_buf = rtw_zmalloc(pmp_priv->tx.buf_size);
+       pmp_priv->tx.pallocated_buf = kzalloc(pmp_priv->tx.buf_size, GFP_KERNEL);
        if (pmp_priv->tx.pallocated_buf == NULL) {
                DBG_88E("%s: malloc(%d) fail!!\n", __func__, pmp_priv->tx.buf_size);
                return;
@@ -697,7 +697,7 @@ void SetPacketTx(struct adapter *padapter)
        ptr = pmp_priv->tx.buf;
 
        desc = &(pmp_priv->tx.desc);
-       _rtw_memset(desc, 0, TXDESC_SIZE);
+       memset(desc, 0, TXDESC_SIZE);
        pkt_start = ptr;
        pkt_end = pkt_start + pkt_size;
 
@@ -770,7 +770,7 @@ void SetPacketTx(struct adapter *padapter)
                break;
        }
 
-       _rtw_memset(ptr, payload, pkt_end - ptr);
+       memset(ptr, payload, pkt_end - ptr);
 
        /* 3 6. start thread */
        pmp_priv->tx.PktTxThread = kthread_run(mp_xmit_packet_thread, pmp_priv, "RTW_MP_THREAD");
@@ -788,12 +788,12 @@ void SetPacketRx(struct adapter *pAdapter, u8 bStartRx)
 
                pHalData->ReceiveConfig |= ACRC32;
 
-               rtw_write32(pAdapter, REG_RCR, pHalData->ReceiveConfig);
+               usb_write32(pAdapter, REG_RCR, pHalData->ReceiveConfig);
 
                /*  Accept all data frames */
-               rtw_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF);
+               usb_write16(pAdapter, REG_RXFLTMAP2, 0xFFFF);
        } else {
-               rtw_write32(pAdapter, REG_RCR, 0);
+               usb_write32(pAdapter, REG_RCR, 0);
        }
 }
 
@@ -805,7 +805,7 @@ void ResetPhyRxPktCount(struct adapter *pAdapter)
                phyrx_set = 0;
                phyrx_set |= _RXERR_RPT_SEL(i); /* select */
                phyrx_set |= RXERR_RPT_RST;     /*  set counter to zero */
-               rtw_write32(pAdapter, REG_RXERR_RPT, phyrx_set);
+               usb_write32(pAdapter, REG_RXERR_RPT, phyrx_set);
        }
 }
 
@@ -815,10 +815,10 @@ static u32 GetPhyRxPktCounts(struct adapter *pAdapter, u32 selbit)
        u32 phyrx_set = 0, count = 0;
 
        phyrx_set = _RXERR_RPT_SEL(selbit & 0xF);
-       rtw_write32(pAdapter, REG_RXERR_RPT, phyrx_set);
+       usb_write32(pAdapter, REG_RXERR_RPT, phyrx_set);
 
        /* Read packet count */
-       count = rtw_read32(pAdapter, REG_RXERR_RPT) & RXERR_COUNTER_MASK;
+       count = usb_read32(pAdapter, REG_RXERR_RPT) & RXERR_COUNTER_MASK;
 
        return count;
 }
@@ -853,17 +853,17 @@ static u32 rtw_GetPSDData(struct adapter *pAdapter, u32 point)
        int psd_val;
 
 
-       psd_val = rtw_read32(pAdapter, 0x808);
+       psd_val = usb_read32(pAdapter, 0x808);
        psd_val &= 0xFFBFFC00;
        psd_val |= point;
 
-       rtw_write32(pAdapter, 0x808, psd_val);
+       usb_write32(pAdapter, 0x808, psd_val);
        mdelay(1);
        psd_val |= 0x00400000;
 
-       rtw_write32(pAdapter, 0x808, psd_val);
+       usb_write32(pAdapter, 0x808, psd_val);
        mdelay(1);
-       psd_val = rtw_read32(pAdapter, 0x8B4);
+       psd_val = usb_read32(pAdapter, 0x8B4);
 
        psd_val &= 0x0000FFFF;
 
@@ -905,7 +905,7 @@ u32 mp_query_psd(struct adapter *pAdapter, u8 *data)
                        return 0;
        }
 
-       _rtw_memset(data, '\0', sizeof(*data));
+       memset(data, '\0', sizeof(*data));
 
        i = psd_start;
        while (i < psd_stop) {
@@ -972,7 +972,7 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv)
        pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
 
        for (i = 0; i < num_xmit_extbuf; i++) {
-               _rtw_init_listhead(&pxmitbuf->list);
+               INIT_LIST_HEAD(&pxmitbuf->list);
 
                pxmitbuf->priv_data = NULL;
                pxmitbuf->padapter = padapter;
@@ -984,7 +984,7 @@ void _rtw_mp_xmit_priv(struct xmit_priv *pxmitpriv)
                        goto exit;
                }
 
-               rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
+               list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
                pxmitbuf++;
        }
 
index e783968b29eaa49f569a81ee77461b2534e24fac..10c9b6d227424bf1e2d5709d43474ac85adde8c3 100644 (file)
@@ -22,7 +22,7 @@
 #include <osdep_service.h>
 #include <drv_types.h>
 #include <mlme_osdep.h>
-
+#include <usb_ops_linux.h>
 /* include <rtw_mp.h> */
 #include <rtw_mp_ioctl.h>
 
@@ -801,14 +801,14 @@ int rtl8188eu_oid_rt_pro_read_register_hdl(struct oid_par_priv *poid_par_priv)
 
        switch (width) {
        case 1:
-               RegRWStruct->value = rtw_read8(Adapter, offset);
+               RegRWStruct->value = usb_read8(Adapter, offset);
                break;
        case 2:
-               RegRWStruct->value = rtw_read16(Adapter, offset);
+               RegRWStruct->value = usb_read16(Adapter, offset);
                break;
        default:
                width = 4;
-               RegRWStruct->value = rtw_read32(Adapter, offset);
+               RegRWStruct->value = usb_read32(Adapter, offset);
                break;
        }
        RT_TRACE(_module_mp_, _drv_notice_,
@@ -853,17 +853,17 @@ int rtl8188eu_oid_rt_pro_write_register_hdl(struct oid_par_priv *poid_par_priv)
                        status = NDIS_STATUS_NOT_ACCEPTED;
                        break;
                }
-               rtw_write8(padapter, offset, (u8)value);
+               usb_write8(padapter, offset, (u8)value);
                break;
        case 2:
                if (value > 0xFFFF) {
                        status = NDIS_STATUS_NOT_ACCEPTED;
                        break;
                }
-               rtw_write16(padapter, offset, (u16)value);
+               usb_write16(padapter, offset, (u16)value);
                break;
        case 4:
-               rtw_write32(padapter, offset, value);
+               usb_write32(padapter, offset, value);
                break;
        default:
                status = NDIS_STATUS_NOT_ACCEPTED;
@@ -1099,7 +1099,7 @@ int rtl8188eu_oid_rt_pro_read_efuse_hdl(struct oid_par_priv *poid_par_priv)
                 ("+rtl8188eu_oid_rt_pro_read_efuse_hd: buf_len=%d addr=%d cnts=%d\n",
                  poid_par_priv->information_buf_len, addr, cnts));
 
-       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
 
        if ((addr + cnts) > max_available_size) {
                RT_TRACE(_module_mp_, _drv_err_, ("!rtl8188eu_oid_rt_pro_read_efuse_hdl: parameter error!\n"));
@@ -1141,7 +1141,7 @@ int rtl8188eu_oid_rt_pro_write_efuse_hdl(struct oid_par_priv *poid_par_priv)
                 ("+rtl8188eu_oid_rt_pro_write_efuse_hdl: buf_len=%d addr=0x%04x cnts=%d\n",
                  poid_par_priv->information_buf_len, addr, cnts));
 
-       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
 
        if ((addr + cnts) > max_available_size) {
                RT_TRACE(_module_mp_, _drv_err_, ("!rtl8188eu_oid_rt_pro_write_efuse_hdl: parameter error"));
@@ -1179,7 +1179,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
                         ppgpkt->offset));
 
                Efuse_PowerSwitch(Adapter, false, true);
-               if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data, false) == true)
+               if (Efuse_PgPacketRead(Adapter, ppgpkt->offset, ppgpkt->data) == true)
                        *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
                else
                        status = NDIS_STATUS_FAILURE;
@@ -1190,7 +1190,7 @@ int rtl8188eu_oid_rt_pro_rw_efuse_pgpkt_hdl(struct oid_par_priv *poid_par_priv)
                         ppgpkt->offset, ppgpkt->word_en));
 
                Efuse_PowerSwitch(Adapter, true, true);
-               if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data, false) == true)
+               if (Efuse_PgPacketWrite(Adapter, ppgpkt->offset, ppgpkt->word_en, ppgpkt->data) == true)
                        *poid_par_priv->bytes_rw = poid_par_priv->information_buf_len;
                else
                        status = NDIS_STATUS_FAILURE;
@@ -1284,7 +1284,7 @@ int rtl8188eu_oid_rt_pro_efuse_map_hdl(struct oid_par_priv *poid_par_priv)
 
        RT_TRACE(_module_mp_, _drv_notice_, ("+rtl8188eu_oid_rt_pro_efuse_map_hdl\n"));
 
-       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&maplen, false);
+       EFUSE_GetEfuseDefinition(Adapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&maplen);
 
        *poid_par_priv->bytes_rw = 0;
 
index 0a15f8cf0d366c305be78e483e684a646eae574e..e1fd198eae30aad63300a69fce521e321d9f288d 100644 (file)
@@ -50,7 +50,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
 
        DBG_88E("%s\n", __func__);
 
-       pdata_attr = rtw_zmalloc(MAX_P2P_IE_LEN);
+       pdata_attr = kzalloc(MAX_P2P_IE_LEN, GFP_KERNEL);
 
        pstart = pdata_attr;
        pcur = pdata_attr;
@@ -60,7 +60,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
        plist = phead->next;
 
        /* look up sta asoc_queue */
-       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, asoc_list);
 
                plist = plist->next;
@@ -82,8 +82,7 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
                        *pcur = psta->dev_cap;
                        pcur++;
 
-                       /* u16*)(pcur) = cpu_to_be16(psta->config_methods); */
-                       RTW_PUT_BE16(pcur, psta->config_methods);
+                       *((u16 *)(pcur)) = cpu_to_be16(psta->config_methods);
                        pcur += 2;
 
                        memcpy(pcur, psta->primary_dev_type, 8);
@@ -96,12 +95,10 @@ static u32 go_add_group_info_attr(struct wifidirect_info *pwdinfo, u8 *pbuf)
                        pcur += psta->num_of_secdev_type*8;
 
                        if (psta->dev_name_len > 0) {
-                               /* u16*)(pcur) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */
-                               RTW_PUT_BE16(pcur, WPS_ATTR_DEVICE_NAME);
+                               *(u16 *)(pcur) = cpu_to_be16(WPS_ATTR_DEVICE_NAME);
                                pcur += 2;
 
-                               /* u16*)(pcur) = cpu_to_be16(psta->dev_name_len); */
-                               RTW_PUT_BE16(pcur, psta->dev_name_len);
+                               *(u16 *)(pcur) = cpu_to_be16(psta->dev_name_len);
                                pcur += 2;
 
                                memcpy(pcur, psta->dev_name, psta->dev_name_len);
@@ -153,7 +150,7 @@ static void issue_group_disc_req(struct wifidirect_info *pwdinfo, u8 *da)
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -212,7 +209,7 @@ static void issue_p2p_devdisc_resp(struct wifidirect_info *pwdinfo, u8 *da, u8 s
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -283,7 +280,7 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -310,20 +307,20 @@ static void issue_p2p_provision_resp(struct wifidirect_info *pwdinfo, u8 *raddr,
 
        wpsielen = 0;
        /*      WPS OUI */
-       RTW_PUT_BE32(wpsie, WPSOUI);
+       *((u32 *)(wpsie+wpsielen)) = cpu_to_be32(WPSOUI);
        wpsielen += 4;
 
        /*      Config Method */
        /*      Type: */
-       RTW_PUT_BE16(wpsie + wpsielen, WPS_ATTR_CONF_METHOD);
+       *(u16 *)(wpsie+wpsielen) = cpu_to_be16(WPS_ATTR_CONF_METHOD);
        wpsielen += 2;
 
        /*      Length: */
-       RTW_PUT_BE16(wpsie + wpsielen, 0x0002);
+       *(u16 *)(wpsie+wpsielen) = cpu_to_be16(0x0002);
        wpsielen += 2;
 
        /*      Value: */
-       RTW_PUT_BE16(wpsie + wpsielen, config_method);
+       *(u16 *)(wpsie+wpsielen) = cpu_to_be16(config_method);
        wpsielen += 2;
 
        pframe = rtw_set_ie(pframe, _VENDOR_SPECIFIC_IE_, wpsielen, (unsigned char *)wpsie, &pattrib->pktlen);
@@ -362,7 +359,7 @@ static void issue_p2p_presence_resp(struct wifidirect_info *pwdinfo, u8 *da, u8
        pattrib = &pmgntframe->attrib;
        update_mgntframe_attrib(padapter, pattrib);
 
-       _rtw_memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
+       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
        pwlanhdr = (struct rtw_ieee80211_hdr *)pframe;
@@ -490,8 +487,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
        p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0002); */
-       RTW_PUT_LE16(p2pie + p2pielen, 0x0002);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002);
        p2pielen += 2;
 
        /*      Value: */
@@ -519,19 +515,16 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
        p2pie[p2pielen++] = P2P_ATTR_EX_LISTEN_TIMING;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0004); */
-       RTW_PUT_LE16(p2pie + p2pielen, 0x0004);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0004);
        p2pielen += 2;
 
        /*      Value: */
        /*      Availability Period */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(0xFFFF); */
-       RTW_PUT_LE16(p2pie + p2pielen, 0xFFFF);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0xFFFF);
        p2pielen += 2;
 
        /*      Availability Interval */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(0xFFFF); */
-       RTW_PUT_LE16(p2pie + p2pielen, 0xFFFF);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0xFFFF);
        p2pielen += 2;
 
 
@@ -547,8 +540,7 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
        /*      Length: */
        /*      21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
        /*      + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); */
-       RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len);
        p2pielen += 2;
 
        /*      Value: */
@@ -558,24 +550,20 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
 
        /*      Config Method */
        /*      This field should be big endian. Noted by P2P specification. */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm); */
-       RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->supported_wps_cm);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->supported_wps_cm);
        p2pielen += 2;
 
        /*      Primary Device Type */
        /*      Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_MULIT_MEDIA);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA);
        p2pielen += 2;
 
        /*      OUI */
-       /* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */
-       RTW_PUT_BE32(p2pie + p2pielen, WPSOUI);
+       *((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI);
        p2pielen += 4;
 
        /*      Sub Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_MEDIA_SERVER);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER);
        p2pielen += 2;
 
        /*      Number of Secondary Device Types */
@@ -583,13 +571,11 @@ u32 build_probe_resp_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf)
 
        /*      Device Name */
        /*      Type: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_ATTR_DEVICE_NAME);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME);
        p2pielen += 2;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); */
-       RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->device_name_len);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len);
        p2pielen += 2;
 
        /*      Value: */
@@ -633,8 +619,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
        p2pie[p2pielen++] = P2P_ATTR_CAPABILITY;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(0x0002); */
-       RTW_PUT_LE16(p2pie + p2pielen, 0x0002);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(0x0002);
        p2pielen += 2;
 
        /*      Value: */
@@ -655,8 +640,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
        /*      Length: */
        /*      21 -> P2P Device Address (6bytes) + Config Methods (2bytes) + Primary Device Type (8bytes) */
        /*      + NumofSecondDevType (1byte) + WPS Device Name ID field (2bytes) + WPS Device Name Len field (2bytes) */
-       /* u16*) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len); */
-       RTW_PUT_LE16(p2pie + p2pielen, 21 + pwdinfo->device_name_len);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_le16(21 + pwdinfo->device_name_len);
        p2pielen += 2;
 
        /*      Value: */
@@ -667,29 +651,24 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
        /*      Config Method */
        /*      This field should be big endian. Noted by P2P specification. */
        if (pwdinfo->ui_got_wps_info == P2P_GOT_WPSINFO_PBC) {
-               /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_PBC); */
-               RTW_PUT_BE16(p2pie + p2pielen, WPS_CONFIG_METHOD_PBC);
+               *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_PBC);
        } else {
-               /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_DISPLAY); */
-               RTW_PUT_BE16(p2pie + p2pielen, WPS_CONFIG_METHOD_DISPLAY);
+               *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_CONFIG_METHOD_DISPLAY);
        }
 
        p2pielen += 2;
 
        /*      Primary Device Type */
        /*      Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_CID_MULIT_MEDIA);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_CID_MULIT_MEDIA);
        p2pielen += 2;
 
        /*      OUI */
-       /* u32*) (p2pie + p2pielen) = cpu_to_be32(WPSOUI); */
-       RTW_PUT_BE32(p2pie + p2pielen, WPSOUI);
+       *((u32 *)(p2pie + p2pielen)) = cpu_to_be32(WPSOUI);
        p2pielen += 4;
 
        /*      Sub Category ID */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_PDT_SCID_MEDIA_SERVER);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_PDT_SCID_MEDIA_SERVER);
        p2pielen += 2;
 
        /*      Number of Secondary Device Types */
@@ -697,13 +676,11 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
 
        /*      Device Name */
        /*      Type: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME); */
-       RTW_PUT_BE16(p2pie + p2pielen, WPS_ATTR_DEVICE_NAME);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(WPS_ATTR_DEVICE_NAME);
        p2pielen += 2;
 
        /*      Length: */
-       /* u16*) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len); */
-       RTW_PUT_BE16(p2pie + p2pielen, pwdinfo->device_name_len);
+       *(u16 *) (p2pie + p2pielen) = cpu_to_be16(pwdinfo->device_name_len);
        p2pielen += 2;
 
        /*      Value: */
@@ -719,8 +696,7 @@ u32 build_prov_disc_request_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pbuf, u8
                p2pie[p2pielen++] = P2P_ATTR_GROUP_ID;
 
                /*      Length: */
-               /* u16*) (p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + ussidlen); */
-               RTW_PUT_LE16(p2pie + p2pielen, ETH_ALEN + ussidlen);
+               *(u16 *) (p2pie + p2pielen) = cpu_to_le16(ETH_ALEN + ussidlen);
                p2pielen += 2;
 
                /*      Value: */
@@ -891,7 +867,7 @@ u32 process_assoc_req_p2p_ie(struct wifidirect_info *pwdinfo, u8 *pframe, uint l
                /* Check P2P Device Info ATTR */
                if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_DEVICE_INFO, NULL, (uint *)&attr_contentlen)) {
                        DBG_88E("[%s] Got P2P DEVICE INFO Attr!!\n", __func__);
-                       pattr_content = rtw_zmalloc(attr_contentlen);
+                       pattr_content = kzalloc(attr_contentlen, GFP_KERNEL);
                        pbuf = pattr_content;
                        if (pattr_content) {
                                u8 num_of_secdev_type;
@@ -983,7 +959,7 @@ u32 process_p2p_devdisc_req(struct wifidirect_info *pwdinfo, u8 *pframe, uint le
                                        plist = phead->next;
 
                                        /* look up sta asoc_queue */
-                                       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+                                       while (phead != plist) {
                                                psta = container_of(plist, struct sta_info, asoc_list);
 
                                                plist = plist->next;
@@ -1197,7 +1173,7 @@ u8 process_p2p_group_negotation_req(struct wifidirect_info *pwdinfo, u8 *pframe,
                attr_contentlen = 0;
                if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENTED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
                        if (attr_contentlen != ETH_ALEN)
-                               _rtw_memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
+                               memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
                }
 
                if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_CH_LIST, ch_content, &ch_cnt)) {
@@ -1300,7 +1276,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
                        attr_contentlen = 0;
                        if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_INTENTED_IF_ADDR, pwdinfo->p2p_peer_interface_addr, &attr_contentlen)) {
                                if (attr_contentlen != ETH_ALEN)
-                                       _rtw_memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
+                                       memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
                        }
 
                        /*      Try to get the peer's intent and tie breaker value. */
@@ -1392,7 +1368,7 @@ u8 process_p2p_group_negotation_resp(struct wifidirect_info *pwdinfo, u8 *pframe
 
                        /*      Try to get the group id information if peer is GO */
                        attr_contentlen = 0;
-                       _rtw_memset(groupid, 0x00, 38);
+                       memset(groupid, 0x00, 38);
                        if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
                                memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
                                memcpy(pwdinfo->groupid_info.ssid, &groupid[6], attr_contentlen - ETH_ALEN);
@@ -1428,9 +1404,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
                        result = attr_content;
 
                        if (attr_content == P2P_STATUS_SUCCESS) {
-                               u8      bcancelled = 0;
-
-                               _cancel_timer(&pwdinfo->restore_p2p_state_timer, &bcancelled);
+                               del_timer_sync(&pwdinfo->restore_p2p_state_timer);
 
                                /*      Commented by Albert 20100911 */
                                /*      Todo: Need to handle the case which both Intents are the same. */
@@ -1456,7 +1430,7 @@ u8 process_p2p_group_negotation_confirm(struct wifidirect_info *pwdinfo, u8 *pfr
 
                /*      Try to get the group id information */
                attr_contentlen = 0;
-               _rtw_memset(groupid, 0x00, 38);
+               memset(groupid, 0x00, 38);
                if (rtw_get_p2p_attr_content(p2p_ie, p2p_ielen, P2P_ATTR_GROUP_ID, groupid, &attr_contentlen)) {
                        DBG_88E("[%s] Ssid = %s, ssidlen = %zu\n", __func__, &groupid[ETH_ALEN], strlen(&groupid[ETH_ALEN]));
                        memcpy(pwdinfo->groupid_info.go_device_addr, &groupid[0], ETH_ALEN);
@@ -1499,7 +1473,7 @@ static void find_phase_handler(struct adapter *padapter)
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
 
-       _rtw_memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid));
+       memset((unsigned char *)&ssid, 0, sizeof(struct ndis_802_11_ssid));
        memcpy(ssid.Ssid, pwdinfo->p2p_wildcard_ssid, P2P_WILDCARD_SSID_LEN);
        ssid.SsidLength = P2P_WILDCARD_SSID_LEN;
 
@@ -1738,13 +1712,13 @@ u8 p2p_ps_wk_cmd(struct adapter *padapter, u8 p2p_ps_state, u8 enqueue)
                return res;
 
        if (enqueue) {
-               ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
                if (ph2c == NULL) {
                        res = _FAIL;
                        goto exit;
                }
 
-               pdrvextra_cmd_parm = (struct drvextra_cmd_parm *)rtw_zmalloc(sizeof(struct drvextra_cmd_parm));
+               pdrvextra_cmd_parm = kzalloc(sizeof(struct drvextra_cmd_parm), GFP_KERNEL);
                if (pdrvextra_cmd_parm == NULL) {
                        kfree(ph2c);
                        res = _FAIL;
@@ -1930,44 +1904,44 @@ void init_wifidirect_info(struct adapter *padapter, enum P2P_ROLE role)
 
        memcpy(pwdinfo->p2p_wildcard_ssid, "DIRECT-", 7);
 
-       _rtw_memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
+       memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
        pwdinfo->device_name_len = 0;
 
-       _rtw_memset(&pwdinfo->invitereq_info, 0x00, sizeof(struct tx_invite_req_info));
+       memset(&pwdinfo->invitereq_info, 0x00, sizeof(struct tx_invite_req_info));
        pwdinfo->invitereq_info.token = 3;      /*      Token used for P2P invitation request frame. */
 
-       _rtw_memset(&pwdinfo->inviteresp_info, 0x00, sizeof(struct tx_invite_resp_info));
+       memset(&pwdinfo->inviteresp_info, 0x00, sizeof(struct tx_invite_resp_info));
        pwdinfo->inviteresp_info.token = 0;
 
        pwdinfo->profileindex = 0;
-       _rtw_memset(&pwdinfo->profileinfo[0], 0x00, sizeof(struct profile_info) * P2P_MAX_PERSISTENT_GROUP_NUM);
+       memset(&pwdinfo->profileinfo[0], 0x00, sizeof(struct profile_info) * P2P_MAX_PERSISTENT_GROUP_NUM);
 
        rtw_p2p_findphase_ex_set(pwdinfo, P2P_FINDPHASE_EX_NONE);
 
        pwdinfo->listen_dwell = (u8) ((jiffies % 3) + 1);
 
-       _rtw_memset(&pwdinfo->tx_prov_disc_info, 0x00, sizeof(struct tx_provdisc_req_info));
+       memset(&pwdinfo->tx_prov_disc_info, 0x00, sizeof(struct tx_provdisc_req_info));
        pwdinfo->tx_prov_disc_info.wps_config_method_request = WPS_CM_NONE;
 
-       _rtw_memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
+       memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
 
        pwdinfo->device_password_id_for_nego = WPS_DPID_PBC;
        pwdinfo->negotiation_dialog_token = 1;
 
-       _rtw_memset(pwdinfo->nego_ssid, 0x00, WLAN_SSID_MAXLEN);
+       memset(pwdinfo->nego_ssid, 0x00, WLAN_SSID_MAXLEN);
        pwdinfo->nego_ssidlen = 0;
 
        pwdinfo->ui_got_wps_info = P2P_NO_WPSINFO;
        pwdinfo->supported_wps_cm = WPS_CONFIG_METHOD_DISPLAY | WPS_CONFIG_METHOD_PBC | WPS_CONFIG_METHOD_KEYPAD;
        pwdinfo->channel_list_attr_len = 0;
-       _rtw_memset(pwdinfo->channel_list_attr, 0x00, 100);
+       memset(pwdinfo->channel_list_attr, 0x00, 100);
 
-       _rtw_memset(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, 0x00, 4);
-       _rtw_memset(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, '0', 3);
-       _rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
+       memset(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, 0x00, 4);
+       memset(pwdinfo->rx_prov_disc_info.strconfig_method_desc_of_prov_disc_req, '0', 3);
+       memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
        pwdinfo->wfd_tdls_enable = 0;
-       _rtw_memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
-       _rtw_memset(pwdinfo->p2p_peer_device_addr, 0x00, ETH_ALEN);
+       memset(pwdinfo->p2p_peer_interface_addr, 0x00, ETH_ALEN);
+       memset(pwdinfo->p2p_peer_device_addr, 0x00, ETH_ALEN);
 
        pwdinfo->rx_invitereq_info.operation_ch[0] = 0;
        pwdinfo->rx_invitereq_info.operation_ch[1] = 0; /*      Used to indicate the scan end in site survey function */
@@ -2015,7 +1989,7 @@ int rtw_p2p_enable(struct adapter *padapter, enum P2P_ROLE role)
                        reset_ch_sitesurvey_timer_process2(padapter);
                        rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
                        rtw_p2p_set_role(pwdinfo, P2P_ROLE_DISABLE);
-                       _rtw_memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
+                       memset(&pwdinfo->rx_prov_disc_info, 0x00, sizeof(struct rx_provdisc_req_info));
                }
 
                rtw_hal_set_odm_var(padapter, HAL_ODM_P2P_STATE, NULL, false);
index 739e250416922eef63cdd5d996656b047a5cb811..9b80c8aa00c1b4f29c29e2493f9aa450d54ec4c8 100644 (file)
 #include <osdep_service.h>
 #include <drv_types.h>
 #include <osdep_intf.h>
+#include <usb_ops_linux.h>
 #include <linux/usb.h>
+#include <usb_osintf.h>
+
+static int rtw_hw_suspend(struct adapter *padapter)
+{
+       struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
+       struct net_device *pnetdev = padapter->pnetdev;
+
+
+       if ((!padapter->bup) || (padapter->bDriverStopped) ||
+           (padapter->bSurpriseRemoved)) {
+               DBG_88E("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n",
+                       padapter->bup, padapter->bDriverStopped,
+                       padapter->bSurpriseRemoved);
+               goto error_exit;
+       }
+
+       /* system suspend */
+       LeaveAllPowerSaveMode(padapter);
+
+       DBG_88E("==> rtw_hw_suspend\n");
+       _enter_pwrlock(&pwrpriv->lock);
+       pwrpriv->bips_processing = true;
+       /* s1. */
+       if (pnetdev) {
+               netif_carrier_off(pnetdev);
+               netif_tx_stop_all_queues(pnetdev);
+       }
+
+       /* s2. */
+       rtw_disassoc_cmd(padapter, 500, false);
+
+       /* s2-2.  indicate disconnect to os */
+       {
+               struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
+
+               if (check_fwstate(pmlmepriv, _FW_LINKED)) {
+                       _clr_fwstate_(pmlmepriv, _FW_LINKED);
+
+                       rtw_led_control(padapter, LED_CTL_NO_LINK);
+
+                       rtw_os_indicate_disconnect(padapter);
+
+                       /* donnot enqueue cmd */
+                       rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 0);
+               }
+       }
+       /* s2-3. */
+       rtw_free_assoc_resources(padapter, 1);
+
+       /* s2-4. */
+       rtw_free_network_queue(padapter, true);
+       rtw_ips_dev_unload(padapter);
+       pwrpriv->rf_pwrstate = rf_off;
+       pwrpriv->bips_processing = false;
+
+       _exit_pwrlock(&pwrpriv->lock);
+
+       return 0;
+
+error_exit:
+       DBG_88E("%s, failed\n", __func__);
+       return -1;
+}
+
+static int rtw_hw_resume(struct adapter *padapter)
+{
+       struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
+       struct net_device *pnetdev = padapter->pnetdev;
+
+
+       /* system resume */
+       DBG_88E("==> rtw_hw_resume\n");
+       _enter_pwrlock(&pwrpriv->lock);
+       pwrpriv->bips_processing = true;
+       rtw_reset_drv_sw(padapter);
+
+       if (pm_netdev_open(pnetdev, false) != 0) {
+               _exit_pwrlock(&pwrpriv->lock);
+               goto error_exit;
+       }
+
+       netif_device_attach(pnetdev);
+       netif_carrier_on(pnetdev);
+
+       if (!netif_queue_stopped(pnetdev))
+               netif_start_queue(pnetdev);
+       else
+               netif_wake_queue(pnetdev);
+
+       pwrpriv->bkeepfwalive = false;
+       pwrpriv->brfoffbyhw = false;
+
+       pwrpriv->rf_pwrstate = rf_on;
+       pwrpriv->bips_processing = false;
+
+       _exit_pwrlock(&pwrpriv->lock);
+
+
+       return 0;
+error_exit:
+       DBG_88E("%s, Open net dev failed\n", __func__);
+       return -1;
+}
 
 void ips_enter(struct adapter *padapter)
 {
@@ -100,7 +204,7 @@ int ips_leave(struct adapter *padapter)
                        }
                }
 
-               DBG_88E("==> ips_leave.....LED(0x%08x)...\n", rtw_read32(padapter, 0x4c));
+               DBG_88E("==> ips_leave.....LED(0x%08x)...\n", usb_read32(padapter, 0x4c));
                pwrpriv->bips_processing = false;
 
                pwrpriv->bkeepfwalive = false;
@@ -114,7 +218,6 @@ int ips_leave(struct adapter *padapter)
 
 static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
 {
-       struct adapter *buddy = adapter->pbuddy_adapter;
        struct mlme_priv *pmlmepriv = &(adapter->mlmepriv);
 #ifdef CONFIG_88EU_P2P
        struct wifidirect_info  *pwdinfo = &(adapter->wdinfo);
@@ -136,24 +239,6 @@ static bool rtw_pwr_unassociated_idle(struct adapter *adapter)
 #endif
                goto exit;
 
-       /* consider buddy, if exist */
-       if (buddy) {
-               struct mlme_priv *b_pmlmepriv = &(buddy->mlmepriv);
-               #ifdef CONFIG_88EU_P2P
-               struct wifidirect_info *b_pwdinfo = &(buddy->wdinfo);
-               #endif
-
-               if (check_fwstate(b_pmlmepriv, WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
-                   check_fwstate(b_pmlmepriv, WIFI_UNDER_LINKING|WIFI_UNDER_WPS) ||
-                   check_fwstate(b_pmlmepriv, WIFI_AP_STATE) ||
-                   check_fwstate(b_pmlmepriv, WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE) ||
-#if defined(CONFIG_88EU_P2P)
-                   !rtw_p2p_chk_state(b_pwdinfo, P2P_STATE_NONE))
-#else
-                   0)
-#endif
-                       goto exit;
-       }
        ret = true;
 
 exit:
@@ -179,7 +264,6 @@ void rtw_ps_processor(struct adapter *padapter)
                        if (rfpwrstate == rf_off) {
                                pwrpriv->change_rfpwrstate = rf_off;
                                pwrpriv->brfoffbyhw = true;
-                               padapter->bCardDisableWOHSM = true;
                                rtw_hw_suspend(padapter);
                        } else {
                                pwrpriv->change_rfpwrstate = rf_on;
index 0e73df5975b8f919800b6904d6955cdffee153ac..e0f0765f3c6402992c78f5094c2cb7f50763b67a 100644 (file)
@@ -23,7 +23,6 @@
 #include <drv_types.h>
 #include <recv_osdep.h>
 #include <mlme_osdep.h>
-#include <usb_ops.h>
 #include <wifi.h>
 #include <linux/vmalloc.h>
 
@@ -47,7 +46,7 @@ void rtw_signal_stat_timer_hdl(RTW_TIMER_HDL_ARGS);
 void _rtw_init_sta_recv_priv(struct sta_recv_priv *psta_recvpriv)
 {
 
-       _rtw_memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv));
+       memset((u8 *)psta_recvpriv, 0, sizeof (struct sta_recv_priv));
 
        spin_lock_init(&psta_recvpriv->lock);
 
@@ -83,9 +82,9 @@ int _rtw_init_recv_priv(struct recv_priv *precvpriv, struct adapter *padapter)
        precvframe = (struct recv_frame *)precvpriv->precv_frame_buf;
 
        for (i = 0; i < NR_RECVFRAME; i++) {
-               _rtw_init_listhead(&(precvframe->list));
+               INIT_LIST_HEAD(&(precvframe->list));
 
-               rtw_list_insert_tail(&(precvframe->list),
+               list_add_tail(&(precvframe->list),
                                     &(precvpriv->free_recv_queue.queue));
 
                res = rtw_os_recv_resource_alloc(padapter, precvframe);
@@ -132,7 +131,7 @@ struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
        struct adapter *padapter;
        struct recv_priv *precvpriv;
 
-       if (_rtw_queue_empty(pfree_recv_queue)) {
+       if (list_empty(&pfree_recv_queue->queue)) {
                hdr = NULL;
        } else {
                phead = get_list_head(pfree_recv_queue);
@@ -141,7 +140,7 @@ struct recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue)
 
                hdr = container_of(plist, struct recv_frame, list);
 
-               rtw_list_delete(&hdr->list);
+               list_del_init(&hdr->list);
                padapter = hdr->adapter;
                if (padapter != NULL) {
                        precvpriv = &padapter->recvpriv;
@@ -170,7 +169,7 @@ struct recv_frame *rtw_alloc_recvframe(struct __queue *pfree_recv_queue)
 void rtw_init_recvframe(struct recv_frame *precvframe, struct recv_priv *precvpriv)
 {
        /* Perry: This can be removed */
-       _rtw_init_listhead(&precvframe->list);
+       INIT_LIST_HEAD(&precvframe->list);
 
        precvframe->len = 0;
 }
@@ -192,11 +191,11 @@ int rtw_free_recvframe(struct recv_frame *precvframe,
 
        spin_lock_bh(&pfree_recv_queue->lock);
 
-       rtw_list_delete(&(precvframe->list));
+       list_del_init(&(precvframe->list));
 
        precvframe->len = 0;
 
-       rtw_list_insert_tail(&(precvframe->list), get_list_head(pfree_recv_queue));
+       list_add_tail(&(precvframe->list), get_list_head(pfree_recv_queue));
 
        if (padapter != NULL) {
                if (pfree_recv_queue == &precvpriv->free_recv_queue)
@@ -215,8 +214,8 @@ int _rtw_enqueue_recvframe(struct recv_frame *precvframe, struct __queue *queue)
        struct recv_priv *precvpriv = &padapter->recvpriv;
 
 
-       rtw_list_delete(&(precvframe->list));
-       rtw_list_insert_tail(&(precvframe->list), get_list_head(queue));
+       list_del_init(&(precvframe->list));
+       list_add_tail(&(precvframe->list), get_list_head(queue));
 
        if (padapter != NULL) {
                if (queue == &precvpriv->free_recv_queue)
@@ -256,7 +255,7 @@ void rtw_free_recvframe_queue(struct __queue *pframequeue,  struct __queue *pfre
        phead = get_list_head(pframequeue);
        plist = phead->next;
 
-       while (rtw_end_of_queue_search(phead, plist) == false) {
+       while (phead != plist) {
                hdr = container_of(plist, struct recv_frame, list);
 
                plist = plist->next;
@@ -1040,12 +1039,12 @@ static int validate_recv_ctrl_frame(struct adapter *padapter,
                        xmitframe_phead = get_list_head(&psta->sleep_q);
                        xmitframe_plist = xmitframe_phead->next;
 
-                       if ((rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
+                       if (xmitframe_phead != xmitframe_plist) {
                                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
                                xmitframe_plist = xmitframe_plist->next;
 
-                               rtw_list_delete(&pxmitframe->list);
+                               list_del_init(&pxmitframe->list);
 
                                psta->sleepq_len--;
 
@@ -1455,7 +1454,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
        plist = phead->next;
        pfhdr = container_of(plist, struct recv_frame, list);
        prframe = (struct recv_frame *)pfhdr;
-       rtw_list_delete(&(prframe->list));
+       list_del_init(&(prframe->list));
 
        if (curfragnum != pfhdr->attrib.frag_num) {
                /* the first fragment number must be 0 */
@@ -1472,7 +1471,7 @@ static struct recv_frame *recvframe_defrag(struct adapter *adapter,
 
        plist = plist->next;
 
-       while (rtw_end_of_queue_search(phead, plist) == false) {
+       while (phead != plist) {
                pnfhdr = container_of(plist, struct recv_frame, list);
                pnextrframe = (struct recv_frame *)pnfhdr;
 
@@ -1564,7 +1563,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter,
                if (pdefrag_q != NULL) {
                        if (fragnum == 0) {
                                /* the first fragment */
-                               if (_rtw_queue_empty(pdefrag_q) == false) {
+                               if (!list_empty(&pdefrag_q->queue)) {
                                        /* free current defrag_q */
                                        rtw_free_recvframe_queue(pdefrag_q, pfree_recv_queue);
                                }
@@ -1573,7 +1572,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter,
                        /* Then enqueue the 0~(n-1) fragment into the defrag_q */
 
                        phead = get_list_head(pdefrag_q);
-                       rtw_list_insert_tail(&pfhdr->list, phead);
+                       list_add_tail(&pfhdr->list, phead);
 
                        RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("Enqueuq: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum));
 
@@ -1591,7 +1590,7 @@ struct recv_frame *recvframe_chk_defrag(struct adapter *padapter,
                /* enqueue the last fragment */
                if (pdefrag_q != NULL) {
                        phead = get_list_head(pdefrag_q);
-                       rtw_list_insert_tail(&pfhdr->list, phead);
+                       list_add_tail(&pfhdr->list, phead);
 
                        /* call recvframe_defrag to defrag */
                        RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("defrag: ismfrag=%d, fragnum=%d\n", ismfrag, fragnum));
@@ -1645,7 +1644,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
 
        while (a_len > ETH_HLEN) {
                /* Offset 12 denote 2 mac address */
-               nSubframe_Length = RTW_GET_BE16(pdata + 12);
+               nSubframe_Length = get_unaligned_be16(pdata + 12);
 
                if (a_len < (ETHERNET_HEADER_SIZE + nSubframe_Length)) {
                        DBG_88E("nRemain_Length is %d and nSubframe_Length is : %d\n", a_len, nSubframe_Length);
@@ -1700,7 +1699,7 @@ static int amsdu_to_msdu(struct adapter *padapter, struct recv_frame *prframe)
        for (i = 0; i < nr_subframes; i++) {
                sub_skb = subframes[i];
                /* convert hdr + possible LLC headers into Ethernet header */
-               eth_type = RTW_GET_BE16(&sub_skb->data[6]);
+               eth_type = get_unaligned_be16(&sub_skb->data[6]);
                if (sub_skb->len >= 8 &&
                    ((!memcmp(sub_skb->data, rtw_rfc1042_header, SNAP_SIZE) &&
                          eth_type != ETH_P_AARP && eth_type != ETH_P_IPX) ||
@@ -1778,7 +1777,7 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
        phead = get_list_head(ppending_recvframe_queue);
        plist = phead->next;
 
-       while (rtw_end_of_queue_search(phead, plist) == false) {
+       while (phead != plist) {
                hdr = container_of(plist, struct recv_frame, list);
                pnextattrib = &hdr->attrib;
 
@@ -1790,9 +1789,9 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
                        break;
        }
 
-       rtw_list_delete(&(prframe->list));
+       list_del_init(&(prframe->list));
 
-       rtw_list_insert_tail(&(prframe->list), plist);
+       list_add_tail(&(prframe->list), plist);
        return true;
 }
 
@@ -1811,7 +1810,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 
        /*  Handling some condition for forced indicate case. */
        if (bforced) {
-               if (rtw_is_list_empty(phead))
+               if (list_empty(phead))
                        return true;
 
                prhdr = container_of(plist, struct recv_frame, list);
@@ -1821,7 +1820,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
 
        /*  Prepare indication list and indication. */
        /*  Check if there is any packet need indicate. */
-       while (!rtw_is_list_empty(phead)) {
+       while (!list_empty(phead)) {
                prhdr = container_of(plist, struct recv_frame, list);
                prframe = (struct recv_frame *)prhdr;
                pattrib = &prframe->attrib;
@@ -1831,7 +1830,7 @@ static int recv_indicatepkts_in_order(struct adapter *padapter, struct recv_reor
                                 ("recv_indicatepkts_in_order: indicate=%d seq=%d amsdu=%d\n",
                                  preorder_ctrl->indicate_seq, pattrib->seq_num, pattrib->amsdu));
                        plist = plist->next;
-                       rtw_list_delete(&(prframe->list));
+                       list_del_init(&(prframe->list));
 
                        if (SN_EQUAL(preorder_ctrl->indicate_seq, pattrib->seq_num))
                                preorder_ctrl->indicate_seq = (preorder_ctrl->indicate_seq + 1) & 0xFFF;
index 05335959b54340e0fe7236166343f0c5b9e44bd8..d78def549df1eed55bd36b197ff7bdb490f7731c 100644 (file)
@@ -189,7 +189,7 @@ void rtw_wep_encrypt(struct adapter *padapter, u8 *pxmitframe)
                                arcfour_encrypt(&mycontext, payload+length, crc, 4);
 
                                pframe += pxmitpriv->frag_len;
-                               pframe = (u8 *)RND4((size_t)(pframe));
+                               pframe = (u8 *) round_up((size_t)(pframe), 4);
                        }
                }
        }
@@ -628,7 +628,7 @@ u32 rtw_tkip_encrypt(struct adapter *padapter, u8 *pxmitframe)
                                        arcfour_encrypt(&mycontext, payload+length, crc, 4);
 
                                        pframe += pxmitpriv->frag_len;
-                                       pframe = (u8 *)RND4((size_t)(pframe));
+                                       pframe = (u8 *) round_up((size_t)(pframe), 4);
                                }
                        }
                } else {
@@ -1081,13 +1081,13 @@ static int aes_cipher(u8 *key, uint hdrlen, u8 *pframe, uint plen)
 
        frsubtype = frsubtype>>4;
 
-       _rtw_memset((void *)mic_iv, 0, 16);
-       _rtw_memset((void *)mic_header1, 0, 16);
-       _rtw_memset((void *)mic_header2, 0, 16);
-       _rtw_memset((void *)ctr_preload, 0, 16);
-       _rtw_memset((void *)chain_buffer, 0, 16);
-       _rtw_memset((void *)aes_out, 0, 16);
-       _rtw_memset((void *)padded_buffer, 0, 16);
+       memset((void *)mic_iv, 0, 16);
+       memset((void *)mic_header1, 0, 16);
+       memset((void *)mic_header2, 0, 16);
+       memset((void *)ctr_preload, 0, 16);
+       memset((void *)chain_buffer, 0, 16);
+       memset((void *)aes_out, 0, 16);
+       memset((void *)padded_buffer, 0, 16);
 
        if ((hdrlen == WLAN_HDR_A3_LEN) || (hdrlen ==  WLAN_HDR_A3_QOS_LEN))
                a4_exists = 0;
@@ -1242,7 +1242,7 @@ u32       rtw_aes_encrypt(struct adapter *padapter, u8 *pxmitframe)
 
                                        aes_cipher(prwskey, pattrib->hdrlen, pframe, length);
                                        pframe += pxmitpriv->frag_len;
-                                       pframe = (u8 *)RND4((size_t)(pframe));
+                                       pframe = (u8 *) round_up((size_t)(pframe), 8);
                                }
                        }
                } else{
@@ -1279,13 +1279,13 @@ static int aes_decipher(u8 *key, uint   hdrlen,
        uint    frsubtype  = GetFrameSubType(pframe);
        frsubtype = frsubtype>>4;
 
-       _rtw_memset((void *)mic_iv, 0, 16);
-       _rtw_memset((void *)mic_header1, 0, 16);
-       _rtw_memset((void *)mic_header2, 0, 16);
-       _rtw_memset((void *)ctr_preload, 0, 16);
-       _rtw_memset((void *)chain_buffer, 0, 16);
-       _rtw_memset((void *)aes_out, 0, 16);
-       _rtw_memset((void *)padded_buffer, 0, 16);
+       memset((void *)mic_iv, 0, 16);
+       memset((void *)mic_header1, 0, 16);
+       memset((void *)mic_header2, 0, 16);
+       memset((void *)ctr_preload, 0, 16);
+       memset((void *)chain_buffer, 0, 16);
+       memset((void *)aes_out, 0, 16);
+       memset((void *)padded_buffer, 0, 16);
 
        /* start to decrypt the payload */
 
index ee20d4ad004f301f27213b715008439a123fdf0d..cd4e344e6ffd0c93c94bc6d74c1539cc089910f4 100644 (file)
  ******************************************************************************/
 
 #include <rtw_sreset.h>
+#include <usb_ops_linux.h>
 
 void sreset_init_value(struct adapter *padapter)
 {
        struct hal_data_8188e   *pHalData = GET_HAL_DATA(padapter);
        struct sreset_priv *psrtpriv = &pHalData->srestpriv;
 
-       mutex_init(&psrtpriv->silentreset_mutex);
-       psrtpriv->silent_reset_inprogress = false;
        psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
-       psrtpriv->last_tx_time = 0;
-       psrtpriv->last_tx_complete_time = 0;
-}
-void sreset_reset_value(struct adapter *padapter)
-{
-       struct hal_data_8188e   *pHalData = GET_HAL_DATA(padapter);
-       struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
-       psrtpriv->silent_reset_inprogress = false;
-       psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
-       psrtpriv->last_tx_time = 0;
-       psrtpriv->last_tx_complete_time = 0;
 }
 
 u8 sreset_get_wifi_status(struct adapter *padapter)
@@ -50,9 +37,7 @@ u8 sreset_get_wifi_status(struct adapter *padapter)
        u8 status = WIFI_STATUS_SUCCESS;
        u32 val32 = 0;
 
-       if (psrtpriv->silent_reset_inprogress)
-               return status;
-       val32 = rtw_read32(padapter, REG_TXDMA_STATUS);
+       val32 = usb_read32(padapter, REG_TXDMA_STATUS);
        if (val32 == 0xeaeaeaea) {
                psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
        } else if (val32 != 0) {
index 2d0b60686a01d51955153e270a2dfc0411d76f76..e1dc8fa82d38227d7b3d7d49cc9a235d773ec8be 100644 (file)
 
 static void _rtw_init_stainfo(struct sta_info *psta)
 {
-       _rtw_memset((u8 *)psta, 0, sizeof (struct sta_info));
+       memset((u8 *)psta, 0, sizeof (struct sta_info));
 
         spin_lock_init(&psta->lock);
-       _rtw_init_listhead(&psta->list);
-       _rtw_init_listhead(&psta->hash_list);
+       INIT_LIST_HEAD(&psta->list);
+       INIT_LIST_HEAD(&psta->hash_list);
        _rtw_init_queue(&psta->sleep_q);
        psta->sleepq_len = 0;
 
@@ -42,9 +42,9 @@ static void _rtw_init_stainfo(struct sta_info *psta)
 
 #ifdef CONFIG_88EU_AP_MODE
 
-       _rtw_init_listhead(&psta->asoc_list);
+       INIT_LIST_HEAD(&psta->asoc_list);
 
-       _rtw_init_listhead(&psta->auth_list);
+       INIT_LIST_HEAD(&psta->auth_list);
 
        psta->expire_to = 0;
 
@@ -98,9 +98,9 @@ u32   _rtw_init_sta_priv(struct       sta_priv *pstapriv)
        for (i = 0; i < NUM_STA; i++) {
                _rtw_init_stainfo(psta);
 
-               _rtw_init_listhead(&(pstapriv->sta_hash[i]));
+               INIT_LIST_HEAD(&(pstapriv->sta_hash[i]));
 
-               rtw_list_insert_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue));
+               list_add_tail(&psta->list, get_list_head(&pstapriv->free_sta_queue));
 
                psta++;
        }
@@ -110,8 +110,8 @@ u32 _rtw_init_sta_priv(struct       sta_priv *pstapriv)
        pstapriv->sta_dz_bitmap = 0;
        pstapriv->tim_bitmap = 0;
 
-       _rtw_init_listhead(&pstapriv->asoc_list);
-       _rtw_init_listhead(&pstapriv->auth_list);
+       INIT_LIST_HEAD(&pstapriv->asoc_list);
+       INIT_LIST_HEAD(&pstapriv->auth_list);
        spin_lock_init(&pstapriv->asoc_list_lock);
        spin_lock_init(&pstapriv->auth_list_lock);
        pstapriv->asoc_list_cnt = 0;
@@ -157,7 +157,7 @@ static void rtw_mfree_all_stainfo(struct sta_priv *pstapriv)
        phead = get_list_head(&pstapriv->free_sta_queue);
        plist = phead->next;
 
-       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info , list);
                plist = plist->next;
        }
@@ -185,7 +185,7 @@ u32 _rtw_free_sta_priv(struct       sta_priv *pstapriv)
                        phead = &(pstapriv->sta_hash[index]);
                        plist = phead->next;
 
-                       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+                       while (phead != plist) {
                                int i;
                                psta = container_of(plist, struct sta_info , hash_list);
                                plist = plist->next;
@@ -223,12 +223,12 @@ struct    sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
 
        spin_lock_bh(&(pfree_sta_queue->lock));
 
-       if (_rtw_queue_empty(pfree_sta_queue) == true) {
+       if (list_empty(&pfree_sta_queue->queue)) {
                spin_unlock_bh(&pfree_sta_queue->lock);
                psta = NULL;
        } else {
                psta = container_of((&pfree_sta_queue->queue)->next, struct sta_info, list);
-               rtw_list_delete(&(psta->list));
+               list_del_init(&(psta->list));
                spin_unlock_bh(&pfree_sta_queue->lock);
                _rtw_init_stainfo(psta);
                memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
@@ -243,7 +243,7 @@ struct      sta_info *rtw_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
 
                spin_lock_bh(&(pstapriv->sta_hash_lock));
 
-               rtw_list_insert_tail(&psta->hash_list, phash_list);
+               list_add_tail(&psta->hash_list, phash_list);
 
                pstapriv->asoc_sta_count++;
 
@@ -317,23 +317,23 @@ u32       rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
 
        rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
 
-       rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
 
        rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
 
-       rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
 
        rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
 
-       rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
 
        rtw_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
 
-       rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->be_q.tx_pending));
 
        spin_unlock_bh(&pxmitpriv->lock);
 
-       rtw_list_delete(&psta->hash_list);
+       list_del_init(&psta->hash_list);
        RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_, ("\n free number_%d stainfo  with hwaddr=0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n", pstapriv->asoc_sta_count , psta->hwaddr[0], psta->hwaddr[1], psta->hwaddr[2], psta->hwaddr[3], psta->hwaddr[4], psta->hwaddr[5]));
        pstapriv->asoc_sta_count--;
 
@@ -362,13 +362,13 @@ u32       rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
                phead =         get_list_head(ppending_recvframe_queue);
                plist = phead->next;
 
-               while (!rtw_is_list_empty(phead)) {
+               while (!list_empty(phead)) {
                        prhdr = container_of(plist, struct recv_frame, list);
                        prframe = (struct recv_frame *)prhdr;
 
                        plist = plist->next;
 
-                       rtw_list_delete(&(prframe->list));
+                       list_del_init(&(prframe->list));
 
                        rtw_free_recvframe(prframe, pfree_recv_queue);
                }
@@ -382,8 +382,8 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
 #ifdef CONFIG_88EU_AP_MODE
 
        spin_lock_bh(&pstapriv->auth_list_lock);
-       if (!rtw_is_list_empty(&psta->auth_list)) {
-               rtw_list_delete(&psta->auth_list);
+       if (!list_empty(&psta->auth_list)) {
+               list_del_init(&psta->auth_list);
                pstapriv->auth_list_cnt--;
        }
        spin_unlock_bh(&pstapriv->auth_list_lock);
@@ -413,7 +413,7 @@ u32 rtw_free_stainfo(struct adapter *padapter , struct sta_info *psta)
 #endif /*  CONFIG_88EU_AP_MODE */
 
        spin_lock_bh(&(pfree_sta_queue->lock));
-       rtw_list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
+       list_add_tail(&psta->list, get_list_head(pfree_sta_queue));
        spin_unlock_bh(&pfree_sta_queue->lock);
 
 exit:
@@ -441,7 +441,7 @@ void rtw_free_all_stainfo(struct adapter *padapter)
                phead = &(pstapriv->sta_hash[index]);
                plist = phead->next;
 
-               while ((!rtw_end_of_queue_search(phead, plist))) {
+               while (phead != plist) {
                        psta = container_of(plist, struct sta_info , hash_list);
 
                        plist = plist->next;
@@ -478,7 +478,7 @@ struct sta_info *rtw_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
        phead = &(pstapriv->sta_hash[index]);
        plist = phead->next;
 
-       while ((!rtw_end_of_queue_search(phead, plist))) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, hash_list);
 
                if ((!memcmp(psta->hwaddr, addr, ETH_ALEN)) == true) {
@@ -539,7 +539,7 @@ u8 rtw_access_ctrl(struct adapter *padapter, u8 *mac_addr)
        spin_lock_bh(&(pacl_node_q->lock));
        phead = get_list_head(pacl_node_q);
        plist = phead->next;
-       while ((!rtw_end_of_queue_search(phead, plist))) {
+       while (phead != plist) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
                plist = plist->next;
 
index 6fb8caa94abb37cc692ada4e8bc9d8c8432313f7..2e709e678cb95ea54236529dab76156f5171bc06 100644 (file)
@@ -239,7 +239,7 @@ void get_rate_set(struct adapter *padapter, unsigned char *pbssrate, int *bssrat
 {
        unsigned char supportedrates[NumRates];
 
-       _rtw_memset(supportedrates, 0, NumRates);
+       memset(supportedrates, 0, NumRates);
        *bssrate_len = ratetbl2rateset(padapter, supportedrates);
        memcpy(pbssrate, supportedrates, *bssrate_len);
 }
@@ -541,7 +541,7 @@ void flush_all_cam_entry(struct adapter *padapter)
 
        rtw_hal_set_hwreg(padapter, HW_VAR_CAM_INVALID_ALL, NULL);
 
-       _rtw_memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
+       memset((u8 *)(pmlmeinfo->FW_sta_info), 0, sizeof(pmlmeinfo->FW_sta_info));
 }
 
 int WMM_param_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE)
@@ -935,7 +935,7 @@ int rtw_check_bcn_info(struct adapter  *Adapter, u8 *pframe, u32 packet_len)
                return true;
        }
 
-       bssid = (struct wlan_bssid_ex *)rtw_zmalloc(sizeof(struct wlan_bssid_ex));
+       bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_KERNEL);
 
        subtype = GetFrameSubType(pframe) >> 4;
 
@@ -1366,7 +1366,7 @@ void update_tx_basic_rate(struct adapter *padapter, u8 wirelessmode)
        if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE))
                return;
 #endif /* CONFIG_88EU_P2P */
-       _rtw_memset(supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX);
+       memset(supported_rates, 0, NDIS_802_11_LENGTH_RATES_EX);
 
        if ((wirelessmode & WIRELESS_11B) && (wirelessmode == WIRELESS_11B))
                memcpy(supported_rates, rtw_basic_rate_cck, 4);
index 1413ec8ad3bffff9fb14aa44e93b12b3edcc9924..95c508a09b23066fd900299b4e33b5d2898c00dd 100644 (file)
@@ -23,7 +23,6 @@
 #include <drv_types.h>
 #include <wifi.h>
 #include <osdep_intf.h>
-#include <usb_ops.h>
 #include <usb_osintf.h>
 #include <linux/vmalloc.h>
 
@@ -32,21 +31,21 @@ static u8 RFC1042_OUI[P80211_OUI_LEN] = { 0x00, 0x00, 0x00 };
 
 static void _init_txservq(struct tx_servq *ptxservq)
 {
-       _rtw_init_listhead(&ptxservq->tx_pending);
+       INIT_LIST_HEAD(&ptxservq->tx_pending);
        _rtw_init_queue(&ptxservq->sta_pending);
        ptxservq->qcnt = 0;
 }
 
 void   _rtw_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
 {
-       _rtw_memset((unsigned char *)psta_xmitpriv, 0, sizeof (struct sta_xmit_priv));
+       memset((unsigned char *)psta_xmitpriv, 0, sizeof (struct sta_xmit_priv));
        spin_lock_init(&psta_xmitpriv->lock);
        _init_txservq(&psta_xmitpriv->be_q);
        _init_txservq(&psta_xmitpriv->bk_q);
        _init_txservq(&psta_xmitpriv->vi_q);
        _init_txservq(&psta_xmitpriv->vo_q);
-       _rtw_init_listhead(&psta_xmitpriv->legacy_dz);
-       _rtw_init_listhead(&psta_xmitpriv->apsd);
+       INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz);
+       INIT_LIST_HEAD(&psta_xmitpriv->apsd);
 
 }
 
@@ -101,7 +100,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
        pxframe = (struct xmit_frame *)pxmitpriv->pxmit_frame_buf;
 
        for (i = 0; i < NR_XMITFRAME; i++) {
-               _rtw_init_listhead(&(pxframe->list));
+               INIT_LIST_HEAD(&(pxframe->list));
 
                pxframe->padapter = padapter;
                pxframe->frame_tag = NULL_FRAMETAG;
@@ -111,7 +110,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
                pxframe->buf_addr = NULL;
                pxframe->pxmitbuf = NULL;
 
-               rtw_list_insert_tail(&(pxframe->list), &(pxmitpriv->free_xmit_queue.queue));
+               list_add_tail(&(pxframe->list), &(pxmitpriv->free_xmit_queue.queue));
 
                pxframe++;
        }
@@ -139,7 +138,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
        pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
 
        for (i = 0; i < NR_XMITBUFF; i++) {
-               _rtw_init_listhead(&pxmitbuf->list);
+               INIT_LIST_HEAD(&pxmitbuf->list);
 
                pxmitbuf->priv_data = NULL;
                pxmitbuf->padapter = padapter;
@@ -157,7 +156,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
 
                pxmitbuf->flags = XMIT_VO_QUEUE;
 
-               rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue));
+               list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmitbuf_queue.queue));
                pxmitbuf++;
        }
 
@@ -179,7 +178,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
        pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmit_extbuf;
 
        for (i = 0; i < num_xmit_extbuf; i++) {
-               _rtw_init_listhead(&pxmitbuf->list);
+               INIT_LIST_HEAD(&pxmitbuf->list);
 
                pxmitbuf->priv_data = NULL;
                pxmitbuf->padapter = padapter;
@@ -191,7 +190,7 @@ s32 _rtw_init_xmit_priv(struct xmit_priv *pxmitpriv, struct adapter *padapter)
                        goto exit;
                }
 
-               rtw_list_insert_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
+               list_add_tail(&pxmitbuf->list, &(pxmitpriv->free_xmit_extbuf_queue.queue));
                pxmitbuf++;
        }
 
@@ -234,9 +233,6 @@ void _rtw_free_xmit_priv (struct xmit_priv *pxmitpriv)
        u32 max_xmit_extbuf_size = MAX_XMIT_EXTBUF_SZ;
        u32 num_xmit_extbuf = NR_XMIT_EXTBUFF;
 
-
-       rtw_hal_free_xmit_priv(padapter);
-
        if (pxmitpriv->pxmit_frame_buf == NULL)
                return;
 
@@ -696,7 +692,7 @@ static s32 xmitframe_addmic(struct adapter *padapter, struct xmit_frame *pxmitfr
                        payload = pframe;
 
                        for (curfragnum = 0; curfragnum < pattrib->nr_frags; curfragnum++) {
-                               payload = (u8 *)RND4((size_t)(payload));
+                               payload = (u8 *) round_up((size_t)(payload), 4);
                                RT_TRACE(_module_rtl871x_xmit_c_, _drv_err_,
                                         ("=== curfragnum=%d, pframe = 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x, 0x%.2x,!!!\n",
                                         curfragnum, *payload, *(payload+1),
@@ -804,7 +800,7 @@ s32 rtw_make_wlanhdr (struct adapter *padapter , u8 *hdr, struct pkt_attrib *pat
                }
        }
 
-       _rtw_memset(hdr, 0, WLANHDR_OFFSET);
+       memset(hdr, 0, WLANHDR_OFFSET);
 
        SetFrameSubType(fctrl, pattrib->subtype);
 
@@ -905,10 +901,10 @@ s32 rtw_txframes_pending(struct adapter *padapter)
 {
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
 
-       return ((_rtw_queue_empty(&pxmitpriv->be_pending) == false) ||
-                        (_rtw_queue_empty(&pxmitpriv->bk_pending) == false) ||
-                        (_rtw_queue_empty(&pxmitpriv->vi_pending) == false) ||
-                        (_rtw_queue_empty(&pxmitpriv->vo_pending) == false));
+       return (!list_empty(&pxmitpriv->be_pending.queue) ||
+                       !list_empty(&pxmitpriv->bk_pending.queue) ||
+                       !list_empty(&pxmitpriv->vi_pending.queue) ||
+                       !list_empty(&pxmitpriv->vo_pending.queue));
 }
 
 s32 rtw_txframes_sta_ac_pending(struct adapter *padapter, struct pkt_attrib *pattrib)
@@ -1103,7 +1099,7 @@ s32 rtw_xmitframe_coalesce(struct adapter *padapter, struct sk_buff *pkt, struct
 
                addr = (size_t)(pframe);
 
-               mem_start = (unsigned char *)RND4(addr) + hw_hdr_offset;
+               mem_start = (unsigned char *) round_up(addr, 4) + hw_hdr_offset;
                memcpy(mem_start, pbuf_start + hw_hdr_offset, pattrib->hdrlen);
        }
 
@@ -1226,7 +1222,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
 
        spin_lock_irqsave(&pfree_queue->lock, irql);
 
-       if (_rtw_queue_empty(pfree_queue) == true) {
+       if (list_empty(&pfree_queue->queue)) {
                pxmitbuf = NULL;
        } else {
                phead = get_list_head(pfree_queue);
@@ -1235,7 +1231,7 @@ struct xmit_buf *rtw_alloc_xmitbuf_ext(struct xmit_priv *pxmitpriv)
 
                pxmitbuf = container_of(plist, struct xmit_buf, list);
 
-               rtw_list_delete(&(pxmitbuf->list));
+               list_del_init(&(pxmitbuf->list));
        }
 
        if (pxmitbuf !=  NULL) {
@@ -1267,9 +1263,9 @@ s32 rtw_free_xmitbuf_ext(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
 
        spin_lock_irqsave(&pfree_queue->lock, irql);
 
-       rtw_list_delete(&pxmitbuf->list);
+       list_del_init(&pxmitbuf->list);
 
-       rtw_list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_queue));
+       list_add_tail(&(pxmitbuf->list), get_list_head(pfree_queue));
        pxmitpriv->free_xmit_extbuf_cnt++;
 
        spin_unlock_irqrestore(&pfree_queue->lock, irql);
@@ -1290,7 +1286,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
 
        spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irql);
 
-       if (_rtw_queue_empty(pfree_xmitbuf_queue) == true) {
+       if (list_empty(&pfree_xmitbuf_queue->queue)) {
                pxmitbuf = NULL;
        } else {
                phead = get_list_head(pfree_xmitbuf_queue);
@@ -1299,7 +1295,7 @@ struct xmit_buf *rtw_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
 
                pxmitbuf = container_of(plist, struct xmit_buf, list);
 
-               rtw_list_delete(&(pxmitbuf->list));
+               list_del_init(&(pxmitbuf->list));
        }
 
        if (pxmitbuf !=  NULL) {
@@ -1334,9 +1330,9 @@ s32 rtw_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
        } else {
                spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irql);
 
-               rtw_list_delete(&pxmitbuf->list);
+               list_del_init(&pxmitbuf->list);
 
-               rtw_list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
+               list_add_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
 
                pxmitpriv->free_xmitbuf_cnt++;
                spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irql);
@@ -1373,7 +1369,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
 
        spin_lock_bh(&pfree_xmit_queue->lock);
 
-       if (_rtw_queue_empty(pfree_xmit_queue) == true) {
+       if (list_empty(&pfree_xmit_queue->queue)) {
                RT_TRACE(_module_rtl871x_xmit_c_, _drv_info_, ("rtw_alloc_xmitframe:%d\n", pxmitpriv->free_xmitframe_cnt));
                pxframe =  NULL;
        } else {
@@ -1383,7 +1379,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
 
                pxframe = container_of(plist, struct xmit_frame, list);
 
-               rtw_list_delete(&(pxframe->list));
+               list_del_init(&(pxframe->list));
        }
 
        if (pxframe !=  NULL) { /* default value setting */
@@ -1394,7 +1390,7 @@ struct xmit_frame *rtw_alloc_xmitframe(struct xmit_priv *pxmitpriv)/* _queue *pf
                pxframe->buf_addr = NULL;
                pxframe->pxmitbuf = NULL;
 
-               _rtw_memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib));
+               memset(&pxframe->attrib, 0, sizeof(struct pkt_attrib));
                /* pxframe->attrib.psta = NULL; */
 
                pxframe->frame_tag = DATA_FRAMETAG;
@@ -1426,14 +1422,14 @@ s32 rtw_free_xmitframe(struct xmit_priv *pxmitpriv, struct xmit_frame *pxmitfram
 
        spin_lock_bh(&pfree_xmit_queue->lock);
 
-       rtw_list_delete(&pxmitframe->list);
+       list_del_init(&pxmitframe->list);
 
        if (pxmitframe->pkt) {
                pndis_pkt = pxmitframe->pkt;
                pxmitframe->pkt = NULL;
        }
 
-       rtw_list_insert_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue));
+       list_add_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue));
 
        pxmitpriv->free_xmitframe_cnt++;
        RT_TRACE(_module_rtl871x_xmit_c_, _drv_debug_, ("rtw_free_xmitframe():free_xmitframe_cnt=%d\n", pxmitpriv->free_xmitframe_cnt));
@@ -1460,7 +1456,7 @@ void rtw_free_xmitframe_queue(struct xmit_priv *pxmitpriv, struct __queue *pfram
        phead = get_list_head(pframequeue);
        plist = phead->next;
 
-       while (!rtw_end_of_queue_search(phead, plist)) {
+       while (phead != plist) {
                pxmitframe = container_of(plist, struct xmit_frame, list);
 
                plist = plist->next;
@@ -1491,12 +1487,12 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv, str
        xmitframe_phead = get_list_head(pframe_queue);
        xmitframe_plist = xmitframe_phead->next;
 
-       if (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+       if (xmitframe_phead != xmitframe_plist) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
                xmitframe_plist = xmitframe_plist->next;
 
-               rtw_list_delete(&pxmitframe->list);
+               list_del_init(&pxmitframe->list);
 
                ptxservq->qcnt--;
        }
@@ -1532,7 +1528,7 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
                sta_phead = get_list_head(phwxmit->sta_queue);
                sta_plist = sta_phead->next;
 
-               while (!rtw_end_of_queue_search(sta_phead, sta_plist)) {
+               while (sta_phead != sta_plist) {
                        ptxservq = container_of(sta_plist, struct tx_servq, tx_pending);
 
                        pframe_queue = &ptxservq->sta_pending;
@@ -1543,8 +1539,8 @@ struct xmit_frame *rtw_dequeue_xframe(struct xmit_priv *pxmitpriv, struct hw_xmi
                                phwxmit->accnt--;
 
                                /* Remove sta node when there are no pending packets. */
-                               if (_rtw_queue_empty(pframe_queue)) /* must be done after get_next and before break */
-                                       rtw_list_delete(&ptxservq->tx_pending);
+                               if (list_empty(&pframe_queue->queue)) /* must be done after get_next and before break */
+                                       list_del_init(&ptxservq->tx_pending);
                                goto exit;
                        }
 
@@ -1622,10 +1618,10 @@ s32 rtw_xmit_classifier(struct adapter *padapter, struct xmit_frame *pxmitframe)
 
        ptxservq = rtw_get_sta_pending(padapter, psta, pattrib->priority, (u8 *)(&ac_index));
 
-       if (rtw_is_list_empty(&ptxservq->tx_pending))
-               rtw_list_insert_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
+       if (list_empty(&ptxservq->tx_pending))
+               list_add_tail(&ptxservq->tx_pending, get_list_head(phwxmits[ac_index].sta_queue));
 
-       rtw_list_insert_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
+       list_add_tail(&pxmitframe->list, get_list_head(&ptxservq->sta_pending));
        ptxservq->qcnt++;
        phwxmits[ac_index].accnt++;
 exit:
@@ -1641,7 +1637,7 @@ void rtw_alloc_hwxmits(struct adapter *padapter)
 
        pxmitpriv->hwxmit_entry = HWXMIT_ENTRY;
 
-       pxmitpriv->hwxmits = (struct hw_xmit *)rtw_zmalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry);
+       pxmitpriv->hwxmits = kzalloc(sizeof(struct hw_xmit) * pxmitpriv->hwxmit_entry, GFP_KERNEL);
 
        hwxmits = pxmitpriv->hwxmits;
 
@@ -1676,127 +1672,6 @@ void rtw_init_hwxmits(struct hw_xmit *phwxmit, int entry)
                phwxmit->accnt = 0;
 }
 
-static int rtw_br_client_tx(struct adapter *padapter, struct sk_buff **pskb)
-{
-       struct sk_buff *skb = *pskb;
-       int res, is_vlan_tag = 0, i, do_nat25 = 1;
-       unsigned short vlan_hdr = 0;
-       void *br_port = NULL;
-
-       rcu_read_lock();
-       br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
-       rcu_read_unlock();
-       spin_lock_bh(&padapter->br_ext_lock);
-       if (!(skb->data[0] & 1) && br_port &&
-           memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
-           *((__be16 *)(skb->data+MACADDRLEN*2)) != __constant_htons(ETH_P_8021Q) &&
-           *((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP) &&
-           !memcmp(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN) && padapter->scdb_entry) {
-               memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
-               padapter->scdb_entry->ageing_timer = jiffies;
-               spin_unlock_bh(&padapter->br_ext_lock);
-       } else {
-               if (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_8021Q)) {
-                       is_vlan_tag = 1;
-                       vlan_hdr = *((unsigned short *)(skb->data+MACADDRLEN*2+2));
-                       for (i = 0; i < 6; i++)
-                               *((unsigned short *)(skb->data+MACADDRLEN*2+2-i*2)) = *((unsigned short *)(skb->data+MACADDRLEN*2-2-i*2));
-                       skb_pull(skb, 4);
-               }
-               if (!memcmp(skb->data+MACADDRLEN, padapter->br_mac, MACADDRLEN) &&
-                   (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP)))
-                       memcpy(padapter->br_ip, skb->data+WLAN_ETHHDR_LEN+12, 4);
-
-               if (*((__be16 *)(skb->data+MACADDRLEN*2)) == __constant_htons(ETH_P_IP)) {
-                       if (memcmp(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN)) {
-                               padapter->scdb_entry = (struct nat25_network_db_entry *)scdb_findEntry(padapter,
-                                                       skb->data+MACADDRLEN, skb->data+WLAN_ETHHDR_LEN+12);
-                               if (padapter->scdb_entry) {
-                                       memcpy(padapter->scdb_mac, skb->data+MACADDRLEN, MACADDRLEN);
-                                       memcpy(padapter->scdb_ip, skb->data+WLAN_ETHHDR_LEN+12, 4);
-                                       padapter->scdb_entry->ageing_timer = jiffies;
-                                       do_nat25 = 0;
-                               }
-                       } else {
-                               if (padapter->scdb_entry) {
-                                       padapter->scdb_entry->ageing_timer = jiffies;
-                                       do_nat25 = 0;
-                               } else {
-                                       memset(padapter->scdb_mac, 0, MACADDRLEN);
-                                       memset(padapter->scdb_ip, 0, 4);
-                               }
-                       }
-               }
-               spin_unlock_bh(&padapter->br_ext_lock);
-               if (do_nat25) {
-                       if (nat25_db_handle(padapter, skb, NAT25_CHECK) == 0) {
-                               struct sk_buff *newskb;
-
-                               if (is_vlan_tag) {
-                                       skb_push(skb, 4);
-                                       for (i = 0; i < 6; i++)
-                                               *((unsigned short *)(skb->data+i*2)) = *((unsigned short *)(skb->data+4+i*2));
-                                       *((__be16 *)(skb->data+MACADDRLEN*2)) = __constant_htons(ETH_P_8021Q);
-                                       *((unsigned short *)(skb->data+MACADDRLEN*2+2)) = vlan_hdr;
-                               }
-
-                               newskb = skb_copy(skb, GFP_ATOMIC);
-                               if (newskb == NULL) {
-                                       DEBUG_ERR("TX DROP: skb_copy fail!\n");
-                                       return -1;
-                               }
-                               dev_kfree_skb_any(skb);
-
-                               *pskb = skb = newskb;
-                               if (is_vlan_tag) {
-                                       vlan_hdr = *((unsigned short *)(skb->data+MACADDRLEN*2+2));
-                                       for (i = 0; i < 6; i++)
-                                               *((unsigned short *)(skb->data+MACADDRLEN*2+2-i*2)) = *((unsigned short *)(skb->data+MACADDRLEN*2-2-i*2));
-                                       skb_pull(skb, 4);
-                               }
-                       }
-
-                       if (skb_is_nonlinear(skb))
-                               DEBUG_ERR("%s(): skb_is_nonlinear!!\n", __func__);
-
-                       res = skb_linearize(skb);
-                       if (res < 0) {
-                                       DEBUG_ERR("TX DROP: skb_linearize fail!\n");
-                                       return -1;
-                       }
-
-                       res = nat25_db_handle(padapter, skb, NAT25_INSERT);
-                       if (res < 0) {
-                               if (res == -2) {
-                                       DEBUG_ERR("TX DROP: nat25_db_handle fail!\n");
-                                       return -1;
-                               }
-                               return 0;
-                       }
-               }
-
-               memcpy(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN);
-
-               dhcp_flag_bcast(padapter, skb);
-
-               if (is_vlan_tag) {
-                       skb_push(skb, 4);
-                       for (i = 0; i < 6; i++)
-                               *((unsigned short *)(skb->data+i*2)) = *((unsigned short *)(skb->data+4+i*2));
-                       *((__be16 *)(skb->data+MACADDRLEN*2)) = __constant_htons(ETH_P_8021Q);
-                       *((unsigned short *)(skb->data+MACADDRLEN*2+2)) = vlan_hdr;
-               }
-       }
-
-       /*  check if SA is equal to our MAC */
-       if (memcmp(skb->data+MACADDRLEN, GET_MY_HWADDR(padapter), MACADDRLEN)) {
-               DEBUG_ERR("TX DROP: untransformed frame SA:%02X%02X%02X%02X%02X%02X!\n",
-                         skb->data[6], skb->data[7], skb->data[8], skb->data[9], skb->data[10], skb->data[11]);
-                       return -1;
-       }
-       return 0;
-}
-
 u32 rtw_get_ff_hwaddr(struct xmit_frame *pxmitframe)
 {
        u32 addr;
@@ -1856,8 +1731,6 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
 {
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct xmit_frame *pxmitframe = NULL;
-       struct mlme_priv        *pmlmepriv = &padapter->mlmepriv;
-       void *br_port = NULL;
        s32 res;
 
        pxmitframe = rtw_alloc_xmitframe(pxmitpriv);
@@ -1867,18 +1740,6 @@ s32 rtw_xmit(struct adapter *padapter, struct sk_buff **ppkt)
                return -1;
        }
 
-       rcu_read_lock();
-       br_port = rcu_dereference(padapter->pnetdev->rx_handler_data);
-       rcu_read_unlock();
-
-       if (br_port && check_fwstate(pmlmepriv, WIFI_STATION_STATE|WIFI_ADHOC_STATE)) {
-               res = rtw_br_client_tx(padapter, ppkt);
-               if (res == -1) {
-                       rtw_free_xmitframe(pxmitpriv, pxmitframe);
-                       return -1;
-               }
-       }
-
        res = update_attrib(padapter, *ppkt, &pxmitframe->attrib);
 
        if (res == _FAIL) {
@@ -1939,9 +1800,9 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
                spin_lock_bh(&psta->sleep_q.lock);
 
                if (pstapriv->sta_dz_bitmap) {/* if any one sta is in ps mode */
-                       rtw_list_delete(&pxmitframe->list);
+                       list_del_init(&pxmitframe->list);
 
-                       rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
+                       list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
 
                        psta->sleepq_len++;
 
@@ -1964,9 +1825,9 @@ int xmitframe_enqueue_for_sleeping_sta(struct adapter *padapter, struct xmit_fra
                u8 wmmps_ac = 0;
 
                if (pstapriv->sta_dz_bitmap&BIT(psta->aid)) {
-                       rtw_list_delete(&pxmitframe->list);
+                       list_del_init(&pxmitframe->list);
 
-                       rtw_list_insert_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
+                       list_add_tail(&pxmitframe->list, get_list_head(&psta->sleep_q));
 
                        psta->sleepq_len++;
 
@@ -2023,7 +1884,7 @@ static void dequeue_xmitframes_to_sleeping_queue(struct adapter *padapter, struc
        phead = get_list_head(pframequeue);
        plist = phead->next;
 
-       while (!rtw_end_of_queue_search(phead, plist)) {
+       while (phead != plist) {
                pxmitframe = container_of(plist, struct xmit_frame, list);
 
                plist = plist->next;
@@ -2058,21 +1919,21 @@ void stop_sta_xmit(struct adapter *padapter, struct sta_info *psta)
        pstapriv->sta_dz_bitmap |= BIT(psta->aid);
 
        dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vo_q.sta_pending);
-       rtw_list_delete(&(pstaxmitpriv->vo_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
 
        dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->vi_q.sta_pending);
-       rtw_list_delete(&(pstaxmitpriv->vi_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
 
        dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->be_q.sta_pending);
-       rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->be_q.tx_pending));
 
        dequeue_xmitframes_to_sleeping_queue(padapter, psta, &pstaxmitpriv->bk_q.sta_pending);
-       rtw_list_delete(&(pstaxmitpriv->bk_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
 
        /* for BC/MC Frames */
        pstaxmitpriv = &psta_bmc->sta_xmitpriv;
        dequeue_xmitframes_to_sleeping_queue(padapter, psta_bmc, &pstaxmitpriv->be_q.sta_pending);
-       rtw_list_delete(&(pstaxmitpriv->be_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->be_q.tx_pending));
 
        spin_unlock_bh(&pxmitpriv->lock);
 }
@@ -2090,12 +1951,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
        xmitframe_phead = get_list_head(&psta->sleep_q);
        xmitframe_plist = xmitframe_phead->next;
 
-       while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+       while (xmitframe_phead != xmitframe_plist) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
                xmitframe_plist = xmitframe_plist->next;
 
-               rtw_list_delete(&pxmitframe->list);
+               list_del_init(&pxmitframe->list);
 
                switch (pxmitframe->attrib.priority) {
                case 1:
@@ -2171,12 +2032,12 @@ void wakeup_sta_to_xmit(struct adapter *padapter, struct sta_info *psta)
                xmitframe_phead = get_list_head(&psta_bmc->sleep_q);
                xmitframe_plist = xmitframe_phead->next;
 
-               while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+               while (xmitframe_phead != xmitframe_plist) {
                        pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
                        xmitframe_plist = xmitframe_plist->next;
 
-                       rtw_list_delete(&pxmitframe->list);
+                       list_del_init(&pxmitframe->list);
 
                        psta_bmc->sleepq_len--;
                        if (psta_bmc->sleepq_len > 0)
@@ -2218,7 +2079,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
        xmitframe_phead = get_list_head(&psta->sleep_q);
        xmitframe_plist = xmitframe_phead->next;
 
-       while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+       while (xmitframe_phead != xmitframe_plist) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
 
                xmitframe_plist = xmitframe_plist->next;
@@ -2246,7 +2107,7 @@ void xmit_delivery_enabled_frames(struct adapter *padapter, struct sta_info *pst
                if (!wmmps_ac)
                        continue;
 
-               rtw_list_delete(&pxmitframe->list);
+               list_del_init(&pxmitframe->list);
 
                psta->sleepq_len--;
                psta->sleepq_ac_len--;
index dea220b507ad98260e76492beeaf83d7b930c9bf..3c651d5c6824e19799f656a2add99b73a1dca9d7 100644 (file)
@@ -358,19 +358,19 @@ static int odm_ARFBRefresh_8188E(struct odm_dm_struct *dm_odm, struct odm_ra_inf
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&0x0000000d;
                break;
        case 12:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR0);
+               MaskFromReg = usb_read32(adapt, REG_ARFR0);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        case 13:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR1);
+               MaskFromReg = usb_read32(adapt, REG_ARFR1);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        case 14:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR2);
+               MaskFromReg = usb_read32(adapt, REG_ARFR2);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        case 15:
-               MaskFromReg = rtw_read32(adapt, REG_ARFR3);
+               MaskFromReg = usb_read32(adapt, REG_ARFR3);
                pRaInfo->RAUseRate = (pRaInfo->RateMask)&MaskFromReg;
                break;
        default:
@@ -670,7 +670,7 @@ void ODM_RA_Set_TxRPT_Time(struct odm_dm_struct *dm_odm, u16 minRptTime)
 {
        struct adapter *adapt = dm_odm->Adapter;
 
-       rtw_write16(adapt, REG_TX_RPT_TIME, minRptTime);
+       usb_write16(adapt, REG_TX_RPT_TIME, minRptTime);
 }
 
 void ODM_RA_TxRPT2Handle_8188E(struct odm_dm_struct *dm_odm, u8 *TxRPT_Buf, u16 TxRPT_Len, u32 macid_entry0, u32 macid_entry1)
diff --git a/drivers/staging/rtl8188eu/hal/HalPhyRf.c b/drivers/staging/rtl8188eu/hal/HalPhyRf.c
deleted file mode 100644 (file)
index 980f7da..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-
- #include "odm_precomp.h"
-
-/* 3============================================================ */
-/* 3 IQ Calibration */
-/* 3============================================================ */
-
-void ODM_ResetIQKResult(struct odm_dm_struct *pDM_Odm)
-{
-}
-
-u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
-{
-       u8      channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
-               1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
-               36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
-               100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
-               124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153,
-               155, 157, 159, 161, 163, 165
-       };
-       u8      place = chnl;
-
-       if (chnl > 14) {
-               for (place = 14; place < sizeof(channel_all); place++) {
-                       if (channel_all[place] == chnl)
-                               return place-13;
-               }
-       }
-       return 0;
-}
index 7c22658ed0f1a0ce0be1ac2873fbeeb22bf31d12..3a7d35d2f08b80e95d8de8159fbe181c9ae0d9ec 100644 (file)
@@ -1,5 +1,4 @@
-
-/******************************************************************************
+/*
  *
  * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
  *
  * You should have received a copy of the GNU General Public License along with
  * this program; if not, write to the Free Software Foundation, Inc.,
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
+ */
 
 #include "odm_precomp.h"
 
-/*---------------------------Define Local Constant---------------------------*/
 /*  2010/04/25 MH Define the max tx power tracking tx agc power. */
 #define                ODM_TXPWRTRACK_MAX_IDX_88E              6
 
-/*---------------------------Define Local Constant---------------------------*/
 
-/* 3============================================================ */
+u8 ODM_GetRightChnlPlaceforIQK(u8 chnl)
+{
+       u8      channel_all[ODM_TARGET_CHNL_NUM_2G_5G] = {
+               1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,
+               36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64,
+               100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
+               124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153,
+               155, 157, 159, 161, 163, 165
+       };
+       u8      place = chnl;
+
+       if (chnl > 14) {
+               for (place = 14; place < sizeof(channel_all); place++) {
+                       if (channel_all[place] == chnl)
+                               return place-13;
+               }
+       }
+       return 0;
+}
+
 /* 3 Tx Power Tracking */
-/* 3============================================================ */
-/*-----------------------------------------------------------------------------
+/*
  * Function:   ODM_TxPwrTrackAdjust88E()
  *
  * Overview:   88E we can not write 0xc80/c94/c4c/ 0xa2x. Instead of write TX agc.
  *                             No matter OFDM & CCK use the same method.
  *
- * Input:              NONE
- *
- * Output:             NONE
- *
- * Return:             NONE
- *
  * Revised History:
  *     When            Who             Remark
  *     04/23/2012      MHC             Create Version 0.
  *     04/23/2012      MHC             Adjust TX agc directly not throughput BB digital.
  *
- *---------------------------------------------------------------------------*/
+ */
 void ODM_TxPwrTrackAdjust88E(struct odm_dm_struct *dm_odm, u8 Type,/*  0 = OFDM, 1 = CCK */
        u8 *pDirection,                 /*  1 = +(increase) 2 = -(decrease) */
        u32 *pOutWriteVal               /*  Tx tracking CCK/OFDM BB swing index adjust */
@@ -96,23 +103,12 @@ void ODM_TxPwrTrackAdjust88E(struct odm_dm_struct *dm_odm, u8 Type,/*  0 = OFDM,
        *pOutWriteVal = pwr_value | (pwr_value<<8) | (pwr_value<<16) | (pwr_value<<24);
 }      /*  ODM_TxPwrTrackAdjust88E */
 
-/*-----------------------------------------------------------------------------
+/*
  * Function:   odm_TxPwrTrackSetPwr88E()
  *
  * Overview:   88E change all channel tx power accordign to flag.
  *                             OFDM & CCK are all different.
- *
- * Input:              NONE
- *
- * Output:             NONE
- *
- * Return:             NONE
- *
- * Revised History:
- *     When            Who             Remark
- *     04/23/2012      MHC             Create Version 0.
- *
- *---------------------------------------------------------------------------*/
+ */
 static void odm_TxPwrTrackSetPwr88E(struct odm_dm_struct *dm_odm)
 {
        if (dm_odm->BbSwingFlagOfdm || dm_odm->BbSwingFlagCck) {
@@ -123,7 +119,6 @@ static void odm_TxPwrTrackSetPwr88E(struct odm_dm_struct *dm_odm)
        }
 }      /*  odm_TxPwrTrackSetPwr88E */
 
-/* 091212 chiyokolin */
 void
 odm_TXPowerTrackingCallback_ThermalMeter_8188E(
        struct adapter *Adapter
@@ -455,8 +450,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
                }
 
                if (delta_IQK >= 8) { /*  Delta temperature is equal to or larger than 20 centigrade. */
-                       ODM_ResetIQKResult(dm_odm);
-
                        dm_odm->RFCalibrateInfo.ThermalValue_IQK = ThermalValue;
                        PHY_IQCalibrate_8188E(Adapter, false);
                }
@@ -471,7 +464,6 @@ odm_TXPowerTrackingCallback_ThermalMeter_8188E(
 
 /* 1 7.        IQK */
 #define MAX_TOLERANCE          5
-#define IQK_DELAY_TIME         1               /* ms */
 
 static u8 /* bit0 = 1 => Tx OK, bit1 = 1 => Rx OK */
 phy_PathA_IQK_8188E(struct adapter *adapt, bool configPathB)
@@ -827,9 +819,9 @@ static void _PHY_SaveMACRegisters(
        struct odm_dm_struct *dm_odm = &pHalData->odmpriv;
        ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("Save MAC parameters.\n"));
        for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) {
-               MACBackup[i] = rtw_read8(adapt, MACReg[i]);
+               MACBackup[i] = usb_read8(adapt, MACReg[i]);
        }
-       MACBackup[i] = rtw_read32(adapt, MACReg[i]);
+       MACBackup[i] = usb_read32(adapt, MACReg[i]);
 }
 
 static void reload_adda_reg(struct adapter *adapt, u32 *ADDAReg, u32 *ADDABackup, u32 RegiesterNum)
@@ -856,9 +848,9 @@ _PHY_ReloadMACRegisters(
 
        ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD,  ("Reload MAC parameters !\n"));
        for (i = 0; i < (IQK_MAC_REG_NUM - 1); i++) {
-               rtw_write8(adapt, MACReg[i], (u8)MACBackup[i]);
+               usb_write8(adapt, MACReg[i], (u8)MACBackup[i]);
        }
-       rtw_write32(adapt, MACReg[i], MACBackup[i]);
+       usb_write32(adapt, MACReg[i], MACBackup[i]);
 }
 
 void
@@ -900,12 +892,12 @@ _PHY_MACSettingCalibration(
 
        ODM_RT_TRACE(dm_odm, ODM_COMP_CALIBRATION, ODM_DBG_LOUD, ("MAC settings for Calibration.\n"));
 
-       rtw_write8(adapt, MACReg[i], 0x3F);
+       usb_write8(adapt, MACReg[i], 0x3F);
 
        for (i = 1; i < (IQK_MAC_REG_NUM - 1); i++) {
-               rtw_write8(adapt, MACReg[i], (u8)(MACBackup[i]&(~BIT3)));
+               usb_write8(adapt, MACReg[i], (u8)(MACBackup[i]&(~BIT3)));
        }
-       rtw_write8(adapt, MACReg[i], (u8)(MACBackup[i]&(~BIT5)));
+       usb_write8(adapt, MACReg[i], (u8)(MACBackup[i]&(~BIT5)));
 }
 
 void
@@ -1213,12 +1205,12 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
        u32 RF_Amode = 0, RF_Bmode = 0, LC_Cal;
 
        /* Check continuous TX and Packet TX */
-       tmpreg = rtw_read8(adapt, 0xd03);
+       tmpreg = usb_read8(adapt, 0xd03);
 
        if ((tmpreg&0x70) != 0)                 /* Deal with contisuous TX case */
-               rtw_write8(adapt, 0xd03, tmpreg&0x8F);  /* disable all continuous TX */
+               usb_write8(adapt, 0xd03, tmpreg&0x8F);  /* disable all continuous TX */
        else                                                    /*  Deal with Packet TX case */
-               rtw_write8(adapt, REG_TXPAUSE, 0xFF);                   /*  block all queues */
+               usb_write8(adapt, REG_TXPAUSE, 0xFF);                   /*  block all queues */
 
        if ((tmpreg&0x70) != 0) {
                /* 1. Read original RF mode */
@@ -1250,7 +1242,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
        if ((tmpreg&0x70) != 0) {
                /* Deal with continuous TX case */
                /* Path-A */
-               rtw_write8(adapt, 0xd03, tmpreg);
+               usb_write8(adapt, 0xd03, tmpreg);
                PHY_SetRFReg(adapt, RF_PATH_A, RF_AC, bMask12Bits, RF_Amode);
 
                /* Path-B */
@@ -1258,7 +1250,7 @@ static void phy_LCCalibrate_8188E(struct adapter *adapt, bool is2t)
                        PHY_SetRFReg(adapt, RF_PATH_B, RF_AC, bMask12Bits, RF_Bmode);
        } else {
                /*  Deal with Packet TX case */
-               rtw_write8(adapt, REG_TXPAUSE, 0x00);
+               usb_write8(adapt, REG_TXPAUSE, 0x00);
        }
 }
 
@@ -1454,8 +1446,8 @@ static void phy_setrfpathswitch_8188e(struct adapter *adapt, bool main, bool is2
 {
        if (!adapt->hw_init_completed) {
                u8 u1btmp;
-               u1btmp = rtw_read8(adapt, REG_LEDCFG2) | BIT7;
-               rtw_write8(adapt, REG_LEDCFG2, u1btmp);
+               u1btmp = usb_read8(adapt, REG_LEDCFG2) | BIT7;
+               usb_write8(adapt, REG_LEDCFG2, u1btmp);
                PHY_SetBBReg(adapt, rFPGA0_XAB_RFParameter, BIT13, 0x01);
        }
 
index 50f951390695cba591d1b346872beae49f6fdf4f..caca535ac17d807d01ab20a02a8b32f5f5065612 100644 (file)
@@ -35,6 +35,7 @@ Major Change History:
 --*/
 
 #include <HalPwrSeqCmd.h>
+#include <usb_ops_linux.h>
 
 /*     Description: */
 /*             This routine deals with the Power Configuration CMDs parsing
@@ -80,13 +81,13 @@ u8 HalPwrSeqCmdParsing(struct adapter *padapter, u8 cut_vers, u8 fab_vers,
                                offset = GET_PWR_CFG_OFFSET(pwrcfgcmd);
 
                                /*  Read the value from system register */
-                               value = rtw_read8(padapter, offset);
+                               value = usb_read8(padapter, offset);
 
                                value &= ~(GET_PWR_CFG_MASK(pwrcfgcmd));
                                value |= (GET_PWR_CFG_VALUE(pwrcfgcmd) & GET_PWR_CFG_MASK(pwrcfgcmd));
 
                                /*  Write the value back to system register */
-                               rtw_write8(padapter, offset, value);
+                               usb_write8(padapter, offset, value);
                                break;
                        case PWR_CMD_POLLING:
                                RT_TRACE(_module_hal_init_c_ , _drv_info_, ("HalPwrSeqCmdParsing: PWR_CMD_POLLING\n"));
@@ -94,7 +95,7 @@ u8 HalPwrSeqCmdParsing(struct adapter *padapter, u8 cut_vers, u8 fab_vers,
                                poll_bit = false;
                                offset = GET_PWR_CFG_OFFSET(pwrcfgcmd);
                                do {
-                                               value = rtw_read8(padapter, offset);
+                                               value = usb_read8(padapter, offset);
 
                                        value &= GET_PWR_CFG_MASK(pwrcfgcmd);
                                        if (value == (GET_PWR_CFG_VALUE(pwrcfgcmd) & GET_PWR_CFG_MASK(pwrcfgcmd)))
index 829b900ee93843a5f41e767310c57b129a9720c2..baefb467be2256f2e5ab5429502438d84494dcfb 100644 (file)
@@ -328,7 +328,7 @@ void hal_init_macaddr(struct adapter *adapter)
 
 void c2h_evt_clear(struct adapter *adapter)
 {
-       rtw_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
+       usb_write8(adapter, REG_C2HEVT_CLEAR, C2H_EVT_HOST_CLOSE);
 }
 
 s32 c2h_evt_read(struct adapter *adapter, u8 *buf)
@@ -341,7 +341,7 @@ s32 c2h_evt_read(struct adapter *adapter, u8 *buf)
        if (buf == NULL)
                goto exit;
 
-       trigger = rtw_read8(adapter, REG_C2HEVT_CLEAR);
+       trigger = usb_read8(adapter, REG_C2HEVT_CLEAR);
 
        if (trigger == C2H_EVT_HOST_CLOSE)
                goto exit; /* Not ready */
@@ -350,17 +350,17 @@ s32 c2h_evt_read(struct adapter *adapter, u8 *buf)
 
        c2h_evt = (struct c2h_evt_hdr *)buf;
 
-       _rtw_memset(c2h_evt, 0, 16);
+       memset(c2h_evt, 0, 16);
 
-       *buf = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL);
-       *(buf+1) = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
+       *buf = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL);
+       *(buf+1) = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL + 1);
 
        RT_PRINT_DATA(_module_hal_init_c_, _drv_info_, "c2h_evt_read(): ",
                      &c2h_evt , sizeof(c2h_evt));
 
        /* Read the content */
        for (i = 0; i < c2h_evt->plen; i++)
-               c2h_evt->payload[i] = rtw_read8(adapter, REG_C2HEVT_MSG_NORMAL +
+               c2h_evt->payload[i] = usb_read8(adapter, REG_C2HEVT_MSG_NORMAL +
                                                sizeof(*c2h_evt) + i);
 
        RT_PRINT_DATA(_module_hal_init_c_, _drv_info_,
index d0ac4a1833350ebc6d337ccee7abe656ce493fbb..f002c43f372f3b51d23050c6051d19f70f61ba0b 100644 (file)
@@ -156,15 +156,6 @@ void rtw_hal_set_odm_var(struct adapter *adapt,
                                                      val1, set);
 }
 
-void rtw_hal_get_odm_var(struct adapter *adapt,
-                        enum hal_odm_variable var, void *val1,
-                        bool set)
-{
-       if (adapt->HalFunc.GetHalODMVarHandler)
-               adapt->HalFunc.GetHalODMVarHandler(adapt, var,
-                                                     val1, set);
-}
-
 void rtw_hal_enable_interrupt(struct adapter *adapt)
 {
        if (adapt->HalFunc.enable_interrupt)
@@ -223,12 +214,6 @@ s32 rtw_hal_init_xmit_priv(struct adapter *adapt)
        return _FAIL;
 }
 
-void rtw_hal_free_xmit_priv(struct adapter *adapt)
-{
-       if (adapt->HalFunc.free_xmit_priv != NULL)
-               adapt->HalFunc.free_xmit_priv(adapt);
-}
-
 s32 rtw_hal_init_recv_priv(struct adapter *adapt)
 {
        if (adapt->HalFunc.init_recv_priv)
@@ -271,20 +256,6 @@ void rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg,
                                               rssi_level);
 }
 
-/*     Start specifical interface thread               */
-void rtw_hal_start_thread(struct adapter *adapt)
-{
-       if (adapt->HalFunc.run_thread)
-               adapt->HalFunc.run_thread(adapt);
-}
-
-/*     Start specifical interface thread               */
-void rtw_hal_stop_thread(struct adapter *adapt)
-{
-       if (adapt->HalFunc.cancel_thread)
-               adapt->HalFunc.cancel_thread(adapt);
-}
-
 u32 rtw_hal_read_bbreg(struct adapter *adapt, u32 regaddr, u32 bitmask)
 {
        u32 data = 0;
@@ -374,30 +345,6 @@ void rtw_hal_sreset_init(struct adapter *adapt)
                adapt->HalFunc.sreset_init_value(adapt);
 }
 
-void rtw_hal_sreset_reset(struct adapter *adapt)
-{
-       if (adapt->HalFunc.silentreset)
-               adapt->HalFunc.silentreset(adapt);
-}
-
-void rtw_hal_sreset_reset_value(struct adapter *adapt)
-{
-       if (adapt->HalFunc.sreset_reset_value)
-               adapt->HalFunc.sreset_reset_value(adapt);
-}
-
-void rtw_hal_sreset_xmit_status_check(struct adapter *adapt)
-{
-       if (adapt->HalFunc.sreset_xmit_status_check)
-               adapt->HalFunc.sreset_xmit_status_check(adapt);
-}
-
-void rtw_hal_sreset_linked_status_check(struct adapter *adapt)
-{
-       if (adapt->HalFunc.sreset_linked_status_check)
-               adapt->HalFunc.sreset_linked_status_check(adapt);
-}
-
 u8   rtw_hal_sreset_get_wifi_status(struct adapter *adapt)
 {
        u8 status = 0;
index 2a0ac4ab23d23b6aa39ac31f238d66bfa850a87c..f8dcfdae0727089f4e146fc0ae6609674412adf2 100644 (file)
@@ -221,7 +221,6 @@ void ODM_DMWatchdog(struct odm_dm_struct *pDM_Odm)
 
        ODM_TXPowerTrackingCheck(pDM_Odm);
        odm_EdcaTurboCheck(pDM_Odm);
-       odm_DynamicTxPower(pDM_Odm);
 }
 
 /*  Init /.. Fixed HW value. Only init time. */
@@ -833,7 +832,7 @@ void ODM_Write_CCK_CCA_Thres(struct odm_dm_struct *pDM_Odm, u8 CurCCK_CCAThres)
        struct adapter *adapt = pDM_Odm->Adapter;
 
        if (pDM_DigTable->CurCCK_CCAThres != CurCCK_CCAThres)           /* modify by Guo.Mingzhi 2012-01-03 */
-               rtw_write8(adapt, ODM_REG_CCK_CCA_11N, CurCCK_CCAThres);
+               usb_write8(adapt, ODM_REG_CCK_CCA_11N, CurCCK_CCAThres);
        pDM_DigTable->PreCCK_CCAThres = pDM_DigTable->CurCCK_CCAThres;
        pDM_DigTable->CurCCK_CCAThres = CurCCK_CCAThres;
 }
@@ -1110,19 +1109,6 @@ void odm_DynamicTxPowerInit(struct odm_dm_struct *pDM_Odm)
        pdmpriv->DynamicTxHighPowerLvl = TxHighPwrLevel_Normal;
 }
 
-void odm_DynamicTxPower(struct odm_dm_struct *pDM_Odm)
-{
-       /*  For AP/ADSL use struct rtl8192cd_priv * */
-       /*  For CE/NIC use struct adapter * */
-
-       if (!(pDM_Odm->SupportAbility & ODM_BB_DYNAMIC_TXPWR))
-               return;
-
-       /*  2012/01/12 MH According to Luke's suggestion, only high power will support the feature. */
-       if (!pDM_Odm->ExtPA)
-               return;
-}
-
 /* 3============================================================ */
 /* 3 RSSI Monitor */
 /* 3============================================================ */
@@ -1291,10 +1277,10 @@ void ODM_EdcaTurboInit(struct odm_dm_struct *pDM_Odm)
        pDM_Odm->DM_EDCA_Table.bIsCurRDLState = false;
        Adapter->recvpriv.bIsAnyNonBEPkts = false;
 
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VO PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_VO_PARAM)));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VI PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_VI_PARAM)));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BE PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_BE_PARAM)));
-       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BK PARAM: 0x%x\n", rtw_read32(Adapter, ODM_EDCA_BK_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VO PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VO_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial VI PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_VI_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BE PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BE_PARAM)));
+       ODM_RT_TRACE(pDM_Odm, ODM_COMP_EDCA_TURBO, ODM_DBG_LOUD, ("Orginial BK PARAM: 0x%x\n", usb_read32(Adapter, ODM_EDCA_BK_PARAM)));
 }      /*  ODM_InitEdcaTurbo */
 
 void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm)
@@ -1363,7 +1349,7 @@ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm)
                        else
                                edca_param = EDCAParam[HT_IOT_PEER_UNKNOWN][trafficIndex];
 
-                       rtw_write32(Adapter, REG_EDCA_BE_PARAM, edca_param);
+                       usb_write32(Adapter, REG_EDCA_BE_PARAM, edca_param);
 
                        pDM_Odm->DM_EDCA_Table.prv_traffic_idx = trafficIndex;
                }
@@ -1373,7 +1359,7 @@ void odm_EdcaTurboCheckCE(struct odm_dm_struct *pDM_Odm)
                /*  Turn Off EDCA turbo here. */
                /*  Restore original EDCA according to the declaration of AP. */
                 if (pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA) {
-                       rtw_write32(Adapter, REG_EDCA_BE_PARAM, pHalData->AcParam_BE);
+                       usb_write32(Adapter, REG_EDCA_BE_PARAM, pHalData->AcParam_BE);
                        pDM_Odm->DM_EDCA_Table.bCurrentTurboEDCA = false;
                }
        }
index a9886122b459ca64bd78a7e7b7cc14f0b7b96fcb..4d4978bee51d456ac5f15ce5cd2a6ef6d149fce5 100644 (file)
@@ -68,7 +68,7 @@ void odm_ConfigMAC_8188E(struct odm_dm_struct *pDM_Odm, u32 Addr, u8 Data)
 {
        struct adapter *adapt = pDM_Odm->Adapter;
 
-       rtw_write8(adapt, Addr, Data);
+       usb_write8(adapt, Addr, Data);
        ODM_RT_TRACE(pDM_Odm, ODM_COMP_INIT, ODM_DBG_TRACE, ("===> ODM_ConfigMACWithHeaderFile: [MAC_REG] %08X %08X\n", Addr, Data));
 }
 
index 021e5879abcfa4d15d2ba30fe93d42f7c7e9d4e4..99ad9c706f7d80ee82c48fac095b575e28ce4f23 100644 (file)
@@ -41,7 +41,7 @@ static u8 _is_fw_read_cmd_down(struct adapter *adapt, u8 msgbox_num)
        u8 valid;
 
        do {
-               valid = rtw_read8(adapt, REG_HMETFR) & BIT(msgbox_num);
+               valid = usb_read8(adapt, REG_HMETFR) & BIT(msgbox_num);
                if (0 == valid)
                        read_down = true;
        } while ((!read_down) && (retry_cnts--));
@@ -106,13 +106,13 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p
                        /* Write Ext command */
                        msgbox_ex_addr = REG_HMEBOX_EXT_0 + (h2c_box_num * RTL88E_EX_MESSAGE_BOX_SIZE);
                        for (cmd_idx = 0; cmd_idx < ext_cmd_len; cmd_idx++) {
-                               rtw_write8(adapt, msgbox_ex_addr+cmd_idx, *((u8 *)(&h2c_cmd_ex)+cmd_idx));
+                               usb_write8(adapt, msgbox_ex_addr+cmd_idx, *((u8 *)(&h2c_cmd_ex)+cmd_idx));
                        }
                }
                /*  Write command */
                msgbox_addr = REG_HMEBOX_0 + (h2c_box_num * RTL88E_MESSAGE_BOX_SIZE);
                for (cmd_idx = 0; cmd_idx < RTL88E_MESSAGE_BOX_SIZE; cmd_idx++) {
-                       rtw_write8(adapt, msgbox_addr+cmd_idx, *((u8 *)(&h2c_cmd)+cmd_idx));
+                       usb_write8(adapt, msgbox_addr+cmd_idx, *((u8 *)(&h2c_cmd)+cmd_idx));
                }
                bcmd_down = true;
 
@@ -153,7 +153,7 @@ u8 rtl8188e_set_raid_cmd(struct adapter *adapt, u32 mask)
        if (haldata->fw_ractrl) {
                __le32 lmask;
 
-               _rtw_memset(buf, 0, 3);
+               memset(buf, 0, 3);
                lmask = cpu_to_le32(mask);
                memcpy(buf, &lmask, 3);
 
@@ -476,12 +476,6 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u
        *pLength = pktlen;
 }
 
-/*  To check if reserved page content is destroyed by beacon because beacon is too large. */
-/*  2010.06.23. Added by tynli. */
-void CheckFwRsvdPageContent(struct adapter *Adapter)
-{
-}
-
 /*  */
 /*  Description: Fill the reserved packets that FW will use to RSVD page. */
 /*                     Now we just send 4 types packet to rsvd page. */
@@ -509,7 +503,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished)
        struct rsvdpage_loc RsvdPageLoc;
 
        DBG_88E("%s\n", __func__);
-       ReservedPagePacket = (u8 *)rtw_zmalloc(1000);
+       ReservedPagePacket = kzalloc(1000, GFP_KERNEL);
        if (ReservedPagePacket == NULL) {
                DBG_88E("%s: alloc ReservedPagePacket fail!\n", __func__);
                return;
@@ -615,18 +609,18 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
        if (mstatus == 1) {
                /*  We should set AID, correct TSF, HW seq enable before set JoinBssReport to Fw in 88/92C. */
                /*  Suggested by filen. Added by tynli. */
-               rtw_write16(adapt, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
+               usb_write16(adapt, REG_BCN_PSR_RPT, (0xC000|pmlmeinfo->aid));
                /*  Do not set TSF again here or vWiFi beacon DMA INT will not work. */
 
                /* Set REG_CR bit 8. DMA beacon by SW. */
                haldata->RegCR_1 |= BIT0;
-               rtw_write8(adapt,  REG_CR+1, haldata->RegCR_1);
+               usb_write8(adapt,  REG_CR+1, haldata->RegCR_1);
 
                /*  Disable Hw protection for a time which revserd for Hw sending beacon. */
                /*  Fix download reserved page packet fail that access collision with the protection time. */
                /*  2010.05.11. Added by tynli. */
-               rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL)&(~BIT(3)));
-               rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL)|BIT(4));
+               usb_write8(adapt, REG_BCN_CTRL, usb_read8(adapt, REG_BCN_CTRL)&(~BIT(3)));
+               usb_write8(adapt, REG_BCN_CTRL, usb_read8(adapt, REG_BCN_CTRL)|BIT(4));
 
                if (haldata->RegFwHwTxQCtrl&BIT6) {
                        DBG_88E("HalDownloadRSVDPage(): There is an Adapter is sending beacon.\n");
@@ -634,7 +628,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
                }
 
                /*  Set FWHW_TXQ_CTRL 0x422[6]=0 to tell Hw the packet is not a real beacon frame. */
-               rtw_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl&(~BIT6)));
+               usb_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl&(~BIT6)));
                haldata->RegFwHwTxQCtrl &= (~BIT6);
 
                /*  Clear beacon valid check bit. */
@@ -668,8 +662,8 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
                /*  */
 
                /*  Enable Bcn */
-               rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL)|BIT(3));
-               rtw_write8(adapt, REG_BCN_CTRL, rtw_read8(adapt, REG_BCN_CTRL)&(~BIT(4)));
+               usb_write8(adapt, REG_BCN_CTRL, usb_read8(adapt, REG_BCN_CTRL)|BIT(3));
+               usb_write8(adapt, REG_BCN_CTRL, usb_read8(adapt, REG_BCN_CTRL)&(~BIT(4)));
 
                /*  To make sure that if there exists an adapter which would like to send beacon. */
                /*  If exists, the origianl value of 0x422[6] will be 1, we should check this to */
@@ -677,7 +671,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
                /*  the beacon cannot be sent by HW. */
                /*  2010.06.23. Added by tynli. */
                if (bSendBeacon) {
-                       rtw_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl|BIT6));
+                       usb_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl|BIT6));
                        haldata->RegFwHwTxQCtrl |= BIT6;
                }
 
@@ -690,7 +684,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus)
                /*  Do not enable HW DMA BCN or it will cause Pcie interface hang by timing issue. 2011.11.24. by tynli. */
                /*  Clear CR[8] or beacon packet will not be send to TxBuf anymore. */
                haldata->RegCR_1 &= (~BIT0);
-               rtw_write8(adapt,  REG_CR+1, haldata->RegCR_1);
+               usb_write8(adapt,  REG_CR+1, haldata->RegCR_1);
        }
 }
 
@@ -706,35 +700,35 @@ void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state)
        switch (p2p_ps_state) {
        case P2P_PS_DISABLE:
                DBG_88E("P2P_PS_DISABLE\n");
-               _rtw_memset(p2p_ps_offload, 0, 1);
+               memset(p2p_ps_offload, 0, 1);
                break;
        case P2P_PS_ENABLE:
                DBG_88E("P2P_PS_ENABLE\n");
                /*  update CTWindow value. */
                if (pwdinfo->ctwindow > 0) {
                        p2p_ps_offload->CTWindow_En = 1;
-                       rtw_write8(adapt, REG_P2P_CTWIN, pwdinfo->ctwindow);
+                       usb_write8(adapt, REG_P2P_CTWIN, pwdinfo->ctwindow);
                }
 
                /*  hw only support 2 set of NoA */
                for (i = 0; i < pwdinfo->noa_num; i++) {
                        /*  To control the register setting for which NOA */
-                       rtw_write8(adapt, REG_NOA_DESC_SEL, (i << 4));
+                       usb_write8(adapt, REG_NOA_DESC_SEL, (i << 4));
                        if (i == 0)
                                p2p_ps_offload->NoA0_En = 1;
                        else
                                p2p_ps_offload->NoA1_En = 1;
 
                        /*  config P2P NoA Descriptor Register */
-                       rtw_write32(adapt, REG_NOA_DESC_DURATION, pwdinfo->noa_duration[i]);
-                       rtw_write32(adapt, REG_NOA_DESC_INTERVAL, pwdinfo->noa_interval[i]);
-                       rtw_write32(adapt, REG_NOA_DESC_START, pwdinfo->noa_start_time[i]);
-                       rtw_write8(adapt, REG_NOA_DESC_COUNT, pwdinfo->noa_count[i]);
+                       usb_write32(adapt, REG_NOA_DESC_DURATION, pwdinfo->noa_duration[i]);
+                       usb_write32(adapt, REG_NOA_DESC_INTERVAL, pwdinfo->noa_interval[i]);
+                       usb_write32(adapt, REG_NOA_DESC_START, pwdinfo->noa_start_time[i]);
+                       usb_write8(adapt, REG_NOA_DESC_COUNT, pwdinfo->noa_count[i]);
                }
 
                if ((pwdinfo->opp_ps == 1) || (pwdinfo->noa_num > 0)) {
                        /*  rst p2p circuit */
-                       rtw_write8(adapt, REG_DUAL_TSF_RST, BIT(4));
+                       usb_write8(adapt, REG_DUAL_TSF_RST, BIT(4));
 
                        p2p_ps_offload->Offload_En = 1;
 
index d5cd30bcb3c76983ec936ca71c72f737cee989c1..dab4c337a8632ea39e6bac6d07e44cf73fdd9cf3 100644 (file)
@@ -36,10 +36,10 @@ static void dm_InitGPIOSetting(struct adapter *Adapter)
 {
        u8      tmp1byte;
 
-       tmp1byte = rtw_read8(Adapter, REG_GPIO_MUXCFG);
+       tmp1byte = usb_read8(Adapter, REG_GPIO_MUXCFG);
        tmp1byte &= (GPIOSEL_GPIO | ~GPIOSEL_ENBT);
 
-       rtw_write8(Adapter, REG_GPIO_MUXCFG, tmp1byte);
+       usb_write8(Adapter, REG_GPIO_MUXCFG, tmp1byte);
 }
 
 /*  */
@@ -53,7 +53,7 @@ static void Init_ODM_ComInfo_88E(struct adapter *Adapter)
        u8 cut_ver, fab_ver;
 
        /*  Init Value */
-       _rtw_memset(dm_odm, 0, sizeof(*dm_odm));
+       memset(dm_odm, 0, sizeof(*dm_odm));
 
        dm_odm->Adapter = Adapter;
 
@@ -198,7 +198,7 @@ void rtl8188e_init_dm_priv(struct adapter *Adapter)
        struct dm_priv  *pdmpriv = &hal_data->dmpriv;
        struct odm_dm_struct *podmpriv = &hal_data->odmpriv;
 
-       _rtw_memset(pdmpriv, 0, sizeof(struct dm_priv));
+       memset(pdmpriv, 0, sizeof(struct dm_priv));
        Init_ODM_ComInfo_88E(Adapter);
        ODM_InitDebugSetting(podmpriv);
 }
index 5a22c6df4d06d3f123c7e7b93a0640850fe0bd5c..1abf97461d0fbd2d9e3ebf05439c77267e1c7ad8 100644 (file)
 
 #include <rtw_iol.h>
 
-#include <usb_ops.h>
-
-static void iol_mode_enable(struct adapter *padapter, u8 enable)
+void iol_mode_enable(struct adapter *padapter, u8 enable)
 {
        u8 reg_0xf0 = 0;
 
        if (enable) {
                /* Enable initial offload */
-               reg_0xf0 = rtw_read8(padapter, REG_SYS_CFG);
-               rtw_write8(padapter, REG_SYS_CFG, reg_0xf0|SW_OFFLOAD_EN);
+               reg_0xf0 = usb_read8(padapter, REG_SYS_CFG);
+               usb_write8(padapter, REG_SYS_CFG, reg_0xf0|SW_OFFLOAD_EN);
 
                if (!padapter->bFWReady) {
                        DBG_88E("bFWReady == false call reset 8051...\n");
@@ -46,28 +44,28 @@ static void iol_mode_enable(struct adapter *padapter, u8 enable)
 
        } else {
                /* disable initial offload */
-               reg_0xf0 = rtw_read8(padapter, REG_SYS_CFG);
-               rtw_write8(padapter, REG_SYS_CFG, reg_0xf0 & ~SW_OFFLOAD_EN);
+               reg_0xf0 = usb_read8(padapter, REG_SYS_CFG);
+               usb_write8(padapter, REG_SYS_CFG, reg_0xf0 & ~SW_OFFLOAD_EN);
        }
 }
 
-static s32 iol_execute(struct adapter *padapter, u8 control)
+s32 iol_execute(struct adapter *padapter, u8 control)
 {
        s32 status = _FAIL;
        u8 reg_0x88 = 0;
        u32 start = 0, passing_time = 0;
 
        control = control&0x0f;
-       reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0);
-       rtw_write8(padapter, REG_HMEBOX_E0,  reg_0x88|control);
+       reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0);
+       usb_write8(padapter, REG_HMEBOX_E0,  reg_0x88|control);
 
        start = jiffies;
-       while ((reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0)) & control &&
+       while ((reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0)) & control &&
               (passing_time = rtw_get_passing_time_ms(start)) < 1000) {
                ;
        }
 
-       reg_0x88 = rtw_read8(padapter, REG_HMEBOX_E0);
+       reg_0x88 = usb_read8(padapter, REG_HMEBOX_E0);
        status = (reg_0x88 & control) ? _FAIL : _SUCCESS;
        if (reg_0x88 & control<<4)
                status = _FAIL;
@@ -78,233 +76,12 @@ static s32 iol_InitLLTTable(struct adapter *padapter, u8 txpktbuf_bndy)
 {
        s32 rst = _SUCCESS;
        iol_mode_enable(padapter, 1);
-       rtw_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
+       usb_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
        rst = iol_execute(padapter, CMD_INIT_LLT);
        iol_mode_enable(padapter, 0);
        return rst;
 }
 
-static void
-efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
-{
-       u8 *efuseTbl = NULL;
-       u8 rtemp8;
-       u16     eFuse_Addr = 0;
-       u8 offset, wren;
-       u16     i, j;
-       u16     **eFuseWord = NULL;
-       u16     efuse_utilized = 0;
-       u8 u1temp = 0;
-
-       efuseTbl = (u8 *)rtw_zmalloc(EFUSE_MAP_LEN_88E);
-       if (efuseTbl == NULL) {
-               DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
-               goto exit;
-       }
-
-       eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
-       if (eFuseWord == NULL) {
-               DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
-               goto exit;
-       }
-
-       /*  0. Refresh efuse init map as all oxFF. */
-       for (i = 0; i < EFUSE_MAX_SECTION_88E; i++)
-               for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++)
-                       eFuseWord[i][j] = 0xFFFF;
-
-       /*  */
-       /*  1. Read the first byte to check if efuse is empty!!! */
-       /*  */
-       /*  */
-       rtemp8 = *(phymap+eFuse_Addr);
-       if (rtemp8 != 0xFF) {
-               efuse_utilized++;
-               eFuse_Addr++;
-       } else {
-               DBG_88E("EFUSE is empty efuse_Addr-%d efuse_data =%x\n", eFuse_Addr, rtemp8);
-               goto exit;
-       }
-
-       /*  */
-       /*  2. Read real efuse content. Filter PG header and every section data. */
-       /*  */
-       while ((rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) {
-               /*  Check PG header for section num. */
-               if ((rtemp8 & 0x1F) == 0x0F) {          /* extended header */
-                       u1temp = ((rtemp8 & 0xE0) >> 5);
-                       rtemp8 = *(phymap+eFuse_Addr);
-                       if ((rtemp8 & 0x0F) == 0x0F) {
-                               eFuse_Addr++;
-                               rtemp8 = *(phymap+eFuse_Addr);
-
-                               if (rtemp8 != 0xFF && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E))
-                                       eFuse_Addr++;
-                               continue;
-                       } else {
-                               offset = ((rtemp8 & 0xF0) >> 1) | u1temp;
-                               wren = (rtemp8 & 0x0F);
-                               eFuse_Addr++;
-                       }
-               } else {
-                       offset = ((rtemp8 >> 4) & 0x0f);
-                       wren = (rtemp8 & 0x0f);
-               }
-
-               if (offset < EFUSE_MAX_SECTION_88E) {
-                       /*  Get word enable value from PG header */
-                       for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
-                               /*  Check word enable condition in the section */
-                               if (!(wren & 0x01)) {
-                                       rtemp8 = *(phymap+eFuse_Addr);
-                                       eFuse_Addr++;
-                                       efuse_utilized++;
-                                       eFuseWord[offset][i] = (rtemp8 & 0xff);
-                                       if (eFuse_Addr >= EFUSE_REAL_CONTENT_LEN_88E)
-                                               break;
-                                       rtemp8 = *(phymap+eFuse_Addr);
-                                       eFuse_Addr++;
-                                       efuse_utilized++;
-                                       eFuseWord[offset][i] |= (((u16)rtemp8 << 8) & 0xff00);
-
-                                       if (eFuse_Addr >= EFUSE_REAL_CONTENT_LEN_88E)
-                                               break;
-                               }
-                               wren >>= 1;
-                       }
-               }
-               /*  Read next PG header */
-               rtemp8 = *(phymap+eFuse_Addr);
-
-               if (rtemp8 != 0xFF && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) {
-                       efuse_utilized++;
-                       eFuse_Addr++;
-               }
-       }
-
-       /*  */
-       /*  3. Collect 16 sections and 4 word unit into Efuse map. */
-       /*  */
-       for (i = 0; i < EFUSE_MAX_SECTION_88E; i++) {
-               for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++) {
-                       efuseTbl[(i*8)+(j*2)] = (eFuseWord[i][j] & 0xff);
-                       efuseTbl[(i*8)+((j*2)+1)] = ((eFuseWord[i][j] >> 8) & 0xff);
-               }
-       }
-
-       /*  */
-       /*  4. Copy from Efuse map to output pointer memory!!! */
-       /*  */
-       for (i = 0; i < _size_byte; i++)
-               pbuf[i] = efuseTbl[_offset+i];
-
-       /*  */
-       /*  5. Calculate Efuse utilization. */
-       /*  */
-
-exit:
-       kfree(efuseTbl);
-
-       if (eFuseWord)
-               rtw_mfree2d((void *)eFuseWord, EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
-}
-
-static void efuse_read_phymap_from_txpktbuf(
-       struct adapter  *adapter,
-       int bcnhead,    /* beacon head, where FW store len(2-byte) and efuse physical map. */
-       u8 *content,    /* buffer to store efuse physical map */
-       u16 *size       /* for efuse content: the max byte to read. will update to byte read */
-       )
-{
-       u16 dbg_addr = 0;
-       u32 start  = 0, passing_time = 0;
-       u8 reg_0x143 = 0;
-       u32 lo32 = 0, hi32 = 0;
-       u16 len = 0, count = 0;
-       int i = 0;
-       u16 limit = *size;
-
-       u8 *pos = content;
-
-       if (bcnhead < 0) /* if not valid */
-               bcnhead = rtw_read8(adapter, REG_TDECTRL+1);
-
-       DBG_88E("%s bcnhead:%d\n", __func__, bcnhead);
-
-       rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
-
-       dbg_addr = bcnhead*128/8; /* 8-bytes addressing */
-
-       while (1) {
-               rtw_write16(adapter, REG_PKTBUF_DBG_ADDR, dbg_addr+i);
-
-               rtw_write8(adapter, REG_TXPKTBUF_DBG, 0);
-               start = jiffies;
-               while (!(reg_0x143 = rtw_read8(adapter, REG_TXPKTBUF_DBG)) &&
-                      (passing_time = rtw_get_passing_time_ms(start)) < 1000) {
-                       DBG_88E("%s polling reg_0x143:0x%02x, reg_0x106:0x%02x\n", __func__, reg_0x143, rtw_read8(adapter, 0x106));
-                       msleep(1);
-               }
-
-               lo32 = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_L);
-               hi32 = rtw_read32(adapter, REG_PKTBUF_DBG_DATA_H);
-
-               if (i == 0) {
-                       u8 lenc[2];
-                       u16 lenbak, aaabak;
-                       u16 aaa;
-                       lenc[0] = rtw_read8(adapter, REG_PKTBUF_DBG_DATA_L);
-                       lenc[1] = rtw_read8(adapter, REG_PKTBUF_DBG_DATA_L+1);
-
-                       aaabak = le16_to_cpup((__le16 *)lenc);
-                       lenbak = le16_to_cpu(*((__le16 *)lenc));
-                       aaa = le16_to_cpup((__le16 *)&lo32);
-                       len = le16_to_cpu(*((__le16 *)&lo32));
-
-                       limit = (len-2 < limit) ? len-2 : limit;
-
-                       DBG_88E("%s len:%u, lenbak:%u, aaa:%u, aaabak:%u\n", __func__, len, lenbak, aaa, aaabak);
-
-                       memcpy(pos, ((u8 *)&lo32)+2, (limit >= count+2) ? 2 : limit-count);
-                       count += (limit >= count+2) ? 2 : limit-count;
-                       pos = content+count;
-
-               } else {
-                       memcpy(pos, ((u8 *)&lo32), (limit >= count+4) ? 4 : limit-count);
-                       count += (limit >= count+4) ? 4 : limit-count;
-                       pos = content+count;
-               }
-
-               if (limit > count && len-2 > count) {
-                       memcpy(pos, (u8 *)&hi32, (limit >= count+4) ? 4 : limit-count);
-                       count += (limit >= count+4) ? 4 : limit-count;
-                       pos = content+count;
-               }
-
-               if (limit <= count || len-2 <= count)
-                       break;
-               i++;
-       }
-       rtw_write8(adapter, REG_PKT_BUFF_ACCESS_CTRL, DISABLE_TRXPKT_BUF_ACCESS);
-       DBG_88E("%s read count:%u\n", __func__, count);
-       *size = count;
-}
-
-static s32 iol_read_efuse(struct adapter *padapter, u8 txpktbuf_bndy, u16 offset, u16 size_byte, u8 *logical_map)
-{
-       s32 status = _FAIL;
-       u8 physical_map[512];
-       u16 size = 512;
-
-       rtw_write8(padapter, REG_TDECTRL+1, txpktbuf_bndy);
-       _rtw_memset(physical_map, 0xFF, 512);
-       rtw_write8(padapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
-       status = iol_execute(padapter, CMD_READ_EFUSE_MAP);
-       if (status == _SUCCESS)
-               efuse_read_phymap_from_txpktbuf(padapter, txpktbuf_bndy, physical_map, &size);
-       efuse_phymap_to_logical(physical_map, offset, size_byte, logical_map);
-       return status;
-}
 
 s32 rtl8188e_iol_efuse_patch(struct adapter *padapter)
 {
@@ -326,7 +103,7 @@ static s32 iol_ioconfig(struct adapter *padapter, u8 iocfg_bndy)
 {
        s32 rst = _SUCCESS;
 
-       rtw_write8(padapter, REG_TDECTRL+1, iocfg_bndy);
+       usb_write8(padapter, REG_TDECTRL+1, iocfg_bndy);
        rst = iol_execute(padapter, CMD_IOCONFIG);
        return rst;
 }
@@ -357,7 +134,7 @@ static int rtl8188e_IOL_exec_cmds_sync(struct adapter *adapter, struct xmit_fram
        iol_mode_enable(adapter, 0);
 exit:
        /* restore BCN_HEAD */
-       rtw_write8(adapter, REG_TDECTRL+1, 0);
+       usb_write8(adapter, REG_TDECTRL+1, 0);
        return ret;
 }
 
@@ -369,19 +146,19 @@ void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter *Adapter, int data_len)
        u8 *pbuf = vzalloc(data_len+10);
        DBG_88E("###### %s ######\n", __func__);
 
-       rtw_write8(Adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
+       usb_write8(Adapter, REG_PKT_BUFF_ACCESS_CTRL, TXPKT_BUF_SELECT);
        if (pbuf) {
                for (addr = 0; addr < data_cnts; addr++) {
-                       rtw_write32(Adapter, 0x140, addr);
+                       usb_write32(Adapter, 0x140, addr);
                        msleep(1);
                        loop = 0;
                        do {
-                               rstatus = (reg_140 = rtw_read32(Adapter, REG_PKTBUF_DBG_CTRL)&BIT24);
+                               rstatus = (reg_140 = usb_read32(Adapter, REG_PKTBUF_DBG_CTRL)&BIT24);
                                if (rstatus) {
-                                       fifo_data = rtw_read32(Adapter, REG_PKTBUF_DBG_DATA_L);
+                                       fifo_data = usb_read32(Adapter, REG_PKTBUF_DBG_DATA_L);
                                        memcpy(pbuf+(addr*8), &fifo_data, 4);
 
-                                       fifo_data = rtw_read32(Adapter, REG_PKTBUF_DBG_DATA_H);
+                                       fifo_data = usb_read32(Adapter, REG_PKTBUF_DBG_DATA_H);
                                        memcpy(pbuf+(addr*8+4), &fifo_data, 4);
                                }
                                msleep(1);
@@ -399,19 +176,19 @@ static void _FWDownloadEnable(struct adapter *padapter, bool enable)
 
        if (enable) {
                /*  MCU firmware download enable. */
-               tmp = rtw_read8(padapter, REG_MCUFWDL);
-               rtw_write8(padapter, REG_MCUFWDL, tmp | 0x01);
+               tmp = usb_read8(padapter, REG_MCUFWDL);
+               usb_write8(padapter, REG_MCUFWDL, tmp | 0x01);
 
                /*  8051 reset */
-               tmp = rtw_read8(padapter, REG_MCUFWDL+2);
-               rtw_write8(padapter, REG_MCUFWDL+2, tmp&0xf7);
+               tmp = usb_read8(padapter, REG_MCUFWDL+2);
+               usb_write8(padapter, REG_MCUFWDL+2, tmp&0xf7);
        } else {
                /*  MCU firmware download disable. */
-               tmp = rtw_read8(padapter, REG_MCUFWDL);
-               rtw_write8(padapter, REG_MCUFWDL, tmp&0xfe);
+               tmp = usb_read8(padapter, REG_MCUFWDL);
+               usb_write8(padapter, REG_MCUFWDL, tmp&0xfe);
 
                /*  Reserved for fw extension. */
-               rtw_write8(padapter, REG_MCUFWDL+1, 0x00);
+               usb_write8(padapter, REG_MCUFWDL+1, 0x00);
        }
 }
 
@@ -441,7 +218,7 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
        }
 
        for (i = 0; i < blockCount_p1; i++) {
-               ret = rtw_writeN(padapter, (FW_8188E_START_ADDRESS + i * blockSize_p1), blockSize_p1, (bufferPtr + i * blockSize_p1));
+               ret = usb_writeN(padapter, (FW_8188E_START_ADDRESS + i * blockSize_p1), blockSize_p1, (bufferPtr + i * blockSize_p1));
                if (ret == _FAIL)
                        goto exit;
        }
@@ -460,7 +237,7 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
                }
 
                for (i = 0; i < blockCount_p2; i++) {
-                       ret = rtw_writeN(padapter, (FW_8188E_START_ADDRESS + offset + i*blockSize_p2), blockSize_p2, (bufferPtr + offset + i*blockSize_p2));
+                       ret = usb_writeN(padapter, (FW_8188E_START_ADDRESS + offset + i*blockSize_p2), blockSize_p2, (bufferPtr + offset + i*blockSize_p2));
 
                        if (ret == _FAIL)
                                goto exit;
@@ -478,7 +255,7 @@ static int _BlockWrite(struct adapter *padapter, void *buffer, u32 buffSize)
                         (buffSize-offset), blockSize_p3, blockCount_p3));
 
                for (i = 0; i < blockCount_p3; i++) {
-                       ret = rtw_write8(padapter, (FW_8188E_START_ADDRESS + offset + i), *(bufferPtr + offset + i));
+                       ret = usb_write8(padapter, (FW_8188E_START_ADDRESS + offset + i), *(bufferPtr + offset + i));
 
                        if (ret == _FAIL)
                                goto exit;
@@ -494,8 +271,8 @@ static int _PageWrite(struct adapter *padapter, u32 page, void *buffer, u32 size
        u8 value8;
        u8 u8Page = (u8)(page & 0x07);
 
-       value8 = (rtw_read8(padapter, REG_MCUFWDL+2) & 0xF8) | u8Page;
-       rtw_write8(padapter, REG_MCUFWDL+2, value8);
+       value8 = (usb_read8(padapter, REG_MCUFWDL+2) & 0xF8) | u8Page;
+       usb_write8(padapter, REG_MCUFWDL+2, value8);
 
        return _BlockWrite(padapter, buffer, size);
 }
@@ -536,9 +313,9 @@ void _8051Reset88E(struct adapter *padapter)
 {
        u8 u1bTmp;
 
-       u1bTmp = rtw_read8(padapter, REG_SYS_FUNC_EN+1);
-       rtw_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp&(~BIT2));
-       rtw_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp|(BIT2));
+       u1bTmp = usb_read8(padapter, REG_SYS_FUNC_EN+1);
+       usb_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp&(~BIT2));
+       usb_write8(padapter, REG_SYS_FUNC_EN+1, u1bTmp|(BIT2));
        DBG_88E("=====> _8051Reset88E(): 8051 reset success .\n");
 }
 
@@ -549,7 +326,7 @@ static s32 _FWFreeToGo(struct adapter *padapter)
 
        /*  polling CheckSum report */
        do {
-               value32 = rtw_read32(padapter, REG_MCUFWDL);
+               value32 = usb_read32(padapter, REG_MCUFWDL);
                if (value32 & FWDL_ChkSum_rpt)
                        break;
        } while (counter++ < POLLING_READY_TIMEOUT_COUNT);
@@ -560,17 +337,17 @@ static s32 _FWFreeToGo(struct adapter *padapter)
        }
        DBG_88E("%s: Checksum report OK! REG_MCUFWDL:0x%08x\n", __func__, value32);
 
-       value32 = rtw_read32(padapter, REG_MCUFWDL);
+       value32 = usb_read32(padapter, REG_MCUFWDL);
        value32 |= MCUFWDL_RDY;
        value32 &= ~WINTINI_RDY;
-       rtw_write32(padapter, REG_MCUFWDL, value32);
+       usb_write32(padapter, REG_MCUFWDL, value32);
 
        _8051Reset88E(padapter);
 
        /*  polling for FW ready */
        counter = 0;
        do {
-               value32 = rtw_read32(padapter, REG_MCUFWDL);
+               value32 = usb_read32(padapter, REG_MCUFWDL);
                if (value32 & WINTINI_RDY) {
                        DBG_88E("%s: Polling FW ready success!! REG_MCUFWDL:0x%08x\n", __func__, value32);
                        return _SUCCESS;
@@ -666,8 +443,8 @@ s32 rtl8188e_FirmwareDownload(struct adapter *padapter)
 
        /*  Suggested by Filen. If 8051 is running in RAM code, driver should inform Fw to reset by itself, */
        /*  or it will cause download Fw fail. 2010.02.01. by tynli. */
-       if (rtw_read8(padapter, REG_MCUFWDL) & RAM_DL_SEL) { /* 8051 RAM code */
-               rtw_write8(padapter, REG_MCUFWDL, 0x00);
+       if (usb_read8(padapter, REG_MCUFWDL) & RAM_DL_SEL) { /* 8051 RAM code */
+               usb_write8(padapter, REG_MCUFWDL, 0x00);
                _8051Reset88E(padapter);
        }
 
@@ -675,7 +452,7 @@ s32 rtl8188e_FirmwareDownload(struct adapter *padapter)
        fwdl_start_time = jiffies;
        while (1) {
                /* reset the FWDL chksum */
-               rtw_write8(padapter, REG_MCUFWDL, rtw_read8(padapter, REG_MCUFWDL) | FWDL_ChkSum_rpt);
+               usb_write8(padapter, REG_MCUFWDL, usb_read8(padapter, REG_MCUFWDL) | FWDL_ChkSum_rpt);
 
                rtStatus = _WriteFW(padapter, pFirmwareBuf, FirmwareLen);
 
@@ -720,1021 +497,6 @@ static void rtl8188e_free_hal_data(struct adapter *padapter)
        padapter->HalData = NULL;
 }
 
-/*  */
-/*                     Efuse related code */
-/*  */
-enum{
-               VOLTAGE_V25                                             = 0x03,
-               LDOE25_SHIFT                                            = 28 ,
-       };
-
-static bool
-hal_EfusePgPacketWrite2ByteHeader(
-               struct adapter *pAdapter,
-               u8 efuseType,
-               u16                             *pAddr,
-               struct pgpkt *pTargetPkt,
-               bool bPseudoTest);
-static bool
-hal_EfusePgPacketWrite1ByteHeader(
-               struct adapter *pAdapter,
-               u8 efuseType,
-               u16                             *pAddr,
-               struct pgpkt *pTargetPkt,
-               bool bPseudoTest);
-static bool
-hal_EfusePgPacketWriteData(
-               struct adapter *pAdapter,
-               u8 efuseType,
-               u16                             *pAddr,
-               struct pgpkt *pTargetPkt,
-               bool bPseudoTest);
-
-static void
-hal_EfusePowerSwitch_RTL8188E(
-               struct adapter *pAdapter,
-               u8 bWrite,
-               u8 PwrState)
-{
-       u8 tempval;
-       u16     tmpV16;
-
-       if (PwrState) {
-               rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_ON);
-
-               /*  1.2V Power: From VDDON with Power Cut(0x0000h[15]), defualt valid */
-               tmpV16 = rtw_read16(pAdapter, REG_SYS_ISO_CTRL);
-               if (!(tmpV16 & PWC_EV12V)) {
-                       tmpV16 |= PWC_EV12V;
-                        rtw_write16(pAdapter, REG_SYS_ISO_CTRL, tmpV16);
-               }
-               /*  Reset: 0x0000h[28], default valid */
-               tmpV16 =  rtw_read16(pAdapter, REG_SYS_FUNC_EN);
-               if (!(tmpV16 & FEN_ELDR)) {
-                       tmpV16 |= FEN_ELDR;
-                       rtw_write16(pAdapter, REG_SYS_FUNC_EN, tmpV16);
-               }
-
-               /*  Clock: Gated(0x0008h[5]) 8M(0x0008h[1]) clock from ANA, default valid */
-               tmpV16 = rtw_read16(pAdapter, REG_SYS_CLKR);
-               if ((!(tmpV16 & LOADER_CLK_EN))  || (!(tmpV16 & ANA8M))) {
-                       tmpV16 |= (LOADER_CLK_EN | ANA8M);
-                       rtw_write16(pAdapter, REG_SYS_CLKR, tmpV16);
-               }
-
-               if (bWrite) {
-                       /*  Enable LDO 2.5V before read/write action */
-                       tempval = rtw_read8(pAdapter, EFUSE_TEST+3);
-                       tempval &= 0x0F;
-                       tempval |= (VOLTAGE_V25 << 4);
-                       rtw_write8(pAdapter, EFUSE_TEST+3, (tempval | 0x80));
-               }
-       } else {
-               rtw_write8(pAdapter, REG_EFUSE_ACCESS, EFUSE_ACCESS_OFF);
-
-               if (bWrite) {
-                       /*  Disable LDO 2.5V after read/write action */
-                       tempval = rtw_read8(pAdapter, EFUSE_TEST+3);
-                       rtw_write8(pAdapter, EFUSE_TEST+3, (tempval & 0x7F));
-               }
-       }
-}
-
-static void
-rtl8188e_EfusePowerSwitch(
-               struct adapter *pAdapter,
-               u8 bWrite,
-               u8 PwrState)
-{
-       hal_EfusePowerSwitch_RTL8188E(pAdapter, bWrite, PwrState);
-}
-
-
-static void Hal_EfuseReadEFuse88E(struct adapter *Adapter,
-       u16                     _offset,
-       u16                     _size_byte,
-       u8 *pbuf,
-               bool bPseudoTest
-       )
-{
-       u8 *efuseTbl = NULL;
-       u8 rtemp8[1];
-       u16     eFuse_Addr = 0;
-       u8 offset, wren;
-       u16     i, j;
-       u16     **eFuseWord = NULL;
-       u16     efuse_utilized = 0;
-       u8 u1temp = 0;
-
-       /*  */
-       /*  Do NOT excess total size of EFuse table. Added by Roger, 2008.11.10. */
-       /*  */
-       if ((_offset + _size_byte) > EFUSE_MAP_LEN_88E) {/*  total E-Fuse table is 512bytes */
-               DBG_88E("Hal_EfuseReadEFuse88E(): Invalid offset(%#x) with read bytes(%#x)!!\n", _offset, _size_byte);
-               goto exit;
-       }
-
-       efuseTbl = (u8 *)rtw_zmalloc(EFUSE_MAP_LEN_88E);
-       if (efuseTbl == NULL) {
-               DBG_88E("%s: alloc efuseTbl fail!\n", __func__);
-               goto exit;
-       }
-
-       eFuseWord = (u16 **)rtw_malloc2d(EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
-       if (eFuseWord == NULL) {
-               DBG_88E("%s: alloc eFuseWord fail!\n", __func__);
-               goto exit;
-       }
-
-       /*  0. Refresh efuse init map as all oxFF. */
-       for (i = 0; i < EFUSE_MAX_SECTION_88E; i++)
-               for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++)
-                       eFuseWord[i][j] = 0xFFFF;
-
-       /*  */
-       /*  1. Read the first byte to check if efuse is empty!!! */
-       /*  */
-       /*  */
-       ReadEFuseByte(Adapter, eFuse_Addr, rtemp8, bPseudoTest);
-       if (*rtemp8 != 0xFF) {
-               efuse_utilized++;
-               eFuse_Addr++;
-       } else {
-               DBG_88E("EFUSE is empty efuse_Addr-%d efuse_data =%x\n", eFuse_Addr, *rtemp8);
-               goto exit;
-       }
-
-       /*  */
-       /*  2. Read real efuse content. Filter PG header and every section data. */
-       /*  */
-       while ((*rtemp8 != 0xFF) && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) {
-               /*  Check PG header for section num. */
-               if ((*rtemp8 & 0x1F) == 0x0F) {         /* extended header */
-                       u1temp = ((*rtemp8 & 0xE0) >> 5);
-
-                       ReadEFuseByte(Adapter, eFuse_Addr, rtemp8, bPseudoTest);
-
-                       if ((*rtemp8 & 0x0F) == 0x0F) {
-                               eFuse_Addr++;
-                               ReadEFuseByte(Adapter, eFuse_Addr, rtemp8, bPseudoTest);
-
-                               if (*rtemp8 != 0xFF && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E))
-                                       eFuse_Addr++;
-                               continue;
-                       } else {
-                               offset = ((*rtemp8 & 0xF0) >> 1) | u1temp;
-                               wren = (*rtemp8 & 0x0F);
-                               eFuse_Addr++;
-                       }
-               } else {
-                       offset = ((*rtemp8 >> 4) & 0x0f);
-                       wren = (*rtemp8 & 0x0f);
-               }
-
-               if (offset < EFUSE_MAX_SECTION_88E) {
-                       /*  Get word enable value from PG header */
-
-                       for (i = 0; i < EFUSE_MAX_WORD_UNIT; i++) {
-                               /*  Check word enable condition in the section */
-                               if (!(wren & 0x01)) {
-                                       ReadEFuseByte(Adapter, eFuse_Addr, rtemp8, bPseudoTest);
-                                       eFuse_Addr++;
-                                       efuse_utilized++;
-                                       eFuseWord[offset][i] = (*rtemp8 & 0xff);
-                                       if (eFuse_Addr >= EFUSE_REAL_CONTENT_LEN_88E)
-                                               break;
-                                       ReadEFuseByte(Adapter, eFuse_Addr, rtemp8, bPseudoTest);
-                                       eFuse_Addr++;
-                                       efuse_utilized++;
-                                       eFuseWord[offset][i] |= (((u16)*rtemp8 << 8) & 0xff00);
-                                       if (eFuse_Addr >= EFUSE_REAL_CONTENT_LEN_88E)
-                                               break;
-                               }
-                               wren >>= 1;
-                       }
-               }
-
-               /*  Read next PG header */
-               ReadEFuseByte(Adapter, eFuse_Addr, rtemp8, bPseudoTest);
-
-               if (*rtemp8 != 0xFF && (eFuse_Addr < EFUSE_REAL_CONTENT_LEN_88E)) {
-                       efuse_utilized++;
-                       eFuse_Addr++;
-               }
-       }
-
-       /*  3. Collect 16 sections and 4 word unit into Efuse map. */
-       for (i = 0; i < EFUSE_MAX_SECTION_88E; i++) {
-               for (j = 0; j < EFUSE_MAX_WORD_UNIT; j++) {
-                       efuseTbl[(i*8)+(j*2)] = (eFuseWord[i][j] & 0xff);
-                       efuseTbl[(i*8)+((j*2)+1)] = ((eFuseWord[i][j] >> 8) & 0xff);
-               }
-       }
-
-       /*  4. Copy from Efuse map to output pointer memory!!! */
-       for (i = 0; i < _size_byte; i++)
-               pbuf[i] = efuseTbl[_offset+i];
-
-       /*  5. Calculate Efuse utilization. */
-       rtw_hal_set_hwreg(Adapter, HW_VAR_EFUSE_BYTES, (u8 *)&eFuse_Addr);
-
-exit:
-       kfree(efuseTbl);
-
-       if (eFuseWord)
-               rtw_mfree2d((void *)eFuseWord, EFUSE_MAX_SECTION_88E, EFUSE_MAX_WORD_UNIT, sizeof(u16));
-}
-
-static void ReadEFuseByIC(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest)
-{
-       if (!bPseudoTest) {
-               int ret = _FAIL;
-               if (rtw_IOL_applied(Adapter)) {
-                       rtw_hal_power_on(Adapter);
-
-                       iol_mode_enable(Adapter, 1);
-                       ret = iol_read_efuse(Adapter, 0, _offset, _size_byte, pbuf);
-                       iol_mode_enable(Adapter, 0);
-
-                       if (_SUCCESS == ret)
-                               goto exit;
-               }
-       }
-       Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
-
-exit:
-       return;
-}
-
-static void ReadEFuse_Pseudo(struct adapter *Adapter, u8 efuseType, u16 _offset, u16 _size_byte, u8 *pbuf, bool bPseudoTest)
-{
-       Hal_EfuseReadEFuse88E(Adapter, _offset, _size_byte, pbuf, bPseudoTest);
-}
-
-static void rtl8188e_ReadEFuse(struct adapter *Adapter, u8 efuseType,
-                              u16 _offset, u16 _size_byte, u8 *pbuf,
-                              bool bPseudoTest)
-{
-       if (bPseudoTest)
-               ReadEFuse_Pseudo (Adapter, efuseType, _offset, _size_byte, pbuf, bPseudoTest);
-       else
-               ReadEFuseByIC(Adapter, efuseType, _offset, _size_byte, pbuf, bPseudoTest);
-}
-
-/* Do not support BT */
-static void Hal_EFUSEGetEfuseDefinition88E(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut)
-{
-       switch (type) {
-       case TYPE_EFUSE_MAX_SECTION:
-               {
-                       u8 *pMax_section;
-                       pMax_section = (u8 *)pOut;
-                       *pMax_section = EFUSE_MAX_SECTION_88E;
-               }
-               break;
-       case TYPE_EFUSE_REAL_CONTENT_LEN:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
-               }
-               break;
-       case TYPE_EFUSE_CONTENT_LEN_BANK:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
-               }
-               break;
-       case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
-               }
-               break;
-       case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
-               }
-               break;
-       case TYPE_EFUSE_MAP_LEN:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
-               }
-               break;
-       case TYPE_EFUSE_PROTECT_BYTES_BANK:
-               {
-                       u8 *pu1Tmp;
-                       pu1Tmp = (u8 *)pOut;
-                       *pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
-               }
-               break;
-       default:
-               {
-                       u8 *pu1Tmp;
-                       pu1Tmp = (u8 *)pOut;
-                       *pu1Tmp = 0;
-               }
-               break;
-       }
-}
-
-static void Hal_EFUSEGetEfuseDefinition_Pseudo88E(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut)
-{
-       switch (type) {
-       case TYPE_EFUSE_MAX_SECTION:
-               {
-                       u8 *pMax_section;
-                       pMax_section = (u8 *)pOut;
-                       *pMax_section = EFUSE_MAX_SECTION_88E;
-               }
-               break;
-       case TYPE_EFUSE_REAL_CONTENT_LEN:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
-               }
-               break;
-       case TYPE_EFUSE_CONTENT_LEN_BANK:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = EFUSE_REAL_CONTENT_LEN_88E;
-               }
-               break;
-       case TYPE_AVAILABLE_EFUSE_BYTES_BANK:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
-               }
-               break;
-       case TYPE_AVAILABLE_EFUSE_BYTES_TOTAL:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = (u16)(EFUSE_REAL_CONTENT_LEN_88E-EFUSE_OOB_PROTECT_BYTES_88E);
-               }
-               break;
-       case TYPE_EFUSE_MAP_LEN:
-               {
-                       u16 *pu2Tmp;
-                       pu2Tmp = (u16 *)pOut;
-                       *pu2Tmp = (u16)EFUSE_MAP_LEN_88E;
-               }
-               break;
-       case TYPE_EFUSE_PROTECT_BYTES_BANK:
-               {
-                       u8 *pu1Tmp;
-                       pu1Tmp = (u8 *)pOut;
-                       *pu1Tmp = (u8)(EFUSE_OOB_PROTECT_BYTES_88E);
-               }
-               break;
-       default:
-               {
-                       u8 *pu1Tmp;
-                       pu1Tmp = (u8 *)pOut;
-                       *pu1Tmp = 0;
-               }
-               break;
-       }
-}
-
-static void rtl8188e_EFUSE_GetEfuseDefinition(struct adapter *pAdapter, u8 efuseType, u8 type, void *pOut, bool bPseudoTest)
-{
-       if (bPseudoTest)
-               Hal_EFUSEGetEfuseDefinition_Pseudo88E(pAdapter, efuseType, type, pOut);
-       else
-               Hal_EFUSEGetEfuseDefinition88E(pAdapter, efuseType, type, pOut);
-}
-
-static u8 Hal_EfuseWordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest)
-{
-       u16     tmpaddr = 0;
-       u16     start_addr = efuse_addr;
-       u8 badworden = 0x0F;
-       u8 tmpdata[8];
-
-       _rtw_memset((void *)tmpdata, 0xff, PGPKT_DATA_SIZE);
-
-       if (!(word_en&BIT0)) {
-               tmpaddr = start_addr;
-               efuse_OneByteWrite(pAdapter, start_addr++, data[0], bPseudoTest);
-               efuse_OneByteWrite(pAdapter, start_addr++, data[1], bPseudoTest);
-
-               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[0], bPseudoTest);
-               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[1], bPseudoTest);
-               if ((data[0] != tmpdata[0]) || (data[1] != tmpdata[1]))
-                       badworden &= (~BIT0);
-       }
-       if (!(word_en&BIT1)) {
-               tmpaddr = start_addr;
-               efuse_OneByteWrite(pAdapter, start_addr++, data[2], bPseudoTest);
-               efuse_OneByteWrite(pAdapter, start_addr++, data[3], bPseudoTest);
-
-               efuse_OneByteRead(pAdapter, tmpaddr    , &tmpdata[2], bPseudoTest);
-               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[3], bPseudoTest);
-               if ((data[2] != tmpdata[2]) || (data[3] != tmpdata[3]))
-                       badworden &= (~BIT1);
-       }
-       if (!(word_en&BIT2)) {
-               tmpaddr = start_addr;
-               efuse_OneByteWrite(pAdapter, start_addr++, data[4], bPseudoTest);
-               efuse_OneByteWrite(pAdapter, start_addr++, data[5], bPseudoTest);
-
-               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[4], bPseudoTest);
-               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[5], bPseudoTest);
-               if ((data[4] != tmpdata[4]) || (data[5] != tmpdata[5]))
-                       badworden &= (~BIT2);
-       }
-       if (!(word_en&BIT3)) {
-               tmpaddr = start_addr;
-               efuse_OneByteWrite(pAdapter, start_addr++, data[6], bPseudoTest);
-               efuse_OneByteWrite(pAdapter, start_addr++, data[7], bPseudoTest);
-
-               efuse_OneByteRead(pAdapter, tmpaddr, &tmpdata[6], bPseudoTest);
-               efuse_OneByteRead(pAdapter, tmpaddr+1, &tmpdata[7], bPseudoTest);
-               if ((data[6] != tmpdata[6]) || (data[7] != tmpdata[7]))
-                       badworden &= (~BIT3);
-       }
-       return badworden;
-}
-
-static u8 Hal_EfuseWordEnableDataWrite_Pseudo(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest)
-{
-       u8 ret;
-
-       ret = Hal_EfuseWordEnableDataWrite(pAdapter, efuse_addr, word_en, data, bPseudoTest);
-       return ret;
-}
-
-static u8 rtl8188e_Efuse_WordEnableDataWrite(struct adapter *pAdapter, u16 efuse_addr, u8 word_en, u8 *data, bool bPseudoTest)
-{
-       u8 ret = 0;
-
-       if (bPseudoTest)
-               ret = Hal_EfuseWordEnableDataWrite_Pseudo (pAdapter, efuse_addr, word_en, data, bPseudoTest);
-       else
-               ret = Hal_EfuseWordEnableDataWrite(pAdapter, efuse_addr, word_en, data, bPseudoTest);
-       return ret;
-}
-
-static u16 hal_EfuseGetCurrentSize_8188e(struct adapter *pAdapter, bool bPseudoTest)
-{
-       int     bContinual = true;
-       u16     efuse_addr = 0;
-       u8 hoffset = 0, hworden = 0;
-       u8 efuse_data, word_cnts = 0;
-
-       if (bPseudoTest)
-               efuse_addr = (u16)(fakeEfuseUsedBytes);
-       else
-               rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
-
-       while (bContinual &&
-              efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest) &&
-              AVAILABLE_EFUSE_ADDR(efuse_addr)) {
-               if (efuse_data != 0xFF) {
-                       if ((efuse_data&0x1F) == 0x0F) {                /* extended header */
-                               hoffset = efuse_data;
-                               efuse_addr++;
-                               efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest);
-                               if ((efuse_data & 0x0F) == 0x0F) {
-                                       efuse_addr++;
-                                       continue;
-                               } else {
-                                       hoffset = ((hoffset & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
-                                       hworden = efuse_data & 0x0F;
-                               }
-                       } else {
-                               hoffset = (efuse_data>>4) & 0x0F;
-                               hworden =  efuse_data & 0x0F;
-                       }
-                       word_cnts = Efuse_CalculateWordCnts(hworden);
-                       /* read next header */
-                       efuse_addr = efuse_addr + (word_cnts*2)+1;
-               } else {
-                       bContinual = false;
-               }
-       }
-
-       if (bPseudoTest)
-               fakeEfuseUsedBytes = efuse_addr;
-       else
-               rtw_hal_set_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&efuse_addr);
-
-       return efuse_addr;
-}
-
-static u16 Hal_EfuseGetCurrentSize_Pseudo(struct adapter *pAdapter, bool bPseudoTest)
-{
-       u16     ret = 0;
-
-       ret = hal_EfuseGetCurrentSize_8188e(pAdapter, bPseudoTest);
-       return ret;
-}
-
-static u16 rtl8188e_EfuseGetCurrentSize(struct adapter *pAdapter, u8 efuseType, bool bPseudoTest)
-{
-       u16     ret = 0;
-
-       if (bPseudoTest)
-               ret = Hal_EfuseGetCurrentSize_Pseudo(pAdapter, bPseudoTest);
-       else
-               ret = hal_EfuseGetCurrentSize_8188e(pAdapter, bPseudoTest);
-       return ret;
-}
-
-static int hal_EfusePgPacketRead_8188e(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
-{
-       u8 ReadState = PG_STATE_HEADER;
-       int     bContinual = true;
-       int     bDataEmpty = true;
-       u8 efuse_data, word_cnts = 0;
-       u16     efuse_addr = 0;
-       u8 hoffset = 0, hworden = 0;
-       u8 tmpidx = 0;
-       u8 tmpdata[8];
-       u8 max_section = 0;
-       u8 tmp_header = 0;
-
-       EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAX_SECTION, (void *)&max_section, bPseudoTest);
-
-       if (data == NULL)
-               return false;
-       if (offset > max_section)
-               return false;
-
-       _rtw_memset((void *)data, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
-       _rtw_memset((void *)tmpdata, 0xff, sizeof(u8)*PGPKT_DATA_SIZE);
-
-       /*  <Roger_TODO> Efuse has been pre-programmed dummy 5Bytes at the end of Efuse by CP. */
-       /*  Skip dummy parts to prevent unexpected data read from Efuse. */
-       /*  By pass right now. 2009.02.19. */
-       while (bContinual && AVAILABLE_EFUSE_ADDR(efuse_addr)) {
-               /*   Header Read ------------- */
-               if (ReadState & PG_STATE_HEADER) {
-                       if (efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest) && (efuse_data != 0xFF)) {
-                               if (EXT_HEADER(efuse_data)) {
-                                       tmp_header = efuse_data;
-                                       efuse_addr++;
-                                       efuse_OneByteRead(pAdapter, efuse_addr, &efuse_data, bPseudoTest);
-                                       if (!ALL_WORDS_DISABLED(efuse_data)) {
-                                               hoffset = ((tmp_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
-                                               hworden = efuse_data & 0x0F;
-                                       } else {
-                                               DBG_88E("Error, All words disabled\n");
-                                               efuse_addr++;
-                                               continue;
-                                       }
-                               } else {
-                                       hoffset = (efuse_data>>4) & 0x0F;
-                                       hworden =  efuse_data & 0x0F;
-                               }
-                               word_cnts = Efuse_CalculateWordCnts(hworden);
-                               bDataEmpty = true;
-
-                               if (hoffset == offset) {
-                                       for (tmpidx = 0; tmpidx < word_cnts*2; tmpidx++) {
-                                               if (efuse_OneByteRead(pAdapter, efuse_addr+1+tmpidx, &efuse_data, bPseudoTest)) {
-                                                       tmpdata[tmpidx] = efuse_data;
-                                                       if (efuse_data != 0xff)
-                                                               bDataEmpty = false;
-                                               }
-                                       }
-                                       if (bDataEmpty == false) {
-                                               ReadState = PG_STATE_DATA;
-                                       } else {/* read next header */
-                                               efuse_addr = efuse_addr + (word_cnts*2)+1;
-                                               ReadState = PG_STATE_HEADER;
-                                       }
-                               } else {/* read next header */
-                                       efuse_addr = efuse_addr + (word_cnts*2)+1;
-                                       ReadState = PG_STATE_HEADER;
-                               }
-                       } else {
-                               bContinual = false;
-                       }
-               } else if (ReadState & PG_STATE_DATA) {
-               /*   Data section Read ------------- */
-                       efuse_WordEnableDataRead(hworden, tmpdata, data);
-                       efuse_addr = efuse_addr + (word_cnts*2)+1;
-                       ReadState = PG_STATE_HEADER;
-               }
-
-       }
-
-       if ((data[0] == 0xff) && (data[1] == 0xff) && (data[2] == 0xff)  && (data[3] == 0xff) &&
-           (data[4] == 0xff) && (data[5] == 0xff) && (data[6] == 0xff)  && (data[7] == 0xff))
-               return false;
-       else
-               return true;
-}
-
-static int Hal_EfusePgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
-{
-       int     ret;
-
-       ret = hal_EfusePgPacketRead_8188e(pAdapter, offset, data, bPseudoTest);
-       return ret;
-}
-
-static int Hal_EfusePgPacketRead_Pseudo(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
-{
-       int     ret;
-
-       ret = hal_EfusePgPacketRead_8188e(pAdapter, offset, data, bPseudoTest);
-       return ret;
-}
-
-static int rtl8188e_Efuse_PgPacketRead(struct adapter *pAdapter, u8 offset, u8 *data, bool bPseudoTest)
-{
-       int     ret;
-
-       if (bPseudoTest)
-               ret = Hal_EfusePgPacketRead_Pseudo (pAdapter, offset, data, bPseudoTest);
-       else
-               ret = Hal_EfusePgPacketRead(pAdapter, offset, data, bPseudoTest);
-       return ret;
-}
-
-static bool hal_EfuseFixHeaderProcess(struct adapter *pAdapter, u8 efuseType, struct pgpkt *pFixPkt, u16 *pAddr, bool bPseudoTest)
-{
-       u8 originaldata[8], badworden = 0;
-       u16     efuse_addr = *pAddr;
-       u32     PgWriteSuccess = 0;
-
-       _rtw_memset((void *)originaldata, 0xff, 8);
-
-       if (Efuse_PgPacketRead(pAdapter, pFixPkt->offset, originaldata, bPseudoTest)) {
-               /* check if data exist */
-               badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pFixPkt->word_en, originaldata, bPseudoTest);
-
-               if (badworden != 0xf) { /*  write fail */
-                       PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pFixPkt->offset, badworden, originaldata, bPseudoTest);
-
-                       if (!PgWriteSuccess)
-                               return false;
-                       else
-                               efuse_addr = Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest);
-               } else {
-                       efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1;
-               }
-       } else {
-               efuse_addr = efuse_addr + (pFixPkt->word_cnts*2) + 1;
-       }
-       *pAddr = efuse_addr;
-       return true;
-}
-
-static bool hal_EfusePgPacketWrite2ByteHeader(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest)
-{
-       bool bRet = false;
-       u16     efuse_addr = *pAddr, efuse_max_available_len = 0;
-       u8 pg_header = 0, tmp_header = 0, pg_header_temp = 0;
-       u8 repeatcnt = 0;
-
-       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
-
-       while (efuse_addr < efuse_max_available_len) {
-               pg_header = ((pTargetPkt->offset & 0x07) << 5) | 0x0F;
-               efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
-               efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
-
-               while (tmp_header == 0xFF) {
-                       if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
-                               return false;
-
-                       efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
-                       efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
-               }
-
-               /* to write ext_header */
-               if (tmp_header == pg_header) {
-                       efuse_addr++;
-                       pg_header_temp = pg_header;
-                       pg_header = ((pTargetPkt->offset & 0x78) << 1) | pTargetPkt->word_en;
-
-                       efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
-                       efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
-
-                       while (tmp_header == 0xFF) {
-                               if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
-                                       return false;
-
-                               efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
-                               efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
-                       }
-
-                       if ((tmp_header & 0x0F) == 0x0F) {      /* word_en PG fail */
-                               if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_) {
-                                       return false;
-                               } else {
-                                       efuse_addr++;
-                                       continue;
-                               }
-                       } else if (pg_header != tmp_header) {   /* offset PG fail */
-                               struct pgpkt    fixPkt;
-                               fixPkt.offset = ((pg_header_temp & 0xE0) >> 5) | ((tmp_header & 0xF0) >> 1);
-                               fixPkt.word_en = tmp_header & 0x0F;
-                               fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
-                               if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest))
-                                       return false;
-                       } else {
-                               bRet = true;
-                               break;
-                       }
-               } else if ((tmp_header & 0x1F) == 0x0F) {               /* wrong extended header */
-                       efuse_addr += 2;
-                       continue;
-               }
-       }
-
-       *pAddr = efuse_addr;
-       return bRet;
-}
-
-static bool hal_EfusePgPacketWrite1ByteHeader(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest)
-{
-       bool bRet = false;
-       u8 pg_header = 0, tmp_header = 0;
-       u16     efuse_addr = *pAddr;
-       u8 repeatcnt = 0;
-
-       pg_header = ((pTargetPkt->offset << 4) & 0xf0) | pTargetPkt->word_en;
-
-       efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
-       efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
-
-       while (tmp_header == 0xFF) {
-               if (repeatcnt++ > EFUSE_REPEAT_THRESHOLD_)
-                       return false;
-               efuse_OneByteWrite(pAdapter, efuse_addr, pg_header, bPseudoTest);
-               efuse_OneByteRead(pAdapter, efuse_addr, &tmp_header, bPseudoTest);
-       }
-
-       if (pg_header == tmp_header) {
-               bRet = true;
-       } else {
-               struct pgpkt    fixPkt;
-               fixPkt.offset = (tmp_header>>4) & 0x0F;
-               fixPkt.word_en = tmp_header & 0x0F;
-               fixPkt.word_cnts = Efuse_CalculateWordCnts(fixPkt.word_en);
-               if (!hal_EfuseFixHeaderProcess(pAdapter, efuseType, &fixPkt, &efuse_addr, bPseudoTest))
-                       return false;
-       }
-
-       *pAddr = efuse_addr;
-       return bRet;
-}
-
-static bool hal_EfusePgPacketWriteData(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest)
-{
-       u16     efuse_addr = *pAddr;
-       u8 badworden = 0;
-       u32     PgWriteSuccess = 0;
-
-       badworden = 0x0f;
-       badworden = Efuse_WordEnableDataWrite(pAdapter, efuse_addr+1, pTargetPkt->word_en, pTargetPkt->data, bPseudoTest);
-       if (badworden == 0x0F) {
-               /*  write ok */
-               return true;
-       } else {
-               /* reorganize other pg packet */
-               PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
-               if (!PgWriteSuccess)
-                       return false;
-               else
-                       return true;
-       }
-}
-
-static bool
-hal_EfusePgPacketWriteHeader(
-                               struct adapter *pAdapter,
-                               u8 efuseType,
-                               u16                             *pAddr,
-                               struct pgpkt *pTargetPkt,
-                               bool bPseudoTest)
-{
-       bool bRet = false;
-
-       if (pTargetPkt->offset >= EFUSE_MAX_SECTION_BASE)
-               bRet = hal_EfusePgPacketWrite2ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt, bPseudoTest);
-       else
-               bRet = hal_EfusePgPacketWrite1ByteHeader(pAdapter, efuseType, pAddr, pTargetPkt, bPseudoTest);
-
-       return bRet;
-}
-
-static bool wordEnMatched(struct pgpkt *pTargetPkt, struct pgpkt *pCurPkt,
-                         u8 *pWden)
-{
-       u8 match_word_en = 0x0F;        /*  default all words are disabled */
-
-       /*  check if the same words are enabled both target and current PG packet */
-       if (((pTargetPkt->word_en & BIT0) == 0) &&
-           ((pCurPkt->word_en & BIT0) == 0))
-               match_word_en &= ~BIT0;                         /*  enable word 0 */
-       if (((pTargetPkt->word_en & BIT1) == 0) &&
-           ((pCurPkt->word_en & BIT1) == 0))
-               match_word_en &= ~BIT1;                         /*  enable word 1 */
-       if (((pTargetPkt->word_en & BIT2) == 0) &&
-           ((pCurPkt->word_en & BIT2) == 0))
-               match_word_en &= ~BIT2;                         /*  enable word 2 */
-       if (((pTargetPkt->word_en & BIT3) == 0) &&
-           ((pCurPkt->word_en & BIT3) == 0))
-               match_word_en &= ~BIT3;                         /*  enable word 3 */
-
-       *pWden = match_word_en;
-
-       if (match_word_en != 0xf)
-               return true;
-       else
-               return false;
-}
-
-static bool hal_EfuseCheckIfDatafollowed(struct adapter *pAdapter, u8 word_cnts, u16 startAddr, bool bPseudoTest)
-{
-       bool bRet = false;
-       u8 i, efuse_data;
-
-       for (i = 0; i < (word_cnts*2); i++) {
-               if (efuse_OneByteRead(pAdapter, (startAddr+i), &efuse_data, bPseudoTest) && (efuse_data != 0xFF))
-                       bRet = true;
-       }
-       return bRet;
-}
-
-static bool hal_EfusePartialWriteCheck(struct adapter *pAdapter, u8 efuseType, u16 *pAddr, struct pgpkt *pTargetPkt, bool bPseudoTest)
-{
-       bool bRet = false;
-       u8 i, efuse_data = 0, cur_header = 0;
-       u8 matched_wden = 0, badworden = 0;
-       u16     startAddr = 0, efuse_max_available_len = 0, efuse_max = 0;
-       struct pgpkt curPkt;
-
-       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_AVAILABLE_EFUSE_BYTES_BANK, (void *)&efuse_max_available_len, bPseudoTest);
-       EFUSE_GetEfuseDefinition(pAdapter, efuseType, TYPE_EFUSE_REAL_CONTENT_LEN, (void *)&efuse_max, bPseudoTest);
-
-       if (efuseType == EFUSE_WIFI) {
-               if (bPseudoTest) {
-                       startAddr = (u16)(fakeEfuseUsedBytes%EFUSE_REAL_CONTENT_LEN);
-               } else {
-                       rtw_hal_get_hwreg(pAdapter, HW_VAR_EFUSE_BYTES, (u8 *)&startAddr);
-                       startAddr %= EFUSE_REAL_CONTENT_LEN;
-               }
-       } else {
-               if (bPseudoTest)
-                       startAddr = (u16)(fakeBTEfuseUsedBytes%EFUSE_REAL_CONTENT_LEN);
-               else
-                       startAddr = (u16)(BTEfuseUsedBytes%EFUSE_REAL_CONTENT_LEN);
-       }
-
-       while (1) {
-               if (startAddr >= efuse_max_available_len) {
-                       bRet = false;
-                       break;
-               }
-
-               if (efuse_OneByteRead(pAdapter, startAddr, &efuse_data, bPseudoTest) && (efuse_data != 0xFF)) {
-                       if (EXT_HEADER(efuse_data)) {
-                               cur_header = efuse_data;
-                               startAddr++;
-                               efuse_OneByteRead(pAdapter, startAddr, &efuse_data, bPseudoTest);
-                               if (ALL_WORDS_DISABLED(efuse_data)) {
-                                       bRet = false;
-                                       break;
-                               } else {
-                                       curPkt.offset = ((cur_header & 0xE0) >> 5) | ((efuse_data & 0xF0) >> 1);
-                                       curPkt.word_en = efuse_data & 0x0F;
-                               }
-                       } else {
-                               cur_header  =  efuse_data;
-                               curPkt.offset = (cur_header>>4) & 0x0F;
-                               curPkt.word_en = cur_header & 0x0F;
-                       }
-
-                       curPkt.word_cnts = Efuse_CalculateWordCnts(curPkt.word_en);
-                       /*  if same header is found but no data followed */
-                       /*  write some part of data followed by the header. */
-                       if ((curPkt.offset == pTargetPkt->offset) &&
-                           (!hal_EfuseCheckIfDatafollowed(pAdapter, curPkt.word_cnts, startAddr+1, bPseudoTest)) &&
-                           wordEnMatched(pTargetPkt, &curPkt, &matched_wden)) {
-                               /*  Here to write partial data */
-                               badworden = Efuse_WordEnableDataWrite(pAdapter, startAddr+1, matched_wden, pTargetPkt->data, bPseudoTest);
-                               if (badworden != 0x0F) {
-                                       u32     PgWriteSuccess = 0;
-                                       /*  if write fail on some words, write these bad words again */
-
-                                       PgWriteSuccess = Efuse_PgPacketWrite(pAdapter, pTargetPkt->offset, badworden, pTargetPkt->data, bPseudoTest);
-
-                                       if (!PgWriteSuccess) {
-                                               bRet = false;   /*  write fail, return */
-                                               break;
-                                       }
-                               }
-                               /*  partial write ok, update the target packet for later use */
-                               for (i = 0; i < 4; i++) {
-                                       if ((matched_wden & (0x1<<i)) == 0)     /*  this word has been written */
-                                               pTargetPkt->word_en |= (0x1<<i);        /*  disable the word */
-                               }
-                               pTargetPkt->word_cnts = Efuse_CalculateWordCnts(pTargetPkt->word_en);
-                       }
-                       /*  read from next header */
-                       startAddr = startAddr + (curPkt.word_cnts*2) + 1;
-               } else {
-                       /*  not used header, 0xff */
-                       *pAddr = startAddr;
-                       bRet = true;
-                       break;
-               }
-       }
-       return bRet;
-}
-
-static bool
-hal_EfusePgCheckAvailableAddr(
-               struct adapter *pAdapter,
-               u8 efuseType,
-               bool bPseudoTest
-       )
-{
-       u16     efuse_max_available_len = 0;
-
-       /* Change to check TYPE_EFUSE_MAP_LEN , because 8188E raw 256, logic map over 256. */
-       EFUSE_GetEfuseDefinition(pAdapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&efuse_max_available_len, false);
-
-       if (Efuse_GetCurrentSize(pAdapter, efuseType, bPseudoTest) >= efuse_max_available_len)
-               return false;
-       return true;
-}
-
-static void hal_EfuseConstructPGPkt(u8 offset, u8 word_en, u8 *pData, struct pgpkt *pTargetPkt)
-{
-       _rtw_memset((void *)pTargetPkt->data, 0xFF, sizeof(u8)*8);
-       pTargetPkt->offset = offset;
-       pTargetPkt->word_en = word_en;
-       efuse_WordEnableDataRead(word_en, pData, pTargetPkt->data);
-       pTargetPkt->word_cnts = Efuse_CalculateWordCnts(pTargetPkt->word_en);
-}
-
-static bool hal_EfusePgPacketWrite_8188e(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *pData, bool bPseudoTest)
-{
-       struct pgpkt    targetPkt;
-       u16                     startAddr = 0;
-       u8 efuseType = EFUSE_WIFI;
-
-       if (!hal_EfusePgCheckAvailableAddr(pAdapter, efuseType, bPseudoTest))
-               return false;
-
-       hal_EfuseConstructPGPkt(offset, word_en, pData, &targetPkt);
-
-       if (!hal_EfusePartialWriteCheck(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
-               return false;
-
-       if (!hal_EfusePgPacketWriteHeader(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
-               return false;
-
-       if (!hal_EfusePgPacketWriteData(pAdapter, efuseType, &startAddr, &targetPkt, bPseudoTest))
-               return false;
-
-       return true;
-}
-
-static int Hal_EfusePgPacketWrite_Pseudo(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
-{
-       int ret;
-
-       ret = hal_EfusePgPacketWrite_8188e(pAdapter, offset, word_en, data, bPseudoTest);
-       return ret;
-}
-
-static int Hal_EfusePgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
-{
-       int     ret = 0;
-       ret = hal_EfusePgPacketWrite_8188e(pAdapter, offset, word_en, data, bPseudoTest);
-
-       return ret;
-}
-
-static int rtl8188e_Efuse_PgPacketWrite(struct adapter *pAdapter, u8 offset, u8 word_en, u8 *data, bool bPseudoTest)
-{
-       int     ret;
-
-       if (bPseudoTest)
-               ret = Hal_EfusePgPacketWrite_Pseudo (pAdapter, offset, word_en, data, bPseudoTest);
-       else
-               ret = Hal_EfusePgPacketWrite(pAdapter, offset, word_en, data, bPseudoTest);
-       return ret;
-}
-
 static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
 {
        u32                             value32;
@@ -1743,7 +505,7 @@ static struct HAL_VERSION ReadChipVersion8188E(struct adapter *padapter)
 
        pHalData = GET_HAL_DATA(padapter);
 
-       value32 = rtw_read32(padapter, REG_SYS_CFG);
+       value32 = usb_read32(padapter, REG_SYS_CFG);
        ChipVersion.ICType = CHIP_8188E;
        ChipVersion.ChipType = ((value32 & RTL_ID) ? TEST_CHIP : NORMAL_CHIP);
 
@@ -1782,10 +544,6 @@ static void rtl8188e_read_chip_version(struct adapter *padapter)
        ReadChipVersion8188E(padapter);
 }
 
-static void rtl8188e_GetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
-{
-}
-
 static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable eVariable, void *pValue1, bool bSet)
 {
        struct hal_data_8188e   *pHalData = GET_HAL_DATA(Adapter);
@@ -1815,27 +573,14 @@ static void rtl8188e_SetHalODMVar(struct adapter *Adapter, enum hal_odm_variable
        }
 }
 
-void rtl8188e_clone_haldata(struct adapter *dst_adapter, struct adapter *src_adapter)
-{
-       memcpy(dst_adapter->HalData, src_adapter->HalData, dst_adapter->hal_data_sz);
-}
-
-void rtl8188e_start_thread(struct adapter *padapter)
-{
-}
-
-void rtl8188e_stop_thread(struct adapter *padapter)
-{
-}
-
 static void hal_notch_filter_8188e(struct adapter *adapter, bool enable)
 {
        if (enable) {
                DBG_88E("Enable notch filter\n");
-               rtw_write8(adapter, rOFDM0_RxDSP+1, rtw_read8(adapter, rOFDM0_RxDSP+1) | BIT1);
+               usb_write8(adapter, rOFDM0_RxDSP+1, usb_read8(adapter, rOFDM0_RxDSP+1) | BIT1);
        } else {
                DBG_88E("Disable notch filter\n");
-               rtw_write8(adapter, rOFDM0_RxDSP+1, rtw_read8(adapter, rOFDM0_RxDSP+1) & ~BIT1);
+               usb_write8(adapter, rOFDM0_RxDSP+1, usb_read8(adapter, rOFDM0_RxDSP+1) & ~BIT1);
        }
 }
 void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
@@ -1852,8 +597,6 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
        pHalFunc->hal_dm_watchdog = &rtl8188e_HalDmWatchDog;
 
        pHalFunc->Add_RateATid = &rtl8188e_Add_RateATid;
-       pHalFunc->run_thread = &rtl8188e_start_thread;
-       pHalFunc->cancel_thread = &rtl8188e_stop_thread;
 
        pHalFunc->AntDivBeforeLinkHandler = &AntDivBeforeLink8188E;
        pHalFunc->AntDivCompareHandler = &AntDivCompare8188E;
@@ -1862,23 +605,9 @@ void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc)
        pHalFunc->read_rfreg = &rtl8188e_PHY_QueryRFReg;
        pHalFunc->write_rfreg = &rtl8188e_PHY_SetRFReg;
 
-       /*  Efuse related function */
-       pHalFunc->EfusePowerSwitch = &rtl8188e_EfusePowerSwitch;
-       pHalFunc->ReadEFuse = &rtl8188e_ReadEFuse;
-       pHalFunc->EFUSEGetEfuseDefinition = &rtl8188e_EFUSE_GetEfuseDefinition;
-       pHalFunc->EfuseGetCurrentSize = &rtl8188e_EfuseGetCurrentSize;
-       pHalFunc->Efuse_PgPacketRead = &rtl8188e_Efuse_PgPacketRead;
-       pHalFunc->Efuse_PgPacketWrite = &rtl8188e_Efuse_PgPacketWrite;
-       pHalFunc->Efuse_WordEnableDataWrite = &rtl8188e_Efuse_WordEnableDataWrite;
-
        pHalFunc->sreset_init_value = &sreset_init_value;
-       pHalFunc->sreset_reset_value = &sreset_reset_value;
-       pHalFunc->silentreset = &rtl8188e_silentreset_for_specific_platform;
-       pHalFunc->sreset_xmit_status_check = &rtl8188e_sreset_xmit_status_check;
-       pHalFunc->sreset_linked_status_check  = &rtl8188e_sreset_linked_status_check;
        pHalFunc->sreset_get_wifi_status  = &sreset_get_wifi_status;
 
-       pHalFunc->GetHalODMVarHandler = &rtl8188e_GetHalODMVar;
        pHalFunc->SetHalODMVarHandler = &rtl8188e_SetHalODMVar;
 
        pHalFunc->IOL_exec_cmds_sync = &rtl8188e_IOL_exec_cmds_sync;
@@ -1891,7 +620,7 @@ u8 GetEEPROMSize8188E(struct adapter *padapter)
        u8 size = 0;
        u32     cr;
 
-       cr = rtw_read16(padapter, REG_9346CR);
+       cr = usb_read16(padapter, REG_9346CR);
        /*  6: EEPROM used is 93C46, 4: boot from E-Fuse. */
        size = (cr & BOOT_FROM_EEPROM) ? 6 : 4;
 
@@ -1912,11 +641,11 @@ static s32 _LLTWrite(struct adapter *padapter, u32 address, u32 data)
        u32     value = _LLT_INIT_ADDR(address) | _LLT_INIT_DATA(data) | _LLT_OP(_LLT_WRITE_ACCESS);
        u16     LLTReg = REG_LLT_INIT;
 
-       rtw_write32(padapter, LLTReg, value);
+       usb_write32(padapter, LLTReg, value);
 
        /* polling */
        do {
-               value = rtw_read32(padapter, LLTReg);
+               value = usb_read32(padapter, LLTReg);
                if (_LLT_NO_ACTIVE == _LLT_OP_VALUE(value))
                        break;
 
@@ -1977,13 +706,13 @@ Hal_InitPGData88E(struct adapter *padapter)
        if (!pEEPROM->bautoload_fail_flag) { /*  autoload OK. */
                if (!is_boot_from_eeprom(padapter)) {
                        /*  Read EFUSE real map to shadow. */
-                       EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false);
+                       EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI);
                }
        } else {/* autoload fail */
                RT_TRACE(_module_hci_hal_init_c_, _drv_notice_, ("AutoLoad Fail reported from CR9346!!\n"));
                /* update to default value 0xFF */
                if (!is_boot_from_eeprom(padapter))
-                       EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI, false);
+                       EFUSE_ShadowMapUpdate(padapter, EFUSE_WIFI);
        }
 }
 
@@ -2012,7 +741,7 @@ static void Hal_ReadPowerValueFromPROM_8188E(struct txpowerinfo24g *pwrInfo24G,
 {
        u32 rfPath, eeAddr = EEPROM_TX_PWR_INX_88E, group, TxCount = 0;
 
-       _rtw_memset(pwrInfo24G, 0, sizeof(struct txpowerinfo24g));
+       memset(pwrInfo24G, 0, sizeof(struct txpowerinfo24g));
 
        if (AutoLoadFail) {
                for (rfPath = 0; rfPath < MAX_RF_PATH; rfPath++) {
@@ -2350,10 +1079,6 @@ void Hal_ReadThermalMeter_88E(struct adapter *Adapter, u8 *PROMContent, bool Aut
        DBG_88E("ThermalMeter = 0x%x\n", pHalData->EEPROMThermalMeter);
 }
 
-void Hal_InitChannelPlan(struct adapter *padapter)
-{
-}
-
 bool HalDetectPwrDownMode88E(struct adapter *Adapter)
 {
        u8 tmpvalue = 0;
@@ -2388,5 +1113,5 @@ void SetBcnCtrlReg(struct adapter *padapter, u8 SetBits, u8 ClearBits)
        pHalData->RegBcnCtrlVal |= SetBits;
        pHalData->RegBcnCtrlVal &= ~ClearBits;
 
-       rtw_write8(padapter, REG_BCN_CTRL, (u8)pHalData->RegBcnCtrlVal);
+       usb_write8(padapter, REG_BCN_CTRL, (u8)pHalData->RegBcnCtrlVal);
 }
index a4d057cf7db27858ec2738b004f6f8cef303eb39..1e942501da20cf8af02b93606d256ccc5142207a 100644 (file)
@@ -201,23 +201,23 @@ void Hal_MPT_CCKTxPowerAdjustbyIndex(struct adapter *pAdapter, bool beven)
                        CCK_index = 32;
                /* Adjust CCK according to gain index */
                if (!pDM_Odm->RFCalibrateInfo.bCCKinCH14) {
-                       rtw_write8(pAdapter, 0xa22, CCKSwingTable_Ch1_Ch13[CCK_index][0]);
-                       rtw_write8(pAdapter, 0xa23, CCKSwingTable_Ch1_Ch13[CCK_index][1]);
-                       rtw_write8(pAdapter, 0xa24, CCKSwingTable_Ch1_Ch13[CCK_index][2]);
-                       rtw_write8(pAdapter, 0xa25, CCKSwingTable_Ch1_Ch13[CCK_index][3]);
-                       rtw_write8(pAdapter, 0xa26, CCKSwingTable_Ch1_Ch13[CCK_index][4]);
-                       rtw_write8(pAdapter, 0xa27, CCKSwingTable_Ch1_Ch13[CCK_index][5]);
-                       rtw_write8(pAdapter, 0xa28, CCKSwingTable_Ch1_Ch13[CCK_index][6]);
-                       rtw_write8(pAdapter, 0xa29, CCKSwingTable_Ch1_Ch13[CCK_index][7]);
+                       usb_write8(pAdapter, 0xa22, CCKSwingTable_Ch1_Ch13[CCK_index][0]);
+                       usb_write8(pAdapter, 0xa23, CCKSwingTable_Ch1_Ch13[CCK_index][1]);
+                       usb_write8(pAdapter, 0xa24, CCKSwingTable_Ch1_Ch13[CCK_index][2]);
+                       usb_write8(pAdapter, 0xa25, CCKSwingTable_Ch1_Ch13[CCK_index][3]);
+                       usb_write8(pAdapter, 0xa26, CCKSwingTable_Ch1_Ch13[CCK_index][4]);
+                       usb_write8(pAdapter, 0xa27, CCKSwingTable_Ch1_Ch13[CCK_index][5]);
+                       usb_write8(pAdapter, 0xa28, CCKSwingTable_Ch1_Ch13[CCK_index][6]);
+                       usb_write8(pAdapter, 0xa29, CCKSwingTable_Ch1_Ch13[CCK_index][7]);
                } else {
-                       rtw_write8(pAdapter, 0xa22, CCKSwingTable_Ch14[CCK_index][0]);
-                       rtw_write8(pAdapter, 0xa23, CCKSwingTable_Ch14[CCK_index][1]);
-                       rtw_write8(pAdapter, 0xa24, CCKSwingTable_Ch14[CCK_index][2]);
-                       rtw_write8(pAdapter, 0xa25, CCKSwingTable_Ch14[CCK_index][3]);
-                       rtw_write8(pAdapter, 0xa26, CCKSwingTable_Ch14[CCK_index][4]);
-                       rtw_write8(pAdapter, 0xa27, CCKSwingTable_Ch14[CCK_index][5]);
-                       rtw_write8(pAdapter, 0xa28, CCKSwingTable_Ch14[CCK_index][6]);
-                       rtw_write8(pAdapter, 0xa29, CCKSwingTable_Ch14[CCK_index][7]);
+                       usb_write8(pAdapter, 0xa22, CCKSwingTable_Ch14[CCK_index][0]);
+                       usb_write8(pAdapter, 0xa23, CCKSwingTable_Ch14[CCK_index][1]);
+                       usb_write8(pAdapter, 0xa24, CCKSwingTable_Ch14[CCK_index][2]);
+                       usb_write8(pAdapter, 0xa25, CCKSwingTable_Ch14[CCK_index][3]);
+                       usb_write8(pAdapter, 0xa26, CCKSwingTable_Ch14[CCK_index][4]);
+                       usb_write8(pAdapter, 0xa27, CCKSwingTable_Ch14[CCK_index][5]);
+                       usb_write8(pAdapter, 0xa28, CCKSwingTable_Ch14[CCK_index][6]);
+                       usb_write8(pAdapter, 0xa29, CCKSwingTable_Ch14[CCK_index][7]);
                }
        }
 }
index 941ff7467c3c4e812c7c66e1aa6274007788daaf..9f016a5401d891b975c494ec5d8615f619b1ef8e 100644 (file)
@@ -94,7 +94,7 @@ rtl8188e_PHY_QueryBBReg(
 {
        u32 ReturnValue = 0, OriginalValue, BitShift;
 
-       OriginalValue = rtw_read32(Adapter, RegAddr);
+       OriginalValue = usb_read32(Adapter, RegAddr);
        BitShift = phy_CalculateBitShift(BitMask);
        ReturnValue = (OriginalValue & BitMask) >> BitShift;
        return ReturnValue;
@@ -124,12 +124,12 @@ void rtl8188e_PHY_SetBBReg(struct adapter *Adapter, u32 RegAddr, u32 BitMask, u3
        u32 OriginalValue, BitShift;
 
        if (BitMask != bMaskDWord) { /* if not "double word" write */
-               OriginalValue = rtw_read32(Adapter, RegAddr);
+               OriginalValue = usb_read32(Adapter, RegAddr);
                BitShift = phy_CalculateBitShift(BitMask);
                Data = ((OriginalValue & (~BitMask)) | (Data << BitShift));
        }
 
-       rtw_write32(Adapter, RegAddr, Data);
+       usb_write32(Adapter, RegAddr, Data);
 }
 
 
@@ -386,7 +386,7 @@ s32 PHY_MACConfig8188E(struct adapter *Adapter)
                rtStatus = _FAIL;
 
        /*  2010.07.13 AMPDU aggregation number B */
-       rtw_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
+       usb_write16(Adapter, REG_MAX_AGGR_NUM, MAX_AGGR_NUM);
 
        return rtStatus;
 }
@@ -603,14 +603,14 @@ PHY_BBConfig8188E(
 
 
        /*  Enable BB and RF */
-       RegVal = rtw_read16(Adapter, REG_SYS_FUNC_EN);
-       rtw_write16(Adapter, REG_SYS_FUNC_EN, (u16)(RegVal|BIT13|BIT0|BIT1));
+       RegVal = usb_read16(Adapter, REG_SYS_FUNC_EN);
+       usb_write16(Adapter, REG_SYS_FUNC_EN, (u16)(RegVal|BIT13|BIT0|BIT1));
 
        /*  20090923 Joseph: Advised by Steven and Jenyu. Power sequence before init RF. */
 
-       rtw_write8(Adapter, REG_RF_CTRL, RF_EN|RF_RSTB|RF_SDMRSTB);
+       usb_write8(Adapter, REG_RF_CTRL, RF_EN|RF_RSTB|RF_SDMRSTB);
 
-       rtw_write8(Adapter, REG_SYS_FUNC_EN, FEN_USBA | FEN_USBD | FEN_BB_GLB_RSTn | FEN_BBRSTB);
+       usb_write8(Adapter, REG_SYS_FUNC_EN, FEN_USBA | FEN_USBD | FEN_BB_GLB_RSTn | FEN_BBRSTB);
 
        /*  Config BB and AGC */
        rtStatus = phy_BB8188E_Config_ParaFile(Adapter);
@@ -792,21 +792,21 @@ _PHY_SetBWMode92C(
        /* 3<1>Set MAC register */
        /* 3 */
 
-       regBwOpMode = rtw_read8(Adapter, REG_BWOPMODE);
-       regRRSR_RSC = rtw_read8(Adapter, REG_RRSR+2);
+       regBwOpMode = usb_read8(Adapter, REG_BWOPMODE);
+       regRRSR_RSC = usb_read8(Adapter, REG_RRSR+2);
 
        switch (pHalData->CurrentChannelBW) {
        case HT_CHANNEL_WIDTH_20:
                regBwOpMode |= BW_OPMODE_20MHZ;
                /*  2007/02/07 Mark by Emily because we have not verify whether this register works */
-               rtw_write8(Adapter, REG_BWOPMODE, regBwOpMode);
+               usb_write8(Adapter, REG_BWOPMODE, regBwOpMode);
                break;
        case HT_CHANNEL_WIDTH_40:
                regBwOpMode &= ~BW_OPMODE_20MHZ;
                /*  2007/02/07 Mark by Emily because we have not verify whether this register works */
-               rtw_write8(Adapter, REG_BWOPMODE, regBwOpMode);
+               usb_write8(Adapter, REG_BWOPMODE, regBwOpMode);
                regRRSR_RSC = (regRRSR_RSC&0x90) | (pHalData->nCur40MhzPrimeSC<<5);
-               rtw_write8(Adapter, REG_RRSR+2, regRRSR_RSC);
+               usb_write8(Adapter, REG_RRSR+2, regRRSR_RSC);
                break;
        default:
                break;
index 52103da3e264cfa98e5eb688cb89b5c4ac7cfb4a..8ce9d0e4eeff3841f4ba399eb9c27b065bf09f42 100644 (file)
@@ -366,7 +366,7 @@ static void writeOFDMPowerReg88E(struct adapter *Adapter, u8 index, u32 *pValue)
                                        writeVal = (writeVal > 8) ? (writeVal-8) : 0;
                                else
                                        writeVal = (writeVal > 6) ? (writeVal-6) : 0;
-                               rtw_write8(Adapter, (u32)(regoffset+i), (u8)writeVal);
+                               usb_write8(Adapter, (u32)(regoffset+i), (u8)writeVal);
                        }
                }
        }
index 43eb960e4e0bd65d3cc3ecd229e21a0cb18f7099..53cf3baf46e05b31af7960bd887a042be88d815c 100644 (file)
@@ -86,7 +86,7 @@ void update_recvframe_attrib_88e(struct recv_frame *precvframe,
        report.rxdw5 = prxstat->rxdw5;
 
        pattrib = &precvframe->attrib;
-       _rtw_memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
+       memset(pattrib, 0, sizeof(struct rx_pkt_attrib));
 
        pattrib->crc_err = (u8)((le32_to_cpu(report.rxdw0) >> 14) & 0x1);/* u8)prxreport->crc32; */
 
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_sreset.c b/drivers/staging/rtl8188eu/hal/rtl8188e_sreset.c
deleted file mode 100644 (file)
index 047b534..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#define _RTL8188E_SRESET_C_
-
-#include <rtl8188e_sreset.h>
-#include <rtl8188e_hal.h>
-
-void rtl8188e_silentreset_for_specific_platform(struct adapter *padapter)
-{
-}
-
-void rtl8188e_sreset_xmit_status_check(struct adapter *padapter)
-{
-       struct hal_data_8188e   *pHalData = GET_HAL_DATA(padapter);
-       struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
-       unsigned long current_time;
-       struct xmit_priv        *pxmitpriv = &padapter->xmitpriv;
-       unsigned int diff_time;
-       u32 txdma_status;
-
-       txdma_status = rtw_read32(padapter, REG_TXDMA_STATUS);
-       if (txdma_status != 0x00) {
-               DBG_88E("%s REG_TXDMA_STATUS:0x%08x\n", __func__, txdma_status);
-               rtw_write32(padapter, REG_TXDMA_STATUS, txdma_status);
-               rtl8188e_silentreset_for_specific_platform(padapter);
-       }
-       /* total xmit irp = 4 */
-       current_time = jiffies;
-       if (0 == pxmitpriv->free_xmitbuf_cnt) {
-               diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_time);
-
-               if (diff_time > 2000) {
-                       if (psrtpriv->last_tx_complete_time == 0) {
-                               psrtpriv->last_tx_complete_time = current_time;
-                       } else {
-                               diff_time = jiffies_to_msecs(current_time - psrtpriv->last_tx_complete_time);
-                               if (diff_time > 4000) {
-                                       DBG_88E("%s tx hang\n", __func__);
-                                       rtl8188e_silentreset_for_specific_platform(padapter);
-                               }
-                       }
-               }
-       }
-}
-
-void rtl8188e_sreset_linked_status_check(struct adapter *padapter)
-{
-       u32 rx_dma_status = 0;
-       u8 fw_status = 0;
-       rx_dma_status = rtw_read32(padapter, REG_RXDMA_STATUS);
-       if (rx_dma_status != 0x00) {
-               DBG_88E("%s REG_RXDMA_STATUS:0x%08x\n", __func__, rx_dma_status);
-               rtw_write32(padapter, REG_RXDMA_STATUS, rx_dma_status);
-       }
-       fw_status = rtw_read8(padapter, REG_FMETHR);
-       if (fw_status != 0x00) {
-               if (fw_status == 1)
-                       DBG_88E("%s REG_FW_STATUS (0x%02x), Read_Efuse_Fail !!\n", __func__, fw_status);
-               else if (fw_status == 2)
-                       DBG_88E("%s REG_FW_STATUS (0x%02x), Condition_No_Match !!\n", __func__, fw_status);
-       }
-}
index 77dce584f0db29bf154ff54cbc2b9a6b0c8ba4bb..81d691ddd6c68608a2eb4c07b209a69cbd291a58 100644 (file)
@@ -22,6 +22,7 @@
 #include <drv_types.h>
 #include <rtl8188e_hal.h>
 #include <rtl8188e_led.h>
+#include <usb_ops_linux.h>
 
 /*  LED object. */
 
@@ -34,8 +35,8 @@ void SwLedOn(struct adapter *padapter, struct LED_871x *pLed)
 
        if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
                return;
-       LedCfg = rtw_read8(padapter, REG_LEDCFG2);
-       rtw_write8(padapter, REG_LEDCFG2, (LedCfg&0xf0)|BIT5|BIT6); /*  SW control led0 on. */
+       LedCfg = usb_read8(padapter, REG_LEDCFG2);
+       usb_write8(padapter, REG_LEDCFG2, (LedCfg&0xf0)|BIT5|BIT6); /*  SW control led0 on. */
        pLed->bLedOn = true;
 }
 
@@ -49,17 +50,17 @@ void SwLedOff(struct adapter *padapter, struct LED_871x *pLed)
        if (padapter->bSurpriseRemoved || padapter->bDriverStopped)
                goto exit;
 
-       LedCfg = rtw_read8(padapter, REG_LEDCFG2);/* 0x4E */
+       LedCfg = usb_read8(padapter, REG_LEDCFG2);/* 0x4E */
 
        if (pHalData->bLedOpenDrain) {
                        /*  Open-drain arrangement for controlling the LED) */
                LedCfg &= 0x90; /*  Set to software control. */
-               rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3));
-               LedCfg = rtw_read8(padapter, REG_MAC_PINMUX_CFG);
+               usb_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3));
+               LedCfg = usb_read8(padapter, REG_MAC_PINMUX_CFG);
                LedCfg &= 0xFE;
-               rtw_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
+               usb_write8(padapter, REG_MAC_PINMUX_CFG, LedCfg);
        } else {
-               rtw_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3|BIT5|BIT6));
+               usb_write8(padapter, REG_LEDCFG2, (LedCfg|BIT3|BIT5|BIT6));
        }
 exit:
        pLed->bLedOn = false;
index 0f6222dab4a67bd11a48bba80947b345969a776e..f25c87c6325096dc7154791b583a5f860a127bf3 100644 (file)
@@ -23,7 +23,7 @@
 #include <recv_osdep.h>
 #include <mlme_osdep.h>
 
-#include <usb_ops.h>
+#include <usb_ops_linux.h>
 #include <wifi.h>
 
 #include <rtl8188e_hal.h>
@@ -41,13 +41,13 @@ int rtl8188eu_init_recv_priv(struct adapter *padapter)
        /* init recv_buf */
        _rtw_init_queue(&precvpriv->free_recv_buf_queue);
 
-       precvpriv->pallocated_recv_buf = rtw_zmalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4);
+       precvpriv->pallocated_recv_buf = kzalloc(NR_RECVBUFF * sizeof(struct recv_buf) + 4, GFP_KERNEL);
        if (precvpriv->pallocated_recv_buf == NULL) {
                res = _FAIL;
                RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("alloc recv_buf fail!\n"));
                goto exit;
        }
-       _rtw_memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF * sizeof(struct recv_buf) + 4);
+       memset(precvpriv->pallocated_recv_buf, 0, NR_RECVBUFF * sizeof(struct recv_buf) + 4);
 
        precvpriv->precv_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(precvpriv->pallocated_recv_buf), 4);
 
index 3476f88983302add9de5f150119528e5162ee310..7004e0b745b871cda5fd79d3b51d6689104ff080 100644 (file)
@@ -22,7 +22,7 @@
 #include <drv_types.h>
 #include <wifi.h>
 #include <osdep_intf.h>
-#include <usb_ops.h>
+#include <usb_ops_linux.h>
 #include <rtl8188e_hal.h>
 
 s32    rtl8188eu_init_xmit_priv(struct adapter *adapt)
@@ -35,10 +35,6 @@ s32  rtl8188eu_init_xmit_priv(struct adapter *adapt)
        return _SUCCESS;
 }
 
-void   rtl8188eu_free_xmit_priv(struct adapter *adapt)
-{
-}
-
 static u8 urb_zero_packet_chk(struct adapter *adapt, int sz)
 {
        u8 set_tx_desc_offset;
@@ -72,7 +68,7 @@ void rtl8188e_fill_fake_txdesc(struct adapter *adapt, u8 *desc, u32 BufferLen, u
 
        /*  Clear all status */
        ptxdesc = (struct tx_desc *)desc;
-       _rtw_memset(desc, 0, TXDESC_SIZE);
+       memset(desc, 0, TXDESC_SIZE);
 
        /* offset 0 */
        ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG); /* own, bFirstSeg, bLastSeg; */
@@ -196,7 +192,7 @@ static s32 update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem, s32 sz, u8 bag
                }
        }
 
-       _rtw_memset(ptxdesc, 0, sizeof(struct tx_desc));
+       memset(ptxdesc, 0, sizeof(struct tx_desc));
 
        /* 4 offset 0 */
        ptxdesc->txdw0 |= cpu_to_le32(OWN | FSG | LSG);
@@ -397,7 +393,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
                }
                ff_hwaddr = rtw_get_ff_hwaddr(pxmitframe);
 
-               inner_ret = rtw_write_port(adapt, ff_hwaddr, w_sz, (unsigned char *)pxmitbuf);
+               inner_ret = usb_write_port(adapt, ff_hwaddr, w_sz, (unsigned char *)pxmitbuf);
 
                rtw_count_tx_stats(adapt, pxmitframe, sz);
 
@@ -405,7 +401,7 @@ static s32 rtw_dump_xframe(struct adapter *adapt, struct xmit_frame *pxmitframe)
 
                mem_addr += w_sz;
 
-               mem_addr = (u8 *)RND4(((size_t)(mem_addr)));
+               mem_addr = (u8 *) round_up((size_t)mem_addr, 4);
        }
 
        rtw_free_xmitframe(pxmitpriv, pxmitframe);
@@ -497,7 +493,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
        pfirstframe = pxmitframe;
        len = xmitframe_need_length(pfirstframe) + TXDESC_SIZE + (pfirstframe->pkt_offset*PACKET_OFFSET_SZ);
        pbuf_tail = len;
-       pbuf = _RND8(pbuf_tail);
+       pbuf = round_up(pbuf_tail, 8);
 
        /*  check pkt amount in one bulk */
        desc_cnt = 0;
@@ -539,7 +535,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
        xmitframe_phead = get_list_head(&ptxservq->sta_pending);
        xmitframe_plist = xmitframe_phead->next;
 
-       while (!rtw_end_of_queue_search(xmitframe_phead, xmitframe_plist)) {
+       while (xmitframe_phead != xmitframe_plist) {
                pxmitframe = container_of(xmitframe_plist, struct xmit_frame, list);
                xmitframe_plist = xmitframe_plist->next;
 
@@ -548,12 +544,12 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
 
                len = xmitframe_need_length(pxmitframe) + TXDESC_SIZE + (pxmitframe->pkt_offset*PACKET_OFFSET_SZ);
 
-               if (_RND8(pbuf + len) > MAX_XMITBUF_SZ) {
+               if (round_up(pbuf + len, 8) > MAX_XMITBUF_SZ) {
                        pxmitframe->agg_num = 1;
                        pxmitframe->pkt_offset = 1;
                        break;
                }
-               rtw_list_delete(&pxmitframe->list);
+               list_del_init(&pxmitframe->list);
                ptxservq->qcnt--;
                phwxmit->accnt--;
 
@@ -571,7 +567,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
 
                /*  handle pointer and stop condition */
                pbuf_tail = pbuf + len;
-               pbuf = _RND8(pbuf_tail);
+               pbuf = round_up(pbuf_tail, 8);
 
                pfirstframe->agg_num++;
                if (MAX_TX_AGG_PACKET_NUMBER == pfirstframe->agg_num)
@@ -587,8 +583,8 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
                }
        } /* end while (aggregate same priority and same DA(AP or STA) frames) */
 
-       if (_rtw_queue_empty(&ptxservq->sta_pending) == true)
-               rtw_list_delete(&ptxservq->tx_pending);
+       if (list_empty(&ptxservq->sta_pending.queue))
+               list_del_init(&ptxservq->tx_pending);
 
        spin_unlock_bh(&pxmitpriv->lock);
        if ((pfirstframe->attrib.ether_type != 0x0806) &&
@@ -608,7 +604,7 @@ s32 rtl8188eu_xmitframe_complete(struct adapter *adapt, struct xmit_priv *pxmitp
 
        /* 3 4. write xmit buffer to USB FIFO */
        ff_hwaddr = rtw_get_ff_hwaddr(pfirstframe);
-       rtw_write_port(adapt, ff_hwaddr, pbuf_tail, (u8 *)pxmitbuf);
+       usb_write_port(adapt, ff_hwaddr, pbuf_tail, (u8 *)pxmitbuf);
 
        /* 3 5. update statisitc */
        pbuf_tail -= (pfirstframe->agg_num * TXDESC_SIZE);
index 141f85ae5618b2fd6ff8c5cf4aa7a2e313938aa5..19cf5f551c40209e48c42f8c398ef44686964025 100644 (file)
@@ -26,7 +26,6 @@
 #include <rtl8188e_hal.h>
 #include <rtl8188e_led.h>
 #include <rtw_iol.h>
-#include <usb_ops.h>
 #include <usb_hal.h>
 #include <usb_osintf.h>
 
@@ -117,15 +116,15 @@ static u32 rtl8188eu_InitPowerOn(struct adapter *adapt)
 
        /*  Enable MAC DMA/WMAC/SCHEDULE/SEC block */
        /*  Set CR bit10 to enable 32k calibration. Suggested by SD1 Gimmy. Added by tynli. 2011.08.31. */
-       rtw_write16(adapt, REG_CR, 0x00);  /* suggseted by zhouzhou, by page, 20111230 */
+       usb_write16(adapt, REG_CR, 0x00);  /* suggseted by zhouzhou, by page, 20111230 */
 
                /*  Enable MAC DMA/WMAC/SCHEDULE/SEC block */
-       value16 = rtw_read16(adapt, REG_CR);
+       value16 = usb_read16(adapt, REG_CR);
        value16 |= (HCI_TXDMA_EN | HCI_RXDMA_EN | TXDMA_EN | RXDMA_EN
                                | PROTOCOL_EN | SCHEDULE_EN | ENSEC | CALTMR_EN);
        /*  for SDIO - Set CR bit10 to enable 32k calibration. Suggested by SD1 Gimmy. Added by tynli. 2011.08.31. */
 
-       rtw_write16(adapt, REG_CR, value16);
+       usb_write16(adapt, REG_CR, value16);
        haldata->bMacPwrCtrlOn = true;
 
        return _SUCCESS;
@@ -139,27 +138,27 @@ static void _InitInterrupt(struct adapter *Adapter)
        struct hal_data_8188e   *haldata = GET_HAL_DATA(Adapter);
 
        /* HISR write one to clear */
-       rtw_write32(Adapter, REG_HISR_88E, 0xFFFFFFFF);
+       usb_write32(Adapter, REG_HISR_88E, 0xFFFFFFFF);
        /*  HIMR - */
        imr = IMR_PSTIMEOUT_88E | IMR_TBDER_88E | IMR_CPWM_88E | IMR_CPWM2_88E;
-       rtw_write32(Adapter, REG_HIMR_88E, imr);
+       usb_write32(Adapter, REG_HIMR_88E, imr);
        haldata->IntrMask[0] = imr;
 
        imr_ex = IMR_TXERR_88E | IMR_RXERR_88E | IMR_TXFOVW_88E | IMR_RXFOVW_88E;
-       rtw_write32(Adapter, REG_HIMRE_88E, imr_ex);
+       usb_write32(Adapter, REG_HIMRE_88E, imr_ex);
        haldata->IntrMask[1] = imr_ex;
 
        /*  REG_USB_SPECIAL_OPTION - BIT(4) */
        /*  0; Use interrupt endpoint to upload interrupt pkt */
        /*  1; Use bulk endpoint to upload interrupt pkt, */
-       usb_opt = rtw_read8(Adapter, REG_USB_SPECIAL_OPTION);
+       usb_opt = usb_read8(Adapter, REG_USB_SPECIAL_OPTION);
 
        if (!adapter_to_dvobj(Adapter)->ishighspeed)
                usb_opt = usb_opt & (~INT_BULK_SEL);
        else
                usb_opt = usb_opt | (INT_BULK_SEL);
 
-       rtw_write8(Adapter, REG_USB_SPECIAL_OPTION, usb_opt);
+       usb_write8(Adapter, REG_USB_SPECIAL_OPTION, usb_opt);
 }
 
 static void _InitQueueReservedPage(struct adapter *Adapter)
@@ -185,27 +184,27 @@ static void _InitQueueReservedPage(struct adapter *Adapter)
                if (haldata->OutEpQueueSel & TX_SELE_NQ)
                        numNQ = 0x1C;
                value8 = (u8)_NPQ(numNQ);
-               rtw_write8(Adapter, REG_RQPN_NPQ, value8);
+               usb_write8(Adapter, REG_RQPN_NPQ, value8);
 
                numPubQ = 0xA8 - numHQ - numLQ - numNQ;
 
                /*  TX DMA */
                value32 = _HPQ(numHQ) | _LPQ(numLQ) | _PUBQ(numPubQ) | LD_RQPN;
-               rtw_write32(Adapter, REG_RQPN, value32);
+               usb_write32(Adapter, REG_RQPN, value32);
        } else {
-               rtw_write16(Adapter, REG_RQPN_NPQ, 0x0000);/* Just follow MP Team,??? Georgia 03/28 */
-               rtw_write16(Adapter, REG_RQPN_NPQ, 0x0d);
-               rtw_write32(Adapter, REG_RQPN, 0x808E000d);/* reserve 7 page for LPS */
+               usb_write16(Adapter, REG_RQPN_NPQ, 0x0000);/* Just follow MP Team,??? Georgia 03/28 */
+               usb_write16(Adapter, REG_RQPN_NPQ, 0x0d);
+               usb_write32(Adapter, REG_RQPN, 0x808E000d);/* reserve 7 page for LPS */
        }
 }
 
 static void _InitTxBufferBoundary(struct adapter *Adapter, u8 txpktbuf_bndy)
 {
-       rtw_write8(Adapter, REG_TXPKTBUF_BCNQ_BDNY, txpktbuf_bndy);
-       rtw_write8(Adapter, REG_TXPKTBUF_MGQ_BDNY, txpktbuf_bndy);
-       rtw_write8(Adapter, REG_TXPKTBUF_WMAC_LBK_BF_HD, txpktbuf_bndy);
-       rtw_write8(Adapter, REG_TRXFF_BNDY, txpktbuf_bndy);
-       rtw_write8(Adapter, REG_TDECTRL+1, txpktbuf_bndy);
+       usb_write8(Adapter, REG_TXPKTBUF_BCNQ_BDNY, txpktbuf_bndy);
+       usb_write8(Adapter, REG_TXPKTBUF_MGQ_BDNY, txpktbuf_bndy);
+       usb_write8(Adapter, REG_TXPKTBUF_WMAC_LBK_BF_HD, txpktbuf_bndy);
+       usb_write8(Adapter, REG_TRXFF_BNDY, txpktbuf_bndy);
+       usb_write8(Adapter, REG_TDECTRL+1, txpktbuf_bndy);
 }
 
 static void _InitPageBoundary(struct adapter *Adapter)
@@ -214,20 +213,20 @@ static void _InitPageBoundary(struct adapter *Adapter)
        /*  */
        u16 rxff_bndy = MAX_RX_DMA_BUFFER_SIZE_88E-1;
 
-       rtw_write16(Adapter, (REG_TRXFF_BNDY + 2), rxff_bndy);
+       usb_write16(Adapter, (REG_TRXFF_BNDY + 2), rxff_bndy);
 }
 
 static void _InitNormalChipRegPriority(struct adapter *Adapter, u16 beQ,
                                       u16 bkQ, u16 viQ, u16 voQ, u16 mgtQ,
                                       u16 hiQ)
 {
-       u16 value16     = (rtw_read16(Adapter, REG_TRXDMA_CTRL) & 0x7);
+       u16 value16     = (usb_read16(Adapter, REG_TRXDMA_CTRL) & 0x7);
 
        value16 |= _TXDMA_BEQ_MAP(beQ)  | _TXDMA_BKQ_MAP(bkQ) |
                   _TXDMA_VIQ_MAP(viQ)  | _TXDMA_VOQ_MAP(voQ) |
                   _TXDMA_MGQ_MAP(mgtQ) | _TXDMA_HIQ_MAP(hiQ);
 
-       rtw_write16(Adapter, REG_TRXDMA_CTRL, value16);
+       usb_write16(Adapter, REG_TRXDMA_CTRL, value16);
 }
 
 static void _InitNormalChipOneOutEpPriority(struct adapter *Adapter)
@@ -341,11 +340,11 @@ static void _InitNetworkType(struct adapter *Adapter)
 {
        u32 value32;
 
-       value32 = rtw_read32(Adapter, REG_CR);
+       value32 = usb_read32(Adapter, REG_CR);
        /*  TODO: use the other function to set network type */
        value32 = (value32 & ~MASK_NETTYPE) | _NETTYPE(NT_LINK_AP);
 
-       rtw_write32(Adapter, REG_CR, value32);
+       usb_write32(Adapter, REG_CR, value32);
 }
 
 static void _InitTransferPageSize(struct adapter *Adapter)
@@ -354,12 +353,12 @@ static void _InitTransferPageSize(struct adapter *Adapter)
 
        u8 value8;
        value8 = _PSRX(PBP_128) | _PSTX(PBP_128);
-       rtw_write8(Adapter, REG_PBP, value8);
+       usb_write8(Adapter, REG_PBP, value8);
 }
 
 static void _InitDriverInfoSize(struct adapter *Adapter, u8 drvInfoSize)
 {
-       rtw_write8(Adapter, REG_RX_DRVINFO_SZ, drvInfoSize);
+       usb_write8(Adapter, REG_RX_DRVINFO_SZ, drvInfoSize);
 }
 
 static void _InitWMACSetting(struct adapter *Adapter)
@@ -372,11 +371,11 @@ static void _InitWMACSetting(struct adapter *Adapter)
                                  RCR_APP_MIC | RCR_APP_PHYSTS;
 
        /*  some REG_RCR will be modified later by phy_ConfigMACWithHeaderFile() */
-       rtw_write32(Adapter, REG_RCR, haldata->ReceiveConfig);
+       usb_write32(Adapter, REG_RCR, haldata->ReceiveConfig);
 
        /*  Accept all multicast address */
-       rtw_write32(Adapter, REG_MAR, 0xFFFFFFFF);
-       rtw_write32(Adapter, REG_MAR + 4, 0xFFFFFFFF);
+       usb_write32(Adapter, REG_MAR, 0xFFFFFFFF);
+       usb_write32(Adapter, REG_MAR + 4, 0xFFFFFFFF);
 }
 
 static void _InitAdaptiveCtrl(struct adapter *Adapter)
@@ -385,64 +384,64 @@ static void _InitAdaptiveCtrl(struct adapter *Adapter)
        u32 value32;
 
        /*  Response Rate Set */
-       value32 = rtw_read32(Adapter, REG_RRSR);
+       value32 = usb_read32(Adapter, REG_RRSR);
        value32 &= ~RATE_BITMAP_ALL;
        value32 |= RATE_RRSR_CCK_ONLY_1M;
-       rtw_write32(Adapter, REG_RRSR, value32);
+       usb_write32(Adapter, REG_RRSR, value32);
 
        /*  CF-END Threshold */
 
        /*  SIFS (used in NAV) */
        value16 = _SPEC_SIFS_CCK(0x10) | _SPEC_SIFS_OFDM(0x10);
-       rtw_write16(Adapter, REG_SPEC_SIFS, value16);
+       usb_write16(Adapter, REG_SPEC_SIFS, value16);
 
        /*  Retry Limit */
        value16 = _LRL(0x30) | _SRL(0x30);
-       rtw_write16(Adapter, REG_RL, value16);
+       usb_write16(Adapter, REG_RL, value16);
 }
 
 static void _InitEDCA(struct adapter *Adapter)
 {
        /*  Set Spec SIFS (used in NAV) */
-       rtw_write16(Adapter, REG_SPEC_SIFS, 0x100a);
-       rtw_write16(Adapter, REG_MAC_SPEC_SIFS, 0x100a);
+       usb_write16(Adapter, REG_SPEC_SIFS, 0x100a);
+       usb_write16(Adapter, REG_MAC_SPEC_SIFS, 0x100a);
 
        /*  Set SIFS for CCK */
-       rtw_write16(Adapter, REG_SIFS_CTX, 0x100a);
+       usb_write16(Adapter, REG_SIFS_CTX, 0x100a);
 
        /*  Set SIFS for OFDM */
-       rtw_write16(Adapter, REG_SIFS_TRX, 0x100a);
+       usb_write16(Adapter, REG_SIFS_TRX, 0x100a);
 
        /*  TXOP */
-       rtw_write32(Adapter, REG_EDCA_BE_PARAM, 0x005EA42B);
-       rtw_write32(Adapter, REG_EDCA_BK_PARAM, 0x0000A44F);
-       rtw_write32(Adapter, REG_EDCA_VI_PARAM, 0x005EA324);
-       rtw_write32(Adapter, REG_EDCA_VO_PARAM, 0x002FA226);
+       usb_write32(Adapter, REG_EDCA_BE_PARAM, 0x005EA42B);
+       usb_write32(Adapter, REG_EDCA_BK_PARAM, 0x0000A44F);
+       usb_write32(Adapter, REG_EDCA_VI_PARAM, 0x005EA324);
+       usb_write32(Adapter, REG_EDCA_VO_PARAM, 0x002FA226);
 }
 
 static void _InitRDGSetting(struct adapter *Adapter)
 {
-       rtw_write8(Adapter, REG_RD_CTRL, 0xFF);
-       rtw_write16(Adapter, REG_RD_NAV_NXT, 0x200);
-       rtw_write8(Adapter, REG_RD_RESP_PKT_TH, 0x05);
+       usb_write8(Adapter, REG_RD_CTRL, 0xFF);
+       usb_write16(Adapter, REG_RD_NAV_NXT, 0x200);
+       usb_write8(Adapter, REG_RD_RESP_PKT_TH, 0x05);
 }
 
 static void _InitRxSetting(struct adapter *Adapter)
 {
-       rtw_write32(Adapter, REG_MACID, 0x87654321);
-       rtw_write32(Adapter, 0x0700, 0x87654321);
+       usb_write32(Adapter, REG_MACID, 0x87654321);
+       usb_write32(Adapter, 0x0700, 0x87654321);
 }
 
 static void _InitRetryFunction(struct adapter *Adapter)
 {
        u8 value8;
 
-       value8 = rtw_read8(Adapter, REG_FWHW_TXQ_CTRL);
+       value8 = usb_read8(Adapter, REG_FWHW_TXQ_CTRL);
        value8 |= EN_AMPDU_RTY_NEW;
-       rtw_write8(Adapter, REG_FWHW_TXQ_CTRL, value8);
+       usb_write8(Adapter, REG_FWHW_TXQ_CTRL, value8);
 
        /*  Set ACK timeout */
-       rtw_write8(Adapter, REG_ACKTO, 0x40);
+       usb_write8(Adapter, REG_ACKTO, 0x40);
 }
 
 /*-----------------------------------------------------------------------------
@@ -469,11 +468,11 @@ static void usb_AggSettingTxUpdate(struct adapter *Adapter)
                haldata->UsbTxAggMode = false;
 
        if (haldata->UsbTxAggMode) {
-               value32 = rtw_read32(Adapter, REG_TDECTRL);
+               value32 = usb_read32(Adapter, REG_TDECTRL);
                value32 = value32 & ~(BLK_DESC_NUM_MASK << BLK_DESC_NUM_SHIFT);
                value32 |= ((haldata->UsbTxAggDescNum & BLK_DESC_NUM_MASK) << BLK_DESC_NUM_SHIFT);
 
-               rtw_write32(Adapter, REG_TDECTRL, value32);
+               usb_write32(Adapter, REG_TDECTRL, value32);
        }
 }      /*  usb_AggSettingTxUpdate */
 
@@ -501,8 +500,8 @@ usb_AggSettingRxUpdate(
        u8 valueDMA;
        u8 valueUSB;
 
-       valueDMA = rtw_read8(Adapter, REG_TRXDMA_CTRL);
-       valueUSB = rtw_read8(Adapter, REG_USB_SPECIAL_OPTION);
+       valueDMA = usb_read8(Adapter, REG_TRXDMA_CTRL);
+       valueUSB = usb_read8(Adapter, REG_USB_SPECIAL_OPTION);
 
        switch (haldata->UsbRxAggMode) {
        case USB_RX_AGG_DMA:
@@ -524,23 +523,23 @@ usb_AggSettingRxUpdate(
                break;
        }
 
-       rtw_write8(Adapter, REG_TRXDMA_CTRL, valueDMA);
-       rtw_write8(Adapter, REG_USB_SPECIAL_OPTION, valueUSB);
+       usb_write8(Adapter, REG_TRXDMA_CTRL, valueDMA);
+       usb_write8(Adapter, REG_USB_SPECIAL_OPTION, valueUSB);
 
        switch (haldata->UsbRxAggMode) {
        case USB_RX_AGG_DMA:
-               rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount);
-               rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH+1, haldata->UsbRxAggPageTimeout);
+               usb_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount);
+               usb_write8(Adapter, REG_RXDMA_AGG_PG_TH+1, haldata->UsbRxAggPageTimeout);
                break;
        case USB_RX_AGG_USB:
-               rtw_write8(Adapter, REG_USB_AGG_TH, haldata->UsbRxAggBlockCount);
-               rtw_write8(Adapter, REG_USB_AGG_TO, haldata->UsbRxAggBlockTimeout);
+               usb_write8(Adapter, REG_USB_AGG_TH, haldata->UsbRxAggBlockCount);
+               usb_write8(Adapter, REG_USB_AGG_TO, haldata->UsbRxAggBlockTimeout);
                break;
        case USB_RX_AGG_MIX:
-               rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount);
-               rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH+1, (haldata->UsbRxAggPageTimeout & 0x1F));/* 0x280[12:8] */
-               rtw_write8(Adapter, REG_USB_AGG_TH, haldata->UsbRxAggBlockCount);
-               rtw_write8(Adapter, REG_USB_AGG_TO, haldata->UsbRxAggBlockTimeout);
+               usb_write8(Adapter, REG_RXDMA_AGG_PG_TH, haldata->UsbRxAggPageCount);
+               usb_write8(Adapter, REG_RXDMA_AGG_PG_TH+1, (haldata->UsbRxAggPageTimeout & 0x1F));/* 0x280[12:8] */
+               usb_write8(Adapter, REG_USB_AGG_TH, haldata->UsbRxAggBlockCount);
+               usb_write8(Adapter, REG_USB_AGG_TO, haldata->UsbRxAggBlockTimeout);
                break;
        case USB_RX_AGG_DISABLE:
        default:
@@ -587,30 +586,30 @@ static void _InitBeaconParameters(struct adapter *Adapter)
 {
        struct hal_data_8188e   *haldata = GET_HAL_DATA(Adapter);
 
-       rtw_write16(Adapter, REG_BCN_CTRL, 0x1010);
+       usb_write16(Adapter, REG_BCN_CTRL, 0x1010);
 
        /*  TODO: Remove these magic number */
-       rtw_write16(Adapter, REG_TBTT_PROHIBIT, 0x6404);/*  ms */
-       rtw_write8(Adapter, REG_DRVERLYINT, DRIVER_EARLY_INT_TIME);/*  5ms */
-       rtw_write8(Adapter, REG_BCNDMATIM, BCN_DMA_ATIME_INT_TIME); /*  2ms */
+       usb_write16(Adapter, REG_TBTT_PROHIBIT, 0x6404);/*  ms */
+       usb_write8(Adapter, REG_DRVERLYINT, DRIVER_EARLY_INT_TIME);/*  5ms */
+       usb_write8(Adapter, REG_BCNDMATIM, BCN_DMA_ATIME_INT_TIME); /*  2ms */
 
        /*  Suggested by designer timchen. Change beacon AIFS to the largest number */
        /*  beacause test chip does not contension before sending beacon. by tynli. 2009.11.03 */
-       rtw_write16(Adapter, REG_BCNTCFG, 0x660F);
+       usb_write16(Adapter, REG_BCNTCFG, 0x660F);
 
-       haldata->RegBcnCtrlVal = rtw_read8(Adapter, REG_BCN_CTRL);
-       haldata->RegTxPause = rtw_read8(Adapter, REG_TXPAUSE);
-       haldata->RegFwHwTxQCtrl = rtw_read8(Adapter, REG_FWHW_TXQ_CTRL+2);
-       haldata->RegReg542 = rtw_read8(Adapter, REG_TBTT_PROHIBIT+2);
-       haldata->RegCR_1 = rtw_read8(Adapter, REG_CR+1);
+       haldata->RegBcnCtrlVal = usb_read8(Adapter, REG_BCN_CTRL);
+       haldata->RegTxPause = usb_read8(Adapter, REG_TXPAUSE);
+       haldata->RegFwHwTxQCtrl = usb_read8(Adapter, REG_FWHW_TXQ_CTRL+2);
+       haldata->RegReg542 = usb_read8(Adapter, REG_TBTT_PROHIBIT+2);
+       haldata->RegCR_1 = usb_read8(Adapter, REG_CR+1);
 }
 
 static void _BeaconFunctionEnable(struct adapter *Adapter,
                                  bool Enable, bool Linked)
 {
-       rtw_write8(Adapter, REG_BCN_CTRL, (BIT4 | BIT3 | BIT1));
+       usb_write8(Adapter, REG_BCN_CTRL, (BIT4 | BIT3 | BIT1));
 
-       rtw_write8(Adapter, REG_RD_CTRL+1, 0x6F);
+       usb_write8(Adapter, REG_RD_CTRL+1, 0x6F);
 }
 
 /*  Set CCK and OFDM Block "ON" */
@@ -633,7 +632,7 @@ static void _InitAntenna_Selection(struct adapter *Adapter)
                return;
        DBG_88E("==>  %s ....\n", __func__);
 
-       rtw_write32(Adapter, REG_LEDCFG0, rtw_read32(Adapter, REG_LEDCFG0)|BIT23);
+       usb_write32(Adapter, REG_LEDCFG0, usb_read32(Adapter, REG_LEDCFG0)|BIT23);
        PHY_SetBBReg(Adapter, rFPGA0_XAB_RFParameter, BIT13, 0x01);
 
        if (PHY_QueryBBReg(Adapter, rFPGA0_XA_RFInterfaceOE, 0x300) == Antenna_A)
@@ -664,12 +663,12 @@ enum rt_rf_power_state RfOnOffDetect(struct adapter *adapt)
        enum rt_rf_power_state rfpowerstate = rf_off;
 
        if (adapt->pwrctrlpriv.bHWPowerdown) {
-               val8 = rtw_read8(adapt, REG_HSISR);
+               val8 = usb_read8(adapt, REG_HSISR);
                DBG_88E("pwrdown, 0x5c(BIT7)=%02x\n", val8);
                rfpowerstate = (val8 & BIT7) ? rf_off : rf_on;
        } else { /*  rf on/off */
-               rtw_write8(adapt, REG_MAC_PINMUX_CFG, rtw_read8(adapt, REG_MAC_PINMUX_CFG)&~(BIT3));
-               val8 = rtw_read8(adapt, REG_GPIO_IO_SEL);
+               usb_write8(adapt, REG_MAC_PINMUX_CFG, usb_read8(adapt, REG_MAC_PINMUX_CFG)&~(BIT3));
+               val8 = usb_read8(adapt, REG_GPIO_IO_SEL);
                DBG_88E("GPIO_IN=%02x\n", val8);
                rfpowerstate = (val8 & BIT3) ? rf_on : rf_off;
        }
@@ -823,26 +822,26 @@ static u32 rtl8188eu_hal_init(struct adapter *Adapter)
        /*  Init CR MACTXEN, MACRXEN after setting RxFF boundary REG_TRXFF_BNDY to patch */
        /*  Hw bug which Hw initials RxFF boundary size to a value which is larger than the real Rx buffer size in 88E. */
        /*  Enable MACTXEN/MACRXEN block */
-       value16 = rtw_read16(Adapter, REG_CR);
+       value16 = usb_read16(Adapter, REG_CR);
        value16 |= (MACTXEN | MACRXEN);
-       rtw_write8(Adapter, REG_CR, value16);
+       usb_write8(Adapter, REG_CR, value16);
 
        if (haldata->bRDGEnable)
                _InitRDGSetting(Adapter);
 
        /* Enable TX Report */
        /* Enable Tx Report Timer */
-       value8 = rtw_read8(Adapter, REG_TX_RPT_CTRL);
-       rtw_write8(Adapter,  REG_TX_RPT_CTRL, (value8|BIT1|BIT0));
+       value8 = usb_read8(Adapter, REG_TX_RPT_CTRL);
+       usb_write8(Adapter,  REG_TX_RPT_CTRL, (value8|BIT1|BIT0));
        /* Set MAX RPT MACID */
-       rtw_write8(Adapter,  REG_TX_RPT_CTRL+1, 2);/* FOR sta mode ,0: bc/mc ,1:AP */
+       usb_write8(Adapter,  REG_TX_RPT_CTRL+1, 2);/* FOR sta mode ,0: bc/mc ,1:AP */
        /* Tx RPT Timer. Unit: 32us */
-       rtw_write16(Adapter, REG_TX_RPT_TIME, 0xCdf0);
+       usb_write16(Adapter, REG_TX_RPT_TIME, 0xCdf0);
 
-       rtw_write8(Adapter, REG_EARLY_MODE_CONTROL, 0);
+       usb_write8(Adapter, REG_EARLY_MODE_CONTROL, 0);
 
-       rtw_write16(Adapter, REG_PKT_VO_VI_LIFE_TIME, 0x0400);  /*  unit: 256us. 256ms */
-       rtw_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400);  /*  unit: 256us. 256ms */
+       usb_write16(Adapter, REG_PKT_VO_VI_LIFE_TIME, 0x0400);  /*  unit: 256us. 256ms */
+       usb_write16(Adapter, REG_PKT_BE_BK_LIFE_TIME, 0x0400);  /*  unit: 256us. 256ms */
 
        /* Keep RfRegChnlVal for later use. */
        haldata->RfRegChnlVal[0] = PHY_QueryRFReg(Adapter, (enum rf_radio_path)0, RF_CHNLBW, bRFRegOffsetMask);
@@ -867,17 +866,17 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_MISC11);
        /*  Disable BAR, suggested by Scott */
        /*  2010.04.09 add by hpfan */
        /*  */
-       rtw_write32(Adapter, REG_BAR_MODE_CTRL, 0x0201ffff);
+       usb_write32(Adapter, REG_BAR_MODE_CTRL, 0x0201ffff);
 
        /*  HW SEQ CTRL */
        /* set 0x0 to 0xFF by tynli. Default enable HW SEQ NUM. */
-       rtw_write8(Adapter, REG_HWSEQ_CTRL, 0xFF);
+       usb_write8(Adapter, REG_HWSEQ_CTRL, 0xFF);
 
        if (pregistrypriv->wifi_spec)
-               rtw_write16(Adapter, REG_FAST_EDCA_CTRL, 0);
+               usb_write16(Adapter, REG_FAST_EDCA_CTRL, 0);
 
        /* Nav limit , suggest by scott */
-       rtw_write8(Adapter, 0x652, 0x0);
+       usb_write8(Adapter, 0x652, 0x0);
 
 HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_HAL_DM);
        rtl8188e_InitHalDm(Adapter);
@@ -896,16 +895,16 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_HAL_DM);
                pwrctrlpriv->rf_pwrstate = rf_on;
 
                /*  enable Tx report. */
-               rtw_write8(Adapter,  REG_FWHW_TXQ_CTRL+1, 0x0F);
+               usb_write8(Adapter,  REG_FWHW_TXQ_CTRL+1, 0x0F);
 
                /*  Suggested by SD1 pisa. Added by tynli. 2011.10.21. */
-               rtw_write8(Adapter, REG_EARLY_MODE_CONTROL+3, 0x01);/* Pretx_en, for WEP/TKIP SEC */
+               usb_write8(Adapter, REG_EARLY_MODE_CONTROL+3, 0x01);/* Pretx_en, for WEP/TKIP SEC */
 
                /* tynli_test_tx_report. */
-               rtw_write16(Adapter, REG_TX_RPT_TIME, 0x3DF0);
+               usb_write16(Adapter, REG_TX_RPT_TIME, 0x3DF0);
 
                /* enable tx DMA to drop the redundate data of packet */
-               rtw_write16(Adapter, REG_TXDMA_OFFSET_CHK, (rtw_read16(Adapter, REG_TXDMA_OFFSET_CHK) | DROP_DATA_EN));
+               usb_write16(Adapter, REG_TXDMA_OFFSET_CHK, (usb_read16(Adapter, REG_TXDMA_OFFSET_CHK) | DROP_DATA_EN));
 
 HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_IQK);
                /*  2010/08/26 MH Merge from 8192CE. */
@@ -928,10 +927,10 @@ HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_LCK);
 
 /* HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_INIT_PABIAS); */
 /*     _InitPABias(Adapter); */
-       rtw_write8(Adapter, REG_USB_HRPWM, 0);
+       usb_write8(Adapter, REG_USB_HRPWM, 0);
 
        /* ack for xmit mgmt frames. */
-       rtw_write32(Adapter, REG_FWHW_TXQ_CTRL, rtw_read32(Adapter, REG_FWHW_TXQ_CTRL)|BIT(12));
+       usb_write32(Adapter, REG_FWHW_TXQ_CTRL, usb_read32(Adapter, REG_FWHW_TXQ_CTRL)|BIT(12));
 
 exit:
 HAL_INIT_PROFILE_TAG(HAL_INIT_STAGES_END);
@@ -950,52 +949,52 @@ static void CardDisableRTL8188EU(struct adapter *Adapter)
        RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("CardDisableRTL8188EU\n"));
 
        /* Stop Tx Report Timer. 0x4EC[Bit1]=b'0 */
-       val8 = rtw_read8(Adapter, REG_TX_RPT_CTRL);
-       rtw_write8(Adapter, REG_TX_RPT_CTRL, val8&(~BIT1));
+       val8 = usb_read8(Adapter, REG_TX_RPT_CTRL);
+       usb_write8(Adapter, REG_TX_RPT_CTRL, val8&(~BIT1));
 
        /*  stop rx */
-       rtw_write8(Adapter, REG_CR, 0x0);
+       usb_write8(Adapter, REG_CR, 0x0);
 
        /*  Run LPS WL RFOFF flow */
        HalPwrSeqCmdParsing(Adapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8188E_NIC_LPS_ENTER_FLOW);
 
        /*  2. 0x1F[7:0] = 0            turn off RF */
 
-       val8 = rtw_read8(Adapter, REG_MCUFWDL);
+       val8 = usb_read8(Adapter, REG_MCUFWDL);
        if ((val8 & RAM_DL_SEL) && Adapter->bFWReady) { /* 8051 RAM code */
                /*  Reset MCU 0x2[10]=0. */
-               val8 = rtw_read8(Adapter, REG_SYS_FUNC_EN+1);
+               val8 = usb_read8(Adapter, REG_SYS_FUNC_EN+1);
                val8 &= ~BIT(2);        /*  0x2[10], FEN_CPUEN */
-               rtw_write8(Adapter, REG_SYS_FUNC_EN+1, val8);
+               usb_write8(Adapter, REG_SYS_FUNC_EN+1, val8);
        }
 
        /*  reset MCU ready status */
-       rtw_write8(Adapter, REG_MCUFWDL, 0);
+       usb_write8(Adapter, REG_MCUFWDL, 0);
 
        /* YJ,add,111212 */
        /* Disable 32k */
-       val8 = rtw_read8(Adapter, REG_32K_CTRL);
-       rtw_write8(Adapter, REG_32K_CTRL, val8&(~BIT0));
+       val8 = usb_read8(Adapter, REG_32K_CTRL);
+       usb_write8(Adapter, REG_32K_CTRL, val8&(~BIT0));
 
        /*  Card disable power action flow */
        HalPwrSeqCmdParsing(Adapter, PWR_CUT_ALL_MSK, PWR_FAB_ALL_MSK, PWR_INTF_USB_MSK, Rtl8188E_NIC_DISABLE_FLOW);
 
        /*  Reset MCU IO Wrapper */
-       val8 = rtw_read8(Adapter, REG_RSV_CTRL+1);
-       rtw_write8(Adapter, REG_RSV_CTRL+1, (val8&(~BIT3)));
-       val8 = rtw_read8(Adapter, REG_RSV_CTRL+1);
-       rtw_write8(Adapter, REG_RSV_CTRL+1, val8|BIT3);
+       val8 = usb_read8(Adapter, REG_RSV_CTRL+1);
+       usb_write8(Adapter, REG_RSV_CTRL+1, (val8&(~BIT3)));
+       val8 = usb_read8(Adapter, REG_RSV_CTRL+1);
+       usb_write8(Adapter, REG_RSV_CTRL+1, val8|BIT3);
 
        /* YJ,test add, 111207. For Power Consumption. */
-       val8 = rtw_read8(Adapter, GPIO_IN);
-       rtw_write8(Adapter, GPIO_OUT, val8);
-       rtw_write8(Adapter, GPIO_IO_SEL, 0xFF);/* Reg0x46 */
-
-       val8 = rtw_read8(Adapter, REG_GPIO_IO_SEL);
-       rtw_write8(Adapter, REG_GPIO_IO_SEL, (val8<<4));
-       val8 = rtw_read8(Adapter, REG_GPIO_IO_SEL+1);
-       rtw_write8(Adapter, REG_GPIO_IO_SEL+1, val8|0x0F);/* Reg0x43 */
-       rtw_write32(Adapter, REG_BB_PAD_CTRL, 0x00080808);/* set LNA ,TRSW,EX_PA Pin to output mode */
+       val8 = usb_read8(Adapter, GPIO_IN);
+       usb_write8(Adapter, GPIO_OUT, val8);
+       usb_write8(Adapter, GPIO_IO_SEL, 0xFF);/* Reg0x46 */
+
+       val8 = usb_read8(Adapter, REG_GPIO_IO_SEL);
+       usb_write8(Adapter, REG_GPIO_IO_SEL, (val8<<4));
+       val8 = usb_read8(Adapter, REG_GPIO_IO_SEL+1);
+       usb_write8(Adapter, REG_GPIO_IO_SEL+1, val8|0x0F);/* Reg0x43 */
+       usb_write32(Adapter, REG_BB_PAD_CTRL, 0x00080808);/* set LNA ,TRSW,EX_PA Pin to output mode */
        haldata->bMacPwrCtrlOn = false;
        Adapter->bFWReady = false;
 }
@@ -1005,8 +1004,8 @@ static void rtl8192cu_hw_power_down(struct adapter *adapt)
        /*  Then enable power down control bit of register 0x04 BIT4 and BIT15 as 1. */
 
        /*  Enable register area 0x0-0xc. */
-       rtw_write8(adapt, REG_RSV_CTRL, 0x0);
-       rtw_write16(adapt, REG_APS_FSMCO, 0x8812);
+       usb_write8(adapt, REG_RSV_CTRL, 0x0);
+       usb_write16(adapt, REG_APS_FSMCO, 0x8812);
 }
 
 static u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
@@ -1014,8 +1013,8 @@ static u32 rtl8188eu_hal_deinit(struct adapter *Adapter)
 
        DBG_88E("==> %s\n", __func__);
 
-       rtw_write32(Adapter, REG_HIMR_88E, IMR_DISABLED_88E);
-       rtw_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E);
+       usb_write32(Adapter, REG_HIMR_88E, IMR_DISABLED_88E);
+       usb_write32(Adapter, REG_HIMRE_88E, IMR_DISABLED_88E);
 
        DBG_88E("bkeepfwalive(%x)\n", Adapter->pwrctrlpriv.bkeepfwalive);
        if (Adapter->pwrctrlpriv.bkeepfwalive) {
@@ -1037,12 +1036,7 @@ static unsigned int rtl8188eu_inirp_init(struct adapter *Adapter)
        u8 i;
        struct recv_buf *precvbuf;
        uint    status;
-       struct intf_hdl *pintfhdl = &Adapter->iopriv.intf;
        struct recv_priv *precvpriv = &(Adapter->recvpriv);
-       u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *pmem);
-
-
-       _read_port = pintfhdl->io_ops._read_port;
 
        status = _SUCCESS;
 
@@ -1054,7 +1048,7 @@ static unsigned int rtl8188eu_inirp_init(struct adapter *Adapter)
        /* issue Rx irp to receive data */
        precvbuf = (struct recv_buf *)precvpriv->precv_buf;
        for (i = 0; i < NR_RECVBUFF; i++) {
-               if (_read_port(pintfhdl, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == false) {
+               if (usb_read_port(Adapter, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf) == false) {
                        RT_TRACE(_module_hci_hal_init_c_, _drv_err_, ("usb_rx_init: usb_read_port error\n"));
                        status = _FAIL;
                        goto exit;
@@ -1076,7 +1070,7 @@ static unsigned int rtl8188eu_inirp_deinit(struct adapter *Adapter)
 {
        RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("\n ===> usb_rx_deinit\n"));
 
-       rtw_read_port_cancel(Adapter);
+       usb_read_port_cancel(Adapter);
 
        RT_TRACE(_module_hci_hal_init_c_, _drv_info_, ("\n <=== usb_rx_deinit\n"));
 
@@ -1155,10 +1149,6 @@ readAdapterInfo_8188EU(
        Hal_EfuseParseBoardType88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);
        Hal_ReadThermalMeter_88E(adapt, eeprom->efuse_eeprom_data, eeprom->bautoload_fail_flag);
 
-       /*  */
-       /*  The following part initialize some vars by PG info. */
-       /*  */
-       Hal_InitChannelPlan(adapt);
 }
 
 static void _ReadPROMContent(
@@ -1169,7 +1159,7 @@ static void _ReadPROMContent(
        u8 eeValue;
 
        /* check system boot selection */
-       eeValue = rtw_read8(Adapter, REG_9346CR);
+       eeValue = usb_read8(Adapter, REG_9346CR);
        eeprom->EepromOrEfuse           = (eeValue & BOOT_FROM_EEPROM) ? true : false;
        eeprom->bautoload_fail_flag     = (eeValue & EEPROM_EN) ? false : true;
 
@@ -1187,7 +1177,7 @@ static void _ReadRFType(struct adapter *Adapter)
        haldata->rf_chip = RF_6052;
 }
 
-static int _ReadAdapterInfo8188EU(struct adapter *Adapter)
+static void _ReadAdapterInfo8188EU(struct adapter *Adapter)
 {
        u32 start = jiffies;
 
@@ -1197,16 +1187,6 @@ static int _ReadAdapterInfo8188EU(struct adapter *Adapter)
        _ReadPROMContent(Adapter);
 
        MSG_88E("<==== %s in %d ms\n", __func__, rtw_get_passing_time_ms(start));
-
-       return _SUCCESS;
-}
-
-static void ReadAdapterInfo8188EU(struct adapter *Adapter)
-{
-       /*  Read EEPROM size before call any EEPROM function */
-       Adapter->EepromAddressSize = GetEEPROMSize8188E(Adapter);
-
-       _ReadAdapterInfo8188EU(Adapter);
 }
 
 #define GPIO_DEBUG_PORT_NUM 0
@@ -1221,11 +1201,11 @@ static void ResumeTxBeacon(struct adapter *adapt)
        /*  2010.03.01. Marked by tynli. No need to call workitem beacause we record the value */
        /*  which should be read from register to a global variable. */
 
-       rtw_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl) | BIT6);
+       usb_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl) | BIT6);
        haldata->RegFwHwTxQCtrl |= BIT6;
-       rtw_write8(adapt, REG_TBTT_PROHIBIT+1, 0xff);
+       usb_write8(adapt, REG_TBTT_PROHIBIT+1, 0xff);
        haldata->RegReg542 |= BIT0;
-       rtw_write8(adapt, REG_TBTT_PROHIBIT+2, haldata->RegReg542);
+       usb_write8(adapt, REG_TBTT_PROHIBIT+2, haldata->RegReg542);
 }
 
 static void StopTxBeacon(struct adapter *adapt)
@@ -1235,11 +1215,11 @@ static void StopTxBeacon(struct adapter *adapt)
        /*  2010.03.01. Marked by tynli. No need to call workitem beacause we record the value */
        /*  which should be read from register to a global variable. */
 
-       rtw_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl) & (~BIT6));
+       usb_write8(adapt, REG_FWHW_TXQ_CTRL+2, (haldata->RegFwHwTxQCtrl) & (~BIT6));
        haldata->RegFwHwTxQCtrl &= (~BIT6);
-       rtw_write8(adapt, REG_TBTT_PROHIBIT+1, 0x64);
+       usb_write8(adapt, REG_TBTT_PROHIBIT+1, 0x64);
        haldata->RegReg542 &= ~(BIT0);
-       rtw_write8(adapt, REG_TBTT_PROHIBIT+2, haldata->RegReg542);
+       usb_write8(adapt, REG_TBTT_PROHIBIT+2, haldata->RegReg542);
 
         /* todo: CheckFwRsvdPageContent(Adapter);  2010.06.23. Added by tynli. */
 }
@@ -1250,54 +1230,54 @@ static void hw_var_set_opmode(struct adapter *Adapter, u8 variable, u8 *val)
        u8 mode = *((u8 *)val);
 
        /*  disable Port0 TSF update */
-       rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
+       usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)|BIT(4));
 
        /*  set net_type */
-       val8 = rtw_read8(Adapter, MSR)&0x0c;
+       val8 = usb_read8(Adapter, MSR)&0x0c;
        val8 |= mode;
-       rtw_write8(Adapter, MSR, val8);
+       usb_write8(Adapter, MSR, val8);
 
        DBG_88E("%s()-%d mode = %d\n", __func__, __LINE__, mode);
 
        if ((mode == _HW_STATE_STATION_) || (mode == _HW_STATE_NOLINK_)) {
                StopTxBeacon(Adapter);
 
-               rtw_write8(Adapter, REG_BCN_CTRL, 0x19);/* disable atim wnd */
+               usb_write8(Adapter, REG_BCN_CTRL, 0x19);/* disable atim wnd */
        } else if ((mode == _HW_STATE_ADHOC_)) {
                ResumeTxBeacon(Adapter);
-               rtw_write8(Adapter, REG_BCN_CTRL, 0x1a);
+               usb_write8(Adapter, REG_BCN_CTRL, 0x1a);
        } else if (mode == _HW_STATE_AP_) {
                ResumeTxBeacon(Adapter);
 
-               rtw_write8(Adapter, REG_BCN_CTRL, 0x12);
+               usb_write8(Adapter, REG_BCN_CTRL, 0x12);
 
                /* Set RCR */
-               rtw_write32(Adapter, REG_RCR, 0x7000208e);/* CBSSID_DATA must set to 0,reject ICV_ERR packet */
+               usb_write32(Adapter, REG_RCR, 0x7000208e);/* CBSSID_DATA must set to 0,reject ICV_ERR packet */
                /* enable to rx data frame */
-               rtw_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
+               usb_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
                /* enable to rx ps-poll */
-               rtw_write16(Adapter, REG_RXFLTMAP1, 0x0400);
+               usb_write16(Adapter, REG_RXFLTMAP1, 0x0400);
 
                /* Beacon Control related register for first time */
-               rtw_write8(Adapter, REG_BCNDMATIM, 0x02); /*  2ms */
+               usb_write8(Adapter, REG_BCNDMATIM, 0x02); /*  2ms */
 
-               rtw_write8(Adapter, REG_ATIMWND, 0x0a); /*  10ms */
-               rtw_write16(Adapter, REG_BCNTCFG, 0x00);
-               rtw_write16(Adapter, REG_TBTT_PROHIBIT, 0xff04);
-               rtw_write16(Adapter, REG_TSFTR_SYN_OFFSET, 0x7fff);/*  +32767 (~32ms) */
+               usb_write8(Adapter, REG_ATIMWND, 0x0a); /*  10ms */
+               usb_write16(Adapter, REG_BCNTCFG, 0x00);
+               usb_write16(Adapter, REG_TBTT_PROHIBIT, 0xff04);
+               usb_write16(Adapter, REG_TSFTR_SYN_OFFSET, 0x7fff);/*  +32767 (~32ms) */
 
                /* reset TSF */
-               rtw_write8(Adapter, REG_DUAL_TSF_RST, BIT(0));
+               usb_write8(Adapter, REG_DUAL_TSF_RST, BIT(0));
 
                /* BIT3 - If set 0, hw will clr bcnq when tx becon ok/fail or port 0 */
-               rtw_write8(Adapter, REG_MBID_NUM, rtw_read8(Adapter, REG_MBID_NUM) | BIT(3) | BIT(4));
+               usb_write8(Adapter, REG_MBID_NUM, usb_read8(Adapter, REG_MBID_NUM) | BIT(3) | BIT(4));
 
                /* enable BCN0 Function for if1 */
                /* don't enable update TSF0 for if1 (due to TSF update when beacon/probe rsp are received) */
-               rtw_write8(Adapter, REG_BCN_CTRL, (DIS_TSF_UDT0_NORMAL_CHIP|EN_BCN_FUNCTION | BIT(1)));
+               usb_write8(Adapter, REG_BCN_CTRL, (DIS_TSF_UDT0_NORMAL_CHIP|EN_BCN_FUNCTION | BIT(1)));
 
                /* dis BCN1 ATIM  WND if if2 is station */
-               rtw_write8(Adapter, REG_BCN_CTRL_1, rtw_read8(Adapter, REG_BCN_CTRL_1) | BIT(0));
+               usb_write8(Adapter, REG_BCN_CTRL_1, usb_read8(Adapter, REG_BCN_CTRL_1) | BIT(0));
        }
 }
 
@@ -1309,7 +1289,7 @@ static void hw_var_set_macaddr(struct adapter *Adapter, u8 variable, u8 *val)
        reg_macid = REG_MACID;
 
        for (idx = 0; idx < 6; idx++)
-               rtw_write8(Adapter, (reg_macid+idx), val[idx]);
+               usb_write8(Adapter, (reg_macid+idx), val[idx]);
 }
 
 static void hw_var_set_bssid(struct adapter *Adapter, u8 variable, u8 *val)
@@ -1320,7 +1300,7 @@ static void hw_var_set_bssid(struct adapter *Adapter, u8 variable, u8 *val)
        reg_bssid = REG_BSSID;
 
        for (idx = 0; idx < 6; idx++)
-               rtw_write8(Adapter, (reg_bssid+idx), val[idx]);
+               usb_write8(Adapter, (reg_bssid+idx), val[idx]);
 }
 
 static void hw_var_set_bcn_func(struct adapter *Adapter, u8 variable, u8 *val)
@@ -1330,9 +1310,9 @@ static void hw_var_set_bcn_func(struct adapter *Adapter, u8 variable, u8 *val)
        bcn_ctrl_reg = REG_BCN_CTRL;
 
        if (*((u8 *)val))
-               rtw_write8(Adapter, bcn_ctrl_reg, (EN_BCN_FUNCTION | EN_TXBCN_RPT));
+               usb_write8(Adapter, bcn_ctrl_reg, (EN_BCN_FUNCTION | EN_TXBCN_RPT));
        else
-               rtw_write8(Adapter, bcn_ctrl_reg, rtw_read8(Adapter, bcn_ctrl_reg)&(~(EN_BCN_FUNCTION | EN_TXBCN_RPT)));
+               usb_write8(Adapter, bcn_ctrl_reg, usb_read8(Adapter, bcn_ctrl_reg)&(~(EN_BCN_FUNCTION | EN_TXBCN_RPT)));
 }
 
 static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
@@ -1346,18 +1326,18 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                {
                        u8 val8;
 
-                       val8 = rtw_read8(Adapter, MSR)&0x0c;
+                       val8 = usb_read8(Adapter, MSR)&0x0c;
                        val8 |= *((u8 *)val);
-                       rtw_write8(Adapter, MSR, val8);
+                       usb_write8(Adapter, MSR, val8);
                }
                break;
        case HW_VAR_MEDIA_STATUS1:
                {
                        u8 val8;
 
-                       val8 = rtw_read8(Adapter, MSR) & 0x03;
+                       val8 = usb_read8(Adapter, MSR) & 0x03;
                        val8 |= *((u8 *)val) << 2;
-                       rtw_write8(Adapter, MSR, val8);
+                       usb_write8(Adapter, MSR, val8);
                }
                break;
        case HW_VAR_SET_OPMODE:
@@ -1391,9 +1371,9 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 
                        BrateCfg |= 0x01; /*  default enable 1M ACK rate */
                        /*  Set RRSR rate table. */
-                       rtw_write8(Adapter, REG_RRSR, BrateCfg & 0xff);
-                       rtw_write8(Adapter, REG_RRSR+1, (BrateCfg >> 8) & 0xff);
-                       rtw_write8(Adapter, REG_RRSR+2, rtw_read8(Adapter, REG_RRSR+2)&0xf0);
+                       usb_write8(Adapter, REG_RRSR, BrateCfg & 0xff);
+                       usb_write8(Adapter, REG_RRSR+1, (BrateCfg >> 8) & 0xff);
+                       usb_write8(Adapter, REG_RRSR+2, usb_read8(Adapter, REG_RRSR+2)&0xf0);
 
                        /*  Set RTS initial rate */
                        while (BrateCfg > 0x1) {
@@ -1401,11 +1381,11 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                RateIndex++;
                        }
                        /*  Ziv - Check */
-                       rtw_write8(Adapter, REG_INIRTS_RATE_SEL, RateIndex);
+                       usb_write8(Adapter, REG_INIRTS_RATE_SEL, RateIndex);
                }
                break;
        case HW_VAR_TXPAUSE:
-               rtw_write8(Adapter, REG_TXPAUSE, *((u8 *)val));
+               usb_write8(Adapter, REG_TXPAUSE, *((u8 *)val));
                break;
        case HW_VAR_BCN_FUNC:
                hw_var_set_bcn_func(Adapter, variable, val);
@@ -1422,13 +1402,13 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                StopTxBeacon(Adapter);
 
                        /* disable related TSF function */
-                       rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(3)));
+                       usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)&(~BIT(3)));
 
-                       rtw_write32(Adapter, REG_TSFTR, tsf);
-                       rtw_write32(Adapter, REG_TSFTR+4, tsf>>32);
+                       usb_write32(Adapter, REG_TSFTR, tsf);
+                       usb_write32(Adapter, REG_TSFTR+4, tsf>>32);
 
                        /* enable related TSF function */
-                       rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(3));
+                       usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)|BIT(3));
 
                        if (((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE) || ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE))
                                ResumeTxBeacon(Adapter);
@@ -1436,39 +1416,39 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                break;
        case HW_VAR_CHECK_BSSID:
                if (*((u8 *)val)) {
-                       rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
+                       usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
                } else {
                        u32 val32;
 
-                       val32 = rtw_read32(Adapter, REG_RCR);
+                       val32 = usb_read32(Adapter, REG_RCR);
 
                        val32 &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);
 
-                       rtw_write32(Adapter, REG_RCR, val32);
+                       usb_write32(Adapter, REG_RCR, val32);
                }
                break;
        case HW_VAR_MLME_DISCONNECT:
                /* Set RCR to not to receive data frame when NO LINK state */
                /* reject all data frames */
-               rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
+               usb_write16(Adapter, REG_RXFLTMAP2, 0x00);
 
                /* reset TSF */
-               rtw_write8(Adapter, REG_DUAL_TSF_RST, (BIT(0)|BIT(1)));
+               usb_write8(Adapter, REG_DUAL_TSF_RST, (BIT(0)|BIT(1)));
 
                /* disable update TSF */
-               rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
+               usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)|BIT(4));
                break;
        case HW_VAR_MLME_SITESURVEY:
                if (*((u8 *)val)) { /* under sitesurvey */
                        /* config RCR to receive different BSSID & not to receive data frame */
-                       u32 v = rtw_read32(Adapter, REG_RCR);
+                       u32 v = usb_read32(Adapter, REG_RCR);
                        v &= ~(RCR_CBSSID_BCN);
-                       rtw_write32(Adapter, REG_RCR, v);
+                       usb_write32(Adapter, REG_RCR, v);
                        /* reject all data frame */
-                       rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
+                       usb_write16(Adapter, REG_RXFLTMAP2, 0x00);
 
                        /* disable update TSF */
-                       rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)|BIT(4));
+                       usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)|BIT(4));
                } else { /* sitesurvey done */
                        struct mlme_ext_priv    *pmlmeext = &Adapter->mlmeextpriv;
                        struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
@@ -1476,24 +1456,24 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        if ((is_client_associated_to_ap(Adapter)) ||
                            ((pmlmeinfo->state&0x03) == WIFI_FW_ADHOC_STATE)) {
                                /* enable to rx data frame */
-                               rtw_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
+                               usb_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
 
                                /* enable update TSF */
-                               rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
+                               usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
                        } else if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
-                               rtw_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
+                               usb_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
                                /* enable update TSF */
-                               rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
+                               usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
                        }
                        if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
-                               rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
+                               usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
                        } else {
                                if (Adapter->in_cta_test) {
-                                       u32 v = rtw_read32(Adapter, REG_RCR);
+                                       u32 v = usb_read32(Adapter, REG_RCR);
                                        v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/*  RCR_ADF */
-                                       rtw_write32(Adapter, REG_RCR, v);
+                                       usb_write32(Adapter, REG_RCR, v);
                                } else {
-                                       rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
+                                       usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_BCN);
                                }
                        }
                }
@@ -1506,14 +1486,14 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
 
                        if (type == 0) { /*  prepare to join */
                                /* enable to rx data frame.Accept all data frame */
-                               rtw_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
+                               usb_write16(Adapter, REG_RXFLTMAP2, 0xFFFF);
 
                                if (Adapter->in_cta_test) {
-                                       u32 v = rtw_read32(Adapter, REG_RCR);
+                                       u32 v = usb_read32(Adapter, REG_RCR);
                                        v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/*  RCR_ADF */
-                                       rtw_write32(Adapter, REG_RCR, v);
+                                       usb_write32(Adapter, REG_RCR, v);
                                } else {
-                                       rtw_write32(Adapter, REG_RCR, rtw_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
+                                       usb_write32(Adapter, REG_RCR, usb_read32(Adapter, REG_RCR)|RCR_CBSSID_DATA|RCR_CBSSID_BCN);
                                }
 
                                if (check_fwstate(pmlmepriv, WIFI_STATION_STATE))
@@ -1522,20 +1502,20 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                        RetryLimit = 0x7;
                        } else if (type == 1) {
                                /* joinbss_event call back when join res < 0 */
-                               rtw_write16(Adapter, REG_RXFLTMAP2, 0x00);
+                               usb_write16(Adapter, REG_RXFLTMAP2, 0x00);
                        } else if (type == 2) {
                                /* sta add event call back */
                                /* enable update TSF */
-                               rtw_write8(Adapter, REG_BCN_CTRL, rtw_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
+                               usb_write8(Adapter, REG_BCN_CTRL, usb_read8(Adapter, REG_BCN_CTRL)&(~BIT(4)));
 
                                if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE|WIFI_ADHOC_MASTER_STATE))
                                        RetryLimit = 0x7;
                        }
-                       rtw_write16(Adapter, REG_RL, RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT);
+                       usb_write16(Adapter, REG_RL, RetryLimit << RETRY_LIMIT_SHORT_SHIFT | RetryLimit << RETRY_LIMIT_LONG_SHIFT);
                }
                break;
        case HW_VAR_BEACON_INTERVAL:
-               rtw_write16(Adapter, REG_BCN_INTERVAL, *((u16 *)val));
+               usb_write16(Adapter, REG_BCN_INTERVAL, *((u16 *)val));
                break;
        case HW_VAR_SLOT_TIME:
                {
@@ -1543,7 +1523,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        struct mlme_ext_priv    *pmlmeext = &Adapter->mlmeextpriv;
                        struct mlme_ext_info    *pmlmeinfo = &(pmlmeext->mlmext_info);
 
-                       rtw_write8(Adapter, REG_SLOT, val[0]);
+                       usb_write8(Adapter, REG_SLOT, val[0]);
 
                        if (pmlmeinfo->WMM_enable == 0) {
                                if (pmlmeext->cur_wireless_mode == WIRELESS_11B)
@@ -1554,20 +1534,20 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                u1bAIFS = aSifsTime + (2 * pmlmeinfo->slotTime);
 
                                /*  <Roger_EXP> Temporary removed, 2008.06.20. */
-                               rtw_write8(Adapter, REG_EDCA_VO_PARAM, u1bAIFS);
-                               rtw_write8(Adapter, REG_EDCA_VI_PARAM, u1bAIFS);
-                               rtw_write8(Adapter, REG_EDCA_BE_PARAM, u1bAIFS);
-                               rtw_write8(Adapter, REG_EDCA_BK_PARAM, u1bAIFS);
+                               usb_write8(Adapter, REG_EDCA_VO_PARAM, u1bAIFS);
+                               usb_write8(Adapter, REG_EDCA_VI_PARAM, u1bAIFS);
+                               usb_write8(Adapter, REG_EDCA_BE_PARAM, u1bAIFS);
+                               usb_write8(Adapter, REG_EDCA_BK_PARAM, u1bAIFS);
                        }
                }
                break;
        case HW_VAR_RESP_SIFS:
                /* RESP_SIFS for CCK */
-               rtw_write8(Adapter, REG_R2T_SIFS, val[0]); /*  SIFS_T2T_CCK (0x08) */
-               rtw_write8(Adapter, REG_R2T_SIFS+1, val[1]); /* SIFS_R2T_CCK(0x08) */
+               usb_write8(Adapter, REG_R2T_SIFS, val[0]); /*  SIFS_T2T_CCK (0x08) */
+               usb_write8(Adapter, REG_R2T_SIFS+1, val[1]); /* SIFS_R2T_CCK(0x08) */
                /* RESP_SIFS for OFDM */
-               rtw_write8(Adapter, REG_T2T_SIFS, val[2]); /* SIFS_T2T_OFDM (0x0a) */
-               rtw_write8(Adapter, REG_T2T_SIFS+1, val[3]); /* SIFS_R2T_OFDM(0x0a) */
+               usb_write8(Adapter, REG_T2T_SIFS, val[2]); /* SIFS_T2T_OFDM (0x0a) */
+               usb_write8(Adapter, REG_T2T_SIFS+1, val[3]); /* SIFS_R2T_OFDM(0x0a) */
                break;
        case HW_VAR_ACK_PREAMBLE:
                {
@@ -1578,11 +1558,11 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        if (bShortPreamble)
                                regTmp |= 0x80;
 
-                       rtw_write8(Adapter, REG_RRSR+2, regTmp);
+                       usb_write8(Adapter, REG_RRSR+2, regTmp);
                }
                break;
        case HW_VAR_SEC_CFG:
-               rtw_write8(Adapter, REG_SECCFG, *((u8 *)val));
+               usb_write8(Adapter, REG_SECCFG, *((u8 *)val));
                break;
        case HW_VAR_DM_FLAG:
                podmpriv->SupportAbility = *((u8 *)val);
@@ -1622,41 +1602,41 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                ulCommand = CAM_CONTENT_COUNT*ucIndex+i;
                                ulCommand = ulCommand | CAM_POLLINIG|CAM_WRITE;
                                /*  write content 0 is equall to mark invalid */
-                               rtw_write32(Adapter, WCAMI, ulContent);  /* delay_ms(40); */
-                               rtw_write32(Adapter, RWCAM, ulCommand);  /* delay_ms(40); */
+                               usb_write32(Adapter, WCAMI, ulContent);  /* delay_ms(40); */
+                               usb_write32(Adapter, RWCAM, ulCommand);  /* delay_ms(40); */
                        }
                }
                break;
        case HW_VAR_CAM_INVALID_ALL:
-               rtw_write32(Adapter, RWCAM, BIT(31)|BIT(30));
+               usb_write32(Adapter, RWCAM, BIT(31)|BIT(30));
                break;
        case HW_VAR_CAM_WRITE:
                {
                        u32 cmd;
                        u32 *cam_val = (u32 *)val;
-                       rtw_write32(Adapter, WCAMI, cam_val[0]);
+                       usb_write32(Adapter, WCAMI, cam_val[0]);
 
                        cmd = CAM_POLLINIG | CAM_WRITE | cam_val[1];
-                       rtw_write32(Adapter, RWCAM, cmd);
+                       usb_write32(Adapter, RWCAM, cmd);
                }
                break;
        case HW_VAR_AC_PARAM_VO:
-               rtw_write32(Adapter, REG_EDCA_VO_PARAM, ((u32 *)(val))[0]);
+               usb_write32(Adapter, REG_EDCA_VO_PARAM, ((u32 *)(val))[0]);
                break;
        case HW_VAR_AC_PARAM_VI:
-               rtw_write32(Adapter, REG_EDCA_VI_PARAM, ((u32 *)(val))[0]);
+               usb_write32(Adapter, REG_EDCA_VI_PARAM, ((u32 *)(val))[0]);
                break;
        case HW_VAR_AC_PARAM_BE:
                haldata->AcParam_BE = ((u32 *)(val))[0];
-               rtw_write32(Adapter, REG_EDCA_BE_PARAM, ((u32 *)(val))[0]);
+               usb_write32(Adapter, REG_EDCA_BE_PARAM, ((u32 *)(val))[0]);
                break;
        case HW_VAR_AC_PARAM_BK:
-               rtw_write32(Adapter, REG_EDCA_BK_PARAM, ((u32 *)(val))[0]);
+               usb_write32(Adapter, REG_EDCA_BK_PARAM, ((u32 *)(val))[0]);
                break;
        case HW_VAR_ACM_CTRL:
                {
                        u8 acm_ctrl = *((u8 *)val);
-                       u8 AcmCtrl = rtw_read8(Adapter, REG_ACMHWCTRL);
+                       u8 AcmCtrl = usb_read8(Adapter, REG_ACMHWCTRL);
 
                        if (acm_ctrl > 1)
                                AcmCtrl = AcmCtrl | 0x1;
@@ -1677,7 +1657,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                AcmCtrl &= (~AcmHw_BeqEn);
 
                        DBG_88E("[HW_VAR_ACM_CTRL] Write 0x%X\n", AcmCtrl);
-                       rtw_write8(Adapter, REG_ACMHWCTRL, AcmCtrl);
+                       usb_write8(Adapter, REG_ACMHWCTRL, AcmCtrl);
                }
                break;
        case HW_VAR_AMPDU_MIN_SPACE:
@@ -1704,7 +1684,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                }
                                if (MinSpacingToSet < SecMinSpace)
                                        MinSpacingToSet = SecMinSpace;
-                               rtw_write8(Adapter, REG_AMPDU_MIN_SPACE, (rtw_read8(Adapter, REG_AMPDU_MIN_SPACE) & 0xf8) | MinSpacingToSet);
+                               usb_write8(Adapter, REG_AMPDU_MIN_SPACE, (usb_read8(Adapter, REG_AMPDU_MIN_SPACE) & 0xf8) | MinSpacingToSet);
                        }
                }
                break;
@@ -1729,7 +1709,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                        if ((pRegToSet[index] & 0x0f) > FactorToSet)
                                                pRegToSet[index] = (pRegToSet[index] & 0xf0) | (FactorToSet);
 
-                                       rtw_write8(Adapter, (REG_AGGLEN_LMT+index), pRegToSet[index]);
+                                       usb_write8(Adapter, (REG_AGGLEN_LMT+index), pRegToSet[index]);
                                }
                        }
                }
@@ -1739,7 +1719,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        u8 threshold = *((u8 *)val);
                        if (threshold == 0)
                                threshold = haldata->UsbRxAggPageCount;
-                       rtw_write8(Adapter, REG_RXDMA_AGG_PG_TH, threshold);
+                       usb_write8(Adapter, REG_RXDMA_AGG_PG_TH, threshold);
                }
                break;
        case HW_VAR_SET_RPWM:
@@ -1813,24 +1793,24 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                        u8 trycnt = 100;
 
                        /* pause tx */
-                       rtw_write8(Adapter, REG_TXPAUSE, 0xff);
+                       usb_write8(Adapter, REG_TXPAUSE, 0xff);
 
                        /* keep sn */
-                       Adapter->xmitpriv.nqos_ssn = rtw_read16(Adapter, REG_NQOS_SEQ);
+                       Adapter->xmitpriv.nqos_ssn = usb_read16(Adapter, REG_NQOS_SEQ);
 
                        if (!pwrpriv->bkeepfwalive) {
                                /* RX DMA stop */
-                               rtw_write32(Adapter, REG_RXPKT_NUM, (rtw_read32(Adapter, REG_RXPKT_NUM)|RW_RELEASE_EN));
+                               usb_write32(Adapter, REG_RXPKT_NUM, (usb_read32(Adapter, REG_RXPKT_NUM)|RW_RELEASE_EN));
                                do {
-                                       if (!(rtw_read32(Adapter, REG_RXPKT_NUM)&RXDMA_IDLE))
+                                       if (!(usb_read32(Adapter, REG_RXPKT_NUM)&RXDMA_IDLE))
                                                break;
                                } while (trycnt--);
                                if (trycnt == 0)
                                        DBG_88E("Stop RX DMA failed......\n");
 
                                /* RQPN Load 0 */
-                               rtw_write16(Adapter, REG_RQPN_NPQ, 0x0);
-                               rtw_write32(Adapter, REG_RQPN, 0x80000000);
+                               usb_write16(Adapter, REG_RQPN_NPQ, 0x0);
+                               usb_write32(Adapter, REG_RQPN, 0x80000000);
                                mdelay(10);
                        }
                }
@@ -1845,7 +1825,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                {
                        u8 maxMacid = *val;
                        DBG_88E("### MacID(%d),Set Max Tx RPT MID(%d)\n", maxMacid, maxMacid+1);
-                       rtw_write8(Adapter, REG_TX_RPT_CTRL+1, maxMacid+1);
+                       usb_write8(Adapter, REG_TX_RPT_CTRL+1, maxMacid+1);
                }
                break;
        case HW_VAR_H2C_MEDIA_STATUS_RPT:
@@ -1853,7 +1833,7 @@ static void SetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                break;
        case HW_VAR_BCN_VALID:
                /* BCN_VALID, BIT16 of REG_TDECTRL = BIT0 of REG_TDECTRL+2, write 1 to clear, Clear by sw */
-               rtw_write8(Adapter, REG_TDECTRL+2, rtw_read8(Adapter, REG_TDECTRL+2) | BIT0);
+               usb_write8(Adapter, REG_TDECTRL+2, usb_read8(Adapter, REG_TDECTRL+2) | BIT0);
                break;
        default:
                break;
@@ -1869,11 +1849,11 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
        case HW_VAR_BASIC_RATE:
                *((u16 *)(val)) = haldata->BasicRateSet;
        case HW_VAR_TXPAUSE:
-               val[0] = rtw_read8(Adapter, REG_TXPAUSE);
+               val[0] = usb_read8(Adapter, REG_TXPAUSE);
                break;
        case HW_VAR_BCN_VALID:
                /* BCN_VALID, BIT16 of REG_TDECTRL = BIT0 of REG_TDECTRL+2 */
-               val[0] = (BIT0 & rtw_read8(Adapter, REG_TDECTRL+2)) ? true : false;
+               val[0] = (BIT0 & usb_read8(Adapter, REG_TDECTRL+2)) ? true : false;
                break;
        case HW_VAR_DM_FLAG:
                val[0] = podmpriv->SupportAbility;
@@ -1890,7 +1870,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                                val[0] = true;
                        } else {
                                u32 valRCR;
-                               valRCR = rtw_read32(Adapter, REG_RCR);
+                               valRCR = usb_read32(Adapter, REG_RCR);
                                valRCR &= 0x00070000;
                                if (valRCR)
                                        val[0] = false;
@@ -1909,7 +1889,7 @@ static void GetHwReg8188EU(struct adapter *Adapter, u8 variable, u8 *val)
                *val = haldata->bMacPwrCtrlOn;
                break;
        case HW_VAR_CHK_HI_QUEUE_EMPTY:
-               *val = ((rtw_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00) == 0) ? true : false;
+               *val = ((usb_read32(Adapter, REG_HGQ_INFORMATION)&0x0000ff00) == 0) ? true : false;
                break;
        default:
                break;
@@ -2047,7 +2027,7 @@ static u8 SetHalDefVar8188EUsb(struct adapter *Adapter, enum hal_def_variable eV
                        } else if (dm_func == 6) {/* turn on all dynamic func */
                                if (!(podmpriv->SupportAbility  & DYNAMIC_BB_DIG)) {
                                        struct rtw_dig *pDigTable = &podmpriv->DM_DigTable;
-                                       pDigTable->CurIGValue = rtw_read8(Adapter, 0xc50);
+                                       pDigTable->CurIGValue = usb_read8(Adapter, 0xc50);
                                }
                                podmpriv->SupportAbility = DYNAMIC_ALL_FUNC_ENABLE;
                                DBG_88E("==> Turn on all dynamic function...\n");
@@ -2177,29 +2157,29 @@ static void SetBeaconRelatedRegisters8188EUsb(struct adapter *adapt)
        /* reset TSF, enable update TSF, correcting TSF On Beacon */
 
        /* BCN interval */
-       rtw_write16(adapt, REG_BCN_INTERVAL, pmlmeinfo->bcn_interval);
-       rtw_write8(adapt, REG_ATIMWND, 0x02);/*  2ms */
+       usb_write16(adapt, REG_BCN_INTERVAL, pmlmeinfo->bcn_interval);
+       usb_write8(adapt, REG_ATIMWND, 0x02);/*  2ms */
 
        _InitBeaconParameters(adapt);
 
-       rtw_write8(adapt, REG_SLOT, 0x09);
+       usb_write8(adapt, REG_SLOT, 0x09);
 
-       value32 = rtw_read32(adapt, REG_TCR);
+       value32 = usb_read32(adapt, REG_TCR);
        value32 &= ~TSFRST;
-       rtw_write32(adapt,  REG_TCR, value32);
+       usb_write32(adapt,  REG_TCR, value32);
 
        value32 |= TSFRST;
-       rtw_write32(adapt, REG_TCR, value32);
+       usb_write32(adapt, REG_TCR, value32);
 
        /*  NOTE: Fix test chip's bug (about contention windows's randomness) */
-       rtw_write8(adapt,  REG_RXTSF_OFFSET_CCK, 0x50);
-       rtw_write8(adapt, REG_RXTSF_OFFSET_OFDM, 0x50);
+       usb_write8(adapt,  REG_RXTSF_OFFSET_CCK, 0x50);
+       usb_write8(adapt, REG_RXTSF_OFFSET_OFDM, 0x50);
 
        _BeaconFunctionEnable(adapt, true, true);
 
        ResumeTxBeacon(adapt);
 
-       rtw_write8(adapt, bcn_ctrl_reg, rtw_read8(adapt, bcn_ctrl_reg)|BIT(1));
+       usb_write8(adapt, bcn_ctrl_reg, usb_read8(adapt, bcn_ctrl_reg)|BIT(1));
 }
 
 static void rtl8188eu_init_default_value(struct adapter *adapt)
@@ -2231,10 +2211,9 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
        struct hal_ops  *halfunc = &adapt->HalFunc;
 
 
-       adapt->HalData = rtw_zmalloc(sizeof(struct hal_data_8188e));
+       adapt->HalData = kzalloc(sizeof(struct hal_data_8188e), GFP_KERNEL);
        if (adapt->HalData == NULL)
                DBG_88E("cant not alloc memory for HAL DATA\n");
-       adapt->hal_data_sz = sizeof(struct hal_data_8188e);
 
        halfunc->hal_power_on = rtl8188eu_InitPowerOn;
        halfunc->hal_init = &rtl8188eu_hal_init;
@@ -2244,7 +2223,6 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
        halfunc->inirp_deinit = &rtl8188eu_inirp_deinit;
 
        halfunc->init_xmit_priv = &rtl8188eu_init_xmit_priv;
-       halfunc->free_xmit_priv = &rtl8188eu_free_xmit_priv;
 
        halfunc->init_recv_priv = &rtl8188eu_init_recv_priv;
        halfunc->free_recv_priv = &rtl8188eu_free_recv_priv;
@@ -2253,7 +2231,7 @@ void rtl8188eu_set_hal_ops(struct adapter *adapt)
 
        halfunc->init_default_value = &rtl8188eu_init_default_value;
        halfunc->intf_chip_configure = &rtl8188eu_interface_configure;
-       halfunc->read_adapter_info = &ReadAdapterInfo8188EU;
+       halfunc->read_adapter_info = &_ReadAdapterInfo8188EU;
 
        halfunc->SetHwRegHandler = &SetHwReg8188EU;
        halfunc->GetHwRegHandler = &GetHwReg8188EU;
diff --git a/drivers/staging/rtl8188eu/hal/usb_ops_linux.c b/drivers/staging/rtl8188eu/hal/usb_ops_linux.c
deleted file mode 100644 (file)
index 3aadf56..0000000
+++ /dev/null
@@ -1,684 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#define _HCI_OPS_OS_C_
-
-#include <osdep_service.h>
-#include <drv_types.h>
-#include <osdep_intf.h>
-#include <usb_ops.h>
-#include <recv_osdep.h>
-#include <rtl8188e_hal.h>
-
-static int usbctrl_vendorreq(struct intf_hdl *pintfhdl, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
-{
-       struct adapter  *adapt = pintfhdl->padapter;
-       struct dvobj_priv  *dvobjpriv = adapter_to_dvobj(adapt);
-       struct usb_device *udev = dvobjpriv->pusbdev;
-       unsigned int pipe;
-       int status = 0;
-       u8 reqtype;
-       u8 *pIo_buf;
-       int vendorreq_times = 0;
-
-       if ((adapt->bSurpriseRemoved) || (adapt->pwrctrlpriv.pnp_bstop_trx)) {
-               RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usbctrl_vendorreq:(adapt->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n"));
-               status = -EPERM;
-               goto exit;
-       }
-
-       if (len > MAX_VENDOR_REQ_CMD_SIZE) {
-               DBG_88E("[%s] Buffer len error ,vendor request failed\n", __func__);
-               status = -EINVAL;
-               goto exit;
-       }
-
-       _enter_critical_mutex(&dvobjpriv->usb_vendor_req_mutex, NULL);
-
-       /*  Acquire IO memory for vendorreq */
-       pIo_buf = dvobjpriv->usb_vendor_req_buf;
-
-       if (pIo_buf == NULL) {
-               DBG_88E("[%s] pIo_buf == NULL\n", __func__);
-               status = -ENOMEM;
-               goto release_mutex;
-       }
-
-       while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
-               _rtw_memset(pIo_buf, 0, len);
-
-               if (requesttype == 0x01) {
-                       pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
-                       reqtype =  REALTEK_USB_VENQT_READ;
-               } else {
-                       pipe = usb_sndctrlpipe(udev, 0);/* write_out */
-                       reqtype =  REALTEK_USB_VENQT_WRITE;
-                       memcpy(pIo_buf, pdata, len);
-               }
-
-               status = rtw_usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
-
-               if (status == len) {   /*  Success this control transfer. */
-                       rtw_reset_continual_urb_error(dvobjpriv);
-                       if (requesttype == 0x01)
-                               memcpy(pdata, pIo_buf,  len);
-               } else { /*  error cases */
-                       DBG_88E("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n",
-                               value, (requesttype == 0x01) ? "read" : "write",
-                               len, status, *(u32 *)pdata, vendorreq_times);
-
-                       if (status < 0) {
-                               if (status == (-ESHUTDOWN) || status == -ENODEV) {
-                                       adapt->bSurpriseRemoved = true;
-                               } else {
-                                       struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
-                                       haldata->srestpriv.Wifi_Error_Status = USB_VEN_REQ_CMD_FAIL;
-                               }
-                       } else { /*  status != len && status >= 0 */
-                               if (status > 0) {
-                                       if (requesttype == 0x01) {
-                                               /*  For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
-                                               memcpy(pdata, pIo_buf,  len);
-                                       }
-                               }
-                       }
-
-                       if (rtw_inc_and_chk_continual_urb_error(dvobjpriv)) {
-                               adapt->bSurpriseRemoved = true;
-                               break;
-                       }
-
-               }
-
-               /*  firmware download is checksumed, don't retry */
-               if ((value >= FW_8188E_START_ADDRESS && value <= FW_8188E_END_ADDRESS) || status == len)
-                       break;
-       }
-release_mutex:
-       mutex_unlock(&dvobjpriv->usb_vendor_req_mutex);
-exit:
-       return status;
-}
-
-static u8 usb_read8(struct intf_hdl *pintfhdl, u32 addr)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       u8 data = 0;
-
-
-       request = 0x05;
-       requesttype = 0x01;/* read_in */
-       index = 0;/* n/a */
-
-       wvalue = (u16)(addr&0x0000ffff);
-       len = 1;
-
-       usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-
-
-       return data;
-
-}
-
-static u16 usb_read16(struct intf_hdl *pintfhdl, u32 addr)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       __le32 data;
-
-       request = 0x05;
-       requesttype = 0x01;/* read_in */
-       index = 0;/* n/a */
-       wvalue = (u16)(addr&0x0000ffff);
-       len = 2;
-       usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-
-       return (u16)(le32_to_cpu(data)&0xffff);
-}
-
-static u32 usb_read32(struct intf_hdl *pintfhdl, u32 addr)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       __le32 data;
-
-
-       request = 0x05;
-       requesttype = 0x01;/* read_in */
-       index = 0;/* n/a */
-
-       wvalue = (u16)(addr&0x0000ffff);
-       len = 4;
-
-       usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-
-
-       return le32_to_cpu(data);
-}
-
-static int usb_write8(struct intf_hdl *pintfhdl, u32 addr, u8 val)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       u8 data;
-       int ret;
-
-       request = 0x05;
-       requesttype = 0x00;/* write_out */
-       index = 0;/* n/a */
-       wvalue = (u16)(addr&0x0000ffff);
-       len = 1;
-       data = val;
-       ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-       return ret;
-}
-
-static int usb_write16(struct intf_hdl *pintfhdl, u32 addr, u16 val)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       __le32 data;
-       int ret;
-
-
-       request = 0x05;
-       requesttype = 0x00;/* write_out */
-       index = 0;/* n/a */
-
-       wvalue = (u16)(addr&0x0000ffff);
-       len = 2;
-
-       data = cpu_to_le32(val & 0x0000ffff);
-
-       ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-
-
-       return ret;
-}
-
-static int usb_write32(struct intf_hdl *pintfhdl, u32 addr, u32 val)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       __le32 data;
-       int ret;
-
-
-       request = 0x05;
-       requesttype = 0x00;/* write_out */
-       index = 0;/* n/a */
-
-       wvalue = (u16)(addr&0x0000ffff);
-       len = 4;
-       data = cpu_to_le32(val);
-
-       ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, &data, len, requesttype);
-
-
-       return ret;
-}
-
-static int usb_writeN(struct intf_hdl *pintfhdl, u32 addr, u32 length, u8 *pdata)
-{
-       u8 request;
-       u8 requesttype;
-       u16 wvalue;
-       u16 index;
-       u16 len;
-       u8 buf[VENDOR_CMD_MAX_DATA_LEN] = {0};
-       int ret;
-
-
-       request = 0x05;
-       requesttype = 0x00;/* write_out */
-       index = 0;/* n/a */
-
-       wvalue = (u16)(addr&0x0000ffff);
-       len = length;
-        memcpy(buf, pdata, len);
-
-       ret = usbctrl_vendorreq(pintfhdl, request, wvalue, index, buf, len, requesttype);
-
-
-       return ret;
-}
-
-static void interrupt_handler_8188eu(struct adapter *adapt, u16 pkt_len, u8 *pbuf)
-{
-       struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
-
-       if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) {
-               DBG_88E("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len);
-               return;
-       }
-
-       /*  HISR */
-       memcpy(&(haldata->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
-       memcpy(&(haldata->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
-
-       /*  C2H Event */
-       if (pbuf[0] != 0)
-               memcpy(&(haldata->C2hArray[0]), &(pbuf[USB_INTR_CONTENT_C2H_OFFSET]), 16);
-}
-
-static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
-{
-       u8      *pbuf;
-       u8      shift_sz = 0;
-       u16     pkt_cnt;
-       u32     pkt_offset, skb_len, alloc_sz;
-       s32     transfer_len;
-       struct recv_stat        *prxstat;
-       struct phy_stat *pphy_status = NULL;
-       struct sk_buff *pkt_copy = NULL;
-       struct recv_frame       *precvframe = NULL;
-       struct rx_pkt_attrib    *pattrib = NULL;
-       struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
-       struct recv_priv        *precvpriv = &adapt->recvpriv;
-       struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue;
-
-       transfer_len = (s32)pskb->len;
-       pbuf = pskb->data;
-
-       prxstat = (struct recv_stat *)pbuf;
-       pkt_cnt = (le32_to_cpu(prxstat->rxdw2) >> 16) & 0xff;
-
-       do {
-               RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
-                        ("recvbuf2recvframe: rxdesc=offsset 0:0x%08x, 4:0x%08x, 8:0x%08x, C:0x%08x\n",
-                         prxstat->rxdw0, prxstat->rxdw1, prxstat->rxdw2, prxstat->rxdw4));
-
-               prxstat = (struct recv_stat *)pbuf;
-
-               precvframe = rtw_alloc_recvframe(pfree_recv_queue);
-               if (precvframe == NULL) {
-                       RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvbuf2recvframe: precvframe==NULL\n"));
-                       DBG_88E("%s()-%d: rtw_alloc_recvframe() failed! RX Drop!\n", __func__, __LINE__);
-                       goto _exit_recvbuf2recvframe;
-               }
-
-               _rtw_init_listhead(&precvframe->list);
-               precvframe->len = 0;
-
-               update_recvframe_attrib_88e(precvframe, prxstat);
-
-               pattrib = &precvframe->attrib;
-
-               if ((pattrib->crc_err) || (pattrib->icv_err)) {
-                       DBG_88E("%s: RX Warning! crc_err=%d icv_err=%d, skip!\n", __func__, pattrib->crc_err, pattrib->icv_err);
-
-                       rtw_free_recvframe(precvframe, pfree_recv_queue);
-                       goto _exit_recvbuf2recvframe;
-               }
-
-               if ((pattrib->physt) && (pattrib->pkt_rpt_type == NORMAL_RX))
-                       pphy_status = (struct phy_stat *)(pbuf + RXDESC_OFFSET);
-
-               pkt_offset = RXDESC_SIZE + pattrib->drvinfo_sz + pattrib->shift_sz + pattrib->pkt_len;
-
-               if ((pattrib->pkt_len <= 0) || (pkt_offset > transfer_len)) {
-                       RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("recvbuf2recvframe: pkt_len<=0\n"));
-                       DBG_88E("%s()-%d: RX Warning!,pkt_len<=0 or pkt_offset> transfoer_len\n", __func__, __LINE__);
-                       rtw_free_recvframe(precvframe, pfree_recv_queue);
-                       goto _exit_recvbuf2recvframe;
-               }
-
-               /*      Modified by Albert 20101213 */
-               /*      For 8 bytes IP header alignment. */
-               if (pattrib->qos)       /*      Qos data, wireless lan header length is 26 */
-                       shift_sz = 6;
-               else
-                       shift_sz = 0;
-
-               skb_len = pattrib->pkt_len;
-
-               /*  for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet. */
-               /*  modify alloc_sz for recvive crc error packet by thomas 2011-06-02 */
-               if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) {
-                       if (skb_len <= 1650)
-                               alloc_sz = 1664;
-                       else
-                               alloc_sz = skb_len + 14;
-               } else {
-                       alloc_sz = skb_len;
-                       /*      6 is for IP header 8 bytes alignment in QoS packet case. */
-                       /*      8 is for skb->data 4 bytes alignment. */
-                       alloc_sz += 14;
-               }
-
-               pkt_copy = netdev_alloc_skb(adapt->pnetdev, alloc_sz);
-               if (pkt_copy) {
-                       pkt_copy->dev = adapt->pnetdev;
-                       precvframe->pkt = pkt_copy;
-                       precvframe->rx_head = pkt_copy->data;
-                       precvframe->rx_end = pkt_copy->data + alloc_sz;
-                       skb_reserve(pkt_copy, 8 - ((size_t)(pkt_copy->data) & 7));/* force pkt_copy->data at 8-byte alignment address */
-                       skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */
-                       memcpy(pkt_copy->data, (pbuf + pattrib->drvinfo_sz + RXDESC_SIZE), skb_len);
-                       precvframe->rx_tail = pkt_copy->data;
-                       precvframe->rx_data = pkt_copy->data;
-               } else {
-                       if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) {
-                               DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n");
-                               rtw_free_recvframe(precvframe, pfree_recv_queue);
-                               goto _exit_recvbuf2recvframe;
-                       }
-                       precvframe->pkt = skb_clone(pskb, GFP_ATOMIC);
-                       if (precvframe->pkt) {
-                               precvframe->rx_tail = pbuf + pattrib->drvinfo_sz + RXDESC_SIZE;
-                               precvframe->rx_head = precvframe->rx_tail;
-                               precvframe->rx_data = precvframe->rx_tail;
-                               precvframe->rx_end =  pbuf + pattrib->drvinfo_sz + RXDESC_SIZE + alloc_sz;
-                       } else {
-                               DBG_88E("recvbuf2recvframe: skb_clone fail\n");
-                               rtw_free_recvframe(precvframe, pfree_recv_queue);
-                               goto _exit_recvbuf2recvframe;
-                       }
-               }
-
-               recvframe_put(precvframe, skb_len);
-
-               switch (haldata->UsbRxAggMode) {
-               case USB_RX_AGG_DMA:
-               case USB_RX_AGG_MIX:
-                       pkt_offset = (u16)_RND128(pkt_offset);
-                       break;
-               case USB_RX_AGG_USB:
-                       pkt_offset = (u16)_RND4(pkt_offset);
-                       break;
-               case USB_RX_AGG_DISABLE:
-               default:
-                       break;
-               }
-               if (pattrib->pkt_rpt_type == NORMAL_RX) { /* Normal rx packet */
-                       if (pattrib->physt)
-                               update_recvframe_phyinfo_88e(precvframe, (struct phy_stat *)pphy_status);
-                       if (rtw_recv_entry(precvframe) != _SUCCESS) {
-                               RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
-                                       ("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
-                       }
-               } else {
-                       /* enqueue recvframe to txrtp queue */
-                       if (pattrib->pkt_rpt_type == TX_REPORT1) {
-                               /* CCX-TXRPT ack for xmit mgmt frames. */
-                               handle_txrpt_ccx_88e(adapt, precvframe->rx_data);
-                       } else if (pattrib->pkt_rpt_type == TX_REPORT2) {
-                               ODM_RA_TxRPT2Handle_8188E(
-                                                       &haldata->odmpriv,
-                                                       precvframe->rx_data,
-                                                       pattrib->pkt_len,
-                                                       pattrib->MacIDValidEntry[0],
-                                                       pattrib->MacIDValidEntry[1]
-                                                       );
-                       } else if (pattrib->pkt_rpt_type == HIS_REPORT) {
-                               interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data);
-                       }
-                       rtw_free_recvframe(precvframe, pfree_recv_queue);
-               }
-               pkt_cnt--;
-               transfer_len -= pkt_offset;
-               pbuf += pkt_offset;
-               precvframe = NULL;
-               pkt_copy = NULL;
-
-               if (transfer_len > 0 && pkt_cnt == 0)
-                       pkt_cnt = (le32_to_cpu(prxstat->rxdw2)>>16) & 0xff;
-
-       } while ((transfer_len > 0) && (pkt_cnt > 0));
-
-_exit_recvbuf2recvframe:
-
-       return _SUCCESS;
-}
-
-void rtl8188eu_recv_tasklet(void *priv)
-{
-       struct sk_buff *pskb;
-       struct adapter *adapt = (struct adapter *)priv;
-       struct recv_priv *precvpriv = &adapt->recvpriv;
-
-       while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
-               if ((adapt->bDriverStopped) || (adapt->bSurpriseRemoved)) {
-                       DBG_88E("recv_tasklet => bDriverStopped or bSurpriseRemoved\n");
-                       dev_kfree_skb_any(pskb);
-                       break;
-               }
-               recvbuf2recvframe(adapt, pskb);
-               skb_reset_tail_pointer(pskb);
-               pskb->len = 0;
-               skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb);
-       }
-}
-
-static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
-{
-       struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
-       struct adapter  *adapt = (struct adapter *)precvbuf->adapter;
-       struct recv_priv *precvpriv = &adapt->recvpriv;
-
-       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete!!!\n"));
-
-       precvpriv->rx_pending_cnt--;
-
-       if (adapt->bSurpriseRemoved || adapt->bDriverStopped || adapt->bReadPortCancel) {
-               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
-                        ("usb_read_port_complete:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n",
-                        adapt->bDriverStopped, adapt->bSurpriseRemoved));
-
-               precvbuf->reuse = true;
-               DBG_88E("%s() RX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d) bReadPortCancel(%d)\n",
-                       __func__, adapt->bDriverStopped,
-                       adapt->bSurpriseRemoved, adapt->bReadPortCancel);
-               return;
-       }
-
-       if (purb->status == 0) { /* SUCCESS */
-               if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)) {
-                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
-                                ("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n"));
-                       precvbuf->reuse = true;
-                       rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
-                       DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__);
-               } else {
-                       rtw_reset_continual_urb_error(adapter_to_dvobj(adapt));
-
-                       skb_put(precvbuf->pskb, purb->actual_length);
-                       skb_queue_tail(&precvpriv->rx_skb_queue, precvbuf->pskb);
-
-                       if (skb_queue_len(&precvpriv->rx_skb_queue) <= 1)
-                               tasklet_schedule(&precvpriv->recv_tasklet);
-
-                       precvbuf->pskb = NULL;
-                       precvbuf->reuse = false;
-                       rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
-               }
-       } else {
-               RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete : purb->status(%d) != 0\n", purb->status));
-
-               DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
-               skb_put(precvbuf->pskb, purb->actual_length);
-               precvbuf->pskb = NULL;
-
-               if (rtw_inc_and_chk_continual_urb_error(adapter_to_dvobj(adapt)))
-                       adapt->bSurpriseRemoved = true;
-
-               switch (purb->status) {
-               case -EINVAL:
-               case -EPIPE:
-               case -ENODEV:
-               case -ESHUTDOWN:
-                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete:bSurpriseRemoved=true\n"));
-               case -ENOENT:
-                       adapt->bDriverStopped = true;
-                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete:bDriverStopped=true\n"));
-                       break;
-               case -EPROTO:
-               case -EOVERFLOW:
-                       {
-                               struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
-                               haldata->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
-                       }
-                       precvbuf->reuse = true;
-                       rtw_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
-                       break;
-               case -EINPROGRESS:
-                       DBG_88E("ERROR: URB IS IN PROGRESS!\n");
-                       break;
-               default:
-                       break;
-               }
-       }
-}
-
-static u32 usb_read_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
-{
-       struct urb *purb = NULL;
-       struct recv_buf *precvbuf = (struct recv_buf *)rmem;
-       struct adapter          *adapter = pintfhdl->padapter;
-       struct dvobj_priv       *pdvobj = adapter_to_dvobj(adapter);
-       struct recv_priv        *precvpriv = &adapter->recvpriv;
-       struct usb_device       *pusbd = pdvobj->pusbdev;
-       int err;
-       unsigned int pipe;
-       size_t tmpaddr = 0;
-       size_t alignment = 0;
-       u32 ret = _SUCCESS;
-
-
-       if (adapter->bDriverStopped || adapter->bSurpriseRemoved ||
-           adapter->pwrctrlpriv.pnp_bstop_trx) {
-               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
-                        ("usb_read_port:(adapt->bDriverStopped ||adapt->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n"));
-               return _FAIL;
-       }
-
-       if (!precvbuf) {
-               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
-                        ("usb_read_port:precvbuf==NULL\n"));
-               return _FAIL;
-       }
-
-       if ((!precvbuf->reuse) || (precvbuf->pskb == NULL)) {
-               precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue);
-               if (NULL != precvbuf->pskb)
-                       precvbuf->reuse = true;
-       }
-
-       /* re-assign for linux based on skb */
-       if ((!precvbuf->reuse) || (precvbuf->pskb == NULL)) {
-               precvbuf->pskb = netdev_alloc_skb(adapter->pnetdev, MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
-               if (precvbuf->pskb == NULL) {
-                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("init_recvbuf(): alloc_skb fail!\n"));
-                       DBG_88E("#### usb_read_port() alloc_skb fail!#####\n");
-                       return _FAIL;
-               }
-
-               tmpaddr = (size_t)precvbuf->pskb->data;
-               alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
-               skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
-       } else { /* reuse skb */
-               precvbuf->reuse = false;
-       }
-
-       precvpriv->rx_pending_cnt++;
-
-       purb = precvbuf->purb;
-
-       /* translate DMA FIFO addr to pipehandle */
-       pipe = ffaddr2pipehdl(pdvobj, addr);
-
-       usb_fill_bulk_urb(purb, pusbd, pipe,
-                         precvbuf->pskb->data,
-                         MAX_RECVBUF_SZ,
-                         usb_read_port_complete,
-                         precvbuf);/* context is precvbuf */
-
-       err = usb_submit_urb(purb, GFP_ATOMIC);
-       if ((err) && (err != (-EPERM))) {
-               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
-                        ("cannot submit rx in-token(err=0x%.8x), URB_STATUS =0x%.8x",
-                        err, purb->status));
-               DBG_88E("cannot submit rx in-token(err = 0x%08x),urb_status = %d\n",
-                       err, purb->status);
-               ret = _FAIL;
-       }
-
-       return ret;
-}
-
-void rtl8188eu_xmit_tasklet(void *priv)
-{
-       int ret = false;
-       struct adapter *adapt = (struct adapter *)priv;
-       struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
-
-       if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY))
-               return;
-
-       while (1) {
-               if ((adapt->bDriverStopped) ||
-                   (adapt->bSurpriseRemoved) ||
-                   (adapt->bWritePortCancel)) {
-                       DBG_88E("xmit_tasklet => bDriverStopped or bSurpriseRemoved or bWritePortCancel\n");
-                       break;
-               }
-
-               ret = rtl8188eu_xmitframe_complete(adapt, pxmitpriv, NULL);
-
-               if (!ret)
-                       break;
-       }
-}
-
-void rtl8188eu_set_intf_ops(struct _io_ops     *pops)
-{
-       _rtw_memset((u8 *)pops, 0, sizeof(struct _io_ops));
-       pops->_read8 = &usb_read8;
-       pops->_read16 = &usb_read16;
-       pops->_read32 = &usb_read32;
-       pops->_read_mem = &usb_read_mem;
-       pops->_read_port = &usb_read_port;
-       pops->_write8 = &usb_write8;
-       pops->_write16 = &usb_write16;
-       pops->_write32 = &usb_write32;
-       pops->_writeN = &usb_writeN;
-       pops->_write_mem = &usb_write_mem;
-       pops->_write_port = &usb_write_port;
-       pops->_read_port_cancel = &usb_read_port_cancel;
-       pops->_write_port_cancel = &usb_write_port_cancel;
-}
diff --git a/drivers/staging/rtl8188eu/include/Hal8188EReg.h b/drivers/staging/rtl8188eu/include/Hal8188EReg.h
deleted file mode 100644 (file)
index d880b0c..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-/*  */
-/*  File Name: Hal8188EReg.h */
-/*  */
-/*  Description: */
-/*  */
-/*  This file is for RTL8188E register definition. */
-/*  */
-/*  */
-/*  */
-#ifndef        __HAL_8188E_REG_H__
-#define __HAL_8188E_REG_H__
-
-/*  */
-/*  Register Definition */
-/*  */
-#define TRX_ANTDIV_PATH             0x860
-#define RX_ANTDIV_PATH              0xb2c
-#define        ODM_R_A_AGC_CORE1_8188E         0xc50
-
-
-/*  */
-/*  Bitmap Definition */
-/*  */
-#define        BIT_FA_RESET_8188E                      BIT0
-
-
-#endif
diff --git a/drivers/staging/rtl8188eu/include/HalPhyRf.h b/drivers/staging/rtl8188eu/include/HalPhyRf.h
deleted file mode 100644 (file)
index 1ec4971..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-
- #ifndef __HAL_PHY_RF_H__
- #define __HAL_PHY_RF_H__
-
-#define ODM_TARGET_CHNL_NUM_2G_5G      59
-
-void ODM_ResetIQKResult(struct odm_dm_struct *pDM_Odm);
-
-u8 ODM_GetRightChnlPlaceforIQK(u8 chnl);
-
-#endif /*  #ifndef __HAL_PHY_RF_H__ */
index 287e9f9eae4a0b601eac7883149c540236e37963..90a26c119d97fcdda187feb07e763bc1136568f7 100644 (file)
@@ -25,7 +25,7 @@
 #define        IQK_DELAY_TIME_88E              10              /* ms */
 #define        index_mapping_NUM_88E   15
 #define AVG_THERMAL_NUM_88E    4
-
+#define ODM_TARGET_CHNL_NUM_2G_5G      59
 
 void ODM_TxPwrTrackAdjust88E(struct odm_dm_struct *pDM_Odm,
                             u8 Type,   /* 0 = OFDM, 1 = CCK */
index 10cc1a1bcab94a933377b0af98dc1a84dfc59a18..097fcc9b54e1a4576b112b1094817c41d47b47cb 100644 (file)
@@ -40,7 +40,6 @@
 #include <rtw_qos.h>
 #include <rtw_security.h>
 #include <rtw_pwrctrl.h>
-#include <rtw_io.h>
 #include <rtw_eeprom.h>
 #include <sta_info.h>
 #include <rtw_mlme.h>
 #include <rtw_p2p.h>
 #include <rtw_ap.h>
 #include <rtw_mp.h>
-#include <rtw_br_ext.h>
-
-enum _NIC_VERSION {
-       RTL8711_NIC,
-       RTL8712_NIC,
-       RTL8713_NIC,
-       RTL8716_NIC
-};
 
 #define SPEC_DEV_ID_NONE               BIT(0)
 #define SPEC_DEV_ID_DISABLE_HT         BIT(1)
@@ -68,12 +59,6 @@ enum _NIC_VERSION {
 #define SPEC_DEV_ID_RF_CONFIG_2T2R     BIT(4)
 #define SPEC_DEV_ID_ASSIGN_IFNAME      BIT(5)
 
-struct specific_device_id {
-       u32             flags;
-       u16             idVendor;
-       u16             idProduct;
-};
-
 struct registry_priv {
        u8      chip_version;
        u8      rfintfs;
@@ -165,7 +150,6 @@ struct rt_firmware {
 
 struct dvobj_priv {
        struct adapter *if1;
-       struct adapter *if2;
        struct rt_firmware firmware;
 
        /* For 92D, DMDP have 2 interface. */
@@ -177,8 +161,6 @@ struct dvobj_priv {
        int     RtOutPipe[3];
        u8      Queue2Pipe[HW_QUEUE_ENTRY];/* for out pipe mapping */
 
-       u8      irq_alloc;
-
 /*-------- below is for USB INTERFACE --------*/
 
        u8      nr_endpoint;
@@ -186,17 +168,12 @@ struct dvobj_priv {
        u8      RtNumInPipes;
        u8      RtNumOutPipes;
        int     ep_num[5]; /* endpoint number */
-       int     RegUsbSS;
-       struct semaphore usb_suspend_sema;
        struct mutex  usb_vendor_req_mutex;
 
-       u8 *usb_alloc_vendor_req_buf;
        u8 *usb_vendor_req_buf;
 
        struct usb_interface *pusbintf;
        struct usb_device *pusbdev;
-
-       atomic_t continual_urb_error;
 };
 
 static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
@@ -206,29 +183,8 @@ static inline struct device *dvobj_to_dev(struct dvobj_priv *dvobj)
        return &dvobj->pusbintf->dev;
 };
 
-enum _IFACE_TYPE {
-       IFACE_PORT0, /* mapping to port0 for C/D series chips */
-       IFACE_PORT1, /* mapping to port1 for C/D series chip */
-       MAX_IFACE_PORT,
-};
-
-enum _ADAPTER_TYPE {
-       PRIMARY_ADAPTER,
-       SECONDARY_ADAPTER,
-       MAX_ADAPTER,
-};
-
-enum driver_state {
-       DRIVER_NORMAL = 0,
-       DRIVER_DISAPPEAR = 1,
-       DRIVER_REPLACE_DONGLE = 2,
-};
-
 struct adapter {
-       int     DriverState;/* for disable driver using module, use dongle toi
-                            * replace module. */
        int     pid[3];/* process id from UI, 0:wps, 1:hostapd, 2:dhcpcd */
-       int     bDongle;/* build-in module or external dongle */
        u16     chip_type;
 
        struct dvobj_priv *dvobj;
@@ -236,7 +192,6 @@ struct adapter {
        struct  mlme_ext_priv mlmeextpriv;
        struct  cmd_priv        cmdpriv;
        struct  evt_priv        evtpriv;
-       struct  io_priv iopriv;
        struct  xmit_priv       xmitpriv;
        struct  recv_priv       recvpriv;
        struct  sta_priv        stapriv;
@@ -254,26 +209,15 @@ struct adapter {
        struct wifidirect_info  wdinfo;
 
        void *HalData;
-       u32 hal_data_sz;
        struct hal_ops  HalFunc;
 
        s32     bDriverStopped;
        s32     bSurpriseRemoved;
-       s32     bCardDisableWOHSM;
-
-       u32     IsrContent;
-       u32     ImrContent;
 
-       u8      EepromAddressSize;
        u8      hw_init_completed;
-       u8      bDriverIsGoingToUnload;
-       u8      init_adpt_in_progress;
-       u8      bHaltInProgress;
 
        void *cmdThread;
        void *evtThread;
-       void *xmitThread;
-       void *recvThread;
        void (*intf_start)(struct adapter *adapter);
        void (*intf_stop)(struct adapter *adapter);
        struct  net_device *pnetdev;
@@ -293,7 +237,6 @@ struct adapter {
 
        int net_closed;
        u8 bFWReady;
-       u8 bBTFWReady;
        u8 bReadPortCancel;
        u8 bWritePortCancel;
        u8 bRxRSSIDisplay;
@@ -305,20 +248,10 @@ struct adapter {
         * upper application reads it. */
        u8 bShowGetP2PState;
 #endif
-       struct adapter *pbuddy_adapter;
 
-       struct mutex *hw_init_mutex;
+       struct mutex hw_init_mutex;
 
        spinlock_t br_ext_lock;
-       struct nat25_network_db_entry   *nethash[NAT25_HASH_SIZE];
-       int                             pppoe_connection_in_progress;
-       unsigned char                   pppoe_addr[MACADDRLEN];
-       unsigned char                   scdb_mac[MACADDRLEN];
-       unsigned char                   scdb_ip[4];
-       struct nat25_network_db_entry   *scdb_entry;
-       unsigned char                   br_mac[MACADDRLEN];
-       unsigned char                   br_ip[4];
-       struct br_ext_info              ethBrExtInfo;
 
        u8      fix_rate;
 
index c59fccde39c527971b7123a3e49c9667605f694a..fb797c762ba2f89c7e05fb6b5587c930a4924028 100644 (file)
@@ -157,7 +157,6 @@ struct hal_ops {
        u32     (*inirp_deinit)(struct adapter *padapter);
 
        s32     (*init_xmit_priv)(struct adapter *padapter);
-       void    (*free_xmit_priv)(struct adapter *padapter);
 
        s32     (*init_recv_priv)(struct adapter *padapter);
        void    (*free_recv_priv)(struct adapter *padapter);
@@ -197,9 +196,6 @@ struct hal_ops {
                                       enum hal_def_variable eVariable,
                                       void *pValue);
 
-       void    (*GetHalODMVarHandler)(struct adapter *padapter,
-                                      enum hal_odm_variable eVariable,
-                                      void *pValue1, bool bSet);
        void    (*SetHalODMVarHandler)(struct adapter *padapter,
                                       enum hal_odm_variable eVariable,
                                       void *pValue1, bool bSet);
@@ -210,8 +206,6 @@ struct hal_ops {
 
        void    (*Add_RateATid)(struct adapter *adapter, u32 bitmap, u8 arg,
                                u8 rssi_level);
-       void    (*run_thread)(struct adapter *adapter);
-       void    (*cancel_thread)(struct adapter *adapter);
 
        u8      (*AntDivBeforeLinkHandler)(struct adapter *adapter);
        void    (*AntDivCompareHandler)(struct adapter *adapter,
@@ -233,29 +227,7 @@ struct hal_ops {
                               enum rf_radio_path eRFPath, u32 RegAddr,
                               u32 BitMask, u32 Data);
 
-       void (*EfusePowerSwitch)(struct adapter *padapter, u8 bWrite,
-                                u8 PwrState);
-       void (*ReadEFuse)(struct adapter *padapter, u8 efuseType, u16 _offset,
-                         u16 _size_byte, u8 *pbuf, bool bPseudoTest);
-       void (*EFUSEGetEfuseDefinition)(struct adapter *padapter, u8 efuseType,
-                                       u8 type, void *pOut, bool bPseudoTest);
-       u16     (*EfuseGetCurrentSize)(struct adapter *padapter, u8 efuseType,
-                                      bool bPseudoTest);
-       int     (*Efuse_PgPacketRead)(struct adapter *adapter, u8 offset,
-                                     u8 *data, bool bPseudoTest);
-       int     (*Efuse_PgPacketWrite)(struct adapter *padapter, u8 offset,
-                                      u8 word_en, u8 *data, bool bPseudoTest);
-       u8      (*Efuse_WordEnableDataWrite)(struct adapter *padapter,
-                                            u16 efuse_addr, u8 word_en,
-                                            u8 *data, bool bPseudoTest);
-       bool    (*Efuse_PgPacketWrite_BT)(struct adapter *padapter, u8 offset,
-                                         u8 word_en, u8 *data, bool test);
-
        void (*sreset_init_value)(struct adapter *padapter);
-       void (*sreset_reset_value)(struct adapter *padapter);
-       void (*silentreset)(struct adapter *padapter);
-       void (*sreset_xmit_status_check)(struct adapter *padapter);
-       void (*sreset_linked_status_check) (struct adapter *padapter);
        u8 (*sreset_get_wifi_status)(struct adapter *padapter);
 
        int (*IOL_exec_cmds_sync)(struct adapter *padapter,
@@ -317,9 +289,6 @@ u8 rtw_hal_get_def_var(struct adapter *padapter,
 void rtw_hal_set_odm_var(struct adapter *padapter,
                         enum hal_odm_variable eVariable, void *pValue1,
                         bool bSet);
-void rtw_hal_get_odm_var(struct adapter *padapter,
-                        enum hal_odm_variable eVariable,
-                        void *pValue1, bool bSet);
 
 void rtw_hal_enable_interrupt(struct adapter *padapter);
 void rtw_hal_disable_interrupt(struct adapter *padapter);
@@ -332,7 +301,6 @@ s32 rtw_hal_mgnt_xmit(struct adapter *padapter,
                          struct xmit_frame *pmgntframe);
 
 s32    rtw_hal_init_xmit_priv(struct adapter *padapter);
-void   rtw_hal_free_xmit_priv(struct adapter *padapter);
 
 s32    rtw_hal_init_recv_priv(struct adapter *padapter);
 void   rtw_hal_free_recv_priv(struct adapter *padapter);
@@ -341,8 +309,6 @@ void rtw_hal_update_ra_mask(struct adapter *padapter, u32 mac_id, u8 level);
 void   rtw_hal_add_ra_tid(struct adapter *adapt, u32 bitmap, u8 arg, u8 level);
 void   rtw_hal_clone_data(struct adapter *dst_adapt,
                           struct adapter *src_adapt);
-void   rtw_hal_start_thread(struct adapter *padapter);
-void   rtw_hal_stop_thread(struct adapter *padapter);
 
 void rtw_hal_bcn_related_reg_setting(struct adapter *padapter);
 
@@ -368,10 +334,6 @@ void       rtw_hal_antdiv_rssi_compared(struct adapter *padapter,
                                     struct wlan_bssid_ex *src);
 
 void rtw_hal_sreset_init(struct adapter *padapter);
-void rtw_hal_sreset_reset(struct adapter *padapter);
-void rtw_hal_sreset_reset_value(struct adapter *padapter);
-void rtw_hal_sreset_xmit_status_check(struct adapter *padapter);
-void rtw_hal_sreset_linked_status_check(struct adapter *padapter);
 u8   rtw_hal_sreset_get_wifi_status(struct adapter *padapter);
 
 int rtw_hal_iol_cmd(struct adapter  *adapter, struct xmit_frame *xmit_frame,
index 2eb769b3f35d18febf86e0f559bc6cc6f94b69c1..0ab8254ce901f43e4baf21f3253f0d1e4005106d 100644 (file)
@@ -30,6 +30,7 @@
 #include <osdep_service.h>
 #include <drv_types.h>
 #include <hal_intf.h>
+#include <usb_ops_linux.h>
 
 /* 2 OutSrc Header Files */
 
@@ -39,7 +40,6 @@
 #include "odm_RegDefine11AC.h"
 #include "odm_RegDefine11N.h"
 
-#include "HalPhyRf.h"
 #include "HalPhyRf_8188e.h"/* for IQK,LCK,Power-tracking */
 #include "Hal8188ERateAdaptive.h"/* for  RA,Power training */
 #include "rtl8188e_hal.h"
@@ -49,7 +49,6 @@
 #include "HalHWImg8188E_MAC.h"
 #include "HalHWImg8188E_RF.h"
 #include "HalHWImg8188E_BB.h"
-#include "Hal8188EReg.h"
 
 #include "odm_RegConfig8188E.h"
 #include "odm_RTL8188E.h"
@@ -72,7 +71,6 @@ void odm_RefreshRateAdaptiveMaskMP(struct odm_dm_struct *pDM_Odm);
 void odm_DynamicBBPowerSaving(struct odm_dm_struct *pDM_Odm);
 void odm_SwAntDivChkAntSwitch(struct odm_dm_struct *pDM_Odm, u8 Step);
 void odm_EdcaTurboCheck(struct odm_dm_struct *pDM_Odm);
-void odm_DynamicTxPower(struct odm_dm_struct *pDM_Odm);
 void odm_CommonInfoSelfInit(struct odm_dm_struct *pDM_Odm);
 void odm_RSSIMonitorCheck(struct odm_dm_struct *pDM_Odm);
 void odm_RefreshRateAdaptiveMask(struct odm_dm_struct *pDM_Odm);
index c4599c583b59c00e40ec5b8d97ec98e0b18b4042..523141a9eab49895c08cbae898bd41891093218c 100644 (file)
 #include <osdep_service.h>
 #include <drv_types.h>
 
-struct intf_priv {
-       u8 *intf_dev;
-       u32     max_iosz;       /* USB2.0: 128, USB1.1: 64, SDIO:64 */
-       u32     max_xmitsz; /* USB2.0: unlimited, SDIO:512 */
-       u32     max_recvsz; /* USB2.0: unlimited, SDIO:512 */
-
-       u8 *io_rwmem;
-       u8 *allocated_io_rwmem;
-       u32     io_wsz; /* unit: 4bytes */
-       u32     io_rsz;/* unit: 4bytes */
-       u8 intf_status;
-
-       void (*_bus_io)(u8 *priv);
-
-/*
-Under Sync. IRP (SDIO/USB)
-A protection mechanism is necessary for the io_rwmem(read/write protocol)
-
-Under Async. IRP (SDIO/USB)
-The protection mechanism is through the pending queue.
-*/
-       struct mutex ioctl_mutex;
-       /*  when in USB, IO is through interrupt in/out endpoints */
-       struct usb_device       *udev;
-       struct urb *piorw_urb;
-       u8 io_irp_cnt;
-       u8 bio_irp_pending;
-       struct semaphore  io_retevt;
-       struct timer_list io_timer;
-       u8 bio_irp_timeout;
-       u8 bio_timer_cancel;
-};
-
 u8 rtw_init_drv_sw(struct adapter *padapter);
 u8 rtw_free_drv_sw(struct adapter *padapter);
 u8 rtw_reset_drv_sw(struct adapter *padapter);
@@ -77,7 +44,5 @@ void rtw_ips_dev_unload(struct adapter *padapter);
 
 int rtw_ips_pwr_up(struct adapter *padapter);
 void rtw_ips_pwr_down(struct adapter *padapter);
-int rtw_hw_suspend(struct adapter *padapter);
-int rtw_hw_resume(struct adapter *padapter);
 
 #endif /* _OSDEP_INTF_H_ */
index 3859acd358a62a175f47ad41761ecd2c9e6dd01e..95131fe5c2b54274ad1e95c27372e81e4fc93a75 100644 (file)
@@ -76,11 +76,6 @@ static inline int _enter_critical_mutex(struct mutex *pmutex,
        return ret;
 }
 
-static inline void rtw_list_delete(struct list_head *plist)
-{
-       list_del_init(plist);
-}
-
 static inline void _init_timer(struct timer_list *ptimer,
                               struct  net_device *nic_hdl,
                               void *pfunc, void *cntx)
@@ -95,22 +90,11 @@ static inline void _set_timer(struct timer_list *ptimer, u32 delay_time)
        mod_timer(ptimer , (jiffies+(delay_time*HZ/1000)));
 }
 
-static inline void _cancel_timer(struct timer_list *ptimer, u8 *bcancelled)
-{
-       del_timer_sync(ptimer);
-       *bcancelled = true;/* true ==1; false==0 */
-}
-
 #define RTW_TIMER_HDL_ARGS void *FunctionContext
 #define RTW_TIMER_HDL_NAME(name) rtw_##name##_timer_hdl
 #define RTW_DECLARE_TIMER_HDL(name) \
        void RTW_TIMER_HDL_NAME(name)(RTW_TIMER_HDL_ARGS)
 
-static inline void _cancel_workitem_sync(struct work_struct *pwork)
-{
-       cancel_work_sync(pwork);
-}
-
 static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
 {
        return  netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 0)) &&
@@ -119,9 +103,6 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
                netif_tx_queue_stopped(netdev_get_tx_queue(pnetdev, 3));
 }
 
-#ifndef BIT
-       #define BIT(x)  (1 << (x))
-#endif
 
 #define BIT0   0x00000001
 #define BIT1   0x00000002
@@ -163,137 +144,19 @@ static inline int rtw_netif_queue_stopped(struct net_device *pnetdev)
 
 extern int RTW_STATUS_CODE(int error_code);
 
-/* flags used for rtw_update_mem_stat() */
-enum {
-       MEM_STAT_VIR_ALLOC_SUCCESS,
-       MEM_STAT_VIR_ALLOC_FAIL,
-       MEM_STAT_VIR_FREE,
-       MEM_STAT_PHY_ALLOC_SUCCESS,
-       MEM_STAT_PHY_ALLOC_FAIL,
-       MEM_STAT_PHY_FREE,
-       MEM_STAT_TX, /* used to distinguish TX/RX, asigned from caller */
-       MEM_STAT_TX_ALLOC_SUCCESS,
-       MEM_STAT_TX_ALLOC_FAIL,
-       MEM_STAT_TX_FREE,
-       MEM_STAT_RX, /* used to distinguish TX/RX, asigned from caller */
-       MEM_STAT_RX_ALLOC_SUCCESS,
-       MEM_STAT_RX_ALLOC_FAIL,
-       MEM_STAT_RX_FREE
-};
-
-extern unsigned char MCS_rate_2R[16];
-extern unsigned char MCS_rate_1R[16];
-extern unsigned char RTW_WPA_OUI[];
-extern unsigned char WPA_TKIP_CIPHER[4];
-extern unsigned char RSN_TKIP_CIPHER[4];
-
 #define rtw_update_mem_stat(flag, sz) do {} while (0)
-u8 *_rtw_zmalloc(u32 sz);
 u8 *_rtw_malloc(u32 sz);
-void _rtw_mfree(u8 *pbuf, u32 sz);
 #define rtw_malloc(sz)                 _rtw_malloc((sz))
-#define rtw_zmalloc(sz)                        _rtw_zmalloc((sz))
-#define rtw_mfree(pbuf, sz)            _rtw_mfree((pbuf), (sz))
 
 void *rtw_malloc2d(int h, int w, int size);
-void rtw_mfree2d(void *pbuf, int h, int w, int size);
-
-void _rtw_memcpy(void *dec, void *sour, u32 sz);
-void _rtw_memset(void *pbuf, int c, u32 sz);
-
-void _rtw_init_listhead(struct list_head *list);
-u32  rtw_is_list_empty(struct list_head *phead);
-void rtw_list_insert_head(struct list_head *plist, struct list_head *phead);
-void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead);
-void rtw_list_delete(struct list_head *plist);
 
 u32  _rtw_down_sema(struct semaphore *sema);
 
 void _rtw_init_queue(struct __queue *pqueue);
-u32  _rtw_queue_empty(struct __queue *pqueue);
-u32  rtw_end_of_queue_search(struct list_head *queue,
-                            struct list_head *pelement);
 
 u32  rtw_systime_to_ms(u32 systime);
 u32  rtw_ms_to_systime(u32 ms);
 s32  rtw_get_passing_time_ms(u32 start);
-s32  rtw_get_time_interval_ms(u32 start, u32 end);
-
-void rtw_sleep_schedulable(int ms);
-
-u32  rtw_atoi(u8 *s);
-
-static inline unsigned char _cancel_timer_ex(struct timer_list *ptimer)
-{
-       return del_timer_sync(ptimer);
-}
-
-static inline void thread_enter(char *name)
-{
-       allow_signal(SIGTERM);
-}
-
-static inline void flush_signals_thread(void)
-{
-       if (signal_pending(current))
-               flush_signals(current);
-}
-
-#define _RND(sz, r) ((((sz)+((r)-1))/(r))*(r))
-#define RND4(x)        (((x >> 2) + (((x & 3) == 0) ?  0 : 1)) << 2)
-
-static inline u32 _RND4(u32 sz)
-{
-       u32     val;
-
-       val = ((sz >> 2) + ((sz & 3) ? 1 : 0)) << 2;
-       return val;
-}
-
-static inline u32 _RND8(u32 sz)
-{
-       u32     val;
-
-       val = ((sz >> 3) + ((sz & 7) ? 1 : 0)) << 3;
-       return val;
-}
-
-static inline u32 _RND128(u32 sz)
-{
-       u32     val;
-
-       val = ((sz >> 7) + ((sz & 127) ? 1 : 0)) << 7;
-       return val;
-}
-
-static inline u32 _RND256(u32 sz)
-{
-       u32     val;
-
-       val = ((sz >> 8) + ((sz & 255) ? 1 : 0)) << 8;
-       return val;
-}
-
-static inline u32 _RND512(u32 sz)
-{
-       u32     val;
-
-       val = ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9;
-       return val;
-}
-
-static inline u32 bitshift(u32 bitmask)
-{
-       u32 i;
-
-       for (i = 0; i <= 31; i++)
-               if (((bitmask>>i) &  0x1) == 1)
-                       break;
-       return i;
-}
-
-/*  limitation of path length */
-#define PATH_LENGTH_MAX PATH_MAX
 
 struct rtw_netdev_priv_indicator {
        void *priv;
@@ -319,35 +182,12 @@ void rtw_free_netdev(struct net_device *netdev);
 #define rtw_signal_process(pid, sig) kill_pid(find_vpid((pid)), (sig), 1)
 
 u64 rtw_modular64(u64 x, u64 y);
-u64 rtw_division64(u64 x, u64 y);
 
 /* Macros for handling unaligned memory accesses */
 
-#define RTW_GET_BE16(a) ((u16) (((a)[0] << 8) | (a)[1]))
-#define RTW_PUT_BE16(a, val)                   \
-       do {                                    \
-               (a)[0] = ((u16) (val)) >> 8;    \
-               (a)[1] = ((u16) (val)) & 0xff;  \
-       } while (0)
-
-#define RTW_GET_LE16(a) ((u16) (((a)[1] << 8) | (a)[0]))
-#define RTW_PUT_LE16(a, val)                   \
-       do {                                    \
-               (a)[1] = ((u16) (val)) >> 8;    \
-               (a)[0] = ((u16) (val)) & 0xff;  \
-       } while (0)
-
 #define RTW_GET_BE24(a) ((((u32) (a)[0]) << 16) | (((u32) (a)[1]) << 8) | \
                         ((u32) (a)[2]))
 
-#define RTW_PUT_BE32(a, val)                                   \
-       do {                                                    \
-               (a)[0] = (u8) ((((u32) (val)) >> 24) & 0xff);   \
-               (a)[1] = (u8) ((((u32) (val)) >> 16) & 0xff);   \
-               (a)[2] = (u8) ((((u32) (val)) >> 8) & 0xff);    \
-               (a)[3] = (u8) (((u32) (val)) & 0xff);           \
-       } while (0)
-
 void rtw_buf_free(u8 **buf, u32 *buf_len);
 void rtw_buf_update(u8 **buf, u32 *buf_len, u8 *src, u32 src_len);
 
@@ -363,6 +203,5 @@ bool rtw_cbuf_empty(struct rtw_cbuf *cbuf);
 bool rtw_cbuf_push(struct rtw_cbuf *cbuf, void *buf);
 void *rtw_cbuf_pop(struct rtw_cbuf *cbuf);
 struct rtw_cbuf *rtw_cbuf_alloc(u32 size);
-int wifirate2_ratetbl_inx(unsigned char rate);
 
 #endif
index a4fd95798f003b6f7ea6221d68e4885fe19d264b..a52a6960b8e13e937a988ae8cf5197bf012ede13 100644 (file)
@@ -46,7 +46,6 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *adapt, struct recv_buf *buf);
 void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf);
 
 void rtw_init_recv_timer(struct recv_reorder_ctrl *preorder_ctrl);
-int nat25_handle_frame(struct adapter *priv, struct sk_buff *skb);
 int _netdev_open(struct net_device *pnetdev);
 int netdev_open(struct net_device *pnetdev);
 int netdev_close(struct net_device *pnetdev);
index b32bc28503d0a6081fadc96894fa51704268d35c..460116949a9b4bdd113f23fda70c4d18e38cd1f6 100644 (file)
@@ -116,7 +116,6 @@ void rtl8188e_Add_RateATid(struct adapter *padapter, u32 bitmap, u8 arg,
 void rtl8188e_set_p2p_ps_offload_cmd(struct adapter *adapt, u8 p2p_ps_state);
 #endif /* CONFIG_88EU_P2P */
 
-void CheckFwRsvdPageContent(struct adapter *adapt);
 void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt);
 
 #endif/* __RTL8188E_CMD_H__ */
index fe3b4545cdbb430ae31918c3277371ada9d30b60..ed3204fa993c1947817f63aaf9537362d6539e8f 100644 (file)
@@ -31,9 +31,8 @@
 #include "rtl8188e_xmit.h"
 #include "rtl8188e_cmd.h"
 #include "Hal8188EPwrSeq.h"
-#include "rtl8188e_sreset.h"
 #include "rtw_efuse.h"
-
+#include "rtw_sreset.h"
 #include "odm_precomp.h"
 
 /*  Fw Array */
@@ -458,17 +457,17 @@ void Hal_ReadPowerSavingMode88E(struct adapter *pAdapter, u8 *hwinfo,
 
 bool HalDetectPwrDownMode88E(struct adapter *Adapter);
 
-void Hal_InitChannelPlan(struct adapter *padapter);
 void rtl8188e_set_hal_ops(struct hal_ops *pHalFunc);
 
 /*  register */
 void SetBcnCtrlReg(struct adapter *padapter, u8 SetBits, u8 ClearBits);
 
-void rtl8188e_clone_haldata(struct adapter *dst, struct adapter *src);
 void rtl8188e_start_thread(struct adapter *padapter);
 void rtl8188e_stop_thread(struct adapter *padapter);
 
 void rtw_IOL_cmd_tx_pkt_buf_dump(struct adapter  *Adapter, int len);
+s32 iol_execute(struct adapter *padapter, u8 control);
+void iol_mode_enable(struct adapter *padapter, u8 enable);
 s32 rtl8188e_iol_efuse_patch(struct adapter *padapter);
 void rtw_cancel_all_timer(struct adapter *padapter);
 
diff --git a/drivers/staging/rtl8188eu/include/rtl8188e_sreset.h b/drivers/staging/rtl8188eu/include/rtl8188e_sreset.h
deleted file mode 100644 (file)
index a29e695..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#ifndef _RTL8188E_SRESET_H_
-#define _RTL8188E_SRESET_H_
-
-#include <osdep_service.h>
-#include <drv_types.h>
-#include <rtw_sreset.h>
-
-void rtl8188e_silentreset_for_specific_platform(struct adapter *padapter);
-void rtl8188e_sreset_xmit_status_check(struct adapter *padapter);
-void rtl8188e_sreset_linked_status_check(struct adapter *padapter);
-
-#endif
index cf7267a53659c0e7d459c9bae82e926e7a66c8bd..0b96d42e290be191bb96138433906938e7d6596b 100644 (file)
@@ -159,7 +159,6 @@ struct txrpt_ccx_88e {
 void rtl8188e_fill_fake_txdesc(struct adapter *padapter, u8 *pDesc,
                               u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
 s32 rtl8188eu_init_xmit_priv(struct adapter *padapter);
-void rtl8188eu_free_xmit_priv(struct adapter *padapter);
 s32 rtl8188eu_hal_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_mgnt_xmit(struct adapter *padapter, struct xmit_frame *frame);
 s32 rtl8188eu_xmit_buf_handler(struct adapter *padapter);
diff --git a/drivers/staging/rtl8188eu/include/rtw_br_ext.h b/drivers/staging/rtl8188eu/include/rtw_br_ext.h
deleted file mode 100644 (file)
index f21e7a4..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#ifndef _RTW_BR_EXT_H_
-#define _RTW_BR_EXT_H_
-
-#define MACADDRLEN             6
-#define _DEBUG_ERR             DBG_88E
-#define _DEBUG_INFO            DBG_88E
-#define DEBUG_WARN             DBG_88E
-#define DEBUG_INFO             DBG_88E
-#define DEBUG_ERR              DBG_88E
-#define GET_MY_HWADDR(padapter)                ((padapter)->eeprompriv.mac_addr)
-
-#define NAT25_HASH_BITS                4
-#define NAT25_HASH_SIZE                (1 << NAT25_HASH_BITS)
-#define NAT25_AGEING_TIME      300
-
-#define MAX_NETWORK_ADDR_LEN   17
-
-struct nat25_network_db_entry {
-       struct nat25_network_db_entry   *next_hash;
-       struct nat25_network_db_entry   **pprev_hash;
-       atomic_t        use_count;
-       unsigned char   macAddr[6];
-       unsigned long   ageing_timer;
-       unsigned char   networkAddr[MAX_NETWORK_ADDR_LEN];
-};
-
-enum NAT25_METHOD {
-       NAT25_MIN,
-       NAT25_CHECK,
-       NAT25_INSERT,
-       NAT25_LOOKUP,
-       NAT25_PARSE,
-       NAT25_MAX
-};
-
-struct br_ext_info {
-       unsigned int    nat25_disable;
-       unsigned int    macclone_enable;
-       unsigned int    dhcp_bcst_disable;
-       int     addPPPoETag;            /* 1: Add PPPoE relay-SID, 0: disable */
-       unsigned char   nat25_dmzMac[MACADDRLEN];
-       unsigned int    nat25sc_disable;
-};
-
-void nat25_db_cleanup(struct adapter *priv);
-
-#endif /*  _RTW_BR_EXT_H_ */
index 66467f711a59956b2c501f1d9b550e210016cdbb..c478bdebcbd98455f951fd69041313b638fc0322 100644 (file)
@@ -77,7 +77,7 @@ struct        evt_priv {
 
 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
 do {\
-       _rtw_init_listhead(&pcmd->list);\
+       INIT_LIST_HEAD(&pcmd->list);\
        pcmd->cmdcode = code;\
        pcmd->parmbuf = (u8 *)(pparm);\
        pcmd->cmdsz = sizeof(*pparm);\
index ae05141f5ddf97fbc5b1da65072b06d6de98085e..a38616e3cad2825bcc044992857792b17fc2df0b 100644 (file)
@@ -23,7 +23,7 @@
 #include <osdep_service.h>
 #include <drv_types.h>
 
-
+#define DRIVERVERSION  "v4.1.4_6773.20130222"
 #define _drv_always_                   1
 #define _drv_emerg_                    2
 #define _drv_alert_                    3
index df51355e0f324c6533e3958430ba7879ef433fcf..b608b92bd22c44c3c0ef4de363f062b37ce4b128 100644 (file)
@@ -99,52 +99,29 @@ struct efuse_hal {
        u8 fakeBTEfuseModifiedMap[EFUSE_BT_MAX_MAP_LEN];
 };
 
-/*------------------------Export global variable----------------------------*/
-extern u8 fakeEfuseBank;
-extern u32 fakeEfuseUsedBytes;
-extern u8 fakeEfuseContent[];
-extern u8 fakeEfuseInitMap[];
-extern u8 fakeEfuseModifiedMap[];
-
-extern u32 BTEfuseUsedBytes;
-extern u8 BTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
-extern u8 BTEfuseInitMap[];
-extern u8 BTEfuseModifiedMap[];
-
-extern u32 fakeBTEfuseUsedBytes;
-extern u8 fakeBTEfuseContent[EFUSE_MAX_BT_BANK][EFUSE_MAX_HW_SIZE];
-extern u8 fakeBTEfuseInitMap[];
-extern u8 fakeBTEfuseModifiedMap[];
-/*------------------------Export global variable----------------------------*/
-
 u8 efuse_GetCurrentSize(struct adapter *adapter, u16 *size);
 u16 efuse_GetMaxSize(struct adapter *adapter);
 u8 rtw_efuse_access(struct adapter *adapter, u8 read, u16 start_addr,
                    u16 cnts, u8 *data);
 u8 rtw_efuse_map_read(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
 u8 rtw_efuse_map_write(struct adapter *adapter, u16 addr, u16 cnts, u8 *data);
-u8 rtw_BT_efuse_map_read(struct adapter *adapter, u16 addr,
-                        u16 cnts, u8 *data);
-u8 rtw_BT_efuse_map_write(struct adapter *adapter, u16 addr,
-                         u16 cnts, u8 *data);
-u16 Efuse_GetCurrentSize(struct adapter *adapter, u8 efusetype, bool test);
+u16 Efuse_GetCurrentSize(struct adapter *adapter);
 u8 Efuse_CalculateWordCnts(u8 word_en);
-void ReadEFuseByte(struct adapter *adapter, u16 _offset, u8 *pbuf, bool test);
 void EFUSE_GetEfuseDefinition(struct adapter *adapt, u8 type, u8 type1,
-                             void *out, bool bPseudoTest);
-u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data, bool test);
-u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data, bool test);
+                             void *out);
+u8 efuse_OneByteRead(struct adapter *adapter, u16 addr, u8 *data);
+u8 efuse_OneByteWrite(struct adapter *adapter, u16 addr, u8 data);
 
+void efuse_ReadEFuse(struct adapter *Adapter, u8 efuseType, u16 _offset,
+               u16 _size_byte, u8 *pbuf);
 void Efuse_PowerSwitch(struct adapter *adapt, u8 bWrite, u8  PwrState);
-int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data, bool test);
-int Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data,
-                       bool test);
+int Efuse_PgPacketRead(struct adapter *adapt, u8 offset, u8 *data);
+bool Efuse_PgPacketWrite(struct adapter *adapter, u8 offset, u8 word, u8 *data);
 void efuse_WordEnableDataRead(u8 word_en, u8 *sourdata, u8 *targetdata);
 u8 Efuse_WordEnableDataWrite(struct adapter *adapter, u16 efuse_addr,
-                            u8 word_en, u8 *data, bool test);
+                            u8 word_en, u8 *data);
 
-u8 EFUSE_Read1Byte(struct adapter *adapter, u16 address);
-void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype, bool test);
+void EFUSE_ShadowMapUpdate(struct adapter *adapter, u8 efusetype);
 void EFUSE_ShadowRead(struct adapter *adapt, u8 type, u16 offset, u32 *val);
 
 #endif
diff --git a/drivers/staging/rtl8188eu/include/rtw_io.h b/drivers/staging/rtl8188eu/include/rtw_io.h
deleted file mode 100644 (file)
index e8790f8..0000000
+++ /dev/null
@@ -1,343 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-
-#ifndef _RTW_IO_H_
-#define _RTW_IO_H_
-
-#include <osdep_service.h>
-#include <osdep_intf.h>
-
-#include <asm/byteorder.h>
-#include <linux/semaphore.h>
-#include <linux/list.h>
-#include <linux/spinlock.h>
-#include <linux/atomic.h>
-
-#include <linux/usb.h>
-#include <linux/usb/ch9.h>
-
-#define rtw_usb_buffer_alloc(dev, size, dma)                           \
-       usb_alloc_coherent((dev), (size), (in_interrupt() ?             \
-                          GFP_ATOMIC : GFP_KERNEL), (dma))
-#define rtw_usb_buffer_free(dev, size, addr, dma)                      \
-       usb_free_coherent((dev), (size), (addr), (dma))
-
-#define NUM_IOREQ              8
-
-#define MAX_PROT_SZ    (64-16)
-
-#define _IOREADY               0
-#define _IO_WAIT_COMPLETE      1
-#define _IO_WAIT_RSP           2
-
-/*  IO COMMAND TYPE */
-#define _IOSZ_MASK_            (0x7F)
-#define _IO_WRITE_             BIT(7)
-#define _IO_FIXED_             BIT(8)
-#define _IO_BURST_             BIT(9)
-#define _IO_BYTE_              BIT(10)
-#define _IO_HW_                        BIT(11)
-#define _IO_WORD_              BIT(12)
-#define _IO_SYNC_              BIT(13)
-#define _IO_CMDMASK_           (0x1F80)
-
-/*
-       For prompt mode accessing, caller shall free io_req
-       Otherwise, io_handler will free io_req
-*/
-
-/*  IO STATUS TYPE */
-#define _IO_ERR_               BIT(2)
-#define _IO_SUCCESS_           BIT(1)
-#define _IO_DONE_              BIT(0)
-
-#define IO_RD32                        (_IO_SYNC_ | _IO_WORD_)
-#define IO_RD16                        (_IO_SYNC_ | _IO_HW_)
-#define IO_RD8                 (_IO_SYNC_ | _IO_BYTE_)
-
-#define IO_RD32_ASYNC          (_IO_WORD_)
-#define IO_RD16_ASYNC          (_IO_HW_)
-#define IO_RD8_ASYNC           (_IO_BYTE_)
-
-#define IO_WR32                        (_IO_WRITE_ | _IO_SYNC_ | _IO_WORD_)
-#define IO_WR16                        (_IO_WRITE_ | _IO_SYNC_ | _IO_HW_)
-#define IO_WR8                 (_IO_WRITE_ | _IO_SYNC_ | _IO_BYTE_)
-
-#define IO_WR32_ASYNC          (_IO_WRITE_ | _IO_WORD_)
-#define IO_WR16_ASYNC          (_IO_WRITE_ | _IO_HW_)
-#define IO_WR8_ASYNC           (_IO_WRITE_ | _IO_BYTE_)
-
-/*
-       Only Sync. burst accessing is provided.
-*/
-
-#define IO_WR_BURST(x)                                         \
-       (_IO_WRITE_ | _IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
-#define IO_RD_BURST(x)                                         \
-       (_IO_SYNC_ | _IO_BURST_ | ((x) & _IOSZ_MASK_))
-
-/* below is for the intf_option bit defition... */
-
-#define _INTF_ASYNC_   BIT(0)  /* support async io */
-
-struct intf_priv;
-struct intf_hdl;
-
-struct _io_ops {
-       u8 (*_read8)(struct intf_hdl *pintfhdl, u32 addr);
-       u16 (*_read16)(struct intf_hdl *pintfhdl, u32 addr);
-       u32 (*_read32)(struct intf_hdl *pintfhdl, u32 addr);
-       int (*_write8)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
-       int (*_write16)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
-       int (*_write32)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
-       int (*_writeN)(struct intf_hdl *pintfhdl, u32 addr, u32 length,
-                      u8 *pdata);
-       int (*_write8_async)(struct intf_hdl *pintfhdl, u32 addr, u8 val);
-       int (*_write16_async)(struct intf_hdl *pintfhdl, u32 addr, u16 val);
-       int (*_write32_async)(struct intf_hdl *pintfhdl, u32 addr, u32 val);
-       void (*_read_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
-                         u8 *pmem);
-       void (*_write_mem)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
-                          u8 *pmem);
-       u32 (*_read_interrupt)(struct intf_hdl *pintfhdl, u32 addr);
-       u32 (*_read_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
-                         u8 *pmem);
-       u32 (*_write_port)(struct intf_hdl *pintfhdl, u32 addr, u32 cnt,
-                          u8 *pmem);
-       u32 (*_write_scsi)(struct intf_hdl *pintfhdl, u32 cnt, u8 *pmem);
-       void (*_read_port_cancel)(struct intf_hdl *pintfhdl);
-       void (*_write_port_cancel)(struct intf_hdl *pintfhdl);
-};
-
-struct io_req {
-       struct list_head list;
-       u32     addr;
-       u32     val;
-       u32     command;
-       u32     status;
-       u8      *pbuf;
-       struct semaphore sema;
-
-       void (*_async_io_callback)(struct adapter *padater,
-                                  struct io_req *pio_req, u8 *cnxt);
-       u8 *cnxt;
-};
-
-struct intf_hdl {
-       struct adapter *padapter;
-       struct dvobj_priv *pintf_dev;
-       struct _io_ops  io_ops;
-};
-
-struct reg_protocol_rd {
-#ifdef __LITTLE_ENDIAN
-       /* DW1 */
-       u32             NumOfTrans:4;
-       u32             Reserved1:4;
-       u32             Reserved2:24;
-       /* DW2 */
-       u32             ByteCount:7;
-       u32             WriteEnable:1;          /* 0:read, 1:write */
-       u32             FixOrContinuous:1;      /* 0:continuous, 1: Fix */
-       u32             BurstMode:1;
-       u32             Byte1Access:1;
-       u32             Byte2Access:1;
-       u32             Byte4Access:1;
-       u32             Reserved3:3;
-       u32             Reserved4:16;
-       /* DW3 */
-       u32             BusAddress;
-       /* DW4 */
-       /* u32          Value; */
-#else
-/* DW1 */
-       u32 Reserved1:4;
-       u32 NumOfTrans:4;
-       u32 Reserved2:24;
-       /* DW2 */
-       u32 WriteEnable:1;
-       u32 ByteCount:7;
-       u32 Reserved3:3;
-       u32 Byte4Access:1;
-
-       u32 Byte2Access:1;
-       u32 Byte1Access:1;
-       u32 BurstMode:1;
-       u32 FixOrContinuous:1;
-       u32 Reserved4:16;
-       /* DW3 */
-       u32     BusAddress;
-
-       /* DW4 */
-#endif
-};
-
-struct reg_protocol_wt {
-#ifdef __LITTLE_ENDIAN
-       /* DW1 */
-       u32     NumOfTrans:4;
-       u32     Reserved1:4;
-       u32     Reserved2:24;
-       /* DW2 */
-       u32     ByteCount:7;
-       u32     WriteEnable:1;          /* 0:read, 1:write */
-       u32     FixOrContinuous:1;      /* 0:continuous, 1: Fix */
-       u32     BurstMode:1;
-       u32     Byte1Access:1;
-       u32     Byte2Access:1;
-       u32     Byte4Access:1;
-       u32     Reserved3:3;
-       u32     Reserved4:16;
-       /* DW3 */
-       u32     BusAddress;
-       /* DW4 */
-       u32     Value;
-#else
-       /* DW1 */
-       u32 Reserved1:4;
-       u32 NumOfTrans:4;
-       u32 Reserved2:24;
-       /* DW2 */
-       u32 WriteEnable:1;
-       u32 ByteCount:7;
-       u32 Reserved3:3;
-       u32 Byte4Access:1;
-       u32 Byte2Access:1;
-       u32 Byte1Access:1;
-       u32 BurstMode:1;
-       u32 FixOrContinuous:1;
-       u32 Reserved4:16;
-       /* DW3 */
-       u32     BusAddress;
-       /* DW4 */
-       u32     Value;
-#endif
-};
-
-/*
-Below is the data structure used by _io_handler
-*/
-
-struct io_priv {
-       struct adapter *padapter;
-       struct intf_hdl intf;
-};
-
-u8 _rtw_read8(struct adapter *adapter, u32 addr);
-u16 _rtw_read16(struct adapter *adapter, u32 addr);
-u32 _rtw_read32(struct adapter *adapter, u32 addr);
-void _rtw_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-void _rtw_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-void _rtw_read_port_cancel(struct adapter *adapter);
-
-int _rtw_write8(struct adapter *adapter, u32 addr, u8 val);
-int _rtw_write16(struct adapter *adapter, u32 addr, u16 val);
-int _rtw_write32(struct adapter *adapter, u32 addr, u32 val);
-int _rtw_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata);
-
-int _rtw_write8_async(struct adapter *adapter, u32 addr, u8 val);
-int _rtw_write16_async(struct adapter *adapter, u32 addr, u16 val);
-int _rtw_write32_async(struct adapter *adapter, u32 addr, u32 val);
-
-void _rtw_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-u32 _rtw_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-u32 _rtw_write_port_and_wait(struct adapter *adapter, u32 addr, u32 cnt,
-                            u8 *pmem, int timeout_ms);
-void _rtw_write_port_cancel(struct adapter *adapter);
-
-#define rtw_read8(adapter, addr) _rtw_read8((adapter), (addr))
-#define rtw_read16(adapter, addr) _rtw_read16((adapter), (addr))
-#define rtw_read32(adapter, addr) _rtw_read32((adapter), (addr))
-#define rtw_read_mem(adapter, addr, cnt, mem)                          \
-       _rtw_read_mem((adapter), (addr), (cnt), (mem))
-#define rtw_read_port(adapter, addr, cnt, mem)                         \
-       _rtw_read_port((adapter), (addr), (cnt), (mem))
-#define rtw_read_port_cancel(adapter) _rtw_read_port_cancel((adapter))
-
-#define  rtw_write8(adapter, addr, val)                                        \
-       _rtw_write8((adapter), (addr), (val))
-#define  rtw_write16(adapter, addr, val)                               \
-       _rtw_write16((adapter), (addr), (val))
-#define  rtw_write32(adapter, addr, val)                               \
-       _rtw_write32((adapter), (addr), (val))
-#define  rtw_writeN(adapter, addr, length, data)                       \
-       _rtw_writeN((adapter), (addr), (length), (data))
-#define rtw_write8_async(adapter, addr, val)                           \
-       _rtw_write8_async((adapter), (addr), (val))
-#define rtw_write16_async(adapter, addr, val)                          \
-       _rtw_write16_async((adapter), (addr), (val))
-#define rtw_write32_async(adapter, addr, val)                          \
-       _rtw_write32_async((adapter), (addr), (val))
-#define rtw_write_mem(adapter, addr, cnt, mem)                         \
-       _rtw_write_mem((adapter), (addr), (cnt), (mem))
-#define rtw_write_port(adapter, addr, cnt, mem)                                \
-       _rtw_write_port((adapter), (addr), (cnt), (mem))
-#define rtw_write_port_and_wait(adapter, addr, cnt, mem, timeout_ms)   \
-       _rtw_write_port_and_wait((adapter), (addr), (cnt), (mem), (timeout_ms))
-#define rtw_write_port_cancel(adapter) _rtw_write_port_cancel((adapter))
-
-void rtw_write_scsi(struct adapter *adapter, u32 cnt, u8 *pmem);
-
-/* ioreq */
-void ioreq_read8(struct adapter *adapter, u32 addr, u8 *pval);
-void ioreq_read16(struct adapter *adapter, u32 addr, u16 *pval);
-void ioreq_read32(struct adapter *adapter, u32 addr, u32 *pval);
-void ioreq_write8(struct adapter *adapter, u32 addr, u8 val);
-void ioreq_write16(struct adapter *adapter, u32 addr, u16 val);
-void ioreq_write32(struct adapter *adapter, u32 addr, u32 val);
-
-uint async_read8(struct adapter *adapter, u32 addr, u8 *pbuff,
-                void (*_async_io_callback)(struct adapter *padater,
-                                           struct io_req *pio_req,
-                                           u8 *cnxt), u8 *cnxt);
-uint async_read16(struct adapter *adapter, u32 addr,  u8 *pbuff,
-                 void (*_async_io_callback)(struct adapter *padater,
-                                            struct io_req *pio_req,
-                                            u8 *cnxt), u8 *cnxt);
-uint async_read32(struct adapter *adapter, u32 addr,  u8 *pbuff,
-                 void (*_async_io_callback)(struct adapter *padater,
-                                            struct io_req *pio_req,
-                                            u8 *cnxt), u8 *cnxt);
-
-void async_read_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-void async_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-
-void async_write8(struct adapter *adapter, u32 addr, u8 val,
-                 void (*_async_io_callback)(struct adapter *padater,
-                                            struct io_req *pio_req,
-                                            u8 *cnxt), u8 *cnxt);
-void async_write16(struct adapter *adapter, u32 addr, u16 val,
-                  void (*_async_io_callback)(struct adapter *padater,
-                                             struct io_req *pio_req,
-                                             u8 *cnxt), u8 *cnxt);
-void async_write32(struct adapter *adapter, u32 addr, u32 val,
-                  void (*_async_io_callback)(struct adapter *padater,
-                                             struct io_req *pio_req,
-                                             u8 *cnxt), u8 *cnxt);
-
-void async_write_mem(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-void async_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
-
-int rtw_init_io_priv(struct adapter *padapter,
-                    void (*set_intf_ops)(struct _io_ops *pops));
-
-void dev_power_down(struct adapter *Adapter, u8 bpwrup);
-
-#endif /* _RTL8711_IO_H_ */
index 2a1244f75790d7c9d13bf26749ac79792d8a351e..580e850511a739b9cdf101a96104746a47bca927 100644 (file)
 #include <drv_types.h>
 
 struct sreset_priv {
-       struct mutex    silentreset_mutex;
-       u8      silent_reset_inprogress;
        u8      Wifi_Error_Status;
-       unsigned long last_tx_time;
-       unsigned long last_tx_complete_time;
 };
 
 #include <rtl8188e_hal.h>
@@ -43,7 +39,6 @@ struct sreset_priv {
 #define                WIFI_IF_NOT_EXIST                       BIT6
 
 void sreset_init_value(struct adapter *padapter);
-void sreset_reset_value(struct adapter *padapter);
 u8 sreset_get_wifi_status(struct adapter *padapter);
 void sreset_set_wifi_error_status(struct adapter *padapter, u32 status);
 
diff --git a/drivers/staging/rtl8188eu/include/rtw_version.h b/drivers/staging/rtl8188eu/include/rtw_version.h
deleted file mode 100644 (file)
index 6d2d52c..0000000
+++ /dev/null
@@ -1 +0,0 @@
-#define DRIVERVERSION  "v4.1.4_6773.20130222"
diff --git a/drivers/staging/rtl8188eu/include/usb_ops.h b/drivers/staging/rtl8188eu/include/usb_ops.h
deleted file mode 100644 (file)
index a290e0f..0000000
+++ /dev/null
@@ -1,114 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#ifndef __USB_OPS_H_
-#define __USB_OPS_H_
-
-#include <linux/version.h>
-#include <osdep_service.h>
-#include <drv_types.h>
-#include <osdep_intf.h>
-
-#define REALTEK_USB_VENQT_READ         0xC0
-#define REALTEK_USB_VENQT_WRITE                0x40
-#define REALTEK_USB_VENQT_CMD_REQ      0x05
-#define REALTEK_USB_VENQT_CMD_IDX      0x00
-
-enum{
-       VENDOR_WRITE = 0x00,
-       VENDOR_READ = 0x01,
-};
-#define ALIGNMENT_UNIT                 16
-#define MAX_VENDOR_REQ_CMD_SIZE        254     /* 8188cu SIE Support */
-#define MAX_USB_IO_CTL_SIZE    (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
-
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 12))
-#define rtw_usb_control_msg(dev, pipe, request, requesttype,           \
-                           value, index, data, size, timeout_ms)       \
-       usb_control_msg((dev), (pipe), (request), (requesttype), (value),\
-                       (index), (data), (size), (timeout_ms))
-#define rtw_usb_bulk_msg(usb_dev, pipe, data, len, actual_length, timeout_ms) \
-       usb_bulk_msg((usb_dev), (pipe), (data), (len),                  \
-                    (actual_length), (timeout_ms))
-#else
-#define rtw_usb_control_msg(dev, pipe, request, requesttype,           \
-                           value, index, data, size, timeout_ms)       \
-       usb_control_msg((dev), (pipe), (request), (requesttype),        \
-                       (value), (index), (data), (size),               \
-                       ((timeout_ms) == 0) ||                          \
-                       ((timeout_ms)*HZ/1000 > 0) ?                    \
-                       ((timeout_ms)*HZ/1000) : 1)
-#define rtw_usb_bulk_msg(usb_dev, pipe, data, len,                     \
-                        actual_length, timeout_ms) \
-       usb_bulk_msg((usb_dev), (pipe), (data), (len), (actual_length), \
-                    ((timeout_ms) == 0) || ((timeout_ms)*HZ/1000 > 0) ?\
-                    ((timeout_ms)*HZ/1000) : 1)
-#endif
-#include <usb_ops_linux.h>
-
-void rtl8188eu_set_hw_type(struct adapter *padapter);
-void rtl8188eu_set_intf_ops(struct _io_ops *pops);
-#define usb_set_intf_ops rtl8188eu_set_intf_ops
-
-/*
- * Increase and check if the continual_urb_error of this @param dvobjprivei
- * is larger than MAX_CONTINUAL_URB_ERR
- * @return true:
- * @return false:
- */
-static inline int rtw_inc_and_chk_continual_urb_error(struct dvobj_priv *dvobj)
-{
-       int ret = false;
-       int value;
-       value = atomic_inc_return(&dvobj->continual_urb_error);
-       if (value > MAX_CONTINUAL_URB_ERR) {
-               DBG_88E("[dvobj:%p][ERROR] continual_urb_error:%d > %d\n",
-                       dvobj, value, MAX_CONTINUAL_URB_ERR);
-               ret = true;
-       }
-       return ret;
-}
-
-/*
-* Set the continual_urb_error of this @param dvobjprive to 0
-*/
-static inline void rtw_reset_continual_urb_error(struct dvobj_priv *dvobj)
-{
-       atomic_set(&dvobj->continual_urb_error, 0);
-}
-
-#define USB_HIGH_SPEED_BULK_SIZE       512
-#define USB_FULL_SPEED_BULK_SIZE       64
-
-static inline u8 rtw_usb_bulk_size_boundary(struct adapter *padapter,
-                                           int buf_len)
-{
-       u8 rst = true;
-       struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
-
-       if (pdvobjpriv->ishighspeed)
-               rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
-                     true : false;
-       else
-               rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ?
-                     true : false;
-       return rst;
-}
-
-#endif /* __USB_OPS_H_ */
index e5b758a81a5c616af2e747036c283e8b64bceab2..01b3810379ec021d5a21d26ef883c395e493aeb5 100644 (file)
 
 #define RTW_USB_BULKOUT_TIME   5000/* ms */
 
+#define REALTEK_USB_VENQT_READ         0xC0
+#define REALTEK_USB_VENQT_WRITE                0x40
+
+#define ALIGNMENT_UNIT                 16
+#define MAX_VENDOR_REQ_CMD_SIZE        254     /* 8188cu SIE Support */
+#define MAX_USB_IO_CTL_SIZE    (MAX_VENDOR_REQ_CMD_SIZE + ALIGNMENT_UNIT)
+
+#define USB_HIGH_SPEED_BULK_SIZE       512
+#define USB_FULL_SPEED_BULK_SIZE       64
+
 #define _usbctrl_vendorreq_async_callback(urb, regs)   \
        _usbctrl_vendorreq_async_callback(urb)
 #define usb_bulkout_zero_complete(purb, regs)          \
 #define usb_read_interrupt_complete(purb, regs)                \
        usb_read_interrupt_complete(purb)
 
+static inline u8 rtw_usb_bulk_size_boundary(struct adapter *padapter,
+                                           int buf_len)
+{
+       u8 rst = true;
+       struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
+
+       if (pdvobjpriv->ishighspeed)
+               rst = (0 == (buf_len) % USB_HIGH_SPEED_BULK_SIZE) ?
+                     true : false;
+       else
+               rst = (0 == (buf_len) % USB_FULL_SPEED_BULK_SIZE) ?
+                     true : false;
+       return rst;
+}
+
 unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr);
 
-void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem);
-void usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
+u8 usb_read8(struct adapter *adapter, u32 addr);
+u16 usb_read16(struct adapter *adapter, u32 addr);
+u32 usb_read32(struct adapter *adapter, u32 addr);
+
+u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
+void usb_read_port_cancel(struct adapter *adapter);
 
-void usb_read_port_cancel(struct intf_hdl *pintfhdl);
+int usb_write8(struct adapter *adapter, u32 addr, u8 val);
+int usb_write16(struct adapter *adapter, u32 addr, u16 val);
+int usb_write32(struct adapter *adapter, u32 addr, u32 val);
+int usb_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata);
 
-u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem);
-void usb_write_port_cancel(struct intf_hdl *pintfhdl);
+u32 usb_write_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *pmem);
+void usb_write_port_cancel(struct adapter *adapter);
 
 #endif
index 9de99ca9799ace62ad1b05fd50015d12ba04d2e8..85805cad682f43f638eccd48fc7045a8193f86aa 100644 (file)
 
 #include <osdep_service.h>
 #include <drv_types.h>
-#include <usb_vendor_req.h>
 
 extern char *rtw_initmac;
 extern int rtw_mc2u_disable;
 
 #define USBD_HALTED(Status) ((u32)(Status) >> 30 == 3)
 
-u8 usbvendorrequest(struct dvobj_priv *pdvobjpriv, enum bt_usb_request brequest,
-                   enum rt_usb_wvalue wvalue, u8 windex, void *data,
-                   u8 datalen, u8 isdirectionin);
 int pm_netdev_open(struct net_device *pnetdev, u8 bnormal);
-void netdev_br_init(struct net_device *netdev);
 void dhcp_flag_bcast(struct adapter *priv, struct sk_buff *skb);
 void *scdb_findEntry(struct adapter *priv, unsigned char *macAddr,
                     unsigned char *ipAddr);
-void nat25_db_expire(struct adapter *priv);
-int nat25_db_handle(struct adapter *priv, struct sk_buff *skb, int method);
 
 int rtw_resume_process(struct adapter *padapter);
 
diff --git a/drivers/staging/rtl8188eu/include/usb_vendor_req.h b/drivers/staging/rtl8188eu/include/usb_vendor_req.h
deleted file mode 100644 (file)
index 7f26c8f..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
- ******************************************************************************/
-#ifndef _USB_VENDOR_REQUEST_H_
-#define _USB_VENDOR_REQUEST_H_
-
-/* 4   Set/Get Register related wIndex/Data */
-#define        RT_USB_RESET_MASK_OFF           0
-#define        RT_USB_RESET_MASK_ON            1
-#define        RT_USB_SLEEP_MASK_OFF           0
-#define        RT_USB_SLEEP_MASK_ON            1
-#define        RT_USB_LDO_ON                           1
-#define        RT_USB_LDO_OFF                          0
-
-/* 4   Set/Get SYSCLK related  wValue or Data */
-#define        RT_USB_SYSCLK_32KHZ             0
-#define        RT_USB_SYSCLK_40MHZ             1
-#define        RT_USB_SYSCLK_60MHZ             2
-
-
-enum bt_usb_request {
-       RT_USB_SET_REGISTER             = 1,
-       RT_USB_SET_SYSCLK               = 2,
-       RT_USB_GET_SYSCLK               = 3,
-       RT_USB_GET_REGISTER             = 4
-};
-
-enum rt_usb_wvalue {
-       RT_USB_RESET_MASK       =       1,
-       RT_USB_SLEEP_MASK       =       2,
-       RT_USB_USB_HRCPWM       =       3,
-       RT_USB_LDO                      =       4,
-       RT_USB_BOOT_TYPE        =       5
-};
-
-#endif
index f04aaa375f0ec5a13c4db3a78664c48621bc84e5..221366fbf1e7ab53bc2af907d0a55d3bc6763216 100644 (file)
@@ -29,8 +29,6 @@
 #include <rtw_ioctl.h>
 #include <rtw_ioctl_set.h>
 #include <rtw_mp_ioctl.h>
-#include <usb_ops.h>
-#include <rtw_version.h>
 #include <rtl8188e_hal.h>
 
 #include <rtw_mp.h>
@@ -149,7 +147,7 @@ void indicate_wx_scan_complete_event(struct adapter *padapter)
 {
        union iwreq_data wrqu;
 
-       _rtw_memset(&wrqu, 0, sizeof(union iwreq_data));
+       memset(&wrqu, 0, sizeof(union iwreq_data));
        wireless_send_event(padapter->pnetdev, SIOCGIWSCAN, &wrqu, NULL);
 }
 
@@ -158,7 +156,7 @@ void rtw_indicate_wx_assoc_event(struct adapter *padapter)
        union iwreq_data wrqu;
        struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-       _rtw_memset(&wrqu, 0, sizeof(union iwreq_data));
+       memset(&wrqu, 0, sizeof(union iwreq_data));
 
        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
 
@@ -172,10 +170,10 @@ void rtw_indicate_wx_disassoc_event(struct adapter *padapter)
 {
        union iwreq_data wrqu;
 
-       _rtw_memset(&wrqu, 0, sizeof(union iwreq_data));
+       memset(&wrqu, 0, sizeof(union iwreq_data));
 
        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-       _rtw_memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
+       memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN);
 
        DBG_88E_LEVEL(_drv_always_, "indicate disassoc\n");
        wireless_send_event(padapter->pnetdev, SIOCGIWAP, &wrqu, NULL);
@@ -358,33 +356,33 @@ static char *translate_scan(struct adapter *padapter,
 
                if (wpa_len > 0) {
                        p = buf;
-                       _rtw_memset(buf, 0, MAX_WPA_IE_LEN);
+                       memset(buf, 0, MAX_WPA_IE_LEN);
                        p += sprintf(p, "wpa_ie=");
                        for (i = 0; i < wpa_len; i++)
                                p += sprintf(p, "%02x", wpa_ie[i]);
 
-                       _rtw_memset(&iwe, 0, sizeof(iwe));
+                       memset(&iwe, 0, sizeof(iwe));
                        iwe.cmd = IWEVCUSTOM;
                        iwe.u.data.length = strlen(buf);
                        start = iwe_stream_add_point(info, start, stop, &iwe, buf);
 
-                       _rtw_memset(&iwe, 0, sizeof(iwe));
+                       memset(&iwe, 0, sizeof(iwe));
                        iwe.cmd = IWEVGENIE;
                        iwe.u.data.length = wpa_len;
                        start = iwe_stream_add_point(info, start, stop, &iwe, wpa_ie);
                }
                if (rsn_len > 0) {
                        p = buf;
-                       _rtw_memset(buf, 0, MAX_WPA_IE_LEN);
+                       memset(buf, 0, MAX_WPA_IE_LEN);
                        p += sprintf(p, "rsn_ie=");
                        for (i = 0; i < rsn_len; i++)
                                p += sprintf(p, "%02x", rsn_ie[i]);
-                       _rtw_memset(&iwe, 0, sizeof(iwe));
+                       memset(&iwe, 0, sizeof(iwe));
                        iwe.cmd = IWEVCUSTOM;
                        iwe.u.data.length = strlen(buf);
                        start = iwe_stream_add_point(info, start, stop, &iwe, buf);
 
-                       _rtw_memset(&iwe, 0, sizeof(iwe));
+                       memset(&iwe, 0, sizeof(iwe));
                        iwe.cmd = IWEVGENIE;
                        iwe.u.data.length = rsn_len;
                        start = iwe_stream_add_point(info, start, stop, &iwe, rsn_ie);
@@ -520,7 +518,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
                                RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_, (" wpa_set_encryption: pwep allocate fail !!!\n"));
                                goto exit;
                        }
-                       _rtw_memset(pwep, 0, wep_total_len);
+                       memset(pwep, 0, wep_total_len);
                        pwep->KeyLength = wep_key_len;
                        pwep->Length = wep_total_len;
                        if (wep_key_len == 13) {
@@ -634,7 +632,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
        }
 
        if (ielen) {
-               buf = rtw_zmalloc(ielen);
+               buf = kzalloc(ielen, GFP_KERNEL);
                if (buf == NULL) {
                        ret =  -ENOMEM;
                        goto exit;
@@ -955,14 +953,14 @@ static int rtw_wx_set_pmkid(struct net_device *dev,
                for (j = 0; j < NUM_PMKID_CACHE; j++) {
                        if (!memcmp(psecuritypriv->PMKIDList[j].Bssid, strIssueBssid, ETH_ALEN)) {
                                /*  BSSID is matched, the same AP => Remove this PMKID information and reset it. */
-                               _rtw_memset(psecuritypriv->PMKIDList[j].Bssid, 0x00, ETH_ALEN);
+                               memset(psecuritypriv->PMKIDList[j].Bssid, 0x00, ETH_ALEN);
                                psecuritypriv->PMKIDList[j].bUsed = false;
                                break;
                        }
               }
        } else if (pPMK->cmd == IW_PMKSA_FLUSH) {
                DBG_88E("[rtw_wx_set_pmkid] IW_PMKSA_FLUSH!\n");
-               _rtw_memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
+               memset(&psecuritypriv->PMKIDList[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
                psecuritypriv->PMKIDIndex = 0;
                ret = true;
        }
@@ -993,7 +991,7 @@ static int rtw_wx_get_range(struct net_device *dev,
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_range. cmd_code =%x\n", info->cmd));
 
        wrqu->data.length = sizeof(*range);
-       _rtw_memset(range, 0, sizeof(*range));
+       memset(range, 0, sizeof(*range));
 
        /* Let's try to keep this struct in the same order as in
         * linux/include/wireless.h
@@ -1113,10 +1111,7 @@ static int rtw_wx_set_wap(struct net_device *dev,
        phead = get_list_head(queue);
        pmlmepriv->pscanned = phead->next;
 
-       while (1) {
-               if ((rtw_end_of_queue_search(phead, pmlmepriv->pscanned)) == true)
-                       break;
-
+       while (phead != pmlmepriv->pscanned) {
                pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
 
                pmlmepriv->pscanned = pmlmepriv->pscanned->next;
@@ -1159,7 +1154,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
 
        wrqu->ap_addr.sa_family = ARPHRD_ETHER;
 
-       _rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
+       memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_, ("rtw_wx_get_wap\n"));
 
@@ -1168,7 +1163,7 @@ static int rtw_wx_get_wap(struct net_device *dev,
            ((check_fwstate(pmlmepriv, WIFI_AP_STATE)) == true))
                memcpy(wrqu->ap_addr.sa_data, pcur_bss->MacAddress, ETH_ALEN);
        else
-               _rtw_memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
+               memset(wrqu->ap_addr.sa_data, 0, ETH_ALEN);
        return 0;
 }
 
@@ -1271,7 +1266,7 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
        }
 #endif /* CONFIG_88EU_P2P */
 
-       _rtw_memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
+       memset(ssid, 0, sizeof(struct ndis_802_11_ssid)*RTW_SSID_SCAN_AMOUNT);
 
        if (wrqu->data.length == sizeof(struct iw_scan_req)) {
                struct iw_scan_req *req = (struct iw_scan_req *)extra;
@@ -1404,10 +1399,7 @@ static int rtw_wx_get_scan(struct net_device *dev, struct iw_request_info *a,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist))
-                       break;
-
+       while (phead != plist) {
                if ((stop - ev) < SCAN_ITEM_SIZE) {
                        ret = -E2BIG;
                        break;
@@ -1482,7 +1474,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
                if (wrqu->essid.length != 33)
                        DBG_88E("ssid =%s, len =%d\n", extra, wrqu->essid.length);
 
-               _rtw_memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
+               memset(&ndis_ssid, 0, sizeof(struct ndis_802_11_ssid));
                ndis_ssid.SsidLength = len;
                memcpy(ndis_ssid.Ssid, extra, len);
                src_ssid = ndis_ssid.Ssid;
@@ -1492,14 +1484,7 @@ static int rtw_wx_set_essid(struct net_device *dev,
               phead = get_list_head(queue);
              pmlmepriv->pscanned = phead->next;
 
-               while (1) {
-                       if (rtw_end_of_queue_search(phead, pmlmepriv->pscanned) == true) {
-                               RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_warning_,
-                                        ("rtw_wx_set_essid: scan_q is empty, set ssid to check if scanning again!\n"));
-
-                               break;
-                       }
-
+               while (phead != pmlmepriv->pscanned) {
                        pnetwork = container_of(pmlmepriv->pscanned, struct wlan_network, list);
 
                        pmlmepriv->pscanned = pmlmepriv->pscanned->next;
@@ -1787,7 +1772,7 @@ static int rtw_wx_set_enc(struct net_device *dev,
        struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
        DBG_88E("+rtw_wx_set_enc, flags = 0x%x\n", erq->flags);
 
-       _rtw_memset(&wep, 0, sizeof(struct ndis_802_11_wep));
+       memset(&wep, 0, sizeof(struct ndis_802_11_wep));
 
        key = erq->flags & IW_ENCODE_INDEX;
 
@@ -2076,10 +2061,10 @@ static int rtw_wx_set_enc_ext(struct net_device *dev,
        if (param == NULL)
                return -1;
 
-       _rtw_memset(param, 0, param_len);
+       memset(param, 0, param_len);
 
        param->cmd = IEEE_CMD_SET_ENCRYPTION;
-       _rtw_memset(param->sta_addr, 0xff, ETH_ALEN);
+       memset(param->sta_addr, 0xff, ETH_ALEN);
 
        switch (pext->alg) {
        case IW_ENCODE_ALG_NONE:
@@ -2180,15 +2165,15 @@ static int rtw_wx_read32(struct net_device *dev,
 
        switch (bytes) {
        case 1:
-               data32 = rtw_read8(padapter, addr);
+               data32 = usb_read8(padapter, addr);
                sprintf(extra, "0x%02X", data32);
                break;
        case 2:
-               data32 = rtw_read16(padapter, addr);
+               data32 = usb_read16(padapter, addr);
                sprintf(extra, "0x%04X", data32);
                break;
        case 4:
-               data32 = rtw_read32(padapter, addr);
+               data32 = usb_read32(padapter, addr);
                sprintf(extra, "0x%08X", data32);
                break;
        default:
@@ -2223,15 +2208,15 @@ static int rtw_wx_write32(struct net_device *dev,
 
        switch (bytes) {
        case 1:
-               rtw_write8(padapter, addr, (u8)data32);
+               usb_write8(padapter, addr, (u8)data32);
                DBG_88E(KERN_INFO "%s: addr = 0x%08X data = 0x%02X\n", __func__, addr, (u8)data32);
                break;
        case 2:
-               rtw_write16(padapter, addr, (u16)data32);
+               usb_write16(padapter, addr, (u16)data32);
                DBG_88E(KERN_INFO "%s: addr = 0x%08X data = 0x%04X\n", __func__, addr, (u16)data32);
                break;
        case 4:
-               rtw_write32(padapter, addr, data32);
+               usb_write32(padapter, addr, data32);
                DBG_88E(KERN_INFO "%s: addr = 0x%08X data = 0x%08X\n", __func__, addr, data32);
                break;
        default:
@@ -2354,13 +2339,13 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le
                RegRWStruct = (struct mp_rw_reg *)pdata;
                switch (RegRWStruct->width) {
                case 1:
-                       RegRWStruct->value = rtw_read8(padapter, RegRWStruct->offset);
+                       RegRWStruct->value = usb_read8(padapter, RegRWStruct->offset);
                        break;
                case 2:
-                       RegRWStruct->value = rtw_read16(padapter, RegRWStruct->offset);
+                       RegRWStruct->value = usb_read16(padapter, RegRWStruct->offset);
                        break;
                case 4:
-                       RegRWStruct->value = rtw_read32(padapter, RegRWStruct->offset);
+                       RegRWStruct->value = usb_read32(padapter, RegRWStruct->offset);
                        break;
                default:
                        break;
@@ -2371,13 +2356,13 @@ static void rtw_dbg_mode_hdl(struct adapter *padapter, u32 id, u8 *pdata, u32 le
                RegRWStruct = (struct mp_rw_reg *)pdata;
                switch (RegRWStruct->width) {
                case 1:
-                       rtw_write8(padapter, RegRWStruct->offset, (u8)RegRWStruct->value);
+                       usb_write8(padapter, RegRWStruct->offset, (u8)RegRWStruct->value);
                        break;
                case 2:
-                       rtw_write16(padapter, RegRWStruct->offset, (u16)RegRWStruct->value);
+                       usb_write16(padapter, RegRWStruct->offset, (u16)RegRWStruct->value);
                        break;
                case 4:
-                       rtw_write32(padapter, RegRWStruct->offset, (u32)RegRWStruct->value);
+                       usb_write32(padapter, RegRWStruct->offset, (u32)RegRWStruct->value);
                        break;
                default:
                        break;
@@ -2565,10 +2550,7 @@ static int rtw_get_ap_info(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
 
                if (hwaddr_aton_i(data, bssid)) {
@@ -2849,7 +2831,7 @@ static int rtw_p2p_profilefound(struct net_device *dev,
                if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
                        if (extra[0] == '0') {
                        /*      Remove all the profile information of wifidirect_info structure. */
-                       _rtw_memset(&pwdinfo->profileinfo[0], 0x00, sizeof(struct profile_info) * P2P_MAX_PERSISTENT_GROUP_NUM);
+                       memset(&pwdinfo->profileinfo[0], 0x00, sizeof(struct profile_info) * P2P_MAX_PERSISTENT_GROUP_NUM);
                        pwdinfo->profileindex = 0;
                } else {
                        if (pwdinfo->profileindex >= P2P_MAX_PERSISTENT_GROUP_NUM) {
@@ -2881,7 +2863,7 @@ static int rtw_p2p_setDN(struct net_device *dev,
        struct wifidirect_info *pwdinfo = &(padapter->wdinfo);
 
        DBG_88E("[%s] %s %d\n", __func__, extra, wrqu->data.length - 1);
-       _rtw_memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
+       memset(pwdinfo->device_name, 0x00, WPS_MAX_DEVICE_NAME_LEN);
        memcpy(pwdinfo->device_name, extra, wrqu->data.length - 1);
        pwdinfo->device_name_len = wrqu->data.length - 1;
 
@@ -3068,10 +3050,7 @@ static int rtw_p2p_get_wps_configmethod(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
                        u8 *wpsie;
@@ -3138,10 +3117,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
                        /*      Commented by Albert 2011/05/18 */
@@ -3154,7 +3130,7 @@ static int rtw_p2p_get_go_device_address(struct net_device *dev,
                                        /*      The P2P Device ID attribute is included in the Beacon frame. */
                                        /*      The P2P Device Info attribute is included in the probe response frame. */
 
-                                       _rtw_memset(attr_content, 0x00, 100);
+                                       memset(attr_content, 0x00, 100);
                                        if (rtw_get_p2p_attr_content(p2pie, p2pielen, P2P_ATTR_DEVICE_ID, attr_content, &attr_contentlen)) {
                                                /*      Handle the P2P Device ID attribute of Beacon first */
                                                blnMatch = 1;
@@ -3222,10 +3198,7 @@ static int rtw_p2p_get_device_type(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
                        u8 *wpsie;
@@ -3301,10 +3274,7 @@ static int rtw_p2p_get_device_name(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
                        u8 *wpsie;
@@ -3372,10 +3342,7 @@ static int rtw_p2p_get_invitation_procedure(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
                        /*      Commented by Albert 20121226 */
@@ -3454,10 +3421,7 @@ static int rtw_p2p_connect(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!memcmp(pnetwork->network.MacAddress, peerMAC, ETH_ALEN)) {
                        uintPeerChannel = pnetwork->network.Configuration.DSConfig;
@@ -3470,14 +3434,14 @@ static int rtw_p2p_connect(struct net_device *dev,
        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
 
        if (uintPeerChannel) {
-               _rtw_memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
-               _rtw_memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
+               memset(&pwdinfo->nego_req_info, 0x00, sizeof(struct tx_nego_req_info));
+               memset(&pwdinfo->groupid_info, 0x00, sizeof(struct group_id_info));
 
                pwdinfo->nego_req_info.peer_channel_num[0] = uintPeerChannel;
                memcpy(pwdinfo->nego_req_info.peerDevAddr, pnetwork->network.MacAddress, ETH_ALEN);
                pwdinfo->nego_req_info.benable = true;
 
-               _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
+               del_timer_sync(&pwdinfo->restore_p2p_state_timer);
                if (rtw_p2p_state(pwdinfo) != P2P_STATE_GONEGO_OK) {
                        /*      Restore to the listen state if the current p2p state is not nego OK */
                        rtw_p2p_set_state(pwdinfo, P2P_STATE_LISTEN);
@@ -3533,11 +3497,11 @@ static int rtw_p2p_invite_req(struct net_device *dev,
        } else {
                /*      Reset the content of struct tx_invite_req_info */
                pinvite_req_info->benable = false;
-               _rtw_memset(pinvite_req_info->go_bssid, 0x00, ETH_ALEN);
-               _rtw_memset(pinvite_req_info->go_ssid, 0x00, WLAN_SSID_MAXLEN);
+               memset(pinvite_req_info->go_bssid, 0x00, ETH_ALEN);
+               memset(pinvite_req_info->go_ssid, 0x00, WLAN_SSID_MAXLEN);
                pinvite_req_info->ssidlen = 0x00;
                pinvite_req_info->operating_ch = pwdinfo->operating_channel;
-               _rtw_memset(pinvite_req_info->peer_macaddr, 0x00, ETH_ALEN);
+               memset(pinvite_req_info->peer_macaddr, 0x00, ETH_ALEN);
                pinvite_req_info->token = 3;
        }
 
@@ -3549,10 +3513,7 @@ static int rtw_p2p_invite_req(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
-
+       while (phead != plist) {
                pnetwork = container_of(plist, struct wlan_network, list);
 
                /*      Commented by Albert 2011/05/18 */
@@ -3670,9 +3631,9 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
                return ret;
        } else {
                /*      Reset the content of struct tx_provdisc_req_info excluded the wps_config_method_request. */
-               _rtw_memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
-               _rtw_memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
-               _rtw_memset(&pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof(struct ndis_802_11_ssid));
+               memset(pwdinfo->tx_prov_disc_info.peerDevAddr, 0x00, ETH_ALEN);
+               memset(pwdinfo->tx_prov_disc_info.peerIFAddr, 0x00, ETH_ALEN);
+               memset(&pwdinfo->tx_prov_disc_info.ssid, 0x00, sizeof(struct ndis_802_11_ssid));
                pwdinfo->tx_prov_disc_info.peer_channel_num[0] = 0;
                pwdinfo->tx_prov_disc_info.peer_channel_num[1] = 0;
                pwdinfo->tx_prov_disc_info.benable = false;
@@ -3699,9 +3660,7 @@ static int rtw_p2p_prov_disc(struct net_device *dev,
        phead = get_list_head(queue);
        plist = phead->next;
 
-       while (1) {
-               if (rtw_end_of_queue_search(phead, plist) == true)
-                       break;
+       while (phead != plist) {
 
                if (uintPeerChannel != 0)
                        break;
@@ -3947,14 +3906,14 @@ static int rtw_cta_test_start(struct net_device *dev,
                padapter->in_cta_test = 0;
 
        if (padapter->in_cta_test) {
-               u32 v = rtw_read32(padapter, REG_RCR);
+               u32 v = usb_read32(padapter, REG_RCR);
                v &= ~(RCR_CBSSID_DATA | RCR_CBSSID_BCN);/*  RCR_ADF */
-               rtw_write32(padapter, REG_RCR, v);
+               usb_write32(padapter, REG_RCR, v);
                DBG_88E("enable RCR_ADF\n");
        } else {
-               u32 v = rtw_read32(padapter, REG_RCR);
+               u32 v = usb_read32(padapter, REG_RCR);
                v |= RCR_CBSSID_DATA | RCR_CBSSID_BCN;/*  RCR_ADF */
-               rtw_write32(padapter, REG_RCR, v);
+               usb_write32(padapter, REG_RCR, v);
                DBG_88E("disable RCR_ADF\n");
        }
        return ret;
@@ -4026,14 +3985,14 @@ static void mac_reg_dump(struct adapter *padapter)
        for (i = 0x0; i < 0x300; i += 4) {
                if (j%4 == 1)
                        pr_info("0x%02x", i);
-               pr_info(" 0x%08x ", rtw_read32(padapter, i));
+               pr_info(" 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        pr_info("\n");
        }
        for (i = 0x400; i < 0x800; i += 4) {
                if (j%4 == 1)
                        pr_info("0x%02x", i);
-               pr_info(" 0x%08x ", rtw_read32(padapter, i));
+               pr_info(" 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        pr_info("\n");
        }
@@ -4047,7 +4006,7 @@ static void bb_reg_dump(struct adapter *padapter)
                if (j%4 == 1)
                        pr_info("0x%02x", i);
 
-               pr_info(" 0x%08x ", rtw_read32(padapter, i));
+               pr_info(" 0x%08x ", usb_read32(padapter, i));
                if ((j++)%4 == 0)
                        pr_info("\n");
        }
@@ -4110,29 +4069,29 @@ static int rtw_dbg_port(struct net_device *dev,
        case 0x70:/* read_reg */
                switch (minor_cmd) {
                case 1:
-                       DBG_88E("rtw_read8(0x%x) = 0x%02x\n", arg, rtw_read8(padapter, arg));
+                       DBG_88E("usb_read8(0x%x) = 0x%02x\n", arg, usb_read8(padapter, arg));
                        break;
                case 2:
-                       DBG_88E("rtw_read16(0x%x) = 0x%04x\n", arg, rtw_read16(padapter, arg));
+                       DBG_88E("usb_read16(0x%x) = 0x%04x\n", arg, usb_read16(padapter, arg));
                        break;
                case 4:
-                       DBG_88E("rtw_read32(0x%x) = 0x%08x\n", arg, rtw_read32(padapter, arg));
+                       DBG_88E("usb_read32(0x%x) = 0x%08x\n", arg, usb_read32(padapter, arg));
                        break;
                }
                break;
        case 0x71:/* write_reg */
                switch (minor_cmd) {
                case 1:
-                       rtw_write8(padapter, arg, extra_arg);
-                       DBG_88E("rtw_write8(0x%x) = 0x%02x\n", arg, rtw_read8(padapter, arg));
+                       usb_write8(padapter, arg, extra_arg);
+                       DBG_88E("usb_write8(0x%x) = 0x%02x\n", arg, usb_read8(padapter, arg));
                        break;
                case 2:
-                       rtw_write16(padapter, arg, extra_arg);
-                       DBG_88E("rtw_write16(0x%x) = 0x%04x\n", arg, rtw_read16(padapter, arg));
+                       usb_write16(padapter, arg, extra_arg);
+                       DBG_88E("usb_write16(0x%x) = 0x%04x\n", arg, usb_read16(padapter, arg));
                        break;
                case 4:
-                       rtw_write32(padapter, arg, extra_arg);
-                       DBG_88E("rtw_write32(0x%x) = 0x%08x\n", arg, rtw_read32(padapter, arg));
+                       usb_write32(padapter, arg, extra_arg);
+                       DBG_88E("usb_write32(0x%x) = 0x%08x\n", arg, usb_read32(padapter, arg));
                        break;
                }
                break;
@@ -4228,7 +4187,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0))
                                ret = -EPERM;
 
-                       final = rtw_read8(padapter, reg);
+                       final = usb_read8(padapter, reg);
                        if (start_value+write_num-1 == final)
                                DBG_88E("continuous IOL_CMD_WB_REG to 0x%x %u times Success, start:%u, final:%u\n", reg, write_num, start_value, final);
                        else
@@ -4257,7 +4216,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0))
                                ret = -EPERM;
 
-                       final = rtw_read16(padapter, reg);
+                       final = usb_read16(padapter, reg);
                        if (start_value+write_num-1 == final)
                                DBG_88E("continuous IOL_CMD_WW_REG to 0x%x %u times Success, start:%u, final:%u\n", reg, write_num, start_value, final);
                        else
@@ -4285,7 +4244,7 @@ static int rtw_dbg_port(struct net_device *dev,
                        if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000, 0))
                                ret = -EPERM;
 
-                       final = rtw_read32(padapter, reg);
+                       final = usb_read32(padapter, reg);
                        if (start_value+write_num-1 == final)
                                DBG_88E("continuous IOL_CMD_WD_REG to 0x%x %u times Success, start:%u, final:%u\n",
                                        reg, write_num, start_value, final);
@@ -4312,7 +4271,7 @@ static int rtw_dbg_port(struct net_device *dev,
                                value = value | 0x10;
 
                        write_value = value | (value << 5);
-                       rtw_write16(padapter, 0x6d9, write_value);
+                       usb_write16(padapter, 0x6d9, write_value);
                }
                break;
        case 0x7a:
@@ -4404,7 +4363,7 @@ static int rtw_dbg_port(struct net_device *dev,
                                        phead = &(pstapriv->sta_hash[i]);
                                        plist = phead->next;
 
-                                       while ((rtw_end_of_queue_search(phead, plist)) == false) {
+                                       while (phead != plist) {
                                                psta = container_of(plist, struct sta_info, hash_list);
 
                                                plist = plist->next;
@@ -4449,10 +4408,6 @@ static int rtw_dbg_port(struct net_device *dev,
                        }
                        break;
                case 0x0f:
-                       if (extra_arg == 0) {
-                               DBG_88E("###### silent reset test.......#####\n");
-                               rtw_hal_sreset_reset(padapter);
-                       }
                        break;
                case 0x15:
                        {
@@ -4581,40 +4536,40 @@ static int rtw_dbg_port(struct net_device *dev,
                        break;
 
                case 0xfd:
-                       rtw_write8(padapter, 0xc50, arg);
-                       DBG_88E("wr(0xc50) = 0x%x\n", rtw_read8(padapter, 0xc50));
-                       rtw_write8(padapter, 0xc58, arg);
-                       DBG_88E("wr(0xc58) = 0x%x\n", rtw_read8(padapter, 0xc58));
+                       usb_write8(padapter, 0xc50, arg);
+                       DBG_88E("wr(0xc50) = 0x%x\n", usb_read8(padapter, 0xc50));
+                       usb_write8(padapter, 0xc58, arg);
+                       DBG_88E("wr(0xc58) = 0x%x\n", usb_read8(padapter, 0xc58));
                        break;
                case 0xfe:
-                       DBG_88E("rd(0xc50) = 0x%x\n", rtw_read8(padapter, 0xc50));
-                       DBG_88E("rd(0xc58) = 0x%x\n", rtw_read8(padapter, 0xc58));
+                       DBG_88E("rd(0xc50) = 0x%x\n", usb_read8(padapter, 0xc50));
+                       DBG_88E("rd(0xc58) = 0x%x\n", usb_read8(padapter, 0xc58));
                        break;
                case 0xff:
-                       DBG_88E("dbg(0x210) = 0x%x\n", rtw_read32(padapter, 0x210));
-                       DBG_88E("dbg(0x608) = 0x%x\n", rtw_read32(padapter, 0x608));
-                       DBG_88E("dbg(0x280) = 0x%x\n", rtw_read32(padapter, 0x280));
-                       DBG_88E("dbg(0x284) = 0x%x\n", rtw_read32(padapter, 0x284));
-                       DBG_88E("dbg(0x288) = 0x%x\n", rtw_read32(padapter, 0x288));
+                       DBG_88E("dbg(0x210) = 0x%x\n", usb_read32(padapter, 0x210));
+                       DBG_88E("dbg(0x608) = 0x%x\n", usb_read32(padapter, 0x608));
+                       DBG_88E("dbg(0x280) = 0x%x\n", usb_read32(padapter, 0x280));
+                       DBG_88E("dbg(0x284) = 0x%x\n", usb_read32(padapter, 0x284));
+                       DBG_88E("dbg(0x288) = 0x%x\n", usb_read32(padapter, 0x288));
 
-                       DBG_88E("dbg(0x664) = 0x%x\n", rtw_read32(padapter, 0x664));
+                       DBG_88E("dbg(0x664) = 0x%x\n", usb_read32(padapter, 0x664));
 
                        DBG_88E("\n");
 
-                       DBG_88E("dbg(0x430) = 0x%x\n", rtw_read32(padapter, 0x430));
-                       DBG_88E("dbg(0x438) = 0x%x\n", rtw_read32(padapter, 0x438));
+                       DBG_88E("dbg(0x430) = 0x%x\n", usb_read32(padapter, 0x430));
+                       DBG_88E("dbg(0x438) = 0x%x\n", usb_read32(padapter, 0x438));
 
-                       DBG_88E("dbg(0x440) = 0x%x\n", rtw_read32(padapter, 0x440));
+                       DBG_88E("dbg(0x440) = 0x%x\n", usb_read32(padapter, 0x440));
 
-                       DBG_88E("dbg(0x458) = 0x%x\n", rtw_read32(padapter, 0x458));
+                       DBG_88E("dbg(0x458) = 0x%x\n", usb_read32(padapter, 0x458));
 
-                       DBG_88E("dbg(0x484) = 0x%x\n", rtw_read32(padapter, 0x484));
-                       DBG_88E("dbg(0x488) = 0x%x\n", rtw_read32(padapter, 0x488));
+                       DBG_88E("dbg(0x484) = 0x%x\n", usb_read32(padapter, 0x484));
+                       DBG_88E("dbg(0x488) = 0x%x\n", usb_read32(padapter, 0x488));
 
-                       DBG_88E("dbg(0x444) = 0x%x\n", rtw_read32(padapter, 0x444));
-                       DBG_88E("dbg(0x448) = 0x%x\n", rtw_read32(padapter, 0x448));
-                       DBG_88E("dbg(0x44c) = 0x%x\n", rtw_read32(padapter, 0x44c));
-                       DBG_88E("dbg(0x450) = 0x%x\n", rtw_read32(padapter, 0x450));
+                       DBG_88E("dbg(0x444) = 0x%x\n", usb_read32(padapter, 0x444));
+                       DBG_88E("dbg(0x448) = 0x%x\n", usb_read32(padapter, 0x448));
+                       DBG_88E("dbg(0x44c) = 0x%x\n", usb_read32(padapter, 0x44c));
+                       DBG_88E("dbg(0x450) = 0x%x\n", usb_read32(padapter, 0x450));
                        break;
                }
                break;
@@ -4766,13 +4721,13 @@ static u8 set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        u8 res = _SUCCESS;
 
-       ph2c = (struct cmd_obj *)rtw_zmalloc(sizeof(struct cmd_obj));
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (ph2c == NULL) {
                res = _FAIL;
                goto exit;
        }
 
-       psetstakey_para = (struct set_stakey_parm *)rtw_zmalloc(sizeof(struct set_stakey_parm));
+       psetstakey_para = kzalloc(sizeof(struct set_stakey_parm), GFP_KERNEL);
        if (psetstakey_para == NULL) {
                kfree(ph2c);
                res = _FAIL;
@@ -4804,19 +4759,19 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
 
        DBG_88E("%s\n", __func__);
 
-       pcmd = (struct cmd_obj *)rtw_zmalloc(sizeof(struct      cmd_obj));
+       pcmd = kzalloc(sizeof(struct    cmd_obj), GFP_KERNEL);
        if (pcmd == NULL) {
                res = _FAIL;
                goto exit;
        }
-       psetkeyparm = (struct setkey_parm *)rtw_zmalloc(sizeof(struct setkey_parm));
+       psetkeyparm = kzalloc(sizeof(struct setkey_parm), GFP_KERNEL);
        if (psetkeyparm == NULL) {
                kfree(pcmd);
                res = _FAIL;
                goto exit;
        }
 
-       _rtw_memset(psetkeyparm, 0, sizeof(struct setkey_parm));
+       memset(psetkeyparm, 0, sizeof(struct setkey_parm));
 
        psetkeyparm->keyid = (u8)keyid;
 
@@ -4846,7 +4801,7 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
        pcmd->rsp = NULL;
        pcmd->rspsz = 0;
 
-       _rtw_init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
 
        res = rtw_enqueue_cmd(pcmdpriv, pcmd);
 
@@ -4931,7 +4886,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
                                goto exit;
                        }
 
-                       _rtw_memset(pwep, 0, wep_total_len);
+                       memset(pwep, 0, wep_total_len);
 
                        pwep->KeyLength = wep_key_len;
                        pwep->Length = wep_total_len;
@@ -5221,8 +5176,8 @@ static int rtw_del_sta(struct net_device *dev, struct ieee_param *param)
        psta = rtw_get_stainfo(pstapriv, param->sta_addr);
        if (psta) {
                spin_lock_bh(&pstapriv->asoc_list_lock);
-               if (!rtw_is_list_empty(&psta->asoc_list)) {
-                       rtw_list_delete(&psta->asoc_list);
+               if (!list_empty(&psta->asoc_list)) {
+                       list_del_init(&psta->asoc_list);
                        pstapriv->asoc_list_cnt--;
                        updated = ap_free_sta(padapter, psta, true, WLAN_REASON_DEAUTH_LEAVING);
                }
@@ -5717,12 +5672,12 @@ static int rtw_mp_efuse_get(struct net_device *dev,
        pEfuseHal = &haldata->EfuseHal;
 
        err = 0;
-       data = _rtw_zmalloc(EFUSE_BT_MAX_MAP_LEN);
+       data = kzalloc(EFUSE_BT_MAX_MAP_LEN, GFP_KERNEL);
        if (data == NULL) {
                err = -ENOMEM;
                goto exit;
        }
-       rawdata = _rtw_zmalloc(EFUSE_BT_MAX_MAP_LEN);
+       rawdata = kzalloc(EFUSE_BT_MAX_MAP_LEN, GFP_KERNEL);
        if (rawdata == NULL) {
                err = -ENOMEM;
                goto exit;
@@ -5805,7 +5760,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
                }
                DBG_88E("%s: cnts =%d\n", __func__, cnts);
 
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if ((addr + cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EINVAL;
@@ -5844,7 +5799,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
        } else if (strcmp(tmp[0], "mac") == 0) {
                cnts = 6;
 
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if ((addr + cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%02x)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EFAULT;
@@ -5866,7 +5821,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
        } else if (strcmp(tmp[0], "vidpid") == 0) {
                cnts = 4;
 
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if ((addr + cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%02x)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EFAULT;
@@ -5888,77 +5843,6 @@ static int rtw_mp_efuse_get(struct net_device *dev,
                efuse_GetCurrentSize(padapter, &raw_cursize);
                raw_maxsize = efuse_GetMaxSize(padapter);
                sprintf(extra, "[available raw size] = %d bytes", raw_maxsize-raw_cursize);
-       } else if (strcmp(tmp[0], "btfmap") == 0) {
-               mapLen = EFUSE_BT_MAX_MAP_LEN;
-               if (rtw_BT_efuse_map_read(padapter, 0, mapLen, pEfuseHal->BTEfuseInitMap) == _FAIL) {
-                       DBG_88E("%s: rtw_BT_efuse_map_read Fail!!\n", __func__);
-                       err = -EFAULT;
-                       goto exit;
-               }
-
-               sprintf(extra, "\n");
-               for (i = 0; i < 512; i += 16) {
-                       /*  set 512 because the iwpriv's extra size have limit 0x7FF */
-                       sprintf(extra, "%s0x%03x\t", extra, i);
-                       for (j = 0; j < 8; j++)
-                               sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
-                       sprintf(extra, "%s\t", extra);
-                       for (; j < 16; j++)
-                               sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
-                       sprintf(extra, "%s\n", extra);
-               }
-       } else if (strcmp(tmp[0], "btbmap") == 0) {
-               mapLen = EFUSE_BT_MAX_MAP_LEN;
-               if (rtw_BT_efuse_map_read(padapter, 0, mapLen, pEfuseHal->BTEfuseInitMap) == _FAIL) {
-                       DBG_88E("%s: rtw_BT_efuse_map_read Fail!!\n", __func__);
-                       err = -EFAULT;
-                       goto exit;
-               }
-
-               sprintf(extra, "\n");
-               for (i = 512; i < 1024; i += 16) {
-                       sprintf(extra, "%s0x%03x\t", extra, i);
-                       for (j = 0; j < 8; j++)
-                               sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
-                       sprintf(extra, "%s\t", extra);
-                       for (; j < 16; j++)
-                               sprintf(extra, "%s%02X ", extra, pEfuseHal->BTEfuseInitMap[i+j]);
-                       sprintf(extra, "%s\n", extra);
-               }
-       } else if (strcmp(tmp[0], "btrmap") == 0) {
-               if ((tmp[1] == NULL) || (tmp[2] == NULL)) {
-                       err = -EINVAL;
-                       goto exit;
-               }
-
-               /*  rmap addr cnts */
-               addr = simple_strtoul(tmp[1], &ptmp, 16);
-               DBG_88E("%s: addr = 0x%X\n", __func__, addr);
-
-               cnts = simple_strtoul(tmp[2], &ptmp, 10);
-               if (cnts == 0) {
-                       DBG_88E("%s: btrmap Fail!! cnts error!\n", __func__);
-                       err = -EINVAL;
-                       goto exit;
-               }
-               DBG_88E("%s: cnts =%d\n", __func__, cnts);
-
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
-               if ((addr + cnts) > max_available_size) {
-                       DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
-                       err = -EFAULT;
-                       goto exit;
-               }
-
-               if (rtw_BT_efuse_map_read(padapter, addr, cnts, data) == _FAIL) {
-                       DBG_88E("%s: rtw_BT_efuse_map_read error!!\n", __func__);
-                       err = -EFAULT;
-                       goto exit;
-               }
-
-               *extra = 0;
-               for (i = 0; i < cnts; i++)
-                       sprintf(extra, "%s 0x%02X ", extra, data[i]);
        } else if (strcmp(tmp[0], "btffake") == 0) {
                sprintf(extra, "\n");
                for (i = 0; i < 512; i += 16) {
@@ -6032,7 +5916,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
        haldata = GET_HAL_DATA(padapter);
        pEfuseHal = &haldata->EfuseHal;
        err = 0;
-       setdata = _rtw_zmalloc(1024);
+       setdata = kzalloc(1024, GFP_KERNEL);
        if (setdata == NULL) {
                err = -ENOMEM;
                goto exit;
@@ -6099,7 +5983,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
                for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
                        setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]);
                /* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size);
                if ((addr+cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EFAULT;
@@ -6174,7 +6058,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
                for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
                        setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]);
                /* Change to check TYPE_EFUSE_MAP_LEN, because 8188E raw 256, logic map over 256. */
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_EFUSE_MAP_LEN, (void *)&max_available_size);
                if ((addr+cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EFAULT;
@@ -6212,7 +6096,7 @@ static int rtw_mp_efuse_set(struct net_device *dev,
                for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
                        setdata[jj] = key_2char2num(tmp[1][kk], tmp[1][kk + 1]);
 
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if ((addr+cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EFAULT;
@@ -6251,18 +6135,13 @@ static int rtw_mp_efuse_set(struct net_device *dev,
                for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
                        setdata[jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]);
 
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if ((addr+cnts) > max_available_size) {
                        DBG_88E("%s: addr(0x%X)+cnts(%d) parameter error!\n", __func__, addr, cnts);
                        err = -EFAULT;
                        goto exit;
                }
 
-               if (rtw_BT_efuse_map_write(padapter, addr, cnts, setdata) == _FAIL) {
-                       DBG_88E("%s: rtw_BT_efuse_map_write error!!\n", __func__);
-                       err = -EFAULT;
-                       goto exit;
-               }
        } else if (strcmp(tmp[0], "btwfake") == 0) {
                if ((tmp[1] == NULL) || (tmp[2] == NULL)) {
                        err = -EINVAL;
@@ -6289,13 +6168,6 @@ static int rtw_mp_efuse_set(struct net_device *dev,
 
                for (jj = 0, kk = 0; jj < cnts; jj++, kk += 2)
                        pEfuseHal->fakeBTEfuseModifiedMap[addr+jj] = key_2char2num(tmp[2][kk], tmp[2][kk + 1]);
-       } else if (strcmp(tmp[0], "btdumpfake") == 0) {
-               if (rtw_BT_efuse_map_read(padapter, 0, EFUSE_BT_MAX_MAP_LEN, pEfuseHal->fakeBTEfuseModifiedMap) == _SUCCESS) {
-                       DBG_88E("%s: BT read all map success\n", __func__);
-               } else {
-                       DBG_88E("%s: BT read all map Fail!\n", __func__);
-                       err = -EFAULT;
-               }
        } else if (strcmp(tmp[0], "wldumpfake") == 0) {
                if (rtw_efuse_map_read(padapter, 0, EFUSE_BT_MAX_MAP_LEN,  pEfuseHal->fakeEfuseModifiedMap) == _SUCCESS) {
                        DBG_88E("%s: BT read all map success\n", __func__);
@@ -6306,19 +6178,14 @@ static int rtw_mp_efuse_set(struct net_device *dev,
        } else if (strcmp(tmp[0], "btfk2map") == 0) {
                memcpy(pEfuseHal->BTEfuseModifiedMap, pEfuseHal->fakeBTEfuseModifiedMap, EFUSE_BT_MAX_MAP_LEN);
 
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_BT, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if (max_available_size < 1) {
                        err = -EFAULT;
                        goto exit;
                }
 
-               if (rtw_BT_efuse_map_write(padapter, 0x00, EFUSE_BT_MAX_MAP_LEN, pEfuseHal->fakeBTEfuseModifiedMap) == _FAIL) {
-                       DBG_88E("%s: rtw_BT_efuse_map_write error!\n", __func__);
-                       err = -EFAULT;
-                       goto exit;
-               }
        } else if (strcmp(tmp[0], "wlfk2map") == 0) {
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if (max_available_size < 1) {
                        err = -EFAULT;
                        goto exit;
@@ -6419,7 +6286,7 @@ static int rtw_mp_write_reg(struct net_device *dev,
                        ret = -EINVAL;
                        break;
                }
-               rtw_write8(padapter, addr, data);
+               usb_write8(padapter, addr, data);
                break;
        case 'w':
                /*  2 bytes */
@@ -6427,11 +6294,11 @@ static int rtw_mp_write_reg(struct net_device *dev,
                        ret = -EINVAL;
                        break;
                }
-               rtw_write16(padapter, addr, data);
+               usb_write16(padapter, addr, data);
                break;
        case 'd':
                /*  4 bytes */
-               rtw_write32(padapter, addr, data);
+               usb_write32(padapter, addr, data);
                break;
        default:
                ret = -EINVAL;
@@ -6471,9 +6338,9 @@ static int rtw_mp_read_reg(struct net_device *dev,
                kfree(input);
                return -EFAULT;
        }
-       _rtw_memset(data, 0, 20);
-       _rtw_memset(tmp, 0, 20);
-       _rtw_memset(extra, 0, wrqu->length);
+       memset(data, 0, 20);
+       memset(tmp, 0, 20);
+       memset(extra, 0, wrqu->length);
 
        pch = input;
        pnext = strpbrk(pch, ",.-");
@@ -6499,12 +6366,12 @@ static int rtw_mp_read_reg(struct net_device *dev,
        switch (width) {
        case 'b':
                /*  1 byte */
-               sprintf(extra, "%d\n",  rtw_read8(padapter, addr));
+               sprintf(extra, "%d\n",  usb_read8(padapter, addr));
                wrqu->length = strlen(extra);
                break;
        case 'w':
                /*  2 bytes */
-               sprintf(data, "%04x\n", rtw_read16(padapter, addr));
+               sprintf(data, "%04x\n", usb_read16(padapter, addr));
                for (i = 0; i <= strlen(data); i++) {
                        if (i%2 == 0) {
                                tmp[j] = ' ';
@@ -6535,7 +6402,7 @@ static int rtw_mp_read_reg(struct net_device *dev,
                break;
        case 'd':
                /*  4 bytes */
-               sprintf(data, "%08x", rtw_read32(padapter, addr));
+               sprintf(data, "%08x", usb_read32(padapter, addr));
                /* add read data format blank */
                for (i = 0; i <= strlen(data); i++) {
                        if (i%2 == 0) {
@@ -6599,7 +6466,7 @@ static int rtw_mp_read_reg(struct net_device *dev,
        if (data > 0xFFFFF)
                return -EINVAL;
 
-       _rtw_memset(extra, 0, wrqu->length);
+       memset(extra, 0, wrqu->length);
 
        write_rfreg(padapter, path, addr, data);
 
@@ -6644,7 +6511,7 @@ static int rtw_mp_read_rf(struct net_device *dev,
        if (addr > 0xFF)
                return -EINVAL;
 
-       _rtw_memset(extra, 0, wrqu->length);
+       memset(extra, 0, wrqu->length);
 
        sprintf(data, "%08x", read_rfreg(padapter, path, addr));
        /* add read data format blank */
@@ -6723,9 +6590,10 @@ static int rtw_mp_rate(struct net_device *dev,
                        struct iw_request_info *info,
                        struct iw_point *wrqu, char *extra)
 {
-       u32 rate = MPT_RATE_1M;
+       unsigned long rate = MPT_RATE_1M;
        char    *input = kmalloc(wrqu->length, GFP_KERNEL);
        struct adapter *padapter = rtw_netdev_priv(dev);
+       int status;
 
        if (!input)
                return -ENOMEM;
@@ -6733,8 +6601,12 @@ static int rtw_mp_rate(struct net_device *dev,
                kfree(input);
                return -EFAULT;
        }
-       rate = rtw_atoi(input);
-       sprintf(extra, "Set data rate to %d", rate);
+
+       status = kstrtoul(input, 0, &rate);
+       if (status)
+               return status;
+
+       sprintf(extra, "Set data rate to %lu", rate);
        kfree(input);
        if (rate <= 0x7f)
                rate = wifirate2_ratetbl_inx((u8)rate);
@@ -6756,8 +6628,9 @@ static int rtw_mp_channel(struct net_device *dev,
                        struct iw_point *wrqu, char *extra)
 {
        struct adapter *padapter = rtw_netdev_priv(dev);
-       char    *input = kmalloc(wrqu->length, GFP_KERNEL);
-       u32     channel = 1;
+       char *input = kmalloc(wrqu->length, GFP_KERNEL);
+       unsigned long channel = 1;
+       int status;
 
        if (!input)
                return -ENOMEM;
@@ -6765,8 +6638,12 @@ static int rtw_mp_channel(struct net_device *dev,
                kfree(input);
                return -EFAULT;
        }
-       channel = rtw_atoi(input);
-       sprintf(extra, "Change channel %d to channel %d", padapter->mppriv.channel, channel);
+
+       status = kstrtoul(input, 0, &channel);
+       if (status)
+               return status;
+
+       sprintf(extra, "Change channel %d to channel %lu", padapter->mppriv.channel, channel);
 
        padapter->mppriv.channel = channel;
        Hal_SetChannel(padapter);
@@ -6883,7 +6760,7 @@ static int rtw_mp_ant_rx(struct net_device *dev,
                kfree(input);
                return -EFAULT;
        }
-       _rtw_memset(extra, 0, wrqu->length);
+       memset(extra, 0, wrqu->length);
 
        sprintf(extra, "switch Rx antenna to %s", input);
 
@@ -6936,7 +6813,7 @@ static int rtw_mp_ctx(struct net_device *dev,
        if (rv != 2)
                return -EINVAL;
 
-       _rtw_memset(extra, '\0', sizeof(*extra));
+       memset(extra, '\0', sizeof(*extra));
 
        if (stop == 0) {
                bStartTest = 0; /*  To set Stop */
@@ -6976,7 +6853,7 @@ static int rtw_mp_ctx(struct net_device *dev,
                        pmp_priv->tx.payload = 2;
                        pattrib = &pmp_priv->tx.attrib;
                        pattrib->pktlen = 1500;
-                       _rtw_memset(pattrib->dst, 0xFF, ETH_ALEN);
+                       memset(pattrib->dst, 0xFF, ETH_ALEN);
                        SetPacketTx(padapter);
                } else {
                        return -EFAULT;
@@ -7083,7 +6960,7 @@ static int rtw_mp_arx(struct net_device *dev,
                OFDM_FA = read_bbreg(padapter, 0xda4, 0x0000FFFF);
                OFDM_FA = read_bbreg(padapter, 0xda4, 0xFFFF0000);
                OFDM_FA = read_bbreg(padapter, 0xda8, 0x0000FFFF);
-               CCK_FA = (rtw_read8(padapter, 0xa5b)<<8) | (rtw_read8(padapter, 0xa5c));
+               CCK_FA = (usb_read8(padapter, 0xa5b)<<8) | (usb_read8(padapter, 0xa5c));
 
                sprintf(extra, "Phy Received packet OK:%d CRC error:%d FA Counter: %d", cckok+ofdmok+htok, cckcrc+ofdmcrc+htcrc, OFDM_FA+CCK_FA);
        }
@@ -7104,7 +6981,7 @@ static int rtw_mp_trx_query(struct net_device *dev,
        rxok = padapter->mppriv.rx_pktcount;
        rxfail = padapter->mppriv.rx_crcerrpktcount;
 
-       _rtw_memset(extra, '\0', 128);
+       memset(extra, '\0', 128);
 
        sprintf(extra, "Tx OK:%d, Tx Fail:%d, Rx OK:%d, CRC error:%d ", txok, txfail, rxok, rxfail);
 
@@ -7129,7 +7006,7 @@ static int rtw_mp_pwrtrk(struct net_device *dev,
                ret = -EFAULT;
                goto exit;
        }
-       _rtw_memset(extra, 0, wrqu->length);
+       memset(extra, 0, wrqu->length);
 
        enable = 1;
        if (wrqu->length > 1) {/*  not empty string */
@@ -7203,7 +7080,7 @@ static int rtw_mp_thermal(struct net_device *dev,
        Hal_GetThermalMeter(padapter, &val);
 
        if (bwrite == 0) {
-               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size, false);
+               EFUSE_GetEfuseDefinition(padapter, EFUSE_WIFI, TYPE_AVAILABLE_EFUSE_BYTES_TOTAL, (void *)&max_available_size);
                if (2 > max_available_size) {
                        DBG_88E("no available efuse!\n");
                        return -EFAULT;
@@ -7258,14 +7135,14 @@ static int rtw_mp_dump(struct net_device *dev,
                for (i = 0x0; i < 0x300; i += 4) {
                        if (j%4 == 1)
                                DBG_88E("0x%02x", i);
-                       DBG_88E(" 0x%08x ", rtw_read32(padapter, i));
+                       DBG_88E(" 0x%08x ", usb_read32(padapter, i));
                        if ((j++)%4 == 0)
                                DBG_88E("\n");
                }
                for (i = 0x400; i < 0x1000; i += 4) {
                        if (j%4 == 1)
                                DBG_88E("0x%02x", i);
-                       DBG_88E(" 0x%08x ", rtw_read32(padapter, i));
+                       DBG_88E(" 0x%08x ", usb_read32(padapter, i));
                        if ((j++)%4 == 0)
                                DBG_88E("\n");
                }
@@ -7561,7 +7438,7 @@ static int rtw_test(
        DBG_88E("+%s\n", __func__);
        len = wrqu->data.length;
 
-       pbuf = (u8 *)rtw_zmalloc(len);
+       pbuf = kzalloc(len, GFP_KERNEL);
        if (pbuf == NULL) {
                DBG_88E("%s: no memory!\n", __func__);
                return -ENOMEM;
@@ -7906,7 +7783,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
        memcpy(&wdata, wrq_data, sizeof(wdata));
 
        input_len = wdata.data.length;
-       input = rtw_zmalloc(input_len);
+       input = kzalloc(input_len, GFP_KERNEL);
        if (NULL == input)
                return -ENOMEM;
        if (copy_from_user(input, wdata.data.pointer, input_len)) {
@@ -7973,7 +7850,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
                k = j;
        }
 
-       buffer = rtw_zmalloc(4096);
+       buffer = kzalloc(4096, GFP_KERNEL);
        if (NULL == buffer) {
                err = -ENOMEM;
                goto exit;
@@ -8122,7 +7999,7 @@ static int rtw_ioctl_wext_private(struct net_device *dev, union iwreq_data *wrq_
                else
                        n = wdata.data.length;
 
-               output = rtw_zmalloc(4096);
+               output = kzalloc(4096, GFP_KERNEL);
                if (NULL == output) {
                        err =  -ENOMEM;
                        goto exit;
index 0624378efd6f83d7445e2e0a49453664bfa1c646..737677cf409e6cd797e8da9e53efcfb9dacaaee7 100644 (file)
@@ -85,12 +85,12 @@ void rtw_reset_securitypriv(struct adapter *adapter)
                /*  We have to backup the PMK information for WiFi PMK Caching test item. */
                /*  Backup the btkip_countermeasure information. */
                /*  When the countermeasure is trigger, the driver have to disconnect with AP for 60 seconds. */
-               _rtw_memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
+               memset(&backup_pmkid[0], 0x00, sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
                memcpy(&backup_pmkid[0], &adapter->securitypriv.PMKIDList[0], sizeof(struct rt_pmkid_list) * NUM_PMKID_CACHE);
                backup_index = adapter->securitypriv.PMKIDIndex;
                backup_counter = adapter->securitypriv.btkip_countermeasure;
                backup_time = adapter->securitypriv.btkip_countermeasure_time;
-               _rtw_memset((unsigned char *)&adapter->securitypriv, 0, sizeof(struct security_priv));
+               memset((unsigned char *)&adapter->securitypriv, 0, sizeof(struct security_priv));
 
                /*  Restore the PMK information to securitypriv structure for the following connection. */
                memcpy(&adapter->securitypriv.PMKIDList[0],
@@ -137,7 +137,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
                buff = rtw_malloc(IW_CUSTOM_MAX);
                if (!buff)
                        return;
-               _rtw_memset(buff, 0, IW_CUSTOM_MAX);
+               memset(buff, 0, IW_CUSTOM_MAX);
                p = buff;
                p += sprintf(p, "ASSOCINFO(ReqIEs =");
                len = sec_ie[1]+2;
@@ -145,7 +145,7 @@ void rtw_report_sec_ie(struct adapter *adapter, u8 authmode, u8 *sec_ie)
                for (i = 0; i < len; i++)
                        p += sprintf(p, "%02x", sec_ie[i]);
                p += sprintf(p, ")");
-               _rtw_memset(&wrqu, 0, sizeof(wrqu));
+               memset(&wrqu, 0, sizeof(wrqu));
                wrqu.data.length = p-buff;
                wrqu.data.length = (wrqu.data.length < IW_CUSTOM_MAX) ?
                                   wrqu.data.length : IW_CUSTOM_MAX;
index 0e0c32d46431ab6498048ac1f61afd2be5e8592e..7536be678a40c266b0bb191ba5e2ba636a8ab89e 100644 (file)
 #define _OS_INTFS_C_
 
 #include <osdep_service.h>
+#include <osdep_intf.h>
 #include <drv_types.h>
 #include <xmit_osdep.h>
 #include <recv_osdep.h>
 #include <hal_intf.h>
 #include <rtw_ioctl.h>
-#include <rtw_version.h>
 
 #include <usb_osintf.h>
 #include <usb_hal.h>
-#include <rtw_br_ext.h>
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("Realtek Wireless Lan Driver");
 MODULE_AUTHOR("Realtek Semiconductor Corp.");
 MODULE_VERSION(DRIVERVERSION);
 
-#define CONFIG_BR_EXT_BRNAME "br0"
 #define RTW_NOTCH_FILTER 0 /* 0:Disable, 1:Enable, */
 
 /* module param defaults */
@@ -751,7 +749,6 @@ u32 rtw_start_drv_threads(struct adapter *padapter)
        else
                _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema); /* wait for cmd_thread to run */
 
-       rtw_hal_start_thread(padapter);
        return _status;
 }
 
@@ -764,7 +761,6 @@ void rtw_stop_drv_threads(struct adapter *padapter)
        if (padapter->cmdThread)
                _rtw_down_sema(&padapter->cmdpriv.terminate_cmdthread_sema);
 
-       rtw_hal_stop_thread(padapter);
 }
 
 static u8 rtw_init_default_value(struct adapter *padapter)
@@ -837,8 +833,7 @@ u8 rtw_reset_drv_sw(struct adapter *padapter)
        pmlmepriv->LinkDetectInfo.bBusyTraffic = false;
 
        _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING);
-
-       rtw_hal_sreset_reset_value(padapter);
+       rtw_hal_sreset_init(padapter);
        pwrctrlpriv->pwr_state_check_cnts = 0;
 
        /* mlmeextpriv */
@@ -935,22 +930,22 @@ void rtw_cancel_all_timer(struct adapter *padapter)
 {
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("+rtw_cancel_all_timer\n"));
 
-       _cancel_timer_ex(&padapter->mlmepriv.assoc_timer);
+       del_timer_sync(&padapter->mlmepriv.assoc_timer);
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel association timer complete!\n"));
 
-       _cancel_timer_ex(&padapter->mlmepriv.scan_to_timer);
+       del_timer_sync(&padapter->mlmepriv.scan_to_timer);
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel scan_to_timer!\n"));
 
-       _cancel_timer_ex(&padapter->mlmepriv.dynamic_chk_timer);
+       del_timer_sync(&padapter->mlmepriv.dynamic_chk_timer);
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel dynamic_chk_timer!\n"));
 
        /*  cancel sw led timer */
        rtw_hal_sw_led_deinit(padapter);
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("rtw_cancel_all_timer:cancel DeInitSwLeds!\n"));
 
-       _cancel_timer_ex(&padapter->pwrctrlpriv.pwr_state_check_timer);
+       del_timer_sync(&padapter->pwrctrlpriv.pwr_state_check_timer);
 
-       _cancel_timer_ex(&padapter->recvpriv.signal_stat_timer);
+       del_timer_sync(&padapter->recvpriv.signal_stat_timer);
 }
 
 u8 rtw_free_drv_sw(struct adapter *padapter)
@@ -964,9 +959,9 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
        {
                struct wifidirect_info *pwdinfo = &padapter->wdinfo;
                if (!rtw_p2p_chk_state(pwdinfo, P2P_STATE_NONE)) {
-                       _cancel_timer_ex(&pwdinfo->find_phase_timer);
-                       _cancel_timer_ex(&pwdinfo->restore_p2p_state_timer);
-                       _cancel_timer_ex(&pwdinfo->pre_tx_scan_timer);
+                       del_timer_sync(&pwdinfo->find_phase_timer);
+                       del_timer_sync(&pwdinfo->restore_p2p_state_timer);
+                       del_timer_sync(&pwdinfo->pre_tx_scan_timer);
                        rtw_p2p_set_state(pwdinfo, P2P_STATE_NONE);
                }
        }
@@ -995,40 +990,13 @@ u8 rtw_free_drv_sw(struct adapter *padapter)
                padapter->rereg_nd_name_priv.old_pnetdev = NULL;
        }
 
-       /*  clear pbuddystruct adapter to avoid access wrong pointer. */
-       if (padapter->pbuddy_adapter != NULL)
-               padapter->pbuddy_adapter->pbuddy_adapter = NULL;
+       mutex_destroy(&padapter->hw_init_mutex);
 
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw\n"));
 
        return _SUCCESS;
 }
 
-void netdev_br_init(struct net_device *netdev)
-{
-       struct adapter *adapter = (struct adapter *)rtw_netdev_priv(netdev);
-
-       rcu_read_lock();
-
-       if (rcu_dereference(adapter->pnetdev->rx_handler_data)) {
-               struct net_device *br_netdev;
-               struct net *devnet = NULL;
-
-               devnet = dev_net(netdev);
-               br_netdev = dev_get_by_name(devnet, CONFIG_BR_EXT_BRNAME);
-               if (br_netdev) {
-                       memcpy(adapter->br_mac, br_netdev->dev_addr, ETH_ALEN);
-                       dev_put(br_netdev);
-               } else {
-                       pr_info("%s()-%d: dev_get_by_name(%s) failed!",
-                               __func__, __LINE__, CONFIG_BR_EXT_BRNAME);
-               }
-       }
-       adapter->ethBrExtInfo.addPPPoETag = 1;
-
-       rcu_read_unlock();
-}
-
 int _netdev_open(struct net_device *pnetdev)
 {
        uint status;
@@ -1046,7 +1014,6 @@ int _netdev_open(struct net_device *pnetdev)
        if (!padapter->bup) {
                padapter->bDriverStopped = false;
                padapter->bSurpriseRemoved = false;
-               padapter->bCardDisableWOHSM = false;
 
                status = rtw_hal_init(padapter);
                if (status == _FAIL) {
@@ -1086,8 +1053,6 @@ int _netdev_open(struct net_device *pnetdev)
        else
                netif_tx_wake_all_queues(pnetdev);
 
-       netdev_br_init(pnetdev);
-
 netdev_open_normal_process:
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-88eu_drv - dev_open\n"));
        DBG_88E("-88eu_drv - drv_open, bup =%d\n", padapter->bup);
@@ -1107,9 +1072,9 @@ int netdev_open(struct net_device *pnetdev)
        int ret;
        struct adapter *padapter = (struct adapter *)rtw_netdev_priv(pnetdev);
 
-       _enter_critical_mutex(padapter->hw_init_mutex, NULL);
+       _enter_critical_mutex(&padapter->hw_init_mutex, NULL);
        ret = _netdev_open(pnetdev);
-       mutex_unlock(padapter->hw_init_mutex);
+       mutex_unlock(&padapter->hw_init_mutex);
        return ret;
 }
 
@@ -1121,7 +1086,6 @@ static int  ips_netdrv_open(struct adapter *padapter)
 
        padapter->bDriverStopped = false;
        padapter->bSurpriseRemoved = false;
-       padapter->bCardDisableWOHSM = false;
 
        status = rtw_hal_init(padapter);
        if (status == _FAIL) {
@@ -1164,13 +1128,11 @@ void rtw_ips_pwr_down(struct adapter *padapter)
        u32 start_time = jiffies;
        DBG_88E("===> rtw_ips_pwr_down...................\n");
 
-       padapter->bCardDisableWOHSM = true;
        padapter->net_closed = true;
 
        rtw_led_control(padapter, LED_CTL_POWER_OFF);
 
        rtw_ips_dev_unload(padapter);
-       padapter->bCardDisableWOHSM = false;
        DBG_88E("<=== rtw_ips_pwr_down..................... in %dms\n", rtw_get_passing_time_ms(start_time));
 }
 
@@ -1235,8 +1197,6 @@ int netdev_close(struct net_device *pnetdev)
                rtw_led_control(padapter, LED_CTL_POWER_OFF);
        }
 
-       nat25_db_cleanup(padapter);
-
 #ifdef CONFIG_88EU_P2P
        rtw_p2p_enable(padapter, P2P_ROLE_DISABLE);
 #endif /* CONFIG_88EU_P2P */
index 2579a404a766521e7d8f4e28c5150532fc13bcb9..de0efe2759ff48c7eb49688af2edcb31d5881535 100644 (file)
@@ -22,6 +22,7 @@
 #define _OSDEP_SERVICE_C_
 
 #include <osdep_service.h>
+#include <osdep_intf.h>
 #include <drv_types.h>
 #include <recv_osdep.h>
 #include <linux/vmalloc.h>
@@ -38,23 +39,6 @@ inline int RTW_STATUS_CODE(int error_code)
        return _FAIL;
 }
 
-u32 rtw_atoi(u8 *s)
-{
-       int num = 0, flag = 0;
-       int i;
-       for (i = 0; i <= strlen(s); i++) {
-               if (s[i] >= '0' && s[i] <= '9')
-                       num = num * 10 + s[i] - '0';
-               else if (s[0] == '-' && i == 0)
-                       flag = 1;
-               else
-                       break;
-       }
-       if (flag == 1)
-               num = num * -1;
-       return num;
-}
-
 u8 *_rtw_malloc(u32 sz)
 {
        u8      *pbuf = NULL;
@@ -63,20 +47,11 @@ u8 *_rtw_malloc(u32 sz)
        return pbuf;
 }
 
-u8 *_rtw_zmalloc(u32 sz)
-{
-       u8      *pbuf = _rtw_malloc(sz);
-
-       if (pbuf != NULL)
-               memset(pbuf, 0, sz);
-       return pbuf;
-}
-
 void *rtw_malloc2d(int h, int w, int size)
 {
        int j;
 
-       void **a = (void **)rtw_zmalloc(h*sizeof(void *) + h*w*size);
+       void **a = (void **)kzalloc(h*sizeof(void *) + h*w*size, GFP_KERNEL);
        if (a == NULL) {
                pr_info("%s: alloc memory fail!\n", __func__);
                return NULL;
@@ -88,48 +63,6 @@ void *rtw_malloc2d(int h, int w, int size)
        return a;
 }
 
-void rtw_mfree2d(void *pbuf, int h, int w, int size)
-{
-       kfree(pbuf);
-}
-
-void _rtw_memset(void *pbuf, int c, u32 sz)
-{
-       memset(pbuf, c, sz);
-}
-
-void _rtw_init_listhead(struct list_head *list)
-{
-       INIT_LIST_HEAD(list);
-}
-
-/*
-For the following list_xxx operations,
-caller must guarantee the atomic context.
-Otherwise, there will be racing condition.
-*/
-u32    rtw_is_list_empty(struct list_head *phead)
-{
-       if (list_empty(phead))
-               return true;
-       else
-               return false;
-}
-
-void rtw_list_insert_head(struct list_head *plist, struct list_head *phead)
-{
-       list_add(plist, phead);
-}
-
-void rtw_list_insert_tail(struct list_head *plist, struct list_head *phead)
-{
-       list_add_tail(plist, phead);
-}
-
-/*
-Caller must check if the list is empty before calling rtw_list_delete
-*/
-
 u32 _rtw_down_sema(struct semaphore *sema)
 {
        if (down_interruptible(sema))
@@ -140,23 +73,10 @@ u32 _rtw_down_sema(struct semaphore *sema)
 
 void   _rtw_init_queue(struct __queue *pqueue)
 {
-       _rtw_init_listhead(&(pqueue->queue));
+       INIT_LIST_HEAD(&(pqueue->queue));
        spin_lock_init(&(pqueue->lock));
 }
 
-u32      _rtw_queue_empty(struct __queue *pqueue)
-{
-       return rtw_is_list_empty(&(pqueue->queue));
-}
-
-u32 rtw_end_of_queue_search(struct list_head *head, struct list_head *plist)
-{
-       if (head == plist)
-               return true;
-       else
-               return false;
-}
-
 inline u32 rtw_systime_to_ms(u32 systime)
 {
        return systime * 1000 / HZ;
@@ -173,25 +93,6 @@ inline s32 rtw_get_passing_time_ms(u32 start)
        return rtw_systime_to_ms(jiffies-start);
 }
 
-inline s32 rtw_get_time_interval_ms(u32 start, u32 end)
-{
-       return rtw_systime_to_ms(end-start);
-}
-
-void rtw_sleep_schedulable(int ms)
-{
-       u32 delta;
-
-       delta = (ms * HZ)/1000;/* ms) */
-       if (delta == 0)
-               delta = 1;/*  1 ms */
-       set_current_state(TASK_INTERRUPTIBLE);
-       if (schedule_timeout(delta) != 0)
-               return;
-}
-
-#define RTW_SUSPEND_LOCK_NAME "rtw_wifi"
-
 struct net_device *rtw_alloc_etherdev_with_old_priv(int sizeof_priv,
                                                    void *old_priv)
 {
@@ -312,12 +213,6 @@ u64 rtw_modular64(u64 x, u64 y)
        return do_div(x, y);
 }
 
-u64 rtw_division64(u64 x, u64 y)
-{
-       do_div(x, y);
-       return x;
-}
-
 void rtw_buf_free(u8 **buf, u32 *buf_len)
 {
        *buf_len = 0;
index c0fa8fdb9d92302e688c8b61c648d3a19d9b4370..f8ac996cc8b6162b38795402f56d80194c156cf2 100644 (file)
@@ -26,7 +26,7 @@
 #include <recv_osdep.h>
 
 #include <osdep_intf.h>
-#include <usb_ops.h>
+#include <usb_ops_linux.h>
 
 /* alloc os related resource in struct recv_frame */
 int rtw_os_recv_resource_alloc(struct adapter *padapter,
@@ -73,7 +73,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
                }
        }
 
-       _rtw_memset(&ev, 0x00, sizeof(ev));
+       memset(&ev, 0x00, sizeof(ev));
        if (bgroup)
                ev.flags |= IW_MICFAILURE_GROUP;
        else
@@ -81,7 +81,7 @@ void rtw_handle_tkip_mic_err(struct adapter *padapter, u8 bgroup)
 
        ev.src_addr.sa_family = ARPHRD_ETHER;
        memcpy(ev.src_addr.sa_data, &pmlmepriv->assoc_bssid[0], ETH_ALEN);
-       _rtw_memset(&wrqu, 0x00, sizeof(wrqu));
+       memset(&wrqu, 0x00, sizeof(wrqu));
        wrqu.data.length = sizeof(ev);
        wireless_send_event(padapter->pnetdev, IWEVMICHAELMICFAILURE,
                            &wrqu, (char *)&ev);
@@ -199,7 +199,7 @@ void rtw_os_read_port(struct adapter *padapter, struct recv_buf *precvbuf)
        dev_kfree_skb_any(precvbuf->pskb);
        precvbuf->pskb = NULL;
        precvbuf->reuse = false;
-       rtw_read_port(padapter, precvpriv->ff_hwaddr, 0,
+       usb_read_port(padapter, precvpriv->ff_hwaddr, 0,
                        (unsigned char *)precvbuf);
 }
 
index 7526b989dcbf9f3e392e28d6887fd2ae214326f9..3c8720c8598d8c4fd3afb209db2c79b83104d7ca 100644 (file)
 #include <recv_osdep.h>
 #include <xmit_osdep.h>
 #include <hal_intf.h>
-#include <rtw_version.h>
 #include <linux/usb.h>
 #include <linux/vmalloc.h>
 #include <osdep_intf.h>
 
-#include <usb_vendor_req.h>
-#include <usb_ops.h>
+#include <usb_ops_linux.h>
 #include <usb_osintf.h>
 #include <usb_hal.h>
 #include <rtw_ioctl.h>
 
 int ui_pid[3] = {0, 0, 0};
 
-static int rtw_suspend(struct usb_interface *intf, pm_message_t message);
-static int rtw_resume(struct usb_interface *intf);
-
-
-static int rtw_drv_init(struct usb_interface *pusb_intf, const struct usb_device_id *pdid);
-static void rtw_dev_remove(struct usb_interface *pusb_intf);
-
-
 #define USB_VENDER_ID_REALTEK          0x0bda
 
 /* DID_USB_v916_20130116 */
@@ -62,50 +52,6 @@ static struct usb_device_id rtw_usb_id_tbl[] = {
 
 MODULE_DEVICE_TABLE(usb, rtw_usb_id_tbl);
 
-struct rtw_usb_drv {
-       struct usb_driver usbdrv;
-       int drv_registered;
-       struct mutex hw_init_mutex;
-};
-
-static struct rtw_usb_drv rtl8188e_usb_drv = {
-       .usbdrv.name = "r8188eu",
-       .usbdrv.probe = rtw_drv_init,
-       .usbdrv.disconnect = rtw_dev_remove,
-       .usbdrv.id_table = rtw_usb_id_tbl,
-       .usbdrv.suspend =  rtw_suspend,
-       .usbdrv.resume = rtw_resume,
-       .usbdrv.reset_resume   = rtw_resume,
-};
-
-static struct rtw_usb_drv *usb_drv = &rtl8188e_usb_drv;
-
-static u8 rtw_init_intf_priv(struct dvobj_priv *dvobj)
-{
-       u8 rst = _SUCCESS;
-
-       mutex_init(&dvobj->usb_vendor_req_mutex);
-
-       dvobj->usb_alloc_vendor_req_buf = rtw_zmalloc(MAX_USB_IO_CTL_SIZE);
-       if (dvobj->usb_alloc_vendor_req_buf == NULL) {
-               DBG_88E("alloc usb_vendor_req_buf failed...\n");
-               rst = _FAIL;
-               goto exit;
-       }
-       dvobj->usb_vendor_req_buf = (u8 *)N_BYTE_ALIGMENT((size_t)(dvobj->usb_alloc_vendor_req_buf), ALIGNMENT_UNIT);
-exit:
-       return rst;
-}
-
-static u8 rtw_deinit_intf_priv(struct dvobj_priv *dvobj)
-{
-       u8 rst = _SUCCESS;
-
-       kfree(dvobj->usb_alloc_vendor_req_buf);
-       mutex_destroy(&dvobj->usb_vendor_req_mutex);
-       return rst;
-}
-
 static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
 {
        int     i;
@@ -120,7 +66,7 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
        struct usb_device       *pusbd;
 
 
-       pdvobjpriv = (struct dvobj_priv *)rtw_zmalloc(sizeof(*pdvobjpriv));
+       pdvobjpriv = kzalloc(sizeof(*pdvobjpriv), GFP_KERNEL);
        if (pdvobjpriv == NULL)
                goto exit;
 
@@ -169,11 +115,11 @@ static struct dvobj_priv *usb_dvobj_init(struct usb_interface *usb_intf)
        else
                pdvobjpriv->ishighspeed = false;
 
-       if (rtw_init_intf_priv(pdvobjpriv) == _FAIL)
-               goto free_dvobj;
+       mutex_init(&pdvobjpriv->usb_vendor_req_mutex);
+       pdvobjpriv->usb_vendor_req_buf = kzalloc(MAX_USB_IO_CTL_SIZE, GFP_KERNEL);
 
-       sema_init(&(pdvobjpriv->usb_suspend_sema), 0);
-       rtw_reset_continual_urb_error(pdvobjpriv);
+       if (!pdvobjpriv->usb_vendor_req_buf)
+               goto free_dvobj;
 
        usb_get_dev(pusbd);
 
@@ -211,7 +157,9 @@ static void usb_dvobj_deinit(struct usb_interface *usb_intf)
                                usb_reset_device(interface_to_usbdev(usb_intf));
                        }
                }
-               rtw_deinit_intf_priv(dvobj);
+
+               kfree(dvobj->usb_vendor_req_buf);
+               mutex_destroy(&dvobj->usb_vendor_req_mutex);
                kfree(dvobj);
        }
 
@@ -244,7 +192,7 @@ static void usb_intf_stop(struct adapter *padapter)
        rtw_hal_inirp_deinit(padapter);
 
        /* cancel out irp */
-       rtw_write_port_cancel(padapter);
+       usb_write_port_cancel(padapter);
 
        /* todo:cancel other irps */
 
@@ -284,108 +232,6 @@ static void rtw_dev_unload(struct adapter *padapter)
        RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("-rtw_dev_unload\n"));
 }
 
-int rtw_hw_suspend(struct adapter *padapter)
-{
-       struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-       struct net_device *pnetdev = padapter->pnetdev;
-
-
-       if ((!padapter->bup) || (padapter->bDriverStopped) ||
-           (padapter->bSurpriseRemoved)) {
-               DBG_88E("padapter->bup=%d bDriverStopped=%d bSurpriseRemoved = %d\n",
-                       padapter->bup, padapter->bDriverStopped,
-                       padapter->bSurpriseRemoved);
-               goto error_exit;
-       }
-
-       /* system suspend */
-       LeaveAllPowerSaveMode(padapter);
-
-       DBG_88E("==> rtw_hw_suspend\n");
-       _enter_pwrlock(&pwrpriv->lock);
-       pwrpriv->bips_processing = true;
-       /* s1. */
-       if (pnetdev) {
-               netif_carrier_off(pnetdev);
-               netif_tx_stop_all_queues(pnetdev);
-       }
-
-       /* s2. */
-       rtw_disassoc_cmd(padapter, 500, false);
-
-       /* s2-2.  indicate disconnect to os */
-       {
-               struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
-               if (check_fwstate(pmlmepriv, _FW_LINKED)) {
-                       _clr_fwstate_(pmlmepriv, _FW_LINKED);
-
-                       rtw_led_control(padapter, LED_CTL_NO_LINK);
-
-                       rtw_os_indicate_disconnect(padapter);
-
-                       /* donnot enqueue cmd */
-                       rtw_lps_ctrl_wk_cmd(padapter, LPS_CTRL_DISCONNECT, 0);
-               }
-       }
-       /* s2-3. */
-       rtw_free_assoc_resources(padapter, 1);
-
-       /* s2-4. */
-       rtw_free_network_queue(padapter, true);
-       rtw_ips_dev_unload(padapter);
-       pwrpriv->rf_pwrstate = rf_off;
-       pwrpriv->bips_processing = false;
-
-       _exit_pwrlock(&pwrpriv->lock);
-
-       return 0;
-
-error_exit:
-       DBG_88E("%s, failed\n", __func__);
-       return -1;
-}
-
-int rtw_hw_resume(struct adapter *padapter)
-{
-       struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-       struct net_device *pnetdev = padapter->pnetdev;
-
-
-       /* system resume */
-       DBG_88E("==> rtw_hw_resume\n");
-       _enter_pwrlock(&pwrpriv->lock);
-       pwrpriv->bips_processing = true;
-       rtw_reset_drv_sw(padapter);
-
-       if (pm_netdev_open(pnetdev, false) != 0) {
-               _exit_pwrlock(&pwrpriv->lock);
-               goto error_exit;
-       }
-
-       netif_device_attach(pnetdev);
-       netif_carrier_on(pnetdev);
-
-       if (!netif_queue_stopped(pnetdev))
-               netif_start_queue(pnetdev);
-       else
-               netif_wake_queue(pnetdev);
-
-       pwrpriv->bkeepfwalive = false;
-       pwrpriv->brfoffbyhw = false;
-
-       pwrpriv->rf_pwrstate = rf_on;
-       pwrpriv->bips_processing = false;
-
-       _exit_pwrlock(&pwrpriv->lock);
-
-
-       return 0;
-error_exit:
-       DBG_88E("%s, Open net dev failed\n", __func__);
-       return -1;
-}
-
 static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
 {
        struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
@@ -460,14 +306,8 @@ static int rtw_resume(struct usb_interface *pusb_intf)
 {
        struct dvobj_priv *dvobj = usb_get_intfdata(pusb_intf);
        struct adapter *padapter = dvobj->if1;
-       struct pwrctrl_priv *pwrpriv = &padapter->pwrctrlpriv;
-        int ret = 0;
 
-       if (pwrpriv->bInternalAutoSuspend)
-               ret = rtw_resume_process(padapter);
-       else
-               ret = rtw_resume_process(padapter);
-       return ret;
+       return rtw_resume_process(padapter);
 }
 
 int rtw_resume_process(struct adapter *padapter)
@@ -539,7 +379,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
        dvobj->if1 = padapter;
 
        padapter->bDriverStopped = true;
-       padapter->hw_init_mutex = &usb_drv->hw_init_mutex;
+       mutex_init(&padapter->hw_init_mutex);
        padapter->chip_type = RTL8188E;
 
        pnetdev = rtw_init_netdev(padapter);
@@ -554,9 +394,6 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
        padapter->intf_start = &usb_intf_start;
        padapter->intf_stop = &usb_intf_stop;
 
-       /* step init_io_priv */
-       rtw_init_io_priv(padapter, usb_set_intf_ops);
-
        /* step read_chip_version */
        rtw_hal_read_chip_version(padapter);
 
@@ -642,12 +479,10 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
        free_mlme_ap_info(if1);
 #endif
 
-       if (if1->DriverState != DRIVER_DISAPPEAR) {
-               if (pnetdev) {
-                       /* will call netdev_close() */
-                       unregister_netdev(pnetdev);
-                       rtw_proc_remove_one(pnetdev);
-               }
+       if (pnetdev) {
+               /* will call netdev_close() */
+               unregister_netdev(pnetdev);
+               rtw_proc_remove_one(pnetdev);
        }
        rtw_cancel_all_timer(if1);
 
@@ -710,7 +545,7 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
        DBG_88E("+rtw_dev_remove\n");
        RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+dev_remove()\n"));
 
-       if (usb_drv->drv_registered)
+       if (!pusb_intf->unregistering)
                padapter->bSurpriseRemoved = true;
 
        rtw_pm_set_ips(padapter, IPS_NONE);
@@ -728,29 +563,14 @@ static void rtw_dev_remove(struct usb_interface *pusb_intf)
        return;
 }
 
-static int __init rtw_drv_entry(void)
-{
-       RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_entry\n"));
-
-       DBG_88E(DRV_NAME " driver version=%s\n", DRIVERVERSION);
-
-       mutex_init(&usb_drv->hw_init_mutex);
-
-       usb_drv->drv_registered = true;
-       return usb_register(&usb_drv->usbdrv);
-}
-
-static void __exit rtw_drv_halt(void)
-{
-       RT_TRACE(_module_hci_intfs_c_, _drv_err_, ("+rtw_drv_halt\n"));
-       DBG_88E("+rtw_drv_halt\n");
-
-       usb_drv->drv_registered = false;
-       usb_deregister(&usb_drv->usbdrv);
-
-       mutex_destroy(&usb_drv->hw_init_mutex);
-       DBG_88E("-rtw_drv_halt\n");
-}
+static struct usb_driver rtl8188e_usb_drv = {
+       .name = "r8188eu",
+       .probe = rtw_drv_init,
+       .disconnect = rtw_dev_remove,
+       .id_table = rtw_usb_id_tbl,
+       .suspend =  rtw_suspend,
+       .resume = rtw_resume,
+       .reset_resume = rtw_resume,
+};
 
-module_init(rtw_drv_entry);
-module_exit(rtw_drv_halt);
+module_usb_driver(rtl8188e_usb_drv)
index ba2a8ab80d77a9e6d511f358479cbd945a7c641a..ba1e178fb51043693a10c1bdc65a7bd316f07413 100644 (file)
 #define _USB_OPS_LINUX_C_
 
 #include <drv_types.h>
-#include <usb_ops_linux.h>
+#include <recv_osdep.h>
 #include <rtw_sreset.h>
 
+static void interrupt_handler_8188eu(struct adapter *adapt, u16 pkt_len, u8 *pbuf)
+{
+       struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
+
+       if (pkt_len != INTERRUPT_MSG_FORMAT_LEN) {
+               DBG_88E("%s Invalid interrupt content length (%d)!\n", __func__, pkt_len);
+               return;
+       }
+
+       /*  HISR */
+       memcpy(&(haldata->IntArray[0]), &(pbuf[USB_INTR_CONTENT_HISR_OFFSET]), 4);
+       memcpy(&(haldata->IntArray[1]), &(pbuf[USB_INTR_CONTENT_HISRE_OFFSET]), 4);
+
+       /*  C2H Event */
+       if (pbuf[0] != 0)
+               memcpy(&(haldata->C2hArray[0]), &(pbuf[USB_INTR_CONTENT_C2H_OFFSET]), 16);
+}
+
+static int recvbuf2recvframe(struct adapter *adapt, struct sk_buff *pskb)
+{
+       u8      *pbuf;
+       u8      shift_sz = 0;
+       u16     pkt_cnt;
+       u32     pkt_offset, skb_len, alloc_sz;
+       s32     transfer_len;
+       struct recv_stat        *prxstat;
+       struct phy_stat *pphy_status = NULL;
+       struct sk_buff *pkt_copy = NULL;
+       struct recv_frame       *precvframe = NULL;
+       struct rx_pkt_attrib    *pattrib = NULL;
+       struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
+       struct recv_priv        *precvpriv = &adapt->recvpriv;
+       struct __queue *pfree_recv_queue = &precvpriv->free_recv_queue;
+
+       transfer_len = (s32)pskb->len;
+       pbuf = pskb->data;
+
+       prxstat = (struct recv_stat *)pbuf;
+       pkt_cnt = (le32_to_cpu(prxstat->rxdw2) >> 16) & 0xff;
+
+       do {
+               RT_TRACE(_module_rtl871x_recv_c_, _drv_info_,
+                        ("recvbuf2recvframe: rxdesc=offsset 0:0x%08x, 4:0x%08x, 8:0x%08x, C:0x%08x\n",
+                         prxstat->rxdw0, prxstat->rxdw1, prxstat->rxdw2, prxstat->rxdw4));
+
+               prxstat = (struct recv_stat *)pbuf;
+
+               precvframe = rtw_alloc_recvframe(pfree_recv_queue);
+               if (precvframe == NULL) {
+                       RT_TRACE(_module_rtl871x_recv_c_, _drv_err_, ("recvbuf2recvframe: precvframe==NULL\n"));
+                       DBG_88E("%s()-%d: rtw_alloc_recvframe() failed! RX Drop!\n", __func__, __LINE__);
+                       goto _exit_recvbuf2recvframe;
+               }
+
+               INIT_LIST_HEAD(&precvframe->list);
+               precvframe->len = 0;
+
+               update_recvframe_attrib_88e(precvframe, prxstat);
+
+               pattrib = &precvframe->attrib;
+
+               if ((pattrib->crc_err) || (pattrib->icv_err)) {
+                       DBG_88E("%s: RX Warning! crc_err=%d icv_err=%d, skip!\n", __func__, pattrib->crc_err, pattrib->icv_err);
+
+                       rtw_free_recvframe(precvframe, pfree_recv_queue);
+                       goto _exit_recvbuf2recvframe;
+               }
+
+               if ((pattrib->physt) && (pattrib->pkt_rpt_type == NORMAL_RX))
+                       pphy_status = (struct phy_stat *)(pbuf + RXDESC_OFFSET);
+
+               pkt_offset = RXDESC_SIZE + pattrib->drvinfo_sz + pattrib->shift_sz + pattrib->pkt_len;
+
+               if ((pattrib->pkt_len <= 0) || (pkt_offset > transfer_len)) {
+                       RT_TRACE(_module_rtl871x_recv_c_, _drv_info_, ("recvbuf2recvframe: pkt_len<=0\n"));
+                       DBG_88E("%s()-%d: RX Warning!,pkt_len<=0 or pkt_offset> transfoer_len\n", __func__, __LINE__);
+                       rtw_free_recvframe(precvframe, pfree_recv_queue);
+                       goto _exit_recvbuf2recvframe;
+               }
+
+               /*      Modified by Albert 20101213 */
+               /*      For 8 bytes IP header alignment. */
+               if (pattrib->qos)       /*      Qos data, wireless lan header length is 26 */
+                       shift_sz = 6;
+               else
+                       shift_sz = 0;
+
+               skb_len = pattrib->pkt_len;
+
+               /*  for first fragment packet, driver need allocate 1536+drvinfo_sz+RXDESC_SIZE to defrag packet. */
+               /*  modify alloc_sz for recvive crc error packet by thomas 2011-06-02 */
+               if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) {
+                       if (skb_len <= 1650)
+                               alloc_sz = 1664;
+                       else
+                               alloc_sz = skb_len + 14;
+               } else {
+                       alloc_sz = skb_len;
+                       /*      6 is for IP header 8 bytes alignment in QoS packet case. */
+                       /*      8 is for skb->data 4 bytes alignment. */
+                       alloc_sz += 14;
+               }
+
+               pkt_copy = netdev_alloc_skb(adapt->pnetdev, alloc_sz);
+               if (pkt_copy) {
+                       pkt_copy->dev = adapt->pnetdev;
+                       precvframe->pkt = pkt_copy;
+                       precvframe->rx_head = pkt_copy->data;
+                       precvframe->rx_end = pkt_copy->data + alloc_sz;
+                       skb_reserve(pkt_copy, 8 - ((size_t)(pkt_copy->data) & 7));/* force pkt_copy->data at 8-byte alignment address */
+                       skb_reserve(pkt_copy, shift_sz);/* force ip_hdr at 8-byte alignment address according to shift_sz. */
+                       memcpy(pkt_copy->data, (pbuf + pattrib->drvinfo_sz + RXDESC_SIZE), skb_len);
+                       precvframe->rx_tail = pkt_copy->data;
+                       precvframe->rx_data = pkt_copy->data;
+               } else {
+                       if ((pattrib->mfrag == 1) && (pattrib->frag_num == 0)) {
+                               DBG_88E("recvbuf2recvframe: alloc_skb fail , drop frag frame\n");
+                               rtw_free_recvframe(precvframe, pfree_recv_queue);
+                               goto _exit_recvbuf2recvframe;
+                       }
+                       precvframe->pkt = skb_clone(pskb, GFP_ATOMIC);
+                       if (precvframe->pkt) {
+                               precvframe->rx_tail = pbuf + pattrib->drvinfo_sz + RXDESC_SIZE;
+                               precvframe->rx_head = precvframe->rx_tail;
+                               precvframe->rx_data = precvframe->rx_tail;
+                               precvframe->rx_end =  pbuf + pattrib->drvinfo_sz + RXDESC_SIZE + alloc_sz;
+                       } else {
+                               DBG_88E("recvbuf2recvframe: skb_clone fail\n");
+                               rtw_free_recvframe(precvframe, pfree_recv_queue);
+                               goto _exit_recvbuf2recvframe;
+                       }
+               }
+
+               recvframe_put(precvframe, skb_len);
+
+               switch (haldata->UsbRxAggMode) {
+               case USB_RX_AGG_DMA:
+               case USB_RX_AGG_MIX:
+                       pkt_offset = (u16) round_up(pkt_offset, 128);
+                       break;
+               case USB_RX_AGG_USB:
+                       pkt_offset = (u16) round_up(pkt_offset, 4);
+                       break;
+               case USB_RX_AGG_DISABLE:
+               default:
+                       break;
+               }
+               if (pattrib->pkt_rpt_type == NORMAL_RX) { /* Normal rx packet */
+                       if (pattrib->physt)
+                               update_recvframe_phyinfo_88e(precvframe, (struct phy_stat *)pphy_status);
+                       if (rtw_recv_entry(precvframe) != _SUCCESS) {
+                               RT_TRACE(_module_rtl871x_recv_c_, _drv_err_,
+                                       ("recvbuf2recvframe: rtw_recv_entry(precvframe) != _SUCCESS\n"));
+                       }
+               } else {
+                       /* enqueue recvframe to txrtp queue */
+                       if (pattrib->pkt_rpt_type == TX_REPORT1) {
+                               /* CCX-TXRPT ack for xmit mgmt frames. */
+                               handle_txrpt_ccx_88e(adapt, precvframe->rx_data);
+                       } else if (pattrib->pkt_rpt_type == TX_REPORT2) {
+                               ODM_RA_TxRPT2Handle_8188E(
+                                                       &haldata->odmpriv,
+                                                       precvframe->rx_data,
+                                                       pattrib->pkt_len,
+                                                       pattrib->MacIDValidEntry[0],
+                                                       pattrib->MacIDValidEntry[1]
+                                                       );
+                       } else if (pattrib->pkt_rpt_type == HIS_REPORT) {
+                               interrupt_handler_8188eu(adapt, pattrib->pkt_len, precvframe->rx_data);
+                       }
+                       rtw_free_recvframe(precvframe, pfree_recv_queue);
+               }
+               pkt_cnt--;
+               transfer_len -= pkt_offset;
+               pbuf += pkt_offset;
+               precvframe = NULL;
+               pkt_copy = NULL;
+
+               if (transfer_len > 0 && pkt_cnt == 0)
+                       pkt_cnt = (le32_to_cpu(prxstat->rxdw2)>>16) & 0xff;
+
+       } while ((transfer_len > 0) && (pkt_cnt > 0));
+
+_exit_recvbuf2recvframe:
+
+       return _SUCCESS;
+}
+
 unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)
 {
        unsigned int pipe = 0, ep_num = 0;
@@ -39,19 +227,309 @@ unsigned int ffaddr2pipehdl(struct dvobj_priv *pdvobj, u32 addr)
        return pipe;
 }
 
-void usb_read_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *rmem)
+static int usbctrl_vendorreq(struct adapter *adapt, u8 request, u16 value, u16 index, void *pdata, u16 len, u8 requesttype)
+{
+       struct dvobj_priv  *dvobjpriv = adapter_to_dvobj(adapt);
+       struct usb_device *udev = dvobjpriv->pusbdev;
+       unsigned int pipe;
+       int status = 0;
+       u8 reqtype;
+       u8 *pIo_buf;
+       int vendorreq_times = 0;
+
+       if ((adapt->bSurpriseRemoved) || (adapt->pwrctrlpriv.pnp_bstop_trx)) {
+               RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usbctrl_vendorreq:(adapt->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n"));
+               status = -EPERM;
+               goto exit;
+       }
+
+       if (len > MAX_VENDOR_REQ_CMD_SIZE) {
+               DBG_88E("[%s] Buffer len error ,vendor request failed\n", __func__);
+               status = -EINVAL;
+               goto exit;
+       }
+
+       _enter_critical_mutex(&dvobjpriv->usb_vendor_req_mutex, NULL);
+
+       /*  Acquire IO memory for vendorreq */
+       pIo_buf = dvobjpriv->usb_vendor_req_buf;
+
+       if (pIo_buf == NULL) {
+               DBG_88E("[%s] pIo_buf == NULL\n", __func__);
+               status = -ENOMEM;
+               goto release_mutex;
+       }
+
+       while (++vendorreq_times <= MAX_USBCTRL_VENDORREQ_TIMES) {
+               memset(pIo_buf, 0, len);
+
+               if (requesttype == 0x01) {
+                       pipe = usb_rcvctrlpipe(udev, 0);/* read_in */
+                       reqtype =  REALTEK_USB_VENQT_READ;
+               } else {
+                       pipe = usb_sndctrlpipe(udev, 0);/* write_out */
+                       reqtype =  REALTEK_USB_VENQT_WRITE;
+                       memcpy(pIo_buf, pdata, len);
+               }
+
+               status = usb_control_msg(udev, pipe, request, reqtype, value, index, pIo_buf, len, RTW_USB_CONTROL_MSG_TIMEOUT);
+
+               if (status == len) {   /*  Success this control transfer. */
+                       if (requesttype == 0x01)
+                               memcpy(pdata, pIo_buf,  len);
+               } else { /*  error cases */
+                       DBG_88E("reg 0x%x, usb %s %u fail, status:%d value=0x%x, vendorreq_times:%d\n",
+                               value, (requesttype == 0x01) ? "read" : "write",
+                               len, status, *(u32 *)pdata, vendorreq_times);
+
+                       if (status < 0) {
+                               if (status == (-ESHUTDOWN) || status == -ENODEV) {
+                                       adapt->bSurpriseRemoved = true;
+                               } else {
+                                       struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
+                                       haldata->srestpriv.Wifi_Error_Status = USB_VEN_REQ_CMD_FAIL;
+                               }
+                       } else { /*  status != len && status >= 0 */
+                               if (status > 0) {
+                                       if (requesttype == 0x01) {
+                                               /*  For Control read transfer, we have to copy the read data from pIo_buf to pdata. */
+                                               memcpy(pdata, pIo_buf,  len);
+                                       }
+                               }
+                       }
+
+               }
+
+               /*  firmware download is checksumed, don't retry */
+               if ((value >= FW_8188E_START_ADDRESS && value <= FW_8188E_END_ADDRESS) || status == len)
+                       break;
+       }
+release_mutex:
+       mutex_unlock(&dvobjpriv->usb_vendor_req_mutex);
+exit:
+       return status;
+}
+
+u8 usb_read8(struct adapter *adapter, u32 addr)
+{
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       u8 data = 0;
+
+
+       request = 0x05;
+       requesttype = 0x01;/* read_in */
+       index = 0;/* n/a */
+
+       wvalue = (u16)(addr&0x0000ffff);
+       len = 1;
+
+       usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype);
+
+
+       return data;
+
+}
+
+u16 usb_read16(struct adapter *adapter, u32 addr)
 {
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       __le32 data;
+
+       request = 0x05;
+       requesttype = 0x01;/* read_in */
+       index = 0;/* n/a */
+       wvalue = (u16)(addr&0x0000ffff);
+       len = 2;
+       usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype);
+
+       return (u16)(le32_to_cpu(data)&0xffff);
 }
 
-void usb_write_mem(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
+u32 usb_read32(struct adapter *adapter, u32 addr)
 {
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       __le32 data;
+
+
+       request = 0x05;
+       requesttype = 0x01;/* read_in */
+       index = 0;/* n/a */
+
+       wvalue = (u16)(addr&0x0000ffff);
+       len = 4;
+
+       usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype);
+
+
+       return le32_to_cpu(data);
 }
 
-void usb_read_port_cancel(struct intf_hdl *pintfhdl)
+static void usb_read_port_complete(struct urb *purb, struct pt_regs *regs)
+{
+       struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
+       struct adapter  *adapt = (struct adapter *)precvbuf->adapter;
+       struct recv_priv *precvpriv = &adapt->recvpriv;
+
+       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete!!!\n"));
+
+       precvpriv->rx_pending_cnt--;
+
+       if (adapt->bSurpriseRemoved || adapt->bDriverStopped || adapt->bReadPortCancel) {
+               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
+                        ("usb_read_port_complete:bDriverStopped(%d) OR bSurpriseRemoved(%d)\n",
+                        adapt->bDriverStopped, adapt->bSurpriseRemoved));
+
+               precvbuf->reuse = true;
+               DBG_88E("%s() RX Warning! bDriverStopped(%d) OR bSurpriseRemoved(%d) bReadPortCancel(%d)\n",
+                       __func__, adapt->bDriverStopped,
+                       adapt->bSurpriseRemoved, adapt->bReadPortCancel);
+               return;
+       }
+
+       if (purb->status == 0) { /* SUCCESS */
+               if ((purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)) {
+                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
+                                ("usb_read_port_complete: (purb->actual_length > MAX_RECVBUF_SZ) || (purb->actual_length < RXDESC_SIZE)\n"));
+                       precvbuf->reuse = true;
+                       usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
+                       DBG_88E("%s()-%d: RX Warning!\n", __func__, __LINE__);
+               } else {
+                       skb_put(precvbuf->pskb, purb->actual_length);
+                       skb_queue_tail(&precvpriv->rx_skb_queue, precvbuf->pskb);
+
+                       if (skb_queue_len(&precvpriv->rx_skb_queue) <= 1)
+                               tasklet_schedule(&precvpriv->recv_tasklet);
+
+                       precvbuf->pskb = NULL;
+                       precvbuf->reuse = false;
+                       usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
+               }
+       } else {
+               RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete : purb->status(%d) != 0\n", purb->status));
+
+               DBG_88E("###=> usb_read_port_complete => urb status(%d)\n", purb->status);
+               skb_put(precvbuf->pskb, purb->actual_length);
+               precvbuf->pskb = NULL;
+
+               switch (purb->status) {
+               case -EINVAL:
+               case -EPIPE:
+               case -ENODEV:
+               case -ESHUTDOWN:
+                       adapt->bSurpriseRemoved = true;
+               case -ENOENT:
+                       adapt->bDriverStopped = true;
+                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_read_port_complete:bDriverStopped=true\n"));
+                       break;
+               case -EPROTO:
+               case -EOVERFLOW:
+                       {
+                               struct hal_data_8188e   *haldata = GET_HAL_DATA(adapt);
+                               haldata->srestpriv.Wifi_Error_Status = USB_READ_PORT_FAIL;
+                       }
+                       precvbuf->reuse = true;
+                       usb_read_port(adapt, precvpriv->ff_hwaddr, 0, (unsigned char *)precvbuf);
+                       break;
+               case -EINPROGRESS:
+                       DBG_88E("ERROR: URB IS IN PROGRESS!\n");
+                       break;
+               default:
+                       break;
+               }
+       }
+}
+
+u32 usb_read_port(struct adapter *adapter, u32 addr, u32 cnt, u8 *rmem)
+{
+       struct urb *purb = NULL;
+       struct recv_buf *precvbuf = (struct recv_buf *)rmem;
+       struct dvobj_priv       *pdvobj = adapter_to_dvobj(adapter);
+       struct recv_priv        *precvpriv = &adapter->recvpriv;
+       struct usb_device       *pusbd = pdvobj->pusbdev;
+       int err;
+       unsigned int pipe;
+       size_t tmpaddr = 0;
+       size_t alignment = 0;
+       u32 ret = _SUCCESS;
+
+
+       if (adapter->bDriverStopped || adapter->bSurpriseRemoved ||
+           adapter->pwrctrlpriv.pnp_bstop_trx) {
+               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
+                        ("usb_read_port:(adapt->bDriverStopped ||adapt->bSurpriseRemoved ||adapter->pwrctrlpriv.pnp_bstop_trx)!!!\n"));
+               return _FAIL;
+       }
+
+       if (!precvbuf) {
+               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
+                        ("usb_read_port:precvbuf==NULL\n"));
+               return _FAIL;
+       }
+
+       if ((!precvbuf->reuse) || (precvbuf->pskb == NULL)) {
+               precvbuf->pskb = skb_dequeue(&precvpriv->free_recv_skb_queue);
+               if (NULL != precvbuf->pskb)
+                       precvbuf->reuse = true;
+       }
+
+       /* re-assign for linux based on skb */
+       if ((!precvbuf->reuse) || (precvbuf->pskb == NULL)) {
+               precvbuf->pskb = netdev_alloc_skb(adapter->pnetdev, MAX_RECVBUF_SZ + RECVBUFF_ALIGN_SZ);
+               if (precvbuf->pskb == NULL) {
+                       RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("init_recvbuf(): alloc_skb fail!\n"));
+                       DBG_88E("#### usb_read_port() alloc_skb fail!#####\n");
+                       return _FAIL;
+               }
+
+               tmpaddr = (size_t)precvbuf->pskb->data;
+               alignment = tmpaddr & (RECVBUFF_ALIGN_SZ-1);
+               skb_reserve(precvbuf->pskb, (RECVBUFF_ALIGN_SZ - alignment));
+       } else { /* reuse skb */
+               precvbuf->reuse = false;
+       }
+
+       precvpriv->rx_pending_cnt++;
+
+       purb = precvbuf->purb;
+
+       /* translate DMA FIFO addr to pipehandle */
+       pipe = ffaddr2pipehdl(pdvobj, addr);
+
+       usb_fill_bulk_urb(purb, pusbd, pipe,
+                         precvbuf->pskb->data,
+                         MAX_RECVBUF_SZ,
+                         usb_read_port_complete,
+                         precvbuf);/* context is precvbuf */
+
+       err = usb_submit_urb(purb, GFP_ATOMIC);
+       if ((err) && (err != (-EPERM))) {
+               RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
+                        ("cannot submit rx in-token(err=0x%.8x), URB_STATUS =0x%.8x",
+                        err, purb->status));
+               DBG_88E("cannot submit rx in-token(err = 0x%08x),urb_status = %d\n",
+                       err, purb->status);
+               ret = _FAIL;
+       }
+
+       return ret;
+}
+
+void usb_read_port_cancel(struct adapter *padapter)
 {
        int i;
        struct recv_buf *precvbuf;
-       struct adapter  *padapter = pintfhdl->padapter;
        precvbuf = (struct recv_buf *)padapter->recvpriv.precv_buf;
 
        DBG_88E("%s\n", __func__);
@@ -66,13 +544,109 @@ void usb_read_port_cancel(struct intf_hdl *pintfhdl)
        }
 }
 
+int usb_write8(struct adapter *adapter, u32 addr, u8 val)
+{
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       u8 data;
+       int ret;
+
+       request = 0x05;
+       requesttype = 0x00;/* write_out */
+       index = 0;/* n/a */
+       wvalue = (u16)(addr&0x0000ffff);
+       len = 1;
+       data = val;
+       ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype);
+       return ret;
+}
+
+int usb_write16(struct adapter *adapter, u32 addr, u16 val)
+{
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       __le32 data;
+       int ret;
+
+
+       request = 0x05;
+       requesttype = 0x00;/* write_out */
+       index = 0;/* n/a */
+
+       wvalue = (u16)(addr&0x0000ffff);
+       len = 2;
+
+       data = cpu_to_le32(val & 0x0000ffff);
+
+       ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype);
+
+
+       return ret;
+}
+
+int usb_write32(struct adapter *adapter, u32 addr, u32 val)
+{
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       __le32 data;
+       int ret;
+
+
+       request = 0x05;
+       requesttype = 0x00;/* write_out */
+       index = 0;/* n/a */
+
+       wvalue = (u16)(addr&0x0000ffff);
+       len = 4;
+       data = cpu_to_le32(val);
+
+       ret = usbctrl_vendorreq(adapter, request, wvalue, index, &data, len, requesttype);
+
+
+       return ret;
+}
+
+int usb_writeN(struct adapter *adapter, u32 addr, u32 length, u8 *pdata)
+{
+       u8 request;
+       u8 requesttype;
+       u16 wvalue;
+       u16 index;
+       u16 len;
+       u8 buf[VENDOR_CMD_MAX_DATA_LEN] = {0};
+       int ret;
+
+
+       request = 0x05;
+       requesttype = 0x00;/* write_out */
+       index = 0;/* n/a */
+
+       wvalue = (u16)(addr&0x0000ffff);
+       len = length;
+        memcpy(buf, pdata, len);
+
+       ret = usbctrl_vendorreq(adapter, request, wvalue, index, buf, len, requesttype);
+
+
+       return RTW_STATUS_CODE(ret);
+}
+
+
+
 static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
 {
        struct xmit_buf *pxmitbuf = (struct xmit_buf *)purb->context;
        struct adapter  *padapter = pxmitbuf->padapter;
        struct xmit_priv        *pxmitpriv = &padapter->xmitpriv;
-       struct hal_data_8188e   *haldata;
-
 
        switch (pxmitbuf->flags) {
        case VO_QUEUE_INX:
@@ -137,9 +711,6 @@ static void usb_write_port_complete(struct urb *purb, struct pt_regs *regs)
                }
        }
 
-       haldata = GET_HAL_DATA(padapter);
-       haldata->srestpriv.last_tx_complete_time = jiffies;
-
 check_completion:
        rtw_sctx_done_err(&pxmitbuf->sctx,
                          purb->status ? RTW_SCTX_DONE_WRITE_PORT_ERR :
@@ -150,14 +721,13 @@ check_completion:
        tasklet_hi_schedule(&pxmitpriv->xmit_tasklet);
 }
 
-u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
+u32 usb_write_port(struct adapter *padapter, u32 addr, u32 cnt, u8 *wmem)
 {
        unsigned long irqL;
        unsigned int pipe;
        int status;
        u32 ret = _FAIL;
        struct urb *purb = NULL;
-       struct adapter *padapter = (struct adapter *)pintfhdl->padapter;
        struct dvobj_priv       *pdvobj = adapter_to_dvobj(padapter);
        struct xmit_priv        *pxmitpriv = &padapter->xmitpriv;
        struct xmit_buf *pxmitbuf = (struct xmit_buf *)wmem;
@@ -216,11 +786,7 @@ u32 usb_write_port(struct intf_hdl *pintfhdl, u32 addr, u32 cnt, u8 *wmem)
                          pxmitbuf);/* context is pxmitbuf */
 
        status = usb_submit_urb(purb, GFP_ATOMIC);
-       if (!status) {
-               struct hal_data_8188e   *haldata = GET_HAL_DATA(padapter);
-
-               haldata->srestpriv.last_tx_time = jiffies;
-       } else {
+       if (status) {
                rtw_sctx_done_err(&pxmitbuf->sctx, RTW_SCTX_DONE_WRITE_PORT_ERR);
                DBG_88E("usb_write_port, status =%d\n", status);
                RT_TRACE(_module_hci_ops_os_c_, _drv_err_, ("usb_write_port(): usb_submit_urb, status =%x\n", status));
@@ -247,10 +813,9 @@ exit:
        return ret;
 }
 
-void usb_write_port_cancel(struct intf_hdl *pintfhdl)
+void usb_write_port_cancel(struct adapter *padapter)
 {
        int i, j;
-       struct adapter  *padapter = pintfhdl->padapter;
        struct xmit_buf *pxmitbuf = (struct xmit_buf *)padapter->xmitpriv.pxmitbuf;
 
        DBG_88E("%s\n", __func__);
@@ -274,3 +839,46 @@ void usb_write_port_cancel(struct intf_hdl *pintfhdl)
                pxmitbuf++;
        }
 }
+
+void rtl8188eu_recv_tasklet(void *priv)
+{
+       struct sk_buff *pskb;
+       struct adapter *adapt = (struct adapter *)priv;
+       struct recv_priv *precvpriv = &adapt->recvpriv;
+
+       while (NULL != (pskb = skb_dequeue(&precvpriv->rx_skb_queue))) {
+               if ((adapt->bDriverStopped) || (adapt->bSurpriseRemoved)) {
+                       DBG_88E("recv_tasklet => bDriverStopped or bSurpriseRemoved\n");
+                       dev_kfree_skb_any(pskb);
+                       break;
+               }
+               recvbuf2recvframe(adapt, pskb);
+               skb_reset_tail_pointer(pskb);
+               pskb->len = 0;
+               skb_queue_tail(&precvpriv->free_recv_skb_queue, pskb);
+       }
+}
+
+void rtl8188eu_xmit_tasklet(void *priv)
+{
+       int ret = false;
+       struct adapter *adapt = (struct adapter *)priv;
+       struct xmit_priv *pxmitpriv = &adapt->xmitpriv;
+
+       if (check_fwstate(&adapt->mlmepriv, _FW_UNDER_SURVEY))
+               return;
+
+       while (1) {
+               if ((adapt->bDriverStopped) ||
+                   (adapt->bSurpriseRemoved) ||
+                   (adapt->bWritePortCancel)) {
+                       DBG_88E("xmit_tasklet => bDriverStopped or bSurpriseRemoved or bWritePortCancel\n");
+                       break;
+               }
+
+               ret = rtl8188eu_xmitframe_complete(adapt, pxmitpriv, NULL);
+
+               if (!ret)
+                       break;
+       }
+}
index 400356831c5e310f817d9079137ea944ea768f0a..b4f220d3afac119e8922378230ebe35b6679245a 100644 (file)
@@ -80,7 +80,7 @@ int rtw_os_xmit_resource_alloc(struct adapter *padapter, struct xmit_buf *pxmitb
 {
        int i;
 
-       pxmitbuf->pallocated_buf = rtw_zmalloc(alloc_sz);
+       pxmitbuf->pallocated_buf = kzalloc(alloc_sz, GFP_KERNEL);
        if (pxmitbuf->pallocated_buf == NULL)
                return _FAIL;
 
@@ -184,7 +184,7 @@ static int rtw_mlcst2unicst(struct adapter *padapter, struct sk_buff *skb)
        plist = phead->next;
 
        /* free sta asoc_queue */
-       while (!rtw_end_of_queue_search(phead, plist)) {
+       while (phead != plist) {
                psta = container_of(plist, struct sta_info, asoc_list);
 
                plist = plist->next;
index 53da61072992b528c0cd7c87bb5c6046f258991b..bfcc935d48de8c49d8ce9247d7eca2f692b408fc 100644 (file)
@@ -133,12 +133,12 @@ void Dot11d_UpdateCountryIe(struct rtllib_device *dev, u8 *pTaddr,
        pTriple = (struct chnl_txpow_triple *)(pCoutryIe + 3);
        for (i = 0; i < NumTriples; i++) {
                if (MaxChnlNum >= pTriple->FirstChnl) {
-                       printk(KERN_INFO "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
+                       netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........1\n");
                        return;
                }
                if (MAX_CHANNEL_NUMBER < (pTriple->FirstChnl +
                    pTriple->NumChnls)) {
-                       printk(KERN_INFO "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
+                       netdev_info(dev->dev, "Dot11d_UpdateCountryIe(): Invalid country IE, skip it........2\n");
                        return;
                }
 
@@ -165,7 +165,7 @@ u8 DOT11D_GetMaxTxPwrInDbm(struct rtllib_device *dev, u8 Channel)
        u8 MaxTxPwrInDbm = 255;
 
        if (MAX_CHANNEL_NUMBER < Channel) {
-               printk(KERN_INFO "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
+               netdev_info(dev->dev, "DOT11D_GetMaxTxPwrInDbm(): Invalid Channel\n");
                return MaxTxPwrInDbm;
        }
        if (pDot11dInfo->channel_map[Channel])
@@ -204,7 +204,7 @@ int ToLegalChannel(struct rtllib_device *dev, u8 channel)
        }
 
        if (MAX_CHANNEL_NUMBER < channel) {
-               printk(KERN_ERR "%s(): Invalid Channel\n", __func__);
+               netdev_err(dev->dev, "%s(): Invalid Channel\n", __func__);
                return default_chn;
        }
 
index 136909eff6d5ce77d747fd2592d4f9154abbcedd..ba95149fa42e9472830ddd494d3958483a29605d 100644 (file)
@@ -111,7 +111,7 @@ struct net_device *alloc_rtllib(int sizeof_priv)
        dev = alloc_etherdev(sizeof(struct rtllib_device) + sizeof_priv);
        if (!dev) {
                RTLLIB_ERROR("Unable to network device.\n");
-               goto failed;
+               return NULL;
        }
        ieee = (struct rtllib_device *)netdev_priv_rsl(dev);
        memset(ieee, 0, sizeof(struct rtllib_device)+sizeof_priv);
@@ -180,8 +180,7 @@ struct net_device *alloc_rtllib(int sizeof_priv)
        return dev;
 
  failed:
-       if (dev)
-               free_netdev(dev);
+       free_netdev(dev);
        return NULL;
 }
 EXPORT_SYMBOL(alloc_rtllib);
index beb07ac24e80d44d0d4a766a677d60a09b3ee8f4..8d77f28399d3745e0bce2db37a363f0814a73c50 100644 (file)
@@ -7,7 +7,6 @@ config R8192EE
        select EEPROM_93CX6
        select CRYPTO
        select FW_LOADER
-       default N
        ---help---
        This is the driver for Realtek RTL8192EE 802.11 PCIe
        wireless network adapters.
index 64ade216a153e28a2d1e818259cba8758e3e16b7..a7c69f704623bfccc7662884f765dd8dd3a38983 100644 (file)
@@ -469,7 +469,7 @@ static void _rtl_init_deferred_work(struct ieee80211_hw *hw)
                    rtl92e_easy_concurrent_retrytimer_callback, (unsigned long)hw);
        /* <2> work queue */
        rtlpriv->works.hw = hw;
-       rtlpriv->works.rtl_wq = alloc_workqueue(rtlpriv->cfg->name, 0, 0);
+       rtlpriv->works.rtl_wq = alloc_workqueue("%s", 0, 0, rtlpriv->cfg->name);
        INIT_DELAYED_WORK(&rtlpriv->works.watchdog_wq,
                          (void *)rtl92e_watchdog_wq_callback);
        INIT_DELAYED_WORK(&rtlpriv->works.ips_nic_off_wq,
index c7929a7b02fd73d5c229979d31844103417bf449..1d6e5a76ce3ef2107a6276cb1a7ae81609fda69b 100644 (file)
@@ -132,13 +132,13 @@ u8 rtl92e_is_special_data(struct ieee80211_hw *hw, struct sk_buff *skb,
 void rtl92e_beacon_statistic(struct ieee80211_hw *hw, struct sk_buff *skb);
 void rtl92e_watch_dog_timer_callback(unsigned long data);
 int rtl92e_tx_agg_start(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
-                       struct ieee80211_sta *sta, u16 tid, u16 *ssn);
+                       struct ieee80211_sta *sta, u16 tid, u16 *ssn);
 int rtl92e_tx_agg_stop(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
                       struct ieee80211_sta *sta, u16 tid);
 int rtl92e_tx_agg_oper(struct ieee80211_hw *hw,
                       struct ieee80211_sta *sta, u16 tid);
 int rtl92e_rx_agg_start(struct ieee80211_hw *hw,
-                       struct ieee80211_sta *sta, u16 tid);
+                       struct ieee80211_sta *sta, u16 tid);
 int rtl92e_rx_agg_stop(struct ieee80211_hw *hw,
                       struct ieee80211_sta *sta, u16 tid);
 void rtl92e_watchdog_wq_callback(void *data);
index 7fb590739014134075abac7d37caa94bdd3b475a..244d5599e0dc4f436579be07281de299e9e0c64a 100644 (file)
@@ -2488,7 +2488,7 @@ static void halbtc8821a2ant_action_pan_edr_a2dp(struct btc_coexist *btcoexist)
                } else {
                        sw_mechanism1(btcoexist, true, false, false, false);
                        sw_mechanism2(btcoexist, false, false, false, 0x18);
-               };
+               }
        } else {
                /*  fw mechanism */
                if ((bt_rssi_state == BTC_RSSI_STATE_HIGH) ||
index c0a4286430a5ca676cab79819c2e1d8e9f70fa9c..1231b16205f2c0ef6a0165be714ae5530688408f 100644 (file)
@@ -94,7 +94,7 @@ extern u32 btc_92edbg_type[];
 
 
 #define        CL_SPRINTF      snprintf
-#define        CL_PRINTF       printk
+#define        CL_PRINTF(buf)  printk("%s", buf)
 
 #define        BTC_PRINT(dbgtype, dbgflag, printstr, ...)              \
        do {                                                    \
index e0aa069fe9b173b8ad61bdd1130b662b9941eda8..1040bab9702a6719573962f129ece7bdbd528a91 100644 (file)
@@ -2238,7 +2238,7 @@ static inline void *ieee80211_priv(struct net_device *dev)
        return ((struct ieee80211_device *)netdev_priv(dev))->priv;
 }
 
-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
 {
        /* Single white space is for Linksys APs */
        if (essid_len == 1 && essid[0] == ' ')
@@ -2254,7 +2254,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
        return 1;
 }
 
-extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
+static inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mode)
 {
        /*
         * It is possible for both access points and our device to support
@@ -2280,7 +2280,7 @@ extern inline int ieee80211_is_valid_mode(struct ieee80211_device *ieee, int mod
        return 0;
 }
 
-extern inline int ieee80211_get_hdrlen(u16 fc)
+static inline int ieee80211_get_hdrlen(u16 fc)
 {
        int hdrlen = IEEE80211_3ADDR_LEN;
 
@@ -2564,12 +2564,12 @@ void ieee80211_softmac_scan_syncro(struct ieee80211_device *ieee);
 
 extern const long ieee80211_wlan_frequencies[];
 
-extern inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
+static inline void ieee80211_increment_scans(struct ieee80211_device *ieee)
 {
        ieee->scans++;
 }
 
-extern inline int ieee80211_get_scans(struct ieee80211_device *ieee)
+static inline int ieee80211_get_scans(struct ieee80211_device *ieee)
 {
        return ieee->scans;
 }
index d9a8299c48eb59412426b8f93590316768e9e625..73410ccfb1ec5a57e65f1f2a38e7828ccacc2735 100644 (file)
@@ -352,7 +352,6 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
        hdr = (struct ieee80211_hdr_4addr *) skb->data;
        hdrlen = ieee80211_get_hdrlen(le16_to_cpu(hdr->frame_ctl));
 
-#ifdef CONFIG_IEEE80211_CRYPT_TKIP
        if (ieee->tkip_countermeasures &&
            strcmp(crypt->ops->name, "TKIP") == 0) {
                if (net_ratelimit()) {
@@ -362,7 +361,6 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb,
                }
                return -1;
        }
-#endif
 
        atomic_inc(&crypt->refcnt);
        res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv);
index 029a97651797140c34247a120d6ab08efff039c4..7f9e655f9eb8989e71a5eb93956b9118f907cafa 100644 (file)
@@ -191,20 +191,20 @@ int ieee80211_encrypt_fragment(
                printk("=========>%s(), crypt is null\n", __func__);
                return -1;
        }
-#ifdef CONFIG_IEEE80211_CRYPT_TKIP
-       struct ieee80211_hdr *header;
 
        if (ieee->tkip_countermeasures &&
            crypt && crypt->ops && strcmp(crypt->ops->name, "TKIP") == 0) {
-               header = (struct ieee80211_hdr *) frag->data;
                if (net_ratelimit()) {
+                       struct ieee80211_hdr_3addrqos *header;
+
+                       header = (struct ieee80211_hdr_3addrqos *)frag->data;
                        printk(KERN_DEBUG "%s: TKIP countermeasures: dropped "
                               "TX packet to %pM\n",
                               ieee->dev->name, header->addr1);
                }
                return -1;
        }
-#endif
+
        /* To encrypt, frame format is:
         * IV (4 bytes), clear payload (including SNAP), ICV (4 bytes) */
 
index 24272c51bc9d9c0e8a6996c59b1e1ef26ed834b4..76403864644cd01f13505dfd6fe12d0260dad00e 100644 (file)
@@ -166,17 +166,17 @@ typedef struct _CHANNEL_LIST {
 } CHANNEL_LIST, *PCHANNEL_LIST;
 
 static CHANNEL_LIST ChannelPlan[] = {
-       {{1,2,3,4,5,6,7,8,9,10,11,36,40,44,48,52,56,60,64,149,153,157,161,165},24},             //FCC
-       {{1,2,3,4,5,6,7,8,9,10,11},11},                                                 //IC
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13,36,40,44,48,52,56,60,64},21},   //ETSI
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13},13},    //Spain. Change to ETSI.
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13},13},   //France. Change to ETSI.
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64},22},        //MKK                                   //MKK
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64},22},//MKK1
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13},13},   //Israel.
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64},22},                        // For 11a , TELEC
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13,14,36,40,44,48,52,56,60,64}, 22},    //MIC
-       {{1,2,3,4,5,6,7,8,9,10,11,12,13,14},14}                                 //For Global Domain. 1-11:active scan, 12-14 passive scan. //+YJ, 080626
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 24},             //FCC
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},                                                      //IC
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 36, 40, 44, 48, 52, 56, 60, 64}, 21},      //ETSI
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},    //Spain. Change to ETSI.
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},      //France. Change to ETSI.
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},  //MKK                                   //MKK
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},//MKK1
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},      //Israel.
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},                  // For 11a , TELEC
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 36, 40, 44, 48, 52, 56, 60, 64}, 22},    //MIC
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14}                                   //For Global Domain. 1-11:active scan, 12-14 passive scan. //+YJ, 080626
 };
 
 static void rtl819x_set_channel_map(u8 channel_plan, struct r8192_priv *priv)
@@ -905,7 +905,8 @@ inline u16 ieeerate2rtlrate(int rate)
 static u16 rtl_rate[] = {10, 20, 55, 110, 60, 90, 120, 180, 240, 360, 480, 540};
 inline u16 rtl8192_rate2rate(short rate)
 {
-       if (rate > 11) return 0;
+       if (rate > 11)
+               return 0;
        return rtl_rate[rate];
 }
 
@@ -1114,7 +1115,7 @@ struct sk_buff *DrvAggr_Aggregation(struct net_device *dev, struct ieee80211_drv
                tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate);
                tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur;
                tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc);
-               if (tcb_desc->bAMPDUEnable) {//AMPDU enabled
+               if (tcb_desc->bAMPDUEnable) { /* AMPDU enabled */
                        tx_fwinfo->AllowAggregation = 1;
                        /* DWORD 1 */
                        tx_fwinfo->RxMF = tcb_desc->ampdu_factor;
@@ -1236,12 +1237,11 @@ u8 DrvAggr_GetAggregatibleList(struct net_device *dev, struct sk_buff *skb,
 static void rtl8192_tx_isr(struct urb *tx_urb)
 {
        struct sk_buff *skb = (struct sk_buff *)tx_urb->context;
-       struct net_device *dev = NULL;
+       struct net_device *dev = (struct net_device *)(skb->cb);
        struct r8192_priv *priv = NULL;
        cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE);
        u8  queue_index = tcb_desc->queue_index;
 
-       memcpy(&dev, (struct net_device *)(skb->cb), sizeof(struct net_device *));
        priv = ieee80211_priv(dev);
 
        if (tcb_desc->queue_index != TXCMD_QUEUE) {
@@ -1330,35 +1330,83 @@ static void rtl8192_config_rate(struct net_device *dev, u16 *rate_config)
        for (i = 0; i < net->rates_len; i++) {
                basic_rate = net->rates[i]&0x7f;
                switch (basic_rate) {
-               case MGN_1M:    *rate_config |= RRSR_1M;        break;
-               case MGN_2M:    *rate_config |= RRSR_2M;        break;
-               case MGN_5_5M:  *rate_config |= RRSR_5_5M;      break;
-               case MGN_11M:   *rate_config |= RRSR_11M;       break;
-               case MGN_6M:    *rate_config |= RRSR_6M;        break;
-               case MGN_9M:    *rate_config |= RRSR_9M;        break;
-               case MGN_12M:   *rate_config |= RRSR_12M;       break;
-               case MGN_18M:   *rate_config |= RRSR_18M;       break;
-               case MGN_24M:   *rate_config |= RRSR_24M;       break;
-               case MGN_36M:   *rate_config |= RRSR_36M;       break;
-               case MGN_48M:   *rate_config |= RRSR_48M;       break;
-               case MGN_54M:   *rate_config |= RRSR_54M;       break;
+                       case MGN_1M:
+                               *rate_config |= RRSR_1M;
+                               break;
+                       case MGN_2M:
+                               *rate_config |= RRSR_2M;
+                               break;
+                       case MGN_5_5M:
+                               *rate_config |= RRSR_5_5M;
+                               break;
+                       case MGN_11M:
+                               *rate_config |= RRSR_11M;
+                               break;
+                       case MGN_6M:
+                               *rate_config |= RRSR_6M;
+                               break;
+                       case MGN_9M:
+                               *rate_config |= RRSR_9M;
+                               break;
+                       case MGN_12M:
+                               *rate_config |= RRSR_12M;
+                               break;
+                       case MGN_18M:
+                               *rate_config |= RRSR_18M;
+                               break;
+                       case MGN_24M:
+                               *rate_config |= RRSR_24M;
+                               break;
+                       case MGN_36M:
+                               *rate_config |= RRSR_36M;
+                               break;
+                       case MGN_48M:
+                               *rate_config |= RRSR_48M;
+                               break;
+                       case MGN_54M:
+                               *rate_config |= RRSR_54M;
+                               break;
                }
        }
        for (i = 0; i < net->rates_ex_len; i++) {
                basic_rate = net->rates_ex[i]&0x7f;
                switch (basic_rate) {
-               case MGN_1M:    *rate_config |= RRSR_1M;        break;
-               case MGN_2M:    *rate_config |= RRSR_2M;        break;
-               case MGN_5_5M:  *rate_config |= RRSR_5_5M;      break;
-               case MGN_11M:   *rate_config |= RRSR_11M;       break;
-               case MGN_6M:    *rate_config |= RRSR_6M;        break;
-               case MGN_9M:    *rate_config |= RRSR_9M;        break;
-               case MGN_12M:   *rate_config |= RRSR_12M;       break;
-               case MGN_18M:   *rate_config |= RRSR_18M;       break;
-               case MGN_24M:   *rate_config |= RRSR_24M;       break;
-               case MGN_36M:   *rate_config |= RRSR_36M;       break;
-               case MGN_48M:   *rate_config |= RRSR_48M;       break;
-               case MGN_54M:   *rate_config |= RRSR_54M;       break;
+                       case MGN_1M:
+                               *rate_config |= RRSR_1M;
+                               break;
+                       case MGN_2M:
+                               *rate_config |= RRSR_2M;
+                               break;
+                       case MGN_5_5M:
+                               *rate_config |= RRSR_5_5M;
+                               break;
+                       case MGN_11M:
+                               *rate_config |= RRSR_11M;
+                               break;
+                       case MGN_6M:
+                               *rate_config |= RRSR_6M;
+                               break;
+                       case MGN_9M:
+                               *rate_config |= RRSR_9M;
+                               break;
+                       case MGN_12M:
+                               *rate_config |= RRSR_12M;
+                               break;
+                       case MGN_18M:
+                               *rate_config |= RRSR_18M;
+                               break;
+                       case MGN_24M:
+                               *rate_config |= RRSR_24M;
+                               break;
+                       case MGN_36M:
+                               *rate_config |= RRSR_36M;
+                               break;
+                       case MGN_48M:
+                               *rate_config |= RRSR_48M;
+                               break;
+                       case MGN_54M:
+                               *rate_config |= RRSR_54M;
+                               break;
                }
        }
 }
@@ -1380,7 +1428,7 @@ static void rtl8192_update_cap(struct net_device *dev, u16 cap)
 
        if (net->mode & (IEEE_G|IEEE_N_24G)) {
                u8 slot_time = 0;
-               if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) //short slot time
+               if ((cap & WLAN_CAPABILITY_SHORT_SLOT) && (!priv->ieee80211->pHTInfo->bCurrentRT2RTLongSlotTime)) /* short slot time */
                        slot_time = SHORT_SLOT_TIME;
                else //long slot time
                        slot_time = NON_SHORT_SLOT_TIME;
@@ -1399,7 +1447,7 @@ static void rtl8192_net_update(struct net_device *dev)
        net = &priv->ieee80211->current_network;
 
        rtl8192_config_rate(dev, &rate_config);
-       priv->basic_rate = rate_config &= 0x15f;
+       priv->basic_rate = rate_config & 0x15f;
 
        write_nic_dword(dev, BSSIDR, ((u32 *)net->bssid)[0]);
        write_nic_word(dev, BSSIDR+4, ((u16 *)net->bssid)[2]);
@@ -1432,7 +1480,8 @@ inline u8 rtl8192_IsWirelessBMode(u16 rate)
 {
        if (((rate <= 110) && (rate != 60) && (rate != 90)) || (rate == 220))
                return 1;
-       else return 0;
+       else
+               return 0;
 }
 
 u16 N_DBPSOfRate(u16 DataRate);
@@ -1445,11 +1494,11 @@ u16 ComputeTxTime(u16 FrameLength, u16 DataRate, u8 bManagementFrame,
        u16     Ceiling;
 
        if (rtl8192_IsWirelessBMode(DataRate)) {
-               if (bManagementFrame || !bShortPreamble || DataRate == 10) // long preamble
+               if (bManagementFrame || !bShortPreamble || DataRate == 10) /* long preamble */
                        FrameTime = (u16)(144+48+(FrameLength*8/(DataRate/10)));
                else // Short preamble
                        FrameTime = (u16)(72+24+(FrameLength*8/(DataRate/10)));
-               if ((FrameLength*8 % (DataRate/10)) != 0) //Get the Ceilling
+               if ((FrameLength*8 % (DataRate/10)) != 0) /* Get the Ceilling */
                        FrameTime++;
        } else {        //802.11g DSSS-OFDM PLCP length field calculation.
                N_DBPS = N_DBPSOfRate(DataRate);
@@ -1617,39 +1666,98 @@ static u8 MRateToHwRate8190Pci(u8 rate)
        u8  ret = DESC90_RATE1M;
 
        switch (rate) {
-       case MGN_1M:    ret = DESC90_RATE1M;    break;
-       case MGN_2M:    ret = DESC90_RATE2M;    break;
-       case MGN_5_5M:  ret = DESC90_RATE5_5M;  break;
-       case MGN_11M:   ret = DESC90_RATE11M;   break;
-       case MGN_6M:    ret = DESC90_RATE6M;    break;
-       case MGN_9M:    ret = DESC90_RATE9M;    break;
-       case MGN_12M:   ret = DESC90_RATE12M;   break;
-       case MGN_18M:   ret = DESC90_RATE18M;   break;
-       case MGN_24M:   ret = DESC90_RATE24M;   break;
-       case MGN_36M:   ret = DESC90_RATE36M;   break;
-       case MGN_48M:   ret = DESC90_RATE48M;   break;
-       case MGN_54M:   ret = DESC90_RATE54M;   break;
-
-       // HT rate since here
-       case MGN_MCS0:  ret = DESC90_RATEMCS0;  break;
-       case MGN_MCS1:  ret = DESC90_RATEMCS1;  break;
-       case MGN_MCS2:  ret = DESC90_RATEMCS2;  break;
-       case MGN_MCS3:  ret = DESC90_RATEMCS3;  break;
-       case MGN_MCS4:  ret = DESC90_RATEMCS4;  break;
-       case MGN_MCS5:  ret = DESC90_RATEMCS5;  break;
-       case MGN_MCS6:  ret = DESC90_RATEMCS6;  break;
-       case MGN_MCS7:  ret = DESC90_RATEMCS7;  break;
-       case MGN_MCS8:  ret = DESC90_RATEMCS8;  break;
-       case MGN_MCS9:  ret = DESC90_RATEMCS9;  break;
-       case MGN_MCS10: ret = DESC90_RATEMCS10; break;
-       case MGN_MCS11: ret = DESC90_RATEMCS11; break;
-       case MGN_MCS12: ret = DESC90_RATEMCS12; break;
-       case MGN_MCS13: ret = DESC90_RATEMCS13; break;
-       case MGN_MCS14: ret = DESC90_RATEMCS14; break;
-       case MGN_MCS15: ret = DESC90_RATEMCS15; break;
-       case (0x80|0x20): ret = DESC90_RATEMCS32; break;
-
-       default:       break;
+               case MGN_1M:
+                       ret = DESC90_RATE1M;
+                       break;
+               case MGN_2M:
+                       ret = DESC90_RATE2M;
+                       break;
+               case MGN_5_5M:
+                       ret = DESC90_RATE5_5M;
+                       break;
+               case MGN_11M:
+                       ret = DESC90_RATE11M;
+                       break;
+               case MGN_6M:
+                       ret = DESC90_RATE6M;
+                       break;
+               case MGN_9M:
+                       ret = DESC90_RATE9M;
+                       break;
+               case MGN_12M:
+                       ret = DESC90_RATE12M;
+                       break;
+               case MGN_18M:
+                       ret = DESC90_RATE18M;
+                       break;
+               case MGN_24M:
+                       ret = DESC90_RATE24M;
+                       break;
+               case MGN_36M:
+                       ret = DESC90_RATE36M;
+                       break;
+               case MGN_48M:
+                       ret = DESC90_RATE48M;
+                       break;
+               case MGN_54M:
+                       ret = DESC90_RATE54M;
+                       break;
+
+               // HT rate since here
+               case MGN_MCS0:
+                       ret = DESC90_RATEMCS0;
+                       break;
+               case MGN_MCS1:
+                       ret = DESC90_RATEMCS1;
+                       break;
+               case MGN_MCS2:
+                       ret = DESC90_RATEMCS2;
+                       break;
+               case MGN_MCS3:
+                       ret = DESC90_RATEMCS3;
+                       break;
+               case MGN_MCS4:
+                       ret = DESC90_RATEMCS4;
+                       break;
+               case MGN_MCS5:
+                       ret = DESC90_RATEMCS5;
+                       break;
+               case MGN_MCS6:
+                       ret = DESC90_RATEMCS6;
+                       break;
+               case MGN_MCS7:
+                       ret = DESC90_RATEMCS7;
+                       break;
+               case MGN_MCS8:
+                       ret = DESC90_RATEMCS8;
+                       break;
+               case MGN_MCS9:
+                       ret = DESC90_RATEMCS9;
+                       break;
+               case MGN_MCS10:
+                       ret = DESC90_RATEMCS10;
+                       break;
+               case MGN_MCS11:
+                       ret = DESC90_RATEMCS11;
+                       break;
+               case MGN_MCS12:
+                       ret = DESC90_RATEMCS12;
+                       break;
+               case MGN_MCS13:
+                       ret = DESC90_RATEMCS13;
+                       break;
+               case MGN_MCS14:
+                       ret = DESC90_RATEMCS14;
+                       break;
+               case MGN_MCS15:
+                       ret = DESC90_RATEMCS15;
+                       break;
+               case (0x80|0x20):
+                       ret = DESC90_RATEMCS32;
+                       break;
+
+               default:
+                       break;
        }
        return ret;
 }
@@ -1712,7 +1820,7 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff *skb)
        tx_fwinfo->TxRate = MRateToHwRate8190Pci(tcb_desc->data_rate);
        tx_fwinfo->EnableCPUDur = tcb_desc->bTxEnableFwCalcDur;
        tx_fwinfo->Short = QueryIsShort(tx_fwinfo->TxHT, tx_fwinfo->TxRate, tcb_desc);
-       if (tcb_desc->bAMPDUEnable) {//AMPDU enabled
+       if (tcb_desc->bAMPDUEnable) { /* AMPDU enabled */
                tx_fwinfo->AllowAggregation = 1;
                /* DWORD 1 */
                tx_fwinfo->RxMF = tcb_desc->ampdu_factor;
@@ -2198,7 +2306,7 @@ void rtl8192_update_ratr_table(struct net_device *dev)
                break;
        case IEEE_N_24G:
        case IEEE_N_5G:
-               if (ieee->pHTInfo->PeerMimoPs == 0) {//MIMO_PS_STATIC
+               if (ieee->pHTInfo->PeerMimoPs == 0) { /* MIMO_PS_STATIC */
                        ratr_value &= 0x0007F007;
                } else {
                        if (priv->rf_type == RF_1T2R)
@@ -2355,7 +2463,6 @@ static void rtl8192_init_priv_variable(struct net_device *dev)
 
        priv->ieee80211->FwRWRF = 0;    //we don't use FW read/write RF until stable firmware is available.
        priv->ieee80211->current_network.beacon_interval = DEFAULT_BEACONINTERVAL;
-       priv->ieee80211->iw_mode = IW_MODE_INFRA;
        priv->ieee80211->softmac_features  = IEEE_SOFTMAC_SCAN |
                IEEE_SOFTMAC_ASSOCIATE | IEEE_SOFTMAC_PROBERQ |
                IEEE_SOFTMAC_PROBERS | IEEE_SOFTMAC_TX_QUEUE |
@@ -2582,7 +2689,7 @@ static void rtl8192_read_eeprom_info(struct net_device *dev)
                else
                        priv->EEPROM_Def_Ver = 1;
                RT_TRACE(COMP_EPROM, "EEPROM_DEF_VER:%d\n", priv->EEPROM_Def_Ver);
-               if (priv->EEPROM_Def_Ver == 0) { //old eeprom definition
+               if (priv->EEPROM_Def_Ver == 0) { /* old eeprom definition */
                        int i;
                        if (bLoad_From_EEPOM)
                                priv->EEPROMTxPowerLevelCCK = (eprom_read(dev, (EEPROM_TxPwIndex_CCK>>1))&0xff) >> 8;
@@ -2993,13 +3100,13 @@ static bool rtl8192_adapter_start(struct net_device *dev)
        //
 #ifdef TO_DO_LIST
        if (Adapter->ResetProgress == RESET_TYPE_NORESET) {
-               if (pMgntInfo->RegRfOff == TRUE) { // User disable RF via registry.
+               if (pMgntInfo->RegRfOff == TRUE) { /* User disable RF via registry. */
                        RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RegRfOff ----------\n"));
                        MgntActSet_RF_State(Adapter, eRfOff, RF_CHANGE_BY_SW);
                        // Those actions will be discard in MgntActSet_RF_State because of the same state
                        for (eRFPath = 0; eRFPath < pHalData->NumTotalRFPath; eRFPath++)
                                PHY_SetRFReg(Adapter, (RF90_RADIO_PATH_E)eRFPath, 0x4, 0xC00, 0x0);
-               } else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) { // H/W or S/W RF OFF before sleep.
+               } else if (pMgntInfo->RfOffReason > RF_CHANGE_BY_PS) { /* H/W or S/W RF OFF before sleep. */
                        RT_TRACE((COMP_INIT|COMP_RF), DBG_LOUD, ("InitializeAdapter819xUsb(): Turn off RF for RfOffReason(%d) ----------\n", pMgntInfo->RfOffReason));
                        MgntActSet_RF_State(Adapter, eRfOff, pMgntInfo->RfOffReason);
                } else {
@@ -3525,7 +3632,7 @@ void rtl819x_watchdog_wqcallback(struct work_struct *work)
        }
        if ((priv->force_reset) || (priv->ResetProgress == RESET_TYPE_NORESET &&
            (priv->bForcedSilentReset ||
-           (!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_SILENT)))) { // This is control by OID set in Pomelo
+           (!priv->bDisableNormalResetCheck && ResetType == RESET_TYPE_SILENT)))) { /* This is control by OID set in Pomelo */
                RT_TRACE(COMP_RESET, "%s():priv->force_reset is %d,priv->ResetProgress is %d, priv->bForcedSilentReset is %d,priv->bDisableNormalResetCheck is %d,ResetType is %d\n", __func__, priv->force_reset, priv->ResetProgress, priv->bForcedSilentReset, priv->bDisableNormalResetCheck, ResetType);
                rtl819x_ifsilentreset(dev);
        }
@@ -3586,7 +3693,8 @@ int rtl8192_up(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
 
-       if (priv->up == 1) return -1;
+       if (priv->up == 1)
+               return -1;
 
        return _rtl8192_up(dev);
 }
@@ -3612,7 +3720,8 @@ int rtl8192_down(struct net_device *dev)
        struct r8192_priv *priv = ieee80211_priv(dev);
        int i;
 
-       if (priv->up == 0) return -1;
+       if (priv->up == 0)
+               return -1;
 
        priv->up = 0;
        priv->ieee80211->ieee_up = 0;
@@ -3650,7 +3759,8 @@ void rtl8192_commit(struct net_device *dev)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        int reset_status = 0;
-       if (priv->up == 0) return;
+       if (priv->up == 0)
+               return;
        priv->up = 0;
 
        rtl8192_cancel_deferred_work(priv);
@@ -3803,49 +3913,107 @@ static u8 HwRateToMRate90(bool bIsHT, u8 rate)
 
        if (!bIsHT) {
                switch (rate) {
-               case DESC90_RATE1M:   ret_rate = MGN_1M;         break;
-               case DESC90_RATE2M:   ret_rate = MGN_2M;         break;
-               case DESC90_RATE5_5M: ret_rate = MGN_5_5M;       break;
-               case DESC90_RATE11M:  ret_rate = MGN_11M;        break;
-               case DESC90_RATE6M:   ret_rate = MGN_6M;         break;
-               case DESC90_RATE9M:   ret_rate = MGN_9M;         break;
-               case DESC90_RATE12M:  ret_rate = MGN_12M;        break;
-               case DESC90_RATE18M:  ret_rate = MGN_18M;        break;
-               case DESC90_RATE24M:  ret_rate = MGN_24M;        break;
-               case DESC90_RATE36M:  ret_rate = MGN_36M;        break;
-               case DESC90_RATE48M:  ret_rate = MGN_48M;        break;
-               case DESC90_RATE54M:  ret_rate = MGN_54M;        break;
+                       case DESC90_RATE1M:
+                               ret_rate = MGN_1M;
+                               break;
+                       case DESC90_RATE2M:
+                               ret_rate = MGN_2M;
+                               break;
+                       case DESC90_RATE5_5M:
+                               ret_rate = MGN_5_5M;
+                               break;
+                       case DESC90_RATE11M:
+                               ret_rate = MGN_11M;
+                               break;
+                       case DESC90_RATE6M:
+                               ret_rate = MGN_6M;
+                               break;
+                       case DESC90_RATE9M:
+                               ret_rate = MGN_9M;
+                               break;
+                       case DESC90_RATE12M:
+                               ret_rate = MGN_12M;
+                               break;
+                       case DESC90_RATE18M:
+                               ret_rate = MGN_18M;
+                               break;
+                       case DESC90_RATE24M:
+                               ret_rate = MGN_24M;
+                               break;
+                       case DESC90_RATE36M:
+                               ret_rate = MGN_36M;
+                               break;
+                       case DESC90_RATE48M:
+                               ret_rate = MGN_48M;
+                               break;
+                       case DESC90_RATE54M:
+                               ret_rate = MGN_54M;
+                               break;
 
-               default:
-                       ret_rate = 0xff;
-                       RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
-                       break;
+                       default:
+                               ret_rate = 0xff;
+                               RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
+                               break;
                }
 
        } else {
                switch (rate) {
-               case DESC90_RATEMCS0:   ret_rate = MGN_MCS0;    break;
-               case DESC90_RATEMCS1:   ret_rate = MGN_MCS1;    break;
-               case DESC90_RATEMCS2:   ret_rate = MGN_MCS2;    break;
-               case DESC90_RATEMCS3:   ret_rate = MGN_MCS3;    break;
-               case DESC90_RATEMCS4:   ret_rate = MGN_MCS4;    break;
-               case DESC90_RATEMCS5:   ret_rate = MGN_MCS5;    break;
-               case DESC90_RATEMCS6:   ret_rate = MGN_MCS6;    break;
-               case DESC90_RATEMCS7:   ret_rate = MGN_MCS7;    break;
-               case DESC90_RATEMCS8:   ret_rate = MGN_MCS8;    break;
-               case DESC90_RATEMCS9:   ret_rate = MGN_MCS9;    break;
-               case DESC90_RATEMCS10:  ret_rate = MGN_MCS10;   break;
-               case DESC90_RATEMCS11:  ret_rate = MGN_MCS11;   break;
-               case DESC90_RATEMCS12:  ret_rate = MGN_MCS12;   break;
-               case DESC90_RATEMCS13:  ret_rate = MGN_MCS13;   break;
-               case DESC90_RATEMCS14:  ret_rate = MGN_MCS14;   break;
-               case DESC90_RATEMCS15:  ret_rate = MGN_MCS15;   break;
-               case DESC90_RATEMCS32:  ret_rate = (0x80|0x20); break;
+                       case DESC90_RATEMCS0:
+                               ret_rate = MGN_MCS0;
+                               break;
+                       case DESC90_RATEMCS1:
+                               ret_rate = MGN_MCS1;
+                               break;
+                       case DESC90_RATEMCS2:
+                               ret_rate = MGN_MCS2;
+                               break;
+                       case DESC90_RATEMCS3:
+                               ret_rate = MGN_MCS3;
+                               break;
+                       case DESC90_RATEMCS4:
+                               ret_rate = MGN_MCS4;
+                               break;
+                       case DESC90_RATEMCS5:
+                               ret_rate = MGN_MCS5;
+                               break;
+                       case DESC90_RATEMCS6:
+                               ret_rate = MGN_MCS6;
+                               break;
+                       case DESC90_RATEMCS7:
+                               ret_rate = MGN_MCS7;
+                               break;
+                       case DESC90_RATEMCS8:
+                               ret_rate = MGN_MCS8;
+                               break;
+                       case DESC90_RATEMCS9:
+                               ret_rate = MGN_MCS9;
+                               break;
+                       case DESC90_RATEMCS10:
+                               ret_rate = MGN_MCS10;
+                               break;
+                       case DESC90_RATEMCS11:
+                               ret_rate = MGN_MCS11;
+                               break;
+                       case DESC90_RATEMCS12:
+                               ret_rate = MGN_MCS12;
+                               break;
+                       case DESC90_RATEMCS13:
+                               ret_rate = MGN_MCS13;
+                               break;
+                       case DESC90_RATEMCS14:
+                               ret_rate = MGN_MCS14;
+                               break;
+                       case DESC90_RATEMCS15:
+                               ret_rate = MGN_MCS15;
+                               break;
+                       case DESC90_RATEMCS32:
+                               ret_rate = (0x80|0x20);
+                               break;
 
-               default:
-                       ret_rate = 0xff;
-                       RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
-                       break;
+                       default:
+                               ret_rate = 0xff;
+                               RT_TRACE(COMP_RECV, "HwRateToMRate90(): Non supported Rate [%x], bIsHT = %d!!!\n", rate, bIsHT);
+                               break;
                }
        }
 
@@ -4022,7 +4190,7 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 
 
        if (pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA) {
-               if (priv->undecorated_smoothed_pwdb < 0)        // initialize
+               if (priv->undecorated_smoothed_pwdb < 0)        /* initialize */
                        priv->undecorated_smoothed_pwdb = pprevious_stats->RxPWDBAll;
                if (pprevious_stats->RxPWDBAll > (u32)priv->undecorated_smoothed_pwdb) {
                        priv->undecorated_smoothed_pwdb =
@@ -4064,9 +4232,9 @@ static void rtl8192_process_phyinfo(struct r8192_priv *priv, u8 *buffer,
 
                // <2> Showed on UI for engineering
                if (pprevious_stats->bPacketToSelf || pprevious_stats->bPacketBeacon || pprevious_stats->bToSelfBA) {
-                       for (nspatial_stream = 0; nspatial_stream < 2; nspatial_stream++) { // 2 spatial stream
+                       for (nspatial_stream = 0; nspatial_stream < 2; nspatial_stream++) { /* 2 spatial stream */
                                if (pprevious_stats->RxMIMOSignalQuality[nspatial_stream] != -1) {
-                                       if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) // initialize
+                                       if (priv->stats.rx_evm_percentage[nspatial_stream] == 0) /* initialize */
                                                priv->stats.rx_evm_percentage[nspatial_stream] = pprevious_stats->RxMIMOSignalQuality[nspatial_stream];
                                        priv->stats.rx_evm_percentage[nspatial_stream] =
                                                ((priv->stats.rx_evm_percentage[nspatial_stream]* (Rx_Smooth_Factor-1)) +
@@ -4361,7 +4529,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
                        rx_evmX /= 2;   //dbm
 
                        evm = rtl819x_evm_dbtopercentage(rx_evmX);
-                       if (i == 0) // Fill value in RFD, Get the first spatial stream only
+                       if (i == 0) /* Fill value in RFD, Get the first spatial stream only */
                                pstats->SignalQuality = precord_stats->SignalQuality = (u8)(evm & 0xff);
                        pstats->RxMIMOSignalQuality[i] = precord_stats->RxMIMOSignalQuality[i] = (u8)(evm & 0xff);
                }
@@ -4370,7 +4538,7 @@ static void rtl8192_query_rxphystatus(struct r8192_priv *priv,
                /* record rx statistics for debug */
                rxsc_sgien_exflg = pofdm_buf->rxsc_sgien_exflg;
                prxsc = (phy_ofdm_rx_status_rxsc_sgien_exintfflag *)&rxsc_sgien_exflg;
-               if (pdrvinfo->BW)       //40M channel
+               if (pdrvinfo->BW)       /* 40M channel */
                        priv->stats.received_bwtype[1+prxsc->rxsc]++;
                else                            //20M channel
                        priv->stats.received_bwtype[0]++;
@@ -4491,41 +4659,99 @@ UpdateReceivedRateHistogramStatistics8190(struct net_device *dev,
                //
                // CCK rate
                //
-       case MGN_1M:    rateIndex = 0;  break;
-       case MGN_2M:    rateIndex = 1;  break;
-       case MGN_5_5M:  rateIndex = 2;  break;
-       case MGN_11M:   rateIndex = 3;  break;
+               case MGN_1M:
+                       rateIndex = 0;
+                       break;
+               case MGN_2M:
+                       rateIndex = 1;
+                       break;
+               case MGN_5_5M:
+                       rateIndex = 2;
+                       break;
+               case MGN_11M:
+                       rateIndex = 3;
+                       break;
                //
                // Legacy OFDM rate
                //
-       case MGN_6M:    rateIndex = 4;  break;
-       case MGN_9M:    rateIndex = 5;  break;
-       case MGN_12M:   rateIndex = 6;  break;
-       case MGN_18M:   rateIndex = 7;  break;
-       case MGN_24M:   rateIndex = 8;  break;
-       case MGN_36M:   rateIndex = 9;  break;
-       case MGN_48M:   rateIndex = 10; break;
-       case MGN_54M:   rateIndex = 11; break;
+               case MGN_6M:
+                       rateIndex = 4;
+                       break;
+               case MGN_9M:
+                       rateIndex = 5;
+                       break;
+               case MGN_12M:
+                       rateIndex = 6;
+                       break;
+               case MGN_18M:
+                       rateIndex = 7;
+                       break;
+               case MGN_24M:
+                       rateIndex = 8;
+                       break;
+               case MGN_36M:
+                       rateIndex = 9;
+                       break;
+               case MGN_48M:
+                       rateIndex = 10;
+                       break;
+               case MGN_54M:
+                       rateIndex = 11;
+                       break;
                //
                // 11n High throughput rate
                //
-       case MGN_MCS0:  rateIndex = 12; break;
-       case MGN_MCS1:  rateIndex = 13; break;
-       case MGN_MCS2:  rateIndex = 14; break;
-       case MGN_MCS3:  rateIndex = 15; break;
-       case MGN_MCS4:  rateIndex = 16; break;
-       case MGN_MCS5:  rateIndex = 17; break;
-       case MGN_MCS6:  rateIndex = 18; break;
-       case MGN_MCS7:  rateIndex = 19; break;
-       case MGN_MCS8:  rateIndex = 20; break;
-       case MGN_MCS9:  rateIndex = 21; break;
-       case MGN_MCS10: rateIndex = 22; break;
-       case MGN_MCS11: rateIndex = 23; break;
-       case MGN_MCS12: rateIndex = 24; break;
-       case MGN_MCS13: rateIndex = 25; break;
-       case MGN_MCS14: rateIndex = 26; break;
-       case MGN_MCS15: rateIndex = 27; break;
-       default:        rateIndex = 28; break;
+               case MGN_MCS0:
+                       rateIndex = 12;
+                       break;
+               case MGN_MCS1:
+                       rateIndex = 13;
+                       break;
+               case MGN_MCS2:
+                       rateIndex = 14;
+                       break;
+               case MGN_MCS3:
+                       rateIndex = 15;
+                       break;
+               case MGN_MCS4:
+                       rateIndex = 16;
+                       break;
+               case MGN_MCS5:
+                       rateIndex = 17;
+                       break;
+               case MGN_MCS6:
+                       rateIndex = 18;
+                       break;
+               case MGN_MCS7:
+                       rateIndex = 19;
+                       break;
+               case MGN_MCS8:
+                       rateIndex = 20;
+                       break;
+               case MGN_MCS9:
+                       rateIndex = 21;
+                       break;
+               case MGN_MCS10:
+                       rateIndex = 22;
+                       break;
+               case MGN_MCS11:
+                       rateIndex = 23;
+                       break;
+               case MGN_MCS12:
+                       rateIndex = 24;
+                       break;
+               case MGN_MCS13:
+                       rateIndex = 25;
+                       break;
+               case MGN_MCS14:
+                       rateIndex = 26;
+                       break;
+               case MGN_MCS15:
+                       rateIndex = 27;
+                       break;
+               default:
+                       rateIndex = 28;
+                       break;
        }
        priv->stats.received_preamble_GI[preamble_guardinterval][rateIndex]++;
        priv->stats.received_rate_histogram[0][rateIndex]++; //total
@@ -5146,7 +5372,7 @@ void EnableHWSecurityConfig8192(struct net_device *dev)
 
        ieee->hwsec_active = 1;
 
-       if ((ieee->pHTInfo->IOTAction&HT_IOT_ACT_PURE_N_MODE) || !hwwep) { //add hwsec_support flag to totol control hw_sec on/off
+       if ((ieee->pHTInfo->IOTAction&HT_IOT_ACT_PURE_N_MODE) || !hwwep) { /* add hwsec_support flag to totol control hw_sec on/off */
                ieee->hwsec_active = 0;
                SECR_value &= ~SCR_RxDecEnable;
        }
@@ -5178,14 +5404,14 @@ void setKey(struct net_device *dev, u8 EntryNo, u8 KeyIndex, u16 KeyType,
                TargetCommand  = i+CAM_CONTENT_COUNT*EntryNo;
                TargetCommand |= BIT31|BIT16;
 
-               if (i == 0) { //MAC|Config
+               if (i == 0) { /* MAC|Config */
                        TargetContent = (u32)(*(MacAddr+0)) << 16|
                                        (u32)(*(MacAddr+1)) << 24|
                                        (u32)usConfig;
 
                        write_nic_dword(dev, WCAMI, TargetContent);
                        write_nic_dword(dev, RWCAM, TargetCommand);
-               } else if (i == 1) { //MAC
+               } else if (i == 1) { /* MAC */
                        TargetContent = (u32)(*(MacAddr+2))      |
                                        (u32)(*(MacAddr+3)) <<  8|
                                        (u32)(*(MacAddr+4)) << 16|
index 675a12d6aa8c533d5890538dc280e47a1d014830..6808e872296e2409bcc0698203c1f49b59c45885 100644 (file)
@@ -57,6 +57,7 @@ static int r8192_wx_get_rate(struct net_device *dev,
                             union iwreq_data *wrqu, char *extra)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        return ieee80211_wx_get_rate(priv->ieee80211, info, wrqu, extra);
 }
 
@@ -100,6 +101,7 @@ static int r8192_wx_get_rts(struct net_device *dev,
                             union iwreq_data *wrqu, char *extra)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        return ieee80211_wx_get_rts(priv->ieee80211, info, wrqu, extra);
 }
 
@@ -124,6 +126,7 @@ static int r8192_wx_get_power(struct net_device *dev,
                             union iwreq_data *wrqu, char *extra)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        return ieee80211_wx_get_power(priv->ieee80211, info, wrqu, extra);
 }
 
@@ -180,8 +183,8 @@ static int r8192_wx_set_crcmon(struct net_device *dev,
              priv->crcmon ? "accepted" : "rejected");
 
        if (prev != priv->crcmon && priv->up) {
-               //rtl8180_down(dev);
-               //rtl8180_up(dev);
+               /* rtl8180_down(dev); */
+               /* rtl8180_up(dev); */
        }
 
        up(&priv->wx_sem);
@@ -194,6 +197,7 @@ static int r8192_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        int ret;
+
        down(&priv->wx_sem);
 
        ret = ieee80211_wx_set_mode(priv->ieee80211, a, wrqu, b);
@@ -249,15 +253,15 @@ static int rtl8180_wx_get_range(struct net_device *dev,
        /* ~5 Mb/s real (802.11b) */
        range->throughput = 5 * 1000 * 1000;
 
-       // TODO: Not used in 802.11b?
-//     range->min_nwid;        /* Minimal NWID we are able to set */
-       // TODO: Not used in 802.11b?
-//     range->max_nwid;        /* Maximal NWID we are able to set */
+       /* TODO: Not used in 802.11b? */
+       /* range->min_nwid; */  /* Minimal NWID we are able to set */
+       /* TODO: Not used in 802.11b? */
+       /* range->max_nwid; */  /* Maximal NWID we are able to set */
 
        /* Old Frequency (backward compat - moved lower ) */
-//     range->old_num_channels;
-//     range->old_num_frequency;
-//     range->old_freq[6]; /* Filler to keep "version" at the same offset */
+       /* range->old_num_channels; */
+       /* range->old_num_frequency; */
+       /* range->old_freq[6]; */ /* Filler to keep "version" at the same offset */
        if (priv->rf_set_sens != NULL)
                range->sensitivity = priv->max_sens;    /* signal level threshold range */
 
@@ -292,26 +296,26 @@ static int rtl8180_wx_get_range(struct net_device *dev,
        range->we_version_compiled = WIRELESS_EXT;
        range->we_version_source = 16;
 
-//     range->retry_capa;      /* What retry options are supported */
-//     range->retry_flags;     /* How to decode max/min retry limit */
-//     range->r_time_flags;    /* How to decode max/min retry life */
-//     range->min_retry;       /* Minimal number of retries */
-//     range->max_retry;       /* Maximal number of retries */
-//     range->min_r_time;      /* Minimal retry lifetime */
-//     range->max_r_time;      /* Maximal retry lifetime */
+       /* range->retry_capa; */        /* What retry options are supported */
+       /* range->retry_flags; */       /* How to decode max/min retry limit */
+       /* range->r_time_flags; */      /* How to decode max/min retry life */
+       /* range->min_retry; */         /* Minimal number of retries */
+       /* range->max_retry; */         /* Maximal number of retries */
+       /* range->min_r_time; */        /* Minimal retry lifetime */
+       /* range->max_r_time; */        /* Maximal retry lifetime */
 
 
        for (i = 0, val = 0; i < 14; i++) {
 
-               // Include only legal frequencies for some countries
+               /* Include only legal frequencies for some countries */
                if ((GET_DOT11D_INFO(priv->ieee80211)->channel_map)[i+1]) {
                        range->freq[val].i = i + 1;
                        range->freq[val].m = ieee80211_wlan_frequencies[i] * 100000;
                        range->freq[val].e = 1;
                        val++;
                } else {
-                       // FIXME: do we need to set anything for channels
-                       // we don't use ?
+                       /* FIXME: do we need to set anything for channels */
+                       /* we don't use ? */
                }
 
                if (val == IW_MAX_FREQUENCIES)
@@ -341,10 +345,8 @@ static int r8192_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
        if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
                struct iw_scan_req *req = (struct iw_scan_req *)b;
                if (req->essid_len) {
-                       //printk("==**&*&*&**===>scan set ssid:%s\n", req->essid);
                        ieee->current_network.ssid_len = req->essid_len;
                        memcpy(ieee->current_network.ssid, req->essid, req->essid_len);
-                       //printk("=====>network ssid:%s\n", ieee->current_network.ssid);
                }
        }
 
@@ -386,6 +388,7 @@ static int r8192_wx_set_essid(struct net_device *dev,
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
        int ret;
+
        down(&priv->wx_sem);
 
        ret = ieee80211_wx_set_essid(priv->ieee80211, a, wrqu, b);
@@ -434,6 +437,7 @@ static int r8192_wx_get_name(struct net_device *dev,
                             union iwreq_data *wrqu, char *extra)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        return ieee80211_wx_get_name(priv->ieee80211, info, wrqu, extra);
 }
 
@@ -480,7 +484,7 @@ static int r8192_wx_set_wap(struct net_device *dev,
 
        int ret;
        struct r8192_priv *priv = ieee80211_priv(dev);
-//        struct sockaddr *temp = (struct sockaddr *)awrq;
+       /* struct sockaddr *temp = (struct sockaddr *)awrq; */
        down(&priv->wx_sem);
 
        ret = ieee80211_wx_set_wap(priv->ieee80211, info, awrq, extra);
@@ -518,12 +522,9 @@ static int r8192_wx_set_enc(struct net_device *dev,
        struct r8192_priv *priv = ieee80211_priv(dev);
        struct ieee80211_device *ieee = priv->ieee80211;
        int ret;
-
-       //u32 TargetContent;
        u32 hwkey[4] = {0, 0, 0, 0};
        u8 mask = 0xff;
        u32 key_idx = 0;
-       //u8 broadcast_addr[6] ={       0xff,0xff,0xff,0xff,0xff,0xff};
        u8 zero_addr[4][6] = {  {0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
                                {0x00, 0x00, 0x00, 0x00, 0x00, 0x01},
                                {0x00, 0x00, 0x00, 0x00, 0x00, 0x02},
@@ -542,7 +543,7 @@ static int r8192_wx_set_enc(struct net_device *dev,
 
 
 
-       //sometimes, the length is zero while we do not type key value
+       /* sometimes, the length is zero while we do not type key value */
        if (wrqu->encoding.length != 0) {
 
                for (i = 0; i < 4; i++) {
@@ -584,12 +585,12 @@ static int r8192_wx_set_enc(struct net_device *dev,
                        EnableHWSecurityConfig8192(dev);
 
                        setKey(dev,
-                               key_idx,                //EntryNo
-                               key_idx,                //KeyIndex
-                               KEY_TYPE_WEP40,         //KeyType
+                               key_idx,                /* EntryNo */
+                               key_idx,                /* KeyIndex */
+                               KEY_TYPE_WEP40,         /* KeyType */
                                zero_addr[key_idx],
-                               0,                      //DefaultKey
-                               hwkey);                 //KeyContent
+                               0,                      /* DefaultKey */
+                               hwkey);                 /* KeyContent */
 
                }
 
@@ -598,12 +599,12 @@ static int r8192_wx_set_enc(struct net_device *dev,
                                EnableHWSecurityConfig8192(dev);
 
                        setKey(dev,
-                               key_idx,                //EntryNo
-                               key_idx,                //KeyIndex
-                               KEY_TYPE_WEP104,        //KeyType
+                               key_idx,                /* EntryNo */
+                               key_idx,                /* KeyIndex */
+                               KEY_TYPE_WEP104,        /* KeyType */
                                zero_addr[key_idx],
-                               0,                      //DefaultKey
-                               hwkey);                 //KeyContent
+                               0,                      /* DefaultKey */
+                               hwkey);                 /* KeyContent */
 
                } else {
                        printk("wrong type in WEP, not WEP40 and WEP104\n");
@@ -669,14 +670,6 @@ static int r8192_wx_set_retry(struct net_device *dev,
         */
 
        rtl8192_commit(dev);
-       /*
-       if(priv->up){
-               rtl8180_rtx_disable(dev);
-               rtl8180_rx_enable(dev);
-               rtl8180_tx_enable(dev);
-
-       }
-       */
 exit:
        up(&priv->wx_sem);
 
@@ -703,7 +696,6 @@ static int r8192_wx_get_retry(struct net_device *dev,
                wrqu->retry.flags = IW_RETRY_LIMIT | IW_RETRY_MIN;
                wrqu->retry.value = priv->retry_data;
        }
-       //printk("returning %d",wrqu->retry.value);
 
 
        return 0;
@@ -714,6 +706,7 @@ static int r8192_wx_get_sens(struct net_device *dev,
                                union iwreq_data *wrqu, char *extra)
 {
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        if (priv->rf_set_sens == NULL)
                return -1; /* we have not this support for this radio */
        wrqu->sens.value = priv->sens;
@@ -727,10 +720,9 @@ static int r8192_wx_set_sens(struct net_device *dev,
 {
 
        struct r8192_priv *priv = ieee80211_priv(dev);
-
        short err = 0;
+
        down(&priv->wx_sem);
-       //DMESG("attempt to set sensivity to %ddb",wrqu->sens.value);
        if (priv->rf_set_sens == NULL) {
                err = -1; /* we have not this support for this radio */
                goto exit;
@@ -746,7 +738,7 @@ exit:
        return err;
 }
 
-//hw security need to reorganized.
+/* hw security need to reorganized. */
 static int r8192_wx_set_enc_ext(struct net_device *dev,
                                        struct iw_request_info *info,
                                        union iwreq_data *wrqu, char *extra)
@@ -754,7 +746,6 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
        int ret = 0;
        struct r8192_priv *priv = ieee80211_priv(dev);
        struct ieee80211_device *ieee = priv->ieee80211;
-       //printk("===>%s()\n", __func__);
 
 
        down(&priv->wx_sem);
@@ -768,10 +759,10 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
                struct iw_point *encoding = &wrqu->encoding;
                u8 idx = 0, alg = 0, group = 0;
                if ((encoding->flags & IW_ENCODE_DISABLED) || ext->alg == IW_ENCODE_ALG_NONE)
-                       //none is not allowed to use hwsec WB 2008.07.01
+                       /* none is not allowed to use hwsec WB 2008.07.01 */
                        goto end_hw_sec;
 
-               // as IW_ENCODE_ALG_CCMP is defined to be 3 and KEY_TYPE_CCMP is defined to 4;
+               /* as IW_ENCODE_ALG_CCMP is defined to be 3 and KEY_TYPE_CCMP is defined to 4; */
                alg =  (ext->alg == IW_ENCODE_ALG_CCMP)?KEY_TYPE_CCMP:ext->alg;
                idx = encoding->flags & IW_ENCODE_INDEX;
                if (idx)
@@ -784,34 +775,34 @@ static int r8192_wx_set_enc_ext(struct net_device *dev,
                        ieee->pairwise_key_type = alg;
                        EnableHWSecurityConfig8192(dev);
                }
-               memcpy((u8 *)key, ext->key, 16); //we only get 16 bytes key.why? WB 2008.7.1
+               memcpy((u8 *)key, ext->key, 16); /* we only get 16 bytes key.why? WB 2008.7.1 */
 
                if ((alg & KEY_TYPE_WEP40) && (ieee->auth_mode != 2)) {
 
                        setKey(dev,
-                                       idx,//EntryNo
-                                       idx, //KeyIndex
-                                       alg,  //KeyType
-                                       zero, //MacAddr
-                                       0,              //DefaultKey
-                                       key);           //KeyContent
+                                       idx,    /* EntryNao */
+                                       idx,    /* KeyIndex */
+                                       alg,    /* KeyType */
+                                       zero,   /* MacAddr */
+                                       0,      /* DefaultKey */
+                                       key);   /* KeyContent */
                } else if (group) {
                        ieee->group_key_type = alg;
                        setKey(dev,
-                                       idx,//EntryNo
-                                       idx, //KeyIndex
-                                       alg,  //KeyType
-                                       broadcast_addr, //MacAddr
-                                       0,              //DefaultKey
-                                       key);           //KeyContent
-               } else {//pairwise key
+                                       idx,    /* EntryNo */
+                                       idx,    /* KeyIndex */
+                                       alg,    /* KeyType */
+                                       broadcast_addr, /* MacAddr */
+                                       0,              /* DefaultKey */
+                                       key);           /* KeyContent */
+               } else {        /* pairwise key */
                        setKey(dev,
-                                       4,//EntryNo
-                                       idx, //KeyIndex
-                                       alg,  //KeyType
-                                       (u8 *)ieee->ap_mac_addr, //MacAddr
-                                       0,              //DefaultKey
-                                       key);           //KeyContent
+                                       4,      /* EntryNo */
+                                       idx,    /* KeyIndex */
+                                       alg,    /* KeyType */
+                                       (u8 *)ieee->ap_mac_addr,/* MacAddr */
+                                       0,                      /* DefaultKey */
+                                       key);                   /* KeyContent */
                }
 
 
@@ -828,8 +819,8 @@ static int r8192_wx_set_auth(struct net_device *dev,
                                        union iwreq_data *data, char *extra)
 {
        int ret = 0;
-       //printk("====>%s()\n", __func__);
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        down(&priv->wx_sem);
        ret = ieee80211_wx_set_auth(priv->ieee80211, info, &(data->param), extra);
        up(&priv->wx_sem);
@@ -840,10 +831,10 @@ static int r8192_wx_set_mlme(struct net_device *dev,
                                        struct iw_request_info *info,
                                        union iwreq_data *wrqu, char *extra)
 {
-       //printk("====>%s()\n", __func__);
 
        int ret = 0;
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        down(&priv->wx_sem);
        ret = ieee80211_wx_set_mlme(priv->ieee80211, info, wrqu, extra);
 
@@ -855,13 +846,12 @@ static int r8192_wx_set_gen_ie(struct net_device *dev,
                                        struct iw_request_info *info,
                                        union iwreq_data *data, char *extra)
 {
-          //printk("====>%s(), len:%d\n", __func__, data->length);
        int ret = 0;
        struct r8192_priv *priv = ieee80211_priv(dev);
+
        down(&priv->wx_sem);
        ret = ieee80211_wx_set_gen_ie(priv->ieee80211, extra, data->data.length);
        up(&priv->wx_sem);
-       //printk("<======%s(), ret:%d\n", __func__, ret);
        return ret;
 
 
@@ -923,13 +913,13 @@ static iw_handler r8192_wx_handlers[] = {
        r8192_wx_get_power,                    /* SIOCGIWPOWER */
        NULL,                   /*---hole---*/
        NULL,                   /*---hole---*/
-       r8192_wx_set_gen_ie,//NULL,                     /* SIOCSIWGENIE */
+       r8192_wx_set_gen_ie, /* NULL, */                /* SIOCSIWGENIE */
        NULL,                   /* SIOCSIWGENIE */
 
-       r8192_wx_set_auth,//NULL,                       /* SIOCSIWAUTH */
-       NULL,//r8192_wx_get_auth,//NULL,                        /* SIOCSIWAUTH */
+       r8192_wx_set_auth,/* NULL, */                   /* SIOCSIWAUTH */
+       NULL,/* r8192_wx_get_auth, */ /* NULL, */       /* SIOCSIWAUTH */
        r8192_wx_set_enc_ext,                   /* SIOCSIWENCODEEXT */
-       NULL,//r8192_wx_get_enc_ext,//NULL,                     /* SIOCSIWENCODEEXT */
+       NULL,/* r8192_wx_get_enc_ext, *//* NULL, */                     /* SIOCSIWENCODEEXT */
        NULL,                   /* SIOCSIWPMKSA */
        NULL,                    /*---hole---*/
 
@@ -962,14 +952,9 @@ static const struct iw_priv_args r8192_private_args[] = {
 
 
 static iw_handler r8192_private_handler[] = {
-//     r8192_wx_set_monitor,  /* SIOCIWFIRSTPRIV */
-       r8192_wx_set_crcmon,   /*SIOCIWSECONDPRIV*/
-//     r8192_wx_set_forceassociate,
-//     r8192_wx_set_beaconinterval,
-//     r8192_wx_set_monitor_type,
+       r8192_wx_set_crcmon,
        r8192_wx_set_scan_type,
        r8192_wx_set_rawtx,
-       //r8192_wx_null,
        r8192_wx_force_reset,
 };
 
@@ -981,6 +966,7 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
        int tmp_level = 0;
        int tmp_qual = 0;
        int tmp_noise = 0;
+
        if (ieee->state < IEEE80211_LINKED) {
                wstats->qual.qual = 0;
                wstats->qual.level = 0;
@@ -992,12 +978,11 @@ struct iw_statistics *r8192_get_wireless_stats(struct net_device *dev)
        tmp_level = (&ieee->current_network)->stats.rssi;
        tmp_qual = (&ieee->current_network)->stats.signal;
        tmp_noise = (&ieee->current_network)->stats.noise;
-       //printk("level:%d, qual:%d, noise:%d\n", tmp_level, tmp_qual, tmp_noise);
 
        wstats->qual.level = tmp_level;
        wstats->qual.qual = tmp_qual;
        wstats->qual.noise = tmp_noise;
-       wstats->qual.updated = IW_QUAL_ALL_UPDATED| IW_QUAL_DBM;
+       wstats->qual.updated = IW_QUAL_ALL_UPDATED | IW_QUAL_DBM;
        return wstats;
 }
 
index 3362e5e32bcc8cec607fe0dd76470537552ae091..0168745ba191752168dda76a88db92a3dba89a5d 100644 (file)
@@ -160,7 +160,6 @@ struct _adapter {
        s32     bSurpriseRemoved;
        u32     IsrContent;
        u32     ImrContent;
-       bool    fw_found;
        u8      EepromAddressSize;
        u8      hw_init_completed;
        struct task_struct *cmdThread;
index 36de7e478f3237139b51436be174f9cd97915e3e..0556de3b8904e419919224b78b8fa8678f0b8a12 100644 (file)
@@ -50,13 +50,11 @@ static void rtl871x_load_fw_cb(const struct firmware *firmware, void *context)
                struct usb_device *udev = padapter->dvobjpriv.pusbdev;
                struct usb_interface *pusb_intf = padapter->pusb_intf;
                dev_err(&udev->dev, "r8712u: Firmware request failed\n");
-               padapter->fw_found = false;
                usb_put_dev(udev);
                usb_set_intfdata(pusb_intf, NULL);
                return;
        }
        padapter->fw = firmware;
-       padapter->fw_found = true;
        /* firmware available - start netdev */
        register_netdev(padapter->pnetdev);
 }
index da4000e49da61a1a2dd660ca4f80ef37861ea51d..8269be80437ac747846f9b0714778fe872d41dad 100644 (file)
@@ -734,7 +734,7 @@ enum ieee80211_state {
 #define IEEE_G            (1<<2)
 #define IEEE_MODE_MASK    (IEEE_A|IEEE_B|IEEE_G)
 
-extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
+static inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
 {
        /* Single white space is for Linksys APs */
        if (essid_len == 1 && essid[0] == ' ')
@@ -748,7 +748,7 @@ extern inline int ieee80211_is_empty_essid(const char *essid, int essid_len)
        return 1;
 }
 
-extern inline int ieee80211_get_hdrlen(u16 fc)
+static inline int ieee80211_get_hdrlen(u16 fc)
 {
        int hdrlen = 24;
 
index 6bd08213cb70fcc8d28c6266be4166a932afb20b..13debb59ad97ac2f721b768c446fd732b1ab7790 100644 (file)
@@ -345,8 +345,7 @@ u8 r8712_free_drv_sw(struct _adapter *padapter)
        r8712_free_mlme_priv(&padapter->mlmepriv);
        r8712_free_io_queue(padapter);
        _free_xmit_priv(&padapter->xmitpriv);
-       if (padapter->fw_found)
-               _r8712_free_sta_priv(&padapter->stapriv);
+       _r8712_free_sta_priv(&padapter->stapriv);
        _r8712_free_recv_priv(&padapter->recvpriv);
        mp871xdeinit(padapter);
        if (pnetdev)
index 09e156199e7f7c717649104cbd1907df4ffa55e6..67c53d569be634e7c7518c777bca1e7a097104e3 100644 (file)
@@ -54,28 +54,13 @@ struct      __queue {
 
 #define _init_queue(pqueue)                            \
        do {                                            \
-               _init_listhead(&((pqueue)->queue));     \
+               INIT_LIST_HEAD(&((pqueue)->queue));     \
                spin_lock_init(&((pqueue)->lock));      \
        } while (0)
 
-static inline struct list_head *get_next(struct list_head *list)
-{
-       return list->next;
-}
-
-static inline struct list_head *get_list_head(struct  __queue *queue)
-{
-       return &(queue->queue);
-}
-
 #define LIST_CONTAINOR(ptr, type, member) \
        ((type *)((char *)(ptr)-(SIZE_T)(&((type *)0)->member)))
 
-static inline void list_delete(struct list_head *plist)
-{
-       list_del_init(plist);
-}
-
 static inline void _init_timer(struct timer_list *ptimer,
                               struct  net_device *padapter,
                               void *pfunc, void *cntx)
@@ -110,25 +95,6 @@ static inline void _set_workitem(_workitem *pwork)
        #define BIT(x)  (1 << (x))
 #endif
 
-/*
-For the following list_xxx operations,
-caller must guarantee the atomic context.
-Otherwise, there will be racing condition.
-*/
-static inline u32 is_list_empty(struct list_head *phead)
-{
-       if (list_empty(phead))
-               return true;
-       else
-               return false;
-}
-
-static inline void list_insert_tail(struct list_head *plist,
-                                   struct list_head *phead)
-{
-       list_add_tail(plist, phead);
-}
-
 static inline u32 _down_sema(struct semaphore *sema)
 {
        if (down_interruptible(sema))
@@ -137,16 +103,6 @@ static inline u32 _down_sema(struct semaphore *sema)
                return _SUCCESS;
 }
 
-static inline void _init_listhead(struct list_head *list)
-{
-       INIT_LIST_HEAD(list);
-}
-
-static inline u32 _queue_empty(struct  __queue *pqueue)
-{
-       return is_list_empty(&(pqueue->queue));
-}
-
 static inline u32 end_of_queue_search(struct list_head *head,
                struct list_head *plist)
 {
@@ -184,25 +140,5 @@ static inline void flush_signals_thread(void)
                flush_signals(current);
 }
 
-static inline u32 _RND8(u32 sz)
-{
-       return ((sz >> 3) + ((sz & 7) ? 1 : 0)) << 3;
-}
-
-static inline u32 _RND128(u32 sz)
-{
-       return ((sz >> 7) + ((sz & 127) ? 1 : 0)) << 7;
-}
-
-static inline u32 _RND256(u32 sz)
-{
-       return ((sz >> 8) + ((sz & 255) ? 1 : 0)) << 8;
-}
-
-static inline u32 _RND512(u32 sz)
-{
-       return ((sz >> 9) + ((sz & 511) ? 1 : 0)) << 9;
-}
-
 #endif
 
index 8ca7d7e68dca7c4c21a5595a443da9bfebbf809e..61519774a25ea5e90caeab3b1bd3a51445326dc6 100644 (file)
@@ -351,7 +351,7 @@ _next:
                                                    &padapter->dvobjpriv;
                        u8 blnPending = 0;
                        pcmdpriv->cmd_issued_cnt++;
-                       cmdsz = _RND8((pcmd->cmdsz)); /* _RND8  */
+                       cmdsz = round_up(pcmd->cmdsz, 8);
                        wr_sz = TXDESC_SIZE + 8 + cmdsz;
                        pdesc->txdw0 |= cpu_to_le32((wr_sz-TXDESC_SIZE) &
                                                     0x0000ffff);
@@ -410,7 +410,7 @@ _next:
                                }
                        }
                        r8712_free_cmd_obj(pcmd);
-                       if (_queue_empty(&(pcmdpriv->cmd_queue))) {
+                       if (list_empty(&pcmdpriv->cmd_queue.queue)) {
                                r8712_unregister_cmd_alive(padapter);
                                continue;
                        } else
index 1f700171af13541ad2e440954303950e00574d2e..df1e498e98b6c69e3645e4dff4003b5f7fa36fe6 100644 (file)
@@ -66,14 +66,14 @@ int r8712_init_recv_priv(struct recv_priv *precvpriv, struct _adapter *padapter)
                              ((addr_t) (precvpriv->pallocated_recv_buf) & 3);
        precvbuf = (struct recv_buf *)precvpriv->precv_buf;
        for (i = 0; i < NR_RECVBUFF; i++) {
-               _init_listhead(&precvbuf->list);
+               INIT_LIST_HEAD(&precvbuf->list);
                spin_lock_init(&precvbuf->recvbuf_lock);
                res = r8712_os_recvbuf_resource_alloc(padapter, precvbuf);
                if (res == _FAIL)
                        break;
                precvbuf->ref_cnt = 0;
                precvbuf->adapter = padapter;
-               list_insert_tail(&precvbuf->list,
+               list_add_tail(&precvbuf->list,
                                 &(precvpriv->free_recv_buf_queue.queue));
                precvbuf++;
        }
@@ -145,9 +145,8 @@ int r8712_free_recvframe(union recv_frame *precvframe,
                precvframe->u.hdr.pkt = NULL;
        }
        spin_lock_irqsave(&pfree_recv_queue->lock, irqL);
-       list_delete(&(precvframe->u.hdr.list));
-       list_insert_tail(&(precvframe->u.hdr.list),
-                        get_list_head(pfree_recv_queue));
+       list_del_init(&(precvframe->u.hdr.list));
+       list_add_tail(&(precvframe->u.hdr.list), &pfree_recv_queue->queue);
        if (padapter != NULL) {
                if (pfree_recv_queue == &precvpriv->free_recv_queue)
                                precvpriv->free_recvframe_cnt++;
@@ -208,10 +207,10 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter,
        struct  __queue *pfree_recv_queue;
 
        pfree_recv_queue = &adapter->recvpriv.free_recv_queue;
-       phead = get_list_head(defrag_q);
-       plist = get_next(phead);
+       phead = &defrag_q->queue;
+       plist = phead->next;
        prframe = LIST_CONTAINOR(plist, union recv_frame, u);
-       list_delete(&prframe->u.list);
+       list_del_init(&prframe->u.list);
        pfhdr = &prframe->u.hdr;
        curfragnum = 0;
        if (curfragnum != pfhdr->attrib.frag_num) {
@@ -222,8 +221,8 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter,
                return NULL;
        }
        curfragnum++;
-       plist = get_list_head(defrag_q);
-       plist = get_next(plist);
+       plist = &defrag_q->queue;
+       plist = plist->next;
        data = get_recvframe_data(prframe);
        while (end_of_queue_search(phead, plist) == false) {
                pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
@@ -247,7 +246,7 @@ static union recv_frame *recvframe_defrag(struct _adapter *adapter,
                memcpy(pfhdr->rx_tail, pnfhdr->rx_data, pnfhdr->len);
                recvframe_put(prframe, pnfhdr->len);
                pfhdr->attrib.icv_len = pnfhdr->attrib.icv_len;
-               plist = get_next(plist);
+               plist = plist->next;
        }
        /* free the defrag_q queue and return the prframe */
        r8712_free_recvframe_queue(defrag_q, pfree_recv_queue);
@@ -289,15 +288,15 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
                if (pdefrag_q != NULL) {
                        if (fragnum == 0) {
                                /*the first fragment*/
-                               if (_queue_empty(pdefrag_q) == false) {
+                               if (!list_empty(&pdefrag_q->queue)) {
                                        /*free current defrag_q */
                                        r8712_free_recvframe_queue(pdefrag_q,
                                                             pfree_recv_queue);
                                }
                        }
                        /* Then enqueue the 0~(n-1) fragment to the defrag_q */
-                       phead = get_list_head(pdefrag_q);
-                       list_insert_tail(&pfhdr->list, phead);
+                       phead = &pdefrag_q->queue;
+                       list_add_tail(&pfhdr->list, phead);
                        prtnframe = NULL;
                } else {
                        /* can't find this ta's defrag_queue, so free this
@@ -311,8 +310,8 @@ union recv_frame *r8712_recvframe_chk_defrag(struct _adapter *padapter,
                /* the last fragment frame
                 * enqueue the last fragment */
                if (pdefrag_q != NULL) {
-                       phead = get_list_head(pdefrag_q);
-                       list_insert_tail(&pfhdr->list, phead);
+                       phead = &pdefrag_q->queue;
+                       list_add_tail(&pfhdr->list, phead);
                        /*call recvframe_defrag to defrag*/
                        precv_frame = recvframe_defrag(padapter, pdefrag_q);
                        prtnframe = precv_frame;
@@ -499,20 +498,20 @@ static int enqueue_reorder_recvframe(struct recv_reorder_ctrl *preorder_ctrl,
                                        &preorder_ctrl->pending_recvframe_queue;
        struct rx_pkt_attrib *pattrib = &prframe->u.hdr.attrib;
 
-       phead = get_list_head(ppending_recvframe_queue);
-       plist = get_next(phead);
+       phead = &ppending_recvframe_queue->queue;
+       plist = phead->next;
        while (end_of_queue_search(phead, plist) == false) {
                pnextrframe = LIST_CONTAINOR(plist, union recv_frame, u);
                pnextattrib = &pnextrframe->u.hdr.attrib;
                if (SN_LESS(pnextattrib->seq_num, pattrib->seq_num))
-                       plist = get_next(plist);
+                       plist = plist->next;
                else if (SN_EQUAL(pnextattrib->seq_num, pattrib->seq_num))
                        return false;
                else
                        break;
        }
-       list_delete(&(prframe->u.hdr.list));
-       list_insert_tail(&(prframe->u.hdr.list), plist);
+       list_del_init(&(prframe->u.hdr.list));
+       list_add_tail(&(prframe->u.hdr.list), plist);
        return true;
 }
 
@@ -528,11 +527,11 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
        struct  __queue *ppending_recvframe_queue =
                         &preorder_ctrl->pending_recvframe_queue;
 
-       phead = get_list_head(ppending_recvframe_queue);
-       plist = get_next(phead);
+       phead = &ppending_recvframe_queue->queue;
+       plist = phead->next;
        /* Handling some condition for forced indicate case.*/
        if (bforced == true) {
-               if (is_list_empty(phead))
+               if (list_empty(phead))
                        return true;
                else {
                        prframe = LIST_CONTAINOR(plist, union recv_frame, u);
@@ -542,12 +541,12 @@ int r8712_recv_indicatepkts_in_order(struct _adapter *padapter,
        }
        /* Prepare indication list and indication.
         * Check if there is any packet need indicate. */
-       while (!is_list_empty(phead)) {
+       while (!list_empty(phead)) {
                prframe = LIST_CONTAINOR(plist, union recv_frame, u);
                pattrib = &prframe->u.hdr.attrib;
                if (!SN_LESS(preorder_ctrl->indicate_seq, pattrib->seq_num)) {
-                       plist = get_next(plist);
-                       list_delete(&(prframe->u.hdr.list));
+                       plist = plist->next;
+                       list_del_init(&(prframe->u.hdr.list));
                        if (SN_EQUAL(preorder_ctrl->indicate_seq,
                            pattrib->seq_num))
                                preorder_ctrl->indicate_seq =
@@ -1061,11 +1060,11 @@ static int recvbuf2recvframe(struct _adapter *padapter, struct sk_buff *pskb)
                precvframe = r8712_alloc_recvframe(pfree_recv_queue);
                if (precvframe == NULL)
                        goto  _exit_recvbuf2recvframe;
-               _init_listhead(&precvframe->u.hdr.list);
+               INIT_LIST_HEAD(&precvframe->u.hdr.list);
                precvframe->u.hdr.precvbuf = NULL; /*can't access the precvbuf*/
                precvframe->u.hdr.len = 0;
                tmp_len = pkt_len + drvinfo_sz + RXDESC_SIZE;
-               pkt_offset = (u16)_RND128(tmp_len);
+               pkt_offset = (u16)round_up(tmp_len, 128);
                /* for first fragment packet, driver need allocate 1536 +
                 * drvinfo_sz + RXDESC_SIZE to defrag packet. */
                if ((mf == 1) && (frag == 0))
index 4e3f09420c1ea16e51963d808c6b61484f1f8bd3..4ebedb4005cf88c81d21e81dabfaf0452791efca 100644 (file)
@@ -166,12 +166,12 @@ static struct xmit_frame *dequeue_one_xmitframe(struct xmit_priv *pxmitpriv,
        struct list_head *xmitframe_plist, *xmitframe_phead;
        struct  xmit_frame *pxmitframe = NULL;
 
-       xmitframe_phead = get_list_head(pframe_queue);
-       xmitframe_plist = get_next(xmitframe_phead);
+       xmitframe_phead = &pframe_queue->queue;
+       xmitframe_plist = xmitframe_phead->next;
        if ((end_of_queue_search(xmitframe_phead, xmitframe_plist)) == false) {
                pxmitframe = LIST_CONTAINOR(xmitframe_plist,
                             struct xmit_frame, list);
-               list_delete(&pxmitframe->list);
+               list_del_init(&pxmitframe->list);
                ptxservq->qcnt--;
                phwxmit->txcmdcnt++;
        }
@@ -210,8 +210,8 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
        spin_lock_irqsave(&pxmitpriv->lock, irqL0);
        for (i = 0; i < entry; i++) {
                phwxmit = phwxmit_i + inx[i];
-               sta_phead = get_list_head(phwxmit->sta_queue);
-               sta_plist = get_next(sta_phead);
+               sta_phead = &phwxmit->sta_queue->queue;
+               sta_plist = sta_phead->next;
                while ((end_of_queue_search(sta_phead, sta_plist)) == false) {
                        ptxservq = LIST_CONTAINOR(sta_plist, struct tx_servq,
                                  tx_pending);
@@ -222,11 +222,13 @@ static struct xmit_frame *dequeue_xframe_ex(struct xmit_priv *pxmitpriv,
                                phwxmit->accnt--;
                                goto exit_dequeue_xframe_ex;
                        }
-                       sta_plist = get_next(sta_plist);
+                       sta_plist = sta_plist->next;
                        /*Remove sta node when there are no pending packets.*/
-                       if (_queue_empty(pframe_queue)) {
-                               /*must be done after get_next and before break*/
-                               list_delete(&ptxservq->tx_pending);
+                       if (list_empty(&pframe_queue->queue)) {
+                               /* must be done after sta_plist->next
+                                * and before break
+                                */
+                               list_del_init(&ptxservq->tx_pending);
                        }
                }
        }
index 7a252200e9026322c8428f18a482738cf7609fb5..d9c1561e32728c703b36aae663cdb541331a6c4a 100644 (file)
@@ -126,7 +126,7 @@ static sint _enqueue_cmd(struct  __queue *queue, struct cmd_obj *obj)
        if (obj == NULL)
                return _SUCCESS;
        spin_lock_irqsave(&queue->lock, irqL);
-       list_insert_tail(&obj->list, &queue->queue);
+       list_add_tail(&obj->list, &queue->queue);
        spin_unlock_irqrestore(&queue->lock, irqL);
        return _SUCCESS;
 }
@@ -137,12 +137,12 @@ static struct cmd_obj *_dequeue_cmd(struct  __queue *queue)
        struct cmd_obj *obj;
 
        spin_lock_irqsave(&(queue->lock), irqL);
-       if (is_list_empty(&(queue->queue)))
+       if (list_empty(&(queue->queue)))
                obj = NULL;
        else {
-               obj = LIST_CONTAINOR(get_next(&(queue->queue)),
+               obj = LIST_CONTAINOR(queue->queue.next,
                                     struct cmd_obj, list);
-               list_delete(&obj->list);
+               list_del_init(&obj->list);
        }
        spin_unlock_irqrestore(&(queue->lock), irqL);
        return obj;
@@ -190,7 +190,7 @@ u32 r8712_enqueue_cmd_ex(struct cmd_priv *pcmdpriv, struct cmd_obj *obj)
                return _FAIL;
        queue = &pcmdpriv->cmd_queue;
        spin_lock_irqsave(&queue->lock, irqL);
-       list_insert_tail(&obj->list, &queue->queue);
+       list_add_tail(&obj->list, &queue->queue);
        spin_unlock_irqrestore(&queue->lock, irqL);
        up(&pcmdpriv->cmd_queue_sema);
        return _SUCCESS;
@@ -227,10 +227,10 @@ u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psurveyPara = kmalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC);
+       psurveyPara = kmalloc(sizeof(*psurveyPara), GFP_ATOMIC);
        if (psurveyPara == NULL) {
                kfree((unsigned char *) ph2c);
                return _FAIL;
@@ -259,11 +259,10 @@ u8 r8712_setdatarate_cmd(struct _adapter *padapter, u8 *rateset)
        struct setdatarate_parm *pbsetdataratepara;
        struct cmd_priv         *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pbsetdataratepara = kmalloc(sizeof(struct setdatarate_parm),
-                                   GFP_ATOMIC);
+       pbsetdataratepara = kmalloc(sizeof(*pbsetdataratepara), GFP_ATOMIC);
        if (pbsetdataratepara == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -282,11 +281,10 @@ u8 r8712_set_chplan_cmd(struct _adapter *padapter, int chplan)
        struct SetChannelPlan_param *psetchplanpara;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetchplanpara = kmalloc(sizeof(struct SetChannelPlan_param),
-                                GFP_ATOMIC);
+       psetchplanpara = kmalloc(sizeof(*psetchplanpara), GFP_ATOMIC);
        if (psetchplanpara == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -304,11 +302,10 @@ u8 r8712_setbasicrate_cmd(struct _adapter *padapter, u8 *rateset)
        struct setbasicrate_parm *pssetbasicratepara;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pssetbasicratepara = kmalloc(sizeof(struct setbasicrate_parm),
-                                    GFP_ATOMIC);
+       pssetbasicratepara = kmalloc(sizeof(*pssetbasicratepara), GFP_ATOMIC);
        if (pssetbasicratepara == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -327,10 +324,10 @@ u8 r8712_setptm_cmd(struct _adapter *padapter, u8 type)
        struct writePTM_parm    *pwriteptmparm;
        struct cmd_priv         *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC);
+       pwriteptmparm = kmalloc(sizeof(*pwriteptmparm), GFP_ATOMIC);
        if (pwriteptmparm == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -347,10 +344,10 @@ u8 r8712_setfwdig_cmd(struct _adapter *padapter, u8 type)
        struct writePTM_parm *pwriteptmparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC);
+       pwriteptmparm = kmalloc(sizeof(*pwriteptmparm), GFP_ATOMIC);
        if (pwriteptmparm == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -367,10 +364,10 @@ u8 r8712_setfwra_cmd(struct _adapter *padapter, u8 type)
        struct writePTM_parm *pwriteptmparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pwriteptmparm = kmalloc(sizeof(struct writePTM_parm), GFP_ATOMIC);
+       pwriteptmparm = kmalloc(sizeof(*pwriteptmparm), GFP_ATOMIC);
        if (pwriteptmparm == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -387,10 +384,10 @@ u8 r8712_setrfreg_cmd(struct _adapter  *padapter, u8 offset, u32 val)
        struct writeRF_parm *pwriterfparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pwriterfparm = kmalloc(sizeof(struct writeRF_parm), GFP_ATOMIC);
+       pwriterfparm = kmalloc(sizeof(*pwriterfparm), GFP_ATOMIC);
        if (pwriterfparm == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -408,15 +405,15 @@ u8 r8712_getrfreg_cmd(struct _adapter *padapter, u8 offset, u8 *pval)
        struct readRF_parm *prdrfparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       prdrfparm = kmalloc(sizeof(struct readRF_parm), GFP_ATOMIC);
+       prdrfparm = kmalloc(sizeof(*prdrfparm), GFP_ATOMIC);
        if (prdrfparm == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
        }
-       _init_listhead(&ph2c->list);
+       INIT_LIST_HEAD(&ph2c->list);
        ph2c->cmdcode = GEN_CMD_CODE(_GetRFReg);
        ph2c->parmbuf = (unsigned char *)prdrfparm;
        ph2c->cmdsz =  sizeof(struct readRF_parm);
@@ -452,10 +449,10 @@ u8 r8712_createbss_cmd(struct _adapter *padapter)
                                 &padapter->registrypriv.dev_network;
 
        padapter->ledpriv.LedControlHandler(padapter, LED_CTL_START_TO_LINK);
-       pcmd = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
        if (pcmd == NULL)
                return _FAIL;
-       _init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        pcmd->cmdcode = _CreateBss_CMD_;
        pcmd->parmbuf = (unsigned char *)pdev_network;
        pcmd->cmdsz = r8712_get_ndis_wlan_bssid_ex_sz((
@@ -486,7 +483,7 @@ u8 r8712_joinbss_cmd(struct _adapter  *padapter, struct wlan_network *pnetwork)
                                                network.InfrastructureMode;
 
        padapter->ledpriv.LedControlHandler(padapter, LED_CTL_START_TO_LINK);
-       pcmd = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
        if (pcmd == NULL)
                return _FAIL;
        t_len = sizeof(u32) + 6 * sizeof(unsigned char) + 2 +
@@ -609,7 +606,7 @@ u8 r8712_joinbss_cmd(struct _adapter  *padapter, struct wlan_network *pnetwork)
                                psecnetwork->InfrastructureMode);
        psecnetwork->IELength = cpu_to_le32(psecnetwork->IELength);
 #endif
-       _init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        pcmd->cmdcode = _JoinBss_CMD_;
        pcmd->parmbuf = (unsigned char *)psecnetwork;
        pcmd->rsp = NULL;
@@ -624,10 +621,10 @@ u8 r8712_disassoc_cmd(struct _adapter *padapter) /* for sta_mode */
        struct disconnect_parm *pdisconnect;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pdisconnect_cmd = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       pdisconnect_cmd = kmalloc(sizeof(*pdisconnect_cmd), GFP_ATOMIC);
        if (pdisconnect_cmd == NULL)
                return _FAIL;
-       pdisconnect = kmalloc(sizeof(struct disconnect_parm), GFP_ATOMIC);
+       pdisconnect = kmalloc(sizeof(*pdisconnect), GFP_ATOMIC);
        if (pdisconnect == NULL) {
                kfree((u8 *)pdisconnect_cmd);
                return _FAIL;
@@ -646,10 +643,10 @@ u8 r8712_setopmode_cmd(struct _adapter *padapter,
 
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetop = kmalloc(sizeof(struct setopmode_parm), GFP_ATOMIC);
+       psetop = kmalloc(sizeof(*psetop), GFP_ATOMIC);
        if (psetop == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -670,15 +667,15 @@ u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key)
        struct security_priv *psecuritypriv = &padapter->securitypriv;
        struct sta_info *sta = (struct sta_info *)psta;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetstakey_para = kmalloc(sizeof(struct set_stakey_parm), GFP_ATOMIC);
+       psetstakey_para = kmalloc(sizeof(*psetstakey_para), GFP_ATOMIC);
        if (psetstakey_para == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
        }
-       psetstakey_rsp = kmalloc(sizeof(struct set_stakey_rsp), GFP_ATOMIC);
+       psetstakey_rsp = kmalloc(sizeof(*psetstakey_rsp), GFP_ATOMIC);
        if (psetstakey_rsp == NULL) {
                kfree((u8 *) ph2c);
                kfree((u8 *) psetstakey_para);
@@ -710,10 +707,10 @@ u8 r8712_setrfintfs_cmd(struct _adapter *padapter, u8 mode)
        struct setrfintfs_parm *psetrfintfsparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetrfintfsparm = kmalloc(sizeof(struct setrfintfs_parm), GFP_ATOMIC);
+       psetrfintfsparm = kmalloc(sizeof(*psetrfintfsparm), GFP_ATOMIC);
        if (psetrfintfsparm == NULL) {
                kfree((unsigned char *) ph2c);
                return _FAIL;
@@ -732,10 +729,10 @@ u8 r8712_setrttbl_cmd(struct _adapter *padapter,
        struct setratable_parm *psetrttblparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetrttblparm = kmalloc(sizeof(struct setratable_parm), GFP_ATOMIC);
+       psetrttblparm = kmalloc(sizeof(*psetrttblparm), GFP_ATOMIC);
        if (psetrttblparm == NULL) {
                kfree((unsigned char *)ph2c);
                return _FAIL;
@@ -753,15 +750,15 @@ u8 r8712_gettssi_cmd(struct _adapter *padapter, u8 offset, u8 *pval)
        struct cmd_obj *ph2c;
        struct readTSSI_parm *prdtssiparm;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       prdtssiparm = kmalloc(sizeof(struct readTSSI_parm), GFP_ATOMIC);
+       prdtssiparm = kmalloc(sizeof(*prdtssiparm), GFP_ATOMIC);
        if (prdtssiparm == NULL) {
                kfree((unsigned char *) ph2c);
                return _FAIL;
        }
-       _init_listhead(&ph2c->list);
+       INIT_LIST_HEAD(&ph2c->list);
        ph2c->cmdcode = GEN_CMD_CODE(_ReadTSSI);
        ph2c->parmbuf = (unsigned char *)prdtssiparm;
        ph2c->cmdsz = sizeof(struct readTSSI_parm);
@@ -779,11 +776,10 @@ u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr)
        struct cmd_obj *ph2c;
        struct SetMacAddr_param *psetMacAddr_para;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetMacAddr_para = kmalloc(sizeof(struct SetMacAddr_param),
-                                  GFP_ATOMIC);
+       psetMacAddr_para = kmalloc(sizeof(*psetMacAddr_para), GFP_ATOMIC);
        if (psetMacAddr_para == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
@@ -802,17 +798,15 @@ u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr)
        struct set_assocsta_parm        *psetassocsta_para;
        struct set_assocsta_rsp         *psetassocsta_rsp = NULL;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       psetassocsta_para = kmalloc(sizeof(struct set_assocsta_parm),
-                                   GFP_ATOMIC);
+       psetassocsta_para = kmalloc(sizeof(*psetassocsta_para), GFP_ATOMIC);
        if (psetassocsta_para == NULL) {
                kfree((u8 *) ph2c);
                return _FAIL;
        }
-       psetassocsta_rsp = kmalloc(sizeof(struct set_assocsta_rsp),
-                                  GFP_ATOMIC);
+       psetassocsta_rsp = kmalloc(sizeof(*psetassocsta_rsp), GFP_ATOMIC);
        if (psetassocsta_rsp == NULL) {
                kfree((u8 *)ph2c);
                kfree((u8 *)psetassocsta_para);
@@ -832,10 +826,10 @@ u8 r8712_addbareq_cmd(struct _adapter *padapter, u8 tid)
        struct cmd_obj          *ph2c;
        struct addBaReq_parm    *paddbareq_parm;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       paddbareq_parm = kmalloc(sizeof(struct addBaReq_parm), GFP_ATOMIC);
+       paddbareq_parm = kmalloc(sizeof(*paddbareq_parm), GFP_ATOMIC);
        if (paddbareq_parm == NULL) {
                kfree((unsigned char *)ph2c);
                return _FAIL;
@@ -853,10 +847,10 @@ u8 r8712_wdg_wk_cmd(struct _adapter *padapter)
        struct drvint_cmd_parm  *pdrvintcmd_param;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       pdrvintcmd_param = kmalloc(sizeof(struct drvint_cmd_parm), GFP_ATOMIC);
+       pdrvintcmd_param = kmalloc(sizeof(*pdrvintcmd_param), GFP_ATOMIC);
        if (pdrvintcmd_param == NULL) {
                kfree((unsigned char *)ph2c);
                return _FAIL;
@@ -962,7 +956,7 @@ void r8712_createbss_cmd_callback(struct _adapter *padapter,
                                goto createbss_cmd_fail;
                        pwlan->last_scanned = jiffies;
                } else
-                       list_insert_tail(&(pwlan->list),
+                       list_add_tail(&(pwlan->list),
                                         &pmlmepriv->scanned_queue.queue);
                pnetwork->Length = r8712_get_ndis_wlan_bssid_ex_sz(pnetwork);
                memcpy(&(pwlan->network), pnetwork, pnetwork->Length);
@@ -1027,10 +1021,10 @@ u8 r8712_disconnectCtrlEx_cmd(struct _adapter *adapter, u32 enableDrvCtrl,
        struct DisconnectCtrlEx_param *param;
        struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
 
-       ph2c = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kmalloc(sizeof(*ph2c), GFP_ATOMIC);
        if (ph2c == NULL)
                return _FAIL;
-       param = kzalloc(sizeof(struct DisconnectCtrlEx_param), GFP_ATOMIC);
+       param = kzalloc(sizeof(*param), GFP_ATOMIC);
        if (param == NULL) {
                kfree((unsigned char *) ph2c);
                return _FAIL;
index 0ce79b1c4ee278c52bd52c34382c5eb47c285839..cb8225b94cf10bdeaf71ae3468dd38a79ed934bf 100644 (file)
@@ -83,7 +83,7 @@ struct        evt_priv {
 
 #define init_h2fwcmd_w_parm_no_rsp(pcmd, pparm, code) \
 do {\
-       _init_listhead(&pcmd->list);\
+       INIT_LIST_HEAD(&pcmd->list);\
        pcmd->cmdcode = code;\
        pcmd->parmbuf = (u8 *)(pparm);\
        pcmd->cmdsz = sizeof(*pparm);\
index 37a841a1488928623e8b09f69daf4892edc888b4..8858687e87febfb5855837d917701c6824d22fad 100644 (file)
@@ -112,12 +112,12 @@ uint r8712_alloc_io_queue(struct _adapter *adapter)
        struct io_queue *pio_queue;
        struct io_req *pio_req;
 
-       pio_queue = kmalloc(sizeof(struct io_queue), GFP_ATOMIC);
+       pio_queue = kmalloc(sizeof(*pio_queue), GFP_ATOMIC);
        if (pio_queue == NULL)
                goto alloc_io_queue_fail;
-       _init_listhead(&pio_queue->free_ioreqs);
-       _init_listhead(&pio_queue->processing);
-       _init_listhead(&pio_queue->pending);
+       INIT_LIST_HEAD(&pio_queue->free_ioreqs);
+       INIT_LIST_HEAD(&pio_queue->processing);
+       INIT_LIST_HEAD(&pio_queue->pending);
        spin_lock_init(&pio_queue->lock);
        pio_queue->pallocated_free_ioreqs_buf = kmalloc(NUM_IOREQ *
                                                        (sizeof(struct io_req)) + 4,
@@ -131,8 +131,8 @@ uint r8712_alloc_io_queue(struct _adapter *adapter)
                        & 3);
        pio_req = (struct io_req *)(pio_queue->free_ioreqs_buf);
        for (i = 0; i < NUM_IOREQ; i++) {
-               _init_listhead(&pio_req->list);
-               list_insert_tail(&pio_req->list, &pio_queue->free_ioreqs);
+               INIT_LIST_HEAD(&pio_req->list);
+               list_add_tail(&pio_req->list, &pio_queue->free_ioreqs);
                pio_req++;
        }
        if ((register_intf_hdl((u8 *)adapter, &(pio_queue->intf))) == _FAIL)
index e147c4bfe124fbb337bc41799b0f097e12b03d1f..e1e95cf4830261f5aede0638637b53e2ddbf379d 100644 (file)
@@ -1078,14 +1078,14 @@ static int r8711_wx_set_wap(struct net_device *dev,
                return -EINVAL;
        authmode = padapter->securitypriv.ndisauthtype;
        spin_lock_irqsave(&queue->lock, irqL);
-       phead = get_list_head(queue);
-       pmlmepriv->pscanned = get_next(phead);
+       phead = &queue->queue;
+       pmlmepriv->pscanned = phead->next;
        while (1) {
                if (end_of_queue_search(phead, pmlmepriv->pscanned) == true)
                        break;
                pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned,
                           struct wlan_network, list);
-               pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
+               pmlmepriv->pscanned = pmlmepriv->pscanned->next;
                dst_bssid = pnetwork->network.MacAddress;
                if (!memcmp(dst_bssid, temp->sa_data, ETH_ALEN)) {
                        r8712_set_802_11_infrastructure_mode(padapter,
@@ -1227,8 +1227,8 @@ static int r8711_wx_get_scan(struct net_device *dev,
                        break;
        }
        spin_lock_irqsave(&queue->lock, irqL);
-       phead = get_list_head(queue);
-       plist = get_next(phead);
+       phead = &queue->queue;
+       plist = phead->next;
        while (1) {
                if (end_of_queue_search(phead, plist) == true)
                        break;
@@ -1238,7 +1238,7 @@ static int r8711_wx_get_scan(struct net_device *dev,
                }
                pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
                ev = translate_scan(padapter, a, pnetwork, ev, stop);
-               plist = get_next(plist);
+               plist = plist->next;
        }
        spin_unlock_irqrestore(&queue->lock, irqL);
        wrqu->data.length = ev - extra;
@@ -1286,14 +1286,14 @@ static int r8711_wx_set_essid(struct net_device *dev,
                ndis_ssid.SsidLength = len;
                memcpy(ndis_ssid.Ssid, extra, len);
                src_ssid = ndis_ssid.Ssid;
-               phead = get_list_head(queue);
-               pmlmepriv->pscanned = get_next(phead);
+               phead = &queue->queue;
+               pmlmepriv->pscanned = phead->next;
                while (1) {
                        if (end_of_queue_search(phead, pmlmepriv->pscanned))
                                break;
                        pnetwork = LIST_CONTAINOR(pmlmepriv->pscanned,
                                   struct wlan_network, list);
-                       pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
+                       pmlmepriv->pscanned = pmlmepriv->pscanned->next;
                        dst_ssid = pnetwork->network.Ssid.Ssid;
                        if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.SsidLength))
                            && (pnetwork->network.Ssid.SsidLength ==
@@ -1459,17 +1459,12 @@ static int r8711_wx_get_rate(struct net_device *dev,
                                RTL8712_RF_2T2R == rf_type)
                                max_rate = (bw_40MHz) ? ((short_GI) ? 300 :
                                            270) : ((short_GI) ? 144 : 130);
-                       else if (mcs_rate & 0x0080) /* MCS7 */
-                               max_rate = (bw_40MHz) ? ((short_GI) ? 150 :
-                                           135) : ((short_GI) ? 72 : 65);
                        else /* default MCS7 */
                                max_rate = (bw_40MHz) ? ((short_GI) ? 150 :
                                            135) : ((short_GI) ? 72 : 65);
                        max_rate *= 2; /* Mbps/2 */
-                       wrqu->bitrate.value = max_rate * 500000;
-               } else {
-                       wrqu->bitrate.value = max_rate * 500000;
                }
+               wrqu->bitrate.value = max_rate * 500000;
        } else
                return -ENOLINK;
        return 0;
@@ -2007,8 +2002,8 @@ static int r871x_get_ap_info(struct net_device *dev,
        } else
                 return -EINVAL;
        spin_lock_irqsave(&(pmlmepriv->scanned_queue.lock), irqL);
-       phead = get_list_head(queue);
-       plist = get_next(phead);
+       phead = &queue->queue;
+       plist = phead->next;
        while (1) {
                if (end_of_queue_search(phead, plist) == true)
                        break;
@@ -2036,7 +2031,7 @@ static int r871x_get_ap_info(struct net_device *dev,
                                break;
                        }
                }
-               plist = get_next(plist);
+               plist = plist->next;
        }
        spin_unlock_irqrestore(&(pmlmepriv->scanned_queue.lock), irqL);
        if (pdata->length >= 34) {
index 53a7c8c1bb40184d12e539a78cd9503b2f1a1af2..9d47eb472837116d2805626d349fdcfc562bbb36 100644 (file)
@@ -62,8 +62,8 @@ static u8 do_join(struct _adapter *padapter)
        struct  mlme_priv       *pmlmepriv = &(padapter->mlmepriv);
        struct  __queue *queue  = &(pmlmepriv->scanned_queue);
 
-       phead = get_list_head(queue);
-       plist = get_next(phead);
+       phead = &queue->queue;
+       plist = phead->next;
        pmlmepriv->cur_network.join_res = -2;
        pmlmepriv->fw_state |= _FW_UNDER_LINKING;
        pmlmepriv->pscanned = plist;
@@ -71,7 +71,7 @@ static u8 do_join(struct _adapter *padapter)
 
        /* adhoc mode will start with an empty queue, but skip checking */
        if (!check_fwstate(pmlmepriv, WIFI_ADHOC_STATE) &&
-           _queue_empty(queue)) {
+           list_empty(&queue->queue)) {
                if (pmlmepriv->fw_state & _FW_UNDER_LINKING)
                        pmlmepriv->fw_state ^= _FW_UNDER_LINKING;
                /* when set_ssid/set_bssid for do_join(), but scanning queue
index 02339e100014490c04af653c2e7a5364f9d4e3c4..7b7fdec58b38a3c892f7da2119cc674d76490cf1 100644 (file)
@@ -69,8 +69,8 @@ static sint _init_mlme_priv(struct _adapter *padapter)
        pmlmepriv->free_bss_buf = pbuf;
        pnetwork = (struct wlan_network *)pbuf;
        for (i = 0; i < MAX_BSS_CNT; i++) {
-               _init_listhead(&(pnetwork->list));
-               list_insert_tail(&(pnetwork->list),
+               INIT_LIST_HEAD(&(pnetwork->list));
+               list_add_tail(&(pnetwork->list),
                                 &(pmlmepriv->free_bss_pool.queue));
                pnetwork++;
        }
@@ -89,12 +89,12 @@ struct wlan_network *_r8712_alloc_network(struct mlme_priv *pmlmepriv)
        struct  __queue *free_queue = &pmlmepriv->free_bss_pool;
        struct list_head *plist = NULL;
 
-       if (_queue_empty(free_queue) == true)
+       if (list_empty(&free_queue->queue))
                return NULL;
        spin_lock_irqsave(&free_queue->lock, irqL);
-       plist = get_next(&(free_queue->queue));
+       plist = free_queue->queue.next;
        pnetwork = LIST_CONTAINOR(plist , struct wlan_network, list);
-       list_delete(&pnetwork->list);
+       list_del_init(&pnetwork->list);
        pnetwork->last_scanned = jiffies;
        pmlmepriv->num_of_scanned++;
        spin_unlock_irqrestore(&free_queue->lock, irqL);
@@ -117,8 +117,8 @@ static void _free_network(struct mlme_priv *pmlmepriv,
        if (delta_time < SCANQUEUE_LIFETIME)
                return;
        spin_lock_irqsave(&free_queue->lock, irqL);
-       list_delete(&pnetwork->list);
-       list_insert_tail(&pnetwork->list, &free_queue->queue);
+       list_del_init(&pnetwork->list);
+       list_add_tail(&pnetwork->list, &free_queue->queue);
        pmlmepriv->num_of_scanned--;
        spin_unlock_irqrestore(&free_queue->lock, irqL);
 }
@@ -132,8 +132,8 @@ static void _free_network_nolock(struct mlme_priv *pmlmepriv,
                return;
        if (pnetwork->fixed == true)
                return;
-       list_delete(&pnetwork->list);
-       list_insert_tail(&pnetwork->list, get_list_head(free_queue));
+       list_del_init(&pnetwork->list);
+       list_add_tail(&pnetwork->list, &free_queue->queue);
        pmlmepriv->num_of_scanned--;
 }
 
@@ -153,11 +153,11 @@ static struct wlan_network *_r8712_find_network(struct  __queue *scanned_queue,
        if (is_zero_ether_addr(addr))
                return NULL;
        spin_lock_irqsave(&scanned_queue->lock, irqL);
-       phead = get_list_head(scanned_queue);
-       plist = get_next(phead);
+       phead = &scanned_queue->queue;
+       plist = phead->next;
        while (plist != phead) {
                pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
-               plist = get_next(plist);
+               plist = plist->next;
                if (!memcmp(addr, pnetwork->network.MacAddress, ETH_ALEN))
                        break;
        }
@@ -174,11 +174,11 @@ static void _free_network_queue(struct _adapter *padapter)
        struct  __queue *scanned_queue = &pmlmepriv->scanned_queue;
 
        spin_lock_irqsave(&scanned_queue->lock, irqL);
-       phead = get_list_head(scanned_queue);
-       plist = get_next(phead);
+       phead = &scanned_queue->queue;
+       plist = phead->next;
        while (end_of_queue_search(phead, plist) == false) {
                pnetwork = LIST_CONTAINOR(plist, struct wlan_network, list);
-               plist = get_next(plist);
+               plist = plist->next;
                _free_network(pmlmepriv, pnetwork);
        }
        spin_unlock_irqrestore(&scanned_queue->lock, irqL);
@@ -315,8 +315,8 @@ struct      wlan_network *r8712_get_oldest_wlan_network(
        struct  wlan_network    *pwlan = NULL;
        struct  wlan_network    *oldest = NULL;
 
-       phead = get_list_head(scanned_queue);
-       plist = get_next(phead);
+       phead = &scanned_queue->queue;
+       plist = phead->next;
        while (1) {
                if (end_of_queue_search(phead, plist) ==  true)
                        break;
@@ -327,7 +327,7 @@ struct      wlan_network *r8712_get_oldest_wlan_network(
                            (unsigned long)pwlan->last_scanned))
                                oldest = pwlan;
                }
-               plist = get_next(plist);
+               plist = plist->next;
        }
        return oldest;
 }
@@ -398,8 +398,8 @@ static void update_scanned_network(struct _adapter *adapter,
        struct wlan_network *pnetwork = NULL;
        struct wlan_network *oldest = NULL;
 
-       phead = get_list_head(queue);
-       plist = get_next(phead);
+       phead = &queue->queue;
+       plist = phead->next;
 
        while (1) {
                if (end_of_queue_search(phead, plist) == true)
@@ -413,14 +413,14 @@ static void update_scanned_network(struct _adapter *adapter,
                                (unsigned long)pnetwork->last_scanned))
                        oldest = pnetwork;
 
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
 
        /* If we didn't find a match, then get a new network slot to initialize
         * with this beacon's information */
        if (end_of_queue_search(phead, plist) == true) {
-               if (_queue_empty(&pmlmepriv->free_bss_pool) == true) {
+               if (list_empty(&pmlmepriv->free_bss_pool.queue)) {
                        /* If there are no more slots, expire the oldest */
                        pnetwork = oldest;
                        target->Rssi = (pnetwork->network.Rssi +
@@ -437,7 +437,7 @@ static void update_scanned_network(struct _adapter *adapter,
                        bssid_ex_sz = r8712_get_ndis_wlan_bssid_ex_sz(target);
                        target->Length = bssid_ex_sz;
                        memcpy(&pnetwork->network, target, bssid_ex_sz);
-                       list_insert_tail(&pnetwork->list, &queue->queue);
+                       list_add_tail(&pnetwork->list, &queue->queue);
                }
        } else {
                /* we have an entry and we are going to update it. But
@@ -1138,8 +1138,8 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
 
        adapter = (struct _adapter *)pmlmepriv->nic_hdl;
        queue = &pmlmepriv->scanned_queue;
-       phead = get_list_head(queue);
-       pmlmepriv->pscanned = get_next(phead);
+       phead = &queue->queue;
+       pmlmepriv->pscanned = phead->next;
        while (1) {
                if (end_of_queue_search(phead, pmlmepriv->pscanned) == true) {
                        if ((pmlmepriv->assoc_by_rssi == true) &&
@@ -1153,7 +1153,7 @@ int r8712_select_and_join_from_scan(struct mlme_priv *pmlmepriv)
                                          struct wlan_network, list);
                if (pnetwork == NULL)
                        return _FAIL;
-               pmlmepriv->pscanned = get_next(pmlmepriv->pscanned);
+               pmlmepriv->pscanned = pmlmepriv->pscanned->next;
                if (pmlmepriv->assoc_by_bssid == true) {
                        dst_ssid = pnetwork->network.MacAddress;
                        src_ssid = pmlmepriv->assoc_bssid;
@@ -1212,11 +1212,11 @@ sint r8712_set_auth(struct _adapter *adapter,
        struct cmd_obj *pcmd;
        struct setauth_parm *psetauthparm;
 
-       pcmd = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
        if (pcmd == NULL)
                return _FAIL;
 
-       psetauthparm = kzalloc(sizeof(struct setauth_parm), GFP_ATOMIC);
+       psetauthparm = kzalloc(sizeof(*psetauthparm), GFP_ATOMIC);
        if (psetauthparm == NULL) {
                kfree((unsigned char *)pcmd);
                return _FAIL;
@@ -1227,7 +1227,7 @@ sint r8712_set_auth(struct _adapter *adapter,
        pcmd->cmdsz = sizeof(struct setauth_parm);
        pcmd->rsp = NULL;
        pcmd->rspsz = 0;
-       _init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        r8712_enqueue_cmd(pcmdpriv, pcmd);
        return _SUCCESS;
 }
@@ -1242,10 +1242,10 @@ sint r8712_set_key(struct _adapter *adapter,
        u8 keylen;
        sint ret = _SUCCESS;
 
-       pcmd = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
        if (pcmd == NULL)
                return _FAIL;
-       psetkeyparm = kzalloc(sizeof(struct setkey_parm), GFP_ATOMIC);
+       psetkeyparm = kzalloc(sizeof(*psetkeyparm), GFP_ATOMIC);
        if (psetkeyparm == NULL) {
                ret = _FAIL;
                goto err_free_cmd;
@@ -1299,7 +1299,7 @@ sint r8712_set_key(struct _adapter *adapter,
        pcmd->cmdsz =  (sizeof(struct setkey_parm));
        pcmd->rsp = NULL;
        pcmd->rspsz = 0;
-       _init_listhead(&pcmd->list);
+       INIT_LIST_HEAD(&pcmd->list);
        r8712_enqueue_cmd(pcmdpriv, pcmd);
        return ret;
 
index 389062fe8eaf8b45025c18abb7b969129ff06bef..aae77f0ea98f39cf07d3489aa76a76eb3f564416 100644 (file)
@@ -65,8 +65,8 @@ static int init_mp_priv(struct mp_priv *pmp_priv)
                         ((addr_t)(pmp_priv->pallocated_mp_xmitframe_buf) & 3);
        pmp_xmitframe = (struct mp_xmit_frame *)pmp_priv->pmp_xmtframe_buf;
        for (i = 0; i < NR_MP_XMITFRAME; i++) {
-               _init_listhead(&(pmp_xmitframe->list));
-               list_insert_tail(&(pmp_xmitframe->list),
+               INIT_LIST_HEAD(&(pmp_xmitframe->list));
+               list_add_tail(&(pmp_xmitframe->list),
                                 &(pmp_priv->free_mp_xmitqueue.queue));
                pmp_xmitframe->pkt = NULL;
                pmp_xmitframe->frame_tag = MP_FRAMETAG;
@@ -281,10 +281,10 @@ void r8712_SetChannel(struct _adapter *pAdapter)
        struct SetChannel_parm *pparm = NULL;
        u16 code = GEN_CMD_CODE(_SetChannel);
 
-       pcmd = kmalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
        if (pcmd == NULL)
                return;
-       pparm = kmalloc(sizeof(struct SetChannel_parm), GFP_ATOMIC);
+       pparm = kmalloc(sizeof(*pparm), GFP_ATOMIC);
        if (pparm == NULL) {
                kfree(pcmd);
                return;
index eb775872c93cf3723ba2a86b3bdabd73661f9787..a3889d18d089a3528a7bb6ab253136284dd36cc0 100644 (file)
@@ -86,8 +86,8 @@ sint _r8712_init_recv_priv(struct recv_priv *precvpriv,
                                    (RXFRAME_ALIGN_SZ-1));
        precvframe = (union recv_frame *)precvpriv->precv_frame_buf;
        for (i = 0; i < NR_RECVFRAME; i++) {
-               _init_listhead(&(precvframe->u.list));
-               list_insert_tail(&(precvframe->u.list),
+               INIT_LIST_HEAD(&(precvframe->u.list));
+               list_add_tail(&(precvframe->u.list),
                                 &(precvpriv->free_recv_queue.queue));
                r8712_os_recv_resource_alloc(padapter, precvframe);
                precvframe->u.hdr.adapter = padapter;
@@ -112,13 +112,13 @@ union recv_frame *r8712_alloc_recvframe(struct  __queue *pfree_recv_queue)
        struct recv_priv *precvpriv;
 
        spin_lock_irqsave(&pfree_recv_queue->lock, irqL);
-       if (_queue_empty(pfree_recv_queue) == true)
+       if (list_empty(&pfree_recv_queue->queue))
                precvframe = NULL;
        else {
-               phead = get_list_head(pfree_recv_queue);
-               plist = get_next(phead);
+               phead = &pfree_recv_queue->queue;
+               plist = phead->next;
                precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
-               list_delete(&precvframe->u.hdr.list);
+               list_del_init(&precvframe->u.hdr.list);
                padapter = precvframe->u.hdr.adapter;
                if (padapter != NULL) {
                        precvpriv = &padapter->recvpriv;
@@ -145,11 +145,11 @@ void r8712_free_recvframe_queue(struct  __queue *pframequeue,
        struct list_head *plist, *phead;
 
        spin_lock(&pframequeue->lock);
-       phead = get_list_head(pframequeue);
-       plist = get_next(phead);
+       phead = &pframequeue->queue;
+       plist = phead->next;
        while (end_of_queue_search(phead, plist) == false) {
                precvframe = LIST_CONTAINOR(plist, union recv_frame, u);
-               plist = get_next(plist);
+               plist = plist->next;
                r8712_free_recvframe(precvframe, pfree_recv_queue);
        }
        spin_unlock(&pframequeue->lock);
index 6c649842abd74eaa7f932854ec45154e0f0768d0..e769bb5c5fb87cf751b0508cb9d06e8b059b10f5 100644 (file)
@@ -38,12 +38,12 @@ static void _init_stainfo(struct sta_info *psta)
 {
        memset((u8 *)psta, 0, sizeof(struct sta_info));
         spin_lock_init(&psta->lock);
-       _init_listhead(&psta->list);
-       _init_listhead(&psta->hash_list);
+       INIT_LIST_HEAD(&psta->list);
+       INIT_LIST_HEAD(&psta->hash_list);
        _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv);
        _r8712_init_sta_recv_priv(&psta->sta_recvpriv);
-       _init_listhead(&psta->asoc_list);
-       _init_listhead(&psta->auth_list);
+       INIT_LIST_HEAD(&psta->asoc_list);
+       INIT_LIST_HEAD(&psta->auth_list);
 }
 
 u32 _r8712_init_sta_priv(struct        sta_priv *pstapriv)
@@ -65,13 +65,12 @@ u32 _r8712_init_sta_priv(struct     sta_priv *pstapriv)
        psta = (struct sta_info *)(pstapriv->pstainfo_buf);
        for (i = 0; i < NUM_STA; i++) {
                _init_stainfo(psta);
-               _init_listhead(&(pstapriv->sta_hash[i]));
-               list_insert_tail(&psta->list,
-                                get_list_head(&pstapriv->free_sta_queue));
+               INIT_LIST_HEAD(&(pstapriv->sta_hash[i]));
+               list_add_tail(&psta->list, &pstapriv->free_sta_queue.queue);
                psta++;
        }
-       _init_listhead(&pstapriv->asoc_list);
-       _init_listhead(&pstapriv->auth_list);
+       INIT_LIST_HEAD(&pstapriv->asoc_list);
+       INIT_LIST_HEAD(&pstapriv->auth_list);
        return _SUCCESS;
 }
 
@@ -83,11 +82,11 @@ static void mfree_all_stainfo(struct sta_priv *pstapriv)
        struct sta_info *psta = NULL;
 
        spin_lock_irqsave(&pstapriv->sta_hash_lock, irqL);
-       phead = get_list_head(&pstapriv->free_sta_queue);
-       plist = get_next(phead);
+       phead = &pstapriv->free_sta_queue.queue;
+       plist = phead->next;
        while ((end_of_queue_search(phead, plist)) == false) {
                psta = LIST_CONTAINOR(plist, struct sta_info, list);
-               plist = get_next(plist);
+               plist = plist->next;
        }
 
        spin_unlock_irqrestore(&pstapriv->sta_hash_lock, irqL);
@@ -122,12 +121,12 @@ struct sta_info *r8712_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
 
        pfree_sta_queue = &pstapriv->free_sta_queue;
        spin_lock_irqsave(&(pfree_sta_queue->lock), flags);
-       if (_queue_empty(pfree_sta_queue) == true)
+       if (list_empty(&pfree_sta_queue->queue))
                psta = NULL;
        else {
-               psta = LIST_CONTAINOR(get_next(&pfree_sta_queue->queue),
+               psta = LIST_CONTAINOR(pfree_sta_queue->queue.next,
                                      struct sta_info, list);
-               list_delete(&(psta->list));
+               list_del_init(&(psta->list));
                tmp_aid = psta->aid;
                _init_stainfo(psta);
                memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
@@ -137,7 +136,7 @@ struct sta_info *r8712_alloc_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
                        goto exit;
                }
                phash_list = &(pstapriv->sta_hash[index]);
-               list_insert_tail(&psta->hash_list, phash_list);
+               list_add_tail(&psta->hash_list, phash_list);
                pstapriv->asoc_sta_count++;
 
 /* For the SMC router, the sequence number of first packet of WPS handshake
@@ -181,21 +180,21 @@ void r8712_free_stainfo(struct _adapter *padapter, struct sta_info *psta)
        pstaxmitpriv = &psta->sta_xmitpriv;
        spin_lock_irqsave(&(pxmitpriv->vo_pending.lock), irqL0);
        r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vo_q.sta_pending);
-       list_delete(&(pstaxmitpriv->vo_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->vo_q.tx_pending));
        spin_unlock_irqrestore(&(pxmitpriv->vo_pending.lock), irqL0);
        spin_lock_irqsave(&(pxmitpriv->vi_pending.lock), irqL0);
        r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->vi_q.sta_pending);
-       list_delete(&(pstaxmitpriv->vi_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->vi_q.tx_pending));
        spin_unlock_irqrestore(&(pxmitpriv->vi_pending.lock), irqL0);
        spin_lock_irqsave(&(pxmitpriv->bk_pending.lock), irqL0);
        r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->bk_q.sta_pending);
-       list_delete(&(pstaxmitpriv->bk_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->bk_q.tx_pending));
        spin_unlock_irqrestore(&(pxmitpriv->bk_pending.lock), irqL0);
        spin_lock_irqsave(&(pxmitpriv->be_pending.lock), irqL0);
        r8712_free_xmitframe_queue(pxmitpriv, &pstaxmitpriv->be_q.sta_pending);
-       list_delete(&(pstaxmitpriv->be_q.tx_pending));
+       list_del_init(&(pstaxmitpriv->be_q.tx_pending));
        spin_unlock_irqrestore(&(pxmitpriv->be_pending.lock), irqL0);
-       list_delete(&psta->hash_list);
+       list_del_init(&psta->hash_list);
        pstapriv->asoc_sta_count--;
        /* re-init sta_info; 20061114 */
        _r8712_init_sta_xmit_priv(&psta->sta_xmitpriv);
@@ -208,7 +207,7 @@ void r8712_free_stainfo(struct _adapter *padapter, struct sta_info *psta)
        }
        spin_lock(&(pfree_sta_queue->lock));
        /* insert into free_sta_queue; 20061114 */
-       list_insert_tail(&psta->list, get_list_head(pfree_sta_queue));
+       list_add_tail(&psta->list, &pfree_sta_queue->queue);
        spin_unlock(&(pfree_sta_queue->lock));
 }
 
@@ -227,11 +226,11 @@ void r8712_free_all_stainfo(struct _adapter *padapter)
        spin_lock_irqsave(&pstapriv->sta_hash_lock, irqL);
        for (index = 0; index < NUM_STA; index++) {
                phead = &(pstapriv->sta_hash[index]);
-               plist = get_next(phead);
+               plist = phead->next;
                while ((end_of_queue_search(phead, plist)) == false) {
                        psta = LIST_CONTAINOR(plist,
                                              struct sta_info, hash_list);
-                       plist = get_next(plist);
+                       plist = plist->next;
                        if (pbcmc_stainfo != psta)
                                r8712_free_stainfo(padapter , psta);
                }
@@ -252,7 +251,7 @@ struct sta_info *r8712_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
        index = wifi_mac_hash(hwaddr);
        spin_lock_irqsave(&pstapriv->sta_hash_lock, irqL);
        phead = &(pstapriv->sta_hash[index]);
-       plist = get_next(phead);
+       plist = phead->next;
        while ((end_of_queue_search(phead, plist)) == false) {
                psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
                if ((!memcmp(psta->hwaddr, hwaddr, ETH_ALEN))) {
@@ -260,7 +259,7 @@ struct sta_info *r8712_get_stainfo(struct sta_priv *pstapriv, u8 *hwaddr)
                        break;
                }
                psta = NULL;
-               plist = get_next(plist);
+               plist = plist->next;
        }
        spin_unlock_irqrestore(&pstapriv->sta_hash_lock, irqL);
        return psta;
index 230681a8042f1fae3281b618881e805ce59d9819..a104b772281543ac3d991152c1d4e09a51e8809b 100644 (file)
@@ -43,7 +43,7 @@ static void free_hwxmits(struct _adapter *padapter);
 
 static void _init_txservq(struct tx_servq *ptxservq)
 {
-       _init_listhead(&ptxservq->tx_pending);
+       INIT_LIST_HEAD(&ptxservq->tx_pending);
        _init_queue(&ptxservq->sta_pending);
        ptxservq->qcnt = 0;
 }
@@ -57,8 +57,8 @@ void _r8712_init_sta_xmit_priv(struct sta_xmit_priv *psta_xmitpriv)
        _init_txservq(&psta_xmitpriv->bk_q);
        _init_txservq(&psta_xmitpriv->vi_q);
        _init_txservq(&psta_xmitpriv->vo_q);
-       _init_listhead(&psta_xmitpriv->legacy_dz);
-       _init_listhead(&psta_xmitpriv->apsd);
+       INIT_LIST_HEAD(&psta_xmitpriv->legacy_dz);
+       INIT_LIST_HEAD(&psta_xmitpriv->apsd);
 }
 
 sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
@@ -97,13 +97,13 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
                        ((addr_t) (pxmitpriv->pallocated_frame_buf) & 3);
        pxframe = (struct xmit_frame *) pxmitpriv->pxmit_frame_buf;
        for (i = 0; i < NR_XMITFRAME; i++) {
-               _init_listhead(&(pxframe->list));
+               INIT_LIST_HEAD(&(pxframe->list));
                pxframe->padapter = padapter;
                pxframe->frame_tag = DATA_FRAMETAG;
                pxframe->pkt = NULL;
                pxframe->buf_addr = NULL;
                pxframe->pxmitbuf = NULL;
-               list_insert_tail(&(pxframe->list),
+               list_add_tail(&(pxframe->list),
                                 &(pxmitpriv->free_xmit_queue.queue));
                pxframe++;
        }
@@ -134,7 +134,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
                              ((addr_t)(pxmitpriv->pallocated_xmitbuf) & 3);
        pxmitbuf = (struct xmit_buf *)pxmitpriv->pxmitbuf;
        for (i = 0; i < NR_XMITBUFF; i++) {
-               _init_listhead(&pxmitbuf->list);
+               INIT_LIST_HEAD(&pxmitbuf->list);
                pxmitbuf->pallocated_buf = kmalloc(MAX_XMITBUF_SZ + XMITBUF_ALIGN_SZ,
                                                   GFP_ATOMIC);
                if (pxmitbuf->pallocated_buf == NULL)
@@ -143,7 +143,7 @@ sint _r8712_init_xmit_priv(struct xmit_priv *pxmitpriv,
                                 ((addr_t) (pxmitbuf->pallocated_buf) &
                                 (XMITBUF_ALIGN_SZ - 1));
                r8712_xmit_resource_alloc(padapter, pxmitbuf);
-               list_insert_tail(&pxmitbuf->list,
+               list_add_tail(&pxmitbuf->list,
                                 &(pxmitpriv->free_xmitbuf_queue.queue));
                pxmitbuf++;
        }
@@ -744,13 +744,13 @@ struct xmit_buf *r8712_alloc_xmitbuf(struct xmit_priv *pxmitpriv)
        struct  __queue *pfree_xmitbuf_queue = &pxmitpriv->free_xmitbuf_queue;
 
        spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irqL);
-       if (_queue_empty(pfree_xmitbuf_queue) == true)
+       if (list_empty(&pfree_xmitbuf_queue->queue))
                pxmitbuf = NULL;
        else {
-               phead = get_list_head(pfree_xmitbuf_queue);
-               plist = get_next(phead);
+               phead = &pfree_xmitbuf_queue->queue;
+               plist = phead->next;
                pxmitbuf = LIST_CONTAINOR(plist, struct xmit_buf, list);
-               list_delete(&(pxmitbuf->list));
+               list_del_init(&(pxmitbuf->list));
        }
        if (pxmitbuf !=  NULL)
                pxmitpriv->free_xmitbuf_cnt--;
@@ -766,8 +766,8 @@ int r8712_free_xmitbuf(struct xmit_priv *pxmitpriv, struct xmit_buf *pxmitbuf)
        if (pxmitbuf == NULL)
                return _FAIL;
        spin_lock_irqsave(&pfree_xmitbuf_queue->lock, irqL);
-       list_delete(&pxmitbuf->list);
-       list_insert_tail(&(pxmitbuf->list), get_list_head(pfree_xmitbuf_queue));
+       list_del_init(&pxmitbuf->list);
+       list_add_tail(&(pxmitbuf->list), &pfree_xmitbuf_queue->queue);
        pxmitpriv->free_xmitbuf_cnt++;
        spin_unlock_irqrestore(&pfree_xmitbuf_queue->lock, irqL);
        return _SUCCESS;
@@ -798,13 +798,13 @@ struct xmit_frame *r8712_alloc_xmitframe(struct xmit_priv *pxmitpriv)
        struct  __queue *pfree_xmit_queue = &pxmitpriv->free_xmit_queue;
 
        spin_lock_irqsave(&pfree_xmit_queue->lock, irqL);
-       if (_queue_empty(pfree_xmit_queue) == true)
+       if (list_empty(&pfree_xmit_queue->queue))
                pxframe =  NULL;
        else {
-               phead = get_list_head(pfree_xmit_queue);
-               plist = get_next(phead);
+               phead = &pfree_xmit_queue->queue;
+               plist = phead->next;
                pxframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
-               list_delete(&(pxframe->list));
+               list_del_init(&(pxframe->list));
        }
        if (pxframe !=  NULL) {
                pxmitpriv->free_xmitframe_cnt--;
@@ -828,12 +828,12 @@ void r8712_free_xmitframe(struct xmit_priv *pxmitpriv,
        if (pxmitframe == NULL)
                return;
        spin_lock_irqsave(&pfree_xmit_queue->lock, irqL);
-       list_delete(&pxmitframe->list);
+       list_del_init(&pxmitframe->list);
        if (pxmitframe->pkt) {
                pndis_pkt = pxmitframe->pkt;
                pxmitframe->pkt = NULL;
        }
-       list_insert_tail(&pxmitframe->list, get_list_head(pfree_xmit_queue));
+       list_add_tail(&pxmitframe->list, &pfree_xmit_queue->queue);
        pxmitpriv->free_xmitframe_cnt++;
        spin_unlock_irqrestore(&pfree_xmit_queue->lock, irqL);
        if (netif_queue_stopped(padapter->pnetdev))
@@ -857,11 +857,11 @@ void r8712_free_xmitframe_queue(struct xmit_priv *pxmitpriv,
        struct  xmit_frame      *pxmitframe;
 
        spin_lock_irqsave(&(pframequeue->lock), irqL);
-       phead = get_list_head(pframequeue);
-       plist = get_next(phead);
+       phead = &pframequeue->queue;
+       plist = phead->next;
        while (end_of_queue_search(phead, plist) == false) {
                pxmitframe = LIST_CONTAINOR(plist, struct xmit_frame, list);
-               plist = get_next(plist);
+               plist = plist->next;
                r8712_free_xmitframe(pxmitpriv, pxmitframe);
        }
        spin_unlock_irqrestore(&(pframequeue->lock), irqL);
@@ -939,11 +939,9 @@ sint r8712_xmit_classifier(struct _adapter *padapter,
        ptxservq = get_sta_pending(padapter, &pstapending,
                   psta, pattrib->priority);
        spin_lock_irqsave(&pstapending->lock, irqL0);
-       if (is_list_empty(&ptxservq->tx_pending))
-               list_insert_tail(&ptxservq->tx_pending,
-                                get_list_head(pstapending));
-       list_insert_tail(&pxmitframe->list,
-                        get_list_head(&ptxservq->sta_pending));
+       if (list_empty(&ptxservq->tx_pending))
+               list_add_tail(&ptxservq->tx_pending, &pstapending->queue);
+       list_add_tail(&pxmitframe->list, &ptxservq->sta_pending.queue);
        ptxservq->qcnt++;
        spin_unlock_irqrestore(&pstapending->lock, irqL0);
        return _SUCCESS;
@@ -1005,7 +1003,7 @@ static void init_hwxmits(struct hw_xmit *phwxmit, sint entry)
 
        for (i = 0; i < entry; i++, phwxmit++) {
                spin_lock_init(&phwxmit->xmit_lock);
-               _init_listhead(&phwxmit->pending);
+               INIT_LIST_HEAD(&phwxmit->pending);
                phwxmit->txcmdcnt = 0;
                phwxmit->accnt = 0;
        }
index ba743542babc72677d29f06b4749d49ced1fcaf4..beff69b3ff0c5b4b8eb574d5697e11ea3b22586f 100644 (file)
@@ -607,31 +607,29 @@ error:
 static void r871xu_dev_remove(struct usb_interface *pusb_intf)
 {
        struct net_device *pnetdev = usb_get_intfdata(pusb_intf);
-       struct _adapter *padapter = netdev_priv(pnetdev);
        struct usb_device *udev = interface_to_usbdev(pusb_intf);
 
-       usb_set_intfdata(pusb_intf, NULL);
-       if (padapter->fw_found)
+       if (pnetdev) {
+               struct _adapter *padapter = netdev_priv(pnetdev);
+
+               usb_set_intfdata(pusb_intf, NULL);
                release_firmware(padapter->fw);
-       /* never exit with a firmware callback pending */
-       wait_for_completion(&padapter->rtl8712_fw_ready);
-       if (drvpriv.drv_registered == true)
-               padapter->bSurpriseRemoved = true;
-       if (pnetdev != NULL) {
-               /* will call netdev_close() */
-               unregister_netdev(pnetdev);
-       }
-       flush_scheduled_work();
-       udelay(1);
-       /*Stop driver mlme relation timer */
-       if (padapter->fw_found)
+               /* never exit with a firmware callback pending */
+               wait_for_completion(&padapter->rtl8712_fw_ready);
+               if (drvpriv.drv_registered == true)
+                       padapter->bSurpriseRemoved = true;
+               unregister_netdev(pnetdev); /* will call netdev_close() */
+               flush_scheduled_work();
+               udelay(1);
+               /* Stop driver mlme relation timer */
                r8712_stop_drv_timers(padapter);
-       r871x_dev_unload(padapter);
-       r8712_free_drv_sw(padapter);
-       usb_set_intfdata(pusb_intf, NULL);
-       /* decrease the reference count of the usb device structure
-        * when disconnect */
-       usb_put_dev(udev);
+               r871x_dev_unload(padapter);
+               r8712_free_drv_sw(padapter);
+
+               /* decrease the reference count of the usb device structure
+                * when disconnect */
+               usb_put_dev(udev);
+       }
        /* If we didn't unplug usb dongle and remove/insert module, driver
         * fails on sitesurvey for the first time when device is up.
         * Reset usb port for sitesurvey fail issue. */
index a6316af94b79af0f82c83fcfb6dc16230f723a94..a9aae21636394c6957259b6b60f88e2fcfc55e74 100644 (file)
@@ -1,7 +1,6 @@
 r8723au-y :=                           \
                core/rtw_cmd.o          \
                core/rtw_efuse.o        \
-               core/rtw_ioctl_set.o    \
                core/rtw_ieee80211.o    \
                core/rtw_led.o          \
                core/rtw_mlme.o         \
@@ -53,4 +52,5 @@ r8723au-$(CONFIG_8723AU_AP_MODE) += core/rtw_ap.o
 
 obj-$(CONFIG_R8723AU)  := r8723au.o
 
-ccflags-y += -Wtype-limits -D__CHECK_ENDIAN__ -I$(src)/include
+ccflags-y += $(call cc-option,-Wtype-limits,)
+ccflags-y += -D__CHECK_ENDIAN__ -I$(src)/include
index c8700b38386d49c713d2a50c8fcac92d28afbed6..ab9a66ecb2178afd40510197434d229ca881e57d 100644 (file)
@@ -24,7 +24,6 @@
 extern unsigned char WMM_OUI23A[];
 extern unsigned char WPS_OUI23A[];
 extern unsigned char P2P_OUI23A[];
-extern unsigned char WFD_OUI23A[];
 
 void init_mlme_ap_info23a(struct rtw_adapter *padapter)
 {
@@ -78,8 +77,8 @@ static void update_BCNTIM(struct rtw_adapter *padapter)
 
        tim_bitmap_le = cpu_to_le16(pstapriv->tim_bitmap);
 
-       p = rtw_get_ie23a(pie + _FIXED_IE_LENGTH_, WLAN_EID_TIM, &tim_ielen,
-                         pnetwork_mlmeext->IELength - _FIXED_IE_LENGTH_);
+       p = rtw_get_ie23a(pie, WLAN_EID_TIM, &tim_ielen,
+                         pnetwork_mlmeext->IELength);
        if (p != NULL && tim_ielen>0) {
                tim_ielen += 2;
 
@@ -95,19 +94,17 @@ static void update_BCNTIM(struct rtw_adapter *padapter)
                tim_ielen = 0;
 
                /* calulate head_len */
-               offset = _FIXED_IE_LENGTH_;
+               offset = 0;
 
                /* get ssid_ie len */
-               p = rtw_get_ie23a(pie + _BEACON_IE_OFFSET_, WLAN_EID_SSID,
-                                 &tmp_len, (pnetwork_mlmeext->IELength -
-                                            _BEACON_IE_OFFSET_));
+               p = rtw_get_ie23a(pie, WLAN_EID_SSID,
+                                 &tmp_len, pnetwork_mlmeext->IELength);
                if (p != NULL)
                        offset += tmp_len+2;
 
                /*  get supported rates len */
-               p = rtw_get_ie23a(pie + _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES,
-                                 &tmp_len, (pnetwork_mlmeext->IELength -
-                                            _BEACON_IE_OFFSET_));
+               p = rtw_get_ie23a(pie, WLAN_EID_SUPP_RATES,
+                                 &tmp_len, pnetwork_mlmeext->IELength);
                if (p !=  NULL)
                        offset += tmp_len+2;
 
@@ -623,15 +620,18 @@ static void update_hw_ht_param(struct rtw_adapter *padapter)
                AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
                AMPDU_para [4:2]:Min MPDU Start Spacing
        */
-       max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
+       max_AMPDU_len = pmlmeinfo->ht_cap.ampdu_params_info &
+               IEEE80211_HT_AMPDU_PARM_FACTOR;
 
-       min_MPDU_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2;
+       min_MPDU_spacing = (pmlmeinfo->ht_cap.ampdu_params_info &
+                           IEEE80211_HT_AMPDU_PARM_DENSITY) >> 2;
 
        rtl8723a_set_ampdu_min_space(padapter, min_MPDU_spacing);
        rtl8723a_set_ampdu_factor(padapter, max_AMPDU_len);
 
        /*  Config SM Power Save setting */
-       pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & 0x0C) >> 2;
+       pmlmeinfo->SM_PS = (le16_to_cpu(pmlmeinfo->ht_cap.cap_info) &
+                           IEEE80211_HT_CAP_SM_PS) >> 2;
        if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
                DBG_8723A("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
 }
@@ -649,10 +649,9 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork_mlmeext = &pmlmeinfo->network;
-       struct HT_info_element *pht_info = NULL;
-       int bcn_fixed_size;
+       struct ieee80211_ht_operation *pht_info = NULL;
 
-       bcn_interval = (u16)pnetwork->BeaconPeriod;
+       bcn_interval = (u16)pnetwork->beacon_interval;
        cur_channel = pnetwork->DSConfig;
        cur_bwmode = HT_CHANNEL_WIDTH_20;;
        cur_ch_offset = HAL_PRIME_CHNL_OFFSET_DONT_CARE;
@@ -660,7 +659,10 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        /* check if there is wps ie, */
        /* if there is wpsie in beacon, the hostapd will update beacon twice when stating hostapd, */
        /* and at first time the security ie (RSN/WPA IE) will not include in beacon. */
-       if (NULL == rtw_get_wps_ie23a(pnetwork->IEs+_FIXED_IE_LENGTH_, pnetwork->IELength-_FIXED_IE_LENGTH_, NULL, NULL))
+       if (NULL == cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                           WLAN_OUI_TYPE_MICROSOFT_WPS,
+                                           pnetwork->IEs,
+                                           pnetwork->IELength))
                pmlmeext->bstart_bss = true;
 
        /* todo: update wmm, ht cap */
@@ -722,25 +724,24 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
                                                 DYNAMIC_ALL_FUNC_ENABLE);
        }
        /* set channel, bwmode */
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
 
-       p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
-                            pnetwork->IEs + bcn_fixed_size,
-                            pnetwork->IELength - bcn_fixed_size);
+       p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pnetwork->IEs,
+                            pnetwork->IELength);
        if (p && p[1]) {
-               pht_info = (struct HT_info_element *)(p + 2);
+               pht_info = (struct ieee80211_ht_operation *)(p + 2);
 
-               if (pregpriv->cbw40_enable && pht_info->infos[0] & BIT(2)) {
+               if (pregpriv->cbw40_enable && pht_info->ht_param &
+                   IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) {
                        /* switch to the 40M Hz mode */
                        cur_bwmode = HT_CHANNEL_WIDTH_40;
-                       switch (pht_info->infos[0] & 0x3) {
-                       case 1:
+                       switch (pht_info->ht_param &
+                               IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+                       case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                                /* pmlmeext->cur_ch_offset =
                                   HAL_PRIME_CHNL_OFFSET_LOWER; */
                                cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
                                break;
-                       case 3:
+                       case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
                                cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
                                break;
                        default:
@@ -764,7 +765,7 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        update_wireless_mode23a(padapter);
 
        /* udpate capability after cur_wireless_mode updated */
-       update_capinfo23a(padapter, rtw_get_capability23a(pnetwork));
+       update_capinfo23a(padapter, pnetwork->capability);
 
        /* let pnetwork_mlmeext == pnetwork_mlme. */
        memcpy(pnetwork_mlmeext, pnetwork, pnetwork->Length);
@@ -781,16 +782,15 @@ static void start_bss_network(struct rtw_adapter *padapter, u8 *pbuf)
        update_bmc_sta(padapter);
 }
 
-int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
-                            unsigned int len)
+int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
+                            struct ieee80211_mgmt *mgmt, unsigned int len)
 {
        int ret = _SUCCESS;
        u8 *p;
        u8 *pHT_caps_ie = NULL;
        u8 *pHT_info_ie = NULL;
        struct sta_info *psta = NULL;
-       __le16 *pbeacon;
-       u16 cap, ht_cap = false;
+       u16 ht_cap = false;
        uint ie_len = 0;
        int group_cipher, pairwise_cipher;
        u8 channel, network_type, supportRate[NDIS_802_11_LENGTH_RATES_EX];
@@ -801,7 +801,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct wlan_bssid_ex *pbss_network = &pmlmepriv->cur_network.network;
        u8 *ie = pbss_network->IEs;
-
+       u8 *pbuf = mgmt->u.beacon.variable;
+       len -= offsetof(struct ieee80211_mgmt, u.beacon.variable);
        /* SSID */
        /* Supported rates */
        /* DS Params */
@@ -835,17 +836,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
 
        memcpy(pbss_network->MacAddress, myid(&padapter->eeprompriv), ETH_ALEN);
 
-       /* beacon interval */
-       /* ie + 8;  8: TimeStamp, 2: Beacon Interval 2:Capability */
-       pbeacon = rtw_get_beacon_interval23a_from_ie(ie);
-       pbss_network->BeaconPeriod = get_unaligned_le16(pbeacon);
-
-       /* capability */
-       cap = get_unaligned_le16(ie);
-
        /* SSID */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_SSID, &ie_len,
-                         (pbss_network->IELength -_BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_SSID, &ie_len, pbss_network->IELength);
        if (p && ie_len > 0) {
                memset(&pbss_network->Ssid, 0, sizeof(struct cfg80211_ssid));
                memcpy(pbss_network->Ssid.ssid, (p + 2), ie_len);
@@ -854,8 +846,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
 
        /* chnnel */
        channel = 0;
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_DS_PARAMS, &ie_len,
-                         (pbss_network->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_DS_PARAMS, &ie_len,
+                         pbss_network->IELength);
        if (p && ie_len > 0)
                channel = *(p + 2);
 
@@ -863,16 +855,16 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
 
        memset(supportRate, 0, NDIS_802_11_LENGTH_RATES_EX);
        /*  get supported rates */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_SUPP_RATES, &ie_len,
-                         (pbss_network->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_SUPP_RATES, &ie_len,
+                         pbss_network->IELength);
        if (p) {
                memcpy(supportRate, p+2, ie_len);
                supportRateNum = ie_len;
        }
 
        /* get ext_supported rates */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_EXT_SUPP_RATES,
-                         &ie_len, pbss_network->IELength - _BEACON_IE_OFFSET_);
+       p = rtw_get_ie23a(ie, WLAN_EID_EXT_SUPP_RATES,
+                         &ie_len, pbss_network->IELength);
        if (p) {
                memcpy(supportRate+supportRateNum, p+2, ie_len);
                supportRateNum += ie_len;
@@ -884,13 +876,13 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        rtw_set_supported_rate23a(pbss_network->SupportedRates, network_type);
 
        /* parsing ERP_IE */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO, &ie_len,
-                         (pbss_network->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_ERP_INFO, &ie_len,
+                         pbss_network->IELength);
        if (p && ie_len > 0)
                ERP_IE_handler23a(padapter, p);
 
        /* update privacy/security */
-       if (cap & BIT(4))
+       if (pbss_network->capability & BIT(4))
                pbss_network->Privacy = 1;
        else
                pbss_network->Privacy = 0;
@@ -901,8 +893,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        group_cipher = 0; pairwise_cipher = 0;
        psecuritypriv->wpa2_group_cipher = 0;
        psecuritypriv->wpa2_pairwise_cipher = 0;
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_RSN, &ie_len,
-                         (pbss_network->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_RSN, &ie_len,
+                         pbss_network->IELength);
        if (p && ie_len > 0) {
                if (rtw_parse_wpa2_ie23a(p, ie_len+2, &group_cipher,
                                         &pairwise_cipher, NULL) == _SUCCESS) {
@@ -922,10 +914,9 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        pairwise_cipher = 0;
        psecuritypriv->wpa_group_cipher = 0;
        psecuritypriv->wpa_pairwise_cipher = 0;
-       for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
+       for (p = ie; ;p += (ie_len + 2)) {
                p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
-                                 (pbss_network->IELength - _BEACON_IE_OFFSET_ -
-                                 (ie_len + 2)));
+                                 pbss_network->IELength - (ie_len + 2));
                if ((p) && (!memcmp(p+2, RTW_WPA_OUI23A_TYPE, 4))) {
                        if (rtw_parse_wpa_ie23a(p, ie_len+2, &group_cipher,
                                                &pairwise_cipher, NULL) == _SUCCESS) {
@@ -950,10 +941,10 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        ie_len = 0;
        pmlmepriv->qos_option = 0;
        if (pregistrypriv->wmm_enable) {
-               for (p = ie + _BEACON_IE_OFFSET_; ;p += (ie_len + 2)) {
+               for (p = ie; ;p += (ie_len + 2)) {
                        p = rtw_get_ie23a(p, WLAN_EID_VENDOR_SPECIFIC, &ie_len,
                                          (pbss_network->IELength -
-                                         _BEACON_IE_OFFSET_ - (ie_len + 2)));
+                                          (ie_len + 2)));
                        if ((p) && !memcmp(p+2, WMM_PARA_IE, 6)) {
                                pmlmepriv->qos_option = 1;
 
@@ -973,8 +964,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
                }
        }
        /* parsing HT_CAP_IE */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_CAPABILITY, &ie_len,
-                         (pbss_network->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_HT_CAPABILITY, &ie_len,
+                         pbss_network->IELength);
        if (p && ie_len > 0) {
                u8 rf_type;
 
@@ -1005,8 +996,8 @@ int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf,
        }
 
        /* parsing HT_INFO_IE */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_HT_OPERATION, &ie_len,
-                         (pbss_network->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_HT_OPERATION, &ie_len,
+                         pbss_network->IELength);
        if (p && ie_len > 0)
                pHT_info_ie = p;
 
@@ -1179,7 +1170,7 @@ static void update_bcn_erpinfo_ie(struct rtw_adapter *padapter)
                return;
 
        /* parsing ERP_IE */
-       p = rtw_get_ie23a(ie + _BEACON_IE_OFFSET_, WLAN_EID_ERP_INFO, &len, (pnetwork->IELength - _BEACON_IE_OFFSET_));
+       p = rtw_get_ie23a(ie, WLAN_EID_ERP_INFO, &len, pnetwork->IELength);
        if (p && len > 0) {
                if (pmlmepriv->num_sta_non_erp == 1)
                        p[2] |= WLAN_ERP_NON_ERP_PRESENT |
@@ -1224,54 +1215,9 @@ static void update_bcn_wmm_ie(struct rtw_adapter *padapter)
 
 static void update_bcn_wps_ie(struct rtw_adapter *padapter)
 {
-       u8 *pwps_ie = NULL, *pwps_ie_src, *premainder_ie, *pbackup_remainder_ie = NULL;
-       uint wps_ielen = 0, wps_offset, remainder_ielen;
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-       struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
-       unsigned char *ie = pnetwork->IEs;
-       u32 ielen = pnetwork->IELength;
-
        DBG_8723A("%s\n", __func__);
 
-       pwps_ie_src = pmlmepriv->wps_beacon_ie;
-       if (pwps_ie_src == NULL)
-               return;
-
-       pwps_ie = rtw_get_wps_ie23a(ie+_FIXED_IE_LENGTH_, ielen-_FIXED_IE_LENGTH_, NULL, &wps_ielen);
-
-       if (pwps_ie == NULL || wps_ielen == 0)
-               return;
-
-       wps_offset = (uint)(pwps_ie-ie);
-
-       premainder_ie = pwps_ie + wps_ielen;
-
-       remainder_ielen = ielen - wps_offset - wps_ielen;
-
-       if (remainder_ielen > 0) {
-               pbackup_remainder_ie = kmalloc(remainder_ielen, GFP_ATOMIC);
-               if (pbackup_remainder_ie)
-                       memcpy(pbackup_remainder_ie, premainder_ie,
-                              remainder_ielen);
-       }
-
-       wps_ielen = (uint)pwps_ie_src[1];/* to get ie data len */
-       if ((wps_offset+wps_ielen+2+remainder_ielen)<= MAX_IE_SZ)
-       {
-               memcpy(pwps_ie, pwps_ie_src, wps_ielen+2);
-               pwps_ie += (wps_ielen+2);
-
-               if (pbackup_remainder_ie)
-                       memcpy(pwps_ie, pbackup_remainder_ie, remainder_ielen);
-
-               /* update IELength */
-               pnetwork->IELength = wps_offset + (wps_ielen+2) + remainder_ielen;
-       }
-
-       if (pbackup_remainder_ie)
-               kfree(pbackup_remainder_ie);
+       return;
 }
 
 static void update_bcn_p2p_ie(struct rtw_adapter *padapter)
@@ -1376,7 +1322,7 @@ static int rtw_ht_operation_update(struct rtw_adapter *padapter)
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct ht_priv *phtpriv_ap = &pmlmepriv->htpriv;
 
-       if (pmlmepriv->htpriv.ht_option == true)
+       if (pmlmepriv->htpriv.ht_option)
                return 0;
 
        /* if (!iface->conf->ieee80211n || iface->conf->ht_op_mode_fixed) */
@@ -1612,7 +1558,7 @@ void bss_cap_update_on_sta_join23a(struct rtw_adapter *padapter, struct sta_info
                        psta->no_ht_set = 1;
                        pmlmepriv->num_sta_no_ht++;
                }
-               if (pmlmepriv->htpriv.ht_option == true) {
+               if (pmlmepriv->htpriv.ht_option) {
                        DBG_8723A("%s STA " MAC_FMT
                                   " - no HT, num of non-HT stations %d\n",
                                   __func__, MAC_ARG(psta->hwaddr),
@@ -1850,7 +1796,7 @@ void sta_info_update23a(struct rtw_adapter *padapter, struct sta_info *psta)
                psta->htpriv.ht_option = false;
        }
 
-       if (pmlmepriv->htpriv.ht_option == false)
+       if (!pmlmepriv->htpriv.ht_option)
                psta->htpriv.ht_option = false;
 
        update_sta_info23a_apmode23a(padapter, psta);
@@ -1957,13 +1903,6 @@ void start_ap_mode23a(struct rtw_adapter *padapter)
        for (i = 0; i<NUM_STA; i++)
                pstapriv->sta_aid[i] = NULL;
 
-       pmlmepriv->wps_beacon_ie = NULL;
-       pmlmepriv->wps_probe_resp_ie = NULL;
-       pmlmepriv->wps_assoc_resp_ie = NULL;
-
-       pmlmepriv->p2p_beacon_ie = NULL;
-       pmlmepriv->p2p_probe_resp_ie = NULL;
-
        /* for ACL */
        INIT_LIST_HEAD(&pacl_list->acl_node_q.queue);
        pacl_list->num = 0;
index 1696cb8b17cb258e1935186626b86cf8219960d0..35f879eaa66587d91cd1692ed7c5594f675bcaa8 100644 (file)
@@ -464,7 +464,6 @@ exit:
 int rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
                       struct wlan_network *pnetwork)
 {
-       u8 *auth;
        int res = _SUCCESS;
        struct wlan_bssid_ex *psecnetwork;
        struct cmd_obj *pcmd;
@@ -532,18 +531,6 @@ int rtw_joinbss_cmd23a(struct rtw_adapter *padapter,
        memcpy(psecnetwork, &pnetwork->network,
               get_wlan_bssid_ex_sz(&pnetwork->network));
 
-       auth = &psecuritypriv->authenticator_ie[0];
-       psecuritypriv->authenticator_ie[0] =
-               (unsigned char)psecnetwork->IELength;
-
-       if ((psecnetwork->IELength-12) < (256-1)) {
-               memcpy(&psecuritypriv->authenticator_ie[1],
-                      &psecnetwork->IEs[12], psecnetwork->IELength - 12);
-       } else {
-               memcpy(&psecuritypriv->authenticator_ie[1],
-                      &psecnetwork->IEs[12], 256 - 1);
-       }
-
        psecnetwork->IELength = 0;
        /*  Added by Albert 2009/02/18 */
        /*  If the the driver wants to use the bssid to create the
index adb86a54bdb261326aa626e7e500986834244d71..78a7b27ab69fbe95175559bd5aa9c398cb2a9660 100644 (file)
@@ -33,7 +33,6 @@ u8 WPA_CIPHER_SUITE_WRAP23A[] = { 0x00, 0x50, 0xf2, 3 };
 u8 WPA_CIPHER_SUITE_CCMP23A[] = { 0x00, 0x50, 0xf2, 4 };
 u8 WPA_CIPHER_SUITE_WEP10423A[] = { 0x00, 0x50, 0xf2, 5 };
 
-u16 RSN_VERSION_BSD23A = 1;
 u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X23A[] = { 0x00, 0x0f, 0xac, 1 };
 u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X23A[] = { 0x00, 0x0f, 0xac, 2 };
 u8 RSN_CIPHER_SUITE_NONE23A[] = { 0x00, 0x0f, 0xac, 0 };
@@ -124,14 +123,6 @@ int rtw_check_network_type23a(unsigned char *rate, int ratelen, int channel)
        }
 }
 
-u8 *rtw_set_fixed_ie23a(unsigned char *pbuf, unsigned int len,
-                    unsigned char *source, unsigned int *frlen)
-{
-       memcpy((void *)pbuf, (void *)source, len);
-       *frlen = *frlen + len;
-       return pbuf + len;
-}
-
 /*  rtw_set_ie23a will update frame length */
 u8 *rtw_set_ie23a(u8 *pbuf, int index, uint len, const u8 *source, uint *frlen)
 {
@@ -161,14 +152,12 @@ inline u8 *rtw_set_ie23a_ch_switch (u8 *buf, u32 *buf_len, u8 ch_switch_mode,
 
 inline u8 hal_ch_offset_to_secondary_ch_offset23a(u8 ch_offset)
 {
-       if (ch_offset == HAL_PRIME_CHNL_OFFSET_DONT_CARE)
-               return SCN;
-       else if (ch_offset == HAL_PRIME_CHNL_OFFSET_LOWER)
-               return SCB;
+       if (ch_offset == HAL_PRIME_CHNL_OFFSET_LOWER)
+               return IEEE80211_HT_PARAM_CHA_SEC_BELOW;
        else if (ch_offset == HAL_PRIME_CHNL_OFFSET_UPPER)
-               return SCA;
+               return IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
 
-       return SCN;
+       return IEEE80211_HT_PARAM_CHA_SEC_NONE;
 }
 
 inline u8 *rtw_set_ie23a_secondary_ch_offset(u8 *buf, u32 *buf_len,
@@ -361,32 +350,19 @@ int rtw_generate_ie23a(struct registry_priv *pregistrypriv)
        int     sz = 0, rateLen;
        struct wlan_bssid_ex*   pdev_network = &pregistrypriv->dev_network;
        u8*     ie = pdev_network->IEs;
+       u16 cap;
 
+       pdev_network->tsf = 0;
 
-
-       /* timestamp will be inserted by hardware */
-       sz += 8;
-       ie += sz;
-
-       /* beacon interval : 2bytes */
-       /* BCN_INTERVAL; */
-       *(u16*)ie = cpu_to_le16(pdev_network->BeaconPeriod);
-       sz += 2;
-       ie += 2;
-
-       /* capability info */
-       *(u16*)ie = 0;
-
-       *(u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_IBSS);
+       cap = WLAN_CAPABILITY_IBSS;
 
        if (pregistrypriv->preamble == PREAMBLE_SHORT)
-               *(u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_SHORT_PREAMBLE);
+               cap |= WLAN_CAPABILITY_SHORT_PREAMBLE;
 
        if (pdev_network->Privacy)
-               *(u16*)ie |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
+               cap |= WLAN_CAPABILITY_PRIVACY;
 
-       sz += 2;
-       ie += 2;
+       pdev_network->capability = cap;
 
        /* SSID */
        ie = rtw_set_ie23a(ie, WLAN_EID_SSID, pdev_network->Ssid.ssid_len,
@@ -436,7 +412,7 @@ int rtw_generate_ie23a(struct registry_priv *pregistrypriv)
        return sz;
 }
 
-int rtw_get_wpa_cipher_suite23a(const u8 *s)
+static int rtw_get_wpa_cipher_suite(const u8 *s)
 {
        if (!memcmp(s, WPA_CIPHER_SUITE_NONE23A, WPA_SELECTOR_LEN))
                return WPA_CIPHER_NONE;
@@ -452,7 +428,7 @@ int rtw_get_wpa_cipher_suite23a(const u8 *s)
        return 0;
 }
 
-int rtw_get_wpa2_cipher_suite23a(const u8 *s)
+static int rtw_get_wpa2_cipher_suite(const u8 *s)
 {
        if (!memcmp(s, RSN_CIPHER_SUITE_NONE23A, RSN_SELECTOR_LEN))
                return WPA_CIPHER_NONE;
@@ -490,7 +466,7 @@ int rtw_parse_wpa_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, int
        /* group_cipher */
        if (left >= WPA_SELECTOR_LEN) {
 
-               *group_cipher = rtw_get_wpa_cipher_suite23a(pos);
+               *group_cipher = rtw_get_wpa_cipher_suite(pos);
 
                pos += WPA_SELECTOR_LEN;
                left -= WPA_SELECTOR_LEN;
@@ -518,7 +494,7 @@ int rtw_parse_wpa_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, int
                }
 
                for (i = 0; i < count; i++) {
-                       *pairwise_cipher |= rtw_get_wpa_cipher_suite23a(pos);
+                       *pairwise_cipher |= rtw_get_wpa_cipher_suite(pos);
 
                        pos += WPA_SELECTOR_LEN;
                        left -= WPA_SELECTOR_LEN;
@@ -557,7 +533,7 @@ int rtw_parse_wpa2_ie23a(const u8* rsn_ie, int rsn_ie_len, int *group_cipher,
                return _FAIL;
        }
 
-       if (*rsn_ie != _WPA2_IE_ID_ || *(rsn_ie+1) != (u8)(rsn_ie_len - 2)) {
+       if (*rsn_ie != WLAN_EID_RSN || *(rsn_ie+1) != (u8)(rsn_ie_len - 2)) {
                return _FAIL;
        }
 
@@ -567,7 +543,7 @@ int rtw_parse_wpa2_ie23a(const u8* rsn_ie, int rsn_ie_len, int *group_cipher,
 
        /* group_cipher */
        if (left >= RSN_SELECTOR_LEN) {
-               *group_cipher = rtw_get_wpa2_cipher_suite23a(pos);
+               *group_cipher = rtw_get_wpa2_cipher_suite(pos);
 
                pos += RSN_SELECTOR_LEN;
                left -= RSN_SELECTOR_LEN;
@@ -594,7 +570,7 @@ int rtw_parse_wpa2_ie23a(const u8* rsn_ie, int rsn_ie_len, int *group_cipher,
                }
 
                for (i = 0; i < count; i++) {
-                       *pairwise_cipher |= rtw_get_wpa2_cipher_suite23a(pos);
+                       *pairwise_cipher |= rtw_get_wpa2_cipher_suite(pos);
 
                        pos += RSN_SELECTOR_LEN;
                        left -= RSN_SELECTOR_LEN;
@@ -621,130 +597,6 @@ int rtw_parse_wpa2_ie23a(const u8* rsn_ie, int rsn_ie_len, int *group_cipher,
        return ret;
 }
 
-int rtw_get_sec_ie23a(u8 *in_ie, uint in_len, u8 *rsn_ie, u16 *rsn_len,
-                  u8 *wpa_ie, u16 *wpa_len)
-{
-       u8 authmode, sec_idx, i;
-       uint cnt;
-
-
-       /* Search required WPA or WPA2 IE and copy to sec_ie[ ] */
-
-       cnt = (_TIMESTAMP_ + _BEACON_ITERVAL_ + _CAPABILITY_);
-
-       sec_idx = 0;
-
-       while(cnt < in_len) {
-               authmode = in_ie[cnt];
-
-               if ((authmode == WLAN_EID_VENDOR_SPECIFIC) &&
-                   !memcmp(&in_ie[cnt+2], RTW_WPA_OUI23A_TYPE, 4)) {
-                               RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                                        ("\n rtw_get_wpa_ie23a: sec_idx =%d "
-                                         "in_ie[cnt+1]+2 =%d\n",
-                                         sec_idx, in_ie[cnt + 1] + 2));
-
-                               if (wpa_ie) {
-                               memcpy(wpa_ie, &in_ie[cnt], in_ie[cnt+1]+2);
-
-                               for (i = 0; i < (in_ie[cnt + 1] + 2); i = i + 8) {
-                                       RT_TRACE(_module_rtl871x_mlme_c_,
-                                                _drv_info_,
-                                                ("\n %2x,%2x,%2x,%2x,%2x,%2x,"
-                                                 "%2x,%2x\n", wpa_ie[i],
-                                                 wpa_ie[i + 1], wpa_ie[i + 2],
-                                                 wpa_ie[i + 3], wpa_ie[i + 4],
-                                                 wpa_ie[i + 5], wpa_ie[i + 6],
-                                                 wpa_ie[i + 7]));
-                                       }
-                               }
-
-                               *wpa_len = in_ie[cnt + 1] + 2;
-                               cnt += in_ie[cnt + 1] + 2;  /* get next */
-               } else {
-                       if (authmode == _WPA2_IE_ID_) {
-                               RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                                        ("\n get_rsn_ie: sec_idx =%d in_ie"
-                                         "[cnt+1]+2 =%d\n", sec_idx,
-                                         in_ie[cnt + 1] + 2));
-
-                               if (rsn_ie) {
-                               memcpy(rsn_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
-
-                               for (i = 0; i < (in_ie[cnt + 1] + 2); i = i + 8) {
-                                       RT_TRACE(_module_rtl871x_mlme_c_,
-                                                _drv_info_,
-                                                ("\n %2x,%2x,%2x,%2x,%2x,%2x,"
-                                                 "%2x,%2x\n", rsn_ie[i],
-                                                 rsn_ie[i + 1], rsn_ie[i + 2],
-                                                 rsn_ie[i + 3], rsn_ie[i + 4],
-                                                 rsn_ie[i + 5], rsn_ie[i + 6],
-                                                 rsn_ie[i + 7]));
-                                       }
-                               }
-
-                               *rsn_len = in_ie[cnt + 1] + 2;
-                               cnt += in_ie[cnt + 1] + 2;  /* get next */
-                       } else {
-                               cnt += in_ie[cnt + 1] + 2;   /* get next */
-                       }
-               }
-       }
-
-
-
-       return *rsn_len + *wpa_len;
-}
-
-/**
- * rtw_get_wps_ie23a - Search WPS IE from a series of IEs
- * @in_ie: Address of IEs to search
- * @in_len: Length limit from in_ie
- * @wps_ie: If not NULL and WPS IE is found, WPS IE will be copied to the
- *          buf starting from wps_ie
- * @wps_ielen: If not NULL and WPS IE is found, will set to the length of
- *             the entire WPS IE
- *
- * Returns: The address of the WPS IE found, or NULL
- */
-u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
-{
-       uint cnt;
-       u8 *wpsie_ptr = NULL;
-       u8 eid, wps_oui[4] = {0x0, 0x50, 0xf2, 0x04};
-
-       if (wps_ielen)
-               *wps_ielen = 0;
-
-       if (!in_ie || in_len <= 0)
-               return wpsie_ptr;
-
-       cnt = 0;
-
-       while (cnt < in_len) {
-               eid = in_ie[cnt];
-
-               if (eid == WLAN_EID_VENDOR_SPECIFIC &&
-                   !memcmp(&in_ie[cnt+2], wps_oui, 4)) {
-                       wpsie_ptr = &in_ie[cnt];
-
-                       if (wps_ie)
-                               memcpy(wps_ie, &in_ie[cnt], in_ie[cnt + 1] + 2);
-
-                       if (wps_ielen)
-                               *wps_ielen = in_ie[cnt + 1] + 2;
-
-                       cnt += in_ie[cnt + 1] + 2;
-
-                       break;
-               } else {
-                       cnt += in_ie[cnt + 1] + 2; /* goto next */
-               }
-       }
-
-       return wpsie_ptr;
-}
-
 /**
  * rtw_get_wps_attr23a - Search a specific WPS attribute from a given WPS IE
  * @wps_ie: Address of WPS IE to search
@@ -757,11 +609,11 @@ u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen)
  *
  * Returns: the address of the specific WPS attribute found, or NULL
  */
-u8 *rtw_get_wps_attr23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
-                    u8 *buf_attr, u32 *len_attr)
+const u8 *rtw_get_wps_attr23a(const u8 *wps_ie, uint wps_ielen,
+                             u16 target_attr_id, u8 *buf_attr, u32 *len_attr)
 {
-       u8 *attr_ptr = NULL;
-       u8 * target_attr_ptr = NULL;
+       const u8 *attr_ptr = NULL;
+       const u8 *target_attr_ptr = NULL;
        u8 wps_oui[4] = {0x00, 0x50, 0xF2, 0x04};
 
        if (len_attr)
@@ -813,15 +665,12 @@ u8 *rtw_get_wps_attr23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
  *
  * Returns: the address of the specific WPS attribute content found, or NULL
  */
-u8 *rtw_get_wps_attr_content23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
-                               u8 *buf_content, uint *len_content)
+const u8 *rtw_get_wps_attr_content23a(const u8 *wps_ie, uint wps_ielen,
+                                     u16 target_attr_id, u8 *buf_content)
 {
-       u8 *attr_ptr;
+       const u8 *attr_ptr;
        u32 attr_len;
 
-       if (len_content)
-               *len_content = 0;
-
        attr_ptr = rtw_get_wps_attr23a(wps_ie, wps_ielen, target_attr_id,
                                    NULL, &attr_len);
 
@@ -829,9 +678,6 @@ u8 *rtw_get_wps_attr_content23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id,
                if (buf_content)
                        memcpy(buf_content, attr_ptr + 4, attr_len - 4);
 
-               if (len_content)
-                       *len_content = attr_len - 4;
-
                return attr_ptr + 4;
        }
 
@@ -843,13 +689,11 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
        const u8 *pbuf;
        int group_cipher = 0, pairwise_cipher = 0, is8021x = 0;
        int ret = _FAIL;
-       int r, offset, plen;
+       int r, plen;
        char *pie;
 
-       offset = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u);
-       pie = &pnetwork->network.IEs[offset];
-       plen = pnetwork->network.IELength - offset;
+       pie = pnetwork->network.IEs;
+       plen = pnetwork->network.IELength;
 
        pbuf = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
                                       WLAN_OUI_TYPE_MICROSOFT_WPA, pie, plen);
@@ -903,166 +747,112 @@ static int rtw_get_cipher_info(struct wlan_network *pnetwork)
 
 void rtw_get_bcn_info23a(struct wlan_network *pnetwork)
 {
-       unsigned short cap;
        u8 bencrypt = 0;
-       /* u8 wpa_ie[255], rsn_ie[255]; */
-       u16 wpa_len = 0, rsn_len = 0;
-       struct HT_info_element *pht_info;
-       struct ieee80211_ht_cap *pht_cap;
+       int pie_len;
+       u8 *pie;
        const u8 *p;
 
-       cap = get_unaligned_le16(
-               rtw_get_capability23a_from_ie(pnetwork->network.IEs));
-       if (cap & WLAN_CAPABILITY_PRIVACY) {
+       if (pnetwork->network.capability & WLAN_CAPABILITY_PRIVACY) {
                bencrypt = 1;
                pnetwork->network.Privacy = 1;
        } else
                pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_OPENSYS;
 
-       rtw_get_sec_ie23a(pnetwork->network.IEs, pnetwork->network.IELength,
-                      NULL, &rsn_len, NULL, &wpa_len);
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("rtw_get_bcn_info23a: ssid =%s\n", pnetwork->network.Ssid.ssid));
-       RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("rtw_get_bcn_info23a: wpa_len =%d rsn_len =%d\n",
-                 wpa_len, rsn_len));
-       RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("rtw_get_bcn_info23a: ssid =%s\n", pnetwork->network.Ssid.ssid));
-       RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("rtw_get_bcn_info23a: wpa_len =%d rsn_len =%d\n",
-                 wpa_len, rsn_len));
+                ("%s: ssid =%s\n", __func__, pnetwork->network.Ssid.ssid));
+
+       pie = pnetwork->network.IEs;
+       pie_len = pnetwork->network.IELength;
 
-       if (rsn_len > 0)
+       p = cfg80211_find_ie(WLAN_EID_RSN, pie, pie_len);
+       if (p && p[1]) {
                pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WPA2;
-       else if (wpa_len > 0)
+       } else if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                          WLAN_OUI_TYPE_MICROSOFT_WPA,
+                                          pie, pie_len)) {
                pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WPA;
-       else {
+       else {
                if (bencrypt)
                        pnetwork->BcnInfo.encryp_protocol = ENCRYP_PROTOCOL_WEP;
        }
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("rtw_get_bcn_info23a: pnetwork->encryp_protocol is %x\n",
+                ("%s: pnetwork->encryp_protocol is %x\n", __func__,
                  pnetwork->BcnInfo.encryp_protocol));
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
-                ("rtw_get_bcn_info23a: pnetwork->encryp_protocol is %x\n",
+                ("%s: pnetwork->encryp_protocol is %x\n", __func__,
                  pnetwork->BcnInfo.encryp_protocol));
        rtw_get_cipher_info(pnetwork);
 
        /* get bwmode and ch_offset */
-       /* parsing HT_CAP_IE */
-       p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
-                            pnetwork->network.IEs + _FIXED_IE_LENGTH_,
-                            pnetwork->network.IELength - _FIXED_IE_LENGTH_);
-       if (p && p[1] > 0) {
-               pht_cap = (struct ieee80211_ht_cap *)(p + 2);
-               pnetwork->BcnInfo.ht_cap_info = pht_cap->cap_info;
-       } else
-               pnetwork->BcnInfo.ht_cap_info = 0;
-
-       /* parsing HT_INFO_IE */
-       p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
-                            pnetwork->network.IEs + _FIXED_IE_LENGTH_,
-                      pnetwork->network.IELength - _FIXED_IE_LENGTH_);
-       if (p && p[1] > 0) {
-               pht_info = (struct HT_info_element *)(p + 2);
-               pnetwork->BcnInfo.ht_info_infos_0 = pht_info->infos[0];
-       } else
-               pnetwork->BcnInfo.ht_info_infos_0 = 0;
 }
 
 /* show MCS rate, unit: 100Kbps */
 u16 rtw_mcs_rate23a(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40,
-                unsigned char * MCS_rate)
+                   struct ieee80211_mcs_info *mcs)
 {
        u16 max_rate = 0;
 
        if (rf_type == RF_1T1R) {
-               if (MCS_rate[0] & BIT(7))
+               if (mcs->rx_mask[0] & BIT(7))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?1500:1350):
                                ((short_GI_20)?722:650);
-               else if (MCS_rate[0] & BIT(6))
+               else if (mcs->rx_mask[0] & BIT(6))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?1350:1215):
                                ((short_GI_20)?650:585);
-               else if (MCS_rate[0] & BIT(5))
+               else if (mcs->rx_mask[0] & BIT(5))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?1200:1080):
                                ((short_GI_20)?578:520);
-               else if (MCS_rate[0] & BIT(4))
+               else if (mcs->rx_mask[0] & BIT(4))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?900:810):
                                ((short_GI_20)?433:390);
-               else if (MCS_rate[0] & BIT(3))
+               else if (mcs->rx_mask[0] & BIT(3))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?600:540):
                                ((short_GI_20)?289:260);
-               else if (MCS_rate[0] & BIT(2))
+               else if (mcs->rx_mask[0] & BIT(2))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?450:405):
                                ((short_GI_20)?217:195);
-               else if (MCS_rate[0] & BIT(1))
+               else if (mcs->rx_mask[0] & BIT(1))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?300:270):
                                ((short_GI_20)?144:130);
-               else if (MCS_rate[0] & BIT(0))
+               else if (mcs->rx_mask[0] & BIT(0))
                        max_rate = (bw_40MHz) ? ((short_GI_40)?150:135):
                                ((short_GI_20)?72:65);
        } else {
-               if (MCS_rate[1]) {
-                       if (MCS_rate[1] & BIT(7))
+               if (mcs->rx_mask[1]) {
+                       if (mcs->rx_mask[1] & BIT(7))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?3000:2700):((short_GI_20)?1444:1300);
-                       else if (MCS_rate[1] & BIT(6))
+                       else if (mcs->rx_mask[1] & BIT(6))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?2700:2430):((short_GI_20)?1300:1170);
-                       else if (MCS_rate[1] & BIT(5))
+                       else if (mcs->rx_mask[1] & BIT(5))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?2400:2160):((short_GI_20)?1156:1040);
-                       else if (MCS_rate[1] & BIT(4))
+                       else if (mcs->rx_mask[1] & BIT(4))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?1800:1620):((short_GI_20)?867:780);
-                       else if (MCS_rate[1] & BIT(3))
+                       else if (mcs->rx_mask[1] & BIT(3))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?1200:1080):((short_GI_20)?578:520);
-                       else if (MCS_rate[1] & BIT(2))
+                       else if (mcs->rx_mask[1] & BIT(2))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?900:810):((short_GI_20)?433:390);
-                       else if (MCS_rate[1] & BIT(1))
+                       else if (mcs->rx_mask[1] & BIT(1))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?600:540):((short_GI_20)?289:260);
-                       else if (MCS_rate[1] & BIT(0))
+                       else if (mcs->rx_mask[1] & BIT(0))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?300:270):((short_GI_20)?144:130);
                } else {
-                       if (MCS_rate[0] & BIT(7))
+                       if (mcs->rx_mask[0] & BIT(7))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?1500:1350):((short_GI_20)?722:650);
-                       else if (MCS_rate[0] & BIT(6))
+                       else if (mcs->rx_mask[0] & BIT(6))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?1350:1215):((short_GI_20)?650:585);
-                       else if (MCS_rate[0] & BIT(5))
+                       else if (mcs->rx_mask[0] & BIT(5))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?1200:1080):((short_GI_20)?578:520);
-                       else if (MCS_rate[0] & BIT(4))
+                       else if (mcs->rx_mask[0] & BIT(4))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?900:810):((short_GI_20)?433:390);
-                       else if (MCS_rate[0] & BIT(3))
+                       else if (mcs->rx_mask[0] & BIT(3))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?600:540):((short_GI_20)?289:260);
-                       else if (MCS_rate[0] & BIT(2))
+                       else if (mcs->rx_mask[0] & BIT(2))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?450:405):((short_GI_20)?217:195);
-                       else if (MCS_rate[0] & BIT(1))
+                       else if (mcs->rx_mask[0] & BIT(1))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?300:270):((short_GI_20)?144:130);
-                       else if (MCS_rate[0] & BIT(0))
+                       else if (mcs->rx_mask[0] & BIT(0))
                                max_rate = (bw_40MHz) ? ((short_GI_40)?150:135):((short_GI_20)?72:65);
                }
        }
        return max_rate;
 }
-
-static const char *_action_public_str23a[] = {
-       "ACT_PUB_BSSCOEXIST",
-       "ACT_PUB_DSE_ENABLE",
-       "ACT_PUB_DSE_DEENABLE",
-       "ACT_PUB_DSE_REG_LOCATION",
-       "ACT_PUB_EXT_CHL_SWITCH",
-       "ACT_PUB_DSE_MSR_REQ",
-       "ACT_PUB_DSE_MSR_RPRT",
-       "ACT_PUB_MP",
-       "ACT_PUB_DSE_PWR_CONSTRAINT",
-       "ACT_PUB_VENDOR",
-       "ACT_PUB_GAS_INITIAL_REQ",
-       "ACT_PUB_GAS_INITIAL_RSP",
-       "ACT_PUB_GAS_COMEBACK_REQ",
-       "ACT_PUB_GAS_COMEBACK_RSP",
-       "ACT_PUB_TDLS_DISCOVERY_RSP",
-       "ACT_PUB_LOCATION_TRACK",
-       "ACT_PUB_RSVD",
-};
-
-const char *action_public_str23a(u8 action)
-{
-       action = (action >= ACT_PUBLIC_MAX) ? ACT_PUBLIC_MAX : action;
-       return _action_public_str23a[action];
-}
diff --git a/drivers/staging/rtl8723au/core/rtw_ioctl_set.c b/drivers/staging/rtl8723au/core/rtw_ioctl_set.c
deleted file mode 100644 (file)
index cf897c7..0000000
+++ /dev/null
@@ -1,425 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2012 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- ******************************************************************************/
-#define _RTW_IOCTL_SET_C_
-
-#include <osdep_service.h>
-#include <drv_types.h>
-#include <rtw_ioctl_set.h>
-#include <hal_intf.h>
-
-#include <usb_ops.h>
-#include <linux/ieee80211.h>
-
-int rtw_do_join23a(struct rtw_adapter *padapter)
-{
-       struct list_head *plist, *phead;
-       u8* pibss = NULL;
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct rtw_queue *queue = &pmlmepriv->scanned_queue;
-       int ret = _SUCCESS;
-
-       spin_lock_bh(&pmlmepriv->scanned_queue.lock);
-       phead = get_list_head(queue);
-       plist = phead->next;
-
-       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                ("\n rtw_do_join23a: phead = %p; plist = %p\n\n\n",
-                 phead, plist));
-
-       pmlmepriv->cur_network.join_res = -2;
-
-       set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
-
-       pmlmepriv->to_join = true;
-
-       if (list_empty(&queue->queue)) {
-               spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
-               _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
-
-               /* when set_ssid/set_bssid for rtw_do_join23a(), but
-                  scanning queue is empty */
-               /* we try to issue sitesurvey firstly */
-
-               if (pmlmepriv->LinkDetectInfo.bBusyTraffic == false ||
-                   padapter->mlmepriv.to_roaming > 0) {
-                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                                ("rtw_do_join23a(): site survey if scanned_queue "
-                                 "is empty\n."));
-                       /*  submit site_survey23a_cmd */
-                       ret = rtw_sitesurvey_cmd23a(padapter,
-                                                &pmlmepriv->assoc_ssid, 1,
-                                                NULL, 0);
-                       if (ret != _SUCCESS) {
-                               pmlmepriv->to_join = false;
-                               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                                        ("rtw_do_join23a(): site survey return "
-                                         "error\n."));
-                       }
-               } else {
-                       pmlmepriv->to_join = false;
-                       ret = _FAIL;
-               }
-
-               goto exit;
-       } else {
-               int select_ret;
-               spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
-               select_ret = rtw_select_and_join_from_scanned_queue23a(pmlmepriv);
-               if (select_ret == _SUCCESS) {
-                       pmlmepriv->to_join = false;
-                       mod_timer(&pmlmepriv->assoc_timer,
-                                 jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT));
-               } else {
-                       if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
-                               struct wlan_bssid_ex *pdev_network;
-                               /*  submit createbss_cmd to change to a
-                                   ADHOC_MASTER */
-
-                               /* pmlmepriv->lock has been acquired by
-                                  caller... */
-                               pdev_network =
-                                       &padapter->registrypriv.dev_network;
-
-                               pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
-
-                               pibss = padapter->registrypriv.dev_network.MacAddress;
-
-                               memcpy(&pdev_network->Ssid,
-                                      &pmlmepriv->assoc_ssid,
-                                      sizeof(struct cfg80211_ssid));
-
-                               rtw_update_registrypriv_dev_network23a(padapter);
-
-                               rtw_generate_random_ibss23a(pibss);
-
-                               if (rtw_createbss_cmd23a(padapter) != _SUCCESS) {
-                                       RT_TRACE(_module_rtl871x_ioctl_set_c_,
-                                                _drv_err_,
-                                                ("***Error =>do_goin: rtw_creat"
-                                                 "ebss_cmd status FAIL***\n"));
-                                       ret =  false;
-                                       goto exit;
-                               }
-
-                               pmlmepriv->to_join = false;
-
-                               RT_TRACE(_module_rtl871x_ioctl_set_c_,
-                                        _drv_info_,
-                                        ("***Error => rtw_select_and_join_from"
-                                         "_scanned_queue FAIL under STA_Mode"
-                                         "***\n "));
-                       } else {
-                               /*  can't associate ; reset under-linking */
-                               _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
-
-                               /* when set_ssid/set_bssid for rtw_do_join23a(),
-                                  but there are no desired bss in scanning
-                                  queue */
-                               /* we try to issue sitesurvey firstly */
-                               if (pmlmepriv->LinkDetectInfo.bBusyTraffic ==
-                                   false || padapter->mlmepriv.to_roaming > 0){
-                                       /* DBG_8723A("rtw_do_join23a() when   no "
-                                          "desired bss in scanning queue\n");
-                                       */
-                                       ret = rtw_sitesurvey_cmd23a(padapter, &pmlmepriv->assoc_ssid, 1, NULL, 0);
-                                       if (ret != _SUCCESS) {
-                                               pmlmepriv->to_join = false;
-                                               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_, ("do_join(): site survey return error\n."));
-                                       }
-                               } else {
-                                       ret = _FAIL;
-                                       pmlmepriv->to_join = false;
-                               }
-                       }
-               }
-       }
-
-exit:
-
-       return ret;
-}
-
-int rtw_set_802_11_ssid23a(struct rtw_adapter* padapter,
-                          struct cfg80211_ssid *ssid)
-{
-       int status = _SUCCESS;
-       u32 cur_time = 0;
-
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct wlan_network *pnetwork = &pmlmepriv->cur_network;
-
-
-
-       DBG_8723A_LEVEL(_drv_always_, "set ssid [%s] fw_state = 0x%08x\n",
-                       ssid->ssid, get_fwstate(pmlmepriv));
-
-       if (padapter->hw_init_completed == false) {
-               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                        ("set_ssid: hw_init_completed == false =>exit!!!\n"));
-               status = _FAIL;
-               goto exit;
-       }
-
-       spin_lock_bh(&pmlmepriv->lock);
-
-       DBG_8723A("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
-               goto handle_tkip_countermeasure;
-       else if (check_fwstate(pmlmepriv, _FW_UNDER_LINKING))
-               goto release_mlme_lock;
-
-       if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) {
-               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                        ("set_ssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
-
-               if ((pmlmepriv->assoc_ssid.ssid_len == ssid->ssid_len) &&
-                   !memcmp(&pmlmepriv->assoc_ssid.ssid, ssid->ssid,
-                           ssid->ssid_len)) {
-                       if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
-                               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                                        ("Set SSID is the same ssid, fw_state = 0x%08x\n",
-                                         get_fwstate(pmlmepriv)));
-
-                               if (rtw_is_same_ibss23a(padapter, pnetwork) == false)
-                               {
-                                       /* if in WIFI_ADHOC_MASTER_STATE | WIFI_ADHOC_STATE, create bss or rejoin again */
-                                       rtw_disassoc_cmd23a(padapter, 0, true);
-
-                                       if (check_fwstate(pmlmepriv, _FW_LINKED))
-                                               rtw_indicate_disconnect23a(padapter);
-
-                                       rtw_free_assoc_resources23a(padapter, 1);
-
-                                       if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
-                                               _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
-                                               set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
-                                       }
-                               } else {
-                                       goto release_mlme_lock;/* it means driver is in WIFI_ADHOC_MASTER_STATE, we needn't create bss again. */
-                               }
-                       } else {
-                               rtw_lps_ctrl_wk_cmd23a(padapter, LPS_CTRL_JOINBSS, 1);
-                       }
-               } else {
-                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                                ("Set SSID not the same ssid\n"));
-                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                                ("set_ssid =[%s] len = 0x%x\n", ssid->ssid,
-                                 (unsigned int)ssid->ssid_len));
-                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                                ("assoc_ssid =[%s] len = 0x%x\n",
-                                 pmlmepriv->assoc_ssid.ssid,
-                                 (unsigned int)pmlmepriv->assoc_ssid.ssid_len));
-
-                       rtw_disassoc_cmd23a(padapter, 0, true);
-
-                       if (check_fwstate(pmlmepriv, _FW_LINKED))
-                               rtw_indicate_disconnect23a(padapter);
-
-                       rtw_free_assoc_resources23a(padapter, 1);
-
-                       if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
-                               _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
-                               set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
-                       }
-               }
-       }
-
-handle_tkip_countermeasure:
-
-       if (padapter->securitypriv.btkip_countermeasure == true) {
-               cur_time = jiffies;
-
-               if ((cur_time - padapter->securitypriv.btkip_countermeasure_time) > 60 * HZ)
-               {
-                       padapter->securitypriv.btkip_countermeasure = false;
-                       padapter->securitypriv.btkip_countermeasure_time = 0;
-               }
-               else
-               {
-                       status = _FAIL;
-                       goto release_mlme_lock;
-               }
-       }
-
-       memcpy(&pmlmepriv->assoc_ssid, ssid, sizeof(struct cfg80211_ssid));
-       pmlmepriv->assoc_by_bssid = false;
-
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
-               pmlmepriv->to_join = true;
-       else
-               status = rtw_do_join23a(padapter);
-
-release_mlme_lock:
-       spin_unlock_bh(&pmlmepriv->lock);
-
-exit:
-       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-               ("-rtw_set_802_11_ssid23a: status =%d\n", status));
-
-
-
-       return status;
-}
-
-int rtw_set_802_11_bssid23a_list_scan(struct rtw_adapter *padapter,
-                                     struct cfg80211_ssid *pssid,
-                                     int ssid_max_num)
-{
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       int res = _SUCCESS;
-
-       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                ("+rtw_set_802_11_bssid23a_list_scan(), fw_state =%x\n",
-                 get_fwstate(pmlmepriv)));
-
-       if (!padapter) {
-               res = _FAIL;
-               goto exit;
-       }
-       if (padapter->hw_init_completed == false) {
-               res = _FAIL;
-               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                        ("\n === rtw_set_802_11_bssid23a_list_scan:"
-                         "hw_init_completed == false ===\n"));
-               goto exit;
-       }
-
-       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY | _FW_UNDER_LINKING) ||
-           (pmlmepriv->LinkDetectInfo.bBusyTraffic == true)) {
-               /*  Scan or linking is in progress, do nothing. */
-               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                        ("rtw_set_802_11_bssid23a_list_scan fail since fw_state "
-                         "= %x\n", get_fwstate(pmlmepriv)));
-
-               if (check_fwstate(pmlmepriv,
-                                 (_FW_UNDER_SURVEY|_FW_UNDER_LINKING))) {
-                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                                ("\n###_FW_UNDER_SURVEY|_FW_UNDER_LINKING\n"));
-               } else {
-                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
-                                ("\n###pmlmepriv->sitesurveyctrl.traffic_"
-                                 "busy == true\n"));
-               }
-       } else {
-               if (rtw_is_scan_deny(padapter)) {
-                       DBG_8723A("%s(%s): scan deny\n",
-                                 __func__, padapter->pnetdev->name);
-                       return _SUCCESS;
-               }
-
-               spin_lock_bh(&pmlmepriv->lock);
-
-               res = rtw_sitesurvey_cmd23a(padapter, pssid, ssid_max_num,
-                                        NULL, 0);
-
-               spin_unlock_bh(&pmlmepriv->lock);
-       }
-exit:
-       return res;
-}
-
-int rtw_set_802_11_authentication_mode23a(struct rtw_adapter* padapter,
-                                         enum ndis_802_11_auth_mode authmode)
-{
-       struct security_priv *psecuritypriv = &padapter->securitypriv;
-       int res;
-
-       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                ("set_802_11_auth.mode(): mode =%x\n", authmode));
-
-       psecuritypriv->ndisauthtype = authmode;
-
-       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
-                ("rtw_set_802_11_authentication_mode23a:"
-                 "psecuritypriv->ndisauthtype =%d",
-                 psecuritypriv->ndisauthtype));
-
-       if (psecuritypriv->ndisauthtype > 3)
-               psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
-
-       res = rtw_set_auth23a(padapter, psecuritypriv);
-
-       return res;
-}
-
-/*
-* rtw_get_cur_max_rate23a -
-* @adapter: pointer to _adapter structure
-*
-* Return 0 or 100Kbps
-*/
-u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter)
-{
-       int i = 0;
-       const u8 *p;
-       u16 rate = 0, max_rate = 0;
-       struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
-       struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       struct registry_priv *pregistrypriv = &adapter->registrypriv;
-       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
-       struct wlan_bssid_ex  *pcur_bss = &pmlmepriv->cur_network.network;
-       struct ieee80211_ht_cap *pht_capie;
-       u8 rf_type = 0;
-       u8 bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0;
-       u16 mcs_rate = 0;
-
-       if (!check_fwstate(pmlmepriv, _FW_LINKED) &&
-           !check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE))
-               return 0;
-
-       if (pmlmeext->cur_wireless_mode & (WIRELESS_11_24N|WIRELESS_11_5N)) {
-               p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
-                                    &pcur_bss->IEs[12],
-                                    pcur_bss->IELength - 12);
-               if (p && p[1] > 0) {
-                       pht_capie = (struct ieee80211_ht_cap *)(p + 2);
-
-                       memcpy(&mcs_rate, &pht_capie->mcs, 2);
-
-                       /* bw_40MHz = (pht_capie->cap_info&
-                          IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1:0; */
-                       /* cur_bwmod is updated by beacon, pmlmeinfo is
-                          updated by association response */
-                       bw_40MHz = (pmlmeext->cur_bwmode &&
-                                   (IEEE80211_HT_PARAM_CHAN_WIDTH_ANY &
-                                    pmlmeinfo->HT_info.infos[0])) ? 1:0;
-
-                       /* short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP
-                          _SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; */
-                       short_GI_20 = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info&IEEE80211_HT_CAP_SGI_20) ? 1:0;
-                       short_GI_40 = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info&IEEE80211_HT_CAP_SGI_40) ? 1:0;
-
-                       rf_type = rtl8723a_get_rf_type(adapter);
-                       max_rate = rtw_mcs_rate23a(rf_type, bw_40MHz &
-                                               pregistrypriv->cbw40_enable,
-                                               short_GI_20, short_GI_40,
-                                               pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate
-                       );
-               }
-       } else {
-               while ((pcur_bss->SupportedRates[i] != 0) &&
-                      (pcur_bss->SupportedRates[i] != 0xFF)) {
-                       rate = pcur_bss->SupportedRates[i] & 0x7F;
-                       if (rate>max_rate)
-                               max_rate = rate;
-                       i++;
-               }
-
-               max_rate = max_rate * 10 / 2;
-       }
-
-       return max_rate;
-}
index 7170258d260123b1392232bdc3c235bc888da28e..4827280c357298e178861b00ca67d2b1f1f15ba6 100644 (file)
 #include <linux/ieee80211.h>
 #include <wifi.h>
 #include <wlan_bssdef.h>
-#include <rtw_ioctl_set.h>
 #include <rtw_sreset.h>
 
+static struct wlan_network *
+rtw_select_candidate_from_queue(struct mlme_priv *pmlmepriv);
+static int rtw_do_join(struct rtw_adapter *padapter);
+
 static void rtw_init_mlme_timer(struct rtw_adapter *padapter)
 {
-       struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
        setup_timer(&pmlmepriv->assoc_timer, rtw23a_join_to_handler,
                    (unsigned long)padapter);
@@ -84,36 +87,8 @@ void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv)
 #ifdef CONFIG_8723AU_AP_MODE
        kfree(pmlmepriv->assoc_req);
        kfree(pmlmepriv->assoc_rsp);
-       rtw_free_mlme_ie_data(&pmlmepriv->wps_beacon_ie,
-                             &pmlmepriv->wps_beacon_ie_len);
        rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_req_ie,
                              &pmlmepriv->wps_probe_req_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->wps_probe_resp_ie,
-                             &pmlmepriv->wps_probe_resp_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->wps_assoc_resp_ie,
-                             &pmlmepriv->wps_assoc_resp_ie_len);
-
-       rtw_free_mlme_ie_data(&pmlmepriv->p2p_beacon_ie,
-                             &pmlmepriv->p2p_beacon_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->p2p_probe_req_ie,
-                             &pmlmepriv->p2p_probe_req_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->p2p_probe_resp_ie,
-                             &pmlmepriv->p2p_probe_resp_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->p2p_go_probe_resp_ie,
-                             &pmlmepriv->p2p_go_probe_resp_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->p2p_assoc_req_ie,
-                             &pmlmepriv->p2p_assoc_req_ie_len);
-
-       rtw_free_mlme_ie_data(&pmlmepriv->wfd_beacon_ie,
-                             &pmlmepriv->wfd_beacon_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_req_ie,
-                             &pmlmepriv->wfd_probe_req_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->wfd_probe_resp_ie,
-                             &pmlmepriv->wfd_probe_resp_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->wfd_go_probe_resp_ie,
-                             &pmlmepriv->wfd_go_probe_resp_ie_len);
-       rtw_free_mlme_ie_data(&pmlmepriv->wfd_assoc_req_ie,
-                             &pmlmepriv->wfd_assoc_req_ie_len);
 #endif
 }
 
@@ -125,7 +100,7 @@ void rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv)
        rtw23a_free_mlme_priv_ie_data(pmlmepriv);
 }
 
-struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, int gfp)
+struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, gfp_t gfp)
 {
        struct wlan_network *pnetwork;
 
@@ -277,7 +252,7 @@ static void _rtw_roaming(struct rtw_adapter *padapter,
                pmlmepriv->assoc_by_bssid = false;
 
                while (1) {
-                       do_join_r = rtw_do_join23a(padapter);
+                       do_join_r = rtw_do_join(padapter);
                        if (do_join_r == _SUCCESS)
                                break;
                        else {
@@ -309,35 +284,16 @@ void rtw23a_roaming(struct rtw_adapter *padapter,
        spin_unlock_bh(&pmlmepriv->lock);
 }
 
-__le16 *rtw_get_capability23a_from_ie(u8 *ie)
-{
-       return (__le16 *)(ie + 8 + 2);
-}
-
-u16 rtw_get_capability23a(struct wlan_bssid_ex *bss)
-{
-       u16 val;
-
-       memcpy(&val, rtw_get_capability23a_from_ie(bss->IEs), 2);
-
-       return le16_to_cpu(val);
-}
-
-__le16 *rtw_get_beacon_interval23a_from_ie(u8 *ie)
-{
-       return (__le16 *)(ie + 8);
-}
-
 static void rtw_free_network_nolock(struct mlme_priv *pmlmepriv,
                                    struct wlan_network *pnetwork)
 {
        _rtw_free_network23a(pmlmepriv, pnetwork);
 }
 
-int rtw_is_same_ibss23a(struct rtw_adapter *adapter,
-                       struct wlan_network *pnetwork)
+bool rtw_is_same_ibss23a(struct rtw_adapter *adapter,
+                        struct wlan_network *pnetwork)
 {
-       int ret = true;
+       int ret;
        struct security_priv *psecuritypriv = &adapter->securitypriv;
 
        if (psecuritypriv->dot11PrivacyAlgrthm != 0 &&
@@ -363,17 +319,16 @@ int is_same_network23a(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst)
 {
        u16 s_cap, d_cap;
 
-       s_cap = get_unaligned_le16(rtw_get_capability23a_from_ie(src->IEs));
-       d_cap = get_unaligned_le16(rtw_get_capability23a_from_ie(dst->IEs));
+       s_cap = src->capability;
+       d_cap = dst->capability;
 
        return ((src->Ssid.ssid_len == dst->Ssid.ssid_len) &&
                /*      (src->DSConfig == dst->DSConfig) && */
                ether_addr_equal(src->MacAddress, dst->MacAddress) &&
-               ((!memcmp(src->Ssid.ssid, dst->Ssid.ssid, src->Ssid.ssid_len))) &&
-               ((s_cap & WLAN_CAPABILITY_IBSS) ==
-                (d_cap & WLAN_CAPABILITY_IBSS)) &&
-               ((s_cap & WLAN_CAPABILITY_ESS) ==
-                (d_cap & WLAN_CAPABILITY_ESS)));
+               !memcmp(src->Ssid.ssid, dst->Ssid.ssid, src->Ssid.ssid_len) &&
+               (s_cap & WLAN_CAPABILITY_IBSS) ==
+               (d_cap & WLAN_CAPABILITY_IBSS) &&
+               (s_cap & WLAN_CAPABILITY_ESS) == (d_cap & WLAN_CAPABILITY_ESS));
 }
 
 struct wlan_network *
@@ -469,16 +424,11 @@ static void update_current_network(struct rtw_adapter *adapter,
 
        if (check_fwstate(pmlmepriv, _FW_LINKED) &&
            is_same_network23a(&pmlmepriv->cur_network.network, pnetwork)) {
-               int bcn_size;
                update_network23a(&pmlmepriv->cur_network.network,
                                  pnetwork,adapter, true);
 
-               bcn_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-                       offsetof(struct ieee80211_mgmt, u.beacon);
-
                rtw_update_protection23a(adapter,
-                                        pmlmepriv->cur_network.network.IEs +
-                                        bcn_size,
+                                        pmlmepriv->cur_network.network.IEs,
                                         pmlmepriv->cur_network.network.IELength);
        }
 }
@@ -488,8 +438,8 @@ static void update_current_network(struct rtw_adapter *adapter,
 Caller must hold pmlmepriv->lock first.
 
 */
-void rtw_update_scanned_network23a(struct rtw_adapter *adapter,
-                                  struct wlan_bssid_ex *target)
+static void rtw_update_scanned_network(struct rtw_adapter *adapter,
+                                      struct wlan_bssid_ex *target)
 {
        struct list_head *plist, *phead;
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
@@ -572,7 +522,7 @@ static void rtw_add_network(struct rtw_adapter *adapter,
                            struct wlan_bssid_ex *pnetwork)
 {
        update_current_network(adapter, pnetwork);
-       rtw_update_scanned_network23a(adapter, pnetwork);
+       rtw_update_scanned_network(adapter, pnetwork);
 }
 
 /* select the desired network based on the capability of the (i)bss. */
@@ -588,19 +538,16 @@ static int rtw_is_desired_network(struct rtw_adapter *adapter,
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        u32 desired_encmode;
        u32 privacy;
-
-       /* u8 wps_ie[512]; */
-       uint wps_ielen;
-
        int bselected = true;
 
        desired_encmode = psecuritypriv->ndisencryptstatus;
        privacy = pnetwork->network.Privacy;
 
        if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
-               if (rtw_get_wps_ie23a(pnetwork->network.IEs + _FIXED_IE_LENGTH_,
-                                     pnetwork->network.IELength -
-                                     _FIXED_IE_LENGTH_, NULL, &wps_ielen))
+               if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                           WLAN_OUI_TYPE_MICROSOFT_WPA,
+                                           pnetwork->network.IEs,
+                                           pnetwork->network.IELength))
                        return true;
                else
                        return false;
@@ -612,8 +559,7 @@ static int rtw_is_desired_network(struct rtw_adapter *adapter,
                    bselected = false;
        }
 
-       if (desired_encmode != Ndis802_11EncryptionDisabled &&
-           privacy == 0) {
+       if (desired_encmode != Ndis802_11EncryptionDisabled && privacy == 0) {
                DBG_8723A("desired_encmode: %d, privacy: %d\n",
                          desired_encmode, privacy);
                bselected = false;
@@ -640,9 +586,10 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
 {
        u32 len;
        struct wlan_bssid_ex *pnetwork;
-       struct  mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct survey_event *survey = (struct survey_event *)pbuf;
 
-       pnetwork = (struct wlan_bssid_ex *)pbuf;
+       pnetwork = survey->bss;
 
        RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,
                 ("rtw_survey_event_cb23a, ssid=%s\n", pnetwork->Ssid.ssid));
@@ -665,15 +612,22 @@ void rtw_survey_event_cb23a(struct rtw_adapter *adapter, const u8 *pbuf)
                                     pnetwork->MacAddress)) {
                        struct wlan_network* ibss_wlan;
 
-                       memcpy(pmlmepriv->cur_network.network.IEs,
-                              pnetwork->IEs, 8);
+                       pmlmepriv->cur_network.network.beacon_interval =
+                               pnetwork->beacon_interval;
+                       pmlmepriv->cur_network.network.capability =
+                               pnetwork->capability;
+                       pmlmepriv->cur_network.network.tsf = pnetwork->tsf;
                        spin_lock_bh(&pmlmepriv->scanned_queue.lock);
                        ibss_wlan = rtw_find_network23a(
                                &pmlmepriv->scanned_queue,
                                pnetwork->MacAddress);
                        if (ibss_wlan) {
-                               memcpy(ibss_wlan->network.IEs,
-                                      pnetwork->IEs, 8);
+                               pmlmepriv->cur_network.network.beacon_interval =
+                                       ibss_wlan->network.beacon_interval;
+                               pmlmepriv->cur_network.network.capability =
+                                       ibss_wlan->network.capability;
+                               pmlmepriv->cur_network.network.tsf =
+                                       ibss_wlan->network.tsf;
                                spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
                                goto exit;
                        }
@@ -693,16 +647,18 @@ exit:
 
        spin_unlock_bh(&pmlmepriv->lock);
 
+       kfree(survey->bss);
+       survey->bss = NULL;
+
        return;
 }
 
 void
 rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
 {
-       struct  mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
-       struct wlan_bssid_ex *pdev_network;
-       u8 *pibss;
+       int ret;
 
        spin_lock_bh(&pmlmepriv->lock);
 
@@ -729,63 +685,17 @@ rtw_surveydone_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
        rtw_set_signal_stat_timer(&adapter->recvpriv);
 
        if (pmlmepriv->to_join == true) {
+               set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
                if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
-                       if (!check_fwstate(pmlmepriv, _FW_LINKED)) {
-                               set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
-
-                               if (rtw_select_and_join_from_scanned_queue23a(
-                                           pmlmepriv) == _SUCCESS) {
-                                       mod_timer(&pmlmepriv->assoc_timer,
-                                                 jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT));
-                               } else {
-                                       pdev_network = &adapter->registrypriv.dev_network;
-                                       pibss = adapter->registrypriv.dev_network.MacAddress;
-
-                                       _clr_fwstate_(pmlmepriv,
-                                                     _FW_UNDER_SURVEY);
-
-                                       RT_TRACE(_module_rtl871x_mlme_c_,
-                                                _drv_err_,
-                                                ("switching to adhoc "
-                                                 "master\n"));
-
-                                       memset(&pdev_network->Ssid, 0,
-                                              sizeof(struct cfg80211_ssid));
-                                       memcpy(&pdev_network->Ssid,
-                                              &pmlmepriv->assoc_ssid,
-                                              sizeof(struct cfg80211_ssid));
-
-                                       rtw_update_registrypriv_dev_network23a(
-                                               adapter);
-                                       rtw_generate_random_ibss23a(pibss);
-
-                                       pmlmepriv->fw_state =
-                                               WIFI_ADHOC_MASTER_STATE;
-
-                                       if (rtw_createbss_cmd23a(adapter) !=
-                                           _SUCCESS)
-                                       RT_TRACE(_module_rtl871x_mlme_c_,
-                                                _drv_err_,
-                                                ("Error =>rtw_createbss_cmd23a"
-                                                 " status FAIL\n"));
-
-                                       pmlmepriv->to_join = false;
-                               }
-                       }
+                       ret = rtw_select_and_join_from_scanned_queue23a(
+                               pmlmepriv);
+                       if (ret != _SUCCESS)
+                               rtw_do_join_adhoc(adapter);
                } else {
-                       int ret;
-                       set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
                        pmlmepriv->to_join = false;
                        ret = rtw_select_and_join_from_scanned_queue23a(
                                pmlmepriv);
-                       if (ret == _SUCCESS) {
-                               unsigned long e;
-                               e = msecs_to_jiffies(MAX_JOIN_TIMEOUT);
-                               mod_timer(&pmlmepriv->assoc_timer, jiffies + e);
-                       } else if (ret == 2) {/* there is no need to wait */
-                               _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
-                               rtw_indicate_connect23a(adapter);
-                       } else {
+                       if (ret != _SUCCESS) {
                                DBG_8723A("try_to_join, but select scanning "
                                          "queue fail, to_roaming:%d\n",
                                          adapter->mlmepriv.to_roaming);
@@ -830,9 +740,9 @@ static void free_scanqueue(struct mlme_priv *pmlmepriv)
        phead = get_list_head(scan_queue);
 
        list_for_each_safe(plist, ptemp, phead) {
-               list_del_init(plist);
                pnetwork = container_of(plist, struct wlan_network, list);
-               kfree(pnetwork);
+               pnetwork->fixed = false;
+               _rtw_free_network23a(pmlmepriv, pnetwork);
         }
 
        spin_unlock_bh(&scan_queue->lock);
@@ -938,7 +848,7 @@ void rtw_indicate_connect23a(struct rtw_adapter *padapter)
  */
 void rtw_indicate_disconnect23a(struct rtw_adapter *padapter)
 {
-       struct  mlme_priv *pmlmepriv = &padapter->mlmepriv;
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
                 ("+rtw_indicate_disconnect23a\n"));
@@ -1098,7 +1008,6 @@ rtw_joinbss_update_network23a(struct rtw_adapter *padapter,
 {
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct wlan_network *cur_network = &pmlmepriv->cur_network;
-       int bcn_size;
 
        DBG_8723A("%s\n", __func__);
 
@@ -1114,6 +1023,10 @@ rtw_joinbss_update_network23a(struct rtw_adapter *padapter,
        memcpy(&cur_network->network.IEs[0], &ptarget_wlan->network.IEs[0],
               MAX_IE_SZ);
 
+       cur_network->network.capability = ptarget_wlan->network.capability;
+       cur_network->network.beacon_interval =
+               ptarget_wlan->network.beacon_interval;
+       cur_network->network.tsf = ptarget_wlan->network.tsf;
        cur_network->aid = pnetwork->join_res;
 
        rtw_set_signal_stat_timer(&padapter->recvpriv);
@@ -1151,11 +1064,8 @@ rtw_joinbss_update_network23a(struct rtw_adapter *padapter,
                break;
        }
 
-       bcn_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
-
-       rtw_update_protection23a(padapter, cur_network->network.IEs +
-                                bcn_size, cur_network->network.IELength);
+       rtw_update_protection23a(padapter, cur_network->network.IEs,
+                                cur_network->network.IELength);
 
        rtw_update_ht_cap23a(padapter, cur_network->network.IEs,
                             cur_network->network.IELength);
@@ -1188,8 +1098,6 @@ void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf)
                 ("joinbss event call back received with res=%d\n",
                  pnetwork->join_res));
 
-       rtw_get_encrypt_decrypt_from_registrypriv23a(adapter);
-
        if (pmlmepriv->assoc_ssid.ssid_len == 0) {
                RT_TRACE(_module_rtl871x_mlme_c_,_drv_err_,
                         ("@@@@@   joinbss event call back  for Any SSid\n"));
@@ -1429,7 +1337,6 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
        struct sta_info *psta;
        struct wlan_network* pwlan;
        struct wlan_bssid_ex *pdev_network;
-       u8 *pibss;
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        struct stadel_event *pstadel = (struct stadel_event *)pbuf;
        struct sta_priv *pstapriv = &adapter->stapriv;
@@ -1500,32 +1407,11 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
                        spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
                        /* re-create ibss */
                        pdev_network = &adapter->registrypriv.dev_network;
-                       pibss = adapter->registrypriv.dev_network.MacAddress;
 
                        memcpy(pdev_network, &tgt_network->network,
                               get_wlan_bssid_ex_sz(&tgt_network->network));
 
-                       memset(&pdev_network->Ssid, 0,
-                              sizeof(struct cfg80211_ssid));
-                       memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid,
-                              sizeof(struct cfg80211_ssid));
-
-                       rtw_update_registrypriv_dev_network23a(adapter);
-
-                       rtw_generate_random_ibss23a(pibss);
-
-                       if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
-                               set_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
-                               _clr_fwstate_(pmlmepriv, WIFI_ADHOC_STATE);
-                       }
-
-                       if (rtw_createbss_cmd23a(adapter) != _SUCCESS) {
-                               RT_TRACE(_module_rtl871x_ioctl_set_c_,
-                                        _drv_err_,
-                                        ("***Error =>stadel_event_callback: "
-                                         "rtw_createbss_cmd23a status "
-                                         "FAIL***\n"));
-                       }
+                       rtw_do_join_adhoc(adapter);
                }
        }
 
@@ -1539,12 +1425,12 @@ void rtw_stadel_event_callback23a(struct rtw_adapter *adapter, const u8 *pbuf)
 void rtw23a_join_to_handler (unsigned long data)
 {
        struct rtw_adapter *adapter = (struct rtw_adapter *)data;
-       struct  mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        int do_join_r;
 
        DBG_8723A("%s, fw_state=%x\n", __func__, get_fwstate(pmlmepriv));
 
-       if (adapter->bDriverStopped ||adapter->bSurpriseRemoved)
+       if (adapter->bDriverStopped || adapter->bSurpriseRemoved)
                return;
 
        spin_lock_bh(&pmlmepriv->lock);
@@ -1556,7 +1442,7 @@ void rtw23a_join_to_handler (unsigned long data)
                        if (adapter->mlmepriv.to_roaming != 0) {
                                /* try another */
                                DBG_8723A("%s try another roaming\n", __func__);
-                               do_join_r = rtw_do_join23a(adapter);
+                               do_join_r = rtw_do_join(adapter);
                                if (do_join_r != _SUCCESS) {
                                        DBG_8723A("%s roaming do_join return "
                                                  "%d\n", __func__ , do_join_r);
@@ -1590,7 +1476,7 @@ void rtw23a_join_to_handler (unsigned long data)
 void rtw_scan_timeout_handler23a(unsigned long data)
 {
        struct rtw_adapter *adapter = (struct rtw_adapter *)data;
-       struct  mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
 
        DBG_8723A("%s(%s): fw_state =%x\n", __func__, adapter->pnetdev->name,
                  get_fwstate(pmlmepriv));
@@ -1604,26 +1490,9 @@ void rtw_scan_timeout_handler23a(unsigned long data)
        rtw_cfg80211_indicate_scan_done(wdev_to_priv(adapter->rtw_wdev), true);
 }
 
-static void rtw_auto_scan_handler(struct rtw_adapter *padapter)
-{
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-
-       /* auto site survey per 60sec */
-       if (pmlmepriv->scan_interval > 0) {
-               pmlmepriv->scan_interval--;
-               if (pmlmepriv->scan_interval == 0) {
-                       DBG_8723A("%s\n", __func__);
-                       rtw_set_802_11_bssid23a_list_scan(padapter, NULL, 0);
-                       /*  30*2 sec = 60sec */
-                       pmlmepriv->scan_interval = SCAN_INTERVAL;
-               }
-       }
-}
-
 void rtw_dynamic_check_timer_handler(unsigned long data)
 {
        struct rtw_adapter *adapter = (struct rtw_adapter *)data;
-       struct registry_priv *pregistrypriv = &adapter->registrypriv;
 
        if (adapter->hw_init_completed == false)
                goto out;
@@ -1637,10 +1506,6 @@ void rtw_dynamic_check_timer_handler(unsigned long data)
 
        rtw_dynamic_chk_wk_cmd23a(adapter);
 
-       if (pregistrypriv->wifi_spec == 1) {
-               /* auto site survey */
-               rtw_auto_scan_handler(adapter);
-       }
 out:
        mod_timer(&adapter->mlmepriv.dynamic_chk_timer,
                  jiffies + msecs_to_jiffies(2000));
@@ -1755,32 +1620,134 @@ pmlmepriv->lock
 
 */
 
-int rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv)
+static int rtw_do_join(struct rtw_adapter *padapter)
 {
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        int ret;
-       struct list_head *phead, *plist, *ptmp;
-       struct rtw_adapter *adapter;
+
+       pmlmepriv->cur_network.join_res = -2;
+
+       set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
+
+       pmlmepriv->to_join = true;
+
+       ret = rtw_select_and_join_from_scanned_queue23a(pmlmepriv);
+       if (ret == _SUCCESS) {
+               pmlmepriv->to_join = false;
+       } else {
+               if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+                       /* switch to ADHOC_MASTER */
+                       ret = rtw_do_join_adhoc(padapter);
+                       if (ret != _SUCCESS)
+                               goto exit;
+               } else {
+                       /*  can't associate ; reset under-linking */
+                       _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
+
+                       ret = _FAIL;
+                       pmlmepriv->to_join = false;
+               }
+       }
+
+exit:
+       return ret;
+}
+
+static struct wlan_network *
+rtw_select_candidate_from_queue(struct mlme_priv *pmlmepriv)
+{
+       struct wlan_network *pnetwork, *candidate = NULL;
        struct rtw_queue *queue = &pmlmepriv->scanned_queue;
-       struct wlan_network *pnetwork;
-       struct wlan_network *candidate = NULL;
+       struct list_head *phead, *plist, *ptmp;
 
        spin_lock_bh(&pmlmepriv->scanned_queue.lock);
        phead = get_list_head(queue);
-       adapter = pmlmepriv->nic_hdl;
 
        list_for_each_safe(plist, ptmp, phead) {
                pnetwork = container_of(plist, struct wlan_network, list);
                if (!pnetwork) {
                        RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
-                                ("%s return _FAIL:(pnetwork == NULL)\n",
+                                ("%s: return _FAIL:(pnetwork == NULL)\n",
                                  __func__));
-                       ret = _FAIL;
                        goto exit;
                }
 
                rtw_check_join_candidate(pmlmepriv, &candidate, pnetwork);
        }
 
+exit:
+       spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
+       return candidate;
+}
+
+
+int rtw_do_join_adhoc(struct rtw_adapter *adapter)
+{
+       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct wlan_bssid_ex *pdev_network;
+       u8 *ibss;
+       int ret;
+
+       pdev_network = &adapter->registrypriv.dev_network;
+       ibss = adapter->registrypriv.dev_network.MacAddress;
+
+       _clr_fwstate_(pmlmepriv, _FW_UNDER_SURVEY);
+
+       RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
+                ("switching to adhoc master\n"));
+
+       memcpy(&pdev_network->Ssid, &pmlmepriv->assoc_ssid,
+              sizeof(struct cfg80211_ssid));
+
+       rtw_update_registrypriv_dev_network23a(adapter);
+       rtw_generate_random_ibss23a(ibss);
+
+       pmlmepriv->fw_state = WIFI_ADHOC_MASTER_STATE;
+
+       ret = rtw_createbss_cmd23a(adapter);
+       if (ret != _SUCCESS) {
+               RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
+                        ("Error =>rtw_createbss_cmd23a status FAIL\n"));
+       } else  {
+               pmlmepriv->to_join = false;
+       }
+
+       return ret;
+}
+
+int rtw_do_join_network(struct rtw_adapter *adapter,
+                       struct wlan_network *candidate)
+{
+       int ret;
+
+       /*  check for situation of  _FW_LINKED */
+       if (check_fwstate(&adapter->mlmepriv, _FW_LINKED)) {
+               DBG_8723A("%s: _FW_LINKED while ask_for_joinbss!\n", __func__);
+
+               rtw_disassoc_cmd23a(adapter, 0, true);
+               rtw_indicate_disconnect23a(adapter);
+               rtw_free_assoc_resources23a(adapter, 0);
+       }
+       set_fwstate(&adapter->mlmepriv, _FW_UNDER_LINKING);
+
+       ret = rtw_joinbss_cmd23a(adapter, candidate);
+
+       if (ret == _SUCCESS)
+               mod_timer(&adapter->mlmepriv.assoc_timer,
+                         jiffies + msecs_to_jiffies(MAX_JOIN_TIMEOUT));
+
+       return ret;
+}
+
+int rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv)
+{
+       struct rtw_adapter *adapter;
+       struct wlan_network *candidate = NULL;
+       int ret;
+
+       adapter = pmlmepriv->nic_hdl;
+
+       candidate = rtw_select_candidate_from_queue(pmlmepriv);
        if (!candidate) {
                DBG_8723A("%s: return _FAIL(candidate == NULL)\n", __func__);
                ret = _FAIL;
@@ -1792,21 +1759,9 @@ int rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv)
                          candidate->network.DSConfig);
        }
 
-       /*  check for situation of  _FW_LINKED */
-       if (check_fwstate(pmlmepriv, _FW_LINKED)) {
-               DBG_8723A("%s: _FW_LINKED while ask_for_joinbss!!!\n",
-                         __func__);
-
-               rtw_disassoc_cmd23a(adapter, 0, true);
-               rtw_indicate_disconnect23a(adapter);
-               rtw_free_assoc_resources23a(adapter, 0);
-       }
-       set_fwstate(pmlmepriv, _FW_UNDER_LINKING);
-       ret = rtw_joinbss_cmd23a(adapter, candidate);
+       ret = rtw_do_join_network(adapter, candidate);
 
 exit:
-       spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
-
        return ret;
 }
 
@@ -1818,7 +1773,7 @@ int rtw_set_auth23a(struct rtw_adapter * adapter,
        struct cmd_priv *pcmdpriv = &adapter->cmdpriv;
        int res = _SUCCESS;
 
-       pcmd = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
+       pcmd = kzalloc(sizeof(struct cmd_obj), GFP_KERNEL);
        if (!pcmd) {
                res = _FAIL;  /* try again */
                goto exit;
@@ -1954,33 +1909,25 @@ exit:
 
 /* adjust IEs for rtw_joinbss_cmd23a in WMM */
 int rtw_restruct_wmm_ie23a(struct rtw_adapter *adapter, u8 *in_ie,
-                       u8 *out_ie, uint in_len, uint initial_out_len)
+                          u8 *out_ie, uint in_len, uint initial_out_len)
 {
-       unsigned int ielength = 0;
-       unsigned int i, j;
+       int ielength;
+       const u8 *p;
 
-       i = 12; /* after the fixed IE */
-       while (i < in_len) {
-               ielength = initial_out_len;
+       ielength = initial_out_len;
 
-               /* WMM element ID and OUI */
-               if (in_ie[i] == 0xDD && in_ie[i + 2] == 0x00 &&
-                   in_ie[i + 3] == 0x50 && in_ie[i + 4] == 0xF2 &&
-                   in_ie[i + 5] == 0x02 && i+5 < in_len) {
+       p = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                   WLAN_OUI_TYPE_MICROSOFT_WMM,
+                                   in_ie, in_len);
 
-                       /* Append WMM IE to the last index of out_ie */
-                        for (j = i; j < i + 9; j++) {
-                               out_ie[ielength] = in_ie[j];
-                               ielength++;
-                        }
-                        out_ie[initial_out_len + 1] = 0x07;
-                        out_ie[initial_out_len + 6] = 0x00;
-                        out_ie[initial_out_len + 8] = 0x00;
+       if (p && p[1]) {
+               memcpy(out_ie + initial_out_len, p, 9);
 
-                       break;
-               }
+               out_ie[initial_out_len + 1] = 7;
+               out_ie[initial_out_len + 6] = 0;
+               out_ie[initial_out_len + 8] = 0;
 
-               i += (in_ie[i + 1] + 2); /*  to the next IE element */
+               ielength += 9;
        }
 
        return ielength;
@@ -2037,7 +1984,7 @@ static int rtw_append_pmkid(struct rtw_adapter *Adapter, int iEntry,
 {
        struct security_priv *psecuritypriv = &Adapter->securitypriv;
 
-       if (ie[13] <= 20) {
+       if (ie[1] <= 20) {
                /*  The RSN IE didn't include the PMK ID,
                    append the PMK information */
                        ie[ie_len] = 1;
@@ -2048,7 +1995,7 @@ static int rtw_append_pmkid(struct rtw_adapter *Adapter, int iEntry,
                               &psecuritypriv->PMKIDList[iEntry].PMKID, 16);
 
                        ie_len += 16;
-                       ie[13] += 18;/* PMKID length = 2+16 */
+                       ie[1] += 18;/* PMKID length = 2+16 */
        }
        return ie_len;
 }
@@ -2068,15 +2015,13 @@ int rtw_restruct_sec_ie23a(struct rtw_adapter *adapter, u8 *in_ie, u8 *out_ie,
                 ("+rtw_restruct_sec_ie23a: ndisauthmode=%d "
                  "ndissecuritytype=%d\n", ndisauthmode, ndissecuritytype));
 
-       /* copy fixed ie only */
-       memcpy(out_ie, in_ie, 12);
-       ielength = 12;
+       ielength = 0;
        if (ndisauthmode == Ndis802_11AuthModeWPA ||
            ndisauthmode == Ndis802_11AuthModeWPAPSK)
                authmode = WLAN_EID_VENDOR_SPECIFIC;
        if (ndisauthmode == Ndis802_11AuthModeWPA2 ||
            ndisauthmode == Ndis802_11AuthModeWPA2PSK)
-               authmode = _WPA2_IE_ID_;
+               authmode = WLAN_EID_RSN;
 
        if (check_fwstate(pmlmepriv, WIFI_UNDER_WPS)) {
                memcpy(out_ie + ielength, psecuritypriv->wps_ie,
@@ -2084,7 +2029,7 @@ int rtw_restruct_sec_ie23a(struct rtw_adapter *adapter, u8 *in_ie, u8 *out_ie,
 
                ielength += psecuritypriv->wps_ie_len;
        } else if (authmode == WLAN_EID_VENDOR_SPECIFIC ||
-                  authmode == _WPA2_IE_ID_) {
+                  authmode == WLAN_EID_RSN) {
                /* copy RSN or SSN */
                memcpy(&out_ie[ielength], &psecuritypriv->supplicant_ie[0],
                       psecuritypriv->supplicant_ie[1] + 2);
@@ -2095,7 +2040,7 @@ int rtw_restruct_sec_ie23a(struct rtw_adapter *adapter, u8 *in_ie, u8 *out_ie,
        if (iEntry < 0)
                return ielength;
        else {
-               if (authmode == _WPA2_IE_ID_)
+               if (authmode == WLAN_EID_RSN)
                        ielength = rtw_append_pmkid(adapter, iEntry,
                                                    out_ie, ielength);
        }
@@ -2115,7 +2060,7 @@ void rtw_init_registrypriv_dev_network23a(struct rtw_adapter* adapter)
        memcpy(&pdev_network->Ssid, &pregistrypriv->ssid,
               sizeof(struct cfg80211_ssid));
 
-       pdev_network->BeaconPeriod = 100;
+       pdev_network->beacon_interval = 100;
 }
 
 void rtw_update_registrypriv_dev_network23a(struct rtw_adapter* adapter)
@@ -2157,11 +2102,6 @@ void rtw_update_registrypriv_dev_network23a(struct rtw_adapter* adapter)
        /* pdev_network->IELength = cpu_to_le32(sz); */
 }
 
-void rtw_get_encrypt_decrypt_from_registrypriv23a(struct rtw_adapter* adapter)
-{
-
-}
-
 /* the fucntion is at passive_level */
 void rtw_joinbss_reset23a(struct rtw_adapter *padapter)
 {
@@ -2192,29 +2132,30 @@ void rtw_joinbss_reset23a(struct rtw_adapter *padapter)
 }
 
 /* the fucntion is >= passive_level */
-unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
-                                     u8 *out_ie, uint in_len, uint *pout_len)
+bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
+                             u8 *out_ie, uint in_len, uint *pout_len)
 {
        u32 out_len;
        int max_rx_ampdu_factor;
        unsigned char *pframe;
        const u8 *p;
        struct ieee80211_ht_cap ht_capie;
-       unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
+       u8 WMM_IE[7] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00};
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct ht_priv *phtpriv = &pmlmepriv->htpriv;
 
        phtpriv->ht_option = false;
 
-       p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, in_ie + 12, in_len -12);
+       p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, in_ie, in_len);
 
        if (p && p[1] > 0) {
                u32 rx_packet_offset, max_recvbuf_sz;
                if (pmlmepriv->qos_option == 0) {
                        out_len = *pout_len;
                        pframe = rtw_set_ie23a(out_ie + out_len,
-                                           WLAN_EID_VENDOR_SPECIFIC,
-                                           _WMM_IE_Length_, WMM_IE, pout_len);
+                                              WLAN_EID_VENDOR_SPECIFIC,
+                                              sizeof(WMM_IE), WMM_IE,
+                                              pout_len);
 
                        pmlmepriv->qos_option = 1;
                }
@@ -2250,9 +2191,8 @@ unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
 
                phtpriv->ht_option = true;
 
-               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, in_ie + 12,
-                                    in_len -12);
-               if (p && (p[1] == sizeof(struct ieee80211_ht_addt_info))) {
+               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, in_ie, in_len);
+               if (p && (p[1] == sizeof(struct ieee80211_ht_operation))) {
                        out_len = *pout_len;
                        pframe = rtw_set_ie23a(out_ie + out_len,
                                               WLAN_EID_HT_OPERATION,
@@ -2269,13 +2209,12 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
        u8 max_ampdu_sz;
        const u8 *p;
        struct ieee80211_ht_cap *pht_capie;
-       struct ieee80211_ht_addt_info *pht_addtinfo;
+       struct ieee80211_ht_operation *pht_addtinfo;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct ht_priv *phtpriv = &pmlmepriv->htpriv;
        struct registry_priv *pregistrypriv = &padapter->registrypriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       int bcn_fixed_size;
 
        if (!phtpriv->ht_option)
                return;
@@ -2285,16 +2224,8 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
 
        DBG_8723A("+rtw_update_ht_cap23a()\n");
 
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
-
-       /* Adjust pie + ie_len for our searches */
-       pie += bcn_fixed_size;
-       ie_len -= bcn_fixed_size;
-
        /* maybe needs check if ap supports rx ampdu. */
-       if (phtpriv->ampdu_enable == false &&
-           pregistrypriv->ampdu_enable == 1) {
+       if (!phtpriv->ampdu_enable && pregistrypriv->ampdu_enable == 1) {
                if (pregistrypriv->wifi_spec == 1)
                        phtpriv->ampdu_enable = false;
                else
@@ -2317,35 +2248,38 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
 
        p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pie, ie_len);
        if (p && p[1] > 0) {
-               pht_addtinfo = (struct ieee80211_ht_addt_info *)(p + 2);
+               pht_addtinfo = (struct ieee80211_ht_operation *)(p + 2);
                /* todo: */
        }
 
        /* update cur_bwmode & cur_ch_offset */
        if (pregistrypriv->cbw40_enable &&
-           pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info & BIT(1) &&
-           pmlmeinfo->HT_info.infos[0] & BIT(2)) {
+           pmlmeinfo->ht_cap.cap_info &
+           cpu_to_le16(IEEE80211_HT_CAP_SUP_WIDTH_20_40) &&
+           pmlmeinfo->HT_info.ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) {
                int i;
                u8 rf_type;
 
                rf_type = rtl8723a_get_rf_type(padapter);
 
                /* update the MCS rates */
-               for (i = 0; i < 16; i++) {
+               for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) {
                        if (rf_type == RF_1T1R || rf_type == RF_1T2R)
-                               pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R23A[i];
+                               pmlmeinfo->ht_cap.mcs.rx_mask[i] &=
+                                       MCS_rate_1R23A[i];
                        else
-                               pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R23A[i];
+                               pmlmeinfo->ht_cap.mcs.rx_mask[i] &=
+                                       MCS_rate_2R23A[i];
                }
                /* switch to the 40M Hz mode accoring to the AP */
                pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40;
-               switch ((pmlmeinfo->HT_info.infos[0] & 0x3))
-               {
-               case HT_EXTCHNL_OFFSET_UPPER:
+               switch (pmlmeinfo->HT_info.ht_param &
+                       IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+               case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                        pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
                        break;
 
-               case HT_EXTCHNL_OFFSET_LOWER:
+               case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
                        pmlmeext->cur_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
                        break;
 
@@ -2359,15 +2293,18 @@ void rtw_update_ht_cap23a(struct rtw_adapter *padapter, u8 *pie, uint ie_len)
        /*  */
        /*  Config SM Power Save setting */
        /*  */
-       pmlmeinfo->SM_PS = (pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info &
-                           0x0C) >> 2;
+       pmlmeinfo->SM_PS =
+               (le16_to_cpu(pmlmeinfo->ht_cap.cap_info) &
+                IEEE80211_HT_CAP_SM_PS) >> IEEE80211_HT_CAP_SM_PS_SHIFT;
        if (pmlmeinfo->SM_PS == WLAN_HT_CAP_SM_PS_STATIC)
                DBG_8723A("%s(): WLAN_HT_CAP_SM_PS_STATIC\n", __func__);
 
        /*  */
        /*  Config current HT Protection mode. */
        /*  */
-       pmlmeinfo->HT_protection = pmlmeinfo->HT_info.infos[1] & 0x3;
+       pmlmeinfo->HT_protection =
+               le16_to_cpu(pmlmeinfo->HT_info.operation_mode) &
+               IEEE80211_HT_OP_MODE_PROTECTION;
 }
 
 void rtw_issue_addbareq_cmd23a(struct rtw_adapter *padapter,
@@ -2405,7 +2342,7 @@ void rtw_issue_addbareq_cmd23a(struct rtw_adapter *padapter,
 
        phtpriv = &psta->htpriv;
 
-       if (phtpriv->ht_option == true && phtpriv->ampdu_enable == true) {
+       if (phtpriv->ht_option && phtpriv->ampdu_enable) {
                issued = (phtpriv->agg_enable_bitmap>>priority)&0x1;
                issued |= (phtpriv->candidate_tid_bitmap>>priority)&0x1;
 
index e1b28a2342597c15715f3ae7dc05b1c887826214..3655ee5e8347f2940b0cc3020b4114260ca1e1d1 100644 (file)
@@ -61,6 +61,8 @@ static void start_clnt_assoc(struct rtw_adapter *padapter);
 static void start_clnt_auth(struct rtw_adapter *padapter);
 static void start_clnt_join(struct rtw_adapter *padapter);
 static void start_create_ibss(struct rtw_adapter *padapter);
+static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
+                                             struct recv_frame *precv_frame);
 
 #ifdef CONFIG_8723AU_AP_MODE
 static int OnAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame);
@@ -107,12 +109,12 @@ static u8 null_addr[ETH_ALEN]= {0, 0, 0, 0, 0, 0};
 OUI definitions for the vendor specific IE
 ***************************************************/
 unsigned char WMM_OUI23A[] = {0x00, 0x50, 0xf2, 0x02};
-unsigned char  WPS_OUI23A[] = {0x00, 0x50, 0xf2, 0x04};
-unsigned char  P2P_OUI23A[] = {0x50, 0x6F, 0x9A, 0x09};
-unsigned char  WFD_OUI23A[] = {0x50, 0x6F, 0x9A, 0x0A};
+unsigned char WPS_OUI23A[] = {0x00, 0x50, 0xf2, 0x04};
+unsigned char P2P_OUI23A[] = {0x50, 0x6F, 0x9A, 0x09};
+unsigned char WFD_OUI23A[] = {0x50, 0x6F, 0x9A, 0x0A};
 
-unsigned char  WMM_INFO_OUI23A[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
-unsigned char  WMM_PARA_OUI23A[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
+unsigned char WMM_INFO_OUI23A[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
+unsigned char WMM_PARA_OUI23A[] = {0x00, 0x50, 0xf2, 0x02, 0x01, 0x01};
 
 static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
 
@@ -120,49 +122,87 @@ static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
 MCS rate definitions
 *********************************************************/
 unsigned char MCS_rate_2R23A[16] = {
-       0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
+       0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0,
+       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
 unsigned char MCS_rate_1R23A[16] = {
-       0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
+       0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0,
+       0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
 
 /********************************************************
 ChannelPlan definitions
 *********************************************************/
 
-static struct rt_channel_plan_2g       RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {
-       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},              /*  0x00, RT_CHANNEL_DOMAIN_2G_WORLD , Passive scan CH 12, 13 */
-       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},              /*  0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */
-       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},                      /*  0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */
-       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14},  /*  0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 */
-       {{10, 11, 12, 13}, 4},                                  /*  0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 */
-       {{}, 0},                                                                        /*  0x05, RT_CHANNEL_DOMAIN_2G_NULL */
+static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = {
+       /*  0x00, RT_CHANNEL_DOMAIN_2G_WORLD , Passive scan CH 12, 13 */
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},
+       /*  0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},
+       /*  0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},
+       /*  0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 */
+       {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14},
+       /*  0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 */
+       {{10, 11, 12, 13}, 4},
+       /*  0x05, RT_CHANNEL_DOMAIN_2G_NULL */
+       {{}, 0},
 };
 
-static struct rt_channel_plan_5g       RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = {
-       {{}, 0},                                                                                                                                                                        /*  0x00, RT_CHANNEL_DOMAIN_5G_NULL */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 19},                                          /*  0x01, RT_CHANNEL_DOMAIN_5G_ETSI1 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24}, /*  0x02, RT_CHANNEL_DOMAIN_5G_ETSI2 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 149, 153, 157, 161, 165}, 22},                   /*  0x03, RT_CHANNEL_DOMAIN_5G_ETSI3 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24}, /*  0x04, RT_CHANNEL_DOMAIN_5G_FCC1 */
-       {{36, 40, 44, 48, 149, 153, 157, 161, 165}, 9},                                                                                                         /*  0x05, RT_CHANNEL_DOMAIN_5G_FCC2 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 13},                                                                                        /*  0x06, RT_CHANNEL_DOMAIN_5G_FCC3 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161}, 12},                                                                                             /*  0x07, RT_CHANNEL_DOMAIN_5G_FCC4 */
-       {{149, 153, 157, 161, 165}, 5},                                                                                                                                 /*  0x08, RT_CHANNEL_DOMAIN_5G_FCC5 */
-       {{36, 40, 44, 48, 52, 56, 60, 64}, 8},                                                                                                                          /*  0x09, RT_CHANNEL_DOMAIN_5G_FCC6 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 20},                                     /*  0x0A, RT_CHANNEL_DOMAIN_5G_FCC7_IC1 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 149, 153, 157, 161, 165}, 20},                                     /*  0x0B, RT_CHANNEL_DOMAIN_5G_KCC1 */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 19},                                          /*  0x0C, RT_CHANNEL_DOMAIN_5G_MKK1 */
-       {{36, 40, 44, 48, 52, 56, 60, 64}, 8},                                                                                                                          /*  0x0D, RT_CHANNEL_DOMAIN_5G_MKK2 */
-       {{100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 11},                                                                                  /*  0x0E, RT_CHANNEL_DOMAIN_5G_MKK3 */
-       {{56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 15},                                                         /*  0x0F, RT_CHANNEL_DOMAIN_5G_NCC1 */
-       {{56, 60, 64, 149, 153, 157, 161, 165}, 8},                                                                                                                     /*  0x10, RT_CHANNEL_DOMAIN_5G_NCC2 */
-
-       /*  Driver self defined for old channel plan Compatible , Remember to modify if have new channel plan definition ===== */
-       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140, 149, 153, 157, 161, 165}, 21},                                /*  0x11, RT_CHANNEL_DOMAIN_5G_FCC */
-       {{36, 40, 44, 48}, 4},                                                                                                                                                  /*  0x12, RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS */
-       {{36, 40, 44, 48, 149, 153, 157, 161}, 8},                                                                                                                              /*  0x13, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */
+static struct rt_channel_plan_5g RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = {
+       /*  0x00, RT_CHANNEL_DOMAIN_5G_NULL */
+       {{}, 0},
+       /*  0x01, RT_CHANNEL_DOMAIN_5G_ETSI1 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 120, 124, 128, 132, 136, 140}, 19},
+       /*  0x02, RT_CHANNEL_DOMAIN_5G_ETSI2 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24},
+       /*  0x03, RT_CHANNEL_DOMAIN_5G_ETSI3 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 120, 124, 128, 132, 149, 153, 157, 161, 165}, 22},
+       /*  0x04, RT_CHANNEL_DOMAIN_5G_FCC1 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24},
+       /*  0x05, RT_CHANNEL_DOMAIN_5G_FCC2 */
+       {{36, 40, 44, 48, 149, 153, 157, 161, 165}, 9},
+       /*  0x06, RT_CHANNEL_DOMAIN_5G_FCC3 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 13},
+       /*  0x07, RT_CHANNEL_DOMAIN_5G_FCC4 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161}, 12},
+       /*  0x08, RT_CHANNEL_DOMAIN_5G_FCC5 */
+       {{149, 153, 157, 161, 165}, 5},
+       /*  0x09, RT_CHANNEL_DOMAIN_5G_FCC6 */
+       {{36, 40, 44, 48, 52, 56, 60, 64}, 8},
+       /*  0x0A, RT_CHANNEL_DOMAIN_5G_FCC7_IC1 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 136, 140, 149, 153, 157, 161, 165}, 20},
+       /*  0x0B, RT_CHANNEL_DOMAIN_5G_KCC1 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 120, 124, 149, 153, 157, 161, 165}, 20},
+       /*  0x0C, RT_CHANNEL_DOMAIN_5G_MKK1 */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 120, 124, 128, 132, 136, 140}, 19},
+       /*  0x0D, RT_CHANNEL_DOMAIN_5G_MKK2 */
+       {{36, 40, 44, 48, 52, 56, 60, 64}, 8},
+       /*  0x0E, RT_CHANNEL_DOMAIN_5G_MKK3 */
+       {{100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 11},
+       /*  0x0F, RT_CHANNEL_DOMAIN_5G_NCC1 */
+       {{56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149,
+         153, 157, 161, 165}, 15},
+       /*  0x10, RT_CHANNEL_DOMAIN_5G_NCC2 */
+       {{56, 60, 64, 149, 153, 157, 161, 165}, 8},
+
+       /*  Driver self defined for old channel plan Compatible,
+           Remember to modify if have new channel plan definition ===== */
+       /*  0x11, RT_CHANNEL_DOMAIN_5G_FCC */
+       {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
+         116, 132, 136, 140, 149, 153, 157, 161, 165}, 21},
+       /*  0x12, RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS */
+       {{36, 40, 44, 48}, 4},
+       /*  0x13, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */
+       {{36, 40, 44, 48, 149, 153, 157, 161}, 8},
 };
 
-static struct rt_channel_plan_map      RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
+static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
        /*  0x00 ~ 0x1F , Old Define ===== */
        {0x02, 0x11},   /* 0x00, RT_CHANNEL_DOMAIN_FCC */
        {0x02, 0x0A},   /* 0x01, RT_CHANNEL_DOMAIN_IC */
@@ -233,7 +273,8 @@ static struct rt_channel_plan_map   RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
        {0x03, 0x00},   /* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G */
 };
 
-static struct rt_channel_plan_map      RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03, 0x02}; /* use the conbination for max channel numbers */
+static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE =
+{0x03, 0x02}; /* use the conbination for max channel numbers */
 
 static void dummy_event_callback(struct rtw_adapter *adapter, const u8 *pbuf)
 {
@@ -250,8 +291,7 @@ static struct fwevent wlanevents[] =
        {0, NULL},
        {0, NULL},
        {0, &rtw_survey_event_cb23a},           /*8*/
-       {sizeof (struct surveydone_event), &rtw_surveydone_event_callback23a},  /*9*/
-
+       {sizeof (struct surveydone_event), &rtw_surveydone_event_callback23a},
        {0, &rtw23a_joinbss_event_cb},          /*10*/
        {sizeof(struct stassoc_event), &rtw_stassoc_event_callback23a},
        {sizeof(struct stadel_event), &rtw_stadel_event_callback23a},
@@ -309,7 +349,7 @@ Following are the initialization functions for WiFi MLME
 
 int init_hw_mlme_ext23a(struct rtw_adapter *padapter)
 {
-       struct  mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
        set_channel_bwmode23a(padapter, pmlmeext->cur_channel,
                              pmlmeext->cur_ch_offset, pmlmeext->cur_bwmode);
@@ -318,7 +358,7 @@ int init_hw_mlme_ext23a(struct rtw_adapter *padapter)
 
 static void init_mlme_ext_priv23a_value(struct rtw_adapter* padapter)
 {
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        unsigned char   mixed_datarate[NumRates] = {
                _1M_RATE_, _2M_RATE_, _5M_RATE_, _11M_RATE_, _6M_RATE_,
@@ -391,8 +431,8 @@ static int has_channel(struct rt_channel_info *channel_set,
 static void init_channel_list(struct rtw_adapter *padapter,
                              struct rt_channel_info *channel_set,
                              u8 chanset_size,
-                             struct p2p_channels *channel_list) {
-
+                             struct p2p_channels *channel_list)
+{
        struct p2p_oper_class_map op_class[] = {
                { IEEE80211G,  81,   1,  13,  1, BW20 },
                { IEEE80211G,  82,  14,  14,  1, BW20 },
@@ -526,7 +566,7 @@ static u8 init_channel_set(struct rtw_adapter* padapter, u8 cplan,
 
 int init_mlme_ext_priv23a(struct rtw_adapter* padapter)
 {
-       int     res = _SUCCESS;
+       int res = _SUCCESS;
        struct registry_priv* pregistrypriv = &padapter->registrypriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -751,7 +791,6 @@ OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        struct sta_priv *pstapriv = &padapter->stapriv;
        struct sk_buff *skb = precv_frame->pkt;
        struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) skb->data;
-       u8 *pframe = skb->data;
        int pkt_len = skb->len;
        struct wlan_bssid_ex *pbss;
        int ret = _SUCCESS;
@@ -788,16 +827,11 @@ OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        if (pmlmeinfo->state & WIFI_FW_AUTH_NULL) {
                /* we should update current network before auth,
                   or some IE is wrong */
-               pbss = (struct wlan_bssid_ex *)
-                       kmalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
+               pbss = collect_bss_info(padapter, precv_frame);
                if (pbss) {
-                       if (collect_bss_info23a(padapter, precv_frame, pbss) ==
-                           _SUCCESS) {
-                               update_network23a(
-                                       &pmlmepriv->cur_network.network, pbss,
-                                       padapter, true);
-                               rtw_get_bcn_info23a(&pmlmepriv->cur_network);
-                       }
+                       update_network23a(&pmlmepriv->cur_network.network, pbss,
+                                         padapter, true);
+                       rtw_get_bcn_info23a(&pmlmepriv->cur_network);
                        kfree(pbss);
                }
 
@@ -820,7 +854,7 @@ OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
                psta = rtw_get_stainfo23a(pstapriv, mgmt->sa);
                if (psta) {
                        ret = rtw_check_bcn_info23a(padapter, mgmt, pkt_len);
-                       if (!ret) {
+                       if (ret != _SUCCESS) {
                                DBG_8723A_LEVEL(_drv_always_, "ap has changed, "
                                                "disconnect now\n");
                                receive_disconnect23a(padapter, pmlmeinfo->network.MacAddress, 65535);
@@ -831,7 +865,7 @@ OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
                           the number of the beacon received */
                        if ((sta_rx_pkts(psta) & 0xf) == 0) {
                                /* DBG_8723A("update_bcn_info\n"); */
-                               update_beacon23a_info(padapter, pframe,
+                               update_beacon23a_info(padapter, mgmt,
                                                      pkt_len, psta);
                        }
                }
@@ -843,7 +877,7 @@ OnBeacon23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
                           number of the beacon received */
                        if ((sta_rx_pkts(psta) & 0xf) == 0) {
                                /* DBG_8723A("update_bcn_info\n"); */
-                               update_beacon23a_info(padapter, pframe,
+                               update_beacon23a_info(padapter, mgmt,
                                                      pkt_len, psta);
                        }
                } else {
@@ -1053,7 +1087,7 @@ auth_fail:
        pstat = &stat;
        memset((char *)pstat, '\0', sizeof(stat));
        pstat->auth_seq = 2;
-       memcpy(pstat->hwaddr, sa, 6);
+       ether_addr_copy(pstat->hwaddr, sa);
 
        issue_auth(padapter, pstat, (unsigned short)status);
 
@@ -1170,11 +1204,11 @@ static int rtw_validate_vendor_specific_ies(const u8 *pos, int elen)
                /* Microsoft/Wi-Fi information elements are further typed and
                 * subtyped */
                switch (pos[3]) {
-               case 1:
+               case WLAN_OUI_TYPE_MICROSOFT_WPA:
                        /* Microsoft OUI (00:50:F2) with OUI Type 1:
                         * real WPA information element */
                        break;
-               case WME_OUI_TYPE: /* this is a Wi-Fi WME info. element */
+               case WLAN_OUI_TYPE_MICROSOFT_WMM:
                        if (elen < 5) {
                                DBG_8723A("short WME information element "
                                          "ignored (len =%i)\n", elen);
@@ -1193,7 +1227,7 @@ static int rtw_validate_vendor_specific_ies(const u8 *pos, int elen)
                                return -EINVAL;
                        }
                        break;
-               case 4:
+               case WLAN_OUI_TYPE_MICROSOFT_WPS:
                        /* Wi-Fi Protected Setup (WPS) IE */
                        break;
                default:
@@ -1255,6 +1289,7 @@ static int rtw_validate_frame_ies(const u8 *start, uint len)
                case WLAN_EID_CHALLENGE:
                case WLAN_EID_ERP_INFO:
                case WLAN_EID_EXT_SUPP_RATES:
+                       break;
                case WLAN_EID_VENDOR_SPECIFIC:
                        if (rtw_validate_vendor_specific_ies(pos, elen))
                                unknown++;
@@ -1292,7 +1327,6 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        u16 capab_info, listen_interval;
        struct sta_info *pstat;
        unsigned char reassoc;
-       unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01};
        int i, wpa_ie_len, left;
        unsigned char supportRate[16];
        int supportRateNum;
@@ -1500,31 +1534,6 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
                                   "Association Request - possible WPS use\n");
                        pstat->flags |= WLAN_STA_MAYBE_WPS;
                }
-
-               /*  AP support WPA/RSN, and sta is going to do WPS, but AP
-                   is not ready */
-               /*  that the selected registrar of AP is _FLASE */
-               if (psecuritypriv->wpa_psk > 0 &&
-                   pstat->flags & (WLAN_STA_WPS|WLAN_STA_MAYBE_WPS)) {
-                       if (pmlmepriv->wps_beacon_ie) {
-                               u8 selected_registrar = 0;
-
-                               rtw_get_wps_attr_content23a(
-                                       pmlmepriv->wps_beacon_ie,
-                                       pmlmepriv->wps_beacon_ie_len,
-                                       WPS_ATTR_SELECTED_REGISTRAR,
-                                       &selected_registrar, NULL);
-
-                               if (!selected_registrar) {
-                                       DBG_8723A("selected_registrar is false,"
-                                                 "or AP is not ready to do "
-                                                 "WPS\n");
-
-                                       status = WLAN_STATUS_AP_UNABLE_TO_HANDLE_NEW_STA;
-                                       goto OnAssocReq23aFail;
-                               }
-                       }
-               }
        } else {
                int copy_len;
 
@@ -1567,47 +1576,46 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
 
                for (;;) {
                        left = end - p;
-                       p = cfg80211_find_ie(WLAN_EID_VENDOR_SPECIFIC, p, left);
+                       p = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                                   WLAN_OUI_TYPE_MICROSOFT_WMM,
+                                                   p, left);
                        if (p) {
-                               if (!memcmp(p + 2, WMM_IE, 6)) {
-                                       pstat->flags |= WLAN_STA_WME;
+                               pstat->flags |= WLAN_STA_WME;
 
-                                       pstat->qos_option = 1;
-                                       pstat->qos_info = *(p + 8);
+                               pstat->qos_option = 1;
+                               pstat->qos_info = *(p + 8);
 
-                                       pstat->max_sp_len =
-                                               (pstat->qos_info >> 5) & 0x3;
+                               pstat->max_sp_len =
+                                       (pstat->qos_info >> 5) & 0x3;
 
-                                       if ((pstat->qos_info & 0xf) != 0xf)
-                                               pstat->has_legacy_ac = true;
-                                       else
-                                               pstat->has_legacy_ac = false;
-
-                                       if (pstat->qos_info & 0xf) {
-                                               if (pstat->qos_info & BIT(0))
-                                                       pstat->uapsd_vo = BIT(0)|BIT(1);
-                                               else
-                                                       pstat->uapsd_vo = 0;
+                               if ((pstat->qos_info & 0xf) != 0xf)
+                                       pstat->has_legacy_ac = true;
+                               else
+                                       pstat->has_legacy_ac = false;
 
-                                               if (pstat->qos_info & BIT(1))
-                                                       pstat->uapsd_vi = BIT(0)|BIT(1);
-                                               else
-                                                       pstat->uapsd_vi = 0;
+                               if (pstat->qos_info & 0xf) {
+                                       if (pstat->qos_info & BIT(0))
+                                               pstat->uapsd_vo = BIT(0)|BIT(1);
+                                       else
+                                               pstat->uapsd_vo = 0;
 
-                                               if (pstat->qos_info & BIT(2))
-                                                       pstat->uapsd_bk = BIT(0)|BIT(1);
-                                               else
-                                                       pstat->uapsd_bk = 0;
+                                       if (pstat->qos_info & BIT(1))
+                                               pstat->uapsd_vi = BIT(0)|BIT(1);
+                                       else
+                                               pstat->uapsd_vi = 0;
 
-                                               if (pstat->qos_info & BIT(3))
-                                                       pstat->uapsd_be = BIT(0)|BIT(1);
-                                               else
-                                                       pstat->uapsd_be = 0;
+                                       if (pstat->qos_info & BIT(2))
+                                               pstat->uapsd_bk = BIT(0)|BIT(1);
+                                       else
+                                               pstat->uapsd_bk = 0;
 
-                                       }
+                                       if (pstat->qos_info & BIT(3))
+                                               pstat->uapsd_be = BIT(0)|BIT(1);
+                                       else
+                                               pstat->uapsd_be = 0;
 
-                                       break;
                                }
+                               break;
                        } else {
                                break;
                        }
@@ -1629,7 +1637,7 @@ OnAssocReq23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        } else
                pstat->flags &= ~WLAN_STA_HT;
 
-       if (pmlmepriv->htpriv.ht_option == false && pstat->flags & WLAN_STA_HT){
+       if (!pmlmepriv->htpriv.ht_option && pstat->flags & WLAN_STA_HT){
                status = WLAN_STATUS_UNSPECIFIED_FAILURE;
                goto OnAssocReq23aFail;
        }
@@ -1768,11 +1776,12 @@ OnAssocRsp23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct sk_buff *skb = precv_frame->pkt;
        struct ieee80211_mgmt *pmgmt = (struct ieee80211_mgmt *) skb->data;
-       int res, i;
+       int res;
        unsigned short status;
-       u8 *p;
+       const u8 *p, *pie;
        u8 *pframe = skb->data;
        int pkt_len = skb->len;
+       int pielen;
 
        DBG_8723A("%s\n", __func__);
 
@@ -1806,38 +1815,45 @@ OnAssocRsp23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
        /* AID */
        res = pmlmeinfo->aid = le16_to_cpu(pmgmt->u.assoc_resp.aid) & 0x3fff;
 
-       /* following are moved to join event callback function */
-       /* to handle HT, WMM, rate adaptive, update MAC reg */
-       /* for not to handle the synchronous IO in the tasklet */
-       for (i = offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
-            i < pkt_len;) {
-               p = pframe + i;
-
-               switch (p[0])
-               {
-               case WLAN_EID_VENDOR_SPECIFIC:
-                       if (!memcmp(p + 2, WMM_PARA_OUI23A, 6))/* WMM */
-                               WMM_param_handler23a(padapter, p);
-                       break;
-
-               case WLAN_EID_HT_CAPABILITY:    /* HT caps */
-                       HT_caps_handler23a(padapter, p);
+       pie = pframe + offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
+       pielen = pkt_len -
+               offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
+
+       p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
+                            pmgmt->u.assoc_resp.variable, pielen);
+       if (p && p[1])
+               HT_caps_handler23a(padapter, p);
+
+       p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
+                            pmgmt->u.assoc_resp.variable, pielen);
+       if (p && p[1])
+               HT_info_handler23a(padapter, p);
+
+       p = cfg80211_find_ie(WLAN_EID_ERP_INFO,
+                            pmgmt->u.assoc_resp.variable, pielen);
+       if (p && p[1])
+               ERP_IE_handler23a(padapter, p);
+
+       pie = pframe + offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
+       while (true) {
+               p = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                           WLAN_OUI_TYPE_MICROSOFT_WMM,
+                                           pie, pframe + pkt_len - pie);
+               if (!p)
                        break;
 
-               case WLAN_EID_HT_OPERATION:     /* HT info */
-                       HT_info_handler23a(padapter, p);
+               pie = p + p[1] + 2;
+               /* if this IE is too short, try the next */
+               if (p[1] <= 4)
+                       continue;
+               /* if this IE is WMM params, we found what we wanted */
+               if (p[6] == 1)
                        break;
-
-               case WLAN_EID_ERP_INFO:
-                       ERP_IE_handler23a(padapter, p);
-
-               default:
-                       break;
-               }
-
-               i += (p[1] + 2);
        }
 
+       if (p && p[1])
+               WMM_param_handler23a(padapter, p);
+
        pmlmeinfo->state &= ~WIFI_FW_ASSOC_STATE;
        pmlmeinfo->state |= WIFI_FW_ASSOC_SUCCESS;
 
@@ -1920,7 +1936,7 @@ OnDeAuth23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
 static int
 OnDisassoc23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
 {
-       unsigned short  reason;
+       unsigned short reason;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -2090,136 +2106,32 @@ static int OnAction23a_back23a(struct rtw_adapter *padapter,
        return _SUCCESS;
 }
 
-static int rtw_action_public_decache(struct recv_frame *recv_frame, s32 token)
-{
-       struct rtw_adapter *adapter = recv_frame->adapter;
-       struct mlme_ext_priv *mlmeext = &adapter->mlmeextpriv;
-       struct sk_buff *skb = recv_frame->pkt;
-       struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
-       u16 seq_ctrl;
-
-       seq_ctrl = ((recv_frame->attrib.seq_num&0xffff) << 4) |
-               (recv_frame->attrib.frag_num & 0xf);
-
-       if (ieee80211_has_retry(hdr->frame_control)) {
-               if (token >= 0) {
-                       if ((seq_ctrl == mlmeext->action_public_rxseq) &&
-                           (token == mlmeext->action_public_dialog_token)) {
-                               DBG_8723A("%s(%s): seq_ctrl = 0x%x, "
-                                         "rxseq = 0x%x, token:%d\n", __func__,
-                                         adapter->pnetdev->name, seq_ctrl,
-                                         mlmeext->action_public_rxseq, token);
-                               return _FAIL;
-                       }
-               } else {
-                       if (seq_ctrl == mlmeext->action_public_rxseq) {
-                               DBG_8723A("%s(%s): seq_ctrl = 0x%x, "
-                                         "rxseq = 0x%x\n", __func__,
-                                         adapter->pnetdev->name, seq_ctrl,
-                                         mlmeext->action_public_rxseq);
-                               return _FAIL;
-                       }
-               }
-       }
-
-       mlmeext->action_public_rxseq = seq_ctrl;
-
-       if (token >= 0)
-               mlmeext->action_public_dialog_token = token;
-
-       return _SUCCESS;
-}
-
-static int on_action_public23a_p2p(struct recv_frame *precv_frame)
-{
-       struct sk_buff *skb = precv_frame->pkt;
-       u8 *pframe = skb->data;
-       u8 *frame_body;
-       u8 dialogToken = 0;
-
-       frame_body = (unsigned char *)
-               (pframe + sizeof(struct ieee80211_hdr_3addr));
-
-       dialogToken = frame_body[7];
-
-       if (rtw_action_public_decache(precv_frame, dialogToken) == _FAIL)
-               return _FAIL;
-
-       return _SUCCESS;
-}
-
-static int on_action_public23a_vendor(struct recv_frame *precv_frame)
-{
-       unsigned int ret = _FAIL;
-       struct sk_buff *skb = precv_frame->pkt;
-       u8 *pframe = skb->data;
-       u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
-
-       if (!memcmp(frame_body + 2, P2P_OUI23A, 4)) {
-               ret = on_action_public23a_p2p(precv_frame);
-       }
-
-       return ret;
-}
-
-static unsigned int
-on_action_public23a_default(struct recv_frame *precv_frame, u8 action)
-{
-       unsigned int ret = _FAIL;
-       struct sk_buff *skb = precv_frame->pkt;
-       u8 *pframe = skb->data;
-       uint frame_len = skb->len;
-       u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
-       u8 token;
-       struct rtw_adapter *adapter = precv_frame->adapter;
-       int cnt = 0;
-       char msg[64];
-
-       token = frame_body[2];
-
-       if (rtw_action_public_decache(precv_frame, token) == _FAIL)
-               goto exit;
-
-       cnt += sprintf((msg+cnt), "%s(token:%u)",
-                      action_public_str23a(action), token);
-       rtw_cfg80211_rx_action(adapter, pframe, frame_len, msg);
-
-       ret = _SUCCESS;
-
-exit:
-       return ret;
-}
-
 static int on_action_public23a(struct rtw_adapter *padapter,
                               struct recv_frame *precv_frame)
 {
-       int ret = _FAIL;
        struct sk_buff *skb = precv_frame->pkt;
        struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
        u8 *pframe = skb->data;
-       u8 *frame_body = pframe + sizeof(struct ieee80211_hdr_3addr);
-       u8 category, action;
+       int freq, channel;
 
        /* check RA matches or not */
        if (!ether_addr_equal(myid(&padapter->eeprompriv), hdr->addr1))
-               goto exit;
+               return _FAIL;
 
-       category = frame_body[0];
-       if (category != WLAN_CATEGORY_PUBLIC)
-               goto exit;
+       channel = rtw_get_oper_ch23a(padapter);
 
-       action = frame_body[1];
-       switch (action) {
-       case ACT_PUBLIC_VENDOR:
-               ret = on_action_public23a_vendor(precv_frame);
-               break;
-       default:
-               ret = on_action_public23a_default(precv_frame, action);
-               break;
-       }
+       if (channel <= RTW_CH_MAX_2G_CHANNEL)
+               freq = ieee80211_channel_to_frequency(channel,
+                                                     IEEE80211_BAND_2GHZ);
+       else
+               freq = ieee80211_channel_to_frequency(channel,
+                                                     IEEE80211_BAND_5GHZ);
 
-exit:
-       return ret;
+       if (cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, pframe,
+                            skb->len, 0, GFP_ATOMIC))
+               return _SUCCESS;
+
+       return _FAIL;
 }
 
 static int
@@ -2452,7 +2364,7 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        unsigned int rate_len;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -2460,8 +2372,7 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
        u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-       u8 *wps_ie;
-       u32 wps_ielen;
+       const u8 *wps_ie;
        u8 sr = 0;
        int len_diff;
 
@@ -2484,39 +2395,48 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_BEACON);
-       pwlanhdr->seq_ctrl = 0;
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
+       mgmt->seq_ctrl = 0;
 
-       ether_addr_copy(pwlanhdr->addr1, bc_addr);
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(cur_network));
+       ether_addr_copy(mgmt->da, bc_addr);
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt->bssid, get_my_bssid23a(cur_network));
 
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
+       /* timestamp will be inserted by hardware */
 
-       if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
+       put_unaligned_le16(cur_network->beacon_interval,
+                          &mgmt->u.beacon.beacon_int);
+
+       put_unaligned_le16(cur_network->capability,
+                          &mgmt->u.beacon.capab_info);
+
+       pframe = mgmt->u.beacon.variable;
+       pattrib->pktlen = offsetof(struct ieee80211_mgmt, u.beacon.variable);
+
+       if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
+               u8 *iebuf;
+               int buflen;
                /* DBG_8723A("ie len =%d\n", cur_network->IELength); */
                memcpy(pframe, cur_network->IEs, cur_network->IELength);
-               len_diff = update_hidden_ssid(pframe + _BEACON_IE_OFFSET_,
-                                             cur_network->IELength -
-                                             _BEACON_IE_OFFSET_,
+               len_diff = update_hidden_ssid(pframe, cur_network->IELength,
                                              pmlmeinfo->hidden_ssid_mode);
                pframe += (cur_network->IELength+len_diff);
                pattrib->pktlen += (cur_network->IELength+len_diff);
 
-               wps_ie = rtw_get_wps_ie23a(pmgntframe->buf_addr + TXDESC_OFFSET+
-                                          sizeof (struct ieee80211_hdr_3addr) +
-                                          _BEACON_IE_OFFSET_, pattrib->pktlen -
-                                          sizeof (struct ieee80211_hdr_3addr) -
-                                          _BEACON_IE_OFFSET_, NULL,
-                                          &wps_ielen);
-               if (wps_ie && wps_ielen > 0) {
-                       rtw_get_wps_attr_content23a(wps_ie, wps_ielen,
+               iebuf = mgmt->u.beacon.variable;
+               buflen = pattrib->pktlen -
+                       offsetof(struct ieee80211_mgmt, u.beacon.variable);
+               wps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                                WLAN_OUI_TYPE_MICROSOFT_WPS,
+                                                iebuf, buflen);
+
+               if (wps_ie && wps_ie[1] > 0) {
+                       rtw_get_wps_attr_content23a(wps_ie, wps_ie[1],
                                                    WPS_ATTR_SELECTED_REGISTRAR,
-                                                   (u8*)&sr, NULL);
+                                                   (u8*)&sr);
                }
                if (sr != 0)
                        set_fwstate(pmlmepriv, WIFI_UNDER_WPS);
@@ -2526,28 +2446,6 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
                goto _issue_bcn;
        }
 
-       /* below for ad-hoc mode */
-
-       /* timestamp will be inserted by hardware */
-       pframe += 8;
-       pattrib->pktlen += 8;
-
-       /*  beacon interval: 2 bytes */
-
-       memcpy(pframe, (unsigned char *)
-              rtw_get_beacon_interval23a_from_ie(cur_network->IEs), 2);
-
-       pframe += 2;
-       pattrib->pktlen += 2;
-
-       /*  capability info: 2 bytes */
-
-       memcpy(pframe, (unsigned char *)
-              rtw_get_capability23a_from_ie(cur_network->IEs), 2);
-
-       pframe += 2;
-       pattrib->pktlen += 2;
-
        /*  SSID */
        pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID,
                               cur_network->Ssid.ssid_len,
@@ -2616,18 +2514,15 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        unsigned char *mac, *bssid;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
 #ifdef CONFIG_8723AU_AP_MODE
-       u8 *pwps_ie;
-       uint wps_ielen;
+       const u8 *pwps_ie;
        u8 *ssid_ie;
        int ssid_ielen;
        int ssid_ielen_diff;
        u8 buf[MAX_IE_SZ];
-       u8 *ies;
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 #endif
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -2636,6 +2531,9 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
 
        /* DBG_8723A("%s\n", __func__); */
 
+       if (cur_network->IELength > MAX_IE_SZ)
+               return;
+
        pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
        if (!pmgntframe) {
                DBG_8723A("%s, alloc mgnt frame fail\n", __func__);
@@ -2649,81 +2547,52 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
        mac = myid(&padapter->eeprompriv);
        bssid = cur_network->MacAddress;
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_PROBE_RESP);
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP);
 
-       ether_addr_copy(pwlanhdr->addr1, da);
-       ether_addr_copy(pwlanhdr->addr2, mac);
-       ether_addr_copy(pwlanhdr->addr3, bssid);
+       ether_addr_copy(mgmt->da, da);
+       ether_addr_copy(mgmt->sa, mac);
+       ether_addr_copy(mgmt->bssid, bssid);
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
        pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = pattrib->hdrlen;
-       pframe += pattrib->hdrlen;
 
-       if (cur_network->IELength > MAX_IE_SZ)
-               return;
+       /* timestamp will be inserted by hardware */
+       put_unaligned_le16(cur_network->beacon_interval,
+                          &mgmt->u.probe_resp.beacon_int);
+
+       put_unaligned_le16(cur_network->capability,
+                          &mgmt->u.probe_resp.capab_info);
+
+       pframe = mgmt->u.probe_resp.variable;
+       pattrib->pktlen =
+               offsetof(struct ieee80211_mgmt, u.probe_resp.variable);
+
+       /* below for ad-hoc mode */
 
 #ifdef CONFIG_8723AU_AP_MODE
        if ((pmlmeinfo->state & 0x03) == WIFI_FW_AP_STATE) {
-               pwps_ie = rtw_get_wps_ie23a(cur_network->IEs +
-                                           _FIXED_IE_LENGTH_,
-                                           cur_network->IELength -
-                                           _FIXED_IE_LENGTH_, NULL,
-                                           &wps_ielen);
-
-               /* inerset & update wps_probe_resp_ie */
-               if (pmlmepriv->wps_probe_resp_ie && pwps_ie && wps_ielen > 0) {
-                       uint wps_offset, remainder_ielen;
-                       u8 *premainder_ie;
-
-                       wps_offset = (uint)(pwps_ie - cur_network->IEs);
-
-                       premainder_ie = pwps_ie + wps_ielen;
-
-                       remainder_ielen = cur_network->IELength - wps_offset -
-                               wps_ielen;
-
-                       memcpy(pframe, cur_network->IEs, wps_offset);
-                       pframe += wps_offset;
-                       pattrib->pktlen += wps_offset;
-
-                       /* to get ie data len */
-                       wps_ielen = (uint)pmlmepriv->wps_probe_resp_ie[1];
-                       if (wps_offset + wps_ielen + 2 <= MAX_IE_SZ) {
-                               memcpy(pframe, pmlmepriv->wps_probe_resp_ie,
-                                      wps_ielen+2);
-                               pframe += wps_ielen+2;
-                               pattrib->pktlen += wps_ielen+2;
-                       }
+               pwps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                                 WLAN_OUI_TYPE_MICROSOFT_WPS,
+                                                 cur_network->IEs,
+                                                 cur_network->IELength);
 
-                       if (wps_offset + wps_ielen + 2 + remainder_ielen <=
-                           MAX_IE_SZ) {
-                               memcpy(pframe, premainder_ie, remainder_ielen);
-                               pframe += remainder_ielen;
-                               pattrib->pktlen += remainder_ielen;
-                       }
-               } else {
-                       memcpy(pframe, cur_network->IEs, cur_network->IELength);
-                       pframe += cur_network->IELength;
-                       pattrib->pktlen += cur_network->IELength;
-               }
+               memcpy(pframe, cur_network->IEs, cur_network->IELength);
+               pframe += cur_network->IELength;
+               pattrib->pktlen += cur_network->IELength;
 
                /* retrieve SSID IE from cur_network->Ssid */
-               ies = pmgntframe->buf_addr + TXDESC_OFFSET +
-                       sizeof(struct ieee80211_hdr_3addr);
 
-               ssid_ie = rtw_get_ie23a(ies + _FIXED_IE_LENGTH_, WLAN_EID_SSID,
-                                       &ssid_ielen,
-                                       pframe - ies - _FIXED_IE_LENGTH_);
+               ssid_ie = rtw_get_ie23a(mgmt->u.probe_resp.variable,
+                                       WLAN_EID_SSID, &ssid_ielen,
+                                       pframe - mgmt->u.probe_resp.variable);
 
                ssid_ielen_diff = cur_network->Ssid.ssid_len - ssid_ielen;
 
@@ -2752,29 +2621,6 @@ static void issue_probersp(struct rtw_adapter *padapter, unsigned char *da,
        } else
 #endif
        {
-
-               /* timestamp will be inserted by hardware */
-               pframe += 8;
-               pattrib->pktlen += 8;
-
-               /*  beacon interval: 2 bytes */
-
-               memcpy(pframe, (unsigned char *)
-                      rtw_get_beacon_interval23a_from_ie(cur_network->IEs), 2);
-
-               pframe += 2;
-               pattrib->pktlen += 2;
-
-               /*  capability info: 2 bytes */
-
-               memcpy(pframe, (unsigned char *)
-                      rtw_get_capability23a_from_ie(cur_network->IEs), 2);
-
-               pframe += 2;
-               pattrib->pktlen += 2;
-
-               /* below for ad-hoc mode */
-
                /*  SSID */
                pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID,
                                       cur_network->Ssid.ssid_len,
@@ -2829,17 +2675,17 @@ static int _issue_probereq(struct rtw_adapter *padapter,
                           struct cfg80211_ssid *pssid, u8 *da, int wait_ack)
 {
        int ret = _FAIL;
-       struct xmit_frame               *pmgntframe;
-       struct pkt_attrib               *pattrib;
-       unsigned char                   *pframe;
-       struct ieee80211_hdr    *pwlanhdr;
-       unsigned char                   *mac;
-       unsigned char                   bssrate[NumRates];
+       struct xmit_frame *pmgntframe;
+       struct pkt_attrib *pattrib;
+       unsigned char *pframe;
+       struct ieee80211_hdr *pwlanhdr;
+       unsigned char *mac;
+       unsigned char bssrate[NumRates];
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-       int     bssrate_len = 0;
-       u8      bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+       int bssrate_len = 0;
+       u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_notice_,
                 ("+%s\n", __func__));
@@ -2985,9 +2831,9 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        unsigned int val32;
-       unsigned short val16;
+       u16 auth_algo;
        int use_shared_key = 0;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -3004,23 +2850,21 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_AUTH);
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_AUTH);
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
+       pattrib->pktlen = offsetof(struct ieee80211_mgmt, u.auth.variable);
 
        if (psta) { /*  for AP mode */
 #ifdef CONFIG_8723AU_AP_MODE
-
-               ether_addr_copy(pwlanhdr->addr1, psta->hwaddr);
-               ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-               ether_addr_copy(pwlanhdr->addr3, myid(&padapter->eeprompriv));
+               unsigned short val16;
+               ether_addr_copy(mgmt->da, psta->hwaddr);
+               ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+               ether_addr_copy(mgmt->bssid, myid(&padapter->eeprompriv));
 
                /*  setting auth algo number */
                val16 = (u16)psta->authalg;
@@ -3028,29 +2872,19 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
                if (status != WLAN_STATUS_SUCCESS)
                        val16 = 0;
 
-               if (val16) {
-                       val16 = cpu_to_le16(val16);
+               if (val16)
                        use_shared_key = 1;
-               }
 
-               pframe = rtw_set_fixed_ie23a(pframe, _AUTH_ALGM_NUM_,
-                                            (unsigned char *)&val16,
-                                            &pattrib->pktlen);
+               mgmt->u.auth.auth_alg = cpu_to_le16(val16);
 
                /*  setting auth seq number */
-               val16 = (u16)psta->auth_seq;
-               val16 = cpu_to_le16(val16);
-               pframe = rtw_set_fixed_ie23a(pframe, _AUTH_SEQ_NUM_,
-                                            (unsigned char *)&val16,
-                                            &pattrib->pktlen);
+               mgmt->u.auth.auth_transaction =
+                       cpu_to_le16((u16)psta->auth_seq);
 
                /*  setting status code... */
-               val16 = status;
-               val16 = cpu_to_le16(val16);
-               pframe = rtw_set_fixed_ie23a(pframe, _STATUS_CODE_,
-                                            (unsigned char *)&val16,
-                                            &pattrib->pktlen);
+               mgmt->u.auth.status_code = cpu_to_le16(status);
 
+               pframe = mgmt->u.auth.variable;
                /*  added challenging text... */
                if ((psta->auth_seq == 2) &&
                    (psta->state & WIFI_FW_AUTH_STATE) && (use_shared_key == 1))
@@ -3058,19 +2892,21 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
                                               psta->chg_txt, &pattrib->pktlen);
 #endif
        } else {
-               ether_addr_copy(pwlanhdr->addr1,
-                               get_my_bssid23a(&pmlmeinfo->network));
-               ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-               ether_addr_copy(pwlanhdr->addr3,
+               struct ieee80211_mgmt *iv_mgmt;
+
+               ether_addr_copy(mgmt->da, get_my_bssid23a(&pmlmeinfo->network));
+               ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+               ether_addr_copy(mgmt->bssid,
                                get_my_bssid23a(&pmlmeinfo->network));
 
                /*  setting auth algo number */
                /*  0:OPEN System, 1:Shared key */
-               val16 = (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared)? 1: 0;
-               if (val16) {
-                       val16 = cpu_to_le16(val16);
+               if (pmlmeinfo->auth_algo == dot11AuthAlgrthm_Shared) {
                        use_shared_key = 1;
-               }
+                       auth_algo = WLAN_AUTH_SHARED_KEY;
+               } else
+                       auth_algo = WLAN_AUTH_OPEN;
+
                /* DBG_8723A("%s auth_algo = %s auth_seq =%d\n", __func__,
                   (pmlmeinfo->auth_algo == 0)?"OPEN":"SHARED",
                   pmlmeinfo->auth_seq); */
@@ -3079,35 +2915,32 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
                if ((pmlmeinfo->auth_seq == 3) &&
                    (pmlmeinfo->state & WIFI_FW_AUTH_STATE) &&
                    (use_shared_key == 1)) {
+                       u32 *piv = (u32 *)&mgmt->u.auth;
+
+                       iv_mgmt = (struct ieee80211_mgmt *)(pframe + 4);
                        /* DBG_8723A("==> iv(%d), key_index(%d)\n",
                           pmlmeinfo->iv, pmlmeinfo->key_index); */
-                       val32 = ((pmlmeinfo->iv++) |
-                                (pmlmeinfo->key_index << 30));
-                       val32 = cpu_to_le32(val32);
-                       pframe = rtw_set_fixed_ie23a(pframe, 4,
-                                                    (unsigned char *)&val32,
-                                                    &pattrib->pktlen);
+                       val32 = (pmlmeinfo->iv & 0x3fffffff) |
+                               (pmlmeinfo->key_index << 30);
+                       pmlmeinfo->iv++;
+                       put_unaligned_le32(val32, piv);
+
+                       pattrib->pktlen += 4;
 
                        pattrib->iv_len = IEEE80211_WEP_IV_LEN;
-               }
+               } else
+                       iv_mgmt = mgmt;
 
-               pframe = rtw_set_fixed_ie23a(pframe, _AUTH_ALGM_NUM_,
-                                            (unsigned char *)&val16,
-                                            &pattrib->pktlen);
+               iv_mgmt->u.auth.auth_alg = cpu_to_le16(auth_algo);
 
                /*  setting auth seq number */
-               val16 = pmlmeinfo->auth_seq;
-               val16 = cpu_to_le16(val16);
-               pframe = rtw_set_fixed_ie23a(pframe, _AUTH_SEQ_NUM_,
-                                            (unsigned char *)&val16,
-                                            &pattrib->pktlen);
+               iv_mgmt->u.auth.auth_transaction =
+                       cpu_to_le16(pmlmeinfo->auth_seq);
 
                /*  setting status code... */
-               val16 = status;
-               val16 = cpu_to_le16(val16);
-               pframe = rtw_set_fixed_ie23a(pframe, _STATUS_CODE_,
-                                            (unsigned char *)&val16,
-                                            &pattrib->pktlen);
+               iv_mgmt->u.auth.status_code = cpu_to_le16(status);
+
+               pframe = iv_mgmt->u.auth.variable;
 
                /*  then checking to see if sending challenging text... */
                if ((pmlmeinfo->auth_seq == 3) &&
@@ -3117,7 +2950,7 @@ static void issue_auth(struct rtw_adapter *padapter, struct sta_info *psta,
                                               pmlmeinfo->chg_txt,
                                               &pattrib->pktlen);
 
-                       pwlanhdr->frame_control |=
+                       mgmt->frame_control |=
                                cpu_to_le16(IEEE80211_FCTL_PROTECTED);
 
                        pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
@@ -3144,10 +2977,9 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
                           struct sta_info *pstat, u16 pkt_type)
 {
        struct xmit_frame *pmgntframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
-       unsigned short val;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -3169,37 +3001,27 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | pkt_type);
+       mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT | pkt_type);
 
-       ether_addr_copy(pwlanhdr->addr1, pstat->hwaddr);
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network));
+       ether_addr_copy(mgmt->da, pstat->hwaddr);
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt->bssid, get_my_bssid23a(&pmlmeinfo->network));
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
 
        pmlmeext->mgnt_seq++;
 
        pattrib->hdrlen = sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen += pattrib->hdrlen;
-       pframe += pattrib->hdrlen;
+       pattrib->pktlen =
+               offsetof(struct ieee80211_mgmt, u.assoc_resp.variable);
 
-       /* capability */
-       val = *(unsigned short *)rtw_get_capability23a_from_ie(ie);
-
-       pframe = rtw_set_fixed_ie23a(pframe, _CAPABILITY_,
-                                    (unsigned char *)&val, &pattrib->pktlen);
-
-       status = cpu_to_le16(status);
-       pframe = rtw_set_fixed_ie23a(pframe, _STATUS_CODE_,
-                                    (unsigned char *)&status,
-                                    &pattrib->pktlen);
+       mgmt->u.assoc_resp.capab_info = cpu_to_le16(pnetwork->capability);
+       mgmt->u.assoc_resp.status_code = cpu_to_le16(status);
+       mgmt->u.assoc_resp.aid = cpu_to_le16(pstat->aid | BIT(14) | BIT(15));
 
-       val = cpu_to_le16(pstat->aid | BIT(14) | BIT(15));
-       pframe = rtw_set_fixed_ie23a(pframe, _ASOC_ID_, (unsigned char *)&val,
-                                    &pattrib->pktlen);
+       pframe = mgmt->u.assoc_resp.variable;
 
        if (pstat->bssratelen <= 8) {
                pframe = rtw_set_ie23a(pframe, WLAN_EID_SUPP_RATES,
@@ -3216,9 +3038,8 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
        if (pstat->flags & WLAN_STA_HT && pmlmepriv->htpriv.ht_option) {
                /* FILL HT CAP INFO IE */
                /* p = hostapd_eid_ht_capabilities_info(hapd, p); */
-               p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
-                                    ie + _BEACON_IE_OFFSET_,
-                                    pnetwork->IELength -_BEACON_IE_OFFSET_);
+               p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, ie,
+                                    pnetwork->IELength);
                if (p && p[1]) {
                        memcpy(pframe, p, p[1] + 2);
                        pframe += (p[1] + 2);
@@ -3227,9 +3048,8 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
 
                /* FILL HT ADD INFO IE */
                /* p = hostapd_eid_ht_operation(hapd, p); */
-               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
-                                    ie + _BEACON_IE_OFFSET_,
-                                    pnetwork->IELength - _BEACON_IE_OFFSET_);
+               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, ie,
+                                    pnetwork->IELength);
                if (p && p[1] > 0) {
                        memcpy(pframe, p, p[1] + 2);
                        pframe += (p[1] + 2);
@@ -3243,10 +3063,9 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
                                               0x01, 0x01};
                int ie_len = 0;
 
-               for (p = ie + _BEACON_IE_OFFSET_; ; p += (ie_len + 2)) {
+               for (p = ie; ; p += (ie_len + 2)) {
                        p = cfg80211_find_ie(WLAN_EID_VENDOR_SPECIFIC, p,
-                                            pnetwork->IELength -
-                                            _BEACON_IE_OFFSET_ - (ie_len + 2));
+                                            pnetwork->IELength - (ie_len + 2));
                        if (p)
                                ie_len = p[1];
                        else
@@ -3269,16 +3088,6 @@ static void issue_assocrsp(struct rtw_adapter *padapter, unsigned short status,
                                       REALTEK_96B_IE, &pattrib->pktlen);
        }
 
-       /* add WPS IE ie for wps 2.0 */
-       if (pmlmepriv->wps_assoc_resp_ie &&
-           pmlmepriv->wps_assoc_resp_ie_len > 0) {
-               memcpy(pframe, pmlmepriv->wps_assoc_resp_ie,
-                      pmlmepriv->wps_assoc_resp_ie_len);
-
-               pframe += pmlmepriv->wps_assoc_resp_ie_len;
-               pattrib->pktlen += pmlmepriv->wps_assoc_resp_ie_len;
-       }
-
        pattrib->last_txcmdsz = pattrib->pktlen;
 
        dump_mgntframe23a(padapter, pmgntframe);
@@ -3292,7 +3101,7 @@ static void issue_assocreq(struct rtw_adapter *padapter)
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
        const u8 *p;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        unsigned int i, j, index = 0;
        unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates];
        struct registry_priv *pregpriv = &padapter->registrypriv;
@@ -3300,7 +3109,7 @@ static void issue_assocreq(struct rtw_adapter *padapter)
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       int bssrate_len = 0, sta_bssrate_len = 0, pie_len, bcn_fixed_size;
+       int bssrate_len = 0, sta_bssrate_len = 0, pie_len;
        u8 *pie;
 
        pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
@@ -3314,34 +3123,26 @@ static void issue_assocreq(struct rtw_adapter *padapter)
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
        pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_ASSOC_REQ);
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ASSOC_REQ);
 
-       ether_addr_copy(pwlanhdr->addr1, get_my_bssid23a(&pmlmeinfo->network));
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network));
+       ether_addr_copy(mgmt->da, get_my_bssid23a(&pmlmeinfo->network));
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt->bssid, get_my_bssid23a(&pmlmeinfo->network));
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
-
        /* caps */
-       memcpy(pframe,
-              rtw_get_capability23a_from_ie(pmlmeinfo->network.IEs), 2);
-
-       pframe += 2;
-       pattrib->pktlen += 2;
-
-       /* listen interval */
+       put_unaligned_le16(pmlmeinfo->network.capability,
+                          &mgmt->u.assoc_req.capab_info);
        /* todo: listen interval for power saving */
-       put_unaligned_le16(3, pframe);
-       pframe += 2;
-       pattrib->pktlen += 2;
+       put_unaligned_le16(3, &mgmt->u.assoc_req.listen_interval);
+
+       pframe = mgmt->u.assoc_req.variable;
+       pattrib->pktlen = offsetof(struct ieee80211_mgmt, u.assoc_req.variable);
 
        /* SSID */
        pframe = rtw_set_ie23a(pframe, WLAN_EID_SSID,
@@ -3416,11 +3217,9 @@ static void issue_assocreq(struct rtw_adapter *padapter)
                                       bssrate_len, bssrate, &pattrib->pktlen);
 
        /* RSN */
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
 
-       pie = pmlmeinfo->network.IEs + bcn_fixed_size;
-       pie_len = pmlmeinfo->network.IELength - bcn_fixed_size;
+       pie = pmlmeinfo->network.IEs;
+       pie_len = pmlmeinfo->network.IELength;
 
        p = cfg80211_find_ie(WLAN_EID_RSN, pie, pie_len);
        if (p)
@@ -3428,23 +3227,26 @@ static void issue_assocreq(struct rtw_adapter *padapter)
                                       &pattrib->pktlen);
 
        /* HT caps */
-       if (padapter->mlmepriv.htpriv.ht_option == true) {
+       if (padapter->mlmepriv.htpriv.ht_option) {
                p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, pie, pie_len);
 
                if (p && !is_ap_in_tkip23a(padapter)) {
-                       memcpy(&pmlmeinfo->HT_caps, p + 2,
-                              sizeof(struct HT_caps_element));
+                       struct ieee80211_ht_cap *cap = &pmlmeinfo->ht_cap;
+
+                       memcpy(cap, p + 2, sizeof(struct ieee80211_ht_cap));
 
                        /* to disable 40M Hz support while gd_bw_40MHz_en = 0 */
                        if (pregpriv->cbw40_enable == 0) {
-                               pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info &= (~(BIT(6) | BIT(1)));
+                               cap->cap_info &= ~cpu_to_le16(
+                                       IEEE80211_HT_CAP_SGI_40 |
+                                       IEEE80211_HT_CAP_SUP_WIDTH_20_40);
                        } else {
-                               pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= BIT(1);
+                               cap->cap_info |= cpu_to_le16(
+                                       IEEE80211_HT_CAP_SUP_WIDTH_20_40);
                        }
 
                        /* todo: disable SM power save mode */
-                       pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |=
-                               0x000c;
+                       cap->cap_info |= cpu_to_le16(IEEE80211_HT_CAP_SM_PS);
 
                        rf_type = rtl8723a_get_rf_type(padapter);
                        /* switch (pregpriv->rf_config) */
@@ -3452,9 +3254,9 @@ static void issue_assocreq(struct rtw_adapter *padapter)
                        case RF_1T1R:
                                /* RX STBC One spatial stream */
                                if (pregpriv->rx_stbc)
-                                       pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= cpu_to_le16(0x0100);
+                                       cap->cap_info |= cpu_to_le16(1 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
 
-                               memcpy(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, MCS_rate_1R23A, 16);
+                               memcpy(&cap->mcs, MCS_rate_1R23A, 16);
                                break;
 
                        case RF_2T2R:
@@ -3473,29 +3275,29 @@ static void issue_assocreq(struct rtw_adapter *padapter)
                                    pregpriv->wifi_spec == 1) {
                                        DBG_8723A("declare supporting RX "
                                                  "STBC\n");
-                                       pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info |= cpu_to_le16(0x0200);/* RX STBC two spatial stream */
+                                       /* RX STBC two spatial stream */
+                                       cap->cap_info |= cpu_to_le16(2 << IEEE80211_HT_CAP_RX_STBC_SHIFT);
                                }
-                               memcpy(pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate, MCS_rate_2R23A, 16);
+                               memcpy(&cap->mcs, MCS_rate_2R23A, 16);
                                break;
                        }
-                       pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info =
-                               cpu_to_le16(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info);
 
                        if (rtl8723a_BT_coexist(padapter) &&
                            rtl8723a_BT_using_antenna_1(padapter)) {
                                /*  set to 8K */
-                               pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para &= (u8)~IEEE80211_HT_AMPDU_PARM_FACTOR;
-/*                             pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para |= MAX_AMPDU_FACTOR_8K */
+                               cap->ampdu_params_info &=
+                                       ~IEEE80211_HT_AMPDU_PARM_FACTOR;
+/*                             cap->ampdu_params_info |= MAX_AMPDU_FACTOR_8K */
                        }
 
                        pframe = rtw_set_ie23a(pframe, WLAN_EID_HT_CAPABILITY,
-                                              p[1], (u8 *)&pmlmeinfo->HT_caps,
+                                              p[1], (u8 *)&pmlmeinfo->ht_cap,
                                               &pattrib->pktlen);
                }
        }
 
        /* vendor specific IE, such as WPA, WMM, WPS */
-       for (i = bcn_fixed_size;  i < pmlmeinfo->network.IELength;) {
+       for (i = 0;  i < pmlmeinfo->network.IELength;) {
                p = pmlmeinfo->network.IEs + i;
 
                switch (p[0]) {
@@ -3541,7 +3343,7 @@ exit:
                kfree(pmlmepriv->assoc_req);
                pmlmepriv->assoc_req = kmalloc(pattrib->pktlen, GFP_ATOMIC);
                if (pmlmepriv->assoc_req) {
-                       memcpy(pmlmepriv->assoc_req, pwlanhdr, pattrib->pktlen);
+                       memcpy(pmlmepriv->assoc_req, mgmt, pattrib->pktlen);
                        pmlmepriv->assoc_req_len = pattrib->pktlen;
                }
        } else
@@ -3806,8 +3608,7 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da,
 {
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
-       unsigned char *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -3826,27 +3627,21 @@ static int _issue_deauth(struct rtw_adapter *padapter, unsigned char *da,
 
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
-       pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)(pmgntframe->buf_addr + TXDESC_OFFSET);
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_DEAUTH);
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH);
 
-       ether_addr_copy(pwlanhdr->addr1, da);
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network));
+       ether_addr_copy(mgmt->da, da);
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt->bssid, get_my_bssid23a(&pmlmeinfo->network));
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
+       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr) + 2;
 
-       reason = cpu_to_le16(reason);
-       pframe = rtw_set_fixed_ie23a(pframe, WLAN_REASON_PREV_AUTH_NOT_VALID,
-                                    (unsigned char *)&reason,
-                                    &pattrib->pktlen);
+       mgmt->u.deauth.reason_code = cpu_to_le16(reason);
 
        pattrib->last_txcmdsz = pattrib->pktlen;
 
@@ -3919,10 +3714,9 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter,
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
        unsigned char *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-       u8 category, action;
 
        DBG_8723A("%s(%s): ra ="MAC_FMT", ch:%u, offset:%u\n", __func__,
                  padapter->pnetdev->name, MAC_ARG(ra), new_ch, ch_offset);
@@ -3937,29 +3731,24 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter,
 
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
-       pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)(pmgntframe->buf_addr + TXDESC_OFFSET);
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_ACTION);
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION);
 
-       ether_addr_copy(pwlanhdr->addr1, ra); /* RA */
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv)); /* TA */
-       ether_addr_copy(pwlanhdr->addr3, ra); /* DA = RA */
+       ether_addr_copy(mgmt->da, ra); /* RA */
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv)); /* TA */
+       ether_addr_copy(mgmt->bssid, ra); /* DA = RA */
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
-
-       /* category, action */
-       category = WLAN_CATEGORY_SPECTRUM_MGMT;
-       action = WLAN_ACTION_SPCT_CHL_SWITCH;
+       mgmt->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT;
+       mgmt->u.action.u.chan_switch.action_code = WLAN_ACTION_SPCT_CHL_SWITCH;
 
-       pframe = rtw_set_fixed_ie23a(pframe, 1, &category, &pattrib->pktlen);
-       pframe = rtw_set_fixed_ie23a(pframe, 1, &action, &pattrib->pktlen);
+       pframe = mgmt->u.action.u.chan_switch.variable;
+       pattrib->pktlen = offsetof(struct ieee80211_mgmt,
+                                  u.action.u.chan_switch.variable);
 
        pframe = rtw_set_ie23a_ch_switch (pframe, &pattrib->pktlen, 0,
                                          new_ch, 0);
@@ -3975,17 +3764,15 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
                        const unsigned char *raddr,
                        unsigned char action, unsigned short status)
 {
-       u8 category = WLAN_CATEGORY_BACK;
        u16 start_seq;
        u16 BA_para_set;
-       u16 reason_code;
        u16 BA_timeout_value;
        u16 BA_starting_seqctrl;
+       u16 BA_para;
        int max_rx_ampdu_factor;
        struct xmit_frame *pmgntframe;
        struct pkt_attrib *pattrib;
-       u8 *pframe;
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -3994,8 +3781,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
        struct registry_priv *pregpriv = &padapter->registrypriv;
        u8 tendaAPMac[] = {0xC8, 0x3A, 0x35};
 
-       DBG_8723A("%s, category =%d, action =%d, status =%d\n",
-                 __func__, category, action, status);
+       DBG_8723A("%s, action =%d, status =%d\n", __func__, action, status);
 
        pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
        if (!pmgntframe)
@@ -4007,40 +3793,36 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
 
        memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
 
-       pframe = (u8 *)(pmgntframe->buf_addr) + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)(pmgntframe->buf_addr + TXDESC_OFFSET);
 
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_ACTION);
+       mgmt->frame_control =
+               cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_ACTION);
 
-       /* memcpy(pwlanhdr->addr1, get_my_bssid23a(&pmlmeinfo->network), ETH_ALEN); */
-       ether_addr_copy(pwlanhdr->addr1, raddr);
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network));
+       ether_addr_copy(mgmt->da, raddr);
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt->bssid, get_my_bssid23a(&pmlmeinfo->network));
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt->seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
+       mgmt->u.action.category = WLAN_CATEGORY_BACK;
 
-       pframe = rtw_set_fixed_ie23a(pframe, 1, &category, &pattrib->pktlen);
-       pframe = rtw_set_fixed_ie23a(pframe, 1, &action, &pattrib->pktlen);
+       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr) + 1;
 
        status = cpu_to_le16(status);
 
-       if (category != 3)
-               goto out;
+       switch (action) {
+       case WLAN_ACTION_ADDBA_REQ:
+               pattrib->pktlen += sizeof(mgmt->u.action.u.addba_req);
+
+               mgmt->u.action.u.addba_req.action_code = action;
 
-       switch (action)
-       {
-       case 0: /* ADDBA req */
                do {
                        pmlmeinfo->dialogToken++;
                } while (pmlmeinfo->dialogToken == 0);
-               pframe = rtw_set_fixed_ie23a(pframe, 1, &pmlmeinfo->dialogToken,
-                                            &pattrib->pktlen);
+
+               mgmt->u.action.u.addba_req.dialog_token =
+                       pmlmeinfo->dialogToken;
 
                if (rtl8723a_BT_coexist(padapter) &&
                    rtl8723a_BT_using_antenna_1(padapter) &&
@@ -4061,51 +3843,60 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
                        /* immediate ack & 64 buffer size */
                        BA_para_set = (0x1002 | ((status & 0xf) << 2));
                }
-               BA_para_set = cpu_to_le16(BA_para_set);
-               pframe = rtw_set_fixed_ie23a(pframe, 2,
-                                            (unsigned char *)&BA_para_set,
-                                            &pattrib->pktlen);
+
+               put_unaligned_le16(BA_para_set,
+                                  &mgmt->u.action.u.addba_req.capab);
 
                BA_timeout_value = 5000;/*  5ms */
                BA_timeout_value = cpu_to_le16(BA_timeout_value);
-               pframe = rtw_set_fixed_ie23a(pframe, 2, (unsigned char *)
-                                            &BA_timeout_value,
-                                            &pattrib->pktlen);
+               put_unaligned_le16(BA_timeout_value,
+                                  &mgmt->u.action.u.addba_req.timeout);
+
+               psta = rtw_get_stainfo23a(pstapriv, raddr);
+               if (psta) {
+                       int idx;
 
-               /* if ((psta = rtw_get_stainfo23a(pstapriv,
-                  pmlmeinfo->network.MacAddress)) != NULL) */
-               if ((psta = rtw_get_stainfo23a(pstapriv, raddr))) {
-                       start_seq = (psta->sta_xmitpriv.txseq_tid[status & 0x07]&0xfff) + 1;
+                       idx = status & 0x07;
+                       start_seq =
+                               (psta->sta_xmitpriv.txseq_tid[idx] & 0xfff) + 1;
 
                        DBG_8723A("BA_starting_seqctrl = %d for TID =%d\n",
-                                 start_seq, status & 0x07);
+                                 start_seq, idx);
 
-                       psta->BA_starting_seqctrl[status & 0x07] = start_seq;
+                       psta->BA_starting_seqctrl[idx] = start_seq;
 
                        BA_starting_seqctrl = start_seq << 4;
-               }
+               } else
+                       BA_starting_seqctrl = 0;
+
+               put_unaligned_le16(BA_starting_seqctrl,
+                                  &mgmt->u.action.u.addba_req.start_seq_num);
 
-               BA_starting_seqctrl = cpu_to_le16(BA_starting_seqctrl);
-               pframe = rtw_set_fixed_ie23a(pframe, 2, (unsigned char *)&BA_starting_seqctrl, &pattrib->pktlen);
                break;
 
-       case 1: /* ADDBA rsp */
-               pframe = rtw_set_fixed_ie23a(pframe, 1, &pmlmeinfo->ADDBA_req.dialog_token, &pattrib->pktlen);
-               pframe = rtw_set_fixed_ie23a(pframe, 2,
-                                            (unsigned char *)&status,
-                                            &pattrib->pktlen);
+       case WLAN_ACTION_ADDBA_RESP:
+               pattrib->pktlen += sizeof(mgmt->u.action.u.addba_resp);
+
+               mgmt->u.action.u.addba_resp.action_code = action;
+               mgmt->u.action.u.addba_resp.dialog_token =
+                       pmlmeinfo->ADDBA_req.dialog_token;
+               put_unaligned_le16(status,
+                                  &mgmt->u.action.u.addba_resp.status);
+
                GetHalDefVar8192CUsb(padapter, HW_VAR_MAX_RX_AMPDU_FACTOR,
                                     &max_rx_ampdu_factor);
+
+               BA_para = le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f;
                if (max_rx_ampdu_factor == IEEE80211_HT_MAX_AMPDU_64K)
-                       BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */
+                       BA_para_set = BA_para | 0x1000; /* 64 buffer size */
                else if (max_rx_ampdu_factor == IEEE80211_HT_MAX_AMPDU_32K)
-                       BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x0800); /* 32 buffer size */
+                       BA_para_set = BA_para | 0x0800; /* 32 buffer size */
                else if (max_rx_ampdu_factor == IEEE80211_HT_MAX_AMPDU_16K)
-                       BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x0400); /* 16 buffer size */
+                       BA_para_set = BA_para | 0x0400; /* 16 buffer size */
                else if (max_rx_ampdu_factor == IEEE80211_HT_MAX_AMPDU_8K)
-                       BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x0200); /* 8 buffer size */
+                       BA_para_set = BA_para | 0x0200; /* 8 buffer size */
                else
-                       BA_para_set = ((le16_to_cpu(pmlmeinfo->ADDBA_req.BA_para_set) & 0x3f) | 0x1000); /* 64 buffer size */
+                       BA_para_set = BA_para | 0x1000; /* 64 buffer size */
 
                if (rtl8723a_BT_coexist(padapter) &&
                    rtl8723a_BT_using_antenna_1(padapter) &&
@@ -4118,169 +3909,33 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
                }
 
                if (pregpriv->ampdu_amsdu == 0)/* disabled */
-                       BA_para_set = cpu_to_le16(BA_para_set & ~BIT(0));
+                       BA_para_set &= ~BIT(0);
                else if (pregpriv->ampdu_amsdu == 1)/* enabled */
-                       BA_para_set = cpu_to_le16(BA_para_set | BIT(0));
-               else /* auto */
-                       BA_para_set = cpu_to_le16(BA_para_set);
-
-               pframe = rtw_set_fixed_ie23a(pframe, 2,
-                                            (unsigned char *)&BA_para_set,
-                                            &pattrib->pktlen);
-               pframe = rtw_set_fixed_ie23a(pframe, 2, (unsigned char *)&pmlmeinfo->ADDBA_req.BA_timeout_value, &pattrib->pktlen);
-               break;
-       case 2:/* DELBA */
-               BA_para_set = (status & 0x1F) << 3;
-               BA_para_set = cpu_to_le16(BA_para_set);
-               pframe = rtw_set_fixed_ie23a(pframe, 2,
-                                            (unsigned char *)&BA_para_set,
-                                            &pattrib->pktlen);
-
-               reason_code = 37;/* Requested from peer STA as it does not
-                                   want to use the mechanism */
-               reason_code = cpu_to_le16(reason_code);
-               pframe = rtw_set_fixed_ie23a(pframe, 2,
-                                            (unsigned char *)&reason_code,
-                                            &pattrib->pktlen);
-               break;
-       default:
-               break;
-       }
-
-out:
-       pattrib->last_txcmdsz = pattrib->pktlen;
-
-       dump_mgntframe23a(padapter, pmgntframe);
-}
-
-static void issue_action_BSSCoexistPacket(struct rtw_adapter *padapter)
-{
-       struct list_head *plist, *phead, *ptmp;
-       unsigned char category, action;
-       struct xmit_frame *pmgntframe;
-       struct pkt_attrib *pattrib;
-       u8 *pframe;
-       struct ieee80211_hdr *pwlanhdr;
-       struct wlan_network *pnetwork;
-       struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
-       struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       struct rtw_queue *queue = &pmlmepriv->scanned_queue;
-       u8 InfoContent[16] = {0};
-       u8 ICS[8][15];
-       int i;
-
-       if (pmlmepriv->num_FortyMHzIntolerant == 0 ||
-           pmlmepriv->num_sta_no_ht == 0)
-               return;
-
-       if (pmlmeinfo->bwmode_updated)
-               return;
-
-       DBG_8723A("%s\n", __func__);
-
-       category = WLAN_CATEGORY_PUBLIC;
-       action = ACT_PUBLIC_BSSCOEXIST;
-
-       pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
-       if (!pmgntframe)
-               return;
-
-       /* update attribute */
-       pattrib = &pmgntframe->attrib;
-       update_mgntframe_attrib23a(padapter, pattrib);
-
-       memset(pmgntframe->buf_addr, 0, WLANHDR_OFFSET + TXDESC_OFFSET);
-
-       pframe = (u8 *)pmgntframe->buf_addr + TXDESC_OFFSET;
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
-
-       pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                             IEEE80211_STYPE_ACTION);
-
-       ether_addr_copy(pwlanhdr->addr1, get_my_bssid23a(&pmlmeinfo->network));
-       ether_addr_copy(pwlanhdr->addr2, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network));
-
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
-       pmlmeext->mgnt_seq++;
-
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pattrib->pktlen = sizeof(struct ieee80211_hdr_3addr);
-
-       pframe = rtw_set_fixed_ie23a(pframe, 1, &category, &pattrib->pktlen);
-       pframe = rtw_set_fixed_ie23a(pframe, 1, &action, &pattrib->pktlen);
-
-       if (pmlmepriv->num_FortyMHzIntolerant > 0) {
-               u8 iedata = BIT(2);/* 20 MHz BSS Width Request */
-
-               pframe = rtw_set_ie23a(pframe, WLAN_EID_BSS_COEX_2040, 1,
-                                      &iedata, &pattrib->pktlen);
-       }
-
-       if (pmlmepriv->num_sta_no_ht <= 0)
-               goto out;
-
-       memset(ICS, 0, sizeof(ICS));
+                       BA_para_set |= BIT(0);
 
-       spin_lock_bh(&pmlmepriv->scanned_queue.lock);
+               put_unaligned_le16(BA_para_set,
+                                  &mgmt->u.action.u.addba_resp.capab);
 
-       phead = get_list_head(queue);
-       plist = phead->next;
+               put_unaligned_le16(pmlmeinfo->ADDBA_req.BA_timeout_value,
+                                  &mgmt->u.action.u.addba_resp.timeout);
 
-       list_for_each_safe(plist, ptmp, phead) {
-               const u8 *p;
-               struct wlan_bssid_ex *pbss_network;
-
-               pnetwork = container_of(plist, struct wlan_network, list);
-
-               pbss_network = &pnetwork->network;
-
-               p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
-                                    pbss_network->IEs + _FIXED_IE_LENGTH_,
-                                    pbss_network->IELength -_FIXED_IE_LENGTH_);
-               if (!p || !p[1]) { /* non-HT */
-                       if (pbss_network->DSConfig <= 0 ||
-                           pbss_network->DSConfig > 14)
-                               continue;
-
-                       ICS[0][pbss_network->DSConfig] = 1;
-
-                       if (ICS[0][0] == 0)
-                               ICS[0][0] = 1;
-               }
-
-       }
-
-       spin_unlock_bh(&pmlmepriv->scanned_queue.lock);
-
-       for (i = 0; i < 8;i++) {
-               if (ICS[i][0] == 1) {
-                       int j, k = 0;
-
-                       InfoContent[k] = i;
-                       /* SET_BSS_INTOLERANT_ELE_REG_CLASS(InfoContent, i); */
-                       k++;
+               pattrib->pktlen += 8;
+               break;
+       case WLAN_ACTION_DELBA:
+               pattrib->pktlen += sizeof(mgmt->u.action.u.delba);
 
-                       for (j = 1; j <= 14; j++) {
-                               if (ICS[i][j] == 1) {
-                                       if (k < 16) {
-                                               /* channel number */
-                                               InfoContent[k] = j;
-                                               k++;
-                                       }
-                               }
-                       }
+               mgmt->u.action.u.delba.action_code = action;
+               BA_para_set = (status & 0x1F) << 3;
+               mgmt->u.action.u.delba.params = cpu_to_le16(BA_para_set);
+               mgmt->u.action.u.delba.reason_code =
+                       cpu_to_le16(WLAN_REASON_QSTA_NOT_USE);
 
-                       pframe = rtw_set_ie23a(pframe,
-                                              EID_BSSIntolerantChlReport, k,
-                                              InfoContent, &pattrib->pktlen);
-               }
+               pattrib->pktlen += 5;
+               break;
+       default:
+               break;
        }
 
-out:
        pattrib->last_txcmdsz = pattrib->pktlen;
 
        dump_mgntframe23a(padapter, pmgntframe);
@@ -4291,7 +3946,7 @@ int send_delba23a(struct rtw_adapter *padapter, u8 initiator, u8 *addr)
        struct sta_priv *pstapriv = &padapter->stapriv;
        struct sta_info *psta = NULL;
        /* struct recv_reorder_ctrl *preorder_ctrl; */
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        u16 tid;
 
@@ -4328,8 +3983,8 @@ int send_delba23a(struct rtw_adapter *padapter, u8 initiator, u8 *addr)
 
 int send_beacon23a(struct rtw_adapter *padapter)
 {
-       bool    bxmitok;
-       int     issue = 0;
+       bool bxmitok;
+       int issue = 0;
        int poll = 0;
        unsigned long start = jiffies;
        unsigned int passing_time;
@@ -4377,9 +4032,10 @@ bool IsLegal5GChannel(struct rtw_adapter *Adapter, u8 channel)
 
        int i = 0;
        u8 Channel_5G[45] = {36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
-               60, 62, 64, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122,
-               124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153, 155, 157, 159,
-               161, 163, 165};
+                            60, 62, 64, 100, 102, 104, 106, 108, 110, 112,
+                            114, 116, 118, 120, 122, 124, 126, 128, 130, 132,
+                            134, 136, 138, 140, 149, 151, 153, 155, 157, 159,
+                            161, 163, 165};
        for (i = 0; i < sizeof(Channel_5G); i++)
                if (channel == Channel_5G[i])
                        return true;
@@ -4390,7 +4046,7 @@ static void rtw_site_survey(struct rtw_adapter *padapter)
 {
        unsigned char survey_channel = 0;
        enum rt_scan_type ScanType = SCAN_PASSIVE;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct rtw_ieee80211_channel *ch;
 
@@ -4462,66 +4118,81 @@ static void rtw_site_survey(struct rtw_adapter *padapter)
 
                pmlmeext->chan_scan_time = SURVEY_TO;
                pmlmeext->sitesurvey_res.state = SCAN_DISABLE;
-
-               issue_action_BSSCoexistPacket(padapter);
-               issue_action_BSSCoexistPacket(padapter);
-               issue_action_BSSCoexistPacket(padapter);
        }
 
        return;
 }
 
 /* collect bss info from Beacon and Probe request/response frames. */
-int collect_bss_info23a(struct rtw_adapter *padapter,
-                       struct recv_frame *precv_frame,
-                       struct wlan_bssid_ex *bssid)
+static struct wlan_bssid_ex *collect_bss_info(struct rtw_adapter *padapter,
+                                             struct recv_frame *precv_frame)
 {
-       int i;
-       const u8 *p;
        struct sk_buff *skb = precv_frame->pkt;
        struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *) skb->data;
-       unsigned int length;
-       u8 ie_offset;
        struct registry_priv *pregistrypriv = &padapter->registrypriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
-       u16 capab_info;
-
-       length = skb->len - sizeof(struct ieee80211_hdr_3addr);
+       struct wlan_bssid_ex *bssid;
+       const u8 *p;
+       u8 *pie;
+       unsigned int length;
+       int i;
 
-       if (length > MAX_IE_SZ) {
-               /* DBG_8723A("IE too long for survey event\n"); */
-               return _FAIL;
-       }
+       length = skb->len;
 
-       memset(bssid, 0, sizeof(struct wlan_bssid_ex));
+       bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
+       if (!bssid)
+               return NULL;
 
        if (ieee80211_is_beacon(mgmt->frame_control)) {
+               length -= offsetof(struct ieee80211_mgmt, u.beacon.variable);
+               pie = mgmt->u.beacon.variable;
                bssid->reserved = 1;
-               ie_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
-               capab_info = mgmt->u.beacon.capab_info;
-       } else  if (ieee80211_is_probe_req(mgmt->frame_control)) {
-               ie_offset = offsetof(struct ieee80211_mgmt,
-                                    u.probe_req.variable);
+               bssid->capability =
+                       get_unaligned_le16(&mgmt->u.beacon.capab_info);
+               bssid->beacon_interval =
+                       get_unaligned_le16(&mgmt->u.beacon.beacon_int);
+               bssid->tsf = get_unaligned_le64(&mgmt->u.beacon.timestamp);
+       } else if (ieee80211_is_probe_req(mgmt->frame_control)) {
+               length -= offsetof(struct ieee80211_mgmt, u.probe_req.variable);
+               pie = mgmt->u.probe_req.variable;
                bssid->reserved = 2;
-               capab_info = 0;
+               bssid->capability = 0;
+               bssid->beacon_interval =
+                       padapter->registrypriv.dev_network.beacon_interval;
+               bssid->tsf = 0;
        } else if (ieee80211_is_probe_resp(mgmt->frame_control)) {
-               ie_offset = offsetof(struct ieee80211_mgmt,
-                                    u.probe_resp.variable);
+               length -=
+                       offsetof(struct ieee80211_mgmt, u.probe_resp.variable);
+               pie = mgmt->u.probe_resp.variable;
                bssid->reserved = 3;
-               capab_info = mgmt->u.probe_resp.capab_info;
+               bssid->capability =
+                       get_unaligned_le16(&mgmt->u.probe_resp.capab_info);
+               bssid->beacon_interval =
+                       get_unaligned_le16(&mgmt->u.probe_resp.beacon_int);
+               bssid->tsf = get_unaligned_le64(&mgmt->u.probe_resp.timestamp);
        } else {
+               length -= offsetof(struct ieee80211_mgmt, u.beacon.variable);
+               pie = mgmt->u.beacon.variable;
                bssid->reserved = 0;
-               ie_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable);
-               capab_info = mgmt->u.beacon.capab_info;
+               bssid->capability =
+                       get_unaligned_le16(&mgmt->u.beacon.capab_info);
+               bssid->beacon_interval =
+                       padapter->registrypriv.dev_network.beacon_interval;
+               bssid->tsf = 0;
+       }
+
+       if (length > MAX_IE_SZ) {
+               /* DBG_8723A("IE too long for survey event\n"); */
+               kfree(bssid);
+               return NULL;
        }
-       ie_offset -= offsetof(struct ieee80211_mgmt, u);
 
        bssid->Length = offsetof(struct wlan_bssid_ex, IEs) + length;
 
        /* below is to copy the information element */
        bssid->IELength = length;
-       memcpy(bssid->IEs, &mgmt->u, bssid->IELength);
+       memcpy(bssid->IEs, pie, bssid->IELength);
 
        /* get the signal strength */
        /*  in dBM.raw data */
@@ -4532,55 +4203,47 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
                precv_frame->attrib.phy_info.SignalStrength;/* in percentage */
 
        /*  checking SSID */
-       p = cfg80211_find_ie(WLAN_EID_SSID, bssid->IEs + ie_offset,
-                            bssid->IELength - ie_offset);
+       p = cfg80211_find_ie(WLAN_EID_SSID, bssid->IEs, bssid->IELength);
 
        if (!p) {
                DBG_8723A("marc: cannot find SSID for survey event\n");
-               return _FAIL;
+               goto fail;
        }
 
        if (p[1] > IEEE80211_MAX_SSID_LEN) {
                DBG_8723A("%s()-%d: IE too long (%d) for survey "
                          "event\n", __func__, __LINE__, p[1]);
-               return _FAIL;
+               goto fail;
        }
        memcpy(bssid->Ssid.ssid, p + 2, p[1]);
        bssid->Ssid.ssid_len = p[1];
 
-       memset(bssid->SupportedRates, 0, NDIS_802_11_LENGTH_RATES_EX);
-
        /* checking rate info... */
        i = 0;
-       p = cfg80211_find_ie(WLAN_EID_SUPP_RATES, bssid->IEs + ie_offset,
-                            bssid->IELength - ie_offset);
+       p = cfg80211_find_ie(WLAN_EID_SUPP_RATES, bssid->IEs, bssid->IELength);
        if (p) {
                if (p[1] > NDIS_802_11_LENGTH_RATES_EX) {
                        DBG_8723A("%s()-%d: IE too long (%d) for survey "
                                  "event\n", __func__, __LINE__, p[1]);
-                       return _FAIL;
+                       goto fail;
                }
                memcpy(bssid->SupportedRates, p + 2, p[1]);
                i = p[1];
        }
 
-       p = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, bssid->IEs + ie_offset,
-                            bssid->IELength - ie_offset);
+       p = cfg80211_find_ie(WLAN_EID_EXT_SUPP_RATES, bssid->IEs,
+                            bssid->IELength);
        if (p) {
                if (p[1] > (NDIS_802_11_LENGTH_RATES_EX-i)) {
                        DBG_8723A("%s()-%d: IE too long (%d) for survey "
                                  "event\n", __func__, __LINE__, p[1]);
-                       return _FAIL;
+                       goto fail;
                }
                memcpy(bssid->SupportedRates + i, p + 2, p[1]);
        }
 
-       if (bssid->IELength < 12)
-               return _FAIL;
-
        /*  Checking for DSConfig */
-       p = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bssid->IEs + ie_offset,
-                            bssid->IELength - ie_offset);
+       p = cfg80211_find_ie(WLAN_EID_DS_PARAMS, bssid->IEs, bssid->IELength);
 
        bssid->DSConfig = 0;
 
@@ -4588,13 +4251,12 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
                bssid->DSConfig = p[2];
        } else {/*  In 5G, some ap do not have DSSET IE */
                /*  checking HT info for channel */
-               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
-                                    bssid->IEs + ie_offset,
-                                    bssid->IELength - ie_offset);
+               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, bssid->IEs,
+                                    bssid->IELength);
                if (p) {
-                       struct HT_info_element *HT_info =
-                               (struct HT_info_element *)(p + 2);
-                       bssid->DSConfig = HT_info->primary_channel;
+                       struct ieee80211_ht_operation *HT_info =
+                               (struct ieee80211_ht_operation *)(p + 2);
+                       bssid->DSConfig = HT_info->primary_chan;
                } else /*  use current channel */
                        bssid->DSConfig = rtw_get_oper_ch23a(padapter);
        }
@@ -4604,13 +4266,10 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
                bssid->ifmode = NL80211_IFTYPE_STATION;
                ether_addr_copy(bssid->MacAddress, mgmt->sa);
                bssid->Privacy = 1;
-               return _SUCCESS;
+               return bssid;
        }
 
-       bssid->BeaconPeriod = get_unaligned_le16(
-               rtw_get_beacon_interval23a_from_ie(bssid->IEs));
-
-       if (capab_info & BIT(0)) {
+       if (bssid->capability & WLAN_CAPABILITY_ESS) {
                bssid->ifmode = NL80211_IFTYPE_STATION;
                ether_addr_copy(bssid->MacAddress, mgmt->sa);
        } else {
@@ -4618,7 +4277,7 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
                ether_addr_copy(bssid->MacAddress, mgmt->bssid);
        }
 
-       if (capab_info & BIT(4))
+       if (bssid->capability & WLAN_CAPABILITY_PRIVACY)
                bssid->Privacy = 1;
        else
                bssid->Privacy = 0;
@@ -4630,14 +4289,14 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
            pmlmeinfo->bwmode_updated == false) {
                struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-               p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
-                                    bssid->IEs + ie_offset,
-                                    bssid->IELength - ie_offset);
+               p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, bssid->IEs,
+                                    bssid->IELength);
                if (p && p[1] > 0) {
-                       struct HT_caps_element *pHT_caps;
-                       pHT_caps = (struct HT_caps_element *)(p + 2);
+                       struct ieee80211_ht_cap *pHT_caps;
+                       pHT_caps = (struct ieee80211_ht_cap *)(p + 2);
 
-                       if (pHT_caps->u.HT_cap_element.HT_caps_info & BIT(14))
+                       if (pHT_caps->cap_info &
+                           cpu_to_le16(IEEE80211_HT_CAP_40MHZ_INTOLERANT))
                                pmlmepriv->num_FortyMHzIntolerant++;
                } else
                        pmlmepriv->num_sta_no_ht++;
@@ -4648,23 +4307,26 @@ int collect_bss_info23a(struct rtw_adapter *padapter,
        if (bssid->DSConfig != rtw_get_oper_ch23a(padapter))
                bssid->PhyInfo.SignalQuality = 101;
 
-       return _SUCCESS;
+       return bssid;
+fail:
+       kfree (bssid);
+       return NULL;
 }
 
 static void start_create_ibss(struct rtw_adapter* padapter)
 {
-       unsigned short  caps;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       unsigned short caps;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
        pmlmeext->cur_channel = (u8)pnetwork->DSConfig;
-       pmlmeinfo->bcn_interval = get_beacon_interval23a(pnetwork);
+       pmlmeinfo->bcn_interval = pnetwork->beacon_interval;
 
        /* update wireless mode */
        update_wireless_mode23a(padapter);
 
        /* udpate capability */
-       caps = rtw_get_capability23a(pnetwork);
+       caps = pnetwork->capability;
        update_capinfo23a(padapter, caps);
        if (caps & WLAN_CAPABILITY_IBSS) {      /* adhoc master */
                rtl8723a_set_sec_cfg(padapter, 0xcf);
@@ -4705,21 +4367,21 @@ static void start_create_ibss(struct rtw_adapter* padapter)
 
 static void start_clnt_join(struct rtw_adapter* padapter)
 {
-       unsigned short  caps;
-       u8      val8;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       unsigned short caps;
+       u8 val8;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
        int beacon_timeout;
 
        pmlmeext->cur_channel = (u8)pnetwork->DSConfig;
-       pmlmeinfo->bcn_interval = get_beacon_interval23a(pnetwork);
+       pmlmeinfo->bcn_interval = pnetwork->beacon_interval;
 
        /* update wireless mode */
        update_wireless_mode23a(padapter);
 
        /* udpate capability */
-       caps = rtw_get_capability23a(pnetwork);
+       caps = pnetwork->capability;
        update_capinfo23a(padapter, caps);
        if (caps & WLAN_CAPABILITY_ESS) {
                /* switch channel */
@@ -4765,7 +4427,7 @@ static void start_clnt_join(struct rtw_adapter* padapter)
 
 static void start_clnt_auth(struct rtw_adapter* padapter)
 {
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
        del_timer_sync(&pmlmeext->link_timer);
@@ -4783,8 +4445,10 @@ static void start_clnt_auth(struct rtw_adapter* padapter)
        /*  AP may: 1)not response auth or 2)deauth us after link is complete */
        /*  issue deauth before issuing auth to deal with the situation */
        /*      Commented by Albert 2012/07/21 */
-       /*      For the Win8 P2P connection, it will be hard to have a successful connection if this Wi-Fi doesn't connect to it. */
-       issue_deauth23a(padapter, (&pmlmeinfo->network)->MacAddress, WLAN_REASON_DEAUTH_LEAVING);
+       /*      For the Win8 P2P connection, it will be hard to have a
+               successful connection if this Wi-Fi doesn't connect to it. */
+       issue_deauth23a(padapter, (&pmlmeinfo->network)->MacAddress,
+                       WLAN_REASON_DEAUTH_LEAVING);
 
        DBG_8723A_LEVEL(_drv_always_, "start auth\n");
        issue_auth(padapter, NULL, 0);
@@ -4794,7 +4458,7 @@ static void start_clnt_auth(struct rtw_adapter* padapter)
 
 static void start_clnt_assoc(struct rtw_adapter* padapter)
 {
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
        del_timer_sync(&pmlmeext->link_timer);
@@ -4810,7 +4474,7 @@ static void start_clnt_assoc(struct rtw_adapter* padapter)
 int receive_disconnect23a(struct rtw_adapter *padapter,
                          unsigned char *MacAddr, unsigned short reason)
 {
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
        /* check A3 */
@@ -4860,9 +4524,8 @@ static void process_80211d(struct rtw_adapter *padapter,
                u8 noc; /*  number of channel */
                u8 j, k;
 
-               ie = cfg80211_find_ie(WLAN_EID_COUNTRY,
-                                     bssid->IEs + _FIXED_IE_LENGTH_,
-                                     bssid->IELength - _FIXED_IE_LENGTH_);
+               ie = cfg80211_find_ie(WLAN_EID_COUNTRY, bssid->IEs,
+                                     bssid->IELength);
                if (!ie || ie[1] < IEEE80211_COUNTRY_IE_MIN_LEN)
                        return;
 
@@ -5068,12 +4731,13 @@ Following are the functions to report events
 
 *****************************************************************************/
 
-void report_survey_event23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame)
+void report_survey_event23a(struct rtw_adapter *padapter,
+                           struct recv_frame *precv_frame)
 {
        struct cmd_obj *pcmd_obj;
-       u8      *pevtcmd;
+       u8 *pevtcmd;
        u32 cmdsz;
-       struct survey_event     *psurvey_evt;
+       struct survey_event *psurvey_evt;
        struct C2HEvent_Header *pc2h_evt_hdr;
        struct mlme_ext_priv *pmlmeext;
        struct cmd_priv *pcmdpriv;
@@ -5084,8 +4748,7 @@ void report_survey_event23a(struct rtw_adapter *padapter, struct recv_frame *pre
        pmlmeext = &padapter->mlmeextpriv;
        pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-                                            GFP_ATOMIC);
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (!pcmd_obj)
                return;
 
@@ -5110,13 +4773,14 @@ void report_survey_event23a(struct rtw_adapter *padapter, struct recv_frame *pre
 
        psurvey_evt = (struct survey_event*)(pevtcmd + sizeof(struct C2HEvent_Header));
 
-       if (collect_bss_info23a(padapter, precv_frame, &psurvey_evt->bss) == _FAIL) {
+       psurvey_evt->bss = collect_bss_info(padapter, precv_frame);
+       if (!psurvey_evt->bss) {
                kfree(pcmd_obj);
                kfree(pevtcmd);
                return;
        }
 
-       process_80211d(padapter, &psurvey_evt->bss);
+       process_80211d(padapter, psurvey_evt->bss);
 
        rtw_enqueue_cmd23a(pcmdpriv, pcmd_obj);
 
@@ -5128,15 +4792,14 @@ void report_survey_event23a(struct rtw_adapter *padapter, struct recv_frame *pre
 void report_surveydone_event23a(struct rtw_adapter *padapter)
 {
        struct cmd_obj *pcmd_obj;
-       u8      *pevtcmd;
+       u8 *pevtcmd;
        u32 cmdsz;
        struct surveydone_event *psurveydone_evt;
-       struct C2HEvent_Header  *pc2h_evt_hdr;
-       struct mlme_ext_priv            *pmlmeext = &padapter->mlmeextpriv;
+       struct C2HEvent_Header *pc2h_evt_hdr;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-                                            GFP_ATOMIC);
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (!pcmd_obj)
                return;
 
@@ -5172,7 +4835,7 @@ void report_surveydone_event23a(struct rtw_adapter *padapter)
 void report_join_res23a(struct rtw_adapter *padapter, int res)
 {
        struct cmd_obj *pcmd_obj;
-       u8      *pevtcmd;
+       u8 *pevtcmd;
        u32 cmdsz;
        struct joinbss_event            *pjoinbss_evt;
        struct C2HEvent_Header  *pc2h_evt_hdr;
@@ -5180,8 +4843,7 @@ void report_join_res23a(struct rtw_adapter *padapter, int res)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-                                            GFP_ATOMIC);
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (!pcmd_obj)
                return;
 
@@ -5218,20 +4880,20 @@ void report_join_res23a(struct rtw_adapter *padapter, int res)
        return;
 }
 
-void report_del_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAddr, unsigned short reason)
+void report_del_sta_event23a(struct rtw_adapter *padapter,
+                            unsigned char* MacAddr, unsigned short reason)
 {
        struct cmd_obj *pcmd_obj;
-       u8      *pevtcmd;
+       u8 *pevtcmd;
        u32 cmdsz;
        struct sta_info *psta;
-       int     mac_id;
-       struct stadel_event                     *pdel_sta_evt;
-       struct C2HEvent_Header  *pc2h_evt_hdr;
-       struct mlme_ext_priv            *pmlmeext = &padapter->mlmeextpriv;
+       int mac_id;
+       struct stadel_event *pdel_sta_evt;
+       struct C2HEvent_Header *pc2h_evt_hdr;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-                                            GFP_ATOMIC);
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (!pcmd_obj)
                return;
 
@@ -5274,18 +4936,18 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAdd
        return;
 }
 
-void report_add_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAddr, int cam_idx)
+void report_add_sta_event23a(struct rtw_adapter *padapter,
+                            unsigned char* MacAddr, int cam_idx)
 {
        struct cmd_obj *pcmd_obj;
-       u8      *pevtcmd;
+       u8 *pevtcmd;
        u32 cmdsz;
-       struct stassoc_event            *padd_sta_evt;
-       struct C2HEvent_Header  *pc2h_evt_hdr;
-       struct mlme_ext_priv            *pmlmeext = &padapter->mlmeextpriv;
+       struct stassoc_event *padd_sta_evt;
+       struct C2HEvent_Header *pc2h_evt_hdr;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
 
-       pcmd_obj = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-                                            GFP_ATOMIC);
+       pcmd_obj = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (!pcmd_obj)
                return;
 
@@ -5329,8 +4991,8 @@ Following are the event callback functions
 void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
 {
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
-       struct mlme_ext_info    *pmlmeinfo = &pmlmeext->mlmext_info;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
 
        /* ERP */
        VCS_update23a(padapter, psta);
@@ -5342,7 +5004,7 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
 
                psta->htpriv.ampdu_enable = pmlmepriv->htpriv.ampdu_enable;
 
-               if (support_short_GI23a(padapter, &pmlmeinfo->HT_caps))
+               if (support_short_GI23a(padapter, &pmlmeinfo->ht_cap))
                        psta->htpriv.sgi = true;
 
                psta->qos_option = true;
@@ -5371,13 +5033,14 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
        psta->state = _FW_LINKED;
 }
 
-void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_res)
+void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter,
+                                      int join_res)
 {
-       struct sta_info         *psta, *psta_bmc;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct sta_info *psta, *psta_bmc;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
-       struct sta_priv         *pstapriv = &padapter->stapriv;
+       struct sta_priv *pstapriv = &padapter->stapriv;
 
        if (join_res < 0) {
                hw_var_set_mlme_join(padapter, 1);
@@ -5453,7 +5116,8 @@ exit_mlmeext_joinbss_event_callback23a:
        DBG_8723A("=>%s\n", __func__);
 }
 
-void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter, struct sta_info *psta)
+void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter,
+                                      struct sta_info *psta)
 {
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -5551,8 +5215,6 @@ void linked_status_chk23a(struct rtw_adapter *padapter)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct sta_priv *pstapriv = &padapter->stapriv;
 
-       rtl8723a_sreset_linked_status_check(padapter);
-
        if (is_client_associated_to_ap23a(padapter)) {
                /* linked infrastructure client mode */
 
@@ -5699,13 +5361,12 @@ static void survey_timer_hdl(unsigned long data)
                        pmlmeext->scan_abort = false;/* reset */
                }
 
-               ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj),
-                       GFP_ATOMIC);
+               ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
                if (!ph2c)
                        goto exit_survey_timer_hdl;
 
-               psurveyPara = (struct sitesurvey_parm*)
-                       kzalloc(sizeof(struct sitesurvey_parm), GFP_ATOMIC);
+               psurveyPara = kzalloc(sizeof(struct sitesurvey_parm),
+                                       GFP_ATOMIC);
                if (!psurveyPara) {
                        kfree(ph2c);
                        goto exit_survey_timer_hdl;
@@ -5726,7 +5387,7 @@ static void link_timer_hdl(unsigned long data)
        /* static unsigned int          rx_pkt = 0; */
        /* static u64                           tx_cnt = 0; */
        /* struct xmit_priv *pxmitpriv = &padapter->xmitpriv; */
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        /* struct sta_priv              *pstapriv = &padapter->stapriv; */
 
@@ -5773,14 +5434,14 @@ static void link_timer_hdl(unsigned long data)
 static void addba_timer_hdl(unsigned long data)
 {
        struct sta_info *psta = (struct sta_info *)data;
-       struct ht_priv  *phtpriv;
+       struct ht_priv *phtpriv;
 
        if (!psta)
                return;
 
        phtpriv = &psta->htpriv;
 
-       if (phtpriv->ht_option == true && phtpriv->ampdu_enable == true) {
+       if (phtpriv->ht_option && phtpriv->ampdu_enable) {
                if (phtpriv->candidate_tid_bitmap)
                        phtpriv->candidate_tid_bitmap = 0x0;
        }
@@ -5794,7 +5455,7 @@ void init_addba_retry_timer23a(struct sta_info *psta)
 
 void init_mlme_ext_timer23a(struct rtw_adapter *padapter)
 {
-       struct  mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
        setup_timer(&pmlmeext->survey_timer, survey_timer_hdl,
                    (unsigned long)padapter);
@@ -5845,7 +5506,7 @@ int setopmode_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 
 int createbss_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 {
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
        const struct wlan_bssid_ex *pparm = (struct wlan_bssid_ex *)pbuf;
@@ -5903,9 +5564,8 @@ int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *pnetwork = &pmlmeinfo->network;
        const struct wlan_bssid_ex *pparm = (struct wlan_bssid_ex *)pbuf;
-       struct HT_info_element *pht_info;
+       struct ieee80211_ht_operation *pht_info;
        u32 i;
-       int bcn_fixed_size;
        u8 *p;
         /* u32 initialgain; */
        /* u32  acparm; */
@@ -5951,10 +5611,7 @@ int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        /* pmlmeinfo->assoc_AP_vendor = check_assoc_AP23a(pnetwork->IEs,
           pnetwork->IELength); */
 
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
-
-       for (i = bcn_fixed_size; i < pnetwork->IELength;) {
+       for (i = 0; i < pnetwork->IELength;) {
                p = pnetwork->IEs + i;
 
                switch (p[0]) {
@@ -5972,20 +5629,21 @@ int join_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 
                        /* spec case only for cisco's ap because cisco's ap
                         * issue assoc rsp using mcs rate @40MHz or @20MHz */
-                       pht_info = (struct HT_info_element *)(p + 2);
+                       pht_info = (struct ieee80211_ht_operation *)(p + 2);
 
-                       if ((pregpriv->cbw40_enable) &&
-                           (pht_info->infos[0] & BIT(2))) {
+                       if (pregpriv->cbw40_enable &&
+                           (pht_info->ht_param &
+                            IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) {
                                /* switch to the 40M Hz mode according to AP */
                                pmlmeext->cur_bwmode = HT_CHANNEL_WIDTH_40;
-                               switch (pht_info->infos[0] & 0x3)
-                               {
-                               case 1:
+                               switch (pht_info->ht_param &
+                                       IEEE80211_HT_PARAM_CHA_SEC_OFFSET) {
+                               case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                                        pmlmeext->cur_ch_offset =
                                                HAL_PRIME_CHNL_OFFSET_LOWER;
                                        break;
 
-                               case 3:
+                               case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
                                        pmlmeext->cur_ch_offset =
                                                HAL_PRIME_CHNL_OFFSET_UPPER;
                                        break;
@@ -6063,7 +5721,7 @@ int disconnect_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 
        rtw_free_uc_swdec_pending_queue23a(padapter);
 
-       return  H2C_SUCCESS;
+       return H2C_SUCCESS;
 }
 
 static int
@@ -6074,7 +5732,7 @@ rtw_scan_ch_decision(struct rtw_adapter *padapter,
        int i, j;
        int scan_ch_num = 0;
        int set_idx;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
        /* clear out first */
        memset(out, 0, sizeof(struct rtw_ieee80211_channel)*out_num);
@@ -6150,7 +5808,8 @@ int sitesurvey_cmd_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
                for (i = 0; i < RTW_SSID_SCAN_AMOUNT; i++) {
                        if (pparm->ssid[i].ssid_len) {
                                memcpy(pmlmeext->sitesurvey_res.ssid[i].ssid,
-                                      pparm->ssid[i].ssid, IW_ESSID_MAX_SIZE);
+                                      pparm->ssid[i].ssid,
+                                      IEEE80211_MAX_SSID_LEN);
                                pmlmeext->sitesurvey_res.ssid[i].ssid_len =
                                        pparm->ssid[i].ssid_len;
                        } else {
@@ -6227,7 +5886,7 @@ int setauth_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        if (pparm->mode < 4)
                pmlmeinfo->auth_algo = pparm->mode;
 
-       return  H2C_SUCCESS;
+       return H2C_SUCCESS;
 }
 
 int setkey_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
@@ -6352,7 +6011,7 @@ int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        psta = rtw_get_stainfo23a(&padapter->stapriv, pparm->addr);
 
        if (!psta)
-               return  H2C_SUCCESS;
+               return H2C_SUCCESS;
 
        if (((pmlmeinfo->state & WIFI_FW_ASSOC_SUCCESS) &&
             pmlmeinfo->HT_enable) ||
@@ -6364,27 +6023,26 @@ int add_ba_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        } else
                psta->htpriv.candidate_tid_bitmap &= ~BIT(pparm->tid);
 
-       return  H2C_SUCCESS;
+       return H2C_SUCCESS;
 }
 
 int set_tx_beacon_cmd23a(struct rtw_adapter* padapter)
 {
        struct cmd_obj *ph2c;
-       struct Tx_Beacon_param  *ptxBeacon_parm;
+       struct Tx_Beacon_param *ptxBeacon_parm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        u8 res = _SUCCESS;
        int len_diff = 0;
 
-       ph2c = (struct cmd_obj *)kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
+       ph2c = kzalloc(sizeof(struct cmd_obj), GFP_ATOMIC);
        if (!ph2c) {
                res = _FAIL;
                goto exit;
        }
 
-       ptxBeacon_parm = (struct Tx_Beacon_param *)
-               kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC);
+       ptxBeacon_parm = kzalloc(sizeof(struct Tx_Beacon_param), GFP_ATOMIC);
        if (!ptxBeacon_parm) {
                kfree(ph2c);
                res = _FAIL;
@@ -6394,10 +6052,9 @@ int set_tx_beacon_cmd23a(struct rtw_adapter* padapter)
        memcpy(&ptxBeacon_parm->network, &pmlmeinfo->network,
               sizeof(struct wlan_bssid_ex));
 
-       len_diff = update_hidden_ssid(
-               ptxBeacon_parm->network.IEs+_BEACON_IE_OFFSET_,
-               ptxBeacon_parm->network.IELength-_BEACON_IE_OFFSET_,
-               pmlmeinfo->hidden_ssid_mode);
+       len_diff = update_hidden_ssid(ptxBeacon_parm->network.IEs,
+                                     ptxBeacon_parm->network.IELength,
+                                     pmlmeinfo->hidden_ssid_mode);
        ptxBeacon_parm->network.IELength += len_diff;
 
        init_h2fwcmd_w_parm_no_rsp(ph2c, ptxBeacon_parm,
@@ -6512,7 +6169,7 @@ int tx_beacon_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 int set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 {
        const struct set_ch_parm *set_ch_parm;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
        if (!pbuf)
                return H2C_PARAMETERS_ERROR;
@@ -6530,13 +6187,13 @@ int set_ch_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        set_channel_bwmode23a(padapter, set_ch_parm->ch,
                              set_ch_parm->ch_offset, set_ch_parm->bw);
 
-       return  H2C_SUCCESS;
+       return H2C_SUCCESS;
 }
 
 int set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 {
        const struct SetChannelPlan_param *setChannelPlan_param;
-       struct mlme_ext_priv    *pmlmeext = &padapter->mlmeextpriv;
+       struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
 
        if (!pbuf)
                return H2C_PARAMETERS_ERROR;
@@ -6549,7 +6206,7 @@ int set_chplan_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
        init_channel_list(padapter, pmlmeext->channel_set,
                          pmlmeext->max_chan_nums, &pmlmeext->channel_list);
 
-       return  H2C_SUCCESS;
+       return H2C_SUCCESS;
 }
 
 int led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
@@ -6561,12 +6218,12 @@ int led_blink_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 
        ledBlink_param = (struct LedBlink_param *)pbuf;
 
-       return  H2C_SUCCESS;
+       return H2C_SUCCESS;
 }
 
 int set_csa_hdl23a(struct rtw_adapter *padapter, const u8 *pbuf)
 {
-       return  H2C_REJECTED;
+       return H2C_REJECTED;
 }
 
 /*  TDLS_WRCR          : write RCR DATA BIT */
index dbd01b652e0261f06f58b16aa29e3b5cdfafd75a..7dc7c90eba0ea727e049b508b998355308b614b3 100644 (file)
@@ -114,7 +114,6 @@ int ips_leave23a(struct rtw_adapter * padapter)
 
 static bool rtw_pwr_unassociated_idle(struct rtw_adapter *adapter)
 {
-       struct rtw_adapter *buddy = adapter->pbuddy_adapter;
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
        struct xmit_priv *pxmit_priv = &adapter->xmitpriv;
 
@@ -130,21 +129,6 @@ static bool rtw_pwr_unassociated_idle(struct rtw_adapter *adapter)
                goto exit;
        }
 
-       /* consider buddy, if exist */
-       if (buddy) {
-               struct mlme_priv *b_pmlmepriv = &buddy->mlmepriv;
-
-               if (check_fwstate(b_pmlmepriv,
-                                 WIFI_ASOC_STATE|WIFI_SITE_MONITOR) ||
-                   check_fwstate(b_pmlmepriv,
-                                 WIFI_UNDER_LINKING|WIFI_UNDER_WPS) ||
-                   check_fwstate(b_pmlmepriv, WIFI_AP_STATE) ||
-                   check_fwstate(b_pmlmepriv,
-                                 WIFI_ADHOC_MASTER_STATE|WIFI_ADHOC_STATE)) {
-                       goto exit;
-               }
-       }
-
        if (pxmit_priv->free_xmitbuf_cnt != NR_XMITBUFF ||
                pxmit_priv->free_xmit_extbuf_cnt != NR_XMIT_EXTBUFF) {
                DBG_8723A_LEVEL(_drv_always_,
index 18a42a27b488968bbd85d075d0cd20ec6e828fa8..c152aefb59ea51d8640db8cf8f5a3233c4c01ba5 100644 (file)
@@ -23,7 +23,6 @@ void rtw_sreset_init(struct rtw_adapter *padapter)
 
        mutex_init(&psrtpriv->silentreset_mutex);
        psrtpriv->silent_reset_inprogress = false;
-       psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
        psrtpriv->last_tx_time = 0;
        psrtpriv->last_tx_complete_time = 0;
 }
@@ -34,54 +33,10 @@ void rtw_sreset_reset_value(struct rtw_adapter *padapter)
        struct sreset_priv *psrtpriv = &pHalData->srestpriv;
 
        psrtpriv->silent_reset_inprogress = false;
-       psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
        psrtpriv->last_tx_time = 0;
        psrtpriv->last_tx_complete_time = 0;
 }
 
-u8 rtw_sreset_get_wifi_status(struct rtw_adapter *padapter)
-{
-       struct hal_data_8723a *pHalData = GET_HAL_DATA(padapter);
-       struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-       u8 status = WIFI_STATUS_SUCCESS;
-       u32 val32 = 0;
-
-       if (psrtpriv->silent_reset_inprogress)
-               return status;
-       val32 = rtl8723au_read32(padapter, REG_TXDMA_STATUS);
-       if (val32 == 0xeaeaeaea) {
-               psrtpriv->Wifi_Error_Status = WIFI_IF_NOT_EXIST;
-       } else if (val32 != 0) {
-               DBG_8723A("txdmastatu(%x)\n", val32);
-               psrtpriv->Wifi_Error_Status = WIFI_MAC_TXDMA_ERROR;
-       }
-
-       if (WIFI_STATUS_SUCCESS != psrtpriv->Wifi_Error_Status) {
-               DBG_8723A("==>%s error_status(0x%x)\n", __func__, psrtpriv->Wifi_Error_Status);
-               status = (psrtpriv->Wifi_Error_Status &~(USB_READ_PORT_FAIL|USB_WRITE_PORT_FAIL));
-       }
-       DBG_8723A("==> %s wifi_status(0x%x)\n", __func__, status);
-
-       /* status restore */
-       psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
-
-       return status;
-}
-
-void sreset_set_wifi_error_status23a(struct rtw_adapter *padapter, u32 status)
-{
-       struct hal_data_8723a   *pHalData = GET_HAL_DATA(padapter);
-
-       pHalData->srestpriv.Wifi_Error_Status = status;
-}
-
-void sreset_set_trigger_point(struct rtw_adapter *padapter, s32 tgp)
-{
-       struct hal_data_8723a   *pHalData = GET_HAL_DATA(padapter);
-
-       pHalData->srestpriv.dbg_trigger_point = tgp;
-}
-
 bool rtw_sreset_inprogress(struct rtw_adapter *padapter)
 {
        struct rtw_adapter *primary_adapter = GET_PRIMARY_ADAPTER(padapter);
@@ -242,8 +197,6 @@ void rtw_sreset_reset(struct rtw_adapter *active_adapter)
 
        DBG_8723A("%s\n", __func__);
 
-       psrtpriv->Wifi_Error_Status = WIFI_STATUS_SUCCESS;
-
        mutex_lock(&psrtpriv->silentreset_mutex);
        psrtpriv->silent_reset_inprogress = true;
        pwrpriv->change_rfpwrstate = rf_off;
index 14a82bea826ffc82f26caf3eecb1f9d9581aa7d6..8db844bb7983d861c90e5ca7a4a578d2219fe65a 100644 (file)
@@ -22,6 +22,8 @@
 #include <sta_info.h>
 #include <rtl8723a_hal.h>
 
+static const u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+
 static void _rtw_init_stainfo(struct sta_info *psta)
 {
        memset((u8 *)psta, 0, sizeof (struct sta_info));
@@ -107,7 +109,7 @@ int _rtw_free_sta_priv23a(struct sta_priv *pstapriv)
 }
 
 struct sta_info *
-rtw_alloc_stainfo23a(struct sta_priv *pstapriv, u8 *hwaddr, gfp_t gfp)
+rtw_alloc_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr, gfp_t gfp)
 {
        struct list_head        *phash_list;
        struct sta_info *psta;
@@ -126,7 +128,7 @@ rtw_alloc_stainfo23a(struct sta_priv *pstapriv, u8 *hwaddr, gfp_t gfp)
 
        psta->padapter = pstapriv->padapter;
 
-       memcpy(psta->hwaddr, hwaddr, ETH_ALEN);
+       ether_addr_copy(psta->hwaddr, hwaddr);
 
        index = wifi_mac_hash(hwaddr);
 
@@ -344,7 +346,6 @@ struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr)
        struct sta_info *psta = NULL;
        u32     index;
        const u8 *addr;
-       u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
        if (hwaddr == NULL)
                return NULL;
@@ -363,10 +364,10 @@ struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr)
        list_for_each(plist, phead) {
                psta = container_of(plist, struct sta_info, hash_list);
 
-               if (!memcmp(psta->hwaddr, addr, ETH_ALEN)) {
-                       /*  if found the matched address */
+               /*  if found the matched address */
+               if (ether_addr_equal(psta->hwaddr, addr))
                        break;
-               }
+
                psta = NULL;
        }
        spin_unlock_bh(&pstapriv->sta_hash_lock);
@@ -379,9 +380,8 @@ int rtw_init_bcmc_stainfo23a(struct rtw_adapter* padapter)
        struct sta_info         *psta;
        struct tx_servq *ptxservq;
        int res = _SUCCESS;
-       unsigned char bcast_addr[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
-       psta = rtw_alloc_stainfo23a(pstapriv, bcast_addr, GFP_KERNEL);
+       psta = rtw_alloc_stainfo23a(pstapriv, bc_addr, GFP_KERNEL);
        if (psta == NULL) {
                res = _FAIL;
                RT_TRACE(_module_rtl871x_sta_mgt_c_, _drv_err_,
@@ -399,9 +399,8 @@ struct sta_info *rtw_get_bcmc_stainfo23a(struct rtw_adapter *padapter)
 {
        struct sta_info         *psta;
        struct sta_priv         *pstapriv = &padapter->stapriv;
-       u8 bc_addr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
 
-        psta = rtw_get_stainfo23a(pstapriv, bc_addr);
+       psta = rtw_get_stainfo23a(pstapriv, bc_addr);
        return psta;
 }
 
@@ -422,7 +421,7 @@ bool rtw_access_ctrl23a(struct rtw_adapter *padapter, u8 *mac_addr)
        list_for_each(plist, phead) {
                paclnode = container_of(plist, struct rtw_wlan_acl_node, list);
 
-               if (!memcmp(paclnode->addr, mac_addr, ETH_ALEN)) {
+               if (ether_addr_equal(paclnode->addr, mac_addr)) {
                        if (paclnode->valid) {
                                match = true;
                                break;
index 579a4a8c8276523d7f49829d912b1a3d46e5fca5..66e72e2673102a2a0800b2d8021b676658357ef4 100644 (file)
@@ -399,14 +399,6 @@ inline u8 *get_my_bssid23a(struct wlan_bssid_ex *pnetwork)
        return pnetwork->MacAddress;
 }
 
-u16 get_beacon_interval23a(struct wlan_bssid_ex *bss)
-{
-       unsigned short val;
-       memcpy(&val, rtw_get_beacon_interval23a_from_ie(bss->IEs), 2);
-
-       return le16_to_cpu(val);
-}
-
 bool is_client_associated_to_ap23a(struct rtw_adapter *padapter)
 {
        struct mlme_ext_priv *pmlmeext;
@@ -504,7 +496,7 @@ void flush_all_cam_entry23a(struct rtw_adapter *padapter)
        memset(pmlmeinfo->FW_sta_info, 0, sizeof(pmlmeinfo->FW_sta_info));
 }
 
-int WMM_param_handler23a(struct rtw_adapter *padapter, u8 *p)
+int WMM_param_handler23a(struct rtw_adapter *padapter, const u8 *p)
 {
        /* struct registry_priv *pregpriv = &padapter->registrypriv; */
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
@@ -633,9 +625,9 @@ void WMMOnAssocRsp23a(struct rtw_adapter *padapter)
        return;
 }
 
-static void bwmode_update_check(struct rtw_adapter *padapter, u8 *p)
+static void bwmode_update_check(struct rtw_adapter *padapter, const u8 *p)
 {
-       struct HT_info_element *pHT_info;
+       struct ieee80211_ht_operation *pHT_info;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -648,19 +640,20 @@ static void bwmode_update_check(struct rtw_adapter *padapter, u8 *p)
                return;
        if (!phtpriv->ht_option)
                return;
-       if (p[1] > sizeof(struct HT_info_element))
+       if (p[1] != sizeof(struct ieee80211_ht_operation))
                return;
 
-       pHT_info = (struct HT_info_element *)(p + 2);
+       pHT_info = (struct ieee80211_ht_operation *)(p + 2);
 
-       if ((pHT_info->infos[0] & BIT(2)) && pregistrypriv->cbw40_enable) {
+       if ((pHT_info->ht_param & IEEE80211_HT_PARAM_CHAN_WIDTH_ANY) &&
+           pregistrypriv->cbw40_enable) {
                new_bwmode = HT_CHANNEL_WIDTH_40;
 
-               switch (pHT_info->infos[0] & 0x3) {
-               case 1:
+               switch (pHT_info->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET){
+               case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
                        new_ch_offset = HAL_PRIME_CHNL_OFFSET_LOWER;
                        break;
-               case 3:
+               case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
                        new_ch_offset = HAL_PRIME_CHNL_OFFSET_UPPER;
                        break;
                default:
@@ -711,7 +704,7 @@ static void bwmode_update_check(struct rtw_adapter *padapter, u8 *p)
        }
 }
 
-void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p)
+void HT_caps_handler23a(struct rtw_adapter *padapter, const u8 *p)
 {
        unsigned int i;
        u8 rf_type;
@@ -720,60 +713,60 @@ void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct ht_priv *phtpriv = &pmlmepriv->htpriv;
+       struct ieee80211_ht_cap *cap;
+       u8 *dstcap;
 
        if (!p)
                return;
 
-       if (phtpriv->ht_option == false)
+       if (!phtpriv->ht_option)
                return;
 
        pmlmeinfo->HT_caps_enable = 1;
 
+       cap = &pmlmeinfo->ht_cap;
+       dstcap = (u8 *)cap;
        for (i = 0; i < p[1]; i++) {
                if (i != 2) {
-                       /*      Commented by Albert 2010/07/12 */
-                       /*      Got the endian issue here. */
-                       pmlmeinfo->HT_caps.u.HT_cap[i] &= p[i + 2];
+                       dstcap[i] &= p[i + 2];
                } else {
                        /* modify from  fw by Thomas 2010/11/17 */
-                       if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3) > (p[i + 2] & 0x3))
-                               max_AMPDU_len = p[i + 2] & 0x3;
+                       if ((cap->ampdu_params_info &
+                            IEEE80211_HT_AMPDU_PARM_FACTOR) >
+                           (p[i + 2] & IEEE80211_HT_AMPDU_PARM_FACTOR))
+                               max_AMPDU_len = p[i + 2] &
+                                       IEEE80211_HT_AMPDU_PARM_FACTOR;
                        else
-                               max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3;
-
-                       if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) > (p[i + 2] & 0x1c))
-                               min_MPDU_spacing = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c;
+                               max_AMPDU_len = cap->ampdu_params_info &
+                                       IEEE80211_HT_AMPDU_PARM_FACTOR;
+
+                       if ((cap->ampdu_params_info &
+                            IEEE80211_HT_AMPDU_PARM_DENSITY) >
+                           (p[i + 2] & IEEE80211_HT_AMPDU_PARM_DENSITY))
+                               min_MPDU_spacing = cap->ampdu_params_info &
+                                       IEEE80211_HT_AMPDU_PARM_DENSITY;
                        else
-                               min_MPDU_spacing = p[i + 2] & 0x1c;
+                               min_MPDU_spacing = p[i + 2] &
+                                       IEEE80211_HT_AMPDU_PARM_DENSITY;
 
-                       pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para =
+                       cap->ampdu_params_info =
                                max_AMPDU_len | min_MPDU_spacing;
                }
        }
 
-       /*      Commented by Albert 2010/07/12 */
-       /*      Have to handle the endian issue after copying. */
-       /*      HT_ext_caps didn't be used yet. */
-       pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info =
-               le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_caps_info);
-       pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps =
-               le16_to_cpu(pmlmeinfo->HT_caps.u.HT_cap_element.HT_ext_caps);
-
        rf_type = rtl8723a_get_rf_type(padapter);
 
        /* update the MCS rates */
-       for (i = 0; i < 16; i++) {
+       for (i = 0; i < IEEE80211_HT_MCS_MASK_LEN; i++) {
                if (rf_type == RF_1T1R || rf_type == RF_1T2R)
-                       pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &=
-                               MCS_rate_1R23A[i];
+                       cap->mcs.rx_mask[i] &= MCS_rate_1R23A[i];
                else
-                       pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &=
-                               MCS_rate_2R23A[i];
+                       cap->mcs.rx_mask[i] &= MCS_rate_2R23A[i];
        }
        return;
 }
 
-void HT_info_handler23a(struct rtw_adapter *padapter, u8 *p)
+void HT_info_handler23a(struct rtw_adapter *padapter, const u8 *p)
 {
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -783,10 +776,10 @@ void HT_info_handler23a(struct rtw_adapter *padapter, u8 *p)
        if (!p)
                return;
 
-       if (phtpriv->ht_option == false)
+       if (!phtpriv->ht_option)
                return;
 
-       if (p[1] > sizeof(struct HT_info_element))
+       if (p[1] != sizeof(struct ieee80211_ht_operation))
                return;
 
        pmlmeinfo->HT_info_enable = 1;
@@ -818,16 +811,18 @@ void HTOnAssocRsp23a(struct rtw_adapter *padapter)
                AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k
                AMPDU_para [4:2]:Min MPDU Start Spacing
        */
-       max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03;
+       max_AMPDU_len = pmlmeinfo->ht_cap.ampdu_params_info &
+               IEEE80211_HT_AMPDU_PARM_FACTOR;
 
        min_MPDU_spacing =
-               (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2;
+               (pmlmeinfo->ht_cap.ampdu_params_info &
+                IEEE80211_HT_AMPDU_PARM_DENSITY) >> 2;
 
        rtl8723a_set_ampdu_min_space(padapter, min_MPDU_spacing);
        rtl8723a_set_ampdu_factor(padapter, max_AMPDU_len);
 }
 
-void ERP_IE_handler23a(struct rtw_adapter *padapter, u8 *p)
+void ERP_IE_handler23a(struct rtw_adapter *padapter, const u8 *p)
 {
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -881,110 +876,48 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
                          struct ieee80211_mgmt *mgmt, u32 pkt_len)
 {
        struct wlan_network *cur_network = &Adapter->mlmepriv.cur_network;
-       struct HT_info_element *pht_info;
-       struct ieee80211_ht_cap *pht_cap;
-       struct wlan_bssid_ex *bssid;
+       struct ieee80211_ht_operation *pht_info;
        unsigned short val16;
-       u16 wpa_len = 0, rsn_len = 0;
-       u8 encryp_protocol;
+       u8 crypto, bcn_channel;
        int group_cipher = 0, pairwise_cipher = 0, is_8021x = 0, r;
-       u32 bcn_channel;
-       unsigned short ht_cap_info;
-       unsigned char ht_info_infos_0;
-       int len, pie_len, ie_offset;
-       const u8 *p;
-       u8 *pie;
+       int pie_len, ssid_len, privacy;
+       const u8 *p, *ssid;
 
        if (is_client_associated_to_ap23a(Adapter) == false)
-               return true;
+               return _SUCCESS;
 
        if (unlikely(!ieee80211_is_beacon(mgmt->frame_control))) {
                printk(KERN_WARNING "%s: received a non beacon frame!\n",
                       __func__);
-               return false;
-       }
-
-       len = pkt_len - sizeof(struct ieee80211_hdr_3addr);
-
-       if (len > MAX_IE_SZ) {
-               DBG_8723A("%s IE too long for survey event\n", __func__);
                return _FAIL;
        }
 
-       if (memcmp(cur_network->network.MacAddress, mgmt->bssid, 6)) {
-               DBG_8723A("Oops: rtw_check_network_encrypt linked but recv "
-                         "other bssid bcn\n" MAC_FMT MAC_FMT,
-                         MAC_ARG(mgmt->bssid),
+       if (!ether_addr_equal(cur_network->network.MacAddress, mgmt->bssid)) {
+               DBG_8723A("%s: linked but recv other bssid bcn"
+                         MAC_FMT MAC_FMT "\n", __func__, MAC_ARG(mgmt->bssid),
                          MAC_ARG(cur_network->network.MacAddress));
-               return true;
-       }
-
-       bssid = kzalloc(sizeof(struct wlan_bssid_ex), GFP_ATOMIC);
-       if (!bssid)
                return _FAIL;
-
-       bssid->reserved = 1;
-
-       bssid->Length = offsetof(struct wlan_bssid_ex, IEs) + len;
-
-       /* below is to copy the information element */
-       bssid->IELength = len;
-       memcpy(bssid->IEs, &mgmt->u, len);
+       }
 
        /* check bw and channel offset */
        /* parsing HT_CAP_IE */
-       ie_offset = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u);
-       pie = bssid->IEs + ie_offset;
-       pie_len = pkt_len - ie_offset;
-
-       p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY, pie, pie_len);
-       if (p && p[1] > 0) {
-               pht_cap = (struct ieee80211_ht_cap *)(p + 2);
-               ht_cap_info = pht_cap->cap_info;
-       } else {
-               pht_cap = NULL;
-               ht_cap_info = 0;
-       }
-
-       /* parsing HT_INFO_IE */
-       p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pie, pie_len);
-       if (p && p[1] > 0) {
-               pht_info = (struct HT_info_element *)(p + 2);
-               ht_info_infos_0 = pht_info->infos[0];
-       } else {
-               pht_info = NULL;
-               ht_info_infos_0 = 0;
-       }
-
-       if (ht_cap_info != cur_network->BcnInfo.ht_cap_info ||
-           ((ht_info_infos_0 & 0x03) !=
-            (cur_network->BcnInfo.ht_info_infos_0 & 0x03))) {
-               DBG_8723A("%s bcn now: ht_cap_info:%x ht_info_infos_0:%x\n",
-                         __func__, ht_cap_info, ht_info_infos_0);
-               DBG_8723A("%s bcn link: ht_cap_info:%x ht_info_infos_0:%x\n",
-                         __func__, cur_network->BcnInfo.ht_cap_info,
-                         cur_network->BcnInfo.ht_info_infos_0);
-               DBG_8723A("%s bw mode change, disconnect\n", __func__);
-               /* bcn_info_update */
-               cur_network->BcnInfo.ht_cap_info = ht_cap_info;
-               cur_network->BcnInfo.ht_info_infos_0 = ht_info_infos_0;
-               /* to do : need to check that whether modify related
-                  register of BB or not */
-       }
+       pie_len = pkt_len - offsetof(struct ieee80211_mgmt, u.beacon.variable);
 
        /* Checking for channel */
-       p = cfg80211_find_ie(WLAN_EID_DS_PARAMS, pie, pie_len);
+       p = cfg80211_find_ie(WLAN_EID_DS_PARAMS, mgmt->u.beacon.variable,
+                            pie_len);
        if (p)
                bcn_channel = p[2];
        else {
                /* In 5G, some ap do not have DSSET IE checking HT
                   info for channel */
-               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, pie, pie_len);
+               p = cfg80211_find_ie(WLAN_EID_HT_OPERATION,
+                                    mgmt->u.beacon.variable, pie_len);
 
-               if (pht_info)
-                       bcn_channel = pht_info->primary_channel;
-               else { /* we don't find channel IE, so don't check it */
+               if (p && p[1] > 0) {
+                       pht_info = (struct ieee80211_ht_operation *)(p + 2);
+                       bcn_channel = pht_info->primary_chan;
+               } else { /* we don't find channel IE, so don't check it */
                        DBG_8723A("Oops: %s we don't find channel IE, so don't "
                                  "check it\n", __func__);
                        bcn_channel = Adapter->mlmeextpriv.cur_channel;
@@ -998,76 +931,65 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
        }
 
        /* checking SSID */
-       p = cfg80211_find_ie(WLAN_EID_SSID, pie, pie_len);
+       p = cfg80211_find_ie(WLAN_EID_SSID, mgmt->u.beacon.variable, pie_len);
        if (p && p[1]) {
-               memcpy(bssid->Ssid.ssid, p + 2, p[1]);
-               bssid->Ssid.ssid_len = p[1];
+               ssid = p + 2;
+               ssid_len = p[1];
        } else {
                DBG_8723A("%s marc: cannot find SSID for survey event\n",
                          __func__);
-               bssid->Ssid.ssid_len = 0;
-               bssid->Ssid.ssid[0] = '\0';
+               ssid = NULL;
+               ssid_len = 0;
        }
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
                 ("%s bssid.Ssid.Ssid:%s bssid.Ssid.SsidLength:%d "
                  "cur_network->network.Ssid.Ssid:%s len:%d\n", __func__,
-                 bssid->Ssid.ssid, bssid->Ssid.ssid_len,
-                 cur_network->network.Ssid.ssid,
+                 ssid, ssid_len, cur_network->network.Ssid.ssid,
                  cur_network->network.Ssid.ssid_len));
 
-       if (memcmp(bssid->Ssid.ssid, cur_network->network.Ssid.ssid, 32) ||
-           bssid->Ssid.ssid_len != cur_network->network.Ssid.ssid_len) {
-               if (bssid->Ssid.ssid[0] != '\0' &&
-                   bssid->Ssid.ssid_len != 0) { /* not hidden ssid */
-                       DBG_8723A("%s(), SSID is not match return FAIL\n",
-                                 __func__);
-                       goto _mismatch;
-               }
+       if (ssid_len != cur_network->network.Ssid.ssid_len || ssid_len > 32 ||
+           (ssid_len &&
+            memcmp(ssid, cur_network->network.Ssid.ssid, ssid_len))) {
+               DBG_8723A("%s(), SSID is not match return FAIL\n", __func__);
+               goto _mismatch;
        }
 
        /* check encryption info */
-       val16 = rtw_get_capability23a(bssid);
+       val16 = le16_to_cpu(mgmt->u.beacon.capab_info);
 
-       if (val16 & BIT(4))
-               bssid->Privacy = 1;
+       if (val16 & WLAN_CAPABILITY_PRIVACY)
+               privacy = 1;
        else
-               bssid->Privacy = 0;
+               privacy = 0;
 
        RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
                 ("%s(): cur_network->network.Privacy is %d, bssid.Privacy "
-                 "is %d\n", __func__, cur_network->network.Privacy,
-                 bssid->Privacy));
-       if (cur_network->network.Privacy != bssid->Privacy) {
+                 "is %d\n", __func__, cur_network->network.Privacy, privacy));
+       if (cur_network->network.Privacy != privacy) {
                DBG_8723A("%s(), privacy is not match return FAIL\n", __func__);
                goto _mismatch;
        }
 
-       rtw_get_sec_ie23a(bssid->IEs, bssid->IELength, NULL, &rsn_len, NULL,
-                         &wpa_len);
-
-       if (rsn_len > 0)
-               encryp_protocol = ENCRYP_PROTOCOL_WPA2;
-       else if (wpa_len > 0)
-               encryp_protocol = ENCRYP_PROTOCOL_WPA;
-       else {
-               if (bssid->Privacy)
-                       encryp_protocol = ENCRYP_PROTOCOL_WEP;
-               else
-                       encryp_protocol = ENCRYP_PROTOCOL_OPENSYS;
-       }
-
-       if (cur_network->BcnInfo.encryp_protocol != encryp_protocol) {
-               DBG_8723A("%s(): enctyp is not match, return FAIL\n", __func__);
-               goto _mismatch;
-       }
-
-       if (encryp_protocol == ENCRYP_PROTOCOL_WPA ||
-           encryp_protocol == ENCRYP_PROTOCOL_WPA2) {
+       p = cfg80211_find_ie(WLAN_EID_RSN, mgmt->u.beacon.variable, pie_len);
+       if (p && p[1]) {
+               crypto = ENCRYP_PROTOCOL_WPA2;
+               if (p && p[1]) {
+                       r = rtw_parse_wpa2_ie23a(p, p[1] + 2, &group_cipher,
+                                                &pairwise_cipher, &is_8021x);
+                       if (r == _SUCCESS)
+                               RT_TRACE(_module_rtl871x_mlme_c_, _drv_info_,
+                                        ("%s pnetwork->pairwise_cipher: %d, "
+                                         "pnetwork->group_cipher: %d, is_802x "
+                                         ": %d\n", __func__, pairwise_cipher,
+                                         group_cipher, is_8021x));
+                       }
+       } else {
                p = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
                                            WLAN_OUI_TYPE_MICROSOFT_WPA,
-                                           pie, pie_len);
-               if (p && p[1] > 0) {
+                                           mgmt->u.beacon.variable, pie_len);
+               if (p && p[1]) {
+                       crypto = ENCRYP_PROTOCOL_WPA;
                        r = rtw_parse_wpa_ie23a(p, p[1] + 2, &group_cipher,
                                                &pairwise_cipher, &is_8021x);
                        if (r == _SUCCESS)
@@ -1077,24 +999,19 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
                                          "%d\n", __func__, pairwise_cipher,
                                          group_cipher, is_8021x));
                } else {
-                       p = cfg80211_find_ie(WLAN_EID_RSN, pie, pie_len);
-
-                       if (p && p[1] > 0) {
-                               r = rtw_parse_wpa2_ie23a(p, p[1] + 2,
-                                                        &group_cipher,
-                                                        &pairwise_cipher,
-                                                        &is_8021x);
-                               if (r == _SUCCESS)
-                                       RT_TRACE(_module_rtl871x_mlme_c_,
-                                                _drv_info_,
-                                                ("%s pnetwork->pairwise_cipher"
-                                                 ": %d, pnetwork->group_cipher"
-                                                 " is %d, is_802x is %d\n",
-                                                 __func__, pairwise_cipher,
-                                                 group_cipher, is_8021x));
-                       }
+                       if (privacy)
+                               crypto = ENCRYP_PROTOCOL_WEP;
+                       else
+                               crypto = ENCRYP_PROTOCOL_OPENSYS;
                }
+       }
 
+       if (cur_network->BcnInfo.encryp_protocol != crypto) {
+               DBG_8723A("%s(): encryption mismatch, return FAIL\n", __func__);
+               goto _mismatch;
+       }
+
+       if (crypto == ENCRYP_PROTOCOL_WPA || crypto == ENCRYP_PROTOCOL_WPA2) {
                RT_TRACE(_module_rtl871x_mlme_c_, _drv_err_,
                         ("%s cur_network->group_cipher is %d: %d\n", __func__,
                          cur_network->BcnInfo.group_cipher, group_cipher));
@@ -1116,41 +1033,31 @@ int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
                }
        }
 
-       kfree(bssid);
        return _SUCCESS;
 
 _mismatch:
-       kfree(bssid);
 
        return _FAIL;
 }
 
-void update_beacon23a_info(struct rtw_adapter *padapter, u8 *pframe,
+void update_beacon23a_info(struct rtw_adapter *padapter,
+                          struct ieee80211_mgmt *mgmt,
                           uint pkt_len, struct sta_info *psta)
 {
-       unsigned int i;
        unsigned int len;
-       u8 *p;
+       const u8 *p;
 
-       len = pkt_len -
-               (_BEACON_IE_OFFSET_ + sizeof(struct ieee80211_hdr_3addr));
+       len = pkt_len - offsetof(struct ieee80211_mgmt, u.beacon.variable);
 
-       for (i = 0; i < len;) {
-               p = (u8 *)(pframe + (_BEACON_IE_OFFSET_ + sizeof(struct ieee80211_hdr_3addr)) + i);
+       p = cfg80211_find_ie(WLAN_EID_HT_OPERATION, mgmt->u.beacon.variable,
+                            len);
+       if (p)
+               bwmode_update_check(padapter, p);
 
-               switch (p[0]) {
-               case WLAN_EID_HT_OPERATION:     /* HT info */
-                       /* HT_info_handler23a(padapter, pIE); */
-                       bwmode_update_check(padapter, p);
-                       break;
-               case WLAN_EID_ERP_INFO:
-                       ERP_IE_handler23a(padapter, p);
-                       VCS_update23a(padapter, psta);
-                       break;
-               default:
-                       break;
-               }
-               i += (p[1] + 2);
+       p = cfg80211_find_ie(WLAN_EID_ERP_INFO, mgmt->u.beacon.variable, len);
+       if (p) {
+               ERP_IE_handler23a(padapter, p);
+               VCS_update23a(padapter, psta);
        }
 }
 
@@ -1161,13 +1068,9 @@ bool is_ap_in_tkip23a(struct rtw_adapter *padapter)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
        const u8 *p;
-       int bcn_fixed_size;
 
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
-
-       if (rtw_get_capability23a(cur_network) & WLAN_CAPABILITY_PRIVACY) {
-               for (i = bcn_fixed_size; i < pmlmeinfo->network.IELength;) {
+       if (cur_network->capability & WLAN_CAPABILITY_PRIVACY) {
+               for (i = 0; i < pmlmeinfo->network.IELength;) {
                        p = pmlmeinfo->network.IEs + i;
 
                        switch (p[0]) {
@@ -1196,13 +1099,9 @@ bool should_forbid_n_rate23a(struct rtw_adapter * padapter)
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct wlan_bssid_ex  *cur_network = &pmlmepriv->cur_network.network;
        const u8 *p;
-       int bcn_fixed_size;
-
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
 
-       if (rtw_get_capability23a(cur_network) & WLAN_CAPABILITY_PRIVACY) {
-               for (i = bcn_fixed_size; i < cur_network->IELength;) {
+       if (cur_network->capability & WLAN_CAPABILITY_PRIVACY) {
+               for (i = 0; i < cur_network->IELength;) {
                        p = cur_network->IEs + i;
 
                        switch (p[0]) {
@@ -1239,13 +1138,9 @@ bool is_ap_in_wep23a(struct rtw_adapter *padapter)
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
        const u8 *p;
-       int bcn_fixed_size;
-
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
 
-       if (rtw_get_capability23a(cur_network) & WLAN_CAPABILITY_PRIVACY) {
-               for (i = bcn_fixed_size; i < pmlmeinfo->network.IELength;) {
+       if (cur_network->capability & WLAN_CAPABILITY_PRIVACY) {
+               for (i = 0; i < pmlmeinfo->network.IELength;) {
                        p = pmlmeinfo->network.IEs + i;
 
                        switch (p[0]) {
@@ -1340,18 +1235,18 @@ unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz)
        return mask;
 }
 
-unsigned int update_MSC_rate23a(struct HT_caps_element *pHT_caps)
+unsigned int update_MSC_rate23a(struct ieee80211_ht_cap *pHT_caps)
 {
        unsigned int mask = 0;
 
-       mask = pHT_caps->u.HT_cap_element.MCS_rate[0] << 12 |
-               pHT_caps->u.HT_cap_element.MCS_rate[1] << 20;
+       mask = pHT_caps->mcs.rx_mask[0] << 12 |
+               pHT_caps->mcs.rx_mask[1] << 20;
 
        return mask;
 }
 
 int support_short_GI23a(struct rtw_adapter *padapter,
-                       struct HT_caps_element *pHT_caps)
+                       struct ieee80211_ht_cap *pHT_caps)
 {
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
@@ -1363,7 +1258,7 @@ int support_short_GI23a(struct rtw_adapter *padapter,
                return _FAIL;
        bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40)? 6: 5;
 
-       if (pHT_caps->u.HT_cap_element.HT_caps_info & (0x1 << bit_offset))
+       if (pHT_caps->cap_info & cpu_to_le16(0x1 << bit_offset))
                return _SUCCESS;
        else
                return _FAIL;
@@ -1425,17 +1320,14 @@ void update_tx_basic_rate23a(struct rtw_adapter *padapter, u8 wirelessmode)
 
 unsigned char check_assoc_AP23a(u8 *pframe, uint len)
 {
-       int i, bcn_fixed_size;
+       int i;
        u8 epigram_vendor_flag;
        u8 ralink_vendor_flag;
        const u8 *p;
        epigram_vendor_flag = 0;
        ralink_vendor_flag = 0;
 
-       bcn_fixed_size = offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-               offsetof(struct ieee80211_mgmt, u.beacon);
-
-       for (i = bcn_fixed_size; i < len;) {
+       for (i = 0; i < len;) {
                p = pframe + i;
 
                switch (p[0]) {
@@ -1678,28 +1570,3 @@ void process_addba_req23a(struct rtw_adapter *padapter,
                        true : false;
        }
 }
-
-static struct rtw_adapter *pbuddy_padapter;
-
-int rtw_handle_dualmac23a(struct rtw_adapter *adapter, bool init)
-{
-       int status = _SUCCESS;
-
-       if (init) {
-               if (pbuddy_padapter == NULL) {
-                       pbuddy_padapter = adapter;
-                       DBG_8723A("%s(): pbuddy_padapter == NULL, "
-                                 "Set pbuddy_padapter\n", __func__);
-               } else {
-                       adapter->pbuddy_adapter = pbuddy_padapter;
-                       pbuddy_padapter->pbuddy_adapter = adapter;
-                       /*  clear global value */
-                       pbuddy_padapter = NULL;
-                       DBG_8723A("%s(): pbuddy_padapter exist, "
-                                 "Exchange Information\n", __func__);
-               }
-       } else
-               pbuddy_padapter = NULL;
-
-       return status;
-}
index c001053890903bd740e283a11917818300fd5eeb..9054a987f06bd81caad20d8c03f45688bb17802c 100644 (file)
@@ -14,7 +14,6 @@
  ******************************************************************************/
 #include <drv_types.h>
 #include <rtl8723a_hal.h>
-#include <rtw_ioctl_set.h>
 #include <usb_ops_linux.h>
 
 #define DIS_PS_RX_BCN
@@ -5871,8 +5870,8 @@ btdm_1AntUpdateHalRAMask(struct rtw_adapter *padapter, u32 mac_id, u32 filter)
                mask = update_supported_rate23a(cur_network->SupportedRates,
                                                supportRateNum);
                mask |= (pmlmeinfo->HT_enable) ?
-                       update_MSC_rate23a(&pmlmeinfo->HT_caps):0;
-               if (support_short_GI23a(padapter, &pmlmeinfo->HT_caps))
+                       update_MSC_rate23a(&pmlmeinfo->ht_cap):0;
+               if (support_short_GI23a(padapter, &pmlmeinfo->ht_cap))
                        shortGIrate = true;
                break;
        case 1:/* for broadcast/multicast */
index e8737916c7ba0aa35c64ca0ddb140e8537c0ff44..66ece4942c02836151f3f43bc4533c2a9f3c4cb8 100644 (file)
@@ -18,7 +18,6 @@
 #include <drv_types.h>
 #include <recv_osdep.h>
 #include <mlme_osdep.h>
-#include <rtw_ioctl_set.h>
 #include <rtl8723a_hal.h>
 #include <usb_ops_linux.h>
 
@@ -201,57 +200,45 @@ void rtl8723a_set_FwPwrMode_cmd(struct rtw_adapter *padapter, u8 Mode)
 
 }
 
-static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength)
+static void
+ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength)
 {
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        u32 rate_len, pktlen;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct wlan_bssid_ex *cur_network = &pmlmeinfo->network;
        u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-       int bcn_fixed_size;
 
        /* DBG_8723A("%s\n", __func__); */
 
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
-       pwlanhdr->frame_control =
+       mgmt->frame_control =
                cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_BEACON);
 
-       memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN);
-       memcpy(pwlanhdr->addr2, myid(&padapter->eeprompriv), ETH_ALEN);
-       memcpy(pwlanhdr->addr3, get_my_bssid23a(cur_network), ETH_ALEN);
+       ether_addr_copy(mgmt->da, bc_addr);
+       ether_addr_copy(mgmt->sa, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt->bssid, get_my_bssid23a(cur_network));
 
        /* A Beacon frame shouldn't have fragment bits set */
-       pwlanhdr->seq_ctrl = 0;
-
-       pframe += sizeof(struct ieee80211_hdr_3addr);
-       pktlen = sizeof (struct ieee80211_hdr_3addr);
+       mgmt->seq_ctrl = 0;
 
        /* timestamp will be inserted by hardware */
-       pframe += 8;
-       pktlen += 8;
 
-       /*  beacon interval: 2 bytes */
-       memcpy(pframe, (unsigned char *)(rtw_get_beacon_interval23a_from_ie(cur_network->IEs)), 2);
+       put_unaligned_le16(cur_network->beacon_interval,
+                          &mgmt->u.beacon.beacon_int);
 
-       pframe += 2;
-       pktlen += 2;
+       put_unaligned_le16(cur_network->capability,
+                          &mgmt->u.beacon.capab_info);
 
-       /*  capability info: 2 bytes */
-       memcpy(pframe, (unsigned char *)(rtw_get_capability23a_from_ie(cur_network->IEs)), 2);
-
-       pframe += 2;
-       pktlen += 2;
+       pframe = mgmt->u.beacon.variable;
+       pktlen = offsetof(struct ieee80211_mgmt, u.beacon.variable);
 
        if ((pmlmeinfo->state&0x03) == WIFI_FW_AP_STATE) {
-               bcn_fixed_size =
-                       offsetof(struct ieee80211_mgmt, u.beacon.variable) -
-                       offsetof(struct ieee80211_mgmt, u.beacon);
-
                /* DBG_8723A("ie len =%d\n", cur_network->IELength); */
-               pktlen += cur_network->IELength - bcn_fixed_size;
-               memcpy(pframe, cur_network->IEs + bcn_fixed_size, pktlen);
+               pktlen += cur_network->IELength;
+               memcpy(pframe, cur_network->IEs, pktlen);
 
                goto _ConstructBeacon;
        }
@@ -406,7 +393,7 @@ ConstructNullFunctionData(struct rtw_adapter *padapter, u8 *pframe,
 static void ConstructProbeRsp(struct rtw_adapter *padapter, u8 *pframe,
                              u32 *pLength, u8 *StaAddr, bool bHideSSID)
 {
-       struct ieee80211_hdr *pwlanhdr;
+       struct ieee80211_mgmt *mgmt;
        u8 *mac, *bssid;
        u32 pktlen;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
@@ -415,38 +402,39 @@ static void ConstructProbeRsp(struct rtw_adapter *padapter, u8 *pframe,
 
        /* DBG_8723A("%s\n", __func__); */
 
-       pwlanhdr = (struct ieee80211_hdr *)pframe;
+       mgmt = (struct ieee80211_mgmt *)pframe;
 
        mac = myid(&padapter->eeprompriv);
        bssid = cur_network->MacAddress;
 
-       pwlanhdr->frame_control =
+       mgmt->frame_control =
                cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_PROBE_RESP);
 
-       pwlanhdr->seq_ctrl = 0;
+       mgmt->seq_ctrl = 0;
 
-       memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN);
-       memcpy(pwlanhdr->addr2, mac, ETH_ALEN);
-       memcpy(pwlanhdr->addr3, bssid, ETH_ALEN);
+       memcpy(mgmt->da, StaAddr, ETH_ALEN);
+       memcpy(mgmt->sa, mac, ETH_ALEN);
+       memcpy(mgmt->bssid, bssid, ETH_ALEN);
 
-       pktlen = sizeof(struct ieee80211_hdr_3addr);
-       pframe += pktlen;
+       put_unaligned_le64(cur_network->tsf,
+                          &mgmt->u.probe_resp.timestamp);
+       put_unaligned_le16(cur_network->beacon_interval,
+                          &mgmt->u.probe_resp.beacon_int);
+       put_unaligned_le16(cur_network->capability,
+                          &mgmt->u.probe_resp.capab_info);
+
+       pktlen = offsetof(struct ieee80211_mgmt, u.probe_resp.variable);
 
        if (cur_network->IELength > MAX_IE_SZ)
                return;
 
-       memcpy(pframe, cur_network->IEs, cur_network->IELength);
-       pframe += cur_network->IELength;
-       pktlen += cur_network->IELength;
+       memcpy(mgmt->u.probe_resp.variable, cur_network->IEs,
+              cur_network->IELength);
+       pktlen += (cur_network->IELength);
 
        *pLength = pktlen;
 }
 
-/*  To check if reserved page content is destroyed by beacon beacuse beacon is too large. */
-void CheckFwRsvdPageContent23a(struct rtw_adapter *Adapter)
-{
-}
-
 /*  */
 /*  Description: Fill the reserved packets that FW will use to RSVD page. */
 /*                     Now we just send 4 types packet to rsvd page. */
index 46f5abcbaeeb8bbb069a23c69e6ed869ed273c4a..8b3473fd71028bd4cfd7613c4821d2e7559748ee 100644 (file)
@@ -1034,8 +1034,6 @@ static void StopTxBeacon(struct rtw_adapter *padapter)
        rtl8723au_write8(padapter, REG_TBTT_PROHIBIT + 1, 0x64);
        pHalData->RegReg542 &= ~BIT(0);
        rtl8723au_write8(padapter, REG_TBTT_PROHIBIT + 2, pHalData->RegReg542);
-
-       CheckFwRsvdPageContent23a(padapter); /*  2010.06.23. Added by tynli. */
 }
 
 static void _BeaconFunctionEnable(struct rtw_adapter *padapter, u8 Enable,
index 0680e29a55287220498a56986373b76b01095def..3c46294b8788cc2686ab6e62208969e1aab0a2d0 100644 (file)
@@ -46,29 +46,10 @@ void rtl8723a_sreset_xmit_status_check(struct rtw_adapter *padapter)
                        } else {
                                diff_time = jiffies_to_msecs(jiffies - psrtpriv->last_tx_complete_time);
                                if (diff_time > 4000) {
-                                       /* padapter->Wifi_Error_Status = WIFI_TX_HANG; */
                                        DBG_8723A("%s tx hang\n", __func__);
                                        rtw_sreset_reset(padapter);
                                }
                        }
                }
        }
-
-       if (psrtpriv->dbg_trigger_point == SRESET_TGP_XMIT_STATUS) {
-               psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
-               rtw_sreset_reset(padapter);
-               return;
-       }
-}
-
-void rtl8723a_sreset_linked_status_check(struct rtw_adapter *padapter)
-{
-       struct hal_data_8723a   *pHalData = GET_HAL_DATA(padapter);
-       struct sreset_priv *psrtpriv = &pHalData->srestpriv;
-
-       if (psrtpriv->dbg_trigger_point == SRESET_TGP_LINK_STATUS) {
-               psrtpriv->dbg_trigger_point = SRESET_TGP_NULL;
-               rtw_sreset_reset(padapter);
-               return;
-       }
 }
index d7612ccc47e9b8dee7ebca11ae5c9d4acfb9bba7..6ea2f9efef64f7b51fdda90e8ebdd0b4cfe747ef 100644 (file)
 #include <drv_types.h>
 #include <rtl8723a_hal.h>
 
-void dump_txrpt_ccx_8723a(void *buf)
-{
-       struct txrpt_ccx_8723a *txrpt_ccx = buf;
-
-       DBG_8723A("%s:\n"
-               "tag1:%u, rsvd:%u, int_bt:%u, int_tri:%u, int_ccx:%u\n"
-               "mac_id:%u, pkt_drop:%u, pkt_ok:%u, bmc:%u\n"
-               "retry_cnt:%u, lifetime_over:%u, retry_over:%u\n"
-               "ccx_qtime:%u\n"
-               "final_data_rate:0x%02x\n"
-               "qsel:%u, sw:0x%03x\n"
-               , __func__
-               , txrpt_ccx->tag1, txrpt_ccx->rsvd, txrpt_ccx->int_bt, txrpt_ccx->int_tri, txrpt_ccx->int_ccx
-               , txrpt_ccx->mac_id, txrpt_ccx->pkt_drop, txrpt_ccx->pkt_ok, txrpt_ccx->bmc
-               , txrpt_ccx->retry_cnt, txrpt_ccx->lifetime_over, txrpt_ccx->retry_over
-               , txrpt_ccx_qtime_8723a(txrpt_ccx)
-               , txrpt_ccx->final_data_rate
-               , txrpt_ccx->qsel, txrpt_ccx_sw_8723a(txrpt_ccx)
-       );
-}
-
 void handle_txrpt_ccx_8723a(struct rtw_adapter *adapter, void *buf)
 {
        struct txrpt_ccx_8723a *txrpt_ccx = buf;
index 6a7fb28e03daa4aecbe53dc65fc8cc27c807946d..d3d72898edec54e4bdc5ac9aef2f790ce0598779 100644 (file)
@@ -1532,9 +1532,9 @@ void rtl8723a_update_ramask(struct rtw_adapter *padapter,
                mask = update_supported_rate23a(cur_network->SupportedRates,
                                             supportRateNum);
                mask |= (pmlmeinfo->HT_enable) ?
-                       update_MSC_rate23a(&pmlmeinfo->HT_caps) : 0;
+                       update_MSC_rate23a(&pmlmeinfo->ht_cap) : 0;
 
-               if (support_short_GI23a(padapter, &pmlmeinfo->HT_caps))
+               if (support_short_GI23a(padapter, &pmlmeinfo->ht_cap))
                        shortGIrate = true;
                break;
 
index 8e9e61c74bd02dc6736e00e026a14dc47bb40c2d..23af7189915124125ccb19a1f3d0ce70c328b6e5 100644 (file)
@@ -28,7 +28,6 @@ static int usbctrl_vendorreq(struct rtw_adapter *padapter, u8 request,
 {
        struct dvobj_priv *pdvobjpriv = adapter_to_dvobj(padapter);
        struct usb_device *udev = pdvobjpriv->pusbdev;
-
        unsigned int pipe;
        int status = 0;
        u8 reqtype;
@@ -95,12 +94,6 @@ static int usbctrl_vendorreq(struct rtw_adapter *padapter, u8 request,
                        if (status < 0) {
                                if (status == -ESHUTDOWN || status == -ENODEV)
                                        padapter->bSurpriseRemoved = true;
-                               else {
-                                       struct hal_data_8723a *pHalData;
-                                       pHalData = GET_HAL_DATA(padapter);
-                                       pHalData->srestpriv.Wifi_Error_Status =
-                                               USB_VEN_REQ_CMD_FAIL;
-                               }
                        } else { /*  status != len && status >= 0 */
                                if (status > 0) {
                                        if (requesttype == 0x01) {
@@ -647,7 +640,6 @@ static void usb_read_port_complete(struct urb *purb)
        struct recv_buf *precvbuf = (struct recv_buf *)purb->context;
        struct rtw_adapter *padapter = (struct rtw_adapter *)precvbuf->adapter;
        struct recv_priv *precvpriv = &padapter->recvpriv;
-       struct hal_data_8723a *pHalData;
 
        RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
                 ("usb_read_port_complete!!!\n"));
@@ -726,9 +718,6 @@ static void usb_read_port_complete(struct urb *purb)
                        break;
                case -EPROTO:
                case -EOVERFLOW:
-                       pHalData = GET_HAL_DATA(padapter);
-                       pHalData->srestpriv.Wifi_Error_Status =
-                               USB_READ_PORT_FAIL;
                        rtl8723au_read_port(padapter, RECV_BULK_IN_ADDR, 0,
                                            precvbuf);
                        break;
index a94857df2def0a6ca930ac925440c82c9e9a8355..3ef9d7a045f2295f570d6fc1d1fbc4f971121156 100644 (file)
@@ -259,7 +259,6 @@ struct rtw_adapter {
        u8 bWritePortCancel;
        /* The driver will show the desired chan nor when this flag is 1. */
        u8 bNotifyChannelChange;
-       struct rtw_adapter *pbuddy_adapter;
 
        /* extend to support multi interface */
        /* IFACE_ID0 is equals to PRIMARY_ADAPTER */
@@ -269,8 +268,6 @@ struct rtw_adapter {
 
 #define adapter_to_dvobj(adapter) (adapter->dvobj)
 
-int rtw_handle_dualmac23a(struct rtw_adapter *adapter, bool init);
-
 static inline u8 *myid(struct eeprom_priv *peepriv)
 {
        return peepriv->mac_addr;
index 69c0f5c94fccb2b4b6e3bf0738ec10869bfa5a79..e9f465f0bc2cf701d478dab935b9bceeac2dd64c 100644 (file)
@@ -27,8 +27,6 @@
 #endif
 
 
-#define MGMT_QUEUE_NUM 5
-
 #ifdef CONFIG_8723AU_AP_MODE
 
 /* STA flags */
 
 #endif
 
-#define IEEE_CMD_SET_WPA_PARAM                 1
-#define IEEE_CMD_SET_WPA_IE                            2
-#define IEEE_CMD_SET_ENCRYPTION                        3
-
-#define        IEEE_CRYPT_ALG_NAME_LEN                 16
-
 #define WPA_CIPHER_NONE                BIT(0)
 #define WPA_CIPHER_WEP40       BIT(1)
 #define WPA_CIPHER_WEP104      BIT(2)
@@ -81,7 +73,6 @@ extern u8 WPA_CIPHER_SUITE_WEP10423A[];
 #define RSN_HEADER_LEN 4
 #define RSN_SELECTOR_LEN 4
 
-extern u16 RSN_VERSION_BSD23A;
 extern u8 RSN_AUTH_KEY_MGMT_UNSPEC_802_1X23A[];
 extern u8 RSN_AUTH_KEY_MGMT_PSK_OVER_802_1X23A[];
 extern u8 RSN_CIPHER_SUITE_NONE23A[];
@@ -154,50 +145,6 @@ enum NETWORK_TYPE
 #define IsSupportedTxMCS(NetType) (NetType & (WIRELESS_11_24N|WIRELESS_11_5N) ? true : false)
 
 
-struct ieee_param {
-       u32 cmd;
-       u8 sta_addr[ETH_ALEN];
-       union {
-               struct {
-                       u8 name;
-                       u32 value;
-               } wpa_param;
-               struct {
-                       u32 len;
-                       u8 reserved[32];
-                       u8 data[0];
-               } wpa_ie;
-               struct{
-                       int command;
-                       int reason_code;
-               } mlme;
-               struct {
-                       u8 alg[IEEE_CRYPT_ALG_NAME_LEN];
-                       u8 set_tx;
-                       u32 err;
-                       u8 idx;
-                       u8 seq[8]; /* sequence counter (set: RX, get: TX) */
-                       u16 key_len;
-                       u8 key[0];
-               } crypt;
-#ifdef CONFIG_8723AU_AP_MODE
-               struct {
-                       u16 aid;
-                       u16 capability;
-                       int flags;
-                       u8 tx_supp_rates[16];
-                       struct ieee80211_ht_cap ht_cap;
-               } add_sta;
-               struct {
-                       u8      reserved[2];/* for set max_num_sta */
-                       u8      buf[0];
-               } bcn_ie;
-#endif
-
-       } u;
-};
-
-
 #define MIN_FRAG_THRESHOLD     256U
 #define        MAX_FRAG_THRESHOLD     2346U
 
@@ -221,20 +168,10 @@ struct ieee80211_snap_hdr {
 
 #define SNAP_SIZE sizeof(struct ieee80211_snap_hdr)
 
-#define WLAN_FC_GET_TYPE(fc)           (fc & IEEE80211_FCTL_FTYPE)
-#define WLAN_FC_GET_STYPE(fc)          (fc & IEEE80211_FCTL_STYPE)
-
-#define WLAN_QC_GET_TID(qc)            (qc & 0x0f)
-
-#define WLAN_GET_SEQ_FRAG(seq)         (seq & RTW_IEEE80211_SCTL_FRAG)
-#define WLAN_GET_SEQ_SEQ(seq)          (seq & RTW_IEEE80211_SCTL_SEQ)
-
-
 #define WLAN_REASON_JOIN_WRONG_CHANNEL       65534
 #define WLAN_REASON_EXPIRATION_CHK 65535
 
 
-
 #define IEEE80211_STATMASK_SIGNAL (1<<0)
 #define IEEE80211_STATMASK_RSSI (1<<1)
 #define IEEE80211_STATMASK_NOISE (1<<2)
@@ -305,7 +242,6 @@ struct ieee80211_snap_hdr {
 #define IEEE80211_OFDM_SHIFT_MASK_A         4
 
 #define WEP_KEYS 4
-#define WEP_KEY_LEN 13
 
 
 /* MAX_RATES_LENGTH needs to be 12.  The spec says 8, and many APs
@@ -315,14 +251,13 @@ struct ieee80211_snap_hdr {
 #define MAX_RATES_LENGTH       12
 #define MAX_RATES_EX_LENGTH    16
 #define MAX_CHANNEL_NUMBER     161
+#define RTW_CH_MAX_2G_CHANNEL  14      /* Max channel in 2G band */
 
 #define MAX_WPA_IE_LEN         256
-#define MAX_WPS_IE_LEN         512
+#define MAX_WPS_IE_LEN         256
 #define MAX_P2P_IE_LEN         256
 #define MAX_WFD_IE_LEN         128
 
-#define IW_ESSID_MAX_SIZE      32
-
 /*
 join_res:
 -1: authentication fail
@@ -335,26 +270,6 @@ join_res:
 
 #define MAXTID 16
 
-enum _PUBLIC_ACTION{
-       ACT_PUBLIC_BSSCOEXIST = 0, /*  20/40 BSS Coexistence */
-       ACT_PUBLIC_DSE_ENABLE = 1,
-       ACT_PUBLIC_DSE_DEENABLE = 2,
-       ACT_PUBLIC_DSE_REG_LOCATION = 3,
-       ACT_PUBLIC_EXT_CHL_SWITCH = 4,
-       ACT_PUBLIC_DSE_MSR_REQ = 5,
-       ACT_PUBLIC_DSE_MSR_RPRT = 6,
-       ACT_PUBLIC_MP = 7, /*  Measurement Pilot */
-       ACT_PUBLIC_DSE_PWR_CONSTRAINT = 8,
-       ACT_PUBLIC_VENDOR = 9, /*  for WIFI_DIRECT */
-       ACT_PUBLIC_GAS_INITIAL_REQ = 10,
-       ACT_PUBLIC_GAS_INITIAL_RSP = 11,
-       ACT_PUBLIC_GAS_COMEBACK_REQ = 12,
-       ACT_PUBLIC_GAS_COMEBACK_RSP = 13,
-       ACT_PUBLIC_TDLS_DISCOVERY_RSP = 14,
-       ACT_PUBLIC_LOCATION_TRACK = 15,
-       ACT_PUBLIC_MAX
-};
-
 #define WME_OUI_TYPE 2
 #define WME_OUI_SUBTYPE_INFORMATION_ELEMENT 0
 #define WME_OUI_SUBTYPE_PARAMETER_ELEMENT 1
@@ -407,14 +322,8 @@ struct rtw_ieee80211_channel {
        /*, (channel)->orig_mag*/ \
        /*, (channel)->orig_mpwr*/ \
 
-u8 *rtw_set_fixed_ie23a(unsigned char *pbuf, unsigned int len, unsigned char *source, unsigned int *frlen);
 u8 *rtw_set_ie23a(u8 *pbuf, int index, uint len, const u8 *source, uint *frlen);
 
-enum secondary_ch_offset {
-       SCN = 0, /* no secondary channel */
-       SCA = 1, /* secondary channel above */
-       SCB = 3,  /* secondary channel below */
-};
 u8 hal_ch_offset_to_secondary_ch_offset23a(u8 ch_offset);
 u8 *rtw_set_ie23a_ch_switch(u8 *buf, u32 *buf_len, u8 ch_switch_mode, u8 new_ch, u8 ch_switch_cnt);
 u8 *rtw_set_ie23a_secondary_ch_offset(u8 *buf, u32 *buf_len, u8 secondary_ch_offset);
@@ -425,16 +334,11 @@ int rtw_ies_remove_ie23a(u8 *ies, uint *ies_len, uint offset, u8 eid, u8 *oui, u
 
 void rtw_set_supported_rate23a(u8* SupportedRates, uint mode) ;
 
-int rtw_get_wpa_cipher_suite23a(const u8 *s);
-int rtw_get_wpa2_cipher_suite23a(const u8 *s);
 int rtw_parse_wpa_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
 int rtw_parse_wpa2_ie23a(const u8* wpa_ie, int wpa_ie_len, int *group_cipher, int *pairwise_cipher, int *is_8021x);
 
-int rtw_get_sec_ie23a(u8 *in_ie,uint in_len,u8 *rsn_ie,u16 *rsn_len,u8 *wpa_ie,u16 *wpa_len);
-
-u8 *rtw_get_wps_ie23a(u8 *in_ie, uint in_len, u8 *wps_ie, uint *wps_ielen);
-u8 *rtw_get_wps_attr23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr);
-u8 *rtw_get_wps_attr_content23a(u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content, uint *len_content);
+const u8 *rtw_get_wps_attr23a(const u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_attr, u32 *len_attr);
+const u8 *rtw_get_wps_attr_content23a(const u8 *wps_ie, uint wps_ielen, u16 target_attr_id ,u8 *buf_content);
 
 uint   rtw_get_rateset_len23a(u8       *rateset);
 
@@ -448,8 +352,7 @@ int rtw_check_network_type23a(unsigned char *rate, int ratelen, int channel);
 
 void rtw_get_bcn_info23a(struct wlan_network *pnetwork);
 
-u16 rtw_mcs_rate23a(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40, unsigned char * MCS_rate);
-
-const char *action_public_str23a(u8 action);
+u16 rtw_mcs_rate23a(u8 rf_type, u8 bw_40MHz, u8 short_GI_20, u8 short_GI_40,
+                   struct ieee80211_mcs_info *mcs);
 
 #endif /* IEEE80211_H */
index 63e921f921d3db09df23138c1e58f95e24de143f..3a4ead54f948c5a79e5380469c8a0445e88177d7 100644 (file)
@@ -61,9 +61,6 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
                                        unsigned char *da, unsigned short reason);
 #endif /* CONFIG_8723AU_AP_MODE */
 
-void rtw_cfg80211_rx_action(struct rtw_adapter *adapter, u8 *frame,
-                           uint frame_len, const char*msg);
-
 bool rtw_cfg80211_pwr_mgmt(struct rtw_adapter *adapter);
 
 #endif /* __IOCTL_CFG80211_H__ */
index 900baccc3c24f4fc81d1da3a4facdb090562df74..014c02edded61947c3913f079f85f43b26cbdaa8 100644 (file)
@@ -153,6 +153,6 @@ int rtl8723a_set_rssi_cmd(struct rtw_adapter *padapter, u8 *param);
 int rtl8723a_set_raid_cmd(struct rtw_adapter *padapter, u32 mask, u8 arg);
 void rtl8723a_add_rateatid(struct rtw_adapter *padapter, u32 bitmap, u8 arg, u8 rssi_level);
 
-void CheckFwRsvdPageContent23a(struct rtw_adapter *padapter);
+int FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
 
 #endif
index 82af6a2704ed04dc7cc999cc289d7b39298daf28..6197910a4a53f286361e4edf006d36fbf4ffc425 100644 (file)
@@ -20,6 +20,5 @@
 #include <rtw_sreset.h>
 
 void rtl8723a_sreset_xmit_status_check(struct rtw_adapter *padapter);
-void rtl8723a_sreset_linked_status_check(struct rtw_adapter *padapter);
 
 #endif
index 79883d7b867d048a6369f1e0fae72b7983669e66..815560c6e1d7e606f023196dbc7f1d6e6434a4f2 100644 (file)
@@ -211,7 +211,6 @@ struct txrpt_ccx_8723a {
 #define txrpt_ccx_sw_8723a(txrpt_ccx) ((txrpt_ccx)->sw0 + ((txrpt_ccx)->sw1<<8))
 #define txrpt_ccx_qtime_8723a(txrpt_ccx) ((txrpt_ccx)->ccx_qtime0+((txrpt_ccx)->ccx_qtime1<<8))
 
-void dump_txrpt_ccx_8723a(void *buf);
 void handle_txrpt_ccx_8723a(struct rtw_adapter *adapter, void *buf);
 void rtl8723a_update_txdesc(struct xmit_frame *pxmitframe, u8 *pmem);
 void rtl8723a_fill_fake_txdesc(struct rtw_adapter *padapter, u8 *pDesc, u32 BufferLen, u8 IsPsPoll, u8 IsBTQosNull);
index 8d9be5a36eae760105bfd9c182935c03dca3a0dc..9f8d235c992ff7640c22fb6cf3634dea97fcc62c 100644 (file)
@@ -32,7 +32,8 @@ void update_beacon23a(struct rtw_adapter *padapter, u8 ie_id, u8 *oui, u8 tx);
 void add_RATid23a(struct rtw_adapter *padapter, struct sta_info *psta, u8 rssi_level);
 void expire_timeout_chk23a(struct rtw_adapter *padapter);
 void update_sta_info23a_apmode23a(struct rtw_adapter *padapter, struct sta_info *psta);
-int rtw_check_beacon_data23a(struct rtw_adapter *padapter, u8 *pbuf, unsigned int len);
+int rtw_check_beacon_data23a(struct rtw_adapter *padapter,
+                            struct ieee80211_mgmt *mgmt, unsigned int len);
 void rtw_ap_restore_network(struct rtw_adapter *padapter);
 void rtw_set_macaddr_acl23a(struct rtw_adapter *padapter, int mode);
 int rtw_acl_add_sta23a(struct rtw_adapter *padapter, u8 *addr);
index a69d6e215b8b1cc57ece56f3acc0bf5cf456fc97..b6b01732a7259f0a8af7108b2102a5921c6969ea 100644 (file)
 #define DBG_8723A_LEVEL(_level, fmt, arg...)                           \
        do {                                                            \
                if (_level <= GlobalDebugLevel23A)                              \
-                       pr_info(DRIVER_PREFIX"ERROR " fmt, ##arg);\
+                       pr_info(DRIVER_PREFIX fmt, ##arg);\
        } while (0)
 
 #define DBG_8723A(...)                                                 \
index 807cc83bc71010870dcf9dc8e43e82884bd4158c..4557aeccc6049ee56835683bab8116a19aa8d230 100644 (file)
@@ -22,7 +22,7 @@
 Used to report a bss has been scanned
 */
 struct survey_event {
-       struct wlan_bssid_ex bss;
+       struct wlan_bssid_ex *bss;
 };
 
 /*
index 86ce86b6b69b049aeb8a79dc6f0285f11cbd1b85..cfc947daf08be72b782018ce73f60a26084e34c4 100644 (file)
@@ -21,8 +21,8 @@
 
 struct ht_priv
 {
-       u32     ht_option;
-       u32     ampdu_enable;/* for enable Tx A-MPDU */
+       bool    ht_option;
+       bool    ampdu_enable;/* for enable Tx A-MPDU */
        /* u8   baddbareq_issued[16]; */
        u32     tx_amsdu_enable;/* for enable Tx A-MSDU */
        u32     tx_amdsu_maxlen; /*  1: 8k, 0:4k ; default:8k, for tx */
diff --git a/drivers/staging/rtl8723au/include/rtw_ioctl_set.h b/drivers/staging/rtl8723au/include/rtw_ioctl_set.h
deleted file mode 100644 (file)
index 040543b..0000000
+++ /dev/null
@@ -1,32 +0,0 @@
-/******************************************************************************
- *
- * Copyright(c) 2007 - 2011 Realtek Corporation. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- ******************************************************************************/
-#ifndef __RTW_IOCTL_SET_H_
-#define __RTW_IOCTL_SET_H_
-
-#include <drv_types.h>
-
-int rtw_set_802_11_authentication_mode23a(struct rtw_adapter *pdapter,
-                                         enum ndis_802_11_auth_mode authmode);
-int rtw_set_802_11_bssid23a_list_scan(struct rtw_adapter *padapter,
-                                     struct cfg80211_ssid *pssid,
-                                     int ssid_max_num);
-int rtw_set_802_11_ssid23a(struct rtw_adapter * padapter,
-                          struct cfg80211_ssid * ssid);
-
-u16 rtw_get_cur_max_rate23a(struct rtw_adapter *adapter);
-s32 FillH2CCmd(struct rtw_adapter *padapter, u8 ElementID, u32 CmdLen, u8 *pCmdBuffer);
-int rtw_do_join23a(struct rtw_adapter *padapter);
-
-#endif
index 4d327ba775b0845ef514f96093a1bf8eff422ecc..2ff01eb8fc0c75d4d4a92109cc0e0b592fa849fb 100644 (file)
@@ -163,24 +163,6 @@ struct mlme_priv {
        u32 assoc_req_len;
        u32 assoc_rsp_len;
        u8 *assoc_rsp;
-       u32 wps_assoc_resp_ie_len;
-       u8 *wps_assoc_resp_ie;
-       u8 *wps_probe_resp_ie;
-       u32 wps_probe_resp_ie_len;
-       u8 *wps_beacon_ie;
-       u32 wps_beacon_ie_len;
-       u32 p2p_go_probe_resp_ie_len; /* for GO */
-       u32 p2p_assoc_req_ie_len;
-       u8 *p2p_beacon_ie;
-       u8 *p2p_probe_req_ie;
-       u8 *p2p_probe_resp_ie;
-       u8 *p2p_go_probe_resp_ie; /* for GO */
-       u8 *p2p_assoc_req_ie;
-       u32 p2p_beacon_ie_len;
-       u32 p2p_probe_req_ie_len;
-       u32 p2p_probe_resp_ie_len;
-       u8 *wfd_assoc_req_ie;
-       u32 wfd_assoc_req_ie_len;
 
 #ifdef CONFIG_8723AU_AP_MODE
        /* Number of associated Non-ERP stations (i.e., stations using 802.11b
@@ -213,16 +195,6 @@ struct mlme_priv {
        u8              update_bcn;
 
 #endif /* ifdef CONFIG_8723AU_AP_MODE */
-
-       u8 *wfd_beacon_ie;
-       u8 *wfd_probe_req_ie;
-       u8 *wfd_probe_resp_ie;
-       u8 *wfd_go_probe_resp_ie; /* for GO */
-
-       u32 wfd_beacon_ie_len;
-       u32 wfd_probe_req_ie_len;
-       u32 wfd_probe_resp_ie_len;
-       u32 wfd_go_probe_resp_ie_len; /* for GO */
 };
 
 void rtw_joinbss_event_prehandle23a(struct rtw_adapter *adapter, u8 *pbuf);
@@ -240,6 +212,9 @@ int rtw_init_mlme_priv23a(struct rtw_adapter *adapter);
 
 void rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv);
 
+int rtw_do_join_adhoc(struct rtw_adapter *adapter);
+int rtw_do_join_network(struct rtw_adapter *adapter,
+                       struct wlan_network *candidate);
 int rtw_select_and_join_from_scanned_queue23a(struct mlme_priv *pmlmepriv);
 int rtw_set_key23a(struct rtw_adapter *adapter,
                struct security_priv *psecuritypriv, int keyid, u8 set_tx);
@@ -307,9 +282,6 @@ static inline void clr_fwstate_ex(struct mlme_priv *pmlmepriv, int state)
        spin_unlock_bh(&pmlmepriv->lock);
 }
 
-u16 rtw_get_capability23a(struct wlan_bssid_ex *bss);
-void rtw_update_scanned_network23a(struct rtw_adapter *adapter,
-                               struct wlan_bssid_ex *target);
 void rtw_disconnect_hdl23a_under_linked(struct rtw_adapter *adapter,
                                     struct sta_info *psta, u8 free_assoc);
 void rtw_generate_random_ibss23a(u8 *pibss);
@@ -330,8 +302,6 @@ void rtw_init_registrypriv_dev_network23a(struct rtw_adapter *adapter);
 
 void rtw_update_registrypriv_dev_network23a(struct rtw_adapter *adapter);
 
-void rtw_get_encrypt_decrypt_from_registrypriv23a(struct rtw_adapter *adapter);
-
 void rtw_scan_timeout_handler23a(unsigned long data);
 
 void rtw_dynamic_check_timer_handler(unsigned long data);
@@ -344,27 +314,23 @@ void rtw23a_free_mlme_priv_ie_data(struct mlme_priv *pmlmepriv);
 
 void _rtw_free_mlme_priv23a(struct mlme_priv *pmlmepriv);
 
-struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, int gfp);
+struct wlan_network *rtw_alloc_network(struct mlme_priv *pmlmepriv, gfp_t gfp);
 
 int rtw_if_up23a(struct rtw_adapter *padapter);
 
 int rtw_linked_check(struct rtw_adapter *padapter);
 
-__le16 *rtw_get_capability23a_from_ie(u8 *ie);
-__le16 *rtw_get_beacon_interval23a_from_ie(u8 *ie);
-
-
 void rtw_joinbss_reset23a(struct rtw_adapter *padapter);
 
-unsigned int rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
-                                  u8 *out_ie, uint in_len, uint *pout_len);
+bool rtw_restructure_ht_ie23a(struct rtw_adapter *padapter, u8 *in_ie,
+                             u8 *out_ie, uint in_len, uint *pout_len);
 void rtw_update_ht_cap23a(struct rtw_adapter *padapter,
                       u8 *pie, uint ie_len);
 void rtw_issue_addbareq_cmd23a(struct rtw_adapter *padapter,
                            struct xmit_frame *pxmitframe);
 
-int rtw_is_same_ibss23a(struct rtw_adapter *adapter,
-                    struct wlan_network *pnetwork);
+bool rtw_is_same_ibss23a(struct rtw_adapter *adapter,
+                        struct wlan_network *pnetwork);
 int is_same_network23a(struct wlan_bssid_ex *src, struct wlan_bssid_ex *dst);
 
 void rtw23a_roaming(struct rtw_adapter *adapter,
index badbce09559dc8217ebdcf16428d123545a168e4..7fd249f573b5522dc17554e8d48987076c535653 100644 (file)
@@ -366,8 +366,8 @@ struct mlme_ext_info
 
        struct ADDBA_request            ADDBA_req;
        struct WMM_para_element WMM_param;
-       struct HT_caps_element  HT_caps;
-       struct HT_info_element          HT_info;
+       struct ieee80211_ht_cap ht_cap;
+       struct ieee80211_ht_operation HT_info;
        struct wlan_bssid_ex                    network;/* join network or bss_network, if in ap mode, it is the same to cur_network.network */
        struct FW_Sta_Info              FW_sta_info[NUM_STA];
 };
@@ -495,14 +495,10 @@ void flush_all_cam_entry23a(struct rtw_adapter *padapter);
 
 bool IsLegal5GChannel(struct rtw_adapter *Adapter, u8 channel);
 
-int collect_bss_info23a(struct rtw_adapter *padapter,
-                       struct recv_frame *precv_frame,
-                       struct wlan_bssid_ex *bssid);
 void update_network23a(struct wlan_bssid_ex *dst, struct wlan_bssid_ex *src,
                    struct rtw_adapter *padapter, bool update_ie);
 
 u8 *get_my_bssid23a(struct wlan_bssid_ex *pnetwork);
-u16 get_beacon_interval23a(struct wlan_bssid_ex *bss);
 
 bool is_client_associated_to_ap23a(struct rtw_adapter *padapter);
 bool is_client_associated_to_ibss23a(struct rtw_adapter *padapter);
@@ -510,18 +506,19 @@ bool is_IBSS_empty23a(struct rtw_adapter *padapter);
 
 unsigned char check_assoc_AP23a(u8 *pframe, uint len);
 
-int WMM_param_handler23a(struct rtw_adapter *padapter, u8 *p);
+int WMM_param_handler23a(struct rtw_adapter *padapter, const u8 *p);
 void WMMOnAssocRsp23a(struct rtw_adapter *padapter);
 
-void HT_caps_handler23a(struct rtw_adapter *padapter, u8 *p);
-void HT_info_handler23a(struct rtw_adapter *padapter, u8 *p);
+void HT_caps_handler23a(struct rtw_adapter *padapter, const u8 *p);
+void HT_info_handler23a(struct rtw_adapter *padapter, const u8 *p);
 void HTOnAssocRsp23a(struct rtw_adapter *padapter);
 
-void ERP_IE_handler23a(struct rtw_adapter *padapter, u8 *p);
+void ERP_IE_handler23a(struct rtw_adapter *padapter, const u8 *p);
 void VCS_update23a(struct rtw_adapter *padapter, struct sta_info *psta);
 
-void update_beacon23a_info(struct rtw_adapter *padapter, u8 *pframe, uint len,
-                       struct sta_info *psta);
+void update_beacon23a_info(struct rtw_adapter *padapter,
+                          struct ieee80211_mgmt *mgmt, uint len,
+                          struct sta_info *psta);
 int rtw_check_bcn_info23a(struct rtw_adapter *Adapter,
                          struct ieee80211_mgmt *mgmt, u32 packet_len);
 void update_IOT_info23a(struct rtw_adapter *padapter);
@@ -536,7 +533,7 @@ int update_sta_support_rate23a(struct rtw_adapter *padapter, u8* pvar_ie,
 void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta);
 unsigned int update_basic_rate23a(unsigned char *ptn, unsigned int ptn_sz);
 unsigned int update_supported_rate23a(unsigned char *ptn, unsigned int ptn_sz);
-unsigned int update_MSC_rate23a(struct HT_caps_element *pHT_caps);
+unsigned int update_MSC_rate23a(struct ieee80211_ht_cap *ht_cap);
 void Update_RA_Entry23a(struct rtw_adapter *padapter, struct sta_info *psta);
 void set_sta_rate23a(struct rtw_adapter *padapter, struct sta_info *psta);
 
@@ -545,7 +542,7 @@ int receive_disconnect23a(struct rtw_adapter *padapter,
 
 unsigned char get_highest_rate_idx23a(u32 mask);
 int support_short_GI23a(struct rtw_adapter *padapter,
-                    struct HT_caps_element *pHT_caps);
+                       struct ieee80211_ht_cap *ht_cap);
 bool is_ap_in_tkip23a(struct rtw_adapter *padapter);
 bool is_ap_in_wep23a(struct rtw_adapter *padapter);
 bool should_forbid_n_rate23a(struct rtw_adapter *padapter);
index a458af978145e522a9d348931868dbbff3f7fabe..577914dc93be5071f0c109d7874620405e7ae04a 100644 (file)
@@ -253,8 +253,6 @@ int _rtw_pwr_wakeup23a(struct rtw_adapter *padapter, u32 ips_deffer_ms,
                    const char *caller);
 #define rtw_pwr_wakeup(adapter) _rtw_pwr_wakeup23a(adapter,            \
         RTW_PWR_STATE_CHK_INTERVAL, __func__)
-#define rtw_pwr_wakeup_ex(adapter, ips_deffer_ms)                      \
-        _rtw_pwr_wakeup23a(adapter, ips_deffer_ms, __func__)
 int rtw_pm_set_ips23a(struct rtw_adapter *padapter, u8 mode);
 int rtw_pm_set_lps23a(struct rtw_adapter *padapter, u8 mode);
 
index 91a0a22a2709d38c3ab191c8004d0866d6bb85a0..a7de714137b82ade698bfa82fbd3ff6d050d14ea 100644 (file)
@@ -89,17 +89,6 @@ enum ht_channel_width {
        HT_CHANNEL_WIDTH_10 = 4,
 };
 
-/*  */
-/*  Represent Extention Channel Offset in HT Capabilities */
-/*  This is available only in 40Mhz mode. */
-/*  */
-enum {
-       HT_EXTCHNL_OFFSET_NO_EXT = 0,
-       HT_EXTCHNL_OFFSET_UPPER = 1,
-       HT_EXTCHNL_OFFSET_NO_DEF = 2,
-       HT_EXTCHNL_OFFSET_LOWER = 3,
-};
-
 /* 2007/11/15 MH Define different RF type. */
 enum {
        RF_1T2R = 0,
index 8b8433365e32d0e6e88306d27b88da7ac23ec3fd..624a9d788e4517fa01f49948c4c57bf1471dc300 100644 (file)
@@ -23,8 +23,6 @@
 #define is_wep_enc(alg) (alg == WLAN_CIPHER_SUITE_WEP40 || \
                         alg == WLAN_CIPHER_SUITE_WEP104)
 
-#define _WPA2_IE_ID_   0x30
-
 #define SHA256_MAC_LEN 32
 #define AES_BLOCK_SIZE 16
 #define AES_PRIV_SIZE (4 * 44)
@@ -145,7 +143,6 @@ struct security_priv {
        u8 assoc_info[600];
        u8 szofcapability[256]; /* for wpa2 usage */
        u8 oidassociation[512]; /* for wpa/wpa2 usage */
-       u8 authenticator_ie[256];  /* store ap security information element */
        u8 supplicant_ie[256];  /* store sta security information element */
 
        /* for tkip countermeasure */
index 77cc7941b546ba5c8fbe8339b96524d01b6fcc71..60fa8296e1ff3ed42cfe74a954d344558180a4c7 100644 (file)
 #include <osdep_service.h>
 #include <drv_types.h>
 
-enum {
-       SRESET_TGP_NULL = 0,
-       SRESET_TGP_XMIT_STATUS = 1,
-       SRESET_TGP_LINK_STATUS = 2,
-};
-
 struct sreset_priv {
        struct mutex    silentreset_mutex;
        u8      silent_reset_inprogress;
-       u8      Wifi_Error_Status;
        unsigned long last_tx_time;
        unsigned long last_tx_complete_time;
-
-       s32 dbg_trigger_point;
 };
 
 #include <rtl8723a_hal.h>
 
-#define        WIFI_STATUS_SUCCESS     0
-#define        USB_VEN_REQ_CMD_FAIL    BIT(0)
-#define        USB_READ_PORT_FAIL      BIT(1)
-#define        USB_WRITE_PORT_FAIL     BIT(2)
-#define        WIFI_MAC_TXDMA_ERROR    BIT(3)
-#define        WIFI_TX_HANG            BIT(4)
-#define        WIFI_RX_HANG            BIT(5)
-#define        WIFI_IF_NOT_EXIST       BIT(6)
-
 void rtw_sreset_init(struct rtw_adapter *padapter);
 void rtw_sreset_reset_value(struct rtw_adapter *padapter);
-u8 rtw_sreset_get_wifi_status(struct rtw_adapter *padapter);
 bool rtw_sreset_inprogress(struct rtw_adapter *padapter);
-void sreset_set_wifi_error_status23a(struct rtw_adapter *padapter, u32 status);
 void sreset_set_trigger_point(struct rtw_adapter *padapter, s32 tgp);
 void rtw_sreset_reset(struct rtw_adapter *active_adapter);
 
index d1939a67390c761fb8df4578e70a207d49b6be55..c756b4f7f5d52af6fe797bb0ed32aabf6882f1cb 100644 (file)
@@ -362,7 +362,7 @@ static inline u32 wifi_mac_hash(const u8 *mac)
 int _rtw_init_sta_priv23a(struct sta_priv *pstapriv);
 int _rtw_free_sta_priv23a(struct sta_priv *pstapriv);
 
-struct sta_info *rtw_alloc_stainfo23a(struct sta_priv *pstapriv, u8 *hwaddr, gfp_t gfp);
+struct sta_info *rtw_alloc_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr, gfp_t gfp);
 int rtw_free_stainfo23a(struct rtw_adapter *padapter, struct sta_info *psta);
 void rtw_free_all_stainfo23a(struct rtw_adapter *padapter);
 struct sta_info *rtw_get_stainfo23a(struct sta_priv *pstapriv, const u8 *hwaddr);
index cccea6a50b3a3d2cfefddd9cbd7c2e10798d147e..fd3da3b5cf3131e30e45ab58966486e0d327e784 100644 (file)
 #ifndef _WIFI_H_
 #define _WIFI_H_
 
-#define P80211CAPTURE_VERSION  0x80211001
-
 /*  This value is tested by WiFi 11n Test Plan 5.2.3.
  *  This test verifies the WLAN NIC can update the NAV through sending
  *  the CTS with large duration.
  */
 #define        WiFiNavUpperUs          30000   /*  30 ms */
 
-#define _ASOCREQ_IE_OFFSET_            4       /*  excluding wlan_hdr */
-#define        _ASOCRSP_IE_OFFSET_             6
-#define _REASOCREQ_IE_OFFSET_          10
-#define _REASOCRSP_IE_OFFSET_          6
-#define _PROBEREQ_IE_OFFSET_           0
-#define        _PROBERSP_IE_OFFSET_            12
-#define _AUTH_IE_OFFSET_               6
-#define _DEAUTH_IE_OFFSET_             0
-#define _BEACON_IE_OFFSET_             12
-#define _PUBLIC_ACTION_IE_OFFSET_      8
-
-#define _FIXED_IE_LENGTH_              _BEACON_IE_OFFSET_
-
-
-#define        EID_BSSIntolerantChlReport      73
-
-/* ---------------------------------------------------------------------------
-                                       Below is the fixed elements...
------------------------------------------------------------------------------*/
-#define _AUTH_ALGM_NUM_                2
-#define _AUTH_SEQ_NUM_         2
-#define _BEACON_ITERVAL_       2
-#define _CAPABILITY_           2
-#define _CURRENT_APADDR_       6
-#define _LISTEN_INTERVAL_      2
-#define _ASOC_ID_              2
-#define _STATUS_CODE_          2
-#define _TIMESTAMP_            8
-
-/*-----------------------------------------------------------------------------
-                               Below is the definition for WMM
-------------------------------------------------------------------------------*/
-#define _WMM_IE_Length_                                7  /*  for WMM STA */
-#define _WMM_Para_Element_Length_              24
-
-
 /*-----------------------------------------------------------------------------
                                Below is the definition for 802.11n
 ------------------------------------------------------------------------------*/
 
-/* struct rtw_ieee80211_ht_cap - HT additional information
- *
- * This structure refers to "HT information element" as
- * described in 802.11n draft section 7.3.2.53
- */
-struct ieee80211_ht_addt_info {
-       unsigned char   control_chan;
-       unsigned char   ht_param;
-       unsigned short  operation_mode;
-       unsigned short  stbc_param;
-       unsigned char   basic_set[16];
-} __packed;
-
-struct HT_caps_element {
-       union {
-               struct {
-                       unsigned short  HT_caps_info;
-                       unsigned char   AMPDU_para;
-                       unsigned char   MCS_rate[16];
-                       unsigned short  HT_ext_caps;
-                       unsigned int    Beamforming_caps;
-                       unsigned char   ASEL_caps;
-               } HT_cap_element;
-               unsigned char HT_cap[26];
-       } u;
-} __packed;
-
-struct HT_info_element {
-       unsigned char   primary_channel;
-       unsigned char   infos[5];
-       unsigned char   MCS_rate[16];
-}  __packed;
-
 struct AC_param {
        unsigned char           ACI_AIFSN;
        unsigned char           CW;
index 664015d049e8bbb893e3317312f7297e05c9f55f..96e8074a7c188856a2ce65766bcc590364d8e2ac 100644 (file)
@@ -83,8 +83,6 @@ struct wlan_bcn_info {
        int is_8021x;
 
        /* bwmode 20/40 and ch_offset UP/LOW */
-       unsigned short  ht_cap_info;
-       unsigned char   ht_info_infos_0;
 };
 
 struct wlan_bssid_ex {
@@ -94,7 +92,9 @@ struct wlan_bssid_ex {
        struct cfg80211_ssid Ssid;
        u32  Privacy;
        long  Rssi;/* in dBM, raw data , get from PHY) */
-       u16 BeaconPeriod;       /*  units are Kusec */
+       u16 beacon_interval;
+       u16 capability;
+       u64 tsf;
        u32 ATIMWindow;         /*  units are Kusec */
        u32 DSConfig;           /*  Frequency, units are kHz */
        enum nl80211_iftype ifmode;
index f0839f6a9345073a23f5b2db4d4f613a071e9369..93dc844a10b35dcebaf05b8c94d53c66715d0e88 100644 (file)
@@ -16,7 +16,6 @@
 
 #include <osdep_service.h>
 #include <drv_types.h>
-#include <rtw_ioctl_set.h>
 #include <xmit_osdep.h>
 
 #include "ioctl_cfg80211.h"
@@ -26,8 +25,6 @@
 #define RTW_MAX_REMAIN_ON_CHANNEL_DURATION 65535       /* ms */
 #define RTW_MAX_NUM_PMKIDS 4
 
-#define RTW_CH_MAX_2G_CHANNEL               14 /* Max channel in 2G band */
-
 static const u32 rtw_cipher_suites[] = {
        WLAN_CIPHER_SUITE_WEP40,
        WLAN_CIPHER_SUITE_WEP104,
@@ -242,37 +239,21 @@ rtw_cfg80211_default_mgmt_stypes[NUM_NL80211_IFTYPES] = {
        },
 };
 
-#define MAX_BSSINFO_LEN 1000
 static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
                                   struct wlan_network *pnetwork)
 {
        int ret = 0;
        struct ieee80211_channel *notify_channel;
        struct cfg80211_bss *bss;
-       /* struct ieee80211_supported_band *band; */
        u16 channel;
        u32 freq;
-       u64 notify_timestamp;
-       u16 notify_capability;
-       u16 notify_interval;
        u8 *notify_ie;
        size_t notify_ielen;
        s32 notify_signal;
-       u8 buf[MAX_BSSINFO_LEN], *pbuf;
-       size_t len;
-       struct ieee80211_hdr *pwlanhdr;
        struct wireless_dev *wdev = padapter->rtw_wdev;
        struct wiphy *wiphy = wdev->wiphy;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
-       /* DBG_8723A("%s\n", __func__); */
-
-       if (pnetwork->network.IELength > MAX_IE_SZ) {
-               DBG_8723A("%s IE Length too long > %d byte\n", __func__,
-                         MAX_IE_SZ);
-               goto exit;
-       }
-
        channel = pnetwork->network.DSConfig;
        if (channel <= RTW_CH_MAX_2G_CHANNEL)
                freq = ieee80211_channel_to_frequency(channel,
@@ -283,17 +264,8 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
 
        notify_channel = ieee80211_get_channel(wiphy, freq);
 
-       notify_timestamp = jiffies_to_msecs(jiffies) * 1000;    /* uSec */
-
-       notify_interval =
-               get_unaligned_le16(
-                       rtw_get_beacon_interval23a_from_ie(pnetwork->network.IEs));
-       notify_capability =
-               get_unaligned_le16(
-                       rtw_get_capability23a_from_ie(pnetwork->network.IEs));
-
-       notify_ie = pnetwork->network.IEs + _FIXED_IE_LENGTH_;
-       notify_ielen = pnetwork->network.IELength - _FIXED_IE_LENGTH_;
+       notify_ie = pnetwork->network.IEs;
+       notify_ielen = pnetwork->network.IELength;
 
        /* We've set wiphy's signal_type as CFG80211_SIGNAL_TYPE_MBM:
         *  signal strength in mBm (100*dBm)
@@ -305,35 +277,14 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
        } else {
                notify_signal = 100 * translate_percentage_to_dbm(pnetwork->network.PhyInfo.SignalStrength);    /* dbm */
        }
-       pbuf = buf;
-
-       pwlanhdr = (struct ieee80211_hdr *)pbuf;
-
-       pwlanhdr->seq_ctrl = 0;
-
-       if (pnetwork->network.reserved == 1) {  /*  WIFI_BEACON */
-               eth_broadcast_addr(pwlanhdr->addr1);
-               pwlanhdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                                     IEEE80211_STYPE_BEACON);
-       } else {
-               ether_addr_copy(pwlanhdr->addr1, myid(&padapter->eeprompriv));
-               pwlanhdr->frame_control =
-                       cpu_to_le16(IEEE80211_FTYPE_MGMT |
-                                   IEEE80211_STYPE_PROBE_RESP);
-       }
-
-       ether_addr_copy(pwlanhdr->addr2, pnetwork->network.MacAddress);
-       ether_addr_copy(pwlanhdr->addr3, pnetwork->network.MacAddress);
 
-       pbuf += sizeof(struct ieee80211_hdr_3addr);
-       len = sizeof(struct ieee80211_hdr_3addr);
-
-       memcpy(pbuf, pnetwork->network.IEs, pnetwork->network.IELength);
-       len += pnetwork->network.IELength;
-
-       bss = cfg80211_inform_bss_frame(wiphy, notify_channel,
-                                       (struct ieee80211_mgmt *)buf, len,
-                                       notify_signal, GFP_ATOMIC);
+       bss = cfg80211_inform_bss(wiphy, notify_channel,
+                                 pnetwork->network.MacAddress,
+                                 pnetwork->network.tsf,
+                                 pnetwork->network.capability,
+                                 pnetwork->network.beacon_interval,
+                                 notify_ie, notify_ielen,
+                                 notify_signal, GFP_ATOMIC);
 
        if (unlikely(!bss)) {
                DBG_8723A("rtw_cfg80211_inform_bss error\n");
@@ -342,7 +293,6 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
 
        cfg80211_put_bss(wiphy, bss);
 
-exit:
        return ret;
 }
 
@@ -467,10 +417,9 @@ exit:
        return res;
 }
 
-static int set_group_key(struct rtw_adapter *padapter, u8 *key, u32 alg,
-                        u8 keyid)
+static int set_group_key(struct rtw_adapter *padapter, struct key_params *parms,
+                        u32 alg, u8 keyid)
 {
-       u8 keylen;
        struct cmd_obj *pcmd;
        struct setkey_parm *psetkeyparm;
        struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
@@ -503,20 +452,7 @@ static int set_group_key(struct rtw_adapter *padapter, u8 *key, u32 alg,
 
        psetkeyparm->set_tx = 1;
 
-       switch (alg) {
-       case WLAN_CIPHER_SUITE_WEP40:
-               keylen = 5;
-               break;
-       case WLAN_CIPHER_SUITE_WEP104:
-               keylen = 13;
-               break;
-       case WLAN_CIPHER_SUITE_TKIP:
-       case WLAN_CIPHER_SUITE_CCMP:
-       default:
-               keylen = 16;
-       }
-
-       memcpy(&psetkeyparm->key[0], key, keylen);
+       memcpy(&psetkeyparm->key, parms->key, parms->key_len);
 
        pcmd->cmdcode = _SetKey_CMD_;
        pcmd->parmbuf = (u8 *) psetkeyparm;
@@ -530,58 +466,21 @@ exit:
        return res;
 }
 
-static int set_wep_key(struct rtw_adapter *padapter, u8 *key, u16 keylen,
-                      u8 keyid)
-{
-       u32 alg;
-
-       switch (keylen) {
-       case 5:
-               alg = WLAN_CIPHER_SUITE_WEP40;
-               break;
-       case 13:
-               alg = WLAN_CIPHER_SUITE_WEP104;
-               break;
-       default:
-               alg = 0;
-       }
-
-       return set_group_key(padapter, key, alg, keyid);
-}
-
-static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
-                                         struct ieee_param *param,
-                                         u32 param_len)
+static int rtw_cfg80211_ap_set_encryption(struct net_device *dev, u8 key_index,
+                                         int set_tx, const u8 *sta_addr,
+                                         struct key_params *keyparms)
 {
        int ret = 0;
-       u16 wep_key_len;
-       u8 wep_key_idx;
+       int key_len;
        struct sta_info *psta = NULL, *pbcmc_sta = NULL;
        struct rtw_adapter *padapter = netdev_priv(dev);
-       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct security_priv *psecuritypriv = &padapter->securitypriv;
        struct sta_priv *pstapriv = &padapter->stapriv;
 
        DBG_8723A("%s\n", __func__);
 
-       param->u.crypt.err = 0;
-       param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
-
-       /* sizeof(struct ieee_param) = 64 bytes; */
-       /* if (param_len !=  (u32) ((u8 *) param->u.crypt.key -
-          (u8 *) param) + param->u.crypt.key_len) */
-       if (param_len != sizeof(struct ieee_param) + param->u.crypt.key_len) {
-               ret = -EINVAL;
-               goto exit;
-       }
-
-       if (is_broadcast_ether_addr(param->sta_addr)) {
-               if (param->u.crypt.idx >= WEP_KEYS) {
-                       ret = -EINVAL;
-                       goto exit;
-               }
-       } else {
-               psta = rtw_get_stainfo23a(pstapriv, param->sta_addr);
+       if (!is_broadcast_ether_addr(sta_addr)) {
+               psta = rtw_get_stainfo23a(pstapriv, sta_addr);
                if (!psta) {
                        /* ret = -EINVAL; */
                        DBG_8723A("rtw_set_encryption(), sta has already "
@@ -590,32 +489,14 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
                }
        }
 
-       if (strcmp(param->u.crypt.alg, "none") == 0 && (psta == NULL)) {
-               /* todo:clear default encryption keys */
-
-               DBG_8723A("clear default encryption keys, keyid =%d\n",
-                         param->u.crypt.idx);
-
-               goto exit;
-       }
+       key_len = keyparms->key_len;
 
-       if (strcmp(param->u.crypt.alg, "WEP") == 0 && (psta == NULL)) {
+       if (!psta && (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+                     keyparms->cipher == WLAN_CIPHER_SUITE_WEP104)) {
                DBG_8723A("r871x_set_encryption, crypt.alg = WEP\n");
 
-               wep_key_idx = param->u.crypt.idx;
-               wep_key_len = param->u.crypt.key_len;
-
                DBG_8723A("r871x_set_encryption, wep_key_idx =%d, len =%d\n",
-                         wep_key_idx, wep_key_len);
-
-               if ((wep_key_idx >= WEP_KEYS) || (wep_key_len <= 0)) {
-                       ret = -EINVAL;
-                       goto exit;
-               }
-
-               if (wep_key_len > 0) {
-                       wep_key_len = wep_key_len <= 5 ? 5 : 13;
-               }
+                         key_index, key_len);
 
                if (psecuritypriv->bWepDefaultKeyIdxSet == 0) {
                        /* wep default key has not been set, so use
@@ -623,100 +504,84 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
 
                        psecuritypriv->ndisencryptstatus =
                                Ndis802_11Encryption1Enabled;
-                       psecuritypriv->dot11PrivacyAlgrthm = WLAN_CIPHER_SUITE_WEP40;
-                       psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_WEP40;
+                       psecuritypriv->dot11PrivacyAlgrthm = keyparms->cipher;
+                       psecuritypriv->dot118021XGrpPrivacy = keyparms->cipher;
 
-                       if (wep_key_len == 13) {
-                               psecuritypriv->dot11PrivacyAlgrthm = WLAN_CIPHER_SUITE_WEP104;
-                               psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_WEP104;
-                       }
-
-                       psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx;
+                       psecuritypriv->dot11PrivacyKeyIndex = key_index;
                }
 
-               memcpy(&psecuritypriv->wep_key[wep_key_idx].key,
-                      param->u.crypt.key, wep_key_len);
+               memcpy(&psecuritypriv->wep_key[key_index].key,
+                      keyparms->key, key_len);
 
-               psecuritypriv->wep_key[wep_key_idx].keylen = wep_key_len;
+               psecuritypriv->wep_key[key_index].keylen = key_len;
 
-               set_wep_key(padapter, param->u.crypt.key, wep_key_len,
-                           wep_key_idx);
+               set_group_key(padapter, keyparms, keyparms->cipher, key_index);
 
                goto exit;
-
        }
 
-       if (!psta && check_fwstate(pmlmepriv, WIFI_AP_STATE)) { /*  group key */
-               if (param->u.crypt.set_tx == 0) {       /* group key */
-                       if (strcmp(param->u.crypt.alg, "WEP") == 0) {
+       if (!psta) {    /*  group key */
+               if (set_tx == 0) {      /* group key */
+                       if (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+                           keyparms->cipher == WLAN_CIPHER_SUITE_WEP104) {
                                DBG_8723A("%s, set group_key, WEP\n", __func__);
 
                                memcpy(psecuritypriv->
-                                      dot118021XGrpKey[param->u.crypt.idx].
-                                      skey, param->u.crypt.key,
-                                      (param->u.crypt.key_len >
-                                       16 ? 16 : param->u.crypt.key_len));
-
-                               psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_WEP40;
-                               if (param->u.crypt.key_len == 13) {
-                                       psecuritypriv->dot118021XGrpPrivacy =
-                                           WLAN_CIPHER_SUITE_WEP104;
-                               }
+                                      dot118021XGrpKey[key_index].skey,
+                                      keyparms->key, key_len);
 
-                       } else if (strcmp(param->u.crypt.alg, "TKIP") == 0) {
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       keyparms->cipher;
+                       } else if (keyparms->cipher == WLAN_CIPHER_SUITE_TKIP) {
                                DBG_8723A("%s, set group_key, TKIP\n",
                                          __func__);
 
-                               psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_TKIP;
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       WLAN_CIPHER_SUITE_TKIP;
 
                                memcpy(psecuritypriv->
-                                      dot118021XGrpKey[param->u.crypt.idx].
-                                      skey, param->u.crypt.key,
-                                      (param->u.crypt.key_len >
-                                       16 ? 16 : param->u.crypt.key_len));
+                                      dot118021XGrpKey[key_index].skey,
+                                      keyparms->key,
+                                      (key_len > 16 ? 16 : key_len));
 
-                               /* DEBUG_ERR("set key length :param->u.crypt.key_len =%d\n", param->u.crypt.key_len); */
                                /* set mic key */
                                memcpy(psecuritypriv->
-                                      dot118021XGrptxmickey[param->u.crypt.
-                                                            idx].skey,
-                                      &param->u.crypt.key[16], 8);
+                                      dot118021XGrptxmickey[key_index].skey,
+                                      &keyparms->key[16], 8);
                                memcpy(psecuritypriv->
-                                      dot118021XGrprxmickey[param->u.crypt.
-                                                            idx].skey,
-                                      &param->u.crypt.key[24], 8);
+                                      dot118021XGrprxmickey[key_index].skey,
+                                      &keyparms->key[24], 8);
 
                                psecuritypriv->busetkipkey = 1;
 
-                       } else if (strcmp(param->u.crypt.alg, "CCMP") == 0) {
-                               DBG_8723A("%s, set group_key, CCMP\n",
+                       } else if (keyparms->cipher == WLAN_CIPHER_SUITE_CCMP) {
+                                       DBG_8723A("%s, set group_key, CCMP\n",
                                          __func__);
 
-                               psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_CCMP;
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       WLAN_CIPHER_SUITE_CCMP;
 
                                memcpy(psecuritypriv->
-                                      dot118021XGrpKey[param->u.crypt.idx].
-                                      skey, param->u.crypt.key,
-                                      (param->u.crypt.key_len >
-                                       16 ? 16 : param->u.crypt.key_len));
+                                      dot118021XGrpKey[key_index].skey,
+                                      keyparms->key,
+                                      (key_len > 16 ? 16 : key_len));
                        } else {
                                DBG_8723A("%s, set group_key, none\n",
                                          __func__);
 
-                               psecuritypriv->dot118021XGrpPrivacy =
-                                   0;
+                               psecuritypriv->dot118021XGrpPrivacy = 0;
                        }
 
-                       psecuritypriv->dot118021XGrpKeyid = param->u.crypt.idx;
+                       psecuritypriv->dot118021XGrpKeyid = key_index;
 
                        psecuritypriv->binstallGrpkey = 1;
 
                        psecuritypriv->dot11PrivacyAlgrthm =
                                psecuritypriv->dot118021XGrpPrivacy;
 
-                       set_group_key(padapter, param->u.crypt.key,
+                       set_group_key(padapter, keyparms,
                                      psecuritypriv->dot118021XGrpPrivacy,
-                                     param->u.crypt.idx);
+                                     key_index);
 
                        pbcmc_sta = rtw_get_bcmc_stainfo23a(padapter);
                        if (pbcmc_sta) {
@@ -732,140 +597,110 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
                goto exit;
        }
 
-       if (psecuritypriv->dot11AuthAlgrthm ==
-           dot11AuthAlgrthm_8021X && psta) {   /*  psk/802_1x */
-               if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
-                       if (param->u.crypt.set_tx == 1) {
-                               /* pairwise key */
-                               memcpy(psta->dot118021x_UncstKey.skey,
-                                      param->u.crypt.key,
-                                      (param->u.crypt.key_len >
-                                       16 ? 16 : param->u.crypt.key_len));
+       if (psecuritypriv->dot11AuthAlgrthm == dot11AuthAlgrthm_8021X && psta) {
+               /*  psk/802_1x */
+               if (set_tx == 1) {
+                       /* pairwise key */
+                       memcpy(psta->dot118021x_UncstKey.skey,
+                              keyparms->key, (key_len > 16 ? 16 : key_len));
 
-                               if (!strcmp(param->u.crypt.alg, "WEP")) {
-                                       DBG_8723A("%s, set pairwise key, WEP\n",
-                                                 __func__);
+                       if (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+                           keyparms->cipher == WLAN_CIPHER_SUITE_WEP104) {
+                               DBG_8723A("%s, set pairwise key, WEP\n",
+                                         __func__);
 
-                                       psta->dot118021XPrivacy = WLAN_CIPHER_SUITE_WEP40;
-                                       if (param->u.crypt.key_len == 13) {
-                                               psta->dot118021XPrivacy =
-                                                       WLAN_CIPHER_SUITE_WEP104;
-                                       }
-                               } else if (!strcmp(param->u.crypt.alg, "TKIP")) {
-                                       DBG_8723A("%s, set pairwise key, "
-                                                 "TKIP\n", __func__);
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       keyparms->cipher;
+                       } else if (keyparms->cipher == WLAN_CIPHER_SUITE_TKIP) {
+                               DBG_8723A("%s, set pairwise key, TKIP\n",
+                                         __func__);
 
-                                       psta->dot118021XPrivacy = WLAN_CIPHER_SUITE_TKIP;
+                               psta->dot118021XPrivacy =
+                                       WLAN_CIPHER_SUITE_TKIP;
 
-                                       /* DEBUG_ERR("set key length :param->u.crypt.key_len =%d\n", param->u.crypt.key_len); */
-                                       /* set mic key */
-                                       memcpy(psta->dot11tkiptxmickey.skey,
-                                              &param->u.crypt.key[16], 8);
-                                       memcpy(psta->dot11tkiprxmickey.skey,
-                                              &param->u.crypt.key[24], 8);
+                               /* set mic key */
+                               memcpy(psta->dot11tkiptxmickey.skey,
+                                      &keyparms->key[16], 8);
+                               memcpy(psta->dot11tkiprxmickey.skey,
+                                      &keyparms->key[24], 8);
 
-                                       psecuritypriv->busetkipkey = 1;
+                               psecuritypriv->busetkipkey = 1;
 
-                               } else if (!strcmp(param->u.crypt.alg, "CCMP")) {
+                       } else if (keyparms->cipher == WLAN_CIPHER_SUITE_CCMP) {
+                               DBG_8723A("%s, set pairwise key, CCMP\n",
+                                         __func__);
 
-                                       DBG_8723A("%s, set pairwise key, "
-                                                 "CCMP\n", __func__);
+                               psta->dot118021XPrivacy =
+                                       WLAN_CIPHER_SUITE_CCMP;
+                       } else {
+                               DBG_8723A("%s, set pairwise key, none\n",
+                                         __func__);
 
-                                       psta->dot118021XPrivacy = WLAN_CIPHER_SUITE_CCMP;
-                               } else {
-                                       DBG_8723A("%s, set pairwise key, "
-                                                 "none\n", __func__);
+                               psta->dot118021XPrivacy = 0;
+                       }
 
-                                       psta->dot118021XPrivacy = 0;
-                               }
+                       set_pairwise_key(padapter, psta);
 
-                               set_pairwise_key(padapter, psta);
-
-                               psta->ieee8021x_blocked = false;
-
-                               psta->bpairwise_key_installed = true;
-                       } else {        /* group key??? */
-                               if (!strcmp(param->u.crypt.alg, "WEP")) {
-                                       memcpy(psecuritypriv->
-                                              dot118021XGrpKey[param->u.crypt.
-                                                               idx].skey,
-                                              param->u.crypt.key,
-                                              (param->u.crypt.key_len >
-                                               16 ? 16 : param->u.crypt.
-                                               key_len));
-
-                                       psecuritypriv->dot118021XGrpPrivacy =
-                                               WLAN_CIPHER_SUITE_WEP40;
-                                       if (param->u.crypt.key_len == 13) {
-                                               psecuritypriv->
-                                                   dot118021XGrpPrivacy =
-                                                       WLAN_CIPHER_SUITE_WEP104;
-                                       }
-                               } else if (!strcmp(param->u.crypt.alg, "TKIP")) {
-                                       psecuritypriv->dot118021XGrpPrivacy =
-                                           WLAN_CIPHER_SUITE_TKIP;
-
-                                       memcpy(psecuritypriv->
-                                              dot118021XGrpKey[param->u.crypt.
-                                                               idx].skey,
-                                              param->u.crypt.key,
-                                              (param->u.crypt.key_len >
-                                               16 ? 16 : param->u.crypt.
-                                               key_len));
-
-                                       /* DEBUG_ERR("set key length :param->u"
-                                          ".crypt.key_len =%d\n",
-                                          param->u.crypt.key_len); */
-                                       /* set mic key */
-                                       memcpy(psecuritypriv->
-                                              dot118021XGrptxmickey[param->u.
-                                                                    crypt.idx].
-                                              skey, &param->u.crypt.key[16],
-                                              8);
-                                       memcpy(psecuritypriv->
-                                              dot118021XGrprxmickey[param->u.
-                                                                    crypt.idx].
-                                              skey, &param->u.crypt.key[24],
-                                              8);
-
-                                       psecuritypriv->busetkipkey = 1;
-
-                               } else if (!strcmp(param->u.crypt.alg, "CCMP")) {
-                                       psecuritypriv->dot118021XGrpPrivacy =
-                                               WLAN_CIPHER_SUITE_CCMP;
-
-                                       memcpy(psecuritypriv->
-                                              dot118021XGrpKey[param->u.crypt.
-                                                               idx].skey,
-                                              param->u.crypt.key,
-                                              (param->u.crypt.key_len >
-                                               16 ? 16 : param->u.crypt.
-                                               key_len));
-                               } else {
-                                       psecuritypriv->dot118021XGrpPrivacy =
-                                               0;
-                               }
+                       psta->ieee8021x_blocked = false;
 
-                               psecuritypriv->dot118021XGrpKeyid =
-                                       param->u.crypt.idx;
+                       psta->bpairwise_key_installed = true;
+               } else {        /* group key??? */
+                       if (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+                           keyparms->cipher == WLAN_CIPHER_SUITE_WEP104) {
+                               memcpy(psecuritypriv->
+                                      dot118021XGrpKey[key_index].skey,
+                                      keyparms->key, key_len);
 
-                               psecuritypriv->binstallGrpkey = 1;
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       keyparms->cipher;
+                       } else if (keyparms->cipher == WLAN_CIPHER_SUITE_TKIP) {
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       WLAN_CIPHER_SUITE_TKIP;
 
-                               psecuritypriv->dot11PrivacyAlgrthm =
-                                       psecuritypriv->dot118021XGrpPrivacy;
+                               memcpy(psecuritypriv->
+                                      dot118021XGrpKey[key_index].skey,
+                                      keyparms->key,
+                                      (key_len > 16 ? 16 : key_len));
+
+                               /* set mic key */
+                               memcpy(psecuritypriv->
+                                      dot118021XGrptxmickey[key_index].skey,
+                                      &keyparms->key[16], 8);
+                               memcpy(psecuritypriv->
+                                      dot118021XGrprxmickey[key_index].skey,
+                                      &keyparms->key[24], 8);
 
-                               set_group_key(padapter, param->u.crypt.key,
-                                             psecuritypriv->
-                                             dot118021XGrpPrivacy,
-                                             param->u.crypt.idx);
+                               psecuritypriv->busetkipkey = 1;
+                       } else if (keyparms->cipher == WLAN_CIPHER_SUITE_CCMP) {
+                               psecuritypriv->dot118021XGrpPrivacy =
+                                       WLAN_CIPHER_SUITE_CCMP;
 
-                               pbcmc_sta = rtw_get_bcmc_stainfo23a(padapter);
-                               if (pbcmc_sta) {
-                                       /* rx will use bmc_sta's
-                                          dot118021XPrivacy */
-                                       pbcmc_sta->ieee8021x_blocked = false;
-                                       pbcmc_sta->dot118021XPrivacy = psecuritypriv->dot118021XGrpPrivacy;
-                               }
+                               memcpy(psecuritypriv->
+                                      dot118021XGrpKey[key_index].skey,
+                                      keyparms->key,
+                                      (key_len > 16 ? 16 : key_len));
+                       } else {
+                               psecuritypriv->dot118021XGrpPrivacy = 0;
+                       }
+
+                       psecuritypriv->dot118021XGrpKeyid = key_index;
+
+                       psecuritypriv->binstallGrpkey = 1;
+
+                       psecuritypriv->dot11PrivacyAlgrthm =
+                               psecuritypriv->dot118021XGrpPrivacy;
+
+                       set_group_key(padapter, keyparms,
+                                     psecuritypriv->dot118021XGrpPrivacy,
+                                     key_index);
+
+                       pbcmc_sta = rtw_get_bcmc_stainfo23a(padapter);
+                       if (pbcmc_sta) {
+                               /* rx will use bmc_sta's
+                                  dot118021XPrivacy */
+                               pbcmc_sta->ieee8021x_blocked = false;
+                               pbcmc_sta->dot118021XPrivacy =
+                                       psecuritypriv->dot118021XGrpPrivacy;
                        }
                }
        }
@@ -873,80 +708,47 @@ static int rtw_cfg80211_ap_set_encryption(struct net_device *dev,
 exit:
 
        return ret;
-
 }
 #endif
 
-static int rtw_cfg80211_set_encryption(struct net_device *dev,
-                                      struct ieee_param *param, u32 param_len)
+static int rtw_cfg80211_set_encryption(struct net_device *dev, u8 key_index,
+                                      int set_tx, const u8 *sta_addr,
+                                      struct key_params *keyparms)
 {
        int ret = 0;
-       u32 wep_key_idx;
-       u16 wep_key_len;
+       int key_len;
        struct rtw_adapter *padapter = netdev_priv(dev);
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
        struct security_priv *psecuritypriv = &padapter->securitypriv;
 
        DBG_8723A("%s\n", __func__);
 
-       param->u.crypt.err = 0;
-       param->u.crypt.alg[IEEE_CRYPT_ALG_NAME_LEN - 1] = '\0';
-
-       if (param_len <
-           (u32) ((u8 *) param->u.crypt.key - (u8 *) param) +
-           param->u.crypt.key_len) {
-               ret = -EINVAL;
-               goto exit;
-       }
-
-       if (is_broadcast_ether_addr(param->sta_addr)) {
-               if (param->u.crypt.idx >= WEP_KEYS) {
-                       ret = -EINVAL;
-                       goto exit;
-               }
-       } else {
-               ret = -EINVAL;
-               goto exit;
-       }
+       key_len = keyparms->key_len;
 
-       if (strcmp(param->u.crypt.alg, "WEP") == 0) {
+       if (keyparms->cipher == WLAN_CIPHER_SUITE_WEP40 ||
+           keyparms->cipher == WLAN_CIPHER_SUITE_WEP104) {
                RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_,
                         ("wpa_set_encryption, crypt.alg = WEP\n"));
                DBG_8723A("wpa_set_encryption, crypt.alg = WEP\n");
 
-               wep_key_idx = param->u.crypt.idx;
-               wep_key_len = param->u.crypt.key_len;
-
-               if ((wep_key_idx > WEP_KEYS) || (wep_key_len <= 0)) {
-                       ret = -EINVAL;
-                       goto exit;
-               }
-
                if (psecuritypriv->bWepDefaultKeyIdxSet == 0) {
                        /* wep default key has not been set, so use this
                           key index as default key. */
 
-                       wep_key_len = wep_key_len <= 5 ? 5 : 13;
-
                        psecuritypriv->ndisencryptstatus =
                                Ndis802_11Encryption1Enabled;
-                       psecuritypriv->dot11PrivacyAlgrthm = WLAN_CIPHER_SUITE_WEP40;
-                       psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_WEP40;
-
-                       if (wep_key_len == 13) {
-                               psecuritypriv->dot11PrivacyAlgrthm = WLAN_CIPHER_SUITE_WEP104;
-                               psecuritypriv->dot118021XGrpPrivacy = WLAN_CIPHER_SUITE_WEP104;
-                       }
+                       psecuritypriv->dot11PrivacyAlgrthm = keyparms->cipher;
+                       psecuritypriv->dot118021XGrpPrivacy = keyparms->cipher;
 
-                       psecuritypriv->dot11PrivacyKeyIndex = wep_key_idx;
+                       psecuritypriv->dot11PrivacyKeyIndex = key_index;
                }
 
-               memcpy(&psecuritypriv->wep_key[wep_key_idx].key,
-                      param->u.crypt.key, wep_key_len);
+               memcpy(&psecuritypriv->wep_key[key_index].key,
+                      keyparms->key, key_len);
 
-               psecuritypriv->wep_key[wep_key_idx].keylen = wep_key_len;
+               psecuritypriv->wep_key[key_index].keylen = key_len;
 
-               rtw_set_key23a(padapter, psecuritypriv, wep_key_idx, 0);
+               rtw_set_key23a(padapter, psecuritypriv, key_index, 0);
 
                goto exit;
        }
@@ -966,7 +768,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
                        } else {
                                /* Jeff: don't disable ieee8021x_blocked
                                   while clearing key */
-                               if (strcmp(param->u.crypt.alg, "none") != 0)
+                               if (keyparms->cipher != IW_AUTH_CIPHER_NONE &&
+                                   keyparms->cipher != 0)
                                        psta->ieee8021x_blocked = false;
 
                                if ((padapter->securitypriv.ndisencryptstatus ==
@@ -978,27 +781,23 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
                                                dot11PrivacyAlgrthm;
                                }
 
-                               if (param->u.crypt.set_tx == 1) {
+                               if (set_tx == 1) {
                                        /* pairwise key */
-                                       DBG_8723A("%s, : param->u.crypt.set_tx"
-                                                 " == 1\n", __func__);
+                                       DBG_8723A("%s, : set_tx == 1\n",
+                                                 __func__);
 
                                        memcpy(psta->dot118021x_UncstKey.skey,
-                                              param->u.crypt.key,
-                                              (param->u.crypt.key_len >
-                                               16 ? 16 : param->u.crypt.
-                                               key_len));
+                                              keyparms->key,
+                                              (key_len > 16 ? 16 : key_len));
 
-                                       if (strcmp(param->u.crypt.alg,
-                                                  "TKIP") == 0) {
+                                       if (keyparms->cipher ==
+                                           WLAN_CIPHER_SUITE_TKIP) {
                                                memcpy(psta->dot11tkiptxmickey.
                                                       skey,
-                                                      &param->u.crypt.key[16],
-                                                      8);
+                                                      &keyparms->key[16], 8);
                                                memcpy(psta->dot11tkiprxmickey.
                                                       skey,
-                                                      &param->u.crypt.key[24],
-                                                      8);
+                                                      &keyparms->key[24], 8);
 
                                                padapter->securitypriv.
                                                        busetkipkey = 0;
@@ -1010,36 +809,26 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
                                                          true);
                                } else {        /* group key */
                                        memcpy(padapter->securitypriv.
-                                              dot118021XGrpKey[param->u.crypt.
-                                                               idx].skey,
-                                              param->u.crypt.key,
-                                              (param->u.crypt.key_len >
-                                               16 ? 16 : param->u.crypt.
-                                               key_len));
+                                              dot118021XGrpKey[key_index].skey,
+                                              keyparms->key,
+                                              (key_len > 16 ? 16 : key_len));
                                        memcpy(padapter->securitypriv.
-                                              dot118021XGrptxmickey[param->u.
-                                                                    crypt.idx].
-                                              skey, &param->u.crypt.key[16],
-                                              8);
+                                              dot118021XGrptxmickey[key_index].
+                                              skey, &keyparms->key[16], 8);
                                        memcpy(padapter->securitypriv.
-                                              dot118021XGrprxmickey[param->u.
-                                                                    crypt.idx].
-                                              skey, &param->u.crypt.key[24],
-                                              8);
+                                              dot118021XGrprxmickey[key_index].
+                                              skey, &keyparms->key[24], 8);
                                        padapter->securitypriv.binstallGrpkey =
                                                1;
-                                       /* DEBUG_ERR((" param->u.crypt.key_len"
-                                          "=%d\n", param->u.crypt.key_len)); */
                                        DBG_8723A
                                            (" ~~~~set sta key:groupkey\n");
 
                                        padapter->securitypriv.
-                                           dot118021XGrpKeyid =
-                                               param->u.crypt.idx;
+                                           dot118021XGrpKeyid = key_index;
 
                                        rtw_set_key23a(padapter,
                                                    &padapter->securitypriv,
-                                                   param->u.crypt.idx, 1);
+                                                   key_index, 1);
                                }
                        }
 
@@ -1047,7 +836,8 @@ static int rtw_cfg80211_set_encryption(struct net_device *dev,
                        if (pbcmc_sta) {
                                /* Jeff: don't disable ieee8021x_blocked
                                   while clearing key */
-                               if (strcmp(param->u.crypt.alg, "none") != 0)
+                               if (keyparms->cipher != IW_AUTH_CIPHER_NONE &&
+                                   keyparms->cipher != 0)
                                        pbcmc_sta->ieee8021x_blocked = false;
 
                                if ((padapter->securitypriv.ndisencryptstatus ==
@@ -1076,13 +866,11 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
                                u8 key_index, bool pairwise,
                                const u8 *mac_addr, struct key_params *params)
 {
-       char *alg_name;
-       u32 param_len;
-       struct ieee_param *param;
-       int ret = 0;
+       int set_tx, ret = 0;
        struct wireless_dev *rtw_wdev = wiphy_to_wdev(wiphy);
        struct rtw_adapter *padapter = wiphy_to_adapter(wiphy);
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+       u8 sta_addr[ETH_ALEN];
 
        DBG_8723A("%s(%s): adding key for %pM\n", __func__, ndev->name,
                  mac_addr);
@@ -1092,64 +880,48 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
        DBG_8723A("key_index =%d\n", key_index);
        DBG_8723A("pairwise =%d\n", pairwise);
 
-       param_len = sizeof(struct ieee_param) + params->key_len;
-       param = kzalloc(param_len, GFP_KERNEL);
-       if (!param)
-               return -ENOMEM;
-
-       param->cmd = IEEE_CMD_SET_ENCRYPTION;
-       eth_broadcast_addr(param->sta_addr);
-
        switch (params->cipher) {
        case IW_AUTH_CIPHER_NONE:
-               /* todo: remove key */
-               /* remove = 1; */
-               alg_name = "none";
-               break;
        case WLAN_CIPHER_SUITE_WEP40:
+               if (params->key_len != WLAN_KEY_LEN_WEP40) {
+                       ret = -EINVAL;
+                       goto exit;
+               }
        case WLAN_CIPHER_SUITE_WEP104:
-               alg_name = "WEP";
-               break;
+               if (params->key_len != WLAN_KEY_LEN_WEP104) {
+                       ret = -EINVAL;
+                       goto exit;
+               }
        case WLAN_CIPHER_SUITE_TKIP:
-               alg_name = "TKIP";
-               break;
        case WLAN_CIPHER_SUITE_CCMP:
-               alg_name = "CCMP";
                break;
-
        default:
                ret = -ENOTSUPP;
-               goto addkey_end;
+               goto exit;
        }
 
-       strncpy((char *)param->u.crypt.alg, alg_name, IEEE_CRYPT_ALG_NAME_LEN);
-
-       if (!mac_addr || is_broadcast_ether_addr(mac_addr)) {
-               param->u.crypt.set_tx = 0;      /* for wpa/wpa2 group key */
-       } else {
-               param->u.crypt.set_tx = 1;      /* for wpa/wpa2 pairwise key */
+       if (key_index >= WEP_KEYS || params->key_len < 0) {
+               ret = -EINVAL;
+               goto exit;
        }
 
-       /* param->u.crypt.idx = key_index - 1; */
-       param->u.crypt.idx = key_index;
-
-       if (params->seq_len && params->seq) {
-               memcpy(param->u.crypt.seq, params->seq, params->seq_len);
-       }
+       eth_broadcast_addr(sta_addr);
 
-       if (params->key_len && params->key) {
-               param->u.crypt.key_len = params->key_len;
-               memcpy(param->u.crypt.key, params->key, params->key_len);
-       }
+       if (!mac_addr || is_broadcast_ether_addr(mac_addr))
+               set_tx = 0;     /* for wpa/wpa2 group key */
+       else
+               set_tx = 1;     /* for wpa/wpa2 pairwise key */
 
        if (check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
-               ret = rtw_cfg80211_set_encryption(ndev, param, param_len);
+               ret = rtw_cfg80211_set_encryption(ndev, key_index, set_tx,
+                                                 sta_addr, params);
        } else if (check_fwstate(pmlmepriv, WIFI_AP_STATE)) {
 #ifdef CONFIG_8723AU_AP_MODE
                if (mac_addr)
-                       ether_addr_copy(param->sta_addr, mac_addr);
+                       ether_addr_copy(sta_addr, mac_addr);
 
-               ret = rtw_cfg80211_ap_set_encryption(ndev, param, param_len);
+               ret = rtw_cfg80211_ap_set_encryption(ndev, key_index, set_tx,
+                                                    sta_addr, params);
 #endif
        } else {
                DBG_8723A("error! fw_state = 0x%x, iftype =%d\n",
@@ -1157,9 +929,7 @@ static int cfg80211_rtw_add_key(struct wiphy *wiphy, struct net_device *ndev,
 
        }
 
-addkey_end:
-       kfree(param);
-
+exit:
        return ret;
 }
 
@@ -1225,6 +995,63 @@ static int cfg80211_rtw_set_default_key(struct wiphy *wiphy,
        return 0;
 }
 
+static u16 rtw_get_cur_max_rate(struct rtw_adapter *adapter)
+{
+       int i = 0;
+       const u8 *p;
+       u16 rate = 0, max_rate = 0;
+       struct mlme_ext_priv *pmlmeext = &adapter->mlmeextpriv;
+       struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
+       struct registry_priv *pregistrypriv = &adapter->registrypriv;
+       struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct wlan_bssid_ex  *pcur_bss = &pmlmepriv->cur_network.network;
+       struct ieee80211_ht_cap *pht_capie;
+       u8 rf_type = 0;
+       u8 bw_40MHz = 0, short_GI_20 = 0, short_GI_40 = 0;
+       u16 mcs_rate = 0;
+
+       p = cfg80211_find_ie(WLAN_EID_HT_CAPABILITY,
+                            pcur_bss->IEs, pcur_bss->IELength);
+       if (p && p[1] > 0) {
+               pht_capie = (struct ieee80211_ht_cap *)(p + 2);
+
+               memcpy(&mcs_rate, &pht_capie->mcs, 2);
+
+               /* bw_40MHz = (pht_capie->cap_info&
+                  IEEE80211_HT_CAP_SUP_WIDTH_20_40) ? 1:0; */
+               /* cur_bwmod is updated by beacon, pmlmeinfo is
+                  updated by association response */
+               bw_40MHz = (pmlmeext->cur_bwmode &&
+                           (pmlmeinfo->HT_info.ht_param &
+                            IEEE80211_HT_PARAM_CHAN_WIDTH_ANY)) ? 1:0;
+
+               /* short_GI = (pht_capie->cap_info & (IEEE80211_HT_CAP
+                  _SGI_20|IEEE80211_HT_CAP_SGI_40)) ? 1 : 0; */
+               short_GI_20 = (pmlmeinfo->ht_cap.cap_info &
+                              cpu_to_le16(IEEE80211_HT_CAP_SGI_20)) ? 1:0;
+               short_GI_40 = (pmlmeinfo->ht_cap.cap_info &
+                              cpu_to_le16(IEEE80211_HT_CAP_SGI_40)) ? 1:0;
+
+               rf_type = rtl8723a_get_rf_type(adapter);
+               max_rate = rtw_mcs_rate23a(rf_type, bw_40MHz &
+                                          pregistrypriv->cbw40_enable,
+                                          short_GI_20, short_GI_40,
+                                          &pmlmeinfo->ht_cap.mcs);
+       } else {
+               while (pcur_bss->SupportedRates[i] != 0 &&
+                      pcur_bss->SupportedRates[i] != 0xFF) {
+                       rate = pcur_bss->SupportedRates[i] & 0x7F;
+                       if (rate>max_rate)
+                               max_rate = rate;
+                       i++;
+               }
+
+               max_rate = max_rate * 10 / 2;
+       }
+
+       return max_rate;
+}
+
 static int cfg80211_rtw_get_station(struct wiphy *wiphy,
                                    struct net_device *ndev,
                                    const u8 *mac, struct station_info *sinfo)
@@ -1269,7 +1096,7 @@ static int cfg80211_rtw_get_station(struct wiphy *wiphy,
                                                            signal_strength);
 
                sinfo->filled |= STATION_INFO_TX_BITRATE;
-               sinfo->txrate.legacy = rtw_get_cur_max_rate23a(padapter);
+               sinfo->txrate.legacy = rtw_get_cur_max_rate(padapter);
 
                sinfo->filled |= STATION_INFO_RX_PACKETS;
                sinfo->rx_packets = sta_rx_data_pkts(psta);
@@ -1479,16 +1306,17 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct rtw_adapter *padapter,
                                               char *buf, int len)
 {
        int ret = 0;
-       uint wps_ielen = 0;
-       u8 *wps_ie;
+       const u8 *wps_ie;
        struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
 
        DBG_8723A("%s, ielen =%d\n", __func__, len);
 
        if (len > 0) {
-               wps_ie = rtw_get_wps_ie23a(buf, len, NULL, &wps_ielen);
+               wps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                                WLAN_OUI_TYPE_MICROSOFT_WPS,
+                                                buf, len);
                if (wps_ie) {
-                       DBG_8723A("probe_req_wps_ielen =%d\n", wps_ielen);
+                       DBG_8723A("probe_req_wps_ielen =%d\n", wps_ie[1]);
 
                        if (pmlmepriv->wps_probe_req_ie) {
                                pmlmepriv->wps_probe_req_ie_len = 0;
@@ -1496,15 +1324,14 @@ static int rtw_cfg80211_set_probe_req_wpsp2pie(struct rtw_adapter *padapter,
                                pmlmepriv->wps_probe_req_ie = NULL;
                        }
 
-                       pmlmepriv->wps_probe_req_ie = kmemdup(wps_ie,
-                                                             wps_ielen,
+                       pmlmepriv->wps_probe_req_ie = kmemdup(wps_ie, wps_ie[1],
                                                              GFP_KERNEL);
                        if (pmlmepriv->wps_probe_req_ie == NULL) {
                                DBG_8723A("%s()-%d: kmalloc() ERROR!\n",
                                          __func__, __LINE__);
                                return -EINVAL;
                        }
-                       pmlmepriv->wps_probe_req_ie_len = wps_ielen;
+                       pmlmepriv->wps_probe_req_ie_len = wps_ie[1];
                }
        }
 
@@ -1751,7 +1578,7 @@ static int rtw_cfg80211_set_key_mgt(struct security_priv *psecuritypriv,
 static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
                                   size_t ielen)
 {
-       u8 *buf = NULL;
+       const u8 *wps_ie;
        int group_cipher = 0, pairwise_cipher = 0;
        int ret = 0;
        const u8 *pwpa, *pwpa2;
@@ -1767,19 +1594,14 @@ static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
                ret = -EINVAL;
                goto exit;
        }
-       buf = kmemdup(pie, ielen, GFP_KERNEL);
-       if (buf == NULL) {
-               ret = -ENOMEM;
-               goto exit;
-       }
 
        /* dump */
        DBG_8723A("set wpa_ie(length:%zu):\n", ielen);
        for (i = 0; i < ielen; i = i + 8)
-               DBG_8723A("0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",
-                         buf[i], buf[i + 1],
-                         buf[i + 2], buf[i + 3], buf[i + 4],
-                         buf[i + 5], buf[i + 6], buf[i + 7]);
+               DBG_8723A("0x%.2x 0x%.2x 0x%.2x 0x%.2x "
+                         "0x%.2x 0x%.2x 0x%.2x 0x%.2x\n",
+                         pie[i], pie[i + 1], pie[i + 2], pie[i + 3],
+                         pie[i + 4], pie[i + 5], pie[i + 6], pie[i + 7]);
        if (ielen < RSN_HEADER_LEN) {
                RT_TRACE(_module_rtl871x_ioctl_os_c, _drv_err_,
                         ("Ie len too short %d\n", (int)ielen));
@@ -1789,7 +1611,7 @@ static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
 
        pwpa = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
                                       WLAN_OUI_TYPE_MICROSOFT_WPA,
-                                      buf, ielen);
+                                      pie, ielen);
        if (pwpa && pwpa[1] > 0) {
                if (rtw_parse_wpa_ie23a(pwpa, pwpa[1] + 2, &group_cipher,
                                        &pairwise_cipher, NULL) == _SUCCESS) {
@@ -1804,7 +1626,7 @@ static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
                }
        }
 
-       pwpa2 = cfg80211_find_ie(WLAN_EID_RSN, buf, ielen);
+       pwpa2 = cfg80211_find_ie(WLAN_EID_RSN, pie, ielen);
        if (pwpa2 && pwpa2[1] > 0) {
                if (rtw_parse_wpa2_ie23a (pwpa2, pwpa2[1] + 2, &group_cipher,
                                          &pairwise_cipher, NULL) == _SUCCESS) {
@@ -1882,22 +1704,17 @@ static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
                break;
        }
 
-       {                       /* handle wps_ie */
-               uint wps_ielen;
-               u8 *wps_ie;
-
-               wps_ie = rtw_get_wps_ie23a(buf, ielen, NULL, &wps_ielen);
-               if (wps_ie && wps_ielen > 0) {
-                       DBG_8723A("got wps_ie, wps_ielen:%u\n", wps_ielen);
-                       padapter->securitypriv.wps_ie_len =
-                               wps_ielen <
-                               MAX_WPS_IE_LEN ? wps_ielen : MAX_WPS_IE_LEN;
-                       memcpy(padapter->securitypriv.wps_ie, wps_ie,
-                              padapter->securitypriv.wps_ie_len);
-                       set_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS);
-               } else {
-                       _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS);
-               }
+       wps_ie = cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                        WLAN_OUI_TYPE_MICROSOFT_WPS,
+                                        pie, ielen);
+       if (wps_ie && wps_ie[1] > 0) {
+               DBG_8723A("got wps_ie, wps_ielen:%u\n", wps_ie[1]);
+               padapter->securitypriv.wps_ie_len = wps_ie[1];
+               memcpy(padapter->securitypriv.wps_ie, wps_ie,
+                      padapter->securitypriv.wps_ie_len);
+               set_fwstate(&padapter->mlmepriv, WIFI_UNDER_WPS);
+       } else {
+               _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS);
        }
 
        /* TKIP and AES disallow multicast packets until installing group key */
@@ -1917,7 +1734,6 @@ static int rtw_cfg80211_set_wpa_ie(struct rtw_adapter *padapter, const u8 *pie,
                  padapter->securitypriv.ndisauthtype));
 
 exit:
-       kfree(buf);
        if (ret)
                _clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS);
        return ret;
@@ -1937,12 +1753,12 @@ static int rtw_cfg80211_add_wep(struct rtw_adapter *padapter,
        }
 
        switch (wep->keylen) {
-       case 5:
+       case WLAN_KEY_LEN_WEP40:
                psecuritypriv->dot11PrivacyAlgrthm = WLAN_CIPHER_SUITE_WEP40;
                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
                         ("%s:wep->KeyLength = 5\n", __func__));
                break;
-       case 13:
+       case WLAN_KEY_LEN_WEP104:
                psecuritypriv->dot11PrivacyAlgrthm = WLAN_CIPHER_SUITE_WEP104;
                RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
                         ("%s:wep->KeyLength = 13\n", __func__));
@@ -1987,18 +1803,162 @@ exit:
        return res;
 }
 
+static int rtw_set_ssid(struct rtw_adapter *padapter,
+                       struct wlan_network *newnetwork)
+{
+       struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
+       struct wlan_network *pnetwork = &pmlmepriv->cur_network;
+       int status = _SUCCESS;
+       u32 cur_time = 0;
+
+       DBG_8723A_LEVEL(_drv_always_, "set ssid [%s] fw_state = 0x%08x\n",
+                       newnetwork->network.Ssid.ssid, get_fwstate(pmlmepriv));
+
+       if (padapter->hw_init_completed == false) {
+               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
+                        ("set_ssid: hw_init_completed == false =>exit!!!\n"));
+               status = _FAIL;
+               goto exit;
+       }
+
+       spin_lock_bh(&pmlmepriv->lock);
+
+       DBG_8723A("Set SSID under fw_state = 0x%08x\n", get_fwstate(pmlmepriv));
+       if (check_fwstate(pmlmepriv, _FW_UNDER_SURVEY))
+               goto handle_tkip_countermeasure;
+
+       if (check_fwstate(pmlmepriv, _FW_LINKED|WIFI_ADHOC_MASTER_STATE)) {
+               RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
+                        ("set_ssid: _FW_LINKED||WIFI_ADHOC_MASTER_STATE\n"));
+
+               if (pmlmepriv->assoc_ssid.ssid_len ==
+                   newnetwork->network.Ssid.ssid_len &&
+                   !memcmp(&pmlmepriv->assoc_ssid.ssid,
+                           newnetwork->network.Ssid.ssid,
+                           newnetwork->network.Ssid.ssid_len)) {
+                       if (!check_fwstate(pmlmepriv, WIFI_STATION_STATE)) {
+                               RT_TRACE(_module_rtl871x_ioctl_set_c_,
+                                        _drv_err_, ("New SSID is same SSID, "
+                                                    "fw_state = 0x%08x\n",
+                                                    get_fwstate(pmlmepriv)));
+
+                               if (rtw_is_same_ibss23a(padapter, pnetwork)) {
+                                       /*
+                                        * it means driver is in
+                                        * WIFI_ADHOC_MASTER_STATE, we needn't
+                                        * create bss again.
+                                        */
+                                       goto release_mlme_lock;
+                               }
+
+                               /*
+                                * if in WIFI_ADHOC_MASTER_STATE |
+                                * WIFI_ADHOC_STATE, create bss or
+                                * rejoin again
+                                */
+                               rtw_disassoc_cmd23a(padapter, 0, true);
+
+                               if (check_fwstate(pmlmepriv, _FW_LINKED))
+                                       rtw_indicate_disconnect23a(padapter);
+
+                               rtw_free_assoc_resources23a(padapter, 1);
+
+                               if (check_fwstate(pmlmepriv,
+                                                 WIFI_ADHOC_MASTER_STATE)) {
+                                       _clr_fwstate_(pmlmepriv,
+                                                     WIFI_ADHOC_MASTER_STATE);
+                                       set_fwstate(pmlmepriv,
+                                                   WIFI_ADHOC_STATE);
+                               }
+                       } else {
+                               rtw_lps_ctrl_wk_cmd23a(padapter,
+                                                      LPS_CTRL_JOINBSS, 1);
+                       }
+               } else {
+                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
+                                ("Set SSID not the same ssid\n"));
+                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
+                                ("set_ssid =[%s] len = 0x%x\n",
+                                 newnetwork->network.Ssid.ssid,
+                                 newnetwork->network.Ssid.ssid_len));
+                       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_info_,
+                                ("assoc_ssid =[%s] len = 0x%x\n",
+                                 pmlmepriv->assoc_ssid.ssid,
+                                 pmlmepriv->assoc_ssid.ssid_len));
+
+                       rtw_disassoc_cmd23a(padapter, 0, true);
+
+                       if (check_fwstate(pmlmepriv, _FW_LINKED))
+                               rtw_indicate_disconnect23a(padapter);
+
+                       rtw_free_assoc_resources23a(padapter, 1);
+
+                       if (check_fwstate(pmlmepriv, WIFI_ADHOC_MASTER_STATE)) {
+                               _clr_fwstate_(pmlmepriv, WIFI_ADHOC_MASTER_STATE);
+                               set_fwstate(pmlmepriv, WIFI_ADHOC_STATE);
+                       }
+               }
+       }
+
+handle_tkip_countermeasure:
+
+       if (padapter->securitypriv.btkip_countermeasure == true) {
+               cur_time = jiffies;
+
+               if ((cur_time -
+                    padapter->securitypriv.btkip_countermeasure_time) >
+                   60 * HZ) {
+                       padapter->securitypriv.btkip_countermeasure = false;
+                       padapter->securitypriv.btkip_countermeasure_time = 0;
+               } else {
+                       status = _FAIL;
+                       goto release_mlme_lock;
+               }
+       }
+
+       memcpy(&pmlmepriv->assoc_ssid, &newnetwork->network.Ssid,
+              sizeof(struct cfg80211_ssid));
+
+       pmlmepriv->assoc_by_bssid = false;
+
+       pmlmepriv->to_join = true;
+
+       if (!check_fwstate(pmlmepriv, _FW_UNDER_SURVEY)) {
+               pmlmepriv->cur_network.join_res = -2;
+
+               status = rtw_do_join_network(padapter, newnetwork);
+               if (status == _SUCCESS) {
+                       pmlmepriv->to_join = false;
+               } else {
+                       if (check_fwstate(pmlmepriv, WIFI_ADHOC_STATE)) {
+                               /* switch to ADHOC_MASTER */
+                               status = rtw_do_join_adhoc(padapter);
+                               if (status != _SUCCESS)
+                                       goto release_mlme_lock;
+                       } else {
+                               /* can't associate ; reset under-linking */
+                               _clr_fwstate_(pmlmepriv, _FW_UNDER_LINKING);
+                               status = _FAIL;
+                               pmlmepriv->to_join = false;
+                       }
+               }
+       }
+release_mlme_lock:
+       spin_unlock_bh(&pmlmepriv->lock);
+
+exit:
+       RT_TRACE(_module_rtl871x_ioctl_set_c_, _drv_err_,
+                ("-%s: status =%d\n", __func__, status));
+
+       return status;
+}
+
 static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
                                struct cfg80211_connect_params *sme)
 {
        int ret = 0;
        struct list_head *phead, *plist, *ptmp;
        struct wlan_network *pnetwork = NULL;
-       enum ndis_802_11_auth_mode authmode;
-       struct cfg80211_ssid ndis_ssid;
-       u8 *dst_ssid;
-       u8 *src_ssid;
-       u8 *dst_bssid;
-       const u8 *src_bssid;
        /* u8 matched_by_bssid = false; */
        /* u8 matched_by_ssid = false; */
        u8 matched = false;
@@ -2021,21 +1981,13 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
                goto exit;
        }
 
-       if (!sme->ssid || !sme->ssid_len) {
+       if (!sme->ssid || !sme->ssid_len ||
+           sme->ssid_len > IEEE80211_MAX_SSID_LEN) {
                ret = -EINVAL;
                goto exit;
        }
 
-       if (sme->ssid_len > IW_ESSID_MAX_SIZE) {
-               ret = -E2BIG;
-               goto exit;
-       }
-
-       memset(&ndis_ssid, 0, sizeof(struct cfg80211_ssid));
-       ndis_ssid.ssid_len = sme->ssid_len;
-       memcpy(ndis_ssid.ssid, sme->ssid, sme->ssid_len);
-
-       DBG_8723A("ssid =%s, len =%zu\n", ndis_ssid.ssid, sme->ssid_len);
+       DBG_8723A("ssid =%s, len =%zu\n", sme->ssid, sme->ssid_len);
 
        if (sme->bssid)
                DBG_8723A("bssid =" MAC_FMT "\n", MAC_ARG(sme->bssid));
@@ -2057,9 +2009,6 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
        list_for_each_safe(plist, ptmp, phead) {
                pnetwork = container_of(plist, struct wlan_network, list);
 
-               dst_ssid = pnetwork->network.Ssid.ssid;
-               dst_bssid = pnetwork->network.MacAddress;
-
                if (sme->bssid) {
                        if (!ether_addr_equal(pnetwork->network.MacAddress,
                                              sme->bssid))
@@ -2074,28 +2023,19 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
                }
 
                if (sme->bssid) {
-                       src_bssid = sme->bssid;
-
-                       if (ether_addr_equal(dst_bssid, src_bssid)) {
+                       if (ether_addr_equal(pnetwork->network.MacAddress,
+                                            sme->bssid)) {
                                DBG_8723A("matched by bssid\n");
 
-                               ndis_ssid.ssid_len =
-                                   pnetwork->network.Ssid.ssid_len;
-                               memcpy(ndis_ssid.ssid,
-                                      pnetwork->network.Ssid.ssid,
-                                      pnetwork->network.Ssid.ssid_len);
-
                                matched = true;
                                break;
                        }
-
                } else if (sme->ssid && sme->ssid_len) {
-                       src_ssid = ndis_ssid.ssid;
-
-                       if ((!memcmp(dst_ssid, src_ssid, ndis_ssid.ssid_len)) &&
-                           (pnetwork->network.Ssid.ssid_len ==
-                            ndis_ssid.ssid_len)) {
+                       if (!memcmp(pnetwork->network.Ssid.ssid,
+                                   sme->ssid, sme->ssid_len) &&
+                           pnetwork->network.Ssid.ssid_len == sme->ssid_len) {
                                DBG_8723A("matched by ssid\n");
+
                                matched = true;
                                break;
                        }
@@ -2104,7 +2044,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
 
        spin_unlock_bh(&queue->lock);
 
-       if (!matched || (pnetwork == NULL)) {
+       if (!matched || !pnetwork) {
                ret = -ENOENT;
                DBG_8723A("connect, matched == false, goto exit\n");
                goto exit;
@@ -2122,9 +2062,8 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
        psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_Open;
        psecuritypriv->ndisauthtype = Ndis802_11AuthModeOpen;
 
-       ret =
-           rtw_cfg80211_set_wpa_version(psecuritypriv,
-                                        sme->crypto.wpa_versions);
+       ret = rtw_cfg80211_set_wpa_version(psecuritypriv,
+                                          sme->crypto.wpa_versions);
        if (ret < 0)
                goto exit;
 
@@ -2195,7 +2134,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
        ret = rtw_cfg80211_set_cipher(psecuritypriv,
                                      sme->crypto.cipher_group, false);
        if (ret < 0)
-               return ret;
+               goto exit;
 
        if (sme->crypto.n_akm_suites) {
                ret = rtw_cfg80211_set_key_mgt(psecuritypriv,
@@ -2204,14 +2143,19 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
                        goto exit;
        }
 
-       authmode = psecuritypriv->ndisauthtype;
-       rtw_set_802_11_authentication_mode23a(padapter, authmode);
+       if (psecuritypriv->ndisauthtype > 3)
+               psecuritypriv->dot11AuthAlgrthm = dot11AuthAlgrthm_8021X;
+
+       if (rtw_set_auth23a(padapter, psecuritypriv) != _SUCCESS) {
+               ret = -EBUSY;
+               goto exit;
+       }
 
        /* rtw_set_802_11_encryption_mode(padapter,
           padapter->securitypriv.ndisencryptstatus); */
 
-       if (rtw_set_802_11_ssid23a(padapter, &ndis_ssid) == false) {
-               ret = -1;
+       if (rtw_set_ssid(padapter, pnetwork) != _SUCCESS) {
+               ret = -EBUSY;
                goto exit;
        }
 
@@ -2411,16 +2355,18 @@ void rtw_cfg80211_indicate_sta_assoc(struct rtw_adapter *padapter,
        {
                struct station_info sinfo;
                u8 ie_offset;
+
                if (ieee80211_is_assoc_req(hdr->frame_control))
-                       ie_offset = _ASOCREQ_IE_OFFSET_;
+                       ie_offset = offsetof(struct ieee80211_mgmt,
+                                            u.assoc_req.variable);
                else            /*  WIFI_REASSOCREQ */
-                       ie_offset = _REASOCREQ_IE_OFFSET_;
+                       ie_offset = offsetof(struct ieee80211_mgmt,
+                                            u.reassoc_req.variable);
 
                sinfo.filled = 0;
                sinfo.filled = STATION_INFO_ASSOC_REQ_IES;
-               sinfo.assoc_req_ies = pmgmt_frame + WLAN_HDR_A3_LEN + ie_offset;
-               sinfo.assoc_req_ies_len =
-                       frame_len - WLAN_HDR_A3_LEN - ie_offset;
+               sinfo.assoc_req_ies = pmgmt_frame + ie_offset;
+               sinfo.assoc_req_ies_len = frame_len - ie_offset;
                cfg80211_new_sta(ndev, hdr->addr2, &sinfo, GFP_ATOMIC);
        }
 #else /* defined(RTW_USE_CFG80211_STA_EVENT) */
@@ -2443,17 +2389,15 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
 {
        s32 freq;
        int channel;
-       u8 *pmgmt_frame;
        uint frame_len;
-       struct ieee80211_hdr *pwlanhdr;
-       u8 mgmt_buf[128];
+       struct ieee80211_mgmt mgmt;
        struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
        struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
        struct net_device *ndev = padapter->pnetdev;
 
        DBG_8723A("%s(padapter =%p,%s)\n", __func__, padapter, ndev->name);
 
-       memset(mgmt_buf, 0, 128);
+       memset(&mgmt, 0, sizeof(struct ieee80211_mgmt));
 
 #if defined(RTW_USE_CFG80211_STA_EVENT)
        cfg80211_del_sta(ndev, da, GFP_ATOMIC);
@@ -2466,29 +2410,21 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
                freq = ieee80211_channel_to_frequency(channel,
                                                      IEEE80211_BAND_5GHZ);
 
-       pmgmt_frame = mgmt_buf;
-       pwlanhdr = (struct ieee80211_hdr *)pmgmt_frame;
-
-       pwlanhdr->frame_control =
+       mgmt.frame_control =
                cpu_to_le16(IEEE80211_FTYPE_MGMT | IEEE80211_STYPE_DEAUTH);
 
-       ether_addr_copy(pwlanhdr->addr1, myid(&padapter->eeprompriv));
-       ether_addr_copy(pwlanhdr->addr2, da);
-       ether_addr_copy(pwlanhdr->addr3, get_my_bssid23a(&pmlmeinfo->network));
+       ether_addr_copy(mgmt.da, myid(&padapter->eeprompriv));
+       ether_addr_copy(mgmt.sa, da);
+       ether_addr_copy(mgmt.bssid, get_my_bssid23a(&pmlmeinfo->network));
 
-       pwlanhdr->seq_ctrl =
-               cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
+       mgmt.seq_ctrl = cpu_to_le16(IEEE80211_SN_TO_SEQ(pmlmeext->mgnt_seq));
        pmlmeext->mgnt_seq++;
 
-       pmgmt_frame += sizeof(struct ieee80211_hdr_3addr);
-       frame_len = sizeof(struct ieee80211_hdr_3addr);
+       mgmt.u.disassoc.reason_code = cpu_to_le16(reason);
 
-       reason = cpu_to_le16(reason);
-       pmgmt_frame = rtw_set_fixed_ie23a(pmgmt_frame,
-                                      WLAN_REASON_PREV_AUTH_NOT_VALID,
-                                      (unsigned char *)&reason, &frame_len);
+       frame_len = sizeof(struct ieee80211_hdr_3addr) + 2;
 
-       cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, mgmt_buf, frame_len,
+       cfg80211_rx_mgmt(padapter->rtw_wdev, freq, 0, (u8 *)&mgmt, frame_len,
                         0, GFP_ATOMIC);
 #endif /* defined(RTW_USE_CFG80211_STA_EVENT) */
 }
@@ -2597,11 +2533,8 @@ static int rtw_cfg80211_monitor_if_xmit_entry(struct sk_buff *skb,
                          MAC_ARG(mgmt->da), __func__, ndev->name);
                category = mgmt->u.action.category;
                action = mgmt->u.action.u.wme_action.action_code;
-               if (mgmt->u.action.category == WLAN_CATEGORY_PUBLIC)
-                       DBG_8723A("RTW_Tx:%s\n", action_public_str23a(action));
-               else
-                       DBG_8723A("RTW_Tx:category(%u), action(%u)\n", category,
-                                 action);
+               DBG_8723A("RTW_Tx:category(%u), action(%u)\n",
+                         category, action);
 
                /* starting alloc mgmt frame to dump it */
                pmgntframe = alloc_mgtxmitframe23a(pxmitpriv);
@@ -2801,9 +2734,12 @@ static int rtw_add_beacon(struct rtw_adapter *adapter, const u8 *head,
                          size_t head_len, const u8 *tail, size_t tail_len)
 {
        int ret = 0;
-       u8 *pbuf = NULL;
-       uint len, wps_ielen = 0;
+       u8 *pbuf;
+       uint len, ielen, wps_ielen = 0;
        struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
+       struct wlan_bssid_ex *bss = &pmlmepriv->cur_network.network;
+       const struct ieee80211_mgmt *mgmt = (struct ieee80211_mgmt *)head;
+       struct ieee80211_mgmt *tmpmgmt;
        /* struct sta_priv *pstapriv = &padapter->stapriv; */
 
        DBG_8723A("%s beacon_head_len =%zu, beacon_tail_len =%zu\n",
@@ -2812,31 +2748,38 @@ static int rtw_add_beacon(struct rtw_adapter *adapter, const u8 *head,
        if (check_fwstate(pmlmepriv, WIFI_AP_STATE) != true)
                return -EINVAL;
 
-       if (head_len < 24)
+       if (head_len < offsetof(struct ieee80211_mgmt, u.beacon.variable))
                return -EINVAL;
 
        pbuf = kzalloc(head_len + tail_len, GFP_KERNEL);
        if (!pbuf)
                return -ENOMEM;
-       /*  24 = beacon header len. */
-       memcpy(pbuf, (void *)head + 24, head_len - 24);
-       memcpy(pbuf + head_len - 24, (void *)tail, tail_len);
+       tmpmgmt = (struct ieee80211_mgmt *)pbuf;
+
+       bss->beacon_interval = get_unaligned_le16(&mgmt->u.beacon.beacon_int);
+       bss->capability = get_unaligned_le16(&mgmt->u.beacon.capab_info);
+       bss->tsf = get_unaligned_le64(&mgmt->u.beacon.timestamp);
 
-       len = head_len + tail_len - 24;
+       /*  24 = beacon header len. */
+       memcpy(pbuf, (void *)head, head_len);
+       memcpy(pbuf + head_len, (void *)tail, tail_len);
 
+       len = head_len + tail_len;
+       ielen = len - offsetof(struct ieee80211_mgmt, u.beacon.variable);
        /* check wps ie if inclued */
-       if (rtw_get_wps_ie23a
-           (pbuf + _FIXED_IE_LENGTH_, len - _FIXED_IE_LENGTH_, NULL,
-            &wps_ielen))
+       if (cfg80211_find_vendor_ie(WLAN_OUI_MICROSOFT,
+                                   WLAN_OUI_TYPE_MICROSOFT_WPS,
+                                   tmpmgmt->u.beacon.variable, ielen))
                DBG_8723A("add bcn, wps_ielen =%d\n", wps_ielen);
 
        /* pbss_network->IEs will not include p2p_ie, wfd ie */
-       rtw_ies_remove_ie23a(pbuf, &len, _BEACON_IE_OFFSET_,
+       rtw_ies_remove_ie23a(tmpmgmt->u.beacon.variable, &ielen, 0,
                             WLAN_EID_VENDOR_SPECIFIC, P2P_OUI23A, 4);
-       rtw_ies_remove_ie23a(pbuf, &len, _BEACON_IE_OFFSET_,
+       rtw_ies_remove_ie23a(tmpmgmt->u.beacon.variable, &ielen, 0,
                             WLAN_EID_VENDOR_SPECIFIC, WFD_OUI23A, 4);
 
-       if (rtw_check_beacon_data23a(adapter, pbuf, len) == _SUCCESS) {
+       len = ielen + offsetof(struct ieee80211_mgmt, u.beacon.variable);
+       if (rtw_check_beacon_data23a(adapter, tmpmgmt, len) == _SUCCESS) {
                ret = 0;
        } else {
                ret = -EINVAL;
@@ -3014,34 +2957,6 @@ static int cfg80211_rtw_change_bss(struct wiphy *wiphy, struct net_device *ndev,
 }
 #endif /* CONFIG_8723AU_AP_MODE */
 
-void rtw_cfg80211_rx_action(struct rtw_adapter *adapter, u8 *frame,
-                           uint frame_len, const char *msg)
-{
-       struct ieee80211_mgmt *hdr = (struct ieee80211_mgmt *)frame;
-       s32 freq;
-       int channel;
-
-       channel = rtw_get_oper_ch23a(adapter);
-
-       DBG_8723A("RTW_Rx:cur_ch =%d\n", channel);
-       if (msg)
-               DBG_8723A("RTW_Rx:%s\n", msg);
-       else
-               DBG_8723A("RTW_Rx:category(%u), action(%u)\n",
-                         hdr->u.action.category,
-                         hdr->u.action.u.wme_action.action_code);
-
-       if (channel <= RTW_CH_MAX_2G_CHANNEL)
-               freq = ieee80211_channel_to_frequency(channel,
-                                                     IEEE80211_BAND_2GHZ);
-       else
-               freq = ieee80211_channel_to_frequency(channel,
-                                                     IEEE80211_BAND_5GHZ);
-
-       cfg80211_rx_mgmt(adapter->rtw_wdev, freq, 0, frame, frame_len,
-                        0, GFP_ATOMIC);
-}
-
 static int _cfg80211_rtw_mgmt_tx(struct rtw_adapter *padapter, u8 tx_ch,
                                 const u8 *buf, size_t len)
 {
@@ -3148,11 +3063,7 @@ static int cfg80211_rtw_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
                  MAC_ARG(hdr->da));
        category = hdr->u.action.category;
        action = hdr->u.action.u.wme_action.action_code;
-       if (category == WLAN_CATEGORY_PUBLIC)
-               DBG_8723A("RTW_Tx:%s\n", action_public_str23a(action));
-       else
-               DBG_8723A("RTW_Tx:category(%u), action(%u)\n",
-                         category, action);
+       DBG_8723A("RTW_Tx:category(%u), action(%u)\n", category, action);
 
        do {
                dump_cnt++;
index ac618fb8b7628d714e9bdf53ad7a23e0703cc1a8..ca24369f1208d2e9e78df3d3ccbc3bf0e478b587 100644 (file)
@@ -18,7 +18,6 @@
 #include <osdep_service.h>
 #include <drv_types.h>
 #include <mlme_osdep.h>
-#include <rtw_ioctl_set.h>
 
 static struct rt_pmkid_list backupPMKIDList[NUM_PMKID_CACHE];
 
index 1fb34386a4e544adc6af572c6515af9255d0caf3..ee3d62cc1ab0aee87a4491779cdabbebb6c7de5f 100644 (file)
@@ -584,11 +584,6 @@ int rtw_free_drv_sw23a(struct rtw_adapter *padapter)
        kfree(padapter->HalData);
        padapter->HalData = NULL;
 
-       RT_TRACE(_module_os_intfs_c_, _drv_info_, ("<== rtw_free_drv_sw23a\n"));
-
-       /*  clear pbuddy_adapter to avoid access wrong pointer. */
-       if (padapter->pbuddy_adapter != NULL)
-               padapter->pbuddy_adapter->pbuddy_adapter = NULL;
        RT_TRACE(_module_os_intfs_c_, _drv_info_, ("-rtw_free_drv_sw23a\n"));
        return _SUCCESS;
 }
index 8b25c1aa2025c785f5a57fae0a15923629ef96ea..d0a3a1e6f5aae9b0bbbf24a23ef39a09f1dba964 100644 (file)
@@ -572,7 +572,7 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 
        pnetdev = rtw_init_netdev23a(padapter);
        if (!pnetdev)
-               goto handle_dualmac;
+               goto free_adapter;
        padapter = netdev_priv(pnetdev);
 
        padapter->dvobj = dvobj;
@@ -583,13 +583,10 @@ static struct rtw_adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
 
        rtl8723au_set_hw_type(padapter);
 
-       if (rtw_handle_dualmac23a(padapter, 1) != _SUCCESS)
-               goto free_adapter;
-
        SET_NETDEV_DEV(pnetdev, dvobj_to_dev(dvobj));
 
        if (rtw_wdev_alloc(padapter, dvobj_to_dev(dvobj)))
-               goto handle_dualmac;
+               goto free_adapter;
 
        /* step 2. allocate HalData */
        padapter->HalData = kzalloc(sizeof(struct hal_data_8723a), GFP_KERNEL);
@@ -650,9 +647,6 @@ free_wdev:
                rtw_wdev_unregister(padapter->rtw_wdev);
                rtw_wdev_free(padapter->rtw_wdev);
        }
-handle_dualmac:
-       if (status != _SUCCESS)
-               rtw_handle_dualmac23a(padapter, 0);
 free_adapter:
        if (status != _SUCCESS) {
                if (pnetdev)
@@ -684,8 +678,6 @@ static void rtw_usb_if1_deinit(struct rtw_adapter *if1)
        DBG_8723A("+r871xu_dev_remove, hw_init_completed =%d\n",
                  if1->hw_init_completed);
 
-       rtw_handle_dualmac23a(if1, 0);
-
        if (if1->rtw_wdev) {
                rtw_wdev_unregister(if1->rtw_wdev);
                rtw_wdev_free(if1->rtw_wdev);
index d081449318c2e0d904d865d07260a3b7d8a167ae..33528072cb6adab46e5b0bb2837237d7e86d12ce 100644 (file)
@@ -96,8 +96,6 @@ static void usb_write_port23a_complete(struct urb *purb)
                DBG_8723A("###=> urb_write_port_complete status(%d)\n",
                          purb->status);
                if (purb->status == -EPIPE || purb->status == -EPROTO) {
-                       sreset_set_wifi_error_status23a(padapter,
-                                                    USB_WRITE_PORT_FAIL);
                } else if (purb->status == -EINPROGRESS) {
                        RT_TRACE(_module_hci_ops_os_c_, _drv_err_,
                                 ("usb_write_port23a_complete: EINPROGESS\n"));
index abccc9dabd6550a3c316d16f4ae1d99d330d2d11..1a89b25647edebef1f35d8216444a61d690d1888 100644 (file)
@@ -6,6 +6,5 @@ config R8821AE
        select WEXT_PRIV
        select EEPROM_93CX6
        select CRYPTO
-       default N
        ---help---
          If built as a module, it will be called r8821ae.ko.
index 5a54bb10698ca3d3c271bd9140c879f5335b8d7a..cf8c38292cd82dc6085a7425dcc145dfa558de90 100644 (file)
@@ -1670,7 +1670,7 @@ halbtc8812a1ant_TdmaDurationAdjustForAcl(
                        if (dn <= 0)
                                dn = 0;                          
 
-                       if(up >= n)     // if ³sÄò n ­Ó2¬í retry count¬°0, «h½Õ¼eWiFi duration
+                       if(up >= n)     // Google translated: if consecutive n-2 seconds retry count is 0, width-modulated WiFi duration
                        {
                                wait_count = 0; 
                                n = 3;
@@ -1688,14 +1688,14 @@ halbtc8812a1ant_TdmaDurationAdjustForAcl(
                        if (up <= 0)
                                up = 0;
 
-                       if (dn == 2)    // if ³sÄò 2 ­Ó2¬í retry count< 3, «h½Õ¯¶WiFi duration
+                       if (dn == 2)    // Google translated: if 2 consecutive two seconds retry count <3, then tune narrow WiFi duration
                        {
                                if (wait_count <= 2)
-                                       m++; // ÁקK¤@ª½¦b¨â­Ólevel¤¤¨Ó¦^
+                                       m++; // Google translated: Avoid been back and forth in the two level
                                else
                                        m = 1;
 
-                               if ( m >= 20) //m ³Ì¤j­È = 20 ' ³Ì¤j120¬í recheck¬O§_½Õ¾ã WiFi duration.
+                               if ( m >= 20) // Google translated: m max = 20 'Max 120 seconds recheck whether to adjust WiFi duration.
                                        m = 20;
 
                                n = 3*m;
@@ -1706,14 +1706,14 @@ halbtc8812a1ant_TdmaDurationAdjustForAcl(
                                BTC_PRINT(BTC_MSG_ALGORITHM, ALGO_TRACE_FW_DETAIL, ("[BTCoex], Decrease wifi duration for retryCounter<3!!\n"));
                        }
                }
-               else  //retry count > 3, ¥u­n1¦¸ retry count > 3, «h½Õ¯¶WiFi duration
+               else  // Google translated: retry count> 3, as long as a second retry count> 3, then tune narrow WiFi duration
                {
                        if (wait_count == 1)
-                               m++; // ÁקK¤@ª½¦b¨â­Ólevel¤¤¨Ó¦^
+                               m++; // Google translated: Avoid been back and forth in the two level 
                        else
                                m = 1;
 
-                       if ( m >= 20) //m ³Ì¤j­È = 20 ' ³Ì¤j120¬í recheck¬O§_½Õ¾ã WiFi duration.
+                       if ( m >= 20) // Google translated: m max = 20 'Max 120 seconds recheck whether to adjust WiFi duration.
                                m = 20;
 
                        n = 3*m;
index 5a9bbf025e251da4a2bd3daca44e50232e1d6600..db9a02fdb640b88262f70d207dae79b8feaf93e7 100644 (file)
@@ -699,7 +699,8 @@ void rtl_swlps_wq_callback(void *data)
 }
 
 
-void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, unsigned int len)
+static void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data,
+                          unsigned int len)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct ieee80211_mgmt *mgmt = (void *)data;
@@ -799,7 +800,8 @@ void rtl_p2p_noa_ie(struct ieee80211_hw *hw, void *data, unsigned int len)
        }
 }
 
-void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data, unsigned int len)
+static void rtl_p2p_action_ie(struct ieee80211_hw *hw, void *data,
+                             unsigned int len)
 {
        struct rtl_priv *rtlpriv = rtl_priv(hw);
        struct ieee80211_mgmt *mgmt = (void *)data;
index 7b1d113505fbd219ac91243841c43edbed7e0ec6..f885ca77344b9c9af013652f4a20b0cb2e793664 100644 (file)
@@ -1706,20 +1706,6 @@ void rtl8821ae_dm_bt_inq_page_monitor(struct ieee80211_hw *hw)
                        rtlpcipriv->btcoexist.current_state &=~ BT_COEX_STATE_BT_INQ_PAGE;
                }
        }
-
-#if 0
-       if (hal_coex_8821ae.b_c2h_bt_inquiry_page) {
-               hal_coex_8821ae.b_c2h_bt_inquiry_page++;
-               // bt inquiry or page is started.
-       } if(hal_coex_8821ae.b_c2h_bt_inquiry_page) {
-               rtlpcipriv->btcoexist.current_state |= BT_COEX_STATE_BT_INQ_PAGE;
-               if(hal_coex_8821ae.bt_inquiry_page_cnt >= 4)
-                       hal_coex_8821ae.bt_inquiry_page_cnt = 0;
-               hal_coex_8821ae.bt_inquiry_page_cnt++;
-       } else {
-               rtlpcipriv->btcoexist.current_state &=~ BT_COEX_STATE_BT_INQ_PAGE;
-       }
-#endif
 }
 
 void rtl8821ae_dm_bt_reset_action_profile_state(struct ieee80211_hw *hw)
@@ -2059,8 +2045,7 @@ void rtl_8821ae_c2h_command_handle(struct ieee80211_hw *hw)
                break;
        }
 
-       if(ptmp_buf)
-               kfree(ptmp_buf);
+       kfree(ptmp_buf);
 
        rtl_write_byte(rtlpriv, 0x01AF, C2H_EVT_HOST_CLOSE);
 }
index 1b8583b689d42990aadb0585b4e13ffb0d0dfca5..1aa16612e2486fa1822b73538c0d5e08f31936a8 100644 (file)
@@ -1623,7 +1623,7 @@ static int _rtl8821ae_set_media_status(struct ieee80211_hw *hw,
 
        rtl_write_byte(rtlpriv, (MSR), bt_msr);
        rtlpriv->cfg->ops->led_control(hw, ledaction);
-       if ((bt_msr & ~0xfc) == MSR_AP)
+       if ((bt_msr & MSR_MASK) == MSR_AP)
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x00);
        else
                rtl_write_byte(rtlpriv, REG_BCNTCFG + 1, 0x66);
index beffb4243b1e11e6831e4dc627fb2d19d226dca0..4cb3ca95f7738556483347252673148bfd6814ae 100644 (file)
 #define        MSR_ADHOC                                       0x01
 #define        MSR_INFRA                                       0x02
 #define        MSR_AP                                          0x03
+#define        MSR_MASK                                        0x03
 
 #define        RRSR_RSC_OFFSET                         21
 #define        RRSR_SHORT_OFFSET                       23
index 415f8ec5276b62ccfb282b1f7975f148865cb6dd..41532286758100334f9cf5d01594c41c9e15081c 100644 (file)
@@ -244,6 +244,7 @@ static void sep_copy_sg(
        u32 count = 0;
        struct scatterlist *sg_src_tmp = sg_src;
        struct scatterlist *sg_dst_tmp = sg_dst;
+
        in_offset = 0;
        out_offset = 0;
 
@@ -1721,6 +1722,7 @@ static u32 hash_init_post_op(struct sep_device *sep)
        struct crypto_ahash *tfm = crypto_ahash_reqtfm(sep->current_hash_req);
        struct this_task_ctx *ta_ctx = ahash_request_ctx(sep->current_hash_req);
        struct sep_system_ctx *sctx = crypto_ahash_ctx(tfm);
+
        dev_dbg(&ta_ctx->sep_used->pdev->dev,
                "hash init post op\n");
 
@@ -1756,6 +1758,7 @@ static u32 hash_update_post_op(struct sep_device *sep)
        struct crypto_ahash *tfm = crypto_ahash_reqtfm(sep->current_hash_req);
        struct this_task_ctx *ta_ctx = ahash_request_ctx(sep->current_hash_req);
        struct sep_system_ctx *sctx = crypto_ahash_ctx(tfm);
+
        dev_dbg(&ta_ctx->sep_used->pdev->dev,
                "hash update post op\n");
 
@@ -1828,6 +1831,7 @@ static u32 hash_final_post_op(struct sep_device *sep)
        struct crypto_ahash *tfm = crypto_ahash_reqtfm(sep->current_hash_req);
        struct sep_system_ctx *sctx = crypto_ahash_ctx(tfm);
        struct this_task_ctx *ta_ctx = ahash_request_ctx(sep->current_hash_req);
+
        dev_dbg(&ta_ctx->sep_used->pdev->dev,
                "hash final post op\n");
 
@@ -1876,6 +1880,7 @@ static u32 hash_digest_post_op(struct sep_device *sep)
        struct crypto_ahash *tfm = crypto_ahash_reqtfm(sep->current_hash_req);
        struct sep_system_ctx *sctx = crypto_ahash_ctx(tfm);
        struct this_task_ctx *ta_ctx = ahash_request_ctx(sep->current_hash_req);
+
        dev_dbg(&ta_ctx->sep_used->pdev->dev,
                "hash digest post op\n");
 
@@ -2696,6 +2701,7 @@ static int sep_sha1_final(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha1 final\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -2727,6 +2733,7 @@ static int sep_sha1_digest(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha1 digest\n");
 
        /* Clear out task context */
@@ -2761,6 +2768,7 @@ static int sep_sha1_finup(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha1 finup\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -2792,6 +2800,7 @@ static int sep_md5_init(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing md5 init\n");
 
        /* Clear out task context */
@@ -2826,6 +2835,7 @@ static int sep_md5_update(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing md5 update\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -2857,6 +2867,7 @@ static int sep_md5_final(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing md5 final\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -2955,6 +2966,7 @@ static int sep_sha224_init(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha224 init\n");
 
        /* Clear out task context */
@@ -2989,6 +3001,7 @@ static int sep_sha224_update(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha224 update\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -3020,6 +3033,7 @@ static int sep_sha224_final(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha224 final\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -3118,6 +3132,7 @@ static int sep_sha256_init(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha256 init\n");
 
        /* Clear out task context */
@@ -3152,6 +3167,7 @@ static int sep_sha256_update(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha256 update\n");
 
        ta_ctx->sep_used = sep_dev;
@@ -3183,6 +3199,7 @@ static int sep_sha256_final(struct ahash_request *req)
        int error;
        int error1;
        struct this_task_ctx *ta_ctx = ahash_request_ctx(req);
+
        pr_debug("sep - doing sha256 final\n");
 
        ta_ctx->sep_used = sep_dev;
diff --git a/drivers/staging/serqt_usb2/Kconfig b/drivers/staging/serqt_usb2/Kconfig
deleted file mode 100644 (file)
index f4fed40..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-config USB_SERIAL_QUATECH2
-       tristate "USB Quatech ESU-100 8 Port Serial Driver"
-       depends on USB_SERIAL
-       help
-         Say Y here if you want to use the Quatech ESU-100 8 port usb to
-         serial adapter.
-
-         To compile this driver as a module, choose M here: the
-         module will be called serqt_usb2.
diff --git a/drivers/staging/serqt_usb2/Makefile b/drivers/staging/serqt_usb2/Makefile
deleted file mode 100644 (file)
index 2157861..0000000
+++ /dev/null
@@ -1 +0,0 @@
-obj-$(CONFIG_USB_SERIAL_QUATECH2)              += serqt_usb2.o
diff --git a/drivers/staging/serqt_usb2/serqt_usb2.c b/drivers/staging/serqt_usb2/serqt_usb2.c
deleted file mode 100644 (file)
index 998c384..0000000
+++ /dev/null
@@ -1,1528 +0,0 @@
-/*
- * This code was developed for the Quatech USB line for linux, it used
- * much of the code developed by Greg Kroah-Hartman for USB serial devices
- *
- */
-
-#include <linux/errno.h>
-#include <linux/slab.h>
-#include <linux/tty.h>
-#include <linux/tty_driver.h>
-#include <linux/tty_flip.h>
-#include <linux/module.h>
-#include <linux/serial.h>
-#include <linux/usb.h>
-#include <linux/usb/serial.h>
-#include <linux/uaccess.h>
-
-/* Version Information */
-#define DRIVER_VERSION "v2.14"
-#define DRIVER_AUTHOR "Tim Gobeli, Quatech, Inc"
-#define DRIVER_DESC "Quatech USB to Serial Driver"
-
-#define        USB_VENDOR_ID_QUATECH                   0x061d  /* Quatech VID */
-#define QUATECH_SSU200 0xC030  /* SSU200 */
-#define QUATECH_DSU100 0xC040  /* DSU100 */
-#define QUATECH_DSU200 0xC050  /* DSU200 */
-#define QUATECH_QSU100 0xC060  /* QSU100 */
-#define QUATECH_QSU200 0xC070  /* QSU200 */
-#define QUATECH_ESU100A        0xC080  /* ESU100A */
-#define QUATECH_ESU100B        0xC081  /* ESU100B */
-#define QUATECH_ESU200A        0xC0A0  /* ESU200A */
-#define QUATECH_ESU200B        0xC0A1  /* ESU200B */
-#define QUATECH_HSU100A        0xC090  /* HSU100A */
-#define QUATECH_HSU100B        0xC091  /* HSU100B */
-#define QUATECH_HSU100C        0xC092  /* HSU100C */
-#define QUATECH_HSU100D        0xC093  /* HSU100D */
-#define QUATECH_HSU200A        0xC0B0  /* HSU200A */
-#define QUATECH_HSU200B        0xC0B1  /* HSU200B */
-#define QUATECH_HSU200C        0xC0B2  /* HSU200C */
-#define QUATECH_HSU200D        0xC0B3  /* HSU200D */
-
-#define QT_SET_GET_DEVICE           0xc2
-#define QT_OPEN_CLOSE_CHANNEL       0xca
-#define QT_GET_SET_PREBUF_TRIG_LVL  0xcc
-#define QT_SET_ATF                  0xcd
-#define QT_GET_SET_REGISTER         0xc0
-#define QT_GET_SET_UART             0xc1
-#define QT_HW_FLOW_CONTROL_MASK     0xc5
-#define QT_SW_FLOW_CONTROL_MASK     0xc6
-#define QT_SW_FLOW_CONTROL_DISABLE  0xc7
-#define QT_BREAK_CONTROL            0xc8
-
-#define USBD_TRANSFER_DIRECTION_IN    0xc0
-#define USBD_TRANSFER_DIRECTION_OUT   0x40
-
-#define  MAX_BAUD_RATE              460800
-#define  MAX_BAUD_REMAINDER         4608
-
-#define  DIV_LATCH_LS               0x00
-#define  XMT_HOLD_REGISTER          0x00
-#define  XVR_BUFFER_REGISTER        0x00
-#define  DIV_LATCH_MS               0x01
-#define  FIFO_CONTROL_REGISTER      0x02
-#define  LINE_CONTROL_REGISTER      0x03
-#define  MODEM_CONTROL_REGISTER     0x04
-#define  LINE_STATUS_REGISTER       0x05
-#define  MODEM_STATUS_REGISTER      0x06
-
-#define  SERIAL_MCR_DTR             0x01
-#define  SERIAL_MCR_RTS             0x02
-#define  SERIAL_MCR_LOOP            0x10
-
-#define  SERIAL_MSR_CTS             0x10
-#define  SERIAL_MSR_CD              0x80
-#define  SERIAL_MSR_RI              0x40
-#define  SERIAL_MSR_DSR             0x20
-#define  SERIAL_MSR_MASK            0xf0
-
-#define  SERIAL_8_DATA              0x03
-#define  SERIAL_7_DATA              0x02
-#define  SERIAL_6_DATA              0x01
-#define  SERIAL_5_DATA              0x00
-
-#define  SERIAL_ODD_PARITY          0X08
-#define  SERIAL_EVEN_PARITY         0X18
-#define  SERIAL_TWO_STOPB           0x04
-#define  SERIAL_ONE_STOPB           0x00
-
-#define DEFAULT_DIVISOR  0x30  /* gives 9600 baud rate */
-#define DEFAULT_LCR SERIAL_8_DATA      /* 8, none , 1 */
-
-#define FULLPWRBIT          0x00000080
-#define NEXT_BOARD_POWER_BIT        0x00000004
-
-#define SERIAL_LSR_OE       0x02
-#define SERIAL_LSR_PE       0x04
-#define SERIAL_LSR_FE       0x08
-#define SERIAL_LSR_BI       0x10
-
-#define  SERIAL_MSR_CTS             0x10
-#define  SERIAL_MSR_CD              0x80
-#define  SERIAL_MSR_RI              0x40
-#define  SERIAL_MSR_DSR             0x20
-#define  SERIAL_MSR_MASK            0xf0
-
-#define PREFUFF_LEVEL_CONSERVATIVE  128
-#define ATC_DISABLED                0x0
-
-#define RR_BITS             0x03       /* for clearing clock bits */
-#define DUPMODE_BITS        0xc0
-#define CLKS_X4             0x02
-
-#define LOOPMODE_BITS       0x41       /* LOOP1 = b6, LOOP0 = b0 (PORT B) */
-#define ALL_LOOPBACK        0x01
-#define MODEM_CTRL          0x40
-#define RS232_MODE          0x00
-
-static const struct usb_device_id id_table[] = {
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_SSU200)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU100)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_DSU200)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_QSU100)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_QSU200)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_ESU100A)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_ESU100B)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_ESU200A)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_ESU200B)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU100A)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU100B)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU100C)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU100D)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU200A)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU200B)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU200C)},
-       {USB_DEVICE(USB_VENDOR_ID_QUATECH, QUATECH_HSU200D)},
-       {}                      /* Terminating entry */
-};
-MODULE_DEVICE_TABLE(usb, id_table);
-
-struct qt_get_device_data {
-       __u8 porta;
-       __u8 portb;
-       __u8 portc;
-};
-
-struct qt_open_channel_data {
-       __u8 line_status;
-       __u8 modem_status;
-};
-
-struct quatech_port {
-       int port_num;           /* number of the port */
-       struct urb *write_urb;  /* write URB for this port */
-       struct urb *read_urb;   /* read URB for this port */
-       struct urb *int_urb;
-
-       __u8 shadow_lcr;                /* last LCR value received */
-       __u8 shadow_mcr;                /* last MCR value received */
-       __u8 shadow_msr;                /* last MSR value received */
-       __u8 shadow_lsr;                /* last LSR value received */
-       char open_ports;
-
-       /* Used for TIOCMIWAIT */
-       wait_queue_head_t msr_wait;
-       char prev_status, diff_status;
-
-       wait_queue_head_t wait;
-
-       struct async_icount icount;
-
-       struct usb_serial_port *port;   /* owner of this object */
-       struct qt_get_device_data device_data;
-       struct mutex lock;
-       bool read_urb_busy;
-       int rx_holding;
-       int read_bulk_stopped;
-       char close_pending;
-};
-
-static int port_paranoia_check(struct usb_serial_port *port,
-                              const char *function)
-{
-       if (!port) {
-               pr_debug("%s - port == NULL", function);
-               return -1;
-       }
-       if (!port->serial) {
-               pr_debug("%s - port->serial == NULL\n", function);
-               return -1;
-       }
-
-       return 0;
-}
-
-static int serial_paranoia_check(struct usb_serial *serial,
-                                const char *function)
-{
-       if (!serial) {
-               pr_debug("%s - serial == NULL\n", function);
-               return -1;
-       }
-
-       if (!serial->type) {
-               pr_debug("%s - serial->type == NULL!", function);
-               return -1;
-       }
-
-       return 0;
-}
-
-static inline struct quatech_port *qt_get_port_private(struct usb_serial_port
-                                                      *port)
-{
-       return (struct quatech_port *)usb_get_serial_port_data(port);
-}
-
-static inline void qt_set_port_private(struct usb_serial_port *port,
-                                      struct quatech_port *data)
-{
-       usb_set_serial_port_data(port, (void *)data);
-}
-
-static struct usb_serial *get_usb_serial(struct usb_serial_port *port,
-                                        const char *function)
-{
-       /* if no port was specified, or it fails a paranoia check */
-       if (!port ||
-           port_paranoia_check(port, function) ||
-           serial_paranoia_check(port->serial, function)) {
-               /*
-                * then say that we dont have a valid usb_serial thing,
-                * which will end up genrating -ENODEV return values
-                */
-               return NULL;
-       }
-
-       return port->serial;
-}
-
-static void process_line_status(struct quatech_port *qt_port,
-                             unsigned char line_status)
-{
-
-       qt_port->shadow_lsr =
-           line_status & (SERIAL_LSR_OE | SERIAL_LSR_PE | SERIAL_LSR_FE |
-                          SERIAL_LSR_BI);
-}
-
-static void process_modem_status(struct quatech_port *qt_port,
-                              unsigned char modem_status)
-{
-
-       qt_port->shadow_msr = modem_status;
-       wake_up_interruptible(&qt_port->wait);
-}
-
-static void process_rx_char(struct usb_serial_port *port, unsigned char data)
-{
-       struct urb *urb = port->read_urb;
-       if (urb->actual_length)
-               tty_insert_flip_char(&port->port, data, TTY_NORMAL);
-}
-
-static void qt_write_bulk_callback(struct urb *urb)
-{
-       int status;
-       struct quatech_port *quatech_port;
-
-       status = urb->status;
-
-       if (status) {
-               dev_dbg(&urb->dev->dev,
-                       "nonzero write bulk status received:%d\n", status);
-               return;
-       }
-
-       quatech_port = urb->context;
-
-       tty_port_tty_wakeup(&quatech_port->port->port);
-}
-
-static void qt_interrupt_callback(struct urb *urb)
-{
-       /* FIXME */
-}
-
-static void qt_status_change_check(struct urb *urb,
-                                  struct quatech_port *qt_port,
-                                  struct usb_serial_port *port)
-{
-       int flag, i;
-       unsigned char *data = urb->transfer_buffer;
-       unsigned int rx_count = urb->actual_length;
-
-       for (i = 0; i < rx_count; ++i) {
-               /* Look ahead code here */
-               if ((i <= (rx_count - 3)) && (data[i] == 0x1b)
-                   && (data[i + 1] == 0x1b)) {
-                       flag = 0;
-                       switch (data[i + 2]) {
-                       case 0x00:
-                               if (i > (rx_count - 4)) {
-                                       dev_dbg(&port->dev,
-                                               "Illegal escape seuences in received data\n");
-                                       break;
-                               }
-
-                               process_line_status(qt_port, data[i + 3]);
-
-                               i += 3;
-                               flag = 1;
-                               break;
-
-                       case 0x01:
-                               if (i > (rx_count - 4)) {
-                                       dev_dbg(&port->dev,
-                                               "Illegal escape seuences in received data\n");
-                                       break;
-                               }
-
-                               process_modem_status(qt_port, data[i + 3]);
-
-                               i += 3;
-                               flag = 1;
-                               break;
-
-                       case 0xff:
-                               dev_dbg(&port->dev, "No status sequence.\n");
-
-                               process_rx_char(port, data[i]);
-                               process_rx_char(port, data[i + 1]);
-
-                               i += 2;
-                               break;
-                       }
-                       if (flag == 1)
-                               continue;
-               }
-
-               if (urb->actual_length)
-                       tty_insert_flip_char(&port->port, data[i], TTY_NORMAL);
-
-       }
-       tty_flip_buffer_push(&port->port);
-}
-
-static void qt_read_bulk_callback(struct urb *urb)
-{
-
-       struct usb_serial_port *port = urb->context;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-       struct quatech_port *qt_port = qt_get_port_private(port);
-       int result;
-
-       if (urb->status) {
-               qt_port->read_bulk_stopped = 1;
-               dev_dbg(&urb->dev->dev,
-                       "%s - nonzero write bulk status received: %d\n",
-                       __func__, urb->status);
-               return;
-       }
-
-       dev_dbg(&port->dev,
-               "%s - port->rx_holding = %d\n", __func__, qt_port->rx_holding);
-
-       if (port_paranoia_check(port, __func__) != 0) {
-               qt_port->read_bulk_stopped = 1;
-               return;
-       }
-
-       if (!serial)
-               return;
-
-       if (qt_port->close_pending == 1) {
-               /* Were closing , stop reading */
-               dev_dbg(&port->dev,
-                       "%s - (qt_port->close_pending == 1\n", __func__);
-               qt_port->read_bulk_stopped = 1;
-               return;
-       }
-
-       /*
-        * rx_holding is asserted by throttle, if we assert it, we're not
-        * receiving any more characters and let the box handle the flow
-        * control
-        */
-       if (qt_port->rx_holding == 1) {
-               qt_port->read_bulk_stopped = 1;
-               return;
-       }
-
-       if (urb->status) {
-               qt_port->read_bulk_stopped = 1;
-
-               dev_dbg(&port->dev,
-                       "%s - nonzero read bulk status received: %d\n",
-                       __func__, urb->status);
-               return;
-       }
-
-       if (urb->actual_length)
-               qt_status_change_check(urb, qt_port, port);
-
-       /* Continue trying to always read  */
-       usb_fill_bulk_urb(port->read_urb, serial->dev,
-                         usb_rcvbulkpipe(serial->dev,
-                                         port->bulk_in_endpointAddress),
-                         port->read_urb->transfer_buffer,
-                         port->read_urb->transfer_buffer_length,
-                         qt_read_bulk_callback, port);
-       result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
-       if (result)
-               dev_dbg(&port->dev,
-                       "%s - failed resubmitting read urb, error %d",
-                       __func__, result);
-       else {
-               if (urb->actual_length) {
-                       tty_flip_buffer_push(&port->port);
-                       tty_schedule_flip(&port->port);
-               }
-       }
-
-       schedule_work(&port->work);
-}
-
-/*
- * qt_get_device
- *   Issue a GET_DEVICE vendor-specific request on the default control pipe If
- *   successful, fills in the qt_get_device_data structure pointed to by
- *   device_data, otherwise return a negative error number of the problem.
- */
-
-static int qt_get_device(struct usb_serial *serial,
-                        struct qt_get_device_data *device_data)
-{
-       int result;
-       unsigned char *transfer_buffer;
-
-       transfer_buffer =
-           kmalloc(sizeof(struct qt_get_device_data), GFP_KERNEL);
-       if (!transfer_buffer)
-               return -ENOMEM;
-
-       result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                                QT_SET_GET_DEVICE, 0xc0, 0, 0,
-                                transfer_buffer,
-                                sizeof(struct qt_get_device_data), 300);
-       if (result > 0)
-               memcpy(device_data, transfer_buffer,
-                      sizeof(struct qt_get_device_data));
-       kfree(transfer_buffer);
-
-       return result;
-}
-
-/****************************************************************************
- *  box_set_prebuffer_level
-   TELLS BOX WHEN TO ASSERT FLOW CONTROL
- ****************************************************************************/
-static int box_set_prebuffer_level(struct usb_serial *serial)
-{
-       int result;
-       __u16 buffer_length;
-
-       buffer_length = PREFUFF_LEVEL_CONSERVATIVE;
-       result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                                QT_GET_SET_PREBUF_TRIG_LVL, 0x40,
-                                buffer_length, 0, NULL, 0, 300);
-       return result;
-}
-
-/****************************************************************************
- *  box_set_atc
-   TELLS BOX WHEN TO ASSERT automatic transmitter control
-   ****************************************************************************/
-static int box_set_atc(struct usb_serial *serial, __u16 n_mode)
-{
-       int result;
-       __u16 buffer_length;
-
-       buffer_length = PREFUFF_LEVEL_CONSERVATIVE;
-
-       result =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_SET_ATF, 0x40, n_mode, 0, NULL, 0, 300);
-
-       return result;
-}
-
-/**
- * qt_set_device
- *   Issue a SET_DEVICE vendor-specific request on the default control pipe If
- *   successful returns the number of bytes written, otherwise it returns a
- *   negative error number of the problem.
- */
-static int qt_set_device(struct usb_serial *serial,
-                        struct qt_get_device_data *device_data)
-{
-       int result;
-       __u16 length;
-       __u16 port_settings;
-
-       port_settings = ((__u16) (device_data->portb));
-       port_settings = (port_settings << 8);
-       port_settings += ((__u16) (device_data->porta));
-
-       length = sizeof(struct qt_get_device_data);
-
-       result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                                QT_SET_GET_DEVICE, 0x40, port_settings,
-                                0, NULL, 0, 300);
-       return result;
-}
-
-static int qt_open_channel(struct usb_serial *serial, __u16 uart_num,
-                          struct qt_open_channel_data *pdevice_data)
-{
-       int result;
-
-       result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                                QT_OPEN_CLOSE_CHANNEL,
-                                USBD_TRANSFER_DIRECTION_IN, 1, uart_num,
-                                pdevice_data,
-                                sizeof(struct qt_open_channel_data), 300);
-
-       return result;
-
-}
-
-static int qt_close_channel(struct usb_serial *serial, __u16 uart_num)
-{
-       int result;
-
-       result = usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                                QT_OPEN_CLOSE_CHANNEL,
-                                USBD_TRANSFER_DIRECTION_OUT, 0, uart_num,
-                                NULL, 0, 300);
-
-       return result;
-
-}
-
-/****************************************************************************
-* box_get_register
-*      issuse a GET_REGISTER vendor-spcific request on the default control pipe
-*      If successful, fills in the  p_value with the register value asked for
-****************************************************************************/
-static int box_get_register(struct usb_serial *serial, unsigned short uart_num,
-                         unsigned short register_num, __u8 *p_value)
-{
-       int result;
-       __u16 current_length;
-
-       current_length = sizeof(struct qt_get_device_data);
-
-       result =
-           usb_control_msg(serial->dev, usb_rcvctrlpipe(serial->dev, 0),
-                           QT_GET_SET_REGISTER, 0xC0, register_num,
-                           uart_num, (void *)p_value, sizeof(*p_value), 300);
-
-       return result;
-}
-
-/****************************************************************************
-* box_set_register
-*      issuse a GET_REGISTER vendor-spcific request on the default control pipe
-*      If successful, fills in the  p_value with the register value asked for
-****************************************************************************/
-static int box_set_register(struct usb_serial *serial, unsigned short uart_num,
-                         unsigned short register_num, unsigned short value)
-{
-       int result;
-       unsigned short reg_and_byte;
-
-       reg_and_byte = value;
-       reg_and_byte = reg_and_byte << 8;
-       reg_and_byte = reg_and_byte + register_num;
-
-/*
-       result = usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                                QT_GET_SET_REGISTER, 0xC0, register_num,
-                                uart_num, NULL, 0, 300);
-*/
-
-       result =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_GET_SET_REGISTER, 0x40, reg_and_byte, uart_num,
-                           NULL, 0, 300);
-
-       return result;
-}
-
-/*
- * qt_setuart
- * issues a SET_UART vendor-specific request on the default control pipe
- * If successful sets baud rate divisor and LCR value
- */
-static int qt_setuart(struct usb_serial *serial, unsigned short uart_num,
-                     unsigned short default_divisor, unsigned char default_lcr)
-{
-       int result;
-       unsigned short uart_num_and_lcr;
-
-       uart_num_and_lcr = (default_lcr << 8) + uart_num;
-
-       result =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_GET_SET_UART, 0x40, default_divisor,
-                           uart_num_and_lcr, NULL, 0, 300);
-
-       return result;
-}
-
-static int box_set_hw_flow_ctrl(struct usb_serial *serial, unsigned int index,
-                            int b_set)
-{
-       __u8 mcr = 0;
-       __u8 msr = 0, mout_value = 0;
-       unsigned int status;
-
-       if (b_set == 1) {
-               /* flow control, box will clear RTS line to prevent remote */
-               mcr = SERIAL_MCR_RTS;
-       } /* device from xmitting more chars */
-       else {
-               /* no flow control to remote device */
-               mcr = 0;
-
-       }
-       mout_value = mcr << 8;
-
-       if (b_set == 1) {
-               /* flow control, box will inhibit xmit data if CTS line is
-                * asserted */
-               msr = SERIAL_MSR_CTS;
-       } else {
-               /* Box will not inhimbe xmit data due to CTS line */
-               msr = 0;
-       }
-       mout_value |= msr;
-
-       status =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_HW_FLOW_CONTROL_MASK, 0x40, mout_value,
-                           index, NULL, 0, 300);
-       return status;
-
-}
-
-static int box_set_sw_flow_ctrl(struct usb_serial *serial, __u16 index,
-                            unsigned char stop_char, unsigned char start_char)
-{
-       __u16 n_sw_flow_out;
-       int result;
-
-       n_sw_flow_out = start_char << 8;
-       n_sw_flow_out = (unsigned short)stop_char;
-
-       result =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_SW_FLOW_CONTROL_MASK, 0x40, n_sw_flow_out,
-                           index, NULL, 0, 300);
-       return result;
-
-}
-
-static int box_disable_sw_flow_ctrl(struct usb_serial *serial, __u16 index)
-{
-       int result;
-
-       result =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_SW_FLOW_CONTROL_DISABLE, 0x40, 0, index,
-                           NULL, 0, 300);
-       return result;
-
-}
-
-static int qt_startup(struct usb_serial *serial)
-{
-       struct device *dev = &serial->dev->dev;
-       struct usb_serial_port *port;
-       struct quatech_port *qt_port;
-       struct qt_get_device_data device_data;
-       int i;
-       int status;
-
-       /* Now setup per port private data */
-       for (i = 0; i < serial->num_ports; i++) {
-               port = serial->port[i];
-               qt_port = kzalloc(sizeof(*qt_port), GFP_KERNEL);
-               if (!qt_port) {
-                       for (--i; i >= 0; i--) {
-                               port = serial->port[i];
-                               kfree(usb_get_serial_port_data(port));
-                               usb_set_serial_port_data(port, NULL);
-                       }
-                       return -ENOMEM;
-               }
-               mutex_init(&qt_port->lock);
-
-               usb_set_serial_port_data(port, qt_port);
-
-       }
-
-       status = qt_get_device(serial, &device_data);
-       if (status < 0)
-               goto startup_error;
-
-       dev_dbg(dev, "device_data.portb = 0x%x\n", device_data.portb);
-
-       device_data.portb &= ~FULLPWRBIT;
-       dev_dbg(dev, "Changing device_data.portb to 0x%x\n", device_data.portb);
-
-       status = qt_set_device(serial, &device_data);
-       if (status < 0) {
-               dev_dbg(dev, "qt_set_device failed\n");
-               goto startup_error;
-       }
-
-       status = qt_get_device(serial, &device_data);
-       if (status < 0) {
-               dev_dbg(dev, "qt_get_device failed\n");
-               goto startup_error;
-       }
-
-       switch (le16_to_cpu(serial->dev->descriptor.idProduct)) {
-       case QUATECH_DSU100:
-       case QUATECH_QSU100:
-       case QUATECH_ESU100A:
-       case QUATECH_ESU100B:
-       case QUATECH_HSU100A:
-       case QUATECH_HSU100B:
-       case QUATECH_HSU100C:
-       case QUATECH_HSU100D:
-               device_data.porta &= ~(RR_BITS | DUPMODE_BITS);
-               device_data.porta |= CLKS_X4;
-               device_data.portb &= ~(LOOPMODE_BITS);
-               device_data.portb |= RS232_MODE;
-               break;
-
-       case QUATECH_SSU200:
-       case QUATECH_DSU200:
-       case QUATECH_QSU200:
-       case QUATECH_ESU200A:
-       case QUATECH_ESU200B:
-       case QUATECH_HSU200A:
-       case QUATECH_HSU200B:
-       case QUATECH_HSU200C:
-       case QUATECH_HSU200D:
-               device_data.porta &= ~(RR_BITS | DUPMODE_BITS);
-               device_data.porta |= CLKS_X4;
-               device_data.portb &= ~(LOOPMODE_BITS);
-               device_data.portb |= ALL_LOOPBACK;
-               break;
-       default:
-               device_data.porta &= ~(RR_BITS | DUPMODE_BITS);
-               device_data.porta |= CLKS_X4;
-               device_data.portb &= ~(LOOPMODE_BITS);
-               device_data.portb |= RS232_MODE;
-               break;
-
-       }
-
-       status = box_set_prebuffer_level(serial);       /* sets to
-                                                        * default value
-                                                        */
-       if (status < 0) {
-               dev_dbg(dev, "box_set_prebuffer_level failed\n");
-               goto startup_error;
-       }
-
-       status = box_set_atc(serial, ATC_DISABLED);
-       if (status < 0) {
-               dev_dbg(dev, "box_set_atc failed\n");
-               goto startup_error;
-       }
-
-       dev_dbg(dev, "device_data.portb = 0x%x\n", device_data.portb);
-
-       device_data.portb |= NEXT_BOARD_POWER_BIT;
-       dev_dbg(dev, "Changing device_data.portb to 0x%x\n", device_data.portb);
-
-       status = qt_set_device(serial, &device_data);
-       if (status < 0) {
-               dev_dbg(dev, "qt_set_device failed\n");
-               goto startup_error;
-       }
-
-       return 0;
-
-startup_error:
-       for (i = 0; i < serial->num_ports; i++) {
-               port = serial->port[i];
-               qt_port = qt_get_port_private(port);
-               kfree(qt_port);
-               usb_set_serial_port_data(port, NULL);
-       }
-
-       return -EIO;
-}
-
-static void qt_release(struct usb_serial *serial)
-{
-       struct usb_serial_port *port;
-       struct quatech_port *qt_port;
-       int i;
-
-       for (i = 0; i < serial->num_ports; i++) {
-               port = serial->port[i];
-               if (!port)
-                       continue;
-
-               qt_port = usb_get_serial_port_data(port);
-               kfree(qt_port);
-               usb_set_serial_port_data(port, NULL);
-       }
-
-}
-
-static void qt_submit_urb_from_open(struct usb_serial *serial,
-                                   struct usb_serial_port *port)
-{
-       int result;
-       struct usb_serial_port *port0 = serial->port[0];
-
-       /* set up interrupt urb */
-       usb_fill_int_urb(port0->interrupt_in_urb,
-                        serial->dev,
-                        usb_rcvintpipe(serial->dev,
-                                       port0->interrupt_in_endpointAddress),
-                        port0->interrupt_in_buffer,
-                        port0->interrupt_in_urb->transfer_buffer_length,
-                        qt_interrupt_callback, serial,
-                        port0->interrupt_in_urb->interval);
-
-       result = usb_submit_urb(port0->interrupt_in_urb,
-                               GFP_KERNEL);
-       if (result) {
-               dev_err(&port->dev,
-                       "%s - Error %d submitting interrupt urb\n",
-                       __func__, result);
-       }
-}
-
-static int qt_open(struct tty_struct *tty,
-                  struct usb_serial_port *port)
-{
-       struct usb_serial *serial;
-       struct quatech_port *quatech_port;
-       struct quatech_port *port0;
-       struct qt_open_channel_data channel_data;
-
-       int result;
-
-       if (port_paranoia_check(port, __func__))
-               return -ENODEV;
-
-       serial = port->serial;
-
-       if (serial_paranoia_check(serial, __func__))
-               return -ENODEV;
-
-       quatech_port = qt_get_port_private(port);
-       port0 = qt_get_port_private(serial->port[0]);
-
-       if (quatech_port == NULL || port0 == NULL)
-               return -ENODEV;
-
-       usb_clear_halt(serial->dev, port->write_urb->pipe);
-       usb_clear_halt(serial->dev, port->read_urb->pipe);
-       port0->open_ports++;
-
-       result = qt_get_device(serial, &port0->device_data);
-
-       /* Port specific setups */
-       result = qt_open_channel(serial, port->port_number, &channel_data);
-       if (result < 0) {
-               dev_dbg(&port->dev, "qt_open_channel failed\n");
-               return result;
-       }
-       dev_dbg(&port->dev, "qt_open_channel completed.\n");
-
-/* FIXME: are these needed?  Does it even do anything useful? */
-       quatech_port->shadow_lsr = channel_data.line_status &
-           (SERIAL_LSR_OE | SERIAL_LSR_PE | SERIAL_LSR_FE | SERIAL_LSR_BI);
-
-       quatech_port->shadow_msr = channel_data.modem_status &
-           (SERIAL_MSR_CTS | SERIAL_MSR_DSR | SERIAL_MSR_RI | SERIAL_MSR_CD);
-
-       /* Set Baud rate to default and turn off (default)flow control here */
-       result = qt_setuart(serial, port->port_number, DEFAULT_DIVISOR,
-                       DEFAULT_LCR);
-       if (result < 0) {
-               dev_dbg(&port->dev, "qt_setuart failed\n");
-               return result;
-       }
-       dev_dbg(&port->dev, "qt_setuart completed.\n");
-
-       /*
-        * Put this here to make it responsive to stty and defaults set by
-        * the tty layer
-        */
-
-       /*  Check to see if we've set up our endpoint info yet */
-       if (port0->open_ports == 1) {
-               if (serial->port[0]->interrupt_in_buffer == NULL)
-                       qt_submit_urb_from_open(serial, port);
-       }
-
-       dev_dbg(&port->dev, "minor number is %d\n", port->minor);
-       dev_dbg(&port->dev,
-               "Bulkin endpoint is %d\n", port->bulk_in_endpointAddress);
-       dev_dbg(&port->dev,
-               "BulkOut endpoint is %d\n", port->bulk_out_endpointAddress);
-       dev_dbg(&port->dev, "Interrupt endpoint is %d\n",
-               port->interrupt_in_endpointAddress);
-       dev_dbg(&port->dev, "port's number in the device is %d\n",
-               quatech_port->port_num);
-       quatech_port->read_urb = port->read_urb;
-
-       /* set up our bulk in urb */
-
-       usb_fill_bulk_urb(quatech_port->read_urb,
-                         serial->dev,
-                         usb_rcvbulkpipe(serial->dev,
-                                         port->bulk_in_endpointAddress),
-                         port->bulk_in_buffer,
-                         quatech_port->read_urb->transfer_buffer_length,
-                         qt_read_bulk_callback, quatech_port);
-
-       dev_dbg(&port->dev, "qt_open: bulkin endpoint is %d\n",
-               port->bulk_in_endpointAddress);
-       quatech_port->read_urb_busy = true;
-       result = usb_submit_urb(quatech_port->read_urb, GFP_KERNEL);
-       if (result) {
-               dev_err(&port->dev,
-                       "%s - Error %d submitting control urb\n",
-                       __func__, result);
-               quatech_port->read_urb_busy = false;
-       }
-
-       /* initialize our wait queues */
-       init_waitqueue_head(&quatech_port->wait);
-       init_waitqueue_head(&quatech_port->msr_wait);
-
-       /* initialize our icount structure */
-       memset(&(quatech_port->icount), 0x00, sizeof(quatech_port->icount));
-
-       return 0;
-
-}
-
-static int qt_chars_in_buffer(struct tty_struct *tty)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial;
-       int chars = 0;
-
-       serial = get_usb_serial(port, __func__);
-
-       if (serial->num_bulk_out) {
-               if (port->write_urb->status == -EINPROGRESS)
-                       chars = port->write_urb->transfer_buffer_length;
-       }
-
-       return chars;
-}
-
-static void qt_block_until_empty(struct tty_struct *tty,
-                                struct quatech_port *qt_port)
-{
-       int timeout = HZ / 10;
-       int wait = 30;
-
-       /* returns if we get a signal, an error, or the buffer is empty */
-       while (wait_event_interruptible_timeout(qt_port->wait,
-                                       qt_chars_in_buffer(tty) <= 0,
-                                       timeout) == 0) {
-               wait--;
-               if (wait == 0) {
-                       dev_dbg(&qt_port->port->dev, "%s - TIMEOUT", __func__);
-                       return;
-               } else {
-                       wait = 30;
-               }
-       }
-}
-
-static void qt_close(struct usb_serial_port *port)
-{
-       struct usb_serial *serial = port->serial;
-       struct tty_struct *tty = tty_port_tty_get(&port->port);
-       unsigned int index = port->port_number;
-       struct quatech_port *qt_port = qt_get_port_private(port);
-       struct quatech_port *port0 = qt_get_port_private(serial->port[0]);
-
-       /* shutdown any bulk reads that might be going on */
-       if (serial->num_bulk_out)
-               usb_unlink_urb(port->write_urb);
-       if (serial->num_bulk_in)
-               usb_unlink_urb(port->read_urb);
-
-       /* wait up to for transmitter to empty */
-       if (serial->dev)
-               qt_block_until_empty(tty, qt_port);
-       tty_kref_put(tty);
-
-       /* Close uart channel */
-       if (qt_close_channel(serial, index) < 0)
-               dev_dbg(&port->dev, "%s - qt_close_channel failed.\n",
-                       __func__);
-
-       port0->open_ports--;
-
-       dev_dbg(&port->dev, "qt_num_open_ports in close%d\n",
-               port0->open_ports);
-
-       if (port0->open_ports == 0) {
-               if (serial->port[0]->interrupt_in_urb) {
-                       dev_dbg(&port->dev, "Shutdown interrupt_in_urb\n");
-                       usb_kill_urb(serial->port[0]->interrupt_in_urb);
-               }
-
-       }
-
-       if (qt_port->write_urb) {
-               /* if this urb had a transfer buffer already (old tx) free it */
-               kfree(qt_port->write_urb->transfer_buffer);
-               usb_free_urb(qt_port->write_urb);
-       }
-
-}
-
-static int qt_write(struct tty_struct *tty, struct usb_serial_port *port,
-                   const unsigned char *buf, int count)
-{
-       int result;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-
-       if (serial == NULL)
-               return -ENODEV;
-
-       if (count == 0) {
-               dev_dbg(&port->dev,
-                       "%s - write request of 0 bytes\n", __func__);
-               return 0;
-       }
-
-       /* only do something if we have a bulk out endpoint */
-       if (serial->num_bulk_out) {
-               if (port->write_urb->status == -EINPROGRESS) {
-                       dev_dbg(&port->dev, "%s - already writing\n", __func__);
-                       return 0;
-               }
-
-               count =
-                   (count > port->bulk_out_size) ? port->bulk_out_size : count;
-               memcpy(port->write_urb->transfer_buffer, buf, count);
-
-               /* set up our urb */
-
-               usb_fill_bulk_urb(port->write_urb, serial->dev,
-                                 usb_sndbulkpipe(serial->dev,
-                                                 port->
-                                                 bulk_out_endpointAddress),
-                                 port->write_urb->transfer_buffer, count,
-                                 qt_write_bulk_callback, port);
-
-               /* send the data out the bulk port */
-               result = usb_submit_urb(port->write_urb, GFP_ATOMIC);
-               if (result)
-                       dev_dbg(&port->dev,
-                               "%s - failed submitting write urb, error %d\n",
-                               __func__, result);
-               else
-                       result = count;
-
-               return result;
-       }
-
-       /* no bulk out, so return 0 bytes written */
-       return 0;
-}
-
-static int qt_write_room(struct tty_struct *tty)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial;
-       struct quatech_port *qt_port;
-
-       int retval = -EINVAL;
-
-       if (port_paranoia_check(port, __func__))
-               return -1;
-
-       serial = get_usb_serial(port, __func__);
-
-       if (!serial)
-               return -ENODEV;
-
-       qt_port = qt_get_port_private(port);
-
-       mutex_lock(&qt_port->lock);
-
-       if (serial->num_bulk_out) {
-               if (port->write_urb->status != -EINPROGRESS)
-                       retval = port->bulk_out_size;
-       }
-
-       mutex_unlock(&qt_port->lock);
-       return retval;
-
-}
-
-static int qt_ioctl(struct tty_struct *tty,
-                   unsigned int cmd, unsigned long arg)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct quatech_port *qt_port = qt_get_port_private(port);
-       unsigned int index;
-
-       dev_dbg(&port->dev, "%s cmd 0x%04x\n", __func__, cmd);
-
-       index = port->port_number;
-
-       if (cmd == TIOCMIWAIT) {
-               while (qt_port != NULL) {
-#if 0
-                       /* this never wakes up */
-                       interruptible_sleep_on(&qt_port->msr_wait);
-#endif
-                       if (signal_pending(current))
-                               return -ERESTARTSYS;
-                       else {
-                               char diff = qt_port->diff_status;
-
-                               if (diff == 0)
-                                       return -EIO;    /* no change => error */
-
-                               /* Consume all events */
-                               qt_port->diff_status = 0;
-
-                               if (((arg & TIOCM_RNG)
-                                    && (diff & SERIAL_MSR_RI))
-                                   || ((arg & TIOCM_DSR)
-                                       && (diff & SERIAL_MSR_DSR))
-                                   || ((arg & TIOCM_CD)
-                                       && (diff & SERIAL_MSR_CD))
-                                   || ((arg & TIOCM_CTS)
-                                       && (diff & SERIAL_MSR_CTS))) {
-                                       return 0;
-                               }
-                       }
-               }
-               return 0;
-       }
-
-       dev_dbg(&port->dev, "%s -No ioctl for that one.\n", __func__);
-       return -ENOIOCTLCMD;
-}
-
-static void qt_set_termios(struct tty_struct *tty,
-                          struct usb_serial_port *port,
-                          struct ktermios *old_termios)
-{
-       struct ktermios *termios = &tty->termios;
-       unsigned char new_lcr = 0;
-       unsigned int cflag = termios->c_cflag;
-       unsigned int index;
-       int baud, divisor, remainder;
-       int status;
-
-       index = port->port_number;
-
-       switch (cflag & CSIZE) {
-       case CS5:
-               new_lcr |= SERIAL_5_DATA;
-               break;
-       case CS6:
-               new_lcr |= SERIAL_6_DATA;
-               break;
-       case CS7:
-               new_lcr |= SERIAL_7_DATA;
-               break;
-       default:
-               termios->c_cflag &= ~CSIZE;
-               termios->c_cflag |= CS8;
-       case CS8:
-               new_lcr |= SERIAL_8_DATA;
-               break;
-       }
-
-       /* Parity stuff */
-       if (cflag & PARENB) {
-               if (cflag & PARODD)
-                       new_lcr |= SERIAL_ODD_PARITY;
-               else
-                       new_lcr |= SERIAL_EVEN_PARITY;
-       }
-       if (cflag & CSTOPB)
-               new_lcr |= SERIAL_TWO_STOPB;
-       else
-               new_lcr |= SERIAL_ONE_STOPB;
-
-       dev_dbg(&port->dev, "%s - 4\n", __func__);
-
-       /* Thats the LCR stuff, go ahead and set it */
-       baud = tty_get_baud_rate(tty);
-       if (!baud)
-               /* pick a default, any default... */
-               baud = 9600;
-
-       dev_dbg(&port->dev, "%s - got baud = %d\n", __func__, baud);
-
-       divisor = MAX_BAUD_RATE / baud;
-       remainder = MAX_BAUD_RATE % baud;
-       /* Round to nearest divisor */
-       if (((remainder * 2) >= baud) && (baud != 110))
-               divisor++;
-
-       /*
-        * Set Baud rate to default and turn off (default)flow control here
-        */
-       status =
-           qt_setuart(port->serial, index, (unsigned short)divisor, new_lcr);
-       if (status < 0) {
-               dev_dbg(&port->dev, "qt_setuart failed\n");
-               return;
-       }
-
-       /* Now determine flow control */
-       if (cflag & CRTSCTS) {
-               dev_dbg(&port->dev, "%s - Enabling HW flow control\n",
-                       __func__);
-
-               /* Enable RTS/CTS flow control */
-               status = box_set_hw_flow_ctrl(port->serial, index, 1);
-
-               if (status < 0) {
-                       dev_dbg(&port->dev, "box_set_hw_flow_ctrl failed\n");
-                       return;
-               }
-       } else {
-               /* Disable RTS/CTS flow control */
-               dev_dbg(&port->dev,
-                       "%s - disabling HW flow control\n", __func__);
-
-               status = box_set_hw_flow_ctrl(port->serial, index, 0);
-               if (status < 0) {
-                       dev_dbg(&port->dev, "box_set_hw_flow_ctrl failed\n");
-                       return;
-               }
-
-       }
-
-       /* if we are implementing XON/XOFF, set the start and stop character in
-        * the device */
-       if (I_IXOFF(tty) || I_IXON(tty)) {
-               unsigned char stop_char = STOP_CHAR(tty);
-               unsigned char start_char = START_CHAR(tty);
-
-               status = box_set_sw_flow_ctrl(port->serial, index, stop_char,
-                                             start_char);
-               if (status < 0)
-                       dev_dbg(&port->dev,
-                               "box_set_sw_flow_ctrl (enabled) failed\n");
-
-       } else {
-               /* disable SW flow control */
-               status = box_disable_sw_flow_ctrl(port->serial, index);
-               if (status < 0)
-                       dev_dbg(&port->dev,
-                               "box_set_sw_flow_ctrl (diabling) failed\n");
-
-       }
-       termios->c_cflag &= ~CMSPAR;
-       /* FIXME:
-          Error cases should be returning the actual bits changed only
-       */
-}
-
-static void qt_break(struct tty_struct *tty, int break_state)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-       struct quatech_port *qt_port;
-       u16 index, onoff;
-       unsigned int result;
-
-       index = port->port_number;
-
-       qt_port = qt_get_port_private(port);
-
-       if (break_state == -1)
-               onoff = 1;
-       else
-               onoff = 0;
-
-       mutex_lock(&qt_port->lock);
-
-       result =
-           usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                           QT_BREAK_CONTROL, 0x40, onoff, index, NULL, 0, 300);
-
-       mutex_unlock(&qt_port->lock);
-}
-
-static inline int qt_real_tiocmget(struct tty_struct *tty,
-                                  struct usb_serial_port *port,
-                                  struct usb_serial *serial)
-{
-
-       u8 mcr;
-       u8 msr;
-       unsigned int result = 0;
-       int status;
-       unsigned int index;
-
-       index = port->port_number;
-       status =
-           box_get_register(port->serial, index, MODEM_CONTROL_REGISTER, &mcr);
-       if (status >= 0) {
-               status =
-                   box_get_register(port->serial, index,
-                                  MODEM_STATUS_REGISTER, &msr);
-
-       }
-
-       if (status >= 0) {
-               result = ((mcr & SERIAL_MCR_DTR) ? TIOCM_DTR : 0)
-                   /* DTR IS SET */
-                   | ((mcr & SERIAL_MCR_RTS) ? TIOCM_RTS : 0)
-                   /* RTS IS SET */
-                   | ((msr & SERIAL_MSR_CTS) ? TIOCM_CTS : 0)
-                   /* CTS is set */
-                   | ((msr & SERIAL_MSR_CD) ? TIOCM_CAR : 0)
-                   /* Carrier detect is set */
-                   | ((msr & SERIAL_MSR_RI) ? TIOCM_RI : 0)
-                   /* Ring indicator set */
-                   | ((msr & SERIAL_MSR_DSR) ? TIOCM_DSR : 0);
-               /* DSR is set */
-               return result;
-
-       } else
-               return -ESPIPE;
-}
-
-static inline int qt_real_tiocmset(struct tty_struct *tty,
-                                  struct usb_serial_port *port,
-                                  struct usb_serial *serial,
-                                  unsigned int value)
-{
-
-       u8 mcr;
-       int status;
-       unsigned int index;
-
-       index = port->port_number;
-       status =
-           box_get_register(port->serial, index, MODEM_CONTROL_REGISTER, &mcr);
-       if (status < 0)
-               return -ESPIPE;
-
-       /*
-        * Turn off the RTS and DTR and loopback and then only turn on what was
-        * asked for
-        */
-       mcr &= ~(SERIAL_MCR_RTS | SERIAL_MCR_DTR | SERIAL_MCR_LOOP);
-       if (value & TIOCM_RTS)
-               mcr |= SERIAL_MCR_RTS;
-       if (value & TIOCM_DTR)
-               mcr |= SERIAL_MCR_DTR;
-       if (value & TIOCM_LOOP)
-               mcr |= SERIAL_MCR_LOOP;
-
-       status =
-           box_set_register(port->serial, index, MODEM_CONTROL_REGISTER, mcr);
-       if (status < 0)
-               return -ESPIPE;
-       else
-               return 0;
-}
-
-static int qt_tiocmget(struct tty_struct *tty)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-       struct quatech_port *qt_port = qt_get_port_private(port);
-       int retval;
-
-       if (!serial)
-               return -ENODEV;
-
-       mutex_lock(&qt_port->lock);
-       retval = qt_real_tiocmget(tty, port, serial);
-       mutex_unlock(&qt_port->lock);
-       return retval;
-}
-
-static int qt_tiocmset(struct tty_struct *tty,
-                      unsigned int set, unsigned int clear)
-{
-
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-       struct quatech_port *qt_port = qt_get_port_private(port);
-       int retval;
-
-       if (!serial)
-               return -ENODEV;
-
-       mutex_lock(&qt_port->lock);
-       retval = qt_real_tiocmset(tty, port, serial, set);
-       mutex_unlock(&qt_port->lock);
-       return retval;
-}
-
-static void qt_throttle(struct tty_struct *tty)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-       struct quatech_port *qt_port;
-
-       if (!serial)
-               return;
-
-       qt_port = qt_get_port_private(port);
-
-       mutex_lock(&qt_port->lock);
-
-       /* pass on to the driver specific version of this function */
-       qt_port->rx_holding = 1;
-
-       mutex_unlock(&qt_port->lock);
-}
-
-static void qt_submit_urb_from_unthrottle(struct usb_serial_port *port,
-                                         struct usb_serial *serial)
-{
-       int result;
-
-       /* Start reading from the device */
-       usb_fill_bulk_urb(port->read_urb, serial->dev,
-                         usb_rcvbulkpipe(serial->dev,
-                                         port->bulk_in_endpointAddress),
-                         port->read_urb->transfer_buffer,
-                         port->read_urb->transfer_buffer_length,
-                         qt_read_bulk_callback, port);
-
-       result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
-
-       if (result)
-               dev_err(&port->dev,
-                       "%s - failed restarting read urb, error %d\n",
-                       __func__, result);
-}
-
-static void qt_unthrottle(struct tty_struct *tty)
-{
-       struct usb_serial_port *port = tty->driver_data;
-       struct usb_serial *serial = get_usb_serial(port, __func__);
-       struct quatech_port *qt_port;
-
-       if (!serial)
-               return;
-
-       qt_port = qt_get_port_private(port);
-
-       mutex_lock(&qt_port->lock);
-
-       if (qt_port->rx_holding == 1) {
-               dev_dbg(&port->dev, "%s -qt_port->rx_holding == 1\n", __func__);
-
-               qt_port->rx_holding = 0;
-               dev_dbg(&port->dev, "%s - qt_port->rx_holding = 0\n", __func__);
-
-               /* if we have a bulk endpoint, start it up */
-               if ((serial->num_bulk_in) && (qt_port->read_bulk_stopped == 1))
-                       qt_submit_urb_from_unthrottle(port, serial);
-       }
-       mutex_unlock(&qt_port->lock);
-}
-
-static int qt_calc_num_ports(struct usb_serial *serial)
-{
-       int num_ports;
-
-       num_ports =
-           (serial->interface->cur_altsetting->desc.bNumEndpoints - 1) / 2;
-
-       return num_ports;
-}
-
-static struct usb_serial_driver quatech_device = {
-       .driver = {
-                  .owner = THIS_MODULE,
-                  .name = "serqt",
-                  },
-       .description = DRIVER_DESC,
-       .id_table = id_table,
-       .num_ports = 8,
-       .open = qt_open,
-       .close = qt_close,
-       .write = qt_write,
-       .write_room = qt_write_room,
-       .chars_in_buffer = qt_chars_in_buffer,
-       .throttle = qt_throttle,
-       .unthrottle = qt_unthrottle,
-       .calc_num_ports = qt_calc_num_ports,
-       .ioctl = qt_ioctl,
-       .set_termios = qt_set_termios,
-       .break_ctl = qt_break,
-       .tiocmget = qt_tiocmget,
-       .tiocmset = qt_tiocmset,
-       .attach = qt_startup,
-       .release = qt_release,
-};
-
-static struct usb_serial_driver * const serial_drivers[] = {
-       &quatech_device, NULL
-};
-
-module_usb_serial_driver(serial_drivers, id_table);
-
-MODULE_AUTHOR(DRIVER_AUTHOR);
-MODULE_DESCRIPTION(DRIVER_DESC);
-MODULE_LICENSE("GPL");
index a03703deeaf80bc47560a3bc1f2421b7af2cd81b..d9dc1d5ed55186c1a2f007341f8ce1cb6af890c6 100644 (file)
@@ -20,7 +20,7 @@
 #define MK_64 SKEIN_MK_64
 
 /* blkSize =  256 bits. hashSize =  128 bits */
-const u64 SKEIN_256_IV_128[] = {
+static const u64 SKEIN_256_IV_128[] = {
        MK_64(0xE1111906, 0x964D7260),
        MK_64(0x883DAAA7, 0x7C8D811C),
        MK_64(0x10080DF4, 0x91960F7A),
@@ -28,7 +28,7 @@ const u64 SKEIN_256_IV_128[] = {
 };
 
 /* blkSize =  256 bits. hashSize =  160 bits */
-const u64 SKEIN_256_IV_160[] = {
+static const u64 SKEIN_256_IV_160[] = {
        MK_64(0x14202314, 0x72825E98),
        MK_64(0x2AC4E9A2, 0x5A77E590),
        MK_64(0xD47A5856, 0x8838D63E),
@@ -36,7 +36,7 @@ const u64 SKEIN_256_IV_160[] = {
 };
 
 /* blkSize =  256 bits. hashSize =  224 bits */
-const u64 SKEIN_256_IV_224[] = {
+static const u64 SKEIN_256_IV_224[] = {
        MK_64(0xC6098A8C, 0x9AE5EA0B),
        MK_64(0x876D5686, 0x08C5191C),
        MK_64(0x99CB88D7, 0xD7F53884),
@@ -44,7 +44,7 @@ const u64 SKEIN_256_IV_224[] = {
 };
 
 /* blkSize =  256 bits. hashSize =  256 bits */
-const u64 SKEIN_256_IV_256[] = {
+static const u64 SKEIN_256_IV_256[] = {
        MK_64(0xFC9DA860, 0xD048B449),
        MK_64(0x2FCA6647, 0x9FA7D833),
        MK_64(0xB33BC389, 0x6656840F),
@@ -52,7 +52,7 @@ const u64 SKEIN_256_IV_256[] = {
 };
 
 /* blkSize =  512 bits. hashSize =  128 bits */
-const u64 SKEIN_512_IV_128[] = {
+static const u64 SKEIN_512_IV_128[] = {
        MK_64(0xA8BC7BF3, 0x6FBF9F52),
        MK_64(0x1E9872CE, 0xBD1AF0AA),
        MK_64(0x309B1790, 0xB32190D3),
@@ -64,7 +64,7 @@ const u64 SKEIN_512_IV_128[] = {
 };
 
 /* blkSize =  512 bits. hashSize =  160 bits */
-const u64 SKEIN_512_IV_160[] = {
+static const u64 SKEIN_512_IV_160[] = {
        MK_64(0x28B81A2A, 0xE013BD91),
        MK_64(0xC2F11668, 0xB5BDF78F),
        MK_64(0x1760D8F3, 0xF6A56F12),
@@ -76,7 +76,7 @@ const u64 SKEIN_512_IV_160[] = {
 };
 
 /* blkSize =  512 bits. hashSize =  224 bits */
-const u64 SKEIN_512_IV_224[] = {
+static const u64 SKEIN_512_IV_224[] = {
        MK_64(0xCCD06162, 0x48677224),
        MK_64(0xCBA65CF3, 0xA92339EF),
        MK_64(0x8CCD69D6, 0x52FF4B64),
@@ -88,7 +88,7 @@ const u64 SKEIN_512_IV_224[] = {
 };
 
 /* blkSize =  512 bits. hashSize =  256 bits */
-const u64 SKEIN_512_IV_256[] = {
+static const u64 SKEIN_512_IV_256[] = {
        MK_64(0xCCD044A1, 0x2FDB3E13),
        MK_64(0xE8359030, 0x1A79A9EB),
        MK_64(0x55AEA061, 0x4F816E6F),
@@ -100,7 +100,7 @@ const u64 SKEIN_512_IV_256[] = {
 };
 
 /* blkSize =  512 bits. hashSize =  384 bits */
-const u64 SKEIN_512_IV_384[] = {
+static const u64 SKEIN_512_IV_384[] = {
        MK_64(0xA3F6C6BF, 0x3A75EF5F),
        MK_64(0xB0FEF9CC, 0xFD84FAA4),
        MK_64(0x9D77DD66, 0x3D770CFE),
@@ -112,7 +112,7 @@ const u64 SKEIN_512_IV_384[] = {
 };
 
 /* blkSize =  512 bits. hashSize =  512 bits */
-const u64 SKEIN_512_IV_512[] = {
+static const u64 SKEIN_512_IV_512[] = {
        MK_64(0x4903ADFF, 0x749C51CE),
        MK_64(0x0D95DE39, 0x9746DF03),
        MK_64(0x8FD19341, 0x27C79BCE),
@@ -124,7 +124,7 @@ const u64 SKEIN_512_IV_512[] = {
 };
 
 /* blkSize = 1024 bits. hashSize =  384 bits */
-const u64 SKEIN_1024_IV_384[] = {
+static const u64 SKEIN_1024_IV_384[] = {
        MK_64(0x5102B6B8, 0xC1894A35),
        MK_64(0xFEEBC9E3, 0xFE8AF11A),
        MK_64(0x0C807F06, 0xE32BED71),
@@ -144,7 +144,7 @@ const u64 SKEIN_1024_IV_384[] = {
 };
 
 /* blkSize = 1024 bits. hashSize =  512 bits */
-const u64 SKEIN_1024_IV_512[] = {
+static const u64 SKEIN_1024_IV_512[] = {
        MK_64(0xCAEC0E5D, 0x7C1B1B18),
        MK_64(0xA01B0E04, 0x5F03E802),
        MK_64(0x33840451, 0xED912885),
@@ -164,7 +164,7 @@ const u64 SKEIN_1024_IV_512[] = {
 };
 
 /* blkSize = 1024 bits. hashSize = 1024 bits */
-const u64 SKEIN_1024_IV_1024[] = {
+static const u64 SKEIN_1024_IV_1024[] = {
        MK_64(0xD593DA07, 0x41E72355),
        MK_64(0x15B5E511, 0xAC73E00C),
        MK_64(0x5180E5AE, 0xBAF2C4F0),
index 48841e7c2f740295afc7b7de1f4801ed8a35c5e1..50ece291fc6aef6040c08a869a0f0f6b353f155e 100644 (file)
@@ -740,9 +740,9 @@ static bool slic_mac_filter(struct adapter *adapter,
                if (opts & MAC_BCAST) {
                        adapter->rcv_broadcasts++;
                        return true;
-               } else {
-                       return false;
                }
+
+               return false;
        }
 
        if (is_multicast_ether_addr(ether_frame->ether_dhost)) {
@@ -763,10 +763,11 @@ static bool slic_mac_filter(struct adapter *adapter,
                                }
                                mcaddr = mcaddr->next;
                        }
-                       return false;
-               } else {
+
                        return false;
                }
+
+               return false;
        }
        if (opts & MAC_DIRECTED) {
                adapter->rcv_unicasts++;
@@ -2714,9 +2715,10 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
                        dev_err(&adapter->pcidev->dev,
                                "Failed to allocate DMA memory for EEPROM.\n");
                        return -ENOMEM;
-               } else {
-                       memset(peeprom, 0, sizeof(struct slic_eeprom));
                }
+
+               memset(peeprom, 0, sizeof(struct slic_eeprom));
+
                slic_reg32_write(&slic_regs->slic_icr, ICR_INT_OFF, FLUSH);
                mdelay(1);
                pshmem = (struct slic_shmem *)(unsigned long)
@@ -2751,11 +2753,11 @@ static int slic_card_init(struct sliccard *card, struct adapter *adapter)
 
                                        slic_upr_request_complete(adapter, 0);
                                        break;
-                               } else {
-                                       adapter->pshmem->isr = 0;
-                                       slic_reg32_write(&slic_regs->slic_isr,
-                                                        0, FLUSH);
                                }
+
+                               adapter->pshmem->isr = 0;
+                               slic_reg32_write(&slic_regs->slic_isr,
+                                                0, FLUSH);
                        } else {
                                mdelay(1);
                                i++;
index 7de79d59a4cdc0efa4882838a51bbbb7535f9726..0cd3cdba86441d2024250c1d506082b5961d2b4b 100644 (file)
@@ -2067,7 +2067,7 @@ speakup_key(struct vc_data *vc, int shift_state, int keycode, u_short keysym,
                        if (up_flag)
                                goto out;
                        if (last_keycode == keycode &&
-                           last_spk_jiffy + MAX_DELAY > jiffies) {
+                           time_after(last_spk_jiffy + MAX_DELAY, jiffies)) {
                                spk_close_press = 1;
                                offset = spk_shift_table[shift_info + 32];
                                /* double press? */
index 16fa3462fbbe851cb971cf41468f0c9c80c1abae..c855992f595088edee625eb4c1b3201eae6864a0 100644 (file)
@@ -486,6 +486,7 @@ int bridge_chnl_get_info(struct chnl_object *chnl_obj,
 {
        int status = 0;
        struct chnl_object *pchnl = (struct chnl_object *)chnl_obj;
+
        if (channel_info != NULL) {
                if (pchnl) {
                        /* Return the requested information: */
index c2829aa7780fb832fb814776c9bb63fb90af4cf8..42f94e157efdcfaa2f14416c1c7b7a6fb937e743 100644 (file)
@@ -249,6 +249,7 @@ int bridge_io_create(struct io_mgr **io_man,
 int bridge_io_destroy(struct io_mgr *hio_mgr)
 {
        int status = 0;
+
        if (hio_mgr) {
                /* Free IO DPC object */
                tasklet_kill(&hio_mgr->dpc_tasklet);
index cb50120ed7b59a1ba531e649e6cbfeef85565f11..f63dd8f4dde9c0504d18888fa59ed085bfd62d23 100644 (file)
@@ -1059,6 +1059,7 @@ static int bridge_brd_mem_copy(struct bridge_dev_context *dev_ctxt,
        u32 total_bytes = ul_num_bytes;
        u8 host_buf[BUFFERSIZE];
        struct bridge_dev_context *dev_context = dev_ctxt;
+
        while (total_bytes > 0 && !status) {
                copy_bytes =
                    total_bytes > BUFFERSIZE ? BUFFERSIZE : total_bytes;
@@ -1096,6 +1097,7 @@ static int bridge_brd_mem_write(struct bridge_dev_context *dev_ctxt,
        struct bridge_dev_context *dev_context = dev_ctxt;
        u32 ul_remain_bytes = 0;
        u32 ul_bytes = 0;
+
        ul_remain_bytes = ul_num_bytes;
        while (ul_remain_bytes > 0 && !status) {
                ul_bytes =
index f53ed98d18c1986cc17a6753b1ed985173fc15eb..28364672c7f8365219b73f2696f9caa8edc3841c 100644 (file)
@@ -176,6 +176,7 @@ int write_dsp_data(struct bridge_dev_context *dev_context,
        struct cfg_hostres *resources = dev_context->resources;
        int status = 0;
        u32 base1, base2, base3;
+
        base1 = OMAP_DSP_MEM1_SIZE;
        base2 = OMAP_DSP_MEM2_BASE - OMAP_DSP_MEM1_BASE;
        base3 = OMAP_DSP_MEM3_BASE - OMAP_DSP_MEM1_BASE;
@@ -229,6 +230,7 @@ int write_ext_dsp_data(struct bridge_dev_context *dev_context,
        u32 ul_shm_offset_virt = 0;
        struct cfg_hostres *host_res = dev_context->resources;
        bool trace_load = false;
+
        temp_byte1 = 0x0;
        temp_byte2 = 0x0;
 
index c7ee467f0f12aaf88d63b3931cd9b04413ba53e7..b19f887dfd889415605eb4df112fcfd55f5d48ab 100644 (file)
@@ -33,6 +33,7 @@ static struct dsp_wdt_setting dsp_wdt;
 void dsp_wdt_dpc(unsigned long data)
 {
        struct deh_mgr *deh_mgr;
+
        dev_get_deh_mgr(dev_get_first(), &deh_mgr);
        if (deh_mgr)
                bridge_deh_notify(deh_mgr, DSP_WDTOVERFLOW, 0);
index 9d54744805b88a6ea9a3dba376685800996c34dd..83f2106ff8a7ef805a2a7c620777570346dd820f 100644 (file)
@@ -160,6 +160,7 @@ int dynamic_load_module(struct dynamic_loader_stream *module,
                if (!dl_state.dload_errcount) {
                        /* fix up entry point address */
                        unsigned sref = dl_state.dfile_hdr.df_entry_secn - 1;
+
                        if (sref < dl_state.allocated_secn_count)
                                dl_state.dfile_hdr.df_entrypt +=
                                    dl_state.ldr_sections[sref].run_addr;
@@ -269,6 +270,7 @@ dynamic_open_module(struct dynamic_loader_stream *module,
                if (!dl_state.dload_errcount) {
                        /* fix up entry point address */
                        unsigned sref = dl_state.dfile_hdr.df_entry_secn - 1;
+
                        if (sref < dl_state.allocated_secn_count)
                                dl_state.dfile_hdr.df_entrypt +=
                                    dl_state.ldr_sections[sref].run_addr;
@@ -476,6 +478,7 @@ static void allocate_sections(struct dload_state *dlthis)
        struct doff_scnhdr_t *shp;
        struct ldr_section_info *asecs;
        struct my_handle *hndl;
+
        nsecs = dlthis->dfile_hdr.df_no_scns;
        if (!nsecs)
                return;
@@ -1089,6 +1092,7 @@ static int relocate_packet(struct dload_state *dlthis,
                unsigned rinbuf;
                int siz;
                struct reloc_record_t *rp, rrec[MY_RELOC_BUF_SIZ];
+
                rp = rrec;
                rinbuf = rnum > MY_RELOC_BUF_SIZ ? MY_RELOC_BUF_SIZ : rnum;
                siz = rinbuf * sizeof(struct reloc_record_t);
@@ -1502,6 +1506,7 @@ static void swap_words(void *data, unsigned siz, unsigned bitmap)
        sp = (u16 *) data;
        do {
                register u16 tmp;
+
                tmp = *sp;
                *sp++ = SWAP16BY8(tmp);
        } while ((i -= 1) > 0);
@@ -1543,6 +1548,7 @@ static char *copy_tgt_strings(void *dstp, void *srcp, unsigned charcount)
        register tgt_au_t *src = (tgt_au_t *) srcp;
        register tgt_au_t *dst = (tgt_au_t *) dstp;
        register int cnt = charcount;
+
        do {
 #if TARGET_AU_BITS <= BITS_PER_AU
                /* byte-swapping issues may exist for strings on target */
@@ -1598,6 +1604,7 @@ static void init_module_handle(struct dload_state *dlthis)
        struct modules_header mhdr;
        struct ldr_section_info dllview_info;
        struct dynload_symbol *debug_mirror_sym;
+
        hndl = dlthis->myhandle;
        if (!hndl)
                return;         /* must be errors detected, so forget it */
index 463abdb6392f92413b4126aa8b00c473a806b167..bb422b6932904e1e2cb5b1dfea4aa8fcc61cebb2 100644 (file)
@@ -135,6 +135,7 @@ int dload_repack(struct dload_state *dlthis, rvalue val, tgt_au_t *data,
         */
        if (sgn) {
                unsigned tmp = (val >> fieldsz) + (sgn & 0x1);
+
                if (tmp > ovf_limit[sgn - 1])
                        return 1;
        }
@@ -403,6 +404,7 @@ void dload_relocate(struct dload_state *dlthis, tgt_au_t *data,
        case RACT_C6BASE:
                if (dlthis->bss_run_base == 0) {
                        struct dynload_symbol *symp;
+
                        symp = dlthis->mysym->find_matching_symbol
                            (dlthis->mysym, bsssymbol);
                        /* lookup value of global BSS base */
index 30e0aa0540de4107e4d2a0d9df646080c5cb0821..a19e07809ff62c9511011c795fd63b62554fbe6b 100644 (file)
@@ -130,7 +130,7 @@ typedef s32(*dbll_seek_fxn) (void *, long, int);
  *      FALSE:          Failed to find symbol.
  */
 typedef bool(*dbll_sym_lookup) (void *handle, void *parg, void *rmm_handle,
-                               const char *name, struct dbll_sym_val ** sym);
+                               const char *name, struct dbll_sym_val **sym);
 
 /*
  *  ======== dbll_tell_fxn ========
@@ -168,11 +168,11 @@ struct dbll_attrs {
         *  These file manipulation functions should be compatible with the
         *  "C" run time library functions of the same name.
         */
-        s32(*fread) (void *, size_t, size_t, void *);
-        s32(*fseek) (void *, long, int);
-        s32(*ftell) (void *);
-        s32(*fclose) (void *);
-       void *(*fopen) (const char *, const char *);
+        s32 (*fread)(void *ptr, size_t size, size_t count, void *filp);
+        s32 (*fseek)(void *filp, long offset, int origin);
+        s32 (*ftell)(void *filp);
+        s32 (*fclose)(void *filp);
+        void *(*fopen)(const char *path, const char *mode);
 };
 
 /*
@@ -309,7 +309,7 @@ typedef bool(*dbll_get_c_addr_fxn) (struct dbll_library_obj *lib, char *name,
  *  Ensures:
  */
 typedef int(*dbll_get_sect_fxn) (struct dbll_library_obj *lib,
-                                       char *name, u32 * addr, u32 * size);
+                                       char *name, u32 *addr, u32 *size);
 
 /*
  *  ======== dbll_init ========
index 4bd8686f2355e82821a2497eaf81a74f3593cef2..e03c32679aa50c469a70aeb629cfad2b9c0c7266 100644 (file)
@@ -75,6 +75,7 @@ int chnl_create(struct chnl_mgr **channel_mgr,
 
        if (!status) {
                struct bridge_drv_interface *intf_fxns;
+
                dev_get_intf_fxns(hdev_obj, &intf_fxns);
                /* Let Bridge channel module finish the create: */
                status = (*intf_fxns->chnl_create) (&hchnl_mgr, hdev_obj,
index b7d5c8cbb2a1e026cfc65604bccc745fc828f129..c4ccf17d21c09b2eb62c06abf8badac2020e8fa7 100644 (file)
@@ -340,23 +340,23 @@ int api_init_complete2(void)
 u32 mgrwrap_enum_node_info(union trapped_args *args, void *pr_ctxt)
 {
        u8 *pndb_props;
-       u32 num_nodes;
-       int status = 0;
+       u32 num_nodes = 0;
+       int status;
        u32 size = args->args_mgr_enumnode_info.ndb_props_size;
 
        if (size < sizeof(struct dsp_ndbprops))
                return -EINVAL;
+       size = sizeof(struct dsp_ndbprops);
 
        pndb_props = kmalloc(size, GFP_KERNEL);
        if (pndb_props == NULL)
-               status = -ENOMEM;
+               return -ENOMEM;
+
+       status =
+           mgr_enum_node_info(args->args_mgr_enumnode_info.node_id,
+                              (struct dsp_ndbprops *)pndb_props, size,
+                              &num_nodes);
 
-       if (!status) {
-               status =
-                   mgr_enum_node_info(args->args_mgr_enumnode_info.node_id,
-                                      (struct dsp_ndbprops *)pndb_props, size,
-                                      &num_nodes);
-       }
        CP_TO_USR(args->args_mgr_enumnode_info.ndb_props, pndb_props, status,
                  size);
        CP_TO_USR(args->args_mgr_enumnode_info.num_nodes, &num_nodes, status,
@@ -372,24 +372,26 @@ u32 mgrwrap_enum_node_info(union trapped_args *args, void *pr_ctxt)
 u32 mgrwrap_enum_proc_info(union trapped_args *args, void *pr_ctxt)
 {
        u8 *processor_info;
-       u8 num_procs;
-       int status = 0;
+       u8 num_procs = 0;
+       int status;
        u32 size = args->args_mgr_enumproc_info.processor_info_size;
 
        if (size < sizeof(struct dsp_processorinfo))
                return -EINVAL;
 
-       processor_info = kmalloc(size, GFP_KERNEL);
+       if (size > sizeof(struct mgr_processorextinfo))
+               size = sizeof(struct mgr_processorextinfo);
+
+       processor_info = kzalloc(size, GFP_KERNEL);
        if (processor_info == NULL)
-               status = -ENOMEM;
+               return -ENOMEM;
+
+       status =
+           mgr_enum_processor_info(args->args_mgr_enumproc_info.
+                                   processor_id,
+                                   (struct dsp_processorinfo *)
+                                   processor_info, size, &num_procs);
 
-       if (!status) {
-               status =
-                   mgr_enum_processor_info(args->args_mgr_enumproc_info.
-                                           processor_id,
-                                           (struct dsp_processorinfo *)
-                                           processor_info, size, &num_procs);
-       }
        CP_TO_USR(args->args_mgr_enumproc_info.processor_info, processor_info,
                  status, size);
        CP_TO_USR(args->args_mgr_enumproc_info.num_procs, &num_procs,
@@ -475,11 +477,11 @@ u32 mgrwrap_wait_for_bridge_events(union trapped_args *args, void *pr_ctxt)
        int status = 0;
        struct dsp_notification *anotifications[MAX_EVENTS];
        struct dsp_notification notifications[MAX_EVENTS];
-       u32 index, i;
+       u32 index = 0, i;
        u32 count = args->args_mgr_wait.count;
 
        if (count > MAX_EVENTS)
-               status = -EINVAL;
+               return -EINVAL;
 
        /* get the array of pointers to user structures */
        CP_FM_USR(anotifications, args->args_mgr_wait.anotifications,
@@ -487,19 +489,15 @@ u32 mgrwrap_wait_for_bridge_events(union trapped_args *args, void *pr_ctxt)
        /* get the events */
        for (i = 0; i < count; i++) {
                CP_FM_USR(&notifications[i], anotifications[i], status, 1);
-               if (status || !notifications[i].handle) {
-                       status = -EINVAL;
-                       break;
-               }
+               if (status || !notifications[i].handle)
+                       return -EINVAL;
                /* set the array of pointers to kernel structures */
                anotifications[i] = &notifications[i];
        }
-       if (!status) {
-               status = mgr_wait_for_bridge_events(anotifications, count,
-                                                        &index,
-                                                        args->args_mgr_wait.
-                                                        timeout);
-       }
+       status = mgr_wait_for_bridge_events(anotifications, count,
+                                                &index,
+                                                args->args_mgr_wait.
+                                                timeout);
        CP_TO_USR(args->args_mgr_wait.index, &index, status, 1);
        return status;
 }
@@ -1755,7 +1753,7 @@ u32 strmwrap_register_notify(union trapped_args *args, void *pr_ctxt)
  */
 u32 strmwrap_select(union trapped_args *args, void *pr_ctxt)
 {
-       u32 mask;
+       u32 mask = 0;
        struct strm_object *strm_tab[MAX_STREAMS];
        int status = 0;
        struct strm_res_object *strm_res;
index 2ae48c9a936213dc0868d0f2baa682060b12a309..c91d1d7d08840f76697a2f39591dd1c8af6eb1e1 100644 (file)
@@ -489,6 +489,7 @@ int dcd_get_object_def(struct dcd_manager *hdcd_mgr,
        strncpy(sz_sect_name, ".", 2);
        do {
                char *uuid = strsep(&tmp, "-");
+
                if (!uuid)
                        break;
                len -= strlen(uuid);
index 74d31dabe83235942e93115a8614fd839e03b15f..e3918d2efa17a1b796464eb75d07fe34d2e3a82a 100644 (file)
@@ -351,6 +351,7 @@ static void bridge_recover(struct work_struct *work)
 {
        struct dev_object *dev;
        struct cfg_devnode *dev_node;
+
        if (atomic_read(&bridge_cref)) {
                reinit_completion(&bridge_comp);
                while (!wait_for_completion_timeout(&bridge_comp,
@@ -638,6 +639,7 @@ int drv_remove_all_resources(void *process_ctxt)
 {
        int status = 0;
        struct process_context *ctxt = (struct process_context *)process_ctxt;
+
        drv_remove_all_strm_res_elements(ctxt);
        drv_remove_all_node_res_elements(ctxt);
        drv_remove_all_dmm_res_elements(ctxt);
index 5ac507ccd19d6aac6282d658317ef748e553f056..900585ab059a65fd1ae2ff56fab8d7ae0699ad4c 100644 (file)
@@ -1542,6 +1542,7 @@ static int remote_alloc(void **ref, u16 mem_sect, u32 size,
        struct rmm_addr *rmm_addr_obj = (struct rmm_addr *)dsp_address;
        bool mem_load_req = false;
        int status = -ENOMEM;   /* Set to fail */
+
        nldr_obj = hnode->nldr_obj;
        rmm = nldr_obj->rmm;
        /* Convert size to DSP words */
index 9d3044a384eeb4b882cc1cd24cb8cf26e86082a8..133f2dbc37623662262df5fc978918c9cd526b2d 100644 (file)
@@ -273,6 +273,7 @@ static struct node_ldr_fxns nldr_fxns = {
 enum node_state node_get_state(void *hnode)
 {
        struct node_object *pnode = (struct node_object *)hnode;
+
        if (!pnode)
                return -1;
        return pnode->node_state;
@@ -2365,6 +2366,7 @@ static void delete_node(struct node_object *hnode,
            (struct proc_object *)hnode->processor;
 #endif
        int status;
+
        if (!hnode)
                goto func_end;
        hnode_mgr = hnode->node_mgr;
index cd5235a4f77c855a183cae9dca8437d97010a4ca..23e5146989b18d42f73658715517c52027d44180 100644 (file)
@@ -200,6 +200,7 @@ static struct dmm_map_object *find_containing_mapping(
                                u32 mpu_addr, u32 size)
 {
        struct dmm_map_object *map_obj;
+
        pr_debug("%s: looking for mpu_addr 0x%x size 0x%x\n", __func__,
                                                mpu_addr, size);
 
@@ -985,6 +986,7 @@ int proc_get_state(void *hprocessor,
 int proc_get_trace(void *hprocessor, u8 *pbuf, u32 max_size)
 {
        int status;
+
        status = -ENOSYS;
        return status;
 }
@@ -1737,6 +1739,7 @@ static int proc_monitor(struct proc_object *proc_obj)
 static s32 get_envp_count(char **envp)
 {
        s32 ret = 0;
+
        if (envp) {
                while (*envp++)
                        ret++;
index 6bae2afbaa1533f924ff51a852d0d4be90a71117..ac080c9dcf46b8c8edb6823e1f3088f05c05145b 100644 (file)
@@ -3,7 +3,7 @@
 #
 menuconfig UNISYSSPAR
        bool "Unisys SPAR driver support"
-       depends on X86_64 && BROKEN
+       depends on X86_64
        ---help---
        Support for the Unisys SPAR drivers
 
index e60b0aef4dcde8f4b907e900757585b3b7489087..adc18420603531ac0476a7b25a5b0015beef746b 100644 (file)
@@ -9,5 +9,3 @@ visorchannelstub-y := channel.o chanstub.o
 ccflags-y += -Idrivers/staging/unisys/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
-
index efc4005368b0418185be0e0b0232272a57049ea7..b4b479496069717eeeb04b1e2c2358b88b7a1fbb 100644 (file)
@@ -168,15 +168,15 @@ do {                                                                      \
 
 /* MOST COMMON */
 #define POSTCODE_LINUX_2(EVENT_PC, severity)                           \
-       POSTCODE_LINUX_A(CURRENT_FILE_PC, EVENT_PC, 0x0000, severity);
+       POSTCODE_LINUX_A(CURRENT_FILE_PC, EVENT_PC, 0x0000, severity)
 
 #define POSTCODE_LINUX_3(EVENT_PC, pc32bit, severity)                  \
-       POSTCODE_LINUX_A(CURRENT_FILE_PC, EVENT_PC, pc32bit, severity);
+       POSTCODE_LINUX_A(CURRENT_FILE_PC, EVENT_PC, pc32bit, severity)
 
 
 #define POSTCODE_LINUX_4(EVENT_PC, pc16bit1, pc16bit2, severity)       \
        POSTCODE_LINUX_B(CURRENT_FILE_PC, EVENT_PC, pc16bit1,           \
-                        pc16bit2, severity);
+                        pc16bit2, severity)
 
 #endif
 #endif
index 93e35f039ded224050ac6e81b5279fcd07180d6a..ed943759634acd9678c7e280563e5a772f0320d4 100644 (file)
@@ -28,8 +28,7 @@
 static inline void
 BusDeviceInfo_Init(ULTRA_VBUS_DEVICEINFO *pBusDeviceInfo,
                   const char *deviceType, const char *driverName,
-                  const char *ver, const char *verTag,
-                  const char *buildDate, const char *buildTime)
+                  const char *ver, const char *verTag)
 {
        memset(pBusDeviceInfo, 0, sizeof(ULTRA_VBUS_DEVICEINFO));
        snprintf(pBusDeviceInfo->devType, sizeof(pBusDeviceInfo->devType),
@@ -37,11 +36,10 @@ BusDeviceInfo_Init(ULTRA_VBUS_DEVICEINFO *pBusDeviceInfo,
        snprintf(pBusDeviceInfo->drvName, sizeof(pBusDeviceInfo->drvName),
                 "%s", (driverName) ? driverName : "unknownDriver");
        snprintf(pBusDeviceInfo->infoStrings,
-                sizeof(pBusDeviceInfo->infoStrings), "%s\t%s\t%s %s\t%s",
+                sizeof(pBusDeviceInfo->infoStrings), "%s\t%s\t%s",
                 (ver) ? ver : "unknownVer",
                 (verTag) ? verTag : "unknownVerTag",
-                (buildDate) ? buildDate : "noBuildDate",
-                (buildTime) ? buildTime : "nobuildTime", TARGET_HOSTNAME);
+                TARGET_HOSTNAME);
 }
 
 #endif
index 6e44d49458f5fd8d3146bd6b5b755f3884fb9284..08e620d1749792feff77f39616f5b4872793b965 100644 (file)
@@ -12,6 +12,3 @@ ccflags-y += -Idrivers/staging/unisys/visorchipset
 ccflags-y += -Idrivers/staging/unisys/sparstopdriver
 ccflags-y += -Idrivers/staging/unisys/common-spar/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
-
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
-
index 0f1bb739975e4f202559244c66565871e488a5f1..07e5535fc34093de1402bd51e053c657e0ac3879 100644 (file)
@@ -96,9 +96,8 @@ uisctrl_register_req_handler(int type, void *fptr,
                return 0;
        }
        if (chipset_DriverInfo)
-               BusDeviceInfo_Init(chipset_DriverInfo,
-                                  "chipset", "uislib",
-                                  VERSION, NULL, __DATE__, __TIME__);
+               BusDeviceInfo_Init(chipset_DriverInfo, "chipset", "uislib",
+                                  VERSION, NULL);
 
        return 1;
 }
@@ -149,10 +148,8 @@ uisctrl_register_req_handler_ex(uuid_le switchTypeGuid,
 Away:
        if (rc) {
                if (chipset_DriverInfo)
-                       BusDeviceInfo_Init(chipset_DriverInfo,
-                                          "chipset", "uislib",
-                                          VERSION, NULL,
-                                          __DATE__, __TIME__);
+                       BusDeviceInfo_Init(chipset_DriverInfo, "chipset",
+                                          "uislib", VERSION, NULL);
        } else
                LOGERR("failed to register type %pUL.\n", &switchTypeGuid);
 
index 632b1c08b9753e6ca5ea0cebed15f9d45c39d9ee..ba55ae12488e021d6a5ff5734c9f9a1afa8a88e0 100644 (file)
@@ -11,6 +11,3 @@ ccflags-y += -Idrivers/staging/unisys/visorchipset
 ccflags-y += -Idrivers/staging/unisys/virtpci
 ccflags-y += -Idrivers/staging/unisys/common-spar/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
-
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
-
index 5c5aa700176752b48a8704865cb61b4d7f73e171..4d1347ad6527d2c1fbc5b2196ab0d33ef28c7c03 100644 (file)
@@ -139,8 +139,6 @@ static struct virtpci_driver virthba_driver = {
        .name = "uisvirthba",
        .version = VERSION,
        .vertag = NULL,
-       .build_date = __DATE__,
-       .build_time = __TIME__,
        .id_table = virthba_id_table,
        .probe = virthba_probe,
        .remove = virthba_remove,
@@ -1413,9 +1411,6 @@ info_proc_read(struct file *file, char __user *buf, size_t len, loff_t *offset)
                length += sprintf(vbuf + length, "\nvirthba result queue poll wait:%d usecs.\n",
                                  rsltq_wait_usecs);
 
-               length += sprintf(vbuf + length,
-                                 "\nModule build: Date:%s Time:%s\n",
-                                 __DATE__, __TIME__);
                length += sprintf(vbuf + length, "\ninterrupts_rcvd = %llu, interrupts_disabled = %llu\n",
                                  virthbainfo->interrupts_rcvd,
                                  virthbainfo->interrupts_disabled);
index f9399aabddd1aa1491fce0735088da535bed3dc1..a26c696219a50c519673bc025462cade82ceb0fe 100644 (file)
@@ -8,6 +8,3 @@ ccflags-y += -Idrivers/staging/unisys/include
 ccflags-y += -Idrivers/staging/unisys/uislib
 ccflags-y += -Idrivers/staging/unisys/common-spar/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
-
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
-
index 71246feb154fc03559fce8352db03f033a29032b..5ab17e76c8047d80884df4fd5616c69d627cc979 100644 (file)
@@ -794,8 +794,7 @@ static void fix_vbus_devInfo(struct device *dev, int devNo, int devType,
        BusDeviceInfo_Init(&devInfo, stype,
                           virtpcidrv->name,
                           virtpcidrv->version,
-                          virtpcidrv->vertag,
-                          virtpcidrv->build_date, virtpcidrv->build_time);
+                          virtpcidrv->vertag);
        write_vbus_devInfo(pChan, &devInfo, devNo);
 
        /* Re-write bus+chipset info, because it is possible that this
@@ -1480,10 +1479,6 @@ static ssize_t info_proc_read(struct file *file, char __user *buf,
        }
        read_unlock_irqrestore(&VpcidevListLock, flags);
 
-       length +=
-           sprintf(vbuf + length, "\nModule build: Date:%s Time:%s\n", __DATE__,
-                   __TIME__);
-
        length += sprintf(vbuf + length, "\n");
        if (copy_to_user(buf, vbuf, length)) {
                kfree(vbuf);
@@ -1686,8 +1681,6 @@ static int __init virtpci_mod_init(void)
        if (!unisys_spar_platform)
                return -ENODEV;
 
-       LOGINF("Module build: Date:%s Time:%s...\n", __DATE__, __TIME__);
-
        POSTCODE_LINUX_2(VPCI_CREATE_ENTRY_PC, POSTCODE_SEVERITY_INFO);
 
        ret = bus_register(&virtpci_bus_type);
@@ -1701,9 +1694,8 @@ static int __init virtpci_mod_init(void)
                return ret;
        }
        DBGINF("bus_register successful\n");
-       BusDeviceInfo_Init(&Bus_DriverInfo,
-                          "clientbus", "virtpci",
-                          VERSION, NULL, __DATE__, __TIME__);
+       BusDeviceInfo_Init(&Bus_DriverInfo, "clientbus", "virtpci",
+                          VERSION, NULL);
 
        /* create a root bus used to parent all the virtpci buses. */
        ret = device_register(&virtpci_rootbus_device);
index f7be17b669c4004e8e55d8fb6b97d969633a6961..7539fcb30d38317a7376cb73b2b4679928705aa1 100644 (file)
@@ -77,8 +77,6 @@ struct virtpci_driver {
        const char *name;       /* the name of the driver in sysfs */
        const char *version;
        const char *vertag;
-       const char *build_date;
-       const char *build_time;
        const struct pci_device_id *id_table;   /* must be non-NULL for probe
                                                 * to be called */
        int (*probe)(struct virtpci_dev *dev,
index f0060be55bc56cd36a448119e18784fadbfa3ffa..e079c96b1cdf8deb6fbbbf8e124593abbf851e2a 100644 (file)
@@ -10,5 +10,3 @@ ccflags-y += -Idrivers/staging/unisys/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
 ccflags-y += -Idrivers/staging/unisys/visorutil
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
-
index ead4b9c0271527bd66e3d722f4c1a3a3d66d3839..5071878e57daf012c8552a089133bdb7ca022421 100644 (file)
@@ -14,5 +14,3 @@ ccflags-y += -Idrivers/staging/unisys/common-spar/include
 ccflags-y += -Idrivers/staging/unisys/common-spar/include/channels
 ccflags-y += -Idrivers/staging/unisys/visorutil
 ccflags-y += -Iinclude/generated
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
-
index 0a602b9c130b854775785a203b53ee990d11d269..f89712849d72dce91b19ddaef681e0a64b76a59a 100644 (file)
@@ -569,7 +569,7 @@ visorchipset_register_busdev_server(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
                *responders = BusDev_Responders;
        if (driverInfo)
                BusDeviceInfo_Init(driverInfo, "chipset", "visorchipset",
-                                  VERSION, NULL, __DATE__, __TIME__);
+                                  VERSION, NULL);
 
        UNLOCKSEM(&NotifierLock);
 }
@@ -593,7 +593,7 @@ visorchipset_register_busdev_client(VISORCHIPSET_BUSDEV_NOTIFIERS *notifiers,
                *responders = BusDev_Responders;
        if (driverInfo)
                BusDeviceInfo_Init(driverInfo, "chipset(bolts)", "visorchipset",
-                                  VERSION, NULL, __DATE__, __TIME__);
+                                  VERSION, NULL);
        UNLOCKSEM(&NotifierLock);
 }
 EXPORT_SYMBOL_GPL(visorchipset_register_busdev_client);
index 3f463888dcec6e80a65adc099e177f81ddde86e4..d871bbb78cef420118a7ca5fece80e43bb00f008 100644 (file)
@@ -8,4 +8,3 @@ visorutil-y := charqueue.o  easyproc.o  periodic_work.o  procobjecttree.o  \
                memregion_direct.o visorkmodutils.o
 
 ccflags-y += -Idrivers/staging/unisys/include
-ccflags-y += -DCONFIG_SPAR_GUEST -DGUESTDRIVERBUILD -DNOAUTOVERSION
index 92caef7474c7d7286486ae880876ab405fccf42f..bef08d5c44e8d9a648d673e11b331ed9e3569b9b 100644 (file)
@@ -47,7 +47,8 @@ static int32_t read_attr_usbip_status(struct usbip_usb_device *udev)
        snprintf(status_attr_path, SYSFS_PATH_MAX, "%s/usbip_status",
                 udev->path);
 
-       if ((fd = open(status_attr_path, O_RDONLY)) < 0) {
+       fd = open(status_attr_path, O_RDONLY);
+       if (fd < 0) {
                err("error opening attribute %s", status_attr_path);
                return -1;
        }
@@ -87,8 +88,8 @@ struct usbip_exported_device *usbip_exported_device_new(const char *sdevpath)
                goto err;
 
        /* reallocate buffer to include usb interface data */
-       size = sizeof(struct usbip_exported_device) + edev->udev.bNumInterfaces *
-               sizeof(struct usbip_usb_interface);
+       size = sizeof(struct usbip_exported_device) +
+               edev->udev.bNumInterfaces * sizeof(struct usbip_usb_interface);
 
        edev_old = edev;
        edev = realloc(edev, size);
index 0007d30e45bd2ac408478b91d0188d6024a8cd6b..e21c1b4d09ed5b3330e84183b10ee068ee9b5443 100644 (file)
@@ -304,7 +304,7 @@ static int vhci_hub_control(struct usb_hcd *hcd, u16 typeReq, u16 wValue,
                break;
        case GetHubStatus:
                usbip_dbg_vhci_rh(" GetHubStatus\n");
-               *(__le32 *) buf = __constant_cpu_to_le32(0);
+               *(__le32 *) buf = cpu_to_le32(0);
                break;
        case GetPortStatus:
                usbip_dbg_vhci_rh(" GetPortStatus port %x\n", wIndex);
index 6f95fb618dc30ac2766d7e402ff5ee2b1f5cba20..490ca966b017c02080525c6af0aa09cd58716dc0 100644 (file)
@@ -57,7 +57,7 @@
 #include "rf.h"
 
 /*---------------------  Static Definitions -------------------------*/
-//static int          msglevel                =MSG_LEVEL_DEBUG;
+/* static int          msglevel                =MSG_LEVEL_DEBUG; */
 static int msglevel = MSG_LEVEL_INFO;
 
 /*---------------------  Static Classes  ----------------------------*/
@@ -785,7 +785,7 @@ unsigned char byVT3253B0_RFMD[CB_VT3253B0_INIT_FOR_RFMD][2] = {
 };
 
 #define CB_VT3253B0_AGC_FOR_RFMD2959 195
-// For RFMD2959
+/* For RFMD2959 */
 unsigned char byVT3253B0_AGC4_RFMD2959[CB_VT3253B0_AGC_FOR_RFMD2959][2] = {
        {0xF0, 0x00},
        {0xF1, 0x3E},
@@ -985,7 +985,7 @@ unsigned char byVT3253B0_AGC4_RFMD2959[CB_VT3253B0_AGC_FOR_RFMD2959][2] = {
 };
 
 #define CB_VT3253B0_INIT_FOR_AIROHA2230 256
-// For AIROHA
+/* For AIROHA */
 unsigned char byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = {
        {0x00, 0x31},
        {0x01, 0x00},
@@ -1095,7 +1095,7 @@ unsigned char byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = {
        {0x69, 0x00},
        {0x6a, 0x00},
        {0x6b, 0x00},
-       {0x6c, 0x00}, //RobertYu:20050125, request by JJSue
+       {0x6c, 0x00}, /* RobertYu:20050125, request by JJSue */
        {0x6d, 0x03},
        {0x6e, 0x01},
        {0x6f, 0x00},
@@ -1246,7 +1246,7 @@ unsigned char byVT3253B0_AIROHA2230[CB_VT3253B0_INIT_FOR_AIROHA2230][2] = {
 };
 
 #define CB_VT3253B0_INIT_FOR_UW2451 256
-//For UW2451
+/* For UW2451 */
 unsigned char byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = {
        {0x00, 0x31},
        {0x01, 0x00},
@@ -1356,7 +1356,7 @@ unsigned char byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = {
        {0x69, 0x00},
        {0x6a, 0x00},
        {0x6b, 0x00},
-       {0x6c, 0x00}, //RobertYu:20050125, request by JJSue
+       {0x6c, 0x00}, /* RobertYu:20050125, request by JJSue */
        {0x6d, 0x03},
        {0x6e, 0x01},
        {0x6f, 0x00},
@@ -1507,7 +1507,7 @@ unsigned char byVT3253B0_UW2451[CB_VT3253B0_INIT_FOR_UW2451][2] = {
 };
 
 #define CB_VT3253B0_AGC 193
-// For AIROHA
+/* For AIROHA */
 unsigned char byVT3253B0_AGC[CB_VT3253B0_AGC][2] = {
        {0xF0, 0x00},
        {0xF1, 0x00},
@@ -1783,29 +1783,29 @@ BBuGetFrameTime(
 
        uRate = (unsigned int)awcFrameTime[uRateIdx];
 
-       if (uRateIdx <= 3) {          //CCK mode
-               if (byPreambleType == 1) //Short
+       if (uRateIdx <= 3) {          /* CCK mode */
+               if (byPreambleType == 1) /* Short */
                        uPreamble = 96;
                else
                        uPreamble = 192;
 
-               uFrameTime = (cbFrameLength * 80) / uRate;  //?????
+               uFrameTime = (cbFrameLength * 80) / uRate;  /* ????? */
                uTmp = (uFrameTime * uRate) / 80;
                if (cbFrameLength != uTmp)
                        uFrameTime++;
 
                return uPreamble + uFrameTime;
        } else {
-               uFrameTime = (cbFrameLength * 8 + 22) / uRate;   //????????
+               uFrameTime = (cbFrameLength * 8 + 22) / uRate; /* ???????? */
                uTmp = ((uFrameTime * uRate) - 22) / 8;
                if (cbFrameLength != uTmp)
                        uFrameTime++;
 
-               uFrameTime = uFrameTime * 4;    //???????
+               uFrameTime = uFrameTime * 4;    /* ??????? */
                if (byPktType != PK_TYPE_11A)
-                       uFrameTime += 6;     //??????
+                       uFrameTime += 6;     /* ?????? */
 
-               return 20 + uFrameTime; //??????
+               return 20 + uFrameTime; /* ?????? */
        }
 }
 
@@ -1856,7 +1856,7 @@ BBvCalculateParameter(
                cbUsCount = cbBitCount / 2;
                if (byPreambleType == 1)
                        *pbyPhySgn = 0x09;
-               else // long preamble
+               else /* long preamble */
                        *pbyPhySgn = 0x01;
                break;
 
@@ -1869,7 +1869,7 @@ BBvCalculateParameter(
                        cbUsCount++;
                if (byPreambleType == 1)
                        *pbyPhySgn = 0x0a;
-               else // long preamble
+               else /* long preamble */
                        *pbyPhySgn = 0x02;
                break;
 
@@ -1886,79 +1886,79 @@ BBvCalculateParameter(
                }
                if (byPreambleType == 1)
                        *pbyPhySgn = 0x0b;
-               else // long preamble
+               else /* long preamble */
                        *pbyPhySgn = 0x03;
                break;
 
        case RATE_6M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9B; //1001 1011
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8B; //1000 1011
+               if (byPacketType == PK_TYPE_11A) { /*11a, 5GHZ */
+                       *pbyPhySgn = 0x9B; /* 1001 1011 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8B; /* 1000 1011 */
                }
                break;
 
        case RATE_9M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9F; //1001 1111
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8F; //1000 1111
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x9F; /* 1001 1111 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8F; /* 1000 1111 */
                }
                break;
 
        case RATE_12M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9A; //1001 1010
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8A; //1000 1010
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x9A; /* 1001 1010 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8A; /* 1000 1010 */
                }
                break;
 
        case RATE_18M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9E; //1001 1110
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8E; //1000 1110
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x9E; /* 1001 1110 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8E; /* 1000 1110 */
                }
                break;
 
        case RATE_24M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x99; //1001 1001
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x89; //1000 1001
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x99; /* 1001 1001 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x89; /* 1000 1001 */
                }
                break;
 
        case RATE_36M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9D; //1001 1101
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8D; //1000 1101
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x9D; /* 1001 1101 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8D; /* 1000 1101 */
                }
                break;
 
        case RATE_48M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x98; //1001 1000
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x88; //1000 1000
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x98; /* 1001 1000 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x88; /* 1000 1000 */
                }
                break;
 
        case RATE_54M:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9C; //1001 1100
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8C; //1000 1100
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x9C; /* 1001 1100 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8C; /* 1000 1100 */
                }
                break;
 
        default:
-               if (byPacketType == PK_TYPE_11A) {//11a, 5GHZ
-                       *pbyPhySgn = 0x9C; //1001 1100
-               } else {//11g, 2.4GHZ
-                       *pbyPhySgn = 0x8C; //1000 1100
+               if (byPacketType == PK_TYPE_11A) {/* 11a, 5GHZ */
+                       *pbyPhySgn = 0x9C; /* 1001 1100 */
+               } else {/* 11g, 2.4GHZ */
+                       *pbyPhySgn = 0x8C; /* 1000 1100 */
                }
                break;
        }
@@ -1992,19 +1992,19 @@ bool BBbReadEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned ch
        unsigned short ww;
        unsigned char byValue;
 
-       // BB reg offset
+       /* BB reg offset */
        VNSvOutPortB(dwIoBase + MAC_REG_BBREGADR, byBBAddr);
 
-       // turn on REGR
+       /* turn on REGR */
        MACvRegBitsOn(dwIoBase, MAC_REG_BBREGCTL, BBREGCTL_REGR);
-       // W_MAX_TIMEOUT is the timeout period
+       /* W_MAX_TIMEOUT is the timeout period */
        for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
                VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue);
                if (byValue & BBREGCTL_DONE)
                        break;
        }
 
-       // get BB data
+       /* get BB data */
        VNSvInPortB(dwIoBase + MAC_REG_BBREGDATA, pbyData);
 
        if (ww == W_MAX_TIMEOUT) {
@@ -2034,14 +2034,14 @@ bool BBbWriteEmbedded(unsigned long dwIoBase, unsigned char byBBAddr, unsigned c
        unsigned short ww;
        unsigned char byValue;
 
-       // BB reg offset
+       /* BB reg offset */
        VNSvOutPortB(dwIoBase + MAC_REG_BBREGADR, byBBAddr);
-       // set BB data
+       /* set BB data */
        VNSvOutPortB(dwIoBase + MAC_REG_BBREGDATA, byData);
 
-       // turn on BBREGCTL_REGW
+       /* turn on BBREGCTL_REGW */
        MACvRegBitsOn(dwIoBase, MAC_REG_BBREGCTL, BBREGCTL_REGW);
-       // W_MAX_TIMEOUT is the timeout period
+       /* W_MAX_TIMEOUT is the timeout period */
        for (ww = 0; ww < W_MAX_TIMEOUT; ww++) {
                VNSvInPortB(dwIoBase + MAC_REG_BBREGCTL, &byValue);
                if (byValue & BBREGCTL_DONE)
@@ -2183,22 +2183,22 @@ bool BBbVT3253Init(PSDevice pDevice)
                for (ii = 0; ii < CB_VT3253B0_INIT_FOR_UW2451; ii++)
                        bResult &= BBbWriteEmbedded(dwIoBase, byVT3253B0_UW2451[ii][0], byVT3253B0_UW2451[ii][1]);
 
-               // Init ANT B select,TX Config CR09 = 0x61->0x45, 0x45->0x41(VC1/VC2 define, make the ANT_A, ANT_B inverted)
-               //bResult &= BBbWriteEmbedded(dwIoBase,0x09,0x41);
-               // Init ANT B select,RX Config CR10 = 0x28->0x2A, 0x2A->0x28(VC1/VC2 define, make the ANT_A, ANT_B inverted)
-               //bResult &= BBbWriteEmbedded(dwIoBase,0x0a,0x28);
-               // Select VC1/VC2, CR215 = 0x02->0x06
+               /* Init ANT B select,TX Config CR09 = 0x61->0x45, 0x45->0x41(VC1/VC2 define, make the ANT_A, ANT_B inverted) */
+               /*bResult &= BBbWriteEmbedded(dwIoBase,0x09,0x41);*/
+               /* Init ANT B select,RX Config CR10 = 0x28->0x2A, 0x2A->0x28(VC1/VC2 define, make the ANT_A, ANT_B inverted) */
+               /*bResult &= BBbWriteEmbedded(dwIoBase,0x0a,0x28);*/
+               /* Select VC1/VC2, CR215 = 0x02->0x06 */
                bResult &= BBbWriteEmbedded(dwIoBase, 0xd7, 0x06);
 
-               //{{RobertYu:20050125, request by Jack
+               /* {{RobertYu:20050125, request by Jack */
                bResult &= BBbWriteEmbedded(dwIoBase, 0x90, 0x20);
                bResult &= BBbWriteEmbedded(dwIoBase, 0x97, 0xeb);
-               //}}
+               /* }} */
 
-               //{{RobertYu:20050221, request by Jack
+               /* {{RobertYu:20050221, request by Jack */
                bResult &= BBbWriteEmbedded(dwIoBase, 0xa6, 0x00);
                bResult &= BBbWriteEmbedded(dwIoBase, 0xa8, 0x30);
-               //}}
+               /* }} */
                bResult &= BBbWriteEmbedded(dwIoBase, 0xb0, 0x58);
 
                for (ii = 0; ii < CB_VT3253B0_AGC; ii++)
@@ -2212,7 +2212,7 @@ bool BBbVT3253Init(PSDevice pDevice)
                pDevice->ldBmThreshold[1] = -50;
                pDevice->ldBmThreshold[2] = 0;
                pDevice->ldBmThreshold[3] = 0;
-               //}} RobertYu
+               /* }} RobertYu */
 
        } else if (byRFType == RF_VT3226) {
                for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++)
@@ -2229,22 +2229,22 @@ bool BBbVT3253Init(PSDevice pDevice)
                pDevice->ldBmThreshold[1] = -48;
                pDevice->ldBmThreshold[2] = 0;
                pDevice->ldBmThreshold[3] = 0;
-               // Fix VT3226 DFC system timing issue
+               /* Fix VT3226 DFC system timing issue */
                MACvSetRFLE_LatchBase(dwIoBase);
-               //{{ RobertYu: 20050104
+               /* {{ RobertYu: 20050104 */
        } else if (byRFType == RF_AIROHA7230) {
                for (ii = 0; ii < CB_VT3253B0_INIT_FOR_AIROHA2230; ii++)
                        bResult &= BBbWriteEmbedded(dwIoBase, byVT3253B0_AIROHA2230[ii][0], byVT3253B0_AIROHA2230[ii][1]);
 
 
-               //{{ RobertYu:20050223, request by JerryChung
-               // Init ANT B select,TX Config CR09 = 0x61->0x45, 0x45->0x41(VC1/VC2 define, make the ANT_A, ANT_B inverted)
-               //bResult &= BBbWriteEmbedded(dwIoBase,0x09,0x41);
-               // Init ANT B select,RX Config CR10 = 0x28->0x2A, 0x2A->0x28(VC1/VC2 define, make the ANT_A, ANT_B inverted)
-               //bResult &= BBbWriteEmbedded(dwIoBase,0x0a,0x28);
-               // Select VC1/VC2, CR215 = 0x02->0x06
+               /* {{ RobertYu:20050223, request by JerryChung */
+               /* Init ANT B select,TX Config CR09 = 0x61->0x45, 0x45->0x41(VC1/VC2 define, make the ANT_A, ANT_B inverted) */
+               /*bResult &= BBbWriteEmbedded(dwIoBase,0x09,0x41);*/
+               /* Init ANT B select,RX Config CR10 = 0x28->0x2A, 0x2A->0x28(VC1/VC2 define, make the ANT_A, ANT_B inverted) */
+               /*bResult &= BBbWriteEmbedded(dwIoBase,0x0a,0x28);*/
+               /* Select VC1/VC2, CR215 = 0x02->0x06 */
                bResult &= BBbWriteEmbedded(dwIoBase, 0xd7, 0x06);
-               //}}
+               /* }} */
 
                for (ii = 0; ii < CB_VT3253B0_AGC; ii++)
                        bResult &= BBbWriteEmbedded(dwIoBase, byVT3253B0_AGC[ii][0], byVT3253B0_AGC[ii][1]);
@@ -2257,9 +2257,9 @@ bool BBbVT3253Init(PSDevice pDevice)
                pDevice->ldBmThreshold[1] = -48;
                pDevice->ldBmThreshold[2] = 0;
                pDevice->ldBmThreshold[3] = 0;
-               //}} RobertYu
+               /* }} RobertYu */
        } else {
-               // No VGA Table now
+               /* No VGA Table now */
                pDevice->bUpdateBBVGA = false;
                pDevice->abyBBVGA[0] = 0x1C;
        }
@@ -2314,37 +2314,37 @@ void BBvLoopbackOn(PSDevice pDevice)
        unsigned char byData;
        unsigned long dwIoBase = pDevice->PortOffset;
 
-       //CR C9 = 0x00
-       BBbReadEmbedded(dwIoBase, 0xC9, &pDevice->byBBCRc9);//CR201
+       /* CR C9 = 0x00 */
+       BBbReadEmbedded(dwIoBase, 0xC9, &pDevice->byBBCRc9); /* CR201 */
        BBbWriteEmbedded(dwIoBase, 0xC9, 0);
-       BBbReadEmbedded(dwIoBase, 0x4D, &pDevice->byBBCR4d);//CR77
+       BBbReadEmbedded(dwIoBase, 0x4D, &pDevice->byBBCR4d); /* CR77 */
        BBbWriteEmbedded(dwIoBase, 0x4D, 0x90);
 
-       //CR 88 = 0x02(CCK), 0x03(OFDM)
-       BBbReadEmbedded(dwIoBase, 0x88, &pDevice->byBBCR88);//CR136
-
-       if (pDevice->uConnectionRate <= RATE_11M) { //CCK
-               // Enable internal digital loopback: CR33 |= 0000 0001
-               BBbReadEmbedded(dwIoBase, 0x21, &byData);//CR33
-               BBbWriteEmbedded(dwIoBase, 0x21, (unsigned char)(byData | 0x01));//CR33
-               // CR154 = 0x00
-               BBbWriteEmbedded(dwIoBase, 0x9A, 0);   //CR154
-
-               BBbWriteEmbedded(dwIoBase, 0x88, 0x02);//CR239
-       } else { //OFDM
-               // Enable internal digital loopback:CR154 |= 0000 0001
-               BBbReadEmbedded(dwIoBase, 0x9A, &byData);//CR154
-               BBbWriteEmbedded(dwIoBase, 0x9A, (unsigned char)(byData | 0x01));//CR154
-               // CR33 = 0x00
-               BBbWriteEmbedded(dwIoBase, 0x21, 0);   //CR33
-
-               BBbWriteEmbedded(dwIoBase, 0x88, 0x03);//CR239
+       /* CR 88 = 0x02(CCK), 0x03(OFDM) */
+       BBbReadEmbedded(dwIoBase, 0x88, &pDevice->byBBCR88); /* CR136 */
+
+       if (pDevice->uConnectionRate <= RATE_11M) { /* CCK */
+               /* Enable internal digital loopback: CR33 |= 0000 0001 */
+               BBbReadEmbedded(dwIoBase, 0x21, &byData); /* CR33 */
+               BBbWriteEmbedded(dwIoBase, 0x21, (unsigned char)(byData | 0x01)); /* CR33 */
+               /* CR154 = 0x00 */
+               BBbWriteEmbedded(dwIoBase, 0x9A, 0);    /* CR154 */
+
+               BBbWriteEmbedded(dwIoBase, 0x88, 0x02); /* CR239 */
+       } else { /* OFDM */
+               /* Enable internal digital loopback:CR154 |= 0000 0001 */
+               BBbReadEmbedded(dwIoBase, 0x9A, &byData); /* CR154 */
+               BBbWriteEmbedded(dwIoBase, 0x9A, (unsigned char)(byData | 0x01)); /* CR154 */
+               /* CR33 = 0x00 */
+               BBbWriteEmbedded(dwIoBase, 0x21, 0);    /* CR33 */
+
+               BBbWriteEmbedded(dwIoBase, 0x88, 0x03); /* CR239 */
        }
 
-       //CR14 = 0x00
-       BBbWriteEmbedded(dwIoBase, 0x0E, 0);//CR14
+       /* CR14 = 0x00 */
+       BBbWriteEmbedded(dwIoBase, 0x0E, 0); /* CR14 */
 
-       // Disable TX_IQUN
+       /* Disable TX_IQUN */
        BBbReadEmbedded(pDevice->PortOffset, 0x09, &pDevice->byBBCR09);
        BBbWriteEmbedded(pDevice->PortOffset, 0x09, (unsigned char)(pDevice->byBBCR09 & 0xDE));
 }
@@ -2367,21 +2367,21 @@ void BBvLoopbackOff(PSDevice pDevice)
        unsigned char byData;
        unsigned long dwIoBase = pDevice->PortOffset;
 
-       BBbWriteEmbedded(dwIoBase, 0xC9, pDevice->byBBCRc9);//CR201
-       BBbWriteEmbedded(dwIoBase, 0x88, pDevice->byBBCR88);//CR136
-       BBbWriteEmbedded(dwIoBase, 0x09, pDevice->byBBCR09);//CR136
-       BBbWriteEmbedded(dwIoBase, 0x4D, pDevice->byBBCR4d);//CR77
-
-       if (pDevice->uConnectionRate <= RATE_11M) { // CCK
-               // Set the CR33 Bit2 to disable internal Loopback.
-               BBbReadEmbedded(dwIoBase, 0x21, &byData);//CR33
-               BBbWriteEmbedded(dwIoBase, 0x21, (unsigned char)(byData & 0xFE));//CR33
-       } else { // OFDM
-               BBbReadEmbedded(dwIoBase, 0x9A, &byData);//CR154
-               BBbWriteEmbedded(dwIoBase, 0x9A, (unsigned char)(byData & 0xFE));//CR154
+       BBbWriteEmbedded(dwIoBase, 0xC9, pDevice->byBBCRc9); /* CR201 */
+       BBbWriteEmbedded(dwIoBase, 0x88, pDevice->byBBCR88); /* CR136 */
+       BBbWriteEmbedded(dwIoBase, 0x09, pDevice->byBBCR09); /* CR136 */
+       BBbWriteEmbedded(dwIoBase, 0x4D, pDevice->byBBCR4d); /* CR77  */
+
+       if (pDevice->uConnectionRate <= RATE_11M) { /* CCK */
+               /* Set the CR33 Bit2 to disable internal Loopback. */
+               BBbReadEmbedded(dwIoBase, 0x21, &byData);/* CR33 */
+               BBbWriteEmbedded(dwIoBase, 0x21, (unsigned char)(byData & 0xFE)); /* CR33 */
+       } else { /* OFDM */
+               BBbReadEmbedded(dwIoBase, 0x9A, &byData); /* CR154 */
+               BBbWriteEmbedded(dwIoBase, 0x9A, (unsigned char)(byData & 0xFE)); /* CR154 */
        }
-       BBbReadEmbedded(dwIoBase, 0x0E, &byData);//CR14
-       BBbWriteEmbedded(dwIoBase, 0x0E, (unsigned char)(byData | 0x80));//CR14
+       BBbReadEmbedded(dwIoBase, 0x0E, &byData); /* CR14 */
+       BBbWriteEmbedded(dwIoBase, 0x0E, (unsigned char)(byData | 0x80)); /* CR14 */
 }
 
 /*
@@ -2402,19 +2402,19 @@ BBvSetShortSlotTime(PSDevice pDevice)
        unsigned char byBBRxConf = 0;
        unsigned char byBBVGA = 0;
 
-       BBbReadEmbedded(pDevice->PortOffset, 0x0A, &byBBRxConf);//CR10
+       BBbReadEmbedded(pDevice->PortOffset, 0x0A, &byBBRxConf); /* CR10 */
 
        if (pDevice->bShortSlotTime)
-               byBBRxConf &= 0xDF;//1101 1111
+               byBBRxConf &= 0xDF; /* 1101 1111 */
        else
-               byBBRxConf |= 0x20;//0010 0000
+               byBBRxConf |= 0x20; /* 0010 0000 */
 
-       // patch for 3253B0 Baseband with Cardbus module
+       /* patch for 3253B0 Baseband with Cardbus module */
        BBbReadEmbedded(pDevice->PortOffset, 0xE7, &byBBVGA);
        if (byBBVGA == pDevice->abyBBVGA[0])
-               byBBRxConf |= 0x20;//0010 0000
+               byBBRxConf |= 0x20; /* 0010 0000 */
 
-       BBbWriteEmbedded(pDevice->PortOffset, 0x0A, byBBRxConf);//CR10
+       BBbWriteEmbedded(pDevice->PortOffset, 0x0A, byBBRxConf); /* CR10 */
 }
 
 void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData)
@@ -2423,16 +2423,16 @@ void BBvSetVGAGainOffset(PSDevice pDevice, unsigned char byData)
 
        BBbWriteEmbedded(pDevice->PortOffset, 0xE7, byData);
 
-       BBbReadEmbedded(pDevice->PortOffset, 0x0A, &byBBRxConf);//CR10
-       // patch for 3253B0 Baseband with Cardbus module
+       BBbReadEmbedded(pDevice->PortOffset, 0x0A, &byBBRxConf); /* CR10 */
+       /* patch for 3253B0 Baseband with Cardbus module */
        if (byData == pDevice->abyBBVGA[0])
-               byBBRxConf |= 0x20;//0010 0000
+               byBBRxConf |= 0x20; /* 0010 0000 */
        else if (pDevice->bShortSlotTime)
-               byBBRxConf &= 0xDF;//1101 1111
+               byBBRxConf &= 0xDF; /* 1101 1111 */
        else
-               byBBRxConf |= 0x20;//0010 0000
+               byBBRxConf |= 0x20; /* 0010 0000 */
        pDevice->byBBVGACurrent = byData;
-       BBbWriteEmbedded(pDevice->PortOffset, 0x0A, byBBRxConf);//CR10
+       BBbWriteEmbedded(pDevice->PortOffset, 0x0A, byBBRxConf); /* CR10 */
 }
 
 /*
@@ -2519,18 +2519,18 @@ BBvSetTxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode)
 {
        unsigned char byBBTxConf;
 
-       BBbReadEmbedded(dwIoBase, 0x09, &byBBTxConf);//CR09
+       BBbReadEmbedded(dwIoBase, 0x09, &byBBTxConf); /* CR09 */
        if (byAntennaMode == ANT_DIVERSITY) {
-               // bit 1 is diversity
+               /* bit 1 is diversity */
                byBBTxConf |= 0x02;
        } else if (byAntennaMode == ANT_A) {
-               // bit 2 is ANTSEL
-               byBBTxConf &= 0xF9; // 1111 1001
+               /* bit 2 is ANTSEL */
+               byBBTxConf &= 0xF9; /* 1111 1001 */
        } else if (byAntennaMode == ANT_B) {
-               byBBTxConf &= 0xFD; // 1111 1101
+               byBBTxConf &= 0xFD; /* 1111 1101 */
                byBBTxConf |= 0x04;
        }
-       BBbWriteEmbedded(dwIoBase, 0x09, byBBTxConf);//CR09
+       BBbWriteEmbedded(dwIoBase, 0x09, byBBTxConf); /* CR09 */
 }
 
 /*
@@ -2552,17 +2552,17 @@ BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode)
 {
        unsigned char byBBRxConf;
 
-       BBbReadEmbedded(dwIoBase, 0x0A, &byBBRxConf);//CR10
+       BBbReadEmbedded(dwIoBase, 0x0A, &byBBRxConf); /* CR10 */
        if (byAntennaMode == ANT_DIVERSITY) {
                byBBRxConf |= 0x01;
 
        } else if (byAntennaMode == ANT_A) {
-               byBBRxConf &= 0xFC; // 1111 1100
+               byBBRxConf &= 0xFC; /* 1111 1100 */
        } else if (byAntennaMode == ANT_B) {
-               byBBRxConf &= 0xFE; // 1111 1110
+               byBBRxConf &= 0xFE; /* 1111 1110 */
                byBBRxConf |= 0x02;
        }
-       BBbWriteEmbedded(dwIoBase, 0x0A, byBBRxConf);//CR10
+       BBbWriteEmbedded(dwIoBase, 0x0A, byBBRxConf); /* CR10 */
 }
 
 /*
@@ -2580,15 +2580,15 @@ BBvSetRxAntennaMode(unsigned long dwIoBase, unsigned char byAntennaMode)
 void
 BBvSetDeepSleep(unsigned long dwIoBase, unsigned char byLocalID)
 {
-       BBbWriteEmbedded(dwIoBase, 0x0C, 0x17);//CR12
-       BBbWriteEmbedded(dwIoBase, 0x0D, 0xB9);//CR13
+       BBbWriteEmbedded(dwIoBase, 0x0C, 0x17); /* CR12 */
+       BBbWriteEmbedded(dwIoBase, 0x0D, 0xB9); /* CR13 */
 }
 
 void
 BBvExitDeepSleep(unsigned long dwIoBase, unsigned char byLocalID)
 {
-       BBbWriteEmbedded(dwIoBase, 0x0C, 0x00);//CR12
-       BBbWriteEmbedded(dwIoBase, 0x0D, 0x01);//CR13
+       BBbWriteEmbedded(dwIoBase, 0x0C, 0x00); /* CR12 */
+       BBbWriteEmbedded(dwIoBase, 0x0D, 0x01); /* CR13 */
 }
 
 static
@@ -2599,7 +2599,7 @@ s_ulGetRatio(PSDevice pDevice)
        unsigned long ulMaxPacket;
        unsigned long ulPacketNum;
 
-       //This is a thousand-ratio
+       /* This is a thousand-ratio */
        ulMaxPacket = pDevice->uNumSQ3[RATE_54M];
        if (pDevice->uNumSQ3[RATE_54M] != 0) {
                ulPacketNum = pDevice->uNumSQ3[RATE_54M];
@@ -2751,7 +2751,7 @@ BBvAntennaDiversity(PSDevice pDevice, unsigned char byRxRate, unsigned char bySQ
                        BBvClearAntDivSQ3Value(pDevice);
 
                }
-       } else { //byAntennaState == 1
+       } else { /* byAntennaState == 1 */
 
                if (pDevice->uDiversityCnt > pDevice->ulDiversityMValue) {
                        del_timer(&pDevice->TimerSQ3Tmax1);
@@ -2775,7 +2775,7 @@ BBvAntennaDiversity(PSDevice pDevice, unsigned char byRxRate, unsigned char bySQ
                        pDevice->byAntennaState = 0;
                        BBvClearAntDivSQ3Value(pDevice);
                }
-       } //byAntennaState
+       } /* byAntennaState */
 }
 
 /*+
index 05bf48a24f45a6bcae2bb677548e037bf936698f..e21abd8ea7878ec6d7133d313bd30c2895204bfe 100644 (file)
@@ -998,7 +998,7 @@ CARDbAdd_PMKID_Candidate(
 )
 {
        PSDevice            pDevice = (PSDevice) pDeviceHandler;
-       PPMKID_CANDIDATE    pCandidateList;
+       struct pmkid_candidate *pCandidateList;
        unsigned int ii = 0;
 
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
index 45fc8a0b9b5cceebe9d7d2fa50ba37805fb10ba9..aab63ca2577465b41208f9d07d46b7052a6090e4 100644 (file)
@@ -227,10 +227,10 @@ typedef enum _NDIS_802_11_STATUS_TYPE
 } NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
 
 //Added new types for PMKID Candidate lists.
-typedef struct _PMKID_CANDIDATE {
+struct pmkid_candidate {
        NDIS_802_11_MAC_ADDRESS BSSID;
        unsigned long Flags;
-} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
+};
 
 typedef struct _BSSID_INFO
 {
@@ -248,7 +248,7 @@ typedef struct tagSPMKIDCandidateEvent {
        NDIS_802_11_STATUS_TYPE     StatusType;
        unsigned long Version;       // Version of the structure
        unsigned long NumCandidates; // No. of pmkid candidates
-       PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
+       struct pmkid_candidate CandidateList[MAX_PMKIDLIST];
 } SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
 
 //--
index 1d3908d044d09e03f5b6dae1c19ecfef45f70bde..23273863696bc730eec416d9517fc808e1dcd0eb 100644 (file)
@@ -302,7 +302,7 @@ static int  device_dma0_tx_80211(struct sk_buff *skb, struct net_device *dev);
 //2008-0714<Add>by Mike Liu
 static bool device_release_WPADEV(PSDevice pDevice);
 
-static int  ethtool_ioctl(struct net_device *dev, void *useraddr);
+static int  ethtool_ioctl(struct net_device *dev, void __user *useraddr);
 static int  device_rx_srv(PSDevice pDevice, unsigned int uIdx);
 static int  device_tx_srv(PSDevice pDevice, unsigned int uIdx);
 static bool device_alloc_rx_buf(PSDevice pDevice, PSRxDesc pDesc);
@@ -3067,7 +3067,7 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
                break;
 
        case SIOCETHTOOL:
-               return ethtool_ioctl(dev, (void *)rq->ifr_data);
+               return ethtool_ioctl(dev, rq->ifr_data);
                // All other calls are currently unsupported
 
        default:
@@ -3103,7 +3103,7 @@ static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd) {
        return rc;
 }
 
-static int ethtool_ioctl(struct net_device *dev, void *useraddr)
+static int ethtool_ioctl(struct net_device *dev, void __user *useraddr)
 {
        u32 ethcmd;
 
index 7ddaf2603ba6a37a126882e00b8d7b112ac41e31..696564b44200cef77ee4042858eceee341060d00 100644 (file)
@@ -54,6 +54,7 @@
 #include "rf.h"
 #include "iowpa.h"
 #include "aes_ccmp.h"
+#include "dpc.h"
 
 /*---------------------  Static Definitions -------------------------*/
 
@@ -62,7 +63,7 @@
 /*---------------------  Static Variables  --------------------------*/
 static int msglevel = MSG_LEVEL_INFO;
 
-const unsigned char acbyRxRate[MAX_RATE] =
+static const unsigned char acbyRxRate[MAX_RATE] =
 {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
 
 /*---------------------  Static Functions  --------------------------*/
index ae2b87f177fb0cf7c525c7afef1ca82655a3b9c9..747d72340db353d24950c4f8981e90fc038750af 100644 (file)
@@ -33,6 +33,7 @@
 #include "device.h"
 #include "ioctl.h"
 #include "iocmd.h"
+#include "iwctl.h"
 #include "mac.h"
 #include "card.h"
 #include "hostap.h"
@@ -128,7 +129,7 @@ int iwctl_giwname(struct net_device *dev,
  * Wireless Handler : set scan
  */
 
-int iwctl_siwscan(struct net_device *dev,
+static int iwctl_siwscan(struct net_device *dev,
                  struct iw_request_info *info,
                  struct iw_point *wrq,
                  char *extra)
@@ -189,7 +190,7 @@ int iwctl_siwscan(struct net_device *dev,
  * Wireless Handler : get scan results
  */
 
-int iwctl_giwscan(struct net_device *dev,
+static int iwctl_giwscan(struct net_device *dev,
                  struct iw_request_info *info,
                  struct iw_point *wrq,
                  char *extra)
index 871bd7c4e716e853993670ac58fda95a283808e6..de0a337b543a468672989efa51af7ae8abaf970e 100644 (file)
@@ -161,16 +161,6 @@ int iwctl_giwpower(struct net_device *dev,
                   struct iw_param *wrq,
                   char *extra);
 
-int iwctl_giwscan(struct net_device *dev,
-                 struct iw_request_info *info,
-                 struct iw_point *wrq,
-                 char *extra);
-
-int iwctl_siwscan(struct net_device *dev,
-                 struct iw_request_info *info,
-                 struct iw_param *wrq,
-                 char *extra);
-
 //2008-0409-07, <Add> by Einsn Liu
 #ifdef WPA_SUPPLICANT_DRIVER_WEXT_SUPPORT
 int iwctl_siwauth(struct net_device *dev,
@@ -211,6 +201,6 @@ int iwctl_siwmlme(struct net_device *dev,
 //End Add -- //2008-0409-07, <Add> by Einsn Liu
 
 extern const struct iw_handler_def     iwctl_handler_def;
-extern const struct iw_priv_args       iwctl_private_args;
+extern struct iw_priv_args       iwctl_private_args[];
 
 #endif // __IWCTL_H__
index 7d61598563c75609b2cbd6277a713bfd77147ac5..085878eef4da5a77ff6de32ed7252c86ee21a969 100644 (file)
@@ -255,7 +255,7 @@ VNTWIFIbyGetACKTxRate(
        if (byRxDataRate <= RATE_11M) {
                byMaxAckRate = RATE_1M;
        } else  {
-               // 24M is mandatory for 802.11a and 802.11g
+               /* 24M is mandatory for 802.11a and 802.11g */
                byMaxAckRate = RATE_24M;
        }
        if (pSupportRateIEs) {
@@ -491,7 +491,7 @@ VNTWIFIvUpdateNodeTxCounter(
 
        pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts++;
        if (bTxOk) {
-               // transmit success, TxAttempts at least plus one
+               /* transmit success, TxAttempts at least plus one */
                pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++;
                pMgmt->sNodeDBTable[uNodeIndex].uTxOk[wRate]++;
        } else {
@@ -525,7 +525,7 @@ VNTWIFIvGetTxRate(
 
        if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) ||
            (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
-               // Adhoc Tx rate decided from node DB
+               /* Adhoc Tx rate decided from node DB */
                if (BSSDBbIsSTAInNodeDB(pMgmt, pbyDestAddress, &uNodeIndex)) {
                        wTxDataRate = (pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate);
                        pSupportRateIEs = (PWLAN_IE_SUPP_RATES) (pMgmt->sNodeDBTable[uNodeIndex].abyCurrSuppRates);
@@ -539,7 +539,7 @@ VNTWIFIvGetTxRate(
                        pSupportRateIEs = (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates;
                        pExtSupportRateIEs = (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrExtSuppRates;
                }
-       } else { // Infrastructure: rate decided from AP Node, index = 0
+       } else { /* Infrastructure: rate decided from AP Node, index = 0 */
 
                wTxDataRate = (pMgmt->sNodeDBTable[0].wTxDataRate);
 #ifdef PLICE_DEBUG
index 67384782b7022d0579962fe9d15e94525df2057c..cc4f5b9e058198980c156332968d9702750d2a45 100644 (file)
@@ -4438,7 +4438,7 @@ bAdd_PMKID_Candidate(
 )
 {
        PSDevice         pDevice = (PSDevice)hDeviceContext;
-       PPMKID_CANDIDATE pCandidateList;
+       struct pmkid_candidate *pCandidateList;
        unsigned int ii = 0;
 
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
diff --git a/drivers/staging/vt6656/80211hdr.h b/drivers/staging/vt6656/80211hdr.h
deleted file mode 100644 (file)
index 1e778ba..0000000
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: 80211hdr.h
- *
- * Purpose: 802.11 MAC headers related pre-defines and macros.
- *
- * Author: Lyndon Chen
- *
- * Date: Apr 8, 2002
- */
-
-#ifndef __80211HDR_H__
-#define __80211HDR_H__
-
-/* bit type */
-#define BIT0   0x00000001
-#define BIT1   0x00000002
-#define BIT2   0x00000004
-#define BIT3   0x00000008
-#define BIT4   0x00000010
-#define BIT5   0x00000020
-#define BIT6   0x00000040
-#define BIT7   0x00000080
-#define BIT8   0x00000100
-#define BIT9   0x00000200
-#define BIT10  0x00000400
-#define BIT11  0x00000800
-#define BIT12  0x00001000
-#define BIT13  0x00002000
-#define BIT14  0x00004000
-#define BIT15  0x00008000
-#define BIT16  0x00010000
-#define BIT17  0x00020000
-#define BIT18  0x00040000
-#define BIT19  0x00080000
-#define BIT20  0x00100000
-#define BIT21  0x00200000
-#define BIT22  0x00400000
-#define BIT23  0x00800000
-#define BIT24  0x01000000
-#define BIT25  0x02000000
-#define BIT26  0x04000000
-#define BIT27  0x08000000
-#define BIT28  0x10000000
-#define BIT29  0x20000000
-#define BIT30  0x40000000
-#define BIT31  0x80000000
-
-/* 802.11 frame related, defined as 802.11 spec */
-#define WLAN_ADDR_LEN               6
-#define WLAN_CRC_LEN                4
-#define WLAN_CRC32_LEN              4
-#define WLAN_FCS_LEN                4
-#define WLAN_BSSID_LEN              6
-#define WLAN_BSS_TS_LEN             8
-#define WLAN_HDR_ADDR2_LEN          16
-#define WLAN_HDR_ADDR3_LEN          24
-#define WLAN_HDR_ADDR4_LEN          30
-#define WLAN_IEHDR_LEN              2
-#define WLAN_SSID_MAXLEN            32
-#define WLAN_RATES_MAXLEN           16
-#define WLAN_RATES_MAXLEN_11B       4
-#define WLAN_RSN_MAXLEN             32
-#define WLAN_DATA_MAXLEN            2312
-#define WLAN_A3FR_MAXLEN            (WLAN_HDR_ADDR3_LEN \
-                                    + WLAN_DATA_MAXLEN \
-                                    + WLAN_CRC_LEN)
-
-#define WLAN_BEACON_FR_MAXLEN       WLAN_A3FR_MAXLEN
-#define WLAN_ATIM_FR_MAXLEN         (WLAN_HDR_ADDR3_LEN + 0)
-#define WLAN_NULLDATA_FR_MAXLEN     (WLAN_HDR_ADDR3_LEN + 0)
-#define WLAN_DISASSOC_FR_MAXLEN     (WLAN_HDR_ADDR3_LEN + 2)
-#define WLAN_ASSOCREQ_FR_MAXLEN     WLAN_A3FR_MAXLEN
-#define WLAN_ASSOCRESP_FR_MAXLEN    WLAN_A3FR_MAXLEN
-#define WLAN_REASSOCREQ_FR_MAXLEN   WLAN_A3FR_MAXLEN
-#define WLAN_REASSOCRESP_FR_MAXLEN  WLAN_A3FR_MAXLEN
-#define WLAN_PROBEREQ_FR_MAXLEN     WLAN_A3FR_MAXLEN
-#define WLAN_PROBERESP_FR_MAXLEN    WLAN_A3FR_MAXLEN
-#define WLAN_AUTHEN_FR_MAXLEN       WLAN_A3FR_MAXLEN
-#define WLAN_DEAUTHEN_FR_MAXLEN     (WLAN_HDR_ADDR3_LEN + 2)
-
-#define WLAN_WEP_NKEYS              4
-#define WLAN_WEP40_KEYLEN           5
-#define WLAN_WEP104_KEYLEN          13
-#define WLAN_WEP232_KEYLEN          29
-#define WLAN_WEPMAX_KEYLEN          32
-#define WLAN_CHALLENGE_IE_MAXLEN    255
-#define WLAN_CHALLENGE_IE_LEN       130
-#define WLAN_CHALLENGE_LEN          128
-#define WLAN_WEP_IV_LEN             4
-#define WLAN_WEP_ICV_LEN            4
-#define WLAN_FRAGS_MAX              16
-
-/* Frame Type */
-#define WLAN_TYPE_MGR 0x00
-#define WLAN_TYPE_CTL  0x01
-#define WLAN_TYPE_DATA 0x02
-
-#define WLAN_FTYPE_MGMT 0x00
-#define WLAN_FTYPE_CTL  0x01
-#define WLAN_FTYPE_DATA 0x02
-
-/* Frame Subtypes */
-#define WLAN_FSTYPE_ASSOCREQ        0x00
-#define WLAN_FSTYPE_ASSOCRESP       0x01
-#define WLAN_FSTYPE_REASSOCREQ      0x02
-#define WLAN_FSTYPE_REASSOCRESP     0x03
-#define WLAN_FSTYPE_PROBEREQ        0x04
-#define WLAN_FSTYPE_PROBERESP       0x05
-#define WLAN_FSTYPE_BEACON          0x08
-#define WLAN_FSTYPE_ATIM            0x09
-#define WLAN_FSTYPE_DISASSOC        0x0a
-#define WLAN_FSTYPE_AUTHEN          0x0b
-#define WLAN_FSTYPE_DEAUTHEN        0x0c
-#define WLAN_FSTYPE_ACTION          0x0d
-
-/* Control */
-#define WLAN_FSTYPE_PSPOLL          0x0a
-#define WLAN_FSTYPE_RTS             0x0b
-#define WLAN_FSTYPE_CTS             0x0c
-#define WLAN_FSTYPE_ACK             0x0d
-#define WLAN_FSTYPE_CFEND           0x0e
-#define WLAN_FSTYPE_CFENDCFACK      0x0f
-
-/* Data */
-#define WLAN_FSTYPE_DATAONLY        0x00
-#define WLAN_FSTYPE_DATA_CFACK      0x01
-#define WLAN_FSTYPE_DATA_CFPOLL     0x02
-#define WLAN_FSTYPE_DATA_CFACK_CFPOLL   0x03
-#define WLAN_FSTYPE_NULL            0x04
-#define WLAN_FSTYPE_CFACK           0x05
-#define WLAN_FSTYPE_CFPOLL          0x06
-#define WLAN_FSTYPE_CFACK_CFPOLL    0x07
-
-#ifdef __BIG_ENDIAN
-
-/* GET & SET Frame Control bit */
-#define WLAN_GET_FC_PRVER(n)    (((u16)(n) >> 8) & (BIT0 | BIT1))
-#define WLAN_GET_FC_FTYPE(n)    ((((u16)(n) >> 8) & (BIT2 | BIT3)) >> 2)
-#define WLAN_GET_FC_FSTYPE(n)   ((((u16)(n) >> 8) \
-                                 & (BIT4|BIT5|BIT6|BIT7)) >> 4)
-#define WLAN_GET_FC_TODS(n)     ((((u16)(n) << 8) & (BIT8)) >> 8)
-#define WLAN_GET_FC_FROMDS(n)   ((((u16)(n) << 8) & (BIT9)) >> 9)
-#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n) << 8) & (BIT10)) >> 10)
-#define WLAN_GET_FC_RETRY(n)    ((((u16)(n) << 8) & (BIT11)) >> 11)
-#define WLAN_GET_FC_PWRMGT(n)   ((((u16)(n) << 8) & (BIT12)) >> 12)
-#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n) << 8) & (BIT13)) >> 13)
-#define WLAN_GET_FC_ISWEP(n)    ((((u16)(n) << 8) & (BIT14)) >> 14)
-#define WLAN_GET_FC_ORDER(n)    ((((u16)(n) << 8) & (BIT15)) >> 15)
-
-/* Sequence Field bit */
-#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n) >> 8) & (BIT0|BIT1|BIT2|BIT3))
-#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n) >> 8) \
-                                & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
-
-/* Capability Field bit */
-#define WLAN_GET_CAP_INFO_ESS(n)           (((n) >> 8) & BIT0)
-#define WLAN_GET_CAP_INFO_IBSS(n)          ((((n) >> 8) & BIT1) >> 1)
-#define WLAN_GET_CAP_INFO_CFPOLLABLE(n)    ((((n) >> 8) & BIT2) >> 2)
-#define WLAN_GET_CAP_INFO_CFPOLLREQ(n)     ((((n) >> 8) & BIT3) >> 3)
-#define WLAN_GET_CAP_INFO_PRIVACY(n)       ((((n) >> 8) & BIT4) >> 4)
-#define WLAN_GET_CAP_INFO_SHORTPREAMBLE(n) ((((n) >> 8) & BIT5) >> 5)
-#define WLAN_GET_CAP_INFO_PBCC(n)          ((((n) >> 8) & BIT6) >> 6)
-#define WLAN_GET_CAP_INFO_AGILITY(n)       ((((n) >> 8) & BIT7) >> 7)
-#define WLAN_GET_CAP_INFO_SPECTRUMMNG(n)   ((((n))      & BIT8) >> 10)
-#define WLAN_GET_CAP_INFO_SHORTSLOTTIME(n) ((((n))      & BIT10) >> 10)
-#define WLAN_GET_CAP_INFO_DSSSOFDM(n)      ((((n))      & BIT13) >> 13)
-#define WLAN_GET_CAP_INFO_GRPACK(n)        ((((n))      & BIT14) >> 14)
-
-#else
-
-/* GET & SET Frame Control bit */
-#define WLAN_GET_FC_PRVER(n)    (((u16)(n)) & (BIT0 | BIT1))
-#define WLAN_GET_FC_FTYPE(n)    ((((u16)(n)) & (BIT2 | BIT3)) >> 2)
-#define WLAN_GET_FC_FSTYPE(n)   ((((u16)(n)) & (BIT4|BIT5|BIT6|BIT7)) >> 4)
-#define WLAN_GET_FC_TODS(n)     ((((u16)(n)) & (BIT8)) >> 8)
-#define WLAN_GET_FC_FROMDS(n)   ((((u16)(n)) & (BIT9)) >> 9)
-#define WLAN_GET_FC_MOREFRAG(n) ((((u16)(n)) & (BIT10)) >> 10)
-#define WLAN_GET_FC_RETRY(n)    ((((u16)(n)) & (BIT11)) >> 11)
-#define WLAN_GET_FC_PWRMGT(n)   ((((u16)(n)) & (BIT12)) >> 12)
-#define WLAN_GET_FC_MOREDATA(n) ((((u16)(n)) & (BIT13)) >> 13)
-#define WLAN_GET_FC_ISWEP(n)    ((((u16)(n)) & (BIT14)) >> 14)
-#define WLAN_GET_FC_ORDER(n)    ((((u16)(n)) & (BIT15)) >> 15)
-
-/* Sequence Field bit */
-#define WLAN_GET_SEQ_FRGNUM(n) (((u16)(n)) & (BIT0|BIT1|BIT2|BIT3))
-#define WLAN_GET_SEQ_SEQNUM(n) ((((u16)(n)) & (~(BIT0|BIT1|BIT2|BIT3))) >> 4)
-
-/* Capability Field bit */
-#define WLAN_GET_CAP_INFO_ESS(n)           ((n) & BIT0)
-#define WLAN_GET_CAP_INFO_IBSS(n)          (((n) & BIT1) >> 1)
-#define WLAN_GET_CAP_INFO_CFPOLLABLE(n)    (((n) & BIT2) >> 2)
-#define WLAN_GET_CAP_INFO_CFPOLLREQ(n)     (((n) & BIT3) >> 3)
-#define WLAN_GET_CAP_INFO_PRIVACY(n)       (((n) & BIT4) >> 4)
-#define WLAN_GET_CAP_INFO_SHORTPREAMBLE(n) (((n) & BIT5) >> 5)
-#define WLAN_GET_CAP_INFO_PBCC(n)          (((n) & BIT6) >> 6)
-#define WLAN_GET_CAP_INFO_AGILITY(n)       (((n) & BIT7) >> 7)
-#define WLAN_GET_CAP_INFO_SPECTRUMMNG(n)   (((n) & BIT8) >> 10)
-#define WLAN_GET_CAP_INFO_SHORTSLOTTIME(n) (((n) & BIT10) >> 10)
-#define WLAN_GET_CAP_INFO_DSSSOFDM(n)      (((n) & BIT13) >> 13)
-#define WLAN_GET_CAP_INFO_GRPACK(n)        (((n) & BIT14) >> 14)
-
-#endif /* #ifdef __BIG_ENDIAN */
-
-#define WLAN_SET_CAP_INFO_ESS(n)           (n)
-#define WLAN_SET_CAP_INFO_IBSS(n)          ((n) << 1)
-#define WLAN_SET_CAP_INFO_CFPOLLABLE(n)    ((n) << 2)
-#define WLAN_SET_CAP_INFO_CFPOLLREQ(n)     ((n) << 3)
-#define WLAN_SET_CAP_INFO_PRIVACY(n)       ((n) << 4)
-#define WLAN_SET_CAP_INFO_SHORTPREAMBLE(n) ((n) << 5)
-#define WLAN_SET_CAP_INFO_SPECTRUMMNG(n)   ((n) << 8)
-#define WLAN_SET_CAP_INFO_PBCC(n)          ((n) << 6)
-#define WLAN_SET_CAP_INFO_AGILITY(n)       ((n) << 7)
-#define WLAN_SET_CAP_INFO_SHORTSLOTTIME(n) ((n) << 10)
-#define WLAN_SET_CAP_INFO_DSSSOFDM(n)      ((n) << 13)
-#define WLAN_SET_CAP_INFO_GRPACK(n)        ((n) << 14)
-
-#define WLAN_SET_FC_PRVER(n)    ((u16)(n))
-#define WLAN_SET_FC_FTYPE(n)    (((u16)(n)) << 2)
-#define WLAN_SET_FC_FSTYPE(n)   (((u16)(n)) << 4)
-#define WLAN_SET_FC_TODS(n)     (((u16)(n)) << 8)
-#define WLAN_SET_FC_FROMDS(n)   (((u16)(n)) << 9)
-#define WLAN_SET_FC_MOREFRAG(n) (((u16)(n)) << 10)
-#define WLAN_SET_FC_RETRY(n)    (((u16)(n)) << 11)
-#define WLAN_SET_FC_PWRMGT(n)   (((u16)(n)) << 12)
-#define WLAN_SET_FC_MOREDATA(n) (((u16)(n)) << 13)
-#define WLAN_SET_FC_ISWEP(n)    (((u16)(n)) << 14)
-#define WLAN_SET_FC_ORDER(n)    (((u16)(n)) << 15)
-
-#define WLAN_SET_SEQ_FRGNUM(n) ((u16)(n))
-#define WLAN_SET_SEQ_SEQNUM(n) (((u16)(n)) << 4)
-
-/* ERP Field bit */
-
-#define WLAN_GET_ERP_NONERP_PRESENT(n)     ((n) & BIT0)
-#define WLAN_GET_ERP_USE_PROTECTION(n)     (((n) & BIT1) >> 1)
-#define WLAN_GET_ERP_BARKER_MODE(n)        (((n) & BIT2) >> 2)
-
-#define WLAN_SET_ERP_NONERP_PRESENT(n)     (n)
-#define WLAN_SET_ERP_USE_PROTECTION(n)     ((n) << 1)
-#define WLAN_SET_ERP_BARKER_MODE(n)        ((n) << 2)
-
-/* Support & Basic Rates field */
-#define WLAN_MGMT_IS_BASICRATE(b)    ((b) & BIT7)
-#define WLAN_MGMT_GET_RATE(b)        ((b) & ~BIT7)
-
-/* TIM field */
-#define WLAN_MGMT_IS_MULTICAST_TIM(b)   ((b) & BIT0)
-#define WLAN_MGMT_GET_TIM_OFFSET(b)     (((b) & ~BIT0) >> 1)
-
-/* 3-Addr & 4-Addr */
-#define WLAN_HDR_A3_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR3_LEN)
-#define WLAN_HDR_A4_DATA_PTR(p) (((u8 *)(p)) + WLAN_HDR_ADDR4_LEN)
-
-/* IEEE ADDR */
-#define IEEE_ADDR_UNIVERSAL         0x02
-#define IEEE_ADDR_GROUP             0x01
-
-typedef struct {
-    u8            abyAddr[6];
-} IEEE_ADDR, *PIEEE_ADDR;
-
-/* 802.11 Header Format */
-
-typedef struct tagWLAN_80211HDR_A2 {
-
-    u16    wFrameCtl;
-    u16    wDurationID;
-    u8    abyAddr1[WLAN_ADDR_LEN];
-    u8    abyAddr2[WLAN_ADDR_LEN];
-
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A2, *PWLAN_80211HDR_A2;
-
-typedef struct tagWLAN_80211HDR_A3 {
-
-    u16    wFrameCtl;
-    u16    wDurationID;
-    u8    abyAddr1[WLAN_ADDR_LEN];
-    u8    abyAddr2[WLAN_ADDR_LEN];
-    u8    abyAddr3[WLAN_ADDR_LEN];
-    u16    wSeqCtl;
-
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A3, *PWLAN_80211HDR_A3;
-
-typedef struct tagWLAN_80211HDR_A4 {
-
-    u16    wFrameCtl;
-    u16    wDurationID;
-    u8    abyAddr1[WLAN_ADDR_LEN];
-    u8    abyAddr2[WLAN_ADDR_LEN];
-    u8    abyAddr3[WLAN_ADDR_LEN];
-    u16    wSeqCtl;
-    u8    abyAddr4[WLAN_ADDR_LEN];
-
-} __attribute__ ((__packed__))
-WLAN_80211HDR_A4, *PWLAN_80211HDR_A4;
-
-typedef union tagUWLAN_80211HDR {
-
-    WLAN_80211HDR_A2        sA2;
-    WLAN_80211HDR_A3        sA3;
-    WLAN_80211HDR_A4        sA4;
-
-} UWLAN_80211HDR, *PUWLAN_80211HDR;
-
-#endif /* __80211HDR_H__ */
diff --git a/drivers/staging/vt6656/80211mgr.c b/drivers/staging/vt6656/80211mgr.c
deleted file mode 100644 (file)
index 61edb51..0000000
+++ /dev/null
@@ -1,861 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: 80211mgr.c
- *
- * Purpose: Handles the 802.11 management support functions
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- * Functions:
- *      vMgrEncodeBeacon - Encode the Beacon frame
- *      vMgrDecodeBeacon - Decode the Beacon frame
- *      vMgrEncodeDisassociation - Encode the Disassociation frame
- *      vMgrDecodeDisassociation - Decode the Disassociation frame
- *      vMgrEncodeAssocRequest - Encode the Association request frame
- *      vMgrDecodeAssocRequest - Decode the Association request frame
- *      vMgrEncodeAssocResponse - Encode the Association response frame
- *      vMgrDecodeAssocResponse - Decode the Association response frame
- *      vMgrEncodeReAssocRequest - Encode the ReAssociation request frame
- *      vMgrDecodeReAssocRequest - Decode the ReAssociation request frame
- *      vMgrEncodeProbeRequest - Encode the Probe request frame
- *      vMgrDecodeProbeRequest - Decode the Probe request frame
- *      vMgrEncodeProbeResponse - Encode the Probe response frame
- *      vMgrDecodeProbeResponse - Decode the Probe response frame
- *      vMgrEncodeAuthen - Encode the Authentication frame
- *      vMgrDecodeAuthen - Decode the Authentication frame
- *      vMgrEncodeDeauthen - Encode the DeAuthentication frame
- *      vMgrDecodeDeauthen - Decode the DeAuthentication frame
- *      vMgrEncodeReassocResponse - Encode the Reassociation response frame
- *
- * Revision History:
- *
- */
-
-#include "device.h"
-#include "tmacro.h"
-#include "tether.h"
-#include "80211mgr.h"
-#include "80211hdr.h"
-#include "wpa.h"
-
-static int          msglevel                = MSG_LEVEL_INFO;
-/*static int          msglevel                =MSG_LEVEL_DEBUG;*/
-
-/*+
- *
- * Routine Description:
- * Encode Beacon frame body offset
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeBeacon(
-      PWLAN_FR_BEACON  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-       /* Fixed Fields */
-       pFrame->pqwTimestamp =
-               (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-                       WLAN_BEACON_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_BEACON_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_BEACON_OFF_CAPINFO);
-
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_BEACON_OFF_SSID;
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- * Decode Beacon frame body offset
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeBeacon(
-      PWLAN_FR_BEACON  pFrame
-    )
-{
-    PWLAN_IE        pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-       /* Fixed Fields */
-       pFrame->pqwTimestamp =
-               (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-                       WLAN_BEACON_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_BEACON_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_BEACON_OFF_CAPINFO);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)((u8 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)))
-                       + WLAN_BEACON_OFF_SSID);
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-        case WLAN_EID_FH_PARMS:
-            /* pFrame->pFHParms = (PWLAN_IE_FH_PARMS)pItem; */
-            break;
-        case WLAN_EID_DS_PARMS:
-            if (pFrame->pDSParms == NULL)
-                pFrame->pDSParms = (PWLAN_IE_DS_PARMS)pItem;
-            break;
-        case WLAN_EID_CF_PARMS:
-            if (pFrame->pCFParms == NULL)
-                pFrame->pCFParms = (PWLAN_IE_CF_PARMS)pItem;
-            break;
-        case WLAN_EID_IBSS_PARMS:
-            if (pFrame->pIBSSParms == NULL)
-                pFrame->pIBSSParms = (PWLAN_IE_IBSS_PARMS)pItem;
-            break;
-        case WLAN_EID_TIM:
-            if (pFrame->pTIM == NULL)
-                pFrame->pTIM = (PWLAN_IE_TIM)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL) 
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-            if (pFrame->pRSNWPA == NULL) {
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
-            }
-            break;
-
-        case WLAN_EID_ERP:
-            if (pFrame->pERP == NULL)
-                pFrame->pERP = (PWLAN_IE_ERP)pItem;
-            break;
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_COUNTRY:      /* 7 */
-            if (pFrame->pIE_Country == NULL)
-                pFrame->pIE_Country = (PWLAN_IE_COUNTRY)pItem;
-            break;
-
-        case WLAN_EID_PWR_CONSTRAINT:   /* 32 */
-            if (pFrame->pIE_PowerConstraint == NULL)
-                pFrame->pIE_PowerConstraint = (PWLAN_IE_PW_CONST)pItem;
-            break;
-
-        case WLAN_EID_CH_SWITCH:    /* 37 */
-            if (pFrame->pIE_CHSW == NULL)
-                pFrame->pIE_CHSW = (PWLAN_IE_CH_SW)pItem;
-            break;
-
-        case WLAN_EID_QUIET:        /* 40 */
-            if (pFrame->pIE_Quiet == NULL)
-                pFrame->pIE_Quiet = (PWLAN_IE_QUIET)pItem;
-            break;
-
-        case WLAN_EID_IBSS_DFS:
-            if (pFrame->pIE_IBSSDFS == NULL)
-                pFrame->pIE_IBSSDFS = (PWLAN_IE_IBSS_DFS)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in beacon decode.\n", pItem->byElementID);
-                break;
-
-        }
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Disassociation
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeDisassociation(
-      PWLAN_FR_DISASSOC  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DISASSOC_OFF_REASON);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DISASSOC_OFF_REASON + sizeof(*(pFrame->pwReason));
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Disassociation
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeDisassociation(
-      PWLAN_FR_DISASSOC  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DISASSOC_OFF_REASON);
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Association Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeAssocRequest(
-      PWLAN_FR_ASSOCREQ  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_ASSOCREQ_OFF_LISTEN_INT);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCREQ_OFF_LISTEN_INT + sizeof(*(pFrame->pwListenInterval));
-}
-
-/*+
- *
- * Routine Description: (AP)
- *  Decode Association Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeAssocRequest(
-      PWLAN_FR_ASSOCREQ  pFrame
-    )
-{
-    PWLAN_IE   pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCREQ_OFF_LISTEN_INT);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_ASSOCREQ_OFF_SSID);
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL)
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-            if (pFrame->pRSNWPA == NULL) {
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
-            }
-            break;
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in assocreq decode.\n",
-                    pItem->byElementID);
-            break;
-        }
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description: (AP)
- *  Encode Association Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeAssocResponse(
-      PWLAN_FR_ASSOCRESP  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCRESP_OFF_CAP_INFO);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_ASSOCRESP_OFF_STATUS);
-    pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_ASSOCRESP_OFF_AID);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_ASSOCRESP_OFF_AID
-                  + sizeof(*(pFrame->pwAid));
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Association Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeAssocResponse(
-     PWLAN_FR_ASSOCRESP  pFrame
-     )
-{
-    PWLAN_IE   pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_ASSOCRESP_OFF_CAP_INFO);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_ASSOCRESP_OFF_STATUS);
-    pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_ASSOCRESP_OFF_AID);
-
-    /* Information elements */
-    pFrame->pSuppRates  = (PWLAN_IE_SUPP_RATES)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                           + WLAN_ASSOCRESP_OFF_SUPP_RATES);
-
-    pItem = (PWLAN_IE)(pFrame->pSuppRates);
-    pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-
-    if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_EXTSUPP_RATES)) {
-        pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "pFrame->pExtSuppRates=[%p].\n", pItem);
-       } else
-        pFrame->pExtSuppRates = NULL;
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Reassociation Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeReassocRequest(
-      PWLAN_FR_REASSOCREQ  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_REASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_REASSOCREQ_OFF_LISTEN_INT);
-    pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_REASSOCREQ_OFF_CURR_AP);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCREQ_OFF_CURR_AP + sizeof(*(pFrame->pAddrCurrAP));
-}
-
-/*+
- *
- * Routine Description: (AP)
- *  Decode Reassociation Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeReassocRequest(
-      PWLAN_FR_REASSOCREQ  pFrame
-     )
-{
-    PWLAN_IE   pItem;
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_REASSOCREQ_OFF_CAP_INFO);
-    pFrame->pwListenInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_REASSOCREQ_OFF_LISTEN_INT);
-    pFrame->pAddrCurrAP = (PIEEE_ADDR)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_REASSOCREQ_OFF_CURR_AP);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                       + WLAN_REASSOCREQ_OFF_SSID);
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL)
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-               if (pFrame->pRSNWPA == NULL)
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
-            break;
-
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Unrecognized EID=%dd in reassocreq decode.\n",
-                        pItem->byElementID);
-            break;
-        }
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 + pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Probe Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeProbeRequest(
-     PWLAN_FR_PROBEREQ  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-    pFrame->len = WLAN_HDR_ADDR3_LEN;
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Probe Request
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeProbeRequest(
-     PWLAN_FR_PROBEREQ  pFrame
-     )
-{
-    PWLAN_IE   pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)));
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in probereq\n", pItem->byElementID);
-            break;
-        }
-
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 +  pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *  Encode Probe Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeProbeResponse(
-     PWLAN_FR_PROBERESP  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-       /* Fixed Fields */
-       pFrame->pqwTimestamp =
-               (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-                       WLAN_PROBERESP_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_PROBERESP_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_PROBERESP_OFF_CAP_INFO);
-
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_PROBERESP_OFF_CAP_INFO +
-                  sizeof(*(pFrame->pwCapInfo));
-}
-
-/*+
- *
- * Routine Description:
- *  Decode Probe Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeProbeResponse(
-     PWLAN_FR_PROBERESP  pFrame
-    )
-{
-    PWLAN_IE    pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-       /* Fixed Fields */
-       pFrame->pqwTimestamp =
-               (u64 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3)) +
-                       WLAN_PROBERESP_OFF_TS);
-    pFrame->pwBeaconInterval = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                       + WLAN_PROBERESP_OFF_BCN_INT);
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_PROBERESP_OFF_CAP_INFO);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                       + WLAN_PROBERESP_OFF_SSID);
-
-    while (((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) {
-        switch (pItem->byElementID) {
-        case WLAN_EID_SSID:
-            if (pFrame->pSSID == NULL)
-                pFrame->pSSID = (PWLAN_IE_SSID)pItem;
-            break;
-        case WLAN_EID_SUPP_RATES:
-            if (pFrame->pSuppRates == NULL)
-                pFrame->pSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-        case WLAN_EID_FH_PARMS:
-            break;
-        case WLAN_EID_DS_PARMS:
-            if (pFrame->pDSParms == NULL)
-                pFrame->pDSParms = (PWLAN_IE_DS_PARMS)pItem;
-            break;
-        case WLAN_EID_CF_PARMS:
-            if (pFrame->pCFParms == NULL)
-                pFrame->pCFParms = (PWLAN_IE_CF_PARMS)pItem;
-            break;
-        case WLAN_EID_IBSS_PARMS:
-            if (pFrame->pIBSSParms == NULL)
-                pFrame->pIBSSParms = (PWLAN_IE_IBSS_PARMS)pItem;
-            break;
-
-        case WLAN_EID_RSN:
-            if (pFrame->pRSN == NULL)
-                pFrame->pRSN = (PWLAN_IE_RSN)pItem;
-            break;
-        case WLAN_EID_RSN_WPA:
-            if (pFrame->pRSNWPA == NULL) {
-                if (WPAb_Is_RSN((PWLAN_IE_RSN_EXT)pItem) == true)
-                    pFrame->pRSNWPA = (PWLAN_IE_RSN_EXT)pItem;
-            }
-            break;
-        case WLAN_EID_ERP:
-            if (pFrame->pERP == NULL)
-                pFrame->pERP = (PWLAN_IE_ERP)pItem;
-            break;
-        case WLAN_EID_EXTSUPP_RATES:
-            if (pFrame->pExtSuppRates == NULL)
-                pFrame->pExtSuppRates = (PWLAN_IE_SUPP_RATES)pItem;
-            break;
-
-        case WLAN_EID_COUNTRY:      /* 7 */
-            if (pFrame->pIE_Country == NULL)
-                pFrame->pIE_Country = (PWLAN_IE_COUNTRY)pItem;
-            break;
-
-        case WLAN_EID_PWR_CONSTRAINT:   /* 32 */
-            if (pFrame->pIE_PowerConstraint == NULL)
-                pFrame->pIE_PowerConstraint = (PWLAN_IE_PW_CONST)pItem;
-            break;
-
-        case WLAN_EID_CH_SWITCH:    /* 37 */
-            if (pFrame->pIE_CHSW == NULL)
-                pFrame->pIE_CHSW = (PWLAN_IE_CH_SW)pItem;
-            break;
-
-        case WLAN_EID_QUIET:        /* 40 */
-            if (pFrame->pIE_Quiet == NULL)
-                pFrame->pIE_Quiet = (PWLAN_IE_QUIET)pItem;
-            break;
-
-        case WLAN_EID_IBSS_DFS:
-            if (pFrame->pIE_IBSSDFS == NULL)
-                pFrame->pIE_IBSSDFS = (PWLAN_IE_IBSS_DFS)pItem;
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Bad EID=%dd in proberesp\n", pItem->byElementID);
-            break;
-        }
-
-        pItem = (PWLAN_IE)(((u8 *)pItem) + 2 +  pItem->len);
-    }
-}
-
-/*+
- *
- * Routine Description:
- *     Encode Authentication frame
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeAuthen(
-      PWLAN_FR_AUTHEN  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwAuthAlgorithm = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_AUTHEN_OFF_AUTH_ALG);
-    pFrame->pwAuthSequence = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                     + WLAN_AUTHEN_OFF_AUTH_SEQ);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_AUTHEN_OFF_STATUS);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_AUTHEN_OFF_STATUS + sizeof(*(pFrame->pwStatus));
-}
-
-/*+
- *
- * Routine Description:
- *   Decode Authentication
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeAuthen(
-      PWLAN_FR_AUTHEN  pFrame
-    )
-{
-    PWLAN_IE    pItem;
-
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwAuthAlgorithm = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                      + WLAN_AUTHEN_OFF_AUTH_ALG);
-    pFrame->pwAuthSequence = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                     + WLAN_AUTHEN_OFF_AUTH_SEQ);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_AUTHEN_OFF_STATUS);
-
-    /* Information elements */
-    pItem = (PWLAN_IE)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                       + WLAN_AUTHEN_OFF_CHALLENGE);
-
-    if ((((u8 *)pItem) < (pFrame->pBuf + pFrame->len)) && (pItem->byElementID == WLAN_EID_CHALLENGE))
-        pFrame->pChallenge = (PWLAN_IE_CHALLENGE)pItem;
-}
-
-/*+
- *
- * Routine Description:
- *   Encode Authentication
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeDeauthen(
-      PWLAN_FR_DEAUTHEN  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DEAUTHEN_OFF_REASON);
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_DEAUTHEN_OFF_REASON + sizeof(*(pFrame->pwReason));
-}
-
-/*+
- *
- * Routine Description:
- *   Decode Deauthentication
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrDecodeDeauthen(
-      PWLAN_FR_DEAUTHEN  pFrame
-    )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwReason = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_DEAUTHEN_OFF_REASON);
-}
-
-/*+
- *
- * Routine Description: (AP)
- *   Encode Reassociation Response
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void
-vMgrEncodeReassocResponse(
-      PWLAN_FR_REASSOCRESP  pFrame
-     )
-{
-    pFrame->pHdr = (PUWLAN_80211HDR)pFrame->pBuf;
-
-    /* Fixed Fields */
-    pFrame->pwCapInfo = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                                + WLAN_REASSOCRESP_OFF_CAP_INFO);
-    pFrame->pwStatus = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                               + WLAN_REASSOCRESP_OFF_STATUS);
-    pFrame->pwAid = (u16 *)(WLAN_HDR_A3_DATA_PTR(&(pFrame->pHdr->sA3))
-                            + WLAN_REASSOCRESP_OFF_AID);
-
-    pFrame->len = WLAN_HDR_ADDR3_LEN + WLAN_REASSOCRESP_OFF_AID + sizeof(*(pFrame->pwAid));
-}
diff --git a/drivers/staging/vt6656/80211mgr.h b/drivers/staging/vt6656/80211mgr.h
deleted file mode 100644 (file)
index 39cde1a..0000000
+++ /dev/null
@@ -1,808 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: 80211mgr.h
- *
- * Purpose: 802.11 management frames pre-defines.
- *
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- */
-
-#ifndef __80211MGR_H__
-#define __80211MGR_H__
-
-#include "80211hdr.h"
-
-#define WLAN_MIN_ARRAY          1
-
-/* Information Element ID value */
-#define WLAN_EID_SSID           0
-#define WLAN_EID_SUPP_RATES     1
-#define WLAN_EID_FH_PARMS       2
-#define WLAN_EID_DS_PARMS       3
-#define WLAN_EID_CF_PARMS       4
-#define WLAN_EID_TIM            5
-#define WLAN_EID_IBSS_PARMS     6
-#define WLAN_EID_COUNTRY        7
-#define WLAN_EID_CHALLENGE      16
-#define WLAN_EID_PWR_CONSTRAINT 32
-#define WLAN_EID_PWR_CAPABILITY 33
-#define WLAN_EID_TPC_REQ        34
-#define WLAN_EID_TPC_REP        35
-#define WLAN_EID_SUPP_CH        36
-#define WLAN_EID_CH_SWITCH      37
-#define WLAN_EID_MEASURE_REQ    38
-#define WLAN_EID_MEASURE_REP    39
-#define WLAN_EID_QUIET          40
-#define WLAN_EID_IBSS_DFS       41
-#define WLAN_EID_ERP            42
-/* reference 802.11i 7.3.2 table 20 */
-#define WLAN_EID_RSN            48
-#define WLAN_EID_EXTSUPP_RATES  50
-/* reference WiFi WPA spec */
-#define WLAN_EID_RSN_WPA        221
-
-#ifdef Cisco_ccx
-#define WLAN_EID_CCX        133
-#define WLAN_EID_CCX_IP        149
-#define WLAN_EID_CCX_Ver        221
-#endif
-
-#define WLAN_EID_ERP_NONERP_PRESENT             0x01
-#define WLAN_EID_ERP_USE_PROTECTION             0x02
-#define WLAN_EID_ERP_BARKER_MODE                0x04
-
-/* reason codes */
-#define WLAN_MGMT_REASON_RSVD                       0
-#define WLAN_MGMT_REASON_UNSPEC                     1
-#define WLAN_MGMT_REASON_PRIOR_AUTH_INVALID         2
-#define WLAN_MGMT_REASON_DEAUTH_LEAVING             3
-#define WLAN_MGMT_REASON_DISASSOC_INACTIVE          4
-#define WLAN_MGMT_REASON_DISASSOC_AP_BUSY           5
-#define WLAN_MGMT_REASON_CLASS2_NONAUTH             6
-#define WLAN_MGMT_REASON_CLASS3_NONASSOC            7
-#define WLAN_MGMT_REASON_DISASSOC_STA_HASLEFT       8
-#define WLAN_MGMT_REASON_CANT_ASSOC_NONAUTH         9
-#define WLAN_MGMT_REASON_DISASSOC_PWR_CAP_UNACCEPT      10
-#define WLAN_MGMT_REASON_DISASSOC_SUPP_CH_UNACCEPT      11
-#define WLAN_MGMT_REASON_INVALID_IE                 13
-#define WLAN_MGMT_REASON_MIC_FAILURE                14
-#define WLAN_MGMT_REASON_4WAY_HANDSHAKE_TIMEOUT     15
-#define WLAN_MGMT_REASON_GRPKEY_UPDATE_TIMEOUT      16
-#define WLAN_MGMT_REASON_4WAY_INFO_DIFFERENT        17
-#define WLAN_MGMT_REASON_MULTCAST_CIPHER_INVALID    18
-#define WLAN_MGMT_REASON_UNCAST_CIPHER_INVALID      19
-#define WLAN_MGMT_REASON_AKMP_INVALID               20
-#define WLAN_MGMT_REASON_RSNE_UNSUPPORTED           21
-#define WLAN_MGMT_REASON_RSNE_CAP_INVALID           22
-#define WLAN_MGMT_REASON_80211X_AUTH_FAILED         23
-
-/* status codes */
-#define WLAN_MGMT_STATUS_SUCCESS                        0
-#define WLAN_MGMT_STATUS_UNSPEC_FAILURE                 1
-#define WLAN_MGMT_STATUS_CAPS_UNSUPPORTED               10
-#define WLAN_MGMT_STATUS_REASSOC_NO_ASSOC               11
-#define WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC            12
-#define WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG            13
-#define WLAN_MGMT_STATUS_RX_AUTH_NOSEQ                  14
-#define WLAN_MGMT_STATUS_CHALLENGE_FAIL                 15
-#define WLAN_MGMT_STATUS_AUTH_TIMEOUT                   16
-#define WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY              17
-#define WLAN_MGMT_STATUS_ASSOC_DENIED_RATES             18
-#define WLAN_MGMT_STATUS_ASSOC_DENIED_SHORTPREAMBLE     19
-#define WLAN_MGMT_STATUS_ASSOC_DENIED_PBCC              20
-#define WLAN_MGMT_STATUS_ASSOC_DENIED_AGILITY           21
-
-/* reference 802.11h 7.3.1.9 */
-#define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SPECTRUM_MNG  22
-#define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_PWR_CAP       23
-#define WLAN_MGMT_STATUS_ASSOC_REJECT_BCS_SUPP_CH       24
-
-/* reference 802.11g 7.3.1.9 */
-#define WLAN_MGMT_STATUS_SHORTSLOTTIME_UNSUPPORTED      25
-#define WLAN_MGMT_STATUS_DSSSOFDM_UNSUPPORTED           26
-
-/* reference 802.11i 7.3.1.9 table 19 */
-#define WLAN_MGMT_STATUS_INVALID_IE                     40
-#define WLAN_MGMT_STATUS_GROUP_CIPHER_INVALID           41
-#define WLAN_MGMT_STATUS_PAIRWISE_CIPHER_INVALID        42
-#define WLAN_MGMT_STATUS_AKMP_INVALID                   43
-#define WLAN_MGMT_STATUS_UNSUPPORT_RSN_IE_VER           44
-#define WLAN_MGMT_STATUS_INVALID_RSN_IE_CAP             45
-#define WLAN_MGMT_STATUS_CIPHER_REJECT                  46
-
-/* auth algorithm */
-#define WLAN_AUTH_ALG_OPENSYSTEM                0
-#define WLAN_AUTH_ALG_SHAREDKEY                 1
-
-/* management frame field offsets */
-
-/*
- * Note: Not all fields are listed because of variable lengths
- * Note: These offsets are from the start of the frame data
- */
-
-#define WLAN_BEACON_OFF_TS                  0
-#define WLAN_BEACON_OFF_BCN_INT             8
-#define WLAN_BEACON_OFF_CAPINFO             10
-#define WLAN_BEACON_OFF_SSID                12
-
-#define WLAN_DISASSOC_OFF_REASON            0
-
-#define WLAN_ASSOCREQ_OFF_CAP_INFO          0
-#define WLAN_ASSOCREQ_OFF_LISTEN_INT        2
-#define WLAN_ASSOCREQ_OFF_SSID              4
-
-#define WLAN_ASSOCRESP_OFF_CAP_INFO         0
-#define WLAN_ASSOCRESP_OFF_STATUS           2
-#define WLAN_ASSOCRESP_OFF_AID              4
-#define WLAN_ASSOCRESP_OFF_SUPP_RATES       6
-
-#define WLAN_REASSOCREQ_OFF_CAP_INFO        0
-#define WLAN_REASSOCREQ_OFF_LISTEN_INT      2
-#define WLAN_REASSOCREQ_OFF_CURR_AP         4
-#define WLAN_REASSOCREQ_OFF_SSID            10
-
-#define WLAN_REASSOCRESP_OFF_CAP_INFO       0
-#define WLAN_REASSOCRESP_OFF_STATUS         2
-#define WLAN_REASSOCRESP_OFF_AID            4
-#define WLAN_REASSOCRESP_OFF_SUPP_RATES     6
-
-#define WLAN_PROBEREQ_OFF_SSID              0
-
-#define WLAN_PROBERESP_OFF_TS               0
-#define WLAN_PROBERESP_OFF_BCN_INT          8
-#define WLAN_PROBERESP_OFF_CAP_INFO         10
-#define WLAN_PROBERESP_OFF_SSID             12
-
-#define WLAN_AUTHEN_OFF_AUTH_ALG            0
-#define WLAN_AUTHEN_OFF_AUTH_SEQ            2
-#define WLAN_AUTHEN_OFF_STATUS              4
-#define WLAN_AUTHEN_OFF_CHALLENGE           6
-
-#define WLAN_DEAUTHEN_OFF_REASON            0
-
-/* cipher suite selectors defined in 802.11i */
-#define WLAN_11i_CSS_USE_GROUP              0
-#define WLAN_11i_CSS_WEP40                  1
-#define WLAN_11i_CSS_TKIP                   2
-#define WLAN_11i_CSS_CCMP                   4
-#define WLAN_11i_CSS_WEP104                 5
-#define WLAN_11i_CSS_UNKNOWN                255
-
-/* authentication and key management suite selectors defined in 802.11i */
-#define WLAN_11i_AKMSS_802_1X               1
-#define WLAN_11i_AKMSS_PSK                  2
-#define WLAN_11i_AKMSS_UNKNOWN              255
-
-/* measurement type definitions reference IEEE 802.11h table 20b */
-#define MEASURE_TYPE_BASIC      0
-#define MEASURE_TYPE_CCA        1
-#define MEASURE_TYPE_RPI        2
-
-/* measurement request mode definitions reference IEEE 802.11h figure 46h */
-#define MEASURE_MODE_ENABLE     0x02
-#define MEASURE_MODE_REQ        0x04
-#define MEASURE_MODE_REP        0x08
-
-/* measurement report mode definitions reference IEEE 802.11h figure 46m */
-#define MEASURE_MODE_LATE       0x01
-#define MEASURE_MODE_INCAPABLE  0x02
-#define MEASURE_MODE_REFUSED    0x04
-
-/* Information Element types */
-
-#pragma pack(1)
-typedef struct tagWLAN_IE {
-    u8   byElementID;
-    u8   len;
-} __attribute__ ((__packed__))
-WLAN_IE, *PWLAN_IE;
-
-/* Service Set IDentity (SSID) */
-#pragma pack(1)
-typedef struct tagWLAN_IE_SSID {
-    u8   byElementID;
-    u8   len;
-    u8   abySSID[1];
-} __attribute__ ((__packed__))
-WLAN_IE_SSID, *PWLAN_IE_SSID;
-
-/* Supported Rates */
-#pragma pack(1)
-typedef struct tagWLAN_IE_SUPP_RATES {
-    u8   byElementID;
-    u8   len;
-    u8   abyRates[1];
-} __attribute__ ((__packed__))
-WLAN_IE_SUPP_RATES,  *PWLAN_IE_SUPP_RATES;
-
-/* FH Parameter Set */
-#pragma pack(1)
-typedef struct _WLAN_IE_FH_PARMS {
-    u8    byElementID;
-    u8    len;
-    u16    wDwellTime;
-    u8    byHopSet;
-    u8    byHopPattern;
-    u8    byHopIndex;
-} WLAN_IE_FH_PARMS,  *PWLAN_IE_FH_PARMS;
-
-/* DS Parameter Set */
-#pragma pack(1)
-typedef struct tagWLAN_IE_DS_PARMS {
-    u8   byElementID;
-    u8   len;
-    u8   byCurrChannel;
-} __attribute__ ((__packed__))
-WLAN_IE_DS_PARMS,  *PWLAN_IE_DS_PARMS;
-
-/* CF Parameter Set */
-#pragma pack(1)
-typedef struct tagWLAN_IE_CF_PARMS {
-    u8   byElementID;
-    u8   len;
-    u8   byCFPCount;
-    u8   byCFPPeriod;
-    u16   wCFPMaxDuration;
-    u16   wCFPDurRemaining;
-} __attribute__ ((__packed__))
-WLAN_IE_CF_PARMS,  *PWLAN_IE_CF_PARMS;
-
-/* TIM */
-#pragma pack(1)
-typedef struct tagWLAN_IE_TIM {
-    u8   byElementID;
-    u8   len;
-    u8   byDTIMCount;
-    u8   byDTIMPeriod;
-    u8   byBitMapCtl;
-    u8   byVirtBitMap[1];
-} __attribute__ ((__packed__))
-WLAN_IE_TIM,  *PWLAN_IE_TIM;
-
-/* IBSS Parameter Set */
-#pragma pack(1)
-typedef struct tagWLAN_IE_IBSS_PARMS {
-    u8   byElementID;
-    u8   len;
-    u16   wATIMWindow;
-} __attribute__ ((__packed__))
-WLAN_IE_IBSS_PARMS, *PWLAN_IE_IBSS_PARMS;
-
-/* Challenge Text */
-#pragma pack(1)
-typedef struct tagWLAN_IE_CHALLENGE {
-    u8   byElementID;
-    u8   len;
-    u8   abyChallenge[1];
-} __attribute__ ((__packed__))
-WLAN_IE_CHALLENGE,  *PWLAN_IE_CHALLENGE;
-
-#pragma pack(1)
-typedef struct tagWLAN_IE_RSN_EXT {
-    u8 byElementID;
-    u8 len;
-    u8 abyOUI[4];
-    u16 wVersion;
-    u8 abyMulticast[4];
-    u16 wPKCount;
-       struct {
-               u8 abyOUI[4];
-       } PKSList[1];
-       /* the rest is variable so need to overlay ieauth structure */
-} WLAN_IE_RSN_EXT, *PWLAN_IE_RSN_EXT;
-
-#pragma pack(1)
-typedef struct tagWLAN_IE_RSN_AUTH {
-    u16 wAuthCount;
-    struct {
-        u8 abyOUI[4];
-    } AuthKSList[1];
-} WLAN_IE_RSN_AUTH, *PWLAN_IE_RSN_AUTH;
-
-/* RSN Identity */
-#pragma pack(1)
-typedef struct tagWLAN_IE_RSN {
-    u8   byElementID;
-    u8   len;
-    u16   wVersion;
-    u8   abyRSN[WLAN_MIN_ARRAY];
-} WLAN_IE_RSN, *PWLAN_IE_RSN;
-
-/* CCX Identity DavidWang */
-#pragma pack(1)
-typedef struct tagWLAN_IE_CCX {
-u8   byElementID;
-u8   len;
-u8   abyCCX[30];
-} WLAN_IE_CCX, *PWLAN_IE_CCX;
-#pragma pack(1)
-typedef struct tagWLAN_IE_CCX_IP {
-u8   byElementID;
-u8   len;
-u8   abyCCXOUI[4];
-u8   abyCCXIP[4];
-u8   abyCCXREV[2];
-} WLAN_IE_CCX_IP, *PWLAN_IE_CCX_IP;
-#pragma pack(1)
-typedef struct tagWLAN_IE_CCX_Ver {
-u8   byElementID;
-u8   len;
-u8   abyCCXVer[5];
-} WLAN_IE_CCX_Ver, *PWLAN_IE_CCX_Ver;
-
-/* ERP */
-#pragma pack(1)
-typedef struct tagWLAN_IE_ERP {
-    u8   byElementID;
-    u8   len;
-    u8   byContext;
-} __attribute__ ((__packed__))
-WLAN_IE_ERP,  *PWLAN_IE_ERP;
-
-#pragma pack(1)
-typedef struct _MEASEURE_REQ {
-    u8                byChannel;
-    u8                abyStartTime[8];
-    u8                abyDuration[2];
-} MEASEURE_REQ, *PMEASEURE_REQ,
-  MEASEURE_REQ_BASIC, *PMEASEURE_REQ_BASIC,
-  MEASEURE_REQ_CCA, *PMEASEURE_REQ_CCA,
-  MEASEURE_REQ_RPI, *PMEASEURE_REQ_RPI;
-
-typedef struct _MEASEURE_REP_BASIC {
-    u8                byChannel;
-    u8                abyStartTime[8];
-    u8                abyDuration[2];
-    u8                byMap;
-} MEASEURE_REP_BASIC, *PMEASEURE_REP_BASIC;
-
-typedef struct _MEASEURE_REP_CCA {
-    u8                byChannel;
-    u8                abyStartTime[8];
-    u8                abyDuration[2];
-    u8                byCCABusyFraction;
-} MEASEURE_REP_CCA, *PMEASEURE_REP_CCA;
-
-typedef struct _MEASEURE_REP_RPI {
-    u8                byChannel;
-    u8                abyStartTime[8];
-    u8                abyDuration[2];
-    u8                abyRPIdensity[8];
-} MEASEURE_REP_RPI, *PMEASEURE_REP_RPI;
-
-typedef union _MEASEURE_REP {
-
-    MEASEURE_REP_BASIC  sBasic;
-    MEASEURE_REP_CCA    sCCA;
-    MEASEURE_REP_RPI    sRPI;
-
-} MEASEURE_REP, *PMEASEURE_REP;
-
-typedef struct _WLAN_IE_MEASURE_REQ {
-    u8                byElementID;
-    u8                len;
-    u8                byToken;
-    u8                byMode;
-    u8                byType;
-    MEASEURE_REQ        sReq;
-} WLAN_IE_MEASURE_REQ, *PWLAN_IE_MEASURE_REQ;
-
-typedef struct _WLAN_IE_MEASURE_REP {
-    u8                byElementID;
-    u8                len;
-    u8                byToken;
-    u8                byMode;
-    u8                byType;
-    MEASEURE_REP        sRep;
-} WLAN_IE_MEASURE_REP, *PWLAN_IE_MEASURE_REP;
-
-typedef struct _WLAN_IE_CH_SW {
-    u8                byElementID;
-    u8                len;
-    u8                byMode;
-    u8                byChannel;
-    u8                byCount;
-} WLAN_IE_CH_SW, *PWLAN_IE_CH_SW;
-
-typedef struct _WLAN_IE_QUIET {
-    u8                byElementID;
-    u8                len;
-    u8                byQuietCount;
-    u8                byQuietPeriod;
-    u8                abyQuietDuration[2];
-    u8                abyQuietOffset[2];
-} WLAN_IE_QUIET, *PWLAN_IE_QUIET;
-
-typedef struct _WLAN_IE_COUNTRY {
-    u8                byElementID;
-    u8                len;
-    u8                abyCountryString[3];
-    u8                abyCountryInfo[3];
-} WLAN_IE_COUNTRY, *PWLAN_IE_COUNTRY;
-
-typedef struct _WLAN_IE_PW_CONST {
-    u8                byElementID;
-    u8                len;
-    u8                byPower;
-} WLAN_IE_PW_CONST, *PWLAN_IE_PW_CONST;
-
-typedef struct _WLAN_IE_PW_CAP {
-    u8                byElementID;
-    u8                len;
-    u8                byMinPower;
-    u8                byMaxPower;
-} WLAN_IE_PW_CAP, *PWLAN_IE_PW_CAP;
-
-typedef struct _WLAN_IE_SUPP_CH {
-    u8                byElementID;
-    u8                len;
-    u8                abyChannelTuple[2];
-} WLAN_IE_SUPP_CH, *PWLAN_IE_SUPP_CH;
-
-typedef struct _WLAN_IE_TPC_REQ {
-    u8                byElementID;
-    u8                len;
-} WLAN_IE_TPC_REQ, *PWLAN_IE_TPC_REQ;
-
-typedef struct _WLAN_IE_TPC_REP {
-    u8                byElementID;
-    u8                len;
-    u8                byTxPower;
-    u8                byLinkMargin;
-} WLAN_IE_TPC_REP, *PWLAN_IE_TPC_REP;
-
-typedef struct _WLAN_IE_IBSS_DFS {
-    u8                byElementID;
-    u8                len;
-    u8                abyDFSOwner[6];
-    u8                byDFSRecovery;
-    u8                abyChannelMap[2];
-} WLAN_IE_IBSS_DFS, *PWLAN_IE_IBSS_DFS;
-
-#pragma pack()
-
-/* frame types */
-
-/* prototype structure, all mgmt frame types will start with these members */
-typedef struct tagWLAN_FR_MGMT {
-
-    unsigned int                  uType;
-    unsigned int                  len;
-    u8 *                 pBuf;
-    PUWLAN_80211HDR       pHdr;
-
-} WLAN_FR_MGMT,  *PWLAN_FR_MGMT;
-
-/* beacon frame */
-typedef struct tagWLAN_FR_BEACON {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-       /* fixed fields */
-       u64 *pqwTimestamp;
-    u16 *                   pwBeaconInterval;
-    u16 *                   pwCapInfo;
-    /* info elements */
-    PWLAN_IE_SSID           pSSID;
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-/*  PWLAN_IE_FH_PARMS       pFHParms; */
-    PWLAN_IE_DS_PARMS       pDSParms;
-    PWLAN_IE_CF_PARMS       pCFParms;
-    PWLAN_IE_TIM            pTIM;
-    PWLAN_IE_IBSS_PARMS     pIBSSParms;
-    PWLAN_IE_RSN            pRSN;
-    PWLAN_IE_RSN_EXT        pRSNWPA;
-    PWLAN_IE_ERP            pERP;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-    PWLAN_IE_COUNTRY        pIE_Country;
-    PWLAN_IE_PW_CONST       pIE_PowerConstraint;
-    PWLAN_IE_CH_SW          pIE_CHSW;
-    PWLAN_IE_IBSS_DFS       pIE_IBSSDFS;
-    PWLAN_IE_QUIET          pIE_Quiet;
-
-} WLAN_FR_BEACON, *PWLAN_FR_BEACON;
-
-/* IBSS ATIM frame */
-typedef struct tagWLAN_FR_IBSSATIM {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-
-       /* fixed fields */
-       /* info elements */
-       /* this frame type has a null body */
-
-} WLAN_FR_IBSSATIM, *PWLAN_FR_IBSSATIM;
-
-/* disassociation */
-typedef struct tagWLAN_FR_DISASSOC {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    u16 *                   pwReason;
-    /* info elements */
-
-} WLAN_FR_DISASSOC, *PWLAN_FR_DISASSOC;
-
-/* association request */
-typedef struct tagWLAN_FR_ASSOCREQ {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    u16 *                   pwCapInfo;
-    u16 *                   pwListenInterval;
-    /* info elements */
-    PWLAN_IE_SSID           pSSID;
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-    PWLAN_IE_RSN            pRSN;
-    PWLAN_IE_CCX            pCCX;
-    PWLAN_IE_CCX_IP            pCCXIP;
-    PWLAN_IE_CCX_Ver            pCCXVER;
-    PWLAN_IE_RSN_EXT        pRSNWPA;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-    PWLAN_IE_PW_CAP         pCurrPowerCap;
-    PWLAN_IE_SUPP_CH        pCurrSuppCh;
-
-} WLAN_FR_ASSOCREQ, *PWLAN_FR_ASSOCREQ;
-
-/* association response */
-typedef struct tagWLAN_FR_ASSOCRESP {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    u16 *                   pwCapInfo;
-    u16 *                   pwStatus;
-    u16 *                   pwAid;
-    /* info elements */
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-
-} WLAN_FR_ASSOCRESP, *PWLAN_FR_ASSOCRESP;
-
-/* reassociation request */
-typedef struct tagWLAN_FR_REASSOCREQ {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-
-    /* fixed fields */
-    u16 *                   pwCapInfo;
-    u16 *                   pwListenInterval;
-    PIEEE_ADDR              pAddrCurrAP;
-
-    /* info elements */
-    PWLAN_IE_SSID           pSSID;
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-    PWLAN_IE_RSN            pRSN;
-    PWLAN_IE_CCX            pCCX;
-    PWLAN_IE_CCX_IP            pCCXIP;
-    PWLAN_IE_CCX_Ver            pCCXVER;
-    PWLAN_IE_RSN_EXT        pRSNWPA;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-
-} WLAN_FR_REASSOCREQ, *PWLAN_FR_REASSOCREQ;
-
-/* reassociation response */
-typedef struct tagWLAN_FR_REASSOCRESP {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    u16 *                   pwCapInfo;
-    u16 *                   pwStatus;
-    u16 *                   pwAid;
-    /* info elements */
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-
-} WLAN_FR_REASSOCRESP, *PWLAN_FR_REASSOCRESP;
-
-/* probe request */
-typedef struct tagWLAN_FR_PROBEREQ {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    /* info elements */
-    PWLAN_IE_SSID           pSSID;
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-
-} WLAN_FR_PROBEREQ, *PWLAN_FR_PROBEREQ;
-
-/* probe response */
-typedef struct tagWLAN_FR_PROBERESP {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-       u64 *pqwTimestamp;
-    u16 *                   pwBeaconInterval;
-    u16 *                   pwCapInfo;
-    /* info elements */
-    PWLAN_IE_SSID           pSSID;
-    PWLAN_IE_SUPP_RATES     pSuppRates;
-    PWLAN_IE_DS_PARMS       pDSParms;
-    PWLAN_IE_CF_PARMS       pCFParms;
-    PWLAN_IE_IBSS_PARMS     pIBSSParms;
-    PWLAN_IE_RSN            pRSN;
-    PWLAN_IE_RSN_EXT        pRSNWPA;
-    PWLAN_IE_ERP            pERP;
-    PWLAN_IE_SUPP_RATES     pExtSuppRates;
-    PWLAN_IE_COUNTRY        pIE_Country;
-    PWLAN_IE_PW_CONST       pIE_PowerConstraint;
-    PWLAN_IE_CH_SW          pIE_CHSW;
-    PWLAN_IE_IBSS_DFS       pIE_IBSSDFS;
-    PWLAN_IE_QUIET          pIE_Quiet;
-
-} WLAN_FR_PROBERESP, *PWLAN_FR_PROBERESP;
-
-/* authentication */
-typedef struct tagWLAN_FR_AUTHEN {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    u16 *                   pwAuthAlgorithm;
-    u16 *                   pwAuthSequence;
-    u16 *                   pwStatus;
-    /* info elements */
-    PWLAN_IE_CHALLENGE      pChallenge;
-
-} WLAN_FR_AUTHEN, *PWLAN_FR_AUTHEN;
-
-/* deauthentication */
-typedef struct tagWLAN_FR_DEAUTHEN {
-
-    unsigned int                    uType;
-    unsigned int                    len;
-    u8 *                   pBuf;
-    PUWLAN_80211HDR         pHdr;
-    /* fixed fields */
-    u16 *                   pwReason;
-
-    /* info elements */
-
-} WLAN_FR_DEAUTHEN, *PWLAN_FR_DEAUTHEN;
-
-void
-vMgrEncodeBeacon(
-      PWLAN_FR_BEACON  pFrame
-     );
-
-void
-vMgrDecodeBeacon(
-      PWLAN_FR_BEACON  pFrame
-    );
-
-void
-vMgrEncodeDisassociation(
-      PWLAN_FR_DISASSOC  pFrame
-    );
-
-void
-vMgrDecodeDisassociation(
-      PWLAN_FR_DISASSOC  pFrame
-    );
-
-void
-vMgrEncodeAssocRequest(
-      PWLAN_FR_ASSOCREQ  pFrame
-    );
-
-void
-vMgrDecodeAssocRequest(
-      PWLAN_FR_ASSOCREQ  pFrame
-    );
-
-void
-vMgrEncodeAssocResponse(
-      PWLAN_FR_ASSOCRESP  pFrame
-    );
-
-void
-vMgrDecodeAssocResponse(
-     PWLAN_FR_ASSOCRESP  pFrame
-    );
-
-void
-vMgrEncodeReassocRequest(
-      PWLAN_FR_REASSOCREQ  pFrame
-    );
-
-void
-vMgrDecodeReassocRequest(
-      PWLAN_FR_REASSOCREQ  pFrame
-    );
-
-void
-vMgrEncodeProbeRequest(
-     PWLAN_FR_PROBEREQ  pFrame
-    );
-
-void
-vMgrDecodeProbeRequest(
-     PWLAN_FR_PROBEREQ  pFrame
-    );
-
-void
-vMgrEncodeProbeResponse(
-     PWLAN_FR_PROBERESP  pFrame
-    );
-
-void
-vMgrDecodeProbeResponse(
-     PWLAN_FR_PROBERESP  pFrame
-    );
-
-void
-vMgrEncodeAuthen(
-      PWLAN_FR_AUTHEN  pFrame
-    );
-
-void
-vMgrDecodeAuthen(
-      PWLAN_FR_AUTHEN  pFrame
-    );
-
-void
-vMgrEncodeDeauthen(
-      PWLAN_FR_DEAUTHEN  pFrame
-    );
-
-void
-vMgrDecodeDeauthen(
-      PWLAN_FR_DEAUTHEN  pFrame
-    );
-
-void
-vMgrEncodeReassocResponse(
-      PWLAN_FR_REASSOCRESP  pFrame
-    );
-
-#endif /* __80211MGR_H__ */
index f89ab205c8e068166fbe3ad4ae66c3f6e1e3e6ec..b602ef175d55b25b801036b58ea8a361dbdf2c92 100644 (file)
@@ -1,8 +1,6 @@
 config VT6656
        tristate "VIA Technologies VT6656 support"
-       depends on USB && WLAN && m
-       select WIRELESS_EXT
-       select WEXT_PRIV
+       depends on MAC80211 && USB && WLAN && m
        select FW_LOADER
        ---help---
        This is a vendor-written driver for VIA VT6656.
index b5ec483f3eb471b1b313ee48517265e6b92ebc8a..3dbe1f89dd25060cf275d43be584d49b7eb0d2fc 100644 (file)
@@ -6,25 +6,12 @@ vt6656_stage-y +=     main_usb.o \
                        card.o  \
                        mac.o   \
                        baseband.o \
-                       wctl.o  \
-                       80211mgr.o \
                        wcmd.o\
-                       wmgr.o \
-                       bssdb.o \
-                       wpa2.o \
                        rxtx.o \
                        dpc.o \
                        power.o \
-                       datarate.o \
-                       rc4.o \
-                       tether.o \
-                       wpa.o \
                        key.o \
-                       tkip.o \
-                       michael.o \
                        rf.o \
-                       iwctl.o \
-                       wpactl.o \
                        usbpipe.o \
                        channel.o \
                        firmware.o \
index 694e34a5ff9048f135e2304198e75a9ffe4f06f8..f4060a9ed9142f0a276a90efc27226193c9c5705 100644 (file)
@@ -26,8 +26,8 @@
  * Date: Jun. 5, 2002
  *
  * Functions:
- *      BBuGetFrameTime        - Calculate data frame transmitting time
- *      BBvCalculateParameter   - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx
+ *      vnt_get_frame_time        - Calculate data frame transmitting time
+ *      vnt_get_phy_field   - Calculate PhyLength, PhyService and Phy Signal parameter for baseband Tx
  *      BBbVT3184Init          - VIA VT3184 baseband chip init code
  *
  * Revision History:
  *
  */
 
-#include "tmacro.h"
-#include "tether.h"
 #include "mac.h"
 #include "baseband.h"
 #include "rf.h"
 #include "usbpipe.h"
-#include "datarate.h"
 
 static u8 abyVT3184_AGC[] = {
     0x00,   //0
@@ -646,7 +643,7 @@ static const u16 awcFrameTime[MAX_RATE] =
  * Return Value: FrameTime
  *
  */
-unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
+unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
        unsigned int frame_length, u16 tx_rate)
 {
        unsigned int frame_time;
@@ -705,7 +702,7 @@ unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
  * Return Value: none
  *
  */
-void BBvCalculateParameter(struct vnt_private *priv, u32 frame_length,
+void vnt_get_phy_field(struct vnt_private *priv, u32 frame_length,
        u16 tx_rate, u8 pkt_type, struct vnt_phy_field *phy)
 {
        u32 bit_count;
@@ -899,44 +896,7 @@ int BBbVT3184Init(struct vnt_private *priv)
        if (status != STATUS_SUCCESS)
                return false;
 
-       /* zonetype initial */
-       priv->byOriginalZonetype = priv->abyEEPROM[EEP_OFS_ZONETYPE];
-
-       if (priv->config_file.ZoneType >= 0) {
-               if ((priv->config_file.ZoneType == 0) &&
-                       (priv->abyEEPROM[EEP_OFS_ZONETYPE] != 0x00)) {
-                       priv->abyEEPROM[EEP_OFS_ZONETYPE] = 0;
-                       priv->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0B;
-
-                       dev_dbg(&priv->usb->dev, "Init Zone Type :USA\n");
-               } else if ((priv->config_file.ZoneType == 1) &&
-                       (priv->abyEEPROM[EEP_OFS_ZONETYPE] != 0x01)) {
-                       priv->abyEEPROM[EEP_OFS_ZONETYPE] = 0x01;
-                       priv->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D;
-
-                       dev_dbg(&priv->usb->dev, "Init Zone Type :Japan\n");
-               } else if ((priv->config_file.ZoneType == 2) &&
-                       (priv->abyEEPROM[EEP_OFS_ZONETYPE] != 0x02)) {
-                       priv->abyEEPROM[EEP_OFS_ZONETYPE] = 0x02;
-                       priv->abyEEPROM[EEP_OFS_MAXCHANNEL] = 0x0D;
-
-                       dev_dbg(&priv->usb->dev, "Init Zone Type :Europe\n");
-               } else {
-                       if (priv->config_file.ZoneType !=
-                                       priv->abyEEPROM[EEP_OFS_ZONETYPE])
-                               printk("zonetype in file[%02x]\
-                                        mismatch with in EEPROM[%02x]\n",
-                                       priv->config_file.ZoneType,
-                                       priv->abyEEPROM[EEP_OFS_ZONETYPE]);
-                       else
-                               printk("Read Zonetype file success,\
-                                       use default zonetype setting[%02x]\n",
-                                       priv->config_file.ZoneType);
-               }
-       }
-
-       if (!priv->bZoneRegExist)
-               priv->byZoneType = priv->abyEEPROM[EEP_OFS_ZONETYPE];
+       priv->byZoneType = priv->abyEEPROM[EEP_OFS_ZONETYPE];
 
        priv->byRFType = priv->abyEEPROM[EEP_OFS_RFTYPE];
 
@@ -994,7 +954,7 @@ int BBbVT3184Init(struct vnt_private *priv)
                priv->ldBmThreshold[2] = 0;
                priv->ldBmThreshold[3] = 0;
                /* Fix VT3226 DFC system timing issue */
-               MACvRegBitsOn(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
+               vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
        } else if ((priv->byRFType == RF_VT3342A0)) {
                priv->byBBRxConf = abyVT3184_VT3226D0[10];
                length = sizeof(abyVT3184_VT3226D0);
@@ -1011,7 +971,7 @@ int BBbVT3184Init(struct vnt_private *priv)
                priv->ldBmThreshold[2] = 0;
                priv->ldBmThreshold[3] = 0;
                /* Fix VT3226 DFC system timing issue */
-               MACvRegBitsOn(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
+               vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL2, SOFTPWRCTL_RFLEOPT);
        } else {
                return true;
        }
@@ -1030,11 +990,11 @@ int BBbVT3184Init(struct vnt_private *priv)
                (priv->byRFType == RF_VT3342A0)) {
                vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
                                                MAC_REG_ITRTMSET, 0x23);
-               MACvRegBitsOn(priv, MAC_REG_PAPEDELAY, 0x01);
+               vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01);
        } else if (priv->byRFType == RF_VT3226D0) {
                vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
                                                MAC_REG_ITRTMSET, 0x11);
-               MACvRegBitsOn(priv, MAC_REG_PAPEDELAY, 0x01);
+               vnt_mac_reg_bits_on(priv, MAC_REG_PAPEDELAY, 0x01);
        }
 
        vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x04, 0x7f);
index 3044d6c4205053065671e5bf80de6f090c5620fc..c73244b11bf9b1c6136f53ff68fac599c19563c6 100644 (file)
@@ -33,7 +33,6 @@
 #ifndef __BASEBAND_H__
 #define __BASEBAND_H__
 
-#include "tether.h"
 #include "device.h"
 
 #define PREAMBLE_LONG   0
@@ -88,10 +87,10 @@ struct vnt_phy_field {
        __le16 len;
 } __packed;
 
-unsigned int BBuGetFrameTime(u8 preamble_type, u8 pkt_type,
+unsigned int vnt_get_frame_time(u8 preamble_type, u8 pkt_type,
        unsigned int frame_length, u16 tx_rate);
 
-void BBvCalculateParameter(struct vnt_private *, u32 frame_length,
+void vnt_get_phy_field(struct vnt_private *, u32 frame_length,
        u16 tx_rate, u8 pkt_type, struct vnt_phy_field *);
 
 void BBvSetShortSlotTime(struct vnt_private *);
diff --git a/drivers/staging/vt6656/bssdb.c b/drivers/staging/vt6656/bssdb.c
deleted file mode 100644 (file)
index 8e9ce96..0000000
+++ /dev/null
@@ -1,1466 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: bssdb.c
- *
- * Purpose: Handles the Basic Service Set & Node Database functions
- *
- * Functions:
- *     BSSpSearchBSSList       - Search known BSS list for Desire SSID or BSSID
- *     BSSvClearBSSList        - Clear BSS List
- *     BSSbInsertToBSSList     - Insert a BSS set into known BSS list
- *     BSSbUpdateToBSSList     - Update BSS set in known BSS list
- *     BSSbIsSTAInNodeDB       - Search Node DB table to find the index of matched DstAddr
- *     BSSvCreateOneNode       - Allocate an Node for Node DB
- *     BSSvUpdateAPNode        - Update AP Node content in Index 0 of KnownNodeDB
- *     BSSvSecondCallBack      - One second timer callback function to update Node DB info & AP link status
- *     BSSvUpdateNodeTxCounter - Update Tx attemps, Tx failure counter in Node DB for auto-fallback rate control
- *
- * Revision History:
- *
- * Author: Lyndon Chen
- *
- * Date: July 17, 2002
- */
-
-#include "tmacro.h"
-#include "tether.h"
-#include "device.h"
-#include "80211hdr.h"
-#include "bssdb.h"
-#include "wmgr.h"
-#include "datarate.h"
-#include "desc.h"
-#include "wcmd.h"
-#include "wpa.h"
-#include "baseband.h"
-#include "rf.h"
-#include "card.h"
-#include "mac.h"
-#include "wpa2.h"
-#include "usbpipe.h"
-#include "iowpa.h"
-#include "power.h"
-
-static int msglevel = MSG_LEVEL_INFO;
-/* static int msglevel = MSG_LEVEL_DEBUG; */
-
-static const u16 awHWRetry0[5][5] = {
-                       {RATE_18M, RATE_18M, RATE_12M, RATE_12M, RATE_12M},
-                       {RATE_24M, RATE_24M, RATE_18M, RATE_12M, RATE_12M},
-                       {RATE_36M, RATE_36M, RATE_24M, RATE_18M, RATE_18M},
-                       {RATE_48M, RATE_48M, RATE_36M, RATE_24M, RATE_24M},
-                       {RATE_54M, RATE_54M, RATE_48M, RATE_36M, RATE_36M}
-               };
-static const u16 awHWRetry1[5][5] = {
-                       {RATE_18M, RATE_18M, RATE_12M, RATE_6M, RATE_6M},
-                       {RATE_24M, RATE_24M, RATE_18M, RATE_6M, RATE_6M},
-                       {RATE_36M, RATE_36M, RATE_24M, RATE_12M, RATE_12M},
-                       {RATE_48M, RATE_48M, RATE_24M, RATE_12M, RATE_12M},
-                       {RATE_54M, RATE_54M, RATE_36M, RATE_18M, RATE_18M}
-               };
-
-static void s_vCheckSensitivity(struct vnt_private *pDevice);
-static void s_vCheckPreEDThreshold(struct vnt_private *pDevice);
-static void s_uCalculateLinkQual(struct vnt_private *pDevice);
-
-/*
- * Routine Description:
- *       Search known BSS list for Desire SSID or BSSID.
- *
- * Return Value:
- *       PTR to KnownBSS or NULL
- */
-PKnownBSS BSSpSearchBSSList(struct vnt_private *pDevice,
-                           u8 *pbyDesireBSSID, u8 *pbyDesireSSID,
-                           CARD_PHY_TYPE ePhyType)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u8 *pbyBSSID = NULL;
-       PWLAN_IE_SSID pSSID = NULL;
-       PKnownBSS pCurrBSS = NULL;
-       PKnownBSS pSelect = NULL;
-       u8 ZeroBSSID[WLAN_BSSID_LEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
-       int ii = 0;
-       int jj = 0;
-
-       if (pbyDesireBSSID) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                       "BSSpSearchBSSList BSSID[%pM]\n", pbyDesireBSSID);
-               if (!is_broadcast_ether_addr(pbyDesireBSSID) &&
-                   memcmp(pbyDesireBSSID, ZeroBSSID, 6) != 0)
-                       pbyBSSID = pbyDesireBSSID;
-       }
-       if (pbyDesireSSID &&
-           ((PWLAN_IE_SSID) pbyDesireSSID)->len != 0)
-               pSSID = (PWLAN_IE_SSID) pbyDesireSSID;
-
-       if (pbyBSSID && pDevice->bRoaming == false) {
-               /* match BSSID first */
-               for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-                       pCurrBSS = &(pMgmt->sBSSList[ii]);
-
-                       pCurrBSS->bSelected = false;
-
-                       if (pCurrBSS->bActive &&
-                           pCurrBSS->bSelected == false &&
-                           ether_addr_equal(pCurrBSS->abyBSSID, pbyBSSID)) {
-                               if (pSSID) {
-                                       /* compare ssid */
-                                       if (!memcmp(pSSID->abySSID,
-                                                    ((PWLAN_IE_SSID) pCurrBSS->abySSID)->abySSID,
-                                                    pSSID->len) &&
-                                           (pMgmt->eConfigMode == WMAC_CONFIG_AUTO ||
-                                            (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA &&
-                                             WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
-                                            (pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA &&
-                                             WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)))) {
-
-                                               pCurrBSS->bSelected = true;
-                                               return pCurrBSS;
-                                       }
-                               } else if (pMgmt->eConfigMode == WMAC_CONFIG_AUTO ||
-                                          (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA &&
-                                           WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo)) ||
-                                          (pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA &&
-                                           WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo))) {
-                                       pCurrBSS->bSelected = true;
-                                       return pCurrBSS;
-                               }
-                       }
-               }
-       } else {
-               /* ignore BSSID */
-               for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-                       pCurrBSS = &(pMgmt->sBSSList[ii]);
-
-                       /* 2007-0721-01<Mark>by MikeLiu
-                        *   if ((pCurrBSS->bActive) &&
-                        *                (pCurrBSS->bSelected == false)) { */
-
-                       pCurrBSS->bSelected = false;
-                       if (pCurrBSS->bActive) {
-
-                               if (pSSID &&
-                                   /* matched SSID */
-                                   (memcmp(pSSID->abySSID,
-                                           ((PWLAN_IE_SSID) pCurrBSS->abySSID)->abySSID,
-                                           pSSID->len) ||
-                                    pSSID->len !=
-                                       ((PWLAN_IE_SSID) pCurrBSS->abySSID)->len)) {
-                                       /* SSID not match skip this BSS */
-                                       continue;
-                               }
-
-                               if ((pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA &&
-                                    WLAN_GET_CAP_INFO_ESS(pCurrBSS->wCapInfo)) ||
-                                   (pMgmt->eConfigMode == WMAC_CONFIG_ESS_STA &&
-                                    WLAN_GET_CAP_INFO_IBSS(pCurrBSS->wCapInfo))) {
-                                       /* Type not match skip this BSS */
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO "BSS type mismatch.... Config[%d] BSS[0x%04x]\n",
-                                               pMgmt->eConfigMode,
-                                               pCurrBSS->wCapInfo);
-                                       continue;
-                               }
-
-                               if (ePhyType != PHY_TYPE_AUTO &&
-                                   ((ePhyType == PHY_TYPE_11A &&
-                                    PHY_TYPE_11A != pCurrBSS->eNetworkTypeInUse) ||
-                                   (ePhyType != PHY_TYPE_11A &&
-                                    PHY_TYPE_11A == pCurrBSS->eNetworkTypeInUse))) {
-                                       /* PhyType not match skip this BSS */
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO "Physical type mismatch.... ePhyType[%d] BSS[%d]\n",
-                                               ePhyType,
-                                               pCurrBSS->eNetworkTypeInUse);
-                                       continue;
-                               }
-
-                               pMgmt->pSameBSS[jj].uChannel = pCurrBSS->uChannel;
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                                       "BSSpSearchBSSList pSelect1[%pM]\n",
-                                       pCurrBSS->abyBSSID);
-                               jj++;
-
-                               if (!pSelect)
-                                       pSelect = pCurrBSS;
-                               /* compare RSSI, select the strongest signal */
-                               else if (pCurrBSS->uRSSI < pSelect->uRSSI)
-                                       pSelect = pCurrBSS;
-                       }
-               }
-
-               pDevice->bSameBSSMaxNum = jj;
-
-               if (pSelect) {
-                       pSelect->bSelected = true;
-                       if (pDevice->bRoaming == false) {
-                               /* Einsn Add @20070907 */
-                               memcpy(pbyDesireSSID,
-                                      pCurrBSS->abySSID,
-                                      WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-                       }
-
-                       return pSelect;
-               }
-       }
-       return NULL;
-
-}
-
-/*
- * Routine Description:
- *       Clear BSS List
- *
- * Return Value:
- *       None.
- */
-void BSSvClearBSSList(struct vnt_private *pDevice, int bKeepCurrBSSID)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int ii;
-
-       for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-               if (bKeepCurrBSSID &&
-                   pMgmt->sBSSList[ii].bActive &&
-                   ether_addr_equal(pMgmt->sBSSList[ii].abyBSSID,
-                                    pMgmt->abyCurrBSSID)) {
-
-                       /* mike mark:
-                        * there are two BSSID's in list. If that AP is
-                        * in hidden ssid mode, one SSID is null, but
-                        * other's might not be obvious, so if it
-                        * associate's with your STA, you must keep the
-                        * two of them!!  bKeepCurrBSSID = false;
-                        */
-
-                       continue;
-               }
-
-               pMgmt->sBSSList[ii].bActive = false;
-               memset(&pMgmt->sBSSList[ii], 0, sizeof(KnownBSS));
-       }
-       BSSvClearAnyBSSJoinRecord(pDevice);
-}
-
-/*
- * Routine Description:
- *       search BSS list by BSSID & SSID if matched
- *
- * Return Value:
- *       true if found.
- */
-PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *pDevice,
-                             u8 *abyBSSID,
-                             PWLAN_IE_SSID pSSID)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PKnownBSS pBSSList = NULL;
-       int ii;
-
-       for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-               pBSSList = &(pMgmt->sBSSList[ii]);
-               if (pBSSList->bActive &&
-                   ether_addr_equal(pBSSList->abyBSSID, abyBSSID) &&
-                   pSSID->len == ((PWLAN_IE_SSID) pBSSList->abySSID)->len &&
-                   memcmp(pSSID->abySSID,
-                           ((PWLAN_IE_SSID) pBSSList->abySSID)->abySSID,
-                           pSSID->len) == 0)
-                       return pBSSList;
-       }
-
-       return NULL;
-}
-
-/*
- * Routine Description:
- *       Insert a BSS set into known BSS list
- *
- * Return Value:
- *       true if success.
- */
-int BSSbInsertToBSSList(struct vnt_private *pDevice,
-                       u8 *abyBSSIDAddr,
-                       u64 qwTimestamp,
-                       u16 wBeaconInterval,
-                       u16 wCapInfo,
-                       u8 byCurrChannel,
-                       PWLAN_IE_SSID pSSID,
-                       PWLAN_IE_SUPP_RATES pSuppRates,
-                       PWLAN_IE_SUPP_RATES pExtSuppRates,
-                       PERPObject psERP,
-                       PWLAN_IE_RSN pRSN,
-                       PWLAN_IE_RSN_EXT pRSNWPA,
-                       PWLAN_IE_COUNTRY pIE_Country,
-                       PWLAN_IE_QUIET pIE_Quiet,
-                       u32 uIELength,
-                       u8 *pbyIEs,
-                       void *pRxPacketContext)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_rx_mgmt *pRxPacket =
-               (struct vnt_rx_mgmt *) pRxPacketContext;
-       PKnownBSS pBSSList = NULL;
-       unsigned int ii;
-       bool bParsingQuiet = false;
-
-       pBSSList = (PKnownBSS) &(pMgmt->sBSSList[0]);
-
-       for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-               pBSSList = (PKnownBSS) &(pMgmt->sBSSList[ii]);
-               if (!pBSSList->bActive)
-                       break;
-       }
-
-       if (ii == MAX_BSS_NUM) {
-               DBG_PRT(MSG_LEVEL_DEBUG,
-                       KERN_INFO "Get free KnowBSS node failed.\n");
-               return false;
-       }
-       /* save the BSS info */
-       pBSSList->bActive = true;
-       memcpy(pBSSList->abyBSSID, abyBSSIDAddr, WLAN_BSSID_LEN);
-       pBSSList->qwBSSTimestamp = cpu_to_le64(qwTimestamp);
-       pBSSList->wBeaconInterval = cpu_to_le16(wBeaconInterval);
-       pBSSList->wCapInfo = cpu_to_le16(wCapInfo);
-       pBSSList->uClearCount = 0;
-
-       if (pSSID->len > WLAN_SSID_MAXLEN)
-               pSSID->len = WLAN_SSID_MAXLEN;
-       memcpy(pBSSList->abySSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
-
-       pBSSList->uChannel = byCurrChannel;
-
-       if (pSuppRates->len > WLAN_RATES_MAXLEN)
-               pSuppRates->len = WLAN_RATES_MAXLEN;
-       memcpy(pBSSList->abySuppRates, pSuppRates,
-              pSuppRates->len + WLAN_IEHDR_LEN);
-
-       if (pExtSuppRates) {
-               if (pExtSuppRates->len > WLAN_RATES_MAXLEN)
-                       pExtSuppRates->len = WLAN_RATES_MAXLEN;
-               memcpy(pBSSList->abyExtSuppRates, pExtSuppRates,
-                      pExtSuppRates->len + WLAN_IEHDR_LEN);
-               DBG_PRT(MSG_LEVEL_DEBUG,
-                       KERN_INFO "BSSbInsertToBSSList: pExtSuppRates->len = %d\n",
-                       pExtSuppRates->len);
-
-       } else {
-               memset(pBSSList->abyExtSuppRates, 0,
-                      WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
-       }
-       pBSSList->sERP.byERP = psERP->byERP;
-       pBSSList->sERP.bERPExist = psERP->bERPExist;
-
-       /* Check if BSS is 802.11a/b/g */
-       if (pBSSList->uChannel > CB_MAX_CHANNEL_24G)
-               pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
-       else if (pBSSList->sERP.bERPExist == true)
-               pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
-       else
-               pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
-
-       pBSSList->byRxRate = pRxPacket->byRxRate;
-       pBSSList->qwLocalTSF = pRxPacket->qwLocalTSF;
-       pBSSList->uRSSI = pRxPacket->uRSSI;
-       pBSSList->bySQ = pRxPacket->bySQ;
-
-       if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA &&
-           pMgmt->eCurrState == WMAC_STATE_ASSOC &&
-           /* assoc with BSS */
-           pBSSList == pMgmt->pCurrBSS)
-               bParsingQuiet = true;
-
-       WPA_ClearRSN(pBSSList);
-
-       if (pRSNWPA) {
-               unsigned int uLen = pRSNWPA->len + 2;
-
-               if (uLen <= (uIELength -
-                            (unsigned int) (u32) ((u8 *) pRSNWPA - pbyIEs))) {
-                       pBSSList->wWPALen = uLen;
-                       memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
-                       WPA_ParseRSN(pBSSList, pRSNWPA);
-               }
-       }
-
-       WPA2_ClearRSN(pBSSList);
-
-       if (pRSN) {
-               unsigned int uLen = pRSN->len + 2;
-
-               if (uLen <= (uIELength -
-                            (unsigned int) (u32) ((u8 *) pRSN - pbyIEs))) {
-                       pBSSList->wRSNLen = uLen;
-                       memcpy(pBSSList->byRSNIE, pRSN, uLen);
-                       WPA2vParseRSN(pBSSList, pRSN);
-               }
-       }
-
-       if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2 ||
-           pBSSList->bWPA2Valid == true) {
-
-               PSKeyItem  pTransmitKey = NULL;
-               bool       bIs802_1x = false;
-
-               for (ii = 0; ii < pBSSList->wAKMSSAuthCount; ii++) {
-                       if (pBSSList->abyAKMSSAuthType[ii] ==
-                                       WLAN_11i_AKMSS_802_1X) {
-                               bIs802_1x = true;
-                               break;
-                       }
-               }
-               if (bIs802_1x == true &&
-                   pSSID->len == ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->len &&
-                   !memcmp(pSSID->abySSID,
-                            ((PWLAN_IE_SSID) pMgmt->abyDesireSSID)->abySSID,
-                            pSSID->len)) {
-
-                       bAdd_PMKID_Candidate((void *) pDevice,
-                                        pBSSList->abyBSSID,
-                                        &pBSSList->sRSNCapObj);
-
-                       if (pDevice->bLinkPass == true &&
-                           pMgmt->eCurrState == WMAC_STATE_ASSOC &&
-                           (KeybGetTransmitKey(&(pDevice->sKey),
-                                                pDevice->abyBSSID,
-                                                PAIRWISE_KEY,
-                                                &pTransmitKey) == true ||
-                            KeybGetTransmitKey(&(pDevice->sKey),
-                                                pDevice->abyBSSID,
-                                                GROUP_KEY,
-                                                &pTransmitKey) == true)) {
-                               pDevice->gsPMKIDCandidate.StatusType =
-                                       Ndis802_11StatusType_PMKID_CandidateList;
-                               pDevice->gsPMKIDCandidate.Version = 1;
-
-
-                       }
-               }
-       }
-
-       /* Monitor if RSSI is too strong. */
-       pBSSList->byRSSIStatCnt = 0;
-
-       vnt_rf_rssi_to_dbm(pDevice, (u8)pRxPacket->uRSSI, &pBSSList->ldBmMAX);
-
-       pBSSList->ldBmAverage[0] = pBSSList->ldBmMAX;
-       pBSSList->ldBmAverRange = pBSSList->ldBmMAX;
-       for (ii = 1; ii < RSSI_STAT_COUNT; ii++)
-               pBSSList->ldBmAverage[ii] = 0;
-
-       pBSSList->uIELength = uIELength;
-       if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN)
-               pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
-       memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength);
-
-       return true;
-}
-
-/*
- * Routine Description:
- *       Update BSS set in known BSS list
- *
- * Return Value:
- *       true if success.
- */
-/* TODO: input structure modify */
-int BSSbUpdateToBSSList(struct vnt_private *pDevice,
-                       u64 qwTimestamp,
-                       u16 wBeaconInterval,
-                       u16 wCapInfo,
-                       u8 byCurrChannel,
-                       int bChannelHit,
-                       PWLAN_IE_SSID pSSID,
-                       PWLAN_IE_SUPP_RATES pSuppRates,
-                       PWLAN_IE_SUPP_RATES pExtSuppRates,
-                       PERPObject psERP,
-                       PWLAN_IE_RSN pRSN,
-                       PWLAN_IE_RSN_EXT pRSNWPA,
-                       PWLAN_IE_COUNTRY pIE_Country,
-                       PWLAN_IE_QUIET pIE_Quiet,
-                       PKnownBSS pBSSList,
-                       u32 uIELength,
-                       u8 *pbyIEs,
-                       void *pRxPacketContext)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_rx_mgmt *pRxPacket =
-               (struct vnt_rx_mgmt *) pRxPacketContext;
-       int ii, jj;
-       signed long ldBm, ldBmSum;
-       bool bParsingQuiet = false;
-
-       if (!pBSSList)
-               return false;
-
-       pBSSList->qwBSSTimestamp = cpu_to_le64(qwTimestamp);
-
-       pBSSList->wBeaconInterval = cpu_to_le16(wBeaconInterval);
-       pBSSList->wCapInfo = cpu_to_le16(wCapInfo);
-       pBSSList->uClearCount = 0;
-       pBSSList->uChannel = byCurrChannel;
-
-       if (pSSID->len > WLAN_SSID_MAXLEN)
-               pSSID->len = WLAN_SSID_MAXLEN;
-
-       if (pSSID->len != 0 && pSSID->abySSID[0] != 0)
-               memcpy(pBSSList->abySSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
-       memcpy(pBSSList->abySuppRates, pSuppRates,
-              pSuppRates->len + WLAN_IEHDR_LEN);
-
-       if (pExtSuppRates)
-               memcpy(pBSSList->abyExtSuppRates, pExtSuppRates,
-                      pExtSuppRates->len + WLAN_IEHDR_LEN);
-       else
-               memset(pBSSList->abyExtSuppRates, 0,
-                      WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
-       pBSSList->sERP.byERP = psERP->byERP;
-       pBSSList->sERP.bERPExist = psERP->bERPExist;
-
-       /* Check if BSS is 802.11a/b/g */
-       if (pBSSList->uChannel > CB_MAX_CHANNEL_24G)
-               pBSSList->eNetworkTypeInUse = PHY_TYPE_11A;
-       else if (pBSSList->sERP.bERPExist == true)
-               pBSSList->eNetworkTypeInUse = PHY_TYPE_11G;
-       else
-               pBSSList->eNetworkTypeInUse = PHY_TYPE_11B;
-
-       pBSSList->byRxRate = pRxPacket->byRxRate;
-       pBSSList->qwLocalTSF = pRxPacket->qwLocalTSF;
-       if (bChannelHit)
-               pBSSList->uRSSI = pRxPacket->uRSSI;
-       pBSSList->bySQ = pRxPacket->bySQ;
-
-       if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA &&
-           pMgmt->eCurrState == WMAC_STATE_ASSOC &&
-           /* assoc with BSS */
-           pBSSList == pMgmt->pCurrBSS)
-               bParsingQuiet = true;
-
-       WPA_ClearRSN(pBSSList); /* mike update */
-
-       if (pRSNWPA) {
-               unsigned int uLen = pRSNWPA->len + 2;
-               if (uLen <= (uIELength -
-                            (unsigned int) (u32) ((u8 *) pRSNWPA - pbyIEs))) {
-                       pBSSList->wWPALen = uLen;
-                       memcpy(pBSSList->byWPAIE, pRSNWPA, uLen);
-                       WPA_ParseRSN(pBSSList, pRSNWPA);
-               }
-       }
-
-       WPA2_ClearRSN(pBSSList); /* mike update */
-
-       if (pRSN) {
-               unsigned int uLen = pRSN->len + 2;
-               if (uLen <= (uIELength -
-                            (unsigned int) (u32) ((u8 *) pRSN - pbyIEs))) {
-                       pBSSList->wRSNLen = uLen;
-                       memcpy(pBSSList->byRSNIE, pRSN, uLen);
-                       WPA2vParseRSN(pBSSList, pRSN);
-               }
-       }
-
-       if (pRxPacket->uRSSI != 0) {
-               vnt_rf_rssi_to_dbm(pDevice, (u8)pRxPacket->uRSSI, &ldBm);
-               /* Monitor if RSSI is too strong. */
-               pBSSList->byRSSIStatCnt++;
-               pBSSList->byRSSIStatCnt %= RSSI_STAT_COUNT;
-               pBSSList->ldBmAverage[pBSSList->byRSSIStatCnt] = ldBm;
-               ldBmSum = 0;
-               for (ii = 0, jj = 0; ii < RSSI_STAT_COUNT; ii++) {
-                       if (pBSSList->ldBmAverage[ii] != 0) {
-                               pBSSList->ldBmMAX =
-                                       max(pBSSList->ldBmAverage[ii], ldBm);
-                               ldBmSum +=
-                                       pBSSList->ldBmAverage[ii];
-                               jj++;
-                       }
-               }
-               pBSSList->ldBmAverRange = ldBmSum / jj;
-       }
-
-       pBSSList->uIELength = uIELength;
-       if (pBSSList->uIELength > WLAN_BEACON_FR_MAXLEN)
-               pBSSList->uIELength = WLAN_BEACON_FR_MAXLEN;
-       memcpy(pBSSList->abyIEs, pbyIEs, pBSSList->uIELength);
-
-       return true;
-}
-
-/*
- * Routine Description:
- *       Search Node DB table to find the index of matched DstAddr
- *
- * Return Value:
- *       None
- */
-int BSSbIsSTAInNodeDB(struct vnt_private *pDevice,
-                     u8 *abyDstAddr,
-                     u32 *puNodeIndex)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       unsigned int ii;
-
-       /* Index = 0 reserved for AP Node */
-       for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
-               if (pMgmt->sNodeDBTable[ii].bActive &&
-                   ether_addr_equal(abyDstAddr,
-                                    pMgmt->sNodeDBTable[ii].abyMACAddr)) {
-                       *puNodeIndex = ii;
-                       return true;
-               }
-       }
-
-       return false;
-};
-
-/*
- * Routine Description:
- *       Find an empty node and allocate it; if no empty node
- *       is found, then use the most inactive one.
- *
- * Return Value:
- *       None
- */
-void BSSvCreateOneNode(struct vnt_private *pDevice, u32 *puNodeIndex)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int ii;
-       u32 BigestCount = 0;
-       u32 SelectIndex;
-       struct sk_buff *skb;
-
-       /* Index = 0 reserved for AP Node (In STA mode)
-          Index = 0 reserved for Broadcast/MultiCast (In AP mode) */
-       SelectIndex = 1;
-       for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
-               if (pMgmt->sNodeDBTable[ii].bActive) {
-                       if (pMgmt->sNodeDBTable[ii].uInActiveCount > BigestCount) {
-                               BigestCount =
-                                       pMgmt->sNodeDBTable[ii].uInActiveCount;
-                               SelectIndex = ii;
-                       }
-               } else {
-                       break;
-               }
-       }
-
-       /* if not found replace uInActiveCount with the largest one. */
-       if (ii == (MAX_NODE_NUM + 1)) {
-               *puNodeIndex = SelectIndex;
-               DBG_PRT(MSG_LEVEL_DEBUG,
-                       KERN_INFO "Replace inactive node = %d\n", SelectIndex);
-               /* clear ps buffer */
-               if (pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue.next) {
-                       while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue)))
-                               dev_kfree_skb(skb);
-               }
-       } else {
-               *puNodeIndex = ii;
-       }
-
-       memset(&pMgmt->sNodeDBTable[*puNodeIndex], 0, sizeof(KnownNodeDB));
-       pMgmt->sNodeDBTable[*puNodeIndex].bActive = true;
-       pMgmt->sNodeDBTable[*puNodeIndex].uRatePollTimeout = FALLBACK_POLL_SECOND;
-       /* for AP mode PS queue */
-       skb_queue_head_init(&pMgmt->sNodeDBTable[*puNodeIndex].sTxPSQueue);
-       pMgmt->sNodeDBTable[*puNodeIndex].byAuthSequence = 0;
-       pMgmt->sNodeDBTable[*puNodeIndex].wEnQueueCnt = 0;
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create node index = %d\n", ii);
-}
-
-/*
- * Routine Description:
- *       Remove Node by NodeIndex
- *
- *
- * Return Value:
- *       None
- */
-void BSSvRemoveOneNode(struct vnt_private *pDevice, u32 uNodeIndex)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
-       struct sk_buff *skb;
-
-       while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[uNodeIndex].sTxPSQueue)))
-               dev_kfree_skb(skb);
-       /* clear context */
-       memset(&pMgmt->sNodeDBTable[uNodeIndex], 0, sizeof(KnownNodeDB));
-       /* clear tx bit map */
-       pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[uNodeIndex].wAID >> 3] &=
-               ~byMask[pMgmt->sNodeDBTable[uNodeIndex].wAID & 7];
-}
-
-/*
- * Routine Description:
- *       Update AP Node content in Index 0 of KnownNodeDB
- *
- *
- * Return Value:
- *       None
- */
-void BSSvUpdateAPNode(struct vnt_private *pDevice,
-                     u16 *pwCapInfo,
-                     PWLAN_IE_SUPP_RATES pSuppRates,
-                     PWLAN_IE_SUPP_RATES pExtSuppRates)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u32 uRateLen = WLAN_RATES_MAXLEN;
-
-       memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
-
-       pMgmt->sNodeDBTable[0].bActive = true;
-       if (pDevice->byBBType == BB_TYPE_11B)
-               uRateLen = WLAN_RATES_MAXLEN_11B;
-       pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES) pSuppRates,
-                                               (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates,
-                                               uRateLen);
-       pMgmt->abyCurrExtSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES) pExtSuppRates,
-                                                  (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrExtSuppRates,
-                                                  uRateLen);
-       RATEvParseMaxRate((void *) pDevice,
-                         (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates,
-                         (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrExtSuppRates,
-                         true,
-                         &(pMgmt->sNodeDBTable[0].wMaxBasicRate),
-                         &(pMgmt->sNodeDBTable[0].wMaxSuppRate),
-                         &(pMgmt->sNodeDBTable[0].wSuppRate),
-                         &(pMgmt->sNodeDBTable[0].byTopCCKBasicRate),
-                         &(pMgmt->sNodeDBTable[0].byTopOFDMBasicRate));
-       memcpy(pMgmt->sNodeDBTable[0].abyMACAddr, pMgmt->abyCurrBSSID,
-              WLAN_ADDR_LEN);
-       pMgmt->sNodeDBTable[0].wTxDataRate = pMgmt->sNodeDBTable[0].wMaxSuppRate;
-       pMgmt->sNodeDBTable[0].bShortPreamble =
-                       WLAN_GET_CAP_INFO_SHORTPREAMBLE(*pwCapInfo);
-       pMgmt->sNodeDBTable[0].uRatePollTimeout = FALLBACK_POLL_SECOND;
-       /* Auto rate fallback function initiation.
-        * RATEbInit(pDevice); */
-       DBG_PRT(MSG_LEVEL_DEBUG,
-               KERN_INFO"pMgmt->sNodeDBTable[0].wTxDataRate = %d\n",
-               pMgmt->sNodeDBTable[0].wTxDataRate);
-
-}
-
-/*
- * Routine Description:
- *       Add Multicast Node content in Index 0 of KnownNodeDB
- *
- *
- * Return Value:
- *       None
- */
-void BSSvAddMulticastNode(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       memset(&pMgmt->sNodeDBTable[0], 0, sizeof(KnownNodeDB));
-
-       memset(pMgmt->sNodeDBTable[0].abyMACAddr, 0xff, WLAN_ADDR_LEN);
-       pMgmt->sNodeDBTable[0].bActive = true;
-       pMgmt->sNodeDBTable[0].bPSEnable = false;
-       skb_queue_head_init(&pMgmt->sNodeDBTable[0].sTxPSQueue);
-       RATEvParseMaxRate((void *) pDevice,
-                         (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrSuppRates,
-                         (PWLAN_IE_SUPP_RATES) pMgmt->abyCurrExtSuppRates,
-                         true,
-                         &(pMgmt->sNodeDBTable[0].wMaxBasicRate),
-                         &(pMgmt->sNodeDBTable[0].wMaxSuppRate),
-                         &(pMgmt->sNodeDBTable[0].wSuppRate),
-                         &(pMgmt->sNodeDBTable[0].byTopCCKBasicRate),
-                         &(pMgmt->sNodeDBTable[0].byTopOFDMBasicRate));
-       pMgmt->sNodeDBTable[0].wTxDataRate = pMgmt->sNodeDBTable[0].wMaxBasicRate;
-       pMgmt->sNodeDBTable[0].uRatePollTimeout = FALLBACK_POLL_SECOND;
-
-}
-
-/*
- * Routine Description:
- *
- *
- *     Second call back function to update Node DB info & AP link status
- *
- *
- * Return Value:
- *       none.
- */
-void BSSvSecondCallBack(struct work_struct *work)
-{
-       struct vnt_private *pDevice = container_of(work,
-                       struct vnt_private, second_callback_work.work);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int ii;
-       PWLAN_IE_SSID pItemSSID, pCurrSSID;
-       u32 uSleepySTACnt = 0;
-       u32 uNonShortSlotSTACnt = 0;
-       u32 uLongPreambleSTACnt = 0;
-
-       if (pDevice->Flags & fMP_DISCONNECTED)
-               return;
-
-       pDevice->uAssocCount = 0;
-
-       /* Power Saving Mode Tx Burst */
-       if (pDevice->bEnablePSMode == true) {
-               pDevice->ulPSModeWaitTx++;
-               if (pDevice->ulPSModeWaitTx >= 2) {
-                       pDevice->ulPSModeWaitTx = 0;
-                       pDevice->bPSModeTxBurst = false;
-               }
-       }
-
-       pDevice->byERPFlag &=
-               ~(WLAN_SET_ERP_BARKER_MODE(1) | WLAN_SET_ERP_NONERP_PRESENT(1));
-
-       if (pDevice->wUseProtectCntDown > 0) {
-               pDevice->wUseProtectCntDown--;
-       } else {
-               /* disable protect mode */
-               pDevice->byERPFlag &= ~(WLAN_SET_ERP_USE_PROTECTION(1));
-       }
-
-       if (pDevice->byReAssocCount > 0) {
-               pDevice->byReAssocCount++;
-               if (pDevice->byReAssocCount > 10 &&
-                   pDevice->bLinkPass != true) { /* 10 sec timeout */
-                       printk("Re-association timeout!!!\n");
-                       pDevice->byReAssocCount = 0;
-                       /* if (pDevice->bWPASuppWextEnabled == true) */
-                       {
-                               union iwreq_data  wrqu;
-                               memset(&wrqu, 0, sizeof(wrqu));
-                               wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-                               PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
-                               wireless_send_event(pDevice->dev, SIOCGIWAP,
-                                                   &wrqu, NULL);
-                       }
-               } else if (pDevice->bLinkPass == true) {
-                       pDevice->byReAssocCount = 0;
-               }
-       }
-
-       pMgmt->eLastState = pMgmt->eCurrState;
-
-       s_uCalculateLinkQual(pDevice);
-
-       for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) {
-
-               if (pMgmt->sNodeDBTable[ii].bActive) {
-                       /* Increase in-activity counter */
-                       pMgmt->sNodeDBTable[ii].uInActiveCount++;
-
-                       if (ii > 0) {
-                               if (pMgmt->sNodeDBTable[ii].uInActiveCount >
-                                               MAX_INACTIVE_COUNT) {
-                                       BSSvRemoveOneNode(pDevice, ii);
-                                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                                               "Inactive timeout [%d] sec, STA index = [%d] remove\n",
-                                               MAX_INACTIVE_COUNT, ii);
-                                       continue;
-                               }
-
-                               if (pMgmt->sNodeDBTable[ii].eNodeState >=
-                                               NODE_ASSOC) {
-
-                                       pDevice->uAssocCount++;
-
-                                       /* check if Non ERP exist */
-                                       if (pMgmt->sNodeDBTable[ii].uInActiveCount <
-                                                       ERP_RECOVER_COUNT) {
-                                               if (!pMgmt->sNodeDBTable[ii].bShortPreamble) {
-                                                       pDevice->byERPFlag |=
-                                                               WLAN_SET_ERP_BARKER_MODE(1);
-                                                       uLongPreambleSTACnt++;
-                                               }
-                                               if (!pMgmt->sNodeDBTable[ii].bERPExist) {
-                                                       pDevice->byERPFlag |=
-                                                               WLAN_SET_ERP_NONERP_PRESENT(1);
-                                                       pDevice->byERPFlag |=
-                                                               WLAN_SET_ERP_USE_PROTECTION(1);
-                                               }
-                                               if (!pMgmt->sNodeDBTable[ii].bShortSlotTime)
-                                                       uNonShortSlotSTACnt++;
-                                       }
-                               }
-
-                               /* check if any STA in PS mode */
-                               if (pMgmt->sNodeDBTable[ii].bPSEnable)
-                                       uSleepySTACnt++;
-
-                       }
-
-                       /* Rate fallback check */
-                       if (!pDevice->bFixRate) {
-                               if (ii > 0) {
-                                       /* ii = 0 for multicast node (AP & Adhoc) */
-                                       RATEvTxRateFallBack((void *) pDevice,
-                                               &(pMgmt->sNodeDBTable[ii]));
-                               } else if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
-                                       /* ii = 0 reserved for unicast AP node (Infra STA) */
-                                       RATEvTxRateFallBack((void *) pDevice,
-                                               &(pMgmt->sNodeDBTable[ii]));
-                               }
-
-                       }
-
-                       /* check if pending PS queue */
-                       if (pMgmt->sNodeDBTable[ii].wEnQueueCnt != 0) {
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                       KERN_INFO "Index= %d, Queue = %d pending\n",
-                                       ii,
-                                       pMgmt->sNodeDBTable[ii].wEnQueueCnt);
-                               if (ii > 0 &&
-                                   pMgmt->sNodeDBTable[ii].wEnQueueCnt > 15) {
-                                       BSSvRemoveOneNode(pDevice, ii);
-                                       DBG_PRT(MSG_LEVEL_NOTICE,
-                                               KERN_INFO "Pending many queues PS STA Index = %d remove\n",
-                                               ii);
-                                       continue;
-                               }
-                       }
-               }
-
-       }
-
-       if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP &&
-           pDevice->byBBType == BB_TYPE_11G) {
-
-               /* on/off protect mode */
-               if (WLAN_GET_ERP_USE_PROTECTION(pDevice->byERPFlag)) {
-                       if (!pDevice->bProtectMode) {
-                               MACvEnableProtectMD(pDevice);
-                               pDevice->bProtectMode = true;
-                       }
-               } else if (pDevice->bProtectMode) {
-                       MACvDisableProtectMD(pDevice);
-                       pDevice->bProtectMode = false;
-               }
-               /* on/off short slot time */
-
-               if (uNonShortSlotSTACnt > 0) {
-                       if (pDevice->bShortSlotTime) {
-                               pDevice->bShortSlotTime = false;
-                               BBvSetShortSlotTime(pDevice);
-                               vUpdateIFS((void *) pDevice);
-                       }
-               } else if (!pDevice->bShortSlotTime) {
-                               pDevice->bShortSlotTime = true;
-                               BBvSetShortSlotTime(pDevice);
-                               vUpdateIFS((void *) pDevice);
-               }
-
-               /* on/off barker long preamble mode */
-
-               if (uLongPreambleSTACnt > 0) {
-                       if (!pDevice->bBarkerPreambleMd) {
-                               MACvEnableBarkerPreambleMd(pDevice);
-                               pDevice->bBarkerPreambleMd = true;
-                       }
-               } else if (pDevice->bBarkerPreambleMd) {
-                               MACvDisableBarkerPreambleMd(pDevice);
-                               pDevice->bBarkerPreambleMd = false;
-               }
-
-       }
-
-       /* Check if any STA in PS mode, enable DTIM multicast deliver */
-       if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-               if (uSleepySTACnt > 0)
-                       pMgmt->sNodeDBTable[0].bPSEnable = true;
-               else
-                       pMgmt->sNodeDBTable[0].bPSEnable = false;
-       }
-
-       pItemSSID = (PWLAN_IE_SSID) pMgmt->abyDesireSSID;
-       pCurrSSID = (PWLAN_IE_SSID) pMgmt->abyCurrSSID;
-
-       if (pMgmt->eCurrMode == WMAC_MODE_STANDBY ||
-           pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
-
-               if (pMgmt->sNodeDBTable[0].bActive) { /* Assoc with BSS */
-
-                       s_vCheckSensitivity(pDevice);
-                       s_vCheckPreEDThreshold(pDevice);
-
-                       if (pMgmt->sNodeDBTable[0].uInActiveCount >=
-                                                       (LOST_BEACON_COUNT/2) &&
-                           pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) {
-                               pDevice->byBBVGANew = pDevice->abyBBVGA[0];
-                               bScheduleCommand((void *) pDevice,
-                                                WLAN_CMD_CHANGE_BBSENSITIVITY,
-                                                NULL);
-                       }
-
-                       if (pMgmt->sNodeDBTable[0].uInActiveCount >=
-                                       LOST_BEACON_COUNT) {
-                               pMgmt->sNodeDBTable[0].bActive = false;
-                               pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-                               pMgmt->eCurrState = WMAC_STATE_IDLE;
-                               netif_stop_queue(pDevice->dev);
-                               pDevice->bLinkPass = false;
-
-                               vnt_mac_set_led(pDevice, LEDSTS_STS,
-                                                               LEDSTS_SLOW);
-
-                               pDevice->bRoaming = true;
-                               pDevice->bIsRoaming = false;
-
-                               DBG_PRT(MSG_LEVEL_NOTICE,
-                                       KERN_INFO "Lost AP beacon [%d] sec, disconnected !\n",
-                                       pMgmt->sNodeDBTable[0].uInActiveCount);
-                               /* let wpa supplicant know AP may disconnect */
-                               {
-                                       union iwreq_data  wrqu;
-                                       memset(&wrqu, 0, sizeof(wrqu));
-                                               wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-                                       PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
-                                       wireless_send_event(pDevice->dev,
-                                                           SIOCGIWAP,
-                                                           &wrqu,
-                                                           NULL);
-                               }
-                       }
-               } else if (pItemSSID->len != 0) {
-                       /* Davidwang */
-                       if ((pDevice->bEnableRoaming == true) &&
-                           (!(pMgmt->Cisco_cckm))) {
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                       KERN_INFO "bRoaming %d, !\n",
-                                       pDevice->bRoaming);
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                       KERN_INFO "bIsRoaming %d, !\n",
-                                       pDevice->bIsRoaming);
-                               if ((pDevice->bRoaming == true) &&
-                                   (pDevice->bIsRoaming == true)) {
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO "Fast   Roaming ...\n");
-                                       BSSvClearBSSList((void *) pDevice,
-                                                        pDevice->bLinkPass);
-                                       bScheduleCommand((void *) pDevice,
-                                                        WLAN_CMD_BSSID_SCAN,
-                                                        pMgmt->abyDesireSSID);
-                                       bScheduleCommand((void *) pDevice,
-                                                        WLAN_CMD_SSID,
-                                                        pMgmt->abyDesireSSID);
-                                       pDevice->uAutoReConnectTime = 0;
-                                       pDevice->uIsroamingTime = 0;
-                                       pDevice->bRoaming = false;
-                               } else if (pDevice->bRoaming == false &&
-                                          pDevice->bIsRoaming == true) {
-                                       pDevice->uIsroamingTime++;
-                                       if (pDevice->uIsroamingTime >= 20)
-                                               pDevice->bIsRoaming = false;
-                               }
-                       } else if (pDevice->uAutoReConnectTime < 10) {
-                               pDevice->uAutoReConnectTime++;
-                               /* network manager support need not do Roaming scan??? */
-                               if (pDevice->bWPASuppWextEnabled == true)
-                                       pDevice->uAutoReConnectTime = 0;
-                       } else {
-                               /* mike use old encryption status for wpa reauthen */
-                               if (pDevice->bWPADEVUp)
-                                       pDevice->eEncryptionStatus =
-                                               pDevice->eOldEncryptionStatus;
-
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                       KERN_INFO "Roaming ...\n");
-                               BSSvClearBSSList((void *) pDevice,
-                                                pDevice->bLinkPass);
-                               pMgmt->eScanType = WMAC_SCAN_ACTIVE;
-                               bScheduleCommand((void *) pDevice,
-                                                WLAN_CMD_BSSID_SCAN,
-                                                pMgmt->abyDesireSSID);
-                               bScheduleCommand((void *) pDevice,
-                                                WLAN_CMD_SSID,
-                                                pMgmt->abyDesireSSID);
-                               pDevice->uAutoReConnectTime = 0;
-                       }
-               }
-       }
-
-       if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-               /* if adhoc started which essid is NULL string, rescanning. */
-               if (pMgmt->eCurrState == WMAC_STATE_STARTED &&
-                   pCurrSSID->len == 0) {
-                       if (pDevice->uAutoReConnectTime < 10) {
-                               pDevice->uAutoReConnectTime++;
-                       } else {
-                               DBG_PRT(MSG_LEVEL_NOTICE,
-                                       KERN_INFO "Adhoc re-scanning ...\n");
-                               pMgmt->eScanType = WMAC_SCAN_ACTIVE;
-                               bScheduleCommand((void *) pDevice,
-                                                WLAN_CMD_BSSID_SCAN, NULL);
-                               bScheduleCommand((void *) pDevice,
-                                                WLAN_CMD_SSID, NULL);
-                               pDevice->uAutoReConnectTime = 0;
-                       }
-               }
-               if (pMgmt->eCurrState == WMAC_STATE_JOINTED) {
-
-                       s_vCheckSensitivity(pDevice);
-                       s_vCheckPreEDThreshold(pDevice);
-
-                       if (pMgmt->sNodeDBTable[0].uInActiveCount >=
-                                               ADHOC_LOST_BEACON_COUNT) {
-                               DBG_PRT(MSG_LEVEL_NOTICE,
-                                       KERN_INFO "Lost other STA beacon [%d] sec, started !\n",
-                                       pMgmt->sNodeDBTable[0].uInActiveCount);
-                               pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-                               pMgmt->eCurrState = WMAC_STATE_STARTED;
-                               netif_stop_queue(pDevice->dev);
-                               pDevice->bLinkPass = false;
-                               vnt_mac_set_led(pDevice, LEDSTS_STS,
-                                                               LEDSTS_SLOW);
-                       }
-               }
-       }
-
-       if (pDevice->bLinkPass == true) {
-               if ((pMgmt->eAuthenMode < WMAC_AUTH_WPA ||
-                    pDevice->fWPA_Authened == true) &&
-                   (++pDevice->tx_data_time_out > 40)) {
-                       pDevice->tx_trigger = true;
-
-                       PSbSendNullPacket(pDevice);
-
-                       pDevice->tx_trigger = false;
-                       pDevice->tx_data_time_out = 0;
-               }
-
-               if (netif_queue_stopped(pDevice->dev))
-                       netif_wake_queue(pDevice->dev);
-       }
-
-       schedule_delayed_work(&pDevice->second_callback_work, HZ);
-}
-
-/*
- * Routine Description:
- *
- *
- *     Update Tx attemps, Tx failure counter in Node DB
- *
- *
- * Return Value:
- *       none.
- */
-void BSSvUpdateNodeTxCounter(struct vnt_private *pDevice, u8 byTSR, u8 byPktNO)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_tx_pkt_info *pkt_info = pDevice->pkt_info;
-       u32 uNodeIndex = 0;
-       u8 byTxRetry;
-       u16 wRate;
-       u16 wFallBackRate = RATE_1M;
-       u8 byFallBack;
-       int ii;
-       u8 *pbyDestAddr;
-       u8 byPktNum;
-       u16 wFIFOCtl;
-
-       byPktNum = (byPktNO & 0x0F) >> 4;
-       byTxRetry = (byTSR & 0xF0) >> 4;
-       wRate = (u16) (byPktNO & 0xF0) >> 4;
-       wFIFOCtl = pkt_info[byPktNum].fifo_ctl;
-       pbyDestAddr = pkt_info[byPktNum].dest_addr;
-
-       if (wFIFOCtl & FIFOCTL_AUTO_FB_0)
-               byFallBack = AUTO_FB_0;
-       else if (wFIFOCtl & FIFOCTL_AUTO_FB_1)
-               byFallBack = AUTO_FB_1;
-       else
-               byFallBack = AUTO_FB_NONE;
-
-       /* Only Unicast using support rates */
-       if (wFIFOCtl & FIFOCTL_NEEDACK) {
-               if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) {
-                       pMgmt->sNodeDBTable[0].uTxAttempts += 1;
-                       if (!(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
-                               /* transmit success, TxAttempts at least plus one */
-                               pMgmt->sNodeDBTable[0].uTxOk[MAX_RATE]++;
-                               if ((byFallBack == AUTO_FB_NONE) ||
-                                   (wRate < RATE_18M)) {
-                                       wFallBackRate = wRate;
-                               } else if (byFallBack == AUTO_FB_0) {
-                                       if (byTxRetry < 5)
-                                               wFallBackRate =
-                                                       awHWRetry0[wRate-RATE_18M][byTxRetry];
-                                       else
-                                               wFallBackRate =
-                                                       awHWRetry0[wRate-RATE_18M][4];
-                               } else if (byFallBack == AUTO_FB_1) {
-                                       if (byTxRetry < 5)
-                                               wFallBackRate =
-                                                       awHWRetry1[wRate-RATE_18M][byTxRetry];
-                                       else
-                                               wFallBackRate = awHWRetry1[wRate-RATE_18M][4];
-                               }
-                               pMgmt->sNodeDBTable[0].uTxOk[wFallBackRate]++;
-                       } else {
-                               pMgmt->sNodeDBTable[0].uTxFailures++;
-                       }
-                       pMgmt->sNodeDBTable[0].uTxRetry += byTxRetry;
-                       if (byTxRetry != 0) {
-                               pMgmt->sNodeDBTable[0].uTxFail[MAX_RATE] += byTxRetry;
-                               if (byFallBack == AUTO_FB_NONE ||
-                                   wRate < RATE_18M) {
-                                       pMgmt->sNodeDBTable[0].uTxFail[wRate] += byTxRetry;
-                               } else if (byFallBack == AUTO_FB_0) {
-                                       for (ii = 0; ii < byTxRetry; ii++) {
-                                               if (ii < 5)
-                                                       wFallBackRate =
-                                                               awHWRetry0[wRate-RATE_18M][ii];
-                                               else
-                                                       wFallBackRate =
-                                                               awHWRetry0[wRate-RATE_18M][4];
-                                               pMgmt->sNodeDBTable[0].uTxFail[wFallBackRate]++;
-                                       }
-                               } else if (byFallBack == AUTO_FB_1) {
-                                       for (ii = 0; ii < byTxRetry; ii++) {
-                                               if (ii < 5)
-                                                       wFallBackRate =
-                                                               awHWRetry1[wRate-RATE_18M][ii];
-                                               else
-                                                       wFallBackRate =
-                                                               awHWRetry1[wRate-RATE_18M][4];
-                                               pMgmt->sNodeDBTable[0].uTxFail[wFallBackRate]++;
-                                       }
-                               }
-                       }
-               }
-
-               if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA ||
-                    pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
-                   BSSbIsSTAInNodeDB((void *) pDevice,
-                                      pbyDestAddr,
-                                      &uNodeIndex)) {
-                       pMgmt->sNodeDBTable[uNodeIndex].uTxAttempts += 1;
-                       if (!(byTSR & (TSR_TMO | TSR_RETRYTMO))) {
-                               /* transmit success, TxAttempts at least plus one */
-                               pMgmt->sNodeDBTable[uNodeIndex].uTxOk[MAX_RATE]++;
-                               if ((byFallBack == AUTO_FB_NONE) ||
-                                       (wRate < RATE_18M)) {
-                                       wFallBackRate = wRate;
-                               } else if (byFallBack == AUTO_FB_0) {
-                                       if (byTxRetry < 5)
-                                               wFallBackRate =
-                                                       awHWRetry0[wRate-RATE_18M][byTxRetry];
-                                       else
-                                               wFallBackRate =
-                                                       awHWRetry0[wRate-RATE_18M][4];
-                               } else if (byFallBack == AUTO_FB_1) {
-                                       if (byTxRetry < 5)
-                                               wFallBackRate =
-                                                       awHWRetry1[wRate-RATE_18M][byTxRetry];
-                                       else
-                                               wFallBackRate =
-                                                       awHWRetry1[wRate-RATE_18M][4];
-                               }
-                               pMgmt->sNodeDBTable[uNodeIndex].uTxOk[wFallBackRate]++;
-                       } else {
-                               pMgmt->sNodeDBTable[uNodeIndex].uTxFailures++;
-                       }
-                       pMgmt->sNodeDBTable[uNodeIndex].uTxRetry += byTxRetry;
-                       if (byTxRetry != 0) {
-                               pMgmt->sNodeDBTable[uNodeIndex].uTxFail[MAX_RATE] += byTxRetry;
-                               if ((byFallBack == AUTO_FB_NONE) ||
-                                   (wRate < RATE_18M)) {
-                                       pMgmt->sNodeDBTable[uNodeIndex].uTxFail[wRate] += byTxRetry;
-                               } else if (byFallBack == AUTO_FB_0) {
-                                       for (ii = 0; ii < byTxRetry; ii++) {
-                                               if (ii < 5)
-                                                       wFallBackRate =
-                                                               awHWRetry0[wRate-RATE_18M][ii];
-                                               else
-                                                       wFallBackRate =
-                                                               awHWRetry0[wRate-RATE_18M][4];
-                                               pMgmt->sNodeDBTable[uNodeIndex].uTxFail[wFallBackRate]++;
-                                       }
-                               } else if (byFallBack == AUTO_FB_1) {
-                                       for (ii = 0; ii < byTxRetry; ii++) {
-                                               if (ii < 5)
-                                                       wFallBackRate = awHWRetry1[wRate-RATE_18M][ii];
-                                               else
-                                                       wFallBackRate = awHWRetry1[wRate-RATE_18M][4];
-                                               pMgmt->sNodeDBTable[uNodeIndex].uTxFail[wFallBackRate]++;
-                                       }
-                               }
-                       }
-               }
-       }
-}
-
-/*
- * Routine Description:
- *       Clear Nodes & skb in DB Table
- *
- *
- * Parameters:
- *     In:
- *             hDeviceContext  - The adapter context.
- *             uStartIndex     - starting index
- *     Out:
- *             none
- *
- * Return Value:
- *       None.
- */
-void BSSvClearNodeDBTable(struct vnt_private *pDevice, u32 uStartIndex)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct sk_buff  *skb;
-       int ii;
-
-       for (ii = uStartIndex; ii < (MAX_NODE_NUM + 1); ii++) {
-               if (pMgmt->sNodeDBTable[ii].bActive) {
-                       /* check if sTxPSQueue has been initial */
-                       if (pMgmt->sNodeDBTable[ii].sTxPSQueue.next) {
-                               while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[ii].sTxPSQueue))) {
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO "PS skb != NULL %d\n",
-                                               ii);
-                                       dev_kfree_skb(skb);
-                               }
-                       }
-                       memset(&pMgmt->sNodeDBTable[ii], 0, sizeof(KnownNodeDB));
-               }
-       }
-}
-
-static void s_vCheckSensitivity(struct vnt_private *pDevice)
-{
-       PKnownBSS pBSSList = NULL;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int ii;
-
-       if (pMgmt->eCurrState == WMAC_STATE_ASSOC ||
-           (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA &&
-            pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
-               pBSSList = BSSpAddrIsInBSSList(pDevice, pMgmt->abyCurrBSSID,
-                                              (PWLAN_IE_SSID) pMgmt->abyCurrSSID);
-               if (pBSSList) {
-                       /* Update BB register if RSSI is too strong */
-                       signed long    LocalldBmAverage = 0;
-                       signed long    uNumofdBm = 0;
-                       for (ii = 0; ii < RSSI_STAT_COUNT; ii++) {
-                               if (pBSSList->ldBmAverage[ii] != 0) {
-                                       uNumofdBm++;
-                                       LocalldBmAverage += pBSSList->ldBmAverage[ii];
-                               }
-                       }
-                       if (uNumofdBm > 0) {
-                               LocalldBmAverage = LocalldBmAverage/uNumofdBm;
-                               for (ii = 0; ii < BB_VGA_LEVEL; ii++) {
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO"LocalldBmAverage:%ld, %ld %02x\n",
-                                               LocalldBmAverage,
-                                               pDevice->ldBmThreshold[ii],
-                                               pDevice->abyBBVGA[ii]);
-                                       if (LocalldBmAverage < pDevice->ldBmThreshold[ii]) {
-                                               pDevice->byBBVGANew =
-                                                       pDevice->abyBBVGA[ii];
-                                               break;
-                                       }
-                               }
-                               if (pDevice->byBBVGANew !=
-                                               pDevice->byBBVGACurrent) {
-                                       pDevice->uBBVGADiffCount++;
-                                       if (pDevice->uBBVGADiffCount >=
-                                                       BB_VGA_CHANGE_THRESHOLD)
-                                               bScheduleCommand(pDevice,
-                                                       WLAN_CMD_CHANGE_BBSENSITIVITY,
-                                                       NULL);
-                               } else {
-                                       pDevice->uBBVGADiffCount = 0;
-                               }
-                       }
-               }
-       }
-}
-
-static void s_uCalculateLinkQual(struct vnt_private *pDevice)
-{
-       struct net_device_stats *stats = &pDevice->stats;
-       unsigned long TxOkRatio, TxCnt;
-       unsigned long RxOkRatio, RxCnt;
-       unsigned long RssiRatio;
-       unsigned long qual;
-       long ldBm;
-
-       TxCnt = stats->tx_packets + pDevice->wstats.discard.retries;
-
-       RxCnt = stats->rx_packets + stats->rx_frame_errors;
-
-       TxOkRatio = (TxCnt < 6) ? 4000:((stats->tx_packets * 4000) / TxCnt);
-
-       RxOkRatio = (RxCnt < 6) ? 2000 :
-                               ((stats->rx_packets * 2000) / RxCnt);
-
-       /* decide link quality */
-       if (pDevice->bLinkPass != true) {
-               pDevice->wstats.qual.qual = 0;
-       } else {
-               vnt_rf_rssi_to_dbm(pDevice, (u8) (pDevice->uCurrRSSI), &ldBm);
-               if (-ldBm < 50)
-                       RssiRatio = 4000;
-               else if (-ldBm > 90)
-                       RssiRatio = 0;
-               else
-                       RssiRatio = (40-(-ldBm-50)) * 4000 / 40;
-
-               qual = (RssiRatio + TxOkRatio + RxOkRatio) / 100;
-               if (qual < 100)
-                       pDevice->wstats.qual.qual = (u8) qual;
-               else
-                       pDevice->wstats.qual.qual = 100;
-       }
-}
-
-void BSSvClearAnyBSSJoinRecord(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int ii;
-
-       for (ii = 0; ii < MAX_BSS_NUM; ii++)
-               pMgmt->sBSSList[ii].bSelected = false;
-
-       return;
-}
-
-static void s_vCheckPreEDThreshold(struct vnt_private *pDevice)
-{
-       PKnownBSS pBSSList = NULL;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       if (pMgmt->eCurrState == WMAC_STATE_ASSOC ||
-           (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA &&
-            pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
-               pBSSList = BSSpAddrIsInBSSList(pDevice,
-                                              pMgmt->abyCurrBSSID,
-                                              (PWLAN_IE_SSID) pMgmt->abyCurrSSID);
-               if (pBSSList) {
-                       pDevice->byBBPreEDRSSI =
-                               (u8) (~(pBSSList->ldBmAverRange) + 1);
-                       BBvUpdatePreEDThreshold(pDevice, false);
-               }
-       }
-}
-
diff --git a/drivers/staging/vt6656/bssdb.h b/drivers/staging/vt6656/bssdb.h
deleted file mode 100644 (file)
index 8df3fb2..0000000
+++ /dev/null
@@ -1,276 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: bssdb.h
- *
- * Purpose: Handles the Basic Service Set & Node Database functions
- *
- * Author: Lyndon Chen
- *
- * Date: July 16, 2002
- *
- */
-
-#ifndef __BSSDB_H__
-#define __BSSDB_H__
-
-#include <linux/skbuff.h>
-#include "80211hdr.h"
-#include "80211mgr.h"
-#include "card.h"
-
-#define MAX_NODE_NUM             64
-#define MAX_BSS_NUM              42
-#define LOST_BEACON_COUNT        10   /* 10 sec, XP defined */
-#define MAX_PS_TX_BUF            32   // sta max power saving tx buf
-#define ADHOC_LOST_BEACON_COUNT  30   // 30 sec, beacon lost for adhoc only
-#define MAX_INACTIVE_COUNT       300  // 300 sec, inactive STA node refresh
-
-#define USE_PROTECT_PERIOD       10   // 10 sec, Use protect mode check period
-#define ERP_RECOVER_COUNT        30   // 30 sec, ERP support callback check
-#define BSS_CLEAR_COUNT           1
-
-#define RSSI_STAT_COUNT          10
-#define MAX_CHECK_RSSI_COUNT     8
-
-// STA dwflags
-#define WLAN_STA_AUTH            BIT0
-#define WLAN_STA_ASSOC           BIT1
-#define WLAN_STA_PS              BIT2
-#define WLAN_STA_TIM             BIT3
-// permanent; do not remove entry on expiration
-#define WLAN_STA_PERM            BIT4
-// If 802.1X is used, this flag is
-// controlling whether STA is authorized to
-// send and receive non-IEEE 802.1X frames
-#define WLAN_STA_AUTHORIZED      BIT5
-
-#define MAX_WPA_IE_LEN      64
-
-//
-// IEEE 802.11 Structures and definitions
-//
-
-typedef struct tagSERPObject {
-    bool    bERPExist;
-    u8    byERP;
-} ERPObject, *PERPObject;
-
-typedef struct tagSRSNCapObject {
-    bool    bRSNCapExist;
-    u16    wRSNCap;
-} SRSNCapObject, *PSRSNCapObject;
-
-// BSS info(AP)
-typedef struct tagKnownBSS {
-    // BSS info
-    bool            bActive;
-    u8            abyBSSID[WLAN_BSSID_LEN];
-    unsigned int            uChannel;
-    u8            abySuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-    u8            abyExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-    unsigned int            uRSSI;
-    u8            bySQ;
-    u16            wBeaconInterval;
-    u16            wCapInfo;
-    u8            abySSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-    u8            byRxRate;
-
-//    u16            wATIMWindow;
-    u8            byRSSIStatCnt;
-    signed long            ldBmMAX;
-    signed long            ldBmAverage[RSSI_STAT_COUNT];
-    signed long            ldBmAverRange;
-    //For any BSSID selection improvment
-    bool            bSelected;
-
-    //++ WPA informations
-    bool            bWPAValid;
-    u8            byGKType;
-    u8            abyPKType[4];
-    u16            wPKCount;
-    u8            abyAuthType[4];
-    u16            wAuthCount;
-    u8            byDefaultK_as_PK;
-    u8            byReplayIdx;
-    //--
-
-    //++ WPA2 informations
-    bool            bWPA2Valid;
-    u8            byCSSGK;
-    u16            wCSSPKCount;
-    u8            abyCSSPK[4];
-    u16            wAKMSSAuthCount;
-    u8            abyAKMSSAuthType[4];
-
-    //++  wpactl
-    u8            byWPAIE[MAX_WPA_IE_LEN];
-    u8            byRSNIE[MAX_WPA_IE_LEN];
-    u16            wWPALen;
-    u16            wRSNLen;
-
-    // Clear count
-    unsigned int            uClearCount;
-//    u8            abyIEs[WLAN_BEACON_FR_MAXLEN];
-    unsigned int            uIELength;
-       u64 qwBSSTimestamp;
-       u64 qwLocalTSF;/* local TSF timer */
-
-    CARD_PHY_TYPE   eNetworkTypeInUse;
-
-    ERPObject       sERP;
-    SRSNCapObject   sRSNCapObj;
-    u8            abyIEs[1024];   // don't move this field !!
-
-} __attribute__ ((__packed__))
-KnownBSS , *PKnownBSS;
-
-typedef enum tagNODE_STATE {
-    NODE_FREE,
-    NODE_AGED,
-    NODE_KNOWN,
-    NODE_AUTH,
-    NODE_ASSOC
-} NODE_STATE, *PNODE_STATE;
-
-// STA node info
-typedef struct tagKnownNodeDB {
-    // STA info
-    bool            bActive;
-    u8            abyMACAddr[WLAN_ADDR_LEN];
-    u8            abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
-    u8            abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN];
-    u16            wTxDataRate;
-    bool            bShortPreamble;
-    bool            bERPExist;
-    bool            bShortSlotTime;
-    unsigned int            uInActiveCount;
-    u16            wMaxBasicRate;     //Get from byTopOFDMBasicRate or byTopCCKBasicRate which depends on packetTyp.
-    u16            wMaxSuppRate;      //Records the highest supported rate getting from SuppRates IE and ExtSuppRates IE in Beacon.
-    u16            wSuppRate;
-    u8            byTopOFDMBasicRate;//Records the highest basic rate in OFDM mode
-    u8            byTopCCKBasicRate; //Records the highest basic rate in CCK mode
-
-    // For AP mode
-    struct sk_buff_head sTxPSQueue;
-    u16            wCapInfo;
-    u16            wListenInterval;
-    u16            wAID;
-    NODE_STATE      eNodeState;
-    bool            bPSEnable;
-    bool            bRxPSPoll;
-    u8            byAuthSequence;
-    unsigned long           ulLastRxJiffer;
-    u8            bySuppRate;
-    u32           dwFlags;
-    u16            wEnQueueCnt;
-
-    bool            bOnFly;
-    unsigned long long       KeyRSC;
-    u8            byKeyIndex;
-    u32           dwKeyIndex;
-    u8            byCipherSuite;
-    u32           dwTSC47_16;
-    u16            wTSC15_0;
-    unsigned int            uWepKeyLength;
-    u8            abyWepKey[WLAN_WEPMAX_KEYLEN];
-    //
-    // Auto rate fallback vars
-    bool            bIsInFallback;
-    unsigned int            uAverageRSSI;
-    unsigned int            uRateRecoveryTimeout;
-    unsigned int            uRatePollTimeout;
-    unsigned int            uTxFailures;
-    unsigned int            uTxAttempts;
-
-    unsigned int            uTxRetry;
-    unsigned int            uFailureRatio;
-    unsigned int            uRetryRatio;
-    unsigned int            uTxOk[MAX_RATE+1];
-    unsigned int            uTxFail[MAX_RATE+1];
-    unsigned int            uTimeCount;
-
-} KnownNodeDB, *PKnownNodeDB;
-
-PKnownBSS BSSpSearchBSSList(struct vnt_private *, u8 *pbyDesireBSSID,
-       u8 *pbyDesireSSID, CARD_PHY_TYPE ePhyType);
-
-PKnownBSS BSSpAddrIsInBSSList(struct vnt_private *, u8 *abyBSSID,
-       PWLAN_IE_SSID pSSID);
-
-void BSSvClearBSSList(struct vnt_private *, int bKeepCurrBSSID);
-
-int BSSbInsertToBSSList(struct vnt_private *,
-                       u8 *abyBSSIDAddr,
-                       u64 qwTimestamp,
-                       u16 wBeaconInterval,
-                       u16 wCapInfo,
-                       u8 byCurrChannel,
-                       PWLAN_IE_SSID pSSID,
-                       PWLAN_IE_SUPP_RATES pSuppRates,
-                       PWLAN_IE_SUPP_RATES pExtSuppRates,
-                       PERPObject psERP,
-                       PWLAN_IE_RSN pRSN,
-                       PWLAN_IE_RSN_EXT pRSNWPA,
-                       PWLAN_IE_COUNTRY pIE_Country,
-                       PWLAN_IE_QUIET pIE_Quiet,
-                       u32 uIELength,
-                       u8 *pbyIEs,
-                       void *pRxPacketContext);
-
-int BSSbUpdateToBSSList(struct vnt_private *,
-                       u64 qwTimestamp,
-                       u16 wBeaconInterval,
-                       u16 wCapInfo,
-                       u8 byCurrChannel,
-                       int bChannelHit,
-                       PWLAN_IE_SSID pSSID,
-                       PWLAN_IE_SUPP_RATES pSuppRates,
-                       PWLAN_IE_SUPP_RATES pExtSuppRates,
-                       PERPObject psERP,
-                       PWLAN_IE_RSN pRSN,
-                       PWLAN_IE_RSN_EXT pRSNWPA,
-                       PWLAN_IE_COUNTRY pIE_Country,
-                       PWLAN_IE_QUIET pIE_Quiet,
-                       PKnownBSS pBSSList,
-                       u32 uIELength,
-                       u8 *pbyIEs,
-                       void *pRxPacketContext);
-
-int BSSbIsSTAInNodeDB(struct vnt_private *, u8 * abyDstAddr,
-       u32 *puNodeIndex);
-
-void BSSvCreateOneNode(struct vnt_private *, u32 *puNodeIndex);
-
-void BSSvUpdateAPNode(struct vnt_private *, u16 *pwCapInfo,
-       PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pExtSuppRates);
-
-void BSSvSecondCallBack(struct work_struct *work);
-
-void BSSvUpdateNodeTxCounter(struct vnt_private *, u8 byTSR, u8 byPktNO);
-
-void BSSvRemoveOneNode(struct vnt_private *, u32 uNodeIndex);
-
-void BSSvAddMulticastNode(struct vnt_private *);
-
-void BSSvClearNodeDBTable(struct vnt_private *, u32 uStartIndex);
-
-void BSSvClearAnyBSSJoinRecord(struct vnt_private *);
-
-#endif /* __BSSDB_H__ */
index d662e5431daddc66629b951a64de5eb312dc32af..1849e34237a5cac88600a279d0ce84c97bece9d8 100644 (file)
  * Purpose: Provide functions to setup NIC operation mode
  * Functions:
  *      s_vSafeResetTx - Rest Tx
- *      CARDvSetRSPINF - Set RSPINF
- *      vUpdateIFS - Update slotTime,SIFS,DIFS, and EIFS
- *      CARDvUpdateBasicTopRate - Update BasicTopRate
- *      CARDbAddBasicRate - Add to BasicRateSet
+ *      vnt_set_rspinf - Set RSPINF
+ *      vnt_update_ifs - Update slotTime,SIFS,DIFS, and EIFS
+ *      vnt_update_top_rates - Update BasicTopRate
+ *      vnt_add_basic_rate - Add to BasicRateSet
  *      CARDbSetBasicRate - Set Basic Tx Rate
- *      CARDbIsOFDMinBasicRate - Check if any OFDM rate is in BasicRateSet
+ *      vnt_ofdm_min_rate - Check if any OFDM rate is in BasicRateSet
  *      CARDvSetLoopbackMode - Set Loopback mode
  *      CARDbSoftwareReset - Sortware reset NIC
- *      CARDqGetTSFOffset - Calculate TSFOffset
- *      CARDbGetCurrentTSF - Read Current NIC TSF counter
- *      CARDqGetNextTBTT - Calculate Next Beacon TSF counter
- *      CARDvSetFirstNextTBTT - Set NIC Beacon time
- *      CARDvUpdateNextTBTT - Sync. NIC Beacon time
- *      CARDbRadioPowerOff - Turn Off NIC Radio Power
- *      CARDbRadioPowerOn - Turn On NIC Radio Power
+ *      vnt_get_tsf_offset - Calculate TSFOffset
+ *      vnt_get_current_tsf - Read Current NIC TSF counter
+ *      vnt_get_next_tbtt - Calculate Next Beacon TSF counter
+ *      vnt_reset_next_tbtt - Set NIC Beacon time
+ *      vnt_update_next_tbtt - Sync. NIC Beacon time
+ *      vnt_radio_power_off - Turn Off NIC Radio Power
+ *      vnt_radio_power_on - Turn On NIC Radio Power
  *      CARDbSetWEPMode - Set NIC Wep mode
  *      CARDbSetTxPower - Set NIC tx power
  *
  * Revision History:
  *      06-10-2003 Bryan YC Fan:  Re-write codes to support VT3253 spec.
  *      08-26-2003 Kyle Hsu:      Modify the definition type of dwIoBase.
- *      09-01-2003 Bryan YC Fan:  Add vUpdateIFS().
+ *      09-01-2003 Bryan YC Fan:  Add vnt_update_ifs().
  *
  */
 
 #include "device.h"
-#include "tmacro.h"
 #include "card.h"
 #include "baseband.h"
 #include "mac.h"
@@ -54,9 +53,6 @@
 #include "rf.h"
 #include "power.h"
 #include "key.h"
-#include "rc4.h"
-#include "country.h"
-#include "datarate.h"
 #include "usbpipe.h"
 
 //const u16 cwRXBCNTSFOff[MAX_RATE] =
@@ -75,7 +71,7 @@ static const u16 cwRXBCNTSFOff[MAX_RATE] =
  *  Out:
  *      none
  */
-void CARDbSetMediaChannel(struct vnt_private *priv, u32 connection_channel)
+void vnt_set_channel(struct vnt_private *priv, u32 connection_channel)
 {
 
        if (priv->byBBType == BB_TYPE_11A) {
@@ -89,10 +85,10 @@ void CARDbSetMediaChannel(struct vnt_private *priv, u32 connection_channel)
        }
 
        /* clear NAV */
-       MACvRegBitsOn(priv, MAC_REG_MACCR, MACCR_CLRNAV);
+       vnt_mac_reg_bits_on(priv, MAC_REG_MACCR, MACCR_CLRNAV);
 
        /* Set Channel[7] = 0 to tell H/W channel is changing now. */
-       MACvRegBitsOff(priv, MAC_REG_CHANNEL, 0xb0);
+       vnt_mac_reg_bits_off(priv, MAC_REG_CHANNEL, 0xb0);
 
        vnt_control_out(priv, MESSAGE_TYPE_SELECT_CHANNLE,
                                        connection_channel, 0, 0, NULL);
@@ -128,7 +124,7 @@ void CARDbSetMediaChannel(struct vnt_private *priv, u32 connection_channel)
  * Return Value: response Control frame rate
  *
  */
-static u16 swGetCCKControlRate(struct vnt_private *priv, u16 rate_idx)
+static u16 vnt_get_cck_rate(struct vnt_private *priv, u16 rate_idx)
 {
        u16 ui = rate_idx;
 
@@ -154,14 +150,14 @@ static u16 swGetCCKControlRate(struct vnt_private *priv, u16 rate_idx)
  * Return Value: response Control frame rate
  *
  */
-static u16 swGetOFDMControlRate(struct vnt_private *priv, u16 rate_idx)
+static u16 vnt_get_ofdm_rate(struct vnt_private *priv, u16 rate_idx)
 {
        u16 ui = rate_idx;
 
        dev_dbg(&priv->usb->dev, "%s basic rate: %d\n",
                                        __func__,  priv->wBasicRate);
 
-       if (!CARDbIsOFDMinBasicRate(priv)) {
+       if (!vnt_ofdm_min_rate(priv)) {
                dev_dbg(&priv->usb->dev, "%s (NO OFDM) %d\n",
                                                __func__, rate_idx);
                if (rate_idx > RATE_24M)
@@ -197,7 +193,7 @@ static u16 swGetOFDMControlRate(struct vnt_private *priv, u16 rate_idx)
  * Return Value: none
  *
  */
-static void CARDvCalculateOFDMRParameter(u16 rate, u8 bb_type,
+static void vnt_calculate_ofdm_rate(u16 rate, u8 bb_type,
                                        u8 *tx_rate, u8 *rsv_time)
 {
 
@@ -291,7 +287,7 @@ static void CARDvCalculateOFDMRParameter(u16 rate, u8 bb_type,
  *
  */
 
-void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
+void vnt_set_rspinf(struct vnt_private *priv, u8 bb_type)
 {
        struct vnt_phy_field phy[4];
        u8 tx_rate[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0}; /* For OFDM */
@@ -300,56 +296,51 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
        int i;
 
        /*RSPINF_b_1*/
-       BBvCalculateParameter(priv, 14,
-               swGetCCKControlRate(priv, RATE_1M), PK_TYPE_11B, &phy[0]);
+       vnt_get_phy_field(priv, 14,
+               vnt_get_cck_rate(priv, RATE_1M), PK_TYPE_11B, &phy[0]);
 
        /*RSPINF_b_2*/
-       BBvCalculateParameter(priv, 14,
-               swGetCCKControlRate(priv, RATE_2M), PK_TYPE_11B, &phy[1]);
+       vnt_get_phy_field(priv, 14,
+               vnt_get_cck_rate(priv, RATE_2M), PK_TYPE_11B, &phy[1]);
 
        /*RSPINF_b_5*/
-       BBvCalculateParameter(priv, 14,
-               swGetCCKControlRate(priv, RATE_5M), PK_TYPE_11B, &phy[2]);
+       vnt_get_phy_field(priv, 14,
+               vnt_get_cck_rate(priv, RATE_5M), PK_TYPE_11B, &phy[2]);
 
        /*RSPINF_b_11*/
-       BBvCalculateParameter(priv, 14,
-               swGetCCKControlRate(priv, RATE_11M), PK_TYPE_11B, &phy[3]);
+       vnt_get_phy_field(priv, 14,
+               vnt_get_cck_rate(priv, RATE_11M), PK_TYPE_11B, &phy[3]);
 
 
        /*RSPINF_a_6*/
-       CARDvCalculateOFDMRParameter(RATE_6M, bb_type,
-                                               &tx_rate[0], &rsv_time[0]);
+       vnt_calculate_ofdm_rate(RATE_6M, bb_type, &tx_rate[0], &rsv_time[0]);
 
        /*RSPINF_a_9*/
-       CARDvCalculateOFDMRParameter(RATE_9M, bb_type,
-                                               &tx_rate[1], &rsv_time[1]);
+       vnt_calculate_ofdm_rate(RATE_9M, bb_type, &tx_rate[1], &rsv_time[1]);
 
        /*RSPINF_a_12*/
-       CARDvCalculateOFDMRParameter(RATE_12M, bb_type,
-                                               &tx_rate[2], &rsv_time[2]);
+       vnt_calculate_ofdm_rate(RATE_12M, bb_type, &tx_rate[2], &rsv_time[2]);
 
        /*RSPINF_a_18*/
-       CARDvCalculateOFDMRParameter(RATE_18M, bb_type,
-                                               &tx_rate[3], &rsv_time[3]);
+       vnt_calculate_ofdm_rate(RATE_18M, bb_type, &tx_rate[3], &rsv_time[3]);
 
        /*RSPINF_a_24*/
-       CARDvCalculateOFDMRParameter(RATE_24M, bb_type,
-                                               &tx_rate[4], &rsv_time[4]);
+       vnt_calculate_ofdm_rate(RATE_24M, bb_type, &tx_rate[4], &rsv_time[4]);
 
        /*RSPINF_a_36*/
-       CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_36M),
+       vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_36M),
                                        bb_type, &tx_rate[5], &rsv_time[5]);
 
        /*RSPINF_a_48*/
-       CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_48M),
+       vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_48M),
                                        bb_type, &tx_rate[6], &rsv_time[6]);
 
        /*RSPINF_a_54*/
-       CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_54M),
+       vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
                                        bb_type, &tx_rate[7], &rsv_time[7]);
 
        /*RSPINF_a_72*/
-       CARDvCalculateOFDMRParameter(swGetOFDMControlRate(priv, RATE_54M),
+       vnt_calculate_ofdm_rate(vnt_get_ofdm_rate(priv, RATE_54M),
                                        bb_type, &tx_rate[8], &rsv_time[8]);
 
        put_unaligned(phy[0].len, (u16 *)&data[0]);
@@ -389,7 +380,7 @@ void CARDvSetRSPINF(struct vnt_private *priv, u8 bb_type)
  * Return Value: None.
  *
  */
-void vUpdateIFS(struct vnt_private *priv)
+void vnt_update_ifs(struct vnt_private *priv)
 {
        u8 max_min = 0;
        u8 data[4];
@@ -407,10 +398,8 @@ void vUpdateIFS(struct vnt_private *priv)
                priv->uCwMin = C_CWMIN_B;
                max_min = 5;
        } else {/* PK_TYPE_11GA & PK_TYPE_11GB */
-               u8 rate = 0;
                bool ofdm_rate = false;
                unsigned int ii = 0;
-               PWLAN_IE_SUPP_RATES item_rates = NULL;
 
                priv->uSIFS = C_SIFS_BG;
 
@@ -421,29 +410,13 @@ void vUpdateIFS(struct vnt_private *priv)
 
                priv->uDIFS = C_SIFS_BG + 2 * priv->uSlot;
 
-               item_rates =
-                       (PWLAN_IE_SUPP_RATES)priv->vnt_mgmt.abyCurrSuppRates;
-
-               for (ii = 0; ii < item_rates->len; ii++) {
-                       rate = (u8)(item_rates->abyRates[ii] & 0x7f);
-                       if (RATEwGetRateIdx(rate) > RATE_11M) {
+               for (ii = RATE_54M; ii >= RATE_6M; ii--) {
+                       if (priv->wBasicRate & ((u32)(0x1 << ii))) {
                                ofdm_rate = true;
                                break;
                        }
                }
 
-               if (ofdm_rate == false) {
-                       item_rates = (PWLAN_IE_SUPP_RATES)priv->vnt_mgmt
-                               .abyCurrExtSuppRates;
-                       for (ii = 0; ii < item_rates->len; ii++) {
-                               rate = (u8)(item_rates->abyRates[ii] & 0x7f);
-                               if (RATEwGetRateIdx(rate) > RATE_11M) {
-                                       ofdm_rate = true;
-                                       break;
-                               }
-                       }
-               }
-
                if (ofdm_rate == true) {
                        priv->uCwMin = C_CWMIN_A;
                        max_min = 4;
@@ -470,7 +443,7 @@ void vUpdateIFS(struct vnt_private *priv)
                MESSAGE_REQUEST_MACREG, 1, &max_min);
 }
 
-void CARDvUpdateBasicTopRate(struct vnt_private *priv)
+void vnt_update_top_rates(struct vnt_private *priv)
 {
        u8 top_ofdm = RATE_24M, top_cck = RATE_1M;
        u8 i;
@@ -497,29 +470,7 @@ void CARDvUpdateBasicTopRate(struct vnt_private *priv)
        priv->byTopCCKBasicRate = top_cck;
  }
 
-/*
- * Description: Set NIC Tx Basic Rate
- *
- * Parameters:
- *  In:
- *      pDevice         - The adapter to be set
- *      wBasicRate      - Basic Rate to be set
- *  Out:
- *      none
- *
- * Return Value: true if succeeded; false if failed.
- *
- */
-void CARDbAddBasicRate(struct vnt_private *priv, u16 rate_idx)
-{
-
-       priv->wBasicRate |= (1 << rate_idx);
-
-       /*Determines the highest basic rate.*/
-       CARDvUpdateBasicTopRate(priv);
-}
-
-int CARDbIsOFDMinBasicRate(struct vnt_private *priv)
+int vnt_ofdm_min_rate(struct vnt_private *priv)
 {
        int ii;
 
@@ -531,12 +482,12 @@ int CARDbIsOFDMinBasicRate(struct vnt_private *priv)
        return false;
 }
 
-u8 CARDbyGetPktType(struct vnt_private *priv)
+u8 vnt_get_pkt_type(struct vnt_private *priv)
 {
 
        if (priv->byBBType == BB_TYPE_11A || priv->byBBType == BB_TYPE_11B)
                return (u8)priv->byBBType;
-       else if (CARDbIsOFDMinBasicRate(priv))
+       else if (vnt_ofdm_min_rate(priv))
                return PK_TYPE_11GA;
        else
                return PK_TYPE_11GB;
@@ -557,7 +508,7 @@ u8 CARDbyGetPktType(struct vnt_private *priv)
  * Return Value: TSF Offset value
  *
  */
-u64 CARDqGetTSFOffset(u8 rx_rate, u64 tsf1, u64 tsf2)
+u64 vnt_get_tsf_offset(u8 rx_rate, u64 tsf1, u64 tsf2)
 {
        u64 tsf_offset = 0;
        u16 rx_bcn_offset = 0;
@@ -586,13 +537,13 @@ u64 CARDqGetTSFOffset(u8 rx_rate, u64 tsf1, u64 tsf2)
  * Return Value: none
  *
  */
-void CARDvAdjustTSF(struct vnt_private *priv, u8 rx_rate,
+void vnt_adjust_tsf(struct vnt_private *priv, u8 rx_rate,
                u64 time_stamp, u64 local_tsf)
 {
        u64 tsf_offset = 0;
        u8 data[8];
 
-       tsf_offset = CARDqGetTSFOffset(rx_rate, time_stamp, local_tsf);
+       tsf_offset = vnt_get_tsf_offset(rx_rate, time_stamp, local_tsf);
 
        data[0] = (u8)tsf_offset;
        data[1] = (u8)(tsf_offset >> 8);
@@ -619,7 +570,7 @@ void CARDvAdjustTSF(struct vnt_private *priv, u8 rx_rate,
  * Return Value: true if success; otherwise false
  *
  */
-bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *current_tsf)
+bool vnt_get_current_tsf(struct vnt_private *priv, u64 *current_tsf)
 {
 
        *current_tsf = priv->qwCurrTSF;
@@ -638,10 +589,10 @@ bool CARDbGetCurrentTSF(struct vnt_private *priv, u64 *current_tsf)
  * Return Value: true if success; otherwise false
  *
  */
-bool CARDbClearCurrentTSF(struct vnt_private *priv)
+bool vnt_clear_current_tsf(struct vnt_private *priv)
 {
 
-       MACvRegBitsOn(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
+       vnt_mac_reg_bits_on(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTRST);
 
        priv->qwCurrTSF = 0;
 
@@ -662,7 +613,7 @@ bool CARDbClearCurrentTSF(struct vnt_private *priv)
  * Return Value: TSF value of next Beacon
  *
  */
-u64 CARDqGetNextTBTT(u64 tsf, u16 beacon_interval)
+u64 vnt_get_next_tbtt(u64 tsf, u16 beacon_interval)
 {
        u32 beacon_int;
 
@@ -694,14 +645,14 @@ u64 CARDqGetNextTBTT(u64 tsf, u16 beacon_interval)
  * Return Value: none
  *
  */
-void CARDvSetFirstNextTBTT(struct vnt_private *priv, u16 beacon_interval)
+void vnt_reset_next_tbtt(struct vnt_private *priv, u16 beacon_interval)
 {
        u64 next_tbtt = 0;
        u8 data[8];
 
-       CARDbClearCurrentTSF(priv);
+       vnt_clear_current_tsf(priv);
 
-       next_tbtt = CARDqGetNextTBTT(next_tbtt, beacon_interval);
+       next_tbtt = vnt_get_next_tbtt(next_tbtt, beacon_interval);
 
        data[0] = (u8)next_tbtt;
        data[1] = (u8)(next_tbtt >> 8);
@@ -733,12 +684,12 @@ void CARDvSetFirstNextTBTT(struct vnt_private *priv, u16 beacon_interval)
  * Return Value: none
  *
  */
-void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 tsf,
+void vnt_update_next_tbtt(struct vnt_private *priv, u64 tsf,
                        u16 beacon_interval)
 {
        u8 data[8];
 
-       tsf = CARDqGetNextTBTT(tsf, beacon_interval);
+       tsf = vnt_get_next_tbtt(tsf, beacon_interval);
 
        data[0] = (u8)tsf;
        data[1] = (u8)(tsf >> 8);
@@ -769,7 +720,7 @@ void CARDvUpdateNextTBTT(struct vnt_private *priv, u64 tsf,
  * Return Value: true if success; otherwise false
  *
  */
-int CARDbRadioPowerOff(struct vnt_private *priv)
+int vnt_radio_power_off(struct vnt_private *priv)
 {
        int ret = true;
 
@@ -782,12 +733,12 @@ int CARDbRadioPowerOff(struct vnt_private *priv)
        case RF_VT3226:
        case RF_VT3226D0:
        case RF_VT3342A0:
-               MACvRegBitsOff(priv, MAC_REG_SOFTPWRCTL,
+               vnt_mac_reg_bits_off(priv, MAC_REG_SOFTPWRCTL,
                                (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3));
                break;
        }
 
-       MACvRegBitsOff(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
+       vnt_mac_reg_bits_off(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
 
        BBvSetDeepSleep(priv);
 
@@ -806,7 +757,7 @@ int CARDbRadioPowerOff(struct vnt_private *priv)
  * Return Value: true if success; otherwise false
  *
  */
-int CARDbRadioPowerOn(struct vnt_private *priv)
+int vnt_radio_power_on(struct vnt_private *priv)
 {
        int ret = true;
 
@@ -817,7 +768,7 @@ int CARDbRadioPowerOn(struct vnt_private *priv)
 
        BBvExitDeepSleep(priv);
 
-       MACvRegBitsOn(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
+       vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_RXON);
 
        switch (priv->byRFType) {
        case RF_AL2230:
@@ -826,7 +777,7 @@ int CARDbRadioPowerOn(struct vnt_private *priv)
        case RF_VT3226:
        case RF_VT3226D0:
        case RF_VT3342A0:
-               MACvRegBitsOn(priv, MAC_REG_SOFTPWRCTL,
+               vnt_mac_reg_bits_on(priv, MAC_REG_SOFTPWRCTL,
                        (SOFTPWRCTL_SWPE2 | SOFTPWRCTL_SWPE3));
                break;
        }
@@ -834,14 +785,14 @@ int CARDbRadioPowerOn(struct vnt_private *priv)
        return ret;
 }
 
-void CARDvSetBSSMode(struct vnt_private *priv)
+void vnt_set_bss_mode(struct vnt_private *priv)
 {
        if (priv->byRFType == RF_AIROHA7230 && priv->byBBType == BB_TYPE_11A)
-               MACvSetBBType(priv, BB_TYPE_11G);
+               vnt_mac_set_bb_type(priv, BB_TYPE_11G);
        else
-               MACvSetBBType(priv, priv->byBBType);
+               vnt_mac_set_bb_type(priv, priv->byBBType);
 
-       priv->byPacketType = CARDbyGetPktType(priv);
+       priv->byPacketType = vnt_get_pkt_type(priv);
 
        if (priv->byBBType == BB_TYPE_11A)
                vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x88, 0x03);
@@ -850,8 +801,8 @@ void CARDvSetBSSMode(struct vnt_private *priv)
        else if (priv->byBBType == BB_TYPE_11G)
                vnt_control_out_u8(priv, MESSAGE_REQUEST_BBREG, 0x88, 0x08);
 
-       vUpdateIFS(priv);
-       CARDvSetRSPINF(priv, (u8)priv->byBBType);
+       vnt_update_ifs(priv);
+       vnt_set_rspinf(priv, (u8)priv->byBBType);
 
        if (priv->byBBType == BB_TYPE_11A) {
                if (priv->byRFType == RF_AIROHA7230) {
@@ -874,4 +825,6 @@ void CARDvSetBSSMode(struct vnt_private *priv)
                priv->abyBBVGA[2] = 0x0;
                priv->abyBBVGA[3] = 0x0;
        }
+
+       BBvSetVGAGainOffset(priv, priv->abyBBVGA[0]);
 }
index ac734714c7d1c5fc667dd09e61dcb0cd29f3809f..5b7cc5a908f6cb5c4ad96702b93655ebb92bdd31 100644 (file)
@@ -45,24 +45,21 @@ typedef enum _CARD_PHY_TYPE {
 
 struct vnt_private;
 
-void CARDbSetMediaChannel(struct vnt_private *pDevice, u32 uConnectionChannel);
-void CARDvSetRSPINF(struct vnt_private *, u8);
-void vUpdateIFS(struct vnt_private *);
-void CARDvUpdateBasicTopRate(struct vnt_private *);
-void CARDbAddBasicRate(struct vnt_private *, u16);
-int CARDbIsOFDMinBasicRate(struct vnt_private *pDevice);
-void CARDvAdjustTSF(struct vnt_private *pDevice, u8 byRxRate,
-               u64 qwBSSTimestamp, u64 qwLocalTSF);
-bool CARDbGetCurrentTSF(struct vnt_private *pDevice, u64 *pqwCurrTSF);
-bool CARDbClearCurrentTSF(struct vnt_private *pDevice);
-void CARDvSetFirstNextTBTT(struct vnt_private *pDevice, u16 wBeaconInterval);
-void CARDvUpdateNextTBTT(struct vnt_private *pDevice, u64 qwTSF,
-                        u16 wBeaconInterval);
-u64 CARDqGetNextTBTT(u64 qwTSF, u16 wBeaconInterval);
-u64 CARDqGetTSFOffset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
-int CARDbRadioPowerOff(struct vnt_private *pDevice);
-int CARDbRadioPowerOn(struct vnt_private *pDevice);
-u8 CARDbyGetPktType(struct vnt_private *pDevice);
-void CARDvSetBSSMode(struct vnt_private *pDevice);
+void vnt_set_channel(struct vnt_private *, u32);
+void vnt_set_rspinf(struct vnt_private *, u8);
+void vnt_update_ifs(struct vnt_private *);
+void vnt_update_top_rates(struct vnt_private *);
+int vnt_ofdm_min_rate(struct vnt_private *);
+void vnt_adjust_tsf(struct vnt_private *, u8, u64, u64);
+bool vnt_get_current_tsf(struct vnt_private *, u64 *);
+bool vnt_clear_current_tsf(struct vnt_private *);
+void vnt_reset_next_tbtt(struct vnt_private *, u16);
+void vnt_update_next_tbtt(struct vnt_private *, u64, u16);
+u64 vnt_get_next_tbtt(u64, u16);
+u64 vnt_get_tsf_offset(u8 byRxRate, u64 qwTSF1, u64 qwTSF2);
+int vnt_radio_power_off(struct vnt_private *);
+int vnt_radio_power_on(struct vnt_private *);
+u8 vnt_get_pkt_type(struct vnt_private *);
+void vnt_set_bss_mode(struct vnt_private *);
 
 #endif /* __CARD_H__ */
index 5a4fa0e2581b14355422957ff46ce2b59700b638..5202633f752f09c0f7733df30fc3859185f787f7 100644 (file)
  *
  */
 
-#include <linux/kernel.h>
-#include "country.h"
+#include "device.h"
 #include "channel.h"
 #include "rf.h"
 
-static int          msglevel                = MSG_LEVEL_INFO;
-//static int          msglevel                =MSG_LEVEL_DEBUG;
-
-static SChannelTblElement sChannelTbl[CB_MAX_CHANNEL+1] =
-{
-  {0,   0,    false},
-  {1,   2412, true},
-  {2,   2417, true},
-  {3,   2422, true},
-  {4,   2427, true},
-  {5,   2432, true},
-  {6,   2437, true},
-  {7,   2442, true},
-  {8,   2447, true},
-  {9,   2452, true},
-  {10,  2457, true},
-  {11,  2462, true},
-  {12,  2467, true},
-  {13,  2472, true},
-  {14,  2484, true},
-  {183, 4915, true}, //15
-  {184, 4920, true}, //16
-  {185, 4925, true}, //17
-  {187, 4935, true}, //18
-  {188, 4940, true}, //19
-  {189, 4945, true}, //20
-  {192, 4960, true}, //21
-  {196, 4980, true}, //22
-  {7,   5035, true}, //23
-  {8,   5040, true}, //24
-  {9,   5045, true}, //25
-  {11,  5055, true}, //26
-  {12,  5060, true}, //27
-  {16,  5080, true}, //28
-  {34,  5170, true}, //29
-  {36,  5180, true}, //30
-  {38,  5190, true}, //31
-  {40,  5200, true}, //32
-  {42,  5210, true}, //33
-  {44,  5220, true}, //34
-  {46,  5230, true}, //35
-  {48,  5240, true}, //36
-  {52,  5260, true}, //37
-  {56,  5280, true}, //38
-  {60,  5300, true}, //39
-  {64,  5320, true}, //40
-  {100, 5500, true}, //41
-  {104, 5520, true}, //42
-  {108, 5540, true}, //43
-  {112, 5560, true}, //44
-  {116, 5580, true}, //45
-  {120, 5600, true}, //46
-  {124, 5620, true}, //47
-  {128, 5640, true}, //48
-  {132, 5660, true}, //49
-  {136, 5680, true}, //50
-  {140, 5700, true}, //51
-  {149, 5745, true}, //52
-  {153, 5765, true}, //53
-  {157, 5785, true}, //54
-  {161, 5805, true}, //55
-  {165, 5825, true}  //56
+static struct ieee80211_rate vnt_rates_bg[] = {
+       { .bitrate = 10,  .hw_value = RATE_1M },
+       { .bitrate = 20,  .hw_value = RATE_2M },
+       { .bitrate = 55,  .hw_value = RATE_5M },
+       { .bitrate = 110, .hw_value = RATE_11M },
+       { .bitrate = 60,  .hw_value = RATE_6M },
+       { .bitrate = 90,  .hw_value = RATE_9M },
+       { .bitrate = 120, .hw_value = RATE_12M },
+       { .bitrate = 180, .hw_value = RATE_18M },
+       { .bitrate = 240, .hw_value = RATE_24M },
+       { .bitrate = 360, .hw_value = RATE_36M },
+       { .bitrate = 480, .hw_value = RATE_48M },
+       { .bitrate = 540, .hw_value = RATE_54M },
 };
 
-/************************************************************************
- * The Radar regulation rules for each country
- ************************************************************************/
-static  struct
-{
-    u8    byChannelCountryCode;             /* The country code         */
-    char    chCountryCode[2];
-    u8    bChannelIdxList[CB_MAX_CHANNEL];  /* Available channels Index */
-    u8    byPower[CB_MAX_CHANNEL];
-}   ChannelRuleTab[] =
-{
-/************************************************************************
- * This table is based on Athero driver rules
- ************************************************************************/
-/* Country          Available channels, ended with 0                    */
-/*                                           1   2   3   4   5   6   7   8   9  10  11  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  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  */
-{CCODE_FCC,                     {'U','S'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_TELEC,                   {'J','P'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  1,  0,  0,  1,  0,  1,  1,  0,  1,  0,  0,  1,  1,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0, 23,  0,  0, 23,  0, 23, 23,  0, 23,  0,  0, 23, 23, 23,  0, 23,  0, 23,  0, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ETSI,                    {'E','U'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_RESV3,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESV4,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESV5,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESV6,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESV7,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESV8,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESV9,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESVa,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESVb,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESVc,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESVd,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RESVe,                   {' ',' '},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ALLBAND,                 {' ',' '},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ALBANIA,                 {'A','L'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ALGERIA,                 {'D','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ARGENTINA,               {'A','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17, 17, 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30,  0}  },
-{CCODE_ARMENIA,                 {'A','M'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18, 18, 18, 18, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_AUSTRALIA,               {'A','U'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23,  0, 23,  0, 23,  0, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_AUSTRIA,                 {'A','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 15,  0, 15,  0, 15,  0, 15,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_AZERBAIJAN,              {'A','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18, 18, 18, 18, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_BAHRAIN,                 {'B','H'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_BELARUS,                 {'B','Y'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_BELGIUM,                 {'B','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_BELIZE,                  {'B','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_BOLIVIA,                 {'B','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_BRAZIL,                  {'B','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_BRUNEI_DARUSSALAM,       {'B','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_BULGARIA,                {'B','G'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23,  0, 23,  0, 23,  0, 23, 23, 23,  0,  0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,  0,  0,  0,  0,  0}  },
-{CCODE_CANADA,                  {'C','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_CHILE,                   {'C','L'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17, 17, 17, 17, 17}  },
-{CCODE_CHINA,                   {'C','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_COLOMBIA,                {'C','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_COSTA_RICA,              {'C','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_CROATIA,                 {'H','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_CYPRUS,                  {'C','Y'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_CZECH,                   {'C','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_DENMARK,                 {'D','K'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_DOMINICAN_REPUBLIC,      {'D','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_ECUADOR,                 {'E','C'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_EGYPT,                   {'E','G'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_EL_SALVADOR,             {'S','V'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ESTONIA,                 {'E','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_FINLAND,                 {'F','I'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_FRANCE,                  {'F','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_GERMANY,                 {'D','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_GREECE,                  {'G','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_GEORGIA,                 {'G','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18, 18, 18, 18, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_GUATEMALA,               {'G','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_HONDURAS,                {'H','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_HONG_KONG,               {'H','K'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23,  0, 23,  0, 23,  0, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_HUNGARY,                 {'H','U'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ICELAND,                 {'I','S'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_INDIA,                   {'I','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_INDONESIA,               {'I','D'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_IRAN,                    {'I','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_IRELAND,                 {'I','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_ITALY,                   {'I','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_ISRAEL,                  {'I','L'},  {   0,  0,  0,  0,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_JAPAN,                   {'J','P'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23,  0, 23,  0, 23,  0, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_JORDAN,                  {'J','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_KAZAKHSTAN,              {'K','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_KUWAIT,                  {'K','W'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_LATVIA,                  {'L','V'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_LEBANON,                 {'L','B'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_LEICHTENSTEIN,           {'L','I'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_LITHUANIA,               {'L','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_LUXEMBURG,               {'L','U'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_MACAU,                   {'M','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23,  0, 23,  0, 23,  0, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_MACEDONIA,               {'M','K'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_MALTA,                   {'M','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16,  0, 16,  0, 16,  0, 16, 16, 16, 16, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 16, 16, 16,  0}  },
-{CCODE_MALAYSIA,                {'M','Y'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_MEXICO,                  {'M','X'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_MONACO,                  {'M','C'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18, 18, 18, 18, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_MOROCCO,                 {'M','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_NETHERLANDS,             {'N','L'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_NEW_ZEALAND,             {'N','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23,  0, 23,  0, 23,  0, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_NORTH_KOREA,             {'K','P'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23, 23, 23, 23,  0}  },
-{CCODE_NORWAY,                  {'N','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_OMAN,                    {'O','M'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_PAKISTAN,                {'P','K'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_PANAMA,                  {'P','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_PERU,                    {'P','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_PHILIPPINES,             {'P','H'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_POLAND,                  {'P','L'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_PORTUGAL,                {'P','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_PUERTO_RICO,             {'P','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_QATAR,                   {'Q','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ROMANIA,                 {'R','O'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_RUSSIA,                  {'R','U'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_SAUDI_ARABIA,            {'S','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_SINGAPORE,               {'S','G'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20, 20, 20, 20, 20}  },
-{CCODE_SLOVAKIA,                {'S','K'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16,  0, 16,  0, 16,  0, 16, 16, 16, 16, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 16, 16, 16,  0}  },
-{CCODE_SLOVENIA,                {'S','I'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_SOUTH_AFRICA,            {'Z','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_SOUTH_KOREA,             {'K','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23, 23, 23, 23,  0}  },
-{CCODE_SPAIN,                   {'E','S'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16,  0, 16,  0, 16,  0, 16, 16, 16, 16, 16,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 16, 16, 16, 16,  0}  },
-{CCODE_SWEDEN,                  {'S','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_SWITZERLAND,             {'C','H'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_SYRIA,                   {'S','Y'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_TAIWAN,                  {'T','W'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17, 17, 17,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30,  0}  },
-{CCODE_THAILAND,                {'T','H'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23, 23, 23, 23,  0}  },
-{CCODE_TRINIDAD_TOBAGO,         {'T','T'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 18,  0, 18,  0, 18,  0, 18, 18, 18, 18, 18,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_TUNISIA,                 {'T','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_TURKEY,                  {'T','R'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_UK,                      {'G','B'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 20,  0, 20,  0, 20,  0, 20, 20, 20, 20, 20, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0}  },
-{CCODE_UKRAINE,                 {'U','A'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_UNITED_ARAB_EMIRATES,    {'A','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_UNITED_STATES,           {'U','S'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  1}
-                                      ,  {  27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 17,  0, 17,  0, 17,  0, 17, 23, 23, 23, 23,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 30, 30, 30, 30, 30}  },
-{CCODE_URUGUAY,                 {'U','Y'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23, 23, 23, 23,  0}  },
-{CCODE_UZBEKISTAN,              {'U','Z'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_VENEZUELA,               {'V','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  1,  1,  1,  0}
-                                      ,  {  20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 23, 23, 23, 23,  0}  },
-{CCODE_VIETNAM,                 {'V','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_YEMEN,                   {'Y','E'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_ZIMBABWE,                {'Z','W'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_JAPAN_W52_W53,           {'J','J'},  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  1,  0,  1,  0,  1,  0,  1,  1,  1,  1,  1,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  },
-{CCODE_MAX,                     {'U','N'},  {   1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1}
-                                      ,  {   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0}  }
-/*                                           1   2   3   4   5   6   7   8   9  10  11  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  42  43  44  45  46  47  48  49  50  51  52  53  54  55  56  */
+static struct ieee80211_rate vnt_rates_a[] = {
+       { .bitrate = 60,  .hw_value = RATE_6M },
+       { .bitrate = 90,  .hw_value = RATE_9M },
+       { .bitrate = 120, .hw_value = RATE_12M },
+       { .bitrate = 180, .hw_value = RATE_18M },
+       { .bitrate = 240, .hw_value = RATE_24M },
+       { .bitrate = 360, .hw_value = RATE_36M },
+       { .bitrate = 480, .hw_value = RATE_48M },
+       { .bitrate = 540, .hw_value = RATE_54M },
 };
 
-/************************************************************************
- * Country Channel Valid
- *  Input:  CountryCode, ChannelNum
- *          ChanneIndex is defined as VT3253 MAC channel:
- *              1   = 2.4G channel 1
- *              2   = 2.4G channel 2
- *              ...
- *              14  = 2.4G channel 14
- *              15  = 4.9G channel 183
- *              16  = 4.9G channel 184
- *              .....
- *  Output: true if the specified 5GHz band is allowed to be used.
-            False otherwise.
-// 4.9G => Ch 183, 184, 185, 187, 188, 189, 192, 196 (Value:15 ~ 22)
-
-// 5G => Ch 7, 8, 9, 11, 12, 16, 34, 36, 38, 40, 42, 44, 46, 48, 52, 56, 60, 64,
-// 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165 (Value 23 ~ 56)
- ************************************************************************/
-bool
-ChannelValid(unsigned int CountryCode, unsigned int ChannelIndex)
-{
-    bool    bValid;
-
-    bValid = false;
-    /*
-     * If Channel Index is invalid, return invalid
-     */
-    if ((ChannelIndex > CB_MAX_CHANNEL) ||
-        (ChannelIndex == 0))
-    {
-        bValid = false;
-        goto exit;
-    }
+static struct ieee80211_channel vnt_channels_2ghz[] = {
+       { .center_freq = 2412, .hw_value = 1 },
+       { .center_freq = 2417, .hw_value = 2 },
+       { .center_freq = 2422, .hw_value = 3 },
+       { .center_freq = 2427, .hw_value = 4 },
+       { .center_freq = 2432, .hw_value = 5 },
+       { .center_freq = 2437, .hw_value = 6 },
+       { .center_freq = 2442, .hw_value = 7 },
+       { .center_freq = 2447, .hw_value = 8 },
+       { .center_freq = 2452, .hw_value = 9 },
+       { .center_freq = 2457, .hw_value = 10 },
+       { .center_freq = 2462, .hw_value = 11 },
+       { .center_freq = 2467, .hw_value = 12 },
+       { .center_freq = 2472, .hw_value = 13 },
+       { .center_freq = 2484, .hw_value = 14 }
+};
 
-    bValid = sChannelTbl[ChannelIndex].bValid;
+static struct ieee80211_channel vnt_channels_5ghz[] = {
+       { .center_freq = 4915, .hw_value = 15 },
+       { .center_freq = 4920, .hw_value = 16 },
+       { .center_freq = 4925, .hw_value = 17 },
+       { .center_freq = 4935, .hw_value = 18 },
+       { .center_freq = 4940, .hw_value = 19 },
+       { .center_freq = 4945, .hw_value = 20 },
+       { .center_freq = 4960, .hw_value = 21 },
+       { .center_freq = 4980, .hw_value = 22 },
+       { .center_freq = 5035, .hw_value = 23 },
+       { .center_freq = 5040, .hw_value = 24 },
+       { .center_freq = 5045, .hw_value = 25 },
+       { .center_freq = 5055, .hw_value = 26 },
+       { .center_freq = 5060, .hw_value = 27 },
+       { .center_freq = 5080, .hw_value = 28 },
+       { .center_freq = 5170, .hw_value = 29 },
+       { .center_freq = 5180, .hw_value = 30 },
+       { .center_freq = 5190, .hw_value = 31 },
+       { .center_freq = 5200, .hw_value = 32 },
+       { .center_freq = 5210, .hw_value = 33 },
+       { .center_freq = 5220, .hw_value = 34 },
+       { .center_freq = 5230, .hw_value = 35 },
+       { .center_freq = 5240, .hw_value = 36 },
+       { .center_freq = 5260, .hw_value = 37 },
+       { .center_freq = 5280, .hw_value = 38 },
+       { .center_freq = 5300, .hw_value = 39 },
+       { .center_freq = 5320, .hw_value = 40 },
+       { .center_freq = 5500, .hw_value = 41 },
+       { .center_freq = 5520, .hw_value = 42 },
+       { .center_freq = 5540, .hw_value = 43 },
+       { .center_freq = 5560, .hw_value = 44 },
+       { .center_freq = 5580, .hw_value = 45 },
+       { .center_freq = 5600, .hw_value = 46 },
+       { .center_freq = 5620, .hw_value = 47 },
+       { .center_freq = 5640, .hw_value = 48 },
+       { .center_freq = 5660, .hw_value = 49 },
+       { .center_freq = 5680, .hw_value = 50 },
+       { .center_freq = 5700, .hw_value = 51 },
+       { .center_freq = 5745, .hw_value = 52 },
+       { .center_freq = 5765, .hw_value = 53 },
+       { .center_freq = 5785, .hw_value = 54 },
+       { .center_freq = 5805, .hw_value = 55 },
+       { .center_freq = 5825, .hw_value = 56 }
+};
 
-exit:
-    return (bValid);
+static struct ieee80211_supported_band vnt_supported_2ghz_band = {
+       .channels = vnt_channels_2ghz,
+       .n_channels = ARRAY_SIZE(vnt_channels_2ghz),
+       .bitrates = vnt_rates_bg,
+       .n_bitrates = ARRAY_SIZE(vnt_rates_bg),
+};
 
-} /* end ChannelValid */
+static struct ieee80211_supported_band vnt_supported_5ghz_band = {
+       .channels = vnt_channels_5ghz,
+       .n_channels = ARRAY_SIZE(vnt_channels_5ghz),
+       .bitrates = vnt_rates_a,
+       .n_bitrates = ARRAY_SIZE(vnt_rates_a),
+};
 
-void CHvInitChannelTable(struct vnt_private *pDevice)
+void vnt_init_bands(struct vnt_private *priv)
 {
-       bool bMultiBand = false;
-       int ii;
-
-    for (ii = 1; ii <= CB_MAX_CHANNEL; ii++)
-       sChannelTbl[ii].bValid = false;
+       struct ieee80211_channel *ch;
+       int i;
 
-    switch (pDevice->byRFType) {
-        case RF_AL2230:
-        case RF_AL2230S:
-        case RF_VT3226:
-        case RF_VT3226D0:
-            bMultiBand = false;
-            break;
-        case RF_AIROHA7230:
-        case RF_VT3342A0:
-        default :
-            bMultiBand = true;
-            break;
-    }
+       switch (priv->byRFType) {
+       case RF_AIROHA7230:
+       case RF_VT3342A0:
+               ch = vnt_channels_5ghz;
 
-    if (pDevice->b11hEable == true) {
-        if (bMultiBand == true) {
-               for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
-                       sChannelTbl[ii+1].bValid = true;
-                //pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
-                //pDevice->abyLocalPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
-               }
-               for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
-                //pDevice->abyRegPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
-                //pDevice->abyLocalPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
-               }
-        } else {
-               for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
-                       sChannelTbl[ii+1].bValid = true;
-                //pDevice->abyRegPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
-                //pDevice->abyLocalPwr[ii+1] = pDevice->abyCCKDefaultPwr[ii+1];
+               for (i = 0; i < ARRAY_SIZE(vnt_channels_5ghz); i++) {
+                       ch[i].max_power = VNT_RF_MAX_POWER;
+                       ch[i].flags = IEEE80211_CHAN_NO_HT40;
                }
-        }
-    } else if (pDevice->byZoneType <= CCODE_MAX) {
-        if (bMultiBand == true) {
-               for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
-                       if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
-                               sChannelTbl[ii+1].bValid = true;
-                    //pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
-                    //pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
-                       }
-               }
-        } else {
-               for (ii = 0; ii < CB_MAX_CHANNEL_24G; ii++) {
-                       if (ChannelRuleTab[pDevice->byZoneType].bChannelIdxList[ii] != 0) {
-                               sChannelTbl[ii+1].bValid = true;
-                    //pDevice->abyRegPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
-                    //pDevice->abyLocalPwr[ii+1] = ChannelRuleTab[pDevice->byZoneType].byPower[ii];
-                       }
+
+               priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =
+                                               &vnt_supported_5ghz_band;
+       /* fallthrough */
+       case RF_AL2230:
+       case RF_AL2230S:
+       case RF_VT3226:
+       case RF_VT3226D0:
+               ch = vnt_channels_2ghz;
+
+               for (i = 0; i < ARRAY_SIZE(vnt_channels_2ghz); i++) {
+                       ch[i].max_power = VNT_RF_MAX_POWER;
+                       ch[i].flags = IEEE80211_CHAN_NO_HT40;
                }
-        }
-    }
-    DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO"Zone=[%d][%c][%c]!!\n",pDevice->byZoneType,ChannelRuleTab[pDevice->byZoneType].chCountryCode[0],ChannelRuleTab[pDevice->byZoneType].chCountryCode[1]);
-    for (ii = 0; ii < CB_MAX_CHANNEL; ii++) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Channel[%d] is [%d]\n",sChannelTbl[ii].byChannelNumber,sChannelTbl[ii+1].bValid);
-        /*if (pDevice->abyRegPwr[ii+1] == 0) {
-            pDevice->abyRegPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
-        }
-        if (pDevice->abyLocalPwr[ii+1] == 0) {
-            pDevice->abyLocalPwr[ii+1] = pDevice->abyOFDMDefaultPwr[ii+1];
-        }*/
-    }
+
+               priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =
+                                               &vnt_supported_2ghz_band;
+               break;
+       }
 }
index 95701e0cbee3c7af9731f0b869f2f6a3115daf88..21c080803714b5a0c103f2e94a86626a491c19f9 100644 (file)
 
 #include "device.h"
 
-typedef struct tagSChannelTblElement {
-    u8    byChannelNumber;
-    unsigned int    uFrequency;
-    bool    bValid;
-} SChannelTblElement, *PSChannelTblElement;
-
-bool    ChannelValid(unsigned int CountryCode, unsigned int ChannelNum);
-void    CHvInitChannelTable(struct vnt_private *pDevice);
+void vnt_init_bands(struct vnt_private *);
 
 #endif  /* _CHANNEL_H_ */
diff --git a/drivers/staging/vt6656/country.h b/drivers/staging/vt6656/country.h
deleted file mode 100644 (file)
index a0320d8..0000000
+++ /dev/null
@@ -1,162 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: country.h
- *
- * Purpose: Country Code information
- *
- * Author: Lucas Lin
- *
- * Date: Dec 23, 2004
- *
- */
-
-#ifndef __COUNTRY_H__
-#define __COUNTRY_H__
-
-/************************************************************************
- * The definition here should be complied with the INF country order
- * Please check with VNWL.inf/VNWL64.inf/VNWL*.inf
- ************************************************************************/
-typedef enum _COUNTRY_CODE {
-    CCODE_FCC = 0,
-    CCODE_TELEC,
-    CCODE_ETSI,
-    CCODE_RESV3,
-    CCODE_RESV4,
-    CCODE_RESV5,
-    CCODE_RESV6,
-    CCODE_RESV7,
-    CCODE_RESV8,
-    CCODE_RESV9,
-    CCODE_RESVa,
-    CCODE_RESVb,
-    CCODE_RESVc,
-    CCODE_RESVd,
-    CCODE_RESVe,
-    CCODE_ALLBAND,
-    CCODE_ALBANIA,
-    CCODE_ALGERIA,
-    CCODE_ARGENTINA,
-    CCODE_ARMENIA,
-    CCODE_AUSTRALIA,
-    CCODE_AUSTRIA,
-    CCODE_AZERBAIJAN,
-    CCODE_BAHRAIN,
-    CCODE_BELARUS,
-    CCODE_BELGIUM,
-    CCODE_BELIZE,
-    CCODE_BOLIVIA,
-    CCODE_BRAZIL,
-    CCODE_BRUNEI_DARUSSALAM,
-    CCODE_BULGARIA,
-    CCODE_CANADA,
-    CCODE_CHILE,
-    CCODE_CHINA,
-    CCODE_COLOMBIA,
-    CCODE_COSTA_RICA,
-    CCODE_CROATIA,
-    CCODE_CYPRUS,
-    CCODE_CZECH,
-    CCODE_DENMARK,
-    CCODE_DOMINICAN_REPUBLIC,
-    CCODE_ECUADOR,
-    CCODE_EGYPT,
-    CCODE_EL_SALVADOR,
-    CCODE_ESTONIA,
-    CCODE_FINLAND,
-    CCODE_FRANCE,
-    CCODE_GERMANY,
-    CCODE_GREECE,
-    CCODE_GEORGIA,
-    CCODE_GUATEMALA,
-    CCODE_HONDURAS,
-    CCODE_HONG_KONG,
-    CCODE_HUNGARY,
-    CCODE_ICELAND,
-    CCODE_INDIA,
-    CCODE_INDONESIA,
-    CCODE_IRAN,
-    CCODE_IRELAND,
-    CCODE_ITALY,
-    CCODE_ISRAEL,
-    CCODE_JAPAN,
-    CCODE_JORDAN,
-    CCODE_KAZAKHSTAN,
-    CCODE_KUWAIT,
-    CCODE_LATVIA,
-    CCODE_LEBANON,
-    CCODE_LEICHTENSTEIN,
-    CCODE_LITHUANIA,
-    CCODE_LUXEMBURG,
-    CCODE_MACAU,
-    CCODE_MACEDONIA,
-    CCODE_MALTA,
-    CCODE_MALAYSIA,
-    CCODE_MEXICO,
-    CCODE_MONACO,
-    CCODE_MOROCCO,
-    CCODE_NETHERLANDS,
-    CCODE_NEW_ZEALAND,
-    CCODE_NORTH_KOREA,
-    CCODE_NORWAY,
-    CCODE_OMAN,
-    CCODE_PAKISTAN,
-    CCODE_PANAMA,
-    CCODE_PERU,
-    CCODE_PHILIPPINES,
-    CCODE_POLAND,
-    CCODE_PORTUGAL,
-    CCODE_PUERTO_RICO,
-    CCODE_QATAR,
-    CCODE_ROMANIA,
-    CCODE_RUSSIA,
-    CCODE_SAUDI_ARABIA,
-    CCODE_SINGAPORE,
-    CCODE_SLOVAKIA,
-    CCODE_SLOVENIA,
-    CCODE_SOUTH_AFRICA,
-    CCODE_SOUTH_KOREA,
-    CCODE_SPAIN,
-    CCODE_SWEDEN,
-    CCODE_SWITZERLAND,
-    CCODE_SYRIA,
-    CCODE_TAIWAN,
-    CCODE_THAILAND,
-    CCODE_TRINIDAD_TOBAGO,
-    CCODE_TUNISIA,
-    CCODE_TURKEY,
-    CCODE_UK,
-    CCODE_UKRAINE,
-    CCODE_UNITED_ARAB_EMIRATES,
-    CCODE_UNITED_STATES,
-    CCODE_URUGUAY,
-    CCODE_UZBEKISTAN,
-    CCODE_VENEZUELA,
-    CCODE_VIETNAM,
-    CCODE_YEMEN,
-    CCODE_ZIMBABWE,
-    CCODE_JAPAN_W52_W53,
-    CCODE_MAX
-} COUNTRY_CODE;
-
-/************************************************************************
- * Function prototype
- ************************************************************************/
-#endif  /* __COUNTRY_H__ */
diff --git a/drivers/staging/vt6656/datarate.c b/drivers/staging/vt6656/datarate.c
deleted file mode 100644 (file)
index 8032d6b..0000000
+++ /dev/null
@@ -1,364 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: datarate.c
- *
- * Purpose: Handles the auto fallback & data rates functions
- *
- * Author: Lyndon Chen
- *
- * Date: July 17, 2002
- *
- * Functions:
- *      RATEvParseMaxRate - Parsing the highest basic & support rate in rate field of frame
- *      RATEvTxRateFallBack - Rate fallback Algorithm Implementaion
- *      RATEuSetIE- Set rate IE field.
- *
- * Revision History:
- *
- */
-
-#include "tmacro.h"
-#include "mac.h"
-#include "80211mgr.h"
-#include "bssdb.h"
-#include "datarate.h"
-#include "card.h"
-#include "baseband.h"
-#include "rf.h"
-
-/* static int msglevel = MSG_LEVEL_DEBUG; */
-static int msglevel = MSG_LEVEL_INFO;
-static const u8 acbyIERate[MAX_RATE] = {0x02, 0x04, 0x0B, 0x16, 0x0C, 0x12, 0x18,
-       0x24, 0x30, 0x48, 0x60, 0x6C};
-
-#define AUTORATE_TXOK_CNT       0x0400
-#define AUTORATE_TXFAIL_CNT     0x0064
-#define AUTORATE_TIMEOUT        10
-
-void s_vResetCounter(PKnownNodeDB psNodeDBTable);
-
-void s_vResetCounter(PKnownNodeDB psNodeDBTable)
-{
-       u8 ii;
-
-       /* clear statistics counter for auto_rate */
-       for (ii = 0; ii <= MAX_RATE; ii++) {
-               psNodeDBTable->uTxOk[ii] = 0;
-               psNodeDBTable->uTxFail[ii] = 0;
-       }
-}
-
-/*+
- *
- * Routine Description:
- *      Rate fallback Algorithm Implementaion
- *
- * Parameters:
- *  In:
- *      pDevice         - Pointer to the adapter
- *      psNodeDBTable   - Pointer to Node Data Base
- *  Out:
- *      none
- *
- * Return Value: none
- *
--*/
-#define AUTORATE_TXCNT_THRESHOLD        20
-#define AUTORATE_INC_THRESHOLD          30
-
-/*+
- *
- * Description:
- *      Get RateIdx from the value in SuppRates IE or ExtSuppRates IE
- *
- * Parameters:
- *  In:
- *      u8    - Rate value in SuppRates IE or ExtSuppRates IE
- *  Out:
- *      none
- *
- * Return Value: RateIdx
- *
--*/
-u16 RATEwGetRateIdx(u8 byRate)
-{
-       u16 ii;
-
-       /* erase BasicRate flag */
-       byRate = byRate & 0x7F;
-
-       for (ii = 0; ii < MAX_RATE; ii++) {
-               if (acbyIERate[ii] == byRate)
-                       return ii;
-       }
-       return 0;
-}
-
-/*+
- *
- * Description:
- *      Parsing the highest basic & support rate in rate field of frame.
- *
- * Parameters:
- *  In:
- *      pDevice         - Pointer to the adapter
- *      pItemRates      - Pointer to Rate field defined in 802.11 spec.
- *      pItemExtRates      - Pointer to Extended Rate field defined in 802.11 spec.
- *  Out:
- *      pwMaxBasicRate  - Maximum Basic Rate
- *      pwMaxSuppRate   - Maximum Supported Rate
- *      pbyTopCCKRate   - Maximum Basic Rate in CCK mode
- *      pbyTopOFDMRate  - Maximum Basic Rate in OFDM mode
- *
- * Return Value: none
- *
--*/
-
-void RATEvParseMaxRate(struct vnt_private *pDevice,
-       PWLAN_IE_SUPP_RATES pItemRates, PWLAN_IE_SUPP_RATES pItemExtRates,
-       int bUpdateBasicRate, u16 *pwMaxBasicRate, u16 *pwMaxSuppRate,
-       u16 *pwSuppRate, u8 *pbyTopCCKRate, u8 *pbyTopOFDMRate)
-{
-       int ii;
-       u8 byHighSuppRate = 0, byRate = 0;
-       u16 wOldBasicRate = pDevice->wBasicRate;
-       u32 uRateLen;
-
-       if (pItemRates == NULL)
-               return;
-
-       *pwSuppRate = 0;
-       uRateLen = pItemRates->len;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ParseMaxRate Len: %d\n", uRateLen);
-       if (pDevice->byBBType != BB_TYPE_11B) {
-               if (uRateLen > WLAN_RATES_MAXLEN)
-                       uRateLen = WLAN_RATES_MAXLEN;
-       } else {
-               if (uRateLen > WLAN_RATES_MAXLEN_11B)
-                       uRateLen = WLAN_RATES_MAXLEN_11B;
-       }
-
-       for (ii = 0; ii < uRateLen; ii++) {
-               byRate = (u8)(pItemRates->abyRates[ii]);
-               if (WLAN_MGMT_IS_BASICRATE(byRate) &&
-                               (bUpdateBasicRate == true)) {
-                       /*
-                        * add to basic rate set, update pDevice->byTopCCKBasicRate and
-                        * pDevice->byTopOFDMBasicRate
-                        */
-                       CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
-                       DBG_PRT(MSG_LEVEL_DEBUG,
-                               KERN_INFO"ParseMaxRate AddBasicRate: %d\n",
-                               RATEwGetRateIdx(byRate));
-               }
-               byRate = (u8)(pItemRates->abyRates[ii]&0x7F);
-               if (byHighSuppRate == 0)
-                       byHighSuppRate = byRate;
-               if (byRate > byHighSuppRate)
-                       byHighSuppRate = byRate;
-               *pwSuppRate |= (1<<RATEwGetRateIdx(byRate));
-       }
-       if ((pItemExtRates != NULL) && (pItemExtRates->byElementID == WLAN_EID_EXTSUPP_RATES) &&
-                       (pDevice->byBBType != BB_TYPE_11B)) {
-
-               unsigned int uExtRateLen = pItemExtRates->len;
-
-               if (uExtRateLen > WLAN_RATES_MAXLEN)
-                       uExtRateLen = WLAN_RATES_MAXLEN;
-
-               for (ii = 0; ii < uExtRateLen; ii++) {
-                       byRate = (u8)(pItemExtRates->abyRates[ii]);
-                       /* select highest basic rate */
-                       if (WLAN_MGMT_IS_BASICRATE(pItemExtRates->abyRates[ii])) {
-                               /*
-                                * add to basic rate set, update pDevice->byTopCCKBasicRate and
-                                * pDevice->byTopOFDMBasicRate
-                                */
-                               CARDbAddBasicRate((void *)pDevice, RATEwGetRateIdx(byRate));
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO"ParseMaxRate AddBasicRate: %d\n",
-                                               RATEwGetRateIdx(byRate));
-                       }
-                       byRate = (u8)(pItemExtRates->abyRates[ii]&0x7F);
-                       if (byHighSuppRate == 0)
-                               byHighSuppRate = byRate;
-                       if (byRate > byHighSuppRate)
-                               byHighSuppRate = byRate;
-                       *pwSuppRate |= (1<<RATEwGetRateIdx(byRate));
-
-                       /* DBG_PRN_GRP09(("ParseMaxRate : HighSuppRate: %d, %X\n",
-                        * RATEwGetRateIdx(byRate), byRate));
-                        */
-               }
-       }
-
-       if ((pDevice->byPacketType == PK_TYPE_11GB)
-                       && CARDbIsOFDMinBasicRate((void *)pDevice)) {
-               pDevice->byPacketType = PK_TYPE_11GA;
-       }
-
-       *pbyTopCCKRate = pDevice->byTopCCKBasicRate;
-       *pbyTopOFDMRate = pDevice->byTopOFDMBasicRate;
-       *pwMaxSuppRate = RATEwGetRateIdx(byHighSuppRate);
-       if ((pDevice->byPacketType == PK_TYPE_11B) || (pDevice->byPacketType == PK_TYPE_11GB))
-               *pwMaxBasicRate = pDevice->byTopCCKBasicRate;
-       else
-               *pwMaxBasicRate = pDevice->byTopOFDMBasicRate;
-       if (wOldBasicRate != pDevice->wBasicRate)
-               CARDvSetRSPINF((void *)pDevice, pDevice->byBBType);
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Exit ParseMaxRate\n");
-}
-
-/*+
- *
- * Routine Description:
- *      Rate fallback Algorithm Implementaion
- *
- * Parameters:
- *  In:
- *      pDevice         - Pointer to the adapter
- *      psNodeDBTable   - Pointer to Node Data Base
- *  Out:
- *      none
- *
- * Return Value: none
- *
--*/
-#define AUTORATE_TXCNT_THRESHOLD        20
-#define AUTORATE_INC_THRESHOLD          30
-
-void RATEvTxRateFallBack(struct vnt_private *pDevice,
-       PKnownNodeDB psNodeDBTable)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u16 wIdxDownRate = 0;
-       int ii;
-       int bAutoRate[MAX_RATE] = {true, true, true, true, false, false, true,
-                                        true, true, true, true, true};
-       u32 dwThroughputTbl[MAX_RATE] = {10, 20, 55, 110, 60, 90, 120, 180,
-               240, 360, 480, 540};
-       u32 dwThroughput = 0;
-       u16 wIdxUpRate = 0;
-       u32 dwTxDiff = 0;
-
-       if (pMgmt->eScanState != WMAC_NO_SCANNING)
-               return; /* Don't do Fallback when scanning Channel */
-
-       psNodeDBTable->uTimeCount++;
-
-       if (psNodeDBTable->uTxFail[MAX_RATE] > psNodeDBTable->uTxOk[MAX_RATE])
-               dwTxDiff = psNodeDBTable->uTxFail[MAX_RATE] - psNodeDBTable->uTxOk[MAX_RATE];
-
-       if ((psNodeDBTable->uTxOk[MAX_RATE] < AUTORATE_TXOK_CNT) &&
-                       (dwTxDiff < AUTORATE_TXFAIL_CNT) &&
-                       (psNodeDBTable->uTimeCount < AUTORATE_TIMEOUT)) {
-               return;
-       }
-
-       if (psNodeDBTable->uTimeCount >= AUTORATE_TIMEOUT)
-               psNodeDBTable->uTimeCount = 0;
-
-       for (ii = 0; ii < MAX_RATE; ii++) {
-               if (psNodeDBTable->wSuppRate & (0x0001<<ii)) {
-                       if (bAutoRate[ii] == true)
-                               wIdxUpRate = (u16) ii;
-               } else {
-                       bAutoRate[ii] = false;
-               }
-       }
-
-       for (ii = 0; ii <= psNodeDBTable->wTxDataRate; ii++) {
-               if ((psNodeDBTable->uTxOk[ii] != 0) ||
-                               (psNodeDBTable->uTxFail[ii] != 0)) {
-                       dwThroughputTbl[ii] *= psNodeDBTable->uTxOk[ii];
-                       if (ii < RATE_11M)
-                               psNodeDBTable->uTxFail[ii] *= 4;
-                       dwThroughputTbl[ii] /= (psNodeDBTable->uTxOk[ii] + psNodeDBTable->uTxFail[ii]);
-               }
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rate %d,Ok: %d, Fail:%d, Throughput:%d\n",
-                               ii, (int)psNodeDBTable->uTxOk[ii], (int)psNodeDBTable->uTxFail[ii], (int)dwThroughputTbl[ii]);
-       }
-       dwThroughput = dwThroughputTbl[psNodeDBTable->wTxDataRate];
-
-       wIdxDownRate = psNodeDBTable->wTxDataRate;
-       for (ii = psNodeDBTable->wTxDataRate; ii > 0;) {
-               ii--;
-               if ((dwThroughputTbl[ii] > dwThroughput) &&
-                               (bAutoRate[ii] == true)) {
-                       dwThroughput = dwThroughputTbl[ii];
-                       wIdxDownRate = (u16) ii;
-               }
-       }
-       psNodeDBTable->wTxDataRate = wIdxDownRate;
-       if (psNodeDBTable->uTxOk[MAX_RATE]) {
-               if (psNodeDBTable->uTxOk[MAX_RATE] >
-                               (psNodeDBTable->uTxFail[MAX_RATE] * 4)) {
-                       psNodeDBTable->wTxDataRate = wIdxUpRate;
-               }
-       } else { /* adhoc, if uTxOk(total) == 0 & uTxFail(total) == 0 */
-               if (psNodeDBTable->uTxFail[MAX_RATE] == 0)
-                       psNodeDBTable->wTxDataRate = wIdxUpRate;
-       }
-
-       if (pDevice->byBBType == BB_TYPE_11A) {
-               if (psNodeDBTable->wTxDataRate <= RATE_11M)
-                       psNodeDBTable->wTxDataRate = RATE_6M;
-       }
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uTxOk[MAX_RATE] %d, uTxFail[MAX_RATE]:%d\n", (int)psNodeDBTable->uTxOk[MAX_RATE], (int)psNodeDBTable->uTxFail[MAX_RATE]);
-       s_vResetCounter(psNodeDBTable);
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rate: %d, U:%d, D:%d\n", (int)psNodeDBTable->wTxDataRate, (int)wIdxUpRate, (int)wIdxDownRate);
-       return;
-}
-
-/*+
- *
- * Description:
- *    This routine is used to assemble available Rate IE.
- *
- * Parameters:
- *  In:
- *    pDevice
- *  Out:
- *
- * Return Value: None
- *
--*/
-u8 RATEuSetIE(PWLAN_IE_SUPP_RATES pSrcRates, PWLAN_IE_SUPP_RATES pDstRates,
-               unsigned int uRateLen)
-{
-       unsigned int ii, uu, uRateCnt = 0;
-
-       if ((pSrcRates == NULL) || (pDstRates == NULL))
-               return 0;
-
-       if (pSrcRates->len == 0)
-               return 0;
-
-       for (ii = 0; ii < uRateLen; ii++) {
-               for (uu = 0; uu < pSrcRates->len; uu++) {
-                       if ((pSrcRates->abyRates[uu] & 0x7F) == acbyIERate[ii]) {
-                               pDstRates->abyRates[uRateCnt++] = pSrcRates->abyRates[uu];
-                               break;
-                       }
-               }
-       }
-       return (u8)uRateCnt;
-}
diff --git a/drivers/staging/vt6656/datarate.h b/drivers/staging/vt6656/datarate.h
deleted file mode 100644 (file)
index 96252ad..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: datarate.h
- *
- * Purpose: Handles the auto fallback & data rates functions
- *
- * Author: Lyndon Chen
- *
- * Date: July 16, 2002
- *
- */
-#ifndef __DATARATE_H__
-#define __DATARATE_H__
-
-#define FALLBACK_PKT_COLLECT_TR_H  50   /* pkts */
-#define FALLBACK_PKT_COLLECT_TR_L  10   /* pkts */
-#define FALLBACK_POLL_SECOND       5    /* 5 sec */
-#define FALLBACK_RECOVER_SECOND    30   /* 30 sec */
-#define FALLBACK_THRESHOLD         15   /* percent */
-#define UPGRADE_THRESHOLD          5    /* percent */
-#define UPGRADE_CNT_THRD           3    /* times */
-#define RETRY_TIMES_THRD_H         2    /* times */
-#define RETRY_TIMES_THRD_L         1    /* times */
-
-#define RATE_1M         0
-#define RATE_2M         1
-#define RATE_5M         2
-#define RATE_11M        3
-#define RATE_6M         4
-#define RATE_9M         5
-#define RATE_12M        6
-#define RATE_18M        7
-#define RATE_24M        8
-#define RATE_36M        9
-#define RATE_48M       10
-#define RATE_54M       11
-#define RATE_AUTO      12
-
-void RATEvParseMaxRate(struct vnt_private *, PWLAN_IE_SUPP_RATES pItemRates,
-       PWLAN_IE_SUPP_RATES pItemExtRates, int bUpdateBasicRate,
-       u16 *pwMaxBasicRate, u16 *pwMaxSuppRate, u16 *pwSuppRate,
-       u8 *pbyTopCCKRate, u8 *pbyTopOFDMRate);
-
-void RATEvTxRateFallBack(struct vnt_private *pDevice,
-       PKnownNodeDB psNodeDBTable);
-
-u8
-RATEuSetIE(
-     PWLAN_IE_SUPP_RATES pSrcRates,
-     PWLAN_IE_SUPP_RATES pDstRates,
-     unsigned int                uRateLen
-    );
-
-u16
-RATEwGetRateIdx(
-     u8 byRate
-    );
-
-#endif /* __DATARATE_H__ */
index 617d479b85cc13332adba12502efb3249b3f4c3a..f79af8513ff29faf6efd41e35acace69486eab54 100644 (file)
@@ -34,8 +34,6 @@
 #include <linux/types.h>
 #include <linux/mm.h>
 
-#include "tether.h"
-
 /* max transmit or receive buffer size */
 #define CB_MAX_BUF_SIZE     2900U       /* NOTE: must be multiple of 4 */
 
index 5b64ca7b62f38dd01f371e24799b00ff2e6600ad..f1ed43e19b9ce00b13f7e2b209ce6a83c9fe5750 100644 (file)
 #include <linux/delay.h>
 #include <linux/device.h>
 #include <linux/firmware.h>
-#include <linux/etherdevice.h>
 #include <linux/suspend.h>
 #include <linux/if_arp.h>
 #include <linux/wireless.h>
-#include <net/iw_handler.h>
-#include <net/cfg80211.h>
 #include <linux/timer.h>
 #include <linux/usb.h>
 #include <linux/crc32.h>
+#include <net/mac80211.h>
 
 #ifdef SIOCETHTOOL
 #define DEVICE_ETHTOOL_IOCTL_SUPPORT
 #undef DEVICE_ETHTOOL_IOCTL_SUPPORT
 #endif
 
+#define RATE_1M                0
+#define RATE_2M                1
+#define RATE_5M                2
+#define RATE_11M       3
+#define RATE_6M                4
+#define RATE_9M                5
+#define RATE_12M       6
+#define RATE_18M       7
+#define RATE_24M       8
+#define RATE_36M       9
+#define RATE_48M       10
+#define RATE_54M       11
+#define RATE_AUTO      12
+
 #define MAX_RATE                       12
 
 /*
  * device specific
  */
 
-#include "80211hdr.h"
-#include "tether.h"
-#include "wmgr.h"
 #include "wcmd.h"
-#include "rc4.h"
 #include "desc.h"
 #include "key.h"
 #include "card.h"
 /* USB registers */
 #define USB_REG4                       0x604
 
-#ifndef RUN_AT
-#define RUN_AT(x)                       (jiffies+(x))
-#endif
-
-#define PRIVATE_Message                 0
-
 #define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
-#define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); }
 
 typedef enum __device_msg_level {
        MSG_LEVEL_ERR = 0,            /* Errors causing abnormal operation */
@@ -222,7 +223,8 @@ struct vnt_rsp_card_init {
  */
 enum {
        CONTEXT_DATA_PACKET = 1,
-       CONTEXT_MGMT_PACKET
+       CONTEXT_MGMT_PACKET,
+       CONTEXT_BEACON_PACKET
 };
 
 /* RCB (Receive Control Block) */
@@ -231,7 +233,6 @@ struct vnt_rcb {
        signed long Ref;
        void *pDevice;
        struct urb *pUrb;
-       struct vnt_rx_mgmt sMngPacket;
        struct sk_buff *skb;
        int bBoolInUse;
 };
@@ -241,7 +242,9 @@ struct vnt_usb_send_context {
        void *priv;
        struct sk_buff *skb;
        struct urb *urb;
+       struct ieee80211_hdr *hdr;
        unsigned int buf_len;
+       u16 tx_hdr_size;
        u8 type;
        bool in_use;
        unsigned char data[MAX_TOTAL_SIZE_WITH_ALL_HEADERS];
@@ -253,16 +256,6 @@ struct vnt_tx_pkt_info {
        u8 dest_addr[ETH_ALEN];
 };
 
-/* structure got from configuration file as user-desired default settings */
-typedef struct _DEFAULT_CONFIG {
-       signed int    ZoneType;
-       signed int    eConfigMode;
-       signed int    eAuthenMode;        /* open/wep/wpa */
-       signed int    bShareKeyAlgorithm; /* open-open/{open,wep}-sharekey */
-       signed int    keyidx;             /* wepkey index */
-       signed int    eEncryptionStatus;
-} DEFAULT_CONFIG, *PDEFAULT_CONFIG;
-
 /*
  * Structure to keep track of USB interrupt packets
  */
@@ -280,94 +273,6 @@ typedef enum __DEVICE_NDIS_STATUS {
     STATUS_PENDING,
 } DEVICE_NDIS_STATUS, *PDEVICE_NDIS_STATUS;
 
-#define MAX_BSSIDINFO_4_PMKID   16
-#define MAX_PMKIDLIST           5
-/* flags for PMKID Candidate list structure */
-#define NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED    0x01
-
-/* PMKID Structures */
-typedef unsigned char   NDIS_802_11_PMKID_VALUE[16];
-
-typedef enum _NDIS_802_11_WEP_STATUS
-{
-    Ndis802_11WEPEnabled,
-    Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
-    Ndis802_11WEPDisabled,
-    Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
-    Ndis802_11WEPKeyAbsent,
-    Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
-    Ndis802_11WEPNotSupported,
-    Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
-    Ndis802_11Encryption2Enabled,
-    Ndis802_11Encryption2KeyAbsent,
-    Ndis802_11Encryption3Enabled,
-    Ndis802_11Encryption3KeyAbsent
-} NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
-  NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
-
-typedef enum _NDIS_802_11_STATUS_TYPE
-{
-       Ndis802_11StatusType_Authentication,
-       Ndis802_11StatusType_MediaStreamMode,
-       Ndis802_11StatusType_PMKID_CandidateList,
-       Ndis802_11StatusTypeMax, /* not a real type, defined as upper bound */
-} NDIS_802_11_STATUS_TYPE, *PNDIS_802_11_STATUS_TYPE;
-
-/* added new types for PMKID Candidate lists */
-typedef struct _PMKID_CANDIDATE {
-    NDIS_802_11_MAC_ADDRESS BSSID;
-    unsigned long Flags;
-} PMKID_CANDIDATE, *PPMKID_CANDIDATE;
-
-typedef struct _BSSID_INFO
-{
-    NDIS_802_11_MAC_ADDRESS BSSID;
-    NDIS_802_11_PMKID_VALUE PMKID;
-} BSSID_INFO, *PBSSID_INFO;
-
-typedef struct tagSPMKID {
-    unsigned long Length;
-    unsigned long BSSIDInfoCount;
-    BSSID_INFO BSSIDInfo[MAX_BSSIDINFO_4_PMKID];
-} SPMKID, *PSPMKID;
-
-typedef struct tagSPMKIDCandidateEvent {
-    NDIS_802_11_STATUS_TYPE     StatusType;
-       unsigned long Version;       /* Version of the structure */
-       unsigned long NumCandidates; /* No. of pmkid candidates */
-    PMKID_CANDIDATE CandidateList[MAX_PMKIDLIST];
-} SPMKIDCandidateEvent, *PSPMKIDCandidateEvent;
-
-/* The receive duplicate detection cache entry */
-typedef struct tagSCacheEntry{
-       __le16 wFmSequence;
-       u8 abyAddr2[ETH_ALEN];
-       __le16 wFrameCtl;
-} SCacheEntry, *PSCacheEntry;
-
-typedef struct tagSCache{
-/* The receive cache is updated circularly.  The next entry to be written is
- * indexed by the "InPtr".
- */
-       unsigned int uInPtr; /* Place to use next */
-    SCacheEntry     asCacheEntry[DUPLICATE_RX_CACHE_LENGTH];
-} SCache, *PSCache;
-
-#define CB_MAX_RX_FRAG                 64
-/*
- * DeFragment Control Block, used for collecting fragments prior to reassembly
- */
-typedef struct tagSDeFragControlBlock
-{
-    u16            wSequence;
-    u16            wFragNum;
-    u8            abyAddr2[ETH_ALEN];
-       unsigned int            uLifetime;
-    struct sk_buff* skb;
-    u8 *           pbyRxBuffer;
-    unsigned int            cbFrameLength;
-    bool            bInUse;
-} SDeFragControlBlock, *PSDeFragControlBlock;
 
 /* flags for options */
 #define     DEVICE_FLAGS_UNPLUG          0x00000001UL
@@ -375,67 +280,34 @@ typedef struct tagSDeFragControlBlock
 /* flags for driver status */
 #define     DEVICE_FLAGS_OPENED          0x00010000UL
 
-typedef struct __device_opt {
-       int nRxDescs0;  /* number of RX descriptors 0 */
-       int nTxDescs0;  /* number of TX descriptors 0, 1, 2, 3 */
-       int rts_thresh; /* RTS threshold */
-    int         frag_thresh;
-    int         OpMode;
-    int         data_rate;
-    int         channel_num;
-    int         short_retry;
-    int         long_retry;
-    int         bbp_type;
-    u32         flags;
-} OPTIONS, *POPTIONS;
-
 struct vnt_private {
+       /* mac80211 */
+       struct ieee80211_hw *hw;
+       struct ieee80211_vif *vif;
+       u8 mac_hw;
        /* netdev */
        struct usb_device *usb;
-       struct net_device *dev;
        struct net_device_stats stats;
 
-       OPTIONS sOpts;
-
-       struct work_struct read_work_item;
-       struct work_struct rx_mng_work_item;
+       u64 tsf_time;
+       u8 rx_rate;
 
        u32 rx_buf_sz;
-       int multicast_limit;
-       u8 byRxMode;
+       int mc_list_count;
 
        spinlock_t lock;
        struct mutex usb_lock;
 
-       u32 rx_bytes;
-
        u32 flags;
        unsigned long Flags;
 
-       SCache sDupRxCache;
-
-       SDeFragControlBlock sRxDFCB[CB_MAX_RX_FRAG];
-       u32 cbDFCB;
-       u32 cbFreeDFCB;
-       u32 uCurrentDFCBIdx;
-
        /* USB */
        struct urb *pInterruptURB;
        u32 int_interval;
 
        /* Variables to track resources for the BULK In Pipe */
-       struct vnt_rcb *pRCBMem;
        struct vnt_rcb *apRCB[CB_MAX_RX_DESC];
        u32 cbRD;
-       struct vnt_rcb *FirstRecvFreeList;
-       struct vnt_rcb *LastRecvFreeList;
-       u32 NumRecvFreeList;
-       struct vnt_rcb *FirstRecvMngList;
-       struct vnt_rcb *LastRecvMngList;
-       u32 NumRecvMngList;
-       int bIsRxWorkItemQueued;
-       int bIsRxMngWorkItemQueued;
-       unsigned long ulRcvRefCount; /* packets that have not returned back */
 
        /* Variables to track resources for the BULK Out Pipe */
        struct vnt_usb_send_context *apTD[CB_MAX_TX_DESC];
@@ -445,9 +317,6 @@ struct vnt_private {
        /* Variables to track resources for the Interrupt In Pipe */
        struct vnt_interrupt_buffer int_buf;
 
-       /* default config from file by user setting */
-       DEFAULT_CONFIG config_file;
-
        /* Version control */
        u16 wFirmwareVersion;
        u8 byLocalID;
@@ -455,11 +324,7 @@ struct vnt_private {
        u8 byBBRxConf;
 
        u8 byZoneType;
-       int bZoneRegExist;
 
-       u8 byOriginalZonetype;
-
-       int bLinkPass; /* link status: OK or fail */
        struct vnt_cmd_card_init init_command;
        struct vnt_rsp_card_init init_response;
        u8 abyCurrentNetAddr[ETH_ALEN];
@@ -467,20 +332,10 @@ struct vnt_private {
 
        int bExistSWNetAddr;
 
-       /* Maintain statistical debug info. */
-       unsigned long SendContextsInUse;
-       unsigned long RcvBuffersInUse;
-
-       /* 802.11 management */
-       struct vnt_manager vnt_mgmt;
-
        u64 qwCurrTSF;
-       u32 cbBulkInMax;
-       int bPSRxBeacon;
 
        /* 802.11 MAC specific */
        u32 uCurrRSSI;
-       u8 byCurrSQ;
 
        /* Antenna Diversity */
        int bTxRxAntInv;
@@ -500,30 +355,16 @@ struct vnt_private {
        u32 uCwMin; /* Current CwMin */
        u32 uCwMax; /* CwMax is fixed on 1023 */
 
-       /* PHY parameter */
-       u8  bySIFS;
-       u8  byDIFS;
-       u8  byEIFS;
-       u8  bySlot;
-       u8  byCWMaxMin;
-
        /* Rate */
        u8 byBBType; /* 0: 11A, 1:11B, 2:11G */
        u8 byPacketType; /* 0:11a 1:11b 2:11gb 3:11ga */
-       u16 wBasicRate;
+       u32 wBasicRate;
        u8 byTopOFDMBasicRate;
        u8 byTopCCKBasicRate;
 
        u8 abyEEPROM[EEP_MAX_CONTEXT_SIZE];  /*u32 alignment */
 
-       u8 byMinChannel;
-       u8 byMaxChannel;
-       u32 uConnectionRate;
-
        u8 byPreambleType;
-       u8 byShortPreamble;
-       /* CARD_PHY_TYPE */
-       u8 eConfigPHYMode;
 
        /* For RF Power table */
        u8 byCCKPwr;
@@ -538,58 +379,28 @@ struct vnt_private {
        u16 tx_rate_fb0;
        u16 tx_rate_fb1;
 
-       u16 wRTSThreshold;
-       u16 wFragmentationThreshold;
        u8 byShortRetryLimit;
        u8 byLongRetryLimit;
 
        enum nl80211_iftype op_mode;
 
-       int bBSSIDFilter;
-       u16 wMaxTransmitMSDULifetime;
-       u8 abyBSSID[ETH_ALEN];
-       u8 abyDesireBSSID[ETH_ALEN];
-
-       u32 dwMaxReceiveLifetime;  /* dot11MaxReceiveLifetime */
-
-       int bEncryptionEnable;
        int bShortSlotTime;
-       int bProtectMode;
-       int bNonERPPresent;
        int bBarkerPreambleMd;
 
-       u8 byERPFlag;
-       u16 wUseProtectCntDown;
-
        int bRadioControlOff;
        int bRadioOff;
 
        /* Power save */
-       int bEnablePSMode;
-       u16 wListenInterval;
-       int bPWBitOn;
-       WMAC_POWER_MODE ePSMode;
-       unsigned long ulPSModeWaitTx;
-       int bPSModeTxBurst;
+       u16 current_aid;
 
        /* Beacon releated */
        u16 wSeqCounter;
-       int bBeaconBufReady;
-       int bBeaconSent;
-       int bFixRate;
-       u8 byCurrentCh;
 
        CMD_STATE eCommandState;
 
        CMD_CODE eCommand;
-       int bBeaconTx;
-       u8 byScanBBType;
 
-       int bStopBeacon;
        int bStopDataPkt;
-       int bStopTx0Pkt;
-       u32 uAutoReConnectTime;
-       u32 uIsroamingTime;
 
        /* 802.11 counter */
 
@@ -601,40 +412,10 @@ struct vnt_private {
        int bCmdClear;
        int bNeedRadioOFF;
 
-       int bEnableRoaming;
-       int bIsRoaming;
-       int bFastRoaming;
-       u8 bSameBSSMaxNum;
-       u8 bSameBSSCurNum;
-       int bRoaming;
-       int b11hEable;
-
-       /* Encryption */
-       NDIS_802_11_WEP_STATUS eEncryptionStatus;
-       int  bTransmitKey;
-       NDIS_802_11_WEP_STATUS eOldEncryptionStatus;
-       SKeyManagement sKey;
-       u32 dwIVCounter;
-
-       RC4Ext SBox;
-       u8 abyPRNG[WLAN_WEPMAX_KEYLEN+3];
-       u8 byKeyIndex;
-
-       u32 uKeyLength;
-       u8 abyKey[WLAN_WEP232_KEYLEN];
-
-       /* for AP mode */
-       u32 uAssocCount;
-       int bMoreData;
-
-       /* QoS */
-       int bGrpAckPolicy;
+       unsigned long key_entry_inuse;
 
        u8 byAutoFBCtrl;
 
-       int bTxMICFail;
-       int bRxMICFail;
-
        /* For Update BaseBand VGA Gain Offset */
        u32 uBBVGADiffCount;
        u8 byBBVGANew;
@@ -649,69 +430,16 @@ struct vnt_private {
 
        /* command timer */
        struct delayed_work run_command_work;
-       /* One second callback */
-       struct delayed_work second_callback_work;
 
        u8 tx_data_time_out;
-       bool tx_trigger;
-       int fWPA_Authened; /*is WPA/WPA-PSK or WPA2/WPA2-PSK authen?? */
-       u8 byReAssocCount;
-       u8 byLinkWaitCount;
-
-       struct ethhdr sTxEthHeader;
-       struct ethhdr sRxEthHeader;
-       u8 abyBroadcastAddr[ETH_ALEN];
-       u8 abySNAP_RFC1042[ETH_ALEN];
-       u8 abySNAP_Bridgetunnel[ETH_ALEN];
-
-       /* Pre-Authentication & PMK cache */
-       SPMKID gsPMKID;
-       SPMKIDCandidateEvent gsPMKIDCandidate;
-
-       /* for 802.11h */
-       int b11hEnable;
 
        int bChannelSwitch;
        u8 byNewChannel;
        u8 byChannelSwitchCount;
 
-       /* WPA supplicant daemon */
-       int bWPADEVUp;
-       int bwextstep0;
-       int bwextstep1;
-       int bwextstep2;
-       int bwextstep3;
-       int bWPASuppWextEnabled;
-
-       u32 uChannel;
-
        struct iw_statistics wstats; /* wireless stats */
-
-       int bCommit;
-
 };
 
-#define EnqueueRCB(_Head, _Tail, _RCB)                  \
-{                                                       \
-    if (!_Head) {                                       \
-        _Head = _RCB;                                   \
-    }                                                   \
-    else {                                              \
-        _Tail->Next = _RCB;                             \
-    }                                                   \
-    _RCB->Next = NULL;                                  \
-    _Tail = _RCB;                                       \
-}
-
-#define DequeueRCB(Head, Tail)                          \
-{                                                       \
-    struct vnt_rcb *RCB = Head;                         \
-    if (!RCB->Next) {                                   \
-        Tail = NULL;                                    \
-    }                                                   \
-    Head = RCB->Next;                                   \
-}
-
 #define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
     if ((uVar) >= ((uModulo) - 1))                  \
         (uVar) = 0;                                 \
@@ -729,7 +457,6 @@ struct vnt_private {
 
 #define MP_IS_READY(_M)        (((_M)->Flags & fMP_DISCONNECTED) == 0)
 
-int device_alloc_frag_buf(struct vnt_private *, PSDeFragControlBlock pDeF);
-void vnt_configure_filter(struct vnt_private *);
+int vnt_init(struct vnt_private *priv);
 
 #endif
index c0ec5b37aa7ceebc10d84c3908809a7437735c72..ca5555482377d6fe6cb23feebf28eff76a71bbdb 100644 (file)
 #include "dpc.h"
 #include "device.h"
 #include "rxtx.h"
-#include "tether.h"
 #include "card.h"
-#include "bssdb.h"
 #include "mac.h"
 #include "baseband.h"
-#include "michael.h"
-#include "tkip.h"
-#include "wctl.h"
 #include "rf.h"
-#include "iowpa.h"
-#include "datarate.h"
 #include "usbpipe.h"
 
-//static int          msglevel                =MSG_LEVEL_DEBUG;
-static int          msglevel                =MSG_LEVEL_INFO;
-
-static const u8 acbyRxRate[MAX_RATE] =
-{2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
-
-static u8 s_byGetRateIdx(u8 byRate);
-
-static
-void
-s_vGetDASA(
-      u8 * pbyRxBufferAddr,
-     unsigned int *pcbHeaderSize,
-     struct ethhdr *psEthHeader
-    );
-
-static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
-       u8 *pbyRxBufferAddr, u32 cbPacketSize, int bIsWEP, int bExtIV,
-       u32 *pcbHeadSize);
-
-static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
-       u32 FrameSize, u8 *pbyRsr, u8 *pbyNewRsr, PSKeyItem *pKeyOut,
-       s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16);
-
-/*+
- *
- * Description:
- *    Translate Rcv 802.11 header to 802.3 header with Rx buffer
- *
- * Parameters:
- *  In:
- *      pDevice
- *      dwRxBufferAddr  - Address of Rcv Buffer
- *      cbPacketSize    - Rcv Packet size
- *      bIsWEP          - If Rcv with WEP
- *  Out:
- *      pcbHeaderSize   - 802.11 header size
- *
- * Return Value: None
- *
--*/
-
-static void s_vProcessRxMACHeader(struct vnt_private *pDevice,
-       u8 *pbyRxBufferAddr, u32 cbPacketSize, int bIsWEP, int bExtIV,
-       u32 *pcbHeadSize)
-{
-       u8 *pbyRxBuffer;
-       u32 cbHeaderSize = 0;
-       u16 *pwType;
-       struct ieee80211_hdr *pMACHeader;
-       int ii;
-
-    pMACHeader = (struct ieee80211_hdr *) (pbyRxBufferAddr + cbHeaderSize);
-
-    s_vGetDASA((u8 *)pMACHeader, &cbHeaderSize, &pDevice->sRxEthHeader);
-
-    if (bIsWEP) {
-        if (bExtIV) {
-            // strip IV&ExtIV , add 8 byte
-            cbHeaderSize += (WLAN_HDR_ADDR3_LEN + 8);
-        } else {
-            // strip IV , add 4 byte
-            cbHeaderSize += (WLAN_HDR_ADDR3_LEN + 4);
-        }
-    }
-    else {
-        cbHeaderSize += WLAN_HDR_ADDR3_LEN;
-    };
-
-    pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
-    if (ether_addr_equal(pbyRxBuffer, pDevice->abySNAP_Bridgetunnel)) {
-        cbHeaderSize += 6;
-    } else if (ether_addr_equal(pbyRxBuffer, pDevice->abySNAP_RFC1042)) {
-        cbHeaderSize += 6;
-        pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
-       if ((*pwType == cpu_to_be16(ETH_P_IPX)) ||
-           (*pwType == cpu_to_le16(0xF380))) {
-               cbHeaderSize -= 8;
-            pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
-            if (bIsWEP) {
-                if (bExtIV) {
-                    *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8);    // 8 is IV&ExtIV
-                } else {
-                    *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 4);    // 4 is IV
-                }
-            }
-            else {
-                *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN);
-            }
-        }
-    }
-    else {
-        cbHeaderSize -= 2;
-        pwType = (u16 *) (pbyRxBufferAddr + cbHeaderSize);
-        if (bIsWEP) {
-            if (bExtIV) {
-                *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 8);    // 8 is IV&ExtIV
-            } else {
-                *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN - 4);    // 4 is IV
-            }
-        }
-        else {
-            *pwType = htons(cbPacketSize - WLAN_HDR_ADDR3_LEN);
-        }
-    }
-
-    cbHeaderSize -= (ETH_ALEN * 2);
-    pbyRxBuffer = (u8 *) (pbyRxBufferAddr + cbHeaderSize);
-    for (ii = 0; ii < ETH_ALEN; ii++)
-        *pbyRxBuffer++ = pDevice->sRxEthHeader.h_dest[ii];
-    for (ii = 0; ii < ETH_ALEN; ii++)
-        *pbyRxBuffer++ = pDevice->sRxEthHeader.h_source[ii];
-
-    *pcbHeadSize = cbHeaderSize;
-}
-
-static u8 s_byGetRateIdx(u8 byRate)
+int vnt_rx_data(struct vnt_private *priv, struct vnt_rcb *ptr_rcb,
+       unsigned long bytes_received)
 {
-    u8    byRateIdx;
-
-    for (byRateIdx = 0; byRateIdx <MAX_RATE ; byRateIdx++) {
-        if (acbyRxRate[byRateIdx%MAX_RATE] == byRate)
-            return byRateIdx;
-    }
-    return 0;
-}
-
-static
-void
-s_vGetDASA (
-      u8 * pbyRxBufferAddr,
-     unsigned int *pcbHeaderSize,
-     struct ethhdr *psEthHeader
-    )
-{
-       unsigned int            cbHeaderSize = 0;
-       struct ieee80211_hdr *pMACHeader;
-       int             ii;
-
-       pMACHeader = (struct ieee80211_hdr *) (pbyRxBufferAddr + cbHeaderSize);
-
-       if ((pMACHeader->frame_control & FC_TODS) == 0) {
-               if (pMACHeader->frame_control & FC_FROMDS) {
-                       for (ii = 0; ii < ETH_ALEN; ii++) {
-                               psEthHeader->h_dest[ii] =
-                                       pMACHeader->addr1[ii];
-                               psEthHeader->h_source[ii] =
-                                       pMACHeader->addr3[ii];
-                       }
-               } else {
-                       /* IBSS mode */
-                       for (ii = 0; ii < ETH_ALEN; ii++) {
-                               psEthHeader->h_dest[ii] =
-                                       pMACHeader->addr1[ii];
-                               psEthHeader->h_source[ii] =
-                                       pMACHeader->addr2[ii];
-                       }
-               }
-       } else {
-               /* Is AP mode.. */
-               if (pMACHeader->frame_control & FC_FROMDS) {
-                       for (ii = 0; ii < ETH_ALEN; ii++) {
-                               psEthHeader->h_dest[ii] =
-                                       pMACHeader->addr3[ii];
-                               psEthHeader->h_source[ii] =
-                                       pMACHeader->addr4[ii];
-                               cbHeaderSize += 6;
-                       }
-               } else {
-                       for (ii = 0; ii < ETH_ALEN; ii++) {
-                               psEthHeader->h_dest[ii] =
-                                       pMACHeader->addr3[ii];
-                               psEthHeader->h_source[ii] =
-                                       pMACHeader->addr2[ii];
-                       }
-               }
-       };
-    *pcbHeaderSize = cbHeaderSize;
-}
-
-int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
-       unsigned long BytesToIndicate)
-{
-       struct net_device_stats *pStats = &pDevice->stats;
+       struct ieee80211_hw *hw = priv->hw;
+       struct ieee80211_supported_band *sband;
        struct sk_buff *skb;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_rx_mgmt *pRxPacket = &pMgmt->sRxPacket;
-       struct ieee80211_hdr *p802_11Header;
-       u8 *pbyRsr, *pbyNewRsr, *pbyRSSI, *pbyFrame;
-       u64 *pqwTSFTime;
-       u32 bDeFragRx = false;
-       u32 cbHeaderOffset, cbIVOffset;
-       u32 FrameSize;
-       u16 wEtherType = 0;
-       s32 iSANodeIndex = -1;
-       int ii;
-       u8 *pbyRxSts, *pbyRxRate, *pbySQ, *pby3SQ;
-       u32 cbHeaderSize;
-       PSKeyItem pKey = NULL;
-       u16 wRxTSC15_0 = 0;
-       u32 dwRxTSC47_16 = 0;
-       /* signed long ldBm = 0; */
-       int bIsWEP = false; int bExtIV = false;
-       u32 dwWbkStatus;
-       struct vnt_rcb *pRCBIndicate = pRCB;
-       u8 *pbyDAddress;
-       u16 *pwPLCP_Length;
-       u8 abyVaildRate[MAX_RATE]
-               = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
-       u16 wPLCPwithPadding;
-       struct ieee80211_hdr *pMACHeader;
-       int bRxeapol_key = false;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---------- RXbBulkInProcessData---\n");
-
-    skb = pRCB->skb;
+       struct ieee80211_rx_status rx_status = { 0 };
+       struct ieee80211_hdr *hdr;
+       __le16 fc;
+       u8 *rsr, *new_rsr, *rssi, *frame;
+       __le64 *tsf_time;
+       u32 frame_size;
+       int ii, r;
+       u8 *rx_sts, *rx_rate, *sq, *sq_3;
+       u32 wbk_status;
+       u8 *skb_data;
+       u16 *pay_load_len;
+       u16 pay_load_with_padding;
+       u8 rate_idx = 0;
+       u8 rate[MAX_RATE] = {2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108};
+       long rx_dbm;
+
+       skb = ptr_rcb->skb;
 
        /* [31:16]RcvByteCount ( not include 4-byte Status ) */
-       dwWbkStatus = *((u32 *)(skb->data));
-       FrameSize = dwWbkStatus >> 16;
-       FrameSize += 4;
+       wbk_status = *((u32 *)(skb->data));
+       frame_size = wbk_status >> 16;
+       frame_size += 4;
 
-       if (BytesToIndicate != FrameSize) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"------- WRONG Length 1\n");
-               pStats->rx_frame_errors++;
+       if (bytes_received != frame_size) {
+               dev_dbg(&priv->usb->dev, "------- WRONG Length 1\n");
                return false;
        }
 
-    if ((BytesToIndicate > 2372) || (BytesToIndicate <= 40)) {
-        // Frame Size error drop this packet.
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "---------- WRONG Length 2\n");
-       pStats->rx_frame_errors++;
-        return false;
-    }
-
-    pbyDAddress = (u8 *)(skb->data);
-    pbyRxSts = pbyDAddress+4;
-    pbyRxRate = pbyDAddress+5;
-
-    //real Frame Size = USBFrameSize -4WbkStatus - 4RxStatus - 8TSF - 4RSR - 4SQ3 - ?Padding
-    //if SQ3 the range is 24~27, if no SQ3 the range is 20~23
-    //real Frame size in PLCPLength field.
-    pwPLCP_Length = (u16 *) (pbyDAddress + 6);
-    //Fix hardware bug => PLCP_Length error
-    if ( ((BytesToIndicate - (*pwPLCP_Length)) > 27) ||
-         ((BytesToIndicate - (*pwPLCP_Length)) < 24) ||
-         (BytesToIndicate < (*pwPLCP_Length)) ) {
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong PLCP Length %x\n", (int) *pwPLCP_Length);
-       pStats->rx_frame_errors++;
-        return false;
-    }
-    for ( ii=RATE_1M;ii<MAX_RATE;ii++) {
-        if ( *pbyRxRate == abyVaildRate[ii] ) {
-            break;
-        }
-    }
-    if ( ii==MAX_RATE ) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Wrong RxRate %x\n",(int) *pbyRxRate);
-        return false;
-    }
-
-    wPLCPwithPadding = ( (*pwPLCP_Length / 4) + ( (*pwPLCP_Length % 4) ? 1:0 ) ) *4;
-
-       pqwTSFTime = (u64 *)(pbyDAddress + 8 + wPLCPwithPadding);
-  if(pDevice->byBBType == BB_TYPE_11G)  {
-      pby3SQ = pbyDAddress + 8 + wPLCPwithPadding + 12;
-      pbySQ = pby3SQ;
-    }
-  else {
-   pbySQ = pbyDAddress + 8 + wPLCPwithPadding + 8;
-   pby3SQ = pbySQ;
-  }
-    pbyNewRsr = pbyDAddress + 8 + wPLCPwithPadding + 9;
-    pbyRSSI = pbyDAddress + 8 + wPLCPwithPadding + 10;
-    pbyRsr = pbyDAddress + 8 + wPLCPwithPadding + 11;
-
-    FrameSize = *pwPLCP_Length;
-
-    pbyFrame = pbyDAddress + 8;
-
-    pMACHeader = (struct ieee80211_hdr *) pbyFrame;
-
-//mike add: to judge if current AP is activated?
-    if ((pMgmt->eCurrMode == WMAC_MODE_STANDBY) ||
-        (pMgmt->eCurrMode == WMAC_MODE_ESS_STA)) {
-       if (pMgmt->sNodeDBTable[0].bActive) {
-        if (ether_addr_equal(pMgmt->abyCurrBSSID, pMACHeader->addr2)) {
-           if (pMgmt->sNodeDBTable[0].uInActiveCount != 0)
-                  pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-           }
-       }
-    }
-
-    if (!is_multicast_ether_addr(pMACHeader->addr1)) {
-        if (WCTLbIsDuplicate(&(pDevice->sDupRxCache), (struct ieee80211_hdr *) pbyFrame)) {
-            return false;
-        }
-
-       if (!ether_addr_equal(pDevice->abyCurrentNetAddr, pMACHeader->addr1)) {
+       if ((bytes_received > 2372) || (bytes_received <= 40)) {
+               /* Frame Size error drop this packet.*/
+               dev_dbg(&priv->usb->dev, "------ WRONG Length 2\n");
                return false;
-        }
-    }
-
-    // Use for TKIP MIC
-    s_vGetDASA(pbyFrame, &cbHeaderSize, &pDevice->sRxEthHeader);
-
-    if (ether_addr_equal((u8 *)pDevice->sRxEthHeader.h_source,
-                        pDevice->abyCurrentNetAddr))
-        return false;
-
-    if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) || (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA)) {
-        if (IS_CTL_PSPOLL(pbyFrame) || !IS_TYPE_CONTROL(pbyFrame)) {
-            p802_11Header = (struct ieee80211_hdr *) (pbyFrame);
-            // get SA NodeIndex
-            if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(p802_11Header->addr2), &iSANodeIndex)) {
-                pMgmt->sNodeDBTable[iSANodeIndex].ulLastRxJiffer = jiffies;
-                pMgmt->sNodeDBTable[iSANodeIndex].uInActiveCount = 0;
-            }
-        }
-    }
-
-    if (IS_FC_WEP(pbyFrame)) {
-        bool     bRxDecryOK = false;
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"rx WEP pkt\n");
-        bIsWEP = true;
-
-       bRxDecryOK = s_bHandleRxEncryption(pDevice, pbyFrame, FrameSize,
-               pbyRsr, pbyNewRsr, &pKey, &bExtIV, &wRxTSC15_0, &dwRxTSC47_16);
-
-        if (bRxDecryOK) {
-            if ((*pbyNewRsr & NEWRSR_DECRYPTOK) == 0) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV Fail\n");
-                if ( (pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
-                    (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
-                }
-                return false;
-            }
-        } else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WEP Func Fail\n");
-            return false;
-        }
-        if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_CCMP))
-            FrameSize -= 8;         // Message Integrity Code
-        else
-            FrameSize -= 4;         // 4 is ICV
-    }
-
-    //
-    // RX OK
-    //
-    /* remove the FCS/CRC length */
-    FrameSize -= ETH_FCS_LEN;
-
-    if ( !(*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) && // unicast address
-        (IS_FRAGMENT_PKT((pbyFrame)))
-        ) {
-        // defragment
-        bDeFragRx = WCTLbHandleFragment(pDevice, (struct ieee80211_hdr *) (pbyFrame), FrameSize, bIsWEP, bExtIV);
-        if (bDeFragRx) {
-            // defrag complete
-            // TODO skb, pbyFrame
-            skb = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb;
-            FrameSize = pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength;
-            pbyFrame = skb->data + 8;
-        }
-        else {
-            return false;
-        }
-    }
-
-    //
-    // Management & Control frame Handle
-    //
-    if ((IS_TYPE_DATA((pbyFrame))) == false) {
-        // Handle Control & Manage Frame
-
-        if (IS_TYPE_MGMT((pbyFrame))) {
-            u8 * pbyData1;
-            u8 * pbyData2;
-
-            pRxPacket = &(pRCB->sMngPacket);
-            pRxPacket->p80211Header = (PUWLAN_80211HDR)(pbyFrame);
-            pRxPacket->cbMPDULen = FrameSize;
-            pRxPacket->uRSSI = *pbyRSSI;
-            pRxPacket->bySQ = *pbySQ;
-               pRxPacket->qwLocalTSF = cpu_to_le64(*pqwTSFTime);
-            if (bIsWEP) {
-                // strip IV
-                pbyData1 = WLAN_HDR_A3_DATA_PTR(pbyFrame);
-                pbyData2 = WLAN_HDR_A3_DATA_PTR(pbyFrame) + 4;
-                for (ii = 0; ii < (FrameSize - 4); ii++) {
-                    *pbyData1 = *pbyData2;
-                     pbyData1++;
-                     pbyData2++;
-                }
-            }
-
-            pRxPacket->byRxRate = s_byGetRateIdx(*pbyRxRate);
-
-            if ( *pbyRxSts == 0 ) {
-                //Discard beacon packet which channel is 0
-                if ( (WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) == WLAN_FSTYPE_BEACON) ||
-                     (WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) == WLAN_FSTYPE_PROBERESP) ) {
-                       return false;
-                }
-            }
-            pRxPacket->byRxChannel = (*pbyRxSts) >> 2;
-
-            //
-            // Insert the RCB in the Recv Mng list
-            //
-            EnqueueRCB(pDevice->FirstRecvMngList, pDevice->LastRecvMngList, pRCBIndicate);
-            pDevice->NumRecvMngList++;
-            if ( bDeFragRx == false) {
-                pRCB->Ref++;
-            }
-            if (pDevice->bIsRxMngWorkItemQueued == false) {
-                pDevice->bIsRxMngWorkItemQueued = true;
-               schedule_work(&pDevice->rx_mng_work_item);
-            }
-
-        }
-        else {
-            // Control Frame
-        };
-        return false;
-    }
-    else {
-        if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-            //In AP mode, hw only check addr1(BSSID or RA) if equal to local MAC.
-            if ( !(*pbyRsr & RSR_BSSIDOK)) {
-                if (bDeFragRx) {
-                    if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                        DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                        pDevice->dev->name);
-                    }
-                }
-                return false;
-            }
-        }
-        else {
-            // discard DATA packet while not associate || BSSID error
-            if ((pDevice->bLinkPass == false) ||
-                !(*pbyRsr & RSR_BSSIDOK)) {
-                if (bDeFragRx) {
-                    if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                        DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                        pDevice->dev->name);
-                    }
-                }
-                return false;
-            }
-   //mike add:station mode check eapol-key challenge--->
-         {
-           u8  Protocol_Version;    //802.1x Authentication
-           u8  Packet_Type;           //802.1x Authentication
-           u8  Descriptor_type;
-             u16 Key_info;
-              if (bIsWEP)
-                  cbIVOffset = 8;
-              else
-                  cbIVOffset = 0;
-              wEtherType = (skb->data[cbIVOffset + 8 + 24 + 6] << 8) |
-                          skb->data[cbIVOffset + 8 + 24 + 6 + 1];
-             Protocol_Version = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1];
-             Packet_Type = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1];
-            if (wEtherType == ETH_P_PAE) {         //Protocol Type in LLC-Header
-                  if(((Protocol_Version==1) ||(Protocol_Version==2)) &&
-                    (Packet_Type==3)) {  //802.1x OR eapol-key challenge frame receive
-                        bRxeapol_key = true;
-                     Descriptor_type = skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2];
-                     Key_info = (skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+1]<<8) |skb->data[cbIVOffset + 8 + 24 + 6 + 1 +1+1+1+2+2] ;
-                     if(Descriptor_type==2) {    //RSN
-                         //  printk("WPA2_Rx_eapol-key_info<-----:%x\n",Key_info);
-                     }
-                    else  if(Descriptor_type==254) {
-                        //  printk("WPA_Rx_eapol-key_info<-----:%x\n",Key_info);
-                    }
-                  }
-             }
-         }
-    //mike add:station mode check eapol-key challenge<---
-        }
-    }
-
-// Data frame Handle
-
-    if (pDevice->bEnablePSMode) {
-        if (IS_FC_MOREDATA((pbyFrame))) {
-            if (*pbyRsr & RSR_ADDROK) {
-                //PSbSendPSPOLL((PSDevice)pDevice);
-            }
-        }
-        else {
-            if (pMgmt->bInTIMWake == true) {
-                pMgmt->bInTIMWake = false;
-            }
-        }
-    }
-
-    // ++++++++ For BaseBand Algorithm +++++++++++++++
-    pDevice->uCurrRSSI = *pbyRSSI;
-    pDevice->byCurrSQ = *pbySQ;
-
-    // todo
-/*
-    if ((*pbyRSSI != 0) &&
-        (pMgmt->pCurrBSS!=NULL)) {
-        RFvRSSITodBm(pDevice, *pbyRSSI, &ldBm);
-        // Monitor if RSSI is too strong.
-        pMgmt->pCurrBSS->byRSSIStatCnt++;
-        pMgmt->pCurrBSS->byRSSIStatCnt %= RSSI_STAT_COUNT;
-        pMgmt->pCurrBSS->ldBmAverage[pMgmt->pCurrBSS->byRSSIStatCnt] = ldBm;
-       for (ii = 0; ii < RSSI_STAT_COUNT; ii++) {
-               if (pMgmt->pCurrBSS->ldBmAverage[ii] != 0) {
-                       pMgmt->pCurrBSS->ldBmMAX =
-                               max(pMgmt->pCurrBSS->ldBmAverage[ii], ldBm);
-               }
-        }
-    }
-*/
-
-    if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) {
-        if (bIsWEP) {
-            FrameSize -= 8;  //MIC
-        }
-    }
-
-    //--------------------------------------------------------------------------------
-    // Soft MIC
-    if ((pKey != NULL) && (pKey->byCipherSuite == KEY_CTL_TKIP)) {
-        if (bIsWEP) {
-            u32 *          pdwMIC_L;
-            u32 *          pdwMIC_R;
-            u32           dwMIC_Priority;
-            u32           dwMICKey0 = 0, dwMICKey1 = 0;
-            u32           dwLocalMIC_L = 0;
-            u32           dwLocalMIC_R = 0;
-
-            if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-                dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24]));
-                dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28]));
-            }
-            else {
-                if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
-                    dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[16]));
-                    dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[20]));
-                } else if ((pKey->dwKeyIndex & BIT28) == 0) {
-                    dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[16]));
-                    dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[20]));
-                } else {
-                    dwMICKey0 = cpu_to_le32(*(u32 *)(&pKey->abyKey[24]));
-                    dwMICKey1 = cpu_to_le32(*(u32 *)(&pKey->abyKey[28]));
-                }
-            }
-
-            MIC_vInit(dwMICKey0, dwMICKey1);
-            MIC_vAppend((u8 *)&(pDevice->sRxEthHeader.h_dest[0]), 12);
-            dwMIC_Priority = 0;
-            MIC_vAppend((u8 *)&dwMIC_Priority, 4);
-            // 4 is Rcv buffer header, 24 is MAC Header, and 8 is IV and Ext IV.
-            MIC_vAppend((u8 *)(skb->data + 8 + WLAN_HDR_ADDR3_LEN + 8),
-                        FrameSize - WLAN_HDR_ADDR3_LEN - 8);
-            MIC_vGetMIC(&dwLocalMIC_L, &dwLocalMIC_R);
-            MIC_vUnInit();
-
-            pdwMIC_L = (u32 *)(skb->data + 8 + FrameSize);
-            pdwMIC_R = (u32 *)(skb->data + 8 + FrameSize + 4);
-
-            if ((cpu_to_le32(*pdwMIC_L) != dwLocalMIC_L) || (cpu_to_le32(*pdwMIC_R) != dwLocalMIC_R) ||
-                (pDevice->bRxMICFail == true)) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC comparison is fail!\n");
-                pDevice->bRxMICFail = false;
-                if (bDeFragRx) {
-                    if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                        DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                            pDevice->dev->name);
-                    }
-                }
-                               //send event to wpa_supplicant
-                               //if(pDevice->bWPASuppWextEnabled == true)
-                               {
-                                       union iwreq_data wrqu;
-                                       struct iw_michaelmicfailure ev;
-                                       int keyidx = pbyFrame[cbHeaderSize+3] >> 6; //top two-bits
-                                       memset(&ev, 0, sizeof(ev));
-                                       ev.flags = keyidx & IW_MICFAILURE_KEY_ID;
-                                       if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
-                                                       (pMgmt->eCurrState == WMAC_STATE_ASSOC) &&
-                                                               (*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) == 0) {
-                                               ev.flags |= IW_MICFAILURE_PAIRWISE;
-                                       } else {
-                                               ev.flags |= IW_MICFAILURE_GROUP;
-                                       }
-
-                                       ev.src_addr.sa_family = ARPHRD_ETHER;
-                                       memcpy(ev.src_addr.sa_data, pMACHeader->addr2, ETH_ALEN);
-                                       memset(&wrqu, 0, sizeof(wrqu));
-                                       wrqu.data.length = sizeof(ev);
-                       PRINT_K("wireless_send_event--->IWEVMICHAELMICFAILURE\n");
-                                       wireless_send_event(pDevice->dev, IWEVMICHAELMICFAILURE, &wrqu, (char *)&ev);
-
-                               }
-
-                return false;
-
-            }
-        }
-    } //---end of SOFT MIC-----------------------------------------------------------------------
-
-    // ++++++++++ Reply Counter Check +++++++++++++
-
-    if ((pKey != NULL) && ((pKey->byCipherSuite == KEY_CTL_TKIP) ||
-                           (pKey->byCipherSuite == KEY_CTL_CCMP))) {
-        if (bIsWEP) {
-            u16        wLocalTSC15_0 = 0;
-            u32       dwLocalTSC47_16 = 0;
-           unsigned long long       RSC = 0;
-            // endian issues
-           RSC = *((unsigned long long *) &(pKey->KeyRSC));
-            wLocalTSC15_0 = (u16) RSC;
-            dwLocalTSC47_16 = (u32) (RSC>>16);
-
-            RSC = dwRxTSC47_16;
-            RSC <<= 16;
-            RSC += wRxTSC15_0;
-               memcpy(&(pKey->KeyRSC), &RSC,  sizeof(u64));
-
-               if (pDevice->vnt_mgmt.eCurrMode == WMAC_MODE_ESS_STA &&
-                       pDevice->vnt_mgmt.eCurrState == WMAC_STATE_ASSOC) {
-                       /* check RSC */
-                if ( (wRxTSC15_0 < wLocalTSC15_0) &&
-                     (dwRxTSC47_16 <= dwLocalTSC47_16) &&
-                     !((dwRxTSC47_16 == 0) && (dwLocalTSC47_16 == 0xFFFFFFFF))) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC is illegal~~!\n ");
-
-                    if (bDeFragRx) {
-                        if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-                            DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                                pDevice->dev->name);
-                        }
-                    }
-                    return false;
-                }
-            }
-        }
-    } // ----- End of Reply Counter Check --------------------------
-
-    s_vProcessRxMACHeader(pDevice, (u8 *)(skb->data+8), FrameSize, bIsWEP, bExtIV, &cbHeaderOffset);
-    FrameSize -= cbHeaderOffset;
-    cbHeaderOffset += 8;        // 8 is Rcv buffer header
-
-    // Null data, framesize = 12
-    if (FrameSize < 12)
-        return false;
-
-       skb->data += cbHeaderOffset;
-       skb->tail += cbHeaderOffset;
-    skb_put(skb, FrameSize);
-    skb->protocol=eth_type_trans(skb, skb->dev);
-    skb->ip_summed=CHECKSUM_NONE;
-    pStats->rx_bytes +=skb->len;
-    pStats->rx_packets++;
-    netif_rx(skb);
-    if (bDeFragRx) {
-        if (!device_alloc_frag_buf(pDevice, &pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx])) {
-            DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc more frag bufs\n",
-                pDevice->dev->name);
-        }
-        return false;
-    }
-
-    return true;
-}
-
-static int s_bHandleRxEncryption(struct vnt_private *pDevice, u8 *pbyFrame,
-       u32 FrameSize, u8 *pbyRsr, u8 *pbyNewRsr, PSKeyItem *pKeyOut,
-       s32 *pbExtIV, u16 *pwRxTSC15_0, u32 *pdwRxTSC47_16)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u32 PayloadLen = FrameSize;
-       u8 *pbyIV;
-       u8 byKeyIdx;
-       PSKeyItem pKey = NULL;
-       u8 byDecMode = KEY_CTL_WEP;
-
-    *pwRxTSC15_0 = 0;
-    *pdwRxTSC47_16 = 0;
-
-    pbyIV = pbyFrame + WLAN_HDR_ADDR3_LEN;
-    if ( WLAN_GET_FC_TODS(*(u16 *)pbyFrame) &&
-         WLAN_GET_FC_FROMDS(*(u16 *)pbyFrame) ) {
-         pbyIV += 6;             // 6 is 802.11 address4
-         PayloadLen -= 6;
-    }
-    byKeyIdx = (*(pbyIV+3) & 0xc0);
-    byKeyIdx >>= 6;
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\nKeyIdx: %d\n", byKeyIdx);
-
-    if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
-        (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
-        if (((*pbyRsr & (RSR_ADDRBROAD | RSR_ADDRMULTI)) == 0) &&
-            (pMgmt->byCSSPK != KEY_CTL_NONE)) {
-            // unicast pkt use pairwise key
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt\n");
-            if (KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, 0xFFFFFFFF, &pKey) == true) {
-                if (pMgmt->byCSSPK == KEY_CTL_TKIP)
-                    byDecMode = KEY_CTL_TKIP;
-                else if (pMgmt->byCSSPK == KEY_CTL_CCMP)
-                    byDecMode = KEY_CTL_CCMP;
-            }
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"unicast pkt: %d, %p\n", byDecMode, pKey);
-        } else {
-            // use group key
-            KeybGetKey(&(pDevice->sKey), pDevice->abyBSSID, byKeyIdx, &pKey);
-            if (pMgmt->byCSSGK == KEY_CTL_TKIP)
-                byDecMode = KEY_CTL_TKIP;
-            else if (pMgmt->byCSSGK == KEY_CTL_CCMP)
-                byDecMode = KEY_CTL_CCMP;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"group pkt: %d, %d, %p\n", byKeyIdx, byDecMode, pKey);
-        }
-    }
-    // our WEP only support Default Key
-    if (pKey == NULL) {
-        // use default group key
-        KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, byKeyIdx, &pKey);
-        if (pMgmt->byCSSGK == KEY_CTL_TKIP)
-            byDecMode = KEY_CTL_TKIP;
-        else if (pMgmt->byCSSGK == KEY_CTL_CCMP)
-            byDecMode = KEY_CTL_CCMP;
-    }
-    *pKeyOut = pKey;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"AES:%d %d %d\n", pMgmt->byCSSPK, pMgmt->byCSSGK, byDecMode);
-
-    if (pKey == NULL) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey == NULL\n");
-        return false;
-    }
-    if (byDecMode != pKey->byCipherSuite) {
-        *pKeyOut = NULL;
-        return false;
-    }
-    if (byDecMode == KEY_CTL_WEP) {
-        // handle WEP
-        if ((pDevice->byLocalID <= REV_ID_VT3253_A1) ||
-               (((PSKeyTable)(pKey->pvKeyTable))->bSoftWEP == true)) {
-            // Software WEP
-            // 1. 3253A
-            // 2. WEP 256
-
-            PayloadLen -= (WLAN_HDR_ADDR3_LEN + 4 + 4); // 24 is 802.11 header,4 is IV, 4 is crc
-            memcpy(pDevice->abyPRNG, pbyIV, 3);
-            memcpy(pDevice->abyPRNG + 3, pKey->abyKey, pKey->uKeyLength);
-            rc4_init(&pDevice->SBox, pDevice->abyPRNG, pKey->uKeyLength + 3);
-            rc4_encrypt(&pDevice->SBox, pbyIV+4, pbyIV+4, PayloadLen);
-
-            if (ETHbIsBufferCrc32Ok(pbyIV+4, PayloadLen)) {
-                *pbyNewRsr |= NEWRSR_DECRYPTOK;
-            }
-        }
-    } else if ((byDecMode == KEY_CTL_TKIP) ||
-               (byDecMode == KEY_CTL_CCMP)) {
-        // TKIP/AES
-
-        PayloadLen -= (WLAN_HDR_ADDR3_LEN + 8 + 4); // 24 is 802.11 header, 8 is IV&ExtIV, 4 is crc
-        *pdwRxTSC47_16 = cpu_to_le32(*(u32 *)(pbyIV + 4));
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ExtIV: %x\n", *pdwRxTSC47_16);
-        if (byDecMode == KEY_CTL_TKIP) {
-            *pwRxTSC15_0 = cpu_to_le16(MAKEWORD(*(pbyIV+2), *pbyIV));
-        } else {
-            *pwRxTSC15_0 = cpu_to_le16(*(u16 *)pbyIV);
-        }
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"TSC0_15: %x\n", *pwRxTSC15_0);
-
-        if ((byDecMode == KEY_CTL_TKIP) &&
-            (pDevice->byLocalID <= REV_ID_VT3253_A1)) {
-            // Software TKIP
-            // 1. 3253 A
-            struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *) (pbyFrame);
-            TKIPvMixKey(pKey->abyKey, pMACHeader->addr2, *pwRxTSC15_0, *pdwRxTSC47_16, pDevice->abyPRNG);
-            rc4_init(&pDevice->SBox, pDevice->abyPRNG, TKIP_KEY_LEN);
-            rc4_encrypt(&pDevice->SBox, pbyIV+8, pbyIV+8, PayloadLen);
-            if (ETHbIsBufferCrc32Ok(pbyIV+8, PayloadLen)) {
-                *pbyNewRsr |= NEWRSR_DECRYPTOK;
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV OK!\n");
-            } else {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ICV FAIL!!!\n");
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PayloadLen = %d\n", PayloadLen);
-            }
-        }
-    }// end of TKIP/AES
-
-    if ((*(pbyIV+3) & 0x20) != 0)
-        *pbExtIV = true;
-    return true;
-}
-
-void RXvWorkItem(struct work_struct *work)
-{
-       struct vnt_private *priv =
-               container_of(work, struct vnt_private, read_work_item);
-       int status;
-       struct vnt_rcb *rcb = NULL;
-       unsigned long flags;
-
-       if (priv->Flags & fMP_DISCONNECTED)
-               return;
+       }
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
+       skb_data = (u8 *)skb->data;
 
-       spin_lock_irqsave(&priv->lock, flags);
+       rx_sts = skb_data+4;
+       rx_rate = skb_data+5;
 
-       while ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) &&
-                       (priv->NumRecvFreeList != 0)) {
-               rcb = priv->FirstRecvFreeList;
+       /* real Frame Size = USBframe_size -4WbkStatus - 4RxStatus */
+       /* -8TSF - 4RSR - 4SQ3 - ?Padding */
 
-               priv->NumRecvFreeList--;
+       /* if SQ3 the range is 24~27, if no SQ3 the range is 20~23 */
 
-               DequeueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList);
+       pay_load_len = (u16 *) (skb_data + 6);
 
-               status = PIPEnsBulkInUsbRead(priv, rcb);
+       /*Fix hardware bug => PLCP_Length error */
+       if (((bytes_received - (*pay_load_len)) > 27) ||
+               ((bytes_received - (*pay_load_len)) < 24) ||
+                       (bytes_received < (*pay_load_len))) {
+               dev_dbg(&priv->usb->dev, "Wrong PLCP Length %x\n",
+                                                       *pay_load_len);
+               return false;
        }
 
-       priv->bIsRxWorkItemQueued = false;
-
-       spin_unlock_irqrestore(&priv->lock, flags);
-}
+       sband = hw->wiphy->bands[hw->conf.chandef.chan->band];
 
-void RXvFreeRCB(struct vnt_rcb *rcb, int re_alloc_skb)
-{
-       struct vnt_private *priv = rcb->pDevice;
+       for (r = RATE_1M; r < MAX_RATE; r++) {
+               if (*rx_rate == rate[r])
+                       break;
+       }
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->RXvFreeRCB\n");
+       priv->rx_rate = r;
 
-       if (re_alloc_skb == false) {
-               kfree_skb(rcb->skb);
-               re_alloc_skb = true;
+       for (ii = 0; ii < sband->n_bitrates; ii++) {
+               if (sband->bitrates[ii].hw_value == r) {
+                       rate_idx = ii;
+                               break;
+               }
        }
 
-       if (re_alloc_skb == true) {
-               rcb->skb = netdev_alloc_skb(priv->dev, priv->rx_buf_sz);
-               /* TODO error handling */
-               if (!rcb->skb) {
-                       DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
-                               " Failed to re-alloc rx skb\n");
-               }
+       if (ii == sband->n_bitrates) {
+               dev_dbg(&priv->usb->dev, "Wrong RxRate %x\n", *rx_rate);
+               return false;
        }
 
-       /* Insert the RCB back in the Recv free list */
-       EnqueueRCB(priv->FirstRecvFreeList, priv->LastRecvFreeList, rcb);
-       priv->NumRecvFreeList++;
+       pay_load_with_padding = ((*pay_load_len / 4) +
+               ((*pay_load_len % 4) ? 1 : 0)) * 4;
 
-       if ((priv->Flags & fMP_POST_READS) && MP_IS_READY(priv) &&
-                       (priv->bIsRxWorkItemQueued == false)) {
-               priv->bIsRxWorkItemQueued = true;
-               schedule_work(&priv->read_work_item);
+       tsf_time = (__le64 *)(skb_data + 8 + pay_load_with_padding);
+
+       priv->tsf_time = le64_to_cpu(*tsf_time);
+
+       if (priv->byBBType == BB_TYPE_11G) {
+               sq_3 = skb_data + 8 + pay_load_with_padding + 12;
+               sq = sq_3;
+       } else {
+               sq = skb_data + 8 + pay_load_with_padding + 8;
+               sq_3 = sq;
        }
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----RXFreeRCB %d %d\n",
-                       priv->NumRecvFreeList, priv->NumRecvMngList);
-}
+       new_rsr = skb_data + 8 + pay_load_with_padding + 9;
+       rssi = skb_data + 8 + pay_load_with_padding + 10;
+       rsr = skb_data + 8 + pay_load_with_padding + 11;
 
-void RXvMngWorkItem(struct work_struct *work)
-{
-       struct vnt_private *pDevice =
-               container_of(work, struct vnt_private, rx_mng_work_item);
-       struct vnt_rcb *pRCB = NULL;
-       struct vnt_rx_mgmt *pRxPacket;
-       int bReAllocSkb = false;
-       unsigned long flags;
+       frame_size = *pay_load_len;
+
+       vnt_rf_rssi_to_dbm(priv, *rssi, &rx_dbm);
 
-       if (pDevice->Flags & fMP_DISCONNECTED)
-               return;
+       priv->byBBPreEDRSSI = (u8)rx_dbm + 1;
+       priv->uCurrRSSI = priv->byBBPreEDRSSI;
 
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Mng Thread\n");
+       frame = skb_data + 8;
 
-    while (pDevice->NumRecvMngList!=0)
-    {
-       spin_lock_irqsave(&pDevice->lock, flags);
+       skb_pull(skb, 8);
+       skb_trim(skb, frame_size);
 
-        pRCB = pDevice->FirstRecvMngList;
-        pDevice->NumRecvMngList--;
-        DequeueRCB(pDevice->FirstRecvMngList, pDevice->LastRecvMngList);
+       rx_status.mactime = priv->tsf_time;
+       rx_status.band = hw->conf.chandef.chan->band;
+       rx_status.signal = rx_dbm;
+       rx_status.flag = 0;
+       rx_status.freq = hw->conf.chandef.chan->center_freq;
 
-       spin_unlock_irqrestore(&pDevice->lock, flags);
+       hdr = (struct ieee80211_hdr *)(skb->data);
+       fc = hdr->frame_control;
 
-        if(!pRCB){
-            break;
-        }
-        pRxPacket = &(pRCB->sMngPacket);
-       vMgrRxManagePacket(pDevice, &pDevice->vnt_mgmt, pRxPacket);
-        pRCB->Ref--;
-       if (pRCB->Ref == 0) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"RxvFreeMng %d %d\n",
-                       pDevice->NumRecvFreeList, pDevice->NumRecvMngList);
+       rx_status.rate_idx = rate_idx;
 
-               spin_lock_irqsave(&pDevice->lock, flags);
+       if (ieee80211_has_protected(fc)) {
+               if (priv->byLocalID > REV_ID_VT3253_A1)
+                       rx_status.flag = RX_FLAG_DECRYPTED;
+       }
 
-               RXvFreeRCB(pRCB, bReAllocSkb);
+       memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
 
-               spin_unlock_irqrestore(&pDevice->lock, flags);
-       } else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Rx Mng Only we have the right to free RCB\n");
-        }
-    }
+       ieee80211_rx_irqsafe(priv->hw, skb);
 
-       pDevice->bIsRxMngWorkItemQueued = false;
+       return true;
 }
-
index 8d524345dfdb943a79df7e027b70f54df6ca9a30..1df2ae897988cc0c615ccd515731717a0f7def1e 100644 (file)
 
 void RXvWorkItem(struct work_struct *work);
 
-void RXvMngWorkItem(struct work_struct *work);
-
 void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb);
 
-int RXbBulkInProcessData(struct vnt_private *, struct vnt_rcb *pRCB,
-       unsigned long BytesToIndicate);
+int vnt_rx_data(struct vnt_private *, struct vnt_rcb *,
+       unsigned long bytes_recieved);
 
 #endif /* __RXTX_H__ */
index 1159f0b345783079b1c7b4a2dcff2c171a884c4e..f2250ee81ffac1a94b852a94faf0808dc5208ea7 100644 (file)
 #include "firmware.h"
 #include "usbpipe.h"
 
-static int msglevel = MSG_LEVEL_INFO;
-/* static int msglevel = MSG_LEVEL_DEBUG; */
-
 #define FIRMWARE_VERSION       0x133           /* version 1.51 */
 #define FIRMWARE_NAME          "vntwusb.fw"
 
 #define FIRMWARE_CHUNK_SIZE    0x400
 
-int FIRMWAREbDownload(struct vnt_private *pDevice)
+int vnt_download_firmware(struct vnt_private *priv)
 {
-       struct device *dev = &pDevice->usb->dev;
+       struct device *dev = &priv->usb->dev;
        const struct firmware *fw;
-       int NdisStatus;
-       void *pBuffer = NULL;
+       int status;
+       void *buffer = NULL;
        bool result = false;
-       u16 wLength;
+       u16 length;
        int ii, rc;
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Download firmware\n");
+       dev_dbg(dev, "---->Download firmware\n");
 
        rc = request_firmware(&fw, FIRMWARE_NAME, dev);
        if (rc) {
@@ -62,24 +59,24 @@ int FIRMWAREbDownload(struct vnt_private *pDevice)
                        goto out;
        }
 
-       pBuffer = kmalloc(FIRMWARE_CHUNK_SIZE, GFP_KERNEL);
-       if (!pBuffer)
+       buffer = kmalloc(FIRMWARE_CHUNK_SIZE, GFP_KERNEL);
+       if (!buffer)
                goto out;
 
        for (ii = 0; ii < fw->size; ii += FIRMWARE_CHUNK_SIZE) {
-               wLength = min_t(int, fw->size - ii, FIRMWARE_CHUNK_SIZE);
-               memcpy(pBuffer, fw->data + ii, wLength);
+               length = min_t(int, fw->size - ii, FIRMWARE_CHUNK_SIZE);
+               memcpy(buffer, fw->data + ii, length);
 
-               NdisStatus = vnt_control_out(pDevice,
+               status = vnt_control_out(priv,
                                                0,
                                                0x1200+ii,
                                                0x0000,
-                                               wLength,
-                                               pBuffer);
+                                               length,
+                                               buffer);
+
+               dev_dbg(dev, "Download firmware...%d %zu\n", ii, fw->size);
 
-               DBG_PRT(MSG_LEVEL_DEBUG,
-                       KERN_INFO"Download firmware...%d %zu\n", ii, fw->size);
-               if (NdisStatus != STATUS_SUCCESS)
+               if (status != STATUS_SUCCESS)
                        goto free_fw;
        }
 
@@ -88,56 +85,59 @@ free_fw:
        release_firmware(fw);
 
 out:
-       kfree(pBuffer);
+       kfree(buffer);
 
        return result;
 }
 MODULE_FIRMWARE(FIRMWARE_NAME);
 
-int FIRMWAREbBrach2Sram(struct vnt_private *pDevice)
+int vnt_firmware_branch_to_sram(struct vnt_private *priv)
 {
-       int NdisStatus;
+       int status;
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Branch to Sram\n");
+       dev_dbg(&priv->usb->dev, "---->Branch to Sram\n");
 
-       NdisStatus = vnt_control_out(pDevice,
+       status = vnt_control_out(priv,
                                        1,
                                        0x1200,
                                        0x0000,
                                        0,
                                        NULL);
-       if (NdisStatus != STATUS_SUCCESS)
+       if (status != STATUS_SUCCESS)
                return false;
        else
                return true;
 }
 
-int FIRMWAREbCheckVersion(struct vnt_private *pDevice)
+int vnt_check_firmware_version(struct vnt_private *priv)
 {
-       int ntStatus;
+       int status;
 
-       ntStatus = vnt_control_in(pDevice,
+       status = vnt_control_in(priv,
                                        MESSAGE_TYPE_READ,
                                        0,
                                        MESSAGE_REQUEST_VERSION,
                                        2,
-                                       (u8 *) &(pDevice->wFirmwareVersion));
+                                       (u8 *) &(priv->wFirmwareVersion));
+
+       dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
+                                               priv->wFirmwareVersion);
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
-                                               pDevice->wFirmwareVersion);
-       if (ntStatus != STATUS_SUCCESS) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Invalid.\n");
+       if (status != STATUS_SUCCESS) {
+               dev_dbg(&priv->usb->dev, "Firmware Invalid.\n");
                return false;
        }
-       if (pDevice->wFirmwareVersion == 0xFFFF) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"In Loader.\n");
+       if (priv->wFirmwareVersion == 0xFFFF) {
+               dev_dbg(&priv->usb->dev, "In Loader.\n");
                return false;
        }
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Firmware Version [%04x]\n",
-                                               pDevice->wFirmwareVersion);
-       if (pDevice->wFirmwareVersion < FIRMWARE_VERSION) {
+
+       dev_dbg(&priv->usb->dev, "Firmware Version [%04x]\n",
+                                               priv->wFirmwareVersion);
+
+       if (priv->wFirmwareVersion < FIRMWARE_VERSION) {
                /* branch to loader for download new firmware */
-               FIRMWAREbBrach2Sram(pDevice);
+               vnt_firmware_branch_to_sram(priv);
                return false;
        }
        return true;
index e3b08db6a7347a02fc9932972aa64b00beb3f6e9..d594dbe1c14745bc67fac654521e034280d91b3f 100644 (file)
@@ -32,8 +32,8 @@
 
 #include "device.h"
 
-int FIRMWAREbDownload(struct vnt_private *);
-int FIRMWAREbBrach2Sram(struct vnt_private *);
-int FIRMWAREbCheckVersion(struct vnt_private *);
+int vnt_download_firmware(struct vnt_private *);
+int vnt_firmware_branch_to_sram(struct vnt_private *);
+int vnt_check_firmware_version(struct vnt_private *);
 
 #endif /* __FIRMWARE_H__ */
index f2a5225b50f82bc6c64398e3efbd0adbf110cee7..23d045c257be7e8f86cb8c090627a96cf7aec035 100644 (file)
  */
 
 #include "int.h"
-#include "tmacro.h"
 #include "mac.h"
 #include "power.h"
-#include "bssdb.h"
 #include "usbpipe.h"
 
 static int msglevel = MSG_LEVEL_INFO; /* MSG_LEVEL_DEBUG */
@@ -80,7 +78,6 @@ void INTvWorkItem(struct vnt_private *pDevice)
 void INTnsProcessData(struct vnt_private *priv)
 {
        struct vnt_interrupt_data *int_data;
-       struct vnt_manager *mgmt = &priv->vnt_mgmt;
        struct net_device_stats *stats = &priv->stats;
 
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->s_nsInterruptProcessData\n");
@@ -92,10 +89,6 @@ void INTnsProcessData(struct vnt_private *priv)
                        priv->wstats.discard.retries++;
                else
                        stats->tx_packets++;
-
-               BSSvUpdateNodeTxCounter(priv,
-                                       int_data->tsr0,
-                                       int_data->pkt0);
        }
 
        if (int_data->tsr1 & TSR_VALID) {
@@ -103,11 +96,6 @@ void INTnsProcessData(struct vnt_private *priv)
                        priv->wstats.discard.retries++;
                else
                        stats->tx_packets++;
-
-
-               BSSvUpdateNodeTxCounter(priv,
-                                       int_data->tsr1,
-                                       int_data->pkt1);
        }
 
        if (int_data->tsr2 & TSR_VALID) {
@@ -115,10 +103,6 @@ void INTnsProcessData(struct vnt_private *priv)
                        priv->wstats.discard.retries++;
                else
                        stats->tx_packets++;
-
-               BSSvUpdateNodeTxCounter(priv,
-                                       int_data->tsr2,
-                                       int_data->pkt2);
        }
 
        if (int_data->tsr3 & TSR_VALID) {
@@ -126,43 +110,19 @@ void INTnsProcessData(struct vnt_private *priv)
                        priv->wstats.discard.retries++;
                else
                        stats->tx_packets++;
-
-               BSSvUpdateNodeTxCounter(priv,
-                                       int_data->tsr3,
-                                       int_data->pkt3);
        }
 
        if (int_data->isr0 != 0) {
-               if (int_data->isr0 & ISR_BNTX) {
-                       if (priv->op_mode == NL80211_IFTYPE_AP) {
-                               if (mgmt->byDTIMCount > 0) {
-                                       mgmt->byDTIMCount--;
-                                       mgmt->sNodeDBTable[0].bRxPSPoll =
-                                               false;
-                               } else if (mgmt->byDTIMCount == 0) {
-                                       /* check if multicast tx buffering */
-                                       mgmt->byDTIMCount =
-                                               mgmt->byDTIMPeriod-1;
-                                       mgmt->sNodeDBTable[0].bRxPSPoll = true;
-                                       if (mgmt->sNodeDBTable[0].bPSEnable)
-                                               bScheduleCommand((void *) priv,
-                                                                WLAN_CMD_RX_PSPOLL,
-                                                                NULL);
-                               }
-                               bScheduleCommand((void *) priv,
-                                               WLAN_CMD_BECON_SEND,
-                                               NULL);
-                       }
-                       priv->bBeaconSent = true;
-               } else {
-                       priv->bBeaconSent = false;
-               }
+               if (int_data->isr0 & ISR_BNTX &&
+                               priv->op_mode == NL80211_IFTYPE_AP)
+                       bScheduleCommand(priv, WLAN_CMD_BECON_SEND, NULL);
 
                if (int_data->isr0 & ISR_TBTT) {
-                       if (priv->bEnablePSMode)
+                       if (priv->hw->conf.flags & IEEE80211_CONF_PS)
                                bScheduleCommand((void *) priv,
                                                WLAN_CMD_TBTT_WAKEUP,
                                                NULL);
+#if 0 /* TODO channel switch */
                        if (priv->bChannelSwitch) {
                                priv->byChannelSwitchCount--;
                                if (priv->byChannelSwitchCount == 0)
@@ -170,6 +130,7 @@ void INTnsProcessData(struct vnt_private *priv)
                                                        WLAN_CMD_11H_CHSW,
                                                        NULL);
                        }
+#endif
                }
                priv->qwCurrTSF = le64_to_cpu(int_data->tsf);
        }
diff --git a/drivers/staging/vt6656/iocmd.h b/drivers/staging/vt6656/iocmd.h
deleted file mode 100644 (file)
index b957e6d..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: iocmd.h
- *
- * Purpose: Handles the viawget ioctl private interface functions
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- */
-
-#ifndef __IOCMD_H__
-#define __IOCMD_H__
-
-typedef enum tagWZONETYPE {
-  ZoneType_USA = 0,
-  ZoneType_Japan = 1,
-  ZoneType_Europe = 2
-} WZONETYPE;
-
-#endif /* __IOCMD_H__ */
diff --git a/drivers/staging/vt6656/iowpa.h b/drivers/staging/vt6656/iowpa.h
deleted file mode 100644 (file)
index 98f2b21..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: iowpa.h
- *
- * Purpose: Handles wpa supplicant ioctl interface
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- */
-
-#ifndef __IOWPA_H__
-#define __IOWPA_H__
-
-#define WPA_IE_LEN 64
-
-struct viawget_wpa_param {
-       u32 cmd;
-       u8 addr[6];
-       union {
-               struct {
-                       u8 len;
-                       u8 data[0];
-               } generic_elem;
-               struct {
-                       u8 bssid[6];
-                       u8 ssid[32];
-                       u8 ssid_len;
-                       u8 *wpa_ie;
-                       u16 wpa_ie_len;
-                       int pairwise_suite;
-                       int group_suite;
-                       int key_mgmt_suite;
-                       int auth_alg;
-                       int mode;
-                       u8 roam_dbm;
-               } wpa_associate;
-               struct {
-                       int alg_name;
-                       u16 key_index;
-                       u16 set_tx;
-                       u8 *seq;
-                       u16 seq_len;
-                       u8 *key;
-                       u16 key_len;
-               } wpa_key;
-               struct {
-                       u8 ssid_len;
-                       u8 ssid[32];
-               } scan_req;
-               struct {
-                       u16 scan_count;
-                       u8 *buf;
-               } scan_results;
-       } u;
-} __packed;
-
-#endif /* __IOWPA_H__ */
diff --git a/drivers/staging/vt6656/iwctl.c b/drivers/staging/vt6656/iwctl.c
deleted file mode 100644 (file)
index c43718d..0000000
+++ /dev/null
@@ -1,1802 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: iwctl.c
- *
- * Purpose:  wireless ext & ioctl functions
- *
- * Author: Lyndon Chen
- *
- * Date: July 5, 2006
- *
- * Functions:
- *
- * Revision History:
- *
- */
-
-#include "device.h"
-#include "iwctl.h"
-#include "mac.h"
-#include "card.h"
-#include "power.h"
-#include "rf.h"
-#include "iowpa.h"
-#include "wpactl.h"
-#include "usbpipe.h"
-#include "baseband.h"
-
-static const long frequency_list[] = {
-       2412, 2417, 2422, 2427, 2432, 2437, 2442, 2447, 2452, 2457, 2462, 2467, 2472, 2484,
-       4915, 4920, 4925, 4935, 4940, 4945, 4960, 4980,
-       5035, 5040, 5045, 5055, 5060, 5080, 5170, 5180, 5190, 5200, 5210, 5220, 5230, 5240,
-       5260, 5280, 5300, 5320, 5500, 5520, 5540, 5560, 5580, 5600, 5620, 5640, 5660, 5680,
-       5700, 5745, 5765, 5785, 5805, 5825
-};
-
-static int msglevel = MSG_LEVEL_INFO;
-
-struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       long ldBm;
-
-       pDevice->wstats.status = pDevice->op_mode;
-       vnt_rf_rssi_to_dbm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
-       pDevice->wstats.qual.level = ldBm;
-       pDevice->wstats.qual.noise = 0;
-       pDevice->wstats.qual.updated = 1;
-       pDevice->wstats.discard.nwid = 0;
-       pDevice->wstats.discard.code = 0;
-       pDevice->wstats.discard.fragment = 0;
-       pDevice->wstats.discard.misc = 0;
-       pDevice->wstats.miss.beacon = 0;
-       return &pDevice->wstats;
-}
-
-/*
- * Wireless Handler: get protocol name
- */
-int iwctl_giwname(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       strcpy(wrqu->name, "802.11-a/b/g");
-       return 0;
-}
-
-/*
- * Wireless Handler: set scan
- */
-int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_point *wrq = &wrqu->data;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_scan_req *req = (struct iw_scan_req *)extra;
-       u8 abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-       PWLAN_IE_SSID pItemSSID = NULL;
-       unsigned long flags;
-
-       if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
-               return -EINVAL;
-
-       PRINT_K(" SIOCSIWSCAN\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (pMgmt->eScanState ==  WMAC_IS_SCANNING) {
-               // In scanning..
-               PRINT_K("SIOCSIWSCAN(overlap??)-->In scanning...\n");
-               return -EAGAIN;
-       }
-
-       if (pDevice->byReAssocCount > 0) { // reject scan when re-associating!
-               // send scan event to wpa_Supplicant
-               union iwreq_data wrqu;
-               PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n");
-               memset(&wrqu, 0, sizeof(wrqu));
-               wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
-               return 0;
-       }
-
-       spin_lock_irqsave(&pDevice->lock, flags);
-
-       BSSvClearBSSList((void *)pDevice, pDevice->bLinkPass);
-
-       // mike add: active scan OR passive scan OR desire_ssid scan
-       if (wrq->length == sizeof(struct iw_scan_req)) {
-               if (wrq->flags & IW_SCAN_THIS_ESSID) { // desire_ssid scan
-                       memset(abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-                       pItemSSID = (PWLAN_IE_SSID)abyScanSSID;
-                       pItemSSID->byElementID = WLAN_EID_SSID;
-                       memcpy(pItemSSID->abySSID, req->essid, (int)req->essid_len);
-                       if (pItemSSID->abySSID[req->essid_len] == '\0') {
-                               if (req->essid_len > 0)
-                                       pItemSSID->len = req->essid_len;
-                       } else {
-                               pItemSSID->len = req->essid_len;
-                       }
-                       pMgmt->eScanType = WMAC_SCAN_PASSIVE;
-                       PRINT_K("SIOCSIWSCAN:[desired_ssid=%s,len=%d]\n", ((PWLAN_IE_SSID)abyScanSSID)->abySSID,
-                               ((PWLAN_IE_SSID)abyScanSSID)->len);
-                       bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, abyScanSSID);
-
-                       spin_unlock_irqrestore(&pDevice->lock, flags);
-
-                       return 0;
-               } else if (req->scan_type == IW_SCAN_TYPE_PASSIVE) { // passive scan
-                       pMgmt->eScanType = WMAC_SCAN_PASSIVE;
-               }
-       } else { // active scan
-               pMgmt->eScanType = WMAC_SCAN_ACTIVE;
-       }
-
-       pMgmt->eScanType = WMAC_SCAN_PASSIVE;
-       bScheduleCommand((void *)pDevice, WLAN_CMD_BSSID_SCAN, NULL);
-
-       spin_unlock_irqrestore(&pDevice->lock, flags);
-
-       return 0;
-}
-
-/*
- * Wireless Handler : get scan results
- */
-int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct iw_point *wrq = &wrqu->data;
-       int ii;
-       int jj;
-       int kk;
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PKnownBSS pBSS;
-       PWLAN_IE_SSID pItemSSID;
-       PWLAN_IE_SUPP_RATES pSuppRates;
-       PWLAN_IE_SUPP_RATES pExtSuppRates;
-       char *current_ev = extra;
-       char *end_buf = extra + IW_SCAN_MAX_DATA;
-       char *current_val = NULL;
-       struct iw_event iwe;
-       long ldBm;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSCAN\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (pMgmt->eScanState ==  WMAC_IS_SCANNING) {
-               // In scanning..
-               return -EAGAIN;
-       }
-       pBSS = &(pMgmt->sBSSList[0]);
-       for (ii = 0, jj = 0; jj < MAX_BSS_NUM; jj++) {
-               if (current_ev >= end_buf)
-                       break;
-               pBSS = &(pMgmt->sBSSList[jj]);
-               if (pBSS->bActive) {
-                       // ADD mac address
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = SIOCGIWAP;
-                       iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
-                       memcpy(iwe.u.ap_addr.sa_data, pBSS->abyBSSID, WLAN_BSSID_LEN);
-                       current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_ADDR_LEN);
-                       // ADD ssid
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = SIOCGIWESSID;
-                       pItemSSID = (PWLAN_IE_SSID)pBSS->abySSID;
-                       iwe.u.data.length = pItemSSID->len;
-                       iwe.u.data.flags = 1;
-                       current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, pItemSSID->abySSID);
-                       // ADD mode
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = SIOCGIWMODE;
-                       if (WLAN_GET_CAP_INFO_ESS(pBSS->wCapInfo))
-                               iwe.u.mode = IW_MODE_INFRA;
-                       else
-                               iwe.u.mode = IW_MODE_ADHOC;
-                       iwe.len = IW_EV_UINT_LEN;
-                       current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_UINT_LEN);
-                       // ADD frequency
-                       pSuppRates = (PWLAN_IE_SUPP_RATES)pBSS->abySuppRates;
-                       pExtSuppRates = (PWLAN_IE_SUPP_RATES)pBSS->abyExtSuppRates;
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = SIOCGIWFREQ;
-                       iwe.u.freq.m = pBSS->uChannel;
-                       iwe.u.freq.e = 0;
-                       iwe.u.freq.i = 0;
-                       current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
-                       {
-                               int f = (int)pBSS->uChannel - 1;
-                               if (f < 0)
-                                       f = 0;
-                               iwe.u.freq.m = frequency_list[f] * 100000;
-                               iwe.u.freq.e = 1;
-                       }
-                       current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_FREQ_LEN);
-                       // ADD quality
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = IWEVQUAL;
-                       vnt_rf_rssi_to_dbm(pDevice, (u8)(pBSS->uRSSI), &ldBm);
-                       iwe.u.qual.level = ldBm;
-                       iwe.u.qual.noise = 0;
-
-                       if (-ldBm < 50)
-                               iwe.u.qual.qual = 100;
-                       else  if (-ldBm > 90)
-                               iwe.u.qual.qual = 0;
-                       else
-                               iwe.u.qual.qual = (40 - (-ldBm - 50)) * 100 / 40;
-                       iwe.u.qual.updated = 7;
-
-                       current_ev = iwe_stream_add_event(info, current_ev, end_buf, &iwe, IW_EV_QUAL_LEN);
-                       // ADD encryption
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = SIOCGIWENCODE;
-                       iwe.u.data.length = 0;
-                       if (WLAN_GET_CAP_INFO_PRIVACY(pBSS->wCapInfo))
-                               iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
-                       else
-                               iwe.u.data.flags = IW_ENCODE_DISABLED;
-                       current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, pItemSSID->abySSID);
-
-                       memset(&iwe, 0, sizeof(iwe));
-                       iwe.cmd = SIOCGIWRATE;
-                       iwe.u.bitrate.fixed = iwe.u.bitrate.disabled = 0;
-                       current_val = current_ev + IW_EV_LCP_LEN;
-
-                       for (kk = 0; kk < 12; kk++) {
-                               if (pSuppRates->abyRates[kk] == 0)
-                                       break;
-                               // Bit rate given in 500 kb/s units (+ 0x80)
-                               iwe.u.bitrate.value = ((pSuppRates->abyRates[kk] & 0x7f) * 500000);
-                               current_val = iwe_stream_add_value(info, current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
-                       }
-                       for (kk = 0; kk < 8; kk++) {
-                               if (pExtSuppRates->abyRates[kk] == 0)
-                                       break;
-                               // Bit rate given in 500 kb/s units (+ 0x80)
-                               iwe.u.bitrate.value = ((pExtSuppRates->abyRates[kk] & 0x7f) * 500000);
-                               current_val = iwe_stream_add_value(info, current_ev, current_val, end_buf, &iwe, IW_EV_PARAM_LEN);
-                       }
-
-                       if ((current_val - current_ev) > IW_EV_LCP_LEN)
-                               current_ev = current_val;
-
-                       if ((pBSS->wWPALen > 0) && (pBSS->wWPALen <= MAX_WPA_IE_LEN)) {
-                               memset(&iwe, 0, sizeof(iwe));
-                               iwe.cmd = IWEVGENIE;
-                               iwe.u.data.length = pBSS->wWPALen;
-                               current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, pBSS->byWPAIE);
-                       }
-
-                       if ((pBSS->wRSNLen > 0) && (pBSS->wRSNLen <= MAX_WPA_IE_LEN)) {
-                               memset(&iwe, 0, sizeof(iwe));
-                               iwe.cmd = IWEVGENIE;
-                               iwe.u.data.length = pBSS->wRSNLen;
-                               current_ev = iwe_stream_add_point(info, current_ev, end_buf, &iwe, pBSS->byRSNIE);
-                       }
-               }
-       } // for
-       wrq->length = current_ev - extra;
-       return 0;
-}
-
-/*
- * Wireless Handler: set frequence or channel
- */
-int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_freq *wrq = &wrqu->freq;
-       int rc = 0;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFREQ\n");
-
-       // If setting by frequency, convert to a channel
-       if ((wrq->e == 1) && (wrq->m >= (int)2.412e8) &&
-               (wrq->m <= (int)2.487e8)) {
-               int f = wrq->m / 100000;
-               int c = 0;
-               while ((c < 14) && (f != frequency_list[c]))
-                       c++;
-               wrq->e = 0;
-               wrq->m = c + 1;
-       }
-       // Setting by channel number
-       if ((wrq->m > 14) || (wrq->e > 0)) {
-               rc = -EOPNOTSUPP;
-       } else {
-               int channel = wrq->m;
-               if ((channel < 1) || (channel > 14)) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%s: New channel value of %d is invalid!\n", dev->name, wrq->m);
-                       rc = -EINVAL;
-               } else {
-                       // Yes ! We can set it !!!
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Set to channel = %d\n", channel);
-                       pDevice->uChannel = channel;
-               }
-       }
-       return rc;
-}
-
-/*
- * Wireless Handler: get frequence or channel
- */
-int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_freq *wrq = &wrqu->freq;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFREQ\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-#ifdef WEXT_USECHANNELS
-       wrq->m = (int)pMgmt->uCurrChannel;
-       wrq->e = 0;
-#else
-       {
-               int f = (int)pMgmt->uCurrChannel - 1;
-               if (f < 0)
-                       f = 0;
-               wrq->m = frequency_list[f] * 100000;
-               wrq->e = 1;
-       }
-#endif
-       return 0;
-}
-
-/*
- * Wireless Handler: set operation mode
- */
-int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       __u32 *wmode = &wrqu->mode;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       unsigned long flags;
-       int rc = 0;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMODE\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       switch (*wmode) {
-       case IW_MODE_ADHOC:
-               if (pMgmt->eConfigMode != WMAC_CONFIG_IBSS_STA) {
-                       pMgmt->eConfigMode = WMAC_CONFIG_IBSS_STA;
-                       if (pDevice->flags & DEVICE_FLAGS_OPENED)
-                               pDevice->bCommit = true;
-               }
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to ad-hoc\n");
-               break;
-       case IW_MODE_AUTO:
-       case IW_MODE_INFRA:
-               if (pMgmt->eConfigMode != WMAC_CONFIG_ESS_STA) {
-                       pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
-                       if (pDevice->flags & DEVICE_FLAGS_OPENED)
-                               pDevice->bCommit = true;
-               }
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set mode to infrastructure\n");
-               break;
-       case IW_MODE_MASTER:
-               rc = -EOPNOTSUPP;
-               break;
-
-       case IW_MODE_REPEAT:
-               pMgmt->eConfigMode = WMAC_CONFIG_ESS_STA;
-               rc = -EOPNOTSUPP;
-               break;
-       default:
-               rc = -EINVAL;
-       }
-
-       if (pDevice->bCommit) {
-               if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
-                       netif_stop_queue(pDevice->dev);
-
-                       spin_lock_irqsave(&pDevice->lock, flags);
-
-                       bScheduleCommand((void *) pDevice,
-                               WLAN_CMD_RUN_AP, NULL);
-
-                       spin_unlock_irqrestore(&pDevice->lock, flags);
-               } else {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                               "Commit the settings\n");
-
-                       if (pDevice->bLinkPass &&
-                               memcmp(pMgmt->abyCurrSSID,
-                                       pMgmt->abyDesireSSID,
-                                       WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN)) {
-                               bScheduleCommand((void *) pDevice,
-                                       WLAN_CMD_DISASSOCIATE, NULL);
-                       } else {
-                               pDevice->bLinkPass = false;
-                               pMgmt->eCurrState = WMAC_STATE_IDLE;
-                               memset(pMgmt->abyCurrBSSID, 0, 6);
-                       }
-
-                       vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-
-                       netif_stop_queue(pDevice->dev);
-
-                       pMgmt->eScanType = WMAC_SCAN_ACTIVE;
-
-                       if (!pDevice->bWPASuppWextEnabled)
-                               bScheduleCommand((void *) pDevice,
-                                        WLAN_CMD_BSSID_SCAN,
-                                        pMgmt->abyDesireSSID);
-
-                       bScheduleCommand((void *) pDevice,
-                                WLAN_CMD_SSID,
-                                NULL);
-               }
-               pDevice->bCommit = false;
-       }
-
-       return rc;
-}
-
-/*
- * Wireless Handler: get operation mode
- */
-int iwctl_giwmode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       __u32 *wmode = &wrqu->mode;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWMODE\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       // If not managed, assume it's ad-hoc
-       switch (pMgmt->eConfigMode) {
-       case WMAC_CONFIG_ESS_STA:
-               *wmode = IW_MODE_INFRA;
-               break;
-       case WMAC_CONFIG_IBSS_STA:
-               *wmode = IW_MODE_ADHOC;
-               break;
-       case WMAC_CONFIG_AUTO:
-               *wmode = IW_MODE_INFRA;
-               break;
-       case WMAC_CONFIG_AP:
-               *wmode = IW_MODE_MASTER;
-               break;
-       default:
-               *wmode = IW_MODE_ADHOC;
-       }
-
-       return 0;
-}
-
-/*
- * Wireless Handler: get capability range
- */
-int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct iw_point *wrq = &wrqu->data;
-       struct iw_range *range = (struct iw_range *)extra;
-       int i;
-       int k;
-       u8 abySupportedRates[13] = {
-               0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48,
-               0x60, 0x6C, 0x90
-       };
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRANGE\n");
-       if (wrq->pointer) {
-               wrq->length = sizeof(struct iw_range);
-               memset(range, 0, sizeof(struct iw_range));
-               range->min_nwid = 0x0000;
-               range->max_nwid = 0x0000;
-               range->num_channels = 14;
-               // Should be based on cap_rid.country to give only
-               // what the current card support
-               k = 0;
-               for (i = 0; i < 14; i++) {
-                       range->freq[k].i = i + 1; // List index
-                       range->freq[k].m = frequency_list[i] * 100000;
-                       range->freq[k++].e = 1; // Values in table in MHz -> * 10^5 * 10
-               }
-               range->num_frequency = k;
-               // Hum... Should put the right values there
-               range->max_qual.qual = 100;
-               range->max_qual.level = 0;
-               range->max_qual.noise = 0;
-               range->sensitivity = 255;
-
-               for (i = 0; i < 13; i++) {
-                       range->bitrate[i] = abySupportedRates[i] * 500000;
-                       if (range->bitrate[i] == 0)
-                               break;
-               }
-               range->num_bitrates = i;
-
-               // Set an indication of the max TCP throughput
-               // in bit/s that we can expect using this interface.
-               //  May be use for QoS stuff... Jean II
-               if (i > 2)
-                       range->throughput = 5 * 1000 * 1000;
-               else
-                       range->throughput = 1.5 * 1000 * 1000;
-
-               range->min_rts = 0;
-               range->max_rts = 2312;
-               range->min_frag = 256;
-               range->max_frag = 2312;
-
-               // the encoding capabilities
-               range->num_encoding_sizes = 3;
-               // 64(40) bits WEP
-               range->encoding_size[0] = 5;
-               // 128(104) bits WEP
-               range->encoding_size[1] = 13;
-               // 256 bits for WPA-PSK
-               range->encoding_size[2] = 32;
-               // 4 keys are allowed
-               range->max_encoding_tokens = 4;
-
-               range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_WPA2 |
-                       IW_ENC_CAPA_CIPHER_TKIP | IW_ENC_CAPA_CIPHER_CCMP;
-
-               range->min_pmp = 0;
-               range->max_pmp = 1000000; // 1 secs
-               range->min_pmt = 0;
-               range->max_pmt = 1000000; // 1 secs
-               range->pmp_flags = IW_POWER_PERIOD;
-               range->pmt_flags = IW_POWER_TIMEOUT;
-               range->pm_capa = IW_POWER_PERIOD | IW_POWER_TIMEOUT | IW_POWER_ALL_R;
-
-               // Transmit Power - values are in mW
-               range->txpower[0] = 100;
-               range->num_txpower = 1;
-               range->txpower_capa = IW_TXPOW_MWATT;
-               range->we_version_source = WIRELESS_EXT;
-               range->we_version_compiled = WIRELESS_EXT;
-               range->retry_capa = IW_RETRY_LIMIT | IW_RETRY_LIFETIME;
-               range->retry_flags = IW_RETRY_LIMIT;
-               range->r_time_flags = IW_RETRY_LIFETIME;
-               range->min_retry = 1;
-               range->max_retry = 65535;
-               range->min_r_time = 1024;
-               range->max_r_time = 65535 * 1024;
-               // Experimental measurements - boundary 11/5.5 Mb/s
-               // Note : with or without the (local->rssi), results
-               //  are somewhat different. - Jean II
-               range->avg_qual.qual = 6;
-               range->avg_qual.level = 176; // -80 dBm
-               range->avg_qual.noise = 0;
-       }
-
-       return 0;
-}
-
-/*
- * Wireless Handler : set ap mac address
- */
-int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct sockaddr *wrq = &wrqu->ap_addr;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int rc = 0;
-       u8 ZeroBSSID[WLAN_BSSID_LEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
-
-       PRINT_K(" SIOCSIWAP\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (wrq->sa_family != ARPHRD_ETHER) {
-               rc = -EINVAL;
-       } else {
-               memcpy(pMgmt->abyDesireBSSID, wrq->sa_data, 6);
-               // mike: add
-               if ((is_broadcast_ether_addr(pMgmt->abyDesireBSSID)) ||
-                       (memcmp(pMgmt->abyDesireBSSID, ZeroBSSID, 6) == 0)) {
-                       PRINT_K("SIOCSIWAP:invalid desired BSSID return!\n");
-                       return rc;
-               }
-               // mike add: if desired AP is hidden ssid(there are
-               // two same BSSID in list), then ignore,because you
-               // don't known which one to be connect with??
-               {
-                       unsigned ii;
-                       unsigned uSameBssidNum = 0;
-                       for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-                               if (pMgmt->sBSSList[ii].bActive &&
-                                       ether_addr_equal(pMgmt->sBSSList[ii].abyBSSID,
-                                                        pMgmt->abyDesireBSSID)) {
-                                       uSameBssidNum++;
-                               }
-                       }
-                       if (uSameBssidNum >= 2) {  //hit: desired AP is in hidden ssid mode!!!
-                               PRINT_K("SIOCSIWAP:ignore for desired AP in hidden mode\n");
-                               return rc;
-                       }
-               }
-
-               if (pDevice->flags & DEVICE_FLAGS_OPENED)
-                       pDevice->bCommit = true;
-       }
-       return rc;
-}
-
-/*
- * Wireless Handler: get ap mac address
- */
-int iwctl_giwap(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct sockaddr *wrq = &wrqu->ap_addr;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAP\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6);
-
-       if ((pDevice->bLinkPass == false) && (pMgmt->eCurrMode != WMAC_MODE_ESS_AP))
-               memset(wrq->sa_data, 0, 6);
-
-       if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)
-               memcpy(wrq->sa_data, pMgmt->abyCurrBSSID, 6);
-
-       wrq->sa_family = ARPHRD_ETHER;
-       return 0;
-}
-
-/*
- * Wireless Handler: get ap list
- */
-int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct iw_point *wrq = &wrqu->data;
-       struct sockaddr *sock;
-       struct iw_quality *qual;
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PKnownBSS pBSS = &pMgmt->sBSSList[0];
-       int ii;
-       int jj;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWAPLIST\n");
-       /* Only super-user can see AP list */
-
-       if (pBSS == NULL)
-               return -ENODEV;
-
-       if (!capable(CAP_NET_ADMIN))
-               return -EPERM;
-
-       if (!wrq->pointer)
-               return -EINVAL;
-
-       sock = kcalloc(IW_MAX_AP, sizeof(struct sockaddr), GFP_KERNEL);
-       if (sock == NULL)
-               return -ENOMEM;
-       qual = kcalloc(IW_MAX_AP, sizeof(struct iw_quality), GFP_KERNEL);
-       if (qual == NULL) {
-               kfree(sock);
-               return -ENOMEM;
-       }
-
-       for (ii = 0, jj = 0; ii < MAX_BSS_NUM; ii++) {
-               if (!pBSS[ii].bActive)
-                       continue;
-               if (jj >= IW_MAX_AP)
-                       break;
-               memcpy(sock[jj].sa_data, pBSS[ii].abyBSSID, 6);
-               sock[jj].sa_family = ARPHRD_ETHER;
-               qual[jj].level = pBSS[ii].uRSSI;
-               qual[jj].qual = qual[jj].noise = 0;
-               qual[jj].updated = 2;
-               jj++;
-       }
-
-       wrq->flags = 1; /* Should be defined */
-       wrq->length = jj;
-       memcpy(extra, sock, sizeof(struct sockaddr) * jj);
-       memcpy(extra + sizeof(struct sockaddr) * jj, qual,
-               sizeof(struct iw_quality) * jj);
-
-       kfree(sock);
-       kfree(qual);
-
-       return 0;
-}
-
-/*
- * Wireless Handler: set essid
- */
-int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_point *wrq = &wrqu->essid;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PWLAN_IE_SSID pItemSSID;
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
-               return -EINVAL;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWESSID :\n");
-
-       pDevice->fWPA_Authened = false;
-       // Check if we asked for `any'
-       if (wrq->flags == 0) {
-               // Just send an empty SSID list
-               memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-               memset(pMgmt->abyDesireBSSID, 0xFF, 6);
-               PRINT_K("set essid to 'any'\n");
-               // Unknown desired AP, so here need not associate??
-               return 0;
-       } else {
-               // Set the SSID
-               memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-               pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
-               pItemSSID->byElementID = WLAN_EID_SSID;
-
-               memcpy(pItemSSID->abySSID, extra, wrq->length);
-               if (pItemSSID->abySSID[wrq->length] == '\0') {
-                       if (wrq->length > 0)
-                               pItemSSID->len = wrq->length;
-               } else {
-                       pItemSSID->len = wrq->length;
-               }
-               PRINT_K("set essid to %s\n", pItemSSID->abySSID);
-
-               // mike: need clear desiredBSSID
-               if (pItemSSID->len == 0) {
-                       memset(pMgmt->abyDesireBSSID, 0xFF, 6);
-                       return 0;
-               }
-
-               // Wext wil order another command of siwap to link
-               // with desired AP, so here need not associate??
-               if (pDevice->bWPASuppWextEnabled == true)  {
-                       /*******search if  in hidden ssid mode ****/
-                       PKnownBSS pCurr = NULL;
-                       u8 abyTmpDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-                       unsigned ii;
-                       unsigned uSameBssidNum = 0;
-
-                       memcpy(abyTmpDesireSSID, pMgmt->abyDesireSSID, sizeof(abyTmpDesireSSID));
-                       pCurr = BSSpSearchBSSList(pDevice, NULL,
-                                               abyTmpDesireSSID,
-                                               pDevice->eConfigPHYMode);
-
-                       if (pCurr == NULL) {
-                               PRINT_K("SIOCSIWESSID:hidden ssid site survey before associate.......\n");
-                               vResetCommandTimer((void *)pDevice);
-                               pMgmt->eScanType = WMAC_SCAN_ACTIVE;
-                               bScheduleCommand((void *)pDevice,
-                                               WLAN_CMD_BSSID_SCAN,
-                                               pMgmt->abyDesireSSID);
-                               bScheduleCommand((void *)pDevice,
-                                               WLAN_CMD_SSID,
-                                               pMgmt->abyDesireSSID);
-                       } else {  // mike: to find out if that desired SSID is a
-                               // hidden-ssid AP, by means of judging if there
-                               // are two same BSSID exist in list ?
-                               for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-                                       if (pMgmt->sBSSList[ii].bActive &&
-                                               ether_addr_equal(pMgmt->sBSSList[ii].abyBSSID,
-                                                                pCurr->abyBSSID)) {
-                                               uSameBssidNum++;
-                                       }
-                               }
-                               if (uSameBssidNum >= 2) { // hit: desired AP is in hidden ssid mode!!!
-                                       PRINT_K("SIOCSIWESSID:hidden ssid directly associate.......\n");
-                                       vResetCommandTimer((void *)pDevice);
-                                       pMgmt->eScanType = WMAC_SCAN_PASSIVE; // this scan type, you'll submit scan result!
-                                       bScheduleCommand((void *)pDevice,
-                                                       WLAN_CMD_BSSID_SCAN,
-                                                       pMgmt->abyDesireSSID);
-                                       bScheduleCommand((void *)pDevice,
-                                                       WLAN_CMD_SSID,
-                                                       pMgmt->abyDesireSSID);
-                               }
-                       }
-                       return 0;
-               }
-
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "set essid = %s\n", pItemSSID->abySSID);
-       }
-
-       if (pDevice->flags & DEVICE_FLAGS_OPENED)
-               pDevice->bCommit = true;
-
-       return 0;
-}
-
-/*
- * Wireless Handler: get essid
- */
-int iwctl_giwessid(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_point *wrq = &wrqu->essid;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PWLAN_IE_SSID pItemSSID;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWESSID\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       // Note: if wrq->u.data.flags != 0, we should get the relevant
-       // SSID from the SSID list...
-
-       // Get the current SSID
-       pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-       memcpy(extra, pItemSSID->abySSID, pItemSSID->len);
-       extra[pItemSSID->len] = '\0';
-
-       wrq->length = pItemSSID->len;
-       wrq->flags = 1; // active
-
-       return 0;
-}
-
-/*
- * Wireless Handler: set data rate
- */
-int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->bitrate;
-       int rc = 0;
-       u8 brate = 0;
-       int i;
-       u8 abySupportedRates[13] = {
-               0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30, 0x48,
-               0x60, 0x6C, 0x90
-       };
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRATE\n");
-       if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
-               rc = -EINVAL;
-               return rc;
-       }
-
-       // First: get a valid bit rate value
-
-       // Which type of value
-       if ((wrq->value < 13) && (wrq->value >= 0)) {
-               // Setting by rate index
-               // Find value in the magic rate table
-               brate = wrq->value;
-       } else {
-               // Setting by frequency value
-               u8 normvalue = (u8)(wrq->value/500000);
-
-               // Check if rate is valid
-               for (i = 0; i < 13; i++) {
-                       if (normvalue == abySupportedRates[i]) {
-                               brate = i;
-                               break;
-                       }
-               }
-       }
-       // -1 designed the max rate (mostly auto mode)
-       if (wrq->value == -1) {
-               // Get the highest available rate
-               for (i = 0; i < 13; i++) {
-                       if (abySupportedRates[i] == 0)
-                               break;
-               }
-               if (i != 0)
-                       brate = i - 1;
-
-       }
-       // Check that it is valid
-       // brate is index of abySupportedRates[]
-       if (brate > 13) {
-               rc = -EINVAL;
-               return rc;
-       }
-
-       // Now, check if we want a fixed or auto value
-       if (wrq->fixed != 0) {
-               // Fixed mode
-               // One rate, fixed
-               pDevice->bFixRate = true;
-               if ((pDevice->byBBType == BB_TYPE_11B) && (brate > 3)) {
-                       pDevice->uConnectionRate = 3;
-               } else {
-                       pDevice->uConnectionRate = brate;
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Fixed to Rate %d\n", pDevice->uConnectionRate);
-               }
-       } else {
-               pDevice->bFixRate = false;
-               pDevice->uConnectionRate = 13;
-       }
-
-       return rc;
-}
-
-/*
- * Wireless Handler: get data rate
- */
-int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->bitrate;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRATE\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       {
-               u8 abySupportedRates[13] = {
-                       0x02, 0x04, 0x0B, 0x16, 0x0c, 0x12, 0x18, 0x24, 0x30,
-                       0x48, 0x60, 0x6C, 0x90
-               };
-               int brate = 0;
-
-               if (pDevice->uConnectionRate < 13) {
-                       brate = abySupportedRates[pDevice->uConnectionRate];
-               } else {
-                       if (pDevice->byBBType == BB_TYPE_11B)
-                               brate = 0x16;
-                       if (pDevice->byBBType == BB_TYPE_11G)
-                               brate = 0x6C;
-                       if (pDevice->byBBType == BB_TYPE_11A)
-                               brate = 0x6C;
-               }
-               if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-                       if (pDevice->byBBType == BB_TYPE_11B)
-                               brate = 0x16;
-                       if (pDevice->byBBType == BB_TYPE_11G)
-                               brate = 0x6C;
-                       if (pDevice->byBBType == BB_TYPE_11A)
-                               brate = 0x6C;
-               }
-               if (pDevice->uConnectionRate == 13)
-                       brate = abySupportedRates[pDevice->wCurrentRate];
-               wrq->value = brate * 500000;
-               // If more than one rate, set auto
-               if (pDevice->bFixRate == true)
-                       wrq->fixed = true;
-       }
-
-       return 0;
-}
-
-/*
- * Wireless Handler: set rts threshold
- */
-int iwctl_siwrts(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->rts;
-
-       if ((wrq->value < 0 || wrq->value > 2312) && !wrq->disabled)
-               return -EINVAL;
-
-       else if (wrq->disabled)
-               pDevice->wRTSThreshold = 2312;
-       else
-               pDevice->wRTSThreshold = wrq->value;
-
-       return 0;
-}
-
-/*
- * Wireless Handler: get rts
- */
-int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->rts;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRTS\n");
-       wrq->value = pDevice->wRTSThreshold;
-       wrq->disabled = (wrq->value >= 2312);
-       wrq->fixed = 1;
-       return 0;
-}
-
-/*
- * Wireless Handler: set fragment threshold
- */
-int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->frag;
-       int rc = 0;
-       int fthr = wrq->value;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWFRAG\n");
-
-       if (wrq->disabled)
-               fthr = 2312;
-       if ((fthr < 256) || (fthr > 2312)) {
-               rc = -EINVAL;
-       } else {
-               fthr &= ~0x1; // Get an even value
-               pDevice->wFragmentationThreshold = (u16)fthr;
-       }
-       return rc;
-}
-
-/*
- * Wireless Handler: get fragment threshold
- */
-int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->frag;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWFRAG\n");
-       wrq->value = pDevice->wFragmentationThreshold;
-       wrq->disabled = (wrq->value >= 2312);
-       wrq->fixed = 1;
-       return 0;
-}
-
-/*
- * Wireless Handler: set retry threshold
- */
-int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->retry;
-       int rc = 0;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWRETRY\n");
-
-       if (wrq->disabled) {
-               rc = -EINVAL;
-               return rc;
-       }
-
-       if (wrq->flags & IW_RETRY_LIMIT) {
-               if (wrq->flags & IW_RETRY_MAX) {
-                       pDevice->byLongRetryLimit = wrq->value;
-               } else if (wrq->flags & IW_RETRY_MIN) {
-                       pDevice->byShortRetryLimit = wrq->value;
-               } else {
-                       // No modifier : set both
-                       pDevice->byShortRetryLimit = wrq->value;
-                       pDevice->byLongRetryLimit = wrq->value;
-               }
-       }
-       if (wrq->flags & IW_RETRY_LIFETIME)
-               pDevice->wMaxTransmitMSDULifetime = wrq->value;
-       return rc;
-}
-
-/*
- * Wireless Handler: get retry threshold
- */
-int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->retry;
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWRETRY\n");
-       wrq->disabled = 0; // Can't be disabled
-
-       // Note: by default, display the min retry number
-       if ((wrq->flags & IW_RETRY_TYPE) == IW_RETRY_LIFETIME) {
-               wrq->flags = IW_RETRY_LIFETIME;
-               wrq->value = (int)pDevice->wMaxTransmitMSDULifetime; // ms
-       } else if ((wrq->flags & IW_RETRY_MAX)) {
-               wrq->flags = IW_RETRY_LIMIT | IW_RETRY_MAX;
-               wrq->value = (int)pDevice->byLongRetryLimit;
-       } else {
-               wrq->flags = IW_RETRY_LIMIT;
-               wrq->value = (int)pDevice->byShortRetryLimit;
-               if ((int)pDevice->byShortRetryLimit != (int)pDevice->byLongRetryLimit)
-                       wrq->flags |= IW_RETRY_MIN;
-       }
-       return 0;
-}
-
-/*
- * Wireless Handler: set encode mode
- */
-int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_point *wrq = &wrqu->encoding;
-       u32 dwKeyIndex = (u32)(wrq->flags & IW_ENCODE_INDEX);
-       int ii;
-       u8 uu;
-       int rc = 0;
-       int index = (wrq->flags & IW_ENCODE_INDEX);
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWENCODE\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       // Check the size of the key
-       if (wrq->length > WLAN_WEP232_KEYLEN) {
-               rc = -EINVAL;
-               return rc;
-       }
-
-       if (dwKeyIndex > WLAN_WEP_NKEYS) {
-               rc = -EINVAL;
-               return rc;
-       }
-
-       if (dwKeyIndex > 0)
-               dwKeyIndex--;
-
-       // Send the key to the card
-       if (wrq->length > 0) {
-               if (wrq->length == WLAN_WEP232_KEYLEN) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 232 bit wep key\n");
-               } else if (wrq->length == WLAN_WEP104_KEYLEN) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 104 bit wep key\n");
-               } else if (wrq->length == WLAN_WEP40_KEYLEN) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set 40 bit wep key, index= %d\n", (int)dwKeyIndex);
-               }
-               memset(pDevice->abyKey, 0, WLAN_WEP232_KEYLEN);
-               memcpy(pDevice->abyKey, extra, wrq->length);
-
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyKey: ");
-               for (ii = 0; ii < wrq->length; ii++)
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pDevice->abyKey[ii]);
-
-               if (pDevice->flags & DEVICE_FLAGS_OPENED) {
-                       KeybSetDefaultKey(pDevice,
-                                       &(pDevice->sKey),
-                                       dwKeyIndex | (1 << 31),
-                                       wrq->length, NULL,
-                                       pDevice->abyKey,
-                                       KEY_CTL_WEP);
-               }
-               pDevice->byKeyIndex = (u8)dwKeyIndex;
-               pDevice->uKeyLength = wrq->length;
-               pDevice->bTransmitKey = true;
-               pDevice->bEncryptionEnable = true;
-               pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
-
-               // Do we want to just set the transmit key index?
-               if (index < 4) {
-                       pDevice->byKeyIndex = index;
-               } else if (!(wrq->flags & IW_ENCODE_MODE)) {
-                       rc = -EINVAL;
-                       return rc;
-               }
-       }
-       // Read the flags
-       if (wrq->flags & IW_ENCODE_DISABLED) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disable WEP function\n");
-               pMgmt->bShareKeyAlgorithm = false;
-               pDevice->bEncryptionEnable = false;
-               pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
-               if (pDevice->flags & DEVICE_FLAGS_OPENED) {
-                       for (uu = 0; uu < MAX_KEY_TABLE; uu++)
-                               MACvDisableKeyEntry(pDevice, uu);
-               }
-       }
-       if (wrq->flags & IW_ENCODE_RESTRICTED) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & ShareKey System\n");
-               pMgmt->bShareKeyAlgorithm = true;
-       }
-       if (wrq->flags & IW_ENCODE_OPEN) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enable WEP & Open System\n");
-               pMgmt->bShareKeyAlgorithm = false;
-       }
-
-       memset(pMgmt->abyDesireBSSID, 0xFF, 6);
-
-       return rc;
-}
-
-int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_point *wrq = &wrqu->encoding;
-       char abyKey[WLAN_WEP232_KEYLEN];
-
-       unsigned index = (unsigned)(wrq->flags & IW_ENCODE_INDEX);
-       PSKeyItem pKey = NULL;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWENCODE\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (index > WLAN_WEP_NKEYS)
-               return  -EINVAL;
-       if (index < 1) { // get default key
-               if (pDevice->byKeyIndex < WLAN_WEP_NKEYS)
-                       index = pDevice->byKeyIndex;
-               else
-                       index = 0;
-       } else {
-               index--;
-       }
-
-       memset(abyKey, 0, WLAN_WEP232_KEYLEN);
-       // Check encryption mode
-       wrq->flags = IW_ENCODE_NOKEY;
-       // Is WEP enabled ???
-       if (pDevice->bEncryptionEnable)
-               wrq->flags |= IW_ENCODE_ENABLED;
-       else
-               wrq->flags |= IW_ENCODE_DISABLED;
-
-       if (pMgmt->bShareKeyAlgorithm)
-               wrq->flags |= IW_ENCODE_RESTRICTED;
-       else
-               wrq->flags |= IW_ENCODE_OPEN;
-       wrq->length = 0;
-
-       if ((index == 0) && (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled ||
-                               pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)) { // get wpa pairwise  key
-               if (KeybGetKey(&(pDevice->sKey), pMgmt->abyCurrBSSID, 0xffffffff, &pKey)) {
-                       wrq->length = pKey->uKeyLength;
-                       memcpy(abyKey, pKey->abyKey,    pKey->uKeyLength);
-                       memcpy(extra,  abyKey, WLAN_WEP232_KEYLEN);
-               }
-       } else if (KeybGetKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, (u8)index, &pKey)) {
-               wrq->length = pKey->uKeyLength;
-               memcpy(abyKey, pKey->abyKey, pKey->uKeyLength);
-               memcpy(extra, abyKey, WLAN_WEP232_KEYLEN);
-       }
-
-       wrq->flags |= index + 1;
-       return 0;
-}
-
-/*
- * Wireless Handler: set power mode
- */
-int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_param *wrq = &wrqu->power;
-       int rc = 0;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (!(pDevice->flags & DEVICE_FLAGS_OPENED)) {
-               rc = -EINVAL;
-               return rc;
-       }
-
-       if (wrq->disabled) {
-               pDevice->ePSMode = WMAC_POWER_CAM;
-               PSvDisablePowerSaving(pDevice);
-               return rc;
-       }
-       if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
-               pDevice->ePSMode = WMAC_POWER_FAST;
-               PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
-
-       } else if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_PERIOD) {
-               pDevice->ePSMode = WMAC_POWER_FAST;
-               PSvEnablePowerSaving((void *)pDevice, pMgmt->wListenInterval);
-       }
-
-       switch (wrq->flags & IW_POWER_MODE) {
-       case IW_POWER_UNICAST_R:
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_UNICAST_R\n");
-               rc = -EINVAL;
-               break;
-       case IW_POWER_ALL_R:
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ALL_R\n");
-               rc = -EINVAL;
-       case IW_POWER_ON:
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWPOWER: IW_POWER_ON\n");
-               break;
-       default:
-               rc = -EINVAL;
-       }
-
-       return rc;
-}
-
-/*
- * Wireless Handler: get power mode
- */
-int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_param *wrq = &wrqu->power;
-       int mode = pDevice->ePSMode;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWPOWER\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       wrq->disabled = (mode == WMAC_POWER_CAM);
-       if (wrq->disabled)
-               return 0;
-
-       if ((wrq->flags & IW_POWER_TYPE) == IW_POWER_TIMEOUT) {
-               wrq->value = (int)((pMgmt->wListenInterval *
-                       pMgmt->wCurrBeaconPeriod) / 100);
-               wrq->flags = IW_POWER_TIMEOUT;
-       } else {
-               wrq->value = (int)((pMgmt->wListenInterval *
-                       pMgmt->wCurrBeaconPeriod) / 100);
-               wrq->flags = IW_POWER_PERIOD;
-       }
-
-       wrq->flags |= IW_POWER_ALL_R;
-       return 0;
-}
-
-/*
- * Wireless Handler: get Sensitivity
- */
-int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct iw_param *wrq = &wrqu->sens;
-       long ldBm;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCGIWSENS\n");
-       if (pDevice->bLinkPass == true) {
-               vnt_rf_rssi_to_dbm(pDevice, (u8)(pDevice->uCurrRSSI), &ldBm);
-               wrq->value = ldBm;
-       } else {
-               wrq->value = 0;
-       }
-       wrq->disabled = (wrq->value == 0);
-       wrq->fixed = 1;
-       return 0;
-}
-
-int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_param *wrq = &wrqu->param;
-       int ret = 0;
-       static int wpa_version = 0; // must be static to save the last value, einsn liu
-       static int pairwise = 0;
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWAUTH\n");
-       switch (wrq->flags & IW_AUTH_INDEX) {
-       case IW_AUTH_WPA_VERSION:
-               wpa_version = wrq->value;
-               if (wrq->value == IW_AUTH_WPA_VERSION_DISABLED) {
-                       PRINT_K("iwctl_siwauth:set WPADEV to disable at 1??????\n");
-               } else if (wrq->value == IW_AUTH_WPA_VERSION_WPA) {
-                       PRINT_K("iwctl_siwauth:set WPADEV to WPA1******\n");
-               } else {
-                       PRINT_K("iwctl_siwauth:set WPADEV to WPA2******\n");
-               }
-               break;
-       case IW_AUTH_CIPHER_PAIRWISE:
-               pairwise = wrq->value;
-               PRINT_K("iwctl_siwauth:set pairwise=%d\n", pairwise);
-               if (pairwise == IW_AUTH_CIPHER_CCMP) {
-                       pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;
-               } else if (pairwise == IW_AUTH_CIPHER_TKIP) {
-                       pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;
-               } else if (pairwise == IW_AUTH_CIPHER_WEP40 ||
-                       pairwise == IW_AUTH_CIPHER_WEP104) {
-                       pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
-               } else if (pairwise == IW_AUTH_CIPHER_NONE) {
-                       // do nothing, einsn liu
-               } else {
-                       pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
-               }
-               break;
-       case IW_AUTH_CIPHER_GROUP:
-               PRINT_K("iwctl_siwauth:set GROUP=%d\n", wrq->value);
-               if (wpa_version == IW_AUTH_WPA_VERSION_DISABLED)
-                       break;
-               if (pairwise == IW_AUTH_CIPHER_NONE) {
-                       if (wrq->value == IW_AUTH_CIPHER_CCMP)
-                               pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;
-                       else
-                               pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;
-               }
-               break;
-       case IW_AUTH_KEY_MGMT:
-               PRINT_K("iwctl_siwauth(wpa_version=%d):set KEY_MGMT=%d\n", wpa_version, wrq->value);
-               if (wpa_version == IW_AUTH_WPA_VERSION_WPA2) {
-                       if (wrq->value == IW_AUTH_KEY_MGMT_PSK)
-                               pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK;
-                       else pMgmt->eAuthenMode = WMAC_AUTH_WPA2;
-               } else if (wpa_version == IW_AUTH_WPA_VERSION_WPA) {
-                       if (wrq->value == 0) {
-                               pMgmt->eAuthenMode = WMAC_AUTH_WPANONE;
-                       } else if (wrq->value == IW_AUTH_KEY_MGMT_PSK)
-                               pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK;
-               } else {
-                       pMgmt->eAuthenMode = WMAC_AUTH_WPA;
-               }
-               break;
-       case IW_AUTH_TKIP_COUNTERMEASURES:
-               break; /* FIXME */
-       case IW_AUTH_DROP_UNENCRYPTED:
-               break;
-       case IW_AUTH_80211_AUTH_ALG:
-               PRINT_K("iwctl_siwauth:set AUTH_ALG=%d\n", wrq->value);
-               if (wrq->value == IW_AUTH_ALG_OPEN_SYSTEM)
-                       pMgmt->bShareKeyAlgorithm = false;
-               else if (wrq->value == IW_AUTH_ALG_SHARED_KEY)
-                       pMgmt->bShareKeyAlgorithm = true;
-               break;
-       case IW_AUTH_WPA_ENABLED:
-               break;
-       case IW_AUTH_RX_UNENCRYPTED_EAPOL:
-               break;
-       case IW_AUTH_ROAMING_CONTROL:
-               ret = -EOPNOTSUPP;
-               break;
-       case IW_AUTH_PRIVACY_INVOKED:
-               pDevice->bEncryptionEnable = !!wrq->value;
-               if (pDevice->bEncryptionEnable == false) {
-                       wpa_version = 0;
-                       pairwise = 0;
-                       pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
-                       pMgmt->bShareKeyAlgorithm = false;
-                       pMgmt->eAuthenMode = WMAC_AUTH_OPEN;
-                       PRINT_K("iwctl_siwauth:set WPADEV to disaable at 2?????\n");
-               }
-               break;
-       default:
-               PRINT_K("iwctl_siwauth: not supported %x\n", wrq->flags);
-               ret = -EOPNOTSUPP;
-               break;
-       }
-       return ret;
-}
-
-int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       return -EOPNOTSUPP;
-}
-
-int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_point *wrq = &wrqu->data;
-       int ret = 0;
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (wrq->length) {
-               if ((wrq->length < 2) || (extra[1] + 2 != wrq->length)) {
-                       ret = -EINVAL;
-                       goto out;
-               }
-               if (wrq->length > MAX_WPA_IE_LEN) {
-                       ret = -ENOMEM;
-                       goto out;
-               }
-               memset(pMgmt->abyWPAIE, 0, MAX_WPA_IE_LEN);
-
-               memcpy(pMgmt->abyWPAIE, extra, wrq->length);
-               pMgmt->wWPAIELen = wrq->length;
-       } else {
-               memset(pMgmt->abyWPAIE, 0, MAX_WPA_IE_LEN);
-               pMgmt->wWPAIELen = 0;
-       }
-
-out: // not completely ...not necessary in wpa_supplicant 0.5.8
-       return ret;
-}
-
-int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_point *wrq = &wrqu->data;
-       int ret = 0;
-       int space = wrq->length;
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       wrq->length = 0;
-       if (pMgmt->wWPAIELen > 0) {
-               wrq->length = pMgmt->wWPAIELen;
-
-               if (pMgmt->wWPAIELen <= space)
-                       memcpy(extra, pMgmt->abyWPAIE, pMgmt->wWPAIELen);
-               else
-                       ret = -E2BIG;
-       }
-       return ret;
-}
-
-int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_point *wrq = &wrqu->encoding;
-       struct iw_encode_ext *ext = (struct iw_encode_ext*)extra;
-       struct viawget_wpa_param *param = NULL;
-// original member
-       wpa_alg alg_name;
-       u8 addr[6];
-       int key_idx;
-       int set_tx = 0;
-       u8 seq[IW_ENCODE_SEQ_MAX_SIZE];
-       u8 key[64];
-       size_t seq_len = 0;
-       size_t key_len = 0;
-       u8 *buf;
-       u8 key_array[64];
-       int ret = 0;
-
-       PRINT_K("SIOCSIWENCODEEXT......\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (!(pDevice->flags & DEVICE_FLAGS_OPENED))
-               return -ENODEV;
-
-       buf = kzalloc(sizeof(struct viawget_wpa_param), GFP_KERNEL);
-       if (buf == NULL)
-               return -ENOMEM;
-
-       param = (struct viawget_wpa_param *)buf;
-
-// recover alg_name
-       switch (ext->alg) {
-       case IW_ENCODE_ALG_NONE:
-               alg_name = WPA_ALG_NONE;
-               break;
-       case IW_ENCODE_ALG_WEP:
-               alg_name = WPA_ALG_WEP;
-               break;
-       case IW_ENCODE_ALG_TKIP:
-               alg_name = WPA_ALG_TKIP;
-               break;
-       case IW_ENCODE_ALG_CCMP:
-               alg_name = WPA_ALG_CCMP;
-               break;
-       default:
-               PRINT_K("Unknown alg = %d\n", ext->alg);
-               ret = -ENOMEM;
-               goto error;
-       }
-// recover addr
-       memcpy(addr, ext->addr.sa_data, ETH_ALEN);
-// recover key_idx
-       key_idx = (wrq->flags&IW_ENCODE_INDEX) - 1;
-// recover set_tx
-       if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
-               set_tx = 1;
-// recover seq,seq_len
-       if (ext->ext_flags & IW_ENCODE_EXT_RX_SEQ_VALID) {
-               seq_len = IW_ENCODE_SEQ_MAX_SIZE;
-               memcpy(seq, ext->rx_seq, seq_len);
-       }
-// recover key,key_len
-       if (ext->key_len) {
-               key_len = ext->key_len;
-               memcpy(key, &ext->key[0], key_len);
-       }
-       memset(key_array, 0, 64);
-       if (key_len > 0) {
-               memcpy(key_array, key, key_len);
-               if (key_len == 32) {
-                       // notice ! the oder
-                       memcpy(&key_array[16], &key[24], 8);
-                       memcpy(&key_array[24], &key[16], 8);
-               }
-       }
-
-/**************Translate iw_encode_ext to viawget_wpa_param****************/
-       memcpy(param->addr, addr, ETH_ALEN);
-       param->u.wpa_key.alg_name = (int)alg_name;
-       param->u.wpa_key.set_tx = set_tx;
-       param->u.wpa_key.key_index = key_idx;
-       param->u.wpa_key.key_len = key_len;
-       param->u.wpa_key.key = (u8 *)key_array;
-       param->u.wpa_key.seq = (u8 *)seq;
-       param->u.wpa_key.seq_len = seq_len;
-
-/****set if current action is Network Manager count?? */
-/****this method is so foolish,but there is no other way??? */
-       if (param->u.wpa_key.alg_name == WPA_ALG_NONE) {
-               if (param->u.wpa_key.key_index == 0) {
-                       pDevice->bwextstep0 = true;
-               }
-               if ((pDevice->bwextstep0 == true) && (param->u.wpa_key.key_index == 1)) {
-                       pDevice->bwextstep0 = false;
-                       pDevice->bwextstep1 = true;
-               }
-               if ((pDevice->bwextstep1 == true) && (param->u.wpa_key.key_index == 2)) {
-                       pDevice->bwextstep1 = false;
-                       pDevice->bwextstep2 = true;
-               }
-               if ((pDevice->bwextstep2 == true) && (param->u.wpa_key.key_index == 3)) {
-                       pDevice->bwextstep2 = false;
-                       pDevice->bwextstep3 = true;
-               }
-       }
-       if (pDevice->bwextstep3 == true) {
-               PRINT_K("SIOCSIWENCODEEXT:Enable WPA WEXT SUPPORT!!!!!\n");
-               pDevice->bwextstep0 = false;
-               pDevice->bwextstep1 = false;
-               pDevice->bwextstep2 = false;
-               pDevice->bwextstep3 = false;
-               pDevice->bWPASuppWextEnabled = true;
-               memset(pMgmt->abyDesireBSSID, 0xFF, 6);
-               KeyvInitTable(pDevice, &pDevice->sKey);
-       }
-/*******/
-       ret = wpa_set_keys(pDevice, param);
-
-error:
-       kfree(buf);
-       return ret;
-}
-
-int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       return -EOPNOTSUPP;
-}
-
-int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct iw_mlme *mlme = (struct iw_mlme *)extra;
-       int ret = 0;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " SIOCSIWMLME\n");
-
-       if (pMgmt == NULL)
-               return -EFAULT;
-
-       if (memcmp(pMgmt->abyCurrBSSID, mlme->addr.sa_data, ETH_ALEN)) {
-               ret = -EINVAL;
-               return ret;
-       }
-       switch (mlme->cmd) {
-       case IW_MLME_DEAUTH:
-       case IW_MLME_DISASSOC:
-               if (pDevice->bLinkPass == true) {
-                       PRINT_K("iwctl_siwmlme--->send DISASSOCIATE\n");
-                       bScheduleCommand((void *)pDevice, WLAN_CMD_DISASSOCIATE,
-                                       NULL);
-               }
-               break;
-       default:
-               ret = -EOPNOTSUPP;
-       }
-       return ret;
-}
-
-static int iwctl_config_commit(struct net_device *dev,
-       struct iw_request_info *info, union iwreq_data *wrqu, char *extra)
-{
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "SIOCSIWCOMMIT\n");
-
-       return 0;
-}
-
-static const iw_handler iwctl_handler[] = {
-       IW_HANDLER(SIOCSIWCOMMIT, iwctl_config_commit),
-       IW_HANDLER(SIOCGIWNAME, iwctl_giwname),
-       IW_HANDLER(SIOCSIWFREQ, iwctl_siwfreq),
-       IW_HANDLER(SIOCGIWFREQ, iwctl_giwfreq),
-       IW_HANDLER(SIOCSIWMODE, iwctl_siwmode),
-       IW_HANDLER(SIOCGIWMODE, iwctl_giwmode),
-       IW_HANDLER(SIOCGIWSENS, iwctl_giwsens),
-       IW_HANDLER(SIOCGIWRANGE, iwctl_giwrange),
-       IW_HANDLER(SIOCSIWAP, iwctl_siwap),
-       IW_HANDLER(SIOCGIWAP, iwctl_giwap),
-       IW_HANDLER(SIOCSIWMLME, iwctl_siwmlme),
-       IW_HANDLER(SIOCGIWAPLIST, iwctl_giwaplist),
-       IW_HANDLER(SIOCSIWSCAN, iwctl_siwscan),
-       IW_HANDLER(SIOCGIWSCAN, iwctl_giwscan),
-       IW_HANDLER(SIOCSIWESSID, iwctl_siwessid),
-       IW_HANDLER(SIOCGIWESSID, iwctl_giwessid),
-       IW_HANDLER(SIOCSIWRATE, iwctl_siwrate),
-       IW_HANDLER(SIOCGIWRATE, iwctl_giwrate),
-       IW_HANDLER(SIOCSIWRTS, iwctl_siwrts),
-       IW_HANDLER(SIOCGIWRTS, iwctl_giwrts),
-       IW_HANDLER(SIOCSIWFRAG, iwctl_siwfrag),
-       IW_HANDLER(SIOCGIWFRAG, iwctl_giwfrag),
-       IW_HANDLER(SIOCSIWRETRY, iwctl_siwretry),
-       IW_HANDLER(SIOCGIWRETRY, iwctl_giwretry),
-       IW_HANDLER(SIOCSIWENCODE, iwctl_siwencode),
-       IW_HANDLER(SIOCGIWENCODE, iwctl_giwencode),
-       IW_HANDLER(SIOCSIWPOWER, iwctl_siwpower),
-       IW_HANDLER(SIOCGIWPOWER, iwctl_giwpower),
-       IW_HANDLER(SIOCSIWGENIE, iwctl_siwgenie),
-       IW_HANDLER(SIOCGIWGENIE, iwctl_giwgenie),
-       IW_HANDLER(SIOCSIWAUTH, iwctl_siwauth),
-       IW_HANDLER(SIOCGIWAUTH, iwctl_giwauth),
-       IW_HANDLER(SIOCSIWENCODEEXT, iwctl_siwencodeext),
-       IW_HANDLER(SIOCGIWENCODEEXT, iwctl_giwencodeext)
-};
-
-static const iw_handler iwctl_private_handler[] = {
-       NULL, // SIOCIWFIRSTPRIV
-};
-
-const struct iw_handler_def iwctl_handler_def = {
-       .get_wireless_stats     = &iwctl_get_wireless_stats,
-       .num_standard           = ARRAY_SIZE(iwctl_handler),
-       .num_private            = 0,
-       .num_private_args       = 0,
-       .standard               = iwctl_handler,
-       .private                = NULL,
-       .private_args           = NULL,
-};
diff --git a/drivers/staging/vt6656/iwctl.h b/drivers/staging/vt6656/iwctl.h
deleted file mode 100644 (file)
index dceda0d..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: iwctl.h
- *
- * Purpose:
- *
- * Author: Lyndon Chen
- *
- * Date: May 21, 2004
- *
- */
-
-#ifndef __IWCTL_H__
-#define __IWCTL_H__
-
-#include "device.h"
-
-struct iw_statistics *iwctl_get_wireless_stats(struct net_device *dev);
-
-int iwctl_siwap(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwrange(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwmode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwmode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwfreq(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwfreq(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwname(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwsens(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwap(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwaplist(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwessid(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwessid(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwrate(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwrate(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwrts(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwrts(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwfrag(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwfrag(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwretry(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwretry(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwencode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwencode(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwpower(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwpower(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwscan(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwscan(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwauth(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwauth(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwgenie(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwgenie(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwencodeext(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_giwencodeext(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-int iwctl_siwmlme(struct net_device *dev, struct iw_request_info *info,
-               union iwreq_data *wrqu, char *extra);
-
-extern const struct iw_handler_def iwctl_handler_def;
-extern const struct iw_priv_args iwctl_priv_args;
-
-#endif /* __IWCTL_H__ */
index 38ea67531d977aee080ec040272f94ec4ff04913..a7c7a2d3ba4c58ea4ecc328b21231f35eecf7f1f 100644 (file)
  * Date: May 29, 2003
  *
  * Functions:
- *      KeyvInitTable - Init Key management table
- *      KeybGetKey - Get Key from table
- *      KeybSetKey - Set Key to table
- *      KeybRemoveKey - Remove Key from table
- *      KeybGetTransmitKey - Get Transmit Key from table
  *
  * Revision History:
  *
  */
 
 #include "mac.h"
-#include "tmacro.h"
 #include "key.h"
 #include "usbpipe.h"
 
-static int          msglevel                =MSG_LEVEL_INFO;
-//static int          msglevel                =MSG_LEVEL_DEBUG;
-
-static void s_vCheckKeyTableValid(struct vnt_private *pDevice,
-       PSKeyManagement pTable)
-{
-       int i;
-       u16 wLength = 0;
-       u8 pbyData[MAX_KEY_TABLE];
-
-    for (i=0;i<MAX_KEY_TABLE;i++) {
-        if ((pTable->KeyTable[i].bInUse == true) &&
-            (pTable->KeyTable[i].PairwiseKey.bKeyValid == false) &&
-            (pTable->KeyTable[i].GroupKey[0].bKeyValid == false) &&
-            (pTable->KeyTable[i].GroupKey[1].bKeyValid == false) &&
-            (pTable->KeyTable[i].GroupKey[2].bKeyValid == false) &&
-            (pTable->KeyTable[i].GroupKey[3].bKeyValid == false)
-            ) {
-
-            pTable->KeyTable[i].bInUse = false;
-            pTable->KeyTable[i].wKeyCtl = 0;
-            pTable->KeyTable[i].bSoftWEP = false;
-            pbyData[wLength++] = (u8) i;
-            //MACvDisableKeyEntry(pDevice, i);
-        }
-    }
-
-       if (wLength != 0)
-               vnt_control_out(pDevice, MESSAGE_TYPE_CLRKEYENTRY,
-                       0, 0, wLength, pbyData);
-
-}
-
-/*
- * Description: Init Key management table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *  Out:
- *      none
- *
- * Return Value: none
- *
- */
-void KeyvInitTable(struct vnt_private *pDevice, PSKeyManagement pTable)
+int vnt_key_init_table(struct vnt_private *priv)
 {
-       int i, jj;
-       u8 pbyData[MAX_KEY_TABLE+1];
-
-    for (i=0;i<MAX_KEY_TABLE;i++) {
-        pTable->KeyTable[i].bInUse = false;
-        pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
-       pTable->KeyTable[i].PairwiseKey.pvKeyTable =
-         (void *)&pTable->KeyTable[i];
-        for (jj=0; jj < MAX_GROUP_KEY; jj++) {
-            pTable->KeyTable[i].GroupKey[jj].bKeyValid = false;
-           pTable->KeyTable[i].GroupKey[jj].pvKeyTable =
-             (void *) &(pTable->KeyTable[i]);
-        }
-        pTable->KeyTable[i].wKeyCtl = 0;
-        pTable->KeyTable[i].dwGTKeyIndex = 0;
-        pTable->KeyTable[i].bSoftWEP = false;
-        pbyData[i] = (u8) i;
-    }
-    pbyData[i] = (u8) i;
+       int ret;
+       u8 i;
+       u8 data[MAX_KEY_TABLE];
 
-       vnt_control_out(pDevice, MESSAGE_TYPE_CLRKEYENTRY,
-                       0, 0, 11, pbyData);
+       for (i = 0; i < MAX_KEY_TABLE; i++)
+               data[i] = i;
 
-    return;
-}
-
-/*
- * Description: Get Key from table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      pbyBSSID        - BSSID of Key
- *      dwKeyIndex      - Key Index (0xFFFFFFFF means pairwise key)
- *  Out:
- *      pKey            - Key return
- *
- * Return Value: true if found otherwise false
- *
- */
-int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex,
-       PSKeyItem *pKey)
-{
-       int i;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetKey()\n");
+       ret = vnt_control_out(priv, MESSAGE_TYPE_CLRKEYENTRY,
+                       0, 0, ARRAY_SIZE(data), data);
 
-    *pKey = NULL;
-    for (i=0;i<MAX_KEY_TABLE;i++) {
-        if ((pTable->KeyTable[i].bInUse == true) &&
-           ether_addr_equal(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
-            if (dwKeyIndex == 0xFFFFFFFF) {
-                if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
-                    *pKey = &(pTable->KeyTable[i].PairwiseKey);
-                    return (true);
-                }
-                else {
-                    return (false);
-                }
-            } else if (dwKeyIndex < MAX_GROUP_KEY) {
-                if (pTable->KeyTable[i].GroupKey[dwKeyIndex].bKeyValid == true) {
-                    *pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex]);
-                    return (true);
-                }
-                else {
-                    return (false);
-                }
-            }
-            else {
-                return (false);
-            }
-        }
-    }
-    return (false);
+       return ret;
 }
 
-/*
- * Description: Set Key to table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      pbyBSSID        - BSSID of Key
- *      dwKeyIndex      - Key index (reference to NDIS DDK)
- *      uKeyLength      - Key length
- *      KeyRSC          - Key RSC
- *      pbyKey          - Pointer to key
- *  Out:
- *      none
- *
- * Return Value: true if success otherwise false
- *
- */
-int KeybSetKey(struct vnt_private *pDevice, PSKeyManagement pTable,
-       u8 *pbyBSSID, u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey,
-       u8 byKeyDecMode)
+static int vnt_set_keymode(struct ieee80211_hw *hw, u8 *mac_addr,
+       struct ieee80211_key_conf *key, u32 key_type, u32 mode,
+       bool onfly_latch)
 {
-       PSKeyItem   pKey;
-       int i, j, ii;
-       u32 uKeyIdx;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-               "Enter KeybSetKey: %X\n", dwKeyIndex);
-
-    j = (MAX_KEY_TABLE-1);
-    for (i=0;i<(MAX_KEY_TABLE-1);i++) {
-        if ((pTable->KeyTable[i].bInUse == false) &&
-            (j == (MAX_KEY_TABLE-1))) {
-            // found empty table
-            j = i;
-        }
-        if ((pTable->KeyTable[i].bInUse == true) &&
-           ether_addr_equal(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
-            // found table already exist
-            if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
-                // Pairwise key
-                pKey = &(pTable->KeyTable[i].PairwiseKey);
-                pTable->KeyTable[i].wKeyCtl &= 0xFFF0;          // clear pairwise key control filed
-                pTable->KeyTable[i].wKeyCtl |= byKeyDecMode;
-                uKeyIdx = 4;                                    // use HW key entry 4 for pairwise key
-            } else {
-                // Group key
-                if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY)
-                    return (false);
-                pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]);
-                if ((dwKeyIndex & TRANSMIT_KEY) != 0)  {
-                    // Group transmit key
-                    pTable->KeyTable[i].dwGTKeyIndex = dwKeyIndex;
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                               "Group transmit key(R)[%X]: %d\n",
-                                       pTable->KeyTable[i].dwGTKeyIndex, i);
-                }
-                pTable->KeyTable[i].wKeyCtl &= 0xFF0F;          // clear group key control filed
-                pTable->KeyTable[i].wKeyCtl |= (byKeyDecMode << 4);
-                pTable->KeyTable[i].wKeyCtl |= 0x0040;          // use group key for group address
-                uKeyIdx = (dwKeyIndex & 0x000000FF);
-            }
-            pTable->KeyTable[i].wKeyCtl |= 0x8000;              // enable on-fly
-
-            pKey->bKeyValid = true;
-            pKey->uKeyLength = uKeyLength;
-            pKey->dwKeyIndex = dwKeyIndex;
-            pKey->byCipherSuite = byKeyDecMode;
-            memcpy(pKey->abyKey, pbyKey, uKeyLength);
-            if (byKeyDecMode == KEY_CTL_WEP) {
-                if (uKeyLength == WLAN_WEP40_KEYLEN)
-                    pKey->abyKey[15] &= 0x7F;
-                if (uKeyLength == WLAN_WEP104_KEYLEN)
-                    pKey->abyKey[15] |= 0x80;
-            }
-
-           MACvSetKeyEntry(pDevice, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx,
-                       pbyBSSID, pKey->abyKey);
-
-               if ((dwKeyIndex & USE_KEYRSC) == 0)
-                       pKey->KeyRSC = 0; /* RSC set by NIC */
-               else
-                       pKey->KeyRSC = *KeyRSC;
-
-            pKey->dwTSC47_16 = 0;
-            pKey->wTSC15_0 = 0;
-
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n");
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid);
-            //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", pKey->uKeyLength);
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: ");
-            for (ii = 0; ii < pKey->uKeyLength; ii++) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]);
-            }
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
-
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %x\n ",
-                       pKey->dwTSC47_16);
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ",
-                       pKey->wTSC15_0);
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n ",
-                       pKey->dwKeyIndex);
-
-            return (true);
-        }
-    }
-    if (j < (MAX_KEY_TABLE-1)) {
-       memcpy(pTable->KeyTable[j].abyBSSID, pbyBSSID, ETH_ALEN);
-        pTable->KeyTable[j].bInUse = true;
-        if ((dwKeyIndex & PAIRWISE_KEY) != 0)  {
-            // Pairwise key
-            pKey = &(pTable->KeyTable[j].PairwiseKey);
-            pTable->KeyTable[j].wKeyCtl &= 0xFFF0;          // clear pairwise key control filed
-            pTable->KeyTable[j].wKeyCtl |= byKeyDecMode;
-            uKeyIdx = 4;                                    // use HW key entry 4 for pairwise key
-        } else {
-            // Group key
-            if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY)
-                return (false);
-            pKey = &(pTable->KeyTable[j].GroupKey[dwKeyIndex & 0x000000FF]);
-            if ((dwKeyIndex & TRANSMIT_KEY) != 0)  {
-                // Group transmit key
-                pTable->KeyTable[j].dwGTKeyIndex = dwKeyIndex;
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                       "Group transmit key(N)[%X]: %d\n",
-                               pTable->KeyTable[j].dwGTKeyIndex, j);
-            }
-            pTable->KeyTable[j].wKeyCtl &= 0xFF0F;          // clear group key control filed
-            pTable->KeyTable[j].wKeyCtl |= (byKeyDecMode << 4);
-            pTable->KeyTable[j].wKeyCtl |= 0x0040;          // use group key for group address
-            uKeyIdx = (dwKeyIndex & 0x000000FF);
-        }
-        pTable->KeyTable[j].wKeyCtl |= 0x8000;              // enable on-fly
-
-        pKey->bKeyValid = true;
-        pKey->uKeyLength = uKeyLength;
-        pKey->dwKeyIndex = dwKeyIndex;
-        pKey->byCipherSuite = byKeyDecMode;
-        memcpy(pKey->abyKey, pbyKey, uKeyLength);
-        if (byKeyDecMode == KEY_CTL_WEP) {
-            if (uKeyLength == WLAN_WEP40_KEYLEN)
-                pKey->abyKey[15] &= 0x7F;
-            if (uKeyLength == WLAN_WEP104_KEYLEN)
-                pKey->abyKey[15] |= 0x80;
-        }
-
-       MACvSetKeyEntry(pDevice, pTable->KeyTable[j].wKeyCtl, j, uKeyIdx,
-                                       pbyBSSID, pKey->abyKey);
-
-               if ((dwKeyIndex & USE_KEYRSC) == 0)
-                       pKey->KeyRSC = 0; /* RSC set by NIC */
-               else
-                       pKey->KeyRSC = *KeyRSC;
-
-        pKey->dwTSC47_16 = 0;
-        pKey->wTSC15_0 = 0;
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(N): \n");
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid);
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength);
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: ");
-        for (ii = 0; ii < pKey->uKeyLength; ii++) {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "%02x ", pKey->abyKey[ii]);
-        }
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %x\n ",
-               pKey->dwTSC47_16);
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n ", pKey->wTSC15_0);
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n ",
-               pKey->dwKeyIndex);
-
-        return (true);
-    }
-    return (false);
+       struct vnt_private *priv = hw->priv;
+       u8 broadcast[6] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
+       u16 key_mode = 0;
+       u32 entry = 0;
+       u8 *bssid;
+       u8 key_inx = key->keyidx;
+       u8 i;
+
+       if (mac_addr)
+               bssid = mac_addr;
+       else
+               bssid = &broadcast[0];
+
+       if (key_type != VNT_KEY_DEFAULTKEY) {
+               for (i = 0; i < (MAX_KEY_TABLE - 1); i++) {
+                       if (!test_bit(i, &priv->key_entry_inuse)) {
+                               set_bit(i, &priv->key_entry_inuse);
+
+                               key->hw_key_idx = i;
+                               entry = key->hw_key_idx;
+                               break;
+                       }
+               }
+       }
+
+       switch (key_type) {
+               /* fallthrough */
+       case VNT_KEY_DEFAULTKEY:
+               /* default key last entry */
+               entry = MAX_KEY_TABLE - 1;
+               key->hw_key_idx = entry;
+       case VNT_KEY_ALLGROUP:
+               key_mode |= VNT_KEY_ALLGROUP;
+               if (onfly_latch)
+                       key_mode |= VNT_KEY_ONFLY_ALL;
+       case VNT_KEY_GROUP_ADDRESS:
+               key_mode |= mode;
+       case VNT_KEY_GROUP:
+               key_mode |= (mode << 4);
+               key_mode |= VNT_KEY_GROUP;
+               break;
+       case  VNT_KEY_PAIRWISE:
+               key_mode |= mode;
+               key_inx = 4;
+               break;
+       default:
+               return -EINVAL;
+       }
+
+       if (onfly_latch)
+               key_mode |= VNT_KEY_ONFLY;
+
+       if (mode == KEY_CTL_WEP) {
+               if (key->keylen == WLAN_KEY_LEN_WEP40)
+                       key->key[15] &= 0x7f;
+               if (key->keylen == WLAN_KEY_LEN_WEP104)
+                       key->key[15] |= 0x80;
+       }
+
+       vnt_mac_set_keyentry(priv, key_mode, entry, key_inx, bssid, key->key);
+
+       return 0;
 }
 
-/*
- * Description: Remove Key from table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      pbyBSSID        - BSSID of Key
- *      dwKeyIndex      - Key Index (reference to NDIS DDK)
- *  Out:
- *      none
- *
- * Return Value: true if success otherwise false
- *
- */
-
-int KeybRemoveKey(struct vnt_private *pDevice, PSKeyManagement pTable,
-       u8 *pbyBSSID, u32 dwKeyIndex)
+int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+       struct ieee80211_vif *vif, struct ieee80211_key_conf *key)
 {
-       int i;
-       int bReturnValue = false;
-
-    if (is_broadcast_ether_addr(pbyBSSID)) {
-        // delete all keys
-        if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
-            for (i=0;i<MAX_KEY_TABLE;i++) {
-                pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
-            }
-            bReturnValue =  true;
-        }
-        else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
-            for (i=0;i<MAX_KEY_TABLE;i++) {
-                pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false;
-                if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) {
-                    // remove Group transmit key
-                    pTable->KeyTable[i].dwGTKeyIndex = 0;
-                }
-            }
-            bReturnValue = true;
-        }
-        else {
-            bReturnValue = false;
-        }
-
-    } else {
-        for (i=0;i<MAX_KEY_TABLE;i++) {
-            if ( (pTable->KeyTable[i].bInUse == true) &&
-                ether_addr_equal(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
-
-                if ((dwKeyIndex & PAIRWISE_KEY) != 0) {
-                    pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
-                    bReturnValue = true;
-                    break;
-                }
-                else if ((dwKeyIndex & 0x000000FF) < MAX_GROUP_KEY) {
-                    pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF].bKeyValid = false;
-                    if ((dwKeyIndex & 0x7FFFFFFF) == (pTable->KeyTable[i].dwGTKeyIndex & 0x7FFFFFFF)) {
-                        // remove Group transmit key
-                        pTable->KeyTable[i].dwGTKeyIndex = 0;
-                    }
-                    bReturnValue = true;
-                    break;
-                }
-                else {
-                    bReturnValue = false;
-                    break;
-                }
-            } //pTable->KeyTable[i].bInUse == true
-        }  //for
-        bReturnValue = true;
-    }
+       struct ieee80211_bss_conf *conf = &vif->bss_conf;
+       struct vnt_private *priv = hw->priv;
+       u8 *mac_addr = NULL;
+       u8 key_dec_mode = 0;
+       int ret = 0, u;
 
-    s_vCheckKeyTableValid(pDevice,pTable);
-    return bReturnValue;
+       if (sta)
+               mac_addr = &sta->addr[0];
 
-}
-
-/*
- * Description: Remove Key from table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      pbyBSSID        - BSSID of Key
- *  Out:
- *      none
- *
- * Return Value: true if success otherwise false
- *
- */
-int KeybRemoveAllKey(struct vnt_private *pDevice, PSKeyManagement pTable,
-       u8 *pbyBSSID)
-{
-       int i, u;
-
-    for (i=0;i<MAX_KEY_TABLE;i++) {
-        if ((pTable->KeyTable[i].bInUse == true) &&
-           ether_addr_equal(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
-            pTable->KeyTable[i].PairwiseKey.bKeyValid = false;
-           for (u = 0; u < MAX_GROUP_KEY; u++)
-               pTable->KeyTable[i].GroupKey[u].bKeyValid = false;
-
-            pTable->KeyTable[i].dwGTKeyIndex = 0;
-            s_vCheckKeyTableValid(pDevice, pTable);
-            return (true);
-        }
-    }
-    return (false);
-}
-
-/*
- * Description: Get Transmit Key from table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      pbyBSSID        - BSSID of Key
- *  Out:
- *      pKey            - Key return
- *
- * Return Value: true if found otherwise false
- *
- */
-int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType,
-       PSKeyItem *pKey)
-{
-       int i, ii;
-
-       *pKey = NULL;
-
-    for (i = 0; i < MAX_KEY_TABLE; i++) {
-        if ((pTable->KeyTable[i].bInUse == true) &&
-           ether_addr_equal(pTable->KeyTable[i].abyBSSID, pbyBSSID)) {
-
-            if (dwKeyType == PAIRWISE_KEY) {
-
-                if (pTable->KeyTable[i].PairwiseKey.bKeyValid == true) {
-                    *pKey = &(pTable->KeyTable[i].PairwiseKey);
-
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PAIRWISE_KEY: KeyTable.abyBSSID: ");
-                    for (ii = 0; ii < 6; ii++) {
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]);
-                    }
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
-
-                    return (true);
-                }
-                else {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"PairwiseKey.bKeyValid == false\n");
-                    return (false);
-                }
-            } // End of Type == PAIRWISE
-            else {
-                if (pTable->KeyTable[i].dwGTKeyIndex == 0) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: dwGTKeyIndex == 0 !!!\n");
-                    return false;
-                }
-                if (pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)].bKeyValid == true) {
-                    *pKey = &(pTable->KeyTable[i].GroupKey[(pTable->KeyTable[i].dwGTKeyIndex&0x000000FF)]);
-
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybGetTransmitKey:");
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GROUP_KEY: KeyTable.abyBSSID\n");
-                        for (ii = 0; ii < 6; ii++) {
-                            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x ", pTable->KeyTable[i].abyBSSID[ii]);
-                        }
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"dwGTKeyIndex: %X\n",
-                               pTable->KeyTable[i].dwGTKeyIndex);
-
-                    return (true);
-                }
-                else {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GroupKey.bKeyValid == false\n");
-                    return (false);
-                }
-            } // End of Type = GROUP
-        } // BSSID match
-    }
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ERROR: NO Match BSSID !!! ");
-    for (ii = 0; ii < 6; ii++) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", *(pbyBSSID+ii));
-    }
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
-    return (false);
-}
-
-/*
- * Description: Set Key to table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      dwKeyIndex      - Key index (reference to NDIS DDK)
- *      uKeyLength      - Key length
- *      KeyRSC          - Key RSC
- *      pbyKey          - Pointer to key
- *  Out:
- *      none
- *
- * Return Value: true if success otherwise false
- *
- */
-
-int KeybSetDefaultKey(struct vnt_private *pDevice, PSKeyManagement pTable,
-       u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey,
-       u8 byKeyDecMode)
-{
-       int ii;
-       PSKeyItem pKey;
-       u32 uKeyIdx;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Enter KeybSetDefaultKey: %1x, %d\n",
-           (int) dwKeyIndex, (int) uKeyLength);
-
-    if ((dwKeyIndex & PAIRWISE_KEY) != 0) {                  // Pairwise key
-        return (false);
-    } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) {
-        return (false);
-    }
-
-    if (uKeyLength > MAX_KEY_LEN)
-           return false;
-
-    pTable->KeyTable[MAX_KEY_TABLE-1].bInUse = true;
-    for (ii = 0; ii < ETH_ALEN; ii++)
-        pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID[ii] = 0xFF;
-
-    // Group key
-    pKey = &(pTable->KeyTable[MAX_KEY_TABLE-1].GroupKey[dwKeyIndex & 0x000000FF]);
-    if ((dwKeyIndex & TRANSMIT_KEY) != 0)  {
-        // Group transmit key
-        pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex = dwKeyIndex;
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-               "Group transmit key(R)[%X]: %d\n",
-               pTable->KeyTable[MAX_KEY_TABLE-1].dwGTKeyIndex,
-               MAX_KEY_TABLE-1);
-
-    }
-    pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl &= 0x7F00;          // clear all key control filed
-    pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= (byKeyDecMode << 4);
-    pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= (byKeyDecMode);
-    pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x0044;          // use group key for all address
-    uKeyIdx = (dwKeyIndex & 0x000000FF);
-
-    if ((uKeyLength == WLAN_WEP232_KEYLEN) &&
-        (byKeyDecMode == KEY_CTL_WEP)) {
-        pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0x4000;              // disable on-fly disable address match
-        pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP = true;
-    } else {
-        if (pTable->KeyTable[MAX_KEY_TABLE-1].bSoftWEP == false)
-            pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl |= 0xC000;          // enable on-fly disable address match
-    }
-
-    pKey->bKeyValid = true;
-    pKey->uKeyLength = uKeyLength;
-    pKey->dwKeyIndex = dwKeyIndex;
-    pKey->byCipherSuite = byKeyDecMode;
-    memcpy(pKey->abyKey, pbyKey, uKeyLength);
-    if (byKeyDecMode == KEY_CTL_WEP) {
-        if (uKeyLength == WLAN_WEP40_KEYLEN)
-            pKey->abyKey[15] &= 0x7F;
-        if (uKeyLength == WLAN_WEP104_KEYLEN)
-            pKey->abyKey[15] |= 0x80;
-    }
-
-       MACvSetKeyEntry(pDevice, pTable->KeyTable[MAX_KEY_TABLE-1].wKeyCtl,
-               MAX_KEY_TABLE-1, uKeyIdx,
-               pTable->KeyTable[MAX_KEY_TABLE-1].abyBSSID, pKey->abyKey);
-
-               if ((dwKeyIndex & USE_KEYRSC) == 0)
-                       pKey->KeyRSC = 0; /* RSC set by NIC */
-               else
-                       pKey->KeyRSC = *KeyRSC;
-
-    pKey->dwTSC47_16 = 0;
-    pKey->wTSC15_0 = 0;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n");
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n", pKey->bKeyValid);
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n", (int)pKey->uKeyLength);
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: \n");
-    for (ii = 0; ii < pKey->uKeyLength; ii++) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%x", pKey->abyKey[ii]);
-    }
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwTSC47_16: %x\n",
-               pKey->dwTSC47_16);
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->wTSC15_0: %x\n", pKey->wTSC15_0);
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->dwKeyIndex: %x\n",
-               pKey->dwKeyIndex);
-
-    return (true);
-}
-
-/*
- * Description: Set Key to table
- *
- * Parameters:
- *  In:
- *      pTable          - Pointer to Key table
- *      dwKeyIndex      - Key index (reference to NDIS DDK)
- *      uKeyLength      - Key length
- *      KeyRSC          - Key RSC
- *      pbyKey          - Pointer to key
- *  Out:
- *      none
- *
- * Return Value: true if success otherwise false
- *
- */
-
-int KeybSetAllGroupKey(struct vnt_private *pDevice, PSKeyManagement pTable,
-       u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey,
-       u8 byKeyDecMode)
-{
-       int i, ii;
-       PSKeyItem pKey;
-       u32 uKeyIdx;
+       switch (key->cipher) {
+       case 0:
+               for (u = 0 ; u < MAX_KEY_TABLE; u++)
+                       vnt_mac_disable_keyentry(priv, u);
+               return ret;
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Enter KeybSetAllGroupKey: %X\n",
-               dwKeyIndex);
+       case WLAN_CIPHER_SUITE_WEP40:
+       case WLAN_CIPHER_SUITE_WEP104:
+               for (u = 0; u < MAX_KEY_TABLE; u++)
+                       vnt_mac_disable_keyentry(priv, u);
 
-    if ((dwKeyIndex & PAIRWISE_KEY) != 0) {                  // Pairwise key
-        return (false);
-    } else if ((dwKeyIndex & 0x000000FF) >= MAX_GROUP_KEY) {
-        return (false);
-    }
+               vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY,
+                       KEY_CTL_WEP, true);
 
-    for (i=0; i < MAX_KEY_TABLE-1; i++) {
-        if (pTable->KeyTable[i].bInUse == true) {
-            // found table already exist
-            // Group key
-            pKey = &(pTable->KeyTable[i].GroupKey[dwKeyIndex & 0x000000FF]);
-            if ((dwKeyIndex & TRANSMIT_KEY) != 0)  {
-                // Group transmit key
-                pTable->KeyTable[i].dwGTKeyIndex = dwKeyIndex;
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                       "Group transmit key(R)[%X]: %d\n",
-                       pTable->KeyTable[i].dwGTKeyIndex, i);
+               key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
 
-            }
-            pTable->KeyTable[i].wKeyCtl &= 0xFF0F;          // clear group key control filed
-            pTable->KeyTable[i].wKeyCtl |= (byKeyDecMode << 4);
-            pTable->KeyTable[i].wKeyCtl |= 0x0040;          // use group key for group address
-            uKeyIdx = (dwKeyIndex & 0x000000FF);
+               return ret;
+       case WLAN_CIPHER_SUITE_TKIP:
+               key->flags |= IEEE80211_KEY_FLAG_GENERATE_MMIC;
+               key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
 
-            pTable->KeyTable[i].wKeyCtl |= 0x8000;              // enable on-fly
+               key_dec_mode = KEY_CTL_TKIP;
 
-            pKey->bKeyValid = true;
-            pKey->uKeyLength = uKeyLength;
-            pKey->dwKeyIndex = dwKeyIndex;
-            pKey->byCipherSuite = byKeyDecMode;
-            memcpy(pKey->abyKey, pbyKey, uKeyLength);
-            if (byKeyDecMode == KEY_CTL_WEP) {
-                if (uKeyLength == WLAN_WEP40_KEYLEN)
-                    pKey->abyKey[15] &= 0x7F;
-                if (uKeyLength == WLAN_WEP104_KEYLEN)
-                    pKey->abyKey[15] |= 0x80;
-            }
+               break;
+       case WLAN_CIPHER_SUITE_CCMP:
+               if (priv->byLocalID <= MAC_REVISION_A1)
+                       return -EINVAL;
 
-           MACvSetKeyEntry(pDevice, pTable->KeyTable[i].wKeyCtl, i, uKeyIdx,
-                       pTable->KeyTable[i].abyBSSID, pKey->abyKey);
+               key_dec_mode = KEY_CTL_CCMP;
 
-               if ((dwKeyIndex & USE_KEYRSC) == 0)
-                       pKey->KeyRSC = 0; /* RSC set by NIC */
-               else
-                       pKey->KeyRSC = *KeyRSC;
+               key->flags |= IEEE80211_KEY_FLAG_GENERATE_IV;
+       }
 
-            pKey->dwTSC47_16 = 0;
-            pKey->wTSC15_0 = 0;
 
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KeybSetKey(R): \n");
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->bKeyValid: %d\n ", pKey->bKeyValid);
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->uKeyLength: %d\n ", (int)pKey->uKeyLength);
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"pKey->abyKey: ");
-            for (ii = 0; ii < pKey->uKeyLength; ii++) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%02x ", pKey->abyKey[ii]);
-            }
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"\n");
+       if (key->flags & IEEE80211_KEY_FLAG_PAIRWISE) {
+               vnt_set_keymode(hw, mac_addr, key, VNT_KEY_PAIRWISE,
+                                       key_dec_mode, true);
+       } else {
+               vnt_set_keymode(hw, mac_addr, key, VNT_KEY_DEFAULTKEY,
+                                               key_dec_mode, true);
 
-            //DBG_PRN_GRP12(("pKey->dwTSC47_16: %lX\n ", pKey->dwTSC47_16));
-            //DBG_PRN_GRP12(("pKey->wTSC15_0: %X\n ", pKey->wTSC15_0));
-            //DBG_PRN_GRP12(("pKey->dwKeyIndex: %lX\n ", pKey->dwKeyIndex));
+               vnt_set_keymode(hw, (u8 *)conf->bssid, key,
+                       VNT_KEY_GROUP_ADDRESS, key_dec_mode, true);
+       }
 
-        } // (pTable->KeyTable[i].bInUse == true)
-    }
-    return (true);
+       return 0;
 }
index 23e188d125ba7219237d6fea1099c2691aed507f..3cb1291055ed4e93d2823838cf03e1fd1ac44a1d 100644 (file)
 #ifndef __KEY_H__
 #define __KEY_H__
 
-#include "tether.h"
-#include "80211mgr.h"
+#include "device.h"
 
-#define MAX_GROUP_KEY       4
 #define MAX_KEY_TABLE       11
-#define MAX_KEY_LEN         32
-#define AES_KEY_LEN         16
-
-#define AUTHENTICATOR_KEY   0x10000000
-#define USE_KEYRSC          0x20000000
-#define PAIRWISE_KEY        0x40000000
-#define TRANSMIT_KEY        0x80000000
-
-#define GROUP_KEY           0x00000000
 
 #define KEY_CTL_WEP         0x00
 #define KEY_CTL_NONE        0x01
 #define KEY_CTL_TKIP        0x02
 #define KEY_CTL_CCMP        0x03
-#define KEY_CTL_INVALID     0xFF
-
-typedef struct tagSKeyItem
-{
-    bool        bKeyValid;
-       u32 uKeyLength;
-    u8        abyKey[MAX_KEY_LEN];
-       u64 KeyRSC;
-    u32       dwTSC47_16;
-    u16        wTSC15_0;
-    u8        byCipherSuite;
-    u8        byReserved0;
-    u32       dwKeyIndex;
-    void *pvKeyTable;
-} SKeyItem, *PSKeyItem; //64
-
-typedef struct tagSKeyTable
-{
-    u8        abyBSSID[ETH_ALEN];  /* 6 */
-    u8        byReserved0[2];              //8
-    SKeyItem    PairwiseKey;
-    SKeyItem    GroupKey[MAX_GROUP_KEY]; //64*5 = 320, 320+8=328
-    u32       dwGTKeyIndex;            // GroupTransmitKey Index
-    bool        bInUse;
-    u16        wKeyCtl;
-    bool        bSoftWEP;
-    u8        byReserved1[6];
-} SKeyTable, *PSKeyTable; //352
-
-typedef struct tagSKeyManagement
-{
-    SKeyTable   KeyTable[MAX_KEY_TABLE];
-} SKeyManagement, *PSKeyManagement;
-
-void KeyvInitTable(struct vnt_private *, PSKeyManagement pTable);
-
-int KeybGetKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyIndex,
-       PSKeyItem *pKey);
-
-int KeybSetKey(struct vnt_private *, PSKeyManagement pTable, u8 *pbyBSSID,
-       u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey,
-       u8 byKeyDecMode);
-
-int KeybRemoveKey(struct vnt_private *, PSKeyManagement pTable,
-       u8 *pbyBSSID, u32 dwKeyIndex);
-
-int KeybRemoveAllKey(struct vnt_private *, PSKeyManagement pTable,
-       u8 *pbyBSSID);
 
-int KeybGetTransmitKey(PSKeyManagement pTable, u8 *pbyBSSID, u32 dwKeyType,
-       PSKeyItem *pKey);
+#define VNT_KEY_DEFAULTKEY     0x1
+#define VNT_KEY_GROUP_ADDRESS  0x2
+#define VNT_KEY_ALLGROUP       0x4
+#define VNT_KEY_GROUP          0x40
+#define VNT_KEY_PAIRWISE       0x00
+#define VNT_KEY_ONFLY          0x8000
+#define VNT_KEY_ONFLY_ALL      0x4000
 
-int KeybSetDefaultKey(struct vnt_private *, PSKeyManagement pTable,
-       u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey,
-       u8 byKeyDecMode);
+int vnt_key_init_table(struct vnt_private *);
 
-int KeybSetAllGroupKey(struct vnt_private *, PSKeyManagement pTable,
-       u32 dwKeyIndex, u32 uKeyLength, u64 *KeyRSC, u8 *pbyKey,
-       u8 byKeyDecMode);
+int vnt_set_keys(struct ieee80211_hw *hw, struct ieee80211_sta *sta,
+       struct ieee80211_vif *vif, struct ieee80211_key_conf *key);
 
 #endif /* __KEY_H__ */
index cadf7cd280c3474043a759920a81460e777f4fb5..641d77baa2abcab362bbbaa1e2ab484727d94beb 100644 (file)
  * Revision History:
  */
 
-#include "tmacro.h"
-#include "tether.h"
 #include "desc.h"
 #include "mac.h"
-#include "80211hdr.h"
 #include "usbpipe.h"
 
 /*
@@ -50,7 +47,7 @@
  * Return Value: none
  *
  */
-void MACvWriteMultiAddr(struct vnt_private *priv, u64 mc_filter)
+void vnt_mac_set_filter(struct vnt_private *priv, u64 mc_filter)
 {
        __le64 le_mc = cpu_to_le64(mc_filter);
 
@@ -69,12 +66,12 @@ void MACvWriteMultiAddr(struct vnt_private *priv, u64 mc_filter)
  *
  *
  */
-void MACbShutdown(struct vnt_private *priv)
+void vnt_mac_shutdown(struct vnt_private *priv)
 {
        vnt_control_out(priv, MESSAGE_TYPE_MACSHUTDOWN, 0, 0, 0, NULL);
 }
 
-void MACvSetBBType(struct vnt_private *priv, u8 type)
+void vnt_mac_set_bb_type(struct vnt_private *priv, u8 type)
 {
        u8 data[2];
 
@@ -99,7 +96,7 @@ void MACvSetBBType(struct vnt_private *priv, u8 type)
  * Return Value: none
  *
  */
-void MACvDisableKeyEntry(struct vnt_private *priv, u8 entry_idx)
+void vnt_mac_disable_keyentry(struct vnt_private *priv, u8 entry_idx)
 {
        vnt_control_out(priv, MESSAGE_TYPE_CLRKEYENTRY, 0, 0,
                sizeof(entry_idx), &entry_idx);
@@ -119,16 +116,12 @@ void MACvDisableKeyEntry(struct vnt_private *priv, u8 entry_idx)
  * Return Value: none
  *
  */
-void MACvSetKeyEntry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
+void vnt_mac_set_keyentry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
        u32 key_idx, u8 *addr, u8 *key)
 {
        struct vnt_mac_set_key set_key;
        u16 offset;
 
-       if (priv->byLocalID <= MAC_REVISION_A1)
-               if (priv->vnt_mgmt.byCSSPK == KEY_CTL_CCMP)
-                       return;
-
        offset = MISCFIFO_KEYETRY0;
        offset += (entry_idx * MISCFIFO_KEYENTRYSIZE);
 
@@ -147,7 +140,7 @@ void MACvSetKeyEntry(struct vnt_private *priv, u16 key_ctl, u32 entry_idx,
                (u16)key_idx, sizeof(struct vnt_mac_set_key), (u8 *)&set_key);
 }
 
-void MACvRegBitsOff(struct vnt_private *priv, u8 reg_ofs, u8 bits)
+void vnt_mac_reg_bits_off(struct vnt_private *priv, u8 reg_ofs, u8 bits)
 {
        u8 data[2];
 
@@ -158,7 +151,7 @@ void MACvRegBitsOff(struct vnt_private *priv, u8 reg_ofs, u8 bits)
                reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvRegBitsOn(struct vnt_private *priv, u8 reg_ofs, u8 bits)
+void vnt_mac_reg_bits_on(struct vnt_private *priv, u8 reg_ofs, u8 bits)
 {
        u8 data[2];
 
@@ -169,7 +162,7 @@ void MACvRegBitsOn(struct vnt_private *priv, u8 reg_ofs, u8 bits)
                reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvWriteWord(struct vnt_private *priv, u8 reg_ofs, u16 word)
+void vnt_mac_write_word(struct vnt_private *priv, u8 reg_ofs, u16 word)
 {
        u8 data[2];
 
@@ -180,13 +173,13 @@ void MACvWriteWord(struct vnt_private *priv, u8 reg_ofs, u16 word)
                reg_ofs, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvWriteBSSIDAddress(struct vnt_private *priv, u8 *addr)
+void vnt_mac_set_bssid_addr(struct vnt_private *priv, u8 *addr)
 {
        vnt_control_out(priv, MESSAGE_TYPE_WRITE, MAC_REG_BSSID0,
                MESSAGE_REQUEST_MACREG, ETH_ALEN, addr);
 }
 
-void MACvEnableProtectMD(struct vnt_private *priv)
+void vnt_mac_enable_protect_mode(struct vnt_private *priv)
 {
        u8 data[2];
 
@@ -197,7 +190,7 @@ void MACvEnableProtectMD(struct vnt_private *priv)
                MAC_REG_ENCFG0, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvDisableProtectMD(struct vnt_private *priv)
+void vnt_mac_disable_protect_mode(struct vnt_private *priv)
 {
        u8 data[2];
 
@@ -208,7 +201,7 @@ void MACvDisableProtectMD(struct vnt_private *priv)
                MAC_REG_ENCFG0, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvEnableBarkerPreambleMd(struct vnt_private *priv)
+void vnt_mac_enable_barker_preamble_mode(struct vnt_private *priv)
 {
        u8 data[2];
 
@@ -219,7 +212,7 @@ void MACvEnableBarkerPreambleMd(struct vnt_private *priv)
                MAC_REG_ENCFG2, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvDisableBarkerPreambleMd(struct vnt_private *priv)
+void vnt_mac_disable_barker_preamble_mode(struct vnt_private *priv)
 {
        u8 data[2];
 
@@ -230,7 +223,7 @@ void MACvDisableBarkerPreambleMd(struct vnt_private *priv)
                MAC_REG_ENCFG2, MESSAGE_REQUEST_MACREG, ARRAY_SIZE(data), data);
 }
 
-void MACvWriteBeaconInterval(struct vnt_private *priv, u16 interval)
+void vnt_mac_set_beacon_interval(struct vnt_private *priv, u16 interval)
 {
        u8 data[2];
 
index 986ca95f7204157ac5200544e781eea5b2d3c3d2..3e1745753a27062dad8e9c2e7d6c188f83a564ca 100644 (file)
@@ -35,7 +35,6 @@
 #define __MAC_H__
 
 #include "device.h"
-#include "tmacro.h"
 
 #define REV_ID_VT3253_A0    0x00
 #define REV_ID_VT3253_A1    0x01
@@ -414,20 +413,20 @@ struct vnt_mac_set_key {
        u8 key[WLAN_KEY_LEN_CCMP];
 } __packed;
 
-void MACvWriteMultiAddr(struct vnt_private *, u64);
-void MACbShutdown(struct vnt_private *);
-void MACvSetBBType(struct vnt_private *, u8);
-void MACvDisableKeyEntry(struct vnt_private *, u8);
-void MACvSetKeyEntry(struct vnt_private *, u16, u32, u32, u8 *, u8 *);
-void MACvRegBitsOff(struct vnt_private *, u8, u8);
-void MACvRegBitsOn(struct vnt_private *, u8, u8);
-void MACvWriteWord(struct vnt_private *, u8, u16);
-void MACvWriteBSSIDAddress(struct vnt_private *, u8 *);
-void MACvEnableProtectMD(struct vnt_private *);
-void MACvDisableProtectMD(struct vnt_private *);
-void MACvEnableBarkerPreambleMd(struct vnt_private *);
-void MACvDisableBarkerPreambleMd(struct vnt_private *);
-void MACvWriteBeaconInterval(struct vnt_private *, u16);
+void vnt_mac_set_filter(struct vnt_private *, u64);
+void vnt_mac_shutdown(struct vnt_private *);
+void vnt_mac_set_bb_type(struct vnt_private *, u8);
+void vnt_mac_disable_keyentry(struct vnt_private *, u8);
+void vnt_mac_set_keyentry(struct vnt_private *, u16, u32, u32, u8 *, u8 *);
+void vnt_mac_reg_bits_off(struct vnt_private *, u8, u8);
+void vnt_mac_reg_bits_on(struct vnt_private *, u8, u8);
+void vnt_mac_write_word(struct vnt_private *, u8, u16);
+void vnt_mac_set_bssid_addr(struct vnt_private *, u8 *);
+void vnt_mac_enable_protect_mode(struct vnt_private *);
+void vnt_mac_disable_protect_mode(struct vnt_private *);
+void vnt_mac_enable_barker_preamble_mode(struct vnt_private *);
+void vnt_mac_disable_barker_preamble_mode(struct vnt_private *);
+void vnt_mac_set_beacon_interval(struct vnt_private *, u16);
 void vnt_mac_set_led(struct vnt_private *priv, u8, u8);
 
 #endif /* __MAC_H__ */
index e18071f121c5ef009657ff83656338800056b84f..14845ec94f7e31bbbf06967e549b28d60e4dabf0 100644 (file)
 #include "card.h"
 #include "baseband.h"
 #include "mac.h"
-#include "tether.h"
-#include "wmgr.h"
-#include "wctl.h"
 #include "power.h"
 #include "wcmd.h"
-#include "iocmd.h"
 #include "rxtx.h"
-#include "bssdb.h"
-#include "wpactl.h"
-#include "iwctl.h"
 #include "dpc.h"
-#include "datarate.h"
 #include "rf.h"
 #include "firmware.h"
 #include "usbpipe.h"
 #include "channel.h"
 #include "int.h"
-#include "iowpa.h"
 
 /* static int msglevel = MSG_LEVEL_DEBUG; */
 static int          msglevel                =MSG_LEVEL_INFO;
@@ -193,7 +184,6 @@ static const long frequency_list[] = {
     5700, 5745, 5765, 5785, 5805, 5825
        };
 
-static const struct iw_handler_def     iwctl_handler_def;
 */
 
 static int vt6656_probe(struct usb_interface *intf,
@@ -205,56 +195,22 @@ static int vt6656_suspend(struct usb_interface *intf, pm_message_t message);
 static int vt6656_resume(struct usb_interface *intf);
 #endif /* CONFIG_PM */
 
-static struct net_device_stats *device_get_stats(struct net_device *dev);
-static int  device_open(struct net_device *dev);
-static int  device_xmit(struct sk_buff *skb, struct net_device *dev);
-static void device_set_multi(struct net_device *dev);
-static int  device_close(struct net_device *dev);
-static int  device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-
 static int device_init_registers(struct vnt_private *pDevice);
-static bool device_init_defrag_cb(struct vnt_private *pDevice);
 
-static int  ethtool_ioctl(struct net_device *dev, struct ifreq *);
 static void device_free_tx_bufs(struct vnt_private *pDevice);
 static void device_free_rx_bufs(struct vnt_private *pDevice);
 static void device_free_int_bufs(struct vnt_private *pDevice);
-static void device_free_frag_bufs(struct vnt_private *pDevice);
 static bool device_alloc_bufs(struct vnt_private *pDevice);
 
-static int Read_config_file(struct vnt_private *pDevice);
-static unsigned char *Config_FileOperation(struct vnt_private *pDevice);
-static int Config_FileGetParameter(unsigned char *string,
-                                  unsigned char *dest,
-                                  unsigned char *source);
-
 static void usb_device_reset(struct vnt_private *pDevice);
 
 static void
 device_set_options(struct vnt_private *pDevice) {
-
-    u8    abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-    u8    abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
-    u8 abySNAP_Bridgetunnel[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
-
-    memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN);
-    memcpy(pDevice->abySNAP_RFC1042, abySNAP_RFC1042, ETH_ALEN);
-    memcpy(pDevice->abySNAP_Bridgetunnel, abySNAP_Bridgetunnel, ETH_ALEN);
-
     pDevice->cbTD = TX_DESC_DEF0;
     pDevice->cbRD = RX_DESC_DEF0;
-    pDevice->uChannel = CHANNEL_DEF;
-    pDevice->wRTSThreshold = RTS_THRESH_DEF;
-    pDevice->wFragmentationThreshold = FRAG_THRESH_DEF;
     pDevice->byShortRetryLimit = SHORT_RETRY_DEF;
     pDevice->byLongRetryLimit = LONG_RETRY_DEF;
-    pDevice->wMaxTransmitMSDULifetime = DEFAULT_MSDU_LIFETIME;
-    pDevice->byShortPreamble = PREAMBLE_TYPE_DEF;
-    pDevice->ePSMode = PS_MODE_DEF;
-    pDevice->b11hEnable = X80211h_MODE_DEF;
     pDevice->op_mode = NL80211_IFTYPE_UNSPECIFIED;
-    pDevice->uConnectionRate = DATA_RATE_DEF;
-    if (pDevice->uConnectionRate < RATE_AUTO) pDevice->bFixRate = true;
     pDevice->byBBType = BBP_TYPE_DEF;
     pDevice->byPacketType = pDevice->byBBType;
     pDevice->byAutoFBCtrl = AUTO_FB_0;
@@ -267,13 +223,8 @@ device_set_options(struct vnt_private *pDevice) {
  */
 static int device_init_registers(struct vnt_private *pDevice)
 {
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
        struct vnt_cmd_card_init *init_cmd = &pDevice->init_command;
        struct vnt_rsp_card_init *init_rsp = &pDevice->init_response;
-       u8 abyBroadcastAddr[ETH_ALEN] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-       u8 abySNAP_RFC1042[ETH_ALEN] = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00};
-       u8 abySNAP_Bridgetunnel[ETH_ALEN]
-               = {0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8};
        u8 byAntenna;
        int ii;
        int ntStatus = STATUS_SUCCESS;
@@ -283,15 +234,11 @@ static int device_init_registers(struct vnt_private *pDevice)
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "---->INIbInitAdapter. [%d][%d]\n",
                                DEVICE_INIT_COLD, pDevice->byPacketType);
 
-       memcpy(pDevice->abyBroadcastAddr, abyBroadcastAddr, ETH_ALEN);
-       memcpy(pDevice->abySNAP_RFC1042, abySNAP_RFC1042, ETH_ALEN);
-       memcpy(pDevice->abySNAP_Bridgetunnel, abySNAP_Bridgetunnel, ETH_ALEN);
-
-       if (!FIRMWAREbCheckVersion(pDevice)) {
-               if (FIRMWAREbDownload(pDevice) == true) {
-                       if (FIRMWAREbBrach2Sram(pDevice) == false) {
+       if (!vnt_check_firmware_version(pDevice)) {
+               if (vnt_download_firmware(pDevice) == true) {
+                       if (vnt_firmware_branch_to_sram(pDevice) == false) {
                                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                                       " FIRMWAREbBrach2Sram fail\n");
+                                       " vnt_firmware_branch_to_sram fail\n");
                                return false;
                        }
                } else {
@@ -339,21 +286,6 @@ static int device_init_registers(struct vnt_private *pDevice)
 
        /* do MACbSoftwareReset in MACvInitialize */
 
-       pDevice->bProtectMode = false;
-       /* only used in 11g type, sync with ERP IE */
-       pDevice->bNonERPPresent = false;
-       pDevice->bBarkerPreambleMd = false;
-       if (pDevice->bFixRate) {
-               pDevice->wCurrentRate = (u16)pDevice->uConnectionRate;
-       } else {
-               if (pDevice->byBBType == BB_TYPE_11B)
-                       pDevice->wCurrentRate = RATE_11M;
-               else
-                       pDevice->wCurrentRate = RATE_54M;
-       }
-
-       CHvInitChannelTable(pDevice);
-
        pDevice->byTopOFDMBasicRate = RATE_24M;
        pDevice->byTopCCKBasicRate = RATE_1M;
 
@@ -379,13 +311,9 @@ static int device_init_registers(struct vnt_private *pDevice)
         * original zonetype is USA, but custom zonetype is Europe,
         * then need to recover 12, 13, 14 channels with 11 channel
         */
-       if (((pDevice->abyEEPROM[EEP_OFS_ZONETYPE] == ZoneType_Japan) ||
-               (pDevice->abyEEPROM[EEP_OFS_ZONETYPE] == ZoneType_Europe)) &&
-               (pDevice->byOriginalZonetype == ZoneType_USA)) {
-               for (ii = 11; ii < 14; ii++) {
-                       pDevice->abyCCKPwrTbl[ii] = pDevice->abyCCKPwrTbl[10];
-                       pDevice->abyOFDMPwrTbl[ii] = pDevice->abyOFDMPwrTbl[10];
-               }
+       for (ii = 11; ii < 14; ii++) {
+               pDevice->abyCCKPwrTbl[ii] = pDevice->abyCCKPwrTbl[10];
+               pDevice->abyOFDMPwrTbl[ii] = pDevice->abyOFDMPwrTbl[10];
        }
 
        pDevice->byOFDMPwrA = 0x34; /* same as RFbMA2829SelectChannel */
@@ -447,14 +375,8 @@ static int device_init_registers(struct vnt_private *pDevice)
        pDevice->byAutoFBCtrl = AUTO_FB_0;
 
        /* default Auto Mode */
-       /* pDevice->NetworkType = Ndis802_11Automode; */
-       pDevice->eConfigPHYMode = PHY_TYPE_AUTO;
        pDevice->byBBType = BB_TYPE_11G;
 
-       /* get channel range */
-       pDevice->byMinChannel = 1;
-       pDevice->byMaxChannel = CB_MAX_CHANNEL;
-
        /* get RFType */
        pDevice->byRFType = init_rsp->rf_type;
 
@@ -497,11 +419,6 @@ static int device_init_registers(struct vnt_private *pDevice)
                }
        }
 
-       pMgmt->eScanType = WMAC_SCAN_PASSIVE;
-       pMgmt->uCurrChannel = pDevice->uChannel;
-       pMgmt->uIBSSChannel = pDevice->uChannel;
-       CARDbSetMediaChannel(pDevice, pMgmt->uCurrChannel);
-
        /* get permanent network address */
        memcpy(pDevice->abyPermanentNetAddr, init_rsp->net_addr, 6);
        memcpy(pDevice->abyCurrentNetAddr,
@@ -515,21 +432,12 @@ static int device_init_registers(struct vnt_private *pDevice)
        * set BB and packet type at the same time
        * set Short Slot Time, xIFS, and RSPINF
        */
-       if (pDevice->byBBType == BB_TYPE_11A) {
-               CARDbAddBasicRate(pDevice, RATE_6M);
+       if (pDevice->byBBType == BB_TYPE_11A)
                pDevice->bShortSlotTime = true;
-       } else {
-               CARDbAddBasicRate(pDevice, RATE_1M);
+       else
                pDevice->bShortSlotTime = false;
-       }
 
        BBvSetShortSlotTime(pDevice);
-       CARDvSetBSSMode(pDevice);
-
-       pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
-       pDevice->byBBVGANew = pDevice->byBBVGACurrent;
-
-       BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
 
        pDevice->byRadioCtl = pDevice->abyEEPROM[EEP_OFS_RADIOCTL];
        pDevice->bHWRadioOff = false;
@@ -543,9 +451,11 @@ static int device_init_registers(struct vnt_private *pDevice)
 
                if ((byTmp & GPIO3_DATA) == 0) {
                        pDevice->bHWRadioOff = true;
-                       MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
+                       vnt_mac_reg_bits_on(pDevice, MAC_REG_GPIOCTL1,
+                                                               GPIO3_INTMD);
                } else {
-                       MACvRegBitsOff(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
+                       vnt_mac_reg_bits_off(pDevice, MAC_REG_GPIOCTL1,
+                                                               GPIO3_INTMD);
                        pDevice->bHWRadioOff = false;
                }
 
@@ -555,13 +465,13 @@ static int device_init_registers(struct vnt_private *pDevice)
 
        vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
 
-       MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL0, 0x01);
+       vnt_mac_reg_bits_on(pDevice, MAC_REG_GPIOCTL0, 0x01);
 
        if ((pDevice->bHWRadioOff == true) ||
                                (pDevice->bRadioControlOff == true)) {
-               CARDbRadioPowerOff(pDevice);
+               vnt_radio_power_off(pDevice);
        } else {
-               CARDbRadioPowerOn(pDevice);
+               vnt_radio_power_on(pDevice);
        }
 
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"<----INIbInitAdapter Exit\n");
@@ -569,108 +479,6 @@ static int device_init_registers(struct vnt_private *pDevice)
        return true;
 }
 
-#ifdef CONFIG_PM       /* Minimal support for suspend and resume */
-
-static int vt6656_suspend(struct usb_interface *intf, pm_message_t message)
-{
-       struct vnt_private *device = usb_get_intfdata(intf);
-
-       if (!device || !device->dev)
-               return -ENODEV;
-
-       if (device->flags & DEVICE_FLAGS_OPENED)
-               device_close(device->dev);
-
-       return 0;
-}
-
-static int vt6656_resume(struct usb_interface *intf)
-{
-       struct vnt_private *device = usb_get_intfdata(intf);
-
-       if (!device || !device->dev)
-               return -ENODEV;
-
-       if (!(device->flags & DEVICE_FLAGS_OPENED))
-               device_open(device->dev);
-
-       return 0;
-}
-
-#endif /* CONFIG_PM */
-
-static const struct net_device_ops device_netdev_ops = {
-    .ndo_open               = device_open,
-    .ndo_stop               = device_close,
-    .ndo_do_ioctl           = device_ioctl,
-    .ndo_get_stats          = device_get_stats,
-    .ndo_start_xmit         = device_xmit,
-    .ndo_set_rx_mode       = device_set_multi,
-};
-
-static int
-vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
-{
-       u8 fake_mac[ETH_ALEN] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01};
-       struct usb_device *udev = interface_to_usbdev(intf);
-       int rc = 0;
-       struct net_device *netdev = NULL;
-       struct vnt_private *pDevice;
-
-       printk(KERN_NOTICE "%s Ver. %s\n", DEVICE_FULL_DRV_NAM, DEVICE_VERSION);
-       printk(KERN_NOTICE "Copyright (c) 2004 VIA Networking Technologies, Inc.\n");
-
-       udev = usb_get_dev(udev);
-       netdev = alloc_etherdev(sizeof(struct vnt_private));
-       if (!netdev) {
-               printk(KERN_ERR DEVICE_NAME ": allocate net device failed\n");
-               rc = -ENOMEM;
-               goto err_nomem;
-       }
-
-       pDevice = netdev_priv(netdev);
-       memset(pDevice, 0, sizeof(struct vnt_private));
-
-       pDevice->dev = netdev;
-       pDevice->usb = udev;
-
-       device_set_options(pDevice);
-       spin_lock_init(&pDevice->lock);
-       mutex_init(&pDevice->usb_lock);
-
-       INIT_DELAYED_WORK(&pDevice->run_command_work, vRunCommand);
-       INIT_DELAYED_WORK(&pDevice->second_callback_work, BSSvSecondCallBack);
-       INIT_WORK(&pDevice->read_work_item, RXvWorkItem);
-       INIT_WORK(&pDevice->rx_mng_work_item, RXvMngWorkItem);
-
-       pDevice->vnt_mgmt.pAdapter = (void *) pDevice;
-
-       netdev->netdev_ops = &device_netdev_ops;
-       netdev->wireless_handlers =
-               (struct iw_handler_def *) &iwctl_handler_def;
-
-       usb_set_intfdata(intf, pDevice);
-       SET_NETDEV_DEV(netdev, &intf->dev);
-       memcpy(pDevice->dev->dev_addr, fake_mac, ETH_ALEN);
-
-       usb_device_reset(pDevice);
-
-       rc = register_netdev(netdev);
-       if (rc) {
-               printk(KERN_ERR DEVICE_NAME " Failed to register netdev\n");
-               goto err_netdev;
-       }
-
-       return 0;
-
-err_netdev:
-       free_netdev(netdev);
-err_nomem:
-       usb_put_dev(udev);
-
-       return rc;
-}
-
 static void device_free_tx_bufs(struct vnt_private *priv)
 {
        struct vnt_usb_send_context *tx_context;
@@ -697,6 +505,8 @@ static void device_free_rx_bufs(struct vnt_private *priv)
 
        for (ii = 0; ii < priv->cbRD; ii++) {
                rcb = priv->apRCB[ii];
+               if (!rcb)
+                       continue;
 
                /* deallocate URBs */
                if (rcb->pUrb) {
@@ -707,9 +517,9 @@ static void device_free_rx_bufs(struct vnt_private *priv)
                /* deallocate skb */
                if (rcb->skb)
                        dev_kfree_skb(rcb->skb);
-       }
 
-       kfree(priv->pRCBMem);
+               kfree(rcb);
+       }
 
        return;
 }
@@ -740,9 +550,8 @@ static bool device_alloc_bufs(struct vnt_private *priv)
                tx_context = kmalloc(sizeof(struct vnt_usb_send_context),
                                                                GFP_KERNEL);
                if (tx_context == NULL) {
-                       DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
-                               "%s : allocate tx usb context failed\n",
-                                       priv->dev->name);
+                       dev_err(&priv->usb->dev,
+                                       "allocate tx usb context failed\n");
                        goto free_tx;
                }
 
@@ -760,26 +569,16 @@ static bool device_alloc_bufs(struct vnt_private *priv)
                tx_context->in_use = false;
        }
 
-       /* allocate RCB mem */
-       priv->pRCBMem = kzalloc((sizeof(struct vnt_rcb) * priv->cbRD),
-                                                               GFP_KERNEL);
-       if (priv->pRCBMem == NULL) {
-               DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
-                       "%s : alloc rx usb context failed\n",
-                               priv->dev->name);
-               goto free_tx;
-       }
-
-       priv->FirstRecvFreeList = NULL;
-       priv->LastRecvFreeList = NULL;
-       priv->FirstRecvMngList = NULL;
-       priv->LastRecvMngList = NULL;
-       priv->NumRecvFreeList = 0;
+       for (ii = 0; ii < priv->cbRD; ii++) {
+               priv->apRCB[ii] = kzalloc(sizeof(struct vnt_rcb), GFP_KERNEL);
+               if (!priv->apRCB[ii]) {
+                       dev_err(&priv->usb->dev,
+                                       "failed to allocate rcb no %d\n", ii);
+                       goto free_rx_tx;
+               }
 
-       rcb = (struct vnt_rcb *)priv->pRCBMem;
+               rcb = priv->apRCB[ii];
 
-       for (ii = 0; ii < priv->cbRD; ii++) {
-               priv->apRCB[ii] = rcb;
                rcb->pDevice = priv;
 
                /* allocate URBs */
@@ -790,7 +589,7 @@ static bool device_alloc_bufs(struct vnt_private *priv)
                        goto free_rx_tx;
                }
 
-               rcb->skb = netdev_alloc_skb(priv->dev, priv->rx_buf_sz);
+               rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
                if (rcb->skb == NULL) {
                        DBG_PRT(MSG_LEVEL_ERR, KERN_ERR
                                                " Failed to alloc rx skb\n");
@@ -799,11 +598,9 @@ static bool device_alloc_bufs(struct vnt_private *priv)
 
                rcb->bBoolInUse = false;
 
-               EnqueueRCB(priv->FirstRecvFreeList,
-                                               priv->LastRecvFreeList, rcb);
-
-               priv->NumRecvFreeList++;
-               rcb++;
+               /* submit rx urb */
+               if (PIPEnsBulkInUsbRead(priv, rcb))
+                       goto free_rx_tx;
        }
 
        priv->pInterruptURB = usb_alloc_urb(0, GFP_ATOMIC);
@@ -830,533 +627,544 @@ free_tx:
        return false;
 }
 
-static bool device_init_defrag_cb(struct vnt_private *pDevice)
+static void vnt_tx_80211(struct ieee80211_hw *hw,
+       struct ieee80211_tx_control *control, struct sk_buff *skb)
 {
-       int i;
-       PSDeFragControlBlock pDeF;
-
-    /* Init the fragment ctl entries */
-    for (i = 0; i < CB_MAX_RX_FRAG; i++) {
-        pDeF = &(pDevice->sRxDFCB[i]);
-        if (!device_alloc_frag_buf(pDevice, pDeF)) {
-            DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s: can not alloc frag bufs\n",
-                pDevice->dev->name);
-            goto free_frag;
-        }
-    }
-    pDevice->cbDFCB = CB_MAX_RX_FRAG;
-    pDevice->cbFreeDFCB = pDevice->cbDFCB;
-    return true;
-
-free_frag:
-    device_free_frag_bufs(pDevice);
-    return false;
+       struct vnt_private *priv = hw->priv;
+
+       ieee80211_stop_queues(hw);
+
+       if (vnt_tx_packet(priv, skb)) {
+               ieee80211_free_txskb(hw, skb);
+
+               ieee80211_wake_queues(hw);
+       }
 }
 
-static void device_free_frag_bufs(struct vnt_private *pDevice)
+static int vnt_start(struct ieee80211_hw *hw)
 {
-       PSDeFragControlBlock pDeF;
-       int i;
+       struct vnt_private *priv = hw->priv;
 
-    for (i = 0; i < CB_MAX_RX_FRAG; i++) {
+       priv->rx_buf_sz = MAX_TOTAL_SIZE_WITH_ALL_HEADERS;
 
-        pDeF = &(pDevice->sRxDFCB[i]);
+       if (device_alloc_bufs(priv) == false) {
+               dev_dbg(&priv->usb->dev, "device_alloc_bufs fail...\n");
+               return -ENOMEM;
+       }
 
-        if (pDeF->skb)
-            dev_kfree_skb(pDeF->skb);
-    }
-}
+       MP_CLEAR_FLAG(priv, fMP_DISCONNECTED);
+       MP_SET_FLAG(priv, fMP_POST_READS);
+       MP_SET_FLAG(priv, fMP_POST_WRITES);
 
-int device_alloc_frag_buf(struct vnt_private *pDevice,
-               PSDeFragControlBlock pDeF)
-{
-       pDeF->skb = netdev_alloc_skb(pDevice->dev, pDevice->rx_buf_sz);
-       if (!pDeF->skb)
-               return false;
+       if (device_init_registers(priv) == false) {
+               dev_dbg(&priv->usb->dev, " init register fail\n");
+               goto free_all;
+       }
 
-       return true;
+       priv->int_interval = 1;  /* bInterval is set to 1 */
+
+       INTvWorkItem(priv);
+
+       priv->flags |= DEVICE_FLAGS_OPENED;
+
+       ieee80211_wake_queues(hw);
+
+       return 0;
+
+free_all:
+       device_free_rx_bufs(priv);
+       device_free_tx_bufs(priv);
+       device_free_int_bufs(priv);
+
+       usb_kill_urb(priv->pInterruptURB);
+       usb_free_urb(priv->pInterruptURB);
+
+       return -ENOMEM;
 }
 
-static int  device_open(struct net_device *dev)
+static void vnt_stop(struct ieee80211_hw *hw)
 {
-       struct vnt_private *pDevice = netdev_priv(dev);
+       struct vnt_private *priv = hw->priv;
+       int i;
 
-     pDevice->fWPA_Authened = false;
+       if (!priv)
+               return;
 
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " device_open...\n");
+       for (i = 0; i < MAX_KEY_TABLE; i++)
+               vnt_mac_disable_keyentry(priv, i);
 
-    pDevice->rx_buf_sz = MAX_TOTAL_SIZE_WITH_ALL_HEADERS;
+       /* clear all keys */
+       priv->key_entry_inuse = 0;
 
-    if (device_alloc_bufs(pDevice) == false) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " device_alloc_bufs fail... \n");
-        return -ENOMEM;
-    }
+       if ((priv->flags & DEVICE_FLAGS_UNPLUG) == false)
+               vnt_mac_shutdown(priv);
 
-    if (device_init_defrag_cb(pDevice)== false) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " Initial defragment cb fail \n");
-        goto free_rx_tx;
-    }
+       ieee80211_stop_queues(hw);
 
-    MP_CLEAR_FLAG(pDevice, fMP_DISCONNECTED);
-    MP_SET_FLAG(pDevice, fMP_POST_READS);
-    MP_SET_FLAG(pDevice, fMP_POST_WRITES);
+       MP_SET_FLAG(priv, fMP_DISCONNECTED);
+       MP_CLEAR_FLAG(priv, fMP_POST_WRITES);
+       MP_CLEAR_FLAG(priv, fMP_POST_READS);
 
-    /* read config file */
-    Read_config_file(pDevice);
+       cancel_delayed_work_sync(&priv->run_command_work);
 
-       if (device_init_registers(pDevice) == false) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " init register fail\n");
-               goto free_all;
-       }
+       priv->bCmdRunning = false;
 
-    /* init for key management */
-    KeyvInitTable(pDevice,&pDevice->sKey);
-       memcpy(pDevice->vnt_mgmt.abyMACAddr,
-               pDevice->abyCurrentNetAddr, ETH_ALEN);
-    memcpy(pDevice->dev->dev_addr, pDevice->abyCurrentNetAddr, ETH_ALEN);
-    pDevice->bStopTx0Pkt = false;
-    pDevice->bStopDataPkt = false;
-    pDevice->bRoaming = false;
-    pDevice->bIsRoaming = false;
-    pDevice->bEnableRoaming = false;
-
-    vMgrObjectInit(pDevice);
-
-       schedule_delayed_work(&pDevice->second_callback_work, HZ);
-
-       pDevice->int_interval = 1;  /* bInterval is set to 1 */
-    pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
-
-    pDevice->bIsRxWorkItemQueued = true;
-
-   pDevice->bWPADEVUp = false;
-     pDevice->bwextstep0 = false;
-     pDevice->bwextstep1 = false;
-     pDevice->bwextstep2 = false;
-     pDevice->bwextstep3 = false;
-     pDevice->bWPASuppWextEnabled = false;
-    pDevice->byReAssocCount = 0;
-
-       schedule_work(&pDevice->read_work_item);
-    INTvWorkItem(pDevice);
-
-    /* if WEP key already set by iwconfig but device not yet open */
-    if ((pDevice->bEncryptionEnable == true) && (pDevice->bTransmitKey == true)) {
-         KeybSetDefaultKey( pDevice,
-                            &(pDevice->sKey),
-                            pDevice->byKeyIndex | (1 << 31),
-                            pDevice->uKeyLength,
-                            NULL,
-                            pDevice->abyKey,
-                            KEY_CTL_WEP
-                          );
-
-         pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
-    }
-
-       if (pDevice->vnt_mgmt.eConfigMode == WMAC_CONFIG_AP)
-               bScheduleCommand((void *) pDevice, WLAN_CMD_RUN_AP, NULL);
-       else
-               bScheduleCommand((void *) pDevice, WLAN_CMD_BSSID_SCAN, NULL);
+       priv->flags &= ~DEVICE_FLAGS_OPENED;
 
-    netif_stop_queue(pDevice->dev);
-    pDevice->flags |= DEVICE_FLAGS_OPENED;
+       device_free_tx_bufs(priv);
+       device_free_rx_bufs(priv);
+       device_free_int_bufs(priv);
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_open success..\n");
-       return 0;
+       usb_kill_urb(priv->pInterruptURB);
+       usb_free_urb(priv->pInterruptURB);
 
-free_all:
-    device_free_frag_bufs(pDevice);
-free_rx_tx:
-    device_free_rx_bufs(pDevice);
-    device_free_tx_bufs(pDevice);
-    device_free_int_bufs(pDevice);
-       usb_kill_urb(pDevice->pInterruptURB);
-    usb_free_urb(pDevice->pInterruptURB);
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_open fail.. \n");
-    return -ENOMEM;
+       return;
 }
 
-static int device_close(struct net_device *dev)
+static int vnt_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
 {
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u8 uu;
+       struct vnt_private *priv = hw->priv;
+
+       priv->vif = vif;
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close1\n");
-    if (pDevice == NULL)
-        return -ENODEV;
+       switch (vif->type) {
+       case NL80211_IFTYPE_STATION:
+               break;
+       case NL80211_IFTYPE_ADHOC:
+               vnt_mac_reg_bits_off(priv, MAC_REG_RCR, RCR_UNICAST);
+
+               vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_ADHOC);
 
-    if (pDevice->bLinkPass) {
-       bScheduleCommand((void *) pDevice, WLAN_CMD_DISASSOCIATE, NULL);
-        mdelay(30);
-    }
+               break;
+       case NL80211_IFTYPE_AP:
+               vnt_mac_reg_bits_off(priv, MAC_REG_RCR, RCR_UNICAST);
 
-        memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-        pMgmt->bShareKeyAlgorithm = false;
-        pDevice->bEncryptionEnable = false;
-        pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
+               vnt_mac_reg_bits_on(priv, MAC_REG_HOSTCR, HOSTCR_AP);
 
-       for (uu = 0; uu < MAX_KEY_TABLE; uu++)
-                MACvDisableKeyEntry(pDevice,uu);
+               break;
+       default:
+               return -EOPNOTSUPP;
+       }
 
-    if ((pDevice->flags & DEVICE_FLAGS_UNPLUG) == false) {
-        MACbShutdown(pDevice);
-    }
-    netif_stop_queue(pDevice->dev);
-    MP_SET_FLAG(pDevice, fMP_DISCONNECTED);
-    MP_CLEAR_FLAG(pDevice, fMP_POST_WRITES);
-    MP_CLEAR_FLAG(pDevice, fMP_POST_READS);
+       priv->op_mode = vif->type;
 
-       cancel_delayed_work_sync(&pDevice->run_command_work);
-       cancel_delayed_work_sync(&pDevice->second_callback_work);
+       vnt_set_bss_mode(priv);
 
-       cancel_work_sync(&pDevice->rx_mng_work_item);
-       cancel_work_sync(&pDevice->read_work_item);
+       /* LED blink on TX */
+       vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_INTER);
 
-   pDevice->bRoaming = false;
-   pDevice->bIsRoaming = false;
-   pDevice->bEnableRoaming = false;
-    pDevice->bCmdRunning = false;
-    pDevice->bLinkPass = false;
-    memset(pMgmt->abyCurrBSSID, 0, 6);
-    pMgmt->eCurrState = WMAC_STATE_IDLE;
+       return 0;
+}
 
-       pDevice->flags &= ~DEVICE_FLAGS_OPENED;
+static void vnt_remove_interface(struct ieee80211_hw *hw,
+               struct ieee80211_vif *vif)
+{
+       struct vnt_private *priv = hw->priv;
 
-    device_free_tx_bufs(pDevice);
-    device_free_rx_bufs(pDevice);
-    device_free_int_bufs(pDevice);
-    device_free_frag_bufs(pDevice);
+       switch (vif->type) {
+       case NL80211_IFTYPE_STATION:
+               break;
+       case NL80211_IFTYPE_ADHOC:
+               vnt_mac_reg_bits_off(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
+               vnt_mac_reg_bits_off(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
+               vnt_mac_reg_bits_off(priv, MAC_REG_HOSTCR, HOSTCR_ADHOC);
+               break;
+       case NL80211_IFTYPE_AP:
+               vnt_mac_reg_bits_off(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
+               vnt_mac_reg_bits_off(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
+               vnt_mac_reg_bits_off(priv, MAC_REG_HOSTCR, HOSTCR_AP);
+               break;
+       default:
+               break;
+       }
 
-       usb_kill_urb(pDevice->pInterruptURB);
-    usb_free_urb(pDevice->pInterruptURB);
+       vnt_radio_power_off(priv);
 
-    BSSvClearNodeDBTable(pDevice, 0);
+       priv->op_mode = NL80211_IFTYPE_UNSPECIFIED;
 
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "device_close2 \n");
+       /* LED slow blink */
+       vnt_mac_set_led(priv, LEDSTS_STS, LEDSTS_SLOW);
 
-    return 0;
+       return;
 }
 
-static void vt6656_disconnect(struct usb_interface *intf)
+static int vnt_config(struct ieee80211_hw *hw, u32 changed)
 {
-       struct vnt_private *device = usb_get_intfdata(intf);
+       struct vnt_private *priv = hw->priv;
+       struct ieee80211_conf *conf = &hw->conf;
+       u8 bb_type;
 
-       if (!device)
-               return;
+       if (changed & IEEE80211_CONF_CHANGE_PS) {
+               if (conf->flags & IEEE80211_CONF_PS)
+                       vnt_enable_power_saving(priv, conf->listen_interval);
+               else
+                       vnt_disable_power_saving(priv);
+       }
 
-       usb_set_intfdata(intf, NULL);
-       usb_put_dev(interface_to_usbdev(intf));
+       if ((changed & IEEE80211_CONF_CHANGE_CHANNEL) ||
+                       (conf->flags & IEEE80211_CONF_OFFCHANNEL)) {
+               vnt_set_channel(priv, conf->chandef.chan->hw_value);
 
-       device->flags |= DEVICE_FLAGS_UNPLUG;
+               if (conf->chandef.chan->band == IEEE80211_BAND_5GHZ)
+                       bb_type = BB_TYPE_11A;
+               else
+                       bb_type = BB_TYPE_11G;
 
-       if (device->dev) {
-               unregister_netdev(device->dev);
-               free_netdev(device->dev);
+               if (priv->byBBType != bb_type) {
+                       priv->byBBType = bb_type;
+
+                       vnt_set_bss_mode(priv);
+               }
+       }
+
+       if (changed & IEEE80211_CONF_CHANGE_POWER) {
+               if (priv->byBBType == BB_TYPE_11B)
+                       priv->wCurrentRate = RATE_1M;
+               else
+                       priv->wCurrentRate = RATE_54M;
+
+               vnt_rf_setpower(priv, priv->wCurrentRate,
+                               conf->chandef.chan->hw_value);
        }
+
+       return 0;
 }
 
-static int device_xmit(struct sk_buff *skb, struct net_device *dev)
+static void vnt_bss_info_changed(struct ieee80211_hw *hw,
+               struct ieee80211_vif *vif, struct ieee80211_bss_conf *conf,
+               u32 changed)
 {
-       struct vnt_private *pDevice = netdev_priv(dev);
-       struct net_device_stats *stats = &pDevice->stats;
-       unsigned long flags;
+       struct vnt_private *priv = hw->priv;
+       priv->current_aid = conf->aid;
 
-       spin_lock_irqsave(&pDevice->lock, flags);
+       if (changed & BSS_CHANGED_BSSID)
+               vnt_mac_set_bssid_addr(priv, (u8 *)conf->bssid);
 
-       netif_stop_queue(dev);
 
-       if (!pDevice->bLinkPass) {
-               dev_kfree_skb_irq(skb);
-               goto out;
+       if (changed & BSS_CHANGED_BASIC_RATES) {
+               priv->wBasicRate = conf->basic_rates;
+
+               vnt_update_top_rates(priv);
+
+               dev_dbg(&priv->usb->dev, "basic rates %x\n", conf->basic_rates);
        }
 
-       if (pDevice->bStopDataPkt) {
-               dev_kfree_skb_irq(skb);
-               stats->tx_dropped++;
-               goto out;
+       if (changed & BSS_CHANGED_ERP_PREAMBLE) {
+               if (conf->use_short_preamble) {
+                       vnt_mac_enable_barker_preamble_mode(priv);
+                       priv->byPreambleType = true;
+               } else {
+                       vnt_mac_disable_barker_preamble_mode(priv);
+                       priv->byPreambleType = false;
+               }
        }
 
-       if (nsDMA_tx_packet(pDevice, skb)) {
-               if (netif_queue_stopped(dev))
-                       netif_wake_queue(dev);
+       if (changed & BSS_CHANGED_ERP_CTS_PROT) {
+               if (conf->use_cts_prot)
+                       vnt_mac_enable_protect_mode(priv);
+               else
+                       vnt_mac_disable_protect_mode(priv);
        }
 
-out:
-       spin_unlock_irqrestore(&pDevice->lock, flags);
+       if (changed & BSS_CHANGED_ERP_SLOT) {
+               if (conf->use_short_slot)
+                       priv->bShortSlotTime = true;
+               else
+                       priv->bShortSlotTime = false;
 
-       return NETDEV_TX_OK;
-}
+               BBvSetShortSlotTime(priv);
+               BBvSetVGAGainOffset(priv, priv->abyBBVGA[0]);
+               BBvUpdatePreEDThreshold(priv, false);
+       }
 
-/* find out the start position of str2 from str1 */
-static unsigned char *kstrstr(const unsigned char *str1,
-                             const unsigned char *str2) {
-  int str1_len = strlen(str1);
-  int str2_len = strlen(str2);
-
-  while (str1_len >= str2_len) {
-       str1_len--;
-      if(memcmp(str1,str2,str2_len)==0)
-       return (unsigned char *) str1;
-        str1++;
-  }
-  return NULL;
+       if (changed & BSS_CHANGED_TXPOWER)
+               vnt_rf_setpower(priv, priv->wCurrentRate,
+                                       conf->chandef.chan->hw_value);
+
+       if (changed & BSS_CHANGED_BEACON_ENABLED) {
+               dev_dbg(&priv->usb->dev,
+                               "Beacon enable %d\n", conf->enable_beacon);
+
+               if (conf->enable_beacon) {
+                       vnt_beacon_enable(priv, vif, conf);
+
+                       vnt_mac_reg_bits_on(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
+               } else {
+                       vnt_mac_reg_bits_off(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
+               }
+       }
 }
 
-static int Config_FileGetParameter(unsigned char *string,
-                                  unsigned char *dest,
-                                  unsigned char *source)
+static u64 vnt_prepare_multicast(struct ieee80211_hw *hw,
+       struct netdev_hw_addr_list *mc_list)
 {
-  unsigned char buf1[100];
-  unsigned char buf2[100];
-  unsigned char *start_p = NULL, *end_p = NULL, *tmp_p = NULL;
-  int ii;
-
-    memset(buf1,0,100);
-    strcat(buf1, string);
-    strcat(buf1, "=");
-    source+=strlen(buf1);
-
-    /* find target string start point */
-    start_p = kstrstr(source,buf1);
-    if (start_p == NULL)
-       return false;
+       struct vnt_private *priv = hw->priv;
+       struct netdev_hw_addr *ha;
+       u64 mc_filter = 0;
+       u32 bit_nr = 0;
 
-    /* check if current config line is marked by "#" */
-    for (ii = 1; ; ii++) {
-       if (memcmp(start_p - ii, "\n", 1) == 0)
-               break;
-       if (memcmp(start_p - ii, "#", 1) == 0)
-               return false;
-    }
-
-    /* find target string end point */
-     end_p = kstrstr(start_p,"\n");
-     if (end_p == NULL) {       /* can't find "\n", but don't care */
-            end_p = start_p + strlen(start_p);   /* no include "\n" */
-     }
-
-   memset(buf2,0,100);
-   memcpy(buf2, start_p, end_p-start_p); /* get the target line */
-   buf2[end_p-start_p]='\0';
-
-   /* find value */
-   start_p = kstrstr(buf2,"=");
-   if (start_p == NULL)
-      return false;
-   memset(buf1,0,100);
-   strcpy(buf1,start_p+1);
-
-   /* except space */
-  tmp_p = buf1;
-  while(*tmp_p != 0x00) {
-       if(*tmp_p==' ')
-           tmp_p++;
-         else
-         break;
-  }
-
-   memcpy(dest,tmp_p,strlen(tmp_p));
- return true;
+       netdev_hw_addr_list_for_each(ha, mc_list) {
+               bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
+
+               mc_filter |= 1ULL << (bit_nr & 0x3f);
+       }
+
+       priv->mc_list_count = mc_list->count;
+
+       return mc_filter;
 }
 
-/* if read fails, return NULL, or return data pointer */
-static unsigned char *Config_FileOperation(struct vnt_private *pDevice)
+static void vnt_configure(struct ieee80211_hw *hw,
+       unsigned int changed_flags, unsigned int *total_flags, u64 multicast)
 {
-       unsigned char *buffer = kmalloc(1024, GFP_KERNEL);
-       struct file   *file;
+       struct vnt_private *priv = hw->priv;
+       u8 rx_mode = 0;
+       int rc;
+
+       *total_flags &= FIF_ALLMULTI | FIF_OTHER_BSS | FIF_PROMISC_IN_BSS |
+               FIF_BCN_PRBRESP_PROMISC;
 
-       if (!buffer) {
-               printk("allocate mem for file fail?\n");
-               return NULL;
+       rc = vnt_control_in(priv, MESSAGE_TYPE_READ, MAC_REG_RCR,
+               MESSAGE_REQUEST_MACREG, sizeof(u8), &rx_mode);
+
+       if (!rc)
+               rx_mode = RCR_MULTICAST | RCR_BROADCAST;
+
+       dev_dbg(&priv->usb->dev, "rx mode in = %x\n", rx_mode);
+
+       if (changed_flags & FIF_PROMISC_IN_BSS) {
+               /* unconditionally log net taps */
+               if (*total_flags & FIF_PROMISC_IN_BSS)
+                       rx_mode |= RCR_UNICAST;
+               else
+                       rx_mode &= ~RCR_UNICAST;
        }
 
-       file = filp_open(CONFIG_PATH, O_RDONLY, 0);
-       if (IS_ERR(file)) {
-               kfree(buffer);
-               printk("Config_FileOperation file Not exist\n");
-               return NULL;
+       if (changed_flags & FIF_ALLMULTI) {
+               if (*total_flags & FIF_ALLMULTI) {
+                       if (priv->mc_list_count > 2)
+                               vnt_mac_set_filter(priv, ~0);
+                       else
+                               vnt_mac_set_filter(priv, multicast);
+
+                       rx_mode |= RCR_MULTICAST | RCR_BROADCAST;
+               } else {
+                       rx_mode &= ~(RCR_MULTICAST | RCR_BROADCAST);
+               }
+
        }
 
-       if (kernel_read(file, 0, buffer, 1024) < 0) {
-               printk("read file error?\n");
-               kfree(buffer);
-               buffer = NULL;
+       if (changed_flags & (FIF_OTHER_BSS | FIF_BCN_PRBRESP_PROMISC)) {
+               if (*total_flags & (FIF_OTHER_BSS | FIF_BCN_PRBRESP_PROMISC))
+                       rx_mode &= ~RCR_BSSID;
+               else
+                       rx_mode |= RCR_BSSID;
        }
 
-       fput(file);
-       return buffer;
+       vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG, MAC_REG_RCR, rx_mode);
+
+       dev_dbg(&priv->usb->dev, "rx mode out= %x\n", rx_mode);
+
+       return;
 }
 
-/* return --->-1:fail; >=0:successful */
-static int Read_config_file(struct vnt_private *pDevice)
+static int vnt_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
+       struct ieee80211_vif *vif, struct ieee80211_sta *sta,
+               struct ieee80211_key_conf *key)
 {
-       int result = 0;
-       unsigned char tmpbuffer[100];
-       unsigned char *buffer = NULL;
-
-       /* init config setting */
- pDevice->config_file.ZoneType = -1;
- pDevice->config_file.eAuthenMode = -1;
- pDevice->config_file.eEncryptionStatus = -1;
-
-  buffer = Config_FileOperation(pDevice);
-  if (buffer == NULL) {
-     result =-1;
-     return result;
-  }
-
-/* get zonetype */
-{
-    memset(tmpbuffer,0,sizeof(tmpbuffer));
-    if(Config_FileGetParameter("ZONETYPE",tmpbuffer,buffer) ==true) {
-    if(memcmp(tmpbuffer,"USA",3)==0) {
-      pDevice->config_file.ZoneType=ZoneType_USA;
-    }
-    else if(memcmp(tmpbuffer,"JAPAN",5)==0) {
-      pDevice->config_file.ZoneType=ZoneType_Japan;
-    }
-    else if(memcmp(tmpbuffer,"EUROPE",6)==0) {
-     pDevice->config_file.ZoneType=ZoneType_Europe;
-    }
-    else {
-      printk("Unknown Zonetype[%s]?\n",tmpbuffer);
-   }
- }
+       struct vnt_private *priv = hw->priv;
+
+       switch (cmd) {
+       case SET_KEY:
+               if (vnt_set_keys(hw, sta, vif, key))
+                       return -EOPNOTSUPP;
+               break;
+       case DISABLE_KEY:
+               if (test_bit(key->hw_key_idx, &priv->key_entry_inuse))
+                       clear_bit(key->hw_key_idx, &priv->key_entry_inuse);
+       default:
+               break;
+       }
+
+       return 0;
 }
 
-/* get other parameter */
-  {
-       memset(tmpbuffer,0,sizeof(tmpbuffer));
-       if(Config_FileGetParameter("AUTHENMODE",tmpbuffer,buffer)==true) {
-        pDevice->config_file.eAuthenMode = (int) simple_strtol(tmpbuffer, NULL, 10);
-       }
-
-       memset(tmpbuffer,0,sizeof(tmpbuffer));
-       if(Config_FileGetParameter("ENCRYPTIONMODE",tmpbuffer,buffer)==true) {
-        pDevice->config_file.eEncryptionStatus= (int) simple_strtol(tmpbuffer, NULL, 10);
-       }
-  }
-
-  kfree(buffer);
-  return result;
+static void vnt_sw_scan_start(struct ieee80211_hw *hw)
+{
+       struct vnt_private *priv = hw->priv;
+
+       vnt_set_bss_mode(priv);
+       /* Set max sensitivity*/
+       BBvUpdatePreEDThreshold(priv, true);
 }
 
-static void device_set_multi(struct net_device *dev)
+static void vnt_sw_scan_complete(struct ieee80211_hw *hw)
 {
-       struct vnt_private *priv = netdev_priv(dev);
-       unsigned long flags;
+       struct vnt_private *priv = hw->priv;
 
-       if (priv->flags & DEVICE_FLAGS_OPENED) {
-               spin_lock_irqsave(&priv->lock, flags);
+       /* Return sensitivity to channel level*/
+       BBvUpdatePreEDThreshold(priv, false);
+}
 
-               bScheduleCommand(priv, WLAN_CMD_CONFIGURE_FILTER, NULL);
+static u64 vnt_get_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
+{
+       struct vnt_private *priv = hw->priv;
 
-               spin_unlock_irqrestore(&priv->lock, flags);
-       }
+       return priv->qwCurrTSF;
 }
 
-void vnt_configure_filter(struct vnt_private *priv)
+static void vnt_set_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+                       u64 tsf)
 {
-       struct net_device *dev = priv->dev;
-       struct vnt_manager *mgmt = &priv->vnt_mgmt;
-       struct netdev_hw_addr *ha;
-       u64 mc_filter = 0;
-       u8 tmp = 0;
-       int rc;
+       struct vnt_private *priv = hw->priv;
 
-       rc = vnt_control_in(priv, MESSAGE_TYPE_READ,
-               MAC_REG_RCR, MESSAGE_REQUEST_MACREG, 1, &tmp);
-       if (rc == 0)
-               priv->byRxMode = tmp;
+       vnt_update_next_tbtt(priv, tsf, vif->bss_conf.beacon_int);
+}
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "priv->byRxMode in= %x\n",
-                                                       priv->byRxMode);
+static void vnt_reset_tsf(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
+{
+       struct vnt_private *priv = hw->priv;
 
-       if (dev->flags & IFF_PROMISC) { /* set promiscuous mode */
-               DBG_PRT(MSG_LEVEL_ERR, KERN_NOTICE
-                       "%s: Promiscuous mode enabled.\n", dev->name);
-               /* unconditionally log net taps */
-               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST|RCR_UNICAST);
-       } else if ((netdev_mc_count(dev) > priv->multicast_limit) ||
-                       (dev->flags & IFF_ALLMULTI)) {
-               mc_filter = ~0x0;
-               MACvWriteMultiAddr(priv, mc_filter);
+       vnt_mac_reg_bits_off(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
 
-               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
-       } else {
-               netdev_for_each_mc_addr(ha, dev) {
-                       int bit_nr = ether_crc(ETH_ALEN, ha->addr) >> 26;
+       vnt_clear_current_tsf(priv);
+}
 
-                       mc_filter |= 1ULL << (bit_nr & 0x3f);
-               }
+static const struct ieee80211_ops vnt_mac_ops = {
+       .tx                     = vnt_tx_80211,
+       .start                  = vnt_start,
+       .stop                   = vnt_stop,
+       .add_interface          = vnt_add_interface,
+       .remove_interface       = vnt_remove_interface,
+       .config                 = vnt_config,
+       .bss_info_changed       = vnt_bss_info_changed,
+       .prepare_multicast      = vnt_prepare_multicast,
+       .configure_filter       = vnt_configure,
+       .set_key                = vnt_set_key,
+       .sw_scan_start          = vnt_sw_scan_start,
+       .sw_scan_complete       = vnt_sw_scan_complete,
+       .get_tsf                = vnt_get_tsf,
+       .set_tsf                = vnt_set_tsf,
+       .reset_tsf              = vnt_reset_tsf,
+};
 
-               MACvWriteMultiAddr(priv, mc_filter);
+int vnt_init(struct vnt_private *priv)
+{
 
-               priv->byRxMode &= ~(RCR_UNICAST);
-               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
-       }
+       if (!(device_init_registers(priv)))
+               return -EAGAIN;
 
-       if (mgmt->eConfigMode == WMAC_CONFIG_AP) {
-               /*
-                * If AP mode, don't enable RCR_UNICAST since HW only compares
-                * addr1 with local MAC
-                */
-               priv->byRxMode |= (RCR_MULTICAST|RCR_BROADCAST);
-               priv->byRxMode &= ~(RCR_UNICAST);
-       }
+       SET_IEEE80211_PERM_ADDR(priv->hw, priv->abyPermanentNetAddr);
 
-       vnt_control_out_u8(priv, MESSAGE_REQUEST_MACREG,
-                                       MAC_REG_RCR, priv->byRxMode);
+       vnt_init_bands(priv);
 
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                               "priv->byRxMode out= %x\n", priv->byRxMode);
-}
+       if (ieee80211_register_hw(priv->hw))
+               return -ENODEV;
 
-static struct net_device_stats *device_get_stats(struct net_device *dev)
-{
-       struct vnt_private *pDevice = netdev_priv(dev);
+       priv->mac_hw = true;
 
-       return &pDevice->stats;
+       return 0;
 }
 
-static int device_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
+static int
+vt6656_probe(struct usb_interface *intf, const struct usb_device_id *id)
 {
+       struct usb_device *udev;
+       struct vnt_private *priv;
+       struct ieee80211_hw *hw;
+       struct wiphy *wiphy;
        int rc = 0;
 
-       switch (cmd) {
-       case SIOCETHTOOL:
-               return ethtool_ioctl(dev, rq);
+       udev = usb_get_dev(interface_to_usbdev(intf));
 
+       dev_notice(&udev->dev, "%s Ver. %s\n",
+                                       DEVICE_FULL_DRV_NAM, DEVICE_VERSION);
+       dev_notice(&udev->dev,
+               "Copyright (c) 2004 VIA Networking Technologies, Inc.\n");
+
+       hw = ieee80211_alloc_hw(sizeof(struct vnt_private), &vnt_mac_ops);
+       if (!hw) {
+               dev_err(&udev->dev, "could not register ieee80211_hw\n");
+               goto err_nomem;
        }
 
+       priv = hw->priv;
+       priv->hw = hw;
+       priv->usb = udev;
+
+       device_set_options(priv);
+
+       spin_lock_init(&priv->lock);
+       mutex_init(&priv->usb_lock);
+
+       INIT_DELAYED_WORK(&priv->run_command_work, vRunCommand);
+
+       usb_set_intfdata(intf, priv);
+
+       wiphy = priv->hw->wiphy;
+
+       wiphy->frag_threshold = FRAG_THRESH_DEF;
+       wiphy->rts_threshold = RTS_THRESH_DEF;
+       wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION) |
+               BIT(NL80211_IFTYPE_ADHOC) | BIT(NL80211_IFTYPE_AP);
+
+       priv->hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
+               IEEE80211_HW_REPORTS_TX_ACK_STATUS |
+               IEEE80211_HW_SIGNAL_DBM |
+               IEEE80211_HW_TIMING_BEACON_ONLY;
+
+       priv->hw->rate_control_algorithm = "pid";
+       priv->hw->max_signal = 100;
+
+       SET_IEEE80211_DEV(priv->hw, &intf->dev);
+
+       usb_device_reset(priv);
+
+       MP_CLEAR_FLAG(priv, fMP_DISCONNECTED);
+       vResetCommandTimer(priv);
+
+       bScheduleCommand(priv, WLAN_CMD_INIT_MAC80211, NULL);
+
+       return 0;
+
+err_nomem:
+       usb_put_dev(udev);
+
        return rc;
 }
 
-static int ethtool_ioctl(struct net_device *dev, struct ifreq *rq)
+static void vt6656_disconnect(struct usb_interface *intf)
 {
-       u32 ethcmd;
-
-       if (copy_from_user(&ethcmd, rq->ifr_data, sizeof(ethcmd)))
-               return -EFAULT;
-
-        switch (ethcmd) {
-       case ETHTOOL_GDRVINFO: {
-               struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
-               strncpy(info.driver, DEVICE_NAME, sizeof(info.driver)-1);
-               strncpy(info.version, DEVICE_VERSION, sizeof(info.version)-1);
-               if (copy_to_user(rq->ifr_data, &info, sizeof(info)))
-                       return -EFAULT;
-               return 0;
-       }
+       struct vnt_private *priv = usb_get_intfdata(intf);
+
+       if (!priv)
+               return;
+
+       if (priv->mac_hw)
+               ieee80211_unregister_hw(priv->hw);
+
+       usb_set_intfdata(intf, NULL);
+       usb_put_dev(interface_to_usbdev(intf));
+
+       priv->flags |= DEVICE_FLAGS_UNPLUG;
+
+       ieee80211_free_hw(priv->hw);
+}
+
+#ifdef CONFIG_PM
 
-        }
+static int vt6656_suspend(struct usb_interface *intf, pm_message_t message)
+{
+       return 0;
+}
 
-       return -EOPNOTSUPP;
+static int vt6656_resume(struct usb_interface *intf)
+{
+       return 0;
 }
 
+#endif /* CONFIG_PM */
+
 MODULE_DEVICE_TABLE(usb, vt6656_table);
 
 static struct usb_driver vt6656_driver = {
diff --git a/drivers/staging/vt6656/michael.c b/drivers/staging/vt6656/michael.c
deleted file mode 100644 (file)
index 9a5a0b6..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: michael.cpp
- *
- * Purpose: The implementation of LIST data structure.
- *
- * Author: Kyle Hsu
- *
- * Date: Sep 4, 2002
- *
- * Functions:
- *      s_dwGetUINT32 - Convert from u8[] to u32 in a portable way
- *      s_vPutUINT32 - Convert from u32 to u8[] in a portable way
- *      s_vClear - Reset the state to the empty message.
- *      s_vSetKey - Set the key.
- *      MIC_vInit - Set the key.
- *      s_vAppendByte - Append the byte to our word-sized buffer.
- *      MIC_vAppend - call s_vAppendByte.
- *      MIC_vGetMIC - Append the minimum padding and call s_vAppendByte.
- *
- * Revision History:
- *
- */
-
-#include "tmacro.h"
-#include "michael.h"
-
-/*
- * static u32 s_dwGetUINT32(u8 * p);         Get u32 from
- *                                                     4 bytes LSByte first
- * static void s_vPutUINT32(u8* p, u32 val); Put u32 into
- *                                                     4 bytes LSByte first
- */
-static void s_vClear(void);            /* Clear the internal message,
-                                        * resets the object to the
-                                        * state just after construction. */
-static void s_vSetKey(u32 dwK0, u32 dwK1);
-static void s_vAppendByte(u8 b);       /* Add a single byte to the internal
-                                        * message */
-
-static u32  L, R;              /* Current state */
-static u32  K0, K1;            /* Key */
-static u32  M;         /* Message accumulator (single word) */
-static unsigned int   nBytesInM;       /* # bytes in M */
-
-/*
-static u32 s_dwGetUINT32 (u8 * p)
-// Convert from u8[] to u32 in a portable way
-{
-       u32 res = 0;
-       unsigned int i;
-       for (i = 0; i < 4; i++)
-               res |= (*p++) << (8*i);
-       return res;
-}
-
-static void s_vPutUINT32(u8 *p, u32 val)
-// Convert from u32 to u8[] in a portable way
-{
-       unsigned int i;
-       for (i = 0; i < 4; i++) {
-               *p++ = (u8) (val & 0xff);
-               val >>= 8;
-       }
-}
-*/
-
-static void s_vClear(void)
-{
-       /* Reset the state to the empty message. */
-       L = K0;
-       R = K1;
-       nBytesInM = 0;
-       M = 0;
-}
-
-static void s_vSetKey(u32 dwK0, u32 dwK1)
-{
-       /* Set the key */
-       K0 = dwK0;
-       K1 = dwK1;
-       /* and reset the message */
-       s_vClear();
-}
-
-static void s_vAppendByte(u8 b)
-{
-       /* Append the byte to our word-sized buffer */
-       M |= b << (8*nBytesInM);
-       nBytesInM++;
-       /* Process the word if it is full. */
-       if (nBytesInM >= 4) {
-               L ^= M;
-               R ^= ROL32(L, 17);
-               L += R;
-               R ^= ((L & 0xff00ff00) >> 8) | ((L & 0x00ff00ff) << 8);
-               L += R;
-               R ^= ROL32(L, 3);
-               L += R;
-               R ^= ROR32(L, 2);
-               L += R;
-               /* Clear the buffer */
-               M = 0;
-               nBytesInM = 0;
-       }
-}
-
-void MIC_vInit(u32 dwK0, u32 dwK1)
-{
-       /* Set the key */
-       s_vSetKey(dwK0, dwK1);
-}
-
-void MIC_vUnInit(void)
-{
-       /* Wipe the key material */
-       K0 = 0;
-       K1 = 0;
-
-       /* And the other fields as well. */
-       /* Note that this sets (L,R) to (K0,K1) which is just fine. */
-       s_vClear();
-}
-
-void MIC_vAppend(u8 * src, unsigned int nBytes)
-{
-    /* This is simple */
-       while (nBytes > 0) {
-               s_vAppendByte(*src++);
-               nBytes--;
-       }
-}
-
-void MIC_vGetMIC(u32 * pdwL, u32 * pdwR)
-{
-       /* Append the minimum padding */
-       s_vAppendByte(0x5a);
-       s_vAppendByte(0);
-       s_vAppendByte(0);
-       s_vAppendByte(0);
-       s_vAppendByte(0);
-       /* and then zeroes until the length is a multiple of 4 */
-       while (nBytesInM != 0)
-               s_vAppendByte(0);
-       /* The s_vAppendByte function has already computed the result. */
-       *pdwL = L;
-       *pdwR = R;
-       /* Reset to the empty message. */
-       s_vClear();
-}
diff --git a/drivers/staging/vt6656/michael.h b/drivers/staging/vt6656/michael.h
deleted file mode 100644 (file)
index 9c69a42..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: Michael.h
- *
- * Purpose: Reference implementation for Michael
- *          written by Niels Ferguson
- *
- * Author: Kyle Hsu
- *
- * Date: Jan 2, 2003
- *
- */
-
-#ifndef __MICHAEL_H__
-#define __MICHAEL_H__
-
-#include <linux/types.h>
-
-void MIC_vInit(u32 dwK0, u32 dwK1);
-
-void MIC_vUnInit(void);
-
-// Append bytes to the message to be MICed
-void MIC_vAppend(u8 * src, unsigned int nBytes);
-
-// Get the MIC result. Destination should accept 8 bytes of result.
-// This also resets the message to empty.
-void MIC_vGetMIC(u32 * pdwL, u32 * pdwR);
-
-// Rotation functions on 32 bit values
-#define ROL32(A, n) \
- (((A) << (n)) | (((A)>>(32-(n)))  & ((1UL << (n)) - 1)))
-#define ROR32(A, n) ROL32((A), 32-(n))
-
-#endif /* __MICHAEL_H__ */
index ddbd04695c9970d76755b9c939e68b71dbf68cd0..dbda3034d1e6927f237d52424d96cf99e0548a51 100644 (file)
  * Date: July 17, 2002
  *
  * Functions:
- *      PSvEnablePowerSaving - Enable Power Saving Mode
+ *      vnt_enable_power_saving - Enable Power Saving Mode
  *      PSvDiasblePowerSaving - Disable Power Saving Mode
- *      PSbConsiderPowerDown - Decide if we can Power Down
- *      PSvSendPSPOLL - Send PS-POLL packet
- *      PSbSendNullPacket - Send Null packet
- *      PSbIsNextTBTTWakeUp - Decide if we need to wake up at next Beacon
+ *      vnt_next_tbtt_wakeup - Decide if we need to wake up at next Beacon
  *
  * Revision History:
  *
@@ -39,7 +36,6 @@
 
 #include "mac.h"
 #include "device.h"
-#include "wmgr.h"
 #include "power.h"
 #include "wcmd.h"
 #include "rxtx.h"
@@ -58,60 +54,45 @@ static int msglevel = MSG_LEVEL_INFO;
  *
  */
 
-void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval)
+void vnt_enable_power_saving(struct vnt_private *priv, u16 listen_interval)
 {
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u16 wAID = pMgmt->wCurrAID | BIT14 | BIT15;
+       u16 aid = priv->current_aid | BIT(14) | BIT(15);
 
        /* set period of power up before TBTT */
-       MACvWriteWord(pDevice, MAC_REG_PWBT, C_PWBT);
+       vnt_mac_write_word(priv, MAC_REG_PWBT, C_PWBT);
 
-       if (pDevice->op_mode != NL80211_IFTYPE_ADHOC) {
+       if (priv->op_mode != NL80211_IFTYPE_ADHOC) {
                /* set AID */
-               MACvWriteWord(pDevice, MAC_REG_AIDATIM, wAID);
+               vnt_mac_write_word(priv, MAC_REG_AIDATIM, aid);
        }
 
        /* Warren:06-18-2004,the sequence must follow
         * PSEN->AUTOSLEEP->GO2DOZE
         */
        /* enable power saving hw function */
-       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
+       vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_PSEN);
 
        /* Set AutoSleep */
-       MACvRegBitsOn(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+       vnt_mac_reg_bits_on(priv, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
 
        /* Warren:MUST turn on this once before turn on AUTOSLEEP ,or the
         * AUTOSLEEP doesn't work
         */
-       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
+       vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_GO2DOZE);
 
-       if (wListenInterval >= 2) {
+       if (listen_interval >= 2) {
 
                /* clear always listen beacon */
-               MACvRegBitsOff(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
+               vnt_mac_reg_bits_off(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
 
                /* first time set listen next beacon */
-               MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
-
-               pMgmt->wCountToWakeUp = wListenInterval;
-
+               vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN);
        } else {
 
                /* always listen beacon */
-               MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
-
-               pMgmt->wCountToWakeUp = 0;
+               vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
        }
 
-       pDevice->bEnablePSMode = true;
-
-       /* We don't send null pkt in ad hoc mode
-        * since beacon will handle this.
-        */
-       if (pDevice->op_mode == NL80211_IFTYPE_STATION)
-               PSbSendNullPacket(pDevice);
-
-       pDevice->bPWBitOn = true;
        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "PS:Power Saving Mode Enable...\n");
 }
 
@@ -125,181 +106,18 @@ void PSvEnablePowerSaving(struct vnt_private *pDevice, u16 wListenInterval)
  *
  */
 
-void PSvDisablePowerSaving(struct vnt_private *pDevice)
+void vnt_disable_power_saving(struct vnt_private *priv)
 {
 
        /* disable power saving hw function */
-       vnt_control_out(pDevice, MESSAGE_TYPE_DISABLE_PS, 0,
+       vnt_control_out(priv, MESSAGE_TYPE_DISABLE_PS, 0,
                                                0, 0, NULL);
 
        /* clear AutoSleep */
-       MACvRegBitsOff(pDevice, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
+       vnt_mac_reg_bits_off(priv, MAC_REG_PSCFG, PSCFG_AUTOSLEEP);
 
        /* set always listen beacon */
-       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_ALBCN);
-       pDevice->bEnablePSMode = false;
-
-       if (pDevice->op_mode == NL80211_IFTYPE_STATION)
-               PSbSendNullPacket(pDevice);
-
-       pDevice->bPWBitOn = false;
-}
-
-/*
- *
- * Routine Description:
- * Consider to power down when no more packets to tx or rx.
- *
- * Return Value:
- *    true, if power down success
- *    false, if fail
- */
-
-int PSbConsiderPowerDown(struct vnt_private *pDevice, int bCheckRxDMA,
-       int bCheckCountToWakeUp)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u8 byData;
-
-       /* check if already in Doze mode */
-       vnt_control_in_u8(pDevice, MESSAGE_REQUEST_MACREG,
-                                       MAC_REG_PSCTL, &byData);
-
-       if ((byData & PSCTL_PS) != 0)
-               return true;
-
-       if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
-               /* check if in TIM wake period */
-               if (pMgmt->bInTIMWake)
-                       return false;
-       }
-
-       /* check scan state */
-       if (pDevice->bCmdRunning)
-               return false;
-
-       /* Tx Burst */
-       if (pDevice->bPSModeTxBurst)
-               return false;
-
-       /* Froce PSEN on */
-       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_PSEN);
-
-       if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA) {
-               if (bCheckCountToWakeUp && (pMgmt->wCountToWakeUp == 0
-                       || pMgmt->wCountToWakeUp == 1)) {
-                               return false;
-               }
-       }
-
-       pDevice->bPSRxBeacon = true;
-
-       /* no Tx, no Rx isr, now go to Doze */
-       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_GO2DOZE);
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Go to Doze ZZZZZZZZZZZZZZZ\n");
-       return true;
-}
-
-/*
- *
- * Routine Description:
- * Send PS-POLL packet
- *
- * Return Value:
- *    None.
- *
- */
-
-void PSvSendPSPOLL(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-
-       memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_HDR_ADDR2_LEN);
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-
-       pTxPacket->p80211Header->sA2.wFrameCtl = cpu_to_le16(
-               (
-                       WLAN_SET_FC_FTYPE(WLAN_TYPE_CTL) |
-                       WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PSPOLL) |
-                       WLAN_SET_FC_PWRMGT(0)
-               ));
-
-       pTxPacket->p80211Header->sA2.wDurationID =
-               pMgmt->wCurrAID | BIT14 | BIT15;
-       memcpy(pTxPacket->p80211Header->sA2.abyAddr1, pMgmt->abyCurrBSSID,
-               WLAN_ADDR_LEN);
-       memcpy(pTxPacket->p80211Header->sA2.abyAddr2, pMgmt->abyMACAddr,
-               WLAN_ADDR_LEN);
-       pTxPacket->cbMPDULen = WLAN_HDR_ADDR2_LEN;
-       pTxPacket->cbPayloadLen = 0;
-
-       /* log failure if sending failed */
-       if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING)
-               DBG_PRT(MSG_LEVEL_DEBUG,
-                       KERN_INFO "Send PS-Poll packet failed..\n");
-}
-
-/*
- *
- * Routine Description:
- * Send NULL packet to AP for notification power state of STA
- *
- * Return Value:
- *    None.
- *
- */
-
-int PSbSendNullPacket(struct vnt_private *pDevice)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u16 flags = 0;
-
-       if (pDevice->bLinkPass == false)
-               return false;
-
-       if (pDevice->bEnablePSMode == false && pDevice->tx_trigger == false)
-               return false;
-
-       memset(pMgmt->pbyPSPacketPool, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_NULLDATA_FR_MAXLEN);
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyPSPacketPool;
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-
-       flags = WLAN_SET_FC_FTYPE(WLAN_TYPE_DATA) |
-                       WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_NULL);
-
-       if (pDevice->bEnablePSMode)
-               flags |= WLAN_SET_FC_PWRMGT(1);
-       else
-               flags |= WLAN_SET_FC_PWRMGT(0);
-
-       pTxPacket->p80211Header->sA3.wFrameCtl = cpu_to_le16(flags);
-
-       if (pMgmt->eCurrMode != WMAC_MODE_IBSS_STA)
-               pTxPacket->p80211Header->sA3.wFrameCtl |=
-                       cpu_to_le16((u16)WLAN_SET_FC_TODS(1));
-
-       memcpy(pTxPacket->p80211Header->sA3.abyAddr1, pMgmt->abyCurrBSSID,
-               WLAN_ADDR_LEN);
-       memcpy(pTxPacket->p80211Header->sA3.abyAddr2, pMgmt->abyMACAddr,
-               WLAN_ADDR_LEN);
-       memcpy(pTxPacket->p80211Header->sA3.abyAddr3, pMgmt->abyCurrBSSID,
-               WLAN_BSSID_LEN);
-       pTxPacket->cbMPDULen = WLAN_HDR_ADDR3_LEN;
-       pTxPacket->cbPayloadLen = 0;
-       /* log error if sending failed */
-       if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-               DBG_PRT(MSG_LEVEL_DEBUG,
-                       KERN_INFO "Send Null Packet failed !\n");
-               return false;
-       }
-       return true;
+       vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_ALBCN);
 }
 
 /*
@@ -312,27 +130,17 @@ int PSbSendNullPacket(struct vnt_private *pDevice)
  *
  */
 
-int PSbIsNextTBTTWakeUp(struct vnt_private *pDevice)
+int vnt_next_tbtt_wakeup(struct vnt_private *priv)
 {
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int bWakeUp = false;
-
-       if (pMgmt->wListenInterval >= 2) {
-               if (pMgmt->wCountToWakeUp == 0)
-                       pMgmt->wCountToWakeUp = pMgmt->wListenInterval;
-
-               pMgmt->wCountToWakeUp--;
-
-               if (pMgmt->wCountToWakeUp == 1) {
-                       /* Turn on wake up to listen next beacon */
-                       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
-                       pDevice->bPSRxBeacon = false;
-                       bWakeUp = true;
-               } else if (!pDevice->bPSRxBeacon) {
-                       /* Listen until RxBeacon */
-                       MACvRegBitsOn(pDevice, MAC_REG_PSCTL, PSCTL_LNBCN);
-               }
+       struct ieee80211_hw *hw = priv->hw;
+       struct ieee80211_conf *conf = &hw->conf;
+       int wake_up = false;
+
+       if (conf->listen_interval == 1) {
+               /* Turn on wake up to listen next beacon */
+               vnt_mac_reg_bits_on(priv, MAC_REG_PSCTL, PSCTL_LNBCN);
+               wake_up = true;
        }
-       return bWakeUp;
-}
 
+       return wake_up;
+}
index 77835823943764e01ac909ecfffb72287d23ffb5..bd9de776acedae1ce5c20291f96791d3016dc99f 100644 (file)
 #define     PS_FAST_INTERVAL         1         // Fast power saving listen interval
 #define     PS_MAX_INTERVAL          4         // MAX power saving listen interval
 
-/*  PSDevice pDevice */
-/*  PSDevice hDeviceContext */
-
-int PSbConsiderPowerDown(struct vnt_private *, int bCheckRxDMA,
-       int bCheckCountToWakeUp);
-void PSvDisablePowerSaving(struct vnt_private *);
-void PSvEnablePowerSaving(struct vnt_private *, u16 wListenInterval);
-void PSvSendPSPOLL(struct vnt_private *);
-int PSbSendNullPacket(struct vnt_private *);
-int PSbIsNextTBTTWakeUp(struct vnt_private *);
+void vnt_disable_power_saving(struct vnt_private *);
+void vnt_enable_power_saving(struct vnt_private *, u16);
+int vnt_next_tbtt_wakeup(struct vnt_private *);
 
 #endif /* __POWER_H__ */
diff --git a/drivers/staging/vt6656/rc4.c b/drivers/staging/vt6656/rc4.c
deleted file mode 100644 (file)
index 2fd836f..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: rc4.c
- *
- * Purpose:
- *
- * Functions:
- *
- * Revision History:
- *
- * Author: Kyle Hsu
- *
- * Date: Sep 4, 2002
- *
- */
-
-#include "rc4.h"
-
-void rc4_init(PRC4Ext pRC4, u8 * pbyKey, unsigned int cbKey_len)
-{
-       unsigned int  ust1, ust2;
-       unsigned int  keyindex;
-       unsigned int  stateindex;
-       u8 * pbyst;
-       unsigned int  idx;
-
-       pbyst = pRC4->abystate;
-       pRC4->ux = 0;
-       pRC4->uy = 0;
-       for (idx = 0; idx < 256; idx++)
-               pbyst[idx] = (u8)idx;
-       keyindex = 0;
-       stateindex = 0;
-       for (idx = 0; idx < 256; idx++) {
-               ust1 = pbyst[idx];
-               stateindex = (stateindex + pbyKey[keyindex] + ust1) & 0xff;
-               ust2 = pbyst[stateindex];
-               pbyst[stateindex] = (u8)ust1;
-               pbyst[idx] = (u8)ust2;
-               if (++keyindex >= cbKey_len)
-                       keyindex = 0;
-       }
-}
-
-unsigned int rc4_byte(PRC4Ext pRC4)
-{
-       unsigned int ux;
-       unsigned int uy;
-       unsigned int ustx, usty;
-       u8 * pbyst;
-
-       pbyst = pRC4->abystate;
-       ux = (pRC4->ux + 1) & 0xff;
-       ustx = pbyst[ux];
-       uy = (ustx + pRC4->uy) & 0xff;
-       usty = pbyst[uy];
-       pRC4->ux = ux;
-       pRC4->uy = uy;
-       pbyst[uy] = (u8)ustx;
-       pbyst[ux] = (u8)usty;
-
-       return pbyst[(ustx + usty) & 0xff];
-}
-
-void rc4_encrypt(PRC4Ext pRC4, u8 * pbyDest,
-                       u8 * pbySrc, unsigned int cbData_len)
-{
-       unsigned int ii;
-       for (ii = 0; ii < cbData_len; ii++)
-               pbyDest[ii] = (u8)(pbySrc[ii] ^ rc4_byte(pRC4));
-}
diff --git a/drivers/staging/vt6656/rc4.h b/drivers/staging/vt6656/rc4.h
deleted file mode 100644 (file)
index d376e1a..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * File: rc4.h
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Purpose:
- *
- * Functions:
- *
- * Revision History:
- *
- * Author: Kyle Hsu
- *
- * Date: Sep 4, 2002
- *
- */
-
-#ifndef __RC4_H__
-#define __RC4_H__
-
-#include <linux/types.h>
-
-typedef struct {
-    unsigned int ux;
-    unsigned int uy;
-    u8 abystate[256];
-} RC4Ext, *PRC4Ext;
-
-void rc4_init(PRC4Ext pRC4, u8 * pbyKey, unsigned int cbKey_len);
-unsigned int rc4_byte(PRC4Ext pRC4);
-void rc4_encrypt(PRC4Ext pRC4, u8 * pbyDest, u8 * pbySrc,
-                unsigned int cbData_len);
-
-#endif /* __RC4_H__ */
index 3f54ae3cfb4ef09284ad0a754ed5e6c3c3aa21e2..8c2c2bd28571aade77bc8a6ee6d8f4c809b20007 100644 (file)
@@ -39,7 +39,6 @@
 #include "rf.h"
 #include "baseband.h"
 #include "usbpipe.h"
-#include "datarate.h"
 
 #define BY_AL2230_REG_LEN     23 //24bit
 #define CB_AL2230_INIT_SEQ    15
@@ -891,6 +890,8 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
                        return false;
 
                if (rate <= RATE_11M) {
+                       u16 hw_value = priv->hw->conf.chandef.chan->hw_value;
+
                        power_setting = ((0x3f-priv->byCurPwr) << 20) |
                                (0xe07 << 8) | (BY_VT3226_REG_LEN << 3) |
                                                IFREGCTL_REGW;
@@ -899,21 +900,14 @@ int vnt_rf_set_txpower(struct vnt_private *priv, u8 power, u32 rate)
                        ret &= vnt_rf_write_embedded(priv, 0x03c6a200 +
                                        (BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW);
 
-                       if (priv->vnt_mgmt.eScanState != WMAC_NO_SCANNING) {
-                               dev_dbg(&priv->usb->dev,
-                               "vnt_rf_set_txpower> 11B mode uCurrChannel[%d]\n",
-                                               priv->vnt_mgmt.uScanChannel);
-                               ret &= vnt_rf_write_embedded(priv,
-                                       vt3226d0_lo_current_table[priv->
-                                               vnt_mgmt.uScanChannel - 1]);
-                       } else {
-                               dev_dbg(&priv->usb->dev,
-                               "vnt_rf_set_txpower> 11B mode uCurrChannel[%d]\n",
-                                               priv->vnt_mgmt.uCurrChannel);
+                       dev_dbg(&priv->usb->dev,
+                               "%s 11b channel [%d]\n", __func__, hw_value);
+
+                       hw_value--;
+
+                       if (hw_value < ARRAY_SIZE(vt3226d0_lo_current_table))
                                ret &= vnt_rf_write_embedded(priv,
-                                       vt3226d0_lo_current_table[priv->
-                                               vnt_mgmt.uCurrChannel - 1]);
-                       }
+                                       vt3226d0_lo_current_table[hw_value]);
 
                        ret &= vnt_rf_write_embedded(priv, 0x015C0800 +
                                (BY_VT3226_REG_LEN<<3)+IFREGCTL_REGW);
index 704f4d3639bea4b27cce2a353f9577f7c346d51f..e896dfe5d3fcfe06a4b7e7ee776d15c3967cbd66 100644 (file)
@@ -26,7 +26,6 @@
  *
  * Functions:
  *      s_vGenerateTxParameter - Generate tx dma required parameter.
- *      s_vGenerateMACHeader - Translate 802.3 to 802.11 header
  *      csBeacon_xmit - beacon tx function
  *      csMgmt_xmit - management tx function
  *      s_uGetDataDuration - get tx data required duration
@@ -37,8 +36,6 @@
  *      s_vFillCTSHead- fulfill CTS ctl header
  *      s_vFillFragParameter- Set fragment ctl parameter.
  *      s_vFillRTSHead- fulfill RTS ctl header
- *      s_vFillTxKey- fulfill tx encrypt key
- *      s_vSWencryption- Software encrypt header
  *      vDMA0_tx_80211- tx 802.11 frame via dma0
  *      vGenerateFIFOHeader- Generate tx FIFO ctl header
  *
 
 #include "device.h"
 #include "rxtx.h"
-#include "tether.h"
 #include "card.h"
-#include "bssdb.h"
 #include "mac.h"
-#include "michael.h"
-#include "tkip.h"
-#include "wctl.h"
 #include "rf.h"
-#include "datarate.h"
 #include "usbpipe.h"
-#include "iocmd.h"
 
 static int          msglevel                = MSG_LEVEL_INFO;
 
@@ -91,39 +81,24 @@ static const u16 wFB_Opt1[2][5] = {
 #define DATADUR_A_F0    12
 #define DATADUR_A_F1    13
 
-static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
-       u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl);
-
 static struct vnt_usb_send_context *s_vGetFreeContext(struct vnt_private *);
 
-static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
+static u16 s_vGenerateTxParameter(struct vnt_usb_send_context *tx_context,
        u8 byPktType, u16 wCurrentRate, struct vnt_tx_buffer *tx_buffer,
        struct vnt_mic_hdr **mic_hdr, u32 need_mic, u32 cbFrameSize,
        int bNeedACK, struct ethhdr *psEthHeader, bool need_rts);
 
-static void s_vGenerateMACHeader(struct vnt_private *pDevice,
-       u8 *pbyBufferAddr, u16 wDuration, struct ethhdr *psEthHeader,
-       int bNeedEncrypt, u16 wFragType, u32 uFragIdx);
-
-static void s_vFillTxKey(struct vnt_private *pDevice,
-       struct vnt_tx_fifo_head *fifo_head, u8 *pbyIVHead,
-       PSKeyItem pTransmitKey, u8 *pbyHdrBuf, u16 wPayloadLen,
-       struct vnt_mic_hdr *mic_hdr);
-
-static void s_vSWencryption(struct vnt_private *pDevice,
-       PSKeyItem pTransmitKey, u8 *pbyPayloadHead, u16 wPayloadSize);
-
 static unsigned int s_uGetTxRsvTime(struct vnt_private *pDevice, u8 byPktType,
        u32 cbFrameLength, u16 wRate, int bNeedAck);
 
 static __le16 s_uGetRTSCTSRsvTime(struct vnt_private *priv,
        u8 rsv_type, u8 pkt_type, u32 frame_length, u16 current_rate);
 
-static u16 s_vFillCTSHead(struct vnt_private *pDevice,
+static u16 s_vFillCTSHead(struct vnt_usb_send_context *tx_context,
        u8 byPktType, union vnt_tx_data_head *head, u32 cbFrameLength,
        int bNeedAck, u16 wCurrentRate, u8 byFBOption);
 
-static u16 s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
+static u16 s_vFillRTSHead(struct vnt_usb_send_context *tx_context, u8 byPktType,
        union vnt_tx_data_head *head, u32 cbFrameLength, int bNeedAck,
        struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption);
 
@@ -151,6 +126,9 @@ static struct vnt_usb_send_context
                        context->in_use = true;
                        memset(context->data, 0,
                                        MAX_TOTAL_SIZE_WITH_ALL_HEADERS);
+
+                       context->hdr = NULL;
+
                        return context;
                }
        }
@@ -161,170 +139,6 @@ static struct vnt_usb_send_context
        return NULL;
 }
 
-static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
-       u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl)
-{
-       struct net_device_stats *stats = &pDevice->stats;
-       struct vnt_tx_pkt_info *pkt_info = pDevice->pkt_info;
-
-       pkt_info[byPktNum].fifo_ctl = wFIFOCtl;
-       memcpy(pkt_info[byPktNum].dest_addr, pbyDestAddr, ETH_ALEN);
-
-       stats->tx_bytes += wPktLength;
-}
-
-static void s_vFillTxKey(struct vnt_private *pDevice,
-       struct vnt_tx_fifo_head *fifo_head, u8 *pbyIVHead,
-       PSKeyItem pTransmitKey, u8 *pbyHdrBuf, u16 wPayloadLen,
-       struct vnt_mic_hdr *mic_hdr)
-{
-       u8 *pbyBuf = (u8 *)&fifo_head->adwTxKey[0];
-       __le32 *pdwIV = (__le32 *)pbyIVHead;
-       __le32 *pdwExtIV = (__le32 *)((u8 *)pbyIVHead + 4);
-       struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *)pbyHdrBuf;
-       __le32 rev_iv_counter;
-
-       /* Fill TXKEY */
-       if (pTransmitKey == NULL)
-               return;
-
-       rev_iv_counter = cpu_to_le32(pDevice->dwIVCounter);
-       *pdwIV = cpu_to_le32(pDevice->dwIVCounter);
-       pDevice->byKeyIndex = pTransmitKey->dwKeyIndex & 0xf;
-
-       switch (pTransmitKey->byCipherSuite) {
-       case KEY_CTL_WEP:
-               if (pTransmitKey->uKeyLength == WLAN_WEP232_KEYLEN) {
-                       memcpy(pDevice->abyPRNG, (u8 *)&rev_iv_counter, 3);
-                       memcpy(pDevice->abyPRNG + 3, pTransmitKey->abyKey,
-                                               pTransmitKey->uKeyLength);
-               } else {
-                       memcpy(pbyBuf, (u8 *)&rev_iv_counter, 3);
-                       memcpy(pbyBuf + 3, pTransmitKey->abyKey,
-                                               pTransmitKey->uKeyLength);
-                       if (pTransmitKey->uKeyLength == WLAN_WEP40_KEYLEN) {
-                               memcpy(pbyBuf+8, (u8 *)&rev_iv_counter, 3);
-                               memcpy(pbyBuf+11, pTransmitKey->abyKey,
-                                               pTransmitKey->uKeyLength);
-                       }
-
-                       memcpy(pDevice->abyPRNG, pbyBuf, 16);
-               }
-               /* Append IV after Mac Header */
-               *pdwIV &= cpu_to_le32(WEP_IV_MASK);
-               *pdwIV |= cpu_to_le32((u32)pDevice->byKeyIndex << 30);
-
-               pDevice->dwIVCounter++;
-               if (pDevice->dwIVCounter > WEP_IV_MASK)
-                       pDevice->dwIVCounter = 0;
-
-               break;
-       case KEY_CTL_TKIP:
-               pTransmitKey->wTSC15_0++;
-               if (pTransmitKey->wTSC15_0 == 0)
-                       pTransmitKey->dwTSC47_16++;
-
-               TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
-                       pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16,
-                                                       pDevice->abyPRNG);
-               memcpy(pbyBuf, pDevice->abyPRNG, 16);
-
-               /* Make IV */
-               memcpy(pdwIV, pDevice->abyPRNG, 3);
-
-               *(pbyIVHead+3) = (u8)(((pDevice->byKeyIndex << 6) &
-                                                       0xc0) | 0x20);
-               /*  Append IV&ExtIV after Mac Header */
-               *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
-
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                       "vFillTxKey()---- pdwExtIV: %x\n", *pdwExtIV);
-
-               break;
-       case KEY_CTL_CCMP:
-               pTransmitKey->wTSC15_0++;
-               if (pTransmitKey->wTSC15_0 == 0)
-                       pTransmitKey->dwTSC47_16++;
-
-               memcpy(pbyBuf, pTransmitKey->abyKey, 16);
-
-               /* Make IV */
-               *pdwIV = 0;
-               *(pbyIVHead+3) = (u8)(((pDevice->byKeyIndex << 6) &
-                                                       0xc0) | 0x20);
-
-               *pdwIV |= cpu_to_le32((u32)(pTransmitKey->wTSC15_0));
-
-               /* Append IV&ExtIV after Mac Header */
-               *pdwExtIV = cpu_to_le32(pTransmitKey->dwTSC47_16);
-
-               if (!mic_hdr)
-                       return;
-
-               /* MICHDR0 */
-               mic_hdr->id = 0x59;
-               mic_hdr->payload_len = cpu_to_be16(wPayloadLen);
-               memcpy(mic_hdr->mic_addr2, pMACHeader->addr2, ETH_ALEN);
-
-               mic_hdr->tsc_47_16 = cpu_to_be32(pTransmitKey->dwTSC47_16);
-               mic_hdr->tsc_15_0 = cpu_to_be16(pTransmitKey->wTSC15_0);
-
-               /* MICHDR1 */
-               if (ieee80211_has_a4(pMACHeader->frame_control))
-                       mic_hdr->hlen = cpu_to_be16(28);
-               else
-                       mic_hdr->hlen = cpu_to_be16(22);
-
-               memcpy(mic_hdr->addr1, pMACHeader->addr1, ETH_ALEN);
-               memcpy(mic_hdr->addr2, pMACHeader->addr2, ETH_ALEN);
-
-               /* MICHDR2 */
-               memcpy(mic_hdr->addr3, pMACHeader->addr3, ETH_ALEN);
-               mic_hdr->frame_control = cpu_to_le16(
-                       le16_to_cpu(pMACHeader->frame_control) & 0xc78f);
-               mic_hdr->seq_ctrl = cpu_to_le16(
-                               le16_to_cpu(pMACHeader->seq_ctrl) & 0xf);
-
-               if (ieee80211_has_a4(pMACHeader->frame_control))
-                       memcpy(mic_hdr->addr4, pMACHeader->addr4, ETH_ALEN);
-       }
-}
-
-static void s_vSWencryption(struct vnt_private *pDevice,
-       PSKeyItem pTransmitKey, u8 *pbyPayloadHead, u16 wPayloadSize)
-{
-       u32 cbICVlen = 4;
-       u32 dwICV = 0xffffffff;
-       u32 *pdwICV;
-
-    if (pTransmitKey == NULL)
-        return;
-
-    if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
-        //=======================================================================
-        // Append ICV after payload
-       dwICV = ether_crc_le(wPayloadSize, pbyPayloadHead);
-        pdwICV = (u32 *)(pbyPayloadHead + wPayloadSize);
-        // finally, we must invert dwCRC to get the correct answer
-        *pdwICV = cpu_to_le32(~dwICV);
-        // RC4 encryption
-        rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength + 3);
-        rc4_encrypt(&pDevice->SBox, pbyPayloadHead, pbyPayloadHead, wPayloadSize+cbICVlen);
-        //=======================================================================
-    } else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
-        //=======================================================================
-        //Append ICV after payload
-       dwICV = ether_crc_le(wPayloadSize, pbyPayloadHead);
-        pdwICV = (u32 *)(pbyPayloadHead + wPayloadSize);
-        // finally, we must invert dwCRC to get the correct answer
-        *pdwICV = cpu_to_le32(~dwICV);
-        // RC4 encryption
-        rc4_init(&pDevice->SBox, pDevice->abyPRNG, TKIP_KEY_LEN);
-        rc4_encrypt(&pDevice->SBox, pbyPayloadHead, pbyPayloadHead, wPayloadSize+cbICVlen);
-        //=======================================================================
-    }
-}
-
 static __le16 vnt_time_stamp_off(struct vnt_private *priv, u16 rate)
 {
        return cpu_to_le16(wTimeStampOff[priv->byPreambleType % 2]
@@ -341,15 +155,15 @@ static u32 s_uGetTxRsvTime(struct vnt_private *priv, u8 pkt_type,
 {
        u32 data_time, ack_time;
 
-       data_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+       data_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                                                        frame_length, rate);
 
        if (pkt_type == PK_TYPE_11B)
-               ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type, 14,
-                                               (u16)priv->byTopCCKBasicRate);
+               ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
+                                       14, (u16)priv->byTopCCKBasicRate);
        else
-               ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type, 14,
-                                               (u16)priv->byTopOFDMBasicRate);
+               ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
+                                       14, (u16)priv->byTopOFDMBasicRate);
 
        if (need_ack)
                return data_time + priv->uSIFS + ack_time;
@@ -372,30 +186,30 @@ static __le16 s_uGetRTSCTSRsvTime(struct vnt_private *priv,
 
        rrv_time = rts_time = cts_time = ack_time = data_time = 0;
 
-       data_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+       data_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                                                frame_length, current_rate);
 
        if (rsv_type == 0) {
-               rts_time = BBuGetFrameTime(priv->byPreambleType,
+               rts_time = vnt_get_frame_time(priv->byPreambleType,
                        pkt_type, 20, priv->byTopCCKBasicRate);
-               cts_time = ack_time = BBuGetFrameTime(priv->byPreambleType,
+               cts_time = ack_time = vnt_get_frame_time(priv->byPreambleType,
                        pkt_type, 14, priv->byTopCCKBasicRate);
        } else if (rsv_type == 1) {
-               rts_time = BBuGetFrameTime(priv->byPreambleType,
+               rts_time = vnt_get_frame_time(priv->byPreambleType,
                        pkt_type, 20, priv->byTopCCKBasicRate);
-               cts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+               cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                        14, priv->byTopCCKBasicRate);
-               ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+               ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                        14, priv->byTopOFDMBasicRate);
        } else if (rsv_type == 2) {
-               rts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+               rts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                        20, priv->byTopOFDMBasicRate);
-               cts_time = ack_time = BBuGetFrameTime(priv->byPreambleType,
+               cts_time = ack_time = vnt_get_frame_time(priv->byPreambleType,
                        pkt_type, 14, priv->byTopOFDMBasicRate);
        } else if (rsv_type == 3) {
-               cts_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+               cts_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                        14, priv->byTopCCKBasicRate);
-               ack_time = BBuGetFrameTime(priv->byPreambleType, pkt_type,
+               ack_time = vnt_get_frame_time(priv->byPreambleType, pkt_type,
                        14, priv->byTopOFDMBasicRate);
 
                rrv_time = cts_time + ack_time + data_time + 2 * priv->uSIFS;
@@ -416,10 +230,10 @@ static __le16 s_uGetDataDuration(struct vnt_private *pDevice,
 
        if (bNeedAck) {
                if (byPktType == PK_TYPE_11B)
-                       uAckTime = BBuGetFrameTime(pDevice->byPreambleType,
+                       uAckTime = vnt_get_frame_time(pDevice->byPreambleType,
                                byPktType, 14, pDevice->byTopCCKBasicRate);
                else
-                       uAckTime = BBuGetFrameTime(pDevice->byPreambleType,
+                       uAckTime = vnt_get_frame_time(pDevice->byPreambleType,
                                byPktType, 14, pDevice->byTopOFDMBasicRate);
                return cpu_to_le16((u16)(pDevice->uSIFS + uAckTime));
        }
@@ -439,8 +253,8 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType,
        case RTSDUR_BA:
        case RTSDUR_BA_F0:
        case RTSDUR_BA_F1:
-               uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,
-                       14, pDevice->byTopCCKBasicRate);
+               uCTSTime = vnt_get_frame_time(pDevice->byPreambleType,
+                               byPktType, 14, pDevice->byTopCCKBasicRate);
                uDurTime = uCTSTime + 2 * pDevice->uSIFS +
                        s_uGetTxRsvTime(pDevice, byPktType,
                                                cbFrameLength, wRate, bNeedAck);
@@ -449,8 +263,8 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType,
        case RTSDUR_AA:
        case RTSDUR_AA_F0:
        case RTSDUR_AA_F1:
-               uCTSTime = BBuGetFrameTime(pDevice->byPreambleType, byPktType,
-                       14, pDevice->byTopOFDMBasicRate);
+               uCTSTime = vnt_get_frame_time(pDevice->byPreambleType,
+                               byPktType, 14, pDevice->byTopOFDMBasicRate);
                uDurTime = uCTSTime + 2 * pDevice->uSIFS +
                        s_uGetTxRsvTime(pDevice, byPktType,
                                                cbFrameLength, wRate, bNeedAck);
@@ -470,33 +284,64 @@ static __le16 s_uGetRTSCTSDuration(struct vnt_private *pDevice, u8 byDurType,
        return cpu_to_le16((u16)uDurTime);
 }
 
-static u16 vnt_rxtx_datahead_g(struct vnt_private *priv, u8 pkt_type, u16 rate,
-               struct vnt_tx_datahead_g *buf, u32 frame_len, int need_ack)
+static u16 vnt_mac_hdr_pos(struct vnt_usb_send_context *tx_context,
+       struct ieee80211_hdr *hdr)
+{
+       u8 *head = tx_context->data + offsetof(struct vnt_tx_buffer, fifo_head);
+       u8 *hdr_pos = (u8 *)hdr;
+
+       tx_context->hdr = hdr;
+       if (!tx_context->hdr)
+               return 0;
+
+       return (u16)(hdr_pos - head);
+}
+
+static u16 vnt_rxtx_datahead_g(struct vnt_usb_send_context *tx_context,
+               u8 pkt_type, u16 rate, struct vnt_tx_datahead_g *buf,
+               u32 frame_len, int need_ack)
 {
+
+       struct vnt_private *priv = tx_context->priv;
+       struct ieee80211_hdr *hdr =
+                               (struct ieee80211_hdr *)tx_context->skb->data;
+
        /* Get SignalField,ServiceField,Length */
-       BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->a);
-       BBvCalculateParameter(priv, frame_len, priv->byTopCCKBasicRate,
+       vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
+       vnt_get_phy_field(priv, frame_len, priv->byTopCCKBasicRate,
                                                        PK_TYPE_11B, &buf->b);
 
        /* Get Duration and TimeStamp */
-       buf->duration_a = s_uGetDataDuration(priv, pkt_type, need_ack);
-       buf->duration_b = s_uGetDataDuration(priv, PK_TYPE_11B, need_ack);
+       if (ieee80211_is_pspoll(hdr->frame_control)) {
+               __le16 dur = cpu_to_le16(priv->current_aid | BIT(14) | BIT(15));
+
+               buf->duration_a = dur;
+               buf->duration_b = dur;
+       } else {
+               buf->duration_a = s_uGetDataDuration(priv, pkt_type, need_ack);
+               buf->duration_b = s_uGetDataDuration(priv,
+                                                       PK_TYPE_11B, need_ack);
+       }
 
        buf->time_stamp_off_a = vnt_time_stamp_off(priv, rate);
        buf->time_stamp_off_b = vnt_time_stamp_off(priv,
                                        priv->byTopCCKBasicRate);
 
+       tx_context->tx_hdr_size = vnt_mac_hdr_pos(tx_context, &buf->hdr);
+
        return le16_to_cpu(buf->duration_a);
 }
 
-static u16 vnt_rxtx_datahead_g_fb(struct vnt_private *priv, u8 pkt_type,
-               u16 rate, struct vnt_tx_datahead_g_fb *buf,
+static u16 vnt_rxtx_datahead_g_fb(struct vnt_usb_send_context *tx_context,
+               u8 pkt_type, u16 rate, struct vnt_tx_datahead_g_fb *buf,
                u32 frame_len, int need_ack)
 {
+       struct vnt_private *priv = tx_context->priv;
+
        /* Get SignalField,ServiceField,Length */
-       BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->a);
+       vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
 
-       BBvCalculateParameter(priv, frame_len, priv->byTopCCKBasicRate,
+       vnt_get_phy_field(priv, frame_len, priv->byTopCCKBasicRate,
                                                PK_TYPE_11B, &buf->b);
 
        /* Get Duration and TimeStamp */
@@ -510,15 +355,19 @@ static u16 vnt_rxtx_datahead_g_fb(struct vnt_private *priv, u8 pkt_type,
        buf->time_stamp_off_b = vnt_time_stamp_off(priv,
                                                priv->byTopCCKBasicRate);
 
+       tx_context->tx_hdr_size = vnt_mac_hdr_pos(tx_context, &buf->hdr);
+
        return le16_to_cpu(buf->duration_a);
 }
 
-static u16 vnt_rxtx_datahead_a_fb(struct vnt_private *priv, u8 pkt_type,
-               u16 rate, struct vnt_tx_datahead_a_fb *buf,
+static u16 vnt_rxtx_datahead_a_fb(struct vnt_usb_send_context *tx_context,
+               u8 pkt_type, u16 rate, struct vnt_tx_datahead_a_fb *buf,
                u32 frame_len, int need_ack)
 {
+       struct vnt_private *priv = tx_context->priv;
+
        /* Get SignalField,ServiceField,Length */
-       BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->a);
+       vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->a);
        /* Get Duration and TimeStampOff */
        buf->duration = s_uGetDataDuration(priv, pkt_type, need_ack);
 
@@ -527,55 +376,65 @@ static u16 vnt_rxtx_datahead_a_fb(struct vnt_private *priv, u8 pkt_type,
 
        buf->time_stamp_off = vnt_time_stamp_off(priv, rate);
 
+       tx_context->tx_hdr_size = vnt_mac_hdr_pos(tx_context, &buf->hdr);
+
        return le16_to_cpu(buf->duration);
 }
 
-static u16 vnt_rxtx_datahead_ab(struct vnt_private *priv, u8 pkt_type,
-               u16 rate, struct vnt_tx_datahead_ab *buf,
+static u16 vnt_rxtx_datahead_ab(struct vnt_usb_send_context *tx_context,
+               u8 pkt_type, u16 rate, struct vnt_tx_datahead_ab *buf,
                u32 frame_len, int need_ack)
 {
+       struct vnt_private *priv = tx_context->priv;
+       struct ieee80211_hdr *hdr =
+                               (struct ieee80211_hdr *)tx_context->skb->data;
+
        /* Get SignalField,ServiceField,Length */
-       BBvCalculateParameter(priv, frame_len, rate, pkt_type, &buf->ab);
+       vnt_get_phy_field(priv, frame_len, rate, pkt_type, &buf->ab);
+
        /* Get Duration and TimeStampOff */
-       buf->duration = s_uGetDataDuration(priv, pkt_type, need_ack);
+       if (ieee80211_is_pspoll(hdr->frame_control)) {
+               __le16 dur = cpu_to_le16(priv->current_aid | BIT(14) | BIT(15));
+
+               buf->duration = dur;
+       } else {
+               buf->duration = s_uGetDataDuration(priv, pkt_type, need_ack);
+       }
 
        buf->time_stamp_off = vnt_time_stamp_off(priv, rate);
 
+       tx_context->tx_hdr_size = vnt_mac_hdr_pos(tx_context, &buf->hdr);
+
        return le16_to_cpu(buf->duration);
 }
 
-static int vnt_fill_ieee80211_rts(struct vnt_private *priv,
-       struct ieee80211_rts *rts, struct ethhdr *eth_hdr,
-               __le16 duration)
+static int vnt_fill_ieee80211_rts(struct vnt_usb_send_context *tx_context,
+       struct ieee80211_rts *rts, __le16 duration)
 {
+       struct ieee80211_hdr *hdr =
+                               (struct ieee80211_hdr *)tx_context->skb->data;
+
        rts->duration = duration;
        rts->frame_control =
                cpu_to_le16(IEEE80211_FTYPE_CTL | IEEE80211_STYPE_RTS);
 
-       if (priv->op_mode == NL80211_IFTYPE_ADHOC ||
-                               priv->op_mode == NL80211_IFTYPE_AP)
-               memcpy(rts->ra, eth_hdr->h_dest, ETH_ALEN);
-       else
-               memcpy(rts->ra, priv->abyBSSID, ETH_ALEN);
-
-       if (priv->op_mode == NL80211_IFTYPE_AP)
-               memcpy(rts->ta, priv->abyBSSID, ETH_ALEN);
-       else
-               memcpy(rts->ta, eth_hdr->h_source, ETH_ALEN);
+       memcpy(rts->ra, hdr->addr1, ETH_ALEN);
+       memcpy(rts->ta, hdr->addr2, ETH_ALEN);
 
        return 0;
 }
 
-static u16 vnt_rxtx_rts_g_head(struct vnt_private *priv,
+static u16 vnt_rxtx_rts_g_head(struct vnt_usb_send_context *tx_context,
        struct vnt_rts_g *buf, struct ethhdr *eth_hdr,
        u8 pkt_type, u32 frame_len, int need_ack,
        u16 current_rate, u8 fb_option)
 {
+       struct vnt_private *priv = tx_context->priv;
        u16 rts_frame_len = 20;
 
-       BBvCalculateParameter(priv, rts_frame_len, priv->byTopCCKBasicRate,
+       vnt_get_phy_field(priv, rts_frame_len, priv->byTopCCKBasicRate,
                PK_TYPE_11B, &buf->b);
-       BBvCalculateParameter(priv, rts_frame_len,
+       vnt_get_phy_field(priv, rts_frame_len,
                priv->byTopOFDMBasicRate, pkt_type, &buf->a);
 
        buf->duration_bb = s_uGetRTSCTSDuration(priv, RTSDUR_BB, frame_len,
@@ -585,22 +444,23 @@ static u16 vnt_rxtx_rts_g_head(struct vnt_private *priv,
        buf->duration_ba = s_uGetRTSCTSDuration(priv, RTSDUR_BA, frame_len,
                pkt_type, current_rate, need_ack, fb_option);
 
-       vnt_fill_ieee80211_rts(priv, &buf->data, eth_hdr, buf->duration_aa);
+       vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);
 
-       return vnt_rxtx_datahead_g(priv, pkt_type, current_rate,
+       return vnt_rxtx_datahead_g(tx_context, pkt_type, current_rate,
                        &buf->data_head, frame_len, need_ack);
 }
 
-static u16 vnt_rxtx_rts_g_fb_head(struct vnt_private *priv,
+static u16 vnt_rxtx_rts_g_fb_head(struct vnt_usb_send_context *tx_context,
        struct vnt_rts_g_fb *buf, struct ethhdr *eth_hdr,
        u8 pkt_type, u32 frame_len, int need_ack,
        u16 current_rate, u8 fb_option)
 {
+       struct vnt_private *priv = tx_context->priv;
        u16 rts_frame_len = 20;
 
-       BBvCalculateParameter(priv, rts_frame_len, priv->byTopCCKBasicRate,
+       vnt_get_phy_field(priv, rts_frame_len, priv->byTopCCKBasicRate,
                PK_TYPE_11B, &buf->b);
-       BBvCalculateParameter(priv, rts_frame_len,
+       vnt_get_phy_field(priv, rts_frame_len,
                priv->byTopOFDMBasicRate, pkt_type, &buf->a);
 
 
@@ -621,39 +481,41 @@ static u16 vnt_rxtx_rts_g_fb_head(struct vnt_private *priv,
        buf->rts_duration_aa_f1 = s_uGetRTSCTSDuration(priv, RTSDUR_AA_F1,
                frame_len, pkt_type, priv->tx_rate_fb1, need_ack, fb_option);
 
-       vnt_fill_ieee80211_rts(priv, &buf->data, eth_hdr, buf->duration_aa);
+       vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration_aa);
 
-       return vnt_rxtx_datahead_g_fb(priv, pkt_type, current_rate,
+       return vnt_rxtx_datahead_g_fb(tx_context, pkt_type, current_rate,
                        &buf->data_head, frame_len, need_ack);
 }
 
-static u16 vnt_rxtx_rts_ab_head(struct vnt_private *priv,
+static u16 vnt_rxtx_rts_ab_head(struct vnt_usb_send_context *tx_context,
        struct vnt_rts_ab *buf, struct ethhdr *eth_hdr,
        u8 pkt_type, u32 frame_len, int need_ack,
        u16 current_rate, u8 fb_option)
 {
+       struct vnt_private *priv = tx_context->priv;
        u16 rts_frame_len = 20;
 
-       BBvCalculateParameter(priv, rts_frame_len,
+       vnt_get_phy_field(priv, rts_frame_len,
                priv->byTopOFDMBasicRate, pkt_type, &buf->ab);
 
        buf->duration = s_uGetRTSCTSDuration(priv, RTSDUR_AA, frame_len,
                pkt_type, current_rate, need_ack, fb_option);
 
-       vnt_fill_ieee80211_rts(priv, &buf->data, eth_hdr, buf->duration);
+       vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);
 
-       return vnt_rxtx_datahead_ab(priv, pkt_type, current_rate,
+       return vnt_rxtx_datahead_ab(tx_context, pkt_type, current_rate,
                        &buf->data_head, frame_len, need_ack);
 }
 
-static u16 vnt_rxtx_rts_a_fb_head(struct vnt_private *priv,
+static u16 vnt_rxtx_rts_a_fb_head(struct vnt_usb_send_context *tx_context,
        struct vnt_rts_a_fb *buf, struct ethhdr *eth_hdr,
        u8 pkt_type, u32 frame_len, int need_ack,
        u16 current_rate, u8 fb_option)
 {
+       struct vnt_private *priv = tx_context->priv;
        u16 rts_frame_len = 20;
 
-       BBvCalculateParameter(priv, rts_frame_len,
+       vnt_get_phy_field(priv, rts_frame_len,
                priv->byTopOFDMBasicRate, pkt_type, &buf->a);
 
        buf->duration = s_uGetRTSCTSDuration(priv, RTSDUR_AA, frame_len,
@@ -665,13 +527,13 @@ static u16 vnt_rxtx_rts_a_fb_head(struct vnt_private *priv,
        buf->rts_duration_f1 = s_uGetRTSCTSDuration(priv, RTSDUR_AA_F1,
                frame_len, pkt_type, priv->tx_rate_fb1, need_ack, fb_option);
 
-       vnt_fill_ieee80211_rts(priv, &buf->data, eth_hdr, buf->duration);
+       vnt_fill_ieee80211_rts(tx_context, &buf->data, buf->duration);
 
-       return vnt_rxtx_datahead_a_fb(priv, pkt_type, current_rate,
+       return vnt_rxtx_datahead_a_fb(tx_context, pkt_type, current_rate,
                        &buf->data_head, frame_len, need_ack);
 }
 
-static u16 s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
+static u16 s_vFillRTSHead(struct vnt_usb_send_context *tx_context, u8 byPktType,
        union vnt_tx_data_head *head, u32 cbFrameLength, int bNeedAck,
        struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption)
 {
@@ -688,23 +550,25 @@ static u16 s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
        case PK_TYPE_11GB:
        case PK_TYPE_11GA:
                if (byFBOption == AUTO_FB_NONE)
-                       return vnt_rxtx_rts_g_head(pDevice, &head->rts_g,
+                       return vnt_rxtx_rts_g_head(tx_context, &head->rts_g,
                                psEthHeader, byPktType, cbFrameLength,
                                bNeedAck, wCurrentRate, byFBOption);
                else
-                       return vnt_rxtx_rts_g_fb_head(pDevice, &head->rts_g_fb,
-                               psEthHeader, byPktType, cbFrameLength,
-                               bNeedAck, wCurrentRate, byFBOption);
+                       return vnt_rxtx_rts_g_fb_head(tx_context,
+                               &head->rts_g_fb, psEthHeader, byPktType,
+                               cbFrameLength, bNeedAck, wCurrentRate,
+                               byFBOption);
                break;
        case PK_TYPE_11A:
                if (byFBOption) {
-                       return vnt_rxtx_rts_a_fb_head(pDevice, &head->rts_a_fb,
-                               psEthHeader, byPktType, cbFrameLength,
-                               bNeedAck, wCurrentRate, byFBOption);
+                       return vnt_rxtx_rts_a_fb_head(tx_context,
+                               &head->rts_a_fb, psEthHeader, byPktType,
+                               cbFrameLength, bNeedAck, wCurrentRate,
+                               byFBOption);
                        break;
                }
        case PK_TYPE_11B:
-               return vnt_rxtx_rts_ab_head(pDevice, &head->rts_ab,
+               return vnt_rxtx_rts_ab_head(tx_context, &head->rts_ab,
                        psEthHeader, byPktType, cbFrameLength,
                        bNeedAck, wCurrentRate, byFBOption);
        }
@@ -712,10 +576,11 @@ static u16 s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
        return 0;
 }
 
-static u16 s_vFillCTSHead(struct vnt_private *pDevice,
+static u16 s_vFillCTSHead(struct vnt_usb_send_context *tx_context,
        u8 byPktType, union vnt_tx_data_head *head, u32 cbFrameLength,
        int bNeedAck, u16 wCurrentRate, u8 byFBOption)
 {
+       struct vnt_private *pDevice = tx_context->priv;
        u32 uCTSFrameLen = 14;
 
        if (!head)
@@ -725,7 +590,7 @@ static u16 s_vFillCTSHead(struct vnt_private *pDevice,
                /* Auto Fall back */
                struct vnt_cts_fb *pBuf = &head->cts_g_fb;
                /* Get SignalField,ServiceField,Length */
-               BBvCalculateParameter(pDevice, uCTSFrameLen,
+               vnt_get_phy_field(pDevice, uCTSFrameLen,
                        pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
                pBuf->duration_ba = s_uGetRTSCTSDuration(pDevice, CTSDUR_BA,
                        cbFrameLength, byPktType,
@@ -745,12 +610,13 @@ static u16 s_vFillCTSHead(struct vnt_private *pDevice,
 
                memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
 
-               return vnt_rxtx_datahead_g_fb(pDevice, byPktType, wCurrentRate,
-                               &pBuf->data_head, cbFrameLength, bNeedAck);
+               return vnt_rxtx_datahead_g_fb(tx_context, byPktType,
+                               wCurrentRate, &pBuf->data_head, cbFrameLength,
+                               bNeedAck);
        } else {
                struct vnt_cts *pBuf = &head->cts_g;
                /* Get SignalField,ServiceField,Length */
-               BBvCalculateParameter(pDevice, uCTSFrameLen,
+               vnt_get_phy_field(pDevice, uCTSFrameLen,
                        pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
                /* Get CTSDuration_ba */
                pBuf->duration_ba = s_uGetRTSCTSDuration(pDevice,
@@ -763,7 +629,7 @@ static u16 s_vFillCTSHead(struct vnt_private *pDevice,
 
                memcpy(pBuf->data.ra, pDevice->abyCurrentNetAddr, ETH_ALEN);
 
-               return vnt_rxtx_datahead_g(pDevice, byPktType, wCurrentRate,
+               return vnt_rxtx_datahead_g(tx_context, byPktType, wCurrentRate,
                                &pBuf->data_head, cbFrameLength, bNeedAck);
         }
 
@@ -792,11 +658,12 @@ static u16 s_vFillCTSHead(struct vnt_private *pDevice,
  *
 -*/
 
-static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
+static u16 s_vGenerateTxParameter(struct vnt_usb_send_context *tx_context,
        u8 byPktType, u16 wCurrentRate, struct vnt_tx_buffer *tx_buffer,
        struct vnt_mic_hdr **mic_hdr, u32 need_mic, u32 cbFrameSize,
        int bNeedACK, struct ethhdr *psEthHeader, bool need_rts)
 {
+       struct vnt_private *pDevice = tx_context->priv;
        struct vnt_tx_fifo_head *pFifoHead = &tx_buffer->fifo_head;
        union vnt_tx_data_head *head = NULL;
        u16 wFifoCtl;
@@ -837,7 +704,7 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
                        }
 
                        /* Fill RTS */
-                       return s_vFillRTSHead(pDevice, byPktType, head,
+                       return s_vFillRTSHead(tx_context, byPktType, head,
                                        cbFrameSize, bNeedACK, psEthHeader,
                                                wCurrentRate, byFBOption);
 
@@ -863,7 +730,7 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
                        }
 
                        /* Fill CTS */
-                       return s_vFillCTSHead(pDevice, byPktType,
+                       return s_vFillCTSHead(tx_context, byPktType,
                                head, cbFrameSize, bNeedACK, wCurrentRate,
                                        byFBOption);
                }
@@ -886,7 +753,7 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
                                byPktType, cbFrameSize, wCurrentRate, bNeedACK);
 
                        /* Fill RTS */
-                       return s_vFillRTSHead(pDevice, byPktType, head,
+                       return s_vFillRTSHead(tx_context, byPktType, head,
                                cbFrameSize, bNeedACK, psEthHeader,
                                        wCurrentRate, byFBOption);
                } else {
@@ -897,7 +764,7 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
                                PK_TYPE_11A, cbFrameSize,
                                        wCurrentRate, bNeedACK);
 
-                       return vnt_rxtx_datahead_a_fb(pDevice, byPktType,
+                       return vnt_rxtx_datahead_a_fb(tx_context, byPktType,
                                wCurrentRate, &head->data_head_a_fb,
                                                cbFrameSize, bNeedACK);
                }
@@ -921,7 +788,7 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
                                                                bNeedACK);
 
                        /* Fill RTS */
-                       return s_vFillRTSHead(pDevice, byPktType, head,
+                       return s_vFillRTSHead(tx_context, byPktType, head,
                                cbFrameSize,
                        bNeedACK, psEthHeader, wCurrentRate, byFBOption);
                } else {
@@ -932,7 +799,7 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
                                PK_TYPE_11B, cbFrameSize,
                                        wCurrentRate, bNeedACK);
 
-                       return vnt_rxtx_datahead_ab(pDevice, byPktType,
+                       return vnt_rxtx_datahead_ab(tx_context, byPktType,
                                wCurrentRate, &head->data_head_ab,
                                        cbFrameSize, bNeedACK);
                }
@@ -940,1135 +807,396 @@ static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
 
        return 0;
 }
-/*
-    u8 * pbyBuffer,//point to pTxBufHead
-    u16  wFragType,//00:Non-Frag, 01:Start, 02:Mid, 03:Last
-    unsigned int  cbFragmentSize,//Hdr+payoad+FCS
-*/
 
-static int s_bPacketToWirelessUsb(struct vnt_private *pDevice, u8 byPktType,
-       struct vnt_tx_buffer *tx_buffer, int bNeedEncryption,
-       u32 uSkbPacketLen, struct ethhdr *psEthHeader,
-       u8 *pPacket, PSKeyItem pTransmitKey, u32 uNodeIndex, u16 wCurrentRate,
-       u32 *pcbHeaderLen, u32 *pcbTotalLen)
+static void vnt_fill_txkey(struct vnt_usb_send_context *tx_context,
+       u8 *key_buffer, struct ieee80211_key_conf *tx_key, struct sk_buff *skb,
+       u16 payload_len, struct vnt_mic_hdr *mic_hdr)
 {
-       struct vnt_tx_fifo_head *pTxBufHead = &tx_buffer->fifo_head;
-       u32 cbFrameSize, cbFrameBodySize;
-       u32 cb802_1_H_len;
-       u32 cbIVlen = 0, cbICVlen = 0, cbMIClen = 0, cbMACHdLen = 0;
-       u32 cbFCSlen = 4, cbMICHDR = 0;
-       int bNeedACK;
-       bool bRTS = false;
-       u8 *pbyType, *pbyMacHdr, *pbyIVHead, *pbyPayloadHead, *pbyTxBufferAddr;
-       u8 abySNAP_RFC1042[ETH_ALEN] = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0x00};
-       u8 abySNAP_Bridgetunnel[ETH_ALEN]
-               = {0xAA, 0xAA, 0x03, 0x00, 0x00, 0xF8};
-       u32 uDuration;
-       u32 cbHeaderLength = 0, uPadding = 0;
-       struct vnt_mic_hdr *pMICHDR;
-       u8 byFBOption = AUTO_FB_NONE, byFragType;
-       u16 wTxBufSize;
-       u32 dwMICKey0, dwMICKey1, dwMIC_Priority;
-       u32 *pdwMIC_L, *pdwMIC_R;
-       int bSoftWEP = false;
-
-       pMICHDR = NULL;
-
-       if (bNeedEncryption && pTransmitKey->pvKeyTable) {
-               if (((PSKeyTable)pTransmitKey->pvKeyTable)->bSoftWEP == true)
-                       bSoftWEP = true; /* WEP 256 */
-       }
+       struct ieee80211_hdr *hdr = tx_context->hdr;
+       struct ieee80211_key_seq seq;
+       u8 *iv = ((u8 *)hdr + ieee80211_get_hdrlen_from_skb(skb));
+
+       /* strip header and icv len from payload */
+       payload_len -= ieee80211_get_hdrlen_from_skb(skb);
+       payload_len -= tx_key->icv_len;
+
+       switch (tx_key->cipher) {
+       case WLAN_CIPHER_SUITE_WEP40:
+       case WLAN_CIPHER_SUITE_WEP104:
+               memcpy(key_buffer, iv, 3);
+               memcpy(key_buffer + 3, tx_key->key, tx_key->keylen);
+
+               if (tx_key->keylen == WLAN_KEY_LEN_WEP40) {
+                       memcpy(key_buffer + 8, iv, 3);
+                       memcpy(key_buffer + 11,
+                                       tx_key->key, WLAN_KEY_LEN_WEP40);
+               }
 
-       /* Get pkt type */
-       if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN)
-               cb802_1_H_len = 8;
-       else
-               cb802_1_H_len = 0;
+               break;
+       case WLAN_CIPHER_SUITE_TKIP:
+               ieee80211_get_tkip_p2k(tx_key, skb, key_buffer);
 
-    cbFrameBodySize = uSkbPacketLen - ETH_HLEN + cb802_1_H_len;
+               break;
+       case WLAN_CIPHER_SUITE_CCMP:
 
-    //Set packet type
-    pTxBufHead->wFIFOCtl |= (u16)(byPktType<<8);
+               if (!mic_hdr)
+                       return;
 
-       if (pDevice->op_mode == NL80211_IFTYPE_ADHOC ||
-                       pDevice->op_mode == NL80211_IFTYPE_AP) {
-               if (is_multicast_ether_addr(psEthHeader->h_dest)) {
-                       bNeedACK = false;
-                       pTxBufHead->wFIFOCtl =
-                               pTxBufHead->wFIFOCtl & (~FIFOCTL_NEEDACK);
-               } else {
-                       bNeedACK = true;
-                       pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
-               }
-       } else {
-               /* MSDUs in Infra mode always need ACK */
-               bNeedACK = true;
-               pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
-       }
+               mic_hdr->id = 0x59;
+               mic_hdr->payload_len = cpu_to_be16(payload_len);
+               memcpy(mic_hdr->mic_addr2, hdr->addr2, ETH_ALEN);
+
+               ieee80211_get_key_tx_seq(tx_key, &seq);
 
-    pTxBufHead->time_stamp = cpu_to_le16(DEFAULT_MSDU_LIFETIME_RES_64us);
+               memcpy(mic_hdr->ccmp_pn, seq.ccmp.pn, IEEE80211_CCMP_PN_LEN);
 
-    //Set FRAGCTL_MACHDCNT
-       cbMACHdLen = WLAN_HDR_ADDR3_LEN;
+               if (ieee80211_has_a4(hdr->frame_control))
+                       mic_hdr->hlen = cpu_to_be16(28);
+               else
+                       mic_hdr->hlen = cpu_to_be16(22);
 
-    pTxBufHead->wFragCtl |= (u16)(cbMACHdLen << 10);
+               memcpy(mic_hdr->addr1, hdr->addr1, ETH_ALEN);
+               memcpy(mic_hdr->addr2, hdr->addr2, ETH_ALEN);
+               memcpy(mic_hdr->addr3, hdr->addr3, ETH_ALEN);
 
-    //Set FIFOCTL_GrpAckPolicy
-    if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
-        pTxBufHead->wFIFOCtl |=        FIFOCTL_GRPACK;
-    }
+               mic_hdr->frame_control = cpu_to_le16(
+                       le16_to_cpu(hdr->frame_control) & 0xc78f);
+               mic_hdr->seq_ctrl = cpu_to_le16(
+                               le16_to_cpu(hdr->seq_ctrl) & 0xf);
 
-       /* Set Auto Fallback Ctl */
-       if (wCurrentRate >= RATE_18M) {
-               if (pDevice->byAutoFBCtrl == AUTO_FB_0) {
-                       pTxBufHead->wFIFOCtl |= FIFOCTL_AUTO_FB_0;
+               if (ieee80211_has_a4(hdr->frame_control))
+                       memcpy(mic_hdr->addr4, hdr->addr4, ETH_ALEN);
 
-                       pDevice->tx_rate_fb0 =
-                               wFB_Opt0[FB_RATE0][wCurrentRate - RATE_18M];
-                       pDevice->tx_rate_fb1 =
-                               wFB_Opt0[FB_RATE1][wCurrentRate - RATE_18M];
 
-                       byFBOption = AUTO_FB_0;
-               } else if (pDevice->byAutoFBCtrl == AUTO_FB_1) {
-                       pTxBufHead->wFIFOCtl |= FIFOCTL_AUTO_FB_1;
-                       pDevice->tx_rate_fb0 =
-                               wFB_Opt1[FB_RATE0][wCurrentRate - RATE_18M];
-                       pDevice->tx_rate_fb1 =
-                               wFB_Opt1[FB_RATE1][wCurrentRate - RATE_18M];
+               memcpy(key_buffer, tx_key->key, WLAN_KEY_LEN_CCMP);
 
-                       byFBOption = AUTO_FB_1;
-               }
+               break;
+       default:
+               break;
        }
 
-    if (bSoftWEP != true) {
-        if ((bNeedEncryption) && (pTransmitKey != NULL))  { //WEP enabled
-            if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) { //WEP40 or WEP104
-                pTxBufHead->wFragCtl |= FRAGCTL_LEGACY;
-            }
-            if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Tx Set wFragCtl == FRAGCTL_TKIP\n");
-                pTxBufHead->wFragCtl |= FRAGCTL_TKIP;
-            }
-            else if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) { //CCMP
-                pTxBufHead->wFragCtl |= FRAGCTL_AES;
-            }
-        }
-    }
+}
 
-    if ((bNeedEncryption) && (pTransmitKey != NULL))  {
-        if (pTransmitKey->byCipherSuite == KEY_CTL_WEP) {
-            cbIVlen = 4;
-            cbICVlen = 4;
-        }
-        else if (pTransmitKey->byCipherSuite == KEY_CTL_TKIP) {
-            cbIVlen = 8;//IV+ExtIV
-            cbMIClen = 8;
-            cbICVlen = 4;
-        }
-        if (pTransmitKey->byCipherSuite == KEY_CTL_CCMP) {
-            cbIVlen = 8;//RSN Header
-            cbICVlen = 8;//MIC
-           cbMICHDR = sizeof(struct vnt_mic_hdr);
-        }
-        if (bSoftWEP == false) {
-            //MAC Header should be padding 0 to DW alignment.
-            uPadding = 4 - (cbMACHdLen%4);
-            uPadding %= 4;
-        }
-    }
-
-    cbFrameSize = cbMACHdLen + cbIVlen + (cbFrameBodySize + cbMIClen) + cbICVlen + cbFCSlen;
-
-    if ( (bNeedACK == false) ||(cbFrameSize < pDevice->wRTSThreshold) ) {
-        bRTS = false;
-    } else {
-        bRTS = true;
-        pTxBufHead->wFIFOCtl |= (FIFOCTL_RTS | FIFOCTL_LRETRY);
-    }
-
-    pbyTxBufferAddr = (u8 *) &(pTxBufHead->adwTxKey[0]);
-       wTxBufSize = sizeof(struct vnt_tx_fifo_head);
-
-    if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
-        if (byFBOption == AUTO_FB_NONE) {
-            if (bRTS == true) {//RTS_need
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
-                       cbMICHDR + sizeof(struct vnt_rts_g);
-            }
-            else { //RTS_needless
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
-                       cbMICHDR + sizeof(struct vnt_cts);
-            }
-        } else {
-            // Auto Fall Back
-            if (bRTS == true) {//RTS_need
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_rts) +
-                       cbMICHDR + sizeof(struct vnt_rts_g_fb);
-            }
-            else if (bRTS == false) { //RTS_needless
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
-                               cbMICHDR + sizeof(struct vnt_cts_fb);
-            }
-        } // Auto Fall Back
-    }
-    else {//802.11a/b packet
-        if (byFBOption == AUTO_FB_NONE) {
-            if (bRTS == true) {//RTS_need
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
-                       cbMICHDR + sizeof(struct vnt_rts_ab);
-            }
-            else if (bRTS == false) { //RTS_needless, no MICHDR
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
-                               cbMICHDR + sizeof(struct vnt_tx_datahead_ab);
-            }
-        } else {
-            // Auto Fall Back
-            if (bRTS == true) {//RTS_need
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
-                       cbMICHDR + sizeof(struct vnt_rts_a_fb);
-            }
-            else if (bRTS == false) { //RTS_needless
-               cbHeaderLength = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
-                       cbMICHDR + sizeof(struct vnt_tx_datahead_a_fb);
-            }
-        } // Auto Fall Back
-    }
-
-    pbyMacHdr = (u8 *)(pbyTxBufferAddr + cbHeaderLength);
-    pbyIVHead = (u8 *)(pbyMacHdr + cbMACHdLen + uPadding);
-    pbyPayloadHead = (u8 *)(pbyMacHdr + cbMACHdLen + uPadding + cbIVlen);
-
-    //=========================
-    //    No Fragmentation
-    //=========================
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Fragmentation...\n");
-    byFragType = FRAGCTL_NONFRAG;
-    //pTxBufHead = (PSTxBufHead) &(pTxBufHead->adwTxKey[0]);
-
-       /* Fill FIFO, RrvTime, RTS and CTS */
-       uDuration = s_vGenerateTxParameter(pDevice, byPktType, wCurrentRate,
-                       tx_buffer, &pMICHDR, cbMICHDR,
-                       cbFrameSize, bNeedACK, psEthHeader, bRTS);
-
-    // Generate TX MAC Header
-    s_vGenerateMACHeader(pDevice, pbyMacHdr, (u16)uDuration, psEthHeader, bNeedEncryption,
-               byFragType, 0);
-
-    if (bNeedEncryption == true) {
-        //Fill TXKEY
-       s_vFillTxKey(pDevice, pTxBufHead, pbyIVHead, pTransmitKey,
-               pbyMacHdr, (u16)cbFrameBodySize, pMICHDR);
-    }
-
-       /* 802.1H */
-       if (ntohs(psEthHeader->h_proto) > ETH_DATA_LEN) {
-               if ((psEthHeader->h_proto == cpu_to_be16(ETH_P_IPX)) ||
-                       (psEthHeader->h_proto == cpu_to_le16(0xF380)))
-                       memcpy((u8 *) (pbyPayloadHead),
-                                       abySNAP_Bridgetunnel, 6);
-               else
-                       memcpy((u8 *) (pbyPayloadHead), &abySNAP_RFC1042[0], 6);
+int vnt_tx_packet(struct vnt_private *priv, struct sk_buff *skb)
+{
+       struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
+       struct ieee80211_tx_rate *tx_rate = &info->control.rates[0];
+       struct ieee80211_rate *rate;
+       struct ieee80211_key_conf *tx_key;
+       struct ieee80211_hdr *hdr;
+       struct vnt_mic_hdr *mic_hdr = NULL;
+       struct vnt_tx_buffer *tx_buffer;
+       struct vnt_tx_fifo_head *tx_buffer_head;
+       struct vnt_usb_send_context *tx_context;
+       unsigned long flags;
+       u32 frame_size = 0;
+       u16 tx_bytes, tx_header_size, tx_body_size, current_rate, duration_id;
+       u8 pkt_type, fb_option = AUTO_FB_NONE;
+       bool need_rts = false, need_ack = false, is_pspoll = false;
+       bool need_mic = false;
+
+       hdr = (struct ieee80211_hdr *)(skb->data);
 
-               pbyType = (u8 *) (pbyPayloadHead + 6);
+       rate = ieee80211_get_tx_rate(priv->hw, info);
 
-               memcpy(pbyType, &(psEthHeader->h_proto), sizeof(u16));
+       current_rate = rate->hw_value;
+       if (priv->wCurrentRate != current_rate) {
+               priv->wCurrentRate = current_rate;
+               bScheduleCommand(priv, WLAN_CMD_SETPOWER, NULL);
        }
 
-    if (pPacket != NULL) {
-        // Copy the Packet into a tx Buffer
-        memcpy((pbyPayloadHead + cb802_1_H_len),
-                 (pPacket + ETH_HLEN),
-                 uSkbPacketLen - ETH_HLEN
-                 );
+       if (current_rate > RATE_11M)
+               pkt_type = priv->byPacketType;
+       else
+               pkt_type = PK_TYPE_11B;
 
-    } else {
-        // while bRelayPacketSend psEthHeader is point to header+payload
-        memcpy((pbyPayloadHead + cb802_1_H_len), ((u8 *)psEthHeader) + ETH_HLEN, uSkbPacketLen - ETH_HLEN);
-    }
+       spin_lock_irqsave(&priv->lock, flags);
 
-    if ((bNeedEncryption == true) && (pTransmitKey != NULL) && (pTransmitKey->byCipherSuite == KEY_CTL_TKIP)) {
+       tx_context = s_vGetFreeContext(priv);
+       if (!tx_context) {
+               dev_dbg(&priv->usb->dev, "%s No free context\n", __func__);
+               spin_unlock_irqrestore(&priv->lock, flags);
+               return -ENOMEM;
+       }
 
-        ///////////////////////////////////////////////////////////////////
+       tx_context->skb = skb;
 
-       if (pDevice->vnt_mgmt.eAuthenMode == WMAC_AUTH_WPANONE) {
-               dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[16]);
-               dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[20]);
-       }
-        else if ((pTransmitKey->dwKeyIndex & AUTHENTICATOR_KEY) != 0) {
-            dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[16]);
-            dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[20]);
-        }
-        else {
-            dwMICKey0 = *(u32 *)(&pTransmitKey->abyKey[24]);
-            dwMICKey1 = *(u32 *)(&pTransmitKey->abyKey[28]);
-        }
-        // DO Software Michael
-        MIC_vInit(dwMICKey0, dwMICKey1);
-        MIC_vAppend((u8 *)&(psEthHeader->h_dest[0]), 12);
-        dwMIC_Priority = 0;
-        MIC_vAppend((u8 *)&dwMIC_Priority, 4);
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC KEY: %X, %X\n",
-               dwMICKey0, dwMICKey1);
-
-        ///////////////////////////////////////////////////////////////////
-
-        //DBG_PRN_GRP12(("Length:%d, %d\n", cbFrameBodySize, uFromHDtoPLDLength));
-        //for (ii = 0; ii < cbFrameBodySize; ii++) {
-        //    DBG_PRN_GRP12(("%02x ", *((u8 *)((pbyPayloadHead + cb802_1_H_len) + ii))));
-        //}
-        //DBG_PRN_GRP12(("\n\n\n"));
-
-        MIC_vAppend(pbyPayloadHead, cbFrameBodySize);
-
-        pdwMIC_L = (u32 *)(pbyPayloadHead + cbFrameBodySize);
-        pdwMIC_R = (u32 *)(pbyPayloadHead + cbFrameBodySize + 4);
-
-        MIC_vGetMIC(pdwMIC_L, pdwMIC_R);
-        MIC_vUnInit();
-
-        if (pDevice->bTxMICFail == true) {
-            *pdwMIC_L = 0;
-            *pdwMIC_R = 0;
-            pDevice->bTxMICFail = false;
-        }
-        //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"uLength: %d, %d\n", uLength, cbFrameBodySize);
-        //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"cbReqCount:%d, %d, %d, %d\n", cbReqCount, cbHeaderLength, uPadding, cbIVlen);
-        //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"MIC:%lX, %lX\n", *pdwMIC_L, *pdwMIC_R);
-    }
+       spin_unlock_irqrestore(&priv->lock, flags);
 
-    if (bSoftWEP == true) {
+       tx_buffer = (struct vnt_tx_buffer *)tx_context->data;
+       tx_buffer_head = &tx_buffer->fifo_head;
+       tx_body_size = skb->len;
 
-        s_vSWencryption(pDevice, pTransmitKey, (pbyPayloadHead), (u16)(cbFrameBodySize + cbMIClen));
+       frame_size = tx_body_size + 4;
 
-    } else if (  ((pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) && (bNeedEncryption == true))  ||
-          ((pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) && (bNeedEncryption == true))   ||
-          ((pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) && (bNeedEncryption == true))      ) {
-        cbFrameSize -= cbICVlen;
-    }
+       /*Set fifo controls */
+       if (pkt_type == PK_TYPE_11A)
+               tx_buffer_head->wFIFOCtl = 0;
+       else if (pkt_type == PK_TYPE_11B)
+               tx_buffer_head->wFIFOCtl = FIFOCTL_11B;
+       else if (pkt_type == PK_TYPE_11GB)
+               tx_buffer_head->wFIFOCtl = FIFOCTL_11GB;
+       else if (pkt_type == PK_TYPE_11GA)
+               tx_buffer_head->wFIFOCtl = FIFOCTL_11GA;
 
-        cbFrameSize -= cbFCSlen;
+       if (!ieee80211_is_data(hdr->frame_control)) {
+               tx_buffer_head->wFIFOCtl |= (FIFOCTL_GENINT |
+                       FIFOCTL_ISDMA0);
+               tx_buffer_head->wFIFOCtl |= FIFOCTL_TMOEN;
 
-    *pcbHeaderLen = cbHeaderLength;
-    *pcbTotalLen = cbHeaderLength + cbFrameSize ;
+               tx_buffer_head->time_stamp =
+                       cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us);
+       } else {
+               tx_buffer_head->time_stamp =
+                       cpu_to_le16(DEFAULT_MSDU_LIFETIME_RES_64us);
+       }
 
-    //Set FragCtl in TxBufferHead
-    pTxBufHead->wFragCtl |= (u16)byFragType;
+       if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) {
+               tx_buffer_head->wFIFOCtl |= FIFOCTL_NEEDACK;
+               need_ack = true;
+       }
 
-    return true;
+       if (ieee80211_has_retry(hdr->frame_control))
+               tx_buffer_head->wFIFOCtl |= FIFOCTL_LRETRY;
 
-}
+       if (tx_rate->flags & IEEE80211_TX_RC_USE_SHORT_PREAMBLE)
+               priv->byPreambleType = PREAMBLE_SHORT;
+       else
+               priv->byPreambleType = PREAMBLE_LONG;
 
-/*+
- *
- * Description:
- *      Translate 802.3 to 802.11 header
- *
- * Parameters:
- *  In:
- *      pDevice         - Pointer to adapter
- *      dwTxBufferAddr  - Transmit Buffer
- *      pPacket         - Packet from upper layer
- *      cbPacketSize    - Transmit Data Length
- *  Out:
- *      pcbHeadSize         - Header size of MAC&Baseband control and 802.11 Header
- *      pcbAppendPayload    - size of append payload for 802.1H translation
- *
- * Return Value: none
- *
--*/
+       if (tx_rate->flags & IEEE80211_TX_RC_USE_RTS_CTS) {
+               need_rts = true;
+               tx_buffer_head->wFIFOCtl |= FIFOCTL_RTS;
+       }
 
-static void s_vGenerateMACHeader(struct vnt_private *pDevice,
-       u8 *pbyBufferAddr, u16 wDuration, struct ethhdr *psEthHeader,
-       int bNeedEncrypt, u16 wFragType, u32 uFragIdx)
-{
-       struct ieee80211_hdr *pMACHeader = (struct ieee80211_hdr *)pbyBufferAddr;
-
-       pMACHeader->frame_control = TYPE_802_11_DATA;
-
-    if (pDevice->op_mode == NL80211_IFTYPE_AP) {
-       memcpy(&(pMACHeader->addr1[0]),
-              &(psEthHeader->h_dest[0]),
-              ETH_ALEN);
-       memcpy(&(pMACHeader->addr2[0]), &(pDevice->abyBSSID[0]), ETH_ALEN);
-       memcpy(&(pMACHeader->addr3[0]),
-              &(psEthHeader->h_source[0]),
-              ETH_ALEN);
-        pMACHeader->frame_control |= FC_FROMDS;
-    } else {
-       if (pDevice->op_mode == NL80211_IFTYPE_ADHOC) {
-               memcpy(&(pMACHeader->addr1[0]),
-                      &(psEthHeader->h_dest[0]),
-                      ETH_ALEN);
-               memcpy(&(pMACHeader->addr2[0]),
-                      &(psEthHeader->h_source[0]),
-                      ETH_ALEN);
-               memcpy(&(pMACHeader->addr3[0]),
-                      &(pDevice->abyBSSID[0]),
-                      ETH_ALEN);
-       } else {
-               memcpy(&(pMACHeader->addr3[0]),
-                      &(psEthHeader->h_dest[0]),
-                      ETH_ALEN);
-               memcpy(&(pMACHeader->addr2[0]),
-                      &(psEthHeader->h_source[0]),
-                      ETH_ALEN);
-               memcpy(&(pMACHeader->addr1[0]),
-                      &(pDevice->abyBSSID[0]),
-                      ETH_ALEN);
-            pMACHeader->frame_control |= FC_TODS;
-        }
-    }
+       if (ieee80211_has_a4(hdr->frame_control))
+               tx_buffer_head->wFIFOCtl |= FIFOCTL_LHEAD;
 
-    if (bNeedEncrypt)
-        pMACHeader->frame_control |= cpu_to_le16((u16)WLAN_SET_FC_ISWEP(1));
+       if (info->flags & IEEE80211_TX_CTL_NO_PS_BUFFER)
+               is_pspoll = true;
 
-    pMACHeader->duration_id = cpu_to_le16(wDuration);
+       tx_buffer_head->frag_ctl =
+                       cpu_to_le16(ieee80211_get_hdrlen_from_skb(skb) << 10);
 
-    pMACHeader->seq_ctrl = cpu_to_le16(pDevice->wSeqCounter << 4);
+       if (info->control.hw_key) {
+               tx_key = info->control.hw_key;
+               switch (info->control.hw_key->cipher) {
+               case WLAN_CIPHER_SUITE_WEP40:
+               case WLAN_CIPHER_SUITE_WEP104:
+                       tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_LEGACY);
+                       break;
+               case WLAN_CIPHER_SUITE_TKIP:
+                       tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_TKIP);
+                       break;
+               case WLAN_CIPHER_SUITE_CCMP:
+                       tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_AES);
+                       need_mic = true;
+               default:
+                       break;
+               }
+               frame_size += tx_key->icv_len;
+       }
 
-    //Set FragNumber in Sequence Control
-    pMACHeader->seq_ctrl |= cpu_to_le16((u16)uFragIdx);
+       /* legacy rates TODO use ieee80211_tx_rate */
+       if (current_rate >= RATE_18M && ieee80211_is_data(hdr->frame_control)) {
+               if (priv->byAutoFBCtrl == AUTO_FB_0) {
+                       tx_buffer_head->wFIFOCtl |= FIFOCTL_AUTO_FB_0;
 
-    if ((wFragType == FRAGCTL_ENDFRAG) || (wFragType == FRAGCTL_NONFRAG)) {
-        pDevice->wSeqCounter++;
-        if (pDevice->wSeqCounter > 0x0fff)
-            pDevice->wSeqCounter = 0;
-    }
+                       priv->tx_rate_fb0 =
+                               wFB_Opt0[FB_RATE0][current_rate - RATE_18M];
+                       priv->tx_rate_fb1 =
+                               wFB_Opt0[FB_RATE1][current_rate - RATE_18M];
 
-    if ((wFragType == FRAGCTL_STAFRAG) || (wFragType == FRAGCTL_MIDFRAG)) { //StartFrag or MidFrag
-        pMACHeader->frame_control |= FC_MOREFRAG;
-    }
-}
+                       fb_option = AUTO_FB_0;
+               } else if (priv->byAutoFBCtrl == AUTO_FB_1) {
+                       tx_buffer_head->wFIFOCtl |= FIFOCTL_AUTO_FB_1;
 
-/*+
- *
- * Description:
- *      Request instructs a MAC to transmit a 802.11 management packet through
- *      the adapter onto the medium.
- *
- * Parameters:
- *  In:
- *      hDeviceContext  - Pointer to the adapter
- *      pPacket         - A pointer to a descriptor for the packet to transmit
- *  Out:
- *      none
- *
- * Return Value: CMD_STATUS_PENDING if MAC Tx resource available; otherwise false
- *
--*/
+                       priv->tx_rate_fb0 =
+                               wFB_Opt1[FB_RATE0][current_rate - RATE_18M];
+                       priv->tx_rate_fb1 =
+                               wFB_Opt1[FB_RATE1][current_rate - RATE_18M];
 
-CMD_STATUS csMgmt_xmit(struct vnt_private *pDevice,
-       struct vnt_tx_mgmt *pPacket)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_tx_buffer *pTX_Buffer;
-       struct vnt_usb_send_context *pContext;
-       struct vnt_tx_fifo_head *pTxBufHead;
-       struct ieee80211_hdr *pMACHeader;
-       struct ethhdr sEthHeader;
-       u8 byPktType, *pbyTxBufferAddr;
-       struct vnt_mic_hdr *pMICHDR = NULL;
-       u32 uDuration, cbReqCount, cbHeaderSize, cbFrameBodySize, cbFrameSize;
-       int bNeedACK, bIsPSPOLL = false;
-       u32 cbIVlen = 0, cbICVlen = 0, cbMIClen = 0, cbFCSlen = 4;
-       u32 uPadding = 0;
-       u16 wTxBufSize;
-       u32 cbMacHdLen;
-       u16 wCurrentRate = RATE_1M;
-       unsigned long flags;
+                       fb_option = AUTO_FB_1;
+               }
+       }
 
-       if (pDevice->byBBType == BB_TYPE_11A) {
-               wCurrentRate = RATE_6M;
-               byPktType = PK_TYPE_11A;
-       } else {
-               wCurrentRate = RATE_1M;
-               byPktType = PK_TYPE_11B;
+       duration_id = s_vGenerateTxParameter(tx_context, pkt_type, current_rate,
+                               tx_buffer, &mic_hdr, need_mic, frame_size,
+                                               need_ack, NULL, need_rts);
+
+       tx_header_size = tx_context->tx_hdr_size;
+       if (!tx_header_size) {
+               tx_context->in_use = false;
+               return -ENOMEM;
        }
 
-       if (pMgmt->eScanState != WMAC_NO_SCANNING)
-               vnt_rf_setpower(pDevice, wCurrentRate, pDevice->byCurrentCh);
-       else
-               vnt_rf_setpower(pDevice, wCurrentRate, pMgmt->uCurrChannel);
+       tx_buffer_head->frag_ctl |= cpu_to_le16(FRAGCTL_NONFRAG);
+
+       tx_bytes = tx_header_size + tx_body_size;
 
-       pDevice->wCurrentRate = wCurrentRate;
+       memcpy(tx_context->hdr, skb->data, tx_body_size);
 
-       spin_lock_irqsave(&pDevice->lock, flags);
+       hdr->duration_id = cpu_to_le16(duration_id);
 
-       pContext = s_vGetFreeContext(pDevice);
-       if (!pContext) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO
-                       "ManagementSend TX...NO CONTEXT!\n");
-               spin_unlock_irqrestore(&pDevice->lock, flags);
-               return CMD_STATUS_RESOURCES;
+       if (info->control.hw_key) {
+               tx_key = info->control.hw_key;
+               if (tx_key->keylen > 0)
+                       vnt_fill_txkey(tx_context, tx_buffer_head->tx_key,
+                               tx_key, skb, tx_body_size, mic_hdr);
        }
 
-       pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
-    cbFrameBodySize = pPacket->cbPayloadLen;
-       pTxBufHead = &pTX_Buffer->fifo_head;
-       pbyTxBufferAddr = (u8 *)&pTxBufHead->adwTxKey[0];
-       wTxBufSize = sizeof(struct vnt_tx_fifo_head);
-
-
-    //Set packet type
-    if (byPktType == PK_TYPE_11A) {//0000 0000 0000 0000
-        pTxBufHead->wFIFOCtl = 0;
-    }
-    else if (byPktType == PK_TYPE_11B) {//0000 0001 0000 0000
-        pTxBufHead->wFIFOCtl |= FIFOCTL_11B;
-    }
-    else if (byPktType == PK_TYPE_11GB) {//0000 0010 0000 0000
-        pTxBufHead->wFIFOCtl |= FIFOCTL_11GB;
-    }
-    else if (byPktType == PK_TYPE_11GA) {//0000 0011 0000 0000
-        pTxBufHead->wFIFOCtl |= FIFOCTL_11GA;
-    }
-
-    pTxBufHead->wFIFOCtl |= FIFOCTL_TMOEN;
-    pTxBufHead->time_stamp = cpu_to_le16(DEFAULT_MGN_LIFETIME_RES_64us);
-
-    if (is_multicast_ether_addr(pPacket->p80211Header->sA3.abyAddr1)) {
-        bNeedACK = false;
-    }
-    else {
-        bNeedACK = true;
-        pTxBufHead->wFIFOCtl |= FIFOCTL_NEEDACK;
-    };
+       priv->wSeqCounter = (le16_to_cpu(hdr->seq_ctrl) &
+                                               IEEE80211_SCTL_SEQ) >> 4;
 
-    if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) ||
-        (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) ) {
-
-        pTxBufHead->wFIFOCtl |= FIFOCTL_LRETRY;
-        //Set Preamble type always long
-        //pDevice->byPreambleType = PREAMBLE_LONG;
-        // probe-response don't retry
-        //if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_MGMT_PROBE_RSP) {
-        //     bNeedACK = false;
-        //     pTxBufHead->wFIFOCtl  &= (~FIFOCTL_NEEDACK);
-        //}
-    }
-
-    pTxBufHead->wFIFOCtl |= (FIFOCTL_GENINT | FIFOCTL_ISDMA0);
-
-    if ((pPacket->p80211Header->sA4.wFrameCtl & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL) {
-        bIsPSPOLL = true;
-        cbMacHdLen = WLAN_HDR_ADDR2_LEN;
-    } else {
-        cbMacHdLen = WLAN_HDR_ADDR3_LEN;
-    }
-
-    //Set FRAGCTL_MACHDCNT
-    pTxBufHead->wFragCtl |= cpu_to_le16((u16)(cbMacHdLen << 10));
-
-    // Notes:
-    // Although spec says MMPDU can be fragmented; In most case,
-    // no one will send a MMPDU under fragmentation. With RTS may occur.
-
-    if (WLAN_GET_FC_ISWEP(pPacket->p80211Header->sA4.wFrameCtl) != 0) {
-        if (pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled) {
-            cbIVlen = 4;
-            cbICVlen = 4;
-           pTxBufHead->wFragCtl |= FRAGCTL_LEGACY;
-        }
-        else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) {
-            cbIVlen = 8;//IV+ExtIV
-            cbMIClen = 8;
-            cbICVlen = 4;
-           pTxBufHead->wFragCtl |= FRAGCTL_TKIP;
-           //We need to get seed here for filling TxKey entry.
-            //TKIPvMixKey(pTransmitKey->abyKey, pDevice->abyCurrentNetAddr,
-            //            pTransmitKey->wTSC15_0, pTransmitKey->dwTSC47_16, pDevice->abyPRNG);
-        }
-        else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) {
-            cbIVlen = 8;//RSN Header
-            cbICVlen = 8;//MIC
-            pTxBufHead->wFragCtl |= FRAGCTL_AES;
-        }
-        //MAC Header should be padding 0 to DW alignment.
-        uPadding = 4 - (cbMacHdLen%4);
-        uPadding %= 4;
-    }
-
-    cbFrameSize = cbMacHdLen + cbFrameBodySize + cbIVlen + cbMIClen + cbICVlen + cbFCSlen;
-
-    //Set FIFOCTL_GrpAckPolicy
-    if (pDevice->bGrpAckPolicy == true) {//0000 0100 0000 0000
-        pTxBufHead->wFIFOCtl |=        FIFOCTL_GRPACK;
-    }
-    //the rest of pTxBufHead->wFragCtl:FragTyp will be set later in s_vFillFragParameter()
-
-    //Set RrvTime/RTS/CTS Buffer
-    if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {//802.11g packet
-       cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_cts) +
-               sizeof(struct vnt_cts);
-    }
-    else { // 802.11a/b packet
-       cbHeaderSize = wTxBufSize + sizeof(struct vnt_rrv_time_ab) +
-               sizeof(struct vnt_tx_datahead_ab);
-    }
-
-    memcpy(&(sEthHeader.h_dest[0]),
-          &(pPacket->p80211Header->sA3.abyAddr1[0]),
-          ETH_ALEN);
-    memcpy(&(sEthHeader.h_source[0]),
-          &(pPacket->p80211Header->sA3.abyAddr2[0]),
-          ETH_ALEN);
-    //=========================
-    //    No Fragmentation
-    //=========================
-    pTxBufHead->wFragCtl |= (u16)FRAGCTL_NONFRAG;
-
-       /* Fill FIFO,RrvTime,RTS,and CTS */
-       uDuration = s_vGenerateTxParameter(pDevice, byPktType, wCurrentRate,
-               pTX_Buffer, &pMICHDR, 0,
-               cbFrameSize, bNeedACK, &sEthHeader, false);
-
-    pMACHeader = (struct ieee80211_hdr *) (pbyTxBufferAddr + cbHeaderSize);
-
-    cbReqCount = cbHeaderSize + cbMacHdLen + uPadding + cbIVlen + cbFrameBodySize;
-
-    if (WLAN_GET_FC_ISWEP(pPacket->p80211Header->sA4.wFrameCtl) != 0) {
-        u8 *           pbyIVHead;
-        u8 *           pbyPayloadHead;
-        u8 *           pbyBSSID;
-        PSKeyItem       pTransmitKey = NULL;
-
-        pbyIVHead = (u8 *)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding);
-        pbyPayloadHead = (u8 *)(pbyTxBufferAddr + cbHeaderSize + cbMacHdLen + uPadding + cbIVlen);
-        do {
-           if (pDevice->op_mode == NL80211_IFTYPE_STATION &&
-                                       pDevice->bLinkPass == true) {
-                pbyBSSID = pDevice->abyBSSID;
-                // get pairwise key
-                if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == false) {
-                    // get group key
-                    if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n");
-                        break;
-                    }
-                } else {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get PTK.\n");
-                    break;
-                }
-            }
-            // get group key
-            pbyBSSID = pDevice->abyBroadcastAddr;
-            if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) {
-                pTransmitKey = NULL;
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"KEY is NULL. OP Mode[%d]\n", pDevice->op_mode);
-            } else {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Get GTK.\n");
-            }
-        } while(false);
-        //Fill TXKEY
-       s_vFillTxKey(pDevice, pTxBufHead, pbyIVHead, pTransmitKey,
-                     (u8 *)pMACHeader, (u16)cbFrameBodySize, NULL);
-
-        memcpy(pMACHeader, pPacket->p80211Header, cbMacHdLen);
-        memcpy(pbyPayloadHead, ((u8 *)(pPacket->p80211Header) + cbMacHdLen),
-                 cbFrameBodySize);
-    }
-    else {
-        // Copy the Packet into a tx Buffer
-        memcpy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen);
-    }
-
-    pMACHeader->seq_ctrl = cpu_to_le16(pDevice->wSeqCounter << 4);
-    pDevice->wSeqCounter++ ;
-    if (pDevice->wSeqCounter > 0x0fff)
-        pDevice->wSeqCounter = 0;
-
-    if (bIsPSPOLL) {
-        // The MAC will automatically replace the Duration-field of MAC header by Duration-field
-        // of FIFO control header.
-        // This will cause AID-field of PS-POLL packet be incorrect (Because PS-POLL's AID field is
-        // in the same place of other packet's Duration-field).
-        // And it will cause Cisco-AP to issue Disassociation-packet
-       if (byPktType == PK_TYPE_11GB || byPktType == PK_TYPE_11GA) {
-               struct vnt_tx_datahead_g *data_head = &pTX_Buffer->tx_head.
-                                               tx_cts.tx.head.cts_g.data_head;
-               data_head->duration_a =
-                       cpu_to_le16(pPacket->p80211Header->sA2.wDurationID);
-               data_head->duration_b =
-                       cpu_to_le16(pPacket->p80211Header->sA2.wDurationID);
-       } else {
-               struct vnt_tx_datahead_ab *data_head = &pTX_Buffer->tx_head.
-                                       tx_ab.tx.head.data_head_ab;
-               data_head->duration =
-                       cpu_to_le16(pPacket->p80211Header->sA2.wDurationID);
-       }
-    }
+       tx_buffer->tx_byte_count = cpu_to_le16(tx_bytes);
+       tx_buffer->byPKTNO = (u8)(((current_rate << 4) & 0xf0) |
+               (priv->wSeqCounter & 0xf));
+       tx_buffer->byType = 0x00;
 
-    pTX_Buffer->tx_byte_count = cpu_to_le16((u16)(cbReqCount));
-    pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
-    pTX_Buffer->byType = 0x00;
+       tx_bytes += 4;
 
-       pContext->skb = NULL;
-       pContext->type = CONTEXT_MGMT_PACKET;
-       pContext->buf_len = (u16)cbReqCount + 4; /* USB header */
+       tx_context->type = CONTEXT_DATA_PACKET;
+       tx_context->buf_len = tx_bytes;
 
-    if (WLAN_GET_FC_TODS(pMACHeader->frame_control) == 0) {
-       s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
-                       &pMACHeader->addr1[0], (u16)cbFrameSize,
-                       pTxBufHead->wFIFOCtl);
-    }
-    else {
-       s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
-                       &pMACHeader->addr3[0], (u16)cbFrameSize,
-                       pTxBufHead->wFIFOCtl);
-    }
+       spin_lock_irqsave(&priv->lock, flags);
 
-    PIPEnsSendBulkOut(pDevice,pContext);
+       if (PIPEnsSendBulkOut(priv, tx_context) != STATUS_PENDING) {
+               spin_unlock_irqrestore(&priv->lock, flags);
+               return -EIO;
+       }
 
-       spin_unlock_irqrestore(&pDevice->lock, flags);
+       spin_unlock_irqrestore(&priv->lock, flags);
 
-    return CMD_STATUS_PENDING;
+       return 0;
 }
 
-CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
-       struct vnt_tx_mgmt *pPacket)
+static int vnt_beacon_xmit(struct vnt_private *priv,
+       struct sk_buff *skb)
 {
-       struct vnt_beacon_buffer *pTX_Buffer;
+       struct vnt_beacon_buffer *beacon_buffer;
        struct vnt_tx_short_buf_head *short_head;
-       u32 cbFrameSize = pPacket->cbMPDULen + WLAN_FCS_LEN;
-       u32 cbHeaderSize = 0;
-       struct ieee80211_hdr *pMACHeader;
-       u16 wCurrentRate;
-       u32 cbFrameBodySize;
-       u32 cbReqCount;
-       struct vnt_usb_send_context *pContext;
-       CMD_STATUS status;
+       struct ieee80211_tx_info *info;
+       struct vnt_usb_send_context *context;
+       struct ieee80211_mgmt *mgmt_hdr;
+       unsigned long flags;
+       u32 frame_size = skb->len + 4;
+       u16 current_rate, count;
 
-       pContext = s_vGetFreeContext(pDevice);
-    if (NULL == pContext) {
-        status = CMD_STATUS_RESOURCES;
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ManagementSend TX...NO CONTEXT!\n");
-        return status ;
-    }
+       spin_lock_irqsave(&priv->lock, flags);
 
-       pTX_Buffer = (struct vnt_beacon_buffer *)&pContext->data[0];
-       short_head = &pTX_Buffer->short_head;
+       context = s_vGetFreeContext(priv);
+       if (!context) {
+               dev_dbg(&priv->usb->dev, "%s No free context!\n", __func__);
+               spin_unlock_irqrestore(&priv->lock, flags);
+               return -ENOMEM;
+       }
+
+       context->skb = skb;
 
-    cbFrameBodySize = pPacket->cbPayloadLen;
+       spin_unlock_irqrestore(&priv->lock, flags);
 
-       cbHeaderSize = sizeof(struct vnt_tx_short_buf_head);
+       beacon_buffer = (struct vnt_beacon_buffer *)&context->data[0];
+       short_head = &beacon_buffer->short_head;
 
-       if (pDevice->byBBType == BB_TYPE_11A) {
-               wCurrentRate = RATE_6M;
+       if (priv->byBBType == BB_TYPE_11A) {
+               current_rate = RATE_6M;
 
                /* Get SignalField,ServiceField,Length */
-               BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate,
+               vnt_get_phy_field(priv, frame_size, current_rate,
                        PK_TYPE_11A, &short_head->ab);
 
                /* Get Duration and TimeStampOff */
-               short_head->duration = s_uGetDataDuration(pDevice,
+               short_head->duration = s_uGetDataDuration(priv,
                                                        PK_TYPE_11A, false);
                short_head->time_stamp_off =
-                               vnt_time_stamp_off(pDevice, wCurrentRate);
+                               vnt_time_stamp_off(priv, current_rate);
        } else {
-               wCurrentRate = RATE_1M;
+               current_rate = RATE_1M;
                short_head->fifo_ctl |= FIFOCTL_11B;
 
                /* Get SignalField,ServiceField,Length */
-               BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate,
+               vnt_get_phy_field(priv, frame_size, current_rate,
                                        PK_TYPE_11B, &short_head->ab);
 
                /* Get Duration and TimeStampOff */
-               short_head->duration = s_uGetDataDuration(pDevice,
+               short_head->duration = s_uGetDataDuration(priv,
                                                PK_TYPE_11B, false);
                short_head->time_stamp_off =
-                       vnt_time_stamp_off(pDevice, wCurrentRate);
+                       vnt_time_stamp_off(priv, current_rate);
        }
 
-
        /* Generate Beacon Header */
-       pMACHeader = &pTX_Buffer->hdr;
-
-       memcpy(pMACHeader, pPacket->p80211Header, pPacket->cbMPDULen);
+       mgmt_hdr = &beacon_buffer->mgmt_hdr;
+       memcpy(mgmt_hdr, skb->data, skb->len);
 
-       pMACHeader->duration_id = 0;
-       pMACHeader->seq_ctrl = cpu_to_le16(pDevice->wSeqCounter << 4);
-       pDevice->wSeqCounter++;
-       if (pDevice->wSeqCounter > 0x0fff)
-               pDevice->wSeqCounter = 0;
+       /* time stamp always 0 */
+       mgmt_hdr->u.beacon.timestamp = 0;
 
-    cbReqCount = cbHeaderSize + WLAN_HDR_ADDR3_LEN + cbFrameBodySize;
-
-    pTX_Buffer->tx_byte_count = cpu_to_le16((u16)cbReqCount);
-    pTX_Buffer->byPKTNO = (u8) (((wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
-    pTX_Buffer->byType = 0x01;
-
-       pContext->skb = NULL;
-       pContext->type = CONTEXT_MGMT_PACKET;
-       pContext->buf_len = (u16)cbReqCount + 4; /* USB header */
+       info = IEEE80211_SKB_CB(skb);
+       if (info->flags & IEEE80211_TX_CTL_ASSIGN_SEQ) {
+               struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)mgmt_hdr;
+               hdr->duration_id = 0;
+               hdr->seq_ctrl = cpu_to_le16(priv->wSeqCounter << 4);
+       }
 
-    PIPEnsSendBulkOut(pDevice,pContext);
-    return CMD_STATUS_PENDING;
+       priv->wSeqCounter++;
+       if (priv->wSeqCounter > 0x0fff)
+               priv->wSeqCounter = 0;
 
-}
+       count = sizeof(struct vnt_tx_short_buf_head) + skb->len;
 
-//TYPE_AC0DMA data tx
-/*
- * Description:
- *      Tx packet via AC0DMA(DMA1)
- *
- * Parameters:
- *  In:
- *      pDevice         - Pointer to the adapter
- *      skb             - Pointer to tx skb packet
- *  Out:
- *      void
- *
- * Return Value: NULL
- */
+       beacon_buffer->tx_byte_count = cpu_to_le16(count);
+       beacon_buffer->byPKTNO = (u8)(((current_rate << 4) & 0xf0) |
+                               ((priv->wSeqCounter - 1) & 0x000f));
+       beacon_buffer->byType = 0x01;
 
-int nsDMA_tx_packet(struct vnt_private *pDevice, struct sk_buff *skb)
-{
-       struct net_device_stats *pStats = &pDevice->stats;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_tx_buffer *pTX_Buffer;
-       u32 BytesToWrite = 0, uHeaderLen = 0;
-       u32 uNodeIndex = 0;
-       u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
-       u16 wAID;
-       u8 byPktType;
-       int bNeedEncryption = false;
-       PSKeyItem pTransmitKey = NULL;
-       int ii;
-       int bTKIP_UseGTK = false;
-       int bNeedDeAuth = false;
-       u8 *pbyBSSID;
-       int bNodeExist = false;
-       struct vnt_usb_send_context *pContext;
-       bool fConvertedPacket;
-       u32 status;
-       u16 wKeepRate = pDevice->wCurrentRate;
-       int bTxeapol_key = false;
-
-    if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-
-        if (pDevice->uAssocCount == 0) {
-            dev_kfree_skb_irq(skb);
-            return 0;
-        }
+       context->type = CONTEXT_BEACON_PACKET;
+       context->buf_len = count + 4; /* USB header */
 
-       if (is_multicast_ether_addr((u8 *)(skb->data))) {
-            uNodeIndex = 0;
-            bNodeExist = true;
-            if (pMgmt->sNodeDBTable[0].bPSEnable) {
-
-                skb_queue_tail(&(pMgmt->sNodeDBTable[0].sTxPSQueue), skb);
-                pMgmt->sNodeDBTable[0].wEnQueueCnt++;
-                // set tx map
-                pMgmt->abyPSTxMap[0] |= byMask[0];
-                return 0;
-            }
-            // multicast/broadcast data rate
-
-            if (pDevice->byBBType != BB_TYPE_11A)
-                pDevice->wCurrentRate = RATE_2M;
-            else
-                pDevice->wCurrentRate = RATE_24M;
-            // long preamble type
-            pDevice->byPreambleType = PREAMBLE_SHORT;
-
-        }else {
-
-            if (BSSbIsSTAInNodeDB(pDevice, (u8 *)(skb->data), &uNodeIndex)) {
-
-                if (pMgmt->sNodeDBTable[uNodeIndex].bPSEnable) {
-
-                    skb_queue_tail(&pMgmt->sNodeDBTable[uNodeIndex].sTxPSQueue, skb);
-
-                    pMgmt->sNodeDBTable[uNodeIndex].wEnQueueCnt++;
-                    // set tx map
-                    wAID = pMgmt->sNodeDBTable[uNodeIndex].wAID;
-                    pMgmt->abyPSTxMap[wAID >> 3] |=  byMask[wAID & 7];
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Set:pMgmt->abyPSTxMap[%d]= %d\n",
-                             (wAID >> 3), pMgmt->abyPSTxMap[wAID >> 3]);
-
-                    return 0;
-                }
-                // AP rate decided from node
-                pDevice->wCurrentRate = pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate;
-                // tx preamble decided from node
-
-                if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble) {
-                    pDevice->byPreambleType = pDevice->byShortPreamble;
-
-                }else {
-                    pDevice->byPreambleType = PREAMBLE_LONG;
-                }
-                bNodeExist = true;
-            }
-        }
+       spin_lock_irqsave(&priv->lock, flags);
 
-        if (bNodeExist == false) {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Unknown STA not found in node DB \n");
-            dev_kfree_skb_irq(skb);
-            return 0;
-        }
-    }
+       if (PIPEnsSendBulkOut(priv, context) != STATUS_PENDING)
+               ieee80211_free_txskb(priv->hw, context->skb);
 
-       memcpy(&pDevice->sTxEthHeader, skb->data, ETH_HLEN);
+       spin_unlock_irqrestore(&priv->lock, flags);
 
-//mike add:station mode check eapol-key challenge--->
-{
-    u8  Protocol_Version;    //802.1x Authentication
-    u8  Packet_Type;           //802.1x Authentication
-    u8  Descriptor_type;
-    u16 Key_info;
-
-    Protocol_Version = skb->data[ETH_HLEN];
-    Packet_Type = skb->data[ETH_HLEN+1];
-    Descriptor_type = skb->data[ETH_HLEN+1+1+2];
-    Key_info = (skb->data[ETH_HLEN+1+1+2+1] << 8)|(skb->data[ETH_HLEN+1+1+2+2]);
-       if (pDevice->sTxEthHeader.h_proto == cpu_to_be16(ETH_P_PAE)) {
-               /* 802.1x OR eapol-key challenge frame transfer */
-               if (((Protocol_Version == 1) || (Protocol_Version == 2)) &&
-                       (Packet_Type == 3)) {
-                        bTxeapol_key = true;
-                       if(!(Key_info & BIT3) &&  //WPA or RSN group-key challenge
-                          (Key_info & BIT8) && (Key_info & BIT9)) {    //send 2/2 key
-                         if(Descriptor_type==254) {
-                               pDevice->fWPA_Authened = true;
-                            PRINT_K("WPA ");
-                         }
-                         else {
-                               pDevice->fWPA_Authened = true;
-                            PRINT_K("WPA2(re-keying) ");
-                         }
-                         PRINT_K("Authentication completed!!\n");
-                        }
-                   else if((Key_info & BIT3) && (Descriptor_type==2) &&  //RSN pairwise-key challenge
-                              (Key_info & BIT8) && (Key_info & BIT9)) {
-                         pDevice->fWPA_Authened = true;
-                            PRINT_K("WPA2 Authentication completed!!\n");
-                    }
-             }
-   }
+       return 0;
 }
-//mike add:station mode check eapol-key challenge<---
-
-    if (pDevice->bEncryptionEnable == true) {
-        bNeedEncryption = true;
-        // get Transmit key
-        do {
-            if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
-                (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
-                pbyBSSID = pDevice->abyBSSID;
-                // get pairwise key
-                if (KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == false) {
-                    // get group key
-                    if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == true) {
-                        bTKIP_UseGTK = true;
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
-                        break;
-                    }
-                } else {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get PTK.\n");
-                    break;
-                }
-            }else if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-             /* TO_DS = 0 and FROM_DS = 0 --> 802.11 MAC Address1 */
-                pbyBSSID = pDevice->sTxEthHeader.h_dest;
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS Serach Key: \n");
-                for (ii = 0; ii< 6; ii++)
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"%x \n", *(pbyBSSID+ii));
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"\n");
-
-                // get pairwise key
-                if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, PAIRWISE_KEY, &pTransmitKey) == true)
-                    break;
-            }
-            // get group key
-            pbyBSSID = pDevice->abyBroadcastAddr;
-            if(KeybGetTransmitKey(&(pDevice->sKey), pbyBSSID, GROUP_KEY, &pTransmitKey) == false) {
-                pTransmitKey = NULL;
-                if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"IBSS and KEY is NULL. [%d]\n", pMgmt->eCurrMode);
-                }
-                else
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"NOT IBSS and KEY is NULL. [%d]\n", pMgmt->eCurrMode);
-            } else {
-                bTKIP_UseGTK = true;
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG"Get GTK.\n");
-            }
-        } while(false);
-    }
-
-    byPktType = (u8)pDevice->byPacketType;
-
-    if (pDevice->bFixRate) {
-        if (pDevice->byBBType == BB_TYPE_11B) {
-            if (pDevice->uConnectionRate >= RATE_11M) {
-                pDevice->wCurrentRate = RATE_11M;
-            } else {
-                pDevice->wCurrentRate = (u16)pDevice->uConnectionRate;
-            }
-        } else {
-            if ((pDevice->byBBType == BB_TYPE_11A) &&
-                (pDevice->uConnectionRate <= RATE_6M)) {
-                pDevice->wCurrentRate = RATE_6M;
-            } else {
-                if (pDevice->uConnectionRate >= RATE_54M)
-                    pDevice->wCurrentRate = RATE_54M;
-                else
-                    pDevice->wCurrentRate = (u16)pDevice->uConnectionRate;
-            }
-        }
-    }
-    else {
-       if (pDevice->op_mode == NL80211_IFTYPE_ADHOC) {
-            // Adhoc Tx rate decided from node DB
-           if (is_multicast_ether_addr(pDevice->sTxEthHeader.h_dest)) {
-                // Multicast use highest data rate
-                pDevice->wCurrentRate = pMgmt->sNodeDBTable[0].wTxDataRate;
-                // preamble type
-                pDevice->byPreambleType = pDevice->byShortPreamble;
-            }
-            else {
-                if (BSSbIsSTAInNodeDB(pDevice, &(pDevice->sTxEthHeader.h_dest[0]), &uNodeIndex)) {
-                    pDevice->wCurrentRate = pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate;
-                    if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble) {
-                        pDevice->byPreambleType = pDevice->byShortPreamble;
-
-                    }
-                    else {
-                        pDevice->byPreambleType = PREAMBLE_LONG;
-                    }
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Found Node Index is [%d]  Tx Data Rate:[%d]\n",uNodeIndex, pDevice->wCurrentRate);
-                }
-                else {
-                    if (pDevice->byBBType != BB_TYPE_11A)
-                       pDevice->wCurrentRate = RATE_2M;
-                    else
-                       pDevice->wCurrentRate = RATE_24M; // refer to vMgrCreateOwnIBSS()'s
-                                                         // abyCurrExtSuppRates[]
-                    pDevice->byPreambleType = PREAMBLE_SHORT;
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Not Found Node use highest basic Rate.....\n");
-                }
-            }
-        }
-       if (pDevice->op_mode == NL80211_IFTYPE_STATION) {
-            // Infra STA rate decided from AP Node, index = 0
-            pDevice->wCurrentRate = pMgmt->sNodeDBTable[0].wTxDataRate;
-        }
-    }
-
-       if (pDevice->sTxEthHeader.h_proto == cpu_to_be16(ETH_P_PAE)) {
-               if (pDevice->byBBType != BB_TYPE_11A) {
-                       pDevice->wCurrentRate = RATE_1M;
-                       pDevice->byTopCCKBasicRate = RATE_1M;
-                       pDevice->byTopOFDMBasicRate = RATE_6M;
-               } else {
-                       pDevice->wCurrentRate = RATE_6M;
-                       pDevice->byTopCCKBasicRate = RATE_1M;
-                       pDevice->byTopOFDMBasicRate = RATE_6M;
-               }
-       }
-
-    DBG_PRT(MSG_LEVEL_DEBUG,
-           KERN_INFO "dma_tx: pDevice->wCurrentRate = %d\n",
-           pDevice->wCurrentRate);
-
-    if (wKeepRate != pDevice->wCurrentRate) {
-       bScheduleCommand((void *) pDevice, WLAN_CMD_SETPOWER, NULL);
-    }
-
-    if (pDevice->wCurrentRate <= RATE_11M) {
-        byPktType = PK_TYPE_11B;
-    }
-
-    if (bNeedEncryption == true) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"ntohs Pkt Type=%04x\n", ntohs(pDevice->sTxEthHeader.h_proto));
-       if ((pDevice->sTxEthHeader.h_proto) == cpu_to_be16(ETH_P_PAE)) {
-               bNeedEncryption = false;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Pkt Type=%04x\n", (pDevice->sTxEthHeader.h_proto));
-            if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
-                if (pTransmitKey == NULL) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Don't Find TX KEY\n");
-                }
-                else {
-                    if (bTKIP_UseGTK == true) {
-                        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"error: KEY is GTK!!~~\n");
-                    }
-                    else {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Find PTK [%X]\n",
-                               pTransmitKey->dwKeyIndex);
-                        bNeedEncryption = true;
-                    }
-                }
-            }
-        }
-        else {
-
-            if (pTransmitKey == NULL) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"return no tx key\n");
-                dev_kfree_skb_irq(skb);
-                pStats->tx_dropped++;
-                return STATUS_FAILURE;
-            }
-        }
-    }
-
-       pContext = s_vGetFreeContext(pDevice);
-       if (!pContext) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_DEBUG" pContext == NULL\n");
-               dev_kfree_skb_irq(skb);
-               return STATUS_RESOURCES;
-       }
 
-       pTX_Buffer = (struct vnt_tx_buffer *)&pContext->data[0];
+int vnt_beacon_make(struct vnt_private *priv, struct ieee80211_vif *vif)
+{
+       struct sk_buff *beacon;
 
-    fConvertedPacket = s_bPacketToWirelessUsb(pDevice, byPktType,
-                       pTX_Buffer, bNeedEncryption,
-                       skb->len, &pDevice->sTxEthHeader,
-                        (u8 *)skb->data, pTransmitKey, uNodeIndex,
-                        pDevice->wCurrentRate,
-                        &uHeaderLen, &BytesToWrite
-                       );
+       beacon = ieee80211_beacon_get(priv->hw, vif);
+       if (!beacon)
+               return -ENOMEM;
 
-       if (fConvertedPacket == false) {
-               pContext->in_use = false;
-               dev_kfree_skb_irq(skb);
-               return STATUS_FAILURE;
+       if (vnt_beacon_xmit(priv, beacon)) {
+               ieee80211_free_txskb(priv->hw, beacon);
+               return -ENODEV;
        }
 
-    if ( pDevice->bEnablePSMode == true ) {
-        if ( !pDevice->bPSModeTxBurst ) {
-               bScheduleCommand((void *) pDevice,
-                                WLAN_CMD_MAC_DISPOWERSAVING,
-                                NULL);
-            pDevice->bPSModeTxBurst = true;
-        }
-    }
+       return 0;
+}
 
-    pTX_Buffer->byPKTNO = (u8) (((pDevice->wCurrentRate<<4) &0x00F0) | ((pDevice->wSeqCounter - 1) & 0x000F));
-    pTX_Buffer->tx_byte_count = cpu_to_le16((u16)BytesToWrite);
+int vnt_beacon_enable(struct vnt_private *priv, struct ieee80211_vif *vif,
+       struct ieee80211_bss_conf *conf)
+{
+       int ret;
 
-       pContext->skb = skb;
-       pContext->type = CONTEXT_DATA_PACKET;
-       pContext->buf_len = (u16)BytesToWrite + 4 ; /* USB header */
+       vnt_mac_reg_bits_off(priv, MAC_REG_TCR, TCR_AUTOBCNTX);
 
-    s_vSaveTxPktInfo(pDevice, (u8)(pTX_Buffer->byPKTNO & 0x0F),
-                       &pDevice->sTxEthHeader.h_dest[0],
-                       (u16)(BytesToWrite-uHeaderLen),
-                       pTX_Buffer->fifo_head.wFIFOCtl);
+       vnt_mac_reg_bits_off(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
 
-    status = PIPEnsSendBulkOut(pDevice,pContext);
+       vnt_mac_set_beacon_interval(priv, conf->beacon_int);
 
-    if (bNeedDeAuth == true) {
-        u16 wReason = WLAN_MGMT_REASON_MIC_FAILURE;
+       vnt_clear_current_tsf(priv);
 
-       bScheduleCommand((void *) pDevice, WLAN_CMD_DEAUTH, (u8 *) &wReason);
-    }
+       vnt_mac_reg_bits_on(priv, MAC_REG_TFTCTL, TFTCTL_TSFCNTREN);
 
-       if (status != STATUS_PENDING) {
-               pContext->in_use = false;
-               dev_kfree_skb_irq(skb);
-               return STATUS_FAILURE;
-       }
+       vnt_reset_next_tbtt(priv, conf->beacon_int);
 
+       ret = vnt_beacon_make(priv, vif);
 
-       return 0;
+       return ret;
 }
index 6db3337f1d1d9697399a4b52431c9511297f17d7..1cfa5aeddad4c5e6b5a02d1c0fcb338661c09fb0 100644 (file)
 #include "wcmd.h"
 #include "baseband.h"
 
+#define DEFAULT_MGN_LIFETIME_RES_64us  125  /* 64us */
+#define DEFAULT_MSDU_LIFETIME_RES_64us  8000
+
 /* MIC HDR data header */
 struct vnt_mic_hdr {
        u8 id;
        u8 tx_priority;
        u8 mic_addr2[6];
-       __be32 tsc_47_16;
-       __be16 tsc_15_0;
+       u8 ccmp_pn[IEEE80211_CCMP_PN_LEN];
        __be16 payload_len;
        __be16 hlen;
        __le16 frame_control;
@@ -81,6 +83,7 @@ struct vnt_tx_datahead_g {
        __le16 duration_a;
        __le16 time_stamp_off_b;
        __le16 time_stamp_off_a;
+       struct ieee80211_hdr hdr;
 } __packed;
 
 struct vnt_tx_datahead_g_fb {
@@ -92,12 +95,14 @@ struct vnt_tx_datahead_g_fb {
        __le16 duration_a_f1;
        __le16 time_stamp_off_b;
        __le16 time_stamp_off_a;
+       struct ieee80211_hdr hdr;
 } __packed;
 
 struct vnt_tx_datahead_ab {
        struct vnt_phy_field ab;
        __le16 duration;
        __le16 time_stamp_off;
+       struct ieee80211_hdr hdr;
 } __packed;
 
 struct vnt_tx_datahead_a_fb {
@@ -106,6 +111,7 @@ struct vnt_tx_datahead_a_fb {
        __le16 time_stamp_off;
        __le16 duration_f0;
        __le16 duration_f1;
+       struct ieee80211_hdr hdr;
 } __packed;
 
 /* RTS buffer header */
@@ -215,10 +221,10 @@ union vnt_tx_head {
 };
 
 struct vnt_tx_fifo_head {
-       u32 adwTxKey[4];
+       u8 tx_key[WLAN_KEY_LEN_CCMP];
        u16 wFIFOCtl;
        __le16 time_stamp;
-       u16 wFragCtl;
+       __le16 frag_ctl;
        __le16 current_rate;
 } __packed;
 
@@ -243,12 +249,12 @@ struct vnt_beacon_buffer {
        u8 byPKTNO;
        __le16 tx_byte_count;
        struct vnt_tx_short_buf_head short_head;
-       struct ieee80211_hdr hdr;
+       struct ieee80211_mgmt mgmt_hdr;
 } __packed;
 
-void vDMA0_tx_80211(struct vnt_private *, struct sk_buff *skb);
-int nsDMA_tx_packet(struct vnt_private *, struct sk_buff *skb);
-CMD_STATUS csMgmt_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
-CMD_STATUS csBeacon_xmit(struct vnt_private *, struct vnt_tx_mgmt *);
+int vnt_tx_packet(struct vnt_private *, struct sk_buff *);
+int vnt_beacon_make(struct vnt_private *, struct ieee80211_vif *);
+int vnt_beacon_enable(struct vnt_private *, struct ieee80211_vif *,
+       struct ieee80211_bss_conf *);
 
 #endif /* __RXTX_H__ */
diff --git a/drivers/staging/vt6656/tether.c b/drivers/staging/vt6656/tether.c
deleted file mode 100644 (file)
index 2ef54f6..0000000
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * Copyright (c) 2003 VIA Networking, Inc. All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: tether.c
- *
- * Purpose:
- *
- * Author: Tevin Chen
- *
- * Date: May 21, 1996
- *
- * Functions:
- *      ETHbIsBufferCrc32Ok - Check CRC value of the buffer if Ok or not
- *
- * Revision History:
- *
- */
-
-#include "device.h"
-#include "tmacro.h"
-#include "tether.h"
-
-/*
- * Description: Check CRC value of the buffer if Ok or not
- *
- * Parameters:
- *  In:
- *             pbyBuffer           - pointer of buffer (normally is rx buffer)
- *             cbFrameLength   - length of buffer, including CRC portion
- *  Out:
- *      none
- *
- * Return Value: true if ok; false if error.
- *
- */
-bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength)
-{
-       u32 n_crc = ~ether_crc_le(cbFrameLength - 4, pbyBuffer);
-
-       if (le32_to_cpu(*((__le32 *)(pbyBuffer + cbFrameLength - 4))) != n_crc)
-               return false;
-
-       return true;
-}
-
diff --git a/drivers/staging/vt6656/tether.h b/drivers/staging/vt6656/tether.h
deleted file mode 100644 (file)
index f57fcfd..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: tether.h
- *
- * Purpose:
- *
- * Author: Tevin Chen
- *
- * Date: Jan. 28, 1997
- *
- */
-
-#ifndef __TETHER_H__
-#define __TETHER_H__
-
-#include <linux/if_ether.h>
-
-//
-// constants
-//
-#define U_ETHER_ADDR_STR_LEN (ETH_ALEN * 2 + 1)
-                                        // Ethernet address string length
-#define U_MULTI_ADDR_LEN    8           // multicast address length
-
-#ifdef __BIG_ENDIAN
-
-#define TYPE_MGMT_PROBE_RSP 0x5000
-
-#define FC_TODS             0x0001
-#define FC_FROMDS           0x0002
-#define FC_MOREFRAG         0x0004
-#define FC_RETRY            0x0008
-#define FC_POWERMGT         0x0010
-#define FC_MOREDATA         0x0020
-#define FC_WEP              0x0040
-#define TYPE_802_11_ATIM    0x9000
-
-#define TYPE_802_11_DATA    0x0800
-#define TYPE_802_11_CTL     0x0400
-#define TYPE_802_11_MGMT    0x0000
-#define TYPE_802_11_MASK    0x0C00
-#define TYPE_SUBTYPE_MASK   0xFC00
-#define TYPE_802_11_NODATA  0x4000
-#define TYPE_DATE_NULL      0x4800
-
-#define TYPE_CTL_PSPOLL     0xa400
-#define TYPE_CTL_ACK        0xd400
-
-#else //if LITTLE_ENDIAN
-//
-// wType field in the SEthernetHeader
-//
-// NOTE....
-//   in network byte order, high byte is going first
-
-#define TYPE_MGMT_PROBE_RSP 0x0050
-
-#define FC_TODS             0x0100
-#define FC_FROMDS           0x0200
-#define FC_MOREFRAG         0x0400
-#define FC_RETRY            0x0800
-#define FC_POWERMGT         0x1000
-#define FC_MOREDATA         0x2000
-#define FC_WEP              0x4000
-#define TYPE_802_11_ATIM    0x0090
-
-#define TYPE_802_11_DATA    0x0008
-#define TYPE_802_11_CTL     0x0004
-#define TYPE_802_11_MGMT    0x0000
-#define TYPE_802_11_MASK    0x000C
-#define TYPE_SUBTYPE_MASK   0x00FC
-#define TYPE_802_11_NODATA  0x0040
-#define TYPE_DATE_NULL      0x0048
-
-#define TYPE_CTL_PSPOLL     0x00a4
-#define TYPE_CTL_ACK        0x00d4
-
-#endif //#ifdef __BIG_ENDIAN
-
-#define WEP_IV_MASK         0x00FFFFFF
-
-//u8 ETHbyGetHashIndexByCrc(u8 * pbyMultiAddr);
-bool ETHbIsBufferCrc32Ok(u8 * pbyBuffer, unsigned int cbFrameLength);
-
-#endif /* __TETHER_H__ */
diff --git a/drivers/staging/vt6656/tkip.c b/drivers/staging/vt6656/tkip.c
deleted file mode 100644 (file)
index 28282f3..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: tkip.c
- *
- * Purpose: Implement functions for 802.11i TKIP
- *
- * Author: Jerry Chen
- *
- * Date: Mar. 11, 2003
- *
- * Functions:
- *      TKIPvMixKey - Get TKIP RC4 Key from TK,TA, and TSC
- *
- * Revision History:
- *
- */
-
-#include "tmacro.h"
-#include "tkip.h"
-
-/* The Sbox is reduced to 2 16-bit wide tables, each with 256 entries. */
-/* The 2nd table is the same as the 1st but with the upper and lower   */
-/* bytes swapped. To allow an endian tolerant implementation, the byte */
-/* halves have been expressed independently here.                      */
-static const u8 TKIP_Sbox_Lower[256] = {
-    0xA5,0x84,0x99,0x8D,0x0D,0xBD,0xB1,0x54,
-    0x50,0x03,0xA9,0x7D,0x19,0x62,0xE6,0x9A,
-    0x45,0x9D,0x40,0x87,0x15,0xEB,0xC9,0x0B,
-    0xEC,0x67,0xFD,0xEA,0xBF,0xF7,0x96,0x5B,
-    0xC2,0x1C,0xAE,0x6A,0x5A,0x41,0x02,0x4F,
-    0x5C,0xF4,0x34,0x08,0x93,0x73,0x53,0x3F,
-    0x0C,0x52,0x65,0x5E,0x28,0xA1,0x0F,0xB5,
-    0x09,0x36,0x9B,0x3D,0x26,0x69,0xCD,0x9F,
-    0x1B,0x9E,0x74,0x2E,0x2D,0xB2,0xEE,0xFB,
-    0xF6,0x4D,0x61,0xCE,0x7B,0x3E,0x71,0x97,
-    0xF5,0x68,0x00,0x2C,0x60,0x1F,0xC8,0xED,
-    0xBE,0x46,0xD9,0x4B,0xDE,0xD4,0xE8,0x4A,
-    0x6B,0x2A,0xE5,0x16,0xC5,0xD7,0x55,0x94,
-    0xCF,0x10,0x06,0x81,0xF0,0x44,0xBA,0xE3,
-    0xF3,0xFE,0xC0,0x8A,0xAD,0xBC,0x48,0x04,
-    0xDF,0xC1,0x75,0x63,0x30,0x1A,0x0E,0x6D,
-    0x4C,0x14,0x35,0x2F,0xE1,0xA2,0xCC,0x39,
-    0x57,0xF2,0x82,0x47,0xAC,0xE7,0x2B,0x95,
-    0xA0,0x98,0xD1,0x7F,0x66,0x7E,0xAB,0x83,
-    0xCA,0x29,0xD3,0x3C,0x79,0xE2,0x1D,0x76,
-    0x3B,0x56,0x4E,0x1E,0xDB,0x0A,0x6C,0xE4,
-    0x5D,0x6E,0xEF,0xA6,0xA8,0xA4,0x37,0x8B,
-    0x32,0x43,0x59,0xB7,0x8C,0x64,0xD2,0xE0,
-    0xB4,0xFA,0x07,0x25,0xAF,0x8E,0xE9,0x18,
-    0xD5,0x88,0x6F,0x72,0x24,0xF1,0xC7,0x51,
-    0x23,0x7C,0x9C,0x21,0xDD,0xDC,0x86,0x85,
-    0x90,0x42,0xC4,0xAA,0xD8,0x05,0x01,0x12,
-    0xA3,0x5F,0xF9,0xD0,0x91,0x58,0x27,0xB9,
-    0x38,0x13,0xB3,0x33,0xBB,0x70,0x89,0xA7,
-    0xB6,0x22,0x92,0x20,0x49,0xFF,0x78,0x7A,
-    0x8F,0xF8,0x80,0x17,0xDA,0x31,0xC6,0xB8,
-    0xC3,0xB0,0x77,0x11,0xCB,0xFC,0xD6,0x3A
-};
-
-static const u8 TKIP_Sbox_Upper[256] = {
-    0xC6,0xF8,0xEE,0xF6,0xFF,0xD6,0xDE,0x91,
-    0x60,0x02,0xCE,0x56,0xE7,0xB5,0x4D,0xEC,
-    0x8F,0x1F,0x89,0xFA,0xEF,0xB2,0x8E,0xFB,
-    0x41,0xB3,0x5F,0x45,0x23,0x53,0xE4,0x9B,
-    0x75,0xE1,0x3D,0x4C,0x6C,0x7E,0xF5,0x83,
-    0x68,0x51,0xD1,0xF9,0xE2,0xAB,0x62,0x2A,
-    0x08,0x95,0x46,0x9D,0x30,0x37,0x0A,0x2F,
-    0x0E,0x24,0x1B,0xDF,0xCD,0x4E,0x7F,0xEA,
-    0x12,0x1D,0x58,0x34,0x36,0xDC,0xB4,0x5B,
-    0xA4,0x76,0xB7,0x7D,0x52,0xDD,0x5E,0x13,
-    0xA6,0xB9,0x00,0xC1,0x40,0xE3,0x79,0xB6,
-    0xD4,0x8D,0x67,0x72,0x94,0x98,0xB0,0x85,
-    0xBB,0xC5,0x4F,0xED,0x86,0x9A,0x66,0x11,
-    0x8A,0xE9,0x04,0xFE,0xA0,0x78,0x25,0x4B,
-    0xA2,0x5D,0x80,0x05,0x3F,0x21,0x70,0xF1,
-    0x63,0x77,0xAF,0x42,0x20,0xE5,0xFD,0xBF,
-    0x81,0x18,0x26,0xC3,0xBE,0x35,0x88,0x2E,
-    0x93,0x55,0xFC,0x7A,0xC8,0xBA,0x32,0xE6,
-    0xC0,0x19,0x9E,0xA3,0x44,0x54,0x3B,0x0B,
-    0x8C,0xC7,0x6B,0x28,0xA7,0xBC,0x16,0xAD,
-    0xDB,0x64,0x74,0x14,0x92,0x0C,0x48,0xB8,
-    0x9F,0xBD,0x43,0xC4,0x39,0x31,0xD3,0xF2,
-    0xD5,0x8B,0x6E,0xDA,0x01,0xB1,0x9C,0x49,
-    0xD8,0xAC,0xF3,0xCF,0xCA,0xF4,0x47,0x10,
-    0x6F,0xF0,0x4A,0x5C,0x38,0x57,0x73,0x97,
-    0xCB,0xA1,0xE8,0x3E,0x96,0x61,0x0D,0x0F,
-    0xE0,0x7C,0x71,0xCC,0x90,0x06,0xF7,0x1C,
-    0xC2,0x6A,0xAE,0x69,0x17,0x99,0x3A,0x27,
-    0xD9,0xEB,0x2B,0x22,0xD2,0xA9,0x07,0x33,
-    0x2D,0x3C,0x15,0xC9,0x87,0xAA,0x50,0xA5,
-    0x03,0x59,0x09,0x1A,0x65,0xD7,0x84,0xD0,
-    0x82,0x29,0x5A,0x1E,0x7B,0xA8,0x6D,0x2C
-};
-
-//STKIPKeyManagement  sTKIPKeyTable[MAX_TKIP_KEY];
-
-/************************************************************/
-/* tkip_sbox()                                              */
-/* Returns a 16 bit value from a 64K entry table. The Table */
-/* is synthesized from two 256 entry byte wide tables.      */
-/************************************************************/
-static unsigned int tkip_sbox(unsigned int index)
-{
-    unsigned int index_low;
-    unsigned int index_high;
-    unsigned int left, right;
-
-    index_low = (index % 256);
-    index_high = ((index >> 8) % 256);
-
-    left = TKIP_Sbox_Lower[index_low] + (TKIP_Sbox_Upper[index_low] * 256);
-    right = TKIP_Sbox_Upper[index_high] + (TKIP_Sbox_Lower[index_high] * 256);
-
-    return (left ^ right);
-};
-
-static unsigned int rotr1(unsigned int a)
-{
-    unsigned int b;
-
-    if ((a & 0x01) == 0x01) {
-        b = (a >> 1) | 0x8000;
-    } else {
-        b = (a >> 1) & 0x7fff;
-    }
-    b = b % 65536;
-    return b;
-}
-
-/*
- * Description: Calculate RC4Key fom TK, TA, and TSC
- *
- * Parameters:
- *  In:
- *      pbyTKey         - TKey
- *      pbyTA           - TA
- *      dwTSC           - TSC
- *  Out:
- *      pbyRC4Key       - RC4Key
- *
- * Return Value: none
- *
- */
-void TKIPvMixKey(
-    u8 *   pbyTKey,
-    u8 *   pbyTA,
-    u16    wTSC15_0,
-    u32   dwTSC47_16,
-    u8 *   pbyRC4Key
-    )
-{
-       u32 p1k[5];
-       u32 tsc0, tsc1, tsc2;
-       u32 ppk0, ppk1, ppk2, ppk3, ppk4, ppk5;
-       u32 pnl, pnh;
-       int i, j;
-
-       pnl = (u32)wTSC15_0;
-       pnh = (u32)(dwTSC47_16 & 0xffffffff);
-
-       tsc0 = (u32)((pnh >> 16) % 65536); /* msb */
-       tsc1 = (u32)(pnh % 65536);
-       tsc2 = (u32)(pnl % 65536); /* lsb */
-
-       /* Phase 1, step 1 */
-       p1k[0] = tsc1;
-       p1k[1] = tsc0;
-       p1k[2] = (u32)(pbyTA[0] + (pbyTA[1]*256));
-       p1k[3] = (u32)(pbyTA[2] + (pbyTA[3]*256));
-       p1k[4] = (u32)(pbyTA[4] + (pbyTA[5]*256));
-
-    /* Phase 1, step 2 */
-    for (i=0; i<8; i++) {
-        j = 2*(i & 1);
-        p1k[0] = (p1k[0] + tkip_sbox((p1k[4] ^ ((256*pbyTKey[1+j]) + pbyTKey[j])) % 65536)) % 65536;
-        p1k[1] = (p1k[1] + tkip_sbox((p1k[0] ^ ((256*pbyTKey[5+j]) + pbyTKey[4+j])) % 65536)) % 65536;
-        p1k[2] = (p1k[2] + tkip_sbox((p1k[1] ^ ((256*pbyTKey[9+j]) + pbyTKey[8+j])) % 65536)) % 65536;
-        p1k[3] = (p1k[3] + tkip_sbox((p1k[2] ^ ((256*pbyTKey[13+j]) + pbyTKey[12+j])) % 65536)) % 65536;
-        p1k[4] = (p1k[4] + tkip_sbox((p1k[3] ^ (((256*pbyTKey[1+j]) + pbyTKey[j]))) % 65536)) % 65536;
-        p1k[4] = (p1k[4] + i) % 65536;
-    }
-    /* Phase 2, Step 1 */
-    ppk0 = p1k[0];
-    ppk1 = p1k[1];
-    ppk2 = p1k[2];
-    ppk3 = p1k[3];
-    ppk4 = p1k[4];
-    ppk5 = (p1k[4] + tsc2) % 65536;
-
-    /* Phase2, Step 2 */
-       ppk0 = ppk0 + tkip_sbox((ppk5 ^ ((256*pbyTKey[1]) + pbyTKey[0])) % 65536);
-       ppk1 = ppk1 + tkip_sbox((ppk0 ^ ((256*pbyTKey[3]) + pbyTKey[2])) % 65536);
-       ppk2 = ppk2 + tkip_sbox((ppk1 ^ ((256*pbyTKey[5]) + pbyTKey[4])) % 65536);
-       ppk3 = ppk3 + tkip_sbox((ppk2 ^ ((256*pbyTKey[7]) + pbyTKey[6])) % 65536);
-       ppk4 = ppk4 + tkip_sbox((ppk3 ^ ((256*pbyTKey[9]) + pbyTKey[8])) % 65536);
-       ppk5 = ppk5 + tkip_sbox((ppk4 ^ ((256*pbyTKey[11]) + pbyTKey[10])) % 65536);
-
-       ppk0 = ppk0 + rotr1(ppk5 ^ ((256*pbyTKey[13]) + pbyTKey[12]));
-       ppk1 = ppk1 + rotr1(ppk0 ^ ((256*pbyTKey[15]) + pbyTKey[14]));
-       ppk2 = ppk2 + rotr1(ppk1);
-       ppk3 = ppk3 + rotr1(ppk2);
-       ppk4 = ppk4 + rotr1(ppk3);
-       ppk5 = ppk5 + rotr1(ppk4);
-
-    /* Phase 2, Step 3 */
-    pbyRC4Key[0] = (tsc2 >> 8) % 256;
-    pbyRC4Key[1] = (((tsc2 >> 8) % 256) | 0x20) & 0x7f;
-    pbyRC4Key[2] = tsc2 % 256;
-    pbyRC4Key[3] = ((ppk5 ^ ((256*pbyTKey[1]) + pbyTKey[0])) >> 1) % 256;
-
-    pbyRC4Key[4] = ppk0 % 256;
-    pbyRC4Key[5] = (ppk0 >> 8) % 256;
-
-    pbyRC4Key[6] = ppk1 % 256;
-    pbyRC4Key[7] = (ppk1 >> 8) % 256;
-
-    pbyRC4Key[8] = ppk2 % 256;
-    pbyRC4Key[9] = (ppk2 >> 8) % 256;
-
-    pbyRC4Key[10] = ppk3 % 256;
-    pbyRC4Key[11] = (ppk3 >> 8) % 256;
-
-    pbyRC4Key[12] = ppk4 % 256;
-    pbyRC4Key[13] = (ppk4 >> 8) % 256;
-
-    pbyRC4Key[14] = ppk5 % 256;
-    pbyRC4Key[15] = (ppk5 >> 8) % 256;
-}
diff --git a/drivers/staging/vt6656/tkip.h b/drivers/staging/vt6656/tkip.h
deleted file mode 100644 (file)
index 4fba7ef..0000000
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: tkip.h
- *
- * Purpose: Implement functions for 802.11i TKIP
- *
- * Author: Jerry Chen
- *
- * Date: Mar. 11, 2003
- *
- */
-
-#ifndef __TKIP_H__
-#define __TKIP_H__
-
-#include "tether.h"
-
-#define TKIP_KEY_LEN        16
-
-void TKIPvMixKey(
-    u8 *   pbyTKey,
-    u8 *   pbyTA,
-    u16    wTSC15_0,
-    u32   dwTSC47_16,
-    u8 *   pbyRC4Key
-    );
-
-#endif /* __TKIP_H__ */
diff --git a/drivers/staging/vt6656/tmacro.h b/drivers/staging/vt6656/tmacro.h
deleted file mode 100644 (file)
index 15e724e..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: tmacro.h
- *
- * Purpose: define basic common types and macros
- *
- * Author: Tevin Chen
- *
- * Date: May 21, 1996
- *
- */
-
-#ifndef __TMACRO_H__
-#define __TMACRO_H__
-
-/****** Common helper macros ***********************************************/
-
-#if !defined(LOBYTE)
-#define LOBYTE(w)           ((u8)(w))
-#endif
-#if !defined(HIBYTE)
-#define HIBYTE(w)           ((u8)(((u16)(w) >> 8) & 0xFF))
-#endif
-
-#if !defined(LOWORD)
-#define LOWORD(d)           ((u16)(d))
-#endif
-#if !defined(HIWORD)
-#define HIWORD(d)           ((u16)((((u32)(d)) >> 16) & 0xFFFF))
-#endif
-
-#if !defined(MAKEWORD)
-#define MAKEWORD(lb, hb)    ((u16)(((u8)(lb)) | (((u16)((u8)(hb))) << 8)))
-#endif
-
-#endif /* __TMACRO_H__ */
index e4751b71e4d3cd16bea380f058f4289ba6bac50f..428193e1497f4d3eec1c6204a3207e3e25edc1df 100644 (file)
@@ -230,9 +230,6 @@ int PIPEnsBulkInUsbRead(struct vnt_private *priv, struct vnt_rcb *rcb)
        int status = 0;
        struct urb *urb;
 
-       if (priv->Flags & fMP_DISCONNECTED)
-               return STATUS_FAILURE;
-
        urb = rcb->pUrb;
        if (rcb->skb == NULL) {
                dev_dbg(&priv->usb->dev, "rcb->skb is null\n");
@@ -242,7 +239,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *priv, struct vnt_rcb *rcb)
        usb_fill_bulk_urb(urb,
                priv->usb,
                usb_rcvbulkpipe(priv->usb, 2),
-               (void *) (rcb->skb->data),
+               skb_put(rcb->skb, skb_tailroom(rcb->skb)),
                MAX_TOTAL_SIZE_WITH_ALL_HEADERS,
                s_nsBulkInUsbIoCompleteRead,
                rcb);
@@ -297,22 +294,30 @@ static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
        if (urb->actual_length) {
                spin_lock_irqsave(&priv->lock, flags);
 
-               if (RXbBulkInProcessData(priv, rcb, urb->actual_length) == true)
+               if (vnt_rx_data(priv, rcb, urb->actual_length))
                        re_alloc_skb = true;
 
                spin_unlock_irqrestore(&priv->lock, flags);
        }
 
-       rcb->Ref--;
-       if (rcb->Ref == 0) {
-               dev_dbg(&priv->usb->dev,
-                               "RxvFreeNormal %d\n", priv->NumRecvFreeList);
+       if (re_alloc_skb) {
+               rcb->skb = dev_alloc_skb(priv->rx_buf_sz);
+               if (!rcb->skb) {
+                       dev_dbg(&priv->usb->dev, "Failed to re-alloc rx skb\n");
 
-               spin_lock_irqsave(&priv->lock, flags);
+                       rcb->bBoolInUse = false;
 
-               RXvFreeRCB(rcb, re_alloc_skb);
+                       return;
+               }
 
-               spin_unlock_irqrestore(&priv->lock, flags);
+               urb->transfer_buffer = skb_put(rcb->skb,
+                                               skb_tailroom(rcb->skb));
+       }
+
+       if (usb_submit_urb(urb, GFP_ATOMIC)) {
+               dev_dbg(&priv->usb->dev, "Failed to re submit rx skb\n");
+
+               rcb->bBoolInUse = false;
        }
 
        return;
@@ -338,8 +343,6 @@ int PIPEnsSendBulkOut(struct vnt_private *priv,
        int status;
        struct urb *urb;
 
-       priv->bPWBitOn = false;
-
        if (!(MP_IS_READY(priv) && priv->Flags & fMP_POST_WRITES)) {
                context->in_use = false;
                return STATUS_RESOURCES;
@@ -398,7 +401,7 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
 {
        struct vnt_usb_send_context *context = urb->context;
        struct vnt_private *priv = context->priv;
-       u8 context_type = context->type;
+       struct ieee80211_tx_info *info;
 
        switch (urb->status) {
        case 0:
@@ -415,24 +418,18 @@ static void s_nsBulkOutIoCompleteWrite(struct urb *urb)
                break;
        }
 
-       if (!netif_device_present(priv->dev))
-               return;
-
-       if (CONTEXT_DATA_PACKET == context_type) {
-               if (context->skb != NULL) {
-                       dev_kfree_skb_irq(context->skb);
-                       context->skb = NULL;
-                       dev_dbg(&priv->usb->dev,
-                                       "tx  %d bytes\n", context->buf_len);
-               }
-
-               priv->dev->trans_start = jiffies;
+       if (context->skb) {
+               info = IEEE80211_SKB_CB(context->skb);
+               ieee80211_tx_info_clear_status(info);
+               info->status.rates[0].idx = priv->wCurrentRate;
+               info->status.rates[0].count = 0;
+               if (!urb->status)
+                       info->flags |= IEEE80211_TX_STAT_ACK;
+               ieee80211_tx_status_irqsafe(priv->hw, context->skb);
        }
 
-       if (priv->bLinkPass == true) {
-               if (netif_queue_stopped(priv->dev))
-                       netif_wake_queue(priv->dev);
-       }
+       if (context->type == CONTEXT_DATA_PACKET)
+               ieee80211_wake_queues(priv->hw);
 
        context->in_use = false;
 
diff --git a/drivers/staging/vt6656/vntconfiguration.dat b/drivers/staging/vt6656/vntconfiguration.dat
deleted file mode 100644 (file)
index 933774c..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-#VNT Configuration
-[start]
-ZONETYPE=EUROPE
-AUTHENMODE=12
-ENCRYPTIONMODE=34
-[end]
\ No newline at end of file
index da72d4df6fcaf54512d584187bac9c873a54201e..b62726f29c5316a986d1efb30ce57cc31b2abd94 100644 (file)
  *
  */
 
-#include "tmacro.h"
 #include "device.h"
 #include "mac.h"
 #include "card.h"
-#include "80211hdr.h"
 #include "wcmd.h"
-#include "wmgr.h"
 #include "power.h"
-#include "wctl.h"
 #include "baseband.h"
 #include "usbpipe.h"
 #include "rxtx.h"
 #include "rf.h"
 #include "channel.h"
-#include "iowpa.h"
 
 static int msglevel = MSG_LEVEL_INFO;
 //static int msglevel = MSG_LEVEL_DEBUG;
 
-static void s_vProbeChannel(struct vnt_private *);
-
-static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *,
-       struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID,
-       PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
 static int s_bCommandComplete(struct vnt_private *);
 
-static int s_bClearBSSID_SCAN(struct vnt_private *);
-
-/*
- * Description:
- *      Stop AdHoc beacon during scan process
- *
- * Parameters:
- *  In:
- *      pDevice     - Pointer to the adapter
- *  Out:
- *      none
- *
- * Return Value: none
- *
- */
-
-static void vAdHocBeaconStop(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int bStop;
-
-       /*
-        * temporarily stop Beacon packet for AdHoc Server
-        * if all of the following coditions are met:
-        *  (1) STA is in AdHoc mode
-        *  (2) VT3253 is programmed as automatic Beacon Transmitting
-        *  (3) One of the following conditions is met
-        *      (3.1) AdHoc channel is in B/G band and the
-        *      current scan channel is in A band
-        *      or
-        *      (3.2) AdHoc channel is in A mode
-        */
-       bStop = false;
-       if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
-           (pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
-               if ((pMgmt->uIBSSChannel <=  CB_MAX_CHANNEL_24G) &&
-                   (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) {
-                       bStop = true;
-               }
-               if (pMgmt->uIBSSChannel >  CB_MAX_CHANNEL_24G)
-                       bStop = true;
-       }
-
-       if (bStop) {
-               //PMESG(("STOP_BEACON: IBSSChannel = %u, ScanChannel = %u\n",
-               //        pMgmt->uIBSSChannel, pMgmt->uScanChannel));
-               MACvRegBitsOff(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
-       }
-
-} /* vAdHocBeaconStop */
-
-/*
- * Description:
- *      Restart AdHoc beacon after scan process complete
- *
- * Parameters:
- *  In:
- *      pDevice     - Pointer to the adapter
- *  Out:
- *      none
- *
- * Return Value: none
- *
- */
-static void vAdHocBeaconRestart(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-    /*
-     * Restart Beacon packet for AdHoc Server
-     * if all of the following coditions are met:
-     *  (1) STA is in AdHoc mode
-     *  (2) VT3253 is programmed as automatic Beacon Transmitting
-     */
-       if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
-           (pMgmt->eCurrState >= WMAC_STATE_STARTED)) {
-               //PMESG(("RESTART_BEACON\n"));
-               MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
-       }
-
-}
-
-/*+
- *
- * Routine Description:
- *   Prepare and send probe request management frames.
- *
- *
- * Return Value:
- *    none.
- *
--*/
-
-static void s_vProbeChannel(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       struct vnt_tx_mgmt *pTxPacket;
-       u8 abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES,
-                       8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
-                       /* 1M,   2M,   5M,   11M,  18M,  24M,  36M,  54M*/
-       u8 abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES,
-                       4, 0x0C, 0x12, 0x18, 0x60};
-                       /* 6M,   9M,   12M,  48M*/
-       u8 abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES,
-                       8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
-       u8 abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES,
-                       4, 0x02, 0x04, 0x0B, 0x16};
-       u8 *pbyRate;
-       int ii;
-
-       if (pDevice->byBBType == BB_TYPE_11A)
-               pbyRate = &abyCurrSuppRatesA[0];
-       else if (pDevice->byBBType == BB_TYPE_11B)
-               pbyRate = &abyCurrSuppRatesB[0];
-       else
-               pbyRate = &abyCurrSuppRatesG[0];
-
-       // build an assocreq frame and send it
-       pTxPacket = s_MgrMakeProbeRequest
-                   (
-                    pDevice,
-                    pMgmt,
-                    pMgmt->abyScanBSSID,
-                    (PWLAN_IE_SSID)pMgmt->abyScanSSID,
-                    (PWLAN_IE_SUPP_RATES)pbyRate,
-                    (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRatesG
-                    );
-
-       if (pTxPacket != NULL) {
-               for (ii = 0; ii < 1; ii++) {
-                       if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request sending fail..\n");
-                       } else {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request is sending..\n");
-                       }
-               }
-       }
-
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an probe request frame
- *
- *
- * Return Value:
- *    A ptr to Tx frame or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeProbeRequest(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u8 *pScanBSSID, PWLAN_IE_SSID pSSID,
-       PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_PROBEREQ sFrame;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_PROBEREQ_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-       sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-       sFrame.len = WLAN_PROBEREQ_FR_MAXLEN;
-       vMgrEncodeProbeRequest(&sFrame);
-       sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-               (
-                WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-                WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PROBEREQ)
-                ));
-       memcpy(sFrame.pHdr->sA3.abyAddr1, pScanBSSID, WLAN_ADDR_LEN);
-       memcpy(sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-       memcpy(sFrame.pHdr->sA3.abyAddr3, pScanBSSID, WLAN_BSSID_LEN);
-       // Copy the SSID, pSSID->len=0 indicate broadcast SSID
-       sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
-       sFrame.len += pSSID->len + WLAN_IEHDR_LEN;
-       memcpy(sFrame.pSSID, pSSID, pSSID->len + WLAN_IEHDR_LEN);
-       sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-       sFrame.len += pCurrRates->len + WLAN_IEHDR_LEN;
-       memcpy(sFrame.pSuppRates, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
-       // Copy the extension rate set
-       if (pDevice->byBBType == BB_TYPE_11G) {
-               sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-               sFrame.len += pCurrExtSuppRates->len + WLAN_IEHDR_LEN;
-               memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, pCurrExtSuppRates->len + WLAN_IEHDR_LEN);
-       }
-       pTxPacket->cbMPDULen = sFrame.len;
-       pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-       return pTxPacket;
-}
-
 static void
 vCommandTimerWait(struct vnt_private *pDevice, unsigned long MSecond)
 {
@@ -269,16 +65,7 @@ void vRunCommand(struct work_struct *work)
 {
        struct vnt_private *pDevice =
                container_of(work, struct vnt_private, run_command_work.work);
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PWLAN_IE_SSID pItemSSID;
-       PWLAN_IE_SSID pItemSSIDCurr;
-       CMD_STATUS Status;
-       struct sk_buff  *skb;
-       union iwreq_data wrqu;
-       int ii;
-       u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
        u8 byData;
-       unsigned long flags;
 
        if (pDevice->Flags & fMP_DISCONNECTED)
                return;
@@ -287,535 +74,21 @@ void vRunCommand(struct work_struct *work)
                return;
 
        switch (pDevice->eCommandState) {
-
-       case WLAN_CMD_SCAN_START:
-
-               pDevice->byReAssocCount = 0;
-               if (pDevice->bRadioOff == true)
-                       break;
-
-               if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)
-                       break;
-
-               pItemSSID = (PWLAN_IE_SSID)pMgmt->abyScanSSID;
-
-               if (pMgmt->uScanChannel == 0)
-                       pMgmt->uScanChannel = pDevice->byMinChannel;
-               if (pMgmt->uScanChannel > pDevice->byMaxChannel) {
-                       pDevice->eCommandState = WLAN_CMD_SCAN_END;
-                       break;
-               } else {
-                       if (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel)) {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Invalid channel pMgmt->uScanChannel = %d\n", pMgmt->uScanChannel);
-                               pMgmt->uScanChannel++;
-                               break;
-                       }
-                       if (pMgmt->uScanChannel == pDevice->byMinChannel) {
-                               // pMgmt->eScanType = WMAC_SCAN_ACTIVE;          //mike mark
-                               pMgmt->abyScanBSSID[0] = 0xFF;
-                               pMgmt->abyScanBSSID[1] = 0xFF;
-                               pMgmt->abyScanBSSID[2] = 0xFF;
-                               pMgmt->abyScanBSSID[3] = 0xFF;
-                               pMgmt->abyScanBSSID[4] = 0xFF;
-                               pMgmt->abyScanBSSID[5] = 0xFF;
-                               pItemSSID->byElementID = WLAN_EID_SSID;
-                               // clear bssid list
-                               /* BSSvClearBSSList((void *) pDevice, pDevice->bLinkPass); */
-                               pMgmt->eScanState = WMAC_IS_SCANNING;
-                               pDevice->byScanBBType = pDevice->byBBType;  //lucas
-                               pDevice->bStopDataPkt = true;
-                               // Turn off RCR_BSSID filter every time
-                               MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_BSSID);
-                               pDevice->byRxMode &= ~RCR_BSSID;
-                       }
-                       //lucas
-                       vAdHocBeaconStop(pDevice);
-                       if ((pDevice->byBBType != BB_TYPE_11A) &&
-                           (pMgmt->uScanChannel > CB_MAX_CHANNEL_24G)) {
-                               pDevice->byBBType = BB_TYPE_11A;
-                               CARDvSetBSSMode(pDevice);
-                       } else if ((pDevice->byBBType == BB_TYPE_11A) &&
-                                  (pMgmt->uScanChannel <= CB_MAX_CHANNEL_24G)) {
-                               pDevice->byBBType = BB_TYPE_11G;
-                               CARDvSetBSSMode(pDevice);
-                       }
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning....  channel: [%d]\n", pMgmt->uScanChannel);
-                       // Set channel
-                       CARDbSetMediaChannel(pDevice, pMgmt->uScanChannel);
-                       // Set Baseband to be more sensitive.
-
-                       BBvSetShortSlotTime(pDevice);
-                       BBvSetVGAGainOffset(pDevice, pDevice->abyBBVGA[0]);
-                       BBvUpdatePreEDThreshold(pDevice, true);
-
-                       pMgmt->uScanChannel++;
-
-                       while (!ChannelValid(pDevice->byZoneType, pMgmt->uScanChannel) &&
-                               pMgmt->uScanChannel <= pDevice->byMaxChannel){
-                               pMgmt->uScanChannel++;
-                       }
-
-                       if (pMgmt->uScanChannel > pDevice->byMaxChannel) {
-                               // Set Baseband to be not sensitive and rescan
-                               pDevice->eCommandState = WLAN_CMD_SCAN_END;
-                       }
-                       if ((pMgmt->b11hEnable == false) ||
-                           (pMgmt->uScanChannel < CB_MAX_CHANNEL_24G)) {
-                               s_vProbeChannel(pDevice);
-                               vCommandTimerWait((void *) pDevice, 100);
-                               return;
-                       } else {
-                               vCommandTimerWait((void *) pDevice, WCMD_PASSIVE_SCAN_TIME);
-                               return;
-                       }
-               }
-
-               break;
-
-       case WLAN_CMD_SCAN_END:
-
-               // Set Baseband's sensitivity back.
-               if (pDevice->byBBType != pDevice->byScanBBType) {
-                       pDevice->byBBType = pDevice->byScanBBType;
-                       CARDvSetBSSMode(pDevice);
-               }
-
-               BBvSetShortSlotTime(pDevice);
-               BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
-               BBvUpdatePreEDThreshold(pDevice, false);
-
-               // Set channel back
-               vAdHocBeaconRestart(pDevice);
-               // Set channel back
-               CARDbSetMediaChannel(pDevice, pMgmt->uCurrChannel);
-               // Set Filter
-               if (pMgmt->bCurrBSSIDFilterOn) {
-                       MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
-                       pDevice->byRxMode |= RCR_BSSID;
-               }
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Scanning, set back to channel: [%d]\n", pMgmt->uCurrChannel);
-               pMgmt->uScanChannel = 0;
-               pMgmt->eScanState = WMAC_NO_SCANNING;
-               pDevice->bStopDataPkt = false;
-
-               /*send scan event to wpa_Supplicant*/
-               PRINT_K("wireless_send_event--->SIOCGIWSCAN(scan done)\n");
-               memset(&wrqu, 0, sizeof(wrqu));
-               wireless_send_event(pDevice->dev, SIOCGIWSCAN, &wrqu, NULL);
-
-               break;
-
-       case WLAN_CMD_DISASSOCIATE_START:
-               pDevice->byReAssocCount = 0;
-               if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
-                   (pMgmt->eCurrState != WMAC_STATE_ASSOC)) {
-                       break;
-               } else {
-                       pDevice->bwextstep0 = false;
-                       pDevice->bwextstep1 = false;
-                       pDevice->bwextstep2 = false;
-                       pDevice->bwextstep3 = false;
-                       pDevice->bWPASuppWextEnabled = false;
-                       pDevice->fWPA_Authened = false;
-
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Send Disassociation Packet..\n");
-                       // reason = 8 : disassoc because sta has left
-                       vMgrDisassocBeginSta((void *) pDevice,
-                                            pMgmt,
-                                            pMgmt->abyCurrBSSID,
-                                            (8),
-                                            &Status);
-                       pDevice->bLinkPass = false;
-
-                       vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-
-                       // unlock command busy
-                       pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-                       pItemSSID->len = 0;
-                       memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);
-                       pMgmt->eCurrState = WMAC_STATE_IDLE;
-                       pMgmt->sNodeDBTable[0].bActive = false;
-//                     pDevice->bBeaconBufReady = false;
-               }
-               netif_stop_queue(pDevice->dev);
-               if (pDevice->bNeedRadioOFF == true)
-                       CARDbRadioPowerOff(pDevice);
-
-               break;
-
-       case WLAN_CMD_SSID_START:
-
-               pDevice->byReAssocCount = 0;
-               if (pDevice->bRadioOff == true)
+       case WLAN_CMD_INIT_MAC80211_START:
+               if (pDevice->mac_hw)
                        break;
 
-               memcpy(pMgmt->abyAdHocSSID, pMgmt->abyDesireSSID,
-                      ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN);
-
-               pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
-               pItemSSIDCurr = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: desire ssid = %s\n", pItemSSID->abySSID);
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" cmd: curr ssid = %s\n", pItemSSIDCurr->abySSID);
-
-               if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Cmd pMgmt->eCurrState == WMAC_STATE_ASSOC\n");
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSID->len =%d\n", pItemSSID->len);
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" pItemSSIDCurr->len = %d\n", pItemSSIDCurr->len);
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" desire ssid = %s\n", pItemSSID->abySSID);
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" curr ssid = %s\n", pItemSSIDCurr->abySSID);
-               }
-
-               if ((pMgmt->eCurrState == WMAC_STATE_ASSOC) ||
-                   ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED))) {
-                       if (pItemSSID->len == pItemSSIDCurr->len) {
-                               if (!memcmp(pItemSSID->abySSID,
-                                       pItemSSIDCurr->abySSID, pItemSSID->len))
-                                       break;
-                       }
-                       netif_stop_queue(pDevice->dev);
-                       pDevice->bLinkPass = false;
+               dev_info(&pDevice->usb->dev, "Starting mac80211\n");
 
-                       vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-               }
-               // set initial state
-               pMgmt->eCurrState = WMAC_STATE_IDLE;
-               pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-               PSvDisablePowerSaving((void *) pDevice);
-               BSSvClearNodeDBTable(pDevice, 0);
-               vMgrJoinBSSBegin((void *) pDevice, &Status);
-               // if Infra mode
-               if ((pMgmt->eCurrMode == WMAC_MODE_ESS_STA) && (pMgmt->eCurrState == WMAC_STATE_JOINTED)) {
-                       // Call mgr to begin the deauthentication
-                       // reason = (3) because sta has left ESS
-                       if (pMgmt->eCurrState >= WMAC_STATE_AUTH) {
-                               vMgrDeAuthenBeginSta((void *)pDevice,
-                                                    pMgmt,
-                                                    pMgmt->abyCurrBSSID,
-                                                    (3),
-                                                    &Status);
-                       }
-                       // Call mgr to begin the authentication
-                       vMgrAuthenBeginSta((void *) pDevice, pMgmt, &Status);
-                       if (Status == CMD_STATUS_SUCCESS) {
-                               pDevice->byLinkWaitCount = 0;
-                               pDevice->eCommandState = WLAN_AUTHENTICATE_WAIT;
-                               vCommandTimerWait((void *) pDevice, AUTHENTICATE_TIMEOUT);
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" Set eCommandState = WLAN_AUTHENTICATE_WAIT\n");
-                               return;
-                       }
-               }
-               // if Adhoc mode
-               else if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-                       if (pMgmt->eCurrState == WMAC_STATE_JOINTED) {
-                               if (netif_queue_stopped(pDevice->dev))
-                                       netif_wake_queue(pDevice->dev);
-                               pDevice->bLinkPass = true;
-
-                               vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-                               pMgmt->sNodeDBTable[0].bActive = true;
-                               pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-                       } else {
-                               // start own IBSS
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "CreateOwn IBSS by CurrMode = IBSS_STA\n");
-                               vMgrCreateOwnIBSS((void *) pDevice, &Status);
-                               if (Status != CMD_STATUS_SUCCESS) {
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n");
-                               }
-                               BSSvAddMulticastNode(pDevice);
-                       }
-                       s_bClearBSSID_SCAN(pDevice);
-               }
-               // if SSID not found
-               else if (pMgmt->eCurrMode == WMAC_MODE_STANDBY) {
-                       if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA ||
-                           pMgmt->eConfigMode == WMAC_CONFIG_AUTO) {
-                               // start own IBSS
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                       KERN_INFO "CreateOwn IBSS by CurrMode = STANDBY\n");
-                               vMgrCreateOwnIBSS((void *) pDevice, &Status);
-                               if (Status != CMD_STATUS_SUCCESS) {
-                                       DBG_PRT(MSG_LEVEL_DEBUG,
-                                               KERN_INFO "WLAN_CMD_IBSS_CREATE fail!\n");
-                               }
-                               BSSvAddMulticastNode(pDevice);
-                               s_bClearBSSID_SCAN(pDevice);
-/*
-                               pDevice->bLinkPass = true;
-                               if (netif_queue_stopped(pDevice->dev)){
-                                       netif_wake_queue(pDevice->dev);
-                               }
-                               s_bClearBSSID_SCAN(pDevice);
-*/
-                       } else {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Disconnect SSID none\n");
-                               // if(pDevice->bWPASuppWextEnabled == true)
-                               {
-                                       union iwreq_data  wrqu;
-                                       memset(&wrqu, 0, sizeof(wrqu));
-                                       wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-                                       PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated:vMgrJoinBSSBegin Fail !!)\n");
-                                       wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-                               }
-                       }
-               }
-               break;
-
-       case WLAN_AUTHENTICATE_WAIT:
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_AUTHENTICATE_WAIT\n");
-               if (pMgmt->eCurrState == WMAC_STATE_AUTH) {
-                       pDevice->byLinkWaitCount = 0;
-                       // Call mgr to begin the association
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_AUTH\n");
-                       vMgrAssocBeginSta((void *) pDevice, pMgmt, &Status);
-                       if (Status == CMD_STATUS_SUCCESS) {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState = WLAN_ASSOCIATE_WAIT\n");
-                               pDevice->byLinkWaitCount = 0;
-                               pDevice->eCommandState = WLAN_ASSOCIATE_WAIT;
-                               vCommandTimerWait((void *) pDevice, ASSOCIATE_TIMEOUT);
-                               return;
-                       }
-               } else if (pMgmt->eCurrState < WMAC_STATE_AUTHPENDING) {
-                       printk("WLAN_AUTHENTICATE_WAIT:Authen Fail???\n");
-               } else if (pDevice->byLinkWaitCount <= 4) {
-                       //mike add:wait another 2 sec if authenticated_frame delay!
-                       pDevice->byLinkWaitCount++;
-                       printk("WLAN_AUTHENTICATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
-                       vCommandTimerWait((void *) pDevice, AUTHENTICATE_TIMEOUT/2);
-                       return;
-               }
-               pDevice->byLinkWaitCount = 0;
-
-               break;
-
-       case WLAN_ASSOCIATE_WAIT:
-               if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCurrState == WMAC_STATE_ASSOC\n");
-                       if (pDevice->ePSMode != WMAC_POWER_CAM) {
-                               PSvEnablePowerSaving((void *) pDevice,
-                                               pMgmt->wListenInterval);
-                       }
-/*
-                       if (pMgmt->eAuthenMode >= WMAC_AUTH_WPA) {
-                               KeybRemoveAllKey(pDevice, &(pDevice->sKey), pDevice->abyBSSID);
-                       }
-*/
-                       pDevice->byLinkWaitCount = 0;
-                       pDevice->byReAssocCount = 0;
-                       pDevice->bLinkPass = true;
-
-                       vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-                       s_bClearBSSID_SCAN(pDevice);
-
-                       if (netif_queue_stopped(pDevice->dev))
-                               netif_wake_queue(pDevice->dev);
-
-               } else if (pMgmt->eCurrState < WMAC_STATE_ASSOCPENDING) {
-                       printk("WLAN_ASSOCIATE_WAIT:Association Fail???\n");
-               } else if (pDevice->byLinkWaitCount <= 4) {
-                       //mike add:wait another 2 sec if associated_frame delay!
-                       pDevice->byLinkWaitCount++;
-                       printk("WLAN_ASSOCIATE_WAIT:wait %d times!!\n", pDevice->byLinkWaitCount);
-                       vCommandTimerWait((void *) pDevice, ASSOCIATE_TIMEOUT/2);
+               if (vnt_init(pDevice)) {
+                       /* If fail all ends TODO retry */
+                       dev_err(&pDevice->usb->dev, "failed to start\n");
+                       ieee80211_free_hw(pDevice->hw);
                        return;
                }
 
                break;
 
-       case WLAN_CMD_AP_MODE_START:
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_AP_MODE_START\n");
-
-               if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
-                       cancel_delayed_work_sync(&pDevice->second_callback_work);
-                       pMgmt->eCurrState = WMAC_STATE_IDLE;
-                       pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-                       pDevice->bLinkPass = false;
-
-                       vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-
-                       BSSvClearNodeDBTable(pDevice, 0);
-
-                       pDevice->uAssocCount = 0;
-                       pMgmt->eCurrState = WMAC_STATE_IDLE;
-                       pDevice->bFixRate = false;
-
-                       vMgrCreateOwnIBSS((void *) pDevice, &Status);
-                       if (Status != CMD_STATUS_SUCCESS) {
-                               DBG_PRT(MSG_LEVEL_DEBUG,
-                                       KERN_INFO "vMgrCreateOwnIBSS fail!\n");
-                       }
-                       // always turn off unicast bit
-                       MACvRegBitsOff(pDevice, MAC_REG_RCR, RCR_UNICAST);
-                       pDevice->byRxMode &= ~RCR_UNICAST;
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wcmd: rx_mode = %x\n", pDevice->byRxMode);
-                       BSSvAddMulticastNode(pDevice);
-                       if (netif_queue_stopped(pDevice->dev))
-                               netif_wake_queue(pDevice->dev);
-                       pDevice->bLinkPass = true;
-
-                       vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-                       schedule_delayed_work(&pDevice->second_callback_work, HZ);
-               }
-               break;
-
-       case WLAN_CMD_TX_PSPACKET_START:
-               // DTIM Multicast tx
-               if (pMgmt->sNodeDBTable[0].bRxPSPoll) {
-                       while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[0].sTxPSQueue)) != NULL) {
-                               if (skb_queue_empty(&pMgmt->sNodeDBTable[0].sTxPSQueue)) {
-                                       pMgmt->abyPSTxMap[0] &= ~byMask[0];
-                                       pDevice->bMoreData = false;
-                               } else {
-                                       pDevice->bMoreData = true;
-                               }
-
-                               spin_lock_irqsave(&pDevice->lock, flags);
-
-                               if (nsDMA_tx_packet(pDevice, skb) != 0)
-                                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Multicast ps tx fail\n");
-
-                               spin_unlock_irqrestore(&pDevice->lock, flags);
-
-                               pMgmt->sNodeDBTable[0].wEnQueueCnt--;
-                       }
-               }
-
-               // PS nodes tx
-               for (ii = 1; ii < (MAX_NODE_NUM + 1); ii++) {
-                       if (pMgmt->sNodeDBTable[ii].bActive &&
-                           pMgmt->sNodeDBTable[ii].bRxPSPoll) {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d Enqueu Cnt= %d\n",
-                                               ii, pMgmt->sNodeDBTable[ii].wEnQueueCnt);
-                               while ((skb = skb_dequeue(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) != NULL) {
-                                       if (skb_queue_empty(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) {
-                                               // clear tx map
-                                               pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &=
-                                                                       ~byMask[pMgmt->sNodeDBTable[ii].wAID & 7];
-                                               pDevice->bMoreData = false;
-                                       } else {
-                                               pDevice->bMoreData = true;
-                                       }
-
-                                       spin_lock_irqsave(&pDevice->lock, flags);
-
-                                       if (nsDMA_tx_packet(pDevice, skb) != 0)
-                                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "sta ps tx fail\n");
-
-                                       spin_unlock_irqrestore(&pDevice->lock, flags);
-
-                                       pMgmt->sNodeDBTable[ii].wEnQueueCnt--;
-                                       // check if sta ps enable, wait next pspoll
-                                       // if sta ps disable, send all pending buffers.
-                                       if (pMgmt->sNodeDBTable[ii].bPSEnable)
-                                               break;
-                               }
-                               if (skb_queue_empty(&pMgmt->sNodeDBTable[ii].sTxPSQueue)) {
-                                       // clear tx map
-                                       pMgmt->abyPSTxMap[pMgmt->sNodeDBTable[ii].wAID >> 3] &=
-                                                       ~byMask[pMgmt->sNodeDBTable[ii].wAID & 7];
-                                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Index=%d PS queue clear\n", ii);
-                               }
-                               pMgmt->sNodeDBTable[ii].bRxPSPoll = false;
-                       }
-               }
-               break;
-
-       case WLAN_CMD_RADIO_START:
-
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState == WLAN_CMD_RADIO_START\n");
-//             if (pDevice->bRadioCmd == true)
-//                     CARDbRadioPowerOn(pDevice);
-//             else
-//                     CARDbRadioPowerOff(pDevice);
-               {
-                       int ntStatus = STATUS_SUCCESS;
-                       u8            byTmp;
-
-                       ntStatus = vnt_control_in(pDevice,
-                                       MESSAGE_TYPE_READ,
-                                       MAC_REG_GPIOCTL1,
-                                       MESSAGE_REQUEST_MACREG,
-                                       1,
-                                       &byTmp);
-
-                       if (ntStatus != STATUS_SUCCESS)
-                               break;
-                       if ((byTmp & GPIO3_DATA) == 0) {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_RADIO_START_OFF........................\n");
-                               // Old commands are useless.
-                               // empty command Q
-                               pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
-                               pDevice->uCmdDequeueIdx = 0;
-                               pDevice->uCmdEnqueueIdx = 0;
-                               //0415pDevice->bCmdRunning = false;
-                               pDevice->bCmdClear = true;
-                               pDevice->bStopTx0Pkt = false;
-                               pDevice->bStopDataPkt = true;
-
-                               pDevice->byKeyIndex = 0;
-                               pDevice->bTransmitKey = false;
-
-                               KeyvInitTable(pDevice, &pDevice->sKey);
-
-                               pMgmt->byCSSPK = KEY_CTL_NONE;
-                               pMgmt->byCSSGK = KEY_CTL_NONE;
-
-                               if (pDevice->bLinkPass == true) {
-                                       // reason = 8 : disassoc because sta has left
-                                       vMgrDisassocBeginSta((void *) pDevice,
-                                                       pMgmt,
-                                                       pMgmt->abyCurrBSSID,
-                                                       (8),
-                                                       &Status);
-                                       pDevice->bLinkPass = false;
-                                       // unlock command busy
-                                       pMgmt->eCurrState = WMAC_STATE_IDLE;
-                                       pMgmt->sNodeDBTable[0].bActive = false;
-                                       // if(pDevice->bWPASuppWextEnabled == true)
-                                       {
-                                               union iwreq_data  wrqu;
-                                               memset(&wrqu, 0, sizeof(wrqu));
-                                               wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-                                               PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
-                                               wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-                                       }
-                               }
-                               pDevice->bwextstep0 = false;
-                               pDevice->bwextstep1 = false;
-                               pDevice->bwextstep2 = false;
-                               pDevice->bwextstep3 = false;
-                               pDevice->bWPASuppWextEnabled = false;
-                               //clear current SSID
-                               pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-                               pItemSSID->len = 0;
-                               memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);
-                               //clear desired SSID
-                               pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
-                               pItemSSID->len = 0;
-                               memset(pItemSSID->abySSID, 0, WLAN_SSID_MAXLEN);
-
-                               netif_stop_queue(pDevice->dev);
-                               CARDbRadioPowerOff(pDevice);
-                               MACvRegBitsOn(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
-
-                               vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_OFF);
-
-                               pDevice->bHWRadioOff = true;
-                       } else {
-                               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO" WLAN_CMD_RADIO_START_ON........................\n");
-                               pDevice->bHWRadioOff = false;
-                               CARDbRadioPowerOn(pDevice);
-                               MACvRegBitsOff(pDevice, MAC_REG_GPIOCTL1, GPIO3_INTMD);
-
-                               vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_ON);
-                       }
-               }
-
-               break;
-
        case WLAN_CMD_CHANGE_BBSENSITIVITY_START:
 
                pDevice->bStopDataPkt = true;
@@ -826,17 +99,23 @@ void vRunCommand(struct work_struct *work)
                break;
 
        case WLAN_CMD_TBTT_WAKEUP_START:
-               PSbIsNextTBTTWakeUp(pDevice);
+               vnt_next_tbtt_wakeup(pDevice);
                break;
 
        case WLAN_CMD_BECON_SEND_START:
-               bMgrPrepareBeaconToSend(pDevice, pMgmt);
+               if (!pDevice->vif)
+                       break;
+
+               vnt_beacon_make(pDevice, pDevice->vif);
+
+               vnt_mac_reg_bits_on(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
+
                break;
 
        case WLAN_CMD_SETPOWER_START:
 
                vnt_rf_setpower(pDevice, pDevice->wCurrentRate,
-                                                       pMgmt->uCurrChannel);
+                               pDevice->hw->conf.chandef.chan->hw_value);
 
                break;
 
@@ -857,10 +136,6 @@ void vRunCommand(struct work_struct *work)
                }
                break;
 
-       case WLAN_CMD_REMOVE_ALLKEY_START:
-               KeybRemoveAllKey(pDevice, &(pDevice->sKey), pDevice->abyBSSID);
-               break;
-
        case WLAN_CMD_MAC_DISPOWERSAVING_START:
                vnt_control_in_u8(pDevice, MESSAGE_REQUEST_MACREG, MAC_REG_PSCTL, &byData);
                if ((byData & PSCTL_PS) != 0) {
@@ -876,14 +151,10 @@ void vRunCommand(struct work_struct *work)
                break;
 
        case WLAN_CMD_11H_CHSW_START:
-               CARDbSetMediaChannel(pDevice, pDevice->byNewChannel);
-               pDevice->bChannelSwitch = false;
-               pMgmt->uCurrChannel = pDevice->byNewChannel;
-               pDevice->bStopDataPkt = false;
+               vnt_set_channel(pDevice, pDevice->hw->conf.chandef.chan->hw_value);
                break;
 
        case WLAN_CMD_CONFIGURE_FILTER_START:
-               vnt_configure_filter(pDevice);
                break;
        default:
                break;
@@ -896,8 +167,6 @@ void vRunCommand(struct work_struct *work)
 
 static int s_bCommandComplete(struct vnt_private *pDevice)
 {
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PWLAN_IE_SSID pSSID;
        int bRadioCmd = false;
        int bForceSCAN = true;
 
@@ -908,47 +177,16 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
                return true;
        } else {
                pDevice->eCommand = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].eCmd;
-               pSSID = (PWLAN_IE_SSID)pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].abyCmdDesireSSID;
                bRadioCmd = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bRadioCmd;
                bForceSCAN = pDevice->eCmdQueue[pDevice->uCmdDequeueIdx].bForceSCAN;
                ADD_ONE_WITH_WRAP_AROUND(pDevice->uCmdDequeueIdx, CMD_Q_SIZE);
                pDevice->cbFreeCmdQueue++;
                pDevice->bCmdRunning = true;
                switch (pDevice->eCommand) {
-               case WLAN_CMD_BSSID_SCAN:
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_BSSID_SCAN\n");
-                       pDevice->eCommandState = WLAN_CMD_SCAN_START;
-                       pMgmt->uScanChannel = 0;
-                       if (pSSID->len != 0)
-                               memcpy(pMgmt->abyScanSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-                       else
-                               memset(pMgmt->abyScanSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-/*
-                       if ((bForceSCAN == false) && (pDevice->bLinkPass == true)) {
-                               if ((pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) &&
-                                   ( !memcmp(pSSID->abySSID, ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID, pSSID->len))) {
-                                       pDevice->eCommandState = WLAN_CMD_IDLE;
-                               }
-                       }
-*/
-                       break;
-               case WLAN_CMD_SSID:
-                       pDevice->eCommandState = WLAN_CMD_SSID_START;
-                       if (pSSID->len > WLAN_SSID_MAXLEN)
-                               pSSID->len = WLAN_SSID_MAXLEN;
-                       if (pSSID->len != 0)
-                               memcpy(pMgmt->abyDesireSSID, pSSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"eCommandState= WLAN_CMD_SSID_START\n");
-                       break;
-               case WLAN_CMD_DISASSOCIATE:
-                       pDevice->eCommandState = WLAN_CMD_DISASSOCIATE_START;
-                       break;
-               case WLAN_CMD_RX_PSPOLL:
-                       pDevice->eCommandState = WLAN_CMD_TX_PSPACKET_START;
-                       break;
-               case WLAN_CMD_RUN_AP:
-                       pDevice->eCommandState = WLAN_CMD_AP_MODE_START;
+               case WLAN_CMD_INIT_MAC80211:
+                       pDevice->eCommandState = WLAN_CMD_INIT_MAC80211_START;
                        break;
+
                case WLAN_CMD_RADIO:
                        pDevice->eCommandState = WLAN_CMD_RADIO_START;
                        pDevice->bRadioCmd = bRadioCmd;
@@ -973,10 +211,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
                        pDevice->eCommandState = WLAN_CMD_CHANGE_ANTENNA_START;
                        break;
 
-               case WLAN_CMD_REMOVE_ALLKEY:
-                       pDevice->eCommandState = WLAN_CMD_REMOVE_ALLKEY_START;
-                       break;
-
                case WLAN_CMD_MAC_DISPOWERSAVING:
                        pDevice->eCommandState = WLAN_CMD_MAC_DISPOWERSAVING_START;
                        break;
@@ -985,11 +219,6 @@ static int s_bCommandComplete(struct vnt_private *pDevice)
                        pDevice->eCommandState = WLAN_CMD_11H_CHSW_START;
                        break;
 
-               case WLAN_CMD_CONFIGURE_FILTER:
-                       pDevice->eCommandState =
-                                               WLAN_CMD_CONFIGURE_FILTER_START;
-                       break;
-
                default:
                        break;
                }
@@ -1007,29 +236,8 @@ int bScheduleCommand(struct vnt_private *pDevice,
                return false;
        pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].eCmd = eCommand;
        pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = true;
-       memset(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID, 0 , WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
        if (pbyItem0 != NULL) {
                switch (eCommand) {
-               case WLAN_CMD_BSSID_SCAN:
-                       pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bForceSCAN = false;
-                       memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID,
-                               pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-                       break;
-
-               case WLAN_CMD_SSID:
-                       memcpy(pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].abyCmdDesireSSID,
-                               pbyItem0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-                       break;
-
-               case WLAN_CMD_DISASSOCIATE:
-                       pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bNeedRadioOFF = *((int *)pbyItem0);
-                       break;
-/*
-               case WLAN_CMD_DEAUTH:
-                       pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].wDeAuthenReason = *((u16 *)pbyItem0);
-                       break;
-*/
-
                case WLAN_CMD_RADIO:
                        pDevice->eCmdQueue[pDevice->uCmdEnqueueIdx].bRadioCmd = *((int *)pbyItem0);
                        break;
@@ -1049,42 +257,8 @@ int bScheduleCommand(struct vnt_private *pDevice,
 
 }
 
-/*
- * Description:
- *      Clear BSSID_SCAN cmd in CMD Queue
- *
- * Parameters:
- *  In:
- *      hDeviceContext  - Pointer to the adapter
- *      eCommand        - Command
- *  Out:
- *      none
- *
- * Return Value: true if success; otherwise false
- *
- */
-static int s_bClearBSSID_SCAN(struct vnt_private *pDevice)
-{
-       unsigned int uCmdDequeueIdx = pDevice->uCmdDequeueIdx;
-       unsigned int ii;
-
-       if ((pDevice->cbFreeCmdQueue < CMD_Q_SIZE) && (uCmdDequeueIdx != pDevice->uCmdEnqueueIdx)) {
-               for (ii = 0; ii < (CMD_Q_SIZE - pDevice->cbFreeCmdQueue); ii++) {
-                       if (pDevice->eCmdQueue[uCmdDequeueIdx].eCmd == WLAN_CMD_BSSID_SCAN)
-                               pDevice->eCmdQueue[uCmdDequeueIdx].eCmd = WLAN_CMD_IDLE;
-                       ADD_ONE_WITH_WRAP_AROUND(uCmdDequeueIdx, CMD_Q_SIZE);
-                       if (uCmdDequeueIdx == pDevice->uCmdEnqueueIdx)
-                               break;
-               }
-       }
-       return true;
-}
-
-//mike add:reset command timer
 void vResetCommandTimer(struct vnt_private *pDevice)
 {
-       cancel_delayed_work_sync(&pDevice->run_command_work);
-
        pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
        pDevice->uCmdDequeueIdx = 0;
        pDevice->uCmdEnqueueIdx = 0;
index 736572101badce8191ec58b9f744f95cce8a282f..1e5b739b6c3ecd73d2af5bd25ff31fbe0fe6a2c5 100644 (file)
 #ifndef __WCMD_H__
 #define __WCMD_H__
 
-#include "80211hdr.h"
-#include "80211mgr.h"
+#include "device.h"
 
 #define AUTHENTICATE_TIMEOUT   1000 //ms
 #define ASSOCIATE_TIMEOUT      1000 //ms
 
 // Command code
 typedef enum tagCMD_CODE {
+    WLAN_CMD_INIT_MAC80211,
     WLAN_CMD_BSSID_SCAN,
     WLAN_CMD_SSID,
     WLAN_CMD_DISASSOCIATE,
@@ -69,7 +69,6 @@ typedef enum tagCMD_STATUS {
 
 typedef struct tagCMD_ITEM {
     CMD_CODE eCmd;
-    u8     abyCmdDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
     bool     bNeedRadioOFF;
     bool     bRadioCmd;
     bool     bForceSCAN;
@@ -78,6 +77,7 @@ typedef struct tagCMD_ITEM {
 
 // Command state
 typedef enum tagCMD_STATE {
+    WLAN_CMD_INIT_MAC80211_START,
     WLAN_CMD_SCAN_START,
     WLAN_CMD_SCAN_END,
     WLAN_CMD_DISASSOCIATE_START,
diff --git a/drivers/staging/vt6656/wctl.c b/drivers/staging/vt6656/wctl.c
deleted file mode 100644 (file)
index efdc5d5..0000000
+++ /dev/null
@@ -1,244 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: wctl.c
- *
- * Purpose: handle WMAC duplicate filter & defragment
- *
- * Author: Jerry Chen
- *
- * Date: Jun. 27, 2002
- *
- * Functions:
- *      WCTLbIsDuplicate - Test if duplicate packet
- *      WCTLuSearchDFCB - Search DeFragment Control Database
- *      WCTLuInsertDFCB - Insert DeFragment Control Database
- *      WCTLbHandleFragment - Handle received fragment packet
- *
- * Revision History:
- *
- */
-
-#include "wctl.h"
-#include "device.h"
-#include "card.h"
-#include "tmacro.h"
-
-// static int          msglevel                =MSG_LEVEL_INFO;
-
-/*
- * Description:
- *      Scan Rx cache.  Return true if packet is duplicate, else
- *      inserts in receive cache and returns false.
- *
- * Parameters:
- *  In:
- *      pCache      - Receive packets history
- *      pMACHeader  - 802.11 MAC Header of received packet
- *  Out:
- *      none
- *
- * Return Value: true if packet duplicate; otherwise false
- *
- */
-
-bool WCTLbIsDuplicate (PSCache pCache, struct ieee80211_hdr *pMACHeader)
-{
-    unsigned int            uIndex;
-    unsigned int            ii;
-    PSCacheEntry    pCacheEntry;
-
-    if (IS_FC_RETRY(pMACHeader)) {
-
-        uIndex = pCache->uInPtr;
-        for (ii = 0; ii < DUPLICATE_RX_CACHE_LENGTH; ii++) {
-            pCacheEntry = &(pCache->asCacheEntry[uIndex]);
-            if ((pCacheEntry->wFmSequence == pMACHeader->seq_ctrl) &&
-               ether_addr_equal(pCacheEntry->abyAddr2, pMACHeader->addr2) &&
-               (pCacheEntry->wFrameCtl == pMACHeader->frame_control)
-                ) {
-                /* Duplicate match */
-                return true;
-            }
-            ADD_ONE_WITH_WRAP_AROUND(uIndex, DUPLICATE_RX_CACHE_LENGTH);
-        }
-    }
-    /* Not found in cache - insert */
-    pCacheEntry = &pCache->asCacheEntry[pCache->uInPtr];
-    pCacheEntry->wFmSequence = pMACHeader->seq_ctrl;
-    memcpy(&(pCacheEntry->abyAddr2[0]), &(pMACHeader->addr2[0]), ETH_ALEN);
-    pCacheEntry->wFrameCtl = pMACHeader->frame_control;
-    ADD_ONE_WITH_WRAP_AROUND(pCache->uInPtr, DUPLICATE_RX_CACHE_LENGTH);
-    return false;
-}
-
-/*
- * Description:
- *      Found if sequence number of received fragment packet in Defragment Database
- *
- * Parameters:
- *  In:
- *      pDevice     - Pointer to adapter
- *      pMACHeader  - 802.11 MAC Header of received packet
- *  Out:
- *      none
- *
- * Return Value: index number in Defragment Database
- *
- */
-
-unsigned int WCTLuSearchDFCB(struct vnt_private *pDevice,
-                            struct ieee80211_hdr *pMACHeader)
-{
-       unsigned int ii;
-
-       for (ii = 0; ii < pDevice->cbDFCB; ii++) {
-               if ((pDevice->sRxDFCB[ii].bInUse == true) &&
-                   ether_addr_equal(pDevice->sRxDFCB[ii].abyAddr2,
-                                    pMACHeader->addr2)) {
-                       return ii;
-               }
-       }
-       return pDevice->cbDFCB;
-}
-
-/*
- * Description:
- *      Insert received fragment packet in Defragment Database
- *
- * Parameters:
- *  In:
- *      pDevice     - Pointer to adapter
- *      pMACHeader  - 802.11 MAC Header of received packet
- *  Out:
- *      none
- *
- * Return Value: index number in Defragment Database
- *
- */
-unsigned int WCTLuInsertDFCB(struct vnt_private *pDevice,
-                            struct ieee80211_hdr *pMACHeader)
-{
-       unsigned int ii;
-
-    if (pDevice->cbFreeDFCB == 0)
-        return(pDevice->cbDFCB);
-    for (ii = 0; ii < pDevice->cbDFCB; ii++) {
-        if (pDevice->sRxDFCB[ii].bInUse == false) {
-            pDevice->cbFreeDFCB--;
-            pDevice->sRxDFCB[ii].uLifetime = pDevice->dwMaxReceiveLifetime;
-            pDevice->sRxDFCB[ii].bInUse = true;
-            pDevice->sRxDFCB[ii].wSequence = (pMACHeader->seq_ctrl >> 4);
-            pDevice->sRxDFCB[ii].wFragNum = (pMACHeader->seq_ctrl & 0x000F);
-           memcpy(&(pDevice->sRxDFCB[ii].abyAddr2[0]),
-                  &(pMACHeader->addr2[0]),
-                  ETH_ALEN);
-            return(ii);
-        }
-    }
-    return(pDevice->cbDFCB);
-}
-
-/*
- * Description:
- *      Handle received fragment packet
- *
- * Parameters:
- *  In:
- *      pDevice         - Pointer to adapter
- *      pMACHeader      - 802.11 MAC Header of received packet
- *      cbFrameLength   - Frame length
- *      bWEP            - is WEP packet
- *  Out:
- *      none
- *
- * Return Value: true if it is valid fragment packet and we have resource to defragment; otherwise false
- *
- */
-bool WCTLbHandleFragment(struct vnt_private *pDevice, struct ieee80211_hdr *pMACHeader,        unsigned int cbFrameLength, bool bWEP, bool bExtIV)
-{
-       unsigned int uHeaderSize;
-
-    if (bWEP == true) {
-        uHeaderSize = 28;
-        if (bExtIV)
-        // ExtIV
-            uHeaderSize +=4;
-    }
-    else {
-        uHeaderSize = 24;
-    }
-
-    if (IS_FIRST_FRAGMENT_PKT(pMACHeader)) {
-        pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader);
-        if (pDevice->uCurrentDFCBIdx < pDevice->cbDFCB) {
-            // duplicate, we must flush previous DCB
-            pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].uLifetime = pDevice->dwMaxReceiveLifetime;
-            pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wSequence = (pMACHeader->seq_ctrl >> 4);
-            pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum = (pMACHeader->seq_ctrl & 0x000F);
-        }
-        else {
-            pDevice->uCurrentDFCBIdx = WCTLuInsertDFCB(pDevice, pMACHeader);
-            if (pDevice->uCurrentDFCBIdx == pDevice->cbDFCB) {
-                return(false);
-            }
-        }
-        // reserve 8 byte to match MAC RX Buffer
-        pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (u8 *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 8);
-//        pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer = (u8 *) (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].skb->data + 4);
-        memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, pMACHeader, cbFrameLength);
-        pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength = cbFrameLength;
-        pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += cbFrameLength;
-        pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;
-        //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "First pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
-        return(false);
-    }
-    else {
-        pDevice->uCurrentDFCBIdx = WCTLuSearchDFCB(pDevice, pMACHeader);
-        if (pDevice->uCurrentDFCBIdx != pDevice->cbDFCB) {
-            if ((pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wSequence == (pMACHeader->seq_ctrl >> 4)) &&
-                (pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum == (pMACHeader->seq_ctrl & 0x000F)) &&
-                ((pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength + cbFrameLength - uHeaderSize) < 2346)) {
-
-                memcpy(pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer, ((u8 *) (pMACHeader) + uHeaderSize), (cbFrameLength - uHeaderSize));
-                pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].cbFrameLength += (cbFrameLength - uHeaderSize);
-                pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].pbyRxBuffer += (cbFrameLength - uHeaderSize);
-                pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].wFragNum++;
-                //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Second pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
-            }
-            else {
-                // seq error or frag # error flush DFCB
-                pDevice->cbFreeDFCB++;
-                pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false;
-                return(false);
-            }
-        }
-        else {
-            return(false);
-        }
-        if (IS_LAST_FRAGMENT_PKT(pMACHeader)) {
-            //enq defragcontrolblock
-            pDevice->cbFreeDFCB++;
-            pDevice->sRxDFCB[pDevice->uCurrentDFCBIdx].bInUse = false;
-            //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Last pDevice->uCurrentDFCBIdx= %d\n", pDevice->uCurrentDFCBIdx);
-            return(true);
-        }
-        return(false);
-    }
-}
-
diff --git a/drivers/staging/vt6656/wctl.h b/drivers/staging/vt6656/wctl.h
deleted file mode 100644 (file)
index 14cb411..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: wctl.h
- *
- * Purpose:
- *
- * Author: Jerry Chen
- *
- * Date: Jun. 27, 2002
- *
- */
-
-#ifndef __WCTL_H__
-#define __WCTL_H__
-
-#include "tether.h"
-#include "device.h"
-
-#define IS_TYPE_DATA(pMACHeader)                                                        \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & TYPE_802_11_MASK) == TYPE_802_11_DATA)
-
-#define IS_TYPE_MGMT(pMACHeader)                                                        \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & TYPE_802_11_MASK) == TYPE_802_11_MGMT)
-
-#define IS_TYPE_CONTROL(pMACHeader)                                                     \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & TYPE_802_11_MASK) == TYPE_802_11_CTL)
-
-#define IS_FC_MOREDATA(pMACHeader)                                                      \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_MOREDATA) == FC_MOREDATA)
-
-#define IS_FC_POWERMGT(pMACHeader)                                                      \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_POWERMGT) == FC_POWERMGT)
-
-#define IS_FC_RETRY(pMACHeader)                                                         \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_RETRY) == FC_RETRY)
-
-#define IS_FC_WEP(pMACHeader)                                                           \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_WEP) == FC_WEP)
-
-#ifdef __BIG_ENDIAN
-
-#define IS_FRAGMENT_PKT(pMACHeader)                                                     \
-    (((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_MOREFRAG) != 0) |                  \
-     ((((struct ieee80211_hdr *) pMACHeader)->seq_ctrl & 0x0F00) != 0))
-
-#define IS_FIRST_FRAGMENT_PKT(pMACHeader)                                               \
-    ((((struct ieee80211_hdr *) pMACHeader)->seq_ctrl & 0x0F00) == 0)
-
-#else
-
-#define IS_FRAGMENT_PKT(pMACHeader)                                                     \
-    (((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_MOREFRAG) != 0) |                  \
-     ((((struct ieee80211_hdr *) pMACHeader)->seq_ctrl & 0x000F) != 0))
-
-#define IS_FIRST_FRAGMENT_PKT(pMACHeader)                                               \
-    ((((struct ieee80211_hdr *) pMACHeader)->seq_ctrl & 0x000F) == 0)
-
-#endif//#ifdef __BIG_ENDIAN
-
-#define IS_LAST_FRAGMENT_PKT(pMACHeader)                                                \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & FC_MOREFRAG) == 0)
-
-#define IS_CTL_PSPOLL(pMACHeader)                                                       \
-    ((((struct ieee80211_hdr *) pMACHeader)->frame_control & TYPE_SUBTYPE_MASK) == TYPE_CTL_PSPOLL)
-
-#define ADD_ONE_WITH_WRAP_AROUND(uVar, uModulo) {   \
-    if ((uVar) >= ((uModulo) - 1))                  \
-        (uVar) = 0;                                 \
-    else                                            \
-        (uVar)++;                                   \
-}
-
-bool WCTLbIsDuplicate(PSCache pCache, struct ieee80211_hdr *pMACHeader);
-bool WCTLbHandleFragment(struct vnt_private *, struct ieee80211_hdr *pMACHeader, unsigned int cbFrameLength, bool bWEP, bool bExtIV);
-unsigned int WCTLuSearchDFCB(struct vnt_private *, struct ieee80211_hdr *pMACHeader);
-unsigned int WCTLuInsertDFCB(struct vnt_private *, struct ieee80211_hdr *pMACHeader);
-
-#endif /* __WCTL_H__ */
diff --git a/drivers/staging/vt6656/wmgr.c b/drivers/staging/vt6656/wmgr.c
deleted file mode 100644 (file)
index 18723ea..0000000
+++ /dev/null
@@ -1,4362 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wmgr.c
- *
- * Purpose: Handles the 802.11 management functions
- *
- * Author: Lyndon Chen
- *
- * Date: May 8, 2002
- *
- * Functions:
- *      nsMgrObjectInitial - Initialize Management Objet data structure
- *      vMgrObjectReset - Reset Management Object data structure
- *      vMgrAssocBeginSta - Start associate function
- *      vMgrReAssocBeginSta - Start reassociate function
- *      vMgrDisassocBeginSta - Start disassociate function
- *      s_vMgrRxAssocRequest - Handle Rcv associate_request
- *      s_vMgrRxAssocResponse - Handle Rcv associate_response
- *      vMrgAuthenBeginSta - Start authentication function
- *      vMgrDeAuthenDeginSta - Start deauthentication function
- *      s_vMgrRxAuthentication - Handle Rcv authentication
- *      s_vMgrRxAuthenSequence_1 - Handle Rcv authentication sequence 1
- *      s_vMgrRxAuthenSequence_2 - Handle Rcv authentication sequence 2
- *      s_vMgrRxAuthenSequence_3 - Handle Rcv authentication sequence 3
- *      s_vMgrRxAuthenSequence_4 - Handle Rcv authentication sequence 4
- *      s_vMgrRxDisassociation - Handle Rcv disassociation
- *      s_vMgrRxBeacon - Handle Rcv Beacon
- *      vMgrCreateOwnIBSS - Create ad_hoc IBSS or AP BSS
- *      vMgrJoinBSSBegin - Join BSS function
- *      s_vMgrSynchBSS - Synch & adopt BSS parameters
- *      s_MgrMakeBeacon - Create Baecon frame
- *      s_MgrMakeProbeResponse - Create Probe Response frame
- *      s_MgrMakeAssocRequest - Create Associate Request frame
- *      s_MgrMakeReAssocRequest - Create ReAssociate Request frame
- *      s_vMgrRxProbeResponse - Handle Rcv probe_response
- *      s_vMrgRxProbeRequest - Handle Rcv probe_request
- *      bMgrPrepareBeaconToSend - Prepare Beacon frame
- *      s_vMgrLogStatus - Log 802.11 Status
- *      vMgrRxManagePacket - Rcv management frame dispatch function
- *      s_vMgrFormatTIM- Assembler TIM field of beacon
- *      vMgrTimerInit- Initial 1-sec and command call back funtions
- *
- * Revision History:
- *
- */
-
-#include "tmacro.h"
-#include "desc.h"
-#include "device.h"
-#include "card.h"
-#include "80211hdr.h"
-#include "80211mgr.h"
-#include "wmgr.h"
-#include "wcmd.h"
-#include "mac.h"
-#include "bssdb.h"
-#include "power.h"
-#include "datarate.h"
-#include "baseband.h"
-#include "rxtx.h"
-#include "wpa.h"
-#include "rf.h"
-#include "iowpa.h"
-#include "usbpipe.h"
-
-static int msglevel = MSG_LEVEL_INFO;
-//static int          msglevel                =MSG_LEVEL_DEBUG;
-
-static int ChannelExceedZoneType(struct vnt_private *, u8 byCurrChannel);
-
-/* Association/diassociation functions */
-static struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *,
-       struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo,
-       u16 wListenInterval, PWLAN_IE_SSID pCurrSSID,
-       PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
-static void s_vMgrRxAssocRequest(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       u32 uNodeIndex);
-
-static struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *,
-       struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo,
-       u16 wListenInterval, PWLAN_IE_SSID pCurrSSID,
-       PWLAN_IE_SUPP_RATES pCurrRates, PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
-static void s_vMgrRxAssocResponse(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       int bReAssocType);
-
-static void s_vMgrRxDisassociation(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket);
-
-/* Authentication/deauthen functions */
-static void s_vMgrRxAuthenSequence_1(struct vnt_private *,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame);
-
-static void s_vMgrRxAuthenSequence_2(struct vnt_private *,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame);
-
-static void s_vMgrRxAuthenSequence_3(struct vnt_private *,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame);
-
-static void s_vMgrRxAuthenSequence_4(struct vnt_private *,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame);
-
-static void s_vMgrRxAuthentication(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket);
-
-static void s_vMgrRxDeauthentication(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket);
-
-/* Scan functions
-*  probe request/response functions */
-
-static void s_vMgrRxProbeRequest(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket);
-
-static void s_vMgrRxProbeResponse(struct vnt_private *,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket);
-
-/* beacon functions */
-static void s_vMgrRxBeacon(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       int bInScan);
-
-static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM);
-
-static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wCurrBeaconPeriod,
-       u32 uCurrChannel, u16 wCurrATIMWinodw, PWLAN_IE_SSID pCurrSSID,
-       u8 *pCurrBSSID, PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
-/* Association response */
-static struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus,
-       u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
-/* ReAssociation response */
-static struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus,
-       u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates);
-
-/* Probe response */
-static struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wCurrBeaconPeriod,
-       u32 uCurrChannel, u16 wCurrATIMWinodw, u8 *pDstAddr,
-       PWLAN_IE_SSID pCurrSSID, u8 *pCurrBSSID,
-       PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates, u8 byPHYType);
-
-/* received status */
-static void s_vMgrLogStatus(struct vnt_manager *pMgmt, u16 wStatus);
-
-static void s_vMgrSynchBSS(struct vnt_private *, u32 uBSSMode,
-       PKnownBSS pCurr, PCMD_STATUS  pStatus);
-
-static bool
-s_bCipherMatch (
-     PKnownBSS                        pBSSNode,
-     NDIS_802_11_ENCRYPTION_STATUS    EncStatus,
-     u8 *                           pbyCCSPK,
-     u8 *                           pbyCCSGK
-    );
-
-static void Encyption_Rebuild(struct vnt_private *, PKnownBSS pCurr);
-
-/*+
- *
- * Routine Description:
- *    Allocates and initializes the Management object.
- *
- * Return Value:
- *    Ndis_staus.
- *
--*/
-
-void vMgrObjectInit(struct vnt_private *pDevice)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       int ii;
-
-    pMgmt->pbyPSPacketPool = &pMgmt->byPSPacketPool[0];
-    pMgmt->pbyMgmtPacketPool = &pMgmt->byMgmtPacketPool[0];
-    pMgmt->uCurrChannel = pDevice->uChannel;
-    for (ii = 0; ii < WLAN_BSSID_LEN; ii++)
-       pMgmt->abyDesireBSSID[ii] = 0xFF;
-
-    pMgmt->sAssocInfo.AssocInfo.Length = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
-    //memset(pMgmt->abyDesireSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN +1);
-    pMgmt->byCSSPK = KEY_CTL_NONE;
-    pMgmt->byCSSGK = KEY_CTL_NONE;
-    pMgmt->wIBSSBeaconPeriod = DEFAULT_IBSS_BI;
-    BSSvClearBSSList((void *) pDevice, false);
-
-    pDevice->cbFreeCmdQueue = CMD_Q_SIZE;
-    pDevice->uCmdDequeueIdx = 0;
-    pDevice->uCmdEnqueueIdx = 0;
-    pDevice->eCommandState = WLAN_CMD_IDLE;
-    pDevice->bCmdRunning = false;
-    pDevice->bCmdClear = false;
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *    Start the station association procedure.  Namely, send an
- *    association request frame to the AP.
- *
- * Return Value:
- *    None.
- *
--*/
-
-void vMgrAssocBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PCMD_STATUS pStatus)
-{
-       struct vnt_tx_mgmt *pTxPacket;
-
-    pMgmt->wCurrCapInfo = 0;
-    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_ESS(1);
-    if (pDevice->bEncryptionEnable) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1);
-    }
-    // always allow receive short preamble
-    //if (pDevice->byPreambleType == 1) {
-    //    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-    //}
-    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-    if (pMgmt->wListenInterval == 0)
-        pMgmt->wListenInterval = 1;    // at least one.
-
-    // ERP Phy (802.11g) should support short preamble.
-    if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-        if (pDevice->bShortSlotTime == true)
-            pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
-
-    } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) {
-        if (pDevice->byPreambleType == 1) {
-            pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-        }
-    }
-    if (pMgmt->b11hEnable == true)
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);
-
-    // build an assocreq frame and send it
-    pTxPacket = s_MgrMakeAssocRequest
-                (
-                  pDevice,
-                  pMgmt,
-                  pMgmt->abyCurrBSSID,
-                  pMgmt->wCurrCapInfo,
-                  pMgmt->wListenInterval,
-                  (PWLAN_IE_SSID)pMgmt->abyCurrSSID,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates
-                );
-
-    if (pTxPacket != NULL ){
-        // send the frame
-        *pStatus = csMgmt_xmit(pDevice, pTxPacket);
-        if (*pStatus == CMD_STATUS_PENDING) {
-            pMgmt->eCurrState = WMAC_STATE_ASSOCPENDING;
-            *pStatus = CMD_STATUS_SUCCESS;
-        }
-    }
-    else
-        *pStatus = CMD_STATUS_RESOURCES;
-
-    return ;
-}
-
-/*+
- *
- * Routine Description:
- *    Start the station re-association procedure.
- *
- * Return Value:
- *    None.
- *
--*/
-
-void vMgrReAssocBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PCMD_STATUS pStatus)
-{
-       struct vnt_tx_mgmt *pTxPacket;
-
-    pMgmt->wCurrCapInfo = 0;
-    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_ESS(1);
-    if (pDevice->bEncryptionEnable) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1);
-    }
-
-    //if (pDevice->byPreambleType == 1) {
-    //    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-    //}
-    pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-
-    if (pMgmt->wListenInterval == 0)
-        pMgmt->wListenInterval = 1;    // at least one.
-
-    // ERP Phy (802.11g) should support short preamble.
-    if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-      if (pDevice->bShortSlotTime == true)
-          pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTSLOTTIME(1);
-
-    } else if (pMgmt->eCurrentPHYMode == PHY_TYPE_11B) {
-        if (pDevice->byPreambleType == 1) {
-            pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-        }
-    }
-    if (pMgmt->b11hEnable == true)
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SPECTRUMMNG(1);
-
-    pTxPacket = s_MgrMakeReAssocRequest
-                (
-                  pDevice,
-                  pMgmt,
-                  pMgmt->abyCurrBSSID,
-                  pMgmt->wCurrCapInfo,
-                  pMgmt->wListenInterval,
-                  (PWLAN_IE_SSID)pMgmt->abyCurrSSID,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates
-                );
-
-    if (pTxPacket != NULL ){
-        // send the frame
-        *pStatus = csMgmt_xmit(pDevice, pTxPacket);
-        if (*pStatus != CMD_STATUS_PENDING) {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx failed.\n");
-        }
-        else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Reassociation tx sending.\n");
-        }
-    }
-
-    return ;
-}
-
-/*+
- *
- * Routine Description:
- *    Send an dis-association request frame to the AP.
- *
- * Return Value:
- *    None.
- *
--*/
-
-void vMgrDisassocBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u8 *abyDestAddress, u16 wReason,
-       PCMD_STATUS pStatus)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_DISASSOC sFrame;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_DISASSOC_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-
-    // Setup the sFrame structure
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_DISASSOC_FR_MAXLEN;
-
-    // format fixed field frame structure
-    vMgrEncodeDisassociation(&sFrame);
-
-    // Setup the header
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_DISASSOC)
-        ));
-
-    memcpy( sFrame.pHdr->sA3.abyAddr1, abyDestAddress, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-
-    // Set reason code
-    *(sFrame.pwReason) = cpu_to_le16(wReason);
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    // send the frame
-    *pStatus = csMgmt_xmit(pDevice, pTxPacket);
-    if (*pStatus == CMD_STATUS_PENDING) {
-        pMgmt->eCurrState = WMAC_STATE_IDLE;
-        *pStatus = CMD_STATUS_SUCCESS;
-    }
-
-    return;
-}
-
-/*+
- *
- * Routine Description:(AP function)
- *    Handle incoming station association request frames.
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxAssocRequest(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       u32 uNodeIndex)
-{
-       WLAN_FR_ASSOCREQ sFrame;
-       CMD_STATUS Status;
-       struct vnt_tx_mgmt *pTxPacket;
-       u16 wAssocStatus = 0;
-       u16 wAssocAID = 0;
-       u32 uRateLen = WLAN_RATES_MAXLEN;
-       u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-       u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-
-    if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP)
-        return;
-    //  node index not found
-    if (!uNodeIndex)
-        return;
-
-    //check if node is authenticated
-    //decode the frame
-    memset(&sFrame, 0, sizeof(WLAN_FR_ASSOCREQ));
-    memset(abyCurrSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
-    memset(abyCurrExtSuppRates, 0, WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
-    sFrame.len = pRxPacket->cbMPDULen;
-    sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-
-    vMgrDecodeAssocRequest(&sFrame);
-
-    if (pMgmt->sNodeDBTable[uNodeIndex].eNodeState >= NODE_AUTH) {
-        pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_ASSOC;
-        pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo);
-        pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval);
-        pMgmt->sNodeDBTable[uNodeIndex].bPSEnable =
-                WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? true : false;
-        // Todo: check sta basic rate, if ap can't support, set status code
-        if (pDevice->byBBType == BB_TYPE_11B) {
-            uRateLen = WLAN_RATES_MAXLEN_11B;
-        }
-        abyCurrSuppRates[0] = WLAN_EID_SUPP_RATES;
-        abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pSuppRates,
-                                         (PWLAN_IE_SUPP_RATES)abyCurrSuppRates,
-                                         uRateLen);
-        abyCurrExtSuppRates[0] = WLAN_EID_EXTSUPP_RATES;
-        if (pDevice->byBBType == BB_TYPE_11G) {
-            abyCurrExtSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pExtSuppRates,
-                                                (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates,
-                                                uRateLen);
-        } else {
-            abyCurrExtSuppRates[1] = 0;
-        }
-
-       RATEvParseMaxRate((void *)pDevice,
-                           (PWLAN_IE_SUPP_RATES)abyCurrSuppRates,
-                           (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates,
-                           false, // do not change our basic rate
-                           &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].byTopCCKBasicRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].byTopOFDMBasicRate)
-                          );
-
-        // set max tx rate
-        pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate =
-                pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate;
-        // Todo: check sta preamble, if ap can't support, set status code
-        pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble =
-                WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
-        pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime =
-                WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
-        pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)uNodeIndex;
-        wAssocStatus = WLAN_MGMT_STATUS_SUCCESS;
-        wAssocAID = (u16)uNodeIndex;
-        // check if ERP support
-        if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
-           pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
-
-        if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) {
-            // B only STA join
-            pDevice->bProtectMode = true;
-            pDevice->bNonERPPresent = true;
-        }
-        if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == false) {
-            pDevice->bBarkerPreambleMd = true;
-        }
-
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Associate AID= %d \n", wAssocAID);
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n",
-                   sFrame.pHdr->sA3.abyAddr2[0],
-                   sFrame.pHdr->sA3.abyAddr2[1],
-                   sFrame.pHdr->sA3.abyAddr2[2],
-                   sFrame.pHdr->sA3.abyAddr2[3],
-                   sFrame.pHdr->sA3.abyAddr2[4],
-                   sFrame.pHdr->sA3.abyAddr2[5]
-                  ) ;
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n",
-                   pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate);
-    }
-
-    // assoc response reply..
-    pTxPacket = s_MgrMakeAssocResponse
-                (
-                  pDevice,
-                  pMgmt,
-                  pMgmt->wCurrCapInfo,
-                  wAssocStatus,
-                  wAssocAID,
-                  sFrame.pHdr->sA3.abyAddr2,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates
-                );
-    if (pTxPacket != NULL ){
-        /* send the frame */
-        Status = csMgmt_xmit(pDevice, pTxPacket);
-        if (Status != CMD_STATUS_PENDING) {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx failed\n");
-        }
-        else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Assoc response tx sending..\n");
-        }
-
-    }
-
-    return;
-}
-
-/*+
- *
- * Description:(AP function)
- *      Handle incoming station re-association request frames.
- *
- * Parameters:
- *  In:
- *      pMgmt           - Management Object structure
- *      pRxPacket       - Received Packet
- *  Out:
- *      none
- *
- * Return Value: None.
- *
--*/
-
-static void s_vMgrRxReAssocRequest(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       u32 uNodeIndex)
-{
-       WLAN_FR_REASSOCREQ    sFrame;
-       CMD_STATUS Status;
-       struct vnt_tx_mgmt *pTxPacket;
-       u16 wAssocStatus = 0;
-       u16 wAssocAID = 0;
-       u32 uRateLen = WLAN_RATES_MAXLEN;
-       u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-       u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-
-    if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP)
-        return;
-    //  node index not found
-    if (!uNodeIndex)
-        return;
-    //check if node is authenticated
-    //decode the frame
-    memset(&sFrame, 0, sizeof(WLAN_FR_REASSOCREQ));
-    sFrame.len = pRxPacket->cbMPDULen;
-    sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-    vMgrDecodeReassocRequest(&sFrame);
-
-    if (pMgmt->sNodeDBTable[uNodeIndex].eNodeState >= NODE_AUTH) {
-        pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_ASSOC;
-        pMgmt->sNodeDBTable[uNodeIndex].wCapInfo = cpu_to_le16(*sFrame.pwCapInfo);
-        pMgmt->sNodeDBTable[uNodeIndex].wListenInterval = cpu_to_le16(*sFrame.pwListenInterval);
-        pMgmt->sNodeDBTable[uNodeIndex].bPSEnable =
-                WLAN_GET_FC_PWRMGT(sFrame.pHdr->sA3.wFrameCtl) ? true : false;
-        // Todo: check sta basic rate, if ap can't support, set status code
-
-        if (pDevice->byBBType == BB_TYPE_11B) {
-            uRateLen = WLAN_RATES_MAXLEN_11B;
-        }
-
-        abyCurrSuppRates[0] = WLAN_EID_SUPP_RATES;
-        abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pSuppRates,
-                                         (PWLAN_IE_SUPP_RATES)abyCurrSuppRates,
-                                         uRateLen);
-        abyCurrExtSuppRates[0] = WLAN_EID_EXTSUPP_RATES;
-        if (pDevice->byBBType == BB_TYPE_11G) {
-            abyCurrExtSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pExtSuppRates,
-                                                (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates,
-                                                uRateLen);
-        } else {
-            abyCurrExtSuppRates[1] = 0;
-        }
-
-       RATEvParseMaxRate((void *)pDevice,
-                          (PWLAN_IE_SUPP_RATES)abyCurrSuppRates,
-                          (PWLAN_IE_SUPP_RATES)abyCurrExtSuppRates,
-                           false, // do not change our basic rate
-                           &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].byTopCCKBasicRate),
-                           &(pMgmt->sNodeDBTable[uNodeIndex].byTopOFDMBasicRate)
-                          );
-
-        // set max tx rate
-        pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate =
-                pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate;
-        // Todo: check sta preamble, if ap can't support, set status code
-        pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble =
-                WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
-        pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime =
-                WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
-        pMgmt->sNodeDBTable[uNodeIndex].wAID = (u16)uNodeIndex;
-        wAssocStatus = WLAN_MGMT_STATUS_SUCCESS;
-        wAssocAID = (u16)uNodeIndex;
-
-        // if suppurt ERP
-        if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
-           pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
-
-        if (pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate <= RATE_11M) {
-            // B only STA join
-            pDevice->bProtectMode = true;
-            pDevice->bNonERPPresent = true;
-        }
-        if (pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble == false) {
-            pDevice->bBarkerPreambleMd = true;
-        }
-
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Rx ReAssociate AID= %d \n", wAssocAID);
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "MAC=%2.2X:%2.2X:%2.2X:%2.2X:%2.2X:%2.2X \n",
-                   sFrame.pHdr->sA3.abyAddr2[0],
-                   sFrame.pHdr->sA3.abyAddr2[1],
-                   sFrame.pHdr->sA3.abyAddr2[2],
-                   sFrame.pHdr->sA3.abyAddr2[3],
-                   sFrame.pHdr->sA3.abyAddr2[4],
-                   sFrame.pHdr->sA3.abyAddr2[5]
-                  ) ;
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Max Support rate = %d \n",
-                   pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate);
-
-    }
-
-    // assoc response reply..
-    pTxPacket = s_MgrMakeReAssocResponse
-                (
-                  pDevice,
-                  pMgmt,
-                  pMgmt->wCurrCapInfo,
-                  wAssocStatus,
-                  wAssocAID,
-                  sFrame.pHdr->sA3.abyAddr2,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates
-                );
-
-    if (pTxPacket != NULL ){
-        /* send the frame */
-        Status = csMgmt_xmit(pDevice, pTxPacket);
-        if (Status != CMD_STATUS_PENDING) {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx failed\n");
-        }
-        else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:ReAssoc response tx sending..\n");
-        }
-    }
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *    Handle incoming association response frames.
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxAssocResponse(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       int bReAssocType)
-{
-       WLAN_FR_ASSOCRESP   sFrame;
-       PWLAN_IE_SSID   pItemSSID;
-       u8 *pbyIEs;
-
-    if (pMgmt->eCurrState == WMAC_STATE_ASSOCPENDING ||
-         pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-
-        sFrame.len = pRxPacket->cbMPDULen;
-        sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-        // decode the frame
-        vMgrDecodeAssocResponse(&sFrame);
-       if ((sFrame.pwCapInfo == NULL)
-           || (sFrame.pwStatus == NULL)
-           || (sFrame.pwAid == NULL)
-           || (sFrame.pSuppRates == NULL)) {
-               return;
-        }
-
-        pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.Capabilities = *(sFrame.pwCapInfo);
-        pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.StatusCode = *(sFrame.pwStatus);
-        pMgmt->sAssocInfo.AssocInfo.ResponseFixedIEs.AssociationId = *(sFrame.pwAid);
-        pMgmt->sAssocInfo.AssocInfo.AvailableResponseFixedIEs |= 0x07;
-
-        pMgmt->sAssocInfo.AssocInfo.ResponseIELength = sFrame.len - 24 - 6;
-        pMgmt->sAssocInfo.AssocInfo.OffsetResponseIEs = pMgmt->sAssocInfo.AssocInfo.OffsetRequestIEs + pMgmt->sAssocInfo.AssocInfo.RequestIELength;
-        pbyIEs = pMgmt->sAssocInfo.abyIEs;
-        pbyIEs += pMgmt->sAssocInfo.AssocInfo.RequestIELength;
-        memcpy(pbyIEs, (sFrame.pBuf + 24 +6), pMgmt->sAssocInfo.AssocInfo.ResponseIELength);
-
-        // save values and set current BSS state
-        if (cpu_to_le16((*(sFrame.pwStatus))) == WLAN_MGMT_STATUS_SUCCESS ){
-            // set AID
-            pMgmt->wCurrAID = cpu_to_le16((*(sFrame.pwAid)));
-            if ( (pMgmt->wCurrAID >> 14) != (BIT0 | BIT1) )
-            {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "AID from AP, has two msb clear.\n");
-            }
-            DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Association Successful, AID=%d.\n", pMgmt->wCurrAID & ~(BIT14|BIT15));
-            pMgmt->eCurrState = WMAC_STATE_ASSOC;
-           BSSvUpdateAPNode((void *) pDevice,
-                            sFrame.pwCapInfo,
-                            sFrame.pSuppRates,
-                            sFrame.pExtSuppRates);
-            pItemSSID = (PWLAN_IE_SSID)pMgmt->abyCurrSSID;
-            DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "Link with AP(SSID): %s\n", pItemSSID->abySSID);
-            pDevice->bLinkPass = true;
-
-           vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-       //if(pDevice->bWPASuppWextEnabled == true)
-          {
-               u8 buf[512];
-               size_t len;
-               union iwreq_data  wrqu;
-               int we_event;
-
-               memset(buf, 0, 512);
-
-               len = pMgmt->sAssocInfo.AssocInfo.RequestIELength;
-               if(len) {
-                       memcpy(buf, pMgmt->sAssocInfo.abyIEs, len);
-                       memset(&wrqu, 0, sizeof (wrqu));
-                       wrqu.data.length = len;
-                       we_event = IWEVASSOCREQIE;
-                       PRINT_K("wireless_send_event--->IWEVASSOCREQIE\n");
-                       wireless_send_event(pDevice->dev, we_event, &wrqu, buf);
-               }
-
-               memset(buf, 0, 512);
-               len = pMgmt->sAssocInfo.AssocInfo.ResponseIELength;
-
-               if(len) {
-                       memcpy(buf, pbyIEs, len);
-                       memset(&wrqu, 0, sizeof (wrqu));
-                       wrqu.data.length = len;
-                       we_event = IWEVASSOCRESPIE;
-                       PRINT_K("wireless_send_event--->IWEVASSOCRESPIE\n");
-                       wireless_send_event(pDevice->dev, we_event, &wrqu, buf);
-               }
-
-          memset(&wrqu, 0, sizeof (wrqu));
-       memcpy(wrqu.ap_addr.sa_data, &pMgmt->abyCurrBSSID[0], ETH_ALEN);
-        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-          PRINT_K("wireless_send_event--->SIOCGIWAP(associated)\n");
-       wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-
-       }
-
-        }
-        else {
-            if (bReAssocType) {
-                pMgmt->eCurrState = WMAC_STATE_IDLE;
-            }
-            else {
-                // jump back to the auth state and indicate the error
-                pMgmt->eCurrState = WMAC_STATE_AUTH;
-            }
-            s_vMgrLogStatus(pMgmt,cpu_to_le16((*(sFrame.pwStatus))));
-        }
-
-    }
-
-//need clear flags related to Networkmanager
-              pDevice->bwextstep0 = false;
-              pDevice->bwextstep1 = false;
-              pDevice->bwextstep2 = false;
-              pDevice->bwextstep3 = false;
-              pDevice->bWPASuppWextEnabled = false;
-
-       if (pMgmt->eCurrState == WMAC_STATE_ASSOC)
-               schedule_delayed_work(&pDevice->run_command_work, 0);
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *    Start the station authentication procedure.  Namely, send an
- *    authentication frame to the AP.
- *
- * Return Value:
- *    None.
- *
--*/
-
-void vMgrAuthenBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PCMD_STATUS pStatus)
-{
-       WLAN_FR_AUTHEN sFrame;
-       struct vnt_tx_mgmt *pTxPacket =
-               (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_AUTHEN_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
-    vMgrEncodeAuthen(&sFrame);
-    /* insert values */
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_AUTHEN)
-        ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-    if (pMgmt->bShareKeyAlgorithm)
-        *(sFrame.pwAuthAlgorithm) = cpu_to_le16(WLAN_AUTH_ALG_SHAREDKEY);
-    else
-        *(sFrame.pwAuthAlgorithm) = cpu_to_le16(WLAN_AUTH_ALG_OPENSYSTEM);
-
-    *(sFrame.pwAuthSequence) = cpu_to_le16(1);
-    /* Adjust the length fields */
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    *pStatus = csMgmt_xmit(pDevice, pTxPacket);
-    if (*pStatus == CMD_STATUS_PENDING){
-        pMgmt->eCurrState = WMAC_STATE_AUTHPENDING;
-        *pStatus = CMD_STATUS_SUCCESS;
-    }
-
-    return ;
-}
-
-/*+
- *
- * Routine Description:
- *    Start the station(AP) deauthentication procedure.  Namely, send an
- *    deauthentication frame to the AP or Sta.
- *
- * Return Value:
- *    None.
- *
--*/
-
-void vMgrDeAuthenBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u8 *abyDestAddress, u16 wReason,
-       PCMD_STATUS pStatus)
-{
-       WLAN_FR_DEAUTHEN sFrame;
-       struct vnt_tx_mgmt *pTxPacket =
-               (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_DEAUTHEN_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_DEAUTHEN_FR_MAXLEN;
-    vMgrEncodeDeauthen(&sFrame);
-    /* insert values */
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_DEAUTHEN)
-        ));
-
-    memcpy( sFrame.pHdr->sA3.abyAddr1, abyDestAddress, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-
-    *(sFrame.pwReason) = cpu_to_le16(wReason);       // deauthen. bcs left BSS
-    /* Adjust the length fields */
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    *pStatus = csMgmt_xmit(pDevice, pTxPacket);
-    if (*pStatus == CMD_STATUS_PENDING){
-        *pStatus = CMD_STATUS_SUCCESS;
-    }
-
-    return ;
-}
-
-/*+
- *
- * Routine Description:
- *    Handle incoming authentication frames.
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxAuthentication(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket)
-{
-       WLAN_FR_AUTHEN  sFrame;
-
-    // we better be an AP or a STA in AUTHPENDING otherwise ignore
-    if (!(pMgmt->eCurrMode == WMAC_MODE_ESS_AP ||
-          pMgmt->eCurrState == WMAC_STATE_AUTHPENDING)) {
-        return;
-    }
-
-    // decode the frame
-    sFrame.len = pRxPacket->cbMPDULen;
-    sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-    vMgrDecodeAuthen(&sFrame);
-    switch (cpu_to_le16((*(sFrame.pwAuthSequence )))){
-        case 1:
-            //AP funciton
-            s_vMgrRxAuthenSequence_1(pDevice,pMgmt, &sFrame);
-            break;
-        case 2:
-            s_vMgrRxAuthenSequence_2(pDevice, pMgmt, &sFrame);
-            break;
-        case 3:
-            //AP funciton
-            s_vMgrRxAuthenSequence_3(pDevice, pMgmt, &sFrame);
-            break;
-        case 4:
-            s_vMgrRxAuthenSequence_4(pDevice, pMgmt, &sFrame);
-            break;
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Auth Sequence error, seq = %d\n",
-                        cpu_to_le16((*(sFrame.pwAuthSequence))));
-            break;
-    }
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *   Handles incoming authen frames with sequence 1.  Currently
- *   assumes we're an AP.  So far, no one appears to use authentication
- *   in Ad-Hoc mode.
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxAuthenSequence_1(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       u32 uNodeIndex;
-       WLAN_FR_AUTHEN sFrame;
-       PSKeyItem pTransmitKey;
-
-       /* Insert a Node entry */
-       if (!BSSbIsSTAInNodeDB(pDevice, pFrame->pHdr->sA3.abyAddr2,
-               &uNodeIndex)) {
-               BSSvCreateOneNode(pDevice, &uNodeIndex);
-               memcpy(pMgmt->sNodeDBTable[uNodeIndex].abyMACAddr,
-                       pFrame->pHdr->sA3.abyAddr2, WLAN_ADDR_LEN);
-       }
-
-    if (pMgmt->bShareKeyAlgorithm) {
-        pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_KNOWN;
-        pMgmt->sNodeDBTable[uNodeIndex].byAuthSequence = 1;
-    }
-    else {
-        pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_AUTH;
-    }
-
-    // send auth reply
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_AUTHEN_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
-    // format buffer structure
-    vMgrEncodeAuthen(&sFrame);
-    // insert values
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-         (
-         WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-         WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_AUTHEN)|
-         WLAN_SET_FC_ISWEP(0)
-         ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pFrame->pHdr->sA3.abyAddr2, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-    *(sFrame.pwAuthAlgorithm) = *(pFrame->pwAuthAlgorithm);
-    *(sFrame.pwAuthSequence) = cpu_to_le16(2);
-
-    if (cpu_to_le16(*(pFrame->pwAuthAlgorithm)) == WLAN_AUTH_ALG_SHAREDKEY) {
-        if (pMgmt->bShareKeyAlgorithm)
-            *(sFrame.pwStatus) = cpu_to_le16(WLAN_MGMT_STATUS_SUCCESS);
-        else
-            *(sFrame.pwStatus) = cpu_to_le16(WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG);
-    }
-    else {
-        if (pMgmt->bShareKeyAlgorithm)
-            *(sFrame.pwStatus) = cpu_to_le16(WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG);
-        else
-            *(sFrame.pwStatus) = cpu_to_le16(WLAN_MGMT_STATUS_SUCCESS);
-    }
-
-    if (pMgmt->bShareKeyAlgorithm &&
-        (cpu_to_le16(*(sFrame.pwStatus)) == WLAN_MGMT_STATUS_SUCCESS)) {
-
-        sFrame.pChallenge = (PWLAN_IE_CHALLENGE)(sFrame.pBuf + sFrame.len);
-        sFrame.len += WLAN_CHALLENGE_IE_LEN;
-        sFrame.pChallenge->byElementID = WLAN_EID_CHALLENGE;
-        sFrame.pChallenge->len = WLAN_CHALLENGE_LEN;
-        memset(pMgmt->abyChallenge, 0, WLAN_CHALLENGE_LEN);
-        // get group key
-        if(KeybGetTransmitKey(&(pDevice->sKey), pDevice->abyBroadcastAddr, GROUP_KEY, &pTransmitKey) == true) {
-            rc4_init(&pDevice->SBox, pDevice->abyPRNG, pTransmitKey->uKeyLength+3);
-            rc4_encrypt(&pDevice->SBox, pMgmt->abyChallenge, pMgmt->abyChallenge, WLAN_CHALLENGE_LEN);
-        }
-        memcpy(sFrame.pChallenge->abyChallenge, pMgmt->abyChallenge , WLAN_CHALLENGE_LEN);
-    }
-
-    /* Adjust the length fields */
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-    // send the frame
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx.. \n");
-    if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_1 tx failed.\n");
-    }
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *   Handles incoming auth frames with sequence number 2.  Currently
- *   assumes we're a station.
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxAuthenSequence_2(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame)
-{
-       WLAN_FR_AUTHEN sFrame;
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-
-    switch (cpu_to_le16((*(pFrame->pwAuthAlgorithm))))
-    {
-        case WLAN_AUTH_ALG_OPENSYSTEM:
-            if ( cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS ){
-                DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (OPEN) Successful.\n");
-                pMgmt->eCurrState = WMAC_STATE_AUTH;
-               schedule_delayed_work(&pDevice->run_command_work, 0);
-            }
-            else {
-                DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (OPEN) Failed.\n");
-                s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus))));
-                pMgmt->eCurrState = WMAC_STATE_IDLE;
-            }
-           if (pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT) {
-               /* spin_unlock_irq(&pDevice->lock);
-                  vCommandTimerWait((void *) pDevice, 0);
-                  spin_lock_irq(&pDevice->lock); */
-            }
-            break;
-
-        case WLAN_AUTH_ALG_SHAREDKEY:
-
-            if (cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS) {
-                       pTxPacket = (struct vnt_tx_mgmt *)
-                               pMgmt->pbyMgmtPacketPool;
-                       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-                               + WLAN_AUTHEN_FR_MAXLEN);
-                       pTxPacket->p80211Header
-                               = (PUWLAN_80211HDR)((u8 *)pTxPacket
-                                       + sizeof(struct vnt_tx_mgmt));
-                sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-                sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
-                // format buffer structure
-                vMgrEncodeAuthen(&sFrame);
-                // insert values
-                sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-                     (
-                     WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-                     WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_AUTHEN)|
-                     WLAN_SET_FC_ISWEP(1)
-                     ));
-                memcpy( sFrame.pHdr->sA3.abyAddr1, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-                memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-                memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-                *(sFrame.pwAuthAlgorithm) = *(pFrame->pwAuthAlgorithm);
-                *(sFrame.pwAuthSequence) = cpu_to_le16(3);
-                *(sFrame.pwStatus) = cpu_to_le16(WLAN_MGMT_STATUS_SUCCESS);
-                sFrame.pChallenge = (PWLAN_IE_CHALLENGE)(sFrame.pBuf + sFrame.len);
-                sFrame.len += WLAN_CHALLENGE_IE_LEN;
-                sFrame.pChallenge->byElementID = WLAN_EID_CHALLENGE;
-                sFrame.pChallenge->len = WLAN_CHALLENGE_LEN;
-                memcpy( sFrame.pChallenge->abyChallenge, pFrame->pChallenge->abyChallenge, WLAN_CHALLENGE_LEN);
-                // Adjust the length fields
-                pTxPacket->cbMPDULen = sFrame.len;
-                pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-                // send the frame
-                if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx failed.\n");
-                }
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Auth_reply sequence_2 tx ...\n");
-            }
-            else {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:rx Auth_reply sequence_2 status error ...\n");
-                if ( pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT ) {
-                       /* spin_unlock_irq(&pDevice->lock);
-                          vCommandTimerWait((void *) pDevice, 0);
-                          spin_lock_irq(&pDevice->lock); */
-                }
-                s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus))));
-            }
-            break;
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt: rx auth.seq = 2 unknown AuthAlgorithm=%d\n", cpu_to_le16((*(pFrame->pwAuthAlgorithm))));
-            break;
-    }
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *   Handles incoming authen frames with sequence 3.  Currently
- *   assumes we're an AP.  This function assumes the frame has
- *   already been successfully decrypted.
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxAuthenSequence_3(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       u32 uStatusCode = 0 ;
-       u32 uNodeIndex = 0;
-       WLAN_FR_AUTHEN sFrame;
-
-    if (!WLAN_GET_FC_ISWEP(pFrame->pHdr->sA3.wFrameCtl)) {
-        uStatusCode = WLAN_MGMT_STATUS_CHALLENGE_FAIL;
-        goto reply;
-    }
-    if (BSSbIsSTAInNodeDB(pDevice, pFrame->pHdr->sA3.abyAddr2, &uNodeIndex)) {
-         if (pMgmt->sNodeDBTable[uNodeIndex].byAuthSequence != 1) {
-            uStatusCode = WLAN_MGMT_STATUS_RX_AUTH_NOSEQ;
-            goto reply;
-         }
-         if (memcmp(pMgmt->abyChallenge, pFrame->pChallenge->abyChallenge, WLAN_CHALLENGE_LEN) != 0) {
-            uStatusCode = WLAN_MGMT_STATUS_CHALLENGE_FAIL;
-            goto reply;
-         }
-    }
-    else {
-        uStatusCode = WLAN_MGMT_STATUS_UNSPEC_FAILURE;
-        goto reply;
-    }
-
-    if (uNodeIndex) {
-        pMgmt->sNodeDBTable[uNodeIndex].eNodeState = NODE_AUTH;
-        pMgmt->sNodeDBTable[uNodeIndex].byAuthSequence = 0;
-    }
-    uStatusCode = WLAN_MGMT_STATUS_SUCCESS;
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Challenge text check ok..\n");
-
-reply:
-    // send auth reply
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_AUTHEN_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_AUTHEN_FR_MAXLEN;
-    // format buffer structure
-    vMgrEncodeAuthen(&sFrame);
-    /* insert values */
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-         (
-         WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-         WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_AUTHEN)|
-         WLAN_SET_FC_ISWEP(0)
-         ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pFrame->pHdr->sA3.abyAddr2, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-    *(sFrame.pwAuthAlgorithm) = *(pFrame->pwAuthAlgorithm);
-    *(sFrame.pwAuthSequence) = cpu_to_le16(4);
-    *(sFrame.pwStatus) = cpu_to_le16(uStatusCode);
-
-    /* Adjust the length fields */
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-    // send the frame
-    if (csMgmt_xmit(pDevice, pTxPacket) != CMD_STATUS_PENDING) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Authreq_reply sequence_4 tx failed.\n");
-    }
-    return;
-
-}
-
-/*+
- *
- * Routine Description:
- *   Handles incoming authen frames with sequence 4
- *
- *
- * Return Value:
- *    None.
- *
--*/
-static void s_vMgrRxAuthenSequence_4(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, PWLAN_FR_AUTHEN pFrame)
-{
-
-    if ( cpu_to_le16((*(pFrame->pwStatus))) == WLAN_MGMT_STATUS_SUCCESS ){
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (SHAREDKEY) Successful.\n");
-        pMgmt->eCurrState = WMAC_STATE_AUTH;
-       schedule_delayed_work(&pDevice->run_command_work, 0);
-    }
-    else{
-        DBG_PRT(MSG_LEVEL_INFO, KERN_INFO "802.11 Authen (SHAREDKEY) Failed.\n");
-        s_vMgrLogStatus(pMgmt, cpu_to_le16((*(pFrame->pwStatus))) );
-        pMgmt->eCurrState = WMAC_STATE_IDLE;
-    }
-
-    if ( pDevice->eCommandState == WLAN_AUTHENTICATE_WAIT ) {
-       /* spin_unlock_irq(&pDevice->lock);
-          vCommandTimerWait((void *) pDevice, 0);
-          spin_lock_irq(&pDevice->lock); */
-    }
-}
-
-/*+
- *
- * Routine Description:
- *   Handles incoming disassociation frames
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxDisassociation(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket)
-{
-       WLAN_FR_DISASSOC    sFrame;
-       u32 uNodeIndex = 0;
-       CMD_STATUS CmdStatus;
-
-    if ( pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){
-        // if is acting an AP..
-        // a STA is leaving this BSS..
-        sFrame.len = pRxPacket->cbMPDULen;
-        sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-        if (BSSbIsSTAInNodeDB(pDevice, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) {
-            BSSvRemoveOneNode(pDevice, uNodeIndex);
-        }
-        else {
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx disassoc, sta not found\n");
-        }
-    }
-    else if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ){
-        sFrame.len = pRxPacket->cbMPDULen;
-        sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-        vMgrDecodeDisassociation(&sFrame);
-        DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP disassociated me, reason=%d.\n", cpu_to_le16(*(sFrame.pwReason)));
-
-          pDevice->fWPA_Authened = false;
-
-        //TODO: do something let upper layer know or
-        //try to send associate packet again because of inactivity timeout
-        if (pMgmt->eCurrState == WMAC_STATE_ASSOC) {
-                pDevice->bLinkPass = false;
-                pMgmt->sNodeDBTable[0].bActive = false;
-              pDevice->byReAssocCount = 0;
-                pMgmt->eCurrState = WMAC_STATE_AUTH;  // jump back to the auth state!
-                pDevice->eCommandState = WLAN_ASSOCIATE_WAIT;
-               vMgrReAssocBeginSta(pDevice, pMgmt, &CmdStatus);
-              if(CmdStatus == CMD_STATUS_PENDING) {
-                 pDevice->byReAssocCount ++;
-                 return;       //mike add: you'll retry for many times, so it cann't be regarded as disconnected!
-              }
-        }
-
-  // if(pDevice->bWPASuppWextEnabled == true)
-      {
-       union iwreq_data  wrqu;
-       memset(&wrqu, 0, sizeof (wrqu));
-        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-       PRINT_K("wireless_send_event--->SIOCGIWAP(disassociated)\n");
-       wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-     }
-    }
-    /* else, ignore it */
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *   Handles incoming deauthentication frames
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxDeauthentication(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket)
-{
-       WLAN_FR_DEAUTHEN sFrame;
-       u32 uNodeIndex = 0;
-
-    if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP ){
-        //Todo:
-        // if is acting an AP..
-        // a STA is leaving this BSS..
-        sFrame.len = pRxPacket->cbMPDULen;
-        sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-        if (BSSbIsSTAInNodeDB(pDevice, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex)) {
-            BSSvRemoveOneNode(pDevice, uNodeIndex);
-        }
-        else {
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Rx deauth, sta not found\n");
-        }
-    }
-    else {
-        if (pMgmt->eCurrMode == WMAC_MODE_ESS_STA ) {
-            sFrame.len = pRxPacket->cbMPDULen;
-            sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-            vMgrDecodeDeauthen(&sFrame);
-          pDevice->fWPA_Authened = false;
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO  "AP deauthed me, reason=%d.\n", cpu_to_le16((*(sFrame.pwReason))));
-            // TODO: update BSS list for specific BSSID if pre-authentication case
-           if (ether_addr_equal(sFrame.pHdr->sA3.abyAddr3,
-                                pMgmt->abyCurrBSSID)) {
-                if (pMgmt->eCurrState >= WMAC_STATE_AUTHPENDING) {
-                    pMgmt->sNodeDBTable[0].bActive = false;
-                    pMgmt->eCurrMode = WMAC_MODE_STANDBY;
-                    pMgmt->eCurrState = WMAC_STATE_IDLE;
-                    netif_stop_queue(pDevice->dev);
-                    pDevice->bLinkPass = false;
-
-                   vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_SLOW);
-                }
-            }
-
-  // if(pDevice->bWPASuppWextEnabled == true)
-      {
-       union iwreq_data  wrqu;
-       memset(&wrqu, 0, sizeof (wrqu));
-        wrqu.ap_addr.sa_family = ARPHRD_ETHER;
-       PRINT_K("wireless_send_event--->SIOCGIWAP(disauthen)\n");
-       wireless_send_event(pDevice->dev, SIOCGIWAP, &wrqu, NULL);
-     }
-
-        }
-        /* else, ignore it.  TODO: IBSS authentication service
-            would be implemented here */
-    };
-    return;
-}
-
-/*+
- *
- * Routine Description:
- * check if current channel is match ZoneType.
- *for USA:1~11;
- *      Japan:1~13;
- *      Europe:1~13
- * Return Value:
- *               True:exceed;
- *                False:normal case
--*/
-static int ChannelExceedZoneType(struct vnt_private *pDevice, u8 byCurrChannel)
-{
-       int exceed = false;
-
-  switch(pDevice->byZoneType) {
-       case 0x00:                  //USA:1~11
-                     if((byCurrChannel<1) ||(byCurrChannel>11))
-                       exceed = true;
-                break;
-       case 0x01:                  //Japan:1~13
-       case 0x02:                  //Europe:1~13
-                     if((byCurrChannel<1) ||(byCurrChannel>13))
-                       exceed = true;
-                break;
-       default:                    //reserve for other zonetype
-               break;
-  }
-
-  return exceed;
-}
-
-/*+
- *
- * Routine Description:
- *   Handles and analysis incoming beacon frames.
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-static void s_vMgrRxBeacon(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket,
-       int bInScan)
-{
-       PKnownBSS pBSSList;
-       WLAN_FR_BEACON sFrame;
-       u64 qwTSFOffset;
-       int bIsBSSIDEqual = false;
-       int bIsSSIDEqual = false;
-       int bTSFLargeDiff = false;
-       int bTSFOffsetPostive = false;
-       int bUpdateTSF = false;
-       int bIsAPBeacon = false;
-       int bIsChannelEqual = false;
-       u32 uLocateByteIndex;
-       u8 byTIMBitOn = 0;
-       u16 wAIDNumber = 0;
-       u32 uNodeIndex;
-       u64 qwTimestamp, qwLocalTSF;
-       u64 qwCurrTSF;
-       u16 wStartIndex = 0;
-       u16 wAIDIndex = 0;
-       u8 byCurrChannel = pRxPacket->byRxChannel;
-       ERPObject sERP;
-       u32 uRateLen = WLAN_RATES_MAXLEN;
-       int bChannelHit = false;
-       u8 byOldPreambleType;
-
-     if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)
-        return;
-
-    memset(&sFrame, 0, sizeof(WLAN_FR_BEACON));
-    sFrame.len = pRxPacket->cbMPDULen;
-    sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-
-    // decode the beacon frame
-    vMgrDecodeBeacon(&sFrame);
-
-    if ((sFrame.pwBeaconInterval == NULL)
-       || (sFrame.pwCapInfo == NULL)
-       || (sFrame.pSSID == NULL)
-       || (sFrame.pSuppRates == NULL)) {
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx beacon frame error\n");
-       return;
-    }
-
-    if( byCurrChannel > CB_MAX_CHANNEL_24G )
-    {
-        if (sFrame.pDSParms != NULL) {
-            if (byCurrChannel == RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1])
-                bChannelHit = true;
-            byCurrChannel = RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1];
-        } else {
-            bChannelHit = true;
-        }
-
-    } else {
-        if (sFrame.pDSParms != NULL) {
-            if (byCurrChannel == sFrame.pDSParms->byCurrChannel)
-                bChannelHit = true;
-            byCurrChannel = sFrame.pDSParms->byCurrChannel;
-        } else {
-            bChannelHit = true;
-        }
-    }
-
-if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
-      return;
-
-    if (sFrame.pERP != NULL) {
-        sERP.byERP = sFrame.pERP->byContext;
-        sERP.bERPExist = true;
-
-    } else {
-        sERP.bERPExist = false;
-        sERP.byERP = 0;
-    }
-
-    pBSSList = BSSpAddrIsInBSSList((void *) pDevice,
-                                  sFrame.pHdr->sA3.abyAddr3,
-                                  sFrame.pSSID);
-    if (pBSSList == NULL) {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon/insert: RxChannel = : %d\n", byCurrChannel);
-       BSSbInsertToBSSList((void *) pDevice,
-                            sFrame.pHdr->sA3.abyAddr3,
-                            *sFrame.pqwTimestamp,
-                            *sFrame.pwBeaconInterval,
-                            *sFrame.pwCapInfo,
-                            byCurrChannel,
-                            sFrame.pSSID,
-                            sFrame.pSuppRates,
-                            sFrame.pExtSuppRates,
-                            &sERP,
-                            sFrame.pRSN,
-                            sFrame.pRSNWPA,
-                            sFrame.pIE_Country,
-                            sFrame.pIE_Quiet,
-                            sFrame.len - WLAN_HDR_ADDR3_LEN,
-                            sFrame.pHdr->sA4.abyAddr4,   // payload of beacon
-                           (void *) pRxPacket);
-    }
-    else {
-//        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"update bcn: RxChannel = : %d\n", byCurrChannel);
-       BSSbUpdateToBSSList((void *) pDevice,
-                            *sFrame.pqwTimestamp,
-                            *sFrame.pwBeaconInterval,
-                            *sFrame.pwCapInfo,
-                            byCurrChannel,
-                            bChannelHit,
-                            sFrame.pSSID,
-                            sFrame.pSuppRates,
-                            sFrame.pExtSuppRates,
-                            &sERP,
-                            sFrame.pRSN,
-                            sFrame.pRSNWPA,
-                            sFrame.pIE_Country,
-                            sFrame.pIE_Quiet,
-                            pBSSList,
-                            sFrame.len - WLAN_HDR_ADDR3_LEN,
-                            sFrame.pHdr->sA4.abyAddr4,   // payload of probresponse
-                           (void *) pRxPacket);
-
-    }
-
-    if (bInScan) {
-        return;
-    }
-
-    if(byCurrChannel == (u8)pMgmt->uCurrChannel)
-       bIsChannelEqual = true;
-
-    if (bIsChannelEqual && (pMgmt->eCurrMode == WMAC_MODE_ESS_AP)) {
-
-        // if rx beacon without ERP field
-        if (sERP.bERPExist) {
-            if (WLAN_GET_ERP_USE_PROTECTION(sERP.byERP)){
-                pDevice->byERPFlag |= WLAN_SET_ERP_USE_PROTECTION(1);
-                pDevice->wUseProtectCntDown = USE_PROTECT_PERIOD;
-            }
-        }
-        else {
-            pDevice->byERPFlag |= WLAN_SET_ERP_USE_PROTECTION(1);
-            pDevice->wUseProtectCntDown = USE_PROTECT_PERIOD;
-        }
-
-        if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-            if(!WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo))
-                pDevice->byERPFlag |= WLAN_SET_ERP_BARKER_MODE(1);
-            if(!sERP.bERPExist)
-                pDevice->byERPFlag |= WLAN_SET_ERP_NONERP_PRESENT(1);
-        }
-    }
-
-    // check if BSSID the same
-    if (memcmp(sFrame.pHdr->sA3.abyAddr3,
-               pMgmt->abyCurrBSSID,
-               WLAN_BSSID_LEN) == 0) {
-
-        bIsBSSIDEqual = true;
-        pDevice->uCurrRSSI = pRxPacket->uRSSI;
-        pDevice->byCurrSQ = pRxPacket->bySQ;
-        if (pMgmt->sNodeDBTable[0].uInActiveCount != 0) {
-            pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-            //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"BCN:Wake Count= [%d]\n", pMgmt->wCountToWakeUp);
-        }
-    }
-    // check if SSID the same
-    if (sFrame.pSSID->len == ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) {
-        if (memcmp(sFrame.pSSID->abySSID,
-                   ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,
-                   sFrame.pSSID->len
-                   ) == 0) {
-            bIsSSIDEqual = true;
-        }
-    }
-
-    if ((WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)== true) &&
-        (bIsBSSIDEqual == true) &&
-        (bIsSSIDEqual == true) &&
-        (pMgmt->eCurrMode == WMAC_MODE_ESS_STA) &&
-        (pMgmt->eCurrState == WMAC_STATE_ASSOC)) {
-        // add state check to prevent reconnect fail since we'll receive Beacon
-
-        bIsAPBeacon = true;
-        if (pBSSList != NULL) {
-
-                // Sync ERP field
-                if ((pBSSList->sERP.bERPExist == true) && (pDevice->byBBType == BB_TYPE_11G)) {
-                    if ((pBSSList->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION) != pDevice->bProtectMode) {//0000 0010
-                        pDevice->bProtectMode = (pBSSList->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION);
-                        if (pDevice->bProtectMode) {
-                            MACvEnableProtectMD(pDevice);
-                        } else {
-                            MACvDisableProtectMD(pDevice);
-                        }
-                        vUpdateIFS(pDevice);
-                    }
-                    if ((pBSSList->sERP.byERP & WLAN_EID_ERP_NONERP_PRESENT) != pDevice->bNonERPPresent) {//0000 0001
-                        pDevice->bNonERPPresent = (pBSSList->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION);
-                    }
-                    if ((pBSSList->sERP.byERP & WLAN_EID_ERP_BARKER_MODE) != pDevice->bBarkerPreambleMd) {//0000 0100
-                        pDevice->bBarkerPreambleMd = (pBSSList->sERP.byERP & WLAN_EID_ERP_BARKER_MODE);
-                        //BarkerPreambleMd has higher priority than shortPreamble bit in Cap
-                        if (pDevice->bBarkerPreambleMd) {
-                            MACvEnableBarkerPreambleMd(pDevice);
-                        } else {
-                            MACvDisableBarkerPreambleMd(pDevice);
-                        }
-                    }
-                }
-                // Sync Short Slot Time
-                if (WLAN_GET_CAP_INFO_SHORTSLOTTIME(pBSSList->wCapInfo) != pDevice->bShortSlotTime) {
-                    bool    bShortSlotTime;
-
-                    bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(pBSSList->wCapInfo);
-                    //DBG_PRN_WLAN05(("Set Short Slot Time: %d\n", pDevice->bShortSlotTime));
-                    //Kyle check if it is OK to set G.
-                    if (pDevice->byBBType == BB_TYPE_11A) {
-                        bShortSlotTime = true;
-                    }
-                    else if (pDevice->byBBType == BB_TYPE_11B) {
-                        bShortSlotTime = false;
-                    }
-                    if (bShortSlotTime != pDevice->bShortSlotTime) {
-                        pDevice->bShortSlotTime = bShortSlotTime;
-                        BBvSetShortSlotTime(pDevice);
-                        vUpdateIFS(pDevice);
-                    }
-                }
-
-                //
-                // Preamble may change dynamically
-                //
-                byOldPreambleType = pDevice->byPreambleType;
-                if (WLAN_GET_CAP_INFO_SHORTPREAMBLE(pBSSList->wCapInfo)) {
-                    pDevice->byPreambleType = pDevice->byShortPreamble;
-                }
-                else {
-                    pDevice->byPreambleType = 0;
-                }
-                if (pDevice->byPreambleType != byOldPreambleType)
-                    CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType);
-            //
-            // Basic Rate Set may change dynamically
-            //
-            if (pBSSList->eNetworkTypeInUse == PHY_TYPE_11B) {
-                uRateLen = WLAN_RATES_MAXLEN_11B;
-            }
-            pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)pBSSList->abySuppRates,
-                                                    (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                                    uRateLen);
-            pMgmt->abyCurrExtSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)pBSSList->abyExtSuppRates,
-                                                    (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
-                                                    uRateLen);
-           RATEvParseMaxRate((void *)pDevice,
-                               (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                               (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
-                               true,
-                               &(pMgmt->sNodeDBTable[0].wMaxBasicRate),
-                               &(pMgmt->sNodeDBTable[0].wMaxSuppRate),
-                               &(pMgmt->sNodeDBTable[0].wSuppRate),
-                               &(pMgmt->sNodeDBTable[0].byTopCCKBasicRate),
-                               &(pMgmt->sNodeDBTable[0].byTopOFDMBasicRate)
-                              );
-
-        }
-    }
-
-//    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Beacon 2 \n");
-    // check if CF field exisit
-    if (WLAN_GET_CAP_INFO_ESS(*sFrame.pwCapInfo)) {
-        if (sFrame.pCFParms->wCFPDurRemaining > 0) {
-            // TODO: deal with CFP period to set NAV
-        }
-    }
-
-       qwTimestamp = cpu_to_le64(*sFrame.pqwTimestamp);
-       qwLocalTSF = pRxPacket->qwLocalTSF;
-
-    // check if beacon TSF larger or small than our local TSF
-       if (qwTimestamp >= qwLocalTSF)
-               bTSFOffsetPostive = true;
-       else
-               bTSFOffsetPostive = false;
-
-    if (bTSFOffsetPostive) {
-        qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwTimestamp), (qwLocalTSF));
-    }
-    else {
-        qwTSFOffset = CARDqGetTSFOffset(pRxPacket->byRxRate, (qwLocalTSF), (qwTimestamp));
-    }
-
-       if (qwTSFOffset > TRIVIAL_SYNC_DIFFERENCE)
-               bTSFLargeDiff = true;
-
-    // if infra mode
-    if (bIsAPBeacon == true) {
-
-        // Infra mode: Local TSF always follow AP's TSF if Difference huge.
-        if (bTSFLargeDiff)
-            bUpdateTSF = true;
-
-       if ((pDevice->bEnablePSMode == true) && (sFrame.pTIM)) {
-
-               /* deal with DTIM, analysis TIM */
-            pMgmt->bMulticastTIM = WLAN_MGMT_IS_MULTICAST_TIM(sFrame.pTIM->byBitMapCtl) ? true : false ;
-            pMgmt->byDTIMCount = sFrame.pTIM->byDTIMCount;
-            pMgmt->byDTIMPeriod = sFrame.pTIM->byDTIMPeriod;
-            wAIDNumber = pMgmt->wCurrAID & ~(BIT14|BIT15);
-
-            // check if AID in TIM field bit on
-            // wStartIndex = N1
-            wStartIndex = WLAN_MGMT_GET_TIM_OFFSET(sFrame.pTIM->byBitMapCtl) << 1;
-            // AIDIndex = N2
-            wAIDIndex = (wAIDNumber >> 3);
-            if ((wAIDNumber > 0) && (wAIDIndex >= wStartIndex)) {
-                uLocateByteIndex = wAIDIndex - wStartIndex;
-                // len = byDTIMCount + byDTIMPeriod + byDTIMPeriod + byVirtBitMap[0~250]
-                if (sFrame.pTIM->len >= (uLocateByteIndex + 4)) {
-                    byTIMBitOn  = (0x01) << ((wAIDNumber) % 8);
-                    pMgmt->bInTIM = sFrame.pTIM->byVirtBitMap[uLocateByteIndex] & byTIMBitOn ? true : false;
-                }
-                else {
-                    pMgmt->bInTIM = false;
-                };
-            }
-            else {
-                pMgmt->bInTIM = false;
-            };
-
-            if (pMgmt->bInTIM ||
-                (pMgmt->bMulticastTIM && (pMgmt->byDTIMCount == 0))) {
-                pMgmt->bInTIMWake = true;
-               /* send out ps-poll packet */
-               if (pMgmt->bInTIM)
-                       PSvSendPSPOLL(pDevice);
-
-            }
-            else {
-                pMgmt->bInTIMWake = false;
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Not In TIM..\n");
-                if (pDevice->bPWBitOn == false) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Send Null Packet\n");
-                    if (PSbSendNullPacket(pDevice))
-                        pDevice->bPWBitOn = true;
-                }
-                if(PSbConsiderPowerDown(pDevice, false, false)) {
-                   DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "BCN: Power down now...\n");
-                }
-            }
-
-        }
-
-    }
-    // if adhoc mode
-    if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && !bIsAPBeacon && bIsChannelEqual) {
-        if (bIsBSSIDEqual) {
-            // Use sNodeDBTable[0].uInActiveCount as IBSS beacons received count.
-                   if (pMgmt->sNodeDBTable[0].uInActiveCount != 0)
-                           pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-
-            // adhoc mode:TSF updated only when beacon larger then local TSF
-            if (bTSFLargeDiff && bTSFOffsetPostive &&
-                (pMgmt->eCurrState == WMAC_STATE_JOINTED))
-                bUpdateTSF = true;
-
-            // During dpc, already in spinlocked.
-            if (BSSbIsSTAInNodeDB(pDevice, sFrame.pHdr->sA3.abyAddr2, &uNodeIndex)) {
-
-                // Update the STA, (Technically the Beacons of all the IBSS nodes
-                       // should be identical, but that's not happening in practice.
-                pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pSuppRates,
-                                                        (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                                        WLAN_RATES_MAXLEN_11B);
-               RATEvParseMaxRate((void *)pDevice,
-                                   (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                   NULL,
-                                   true,
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].byTopCCKBasicRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].byTopOFDMBasicRate)
-                                  );
-                pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble = WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
-                pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
-                pMgmt->sNodeDBTable[uNodeIndex].uInActiveCount = 0;
-            }
-            else {
-               /* Todo, initial Node content */
-               BSSvCreateOneNode(pDevice, &uNodeIndex);
-
-                pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pSuppRates,
-                                                        (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                                        WLAN_RATES_MAXLEN_11B);
-               RATEvParseMaxRate((void *)pDevice,
-                                   (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                   NULL,
-                                   true,
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].wMaxBasicRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].wSuppRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].byTopCCKBasicRate),
-                                   &(pMgmt->sNodeDBTable[uNodeIndex].byTopOFDMBasicRate)
-                                 );
-
-                memcpy(pMgmt->sNodeDBTable[uNodeIndex].abyMACAddr, sFrame.pHdr->sA3.abyAddr2, WLAN_ADDR_LEN);
-                pMgmt->sNodeDBTable[uNodeIndex].bShortPreamble = WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo);
-                pMgmt->sNodeDBTable[uNodeIndex].wTxDataRate = pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate;
-/*
-                pMgmt->sNodeDBTable[uNodeIndex].bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(*sFrame.pwCapInfo);
-                if(pMgmt->sNodeDBTable[uNodeIndex].wMaxSuppRate > RATE_11M)
-                       pMgmt->sNodeDBTable[uNodeIndex].bERPExist = true;
-*/
-            }
-
-            // if other stations jointed, indicate connect to upper layer..
-            if (pMgmt->eCurrState == WMAC_STATE_STARTED) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Current IBSS State: [Started]........to: [Jointed] \n");
-                pMgmt->eCurrState = WMAC_STATE_JOINTED;
-                pDevice->bLinkPass = true;
-
-               vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-                if (netif_queue_stopped(pDevice->dev)){
-                    netif_wake_queue(pDevice->dev);
-                }
-                pMgmt->sNodeDBTable[0].bActive = true;
-                pMgmt->sNodeDBTable[0].uInActiveCount = 0;
-
-            }
-        }
-        else if (bIsSSIDEqual) {
-
-            // See other adhoc sta with the same SSID but BSSID is different.
-            // adpot this vars only when TSF larger then us.
-            if (bTSFLargeDiff && bTSFOffsetPostive) {
-                 // we don't support ATIM under adhoc mode
-               // if ( sFrame.pIBSSParms->wATIMWindow == 0) {
-                     // adpot this vars
-                     // TODO: check sFrame cap if privacy on, and support rate syn
-                     memcpy(pMgmt->abyCurrBSSID, sFrame.pHdr->sA3.abyAddr3, WLAN_BSSID_LEN);
-                     memcpy(pDevice->abyBSSID, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-                     pMgmt->wCurrATIMWindow = cpu_to_le16(sFrame.pIBSSParms->wATIMWindow);
-                     pMgmt->wCurrBeaconPeriod = cpu_to_le16(*sFrame.pwBeaconInterval);
-                     pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)sFrame.pSuppRates,
-                                                      (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                                      WLAN_RATES_MAXLEN_11B);
-                     // set HW beacon interval and re-synchronizing....
-                     DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rejoining to Other Adhoc group with same SSID........\n");
-
-                     MACvWriteBeaconInterval(pDevice, pMgmt->wCurrBeaconPeriod);
-                     CARDvAdjustTSF(pDevice, pRxPacket->byRxRate, qwTimestamp, pRxPacket->qwLocalTSF);
-                     CARDvUpdateNextTBTT(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);
-
-                     // Turn off bssid filter to avoid filter others adhoc station which bssid is different.
-                     MACvWriteBSSIDAddress(pDevice, pMgmt->abyCurrBSSID);
-
-                    byOldPreambleType = pDevice->byPreambleType;
-                    if (WLAN_GET_CAP_INFO_SHORTPREAMBLE(*sFrame.pwCapInfo)) {
-                        pDevice->byPreambleType = pDevice->byShortPreamble;
-                    }
-                    else {
-                        pDevice->byPreambleType = 0;
-                    }
-                    if (pDevice->byPreambleType != byOldPreambleType)
-                        CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType);
-
-                     // MACvRegBitsOff(pDevice->PortOffset, MAC_REG_RCR, RCR_BSSID);
-                     // set highest basic rate
-                     // s_vSetHighestBasicRate(pDevice, (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates);
-                     // Prepare beacon frame
-                       bMgrPrepareBeaconToSend((void *) pDevice, pMgmt);
-              //  }
-            }
-        }
-    }
-    // endian issue ???
-    // Update TSF
-    if (bUpdateTSF) {
-        CARDbGetCurrentTSF(pDevice, &qwCurrTSF);
-        CARDvAdjustTSF(pDevice, pRxPacket->byRxRate, qwTimestamp , pRxPacket->qwLocalTSF);
-        CARDbGetCurrentTSF(pDevice, &qwCurrTSF);
-        CARDvUpdateNextTBTT(pDevice, qwTimestamp, pMgmt->wCurrBeaconPeriod);
-    }
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *   Instructs the hw to create a bss using the supplied
- *   attributes. Note that this implementation only supports Ad-Hoc
- *   BSS creation.
- *
- *
- * Return Value:
- *    CMD_STATUS
- *
--*/
-
-void vMgrCreateOwnIBSS(struct vnt_private *pDevice, PCMD_STATUS pStatus)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u16 wMaxBasicRate;
-       u16 wMaxSuppRate;
-       u8 byTopCCKBasicRate;
-       u8 byTopOFDMBasicRate;
-       u64 qwCurrTSF = 0;
-       int ii;
-       u8 abyRATE[] = {0x82, 0x84, 0x8B, 0x96, 0x24, 0x30, 0x48, 0x6C, 0x0C,
-               0x12, 0x18, 0x60};
-       u8 abyCCK_RATE[] = {0x82, 0x84, 0x8B, 0x96};
-       u8 abyOFDM_RATE[] = {0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
-       u16 wSuppRate;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Create Basic Service Set .......\n");
-
-    if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) {
-        if ((pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) &&
-            (pDevice->eEncryptionStatus != Ndis802_11Encryption2Enabled) &&
-            (pDevice->eEncryptionStatus != Ndis802_11Encryption3Enabled)) {
-            // encryption mode error
-            *pStatus = CMD_STATUS_FAILURE;
-            return;
-        }
-    }
-
-    pMgmt->abyCurrSuppRates[0] = WLAN_EID_SUPP_RATES;
-    pMgmt->abyCurrExtSuppRates[0] = WLAN_EID_EXTSUPP_RATES;
-
-    if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
-        pMgmt->eCurrentPHYMode = pMgmt->byAPBBType;
-    } else {
-        if (pDevice->byBBType == BB_TYPE_11G)
-            pMgmt->eCurrentPHYMode = PHY_TYPE_11G;
-        if (pDevice->byBBType == BB_TYPE_11B)
-            pMgmt->eCurrentPHYMode = PHY_TYPE_11B;
-        if (pDevice->byBBType == BB_TYPE_11A)
-            pMgmt->eCurrentPHYMode = PHY_TYPE_11A;
-    }
-
-    if (pMgmt->eCurrentPHYMode != PHY_TYPE_11A) {
-        pMgmt->abyCurrSuppRates[1] = WLAN_RATES_MAXLEN_11B;
-        pMgmt->abyCurrExtSuppRates[1] = 0;
-        for (ii = 0; ii < 4; ii++)
-            pMgmt->abyCurrSuppRates[2+ii] = abyRATE[ii];
-    } else {
-        pMgmt->abyCurrSuppRates[1] = 8;
-        pMgmt->abyCurrExtSuppRates[1] = 0;
-        for (ii = 0; ii < 8; ii++)
-            pMgmt->abyCurrSuppRates[2+ii] = abyRATE[ii];
-    }
-
-    if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
-        pMgmt->abyCurrSuppRates[1] = 8;
-        pMgmt->abyCurrExtSuppRates[1] = 4;
-        for (ii = 0; ii < 4; ii++)
-            pMgmt->abyCurrSuppRates[2+ii] =  abyCCK_RATE[ii];
-        for (ii = 4; ii < 8; ii++)
-            pMgmt->abyCurrSuppRates[2+ii] =  abyOFDM_RATE[ii-4];
-        for (ii = 0; ii < 4; ii++)
-            pMgmt->abyCurrExtSuppRates[2+ii] =  abyOFDM_RATE[ii+4];
-    }
-
-    // Disable Protect Mode
-    pDevice->bProtectMode = 0;
-    MACvDisableProtectMD(pDevice);
-
-    pDevice->bBarkerPreambleMd = 0;
-    MACvDisableBarkerPreambleMd(pDevice);
-
-    // Kyle Test 2003.11.04
-
-    // set HW beacon interval
-    if (pMgmt->wIBSSBeaconPeriod == 0)
-        pMgmt->wIBSSBeaconPeriod = DEFAULT_IBSS_BI;
-    MACvWriteBeaconInterval(pDevice, pMgmt->wIBSSBeaconPeriod);
-
-    CARDbGetCurrentTSF(pDevice, &qwCurrTSF);
-    // clear TSF counter
-    CARDbClearCurrentTSF(pDevice);
-
-    // enable TSF counter
-    MACvRegBitsOn(pDevice,MAC_REG_TFTCTL,TFTCTL_TSFCNTREN);
-    // set Next TBTT
-    CARDvSetFirstNextTBTT(pDevice, pMgmt->wIBSSBeaconPeriod);
-
-    pMgmt->uIBSSChannel = pDevice->uChannel;
-
-    if (pMgmt->uIBSSChannel == 0)
-        pMgmt->uIBSSChannel = DEFAULT_IBSS_CHANNEL;
-
-    // set channel and clear NAV
-    CARDbSetMediaChannel(pDevice, pMgmt->uIBSSChannel);
-    pMgmt->uCurrChannel = pMgmt->uIBSSChannel;
-
-    pDevice->byPreambleType = pDevice->byShortPreamble;
-
-    // set basic rate
-
-    RATEvParseMaxRate((void *)pDevice,
-                     (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                      (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates, true,
-                      &wMaxBasicRate, &wMaxSuppRate, &wSuppRate,
-                      &byTopCCKBasicRate, &byTopOFDMBasicRate);
-
-    if (pDevice->byBBType == BB_TYPE_11A) {
-        pDevice->bShortSlotTime = true;
-    } else {
-        pDevice->bShortSlotTime = false;
-    }
-    BBvSetShortSlotTime(pDevice);
-    // vUpdateIFS() use pDevice->bShortSlotTime as parameter so it must be called
-    // after setting ShortSlotTime.
-    // CARDvSetBSSMode call vUpdateIFS()
-    CARDvSetBSSMode(pDevice);
-
-    if (pMgmt->eConfigMode == WMAC_CONFIG_AP) {
-        MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_AP);
-        pMgmt->eCurrMode = WMAC_MODE_ESS_AP;
-    }
-
-    if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) {
-        MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
-        pMgmt->eCurrMode = WMAC_MODE_IBSS_STA;
-    }
-
-    // Adopt pre-configured IBSS vars to current vars
-    pMgmt->eCurrState = WMAC_STATE_STARTED;
-    pMgmt->wCurrBeaconPeriod = pMgmt->wIBSSBeaconPeriod;
-    pMgmt->uCurrChannel = pMgmt->uIBSSChannel;
-    pMgmt->wCurrATIMWindow = pMgmt->wIBSSATIMWindow;
-    pDevice->uCurrRSSI = 0;
-    pDevice->byCurrSQ = 0;
-
-    memcpy(pMgmt->abyDesireSSID,pMgmt->abyAdHocSSID,
-                      ((PWLAN_IE_SSID)pMgmt->abyAdHocSSID)->len + WLAN_IEHDR_LEN);
-
-    memset(pMgmt->abyCurrSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-    memcpy(pMgmt->abyCurrSSID,
-           pMgmt->abyDesireSSID,
-           ((PWLAN_IE_SSID)pMgmt->abyDesireSSID)->len + WLAN_IEHDR_LEN
-          );
-
-    if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-        // AP mode BSSID = MAC addr
-        memcpy(pMgmt->abyCurrBSSID, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-               DBG_PRT(MSG_LEVEL_INFO, KERN_INFO"AP beacon created BSSID:"
-                       "%pM\n", pMgmt->abyCurrBSSID);
-    }
-
-    if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-
-        // BSSID selected must be randomized as spec 11.1.3
-       pMgmt->abyCurrBSSID[5] = (u8)(qwCurrTSF & 0x000000ff);
-       pMgmt->abyCurrBSSID[4] = (u8)((qwCurrTSF & 0x0000ff00) >> 8);
-       pMgmt->abyCurrBSSID[3] = (u8)((qwCurrTSF & 0x00ff0000) >> 16);
-       pMgmt->abyCurrBSSID[2] = (u8)((qwCurrTSF & 0x00000ff0) >> 4);
-       pMgmt->abyCurrBSSID[1] = (u8)((qwCurrTSF & 0x000ff000) >> 12);
-       pMgmt->abyCurrBSSID[0] = (u8)((qwCurrTSF & 0x0ff00000) >> 20);
-        pMgmt->abyCurrBSSID[5] ^= pMgmt->abyMACAddr[0];
-        pMgmt->abyCurrBSSID[4] ^= pMgmt->abyMACAddr[1];
-        pMgmt->abyCurrBSSID[3] ^= pMgmt->abyMACAddr[2];
-        pMgmt->abyCurrBSSID[2] ^= pMgmt->abyMACAddr[3];
-        pMgmt->abyCurrBSSID[1] ^= pMgmt->abyMACAddr[4];
-        pMgmt->abyCurrBSSID[0] ^= pMgmt->abyMACAddr[5];
-        pMgmt->abyCurrBSSID[0] &= ~IEEE_ADDR_GROUP;
-        pMgmt->abyCurrBSSID[0] |= IEEE_ADDR_UNIVERSAL;
-
-               DBG_PRT(MSG_LEVEL_INFO, KERN_INFO"Adhoc beacon created bssid:"
-                       "%pM\n", pMgmt->abyCurrBSSID);
-    }
-
-    // set BSSID filter
-    MACvWriteBSSIDAddress(pDevice, pMgmt->abyCurrBSSID);
-    memcpy(pDevice->abyBSSID, pMgmt->abyCurrBSSID, WLAN_ADDR_LEN);
-
-    MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
-    pDevice->byRxMode |= RCR_BSSID;
-    pMgmt->bCurrBSSIDFilterOn = true;
-
-    // Set Capability Info
-    pMgmt->wCurrCapInfo = 0;
-
-    if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_ESS(1);
-        pMgmt->byDTIMPeriod = DEFAULT_DTIM_PERIOD;
-        pMgmt->byDTIMCount = pMgmt->byDTIMPeriod - 1;
-       pDevice->op_mode = NL80211_IFTYPE_AP;
-    }
-
-    if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_IBSS(1);
-       pDevice->op_mode = NL80211_IFTYPE_ADHOC;
-    }
-
-    if (pDevice->bEncryptionEnable) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1);
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
-            if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) {
-                pMgmt->byCSSPK = KEY_CTL_CCMP;
-                pMgmt->byCSSGK = KEY_CTL_CCMP;
-            } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) {
-                pMgmt->byCSSPK = KEY_CTL_TKIP;
-                pMgmt->byCSSGK = KEY_CTL_TKIP;
-            } else {
-                pMgmt->byCSSPK = KEY_CTL_NONE;
-                pMgmt->byCSSGK = KEY_CTL_WEP;
-            }
-        } else {
-            pMgmt->byCSSPK = KEY_CTL_WEP;
-            pMgmt->byCSSGK = KEY_CTL_WEP;
-        }
-    }
-
-    pMgmt->byERPContext = 0;
-
-    if (pDevice->byPreambleType == 1) {
-        pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_SHORTPREAMBLE(1);
-    } else {
-        pMgmt->wCurrCapInfo &= (~WLAN_SET_CAP_INFO_SHORTPREAMBLE(1));
-    }
-
-    pMgmt->eCurrState = WMAC_STATE_STARTED;
-    // Prepare beacon to send
-    if (bMgrPrepareBeaconToSend((void *) pDevice, pMgmt))
-       *pStatus = CMD_STATUS_SUCCESS;
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *   Instructs wmac to join a bss using the supplied attributes.
- *   The arguments may the BSSID or SSID and the rest of the
- *   attributes are obtained from the scan result of known bss list.
- *
- *
- * Return Value:
- *    None.
- *
--*/
-
-void vMgrJoinBSSBegin(struct vnt_private *pDevice, PCMD_STATUS pStatus)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       PKnownBSS pCurr = NULL;
-       int ii, uu;
-       PWLAN_IE_SUPP_RATES pItemRates = NULL;
-       PWLAN_IE_SUPP_RATES pItemExtRates = NULL;
-       PWLAN_IE_SSID   pItemSSID;
-       u32 uRateLen = WLAN_RATES_MAXLEN;
-       u16 wMaxBasicRate = RATE_1M;
-       u16 wMaxSuppRate = RATE_1M;
-       u16 wSuppRate;
-       u8 byTopCCKBasicRate = RATE_1M;
-       u8 byTopOFDMBasicRate = RATE_1M;
-       u8 bShortSlotTime = false;
-
-    for (ii = 0; ii < MAX_BSS_NUM; ii++) {
-        if (pMgmt->sBSSList[ii].bActive == true)
-            break;
-    }
-
-    if (ii == MAX_BSS_NUM) {
-       *pStatus = CMD_STATUS_RESOURCES;
-        DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "BSS finding:BSS list is empty.\n");
-       return;
-    }
-
-    // memset(pMgmt->abyDesireBSSID, 0,  WLAN_BSSID_LEN);
-    // Search known BSS list for prefer BSSID or SSID
-
-    pCurr = BSSpSearchBSSList(pDevice,
-                              pMgmt->abyDesireBSSID,
-                              pMgmt->abyDesireSSID,
-                              pDevice->eConfigPHYMode
-                              );
-
-    if (pCurr == NULL){
-       *pStatus = CMD_STATUS_RESOURCES;
-       pItemSSID = (PWLAN_IE_SSID)pMgmt->abyDesireSSID;
-       DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Scanning [%s] not found, disconnected !\n", pItemSSID->abySSID);
-       return;
-    }
-
-    DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "AP(BSS) finding:Found a AP(BSS)..\n");
-
-    if (WLAN_GET_CAP_INFO_ESS(cpu_to_le16(pCurr->wCapInfo))){
-
-       if ((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-           (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK)) {
-               /*
-            if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) {
-                if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == false) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
-                    // encryption mode error
-                    pMgmt->eCurrState = WMAC_STATE_IDLE;
-                    return;
-                }
-            } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) {
-                if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == false) {
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No match RSN info. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n");
-                    // encryption mode error
-                    pMgmt->eCurrState = WMAC_STATE_IDLE;
-                    return;
-                }
-            }
-*/
-        }
-
-       //if(pDevice->bWPASuppWextEnabled == true)
-            Encyption_Rebuild(pDevice, pCurr);
-
-        // Infrastructure BSS
-        s_vMgrSynchBSS(pDevice,
-                       WMAC_MODE_ESS_STA,
-                       pCurr,
-                       pStatus
-                       );
-
-        if (*pStatus == CMD_STATUS_SUCCESS){
-
-            // Adopt this BSS state vars in Mgmt Object
-            pMgmt->uCurrChannel = pCurr->uChannel;
-
-            memset(pMgmt->abyCurrSuppRates, 0 , WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
-            memset(pMgmt->abyCurrExtSuppRates, 0 , WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1);
-
-            if (pCurr->eNetworkTypeInUse == PHY_TYPE_11B) {
-                uRateLen = WLAN_RATES_MAXLEN_11B;
-            }
-
-            pItemRates = (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates;
-            pItemExtRates = (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates;
-
-            // Parse Support Rate IE
-            pItemRates->byElementID = WLAN_EID_SUPP_RATES;
-            pItemRates->len = RATEuSetIE((PWLAN_IE_SUPP_RATES)pCurr->abySuppRates,
-                                         pItemRates,
-                                         uRateLen);
-
-            // Parse Extension Support Rate IE
-            pItemExtRates->byElementID = WLAN_EID_EXTSUPP_RATES;
-            pItemExtRates->len = RATEuSetIE((PWLAN_IE_SUPP_RATES)pCurr->abyExtSuppRates,
-                                            pItemExtRates,
-                                            uRateLen);
-            // Stuffing Rate IE
-            if ((pItemExtRates->len > 0) && (pItemRates->len < 8)) {
-               for (ii = 0; ii < (unsigned int) (8 - pItemRates->len); ) {
-                       pItemRates->abyRates[pItemRates->len + ii] =
-                               pItemExtRates->abyRates[ii];
-                       ii++;
-                    if (pItemExtRates->len <= ii)
-                        break;
-                }
-                pItemRates->len += (u8)ii;
-                if (pItemExtRates->len - ii > 0) {
-                    pItemExtRates->len -= (u8)ii;
-                    for (uu = 0; uu < pItemExtRates->len; uu ++) {
-                        pItemExtRates->abyRates[uu] = pItemExtRates->abyRates[uu + ii];
-                    }
-                } else {
-                    pItemExtRates->len = 0;
-                }
-            }
-
-           RATEvParseMaxRate((void *)pDevice, pItemRates, pItemExtRates, true,
-                              &wMaxBasicRate, &wMaxSuppRate, &wSuppRate,
-                              &byTopCCKBasicRate, &byTopOFDMBasicRate);
-            vUpdateIFS(pDevice);
-            // TODO: deal with if wCapInfo the privacy is on, but station WEP is off
-            // TODO: deal with if wCapInfo the PS-Pollable is on.
-            pMgmt->wCurrBeaconPeriod = pCurr->wBeaconInterval;
-            memset(pMgmt->abyCurrSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-            memcpy(pMgmt->abyCurrBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN);
-            memcpy(pMgmt->abyCurrSSID, pCurr->abySSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1);
-
-            pMgmt->eCurrMode = WMAC_MODE_ESS_STA;
-
-            pMgmt->eCurrState = WMAC_STATE_JOINTED;
-            // Adopt BSS state in Adapter Device Object
-           pDevice->op_mode = NL80211_IFTYPE_STATION;
-            memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN);
-
-            // Add current BSS to Candidate list
-            // This should only work for WPA2 BSS, and WPA2 BSS check must be done before.
-            if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) {
-               bool bResult = bAdd_PMKID_Candidate((void *) pDevice,
-                                                   pMgmt->abyCurrBSSID,
-                                                   &pCurr->sRSNCapObj);
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate: 1(%d)\n", bResult);
-                if (bResult == false) {
-                       vFlush_PMKID_Candidate((void *) pDevice);
-                       DBG_PRT(MSG_LEVEL_DEBUG,
-                               KERN_INFO "vFlush_PMKID_Candidate: 4\n");
-                       bAdd_PMKID_Candidate((void *) pDevice,
-                                            pMgmt->abyCurrBSSID,
-                                            &pCurr->sRSNCapObj);
-                }
-            }
-
-            // Preamble type auto-switch: if AP can receive short-preamble cap,
-            // we can turn on too.
-            if (WLAN_GET_CAP_INFO_SHORTPREAMBLE(pCurr->wCapInfo)) {
-                pDevice->byPreambleType = pDevice->byShortPreamble;
-            }
-            else {
-                pDevice->byPreambleType = 0;
-            }
-            // Change PreambleType must set RSPINF again
-            CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType);
-
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join ESS\n");
-
-            if (pCurr->eNetworkTypeInUse == PHY_TYPE_11G) {
-
-                if ((pCurr->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION) != pDevice->bProtectMode) {//0000 0010
-                    pDevice->bProtectMode = (pCurr->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION);
-                    if (pDevice->bProtectMode) {
-                        MACvEnableProtectMD(pDevice);
-                    } else {
-                        MACvDisableProtectMD(pDevice);
-                    }
-                    vUpdateIFS(pDevice);
-                }
-                if ((pCurr->sERP.byERP & WLAN_EID_ERP_NONERP_PRESENT) != pDevice->bNonERPPresent) {//0000 0001
-                    pDevice->bNonERPPresent = (pCurr->sERP.byERP & WLAN_EID_ERP_USE_PROTECTION);
-                }
-                if ((pCurr->sERP.byERP & WLAN_EID_ERP_BARKER_MODE) != pDevice->bBarkerPreambleMd) {//0000 0100
-                    pDevice->bBarkerPreambleMd = (pCurr->sERP.byERP & WLAN_EID_ERP_BARKER_MODE);
-                    //BarkerPreambleMd has higher priority than shortPreamble bit in Cap
-                    if (pDevice->bBarkerPreambleMd) {
-                        MACvEnableBarkerPreambleMd(pDevice);
-                    } else {
-                        MACvDisableBarkerPreambleMd(pDevice);
-                    }
-                }
-            }
-            //DBG_PRN_WLAN05(("wCapInfo: %X\n", pCurr->wCapInfo));
-            if (WLAN_GET_CAP_INFO_SHORTSLOTTIME(pCurr->wCapInfo) != pDevice->bShortSlotTime) {
-                if (pDevice->byBBType == BB_TYPE_11A) {
-                    bShortSlotTime = true;
-                }
-                else if (pDevice->byBBType == BB_TYPE_11B) {
-                    bShortSlotTime = false;
-                }
-                else {
-                    bShortSlotTime = WLAN_GET_CAP_INFO_SHORTSLOTTIME(pCurr->wCapInfo);
-                }
-                //DBG_PRN_WLAN05(("Set Short Slot Time: %d\n", pDevice->bShortSlotTime));
-                if (bShortSlotTime != pDevice->bShortSlotTime) {
-                    pDevice->bShortSlotTime = bShortSlotTime;
-                    BBvSetShortSlotTime(pDevice);
-                    vUpdateIFS(pDevice);
-                }
-            }
-
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"End of Join AP -- A/B/G Action\n");
-        }
-        else {
-            pMgmt->eCurrState = WMAC_STATE_IDLE;
-        };
-
-     }
-     else {
-        // ad-hoc mode BSS
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
-
-            if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) {
-/*
-                if (WPA_SearchRSN(0, WPA_TKIP, pCurr) == false) {
-                    // encryption mode error
-                    pMgmt->eCurrState = WMAC_STATE_IDLE;
-                    return;
-                }
-*/
-            } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) {
-/*
-                if (WPA_SearchRSN(0, WPA_AESCCMP, pCurr) == false) {
-                    // encryption mode error
-                    pMgmt->eCurrState = WMAC_STATE_IDLE;
-                    return;
-                }
-*/
-            } else {
-                // encryption mode error
-                pMgmt->eCurrState = WMAC_STATE_IDLE;
-                return;
-            }
-        }
-
-        s_vMgrSynchBSS(pDevice,
-                       WMAC_MODE_IBSS_STA,
-                       pCurr,
-                       pStatus
-                       );
-
-        if (*pStatus == CMD_STATUS_SUCCESS){
-            // Adopt this BSS state vars in Mgmt Object
-            // TODO: check if CapInfo privacy on, but we don't..
-            pMgmt->uCurrChannel = pCurr->uChannel;
-
-            // Parse Support Rate IE
-            pMgmt->abyCurrSuppRates[0] = WLAN_EID_SUPP_RATES;
-            pMgmt->abyCurrSuppRates[1] = RATEuSetIE((PWLAN_IE_SUPP_RATES)pCurr->abySuppRates,
-                                                    (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                                                    WLAN_RATES_MAXLEN_11B);
-            // set basic rate
-           RATEvParseMaxRate((void *)pDevice,
-                             (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                              NULL, true, &wMaxBasicRate, &wMaxSuppRate, &wSuppRate,
-                              &byTopCCKBasicRate, &byTopOFDMBasicRate);
-            vUpdateIFS(pDevice);
-            pMgmt->wCurrCapInfo = pCurr->wCapInfo;
-            pMgmt->wCurrBeaconPeriod = pCurr->wBeaconInterval;
-            memset(pMgmt->abyCurrSSID, 0, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN);
-            memcpy(pMgmt->abyCurrBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN);
-            memcpy(pMgmt->abyCurrSSID, pCurr->abySSID, WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN);
-//          pMgmt->wCurrATIMWindow = pCurr->wATIMWindow;
-            pMgmt->eCurrMode = WMAC_MODE_IBSS_STA;
-            pMgmt->eCurrState = WMAC_STATE_STARTED;
-            // Adopt BSS state in Adapter Device Object
-           pDevice->op_mode = NL80211_IFTYPE_ADHOC;
-            pDevice->bLinkPass = true;
-
-           vnt_mac_set_led(pDevice, LEDSTS_STS, LEDSTS_INTER);
-
-            memcpy(pDevice->abyBSSID, pCurr->abyBSSID, WLAN_BSSID_LEN);
-
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Join IBSS ok:%pM\n",
-                       pMgmt->abyCurrBSSID);
-            // Preamble type auto-switch: if AP can receive short-preamble cap,
-            // and if registry setting is short preamble we can turn on too.
-
-            if (WLAN_GET_CAP_INFO_SHORTPREAMBLE(pCurr->wCapInfo)) {
-                pDevice->byPreambleType = pDevice->byShortPreamble;
-            }
-            else {
-                pDevice->byPreambleType = 0;
-            }
-            // Change PreambleType must set RSPINF again
-            CARDvSetRSPINF(pDevice, (u8)pDevice->byBBType);
-
-            // Prepare beacon
-               bMgrPrepareBeaconToSend((void *) pDevice, pMgmt);
-        }
-        else {
-            pMgmt->eCurrState = WMAC_STATE_IDLE;
-        };
-     };
-    return;
-}
-
-/*+
- *
- * Routine Description:
- * Set HW to synchronize a specific BSS from known BSS list.
- *
- *
- * Return Value:
- *    PCM_STATUS
- *
--*/
-static void s_vMgrSynchBSS(struct vnt_private *pDevice, u32 uBSSMode,
-       PKnownBSS pCurr, PCMD_STATUS pStatus)
-{
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u8 abyCurrSuppRatesG[] = {WLAN_EID_SUPP_RATES,
-                       8, 0x02, 0x04, 0x0B, 0x16, 0x24, 0x30, 0x48, 0x6C};
-                       /* 1M,   2M,   5M,   11M,  18M,  24M,  36M,  54M*/
-       u8 abyCurrExtSuppRatesG[] = {WLAN_EID_EXTSUPP_RATES,
-                       4, 0x0C, 0x12, 0x18, 0x60};
-                       /* 6M,   9M,   12M,  48M*/
-       u8 abyCurrSuppRatesA[] = {WLAN_EID_SUPP_RATES,
-                       8, 0x0C, 0x12, 0x18, 0x24, 0x30, 0x48, 0x60, 0x6C};
-       u8 abyCurrSuppRatesB[] = {WLAN_EID_SUPP_RATES,
-                       4, 0x02, 0x04, 0x0B, 0x16};
-
-    *pStatus = CMD_STATUS_FAILURE;
-
-    if (s_bCipherMatch(pCurr,
-                       pDevice->eEncryptionStatus,
-                       &(pMgmt->byCSSPK),
-                       &(pMgmt->byCSSGK)) == false) {
-        DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "s_bCipherMatch Fail .......\n");
-        return;
-    }
-
-    pMgmt->pCurrBSS = pCurr;
-
-    // if previous mode is IBSS.
-    if(pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-        MACvRegBitsOff(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
-    }
-
-    // Init the BSS informations
-    pDevice->bProtectMode = false;
-    MACvDisableProtectMD(pDevice);
-    pDevice->bBarkerPreambleMd = false;
-    MACvDisableBarkerPreambleMd(pDevice);
-    pDevice->bNonERPPresent = false;
-    pDevice->byPreambleType = 0;
-    pDevice->wBasicRate = 0;
-    // Set Basic Rate
-    CARDbAddBasicRate((void *)pDevice, RATE_1M);
-
-    // calculate TSF offset
-    // TSF Offset = Received Timestamp TSF - Marked Local's TSF
-    CARDvAdjustTSF(pDevice, pCurr->byRxRate, pCurr->qwBSSTimestamp, pCurr->qwLocalTSF);
-
-    // set HW beacon interval
-    MACvWriteBeaconInterval(pDevice, pCurr->wBeaconInterval);
-
-    // set Next TBTT
-    // Next TBTT = ((local_current_TSF / beacon_interval) + 1 ) * beacon_interval
-    CARDvSetFirstNextTBTT(pDevice, pCurr->wBeaconInterval);
-
-    // set BSSID
-    MACvWriteBSSIDAddress(pDevice, pCurr->abyBSSID);
-
-    memcpy(pMgmt->abyCurrBSSID, pCurr->abyBSSID, 6);
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Sync:set CurrBSSID address = "
-               "%pM\n", pMgmt->abyCurrBSSID);
-
-    if (pCurr->eNetworkTypeInUse == PHY_TYPE_11A) {
-        if ((pDevice->eConfigPHYMode == PHY_TYPE_11A) ||
-            (pDevice->eConfigPHYMode == PHY_TYPE_AUTO)) {
-            pDevice->byBBType = BB_TYPE_11A;
-            pMgmt->eCurrentPHYMode = PHY_TYPE_11A;
-            pDevice->bShortSlotTime = true;
-            BBvSetShortSlotTime(pDevice);
-            CARDvSetBSSMode(pDevice);
-        } else {
-            return;
-        }
-    } else if (pCurr->eNetworkTypeInUse == PHY_TYPE_11B) {
-        if ((pDevice->eConfigPHYMode == PHY_TYPE_11B) ||
-            (pDevice->eConfigPHYMode == PHY_TYPE_11G) ||
-            (pDevice->eConfigPHYMode == PHY_TYPE_AUTO)) {
-            pDevice->byBBType = BB_TYPE_11B;
-            pMgmt->eCurrentPHYMode = PHY_TYPE_11B;
-            pDevice->bShortSlotTime = false;
-            BBvSetShortSlotTime(pDevice);
-            CARDvSetBSSMode(pDevice);
-        } else {
-            return;
-        }
-    } else {
-        if ((pDevice->eConfigPHYMode == PHY_TYPE_11G) ||
-            (pDevice->eConfigPHYMode == PHY_TYPE_AUTO)) {
-            pDevice->byBBType = BB_TYPE_11G;
-            pMgmt->eCurrentPHYMode = PHY_TYPE_11G;
-            pDevice->bShortSlotTime = true;
-            BBvSetShortSlotTime(pDevice);
-            CARDvSetBSSMode(pDevice);
-        } else if (pDevice->eConfigPHYMode == PHY_TYPE_11B) {
-            pDevice->byBBType = BB_TYPE_11B;
-            pDevice->bShortSlotTime = false;
-            BBvSetShortSlotTime(pDevice);
-            CARDvSetBSSMode(pDevice);
-        } else {
-            return;
-        }
-    }
-
-    if (uBSSMode == WMAC_MODE_ESS_STA) {
-        MACvRegBitsOff(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
-        MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
-        pDevice->byRxMode |= RCR_BSSID;
-        pMgmt->bCurrBSSIDFilterOn = true;
-    }
-
-    // set channel and clear NAV
-    CARDbSetMediaChannel(pDevice, pCurr->uChannel);
-    pMgmt->uCurrChannel = pCurr->uChannel;
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "<----s_bSynchBSS Set Channel [%d]\n", pCurr->uChannel);
-
-    if (pDevice->byBBVGACurrent != pDevice->abyBBVGA[0]) {
-        pDevice->byBBVGACurrent = pDevice->abyBBVGA[0];
-        BBvSetVGAGainOffset(pDevice, pDevice->byBBVGACurrent);
-        BBvSetShortSlotTime(pDevice);
-    }
-    //
-    // Notes:
-    // 1. In Ad-hoc mode : check if received others beacon as jointed indication,
-    //    otherwise we will start own IBSS.
-    // 2. In Infra mode : Supposed we already synchronized with AP right now.
-
-    if (uBSSMode == WMAC_MODE_IBSS_STA) {
-        MACvRegBitsOn(pDevice, MAC_REG_HOSTCR, HOSTCR_ADHOC);
-        MACvRegBitsOn(pDevice, MAC_REG_RCR, RCR_BSSID);
-        pDevice->byRxMode |= RCR_BSSID;
-        pMgmt->bCurrBSSIDFilterOn = true;
-    }
-
-    if (pDevice->byBBType == BB_TYPE_11A) {
-        memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesA[0], sizeof(abyCurrSuppRatesA));
-        pMgmt->abyCurrExtSuppRates[1] = 0;
-    } else if (pDevice->byBBType == BB_TYPE_11B) {
-        memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesB[0], sizeof(abyCurrSuppRatesB));
-        pMgmt->abyCurrExtSuppRates[1] = 0;
-    } else {
-        memcpy(pMgmt->abyCurrSuppRates, &abyCurrSuppRatesG[0], sizeof(abyCurrSuppRatesG));
-        memcpy(pMgmt->abyCurrExtSuppRates, &abyCurrExtSuppRatesG[0], sizeof(abyCurrExtSuppRatesG));
-    }
-    pMgmt->byERPContext = pCurr->sERP.byERP;
-
-    *pStatus = CMD_STATUS_SUCCESS;
-
-    return;
-};
-
-static void Encyption_Rebuild(struct vnt_private *pDevice, PKnownBSS pCurr)
- {
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-
-       if ((pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-               (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) {
-               if (pCurr->bWPAValid == true)  {   /*WPA-PSK */
-                          pMgmt->eAuthenMode = WMAC_AUTH_WPAPSK;
-                   if(pCurr->abyPKType[0] == WPA_TKIP) {
-                       pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;    //TKIP
-                       PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-TKIP]\n");
-                     }
-                  else if(pCurr->abyPKType[0] == WPA_AESCCMP) {
-                       pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;    //AES
-                          PRINT_K("Encyption_Rebuild--->ssid reset config to [WPAPSK-AES]\n");
-                    }
-                       }
-               else if(pCurr->bWPA2Valid == true) {  //WPA2-PSK
-                         pMgmt->eAuthenMode = WMAC_AUTH_WPA2PSK;
-                      if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_TKIP) {
-                          pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;     //TKIP
-                             PRINT_K("Encyption_Rebuild--->ssid reset config to [WPA2PSK-TKIP]\n");
-                       }
-                      else if(pCurr->abyCSSPK[0] == WLAN_11i_CSS_CCMP) {
-                          pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;    //AES
-                            PRINT_K("Encyption_Rebuild--->ssid reset config to [WPA2PSK-AES]\n");
-                       }
-                       }
-              }
-        //  }
-      return;
- }
-
-/*+
- *
- * Routine Description:
- *  Format TIM field
- *
- *
- * Return Value:
- *    void
- *
--*/
-
-static void s_vMgrFormatTIM(struct vnt_manager *pMgmt, PWLAN_IE_TIM pTIM)
-{
-       u8 byMask[8] = {1, 2, 4, 8, 0x10, 0x20, 0x40, 0x80};
-       u8 byMap;
-       int ii, jj;
-       int bStartFound = false;
-       int bMulticast = false;
-       u16 wStartIndex = 0;
-       u16 wEndIndex = 0;
-
-    // Find size of partial virtual bitmap
-    for (ii = 0; ii < (MAX_NODE_NUM + 1); ii++) {
-        byMap = pMgmt->abyPSTxMap[ii];
-        if (!ii) {
-            // Mask out the broadcast bit which is indicated separately.
-            bMulticast = (byMap & byMask[0]) != 0;
-            if(bMulticast) {
-               pMgmt->sNodeDBTable[0].bRxPSPoll = true;
-            }
-            byMap = 0;
-        }
-        if (byMap) {
-            if (!bStartFound) {
-                bStartFound = true;
-                wStartIndex = (u16)ii;
-            }
-            wEndIndex = (u16)ii;
-        }
-    }
-
-    // Round start index down to nearest even number
-    wStartIndex &=  ~BIT0;
-
-    // Round end index up to nearest even number
-    wEndIndex = ((wEndIndex + 1) & ~BIT0);
-
-    // Size of element payload
-
-    pTIM->len =  3 + (wEndIndex - wStartIndex) + 1;
-
-    // Fill in the Fixed parts of the TIM
-    pTIM->byDTIMCount = pMgmt->byDTIMCount;
-    pTIM->byDTIMPeriod = pMgmt->byDTIMPeriod;
-    pTIM->byBitMapCtl = (bMulticast ? TIM_MULTICAST_MASK : 0) |
-        (((wStartIndex >> 1) << 1) & TIM_BITMAPOFFSET_MASK);
-
-    // Append variable part of TIM
-
-    for (ii = wStartIndex, jj =0 ; ii <= wEndIndex; ii++, jj++) {
-         pTIM->byVirtBitMap[jj] = pMgmt->abyPSTxMap[ii];
-    }
-
-    // Aid = 0 don't used.
-    pTIM->byVirtBitMap[0]  &= ~BIT0;
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an Beacon frame( Ad-hoc mode)
- *
- *
- * Return Value:
- *    PTR to frame; or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeBeacon(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wCurrBeaconPeriod,
-       u32 uCurrChannel, u16 wCurrATIMWinodw, PWLAN_IE_SSID pCurrSSID,
-       u8 *pCurrBSSID, PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_BEACON sFrame;
-       u8 abyBroadcastAddr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff};
-
-       /* prepare beacon frame */
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_BEACON_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    // Setup the sFrame structure.
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_BEACON_FR_MAXLEN;
-    vMgrEncodeBeacon(&sFrame);
-    // Setup the header
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_BEACON)
-        ));
-
-    if (pDevice->bEnablePSMode) {
-        sFrame.pHdr->sA3.wFrameCtl |= cpu_to_le16((u16)WLAN_SET_FC_PWRMGT(1));
-    }
-
-    memcpy( sFrame.pHdr->sA3.abyAddr1, abyBroadcastAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pCurrBSSID, WLAN_BSSID_LEN);
-    *sFrame.pwBeaconInterval = cpu_to_le16(wCurrBeaconPeriod);
-    *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
-    // Copy SSID
-    sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
-    sFrame.len += ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSSID,
-             pCurrSSID,
-             ((PWLAN_IE_SSID)pCurrSSID)->len + WLAN_IEHDR_LEN
-            );
-    // Copy the rate set
-    sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-    sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSuppRates,
-           pCurrSuppRates,
-           ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN
-          );
-    // DS parameter
-    if (pDevice->byBBType != BB_TYPE_11A) {
-        sFrame.pDSParms = (PWLAN_IE_DS_PARMS)(sFrame.pBuf + sFrame.len);
-        sFrame.len += (1) + WLAN_IEHDR_LEN;
-        sFrame.pDSParms->byElementID = WLAN_EID_DS_PARMS;
-        sFrame.pDSParms->len = 1;
-        sFrame.pDSParms->byCurrChannel = (u8)uCurrChannel;
-    }
-    // TIM field
-    if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-        sFrame.pTIM = (PWLAN_IE_TIM)(sFrame.pBuf + sFrame.len);
-        sFrame.pTIM->byElementID = WLAN_EID_TIM;
-        s_vMgrFormatTIM(pMgmt, sFrame.pTIM);
-        sFrame.len += (WLAN_IEHDR_LEN + sFrame.pTIM->len);
-    }
-
-    if (pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) {
-
-        // IBSS parameter
-        sFrame.pIBSSParms = (PWLAN_IE_IBSS_PARMS)(sFrame.pBuf + sFrame.len);
-        sFrame.len += (2) + WLAN_IEHDR_LEN;
-        sFrame.pIBSSParms->byElementID = WLAN_EID_IBSS_PARMS;
-        sFrame.pIBSSParms->len = 2;
-        sFrame.pIBSSParms->wATIMWindow = wCurrATIMWinodw;
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE) {
-            /* RSN parameter */
-            sFrame.pRSNWPA = (PWLAN_IE_RSN_EXT)(sFrame.pBuf + sFrame.len);
-            sFrame.pRSNWPA->byElementID = WLAN_EID_RSN_WPA;
-            sFrame.pRSNWPA->len = 12;
-            sFrame.pRSNWPA->abyOUI[0] = 0x00;
-            sFrame.pRSNWPA->abyOUI[1] = 0x50;
-            sFrame.pRSNWPA->abyOUI[2] = 0xf2;
-            sFrame.pRSNWPA->abyOUI[3] = 0x01;
-            sFrame.pRSNWPA->wVersion = 1;
-            sFrame.pRSNWPA->abyMulticast[0] = 0x00;
-            sFrame.pRSNWPA->abyMulticast[1] = 0x50;
-            sFrame.pRSNWPA->abyMulticast[2] = 0xf2;
-            if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)
-                sFrame.pRSNWPA->abyMulticast[3] = 0x04;//AES
-            else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled)
-                sFrame.pRSNWPA->abyMulticast[3] = 0x02;//TKIP
-            else if (pDevice->eEncryptionStatus == Ndis802_11Encryption1Enabled)
-                sFrame.pRSNWPA->abyMulticast[3] = 0x01;//WEP40
-            else
-                sFrame.pRSNWPA->abyMulticast[3] = 0x00;//NONE
-
-            // Pairwise Key Cipher Suite
-            sFrame.pRSNWPA->wPKCount = 0;
-            // Auth Key Management Suite
-            *((u16 *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0;
-            sFrame.pRSNWPA->len +=2;
-
-            // RSN Capabilites
-            *((u16 *)(sFrame.pBuf + sFrame.len + sFrame.pRSNWPA->len))=0;
-            sFrame.pRSNWPA->len +=2;
-            sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-        }
-    }
-
-    if (pMgmt->eCurrentPHYMode == PHY_TYPE_11G) {
-        sFrame.pERP = (PWLAN_IE_ERP)(sFrame.pBuf + sFrame.len);
-        sFrame.len += 1 + WLAN_IEHDR_LEN;
-        sFrame.pERP->byElementID = WLAN_EID_ERP;
-        sFrame.pERP->len = 1;
-        sFrame.pERP->byContext = 0;
-        if (pDevice->bProtectMode == true)
-            sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION;
-        if (pDevice->bNonERPPresent == true)
-            sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT;
-        if (pDevice->bBarkerPreambleMd == true)
-            sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE;
-    }
-    if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) {
-        sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-        sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN;
-        memcpy(sFrame.pExtSuppRates,
-             pCurrExtSuppRates,
-             ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN
-             );
-    }
-
-    /* Adjust the length fields */
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    return pTxPacket;
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an Prob-response frame
- *
- *
- * Return Value:
- *    PTR to frame; or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeProbeResponse(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wCurrBeaconPeriod,
-       u32 uCurrChannel, u16 wCurrATIMWinodw, u8 *pDstAddr,
-       PWLAN_IE_SSID pCurrSSID, u8 *pCurrBSSID,
-       PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates, u8 byPHYType)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_PROBERESP sFrame;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_PROBERESP_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    // Setup the sFrame structure.
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_PROBERESP_FR_MAXLEN;
-    vMgrEncodeProbeResponse(&sFrame);
-    // Setup the header
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_PROBERESP)
-        ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pDstAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pCurrBSSID, WLAN_BSSID_LEN);
-    *sFrame.pwBeaconInterval = cpu_to_le16(wCurrBeaconPeriod);
-    *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
-
-    if (byPHYType == BB_TYPE_11B) {
-        *sFrame.pwCapInfo &= cpu_to_le16((u16)~(WLAN_SET_CAP_INFO_SHORTSLOTTIME(1)));
-    }
-
-    // Copy SSID
-    sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
-    sFrame.len += ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSSID,
-           pCurrSSID,
-           ((PWLAN_IE_SSID)pCurrSSID)->len + WLAN_IEHDR_LEN
-           );
-    // Copy the rate set
-    sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-
-    sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSuppRates,
-           pCurrSuppRates,
-           ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN
-          );
-
-    // DS parameter
-    if (pDevice->byBBType != BB_TYPE_11A) {
-        sFrame.pDSParms = (PWLAN_IE_DS_PARMS)(sFrame.pBuf + sFrame.len);
-        sFrame.len += (1) + WLAN_IEHDR_LEN;
-        sFrame.pDSParms->byElementID = WLAN_EID_DS_PARMS;
-        sFrame.pDSParms->len = 1;
-        sFrame.pDSParms->byCurrChannel = (u8)uCurrChannel;
-    }
-
-    if (pMgmt->eCurrMode != WMAC_MODE_ESS_AP) {
-        // IBSS parameter
-        sFrame.pIBSSParms = (PWLAN_IE_IBSS_PARMS)(sFrame.pBuf + sFrame.len);
-        sFrame.len += (2) + WLAN_IEHDR_LEN;
-        sFrame.pIBSSParms->byElementID = WLAN_EID_IBSS_PARMS;
-        sFrame.pIBSSParms->len = 2;
-        sFrame.pIBSSParms->wATIMWindow = 0;
-    }
-    if (pDevice->byBBType == BB_TYPE_11G) {
-        sFrame.pERP = (PWLAN_IE_ERP)(sFrame.pBuf + sFrame.len);
-        sFrame.len += 1 + WLAN_IEHDR_LEN;
-        sFrame.pERP->byElementID = WLAN_EID_ERP;
-        sFrame.pERP->len = 1;
-        sFrame.pERP->byContext = 0;
-        if (pDevice->bProtectMode == true)
-            sFrame.pERP->byContext |= WLAN_EID_ERP_USE_PROTECTION;
-        if (pDevice->bNonERPPresent == true)
-            sFrame.pERP->byContext |= WLAN_EID_ERP_NONERP_PRESENT;
-        if (pDevice->bBarkerPreambleMd == true)
-            sFrame.pERP->byContext |= WLAN_EID_ERP_BARKER_MODE;
-    }
-
-    if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) {
-        sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-        sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN;
-        memcpy(sFrame.pExtSuppRates,
-             pCurrExtSuppRates,
-             ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN
-             );
-    }
-
-    // Adjust the length fields
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    return pTxPacket;
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an association request frame
- *
- *
- * Return Value:
- *    A ptr to frame or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeAssocRequest(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo,
-       u16 wListenInterval,
-       PWLAN_IE_SSID pCurrSSID,
-       PWLAN_IE_SUPP_RATES pCurrRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_ASSOCREQ sFrame;
-       u8 *pbyIEs;
-       u8 *pbyRSN;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_ASSOCREQ_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    // Setup the sFrame structure.
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_ASSOCREQ_FR_MAXLEN;
-    // format fixed field frame structure
-    vMgrEncodeAssocRequest(&sFrame);
-    // Setup the header
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ASSOCREQ)
-        ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pDAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-
-    // Set the capability and listen interval
-    *(sFrame.pwCapInfo) = cpu_to_le16(wCurrCapInfo);
-    *(sFrame.pwListenInterval) = cpu_to_le16(wListenInterval);
-
-    // sFrame.len point to end of fixed field
-    sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
-    sFrame.len += pCurrSSID->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSSID, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN);
-
-    pMgmt->sAssocInfo.AssocInfo.RequestIELength = pCurrSSID->len + WLAN_IEHDR_LEN;
-    pMgmt->sAssocInfo.AssocInfo.OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
-    pbyIEs = pMgmt->sAssocInfo.abyIEs;
-    memcpy(pbyIEs, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN);
-    pbyIEs += pCurrSSID->len + WLAN_IEHDR_LEN;
-
-    // Copy the rate set
-    sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-    if ((pDevice->byBBType == BB_TYPE_11B) && (pCurrRates->len > 4))
-        sFrame.len += 4 + WLAN_IEHDR_LEN;
-    else
-        sFrame.len += pCurrRates->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSuppRates, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
-
-    // Copy the extension rate set
-    if ((pDevice->byBBType == BB_TYPE_11G) && (pCurrExtSuppRates->len > 0)) {
-        sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-        sFrame.len += pCurrExtSuppRates->len + WLAN_IEHDR_LEN;
-        memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, pCurrExtSuppRates->len + WLAN_IEHDR_LEN);
-    }
-
-    pMgmt->sAssocInfo.AssocInfo.RequestIELength += pCurrRates->len + WLAN_IEHDR_LEN;
-    memcpy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
-    pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN;
-
-    if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-         (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-         (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE)) &&
-        (pMgmt->pCurrBSS != NULL)) {
-        /* WPA IE */
-        sFrame.pRSNWPA = (PWLAN_IE_RSN_EXT)(sFrame.pBuf + sFrame.len);
-        sFrame.pRSNWPA->byElementID = WLAN_EID_RSN_WPA;
-        sFrame.pRSNWPA->len = 16;
-        sFrame.pRSNWPA->abyOUI[0] = 0x00;
-        sFrame.pRSNWPA->abyOUI[1] = 0x50;
-        sFrame.pRSNWPA->abyOUI[2] = 0xf2;
-        sFrame.pRSNWPA->abyOUI[3] = 0x01;
-        sFrame.pRSNWPA->wVersion = 1;
-        //Group Key Cipher Suite
-        sFrame.pRSNWPA->abyMulticast[0] = 0x00;
-        sFrame.pRSNWPA->abyMulticast[1] = 0x50;
-        sFrame.pRSNWPA->abyMulticast[2] = 0xf2;
-        if (pMgmt->byCSSGK == KEY_CTL_WEP) {
-            sFrame.pRSNWPA->abyMulticast[3] = pMgmt->pCurrBSS->byGKType;
-        } else if (pMgmt->byCSSGK == KEY_CTL_TKIP) {
-            sFrame.pRSNWPA->abyMulticast[3] = WPA_TKIP;
-        } else if (pMgmt->byCSSGK == KEY_CTL_CCMP) {
-            sFrame.pRSNWPA->abyMulticast[3] = WPA_AESCCMP;
-        } else {
-            sFrame.pRSNWPA->abyMulticast[3] = WPA_NONE;
-        }
-        // Pairwise Key Cipher Suite
-        sFrame.pRSNWPA->wPKCount = 1;
-        sFrame.pRSNWPA->PKSList[0].abyOUI[0] = 0x00;
-        sFrame.pRSNWPA->PKSList[0].abyOUI[1] = 0x50;
-        sFrame.pRSNWPA->PKSList[0].abyOUI[2] = 0xf2;
-        if (pMgmt->byCSSPK == KEY_CTL_TKIP) {
-            sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_TKIP;
-        } else if (pMgmt->byCSSPK == KEY_CTL_CCMP) {
-            sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_AESCCMP;
-        } else {
-            sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_NONE;
-        }
-        // Auth Key Management Suite
-        pbyRSN = (u8 *)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len);
-        *pbyRSN++=0x01;
-        *pbyRSN++=0x00;
-        *pbyRSN++=0x00;
-
-        *pbyRSN++=0x50;
-        *pbyRSN++=0xf2;
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) {
-            *pbyRSN++=WPA_AUTH_PSK;
-        }
-        else if (pMgmt->eAuthenMode == WMAC_AUTH_WPA) {
-            *pbyRSN++=WPA_AUTH_IEEE802_1X;
-        }
-        else {
-            *pbyRSN++=WPA_NONE;
-        }
-
-        sFrame.pRSNWPA->len +=6;
-
-        // RSN Capabilites
-
-        *pbyRSN++=0x00;
-        *pbyRSN++=0x00;
-        sFrame.pRSNWPA->len +=2;
-
-        sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-        // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION
-        pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-        memcpy(pbyIEs, sFrame.pRSNWPA, sFrame.pRSNWPA->len + WLAN_IEHDR_LEN);
-        pbyIEs += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-
-    } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
-                (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
-               (pMgmt->pCurrBSS != NULL)) {
-       unsigned int ii;
-        u16 *               pwPMKID;
-
-        // WPA IE
-        sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
-        sFrame.pRSN->byElementID = WLAN_EID_RSN;
-        sFrame.pRSN->len = 6; //Version(2)+GK(4)
-        sFrame.pRSN->wVersion = 1;
-        //Group Key Cipher Suite
-        sFrame.pRSN->abyRSN[0] = 0x00;
-        sFrame.pRSN->abyRSN[1] = 0x0F;
-        sFrame.pRSN->abyRSN[2] = 0xAC;
-        if (pMgmt->byCSSGK == KEY_CTL_WEP) {
-            sFrame.pRSN->abyRSN[3] = pMgmt->pCurrBSS->byCSSGK;
-        } else if (pMgmt->byCSSGK == KEY_CTL_TKIP) {
-            sFrame.pRSN->abyRSN[3] = WLAN_11i_CSS_TKIP;
-        } else if (pMgmt->byCSSGK == KEY_CTL_CCMP) {
-            sFrame.pRSN->abyRSN[3] = WLAN_11i_CSS_CCMP;
-        } else {
-            sFrame.pRSN->abyRSN[3] = WLAN_11i_CSS_UNKNOWN;
-        }
-
-        // Pairwise Key Cipher Suite
-        sFrame.pRSN->abyRSN[4] = 1;
-        sFrame.pRSN->abyRSN[5] = 0;
-        sFrame.pRSN->abyRSN[6] = 0x00;
-        sFrame.pRSN->abyRSN[7] = 0x0F;
-        sFrame.pRSN->abyRSN[8] = 0xAC;
-        if (pMgmt->byCSSPK == KEY_CTL_TKIP) {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_TKIP;
-        } else if (pMgmt->byCSSPK == KEY_CTL_CCMP) {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_CCMP;
-        } else if (pMgmt->byCSSPK == KEY_CTL_NONE) {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_USE_GROUP;
-        } else {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_UNKNOWN;
-        }
-        sFrame.pRSN->len += 6;
-
-        // Auth Key Management Suite
-        sFrame.pRSN->abyRSN[10] = 1;
-        sFrame.pRSN->abyRSN[11] = 0;
-        sFrame.pRSN->abyRSN[12] = 0x00;
-        sFrame.pRSN->abyRSN[13] = 0x0F;
-        sFrame.pRSN->abyRSN[14] = 0xAC;
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK) {
-            sFrame.pRSN->abyRSN[15] = WLAN_11i_AKMSS_PSK;
-        } else if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) {
-            sFrame.pRSN->abyRSN[15] = WLAN_11i_AKMSS_802_1X;
-        } else {
-            sFrame.pRSN->abyRSN[15] = WLAN_11i_AKMSS_UNKNOWN;
-        }
-        sFrame.pRSN->len +=6;
-
-        // RSN Capabilites
-        if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
-            memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
-        } else {
-            sFrame.pRSN->abyRSN[16] = 0;
-            sFrame.pRSN->abyRSN[17] = 0;
-        }
-        sFrame.pRSN->len +=2;
-
-        if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
-            // RSN PMKID
-            pbyRSN = &sFrame.pRSN->abyRSN[18];
-            pwPMKID = (u16 *)pbyRSN; // Point to PMKID count
-            *pwPMKID = 0;            // Initialize PMKID count
-            pbyRSN += 2;             // Point to PMKID list
-       for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) {
-               if (!memcmp(&pDevice->gsPMKID.BSSIDInfo[ii].BSSID[0],
-                            pMgmt->abyCurrBSSID,
-                            ETH_ALEN)) {
-                       (*pwPMKID)++;
-                       memcpy(pbyRSN,
-                              pDevice->gsPMKID.BSSIDInfo[ii].PMKID,
-                              16);
-                       pbyRSN += 16;
-               }
-       }
-            if (*pwPMKID != 0) {
-                sFrame.pRSN->len += (2 + (*pwPMKID)*16);
-            }
-        }
-
-        sFrame.len += sFrame.pRSN->len + WLAN_IEHDR_LEN;
-        // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION
-        pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSN->len + WLAN_IEHDR_LEN;
-        memcpy(pbyIEs, sFrame.pRSN, sFrame.pRSN->len + WLAN_IEHDR_LEN);
-        pbyIEs += sFrame.pRSN->len + WLAN_IEHDR_LEN;
-    }
-
-    // Adjust the length fields
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-    return pTxPacket;
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an re-association request frame
- *
- *
- * Return Value:
- *    A ptr to frame or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeReAssocRequest(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u8 *pDAddr, u16 wCurrCapInfo,
-       u16 wListenInterval, PWLAN_IE_SSID pCurrSSID,
-       PWLAN_IE_SUPP_RATES pCurrRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_REASSOCREQ  sFrame;
-       u8 *pbyIEs;
-       u8 *pbyRSN;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_REASSOCREQ_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    /* Setup the sFrame structure. */
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_REASSOCREQ_FR_MAXLEN;
-
-    // format fixed field frame structure
-    vMgrEncodeReassocRequest(&sFrame);
-
-    /* Setup the header */
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_REASSOCREQ)
-        ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pDAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-
-    /* Set the capability and listen interval */
-    *(sFrame.pwCapInfo) = cpu_to_le16(wCurrCapInfo);
-    *(sFrame.pwListenInterval) = cpu_to_le16(wListenInterval);
-
-    memcpy(sFrame.pAddrCurrAP, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-    /* Copy the SSID */
-    /* sFrame.len point to end of fixed field */
-    sFrame.pSSID = (PWLAN_IE_SSID)(sFrame.pBuf + sFrame.len);
-    sFrame.len += pCurrSSID->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSSID, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN);
-
-    pMgmt->sAssocInfo.AssocInfo.RequestIELength = pCurrSSID->len + WLAN_IEHDR_LEN;
-    pMgmt->sAssocInfo.AssocInfo.OffsetRequestIEs = sizeof(NDIS_802_11_ASSOCIATION_INFORMATION);
-    pbyIEs = pMgmt->sAssocInfo.abyIEs;
-    memcpy(pbyIEs, pCurrSSID, pCurrSSID->len + WLAN_IEHDR_LEN);
-    pbyIEs += pCurrSSID->len + WLAN_IEHDR_LEN;
-
-    /* Copy the rate set */
-    /* sFrame.len point to end of SSID */
-    sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-    sFrame.len += pCurrRates->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSuppRates, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
-
-    // Copy the extension rate set
-    if ((pMgmt->eCurrentPHYMode == PHY_TYPE_11G) && (pCurrExtSuppRates->len > 0)) {
-        sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-        sFrame.len += pCurrExtSuppRates->len + WLAN_IEHDR_LEN;
-        memcpy(sFrame.pExtSuppRates, pCurrExtSuppRates, pCurrExtSuppRates->len + WLAN_IEHDR_LEN);
-    }
-
-    pMgmt->sAssocInfo.AssocInfo.RequestIELength += pCurrRates->len + WLAN_IEHDR_LEN;
-    memcpy(pbyIEs, pCurrRates, pCurrRates->len + WLAN_IEHDR_LEN);
-    pbyIEs += pCurrRates->len + WLAN_IEHDR_LEN;
-
-    if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA) ||
-         (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) ||
-         (pMgmt->eAuthenMode == WMAC_AUTH_WPANONE)) &&
-        (pMgmt->pCurrBSS != NULL)) {
-        /* WPA IE */
-        sFrame.pRSNWPA = (PWLAN_IE_RSN_EXT)(sFrame.pBuf + sFrame.len);
-        sFrame.pRSNWPA->byElementID = WLAN_EID_RSN_WPA;
-        sFrame.pRSNWPA->len = 16;
-        sFrame.pRSNWPA->abyOUI[0] = 0x00;
-        sFrame.pRSNWPA->abyOUI[1] = 0x50;
-        sFrame.pRSNWPA->abyOUI[2] = 0xf2;
-        sFrame.pRSNWPA->abyOUI[3] = 0x01;
-        sFrame.pRSNWPA->wVersion = 1;
-        //Group Key Cipher Suite
-        sFrame.pRSNWPA->abyMulticast[0] = 0x00;
-        sFrame.pRSNWPA->abyMulticast[1] = 0x50;
-        sFrame.pRSNWPA->abyMulticast[2] = 0xf2;
-        if (pMgmt->byCSSGK == KEY_CTL_WEP) {
-            sFrame.pRSNWPA->abyMulticast[3] = pMgmt->pCurrBSS->byGKType;
-        } else if (pMgmt->byCSSGK == KEY_CTL_TKIP) {
-            sFrame.pRSNWPA->abyMulticast[3] = WPA_TKIP;
-        } else if (pMgmt->byCSSGK == KEY_CTL_CCMP) {
-            sFrame.pRSNWPA->abyMulticast[3] = WPA_AESCCMP;
-        } else {
-            sFrame.pRSNWPA->abyMulticast[3] = WPA_NONE;
-        }
-        // Pairwise Key Cipher Suite
-        sFrame.pRSNWPA->wPKCount = 1;
-        sFrame.pRSNWPA->PKSList[0].abyOUI[0] = 0x00;
-        sFrame.pRSNWPA->PKSList[0].abyOUI[1] = 0x50;
-        sFrame.pRSNWPA->PKSList[0].abyOUI[2] = 0xf2;
-        if (pMgmt->byCSSPK == KEY_CTL_TKIP) {
-            sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_TKIP;
-        } else if (pMgmt->byCSSPK == KEY_CTL_CCMP) {
-            sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_AESCCMP;
-        } else {
-            sFrame.pRSNWPA->PKSList[0].abyOUI[3] = WPA_NONE;
-        }
-        // Auth Key Management Suite
-        pbyRSN = (u8 *)(sFrame.pBuf + sFrame.len + 2 + sFrame.pRSNWPA->len);
-        *pbyRSN++=0x01;
-        *pbyRSN++=0x00;
-        *pbyRSN++=0x00;
-
-        *pbyRSN++=0x50;
-        *pbyRSN++=0xf2;
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPAPSK) {
-            *pbyRSN++=WPA_AUTH_PSK;
-        } else if (pMgmt->eAuthenMode == WMAC_AUTH_WPA) {
-            *pbyRSN++=WPA_AUTH_IEEE802_1X;
-        } else {
-            *pbyRSN++=WPA_NONE;
-        }
-
-        sFrame.pRSNWPA->len +=6;
-
-        // RSN Capabilites
-        *pbyRSN++=0x00;
-        *pbyRSN++=0x00;
-        sFrame.pRSNWPA->len +=2;
-
-        sFrame.len += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-        // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION
-        pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-        memcpy(pbyIEs, sFrame.pRSNWPA, sFrame.pRSNWPA->len + WLAN_IEHDR_LEN);
-        pbyIEs += sFrame.pRSNWPA->len + WLAN_IEHDR_LEN;
-
-    } else if (((pMgmt->eAuthenMode == WMAC_AUTH_WPA2) ||
-                (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK)) &&
-               (pMgmt->pCurrBSS != NULL)) {
-       unsigned int ii;
-        u16 *               pwPMKID;
-
-        /* WPA IE */
-        sFrame.pRSN = (PWLAN_IE_RSN)(sFrame.pBuf + sFrame.len);
-        sFrame.pRSN->byElementID = WLAN_EID_RSN;
-        sFrame.pRSN->len = 6; //Version(2)+GK(4)
-        sFrame.pRSN->wVersion = 1;
-        //Group Key Cipher Suite
-        sFrame.pRSN->abyRSN[0] = 0x00;
-        sFrame.pRSN->abyRSN[1] = 0x0F;
-        sFrame.pRSN->abyRSN[2] = 0xAC;
-        if (pMgmt->byCSSGK == KEY_CTL_WEP) {
-            sFrame.pRSN->abyRSN[3] = pMgmt->pCurrBSS->byCSSGK;
-        } else if (pMgmt->byCSSGK == KEY_CTL_TKIP) {
-            sFrame.pRSN->abyRSN[3] = WLAN_11i_CSS_TKIP;
-        } else if (pMgmt->byCSSGK == KEY_CTL_CCMP) {
-            sFrame.pRSN->abyRSN[3] = WLAN_11i_CSS_CCMP;
-        } else {
-            sFrame.pRSN->abyRSN[3] = WLAN_11i_CSS_UNKNOWN;
-        }
-
-        // Pairwise Key Cipher Suite
-        sFrame.pRSN->abyRSN[4] = 1;
-        sFrame.pRSN->abyRSN[5] = 0;
-        sFrame.pRSN->abyRSN[6] = 0x00;
-        sFrame.pRSN->abyRSN[7] = 0x0F;
-        sFrame.pRSN->abyRSN[8] = 0xAC;
-        if (pMgmt->byCSSPK == KEY_CTL_TKIP) {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_TKIP;
-        } else if (pMgmt->byCSSPK == KEY_CTL_CCMP) {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_CCMP;
-        } else if (pMgmt->byCSSPK == KEY_CTL_NONE) {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_USE_GROUP;
-        } else {
-            sFrame.pRSN->abyRSN[9] = WLAN_11i_CSS_UNKNOWN;
-        }
-        sFrame.pRSN->len += 6;
-
-        // Auth Key Management Suite
-        sFrame.pRSN->abyRSN[10] = 1;
-        sFrame.pRSN->abyRSN[11] = 0;
-        sFrame.pRSN->abyRSN[12] = 0x00;
-        sFrame.pRSN->abyRSN[13] = 0x0F;
-        sFrame.pRSN->abyRSN[14] = 0xAC;
-        if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2PSK) {
-            sFrame.pRSN->abyRSN[15] = WLAN_11i_AKMSS_PSK;
-        } else if (pMgmt->eAuthenMode == WMAC_AUTH_WPA2) {
-            sFrame.pRSN->abyRSN[15] = WLAN_11i_AKMSS_802_1X;
-        } else {
-            sFrame.pRSN->abyRSN[15] = WLAN_11i_AKMSS_UNKNOWN;
-        }
-        sFrame.pRSN->len +=6;
-
-        // RSN Capabilites
-        if (pMgmt->pCurrBSS->sRSNCapObj.bRSNCapExist == true) {
-            memcpy(&sFrame.pRSN->abyRSN[16], &pMgmt->pCurrBSS->sRSNCapObj.wRSNCap, 2);
-        } else {
-            sFrame.pRSN->abyRSN[16] = 0;
-            sFrame.pRSN->abyRSN[17] = 0;
-        }
-        sFrame.pRSN->len +=2;
-
-        if ((pDevice->gsPMKID.BSSIDInfoCount > 0) && (pDevice->bRoaming == true) && (pMgmt->eAuthenMode == WMAC_AUTH_WPA2)) {
-            // RSN PMKID
-            pbyRSN = &sFrame.pRSN->abyRSN[18];
-            pwPMKID = (u16 *)pbyRSN; // Point to PMKID count
-            *pwPMKID = 0;            // Initialize PMKID count
-            pbyRSN += 2;             // Point to PMKID list
-            for (ii = 0; ii < pDevice->gsPMKID.BSSIDInfoCount; ii++) {
-               if (!memcmp(&pDevice->gsPMKID.BSSIDInfo[ii].BSSID[0],
-                           pMgmt->abyCurrBSSID,
-                           ETH_ALEN)) {
-                       (*pwPMKID)++;
-                       memcpy(pbyRSN,
-                              pDevice->gsPMKID.BSSIDInfo[ii].PMKID,
-                              16);
-                       pbyRSN += 16;
-                }
-            }
-            if (*pwPMKID != 0) {
-                sFrame.pRSN->len += (2 + (*pwPMKID)*16);
-            }
-        }
-
-        sFrame.len += sFrame.pRSN->len + WLAN_IEHDR_LEN;
-        // copy to AssocInfo. for OID_802_11_ASSOCIATION_INFORMATION
-        pMgmt->sAssocInfo.AssocInfo.RequestIELength += sFrame.pRSN->len + WLAN_IEHDR_LEN;
-        memcpy(pbyIEs, sFrame.pRSN, sFrame.pRSN->len + WLAN_IEHDR_LEN);
-        pbyIEs += sFrame.pRSN->len + WLAN_IEHDR_LEN;
-    }
-
-    /* Adjust the length fields */
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    return pTxPacket;
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an assoc-response frame
- *
- *
- * Return Value:
- *    PTR to frame; or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeAssocResponse(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus,
-       u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_ASSOCRESP   sFrame;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_ASSOCREQ_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    // Setup the sFrame structure
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN;
-    vMgrEncodeAssocResponse(&sFrame);
-    // Setup the header
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_ASSOCRESP)
-        ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pDstAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-
-    *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
-    *sFrame.pwStatus = cpu_to_le16(wAssocStatus);
-    *sFrame.pwAid = cpu_to_le16((u16)(wAssocAID | BIT14 | BIT15));
-
-    // Copy the rate set
-    sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-    sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSuppRates,
-           pCurrSuppRates,
-           ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN
-          );
-
-    if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) {
-        sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-        sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN;
-        memcpy(sFrame.pExtSuppRates,
-             pCurrExtSuppRates,
-             ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN
-             );
-    }
-
-    // Adjust the length fields
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    return pTxPacket;
-}
-
-/*+
- *
- * Routine Description:
- *  Constructs an reassoc-response frame
- *
- *
- * Return Value:
- *    PTR to frame; or NULL on allocation failure
- *
--*/
-
-static struct vnt_tx_mgmt *s_MgrMakeReAssocResponse(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, u16 wCurrCapInfo, u16 wAssocStatus,
-       u16 wAssocAID, u8 *pDstAddr, PWLAN_IE_SUPP_RATES pCurrSuppRates,
-       PWLAN_IE_SUPP_RATES pCurrExtSuppRates)
-{
-       struct vnt_tx_mgmt *pTxPacket = NULL;
-       WLAN_FR_REASSOCRESP sFrame;
-
-       pTxPacket = (struct vnt_tx_mgmt *)pMgmt->pbyMgmtPacketPool;
-       memset(pTxPacket, 0, sizeof(struct vnt_tx_mgmt)
-               + WLAN_ASSOCREQ_FR_MAXLEN);
-       pTxPacket->p80211Header = (PUWLAN_80211HDR)((u8 *)pTxPacket
-               + sizeof(struct vnt_tx_mgmt));
-    // Setup the sFrame structure
-    sFrame.pBuf = (u8 *)pTxPacket->p80211Header;
-    sFrame.len = WLAN_REASSOCRESP_FR_MAXLEN;
-    vMgrEncodeReassocResponse(&sFrame);
-    // Setup the header
-    sFrame.pHdr->sA3.wFrameCtl = cpu_to_le16(
-        (
-        WLAN_SET_FC_FTYPE(WLAN_TYPE_MGR) |
-        WLAN_SET_FC_FSTYPE(WLAN_FSTYPE_REASSOCRESP)
-        ));
-    memcpy( sFrame.pHdr->sA3.abyAddr1, pDstAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr2, pMgmt->abyMACAddr, WLAN_ADDR_LEN);
-    memcpy( sFrame.pHdr->sA3.abyAddr3, pMgmt->abyCurrBSSID, WLAN_BSSID_LEN);
-
-    *sFrame.pwCapInfo = cpu_to_le16(wCurrCapInfo);
-    *sFrame.pwStatus = cpu_to_le16(wAssocStatus);
-    *sFrame.pwAid = cpu_to_le16((u16)(wAssocAID | BIT14 | BIT15));
-
-    // Copy the rate set
-    sFrame.pSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-    sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN;
-    memcpy(sFrame.pSuppRates,
-             pCurrSuppRates,
-             ((PWLAN_IE_SUPP_RATES)pCurrSuppRates)->len + WLAN_IEHDR_LEN
-             );
-
-    if (((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len != 0) {
-        sFrame.pExtSuppRates = (PWLAN_IE_SUPP_RATES)(sFrame.pBuf + sFrame.len);
-        sFrame.len += ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN;
-        memcpy(sFrame.pExtSuppRates,
-             pCurrExtSuppRates,
-             ((PWLAN_IE_SUPP_RATES)pCurrExtSuppRates)->len + WLAN_IEHDR_LEN
-             );
-    }
-
-    // Adjust the length fields
-    pTxPacket->cbMPDULen = sFrame.len;
-    pTxPacket->cbPayloadLen = sFrame.len - WLAN_HDR_ADDR3_LEN;
-
-    return pTxPacket;
-}
-
-/*+
- *
- * Routine Description:
- *  Handles probe response management frames.
- *
- *
- * Return Value:
- *    none.
- *
--*/
-
-static void s_vMgrRxProbeResponse(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket)
-{
-       PKnownBSS pBSSList = NULL;
-       WLAN_FR_PROBERESP sFrame;
-       u8 byCurrChannel = pRxPacket->byRxChannel;
-       ERPObject sERP;
-       int bChannelHit = true;
-
-    memset(&sFrame, 0, sizeof(WLAN_FR_PROBERESP));
-    // decode the frame
-    sFrame.len = pRxPacket->cbMPDULen;
-    sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-    vMgrDecodeProbeResponse(&sFrame);
-
-    if ((sFrame.pqwTimestamp == NULL)
-       || (sFrame.pwBeaconInterval == NULL)
-       || (sFrame.pwCapInfo == NULL)
-       || (sFrame.pSSID == NULL)
-       || (sFrame.pSuppRates == NULL)) {
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe resp:Fail addr:[%p]\n",
-               pRxPacket->p80211Header);
-       return;
-    }
-
-    if(sFrame.pSSID->len == 0)
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Rx Probe resp: SSID len = 0 \n");
-
-    //{{ RobertYu:20050201, 11a  byCurrChannel != sFrame.pDSParms->byCurrChannel mapping
-    if( byCurrChannel > CB_MAX_CHANNEL_24G )
-    {
-       if (sFrame.pDSParms) {
-               if (byCurrChannel ==
-                   RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1])
-                       bChannelHit = true;
-               byCurrChannel =
-                       RFaby11aChannelIndex[sFrame.pDSParms->byCurrChannel-1];
-        } else {
-               bChannelHit = true;
-        }
-    } else {
-       if (sFrame.pDSParms) {
-               if (byCurrChannel == sFrame.pDSParms->byCurrChannel)
-                       bChannelHit = true;
-               byCurrChannel = sFrame.pDSParms->byCurrChannel;
-       } else {
-               bChannelHit = true;
-       }
-    }
-    //RobertYu:20050201
-
-if(ChannelExceedZoneType(pDevice,byCurrChannel)==true)
-      return;
-
-    if (sFrame.pERP) {
-        sERP.byERP = sFrame.pERP->byContext;
-        sERP.bERPExist = true;
-    } else {
-        sERP.bERPExist = false;
-        sERP.byERP = 0;
-    }
-
-    // update or insert the bss
-    pBSSList = BSSpAddrIsInBSSList((void *) pDevice,
-                                  sFrame.pHdr->sA3.abyAddr3,
-                                  sFrame.pSSID);
-    if (pBSSList) {
-       BSSbUpdateToBSSList((void *) pDevice,
-                           *sFrame.pqwTimestamp,
-                           *sFrame.pwBeaconInterval,
-                           *sFrame.pwCapInfo,
-                           byCurrChannel,
-                           bChannelHit,
-                           sFrame.pSSID,
-                           sFrame.pSuppRates,
-                           sFrame.pExtSuppRates,
-                           &sERP,
-                           sFrame.pRSN,
-                           sFrame.pRSNWPA,
-                           sFrame.pIE_Country,
-                           sFrame.pIE_Quiet,
-                           pBSSList,
-                           sFrame.len - WLAN_HDR_ADDR3_LEN,
-                           /* payload of probresponse */
-                           sFrame.pHdr->sA4.abyAddr4,
-                           (void *) pRxPacket);
-    } else {
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Probe resp/insert: RxChannel = : %d\n", byCurrChannel);
-       BSSbInsertToBSSList((void *) pDevice,
-                            sFrame.pHdr->sA3.abyAddr3,
-                            *sFrame.pqwTimestamp,
-                            *sFrame.pwBeaconInterval,
-                            *sFrame.pwCapInfo,
-                            byCurrChannel,
-                            sFrame.pSSID,
-                            sFrame.pSuppRates,
-                            sFrame.pExtSuppRates,
-                            &sERP,
-                            sFrame.pRSN,
-                            sFrame.pRSNWPA,
-                            sFrame.pIE_Country,
-                            sFrame.pIE_Quiet,
-                            sFrame.len - WLAN_HDR_ADDR3_LEN,
-                           sFrame.pHdr->sA4.abyAddr4,   /* payload of beacon */
-                           (void *) pRxPacket);
-    }
-    return;
-
-}
-
-/*+
- *
- * Routine Description:(AP)or(Ad-hoc STA)
- *  Handles probe request management frames.
- *
- *
- * Return Value:
- *    none.
- *
--*/
-
-static void s_vMgrRxProbeRequest(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt, struct vnt_rx_mgmt *pRxPacket)
-{
-       WLAN_FR_PROBEREQ sFrame;
-       CMD_STATUS Status;
-       struct vnt_tx_mgmt *pTxPacket;
-       u8 byPHYType = BB_TYPE_11B;
-
-    // STA in Ad-hoc mode: when latest TBTT beacon transmit success,
-    // STA have to response this request.
-    if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) ||
-        ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) && pDevice->bBeaconSent)) {
-
-        memset(&sFrame, 0, sizeof(WLAN_FR_PROBEREQ));
-        // decode the frame
-        sFrame.len = pRxPacket->cbMPDULen;
-        sFrame.pBuf = (u8 *)pRxPacket->p80211Header;
-        vMgrDecodeProbeRequest(&sFrame);
-/*
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Probe request rx:MAC addr:%pM\n",
-               sFrame.pHdr->sA3.abyAddr2);
-*/
-        if (sFrame.pSSID->len != 0) {
-            if (sFrame.pSSID->len != ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len)
-                return;
-            if (memcmp(sFrame.pSSID->abySSID,
-                       ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->abySSID,
-                       ((PWLAN_IE_SSID)pMgmt->abyCurrSSID)->len) != 0) {
-                       return;
-            }
-        }
-
-        if ((sFrame.pSuppRates->len > 4) || (sFrame.pExtSuppRates != NULL)) {
-            byPHYType = BB_TYPE_11G;
-        }
-
-        // Probe response reply..
-        pTxPacket = s_MgrMakeProbeResponse
-                    (
-                      pDevice,
-                      pMgmt,
-                      pMgmt->wCurrCapInfo,
-                      pMgmt->wCurrBeaconPeriod,
-                      pMgmt->uCurrChannel,
-                      0,
-                      sFrame.pHdr->sA3.abyAddr2,
-                      (PWLAN_IE_SSID)pMgmt->abyCurrSSID,
-                      (u8 *)pMgmt->abyCurrBSSID,
-                      (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                      (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates,
-                       byPHYType
-                    );
-        if (pTxPacket != NULL ){
-            /* send the frame */
-            Status = csMgmt_xmit(pDevice, pTxPacket);
-            if (Status != CMD_STATUS_PENDING) {
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx failed\n");
-            }
-            else {
-//                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Mgt:Probe response tx sending..\n");
-            }
-        }
-    }
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *
- *  Entry point for the reception and handling of 802.11 management
- *  frames. Makes a determination of the frame type and then calls
- *  the appropriate function.
- *
- *
- * Return Value:
- *    none.
- *
--*/
-
-void vMgrRxManagePacket(struct vnt_private *pDevice, struct vnt_manager *pMgmt,
-               struct vnt_rx_mgmt *pRxPacket)
-{
-       int bInScan = false;
-       u32 uNodeIndex = 0;
-       NODE_STATE eNodeState = 0;
-       CMD_STATUS Status;
-
-    if (pMgmt->eCurrMode == WMAC_MODE_ESS_AP) {
-        if (BSSbIsSTAInNodeDB(pDevice, pRxPacket->p80211Header->sA3.abyAddr2, &uNodeIndex))
-            eNodeState = pMgmt->sNodeDBTable[uNodeIndex].eNodeState;
-    }
-
-    switch( WLAN_GET_FC_FSTYPE((pRxPacket->p80211Header->sA3.wFrameCtl)) ){
-
-        case WLAN_FSTYPE_ASSOCREQ:
-            // Frame Clase = 2
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocreq\n");
-            if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
-                (eNodeState < NODE_AUTH)) {
-                // send deauth notification
-                // reason = (6) class 2 received from nonauth sta
-                vMgrDeAuthenBeginSta(pDevice,
-                                     pMgmt,
-                                     pRxPacket->p80211Header->sA3.abyAddr2,
-                                     (6),
-                                     &Status
-                                     );
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 1\n");
-            }
-            else {
-                s_vMgrRxAssocRequest(pDevice, pMgmt, pRxPacket, uNodeIndex);
-            }
-            break;
-
-        case WLAN_FSTYPE_ASSOCRESP:
-            // Frame Clase = 2
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp1\n");
-            s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, false);
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx assocresp2\n");
-            break;
-
-        case WLAN_FSTYPE_REASSOCREQ:
-            // Frame Clase = 2
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocreq\n");
-            // Todo: reassoc
-            if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
-               (eNodeState < NODE_AUTH)) {
-                // send deauth notification
-                // reason = (6) class 2 received from nonauth sta
-                vMgrDeAuthenBeginSta(pDevice,
-                                     pMgmt,
-                                     pRxPacket->p80211Header->sA3.abyAddr2,
-                                     (6),
-                                     &Status
-                                     );
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 2\n");
-
-            }
-            s_vMgrRxReAssocRequest(pDevice, pMgmt, pRxPacket, uNodeIndex);
-            break;
-
-        case WLAN_FSTYPE_REASSOCRESP:
-            // Frame Clase = 2
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx reassocresp\n");
-            s_vMgrRxAssocResponse(pDevice, pMgmt, pRxPacket, true);
-            break;
-
-        case WLAN_FSTYPE_PROBEREQ:
-            // Frame Clase = 0
-            //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx probereq\n");
-            s_vMgrRxProbeRequest(pDevice, pMgmt, pRxPacket);
-            break;
-
-        case WLAN_FSTYPE_PROBERESP:
-            // Frame Clase = 0
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx proberesp\n");
-
-            s_vMgrRxProbeResponse(pDevice, pMgmt, pRxPacket);
-            break;
-
-        case WLAN_FSTYPE_BEACON:
-            // Frame Clase = 0
-            //DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx beacon\n");
-            if (pMgmt->eScanState != WMAC_NO_SCANNING) {
-                bInScan = true;
-            }
-            s_vMgrRxBeacon(pDevice, pMgmt, pRxPacket, bInScan);
-            break;
-
-        case WLAN_FSTYPE_ATIM:
-            // Frame Clase = 1
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx atim\n");
-            break;
-
-        case WLAN_FSTYPE_DISASSOC:
-            // Frame Clase = 2
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx disassoc\n");
-            if ((pMgmt->eCurrMode == WMAC_MODE_ESS_AP) &&
-                (eNodeState < NODE_AUTH)) {
-                // send deauth notification
-                // reason = (6) class 2 received from nonauth sta
-                vMgrDeAuthenBeginSta(pDevice,
-                                     pMgmt,
-                                     pRxPacket->p80211Header->sA3.abyAddr2,
-                                     (6),
-                                     &Status
-                                     );
-                DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "wmgr: send vMgrDeAuthenBeginSta 3\n");
-            }
-            s_vMgrRxDisassociation(pDevice, pMgmt, pRxPacket);
-            break;
-
-        case WLAN_FSTYPE_AUTHEN:
-            // Frame Clase = 1
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO  "rx authen\n");
-            s_vMgrRxAuthentication(pDevice, pMgmt, pRxPacket);
-            break;
-
-        case WLAN_FSTYPE_DEAUTHEN:
-            // Frame Clase = 1
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx deauthen\n");
-            s_vMgrRxDeauthentication(pDevice, pMgmt, pRxPacket);
-            break;
-
-        default:
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "rx unknown mgmt\n");
-    }
-
-    return;
-}
-
-/*+
- *
- * Routine Description:
- *
- *
- *  Prepare beacon to send
- *
- * Return Value:
- *    true if success; false if failed.
- *
--*/
-int bMgrPrepareBeaconToSend(struct vnt_private *pDevice,
-       struct vnt_manager *pMgmt)
-{
-       struct vnt_tx_mgmt *pTxPacket;
-       unsigned long flags;
-
-//    pDevice->bBeaconBufReady = false;
-       if (pDevice->bEncryptionEnable)
-               pMgmt->wCurrCapInfo |= WLAN_SET_CAP_INFO_PRIVACY(1);
-       else
-               pMgmt->wCurrCapInfo &= ~WLAN_SET_CAP_INFO_PRIVACY(1);
-
-    pTxPacket = s_MgrMakeBeacon
-                (
-                  pDevice,
-                  pMgmt,
-                  pMgmt->wCurrCapInfo,
-                  pMgmt->wCurrBeaconPeriod,
-                  pMgmt->uCurrChannel,
-                  pMgmt->wCurrATIMWindow, //0,
-                  (PWLAN_IE_SSID)pMgmt->abyCurrSSID,
-                  (u8 *)pMgmt->abyCurrBSSID,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrSuppRates,
-                  (PWLAN_IE_SUPP_RATES)pMgmt->abyCurrExtSuppRates
-                );
-
-    if ((pMgmt->eCurrMode == WMAC_MODE_IBSS_STA) &&
-        (pMgmt->abyCurrBSSID[0] == 0))
-        return false;
-
-       spin_lock_irqsave(&pDevice->lock, flags);
-
-       csBeacon_xmit(pDevice, pTxPacket);
-
-       spin_unlock_irqrestore(&pDevice->lock, flags);
-
-       MACvRegBitsOn(pDevice, MAC_REG_TCR, TCR_AUTOBCNTX);
-
-    return true;
-}
-
-/*+
- *
- * Routine Description:
- *
- *  Log a warning message based on the contents of the Status
- *  Code field of an 802.11 management frame.  Defines are
- *  derived from 802.11-1997 SPEC.
- *
- * Return Value:
- *    none.
- *
--*/
-static void s_vMgrLogStatus(struct vnt_manager *pMgmt, u16 wStatus)
-{
-    switch( wStatus ){
-        case WLAN_MGMT_STATUS_UNSPEC_FAILURE:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Unspecified error.\n");
-            break;
-        case WLAN_MGMT_STATUS_CAPS_UNSUPPORTED:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Can't support all requested capabilities.\n");
-            break;
-        case WLAN_MGMT_STATUS_REASSOC_NO_ASSOC:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Reassoc denied, can't confirm original Association.\n");
-            break;
-        case WLAN_MGMT_STATUS_ASSOC_DENIED_UNSPEC:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, undefine in spec\n");
-            break;
-        case WLAN_MGMT_STATUS_UNSUPPORTED_AUTHALG:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Peer doesn't support authen algorithm.\n");
-            break;
-        case WLAN_MGMT_STATUS_RX_AUTH_NOSEQ:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen frame received out of sequence.\n");
-            break;
-        case WLAN_MGMT_STATUS_CHALLENGE_FAIL:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen rejected, challenge  failure.\n");
-            break;
-        case WLAN_MGMT_STATUS_AUTH_TIMEOUT:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Authen rejected, timeout waiting for next frame.\n");
-            break;
-        case WLAN_MGMT_STATUS_ASSOC_DENIED_BUSY:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, AP too busy.\n");
-            break;
-        case WLAN_MGMT_STATUS_ASSOC_DENIED_RATES:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we haven't enough basic rates.\n");
-            break;
-        case WLAN_MGMT_STATUS_ASSOC_DENIED_SHORTPREAMBLE:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support short preamble.\n");
-            break;
-        case WLAN_MGMT_STATUS_ASSOC_DENIED_PBCC:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support PBCC.\n");
-            break;
-        case WLAN_MGMT_STATUS_ASSOC_DENIED_AGILITY:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Status code == Assoc denied, we do not support channel agility.\n");
-            break;
-        default:
-            DBG_PRT(MSG_LEVEL_NOTICE, KERN_INFO "Unknown status code %d.\n", wStatus);
-            break;
-    }
-}
-
-/*
- *
- * Description:
- *    Add BSSID in PMKID Candidate list.
- *
- * Parameters:
- *  In:
- *      hDeviceContext - device structure point
- *      pbyBSSID - BSSID address for adding
- *      wRSNCap - BSS's RSN capability
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-
-int bAdd_PMKID_Candidate(struct vnt_private *pDevice, u8 *pbyBSSID,
-       PSRSNCapObject psRSNCapObj)
-{
-       PPMKID_CANDIDATE pCandidateList;
-       int ii = 0;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"bAdd_PMKID_Candidate START: (%d)\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
-
-    if ((pDevice == NULL) || (pbyBSSID == NULL) || (psRSNCapObj == NULL))
-        return false;
-
-    if (pDevice->gsPMKIDCandidate.NumCandidates >= MAX_PMKIDLIST)
-        return false;
-
-    // Update Old Candidate
-    for (ii = 0; ii < pDevice->gsPMKIDCandidate.NumCandidates; ii++) {
-       pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[ii];
-       if (!memcmp(pCandidateList->BSSID, pbyBSSID, ETH_ALEN)) {
-               if ((psRSNCapObj->bRSNCapExist == true)
-                   && (psRSNCapObj->wRSNCap & BIT0)) {
-                       pCandidateList->Flags |=
-                               NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
-               } else {
-                       pCandidateList->Flags &=
-                               ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
-               }
-            return true;
-        }
-    }
-
-    // New Candidate
-    pCandidateList = &pDevice->gsPMKIDCandidate.CandidateList[pDevice->gsPMKIDCandidate.NumCandidates];
-    if ((psRSNCapObj->bRSNCapExist == true) && (psRSNCapObj->wRSNCap & BIT0)) {
-        pCandidateList->Flags |= NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED;
-    } else {
-        pCandidateList->Flags &= ~(NDIS_802_11_PMKID_CANDIDATE_PREAUTH_ENABLED);
-    }
-    memcpy(pCandidateList->BSSID, pbyBSSID, ETH_ALEN);
-    pDevice->gsPMKIDCandidate.NumCandidates++;
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"NumCandidates:%d\n", (int)pDevice->gsPMKIDCandidate.NumCandidates);
-    return true;
-}
-
-/*
- *
- * Description:
- *    Flush PMKID Candidate list.
- *
- * Parameters:
- *  In:
- *      hDeviceContext - device structure point
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-
-void vFlush_PMKID_Candidate(struct vnt_private *pDevice)
-{
-       if (pDevice == NULL)
-               return;
-
-       memset(&pDevice->gsPMKIDCandidate, 0, sizeof(SPMKIDCandidateEvent));
-
-       return;
-}
-
-static bool
-s_bCipherMatch (
-     PKnownBSS                        pBSSNode,
-     NDIS_802_11_ENCRYPTION_STATUS    EncStatus,
-     u8 *                           pbyCCSPK,
-     u8 *                           pbyCCSGK
-    )
-{
-    u8 byMulticastCipher = KEY_CTL_INVALID;
-    u8 byCipherMask = 0x00;
-    int i;
-
-    if (pBSSNode == NULL)
-        return false;
-
-    // check cap. of BSS
-    if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
-         (EncStatus == Ndis802_11Encryption1Enabled)) {
-        // default is WEP only
-        byMulticastCipher = KEY_CTL_WEP;
-    }
-
-    if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
-        (pBSSNode->bWPA2Valid == true) &&
-
-       ((EncStatus == Ndis802_11Encryption3Enabled) ||
-        (EncStatus == Ndis802_11Encryption2Enabled))) {
-        //WPA2
-        // check Group Key Cipher
-        if ((pBSSNode->byCSSGK == WLAN_11i_CSS_WEP40) ||
-            (pBSSNode->byCSSGK == WLAN_11i_CSS_WEP104)) {
-            byMulticastCipher = KEY_CTL_WEP;
-        } else if (pBSSNode->byCSSGK == WLAN_11i_CSS_TKIP) {
-            byMulticastCipher = KEY_CTL_TKIP;
-        } else if (pBSSNode->byCSSGK == WLAN_11i_CSS_CCMP) {
-            byMulticastCipher = KEY_CTL_CCMP;
-        } else {
-            byMulticastCipher = KEY_CTL_INVALID;
-        }
-
-       /* check Pairwise Key Cipher */
-       for (i = 0; i < pBSSNode->wCSSPKCount; i++) {
-               if ((pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_WEP40) ||
-                   (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_WEP104)) {
-                       /* this should not happen as defined 802.11i */
-                       byCipherMask |= 0x01;
-               } else if (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_TKIP) {
-                       byCipherMask |= 0x02;
-               } else if (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_CCMP) {
-                       byCipherMask |= 0x04;
-               } else if (pBSSNode->abyCSSPK[i] == WLAN_11i_CSS_USE_GROUP) {
-                       /* use group key only ignore all others */
-                       byCipherMask = 0;
-                       i = pBSSNode->wCSSPKCount;
-               }
-        }
-
-    } else if ((WLAN_GET_CAP_INFO_PRIVACY(pBSSNode->wCapInfo) != 0) &&
-                (pBSSNode->bWPAValid == true) &&
-                ((EncStatus == Ndis802_11Encryption2Enabled) || (EncStatus == Ndis802_11Encryption3Enabled))) {
-        //WPA
-        // check Group Key Cipher
-        if ((pBSSNode->byGKType == WPA_WEP40) ||
-            (pBSSNode->byGKType == WPA_WEP104)) {
-            byMulticastCipher = KEY_CTL_WEP;
-        } else if (pBSSNode->byGKType == WPA_TKIP) {
-            byMulticastCipher = KEY_CTL_TKIP;
-        } else if (pBSSNode->byGKType == WPA_AESCCMP) {
-            byMulticastCipher = KEY_CTL_CCMP;
-        } else {
-            byMulticastCipher = KEY_CTL_INVALID;
-        }
-
-       /* check Pairwise Key Cipher */
-       for (i = 0; i < pBSSNode->wPKCount; i++) {
-               if (pBSSNode->abyPKType[i] == WPA_TKIP) {
-                       byCipherMask |= 0x02;
-               } else if (pBSSNode->abyPKType[i] == WPA_AESCCMP) {
-                       byCipherMask |= 0x04;
-               } else if (pBSSNode->abyPKType[i] == WPA_NONE) {
-                       /* use group key only ignore all others */
-                       byCipherMask = 0;
-                       i = pBSSNode->wPKCount;
-               }
-        }
-    }
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"%d, %d, %d, %d, EncStatus:%d\n",
-        byMulticastCipher, byCipherMask, pBSSNode->bWPAValid, pBSSNode->bWPA2Valid, EncStatus);
-
-    // mask our cap. with BSS
-    if (EncStatus == Ndis802_11Encryption1Enabled) {
-
-        // For supporting Cisco migration mode, don't care pairwise key cipher
-        //if ((byMulticastCipher == KEY_CTL_WEP) &&
-        //    (byCipherMask == 0)) {
-        if ((byMulticastCipher == KEY_CTL_WEP) &&
-            (byCipherMask == 0)) {
-            *pbyCCSGK = KEY_CTL_WEP;
-            *pbyCCSPK = KEY_CTL_NONE;
-            return true;
-        } else {
-            return false;
-        }
-
-    } else if (EncStatus == Ndis802_11Encryption2Enabled) {
-        if ((byMulticastCipher == KEY_CTL_TKIP) &&
-            (byCipherMask == 0)) {
-            *pbyCCSGK = KEY_CTL_TKIP;
-            *pbyCCSPK = KEY_CTL_NONE;
-            return true;
-        } else if ((byMulticastCipher == KEY_CTL_WEP) &&
-                   ((byCipherMask & 0x02) != 0)) {
-            *pbyCCSGK = KEY_CTL_WEP;
-            *pbyCCSPK = KEY_CTL_TKIP;
-            return true;
-        } else if ((byMulticastCipher == KEY_CTL_TKIP) &&
-                   ((byCipherMask & 0x02) != 0)) {
-            *pbyCCSGK = KEY_CTL_TKIP;
-            *pbyCCSPK = KEY_CTL_TKIP;
-            return true;
-        } else {
-            return false;
-        }
-    } else if (EncStatus == Ndis802_11Encryption3Enabled) {
-        if ((byMulticastCipher == KEY_CTL_CCMP) &&
-            (byCipherMask == 0)) {
-            // When CCMP is enable, "Use group cipher suite" shall not be a valid option.
-            return false;
-        } else if ((byMulticastCipher == KEY_CTL_WEP) &&
-                   ((byCipherMask & 0x04) != 0)) {
-            *pbyCCSGK = KEY_CTL_WEP;
-            *pbyCCSPK = KEY_CTL_CCMP;
-            return true;
-        } else if ((byMulticastCipher == KEY_CTL_TKIP) &&
-                   ((byCipherMask & 0x04) != 0)) {
-            *pbyCCSGK = KEY_CTL_TKIP;
-            *pbyCCSPK = KEY_CTL_CCMP;
-            return true;
-        } else if ((byMulticastCipher == KEY_CTL_CCMP) &&
-                   ((byCipherMask & 0x04) != 0)) {
-            *pbyCCSGK = KEY_CTL_CCMP;
-            *pbyCCSPK = KEY_CTL_CCMP;
-            return true;
-        } else {
-            return false;
-        }
-    }
-    return true;
-}
-
diff --git a/drivers/staging/vt6656/wmgr.h b/drivers/staging/vt6656/wmgr.h
deleted file mode 100644 (file)
index 26ba47d..0000000
+++ /dev/null
@@ -1,397 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wmgr.h
- *
- * Purpose:
- *
- * Author: lyndon chen
- *
- * Date: Jan 2, 2003
- *
- * Functions:
- *
- * Revision History:
- *
- */
-
-#ifndef __WMGR_H__
-#define __WMGR_H__
-
-#include "80211mgr.h"
-#include "80211hdr.h"
-#include "wcmd.h"
-#include "bssdb.h"
-#include "wpa2.h"
-#include "card.h"
-
-// Scan time
-#define PROBE_DELAY                  100  // (us)
-#define SWITCH_CHANNEL_DELAY         200 // (us)
-#define WLAN_SCAN_MINITIME           25   // (ms)
-#define WLAN_SCAN_MAXTIME            100  // (ms)
-#define TRIVIAL_SYNC_DIFFERENCE      0    // (us)
-#define DEFAULT_IBSS_BI              100  // (ms)
-
-#define WCMD_ACTIVE_SCAN_TIME   20 //(ms)
-#define WCMD_PASSIVE_SCAN_TIME  100 //(ms)
-
-#define DEFAULT_MSDU_LIFETIME           512  // ms
-#define DEFAULT_MSDU_LIFETIME_RES_64us  8000 // 64us
-
-#define DEFAULT_MGN_LIFETIME            8    // ms
-#define DEFAULT_MGN_LIFETIME_RES_64us   125  // 64us
-
-#define MAKE_BEACON_RESERVED            10  //(us)
-
-#define TIM_MULTICAST_MASK           0x01
-#define TIM_BITMAPOFFSET_MASK        0xFE
-#define DEFAULT_DTIM_PERIOD             1
-
-#define AP_LONG_RETRY_LIMIT             4
-
-#define DEFAULT_IBSS_CHANNEL            6  //2.4G
-
-//mike define: make timer  to expire after desired times
-#define timer_expire(timer, next_tick) mod_timer(&timer, RUN_AT(next_tick))
-
-typedef void (*TimerFunction)(unsigned long);
-
-//+++ NDIS related
-
-typedef u8 NDIS_802_11_MAC_ADDRESS[ETH_ALEN];
-typedef struct _NDIS_802_11_AI_REQFI
-{
-       u16 Capabilities;
-       u16 ListenInterval;
-    NDIS_802_11_MAC_ADDRESS  CurrentAPAddress;
-} NDIS_802_11_AI_REQFI, *PNDIS_802_11_AI_REQFI;
-
-typedef struct _NDIS_802_11_AI_RESFI
-{
-       u16 Capabilities;
-       u16 StatusCode;
-       u16 AssociationId;
-} NDIS_802_11_AI_RESFI, *PNDIS_802_11_AI_RESFI;
-
-typedef struct _NDIS_802_11_ASSOCIATION_INFORMATION
-{
-       u32 Length;
-       u16 AvailableRequestFixedIEs;
-       NDIS_802_11_AI_REQFI RequestFixedIEs;
-       u32 RequestIELength;
-       u32 OffsetRequestIEs;
-       u16 AvailableResponseFixedIEs;
-       NDIS_802_11_AI_RESFI ResponseFixedIEs;
-       u32 ResponseIELength;
-       u32 OffsetResponseIEs;
-} NDIS_802_11_ASSOCIATION_INFORMATION, *PNDIS_802_11_ASSOCIATION_INFORMATION;
-
-typedef struct tagSAssocInfo {
-       NDIS_802_11_ASSOCIATION_INFORMATION AssocInfo;
-       u8 abyIEs[WLAN_BEACON_FR_MAXLEN+WLAN_BEACON_FR_MAXLEN];
-       /* store ReqIEs set by OID_802_11_ASSOCIATION_INFORMATION */
-       u32 RequestIELength;
-       u8 abyReqIEs[WLAN_BEACON_FR_MAXLEN];
-} SAssocInfo, *PSAssocInfo;
-
-typedef enum tagWMAC_AUTHENTICATION_MODE {
-
-    WMAC_AUTH_OPEN,
-    WMAC_AUTH_SHAREKEY,
-    WMAC_AUTH_AUTO,
-    WMAC_AUTH_WPA,
-    WMAC_AUTH_WPAPSK,
-    WMAC_AUTH_WPANONE,
-    WMAC_AUTH_WPA2,
-    WMAC_AUTH_WPA2PSK,
-    WMAC_AUTH_MAX       // Not a real mode, defined as upper bound
-} WMAC_AUTHENTICATION_MODE, *PWMAC_AUTHENTICATION_MODE;
-
-// Pre-configured Mode (from XP)
-
-typedef enum tagWMAC_CONFIG_MODE {
-    WMAC_CONFIG_ESS_STA,
-    WMAC_CONFIG_IBSS_STA,
-    WMAC_CONFIG_AUTO,
-    WMAC_CONFIG_AP
-
-} WMAC_CONFIG_MODE, *PWMAC_CONFIG_MODE;
-
-typedef enum tagWMAC_SCAN_TYPE {
-
-    WMAC_SCAN_ACTIVE,
-    WMAC_SCAN_PASSIVE,
-    WMAC_SCAN_HYBRID
-
-} WMAC_SCAN_TYPE, *PWMAC_SCAN_TYPE;
-
-typedef enum tagWMAC_SCAN_STATE {
-
-    WMAC_NO_SCANNING,
-    WMAC_IS_SCANNING,
-    WMAC_IS_PROBEPENDING
-
-} WMAC_SCAN_STATE, *PWMAC_SCAN_STATE;
-
-// Notes:
-// Basic Service Set state explained as following:
-// WMAC_STATE_IDLE          : no BSS is selected (Adhoc or Infra)
-// WMAC_STATE_STARTED       : no BSS is selected, start own IBSS (Adhoc only)
-// WMAC_STATE_JOINTED       : BSS is selected and synchronized (Adhoc or Infra)
-// WMAC_STATE_AUTHPENDING   : Authentication pending (Infra)
-// WMAC_STATE_AUTH          : Authenticated (Infra)
-// WMAC_STATE_ASSOCPENDING  : Association pending (Infra)
-// WMAC_STATE_ASSOC         : Associated (Infra)
-
-typedef enum tagWMAC_BSS_STATE {
-
-    WMAC_STATE_IDLE,
-    WMAC_STATE_STARTED,
-    WMAC_STATE_JOINTED,
-    WMAC_STATE_AUTHPENDING,
-    WMAC_STATE_AUTH,
-    WMAC_STATE_ASSOCPENDING,
-    WMAC_STATE_ASSOC
-
-} WMAC_BSS_STATE, *PWMAC_BSS_STATE;
-
-// WMAC selected running mode
-typedef enum tagWMAC_CURRENT_MODE {
-
-    WMAC_MODE_STANDBY,
-    WMAC_MODE_ESS_STA,
-    WMAC_MODE_IBSS_STA,
-    WMAC_MODE_ESS_AP
-
-} WMAC_CURRENT_MODE, *PWMAC_CURRENT_MODE;
-
-typedef enum tagWMAC_POWER_MODE {
-
-    WMAC_POWER_CAM,
-    WMAC_POWER_FAST,
-    WMAC_POWER_MAX
-
-} WMAC_POWER_MODE, *PWMAC_POWER_MODE;
-
-/* Tx Management Packet descriptor */
-struct vnt_tx_mgmt {
-       PUWLAN_80211HDR p80211Header;
-       u32 cbMPDULen;
-       u32 cbPayloadLen;
-};
-
-/* Rx Management Packet descriptor */
-struct vnt_rx_mgmt {
-       PUWLAN_80211HDR p80211Header;
-       u64 qwLocalTSF;
-       u32 cbMPDULen;
-       u32 cbPayloadLen;
-       u32 uRSSI;
-       u8 bySQ;
-       u8 byRxRate;
-       u8 byRxChannel;
-};
-
-struct vnt_manager {
-       void *pAdapter;
-
-       /* MAC address */
-       u8  abyMACAddr[WLAN_ADDR_LEN];
-
-       /* Configuration Mode */
-       WMAC_CONFIG_MODE eConfigMode; /* MAC pre-configed mode */
-
-       CARD_PHY_TYPE eCurrentPHYMode;
-
-       /* Operation state variables */
-       WMAC_CURRENT_MODE eCurrMode; /* MAC current connection mode */
-       WMAC_BSS_STATE eCurrState; /* MAC current BSS state */
-       WMAC_BSS_STATE eLastState; /* MAC last BSS state */
-
-       PKnownBSS pCurrBSS;
-       u8 byCSSGK;
-       u8 byCSSPK;
-
-       int bCurrBSSIDFilterOn;
-
-       /* Current state vars */
-       u32 uCurrChannel;
-       u8 abyCurrSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-       u8 abyCurrExtSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-       u8 abyCurrSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-       u8 abyCurrBSSID[WLAN_BSSID_LEN];
-       u16 wCurrCapInfo;
-       u16 wCurrAID;
-       u32 uRSSITrigger;
-       u16 wCurrATIMWindow;
-       u16 wCurrBeaconPeriod;
-       int bIsDS;
-       u8 byERPContext;
-
-       CMD_STATE eCommandState;
-       u32 uScanChannel;
-
-       /* Desire joinning BSS vars */
-       u8 abyDesireSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-       u8 abyDesireBSSID[WLAN_BSSID_LEN];
-
-       /*restore BSS info for Ad-Hoc mode */
-       u8 abyAdHocSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-
-       /* Adhoc or AP configuration vars */
-       u16 wIBSSBeaconPeriod;
-       u16 wIBSSATIMWindow;
-       u32 uIBSSChannel;
-       u8 abyIBSSSuppRates[WLAN_IEHDR_LEN + WLAN_RATES_MAXLEN + 1];
-       u8 byAPBBType;
-       u8 abyWPAIE[MAX_WPA_IE_LEN];
-       u16 wWPAIELen;
-
-       u32 uAssocCount;
-       int bMoreData;
-
-       /* Scan state vars */
-       WMAC_SCAN_STATE eScanState;
-       WMAC_SCAN_TYPE eScanType;
-       u32 uScanStartCh;
-       u32 uScanEndCh;
-       u16 wScanSteps;
-       u32 uScanBSSType;
-       /* Desire scannig vars */
-       u8 abyScanSSID[WLAN_IEHDR_LEN + WLAN_SSID_MAXLEN + 1];
-       u8 abyScanBSSID[WLAN_BSSID_LEN];
-
-       /* Privacy */
-       WMAC_AUTHENTICATION_MODE eAuthenMode;
-       int bShareKeyAlgorithm;
-       u8 abyChallenge[WLAN_CHALLENGE_LEN];
-       int bPrivacyInvoked;
-
-       /* Received beacon state vars */
-       int bInTIM;
-       int bMulticastTIM;
-       u8 byDTIMCount;
-       u8 byDTIMPeriod;
-
-       /* Power saving state vars */
-       WMAC_POWER_MODE ePSMode;
-       u16 wListenInterval;
-       u16 wCountToWakeUp;
-       int bInTIMWake;
-       u8 *pbyPSPacketPool;
-       u8 byPSPacketPool[sizeof(struct vnt_tx_mgmt)
-               + WLAN_NULLDATA_FR_MAXLEN];
-       int bRxBeaconInTBTTWake;
-       u8 abyPSTxMap[MAX_NODE_NUM + 1];
-
-       /* management command related */
-       u32 uCmdBusy;
-       u32 uCmdHostAPBusy;
-
-       /* management packet pool */
-       u8 *pbyMgmtPacketPool;
-       u8 byMgmtPacketPool[sizeof(struct vnt_tx_mgmt)
-               + WLAN_A3FR_MAXLEN];
-
-       /* Temporarily Rx Mgmt Packet Descriptor */
-       struct vnt_rx_mgmt sRxPacket;
-
-       /* link list of known bss's (scan results) */
-       KnownBSS sBSSList[MAX_BSS_NUM];
-       /* link list of same bss's */
-       KnownBSS pSameBSS[6];
-       int Cisco_cckm;
-       u8 Roam_dbm;
-
-       /* table list of known node */
-       /* sNodeDBList[0] is reserved for AP under Infra mode */
-       /* sNodeDBList[0] is reserved for Multicast under adhoc/AP mode */
-       KnownNodeDB sNodeDBTable[MAX_NODE_NUM + 1];
-
-       /* WPA2 PMKID Cache */
-       SPMKIDCache gsPMKIDCache;
-       int bRoaming;
-
-       /* associate info */
-       SAssocInfo sAssocInfo;
-
-       /* for 802.11h */
-       int b11hEnable;
-       int bSwitchChannel;
-       u8 byNewChannel;
-       PWLAN_IE_MEASURE_REP    pCurrMeasureEIDRep;
-       u32 uLengthOfRepEIDs;
-       u8 abyCurrentMSRReq[sizeof(struct vnt_tx_mgmt)
-               + WLAN_A3FR_MAXLEN];
-       u8 abyCurrentMSRRep[sizeof(struct vnt_tx_mgmt)
-               + WLAN_A3FR_MAXLEN];
-       u8 abyIECountry[WLAN_A3FR_MAXLEN];
-       u8 abyIBSSDFSOwner[6];
-       u8 byIBSSDFSRecovery;
-
-       struct sk_buff skb;
-
-};
-
-void vMgrObjectInit(struct vnt_private *pDevice);
-
-void vMgrAssocBeginSta(struct vnt_private *pDevice,
-               struct vnt_manager *, PCMD_STATUS pStatus);
-
-void vMgrReAssocBeginSta(struct vnt_private *pDevice,
-               struct vnt_manager *, PCMD_STATUS pStatus);
-
-void vMgrDisassocBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *, u8 *abyDestAddress, u16 wReason,
-       PCMD_STATUS pStatus);
-
-void vMgrAuthenBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *, PCMD_STATUS pStatus);
-
-void vMgrCreateOwnIBSS(struct vnt_private *pDevice,
-       PCMD_STATUS pStatus);
-
-void vMgrJoinBSSBegin(struct vnt_private *pDevice,
-       PCMD_STATUS pStatus);
-
-void vMgrRxManagePacket(struct vnt_private *pDevice,
-       struct vnt_manager *, struct vnt_rx_mgmt *);
-
-/*
-void
-vMgrScanBegin(
-      void *hDeviceContext,
-     PCMD_STATUS pStatus
-    );
-*/
-
-void vMgrDeAuthenBeginSta(struct vnt_private *pDevice,
-       struct vnt_manager *, u8 *abyDestAddress, u16 wReason,
-       PCMD_STATUS pStatus);
-
-int bMgrPrepareBeaconToSend(struct vnt_private *pDevice,
-       struct vnt_manager *);
-
-int bAdd_PMKID_Candidate(struct vnt_private *pDevice,
-       u8 *pbyBSSID, PSRSNCapObject psRSNCapObj);
-
-void vFlush_PMKID_Candidate(struct vnt_private *pDevice);
-
-#endif /* __WMGR_H__ */
diff --git a/drivers/staging/vt6656/wpa.c b/drivers/staging/vt6656/wpa.c
deleted file mode 100644 (file)
index 403c295..0000000
+++ /dev/null
@@ -1,314 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wpa.c
- *
- * Purpose: Handles the Basic Service Set & Node Database functions
- *
- * Functions:
- *      WPA_ParseRSN - Parse RSN IE.
- *
- * Revision History:
- *
- * Author: Kyle Hsu
- *
- * Date: July 14, 2003
- *
- */
-
-#include "tmacro.h"
-#include "tether.h"
-#include "device.h"
-#include "80211hdr.h"
-#include "bssdb.h"
-#include "wmgr.h"
-#include "wpa.h"
-#include "80211mgr.h"
-
-static int          msglevel                =MSG_LEVEL_INFO;
-
-static const u8 abyOUI00[4] = { 0x00, 0x50, 0xf2, 0x00 };
-static const u8 abyOUI01[4] = { 0x00, 0x50, 0xf2, 0x01 };
-static const u8 abyOUI02[4] = { 0x00, 0x50, 0xf2, 0x02 };
-static const u8 abyOUI03[4] = { 0x00, 0x50, 0xf2, 0x03 };
-static const u8 abyOUI04[4] = { 0x00, 0x50, 0xf2, 0x04 };
-static const u8 abyOUI05[4] = { 0x00, 0x50, 0xf2, 0x05 };
-
-/*+
- *
- * Description:
- *    Clear RSN information in BSSList.
- *
- * Parameters:
- *  In:
- *      pBSSList - BSS list.
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-
-void
-WPA_ClearRSN(
-     PKnownBSS        pBSSList
-    )
-{
-    int ii;
-    pBSSList->byGKType = WPA_TKIP;
-    for (ii=0; ii < 4; ii ++)
-        pBSSList->abyPKType[ii] = WPA_TKIP;
-    pBSSList->wPKCount = 0;
-    for (ii=0; ii < 4; ii ++)
-        pBSSList->abyAuthType[ii] = WPA_AUTH_IEEE802_1X;
-    pBSSList->wAuthCount = 0;
-    pBSSList->byDefaultK_as_PK = 0;
-    pBSSList->byReplayIdx = 0;
-    pBSSList->sRSNCapObj.bRSNCapExist = false;
-    pBSSList->sRSNCapObj.wRSNCap = 0;
-    pBSSList->bWPAValid = false;
-}
-
-/*+
- *
- * Description:
- *    Parse RSN IE.
- *
- * Parameters:
- *  In:
- *      pBSSList - BSS list.
- *      pRSN - Pointer to the RSN IE.
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-void
-WPA_ParseRSN(
-     PKnownBSS        pBSSList,
-     PWLAN_IE_RSN_EXT pRSN
-    )
-{
-    PWLAN_IE_RSN_AUTH  pIE_RSN_Auth = NULL;
-    int                i, j, m, n = 0;
-    u8 *              pbyCaps;
-
-    WPA_ClearRSN(pBSSList);
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA_ParseRSN: [%d]\n", pRSN->len);
-
-    // information element header makes sense
-    if ((pRSN->len >= 6) // oui1(4)+ver(2)
-         && (pRSN->byElementID == WLAN_EID_RSN_WPA) &&  !memcmp(pRSN->abyOUI, abyOUI01, 4)
-         && (pRSN->wVersion == 1)) {
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal RSN\n");
-        // update each variable if pRSN is long enough to contain the variable
-        if (pRSN->len >= 10) //oui1(4)+ver(2)+GKSuite(4)
-        {
-            if ( !memcmp(pRSN->abyMulticast, abyOUI01, 4))
-                pBSSList->byGKType = WPA_WEP40;
-            else if ( !memcmp(pRSN->abyMulticast, abyOUI02, 4))
-                pBSSList->byGKType = WPA_TKIP;
-            else if ( !memcmp(pRSN->abyMulticast, abyOUI03, 4))
-                pBSSList->byGKType = WPA_AESWRAP;
-            else if ( !memcmp(pRSN->abyMulticast, abyOUI04, 4))
-                pBSSList->byGKType = WPA_AESCCMP;
-            else if ( !memcmp(pRSN->abyMulticast, abyOUI05, 4))
-                pBSSList->byGKType = WPA_WEP104;
-            else
-                // any vendor checks here
-                pBSSList->byGKType = WPA_NONE;
-
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"byGKType: %x\n", pBSSList->byGKType);
-        }
-
-        if (pRSN->len >= 12) //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)
-        {
-            j = 0;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d, sizeof(pBSSList->abyPKType): %zu\n", pRSN->wPKCount, sizeof(pBSSList->abyPKType));
-           for (i = 0; (i < pRSN->wPKCount) &&
-                  (j < ARRAY_SIZE(pBSSList->abyPKType)); i++) {
-                if(pRSN->len >= 12+i*4+4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*i)
-                    if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI00, 4))
-                        pBSSList->abyPKType[j++] = WPA_NONE;
-                    else if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI02, 4))
-                        pBSSList->abyPKType[j++] = WPA_TKIP;
-                    else if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI03, 4))
-                        pBSSList->abyPKType[j++] = WPA_AESWRAP;
-                    else if ( !memcmp(pRSN->PKSList[i].abyOUI, abyOUI04, 4))
-                        pBSSList->abyPKType[j++] = WPA_AESCCMP;
-                    else
-                        // any vendor checks here
-                        ;
-                }
-                else
-                    break;
-                //DBG_PRN_GRP14(("abyPKType[%d]: %X\n", j-1, pBSSList->abyPKType[j-1]));
-            } //for
-            pBSSList->wPKCount = (u16)j;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wPKCount: %d\n", pBSSList->wPKCount);
-        }
-
-        m = pRSN->wPKCount;
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"m: %d\n", m);
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+m*4: %d\n", 14+m*4);
-
-        if (pRSN->len >= 14+m*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)
-            // overlay IE_RSN_Auth structure into correct place
-            pIE_RSN_Auth = (PWLAN_IE_RSN_AUTH) pRSN->PKSList[m].abyOUI;
-            j = 0;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d, sizeof(pBSSList->abyAuthType): %zu\n",
-                          pIE_RSN_Auth->wAuthCount, sizeof(pBSSList->abyAuthType));
-           for (i = 0; (i < pIE_RSN_Auth->wAuthCount) &&
-                  (j < ARRAY_SIZE(pBSSList->abyAuthType)); i++) {
-                if(pRSN->len >= 14+4+(m+i)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*i)
-                    if ( !memcmp(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI01, 4))
-                        pBSSList->abyAuthType[j++] = WPA_AUTH_IEEE802_1X;
-                    else if ( !memcmp(pIE_RSN_Auth->AuthKSList[i].abyOUI, abyOUI02, 4))
-                        pBSSList->abyAuthType[j++] = WPA_AUTH_PSK;
-                    else
-                    // any vendor checks here
-                    ;
-                }
-                else
-                    break;
-                //DBG_PRN_GRP14(("abyAuthType[%d]: %X\n", j-1, pBSSList->abyAuthType[j-1]));
-            }
-            if(j > 0)
-                pBSSList->wAuthCount = (u16)j;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAuthCount: %d\n", pBSSList->wAuthCount);
-        }
-
-        if (pIE_RSN_Auth != NULL) {
-
-            n = pIE_RSN_Auth->wAuthCount;
-
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"n: %d\n", n);
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"14+4+(m+n)*4: %d\n", 14+4+(m+n)*4);
-
-            if(pRSN->len+2 >= 14+4+(m+n)*4) { //oui1(4)+ver(2)+GKS(4)+PKSCnt(2)+PKS(4*m)+AKC(2)+AKS(4*n)+Cap(2)
-                pbyCaps = (u8 *)pIE_RSN_Auth->AuthKSList[n].abyOUI;
-                pBSSList->byDefaultK_as_PK = (*pbyCaps) & WPA_GROUPFLAG;
-                pBSSList->byReplayIdx = 2 << ((*pbyCaps >> WPA_REPLAYBITSSHIFT) & WPA_REPLAYBITS);
-                pBSSList->sRSNCapObj.bRSNCapExist = true;
-                pBSSList->sRSNCapObj.wRSNCap = *(u16 *)pbyCaps;
-                //DBG_PRN_GRP14(("pbyCaps: %X\n", *pbyCaps));
-                //DBG_PRN_GRP14(("byDefaultK_as_PK: %X\n", pBSSList->byDefaultK_as_PK));
-                //DBG_PRN_GRP14(("byReplayIdx: %X\n", pBSSList->byReplayIdx));
-            }
-        }
-        pBSSList->bWPAValid = true;
-    }
-}
-
-/*+
- *
- * Description:
- *    Search RSN information in BSSList.
- *
- * Parameters:
- *  In:
- *      byCmd    - Search type
- *      byEncrypt- Encrypt Type
- *      pBSSList - BSS list
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-bool
-WPA_SearchRSN(
-    u8                byCmd,
-    u8                byEncrypt,
-     PKnownBSS        pBSSList
-    )
-{
-    int ii;
-    u8 byPKType = WPA_NONE;
-
-    if (pBSSList->bWPAValid == false)
-        return false;
-
-    switch(byCmd) {
-    case 0:
-
-        if (byEncrypt != pBSSList->byGKType)
-            return false;
-
-        if (pBSSList->wPKCount > 0) {
-            for (ii = 0; ii < pBSSList->wPKCount; ii ++) {
-                if (pBSSList->abyPKType[ii] == WPA_AESCCMP)
-                    byPKType = WPA_AESCCMP;
-                else if ((pBSSList->abyPKType[ii] == WPA_TKIP) && (byPKType != WPA_AESCCMP))
-                     byPKType = WPA_TKIP;
-                else if ((pBSSList->abyPKType[ii] == WPA_WEP40) && (byPKType != WPA_AESCCMP) && (byPKType != WPA_TKIP))
-                     byPKType = WPA_WEP40;
-                else if ((pBSSList->abyPKType[ii] == WPA_WEP104) && (byPKType != WPA_AESCCMP) && (byPKType != WPA_TKIP))
-                     byPKType = WPA_WEP104;
-            }
-            if (byEncrypt != byPKType)
-                return false;
-        }
-        return true;
-//        if (pBSSList->wAuthCount > 0)
-//            for (ii=0; ii < pBSSList->wAuthCount; ii ++)
-//                if (byAuth == pBSSList->abyAuthType[ii])
-//                    break;
-        break;
-
-    default:
-        break;
-    }
-    return false;
-}
-
-/*+
- *
- * Description:
- *    Check if RSN IE makes sense.
- *
- * Parameters:
- *  In:
- *      pRSN - Pointer to the RSN IE.
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-bool
-WPAb_Is_RSN(
-     PWLAN_IE_RSN_EXT pRSN
-    )
-{
-    if (pRSN == NULL)
-        return false;
-
-    if ((pRSN->len >= 6) && // oui1(4)+ver(2)
-        (pRSN->byElementID == WLAN_EID_RSN_WPA) &&  !memcmp(pRSN->abyOUI, abyOUI01, 4) &&
-        (pRSN->wVersion == 1)) {
-        return true;
-    }
-    else
-        return false;
-}
-
diff --git a/drivers/staging/vt6656/wpa.h b/drivers/staging/vt6656/wpa.h
deleted file mode 100644 (file)
index 2a724c0..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wpa.h
- *
- * Purpose: Defines the macros, types, and functions for dealing
- *          with WPA informations.
- *
- * Author: Kyle Hsu
- *
- * Date: Jul 14, 2003
- *
- */
-
-#ifndef __WPA_H__
-#define __WPA_H__
-
-#include "80211hdr.h"
-
-#define WPA_NONE            0
-#define WPA_WEP40           1
-#define WPA_TKIP            2
-#define WPA_AESWRAP         3
-#define WPA_AESCCMP         4
-#define WPA_WEP104          5
-#define WPA_AUTH_IEEE802_1X 1
-#define WPA_AUTH_PSK        2
-
-#define WPA_GROUPFLAG       0x02
-#define WPA_REPLAYBITSSHIFT 2
-#define WPA_REPLAYBITS      0x03
-
-void
-WPA_ClearRSN(
-     PKnownBSS        pBSSList
-    );
-
-void
-WPA_ParseRSN(
-     PKnownBSS        pBSSList,
-     PWLAN_IE_RSN_EXT pRSN
-    );
-
-bool
-WPA_SearchRSN(
-    u8                byCmd,
-    u8                byEncrypt,
-     PKnownBSS        pBSSList
-    );
-
-bool
-WPAb_Is_RSN(
-     PWLAN_IE_RSN_EXT pRSN
-    );
-
-#endif /* __WPA_H__ */
diff --git a/drivers/staging/vt6656/wpa2.c b/drivers/staging/vt6656/wpa2.c
deleted file mode 100644 (file)
index df55417..0000000
+++ /dev/null
@@ -1,235 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wpa2.c
- *
- * Purpose: Handles the Basic Service Set & Node Database functions
- *
- * Functions:
- *
- * Revision History:
- *
- * Author: Yiching Chen
- *
- * Date: Oct. 4, 2004
- *
- */
-
-#include "device.h"
-#include "wpa2.h"
-
-static int          msglevel                =MSG_LEVEL_INFO;
-//static int          msglevel                =MSG_LEVEL_DEBUG;
-
-static const u8 abyOUIGK[4]      = { 0x00, 0x0F, 0xAC, 0x00 };
-static const u8 abyOUIWEP40[4]   = { 0x00, 0x0F, 0xAC, 0x01 };
-static const u8 abyOUIWEP104[4]  = { 0x00, 0x0F, 0xAC, 0x05 };
-static const u8 abyOUITKIP[4]    = { 0x00, 0x0F, 0xAC, 0x02 };
-static const u8 abyOUICCMP[4]    = { 0x00, 0x0F, 0xAC, 0x04 };
-
-static const u8 abyOUI8021X[4]   = { 0x00, 0x0F, 0xAC, 0x01 };
-static const u8 abyOUIPSK[4]     = { 0x00, 0x0F, 0xAC, 0x02 };
-
-/*+
- *
- * Description:
- *    Clear RSN information in BSSList.
- *
- * Parameters:
- *  In:
- *      pBSSNode - BSS list.
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-void
-WPA2_ClearRSN (
-     PKnownBSS        pBSSNode
-    )
-{
-    int ii;
-
-    pBSSNode->bWPA2Valid = false;
-
-    pBSSNode->byCSSGK = WLAN_11i_CSS_CCMP;
-    for (ii=0; ii < 4; ii ++)
-        pBSSNode->abyCSSPK[ii] = WLAN_11i_CSS_CCMP;
-    pBSSNode->wCSSPKCount = 1;
-    for (ii=0; ii < 4; ii ++)
-        pBSSNode->abyAKMSSAuthType[ii] = WLAN_11i_AKMSS_802_1X;
-    pBSSNode->wAKMSSAuthCount = 1;
-    pBSSNode->sRSNCapObj.bRSNCapExist = false;
-    pBSSNode->sRSNCapObj.wRSNCap = 0;
-}
-
-/*+
- *
- * Description:
- *    Parse RSN IE.
- *
- * Parameters:
- *  In:
- *      pBSSNode - BSS list.
- *      pRSN - Pointer to the RSN IE.
- *  Out:
- *      none
- *
- * Return Value: none.
- *
--*/
-void
-WPA2vParseRSN (
-     PKnownBSS        pBSSNode,
-     PWLAN_IE_RSN     pRSN
-    )
-{
-    int                 i, j;
-    u16                m = 0, n = 0;
-    u8 *               pbyOUI;
-    bool                bUseGK = false;
-
-    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"WPA2_ParseRSN: [%d]\n", pRSN->len);
-
-    WPA2_ClearRSN(pBSSNode);
-
-    if (pRSN->len == 2) { // ver(2)
-        if ((pRSN->byElementID == WLAN_EID_RSN) && (pRSN->wVersion == 1)) {
-            pBSSNode->bWPA2Valid = true;
-        }
-        return;
-    }
-
-    if (pRSN->len < 6) { // ver(2) + GK(4)
-        // invalid CSS, P802.11i/D10.0, p31
-        return;
-    }
-
-    // information element header makes sense
-    if ((pRSN->byElementID == WLAN_EID_RSN) &&
-        (pRSN->wVersion == 1)) {
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"Legal 802.11i RSN\n");
-
-        pbyOUI = &(pRSN->abyRSN[0]);
-        if ( !memcmp(pbyOUI, abyOUIWEP40, 4))
-            pBSSNode->byCSSGK = WLAN_11i_CSS_WEP40;
-        else if ( !memcmp(pbyOUI, abyOUITKIP, 4))
-            pBSSNode->byCSSGK = WLAN_11i_CSS_TKIP;
-        else if ( !memcmp(pbyOUI, abyOUICCMP, 4))
-            pBSSNode->byCSSGK = WLAN_11i_CSS_CCMP;
-        else if ( !memcmp(pbyOUI, abyOUIWEP104, 4))
-            pBSSNode->byCSSGK = WLAN_11i_CSS_WEP104;
-        else if ( !memcmp(pbyOUI, abyOUIGK, 4)) {
-            // invalid CSS, P802.11i/D10.0, p32
-            return;
-        } else
-            // any vendor checks here
-            pBSSNode->byCSSGK = WLAN_11i_CSS_UNKNOWN;
-
-        DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"802.11i CSS: %X\n", pBSSNode->byCSSGK);
-
-        if (pRSN->len == 6) {
-            pBSSNode->bWPA2Valid = true;
-            return;
-        }
-
-        if (pRSN->len >= 8) { // ver(2) + GK(4) + PK count(2)
-            pBSSNode->wCSSPKCount = *((u16 *) &(pRSN->abyRSN[4]));
-            j = 0;
-            pbyOUI = &(pRSN->abyRSN[6]);
-
-            for (i = 0; (i < pBSSNode->wCSSPKCount) && (j < sizeof(pBSSNode->abyCSSPK)/sizeof(u8)); i++) {
-
-                if (pRSN->len >= 8+i*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*i)
-                    if ( !memcmp(pbyOUI, abyOUIGK, 4)) {
-                        pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_USE_GROUP;
-                        bUseGK = true;
-                    } else if ( !memcmp(pbyOUI, abyOUIWEP40, 4)) {
-                        // Invalid CSS, continue parsing
-                    } else if ( !memcmp(pbyOUI, abyOUITKIP, 4)) {
-                        if (pBSSNode->byCSSGK != WLAN_11i_CSS_CCMP)
-                            pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_TKIP;
-                        else
-                            ; // Invalid CSS, continue parsing
-                    } else if ( !memcmp(pbyOUI, abyOUICCMP, 4)) {
-                        pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_CCMP;
-                    } else if ( !memcmp(pbyOUI, abyOUIWEP104, 4)) {
-                        // Invalid CSS, continue parsing
-                    } else {
-                        // any vendor checks here
-                        pBSSNode->abyCSSPK[j++] = WLAN_11i_CSS_UNKNOWN;
-                    }
-                    pbyOUI += 4;
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyCSSPK[%d]: %X\n", j-1, pBSSNode->abyCSSPK[j-1]);
-                } else
-                    break;
-            } //for
-
-            if (bUseGK == true) {
-                if (j != 1) {
-                    // invalid CSS, This should be only PK CSS.
-                    return;
-                }
-                if (pBSSNode->byCSSGK == WLAN_11i_CSS_CCMP) {
-                    // invalid CSS, If CCMP is enable , PK can't be CSSGK.
-                    return;
-                }
-            }
-            if ((pBSSNode->wCSSPKCount != 0) && (j == 0)) {
-                // invalid CSS, No valid PK.
-                return;
-            }
-            pBSSNode->wCSSPKCount = (u16)j;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wCSSPKCount: %d\n", pBSSNode->wCSSPKCount);
-        }
-
-        m = *((u16 *) &(pRSN->abyRSN[4]));
-
-        if (pRSN->len >= 10+m*4) { // ver(2) + GK(4) + PK count(2) + PKS(4*m) + AKMSS count(2)
-            pBSSNode->wAKMSSAuthCount = *((u16 *) &(pRSN->abyRSN[6+4*m]));
-            j = 0;
-            pbyOUI = &(pRSN->abyRSN[8+4*m]);
-            for (i = 0; (i < pBSSNode->wAKMSSAuthCount) && (j < sizeof(pBSSNode->abyAKMSSAuthType)/sizeof(u8)); i++) {
-                if (pRSN->len >= 10+(m+i)*4+4) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSS(2)+AKS(4*i)
-                    if ( !memcmp(pbyOUI, abyOUI8021X, 4))
-                        pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_802_1X;
-                    else if ( !memcmp(pbyOUI, abyOUIPSK, 4))
-                        pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_PSK;
-                    else
-                        // any vendor checks here
-                        pBSSNode->abyAKMSSAuthType[j++] = WLAN_11i_AKMSS_UNKNOWN;
-                    DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"abyAKMSSAuthType[%d]: %X\n", j-1, pBSSNode->abyAKMSSAuthType[j-1]);
-                } else
-                    break;
-            }
-            pBSSNode->wAKMSSAuthCount = (u16)j;
-            DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"wAKMSSAuthCount: %d\n", pBSSNode->wAKMSSAuthCount);
-
-            n = *((u16 *) &(pRSN->abyRSN[6+4*m]));
-            if (pRSN->len >= 12+4*m+4*n) { // ver(2)+GK(4)+PKCnt(2)+PKS(4*m)+AKMSSCnt(2)+AKMSS(4*n)+Cap(2)
-                pBSSNode->sRSNCapObj.bRSNCapExist = true;
-                pBSSNode->sRSNCapObj.wRSNCap = *((u16 *) &(pRSN->abyRSN[8+4*m+4*n]));
-            }
-        }
-        //ignore PMKID lists bcs only (Re)Assocrequest has this field
-        pBSSNode->bWPA2Valid = true;
-    }
-}
diff --git a/drivers/staging/vt6656/wpa2.h b/drivers/staging/vt6656/wpa2.h
deleted file mode 100644 (file)
index dc505ce..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wpa2.h
- *
- * Purpose: Defines the macros, types, and functions for dealing
- *          with WPA2 informations.
- *
- * Author: Yiching Chen
- *
- * Date: Oct. 4, 2004
- *
- */
-
-#ifndef __WPA2_H__
-#define __WPA2_H__
-
-#include "80211mgr.h"
-#include "80211hdr.h"
-#include "bssdb.h"
-
-#define MAX_PMKID_CACHE         16
-
-typedef struct tagsPMKIDInfo {
-    u8    abyBSSID[6];
-    u8    abyPMKID[16];
-} PMKIDInfo, *PPMKIDInfo;
-
-typedef struct tagSPMKIDCache {
-       u32 BSSIDInfoCount;
-       PMKIDInfo BSSIDInfo[MAX_PMKID_CACHE];
-} SPMKIDCache, *PSPMKIDCache;
-
-void WPA2_ClearRSN(PKnownBSS pBSSNode);
-void WPA2vParseRSN(PKnownBSS pBSSNode, PWLAN_IE_RSN pRSN);
-
-#endif /* __WPA2_H__ */
diff --git a/drivers/staging/vt6656/wpactl.c b/drivers/staging/vt6656/wpactl.c
deleted file mode 100644 (file)
index 0a06715..0000000
+++ /dev/null
@@ -1,247 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- *
- * File: wpactl.c
- *
- * Purpose: handle wpa supplicant ioctl input/out functions
- *
- * Author: Lyndon Chen
- *
- * Date: July 28, 2006
- *
- * Functions:
- *
- * Revision History:
- *
- */
-
-#include "wpactl.h"
-#include "key.h"
-#include "mac.h"
-#include "device.h"
-#include "wmgr.h"
-#include "iocmd.h"
-#include "iowpa.h"
-#include "usbpipe.h"
-#include "rf.h"
-
-static int msglevel = MSG_LEVEL_INFO;
-
-/*
- * Description:
- *      Set WPA algorithm & keys
- *
- * Parameters:
- *  In:
- *      pDevice -
- *      param -
- *  Out:
- *
- * Return Value:
- *
- */
-int wpa_set_keys(struct vnt_private *pDevice, void *ctx)
-{
-       struct viawget_wpa_param *param = ctx;
-       struct vnt_manager *pMgmt = &pDevice->vnt_mgmt;
-       u32 dwKeyIndex = 0;
-       u8 abyKey[MAX_KEY_LEN];
-       u8 abySeq[MAX_KEY_LEN];
-       u64 KeyRSC;
-       u8 byKeyDecMode = KEY_CTL_WEP;
-       int ret = 0;
-       u8 uu;
-       int ii;
-
-       if (param->u.wpa_key.alg_name > WPA_ALG_CCMP)
-               return -EINVAL;
-
-       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "param->u.wpa_key.alg_name = %d \n",
-               param->u.wpa_key.alg_name);
-       if (param->u.wpa_key.alg_name == WPA_ALG_NONE) {
-               pDevice->eEncryptionStatus = Ndis802_11EncryptionDisabled;
-               pDevice->bEncryptionEnable = false;
-               pDevice->byKeyIndex = 0;
-               pDevice->bTransmitKey = false;
-               for (uu=0; uu<MAX_KEY_TABLE; uu++) {
-                       MACvDisableKeyEntry(pDevice, uu);
-               }
-               return ret;
-       }
-
-       if (param->u.wpa_key.key_len > sizeof(abyKey))
-               return -EINVAL;
-
-       memcpy(&abyKey[0], param->u.wpa_key.key, param->u.wpa_key.key_len);
-
-       dwKeyIndex = (u32)(param->u.wpa_key.key_index);
-
-       if (param->u.wpa_key.alg_name == WPA_ALG_WEP) {
-               if (dwKeyIndex > 3) {
-                       return -EINVAL;
-               } else {
-                       if (param->u.wpa_key.set_tx) {
-                               pDevice->byKeyIndex = (u8)dwKeyIndex;
-                               pDevice->bTransmitKey = true;
-                               dwKeyIndex |= (1 << 31);
-                       }
-                       KeybSetDefaultKey(  pDevice,
-                                       &(pDevice->sKey),
-                                       dwKeyIndex & ~(BIT30 | USE_KEYRSC),
-                                       param->u.wpa_key.key_len,
-                                       NULL,
-                                       abyKey,
-                                       KEY_CTL_WEP
-                               );
-
-               }
-               pDevice->eEncryptionStatus = Ndis802_11Encryption1Enabled;
-               pDevice->bEncryptionEnable = true;
-               return ret;
-       }
-
-       if (param->u.wpa_key.seq && param->u.wpa_key.seq_len > sizeof(abySeq))
-               return -EINVAL;
-
-       memcpy(&abySeq[0], param->u.wpa_key.seq, param->u.wpa_key.seq_len);
-
-       if (param->u.wpa_key.seq_len > 0) {
-               for (ii = 0 ; ii < param->u.wpa_key.seq_len ; ii++) {
-                       if (ii < 4)
-                               KeyRSC |= (abySeq[ii] << (ii * 8));
-                       else
-                               KeyRSC |= (abySeq[ii] << ((ii-4) * 8));
-               }
-               dwKeyIndex |= 1 << 29;
-       }
-
-       if (param->u.wpa_key.key_index >= MAX_GROUP_KEY) {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return  dwKeyIndex > 3\n");
-               return -EINVAL;
-       }
-
-       if (param->u.wpa_key.alg_name == WPA_ALG_TKIP) {
-               pDevice->eEncryptionStatus = Ndis802_11Encryption2Enabled;
-       }
-
-       if (param->u.wpa_key.alg_name == WPA_ALG_CCMP) {
-               pDevice->eEncryptionStatus = Ndis802_11Encryption3Enabled;
-       }
-
-       if (param->u.wpa_key.set_tx)
-               dwKeyIndex |= (1 << 31);
-
-       if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled)
-               byKeyDecMode = KEY_CTL_CCMP;
-       else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled)
-               byKeyDecMode = KEY_CTL_TKIP;
-       else
-               byKeyDecMode = KEY_CTL_WEP;
-
-       // Fix HCT test that set 256 bits KEY and Ndis802_11Encryption3Enabled
-       if (pDevice->eEncryptionStatus == Ndis802_11Encryption3Enabled) {
-               if (param->u.wpa_key.key_len == MAX_KEY_LEN)
-                       byKeyDecMode = KEY_CTL_TKIP;
-               else if (param->u.wpa_key.key_len == WLAN_WEP40_KEYLEN)
-                       byKeyDecMode = KEY_CTL_WEP;
-               else if (param->u.wpa_key.key_len == WLAN_WEP104_KEYLEN)
-                       byKeyDecMode = KEY_CTL_WEP;
-       } else if (pDevice->eEncryptionStatus == Ndis802_11Encryption2Enabled) {
-               if (param->u.wpa_key.key_len == WLAN_WEP40_KEYLEN)
-                       byKeyDecMode = KEY_CTL_WEP;
-               else if (param->u.wpa_key.key_len == WLAN_WEP104_KEYLEN)
-                       byKeyDecMode = KEY_CTL_WEP;
-       }
-
-       // Check TKIP key length
-       if ((byKeyDecMode == KEY_CTL_TKIP) &&
-               (param->u.wpa_key.key_len != MAX_KEY_LEN)) {
-               // TKIP Key must be 256 bits
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return - TKIP Key must be 256 bits!\n");
-               return -EINVAL;
-    }
-       // Check AES key length
-       if ((byKeyDecMode == KEY_CTL_CCMP) &&
-               (param->u.wpa_key.key_len != AES_KEY_LEN)) {
-               // AES Key must be 128 bits
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "return - AES Key must be 128 bits\n");
-               return -EINVAL;
-       }
-
-       if (is_broadcast_ether_addr(&param->addr[0]) || (param->addr == NULL)) {
-               /* if broadcast, set the key as every key entry's group key */
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Groupe Key Assign.\n");
-
-               if ((KeybSetAllGroupKey(pDevice, &(pDevice->sKey), dwKeyIndex,
-                                                       param->u.wpa_key.key_len,
-                                                       &KeyRSC,
-                                                       (u8 *)abyKey,
-                                                       byKeyDecMode
-                                       ) == true) &&
-                       (KeybSetDefaultKey(pDevice,
-                                       &(pDevice->sKey),
-                                       dwKeyIndex,
-                                       param->u.wpa_key.key_len,
-                                       &KeyRSC,
-                                       (u8 *)abyKey,
-                                       byKeyDecMode
-                               ) == true) ) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "GROUP Key Assign.\n");
-               } else {
-                       return -EINVAL;
-               }
-       } else {
-               DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Assign.\n");
-               // BSSID not 0xffffffffffff
-               // Pairwise Key can't be WEP
-               if (byKeyDecMode == KEY_CTL_WEP) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key can't be WEP\n");
-                       return -EINVAL;
-               }
-               dwKeyIndex |= (1 << 30); // set pairwise key
-               if (pMgmt->eConfigMode == WMAC_CONFIG_IBSS_STA) {
-                       //DBG_PRN_WLAN03(("return NDIS_STATUS_INVALID_DATA - WMAC_CONFIG_IBSS_STA\n"));
-                       return -EINVAL;
-               }
-               if (KeybSetKey(pDevice, &(pDevice->sKey), &param->addr[0],
-                               dwKeyIndex, param->u.wpa_key.key_len,
-                               &KeyRSC, (u8 *)abyKey, byKeyDecMode
-                               ) == true) {
-                       DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO "Pairwise Key Set\n");
-               } else {
-                       // Key Table Full
-                       if (ether_addr_equal(param->addr, pDevice->abyBSSID)) {
-                               //DBG_PRN_WLAN03(("return NDIS_STATUS_INVALID_DATA -Key Table Full.2\n"));
-                               return -EINVAL;
-                       } else {
-                               // Save Key and configure just before associate/reassociate to BSSID
-                               // we do not implement now
-                               return -EINVAL;
-                       }
-               }
-       } // BSSID not 0xffffffffffff
-       if ((ret == 0) && ((param->u.wpa_key.set_tx) != 0)) {
-               pDevice->byKeyIndex = (u8)param->u.wpa_key.key_index;
-               pDevice->bTransmitKey = true;
-       }
-       pDevice->bEncryptionEnable = true;
-
-       return ret;
-}
-
diff --git a/drivers/staging/vt6656/wpactl.h b/drivers/staging/vt6656/wpactl.h
deleted file mode 100644 (file)
index e032a1b..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Copyright (c) 1996, 2003 VIA Networking Technologies, Inc.
- * All rights reserved.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * File: wpactl.h
- *
- * Purpose:
- *
- * Author: Lyndon Chen
- *
- * Date: March 1, 2005
- *
- */
-
-#ifndef __WPACTL_H__
-#define __WPACTL_H__
-
-#include "device.h"
-#include "iowpa.h"
-
-//WPA related
-
-typedef enum { WPA_ALG_NONE, WPA_ALG_WEP, WPA_ALG_TKIP, WPA_ALG_CCMP } wpa_alg;
-
-#define AUTH_ALG_OPEN_SYSTEM   0x01
-#define AUTH_ALG_SHARED_KEY    0x02
-#define AUTH_ALG_LEAP          0x04
-
-typedef unsigned long long NDIS_802_11_KEY_RSC;
-
-int wpa_set_keys(struct vnt_private *, void *ctx);
-
-#endif /* __WPACL_H__ */
diff --git a/drivers/staging/winbond/Kconfig b/drivers/staging/winbond/Kconfig
deleted file mode 100644 (file)
index db5b053..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-config W35UND
-       tristate "IS89C35 WLAN USB driver"
-       depends on MAC80211 && WLAN && USB
-       default n
-       ---help---
-         This is highly experimental driver for Winbond WIFI card.
-
-         Hardware is present in some Kohjinsha subnotebooks, and in some
-         stand-alone USB modules. Chipset name seems to be w89c35d.
-
-         Check <http://code.google.com/p/winbondport/> for new version.
diff --git a/drivers/staging/winbond/Makefile b/drivers/staging/winbond/Makefile
deleted file mode 100644 (file)
index 081d48d..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-w35und-y :=                    \
-       mds.o                   \
-       mto.o                   \
-       phy_calibration.o       \
-       reg.o                   \
-       wb35reg.o               \
-       wb35rx.o                \
-       wb35tx.o                \
-       wbusb.o                 \
-
-
-obj-$(CONFIG_W35UND) += w35und.o
-
-
-
diff --git a/drivers/staging/winbond/TODO b/drivers/staging/winbond/TODO
deleted file mode 100644 (file)
index b4c592a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-TODO:
-       - sparse cleanups
-       - checkpatch cleanups
-       - kerneldoc cleanups
-       - fix severeCamelCaseInfestation
-       - remove unused ioctls
-       - use cfg80211 for regulatory stuff
-       - fix 4k stack problems
-       - fix locking problems (it's done using atomics...)
-
-Please send patches to Greg Kroah-Hartman <greg@kroah.com> and
-Pavel Machek <pavel@ucw.cz>
diff --git a/drivers/staging/winbond/core.h b/drivers/staging/winbond/core.h
deleted file mode 100644 (file)
index fc0ef24..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef __WINBOND_CORE_H
-#define __WINBOND_CORE_H
-
-#include <linux/wireless.h>
-#include <linux/types.h>
-#include <linux/delay.h>
-
-#include "wbhal.h"
-#include "mto.h"
-
-#include "mac_structures.h"
-#include "mds_s.h"
-
-#define MAX_NUM_TX_MMPDU               2
-#define MAX_MMPDU_SIZE                 1512
-#define MAX_NUM_RX_MMPDU               6
-
-struct mlme_frame {
-       s8              *pMMPDU;
-       u16             len;
-       u8              data_type;
-       u8              is_in_used;
-
-       u8              TxMMPDU[MAX_NUM_TX_MMPDU][MAX_MMPDU_SIZE];
-       u8              TxMMPDUInUse[(MAX_NUM_TX_MMPDU + 3) & ~0x03];
-
-       u16             wNumTxMMPDU;
-       u16             wNumTxMMPDUDiscarded;
-
-       u8              RxMMPDU[MAX_NUM_RX_MMPDU][MAX_MMPDU_SIZE];
-       u8              SaveRxBufSlotInUse[(MAX_NUM_RX_MMPDU + 3) & ~0x03];
-
-       u16             wNumRxMMPDU;
-       u16             wNumRxMMPDUDiscarded;
-
-       u16             wNumRxMMPDUInMLME;      /* Number of the Rx MMPDU */
-       u16             reserved_1;             /*  in MLME. */
-                                               /*  excluding the discarded */
-};
-
-#define WBLINUX_PACKET_ARRAY_SIZE (ETHERNET_TX_DESCRIPTORS*4)
-
-#define WB_MAX_LINK_NAME_LEN 40
-
-struct wbsoft_priv {
-       struct wb_local_para sLocalPara;        /* Myself connected
-                                                       parameters */
-
-       struct mlme_frame sMlmeFrame;   /* connect to peerSTA parameters */
-
-       struct wb35_mto_params sMtoPara;        /* MTO_struct ... */
-       struct hw_data sHwData; /*For HAL */
-       struct wb35_mds Mds;
-
-       u32 RxByteCount;
-       u32 TxByteCount;
-
-       bool enabled;
-};
-
-#endif /* __WINBOND_CORE_H */
diff --git a/drivers/staging/winbond/localpara.h b/drivers/staging/winbond/localpara.h
deleted file mode 100644 (file)
index 8ca80dd..0000000
+++ /dev/null
@@ -1,311 +0,0 @@
-#ifndef __WINBOND_LOCALPARA_H
-#define __WINBOND_LOCALPARA_H
-
-/*
- * =============================================================
- * LocalPara.h -
- * =============================================================
- */
-
-#include "mac_structures.h"
-
-/* Define the local ability */
-
-#define LOCAL_DEFAULT_BEACON_PERIOD    100     /* ms */
-#define LOCAL_DEFAULT_ATIM_WINDOW      0
-#define LOCAL_DEFAULT_ERP_CAPABILITY   0x0431  /*
-                                                * 0x0001: ESS
-                                                * 0x0010: Privacy
-                                                * 0x0020: short preamble
-                                                * 0x0400: short slot time
-                                                */
-#define LOCAL_DEFAULT_LISTEN_INTERVAL  5
-
-#define LOCAL_DEFAULT_24_CHANNEL_NUM   13      /* channel 1..13 */
-#define LOCAL_DEFAULT_5_CHANNEL_NUM    8       /* channel 36..64 */
-
-#define LOCAL_USA_24_CHANNEL_NUM       11
-#define LOCAL_USA_5_CHANNEL_NUM                12
-#define LOCAL_EUROPE_24_CHANNEL_NUM    13
-#define LOCAL_EUROPE_5_CHANNEL_NUM     19
-#define LOCAL_JAPAN_24_CHANNEL_NUM     14
-#define LOCAL_JAPAN_5_CHANNEL_NUM      11
-#define LOCAL_UNKNOWN_24_CHANNEL_NUM   14
-#define LOCAL_UNKNOWN_5_CHANNEL_NUM    34      /* not include 165 */
-
-#define psLOCAL                                (&(adapter->sLocalPara))
-
-#define MODE_802_11_BG                 0
-#define MODE_802_11_A                  1
-#define MODE_802_11_ABG                        2
-#define MODE_802_11_BG_IBSS            3
-#define MODE_802_11_B                  4
-#define MODE_AUTO                      255
-
-#define BAND_TYPE_DSSS                 0
-#define BAND_TYPE_OFDM_24              1
-#define BAND_TYPE_OFDM_5               2
-
-/* refer Bitmap2RateValue table */
-
-/* the bitmap value of all the H/W supported rates: */
-/* 1, 2, 5.5, 11, 6, 9, 12, 18, 24, 36, 48, 54 */
-#define LOCAL_ALL_SUPPORTED_RATES_BITMAP       0x130c1a66
-/* the bitmap value of all the H/W supported rates except to non-OFDM rates: */
-/* 6, 9, 12, 18, 24, 36, 48, 54 */
-#define LOCAL_OFDM_SUPPORTED_RATES_BITMAP      0x130c1240
-#define LOCAL_11B_SUPPORTED_RATE_BITMAP                0x826
-#define LOCAL_11B_BASIC_RATE_BITMAP            0x826
-#define LOCAL_11B_OPERATION_RATE_BITMAP                0x826
-#define LOCAL_11G_BASIC_RATE_BITMAP            0x826      /* 1, 2, 5.5, 11 */
-#define LOCAL_11G_OPERATION_RATE_BITMAP                0x130c1240 /* 6, 9, 12, 18,
-                                                                   * 24, 36, 48, 54
-                                                                   */
-#define LOCAL_11A_BASIC_RATE_BITMAP            0x01001040 /* 6, 12, 24 */
-#define LOCAL_11A_OPERATION_RATE_BITMAP                0x120c0200 /* 9, 18, 36,
-                                                                   * 48, 54
-                                                                   */
-
-
-#define PWR_ACTIVE                             0
-#define PWR_SAVE                               1
-#define PWR_TX_IDLE_CYCLE                      6
-
-/* bPreambleMode and bSlotTimeMode */
-#define AUTO_MODE                              0
-#define LONG_MODE                              1
-
-/* Region definition */
-#define REGION_AUTO                            0xff
-#define REGION_UNKNOWN                         0
-#define REGION_EUROPE                          1       /* ETSI */
-#define REGION_JAPAN                           2       /* MKK */
-#define REGION_USA                             3       /* FCC */
-#define        REGION_FRANCE                           4       /* FRANCE */
-#define REGION_SPAIN                           5       /* SPAIN */
-#define REGION_ISRAEL                          6       /* ISRAEL */
-
-#define MAX_BSS_DESCRIPT_ELEMENT               32
-#define MAX_PMKID_CandidateList                        16
-
-/*
- * High byte : Event number,  low byte : reason
- * Event definition
- * -- SME/MLME event
- */
-#define EVENT_RCV_DEAUTH                       0x0100
-#define EVENT_JOIN_FAIL                                0x0200
-#define EVENT_AUTH_FAIL                                0x0300
-#define EVENT_ASSOC_FAIL                       0x0400
-#define EVENT_LOST_SIGNAL                      0x0500
-#define EVENT_BSS_DESCRIPT_LACK                        0x0600
-#define EVENT_COUNTERMEASURE                   0x0700
-#define EVENT_JOIN_FILTER                      0x0800
-/* -- TX/RX event */
-#define EVENT_RX_BUFF_UNAVAILABLE              0x4100
-
-#define EVENT_CONNECT                          0x8100
-#define EVENT_DISCONNECT                       0x8200
-#define EVENT_SCAN_REQ                         0x8300
-
-/* Reason of Event */
-#define EVENT_REASON_FILTER_BASIC_RATE         0x0001
-#define EVENT_REASON_FILTER_PRIVACY            0x0002
-#define EVENT_REASON_FILTER_AUTH_MODE          0x0003
-#define EVENT_REASON_TIMEOUT                   0x00ff
-
-/* Due to[E id][Length][OUI][Data] may be 257 bytes */
-#define MAX_IE_APPEND_SIZE                     (256 + 4)
-
-struct chan_info {
-       u8      band;
-       u8      ChanNo;
-};
-
-struct radio_off {
-       u8      boHwRadioOff;
-       u8      boSwRadioOff;
-};
-
-struct wb_local_para {
-       /* read from EPROM, manufacture set for each NetCard */
-       u8      PermanentAddress[MAC_ADDR_LENGTH + 2];
-       /* the driver will use this one actually. */
-       u8      ThisMacAddress[MAC_ADDR_LENGTH + 2];
-       u32     MTUsize;        /* Ind to Uplayer, Max transmission unit size */
-       u8      region_INF;     /* region setting from INF */
-       u8      region;         /* real region setting of the device */
-       u8      Reserved_1[2];
-
-       /* power-save variables */
-       u8      iPowerSaveMode; /* 0 indicates on, 1 indicates off */
-       u8      ATIMmode;
-       u8      ExcludeUnencrypted;
-       /* Unit time count for the decision to enter PS mode */
-       u16     CheckCountForPS;
-       u8      boHasTxActivity;/* tx activity has occurred */
-       u8      boMacPsValid;   /* Power save mode obtained
-                                * from H/W is valid or not
-                                */
-
-       /* Rate */
-       u8      TxRateMode; /*
-                            * Initial, input from Registry,
-                            * may be updated by GUI
-                            * Tx Rate Mode: auto(DTO on), max, 1M, 2M, ..
-                            */
-       u8      CurrentTxRate;          /* The current Tx rate */
-       u8      CurrentTxRateForMng;    /*
-                                        * The current Tx rate for management
-                                        * frames. It will be decided before
-                                        * connection succeeds.
-                                        */
-       u8      CurrentTxFallbackRate;
-
-       /* for Rate handler */
-       u8      BRateSet[32];           /* basic rate set */
-       u8      SRateSet[32];           /* support rate set */
-
-       u8      NumOfBRate;
-       u8      NumOfSRate;
-       u8      NumOfDsssRateInSRate;   /* number of DSSS rates in
-                                        * supported rate set
-                                        */
-       u8      reserved1;
-
-       u32     dwBasicRateBitmap;      /* bit map of basic rates */
-
-       u32     dwSupportRateBitmap;    /* bit map of all support rates
-                                        * including basic and operational
-                                        * rates
-                                        */
-
-
-       /* For SME/MLME handler */
-
-       u16     wOldSTAindex;           /* valid when boHandover=TRUE,
-                                        * store old connected STA index
-                                        */
-       u16     wConnectedSTAindex;     /* Index of peerly connected AP or
-                                        * IBSS in the descriptionset.
-                                        */
-       u16     Association_ID;         /* The Association ID in the
-                                        * (Re)Association Response frame.
-                                        */
-       u16     ListenInterval;         /* The listen interval when SME invoking
-                                        * MLME_ (Re)Associate_Request().
-                                        */
-
-       struct  radio_off RadioOffStatus;
-       u8      Reserved0[2];
-       u8      boMsRadioOff;           /* Ndis demands to be true when set
-                                        * Disassoc. OID and be false when
-                                        * set SSID OID.
-                                        */
-       u8      bAntennaNo;             /* which antenna */
-       u8      bConnectFlag;           /* the connect status flag for
-                                        * roaming task
-                                        */
-
-       u8      RoamStatus;
-       u8      reserved7[3];
-
-       struct  chan_info CurrentChan;  /* Current channel no. and channel band.
-                                        * It may be changed by scanning.
-                                        */
-       u8      boHandover;             /* Roaming, Handover to other AP. */
-       u8      boCCAbusy;
-
-       u16     CWMax;                  /* It may not be the real value
-                                        * that H/W used
-                                        */
-       u8      CWMin;                  /* 255: set according to 802.11 spec. */
-       u8      reserved2;
-
-       /* 11G: */
-       u8      bMacOperationMode;      /* operation in 802.11b or 802.11g */
-       u8      bSlotTimeMode;          /* AUTO, s32 */
-       u8      bPreambleMode;          /* AUTO, s32 */
-       u8      boNonERPpresent;
-
-       u8      boProtectMechanism;     /* H/W will take the necessary action
-                                        * based on this variable
-                                        */
-       u8      boShortPreamble;        /* Same here */
-       u8      boShortSlotTime;        /* Same here */
-       u8      reserved_3;
-
-       u32     RSN_IE_Bitmap;
-       u32     RSN_OUI_Type;
-
-       /* For the BSSID */
-       u8      HwBssid[MAC_ADDR_LENGTH + 2];
-       u32     HwBssidValid;
-
-       /* For scan list */
-       u8      BssListCount;           /* Total count of valid
-                                        * descriptor indexes
-                                        */
-       u8      boReceiveUncorrectInfo; /* important settings in beacon/probe
-                                        * resp. have been changed
-                                        */
-       u8      NoOfJoinerInIbss;
-       u8      reserved_4;
-
-       /* Store the valid descriptor indexes obtained from scannings */
-       u8      BssListIndex[(MAX_BSS_DESCRIPT_ELEMENT + 3) & ~0x03];
-       /*
-        * Save the BssDescriptor index in this IBSS.
-        * The index 0 is local descriptor (psLOCAL->wConnectedSTAindex).
-        * If CONNECTED : NoOfJoinerInIbss >= 2
-        * else         : NoOfJoinerInIbss <= 1
-        */
-       u8      JoinerInIbss[(MAX_BSS_DESCRIPT_ELEMENT + 3) & ~0x03];
-
-       /* General Statistics, count at Rx_handler or
-        * Tx_callback interrupt handler
-        */
-       u64     GS_XMIT_OK;             /* Good Frames Transmitted */
-       u64     GS_RCV_OK;              /* Good Frames Received */
-       u32     GS_RCV_ERROR;           /* Frames received with crc error */
-       u32     GS_XMIT_ERROR;          /* Bad Frames Transmitted */
-       u32     GS_RCV_NO_BUFFER;       /* Receive Buffer underrun */
-       u32     GS_XMIT_ONE_COLLISION;  /* one collision */
-       u32     GS_XMIT_MORE_COLLISIONS;/* more collisions */
-
-       /*
-        * ================================================================
-        * Statistics (no matter whether it had done successfully) -wkchen
-        * ================================================================
-        */
-       u32     _NumRxMSDU;
-       u32     _NumTxMSDU;
-       u32     _dot11WEPExcludedCount;
-       u32     _dot11WEPUndecryptableCount;
-       u32     _dot11FrameDuplicateCount;
-
-       struct  chan_info IbssChanSetting;      /* 2B. Start IBSS Channel
-                                                * setting by registry or
-                                                * WWU.
-                                                */
-       u8      reserved_5[2];          /* It may not be used after
-                                        * considering RF type, region
-                                        * and modulation type.
-                                        */
-
-       u8      reserved_6[2];          /* two variables are for wep
-                                        * key error detection
-                                        */
-       u32     bWepKeyError;
-       u32     bToSelfPacketReceived;
-       u32     WepKeyDetectTimerCount;
-
-       u16     SignalLostTh;
-       u16     SignalRoamTh;
-
-       u8              IE_Append_data[MAX_IE_APPEND_SIZE];
-       u16             IE_Append_size;
-       u16             reserved_7;
-};
-
-#endif
diff --git a/drivers/staging/winbond/mac_structures.h b/drivers/staging/winbond/mac_structures.h
deleted file mode 100644 (file)
index 76c63c7..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-// MAC_Structures.h
-//
-// This file contains the definitions and data structures used by SW-MAC.
-//
-// Revision Histoy
-//=================
-// 0.1      2002        UN00
-// 0.2      20021004    PD43 CCLiu6
-//          20021018    PD43 CCLiu6
-//                      Add enum_TxRate type
-//                      Modify enum_STAState type
-// 0.3      20021023    PE23 CYLiu update MAC session struct
-//          20021108
-//          20021122    PD43 Austin
-//                      Deleted some unused.
-//          20021129    PD43 Austin
-//                     20030617        increase the 802.11g definition
-//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
-
-#ifndef _MAC_Structures_H_
-#define _MAC_Structures_H_
-
-#define MAC_ADDR_LENGTH                     6
-
-/* ========================================================
-// 802.11 Frame define
-//----- */
-#define DOT_11_MAC_HEADER_SIZE         24
-#define DOT_11_SNAP_SIZE                       6
-#define DOT_11_DURATION_OFFSET         2
-/* Sequence control offset */
-#define DOT_11_SEQUENCE_OFFSET         22
-/* The start offset of 802.11 Frame// */
-#define DOT_11_TYPE_OFFSET                     30
-#define DOT_11_DATA_OFFSET          24
-#define DOT_11_DA_OFFSET                       4
-
-#define MAX_ETHERNET_PACKET_SIZE               1514
-
-/* -----  management : Type of Bits (2, 3) and Subtype of Bits (4, 5, 6, 7) */
-#define MAC_SUBTYPE_MNGMNT_ASSOC_REQUEST    0x00
-#define MAC_SUBTYPE_MNGMNT_ASSOC_RESPONSE   0x10
-#define MAC_SUBTYPE_MNGMNT_REASSOC_REQUEST  0x20
-#define MAC_SUBTYPE_MNGMNT_REASSOC_RESPONSE 0x30
-#define MAC_SUBTYPE_MNGMNT_PROBE_REQUEST    0x40
-#define MAC_SUBTYPE_MNGMNT_PROBE_RESPONSE   0x50
-#define MAC_SUBTYPE_MNGMNT_BEACON           0x80
-#define MAC_SUBTYPE_MNGMNT_ATIM             0x90
-#define MAC_SUBTYPE_MNGMNT_DISASSOCIATION   0xA0
-#define MAC_SUBTYPE_MNGMNT_AUTHENTICATION   0xB0
-#define MAC_SUBTYPE_MNGMNT_DEAUTHENTICATION 0xC0
-
-#define RATE_AUTO                                      0
-#define RATE_1M                                                2
-#define RATE_2M                                                4
-#define RATE_5dot5M                                    11
-#define RATE_6M                                                12
-#define RATE_9M                                                18
-#define RATE_11M                                       22
-#define RATE_12M                                       24
-#define RATE_18M                                       36
-#define RATE_22M                                       44
-#define RATE_24M                                       48
-#define RATE_33M                                       66
-#define RATE_36M                                       72
-#define RATE_48M                                       96
-#define RATE_54M                                       108
-#define RATE_MAX                                       255
-
-#endif /* _MAC_Structure_H_ */
diff --git a/drivers/staging/winbond/mds.c b/drivers/staging/winbond/mds.c
deleted file mode 100644 (file)
index aef0855..0000000
+++ /dev/null
@@ -1,650 +0,0 @@
-#include "mds_f.h"
-#include "mto.h"
-#include "wbhal.h"
-#include "wb35tx_f.h"
-
-unsigned char
-Mds_initial(struct wbsoft_priv *adapter)
-{
-       struct wb35_mds *pMds = &adapter->Mds;
-
-       pMds->TxPause = false;
-       pMds->TxRTSThreshold = DEFAULT_RTSThreshold;
-       pMds->TxFragmentThreshold = DEFAULT_FRAGMENT_THRESHOLD;
-
-       return hal_get_tx_buffer(&adapter->sHwData, &pMds->pTxBuffer);
-}
-
-static void Mds_DurationSet(struct wbsoft_priv *adapter,
-                           struct wb35_descriptor *pDes, u8 *buffer)
-{
-       struct T00_descriptor *pT00;
-       struct T01_descriptor *pT01;
-       u16     Duration, NextBodyLen, OffsetSize;
-       u8      Rate, i;
-       unsigned char   CTS_on = false, RTS_on = false;
-       struct T00_descriptor *pNextT00;
-       u16 BodyLen = 0;
-       unsigned char boGroupAddr = false;
-
-       OffsetSize = pDes->FragmentThreshold + 32 + 3;
-       OffsetSize &= ~0x03;
-       Rate = pDes->TxRate >> 1;
-       if (!Rate)
-               Rate = 1;
-
-       pT00 = (struct T00_descriptor *)buffer;
-       pT01 = (struct T01_descriptor *)(buffer+4);
-       pNextT00 = (struct T00_descriptor *)(buffer+OffsetSize);
-
-       if (buffer[DOT_11_DA_OFFSET+8] & 0x1) /* +8 for USB hdr */
-               boGroupAddr = true;
-
-       /******************************************
-        * Set RTS/CTS mechanism
-        ******************************************/
-       if (!boGroupAddr) {
-               /* NOTE : If the protection mode is enabled and the MSDU will
-                *        be fragmented, the tx rates of MPDUs will all be DSSS
-                *        rates. So it will not use CTS-to-self in this case.
-                *        CTS-To-self will only be used when without
-                *        fragmentation. -- 20050112 */
-               BodyLen = (u16)pT00->T00_frame_length;  /* include 802.11 header */
-               BodyLen += 4;   /* CRC */
-
-               if (BodyLen >= CURRENT_RTS_THRESHOLD)
-                       RTS_on = true; /* Using RTS */
-               else {
-                       if (pT01->T01_modulation_type) { /* Is using OFDM */
-                               /* Is using protect */
-                               if (CURRENT_PROTECT_MECHANISM)
-                                       CTS_on = true; /* Using CTS */
-                       }
-               }
-       }
-
-       if (RTS_on || CTS_on) {
-               if (pT01->T01_modulation_type) { /* Is using OFDM */
-                       /* CTS duration
-                        *  2 SIFS + DATA transmit time + 1 ACK
-                        *  ACK Rate : 24 Mega bps
-                        *  ACK frame length = 14 bytes */
-                       Duration = 2*DEFAULT_SIFSTIME +
-                               2*PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION +
-                               ((BodyLen*8 + 22 + Rate*4 - 1)/(Rate*4))*Tsym +
-                               ((112 + 22 + 95)/96)*Tsym;
-               } else  { /* DSSS */
-                       /* CTS duration
-                        *  2 SIFS + DATA transmit time + 1 ACK
-                        *  Rate : ?? Mega bps
-                        *  ACK frame length = 14 bytes */
-                       if (pT01->T01_plcp_header_length) /* long preamble */
-                               Duration = LONG_PREAMBLE_PLUS_PLCPHEADER_TIME*2;
-                       else
-                               Duration = SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME*2;
-
-                       Duration += (((BodyLen + 14)*8 + Rate-1) / Rate +
-                                               DEFAULT_SIFSTIME*2);
-               }
-
-               if (RTS_on) {
-                       if (pT01->T01_modulation_type) { /* Is using OFDM */
-                               /* CTS + 1 SIFS + CTS duration
-                                * CTS Rate : 24 Mega bps
-                                * CTS frame length = 14 bytes */
-                               Duration += (DEFAULT_SIFSTIME +
-                                       PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION +
-                                       ((112 + 22 + 95)/96)*Tsym);
-                       } else {
-                               /* CTS + 1 SIFS + CTS duration
-                                * CTS Rate : ?? Mega bps
-                                * CTS frame length = 14 bytes
-                                */
-                               /* long preamble */
-                               if (pT01->T01_plcp_header_length)
-                                       Duration += LONG_PREAMBLE_PLUS_PLCPHEADER_TIME;
-                               else
-                                       Duration += SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME;
-
-                               Duration += (((112 + Rate-1) / Rate) +
-                                            DEFAULT_SIFSTIME);
-                       }
-               }
-
-               /* Set the value into USB descriptor */
-               pT01->T01_add_rts = RTS_on ? 1 : 0;
-               pT01->T01_add_cts = CTS_on ? 1 : 0;
-               pT01->T01_rts_cts_duration = Duration;
-       }
-
-       /******************************************
-        * Fill the more fragment descriptor
-        ******************************************/
-       if (boGroupAddr)
-               Duration = 0;
-       else {
-               for (i = pDes->FragmentCount-1; i > 0; i--) {
-                       NextBodyLen = (u16)pNextT00->T00_frame_length;
-                       NextBodyLen += 4;       /* CRC */
-
-                       if (pT01->T01_modulation_type) {
-                               /* OFDM
-                                *  data transmit time + 3 SIFS + 2 ACK
-                                *  Rate : ??Mega bps
-                                *  ACK frame length = 14 bytes, tx rate = 24M */
-                               Duration = PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION * 3;
-                               Duration += (((NextBodyLen*8 + 22 + Rate*4 - 1)
-                                            /(Rate*4)) * Tsym +
-                                            (((2*14)*8 + 22 + 95)/96)*Tsym +
-                                           DEFAULT_SIFSTIME*3);
-                       } else {
-                               /* DSSS
-                                *  data transmit time + 2 ACK + 3 SIFS
-                                *  Rate : ??Mega bps
-                                *  ACK frame length = 14 bytes
-                                * TODO : */
-                               if (pT01->T01_plcp_header_length) /* long preamble */
-                                       Duration = LONG_PREAMBLE_PLUS_PLCPHEADER_TIME*3;
-                               else
-                                       Duration = SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME*3;
-
-                               Duration += (((NextBodyLen + (2*14))*8
-                                            + Rate-1) / Rate +
-                                           DEFAULT_SIFSTIME*3);
-                       }
-                       /* 4 USHOR for skip 8B USB, 2USHORT=FC + Duration */
-                       ((u16 *)buffer)[5] = cpu_to_le16(Duration);
-
-                       /* ----20061009 add by anson's endian */
-                       pNextT00->value = cpu_to_le32(pNextT00->value);
-                       pT01->value = cpu_to_le32(pT01->value);
-                       /* ----end 20061009 add by anson's endian */
-
-                       buffer += OffsetSize;
-                       pT01 = (struct T01_descriptor *)(buffer+4);
-                       /* The last fragment will not have the next fragment */
-                       if (i != 1)
-                               pNextT00 = (struct T00_descriptor *)(buffer+OffsetSize);
-               }
-
-               /*******************************************
-                * Fill the last fragment descriptor
-                *******************************************/
-               if (pT01->T01_modulation_type) {
-                       /* OFDM
-                        *  1 SIFS + 1 ACK
-                        *  Rate : 24 Mega bps
-                        * ACK frame length = 14 bytes */
-                       Duration = PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION;
-                       /* The Tx rate of ACK use 24M */
-                       Duration += (((112 + 22 + 95)/96)*Tsym +
-                                   DEFAULT_SIFSTIME);
-               } else {
-                       /* DSSS
-                        * 1 ACK + 1 SIFS
-                        * Rate : ?? Mega bps
-                        * ACK frame length = 14 bytes(112 bits) */
-                       if (pT01->T01_plcp_header_length) /* long preamble */
-                               Duration = LONG_PREAMBLE_PLUS_PLCPHEADER_TIME;
-                       else
-                               Duration = SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME;
-
-                       Duration += ((112 + Rate-1)/Rate + DEFAULT_SIFSTIME);
-               }
-       }
-
-       /* 4 USHOR for skip 8B USB, 2USHORT=FC + Duration */
-       ((u16 *)buffer)[5] = cpu_to_le16(Duration);
-       pT00->value = cpu_to_le32(pT00->value);
-       pT01->value = cpu_to_le32(pT01->value);
-       /* --end 20061009 add */
-
-}
-
-/* The function return the 4n size of usb pk */
-static u16 Mds_BodyCopy(struct wbsoft_priv *adapter,
-                       struct wb35_descriptor *pDes, u8 *TargetBuffer)
-{
-       struct T00_descriptor *pT00;
-       struct wb35_mds *pMds = &adapter->Mds;
-       u8      *buffer;
-       u8      *src_buffer;
-       u8      *pctmp;
-       u16     Size = 0;
-       u16     SizeLeft, CopySize, CopyLeft, stmp;
-       u8      buf_index, FragmentCount = 0;
-
-
-       /* Copy fragment body */
-       buffer = TargetBuffer; /* shift 8B usb + 24B 802.11 */
-       SizeLeft = pDes->buffer_total_size;
-       buf_index = pDes->buffer_start_index;
-
-       pT00 = (struct T00_descriptor *)buffer;
-       while (SizeLeft) {
-               pT00 = (struct T00_descriptor *)buffer;
-               CopySize = SizeLeft;
-               if (SizeLeft > pDes->FragmentThreshold) {
-                       CopySize = pDes->FragmentThreshold;
-                       /* Set USB length */
-                       pT00->T00_frame_length = 24 + CopySize;
-               } else  /* Set USB length */
-                       pT00->T00_frame_length = 24 + SizeLeft;
-
-               SizeLeft -= CopySize;
-
-               /* 1 Byte operation */
-               pctmp = (u8 *)(buffer + 8 + DOT_11_SEQUENCE_OFFSET);
-               *pctmp &= 0xf0;
-               *pctmp |= FragmentCount; /* 931130.5.m */
-               if (!FragmentCount)
-                       pT00->T00_first_mpdu = 1;
-
-               buffer += 32; /* 8B usb + 24B 802.11 header */
-               Size += 32;
-
-               /* Copy into buffer */
-               stmp = CopySize + 3;
-               stmp &= ~0x03; /* 4n Alignment */
-               Size += stmp; /* Current 4n offset of mpdu */
-
-               while (CopySize) {
-                       /* Copy body */
-                       src_buffer = pDes->buffer_address[buf_index];
-                       CopyLeft = CopySize;
-                       if (CopySize >= pDes->buffer_size[buf_index]) {
-                               CopyLeft = pDes->buffer_size[buf_index];
-
-                               /* Get the next buffer of descriptor */
-                               buf_index++;
-                               buf_index %= MAX_DESCRIPTOR_BUFFER_INDEX;
-                       } else {
-                               u8 *pctmp = pDes->buffer_address[buf_index];
-                               pctmp += CopySize;
-                               pDes->buffer_address[buf_index] = pctmp;
-                               pDes->buffer_size[buf_index] -= CopySize;
-                       }
-
-                       memcpy(buffer, src_buffer, CopyLeft);
-                       buffer += CopyLeft;
-                       CopySize -= CopyLeft;
-               }
-
-               /* 931130.5.n */
-               if (pMds->MicAdd) {
-                       if (!SizeLeft) {
-                               pMds->MicWriteAddress[pMds->MicWriteIndex] =
-                                       buffer - pMds->MicAdd;
-                               pMds->MicWriteSize[pMds->MicWriteIndex] =
-                                       pMds->MicAdd;
-                               pMds->MicAdd = 0;
-                       } else if (SizeLeft < 8) { /* 931130.5.p */
-                               pMds->MicAdd = SizeLeft;
-                               pMds->MicWriteAddress[pMds->MicWriteIndex] =
-                                       buffer - (8 - SizeLeft);
-                               pMds->MicWriteSize[pMds->MicWriteIndex] =
-                                       8 - SizeLeft;
-                               pMds->MicWriteIndex++;
-                       }
-               }
-
-               /* Does it need to generate the new header for next mpdu? */
-               if (SizeLeft) {
-                       /* Get the next 4n start address */
-                       buffer = TargetBuffer + Size;
-                       /* Copy 8B USB +24B 802.11 */
-                       memcpy(buffer, TargetBuffer, 32);
-                       pT00 = (struct T00_descriptor *)buffer;
-                       pT00->T00_first_mpdu = 0;
-               }
-
-               FragmentCount++;
-       }
-
-       pT00->T00_last_mpdu = 1;
-       pT00->T00_IsLastMpdu = 1;
-       buffer = (u8 *)pT00 + 8; /* +8 for USB hdr */
-       buffer[1] &= ~0x04; /* Clear more frag bit of 802.11 frame control */
-       /* Update the correct fragment number */
-       pDes->FragmentCount = FragmentCount;
-       return Size;
-}
-
-static void Mds_HeaderCopy(struct wbsoft_priv *adapter,
-                          struct wb35_descriptor *pDes, u8 *TargetBuffer)
-{
-       struct wb35_mds *pMds = &adapter->Mds;
-       u8      *src_buffer = pDes->buffer_address[0]; /* 931130.5.g */
-       struct T00_descriptor *pT00;
-       struct T01_descriptor *pT01;
-       u16     stmp;
-       u8      i, ctmp1, ctmp2, ctmpf;
-       u16     FragmentThreshold = CURRENT_FRAGMENT_THRESHOLD;
-
-
-       stmp = pDes->buffer_total_size;
-       /*
-        * Set USB header 8 byte
-        */
-       pT00 = (struct T00_descriptor *)TargetBuffer;
-       TargetBuffer += 4;
-       pT01 = (struct T01_descriptor *)TargetBuffer;
-       TargetBuffer += 4;
-
-       pT00->value = 0; /* Clear */
-       pT01->value = 0; /* Clear */
-
-       pT00->T00_tx_packet_id = pDes->Descriptor_ID; /* Set packet ID */
-       pT00->T00_header_length = 24; /* Set header length */
-       pT01->T01_retry_abort_enable = 1; /* 921013 931130.5.h */
-
-       /* Key ID setup */
-       pT01->T01_wep_id = 0;
-
-       FragmentThreshold = DEFAULT_FRAGMENT_THRESHOLD; /* Do not fragment */
-       /* Copy full data, the 1'st buffer contain all the data 931130.5.j */
-       /* Copy header */
-       memcpy(TargetBuffer, src_buffer, DOT_11_MAC_HEADER_SIZE);
-       pDes->buffer_address[0] = src_buffer + DOT_11_MAC_HEADER_SIZE;
-       pDes->buffer_total_size -= DOT_11_MAC_HEADER_SIZE;
-       pDes->buffer_size[0] = pDes->buffer_total_size;
-
-       /* Set fragment threshold */
-       FragmentThreshold -= (DOT_11_MAC_HEADER_SIZE + 4);
-       pDes->FragmentThreshold = FragmentThreshold;
-
-       /* Set more frag bit */
-       TargetBuffer[1] |= 0x04; /* Set more frag bit */
-
-       /*
-        * Set tx rate
-        */
-       stmp = *(u16 *)(TargetBuffer+30); /* 2n alignment address */
-
-       /* Use basic rate */
-       ctmp1 = ctmpf = CURRENT_TX_RATE_FOR_MNG;
-
-       pDes->TxRate = ctmp1;
-       pr_debug("Tx rate =%x\n", ctmp1);
-
-       pT01->T01_modulation_type = (ctmp1%3) ? 0 : 1;
-
-       for (i = 0; i < 2; i++) {
-               if (i == 1)
-                       ctmp1 = ctmpf;
-               /* backup the ta rate and fall back rate */
-               pMds->TxRate[pDes->Descriptor_ID][i] = ctmp1;
-
-               if (ctmp1 == 108)
-                       ctmp2 = 7;
-               else if (ctmp1 == 96)
-                       ctmp2 = 6; /* Rate convert for USB */
-               else if (ctmp1 == 72)
-                       ctmp2 = 5;
-               else if (ctmp1 == 48)
-                       ctmp2 = 4;
-               else if (ctmp1 == 36)
-                       ctmp2 = 3;
-               else if (ctmp1 == 24)
-                       ctmp2 = 2;
-               else if (ctmp1 == 18)
-                       ctmp2 = 1;
-               else if (ctmp1 == 12)
-                       ctmp2 = 0;
-               else if (ctmp1 == 22)
-                       ctmp2 = 3;
-               else if (ctmp1 == 11)
-                       ctmp2 = 2;
-               else if (ctmp1 == 4)
-                       ctmp2 = 1;
-               else
-                       ctmp2 = 0; /* if( ctmp1 == 2  ) or default */
-
-               if (i == 0)
-                       pT01->T01_transmit_rate = ctmp2;
-               else
-                       pT01->T01_fall_back_rate = ctmp2;
-       }
-
-       /*
-        * Set preamble type
-        */
-       /* RATE_1M */
-       if ((pT01->T01_modulation_type == 0) && (pT01->T01_transmit_rate == 0))
-               pDes->PreambleMode =  WLAN_PREAMBLE_TYPE_LONG;
-       else
-               pDes->PreambleMode =  CURRENT_PREAMBLE_MODE;
-       pT01->T01_plcp_header_length = pDes->PreambleMode; /* Set preamble */
-
-}
-
-static void MLME_GetNextPacket(struct wbsoft_priv *adapter,
-                              struct wb35_descriptor *desc)
-{
-       desc->InternalUsed = desc->buffer_start_index + desc->buffer_number;
-       desc->InternalUsed %= MAX_DESCRIPTOR_BUFFER_INDEX;
-       desc->buffer_address[desc->InternalUsed] = adapter->sMlmeFrame.pMMPDU;
-       desc->buffer_size[desc->InternalUsed] = adapter->sMlmeFrame.len;
-       desc->buffer_total_size += adapter->sMlmeFrame.len;
-       desc->buffer_number++;
-       desc->Type = adapter->sMlmeFrame.data_type;
-}
-
-static void MLMEfreeMMPDUBuffer(struct wbsoft_priv *adapter, s8 *pData)
-{
-       int i;
-
-       /* Reclaim the data buffer */
-       for (i = 0; i < MAX_NUM_TX_MMPDU; i++) {
-               if (pData == (s8 *)&(adapter->sMlmeFrame.TxMMPDU[i]))
-                       break;
-       }
-       if (adapter->sMlmeFrame.TxMMPDUInUse[i])
-               adapter->sMlmeFrame.TxMMPDUInUse[i] = false;
-       else  {
-               /* Something wrong
-                PD43 Add debug code here??? */
-       }
-}
-
-static void MLME_SendComplete(struct wbsoft_priv *adapter, u8 PacketID,
-                             unsigned char SendOK)
-{
-    /* Reclaim the data buffer */
-       adapter->sMlmeFrame.len = 0;
-       MLMEfreeMMPDUBuffer(adapter, adapter->sMlmeFrame.pMMPDU);
-
-       /* Return resource */
-       adapter->sMlmeFrame.is_in_used = PACKET_FREE_TO_USE;
-}
-
-void
-Mds_Tx(struct wbsoft_priv *adapter)
-{
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_mds *pMds = &adapter->Mds;
-       struct wb35_descriptor  TxDes;
-       struct wb35_descriptor *pTxDes = &TxDes;
-       u8      *XmitBufAddress;
-       u16     XmitBufSize, PacketSize, stmp, CurrentSize, FragmentThreshold;
-       u8      FillIndex, TxDesIndex, FragmentCount, FillCount;
-       unsigned char   BufferFilled = false;
-
-
-       if (pMds->TxPause)
-               return;
-       if (!hal_driver_init_OK(pHwData))
-               return;
-
-       /* Only one thread can be run here */
-       if (atomic_inc_return(&pMds->TxThreadCount) != 1)
-               goto cleanup;
-
-       /* Start to fill the data */
-       do {
-               FillIndex = pMds->TxFillIndex;
-               /* Is owned by software 0:Yes 1:No */
-               if (pMds->TxOwner[FillIndex]) {
-                       pr_debug("[Mds_Tx] Tx Owner is H/W.\n");
-                       break;
-               }
-
-               /* Get buffer */
-               XmitBufAddress = pMds->pTxBuffer + (MAX_USB_TX_BUFFER * FillIndex);
-               XmitBufSize = 0;
-               FillCount = 0;
-               do {
-                       PacketSize = adapter->sMlmeFrame.len;
-                       if (!PacketSize)
-                               break;
-
-                       /* For Check the buffer resource */
-                       FragmentThreshold = CURRENT_FRAGMENT_THRESHOLD;
-                       /* 931130.5.b */
-                       FragmentCount = PacketSize/FragmentThreshold + 1;
-                       /* 931130.5.c 8:MIC */
-                       stmp = PacketSize + FragmentCount*32 + 8;
-                       if ((XmitBufSize + stmp) >= MAX_USB_TX_BUFFER)
-                               break; /* buffer is not enough */
-
-                       /*
-                        * Start transmitting
-                        */
-                       BufferFilled = true;
-
-                       /* Leaves first u8 intact */
-                       memset((u8 *)pTxDes + 1, 0, sizeof(struct wb35_descriptor) - 1);
-
-                       TxDesIndex = pMds->TxDesIndex; /* Get the current ID */
-                       pTxDes->Descriptor_ID = TxDesIndex;
-                       /* Storing the information of source coming from */
-                       pMds->TxDesFrom[TxDesIndex] = 2;
-                       pMds->TxDesIndex++;
-                       pMds->TxDesIndex %= MAX_USB_TX_DESCRIPTOR;
-
-                       MLME_GetNextPacket(adapter, pTxDes);
-
-                       /*
-                        * Copy header. 8byte USB + 24byte 802.11Hdr.
-                        * Set TxRate, Preamble type
-                       */
-                       Mds_HeaderCopy(adapter, pTxDes, XmitBufAddress);
-
-                       /* For speed up Key setting */
-                       if (pTxDes->EapFix) {
-                               pr_debug("35: EPA 4th frame detected. Size = %d\n",
-                                                PacketSize);
-                               pHwData->IsKeyPreSet = 1;
-                       }
-
-                       /* Copy (fragment) frame body, and set USB, 802.11 hdr flag */
-                       CurrentSize = Mds_BodyCopy(adapter, pTxDes, XmitBufAddress);
-
-                       /* Set RTS/CTS and Normal duration field into buffer */
-                       Mds_DurationSet(adapter, pTxDes, XmitBufAddress);
-
-                       /* Shift to the next address */
-                       XmitBufSize += CurrentSize;
-                       XmitBufAddress += CurrentSize;
-
-                       /* Get packet to transmit completed,
-                        * 1:TESTSTA 2:MLME 3: Ndis data
-                       */
-                       MLME_SendComplete(adapter, 0, true);
-
-                       /* Software TSC count 20060214 */
-                       pMds->TxTsc++;
-                       if (pMds->TxTsc == 0)
-                               pMds->TxTsc_2++;
-
-                       FillCount++; /* 20060928 */
-               /*
-                * End of multiple MSDU copy loop.
-                * false = single
-                * true = multiple sending
-                */
-               } while (HAL_USB_MODE_BURST(pHwData));
-
-               /* Move to the next one, if necessary */
-               if (BufferFilled) {
-                       /* size setting */
-                       pMds->TxBufferSize[FillIndex] = XmitBufSize;
-
-                       /* 20060928 set Tx count */
-                       pMds->TxCountInBuffer[FillIndex] = FillCount;
-
-                       /* Set owner flag */
-                       pMds->TxOwner[FillIndex] = 1;
-
-                       pMds->TxFillIndex++;
-                       pMds->TxFillIndex %= MAX_USB_TX_BUFFER_NUMBER;
-                       BufferFilled = false;
-               } else
-                       break;
-
-               if (!PacketSize) /* No more pk for transmitting */
-                       break;
-
-       } while (true);
-
-       /*
-        * Start to send by lower module
-        */
-       if (!pHwData->IsKeyPreSet)
-               Wb35Tx_start(adapter);
-
-cleanup:
-               atomic_dec(&pMds->TxThreadCount);
-}
-
-void
-Mds_SendComplete(struct wbsoft_priv *adapter, struct T02_descriptor *pT02)
-{
-       struct wb35_mds *pMds = &adapter->Mds;
-       struct hw_data *pHwData = &adapter->sHwData;
-       u8      PacketId = (u8)pT02->T02_Tx_PktID;
-       unsigned char   SendOK = true;
-       u8      RetryCount, TxRate;
-
-       if (pT02->T02_IgnoreResult) /* Don't care about the result */
-               return;
-       if (pT02->T02_IsLastMpdu) {
-               /* TODO: DTO -- get the retry count and fragment count */
-               /* Tx rate */
-               TxRate = pMds->TxRate[PacketId][0];
-               RetryCount = (u8)pT02->T02_MPDU_Cnt;
-               if (pT02->value & FLAG_ERROR_TX_MASK) {
-                       SendOK = false;
-
-                       if (pT02->T02_transmit_abort || pT02->T02_out_of_MaxTxMSDULiftTime) {
-                               /* retry error */
-                               pHwData->dto_tx_retry_count += (RetryCount+1);
-                               /* [for tx debug] */
-                               if (RetryCount < 7)
-                                       pHwData->tx_retry_count[RetryCount] += RetryCount;
-                               else
-                                       pHwData->tx_retry_count[7] += RetryCount;
-                               pr_debug("dto_tx_retry_count =%d\n",
-                                               pHwData->dto_tx_retry_count);
-                               MTO_SetTxCount(adapter, TxRate, RetryCount);
-                       }
-                       pHwData->dto_tx_frag_count += (RetryCount+1);
-
-                       /* [for tx debug] */
-                       if (pT02->T02_transmit_abort_due_to_TBTT)
-                               pHwData->tx_TBTT_start_count++;
-                       if (pT02->T02_transmit_without_encryption_due_to_wep_on_false)
-                               pHwData->tx_WepOn_false_count++;
-                       if (pT02->T02_discard_due_to_null_wep_key)
-                               pHwData->tx_Null_key_count++;
-               } else {
-                       if (pT02->T02_effective_transmission_rate)
-                               pHwData->tx_ETR_count++;
-                       MTO_SetTxCount(adapter, TxRate, RetryCount);
-               }
-
-               /* Clear send result buffer */
-               pMds->TxResult[PacketId] = 0;
-       } else
-               pMds->TxResult[PacketId] |= ((u16)(pT02->value & 0x0ffff));
-}
diff --git a/drivers/staging/winbond/mds_f.h b/drivers/staging/winbond/mds_f.h
deleted file mode 100644 (file)
index 159b2eb..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef __WINBOND_MDS_F_H
-#define __WINBOND_MDS_F_H
-
-#include "wbhal.h"
-#include "core.h"
-
-unsigned char Mds_initial(struct wbsoft_priv *adapter);
-void Mds_Tx(struct wbsoft_priv *adapter);
-void Mds_SendComplete(struct wbsoft_priv *adapter, struct T02_descriptor *pt02);
-void Mds_MpduProcess(struct wbsoft_priv *adapter,
-                    struct wb35_descriptor *prxdes);
-
-/* For data frame sending */
-u16 MDS_GetPacketSize(struct wbsoft_priv *adapter);
-void MDS_GetNextPacket(struct wbsoft_priv *adapter,
-                      struct wb35_descriptor *pdes);
-void MDS_GetNextPacketComplete(struct wbsoft_priv *adapter,
-                              struct wb35_descriptor *pdes);
-void MDS_SendResult(struct wbsoft_priv *adapter, u8 packetid,
-                   unsigned char sendok);
-
-#endif
diff --git a/drivers/staging/winbond/mds_s.h b/drivers/staging/winbond/mds_s.h
deleted file mode 100644 (file)
index 2972d66..0000000
+++ /dev/null
@@ -1,130 +0,0 @@
-#ifndef __WINBOND_MDS_H
-#define __WINBOND_MDS_H
-
-#include <linux/timer.h>
-#include <linux/types.h>
-#include <linux/atomic.h>
-
-#include "localpara.h"
-#include "mac_structures.h"
-
-/* Preamble_Type, see <SFS-802.11G-MIB-203> */
-enum {
-       WLAN_PREAMBLE_TYPE_SHORT,
-       WLAN_PREAMBLE_TYPE_LONG,
-};
-
-/*****************************************************************************/
-#define MAX_USB_TX_DESCRIPTOR          15      /* IS89C35 ability */
-#define MAX_USB_TX_BUFFER_NUMBER       4       /* Virtual pre-buffer number of MAX_USB_TX_BUFFER */
-#define MAX_USB_TX_BUFFER              4096    /* IS89C35 ability 4n alignment is required for hardware */
-
-#define AUTH_REQUEST_PAIRWISE_ERROR    0       /* _F flag setting */
-#define AUTH_REQUEST_GROUP_ERROR       1       /* _F flag setting */
-
-#define CURRENT_FRAGMENT_THRESHOLD     (adapter->Mds.TxFragmentThreshold & ~0x1)
-#define CURRENT_PREAMBLE_MODE          (psLOCAL->boShortPreamble ? WLAN_PREAMBLE_TYPE_SHORT : WLAN_PREAMBLE_TYPE_LONG)
-#define CURRENT_TX_RATE_FOR_MNG                (adapter->sLocalPara.CurrentTxRateForMng)
-#define CURRENT_PROTECT_MECHANISM      (psLOCAL->boProtectMechanism)
-#define CURRENT_RTS_THRESHOLD          (adapter->Mds.TxRTSThreshold)
-
-#define MIB_GS_XMIT_OK_INC             (adapter->sLocalPara.GS_XMIT_OK++)
-#define MIB_GS_RCV_OK_INC              (adapter->sLocalPara.GS_RCV_OK++)
-#define MIB_GS_XMIT_ERROR_INC          (adapter->sLocalPara.GS_XMIT_ERROR)
-
-/* ---------- TX ----------------------------------- */
-#define ETHERNET_TX_DESCRIPTORS         MAX_USB_TX_BUFFER_NUMBER
-
-/* ---------- RX ----------------------------------- */
-#define ETHERNET_RX_DESCRIPTORS                8       /* It's not necessary to allocate more than 2 in sync indicate */
-
-/*
- * ================================================================
- * Configuration default value
- * ================================================================
- */
-#define DEFAULT_MULTICASTLISTMAX       32      /* standard */
-#define DEFAULT_TX_BURSTLENGTH         3       /* 32 Longwords */
-#define DEFAULT_RX_BURSTLENGTH         3       /* 32 Longwords */
-#define DEFAULT_TX_THRESHOLD           0       /* Full Packet */
-#define DEFAULT_RX_THRESHOLD           0       /* Full Packet */
-#define DEFAULT_MAXTXRATE              6       /* 11 Mbps (Long) */
-#define DEFAULT_CHANNEL                        3       /* Chennel 3 */
-#define DEFAULT_RTSThreshold           2347    /* Disable RTS */
-#define DEFAULT_PME                    0       /* Disable */
-#define DEFAULT_SIFSTIME               10
-#define DEFAULT_ACKTIME_1ML             304    /* 148 + 44 + 112 */
-#define DEFAULT_ACKTIME_2ML             248    /* 148 + 44 + 56 */
-#define DEFAULT_FRAGMENT_THRESHOLD      2346   /* No fragment */
-#define DEFAULT_PREAMBLE_LENGTH                72
-#define DEFAULT_PLCPHEADERTIME_LENGTH  24
-
-/*
- * ------------------------------------------------------------------------
- * 0.96 sec since time unit of the R03 for the current, W89C32 is about 60ns
- * instead of 960 ns. This shall be fixed in the future W89C32
- * -------------------------------------------------------------------------
- */
-#define DEFAULT_MAX_RECEIVE_TIME       16440000
-
-#define RX_BUF_SIZE                    2352    /* 600 - For 301 must be multiple of 8 */
-#define MAX_RX_DESCRIPTORS             18      /* Rx Layer 2 */
-
-/* For brand-new rx system */
-#define MDS_ID_IGNORE                  ETHERNET_RX_DESCRIPTORS
-
-/* For Tx Packet status classify */
-#define PACKET_FREE_TO_USE             0
-#define PACKET_COME_FROM_NDIS          0x08
-#define PACKET_COME_FROM_MLME          0x80
-#define PACKET_SEND_COMPLETE           0xff
-
-struct wb35_mds {
-       /* For Tx usage */
-       u8      TxOwner[((MAX_USB_TX_BUFFER_NUMBER + 3) & ~0x03)];
-       u8      *pTxBuffer;
-       u16     TxBufferSize[((MAX_USB_TX_BUFFER_NUMBER + 1) & ~0x01)];
-       u8      TxDesFrom[((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03)];/* 1: MLME 2: NDIS control 3: NDIS data */
-       u8      TxCountInBuffer[((MAX_USB_TX_DESCRIPTOR + 3) & ~0x03)];
-
-       u8      TxFillIndex;    /* the next index of TxBuffer can be used */
-       u8      TxDesIndex;     /* The next index of TxDes can be used */
-       u8      ScanTxPause;    /* data Tx pause because the scanning is progressing, but probe request Tx won't. */
-       u8      TxPause;        /*For pause the Mds_Tx modult */
-
-       atomic_t        TxThreadCount;  /* For thread counting */
-
-       u16     TxResult[((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01)];/* Collect the sending result of Mpdu */
-
-       u8      MicRedundant[8]; /* For tmp use */
-       u8      *MicWriteAddress[2]; /* The start address to fill the Mic, use 2 point due to Mic maybe fragment */
-
-       u16     MicWriteSize[2];
-
-       u16     MicAdd; /* If want to add the Mic, this variable equal to 8 */
-       u16     MicWriteIndex; /* The number of MicWriteAddress */
-
-       u8      TxRate[((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01)][2]; /* [0] current tx rate, [1] fall back rate */
-       u8      TxInfo[((MAX_USB_TX_DESCRIPTOR + 1) & ~0x01)]; /*Store information for callback function */
-
-       /* ---- for Tx Parameter */
-       u16     TxFragmentThreshold;    /* For frame body only */
-       u16     TxRTSThreshold;
-
-       u32     MaxReceiveTime;
-
-       /* depend on OS, */
-       u32     MulticastListNo;
-       u32     PacketFilter; /* Setting by NDIS, the current packet filter in use. */
-       u8      MulticastAddressesArray[DEFAULT_MULTICASTLISTMAX][MAC_ADDR_LENGTH];
-
-       /* COUNTERMEASURE */
-       u8      bMICfailCount;
-       u8      boCounterMeasureBlock;
-       u8      reserved_4[2];
-
-       u32     TxTsc;
-       u32     TxTsc_2;
-};
-
-#endif
diff --git a/drivers/staging/winbond/mto.c b/drivers/staging/winbond/mto.c
deleted file mode 100644 (file)
index b031ecd..0000000
+++ /dev/null
@@ -1,167 +0,0 @@
-/*
- * ============================================================================
- * MTO.C -
- *
- * Description:
- * MAC Throughput Optimization for W89C33 802.11g WLAN STA.
- *
- * The following MIB attributes or internal variables will be affected
- * while the MTO is being executed:
- *     dot11FragmentationThreshold,
- *     dot11RTSThreshold,
- *     transmission rate and PLCP preamble type,
- *     CCA mode,
- *     antenna diversity.
- *
- * Copyright (c) 2003 Winbond Electronics Corp. All rights reserved.
- * ============================================================================
- */
-
-#include "sme_api.h"
-#include "wbhal.h"
-#include "wb35reg_f.h"
-#include "core.h"
-#include "mto.h"
-
-/* Declare SQ3 to rate and fragmentation threshold table */
-/* Declare fragmentation threshold table */
-#define MTO_MAX_FRAG_TH_LEVELS         5
-#define MTO_MAX_DATA_RATE_LEVELS       12
-
-u16 MTO_Frag_Th_Tbl[MTO_MAX_FRAG_TH_LEVELS] = {
-       256, 384, 512, 768, 1536
-};
-
-/*
- * Declare data rate table:
- * The following table will be changed at anytime if the operation rate
- * supported by AP don't match the table
- */
-static u8 MTO_Data_Rate_Tbl[MTO_MAX_DATA_RATE_LEVELS] = {
-       2, 4, 11, 22, 12, 18, 24, 36, 48, 72, 96, 108
-};
-
-/* this record the retry rate at different data rate */
-static int retryrate_rec[MTO_MAX_DATA_RATE_LEVELS];
-
-static u8 boSparseTxTraffic;
-
-/*
- * ===========================================================================
- * MTO_Init --
- *
- *  Description:
- *    Initialize MTO parameters.
- *
- *    This function should be invoked during system initialization.
- *
- *  Arguments:
- *    adapter      - The pointer to the Miniport adapter Context
- * ===========================================================================
- */
-void MTO_Init(struct wbsoft_priv *adapter)
-{
-       int i;
-
-       MTO_PREAMBLE_TYPE() = MTO_PREAMBLE_SHORT;   /* for test */
-
-       MTO_CNT_ANT(0)                  = 0;
-       MTO_CNT_ANT(1)                  = 0;
-       MTO_SQ_ANT(0)                   = 0;
-       MTO_SQ_ANT(1)                   = 0;
-
-       MTO_AGING_TIMEOUT()             = 0;
-
-       /* The following parameters should be initialized to the values set by user */
-       MTO_RATE_LEVEL()                = 0;
-       MTO_FRAG_TH_LEVEL()             = 4;
-       MTO_RTS_THRESHOLD()             = MTO_FRAG_TH() + 1;
-       MTO_RTS_THRESHOLD_SETUP()       = MTO_FRAG_TH() + 1;
-       MTO_RATE_CHANGE_ENABLE()        = 1;
-       MTO_FRAG_CHANGE_ENABLE()        = 0;
-       MTO_POWER_CHANGE_ENABLE()       = 1;
-       MTO_PREAMBLE_CHANGE_ENABLE()    = 1;
-       MTO_RTS_CHANGE_ENABLE()         = 0;
-
-       for (i = 0; i < MTO_MAX_DATA_RATE_LEVELS; i++)
-               retryrate_rec[i] = 5;
-
-       MTO_TXFLOWCOUNT() = 0;
-       /* --------- DTO threshold parameters ------------- */
-       MTOPARA_PERIODIC_CHECK_CYCLE()          = 10;
-       MTOPARA_RSSI_TH_FOR_ANTDIV()            = 10;
-       MTOPARA_TXCOUNT_TH_FOR_CALC_RATE()      = 50;
-       MTOPARA_TXRATE_INC_TH()                 = 10;
-       MTOPARA_TXRATE_DEC_TH()                 = 30;
-       MTOPARA_TXRATE_EQ_TH()                  = 40;
-       MTOPARA_TXRATE_BACKOFF()                = 12;
-       MTOPARA_TXRETRYRATE_REDUCE()            = 6;
-       if (MTO_TXPOWER_FROM_EEPROM == 0xff) {
-               switch (MTO_HAL()->phy_type) {
-               case RF_AIROHA_2230:
-               case RF_AIROHA_2230S:
-                       MTOPARA_TXPOWER_INDEX() = 46; /* MAX-8 @@ Only for AL 2230 */
-                       break;
-               case RF_AIROHA_7230:
-                       MTOPARA_TXPOWER_INDEX() = 49;
-                       break;
-               case RF_WB_242:
-                       MTOPARA_TXPOWER_INDEX() = 10;
-                       break;
-               case RF_WB_242_1:
-                       MTOPARA_TXPOWER_INDEX() = 24;
-                       break;
-               }
-       } else { /* follow the setting from EEPROM */
-               MTOPARA_TXPOWER_INDEX() = MTO_TXPOWER_FROM_EEPROM;
-       }
-       RFSynthesizer_SetPowerIndex(MTO_HAL(), (u8) MTOPARA_TXPOWER_INDEX());
-       /* ------------------------------------------------ */
-
-       /* For RSSI turning -- Cancel load from EEPROM */
-       MTO_DATA().RSSI_high = -41;
-       MTO_DATA().RSSI_low = -60;
-}
-
-/* ===========================================================================
- * Description:
- *     If we enable DTO, we will ignore the tx count with different tx rate
- *     from DTO rate. This is because when we adjust DTO tx rate, there could
- *     be some packets in the tx queue with previous tx rate
- */
-
-void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 tx_rate, u8 index)
-{
-       MTO_TXFLOWCOUNT()++;
-       if ((MTO_ENABLE == 1) && (MTO_RATE_CHANGE_ENABLE() == 1)) {
-               if (tx_rate == MTO_DATA_RATE()) {
-                       if (index == 0) {
-                               if (boSparseTxTraffic)
-                                       MTO_HAL()->dto_tx_frag_count += MTOPARA_PERIODIC_CHECK_CYCLE();
-                               else
-                                       MTO_HAL()->dto_tx_frag_count += 1;
-                       } else {
-                               if (index < 8) {
-                                       MTO_HAL()->dto_tx_retry_count += index;
-                                       MTO_HAL()->dto_tx_frag_count += (index + 1);
-                               } else {
-                                       MTO_HAL()->dto_tx_retry_count += 7;
-                                       MTO_HAL()->dto_tx_frag_count += 7;
-                               }
-                       }
-               } else if (MTO_DATA_RATE() > 48 && tx_rate == 48) {
-                       /* for reducing data rate scheme, do not calculate different data rate. 3 is the reducing data rate at retry. */
-                       if (index < 3) {
-                               MTO_HAL()->dto_tx_retry_count += index;
-                               MTO_HAL()->dto_tx_frag_count += (index + 1);
-                       } else {
-                               MTO_HAL()->dto_tx_retry_count += 3;
-                               MTO_HAL()->dto_tx_frag_count += 3;
-                       }
-
-               }
-       } else {
-               MTO_HAL()->dto_tx_retry_count += index;
-               MTO_HAL()->dto_tx_frag_count += (index + 1);
-       }
-}
diff --git a/drivers/staging/winbond/mto.h b/drivers/staging/winbond/mto.h
deleted file mode 100644 (file)
index 8d41eed..0000000
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * ==================================================================
- * MTO.H
- *
- * Copyright (c) 2003 Winbond Electronics Corp. All rights reserved.
- * ==================================================================
- */
-#ifndef __MTO_H__
-#define __MTO_H__
-
-#include <linux/types.h>
-
-struct wbsoft_priv;
-
-#define MTO_PREAMBLE_LONG               WLAN_PREAMBLE_TYPE_LONG
-#define MTO_PREAMBLE_SHORT              WLAN_PREAMBLE_TYPE_SHORT
-
-/* Defines the parameters used in the MAC Throughput Optimization algorithm */
-struct wb35_mto_params {
-       u32     TxFlowCount; /* to judge what kind the tx flow(sparse or busy) is */
-
-       /* --------- DTO threshold parameters ------------- */
-       u16     DTO_PeriodicCheckCycle;
-       u16     DTO_RssiThForAntDiv;
-
-       u16     DTO_TxCountThForCalcNewRate;
-       u16     DTO_TxRateIncTh;
-
-       u16     DTO_TxRateDecTh;
-       u16     DTO_TxRateEqTh;
-
-       u16     DTO_TxRateBackOff;
-       u16     DTO_TxRetryRateReduce;
-
-       u16     DTO_TxPowerIndex;               /* 0 ~ 31 */
-       u16     reserved_1;
-       /* ------------------------------------------------ */
-
-       u8      PowerChangeEnable;
-       u8      AntDiversityEnable;
-       u8      CCA_Mode;
-       u8      CCA_Mode_Setup;
-       u8      Preamble_Type;
-       u8      PreambleChangeEnable;
-
-       u8      DataRateLevel;
-       u8      DataRateChangeEnable;
-       u8      FragThresholdLevel;
-       u8      FragThresholdChangeEnable;
-
-       u16     RTSThreshold;
-       u16     RTSThreshold_Setup;
-
-       u32     AvgIdleSlot;
-       u32     Pr_Interf;
-       u32     AvgGapBtwnInterf;
-
-       u8      RTSChangeEnable;
-       u8      Ant_sel;
-       u8      aging_timeout;
-       u8      reserved_2;
-
-       u32     Cnt_Ant[2];
-       u32     SQ_Ant[2];
-
-       u8      FallbackRateLevel;
-       u8      OfdmRateLevel;
-
-       u8      RatePolicy;
-       u8      reserved_3[3];
-
-       /* For RSSI turning */
-       s32     RSSI_high;
-       s32     RSSI_low;
-};
-
-
-#define MTO_DATA()             (adapter->sMtoPara)
-#define MTO_HAL()              (&adapter->sHwData)
-#define MTO_SET_PREAMBLE_TYPE(x) /* Turbo mark LM_PREAMBLE_TYPE(&pcore_data->lm_data) = (x) */
-#define MTO_ENABLE             (adapter->sLocalPara.TxRateMode == RATE_AUTO)
-#define MTO_TXPOWER_FROM_EEPROM        (adapter->sHwData.PowerIndexFromEEPROM)
-#define LOCAL_ANTENNA_NO()     (adapter->sLocalPara.bAntennaNo)
-#define LOCAL_IS_CONNECTED()   (adapter->sLocalPara.wConnectedSTAindex != 0)
-#define MTO_INITTXRATE_MODE    (adapter->sHwData.SoftwareSet&0x2) /* bit 1 */
-
-#define MTO_POWER_CHANGE_ENABLE()      MTO_DATA().PowerChangeEnable
-#define MTO_CCA_MODE()                 MTO_DATA().CCA_Mode
-#define MTO_CCA_MODE_SETUP()           MTO_DATA().CCA_Mode_Setup
-#define MTO_PREAMBLE_TYPE()            MTO_DATA().Preamble_Type
-#define MTO_PREAMBLE_CHANGE_ENABLE()   MTO_DATA().PreambleChangeEnable
-
-#define MTO_RATE_LEVEL()               MTO_DATA().DataRateLevel
-#define MTO_OFDM_RATE_LEVEL()          MTO_DATA().OfdmRateLevel
-#define MTO_RATE_CHANGE_ENABLE()       MTO_DATA().DataRateChangeEnable
-#define MTO_FRAG_TH_LEVEL()            MTO_DATA().FragThresholdLevel
-#define MTO_FRAG_CHANGE_ENABLE()       MTO_DATA().FragThresholdChangeEnable
-#define MTO_RTS_THRESHOLD()            MTO_DATA().RTSThreshold
-#define MTO_RTS_CHANGE_ENABLE()                MTO_DATA().RTSChangeEnable
-#define MTO_RTS_THRESHOLD_SETUP()      MTO_DATA().RTSThreshold_Setup
-
-#define MTO_AVG_IDLE_SLOT()            MTO_DATA().AvgIdleSlot
-#define MTO_PR_INTERF()                        MTO_DATA().Pr_Interf
-#define MTO_AVG_GAP_BTWN_INTERF()      MTO_DATA().AvgGapBtwnInterf
-
-#define MTO_CNT_ANT(x)                 MTO_DATA().Cnt_Ant[(x)]
-#define MTO_SQ_ANT(x)                  MTO_DATA().SQ_Ant[(x)]
-#define MTO_AGING_TIMEOUT()            MTO_DATA().aging_timeout
-
-#define MTO_TXFLOWCOUNT()              MTO_DATA().TxFlowCount
-
-/* --------- DTO threshold parameters ------------- */
-#define        MTOPARA_PERIODIC_CHECK_CYCLE()          MTO_DATA().DTO_PeriodicCheckCycle
-#define        MTOPARA_RSSI_TH_FOR_ANTDIV()            MTO_DATA().DTO_RssiThForAntDiv
-#define        MTOPARA_TXCOUNT_TH_FOR_CALC_RATE()      MTO_DATA().DTO_TxCountThForCalcNewRate
-#define        MTOPARA_TXRATE_INC_TH()                 MTO_DATA().DTO_TxRateIncTh
-#define        MTOPARA_TXRATE_DEC_TH()                 MTO_DATA().DTO_TxRateDecTh
-#define MTOPARA_TXRATE_EQ_TH()                 MTO_DATA().DTO_TxRateEqTh
-#define        MTOPARA_TXRATE_BACKOFF()                MTO_DATA().DTO_TxRateBackOff
-#define        MTOPARA_TXRETRYRATE_REDUCE()            MTO_DATA().DTO_TxRetryRateReduce
-#define MTOPARA_TXPOWER_INDEX()                        MTO_DATA().DTO_TxPowerIndex
-/* ------------------------------------------------ */
-
-
-extern u16 MTO_Frag_Th_Tbl[];
-
-#define MTO_DATA_RATE()                        MTO_Data_Rate_Tbl[MTO_RATE_LEVEL()]
-#define MTO_FRAG_TH()                  MTO_Frag_Th_Tbl[MTO_FRAG_TH_LEVEL()]
-
-void MTO_Init(struct wbsoft_priv *);
-void MTO_SetTxCount(struct wbsoft_priv *adapter, u8 t0, u8 index);
-
-#endif /* __MTO_H__ */
-
diff --git a/drivers/staging/winbond/phy_calibration.c b/drivers/staging/winbond/phy_calibration.c
deleted file mode 100644 (file)
index 8aecced..0000000
+++ /dev/null
@@ -1,1317 +0,0 @@
-/*
- * phy_302_calibration.c
- *
- * Copyright (C) 2002, 2005  Winbond Electronics Corp.
- *
- * modification history
- * ---------------------------------------------------------------------------
- * 0.01.001, 2003-04-16, Kevin      created
- *
- */
-
-/****************** INCLUDE FILES SECTION ***********************************/
-#include "phy_calibration.h"
-#include "wbhal.h"
-#include "wb35reg_f.h"
-#include "core.h"
-
-
-/****************** DEBUG CONSTANT AND MACRO SECTION ************************/
-
-/****************** LOCAL CONSTANT AND MACRO SECTION ************************/
-#define LOOP_TIMES      20
-#define US              1000/* MICROSECOND*/
-
-#define AG_CONST        0.6072529350
-#define FIXED(X)        ((s32)((X) * 32768.0))
-#define DEG2RAD(X)      (0.017453 * (X))
-
-static const s32 Angles[] = {
-       FIXED(DEG2RAD(45.0)),     FIXED(DEG2RAD(26.565)),
-       FIXED(DEG2RAD(14.0362)),  FIXED(DEG2RAD(7.12502)),
-       FIXED(DEG2RAD(3.57633)),  FIXED(DEG2RAD(1.78991)),
-       FIXED(DEG2RAD(0.895174)), FIXED(DEG2RAD(0.447614)),
-       FIXED(DEG2RAD(0.223811)), FIXED(DEG2RAD(0.111906)),
-       FIXED(DEG2RAD(0.055953)), FIXED(DEG2RAD(0.027977))
-};
-
-/****************** LOCAL FUNCTION DECLARATION SECTION **********************/
-
-/*
- * void    _phy_rf_write_delay(struct hw_data *phw_data);
- * void    phy_init_rf(struct hw_data *phw_data);
- */
-
-/****************** FUNCTION DEFINITION SECTION *****************************/
-
-static s32 _s13_to_s32(u32 data)
-{
-       u32     val;
-
-       val = (data & 0x0FFF);
-
-       if ((data & BIT(12)) != 0)
-               val |= 0xFFFFF000;
-
-       return (s32) val;
-}
-
-/****************************************************************************/
-static s32 _s4_to_s32(u32 data)
-{
-       s32     val;
-
-       val = (data & 0x0007);
-
-       if ((data & BIT(3)) != 0)
-               val |= 0xFFFFFFF8;
-
-       return val;
-}
-
-static u32 _s32_to_s4(s32 data)
-{
-       u32     val;
-
-       if (data > 7)
-               data = 7;
-       else if (data < -8)
-               data = -8;
-
-       val = data & 0x000F;
-
-       return val;
-}
-
-/****************************************************************************/
-static s32 _s5_to_s32(u32 data)
-{
-       s32     val;
-
-       val = (data & 0x000F);
-
-       if ((data & BIT(4)) != 0)
-               val |= 0xFFFFFFF0;
-
-       return val;
-}
-
-static u32 _s32_to_s5(s32 data)
-{
-       u32     val;
-
-       if (data > 15)
-               data = 15;
-       else if (data < -16)
-               data = -16;
-
-       val = data & 0x001F;
-
-       return val;
-}
-
-/****************************************************************************/
-static s32 _s6_to_s32(u32 data)
-{
-       s32     val;
-
-       val = (data & 0x001F);
-
-       if ((data & BIT(5)) != 0)
-               val |= 0xFFFFFFE0;
-
-       return val;
-}
-
-static u32 _s32_to_s6(s32 data)
-{
-       u32     val;
-
-       if (data > 31)
-               data = 31;
-       else if (data < -32)
-               data = -32;
-
-       val = data & 0x003F;
-
-       return val;
-}
-
-/****************************************************************************/
-static s32 _floor(s32 n)
-{
-       if (n > 0)
-               n += 5;
-       else
-               n -= 5;
-
-       return n/10;
-}
-
-/****************************************************************************/
-/*
- * The following code is sqare-root function.
- * sqsum is the input and the output is sq_rt;
- * The maximum of sqsum = 2^27 -1;
- */
-static u32 _sqrt(u32 sqsum)
-{
-       u32     sq_rt;
-
-       int     g0, g1, g2, g3, g4;
-       int     seed;
-       int     next;
-       int     step;
-
-       g4 =  sqsum / 100000000;
-       g3 = (sqsum - g4*100000000) / 1000000;
-       g2 = (sqsum - g4*100000000 - g3*1000000) / 10000;
-       g1 = (sqsum - g4*100000000 - g3*1000000 - g2*10000) / 100;
-       g0 = (sqsum - g4*100000000 - g3*1000000 - g2*10000 - g1*100);
-
-       next = g4;
-       step = 0;
-       seed = 0;
-       while (((seed+1)*(step+1)) <= next) {
-               step++;
-               seed++;
-       }
-
-       sq_rt = seed * 10000;
-       next = (next-(seed*step))*100 + g3;
-
-       step = 0;
-       seed = 2 * seed * 10;
-       while (((seed+1)*(step+1)) <= next) {
-               step++;
-               seed++;
-       }
-
-       sq_rt = sq_rt + step * 1000;
-       next = (next - seed * step) * 100 + g2;
-       seed = (seed + step) * 10;
-       step = 0;
-       while (((seed+1)*(step+1)) <= next) {
-               step++;
-               seed++;
-       }
-
-       sq_rt = sq_rt + step * 100;
-       next = (next - seed * step) * 100 + g1;
-       seed = (seed + step) * 10;
-       step = 0;
-
-       while (((seed+1)*(step+1)) <= next) {
-               step++;
-               seed++;
-       }
-
-       sq_rt = sq_rt + step * 10;
-       next = (next - seed * step) * 100 + g0;
-       seed = (seed + step) * 10;
-       step = 0;
-
-       while (((seed+1)*(step+1)) <= next) {
-               step++;
-               seed++;
-       }
-
-       sq_rt = sq_rt + step;
-
-       return sq_rt;
-}
-
-/****************************************************************************/
-static void _sin_cos(s32 angle, s32 *sin, s32 *cos)
-{
-       s32 X, Y, TargetAngle, CurrAngle;
-       unsigned    Step;
-
-       X = FIXED(AG_CONST);      /* AG_CONST * cos(0) */
-       Y = 0;                    /* AG_CONST * sin(0) */
-       TargetAngle = abs(angle);
-       CurrAngle = 0;
-
-       for (Step = 0; Step < 12; Step++) {
-               s32 NewX;
-
-               if (TargetAngle > CurrAngle) {
-                       NewX = X - (Y >> Step);
-                       Y = (X >> Step) + Y;
-                       X = NewX;
-                       CurrAngle += Angles[Step];
-               } else {
-                       NewX = X + (Y >> Step);
-                       Y = -(X >> Step) + Y;
-                       X = NewX;
-                       CurrAngle -= Angles[Step];
-               }
-       }
-
-       if (angle > 0) {
-               *cos = X;
-               *sin = Y;
-       } else {
-               *cos = X;
-               *sin = -Y;
-       }
-}
-
-static unsigned char hal_get_dxx_reg(struct hw_data *pHwData, u16 number,
-                                    u32 *pValue)
-{
-       if (number < 0x1000)
-               number += 0x1000;
-       return Wb35Reg_ReadSync(pHwData, number, pValue);
-}
-#define hw_get_dxx_reg(_A, _B, _C) hal_get_dxx_reg(_A, _B, (u32 *)_C)
-
-static unsigned char hal_set_dxx_reg(struct hw_data *pHwData, u16 number,
-                                    u32 value)
-{
-       unsigned char ret;
-
-       if (number < 0x1000)
-               number += 0x1000;
-       ret = Wb35Reg_WriteSync(pHwData, number, value);
-       return ret;
-}
-#define hw_set_dxx_reg(_A, _B, _C) hal_set_dxx_reg(_A, _B, (u32)_C)
-
-
-static void _reset_rx_cal(struct hw_data *phw_data)
-{
-       u32     val;
-
-       hw_get_dxx_reg(phw_data, 0x54, &val);
-
-       if (phw_data->revision == 0x2002) /* 1st-cut */
-               val &= 0xFFFF0000;
-       else /* 2nd-cut */
-               val &= 0x000003FF;
-
-       hw_set_dxx_reg(phw_data, 0x54, val);
-}
-
-
-/**************for winbond calibration*********/
-
-
-
-/**********************************************/
-static void _rxadc_dc_offset_cancellation_winbond(struct hw_data *phw_data, u32 frequency)
-{
-       u32     reg_agc_ctrl3;
-       u32     reg_a_acq_ctrl;
-       u32     reg_b_acq_ctrl;
-       u32     val;
-
-       PHY_DEBUG(("[CAL] -> [1]_rxadc_dc_offset_cancellation()\n"));
-       phy_init_rf(phw_data);
-
-       /* set calibration channel */
-       if ((RF_WB_242 == phw_data->phy_type) ||
-               (RF_WB_242_1 == phw_data->phy_type)) /* 20060619.5 Add */{
-               if ((frequency >= 2412) && (frequency <= 2484)) {
-                       /* w89rf242 change frequency to 2390Mhz */
-                       PHY_DEBUG(("[CAL] W89RF242/11G/Channel=2390Mhz\n"));
-                       phy_set_rf_data(phw_data, 3, (3<<24)|0x025586);
-
-               }
-       } else {
-
-       }
-
-       /* reset cancel_dc_i[9:5] and cancel_dc_q[4:0] in register DC_Cancel */
-       hw_get_dxx_reg(phw_data, 0x5C, &val);
-       val &= ~(0x03FF);
-       hw_set_dxx_reg(phw_data, 0x5C, val);
-
-       /* reset the TX and RX IQ calibration data */
-       hw_set_dxx_reg(phw_data, 0x3C, 0);
-       hw_set_dxx_reg(phw_data, 0x54, 0);
-
-       hw_set_dxx_reg(phw_data, 0x58, 0x30303030); /* IQ_Alpha Changed */
-
-       /* a. Disable AGC */
-       hw_get_dxx_reg(phw_data, REG_AGC_CTRL3, &reg_agc_ctrl3);
-       reg_agc_ctrl3 &= ~BIT(2);
-       reg_agc_ctrl3 |= (MASK_LNA_FIX_GAIN|MASK_AGC_FIX);
-       hw_set_dxx_reg(phw_data, REG_AGC_CTRL3, reg_agc_ctrl3);
-
-       hw_get_dxx_reg(phw_data, REG_AGC_CTRL5, &val);
-       val |= MASK_AGC_FIX_GAIN;
-       hw_set_dxx_reg(phw_data, REG_AGC_CTRL5, val);
-
-       /* b. Turn off BB RX */
-       hw_get_dxx_reg(phw_data, REG_A_ACQ_CTRL, &reg_a_acq_ctrl);
-       reg_a_acq_ctrl |= MASK_AMER_OFF_REG;
-       hw_set_dxx_reg(phw_data, REG_A_ACQ_CTRL, reg_a_acq_ctrl);
-
-       hw_get_dxx_reg(phw_data, REG_B_ACQ_CTRL, &reg_b_acq_ctrl);
-       reg_b_acq_ctrl |= MASK_BMER_OFF_REG;
-       hw_set_dxx_reg(phw_data, REG_B_ACQ_CTRL, reg_b_acq_ctrl);
-
-       /* c. Make sure MAC is in receiving mode
-        * d. Turn ON ADC calibration
-        *    - ADC calibrator is triggered by this signal rising from 0 to 1 */
-       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &val);
-       val &= ~MASK_ADC_DC_CAL_STR;
-       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, val);
-
-       val |= MASK_ADC_DC_CAL_STR;
-       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, val);
-
-       /* e. The results are shown in "adc_dc_cal_i[8:0] and adc_dc_cal_q[8:0]" */
-#ifdef _DEBUG
-       hw_get_dxx_reg(phw_data, REG_OFFSET_READ, &val);
-       PHY_DEBUG(("[CAL]    REG_OFFSET_READ = 0x%08X\n", val));
-
-       PHY_DEBUG(("[CAL]    ** adc_dc_cal_i = %d (0x%04X)\n",
-                          _s9_to_s32(val&0x000001FF), val&0x000001FF));
-       PHY_DEBUG(("[CAL]    ** adc_dc_cal_q = %d (0x%04X)\n",
-                          _s9_to_s32((val&0x0003FE00)>>9),
-                          (val&0x0003FE00)>>9));
-#endif
-
-       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &val);
-       val &= ~MASK_ADC_DC_CAL_STR;
-       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, val);
-
-       /* f. Turn on BB RX */
-       /* hw_get_dxx_reg(phw_data, REG_A_ACQ_CTRL, &reg_a_acq_ctrl); */
-       reg_a_acq_ctrl &= ~MASK_AMER_OFF_REG;
-       hw_set_dxx_reg(phw_data, REG_A_ACQ_CTRL, reg_a_acq_ctrl);
-
-       /* hw_get_dxx_reg(phw_data, REG_B_ACQ_CTRL, &reg_b_acq_ctrl); */
-       reg_b_acq_ctrl &= ~MASK_BMER_OFF_REG;
-       hw_set_dxx_reg(phw_data, REG_B_ACQ_CTRL, reg_b_acq_ctrl);
-
-       /* g. Enable AGC */
-       /* hw_get_dxx_reg(phw_data, REG_AGC_CTRL3, &val); */
-       reg_agc_ctrl3 |= BIT(2);
-       reg_agc_ctrl3 &= ~(MASK_LNA_FIX_GAIN|MASK_AGC_FIX);
-       hw_set_dxx_reg(phw_data, REG_AGC_CTRL3, reg_agc_ctrl3);
-}
-
-/* 20060612.1.a 20060718.1 Modify */
-static u8 _tx_iq_calibration_loop_winbond(struct hw_data *phw_data,
-                                                  s32 a_2_threshold,
-                                                  s32 b_2_threshold)
-{
-       u32     reg_mode_ctrl;
-       s32     iq_mag_0_tx;
-       s32     iqcal_tone_i0;
-       s32     iqcal_tone_q0;
-       s32     iqcal_tone_i;
-       s32     iqcal_tone_q;
-       u32     sqsum;
-       s32     rot_i_b;
-       s32     rot_q_b;
-       s32     tx_cal_flt_b[4];
-       s32     tx_cal[4];
-       s32     tx_cal_reg[4];
-       s32     a_2, b_2;
-       s32     sin_b, sin_2b;
-       s32     cos_b, cos_2b;
-       s32     divisor;
-       s32     temp1, temp2;
-       u32     val;
-       u16     loop;
-       s32     iqcal_tone_i_avg, iqcal_tone_q_avg;
-       u8      verify_count;
-       int capture_time;
-
-       PHY_DEBUG(("[CAL] -> _tx_iq_calibration_loop()\n"));
-       PHY_DEBUG(("[CAL]    ** a_2_threshold = %d\n", a_2_threshold));
-       PHY_DEBUG(("[CAL]    ** b_2_threshold = %d\n", b_2_threshold));
-
-       verify_count = 0;
-
-       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl);
-       PHY_DEBUG(("[CAL]    MODE_CTRL (read) = 0x%08X\n", reg_mode_ctrl));
-
-       loop = LOOP_TIMES;
-
-       while (loop > 0) {
-               PHY_DEBUG(("[CAL] [%d.] <_tx_iq_calibration_loop>\n",
-                                  (LOOP_TIMES-loop+1)));
-
-               iqcal_tone_i_avg = 0;
-               iqcal_tone_q_avg = 0;
-               if (!hw_set_dxx_reg(phw_data, 0x3C, 0x00)) /* 20060718.1 modify */
-                       return 0;
-               for (capture_time = 0; capture_time < 10; capture_time++) {
-                       /*
-                        * a. Set iqcal_mode[1:0] to 0x2 and set "calib_start"
-                        *    to 0x1 to enable "IQ calibration Mode II"
-                        */
-                       reg_mode_ctrl &= ~(MASK_IQCAL_TONE_SEL|MASK_IQCAL_MODE);
-                       reg_mode_ctrl &= ~MASK_IQCAL_MODE;
-                       reg_mode_ctrl |= (MASK_CALIB_START|0x02);
-                       reg_mode_ctrl |= (MASK_CALIB_START|0x02|2<<2);
-                       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-                       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-                       /* b. */
-                       hw_get_dxx_reg(phw_data, REG_CALIB_READ1, &val);
-                       PHY_DEBUG(("[CAL]    CALIB_READ1 = 0x%08X\n", val));
-
-                       iqcal_tone_i0 = _s13_to_s32(val & 0x00001FFF);
-                       iqcal_tone_q0 = _s13_to_s32((val & 0x03FFE000) >> 13);
-                       PHY_DEBUG(("[CAL]    ** iqcal_tone_i0=%d, iqcal_tone_q0=%d\n",
-                                  iqcal_tone_i0, iqcal_tone_q0));
-
-                       sqsum = iqcal_tone_i0*iqcal_tone_i0 +
-                       iqcal_tone_q0*iqcal_tone_q0;
-                       iq_mag_0_tx = (s32) _sqrt(sqsum);
-                       PHY_DEBUG(("[CAL]    ** iq_mag_0_tx=%d\n", iq_mag_0_tx));
-
-                       /* c. Set "calib_start" to 0x0 */
-                       reg_mode_ctrl &= ~MASK_CALIB_START;
-                       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-                       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-                       /*
-                        * d. Set iqcal_mode[1:0] to 0x3 and set "calib_start"
-                        *    to 0x1 to enable "IQ calibration Mode II"
-                        */
-                       /* hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &val); */
-                       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl);
-                       reg_mode_ctrl &= ~MASK_IQCAL_MODE;
-                       reg_mode_ctrl |= (MASK_CALIB_START|0x03);
-                       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-                       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-                       /* e. */
-                       hw_get_dxx_reg(phw_data, REG_CALIB_READ1, &val);
-                       PHY_DEBUG(("[CAL]    CALIB_READ1 = 0x%08X\n", val));
-
-                       iqcal_tone_i = _s13_to_s32(val & 0x00001FFF);
-                       iqcal_tone_q = _s13_to_s32((val & 0x03FFE000) >> 13);
-                       PHY_DEBUG(("[CAL]    ** iqcal_tone_i = %d, iqcal_tone_q = %d\n",
-                                          iqcal_tone_i, iqcal_tone_q));
-                       if (capture_time == 0)
-                               continue;
-                       else {
-                               iqcal_tone_i_avg = (iqcal_tone_i_avg*(capture_time-1) + iqcal_tone_i)/capture_time;
-                               iqcal_tone_q_avg = (iqcal_tone_q_avg*(capture_time-1) + iqcal_tone_q)/capture_time;
-                       }
-               }
-
-               iqcal_tone_i = iqcal_tone_i_avg;
-               iqcal_tone_q = iqcal_tone_q_avg;
-
-
-               rot_i_b = (iqcal_tone_i * iqcal_tone_i0 +
-                                  iqcal_tone_q * iqcal_tone_q0) / 1024;
-               rot_q_b = (iqcal_tone_i * iqcal_tone_q0 * (-1) +
-                                  iqcal_tone_q * iqcal_tone_i0) / 1024;
-               PHY_DEBUG(("[CAL]    ** rot_i_b = %d, rot_q_b = %d\n",
-                                  rot_i_b, rot_q_b));
-
-               /* f. */
-               divisor = ((iq_mag_0_tx * iq_mag_0_tx * 2)/1024 - rot_i_b) * 2;
-
-               if (divisor == 0) {
-                       PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> ERROR *******\n"));
-                       PHY_DEBUG(("[CAL] ** divisor=0 to calculate EPS and THETA !!\n"));
-                       PHY_DEBUG(("[CAL] ******************************************\n"));
-                       break;
-               }
-
-               a_2 = (rot_i_b * 32768) / divisor;
-               b_2 = (rot_q_b * (-32768)) / divisor;
-               PHY_DEBUG(("[CAL]    ***** EPSILON/2 = %d\n", a_2));
-               PHY_DEBUG(("[CAL]    ***** THETA/2   = %d\n", b_2));
-
-               phw_data->iq_rsdl_gain_tx_d2 = a_2;
-               phw_data->iq_rsdl_phase_tx_d2 = b_2;
-
-               /* if ((abs(a_2) < 150) && (abs(b_2) < 100)) */
-               /* if ((abs(a_2) < 200) && (abs(b_2) < 200)) */
-               if ((abs(a_2) < a_2_threshold) && (abs(b_2) < b_2_threshold)) {
-                       verify_count++;
-
-                       PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> *************\n"));
-                       PHY_DEBUG(("[CAL] ** VERIFY OK # %d !!\n", verify_count));
-                       PHY_DEBUG(("[CAL] ******************************************\n"));
-
-                       if (verify_count > 2) {
-                               PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> *********\n"));
-                               PHY_DEBUG(("[CAL] ** TX_IQ_CALIBRATION (EPS,THETA) OK !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               return 0;
-                       }
-
-                       continue;
-               } else
-                       verify_count = 0;
-
-               _sin_cos(b_2, &sin_b, &cos_b);
-               _sin_cos(b_2*2, &sin_2b, &cos_2b);
-               PHY_DEBUG(("[CAL]    ** sin(b/2)=%d, cos(b/2)=%d\n", sin_b, cos_b));
-               PHY_DEBUG(("[CAL]    ** sin(b)=%d, cos(b)=%d\n", sin_2b, cos_2b));
-
-               if (cos_2b == 0) {
-                       PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> ERROR *******\n"));
-                       PHY_DEBUG(("[CAL] ** cos(b)=0 !!\n"));
-                       PHY_DEBUG(("[CAL] ******************************************\n"));
-                       break;
-               }
-
-               /* 1280 * 32768 = 41943040 */
-               temp1 = (41943040/cos_2b)*cos_b;
-
-               /* temp2 = (41943040/cos_2b)*sin_b*(-1); */
-               if (phw_data->revision == 0x2002) /* 1st-cut */
-                       temp2 = (41943040/cos_2b)*sin_b*(-1);
-               else /* 2nd-cut */
-                       temp2 = (41943040*4/cos_2b)*sin_b*(-1);
-
-               tx_cal_flt_b[0] = _floor(temp1/(32768+a_2));
-               tx_cal_flt_b[1] = _floor(temp2/(32768+a_2));
-               tx_cal_flt_b[2] = _floor(temp2/(32768-a_2));
-               tx_cal_flt_b[3] = _floor(temp1/(32768-a_2));
-               PHY_DEBUG(("[CAL]    ** tx_cal_flt_b[0] = %d\n", tx_cal_flt_b[0]));
-               PHY_DEBUG(("[CAL]       tx_cal_flt_b[1] = %d\n", tx_cal_flt_b[1]));
-               PHY_DEBUG(("[CAL]       tx_cal_flt_b[2] = %d\n", tx_cal_flt_b[2]));
-               PHY_DEBUG(("[CAL]       tx_cal_flt_b[3] = %d\n", tx_cal_flt_b[3]));
-
-               tx_cal[2] = tx_cal_flt_b[2];
-               tx_cal[2] = tx_cal[2] + 3;
-               tx_cal[1] = tx_cal[2];
-               tx_cal[3] = tx_cal_flt_b[3] - 128;
-               tx_cal[0] = -tx_cal[3] + 1;
-
-               PHY_DEBUG(("[CAL]       tx_cal[0] = %d\n", tx_cal[0]));
-               PHY_DEBUG(("[CAL]       tx_cal[1] = %d\n", tx_cal[1]));
-               PHY_DEBUG(("[CAL]       tx_cal[2] = %d\n", tx_cal[2]));
-               PHY_DEBUG(("[CAL]       tx_cal[3] = %d\n", tx_cal[3]));
-
-               /* if ((tx_cal[0] == 0) && (tx_cal[1] == 0) &&
-                     (tx_cal[2] == 0) && (tx_cal[3] == 0))
-                 { */
-               /*    PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> *************\n"));
-                *    PHY_DEBUG(("[CAL] ** TX_IQ_CALIBRATION COMPLETE !!\n"));
-                *    PHY_DEBUG(("[CAL] ******************************************\n"));
-                *    return 0;
-                 } */
-
-               /* g. */
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       hw_get_dxx_reg(phw_data, 0x54, &val);
-                       PHY_DEBUG(("[CAL]    ** 0x54 = 0x%08X\n", val));
-                       tx_cal_reg[0] = _s4_to_s32((val & 0xF0000000) >> 28);
-                       tx_cal_reg[1] = _s4_to_s32((val & 0x0F000000) >> 24);
-                       tx_cal_reg[2] = _s4_to_s32((val & 0x00F00000) >> 20);
-                       tx_cal_reg[3] = _s4_to_s32((val & 0x000F0000) >> 16);
-               } else /* 2nd-cut */{
-                       hw_get_dxx_reg(phw_data, 0x3C, &val);
-                       PHY_DEBUG(("[CAL]    ** 0x3C = 0x%08X\n", val));
-                       tx_cal_reg[0] = _s5_to_s32((val & 0xF8000000) >> 27);
-                       tx_cal_reg[1] = _s6_to_s32((val & 0x07E00000) >> 21);
-                       tx_cal_reg[2] = _s6_to_s32((val & 0x001F8000) >> 15);
-                       tx_cal_reg[3] = _s5_to_s32((val & 0x00007C00) >> 10);
-
-               }
-
-               PHY_DEBUG(("[CAL]    ** tx_cal_reg[0] = %d\n", tx_cal_reg[0]));
-               PHY_DEBUG(("[CAL]       tx_cal_reg[1] = %d\n", tx_cal_reg[1]));
-               PHY_DEBUG(("[CAL]       tx_cal_reg[2] = %d\n", tx_cal_reg[2]));
-               PHY_DEBUG(("[CAL]       tx_cal_reg[3] = %d\n", tx_cal_reg[3]));
-
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       if (((tx_cal_reg[0] == 7) || (tx_cal_reg[0] == (-8))) &&
-                               ((tx_cal_reg[3] == 7) || (tx_cal_reg[3] == (-8)))) {
-                               PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> *********\n"));
-                               PHY_DEBUG(("[CAL] ** TX_IQ_CALIBRATION SATUATION !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               break;
-                       }
-               } else /* 2nd-cut */{
-                       if (((tx_cal_reg[0] == 31) || (tx_cal_reg[0] == (-32))) &&
-                               ((tx_cal_reg[3] == 31) || (tx_cal_reg[3] == (-32)))) {
-                               PHY_DEBUG(("[CAL] ** <_tx_iq_calibration_loop> *********\n"));
-                               PHY_DEBUG(("[CAL] ** TX_IQ_CALIBRATION SATUATION !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               break;
-                       }
-               }
-
-               tx_cal[0] = tx_cal[0] + tx_cal_reg[0];
-               tx_cal[1] = tx_cal[1] + tx_cal_reg[1];
-               tx_cal[2] = tx_cal[2] + tx_cal_reg[2];
-               tx_cal[3] = tx_cal[3] + tx_cal_reg[3];
-               PHY_DEBUG(("[CAL]    ** apply tx_cal[0] = %d\n", tx_cal[0]));
-               PHY_DEBUG(("[CAL]       apply tx_cal[1] = %d\n", tx_cal[1]));
-               PHY_DEBUG(("[CAL]       apply tx_cal[2] = %d\n", tx_cal[2]));
-               PHY_DEBUG(("[CAL]       apply tx_cal[3] = %d\n", tx_cal[3]));
-
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       val &= 0x0000FFFF;
-                       val |= ((_s32_to_s4(tx_cal[0]) << 28)|
-                                       (_s32_to_s4(tx_cal[1]) << 24)|
-                                       (_s32_to_s4(tx_cal[2]) << 20)|
-                                       (_s32_to_s4(tx_cal[3]) << 16));
-                       hw_set_dxx_reg(phw_data, 0x54, val);
-                       PHY_DEBUG(("[CAL]    ** CALIB_DATA = 0x%08X\n", val));
-                       return 0;
-               } else /* 2nd-cut */{
-                       val &= 0x000003FF;
-                       val |= ((_s32_to_s5(tx_cal[0]) << 27)|
-                                       (_s32_to_s6(tx_cal[1]) << 21)|
-                                       (_s32_to_s6(tx_cal[2]) << 15)|
-                                       (_s32_to_s5(tx_cal[3]) << 10));
-                       hw_set_dxx_reg(phw_data, 0x3C, val);
-                       PHY_DEBUG(("[CAL]    ** TX_IQ_CALIBRATION = 0x%08X\n", val));
-                       return 0;
-               }
-
-               /* i. Set "calib_start" to 0x0 */
-               reg_mode_ctrl &= ~MASK_CALIB_START;
-               hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-               PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-               loop--;
-       }
-
-       return 1;
-}
-
-static void _tx_iq_calibration_winbond(struct hw_data *phw_data)
-{
-       u32     reg_agc_ctrl3;
-#ifdef _DEBUG
-       s32     tx_cal_reg[4];
-
-#endif
-       u32     reg_mode_ctrl;
-       u32     val;
-       u8      result;
-
-       PHY_DEBUG(("[CAL] -> [4]_tx_iq_calibration()\n"));
-
-       /* 0x01 0xEE3FC2  ; 3B8FF  ; Calibration (6a). enable TX IQ calibration loop circuits */
-       phy_set_rf_data(phw_data, 1, (1<<24)|0xEE3FC2);
-       /* 0x0B 0x1905D6  ; 06417  ; Calibration (6b). enable TX I/Q cal loop squaring circuit */
-       phy_set_rf_data(phw_data, 11, (11<<24)|0x19BDD6); /* 20060612.1.a 0x1905D6); */
-       /* 0x05 0x24C60A  ; 09318  ; Calibration (6c). setting TX-VGA gain: TXGCH=2 & GPK=110 --> to be optimized */
-       phy_set_rf_data(phw_data, 5, (5<<24)|0x24C60A); /* 0x24C60A (high temperature) */
-       /* 0x06 0x06880C  ; 01A20  ; Calibration (6d). RXGCH=00; RXGCL=100 000 (RXVGA=32) --> to be optimized */
-       phy_set_rf_data(phw_data, 6, (6<<24)|0x34880C); /* 20060612.1.a 0x06890C); */
-       /* 0x00 0xFDF1C0  ; 3F7C7  ; Calibration (6e). turn on IQ imbalance/Test mode */
-       phy_set_rf_data(phw_data, 0, (0<<24)|0xFDF1C0);
-       /* ; [BB-chip]: Calibration (6f).Send test pattern */
-       /* ; [BB-chip]: Calibration (6g). Search RXGCL optimal value */
-       /* ; [BB-chip]: Calibration (6h). Calculate TX-path IQ imbalance and setting TX path IQ compensation table */
-       /* phy_set_rf_data(phw_data, 3, (3<<24)|0x025586); */
-
-       msleep(30); /* 20060612.1.a 30ms delay. Add the follow 2 lines */
-       /* To adjust TXVGA to fit iq_mag_0 range from 1250 ~ 1750 */
-       adjust_TXVGA_for_iq_mag(phw_data);
-
-       /* a. Disable AGC */
-       hw_get_dxx_reg(phw_data, REG_AGC_CTRL3, &reg_agc_ctrl3);
-       reg_agc_ctrl3 &= ~BIT(2);
-       reg_agc_ctrl3 |= (MASK_LNA_FIX_GAIN|MASK_AGC_FIX);
-       hw_set_dxx_reg(phw_data, REG_AGC_CTRL3, reg_agc_ctrl3);
-
-       hw_get_dxx_reg(phw_data, REG_AGC_CTRL5, &val);
-       val |= MASK_AGC_FIX_GAIN;
-       hw_set_dxx_reg(phw_data, REG_AGC_CTRL5, val);
-
-       result = _tx_iq_calibration_loop_winbond(phw_data, 150, 100);
-
-       if (result > 0) {
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       hw_get_dxx_reg(phw_data, 0x54, &val);
-                       val &= 0x0000FFFF;
-                       hw_set_dxx_reg(phw_data, 0x54, val);
-               } else /* 2nd-cut*/{
-                       hw_get_dxx_reg(phw_data, 0x3C, &val);
-                       val &= 0x000003FF;
-                       hw_set_dxx_reg(phw_data, 0x3C, val);
-               }
-
-               result = _tx_iq_calibration_loop_winbond(phw_data, 300, 200);
-
-               if (result > 0) {
-                       if (phw_data->revision == 0x2002) /* 1st-cut */{
-                               hw_get_dxx_reg(phw_data, 0x54, &val);
-                               val &= 0x0000FFFF;
-                               hw_set_dxx_reg(phw_data, 0x54, val);
-                       } else /* 2nd-cut*/{
-                               hw_get_dxx_reg(phw_data, 0x3C, &val);
-                               val &= 0x000003FF;
-                               hw_set_dxx_reg(phw_data, 0x3C, val);
-                       }
-
-                       result = _tx_iq_calibration_loop_winbond(phw_data, 500, 400);
-                       if (result > 0) {
-                               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                                       hw_get_dxx_reg(phw_data, 0x54, &val);
-                                       val &= 0x0000FFFF;
-                                       hw_set_dxx_reg(phw_data, 0x54, val);
-                               } else /* 2nd-cut */{
-                                       hw_get_dxx_reg(phw_data, 0x3C, &val);
-                                       val &= 0x000003FF;
-                                       hw_set_dxx_reg(phw_data, 0x3C, val);
-                               }
-
-
-                               result = _tx_iq_calibration_loop_winbond(phw_data, 700, 500);
-
-                               if (result > 0) {
-                                       PHY_DEBUG(("[CAL] ** <_tx_iq_calibration> **************\n"));
-                                       PHY_DEBUG(("[CAL] ** TX_IQ_CALIBRATION FAILURE !!\n"));
-                                       PHY_DEBUG(("[CAL] **************************************\n"));
-
-                                       if (phw_data->revision == 0x2002) /* 1st-cut */{
-                                               hw_get_dxx_reg(phw_data, 0x54, &val);
-                                               val &= 0x0000FFFF;
-                                               hw_set_dxx_reg(phw_data, 0x54, val);
-                                       } else /* 2nd-cut */{
-                                               hw_get_dxx_reg(phw_data, 0x3C, &val);
-                                               val &= 0x000003FF;
-                                               hw_set_dxx_reg(phw_data, 0x3C, val);
-                                       }
-                               }
-                       }
-               }
-       }
-
-       /* i. Set "calib_start" to 0x0 */
-       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl);
-       reg_mode_ctrl &= ~MASK_CALIB_START;
-       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-       /* g. Enable AGC */
-       /* hw_get_dxx_reg(phw_data, REG_AGC_CTRL3, &val); */
-       reg_agc_ctrl3 |= BIT(2);
-       reg_agc_ctrl3 &= ~(MASK_LNA_FIX_GAIN|MASK_AGC_FIX);
-       hw_set_dxx_reg(phw_data, REG_AGC_CTRL3, reg_agc_ctrl3);
-
-#ifdef _DEBUG
-       if (phw_data->revision == 0x2002) /* 1st-cut */{
-               hw_get_dxx_reg(phw_data, 0x54, &val);
-               PHY_DEBUG(("[CAL]    ** 0x54 = 0x%08X\n", val));
-               tx_cal_reg[0] = _s4_to_s32((val & 0xF0000000) >> 28);
-               tx_cal_reg[1] = _s4_to_s32((val & 0x0F000000) >> 24);
-               tx_cal_reg[2] = _s4_to_s32((val & 0x00F00000) >> 20);
-               tx_cal_reg[3] = _s4_to_s32((val & 0x000F0000) >> 16);
-       } else /* 2nd-cut */ {
-               hw_get_dxx_reg(phw_data, 0x3C, &val);
-               PHY_DEBUG(("[CAL]    ** 0x3C = 0x%08X\n", val));
-               tx_cal_reg[0] = _s5_to_s32((val & 0xF8000000) >> 27);
-               tx_cal_reg[1] = _s6_to_s32((val & 0x07E00000) >> 21);
-               tx_cal_reg[2] = _s6_to_s32((val & 0x001F8000) >> 15);
-               tx_cal_reg[3] = _s5_to_s32((val & 0x00007C00) >> 10);
-
-       }
-
-       PHY_DEBUG(("[CAL]    ** tx_cal_reg[0] = %d\n", tx_cal_reg[0]));
-       PHY_DEBUG(("[CAL]       tx_cal_reg[1] = %d\n", tx_cal_reg[1]));
-       PHY_DEBUG(("[CAL]       tx_cal_reg[2] = %d\n", tx_cal_reg[2]));
-       PHY_DEBUG(("[CAL]       tx_cal_reg[3] = %d\n", tx_cal_reg[3]));
-#endif
-
-
-       /*
-        * for test - BEN
-        * RF Control Override
-        */
-}
-
-/*****************************************************/
-static u8 _rx_iq_calibration_loop_winbond(struct hw_data *phw_data, u16 factor, u32 frequency)
-{
-       u32     reg_mode_ctrl;
-       s32     iqcal_tone_i;
-       s32     iqcal_tone_q;
-       s32     iqcal_image_i;
-       s32     iqcal_image_q;
-       s32     rot_tone_i_b;
-       s32     rot_tone_q_b;
-       s32     rot_image_i_b;
-       s32     rot_image_q_b;
-       s32     rx_cal_flt_b[4];
-       s32     rx_cal[4];
-       s32     rx_cal_reg[4];
-       s32     a_2, b_2;
-       s32     sin_b, sin_2b;
-       s32     cos_b, cos_2b;
-       s32     temp1, temp2;
-       u32     val;
-       u16     loop;
-
-       u32     pwr_tone;
-       u32     pwr_image;
-       u8      verify_count;
-
-       s32     iqcal_tone_i_avg, iqcal_tone_q_avg;
-       s32     iqcal_image_i_avg, iqcal_image_q_avg;
-       u16     capture_time;
-
-       PHY_DEBUG(("[CAL] -> [5]_rx_iq_calibration_loop()\n"));
-       PHY_DEBUG(("[CAL] ** factor = %d\n", factor));
-
-       hw_set_dxx_reg(phw_data, 0x58, 0x44444444); /* IQ_Alpha */
-
-       /* b. */
-
-       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl);
-       PHY_DEBUG(("[CAL]    MODE_CTRL (read) = 0x%08X\n", reg_mode_ctrl));
-
-       verify_count = 0;
-
-       /* for (loop = 0; loop < 1; loop++) */
-       /* for (loop = 0; loop < LOOP_TIMES; loop++) */
-       loop = LOOP_TIMES;
-       while (loop > 0) {
-               PHY_DEBUG(("[CAL] [%d.] <_rx_iq_calibration_loop>\n",
-                                  (LOOP_TIMES-loop+1)));
-               iqcal_tone_i_avg = 0;
-               iqcal_tone_q_avg = 0;
-               iqcal_image_i_avg = 0;
-               iqcal_image_q_avg = 0;
-               capture_time = 0;
-
-               for (capture_time = 0; capture_time < 10; capture_time++) {
-                       /* i. Set "calib_start" to 0x0 */
-                       reg_mode_ctrl &= ~MASK_CALIB_START;
-                       if (!hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl))/*20060718.1 modify */
-                               return 0;
-                       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-                       reg_mode_ctrl &= ~MASK_IQCAL_MODE;
-                       reg_mode_ctrl |= (MASK_CALIB_START|0x1);
-                       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-                       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-                       /* c. */
-                       hw_get_dxx_reg(phw_data, REG_CALIB_READ1, &val);
-                       PHY_DEBUG(("[CAL]    CALIB_READ1 = 0x%08X\n", val));
-
-                       iqcal_tone_i = _s13_to_s32(val & 0x00001FFF);
-                       iqcal_tone_q = _s13_to_s32((val & 0x03FFE000) >> 13);
-                       PHY_DEBUG(("[CAL]    ** iqcal_tone_i = %d, iqcal_tone_q = %d\n",
-                               iqcal_tone_i, iqcal_tone_q));
-
-                       hw_get_dxx_reg(phw_data, REG_CALIB_READ2, &val);
-                       PHY_DEBUG(("[CAL]    CALIB_READ2 = 0x%08X\n", val));
-
-                       iqcal_image_i = _s13_to_s32(val & 0x00001FFF);
-                       iqcal_image_q = _s13_to_s32((val & 0x03FFE000) >> 13);
-                       PHY_DEBUG(("[CAL]    ** iqcal_image_i = %d, iqcal_image_q = %d\n",
-                               iqcal_image_i, iqcal_image_q));
-                       if (capture_time == 0)
-                               continue;
-                       else {
-                               iqcal_image_i_avg = (iqcal_image_i_avg*(capture_time-1) + iqcal_image_i)/capture_time;
-                               iqcal_image_q_avg = (iqcal_image_q_avg*(capture_time-1) + iqcal_image_q)/capture_time;
-                               iqcal_tone_i_avg = (iqcal_tone_i_avg*(capture_time-1) + iqcal_tone_i)/capture_time;
-                               iqcal_tone_q_avg = (iqcal_tone_q_avg*(capture_time-1) + iqcal_tone_q)/capture_time;
-                       }
-               }
-
-
-               iqcal_image_i = iqcal_image_i_avg;
-               iqcal_image_q = iqcal_image_q_avg;
-               iqcal_tone_i = iqcal_tone_i_avg;
-               iqcal_tone_q = iqcal_tone_q_avg;
-
-               /* d. */
-               rot_tone_i_b = (iqcal_tone_i * iqcal_tone_i +
-                                       iqcal_tone_q * iqcal_tone_q) / 1024;
-               rot_tone_q_b = (iqcal_tone_i * iqcal_tone_q * (-1) +
-                                       iqcal_tone_q * iqcal_tone_i) / 1024;
-               rot_image_i_b = (iqcal_image_i * iqcal_tone_i -
-                                       iqcal_image_q * iqcal_tone_q) / 1024;
-               rot_image_q_b = (iqcal_image_i * iqcal_tone_q +
-                                       iqcal_image_q * iqcal_tone_i) / 1024;
-
-               PHY_DEBUG(("[CAL]    ** rot_tone_i_b  = %d\n", rot_tone_i_b));
-               PHY_DEBUG(("[CAL]    ** rot_tone_q_b  = %d\n", rot_tone_q_b));
-               PHY_DEBUG(("[CAL]    ** rot_image_i_b = %d\n", rot_image_i_b));
-               PHY_DEBUG(("[CAL]    ** rot_image_q_b = %d\n", rot_image_q_b));
-
-               /* f. */
-               if (rot_tone_i_b == 0) {
-                       PHY_DEBUG(("[CAL] ** <_rx_iq_calibration_loop> ERROR *******\n"));
-                       PHY_DEBUG(("[CAL] ** rot_tone_i_b=0 to calculate EPS and THETA !!\n"));
-                       PHY_DEBUG(("[CAL] ******************************************\n"));
-                       break;
-               }
-
-               a_2 = (rot_image_i_b * 32768) / rot_tone_i_b -
-                       phw_data->iq_rsdl_gain_tx_d2;
-               b_2 = (rot_image_q_b * 32768) / rot_tone_i_b -
-                       phw_data->iq_rsdl_phase_tx_d2;
-
-               PHY_DEBUG(("[CAL]    ** iq_rsdl_gain_tx_d2 = %d\n",
-                          phw_data->iq_rsdl_gain_tx_d2));
-               PHY_DEBUG(("[CAL]    ** iq_rsdl_phase_tx_d2= %d\n",
-                          phw_data->iq_rsdl_phase_tx_d2));
-               PHY_DEBUG(("[CAL]    ***** EPSILON/2 = %d\n", a_2));
-               PHY_DEBUG(("[CAL]    ***** THETA/2   = %d\n", b_2));
-
-               _sin_cos(b_2, &sin_b, &cos_b);
-               _sin_cos(b_2*2, &sin_2b, &cos_2b);
-               PHY_DEBUG(("[CAL]    ** sin(b/2)=%d, cos(b/2)=%d\n", sin_b, cos_b));
-               PHY_DEBUG(("[CAL]    ** sin(b)=%d, cos(b)=%d\n", sin_2b, cos_2b));
-
-               if (cos_2b == 0) {
-                       PHY_DEBUG(("[CAL] ** <_rx_iq_calibration_loop> ERROR *******\n"));
-                       PHY_DEBUG(("[CAL] ** cos(b)=0 !!\n"));
-                       PHY_DEBUG(("[CAL] ******************************************\n"));
-                       break;
-               }
-
-               /* 1280 * 32768 = 41943040 */
-               temp1 = (41943040/cos_2b)*cos_b;
-
-               /* temp2 = (41943040/cos_2b)*sin_b*(-1); */
-               if (phw_data->revision == 0x2002)/* 1st-cut */
-                       temp2 = (41943040/cos_2b)*sin_b*(-1);
-               else/* 2nd-cut */
-                       temp2 = (41943040*4/cos_2b)*sin_b*(-1);
-
-               rx_cal_flt_b[0] = _floor(temp1/(32768+a_2));
-               rx_cal_flt_b[1] = _floor(temp2/(32768-a_2));
-               rx_cal_flt_b[2] = _floor(temp2/(32768+a_2));
-               rx_cal_flt_b[3] = _floor(temp1/(32768-a_2));
-
-               PHY_DEBUG(("[CAL]    ** rx_cal_flt_b[0] = %d\n", rx_cal_flt_b[0]));
-               PHY_DEBUG(("[CAL]       rx_cal_flt_b[1] = %d\n", rx_cal_flt_b[1]));
-               PHY_DEBUG(("[CAL]       rx_cal_flt_b[2] = %d\n", rx_cal_flt_b[2]));
-               PHY_DEBUG(("[CAL]       rx_cal_flt_b[3] = %d\n", rx_cal_flt_b[3]));
-
-               rx_cal[0] = rx_cal_flt_b[0] - 128;
-               rx_cal[1] = rx_cal_flt_b[1];
-               rx_cal[2] = rx_cal_flt_b[2];
-               rx_cal[3] = rx_cal_flt_b[3] - 128;
-               PHY_DEBUG(("[CAL]    ** rx_cal[0] = %d\n", rx_cal[0]));
-               PHY_DEBUG(("[CAL]       rx_cal[1] = %d\n", rx_cal[1]));
-               PHY_DEBUG(("[CAL]       rx_cal[2] = %d\n", rx_cal[2]));
-               PHY_DEBUG(("[CAL]       rx_cal[3] = %d\n", rx_cal[3]));
-
-               /* e. */
-               pwr_tone = (iqcal_tone_i*iqcal_tone_i + iqcal_tone_q*iqcal_tone_q);
-               pwr_image = (iqcal_image_i*iqcal_image_i +
-                            iqcal_image_q*iqcal_image_q)*factor;
-
-               PHY_DEBUG(("[CAL]    ** pwr_tone  = %d\n", pwr_tone));
-               PHY_DEBUG(("[CAL]    ** pwr_image  = %d\n", pwr_image));
-
-               if (pwr_tone > pwr_image) {
-                       verify_count++;
-
-                       PHY_DEBUG(("[CAL] ** <_rx_iq_calibration_loop> *************\n"));
-                       PHY_DEBUG(("[CAL] ** VERIFY OK # %d !!\n", verify_count));
-                       PHY_DEBUG(("[CAL] ******************************************\n"));
-
-                       if (verify_count > 2) {
-                               PHY_DEBUG(("[CAL] ** <_rx_iq_calibration_loop> *********\n"));
-                               PHY_DEBUG(("[CAL] ** RX_IQ_CALIBRATION OK !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               return 0;
-                       }
-
-                       continue;
-               }
-               /* g. */
-               hw_get_dxx_reg(phw_data, 0x54, &val);
-               PHY_DEBUG(("[CAL]    ** 0x54 = 0x%08X\n", val));
-
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       rx_cal_reg[0] = _s4_to_s32((val & 0x0000F000) >> 12);
-                       rx_cal_reg[1] = _s4_to_s32((val & 0x00000F00) >>  8);
-                       rx_cal_reg[2] = _s4_to_s32((val & 0x000000F0) >>  4);
-                       rx_cal_reg[3] = _s4_to_s32((val & 0x0000000F));
-               } else /* 2nd-cut */{
-                       rx_cal_reg[0] = _s5_to_s32((val & 0xF8000000) >> 27);
-                       rx_cal_reg[1] = _s6_to_s32((val & 0x07E00000) >> 21);
-                       rx_cal_reg[2] = _s6_to_s32((val & 0x001F8000) >> 15);
-                       rx_cal_reg[3] = _s5_to_s32((val & 0x00007C00) >> 10);
-               }
-
-               PHY_DEBUG(("[CAL]    ** rx_cal_reg[0] = %d\n", rx_cal_reg[0]));
-               PHY_DEBUG(("[CAL]       rx_cal_reg[1] = %d\n", rx_cal_reg[1]));
-               PHY_DEBUG(("[CAL]       rx_cal_reg[2] = %d\n", rx_cal_reg[2]));
-               PHY_DEBUG(("[CAL]       rx_cal_reg[3] = %d\n", rx_cal_reg[3]));
-
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       if (((rx_cal_reg[0] == 7) || (rx_cal_reg[0] == (-8))) &&
-                               ((rx_cal_reg[3] == 7) || (rx_cal_reg[3] == (-8)))) {
-                               PHY_DEBUG(("[CAL] ** <_rx_iq_calibration_loop> *********\n"));
-                               PHY_DEBUG(("[CAL] ** RX_IQ_CALIBRATION SATUATION !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               break;
-                       }
-               } else /* 2nd-cut */{
-                       if (((rx_cal_reg[0] == 31) || (rx_cal_reg[0] == (-32))) &&
-                               ((rx_cal_reg[3] == 31) || (rx_cal_reg[3] == (-32)))) {
-                               PHY_DEBUG(("[CAL] ** <_rx_iq_calibration_loop> *********\n"));
-                               PHY_DEBUG(("[CAL] ** RX_IQ_CALIBRATION SATUATION !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               break;
-                       }
-               }
-
-               rx_cal[0] = rx_cal[0] + rx_cal_reg[0];
-               rx_cal[1] = rx_cal[1] + rx_cal_reg[1];
-               rx_cal[2] = rx_cal[2] + rx_cal_reg[2];
-               rx_cal[3] = rx_cal[3] + rx_cal_reg[3];
-               PHY_DEBUG(("[CAL]    ** apply rx_cal[0] = %d\n", rx_cal[0]));
-               PHY_DEBUG(("[CAL]       apply rx_cal[1] = %d\n", rx_cal[1]));
-               PHY_DEBUG(("[CAL]       apply rx_cal[2] = %d\n", rx_cal[2]));
-               PHY_DEBUG(("[CAL]       apply rx_cal[3] = %d\n", rx_cal[3]));
-
-               hw_get_dxx_reg(phw_data, 0x54, &val);
-               if (phw_data->revision == 0x2002) /* 1st-cut */{
-                       val &= 0x0000FFFF;
-                       val |= ((_s32_to_s4(rx_cal[0]) << 12)|
-                                       (_s32_to_s4(rx_cal[1]) <<  8)|
-                                       (_s32_to_s4(rx_cal[2]) <<  4)|
-                                       (_s32_to_s4(rx_cal[3])));
-                       hw_set_dxx_reg(phw_data, 0x54, val);
-               } else /* 2nd-cut */{
-                       val &= 0x000003FF;
-                       val |= ((_s32_to_s5(rx_cal[0]) << 27)|
-                                       (_s32_to_s6(rx_cal[1]) << 21)|
-                                       (_s32_to_s6(rx_cal[2]) << 15)|
-                                       (_s32_to_s5(rx_cal[3]) << 10));
-                       hw_set_dxx_reg(phw_data, 0x54, val);
-
-                       if (loop == 3)
-                               return 0;
-               }
-               PHY_DEBUG(("[CAL]    ** CALIB_DATA = 0x%08X\n", val));
-
-               loop--;
-       }
-
-       return 1;
-}
-
-/*************************************************/
-
-/***************************************************************/
-static void _rx_iq_calibration_winbond(struct hw_data *phw_data, u32 frequency)
-{
-/* figo 20050523 marked this flag for can't compile for release */
-#ifdef _DEBUG
-       s32     rx_cal_reg[4];
-       u32     val;
-#endif
-
-       u8      result;
-
-       PHY_DEBUG(("[CAL] -> [5]_rx_iq_calibration()\n"));
-/* a. Set RFIC to "RX calibration mode" */
-       /* ; ----- Calibration (7). RX path IQ imbalance calibration loop */
-       /*      0x01 0xFFBFC2  ; 3FEFF  ; Calibration (7a). enable RX IQ calibration loop circuits */
-       phy_set_rf_data(phw_data, 1, (1<<24)|0xEFBFC2);
-       /*      0x0B 0x1A01D6  ; 06817  ; Calibration (7b). enable RX I/Q cal loop SW1 circuits */
-       phy_set_rf_data(phw_data, 11, (11<<24)|0x1A05D6);
-       /* 0x05 0x24848A  ; 09212  ; Calibration (7c). setting TX-VGA gain (TXGCH) to 2 --> to be optimized */
-       phy_set_rf_data(phw_data, 5, (5<<24) | phw_data->txvga_setting_for_cal);
-       /* 0x06 0x06840C  ; 01A10  ; Calibration (7d). RXGCH=00; RXGCL=010 000 (RXVGA) --> to be optimized */
-       phy_set_rf_data(phw_data, 6, (6<<24)|0x06834C);
-       /* 0x00 0xFFF1C0  ; 3F7C7  ; Calibration (7e). turn on IQ imbalance/Test mode */
-       phy_set_rf_data(phw_data, 0, (0<<24)|0xFFF1C0);
-
-       /*  ; [BB-chip]: Calibration (7f). Send test pattern */
-       /*      ; [BB-chip]: Calibration (7g). Search RXGCL optimal value */
-       /*      ; [BB-chip]: Calibration (7h). Calculate RX-path IQ imbalance and setting RX path IQ compensation table */
-
-       result = _rx_iq_calibration_loop_winbond(phw_data, 12589, frequency);
-
-       if (result > 0) {
-               _reset_rx_cal(phw_data);
-               result = _rx_iq_calibration_loop_winbond(phw_data, 7943, frequency);
-
-               if (result > 0) {
-                       _reset_rx_cal(phw_data);
-                       result = _rx_iq_calibration_loop_winbond(phw_data, 5011, frequency);
-
-                       if (result > 0) {
-                               PHY_DEBUG(("[CAL] ** <_rx_iq_calibration> **************\n"));
-                               PHY_DEBUG(("[CAL] ** RX_IQ_CALIBRATION FAILURE !!\n"));
-                               PHY_DEBUG(("[CAL] **************************************\n"));
-                               _reset_rx_cal(phw_data);
-                       }
-               }
-       }
-
-#ifdef _DEBUG
-       hw_get_dxx_reg(phw_data, 0x54, &val);
-       PHY_DEBUG(("[CAL]    ** 0x54 = 0x%08X\n", val));
-
-       if (phw_data->revision == 0x2002) /* 1st-cut */{
-               rx_cal_reg[0] = _s4_to_s32((val & 0x0000F000) >> 12);
-               rx_cal_reg[1] = _s4_to_s32((val & 0x00000F00) >>  8);
-               rx_cal_reg[2] = _s4_to_s32((val & 0x000000F0) >>  4);
-               rx_cal_reg[3] = _s4_to_s32((val & 0x0000000F));
-       } else /* 2nd-cut */{
-               rx_cal_reg[0] = _s5_to_s32((val & 0xF8000000) >> 27);
-               rx_cal_reg[1] = _s6_to_s32((val & 0x07E00000) >> 21);
-               rx_cal_reg[2] = _s6_to_s32((val & 0x001F8000) >> 15);
-               rx_cal_reg[3] = _s5_to_s32((val & 0x00007C00) >> 10);
-       }
-
-       PHY_DEBUG(("[CAL]    ** rx_cal_reg[0] = %d\n", rx_cal_reg[0]));
-       PHY_DEBUG(("[CAL]       rx_cal_reg[1] = %d\n", rx_cal_reg[1]));
-       PHY_DEBUG(("[CAL]       rx_cal_reg[2] = %d\n", rx_cal_reg[2]));
-       PHY_DEBUG(("[CAL]       rx_cal_reg[3] = %d\n", rx_cal_reg[3]));
-#endif
-
-}
-
-/*******************************************************/
-void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency)
-{
-       u32     reg_mode_ctrl;
-       u32     iq_alpha;
-
-       PHY_DEBUG(("[CAL] -> phy_calibration_winbond()\n"));
-
-       hw_get_dxx_reg(phw_data, 0x58, &iq_alpha);
-
-       _rxadc_dc_offset_cancellation_winbond(phw_data, frequency);
-       /* _txidac_dc_offset_cancellation_winbond(phw_data); */
-       /* _txqdac_dc_offset_cancellation_winbond(phw_data); */
-
-       _tx_iq_calibration_winbond(phw_data);
-       _rx_iq_calibration_winbond(phw_data, frequency);
-
-       /*********************************************************************/
-       hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl);
-       reg_mode_ctrl &= ~(MASK_IQCAL_TONE_SEL|MASK_IQCAL_MODE|MASK_CALIB_START); /* set when finish */
-       hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-       PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-       /* i. Set RFIC to "Normal mode" */
-       hw_set_dxx_reg(phw_data, 0x58, iq_alpha);
-
-       /*********************************************************************/
-       phy_init_rf(phw_data);
-
-}
-
-/******************/
-void phy_set_rf_data(struct hw_data *pHwData, u32 index, u32 value)
-{
-       u32 ltmp = 0;
-
-       switch (pHwData->phy_type) {
-       case RF_MAXIM_2825:
-       case RF_MAXIM_V1: /* 11g Winbond 2nd BB(with Phy board (v1) + Maxim 331) */
-               ltmp = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(value, 18);
-               break;
-
-       case RF_MAXIM_2827:
-               ltmp = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(value, 18);
-               break;
-
-       case RF_MAXIM_2828:
-               ltmp = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(value, 18);
-               break;
-
-       case RF_MAXIM_2829:
-               ltmp = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(value, 18);
-               break;
-
-       case RF_AIROHA_2230:
-       case RF_AIROHA_2230S: /* 20060420 Add this */
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(value, 20);
-               break;
-
-       case RF_AIROHA_7230:
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | (value&0xffffff);
-               break;
-
-       case RF_WB_242:
-       case RF_WB_242_1:/* 20060619.5 Add */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse(value, 24);
-               break;
-       }
-
-       Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-}
-
-/* 20060717 modify as Bruce's mail */
-unsigned char adjust_TXVGA_for_iq_mag(struct hw_data *phw_data)
-{
-       int init_txvga = 0;
-       u32     reg_mode_ctrl;
-       u32     val;
-       s32     iqcal_tone_i0;
-       s32     iqcal_tone_q0;
-       u32     sqsum;
-       s32     iq_mag_0_tx;
-       u8      reg_state;
-       int     current_txvga;
-
-
-       reg_state = 0;
-       for (init_txvga = 0; init_txvga < 10; init_txvga++) {
-               current_txvga = (0x24C40A|(init_txvga<<6));
-               phy_set_rf_data(phw_data, 5, ((5<<24)|current_txvga));
-               phw_data->txvga_setting_for_cal = current_txvga;
-
-               msleep(30);/* 20060612.1.a */
-
-               if (!hw_get_dxx_reg(phw_data, REG_MODE_CTRL, &reg_mode_ctrl))/* 20060718.1 modify */
-                       return false;
-
-               PHY_DEBUG(("[CAL]    MODE_CTRL (read) = 0x%08X\n", reg_mode_ctrl));
-
-               /*
-                * a. Set iqcal_mode[1:0] to 0x2 and set "calib_start" to 0x1 to
-                *    enable "IQ alibration Mode II"
-                */
-               reg_mode_ctrl &= ~(MASK_IQCAL_TONE_SEL|MASK_IQCAL_MODE);
-               reg_mode_ctrl &= ~MASK_IQCAL_MODE;
-               reg_mode_ctrl |= (MASK_CALIB_START|0x02);
-               reg_mode_ctrl |= (MASK_CALIB_START|0x02|2<<2);
-               hw_set_dxx_reg(phw_data, REG_MODE_CTRL, reg_mode_ctrl);
-               PHY_DEBUG(("[CAL]    MODE_CTRL (write) = 0x%08X\n", reg_mode_ctrl));
-
-               udelay(1);/* 20060612.1.a */
-
-               udelay(300);/* 20060612.1.a */
-
-               /* b. */
-               hw_get_dxx_reg(phw_data, REG_CALIB_READ1, &val);
-
-               PHY_DEBUG(("[CAL]    CALIB_READ1 = 0x%08X\n", val));
-               udelay(300);/* 20060612.1.a */
-
-               iqcal_tone_i0 = _s13_to_s32(val & 0x00001FFF);
-               iqcal_tone_q0 = _s13_to_s32((val & 0x03FFE000) >> 13);
-               PHY_DEBUG(("[CAL]    ** iqcal_tone_i0=%d, iqcal_tone_q0=%d\n",
-                                  iqcal_tone_i0, iqcal_tone_q0));
-
-               sqsum = iqcal_tone_i0*iqcal_tone_i0 + iqcal_tone_q0*iqcal_tone_q0;
-               iq_mag_0_tx = (s32) _sqrt(sqsum);
-               PHY_DEBUG(("[CAL]    ** auto_adjust_txvga_for_iq_mag_0_tx=%d\n",
-                          iq_mag_0_tx));
-
-               if (iq_mag_0_tx >= 700 && iq_mag_0_tx <= 1750)
-                       break;
-               else if (iq_mag_0_tx > 1750) {
-                       init_txvga = -2;
-                       continue;
-               } else
-                       continue;
-
-       }
-
-       if (iq_mag_0_tx >= 700 && iq_mag_0_tx <= 1750)
-               return true;
-       else
-               return false;
-}
diff --git a/drivers/staging/winbond/phy_calibration.h b/drivers/staging/winbond/phy_calibration.h
deleted file mode 100644 (file)
index 78fc680..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-#ifndef __WINBOND_PHY_CALIBRATION_H
-#define __WINBOND_PHY_CALIBRATION_H
-
-#include "wbhal.h"
-
-#define REG_AGC_CTRL1          0x1000
-#define REG_AGC_CTRL2          0x1004
-#define REG_AGC_CTRL3          0x1008
-#define REG_AGC_CTRL4          0x100C
-#define REG_AGC_CTRL5          0x1010
-#define REG_AGC_CTRL6          0x1014
-#define REG_AGC_CTRL7          0x1018
-#define REG_AGC_CTRL8          0x101C
-#define REG_AGC_CTRL9          0x1020
-#define REG_AGC_CTRL10         0x1024
-#define REG_CCA_CTRL           0x1028
-#define REG_A_ACQ_CTRL         0x102C
-#define REG_B_ACQ_CTRL         0x1030
-#define REG_A_TXRX_CTRL                0x1034
-#define REG_B_TXRX_CTRL                0x1038
-#define REG_A_TX_COEF3         0x103C
-#define REG_A_TX_COEF2         0x1040
-#define REG_A_TX_COEF1         0x1044
-#define REG_B_TX_COEF2         0x1048
-#define REG_B_TX_COEF1         0x104C
-#define REG_MODE_CTRL          0x1050
-#define REG_CALIB_DATA         0x1054
-#define REG_IQ_ALPHA           0x1058
-#define REG_DC_CANCEL          0x105C
-#define REG_WTO_READ           0x1060
-#define REG_OFFSET_READ                0x1064
-#define REG_CALIB_READ1                0x1068
-#define REG_CALIB_READ2                0x106C
-#define REG_A_FREQ_EST         0x1070
-
-
-#define MASK_AMER_OFF_REG      BIT(31)
-
-#define MASK_BMER_OFF_REG      BIT(31)
-
-#define MASK_LNA_FIX_GAIN      (BIT(3) | BIT(4))
-#define MASK_AGC_FIX           BIT(1)
-
-#define MASK_AGC_FIX_GAIN      0xFF00
-
-#define MASK_ADC_DC_CAL_STR    BIT(10)
-#define MASK_CALIB_START       BIT(4)
-#define MASK_IQCAL_TONE_SEL    (BIT(3) | BIT(2))
-#define MASK_IQCAL_MODE                (BIT(1) | BIT(0))
-
-#define MASK_TX_CAL_0          0xF0000000
-#define TX_CAL_0_SHIFT         28
-#define MASK_TX_CAL_1          0x0F000000
-#define TX_CAL_1_SHIFT         24
-#define MASK_TX_CAL_2          0x00F00000
-#define TX_CAL_2_SHIFT         20
-#define MASK_TX_CAL_3          0x000F0000
-#define TX_CAL_3_SHIFT         16
-#define MASK_RX_CAL_0          0x0000F000
-#define RX_CAL_0_SHIFT         12
-#define MASK_RX_CAL_1          0x00000F00
-#define RX_CAL_1_SHIFT         8
-#define MASK_RX_CAL_2          0x000000F0
-#define RX_CAL_2_SHIFT         4
-#define MASK_RX_CAL_3          0x0000000F
-#define RX_CAL_3_SHIFT         0
-
-#define MASK_CANCEL_DC_I       0x3E0
-#define CANCEL_DC_I_SHIFT      5
-#define MASK_CANCEL_DC_Q       0x01F
-#define CANCEL_DC_Q_SHIFT      0
-
-#define MASK_ADC_DC_CAL_I(x)   (((x) & 0x0003FE00) >> 9)
-#define MASK_ADC_DC_CAL_Q(x)   ((x) & 0x000001FF)
-
-#define MASK_IQCAL_TONE_I      0x00001FFF
-#define SHIFT_IQCAL_TONE_I(x)  ((x) >> 0)
-#define MASK_IQCAL_TONE_Q      0x03FFE000
-#define SHIFT_IQCAL_TONE_Q(x)  ((x) >> 13)
-
-void phy_set_rf_data(struct hw_data *pHwData, u32 index, u32 value);
-void phy_calibration_winbond(struct hw_data *phw_data, u32 frequency);
-#define phy_init_rf(_A)                /* RFSynthesizer_initial(_A) */
-
-#endif
diff --git a/drivers/staging/winbond/reg.c b/drivers/staging/winbond/reg.c
deleted file mode 100644 (file)
index 5fd4c4a..0000000
+++ /dev/null
@@ -1,2328 +0,0 @@
-#include "wbhal.h"
-#include "wb35reg_f.h"
-#include "core.h"
-
-/*
- * ====================================================
- * Original Phy.h
- * ====================================================
- */
-
-/*
- * ====================================================
- * For MAXIM2825/6/7 Ver. 331 or more
- *
- * 0x00 0x000a2
- * 0x01 0x21cc0
- * 0x02 0x13802
- * 0x02 0x1383a
- *
- * channe1 01 ; 0x03 0x30142 ; 0x04 0x0b333;
- * channe1 02 ; 0x03 0x32141 ; 0x04 0x08444;
- * channe1 03 ; 0x03 0x32143 ; 0x04 0x0aeee;
- * channe1 04 ; 0x03 0x32142 ; 0x04 0x0b333;
- * channe1 05 ; 0x03 0x31141 ; 0x04 0x08444;
- * channe1 06 ; 0x03 0x31143 ; 0x04 0x0aeee;
- * channe1 07 ; 0x03 0x31142 ; 0x04 0x0b333;
- * channe1 08 ; 0x03 0x33141 ; 0x04 0x08444;
- * channe1 09 ; 0x03 0x33143 ; 0x04 0x0aeee;
- * channe1 10 ; 0x03 0x33142 ; 0x04 0x0b333;
- * channe1 11 ; 0x03 0x30941 ; 0x04 0x08444;
- * channe1 12 ; 0x03 0x30943 ; 0x04 0x0aeee;
- * channe1 13 ; 0x03 0x30942 ; 0x04 0x0b333;
- *
- * 0x05 0x28986
- * 0x06 0x18008
- * 0x07 0x38400
- * 0x08 0x05100; 100 Hz DC
- * 0x08 0x05900; 30 KHz DC
- * 0x09 0x24f08
- * 0x0a 0x17e00, 0x17ea0
- * 0x0b 0x37d80
- * 0x0c 0x0c900  --  0x0ca00 (lager power 9db than 0x0c000), 0x0c000
- */
-
-/* MAX2825 (pure b/g) */
-static u32 max2825_rf_data[] = {
-       (0x00<<18) | 0x000a2,
-       (0x01<<18) | 0x21cc0,
-       (0x02<<18) | 0x13806,
-       (0x03<<18) | 0x30142,
-       (0x04<<18) | 0x0b333,
-       (0x05<<18) | 0x289A6,
-       (0x06<<18) | 0x18008,
-       (0x07<<18) | 0x38000,
-       (0x08<<18) | 0x05100,
-       (0x09<<18) | 0x24f08,
-       (0x0A<<18) | 0x14000,
-       (0x0B<<18) | 0x37d80,
-       (0x0C<<18) | 0x0c100   /* 11a: 0x0c300, 11g: 0x0c100 */
-};
-
-static u32 max2825_channel_data_24[][3] = {
-       {(0x03 << 18) | 0x30142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channel 01 */
-       {(0x03 << 18) | 0x32141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channel 02 */
-       {(0x03 << 18) | 0x32143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channel 03 */
-       {(0x03 << 18) | 0x32142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channel 04 */
-       {(0x03 << 18) | 0x31141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channel 05 */
-       {(0x03 << 18) | 0x31143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channel 06 */
-       {(0x03 << 18) | 0x31142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channel 07 */
-       {(0x03 << 18) | 0x33141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channel 08 */
-       {(0x03 << 18) | 0x33143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channel 09 */
-       {(0x03 << 18) | 0x33142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channel 10 */
-       {(0x03 << 18) | 0x30941, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channel 11 */
-       {(0x03 << 18) | 0x30943, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channel 12 */
-       {(0x03 << 18) | 0x30942, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channel 13 */
-       {(0x03 << 18) | 0x32941, (0x04 << 18) | 0x09999, (0x05 << 18) | 0x289A6}  /* channel 14 (2484MHz) */
-};
-
-static u32 max2825_power_data_24[] = {(0x0C << 18) | 0x0c000, (0x0C << 18) | 0x0c100};
-
-/* ========================================== */
-/* MAX2827 (a/b/g) */
-static u32 max2827_rf_data[] = {
-       (0x00 << 18) | 0x000a2,
-       (0x01 << 18) | 0x21cc0,
-       (0x02 << 18) | 0x13806,
-       (0x03 << 18) | 0x30142,
-       (0x04 << 18) | 0x0b333,
-       (0x05 << 18) | 0x289A6,
-       (0x06 << 18) | 0x18008,
-       (0x07 << 18) | 0x38000,
-       (0x08 << 18) | 0x05100,
-       (0x09 << 18) | 0x24f08,
-       (0x0A << 18) | 0x14000,
-       (0x0B << 18) | 0x37d80,
-       (0x0C << 18) | 0x0c100   /* 11a: 0x0c300, 11g: 0x0c100 */
-};
-
-static u32 max2827_channel_data_24[][3] = {
-       {(0x03 << 18) | 0x30142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 01 */
-       {(0x03 << 18) | 0x32141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 02 */
-       {(0x03 << 18) | 0x32143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 03 */
-       {(0x03 << 18) | 0x32142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 04 */
-       {(0x03 << 18) | 0x31141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 05 */
-       {(0x03 << 18) | 0x31143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 06 */
-       {(0x03 << 18) | 0x31142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 07 */
-       {(0x03 << 18) | 0x33141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 08 */
-       {(0x03 << 18) | 0x33143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 09 */
-       {(0x03 << 18) | 0x33142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 10 */
-       {(0x03 << 18) | 0x30941, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 11 */
-       {(0x03 << 18) | 0x30943, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 12 */
-       {(0x03 << 18) | 0x30942, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 13 */
-       {(0x03 << 18) | 0x32941, (0x04 << 18) | 0x09999, (0x05 << 18) | 0x289A6}  /* channel 14 (2484MHz) */
-};
-
-static u32 max2827_channel_data_50[][3] = {
-       {(0x03 << 18) | 0x33cc3, (0x04 << 18) | 0x08ccc, (0x05 << 18) | 0x2A9A6}, /* channel 36 */
-       {(0x03 << 18) | 0x302c0, (0x04 << 18) | 0x08000, (0x05 << 18) | 0x2A9A6}, /* channel 40 */
-       {(0x03 << 18) | 0x302c2, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x2A9A6}, /* channel 44 */
-       {(0x03 << 18) | 0x322c1, (0x04 << 18) | 0x09999, (0x05 << 18) | 0x2A9A6}, /* channel 48 */
-       {(0x03 << 18) | 0x312c1, (0x04 << 18) | 0x0a666, (0x05 << 18) | 0x2A9A6}, /* channel 52 */
-       {(0x03 << 18) | 0x332c3, (0x04 << 18) | 0x08ccc, (0x05 << 18) | 0x2A9A6}, /* channel 56 */
-       {(0x03 << 18) | 0x30ac0, (0x04 << 18) | 0x08000, (0x05 << 18) | 0x2A9A6}, /* channel 60 */
-       {(0x03 << 18) | 0x30ac2, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x2A9A6}  /* channel 64 */
-};
-
-static u32 max2827_power_data_24[] = {(0x0C << 18) | 0x0C000, (0x0C << 18) | 0x0D600, (0x0C << 18) | 0x0C100};
-static u32 max2827_power_data_50[] = {(0x0C << 18) | 0x0C400, (0x0C << 18) | 0x0D500, (0x0C << 18) | 0x0C300};
-
-/* ======================================================= */
-/* MAX2828 (a/b/g) */
-static u32 max2828_rf_data[] = {
-       (0x00 << 18) | 0x000a2,
-       (0x01 << 18) | 0x21cc0,
-       (0x02 << 18) | 0x13806,
-       (0x03 << 18) | 0x30142,
-       (0x04 << 18) | 0x0b333,
-       (0x05 << 18) | 0x289A6,
-       (0x06 << 18) | 0x18008,
-       (0x07 << 18) | 0x38000,
-       (0x08 << 18) | 0x05100,
-       (0x09 << 18) | 0x24f08,
-       (0x0A << 18) | 0x14000,
-       (0x0B << 18) | 0x37d80,
-       (0x0C << 18) | 0x0c100   /* 11a: 0x0c300, 11g: 0x0c100 */
-};
-
-static u32 max2828_channel_data_24[][3] = {
-       {(0x03 << 18) | 0x30142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 01 */
-       {(0x03 << 18) | 0x32141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 02 */
-       {(0x03 << 18) | 0x32143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 03 */
-       {(0x03 << 18) | 0x32142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 04 */
-       {(0x03 << 18) | 0x31141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 05 */
-       {(0x03 << 18) | 0x31143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 06 */
-       {(0x03 << 18) | 0x31142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 07 */
-       {(0x03 << 18) | 0x33141, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 08 */
-       {(0x03 << 18) | 0x33143, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 09 */
-       {(0x03 << 18) | 0x33142, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 10 */
-       {(0x03 << 18) | 0x30941, (0x04 << 18) | 0x08444, (0x05 << 18) | 0x289A6}, /* channe1 11 */
-       {(0x03 << 18) | 0x30943, (0x04 << 18) | 0x0aeee, (0x05 << 18) | 0x289A6}, /* channe1 12 */
-       {(0x03 << 18) | 0x30942, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channe1 13 */
-       {(0x03 << 18) | 0x32941, (0x04 << 18) | 0x09999, (0x05 << 18) | 0x289A6}  /* channel 14 (2484MHz) */
-};
-
-static u32 max2828_channel_data_50[][3] = {
-       {(0x03 << 18) | 0x33cc3, (0x04 << 18) | 0x08ccc, (0x05 << 18) | 0x289A6}, /* channel 36 */
-       {(0x03 << 18) | 0x302c0, (0x04 << 18) | 0x08000, (0x05 << 18) | 0x289A6}, /* channel 40 */
-       {(0x03 << 18) | 0x302c2, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}, /* channel 44 */
-       {(0x03 << 18) | 0x322c1, (0x04 << 18) | 0x09999, (0x05 << 18) | 0x289A6}, /* channel 48 */
-       {(0x03 << 18) | 0x312c1, (0x04 << 18) | 0x0a666, (0x05 << 18) | 0x289A6}, /* channel 52 */
-       {(0x03 << 18) | 0x332c3, (0x04 << 18) | 0x08ccc, (0x05 << 18) | 0x289A6}, /* channel 56 */
-       {(0x03 << 18) | 0x30ac0, (0x04 << 18) | 0x08000, (0x05 << 18) | 0x289A6}, /* channel 60 */
-       {(0x03 << 18) | 0x30ac2, (0x04 << 18) | 0x0b333, (0x05 << 18) | 0x289A6}  /* channel 64 */
-};
-
-static u32 max2828_power_data_24[] = {(0x0C << 18) | 0x0c000, (0x0C << 18) | 0x0c100};
-static u32 max2828_power_data_50[] = {(0x0C << 18) | 0x0c000, (0x0C << 18) | 0x0c100};
-
-/* ========================================================== */
-/* MAX2829 (a/b/g) */
-static u32 max2829_rf_data[] = {
-       (0x00 << 18) | 0x000a2,
-       (0x01 << 18) | 0x23520,
-       (0x02 << 18) | 0x13802,
-       (0x03 << 18) | 0x30142,
-       (0x04 << 18) | 0x0b333,
-       (0x05 << 18) | 0x28906,
-       (0x06 << 18) | 0x18008,
-       (0x07 << 18) | 0x3B500,
-       (0x08 << 18) | 0x05100,
-       (0x09 << 18) | 0x24f08,
-       (0x0A << 18) | 0x14000,
-       (0x0B << 18) | 0x37d80,
-       (0x0C << 18) | 0x0F300 /* TXVGA=51, (MAX-6 dB) */
-};
-
-static u32 max2829_channel_data_24[][3] = {
-       {(3 << 18) | 0x30142, (4 << 18) | 0x0b333, (5 << 18) | 0x289C6},  /* 01 (2412MHz) */
-       {(3 << 18) | 0x32141, (4 << 18) | 0x08444, (5 << 18) | 0x289C6},  /* 02 (2417MHz) */
-       {(3 << 18) | 0x32143, (4 << 18) | 0x0aeee, (5 << 18) | 0x289C6},  /* 03 (2422MHz) */
-       {(3 << 18) | 0x32142, (4 << 18) | 0x0b333, (5 << 18) | 0x289C6},  /* 04 (2427MHz) */
-       {(3 << 18) | 0x31141, (4 << 18) | 0x08444, (5 << 18) | 0x289C6},  /* 05 (2432MHz) */
-       {(3 << 18) | 0x31143, (4 << 18) | 0x0aeee, (5 << 18) | 0x289C6},  /* 06 (2437MHz) */
-       {(3 << 18) | 0x31142, (4 << 18) | 0x0b333, (5 << 18) | 0x289C6},  /* 07 (2442MHz) */
-       {(3 << 18) | 0x33141, (4 << 18) | 0x08444, (5 << 18) | 0x289C6},  /* 08 (2447MHz) */
-       {(3 << 18) | 0x33143, (4 << 18) | 0x0aeee, (5 << 18) | 0x289C6},  /* 09 (2452MHz) */
-       {(3 << 18) | 0x33142, (4 << 18) | 0x0b333, (5 << 18) | 0x289C6},  /* 10 (2457MHz) */
-       {(3 << 18) | 0x30941, (4 << 18) | 0x08444, (5 << 18) | 0x289C6},  /* 11 (2462MHz) */
-       {(3 << 18) | 0x30943, (4 << 18) | 0x0aeee, (5 << 18) | 0x289C6},  /* 12 (2467MHz) */
-       {(3 << 18) | 0x30942, (4 << 18) | 0x0b333, (5 << 18) | 0x289C6},  /* 13 (2472MHz) */
-       {(3 << 18) | 0x32941, (4 << 18) | 0x09999, (5 << 18) | 0x289C6},  /* 14 (2484MHz) */
-};
-
-static u32 max2829_channel_data_50[][4] = {
-       {36, (3 << 18) | 0x33cc3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A946}, /* 36 (5.180GHz) */
-       {40, (3 << 18) | 0x302c0, (4 << 18) | 0x08000, (5 << 18) | 0x2A946}, /* 40 (5.200GHz) */
-       {44, (3 << 18) | 0x302c2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A946}, /* 44 (5.220GHz) */
-       {48, (3 << 18) | 0x322c1, (4 << 18) | 0x09999, (5 << 18) | 0x2A946}, /* 48 (5.240GHz) */
-       {52, (3 << 18) | 0x312c1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A946}, /* 52 (5.260GHz) */
-       {56, (3 << 18) | 0x332c3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A946}, /* 56 (5.280GHz) */
-       {60, (3 << 18) | 0x30ac0, (4 << 18) | 0x08000, (5 << 18) | 0x2A946}, /* 60 (5.300GHz) */
-       {64, (3 << 18) | 0x30ac2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A946}, /* 64 (5.320GHz) */
-
-       {100, (3 << 18) | 0x30ec0, (4 << 18) | 0x08000, (5 << 18) | 0x2A9C6}, /* 100 (5.500GHz) */
-       {104, (3 << 18) | 0x30ec2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A9C6}, /* 104 (5.520GHz) */
-       {108, (3 << 18) | 0x32ec1, (4 << 18) | 0x09999, (5 << 18) | 0x2A9C6}, /* 108 (5.540GHz) */
-       {112, (3 << 18) | 0x31ec1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A9C6}, /* 112 (5.560GHz) */
-       {116, (3 << 18) | 0x33ec3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A9C6}, /* 116 (5.580GHz) */
-       {120, (3 << 18) | 0x301c0, (4 << 18) | 0x08000, (5 << 18) | 0x2A9C6}, /* 120 (5.600GHz) */
-       {124, (3 << 18) | 0x301c2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A9C6}, /* 124 (5.620GHz) */
-       {128, (3 << 18) | 0x321c1, (4 << 18) | 0x09999, (5 << 18) | 0x2A9C6}, /* 128 (5.640GHz) */
-       {132, (3 << 18) | 0x311c1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A9C6}, /* 132 (5.660GHz) */
-       {136, (3 << 18) | 0x331c3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A9C6}, /* 136 (5.680GHz) */
-       {140, (3 << 18) | 0x309c0, (4 << 18) | 0x08000, (5 << 18) | 0x2A9C6}, /* 140 (5.700GHz) */
-
-       {149, (3 << 18) | 0x329c2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A9C6}, /* 149 (5.745GHz) */
-       {153, (3 << 18) | 0x319c1, (4 << 18) | 0x09999, (5 << 18) | 0x2A9C6}, /* 153 (5.765GHz) */
-       {157, (3 << 18) | 0x339c1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A9C6}, /* 157 (5.785GHz) */
-       {161, (3 << 18) | 0x305c3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A9C6}, /* 161 (5.805GHz) */
-
-       /* Japan */
-       { 184, (3 << 18) | 0x308c2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A946}, /* 184 (4.920GHz) */
-       { 188, (3 << 18) | 0x328c1, (4 << 18) | 0x09999, (5 << 18) | 0x2A946}, /* 188 (4.940GHz) */
-       { 192, (3 << 18) | 0x318c1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A946}, /* 192 (4.960GHz) */
-       { 196, (3 << 18) | 0x338c3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A946}, /* 196 (4.980GHz) */
-       {   8, (3 << 18) | 0x324c1, (4 << 18) | 0x09999, (5 << 18) | 0x2A946}, /*   8 (5.040GHz) */
-       {  12, (3 << 18) | 0x314c1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A946}, /*  12 (5.060GHz) */
-       {  16, (3 << 18) | 0x334c3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A946}, /*  16 (5.080GHz) */
-       {  34, (3 << 18) | 0x31cc2, (4 << 18) | 0x0b333, (5 << 18) | 0x2A946}, /*  34 (5.170GHz) */
-       {  38, (3 << 18) | 0x33cc1, (4 << 18) | 0x09999, (5 << 18) | 0x2A946}, /*  38 (5.190GHz) */
-       {  42, (3 << 18) | 0x302c1, (4 << 18) | 0x0a666, (5 << 18) | 0x2A946}, /*  42 (5.210GHz) */
-       {  46, (3 << 18) | 0x322c3, (4 << 18) | 0x08ccc, (5 << 18) | 0x2A946}, /*  46 (5.230GHz) */
-};
-
-/*
- * ====================================================================
- * For MAXIM2825/6/7 Ver. 317 or less
- *
- * 0x00 0x00080
- * 0x01 0x214c0
- * 0x02 0x13802
- *
- * 2.4GHz Channels
- * channe1 01 (2.412GHz); 0x03 0x30143 ;0x04 0x0accc
- * channe1 02 (2.417GHz); 0x03 0x32140 ;0x04 0x09111
- * channe1 03 (2.422GHz); 0x03 0x32142 ;0x04 0x0bbbb
- * channe1 04 (2.427GHz); 0x03 0x32143 ;0x04 0x0accc
- * channe1 05 (2.432GHz); 0x03 0x31140 ;0x04 0x09111
- * channe1 06 (2.437GHz); 0x03 0x31142 ;0x04 0x0bbbb
- * channe1 07 (2.442GHz); 0x03 0x31143 ;0x04 0x0accc
- * channe1 08 (2.447GHz); 0x03 0x33140 ;0x04 0x09111
- * channe1 09 (2.452GHz); 0x03 0x33142 ;0x04 0x0bbbb
- * channe1 10 (2.457GHz); 0x03 0x33143 ;0x04 0x0accc
- * channe1 11 (2.462GHz); 0x03 0x30940 ;0x04 0x09111
- * channe1 12 (2.467GHz); 0x03 0x30942 ;0x04 0x0bbbb
- * channe1 13 (2.472GHz); 0x03 0x30943 ;0x04 0x0accc
- *
- * 5.0Ghz Channels
- * channel 36 (5.180GHz); 0x03 0x33cc0 ;0x04 0x0b333
- * channel 40 (5.200GHz); 0x03 0x302c0 ;0x04 0x08000
- * channel 44 (5.220GHz); 0x03 0x302c2 ;0x04 0x0b333
- * channel 48 (5.240GHz); 0x03 0x322c1 ;0x04 0x09999
- * channel 52 (5.260GHz); 0x03 0x312c1 ;0x04 0x0a666
- * channel 56 (5.280GHz); 0x03 0x332c3 ;0x04 0x08ccc
- * channel 60 (5.300GHz); 0x03 0x30ac0 ;0x04 0x08000
- * channel 64 (5.320GHz); 0x03 0x30ac2 ;0x04 0x08333
- *
- * 2.4GHz band ; 0x05 0x28986;
- * 5.0GHz band ; 0x05 0x2a986
- * 0x06 0x18008
- * 0x07 0x38400
- * 0x08 0x05108
- * 0x09 0x27ff8
- * 0x0a 0x14000
- * 0x0b 0x37f99
- * 0x0c 0x0c000
- * ====================================================================
- */
-
-/*
- * ===================================================================
- * AL2230 MP (Mass Production Version)
- * RF Registers Setting for Airoha AL2230 silicon after June 1st, 2004
- * 20-bit length and LSB first
- *
- * Ch01 (2412MHz) ;0x00 0x09EFC ;0x01 0x8CCCC;
- * Ch02 (2417MHz) ;0x00 0x09EFC ;0x01 0x8CCCD;
- * Ch03 (2422MHz) ;0x00 0x09E7C ;0x01 0x8CCCC;
- * Ch04 (2427MHz) ;0x00 0x09E7C ;0x01 0x8CCCD;
- * Ch05 (2432MHz) ;0x00 0x05EFC ;0x01 0x8CCCC;
- * Ch06 (2437MHz) ;0x00 0x05EFC ;0x01 0x8CCCD;
- * Ch07 (2442MHz) ;0x00 0x05E7C ;0x01 0x8CCCC;
- * Ch08 (2447MHz) ;0x00 0x05E7C ;0x01 0x8CCCD;
- * Ch09 (2452MHz) ;0x00 0x0DEFC ;0x01 0x8CCCC;
- * Ch10 (2457MHz) ;0x00 0x0DEFC ;0x01 0x8CCCD;
- * Ch11 (2462MHz) ;0x00 0x0DE7C ;0x01 0x8CCCC;
- * Ch12 (2467MHz) ;0x00 0x0DE7C ;0x01 0x8CCCD;
- * Ch13 (2472MHz) ;0x00 0x03EFC ;0x01 0x8CCCC;
- * Ch14 (2484Mhz) ;0x00 0x03E7C ;0x01 0x86666;
- *
- * 0x02 0x401D8; RXDCOC BW 100Hz for RXHP low
- * 0x02 0x481DC; RXDCOC BW 30Khz for RXHP low
- *
- * 0x03 0xCFFF0
- * 0x04 0x23800
- * 0x05 0xA3B72
- * 0x06 0x6DA01
- * 0x07 0xE1688
- * 0x08 0x11600
- * 0x09 0x99E02
- * 0x0A 0x5DDB0
- * 0x0B 0xD9900
- * 0x0C 0x3FFBD
- * 0x0D 0xB0000
- * 0x0F 0xF00A0
- *
- * RF Calibration for Airoha AL2230
- *
- * 0x0f 0xf00a0 ; Initial Setting
- * 0x0f 0xf00b0 ; Activate TX DCC
- * 0x0f 0xf02a0 ; Activate Phase Calibration
- * 0x0f 0xf00e0 ; Activate Filter RC Calibration
- * 0x0f 0xf00a0 ; Restore Initial Setting
- * ==================================================================
- */
-static u32 al2230_rf_data[] = {
-       (0x00 << 20) | 0x09EFC,
-       (0x01 << 20) | 0x8CCCC,
-       (0x02 << 20) | 0x40058,
-       (0x03 << 20) | 0xCFFF0,
-       (0x04 << 20) | 0x24100,
-       (0x05 << 20) | 0xA3B2F,
-       (0x06 << 20) | 0x6DA01,
-       (0x07 << 20) | 0xE3628,
-       (0x08 << 20) | 0x11600,
-       (0x09 << 20) | 0x9DC02,
-       (0x0A << 20) | 0x5ddb0,
-       (0x0B << 20) | 0xD9900,
-       (0x0C << 20) | 0x3FFBD,
-       (0x0D << 20) | 0xB0000,
-       (0x0F << 20) | 0xF01A0
-};
-
-static u32 al2230s_rf_data[] = {
-       (0x00 << 20) | 0x09EFC,
-       (0x01 << 20) | 0x8CCCC,
-       (0x02 << 20) | 0x40058,
-       (0x03 << 20) | 0xCFFF0,
-       (0x04 << 20) | 0x24100,
-       (0x05 << 20) | 0xA3B2F,
-       (0x06 << 20) | 0x6DA01,
-       (0x07 << 20) | 0xE3628,
-       (0x08 << 20) | 0x11600,
-       (0x09 << 20) | 0x9DC02,
-       (0x0A << 20) | 0x5DDB0,
-       (0x0B << 20) | 0xD9900,
-       (0x0C << 20) | 0x3FFBD,
-       (0x0D << 20) | 0xB0000,
-       (0x0F << 20) | 0xF01A0
-};
-
-static u32 al2230_channel_data_24[][2] = {
-       {(0x00 << 20) | 0x09EFC, (0x01 << 20) | 0x8CCCC}, /* channe1 01 */
-       {(0x00 << 20) | 0x09EFC, (0x01 << 20) | 0x8CCCD}, /* channe1 02 */
-       {(0x00 << 20) | 0x09E7C, (0x01 << 20) | 0x8CCCC}, /* channe1 03 */
-       {(0x00 << 20) | 0x09E7C, (0x01 << 20) | 0x8CCCD}, /* channe1 04 */
-       {(0x00 << 20) | 0x05EFC, (0x01 << 20) | 0x8CCCC}, /* channe1 05 */
-       {(0x00 << 20) | 0x05EFC, (0x01 << 20) | 0x8CCCD}, /* channe1 06 */
-       {(0x00 << 20) | 0x05E7C, (0x01 << 20) | 0x8CCCC}, /* channe1 07 */
-       {(0x00 << 20) | 0x05E7C, (0x01 << 20) | 0x8CCCD}, /* channe1 08 */
-       {(0x00 << 20) | 0x0DEFC, (0x01 << 20) | 0x8CCCC}, /* channe1 09 */
-       {(0x00 << 20) | 0x0DEFC, (0x01 << 20) | 0x8CCCD}, /* channe1 10 */
-       {(0x00 << 20) | 0x0DE7C, (0x01 << 20) | 0x8CCCC}, /* channe1 11 */
-       {(0x00 << 20) | 0x0DE7C, (0x01 << 20) | 0x8CCCD}, /* channe1 12 */
-       {(0x00 << 20) | 0x03EFC, (0x01 << 20) | 0x8CCCC}, /* channe1 13 */
-       {(0x00 << 20) | 0x03E7C, (0x01 << 20) | 0x86666}  /* channe1 14 */
-};
-
-/* Current setting. u32 airoha_power_data_24[] = {(0x09 << 20) | 0x90202, (0x09 << 20) | 0x96602, (0x09 << 20) | 0x97602}; */
-#define AIROHA_TXVGA_LOW_INDEX         31      /* Index for 0x90202 */
-#define AIROHA_TXVGA_MIDDLE_INDEX      12      /* Index for 0x96602 */
-#define AIROHA_TXVGA_HIGH_INDEX                8       /* Index for 0x97602 1.0.24.0 1.0.28.0 */
-
-static u32 al2230_txvga_data[][2] = {
-       /* value , index */
-       {0x090202, 0},
-       {0x094202, 2},
-       {0x092202, 4},
-       {0x096202, 6},
-       {0x091202, 8},
-       {0x095202, 10},
-       {0x093202, 12},
-       {0x097202, 14},
-       {0x090A02, 16},
-       {0x094A02, 18},
-       {0x092A02, 20},
-       {0x096A02, 22},
-       {0x091A02, 24},
-       {0x095A02, 26},
-       {0x093A02, 28},
-       {0x097A02, 30},
-       {0x090602, 32},
-       {0x094602, 34},
-       {0x092602, 36},
-       {0x096602, 38},
-       {0x091602, 40},
-       {0x095602, 42},
-       {0x093602, 44},
-       {0x097602, 46},
-       {0x090E02, 48},
-       {0x098E02, 49},
-       {0x094E02, 50},
-       {0x09CE02, 51},
-       {0x092E02, 52},
-       {0x09AE02, 53},
-       {0x096E02, 54},
-       {0x09EE02, 55},
-       {0x091E02, 56},
-       {0x099E02, 57},
-       {0x095E02, 58},
-       {0x09DE02, 59},
-       {0x093E02, 60},
-       {0x09BE02, 61},
-       {0x097E02, 62},
-       {0x09FE02, 63}
-};
-
-/*
- * ==========================================
- * For Airoha AL7230, 2.4Ghz band
- * 24bit, MSB first
- */
-
-/* channel independent registers: */
-static u32 al7230_rf_data_24[] = {
-       (0x00 << 24) | 0x003790,
-       (0x01 << 24) | 0x133331,
-       (0x02 << 24) | 0x841FF2,
-       (0x03 << 24) | 0x3FDFA3,
-       (0x04 << 24) | 0x7FD784,
-       (0x05 << 24) | 0x802B55,
-       (0x06 << 24) | 0x56AF36,
-       (0x07 << 24) | 0xCE0207,
-       (0x08 << 24) | 0x6EBC08,
-       (0x09 << 24) | 0x221BB9,
-       (0x0A << 24) | 0xE0000A,
-       (0x0B << 24) | 0x08071B,
-       (0x0C << 24) | 0x000A3C,
-       (0x0D << 24) | 0xFFFFFD,
-       (0x0E << 24) | 0x00000E,
-       (0x0F << 24) | 0x1ABA8F
-};
-
-static u32 al7230_channel_data_24[][2] = {
-       {(0x00 << 24) | 0x003790, (0x01 << 24) | 0x133331}, /* channe1 01 */
-       {(0x00 << 24) | 0x003790, (0x01 << 24) | 0x1B3331}, /* channe1 02 */
-       {(0x00 << 24) | 0x003790, (0x01 << 24) | 0x033331}, /* channe1 03 */
-       {(0x00 << 24) | 0x003790, (0x01 << 24) | 0x0B3331}, /* channe1 04 */
-       {(0x00 << 24) | 0x0037A0, (0x01 << 24) | 0x133331}, /* channe1 05 */
-       {(0x00 << 24) | 0x0037A0, (0x01 << 24) | 0x1B3331}, /* channe1 06 */
-       {(0x00 << 24) | 0x0037A0, (0x01 << 24) | 0x033331}, /* channe1 07 */
-       {(0x00 << 24) | 0x0037A0, (0x01 << 24) | 0x0B3331}, /* channe1 08 */
-       {(0x00 << 24) | 0x0037B0, (0x01 << 24) | 0x133331}, /* channe1 09 */
-       {(0x00 << 24) | 0x0037B0, (0x01 << 24) | 0x1B3331}, /* channe1 10 */
-       {(0x00 << 24) | 0x0037B0, (0x01 << 24) | 0x033331}, /* channe1 11 */
-       {(0x00 << 24) | 0x0037B0, (0x01 << 24) | 0x0B3331}, /* channe1 12 */
-       {(0x00 << 24) | 0x0037C0, (0x01 << 24) | 0x133331}, /* channe1 13 */
-       {(0x00 << 24) | 0x0037C0, (0x01 << 24) | 0x066661}  /* channel 14 */
-};
-
-/* channel independent registers: */
-static u32 al7230_rf_data_50[] = {
-       (0x00 << 24) | 0x0FF520,
-       (0x01 << 24) | 0x000001,
-       (0x02 << 24) | 0x451FE2,
-       (0x03 << 24) | 0x5FDFA3,
-       (0x04 << 24) | 0x6FD784,
-       (0x05 << 24) | 0x853F55,
-       (0x06 << 24) | 0x56AF36,
-       (0x07 << 24) | 0xCE0207,
-       (0x08 << 24) | 0x6EBC08,
-       (0x09 << 24) | 0x221BB9,
-       (0x0A << 24) | 0xE0600A,
-       (0x0B << 24) | 0x08044B,
-       (0x0C << 24) | 0x00143C,
-       (0x0D << 24) | 0xFFFFFD,
-       (0x0E << 24) | 0x00000E,
-       (0x0F << 24) | 0x12BACF  /* 5Ghz default state */
-};
-
-static u32 al7230_channel_data_5[][4] = {
-       /* channel dependent registers: 0x00, 0x01 and 0x04 */
-       /* 11J =========== */
-       {184, (0x00 << 24) | 0x0FF520, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 184 */
-       {188, (0x00 << 24) | 0x0FF520, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 188 */
-       {192, (0x00 << 24) | 0x0FF530, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 192 */
-       {196, (0x00 << 24) | 0x0FF530, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 196 */
-       {8,   (0x00 << 24) | 0x0FF540, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 008 */
-       {12,  (0x00 << 24) | 0x0FF540, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 012 */
-       {16,  (0x00 << 24) | 0x0FF550, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 016 */
-       {34,  (0x00 << 24) | 0x0FF560, (0x01 << 24) | 0x055551, (0x04 << 24) | 0x77F784}, /* channel 034 */
-       {38,  (0x00 << 24) | 0x0FF570, (0x01 << 24) | 0x100001, (0x04 << 24) | 0x77F784}, /* channel 038 */
-       {42,  (0x00 << 24) | 0x0FF570, (0x01 << 24) | 0x1AAAA1, (0x04 << 24) | 0x77F784}, /* channel 042 */
-       {46,  (0x00 << 24) | 0x0FF570, (0x01 << 24) | 0x055551, (0x04 << 24) | 0x77F784}, /* channel 046 */
-       /* 11 A/H ========= */
-       {36,  (0x00 << 24) | 0x0FF560, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 036 */
-       {40,  (0x00 << 24) | 0x0FF570, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 040 */
-       {44,  (0x00 << 24) | 0x0FF570, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 044 */
-       {48,  (0x00 << 24) | 0x0FF570, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 048 */
-       {52,  (0x00 << 24) | 0x0FF580, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 052 */
-       {56,  (0x00 << 24) | 0x0FF580, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 056 */
-       {60,  (0x00 << 24) | 0x0FF580, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 060 */
-       {64,  (0x00 << 24) | 0x0FF590, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 064 */
-       {100, (0x00 << 24) | 0x0FF5C0, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 100 */
-       {104, (0x00 << 24) | 0x0FF5C0, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 104 */
-       {108, (0x00 << 24) | 0x0FF5C0, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 108 */
-       {112, (0x00 << 24) | 0x0FF5D0, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 112 */
-       {116, (0x00 << 24) | 0x0FF5D0, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 116 */
-       {120, (0x00 << 24) | 0x0FF5D0, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 120 */
-       {124, (0x00 << 24) | 0x0FF5E0, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 124 */
-       {128, (0x00 << 24) | 0x0FF5E0, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 128 */
-       {132, (0x00 << 24) | 0x0FF5E0, (0x01 << 24) | 0x0AAAA1, (0x04 << 24) | 0x77F784}, /* channel 132 */
-       {136, (0x00 << 24) | 0x0FF5F0, (0x01 << 24) | 0x155551, (0x04 << 24) | 0x77F784}, /* channel 136 */
-       {140, (0x00 << 24) | 0x0FF5F0, (0x01 << 24) | 0x000001, (0x04 << 24) | 0x67F784}, /* channel 140 */
-       {149, (0x00 << 24) | 0x0FF600, (0x01 << 24) | 0x180001, (0x04 << 24) | 0x77F784}, /* channel 149 */
-       {153, (0x00 << 24) | 0x0FF600, (0x01 << 24) | 0x02AAA1, (0x04 << 24) | 0x77F784}, /* channel 153 */
-       {157, (0x00 << 24) | 0x0FF600, (0x01 << 24) | 0x0D5551, (0x04 << 24) | 0x77F784}, /* channel 157 */
-       {161, (0x00 << 24) | 0x0FF610, (0x01 << 24) | 0x180001, (0x04 << 24) | 0x77F784}, /* channel 161 */
-       {165, (0x00 << 24) | 0x0FF610, (0x01 << 24) | 0x02AAA1, (0x04 << 24) | 0x77F784}  /* channel 165 */
-};
-
-/*
- * RF Calibration <=== Register 0x0F
- * 0x0F 0x1ABA8F; start from 2.4Ghz default state
- * 0x0F 0x9ABA8F; TXDC compensation
- * 0x0F 0x3ABA8F; RXFIL adjustment
- * 0x0F 0x1ABA8F; restore 2.4Ghz default state
- */
-
-/* TXVGA Mapping Table <=== Register 0x0B */
-static u32 al7230_txvga_data[][2] = {
-       {0x08040B, 0}, /* TXVGA = 0; */
-       {0x08041B, 1}, /* TXVGA = 1; */
-       {0x08042B, 2}, /* TXVGA = 2; */
-       {0x08043B, 3}, /* TXVGA = 3; */
-       {0x08044B, 4}, /* TXVGA = 4; */
-       {0x08045B, 5}, /* TXVGA = 5; */
-       {0x08046B, 6}, /* TXVGA = 6; */
-       {0x08047B, 7}, /* TXVGA = 7; */
-       {0x08048B, 8}, /* TXVGA = 8; */
-       {0x08049B, 9}, /* TXVGA = 9; */
-       {0x0804AB, 10}, /* TXVGA = 10; */
-       {0x0804BB, 11}, /* TXVGA = 11; */
-       {0x0804CB, 12}, /* TXVGA = 12; */
-       {0x0804DB, 13}, /* TXVGA = 13; */
-       {0x0804EB, 14}, /* TXVGA = 14; */
-       {0x0804FB, 15}, /* TXVGA = 15; */
-       {0x08050B, 16}, /* TXVGA = 16; */
-       {0x08051B, 17}, /* TXVGA = 17; */
-       {0x08052B, 18}, /* TXVGA = 18; */
-       {0x08053B, 19}, /* TXVGA = 19; */
-       {0x08054B, 20}, /* TXVGA = 20; */
-       {0x08055B, 21}, /* TXVGA = 21; */
-       {0x08056B, 22}, /* TXVGA = 22; */
-       {0x08057B, 23}, /* TXVGA = 23; */
-       {0x08058B, 24}, /* TXVGA = 24; */
-       {0x08059B, 25}, /* TXVGA = 25; */
-       {0x0805AB, 26}, /* TXVGA = 26; */
-       {0x0805BB, 27}, /* TXVGA = 27; */
-       {0x0805CB, 28}, /* TXVGA = 28; */
-       {0x0805DB, 29}, /* TXVGA = 29; */
-       {0x0805EB, 30}, /* TXVGA = 30; */
-       {0x0805FB, 31}, /* TXVGA = 31; */
-       {0x08060B, 32}, /* TXVGA = 32; */
-       {0x08061B, 33}, /* TXVGA = 33; */
-       {0x08062B, 34}, /* TXVGA = 34; */
-       {0x08063B, 35}, /* TXVGA = 35; */
-       {0x08064B, 36}, /* TXVGA = 36; */
-       {0x08065B, 37}, /* TXVGA = 37; */
-       {0x08066B, 38}, /* TXVGA = 38; */
-       {0x08067B, 39}, /* TXVGA = 39; */
-       {0x08068B, 40}, /* TXVGA = 40; */
-       {0x08069B, 41}, /* TXVGA = 41; */
-       {0x0806AB, 42}, /* TXVGA = 42; */
-       {0x0806BB, 43}, /* TXVGA = 43; */
-       {0x0806CB, 44}, /* TXVGA = 44; */
-       {0x0806DB, 45}, /* TXVGA = 45; */
-       {0x0806EB, 46}, /* TXVGA = 46; */
-       {0x0806FB, 47}, /* TXVGA = 47; */
-       {0x08070B, 48}, /* TXVGA = 48; */
-       {0x08071B, 49}, /* TXVGA = 49; */
-       {0x08072B, 50}, /* TXVGA = 50; */
-       {0x08073B, 51}, /* TXVGA = 51; */
-       {0x08074B, 52}, /* TXVGA = 52; */
-       {0x08075B, 53}, /* TXVGA = 53; */
-       {0x08076B, 54}, /* TXVGA = 54; */
-       {0x08077B, 55}, /* TXVGA = 55; */
-       {0x08078B, 56}, /* TXVGA = 56; */
-       {0x08079B, 57}, /* TXVGA = 57; */
-       {0x0807AB, 58}, /* TXVGA = 58; */
-       {0x0807BB, 59}, /* TXVGA = 59; */
-       {0x0807CB, 60}, /* TXVGA = 60; */
-       {0x0807DB, 61}, /* TXVGA = 61; */
-       {0x0807EB, 62}, /* TXVGA = 62; */
-       {0x0807FB, 63}, /* TXVGA = 63; */
-};
-/* ============================================= */
-
-/*
- * W89RF242 RFIC SPI programming initial data
- * Winbond WLAN 11g RFIC BB-SPI register -- version FA5976A rev 1.3b
- */
-static u32 w89rf242_rf_data[] = {
-       (0x00 << 24) | 0xF86100, /* 3E184; MODA  (0x00) -- Normal mode ; calibration off */
-       (0x01 << 24) | 0xEFFFC2, /* 3BFFF; MODB  (0x01) -- turn off RSSI, and other circuits are turned on */
-       (0x02 << 24) | 0x102504, /* 04094; FSET  (0x02) -- default 20MHz crystal ; Icmp=1.5mA */
-       (0x03 << 24) | 0x026286, /* 0098A; FCHN  (0x03) -- default CH7, 2442MHz */
-       (0x04 << 24) | 0x000208, /* 02008; FCAL  (0x04) -- XTAL Freq Trim=001000 (socket board#1); FA5976AYG_v1.3C */
-       (0x05 << 24) | 0x24C60A, /* 09316; GANA  (0x05) -- TX VGA default (TXVGA=0x18(12)) & TXGPK=110 ; FA5976A_1.3D */
-       (0x06 << 24) | 0x3432CC, /* 0D0CB; GANB  (0x06) -- RXDC(DC offset) on; LNA=11; RXVGA=001011(11) ; RXFLSW=11(010001); RXGPK=00; RXGCF=00; -50dBm input */
-       (0x07 << 24) | 0x0C68CE, /* 031A3; FILT  (0x07) -- TX/RX filter with auto-tuning; TFLBW=011; RFLBW=100 */
-       (0x08 << 24) | 0x100010, /* 04000; TCAL  (0x08) -- for LO */
-       (0x09 << 24) | 0x004012, /* 1B900; RCALA (0x09) -- FASTS=11; HPDE=01 (100nsec); SEHP=1 (select B0 pin=RXHP); RXHP=1 (Turn on RXHP function)(FA5976A_1.3C) */
-       (0x0A << 24) | 0x704014, /* 1C100; RCALB (0x0A) */
-       (0x0B << 24) | 0x18BDD6, /* 062F7; IQCAL (0x0B) -- Turn on LO phase tuner=0111 & RX-LO phase = 0111; FA5976A_1.3B */
-       (0x0C << 24) | 0x575558, /* 15D55 ; IBSA  (0x0C) -- IFPre =11 ; TC5376A_v1.3A for corner */
-       (0x0D << 24) | 0x55545A, /* 15555 ; IBSB  (0x0D) */
-       (0x0E << 24) | 0x5557DC, /* 1555F ; IBSC  (0x0E) -- IRLNA & IRLNB (PTAT & Const current)=01/01; FA5976B_1.3F */
-       (0x10 << 24) | 0x000C20, /* 00030 ; TMODA (0x10) -- LNA_gain_step=0011 ; LNA=15/16dB */
-       (0x11 << 24) | 0x0C0022, /* 03000 ; TMODB (0x11) -- Turn ON RX-Q path Test Switch; To improve IQ path group delay (FA5976A_1.3C) */
-       (0x12 << 24) | 0x000024  /* TMODC (0x12) -- Turn OFF Temperature sensor */
-};
-
-static u32 w89rf242_channel_data_24[][2] = {
-       {(0x03 << 24) | 0x025B06, (0x04 << 24) | 0x080408}, /* channe1 01 */
-       {(0x03 << 24) | 0x025C46, (0x04 << 24) | 0x080408}, /* channe1 02 */
-       {(0x03 << 24) | 0x025D86, (0x04 << 24) | 0x080408}, /* channe1 03 */
-       {(0x03 << 24) | 0x025EC6, (0x04 << 24) | 0x080408}, /* channe1 04 */
-       {(0x03 << 24) | 0x026006, (0x04 << 24) | 0x080408}, /* channe1 05 */
-       {(0x03 << 24) | 0x026146, (0x04 << 24) | 0x080408}, /* channe1 06 */
-       {(0x03 << 24) | 0x026286, (0x04 << 24) | 0x080408}, /* channe1 07 */
-       {(0x03 << 24) | 0x0263C6, (0x04 << 24) | 0x080408}, /* channe1 08 */
-       {(0x03 << 24) | 0x026506, (0x04 << 24) | 0x080408}, /* channe1 09 */
-       {(0x03 << 24) | 0x026646, (0x04 << 24) | 0x080408}, /* channe1 10 */
-       {(0x03 << 24) | 0x026786, (0x04 << 24) | 0x080408}, /* channe1 11 */
-       {(0x03 << 24) | 0x0268C6, (0x04 << 24) | 0x080408}, /* channe1 12 */
-       {(0x03 << 24) | 0x026A06, (0x04 << 24) | 0x080408}, /* channe1 13 */
-       {(0x03 << 24) | 0x026D06, (0x04 << 24) | 0x080408}  /* channe1 14 */
-};
-
-static u32 w89rf242_txvga_old_mapping[][2] = {
-       {0, 0} , /* New <-> Old */
-       {1, 1} ,
-       {2, 2} ,
-       {3, 3} ,
-       {4, 4} ,
-       {6, 5} ,
-       {8, 6},
-       {10, 7},
-       {12, 8},
-       {14, 9},
-       {16, 10},
-       {18, 11},
-       {20, 12},
-       {22, 13},
-       {24, 14},
-       {26, 15},
-       {28, 16},
-       {30, 17},
-       {32, 18},
-       {34, 19},
-};
-
-static u32 w89rf242_txvga_data[][5] = {
-       /* low gain mode */
-       {(0x05 << 24) | 0x24C00A, 0, 0x00292315, 0x0800FEFF, 0x52523131}, /* min gain */
-       {(0x05 << 24) | 0x24C80A, 1, 0x00292315, 0x0800FEFF, 0x52523131},
-       {(0x05 << 24) | 0x24C04A, 2, 0x00292315, 0x0800FEFF, 0x52523131}, /*  (default) +14dBm (ANT) */
-       {(0x05 << 24) | 0x24C84A, 3, 0x00292315, 0x0800FEFF, 0x52523131},
-
-       /* TXVGA=0x10 */
-       {(0x05 << 24) | 0x24C40A, 4, 0x00292315, 0x0800FEFF, 0x60603838},
-       {(0x05 << 24) | 0x24C40A, 5, 0x00262114, 0x0700FEFF, 0x65653B3B},
-
-       /* TXVGA=0x11 */
-       { (0x05 << 24) | 0x24C44A, 6, 0x00241F13, 0x0700FFFF, 0x58583333},
-       { (0x05 << 24) | 0x24C44A, 7, 0x00292315, 0x0800FEFF, 0x5E5E3737},
-
-       /* TXVGA=0x12 */
-       {(0x05 << 24) | 0x24C48A, 8, 0x00262114, 0x0700FEFF, 0x53533030},
-       {(0x05 << 24) | 0x24C48A, 9, 0x00241F13, 0x0700FFFF, 0x59593434},
-
-       /* TXVGA=0x13 */
-       {(0x05 << 24) | 0x24C4CA, 10, 0x00292315, 0x0800FEFF, 0x52523030},
-       {(0x05 << 24) | 0x24C4CA, 11, 0x00262114, 0x0700FEFF, 0x56563232},
-
-       /* TXVGA=0x14 */
-       {(0x05 << 24) | 0x24C50A, 12, 0x00292315, 0x0800FEFF, 0x54543131},
-       {(0x05 << 24) | 0x24C50A, 13, 0x00262114, 0x0700FEFF, 0x58583434},
-
-       /* TXVGA=0x15 */
-       {(0x05 << 24) | 0x24C54A, 14, 0x00292315, 0x0800FEFF, 0x54543131},
-       {(0x05 << 24) | 0x24C54A, 15, 0x00262114, 0x0700FEFF, 0x59593434},
-
-       /* TXVGA=0x16 */
-       {(0x05 << 24) | 0x24C58A, 16, 0x00292315, 0x0800FEFF, 0x55553131},
-       {(0x05 << 24) | 0x24C58A, 17, 0x00292315, 0x0800FEFF, 0x5B5B3535},
-
-       /* TXVGA=0x17 */
-       {(0x05 << 24) | 0x24C5CA, 18, 0x00262114, 0x0700FEFF, 0x51512F2F},
-       {(0x05 << 24) | 0x24C5CA, 19, 0x00241F13, 0x0700FFFF, 0x55553131},
-
-       /* TXVGA=0x18 */
-       {(0x05 << 24) | 0x24C60A, 20, 0x00292315, 0x0800FEFF, 0x4F4F2E2E},
-       {(0x05 << 24) | 0x24C60A, 21, 0x00262114, 0x0700FEFF, 0x53533030},
-
-       /* TXVGA=0x19 */
-       {(0x05 << 24) | 0x24C64A, 22, 0x00292315, 0x0800FEFF, 0x4E4E2D2D},
-       {(0x05 << 24) | 0x24C64A, 23, 0x00262114, 0x0700FEFF, 0x53533030},
-
-       /* TXVGA=0x1A */
-       {(0x05 << 24) | 0x24C68A, 24, 0x00292315, 0x0800FEFF, 0x50502E2E},
-       {(0x05 << 24) | 0x24C68A, 25, 0x00262114, 0x0700FEFF, 0x55553131},
-
-       /* TXVGA=0x1B */
-       {(0x05 << 24) | 0x24C6CA, 26, 0x00262114, 0x0700FEFF, 0x53533030},
-       {(0x05 << 24) | 0x24C6CA, 27, 0x00292315, 0x0800FEFF, 0x5A5A3434},
-
-       /* TXVGA=0x1C */
-       {(0x05 << 24) | 0x24C70A, 28, 0x00292315, 0x0800FEFF, 0x55553131},
-       {(0x05 << 24) | 0x24C70A, 29, 0x00292315, 0x0800FEFF, 0x5D5D3636},
-
-       /* TXVGA=0x1D */
-       {(0x05 << 24) | 0x24C74A, 30, 0x00292315, 0x0800FEFF, 0x5F5F3737},
-       {(0x05 << 24) | 0x24C74A, 31, 0x00262114, 0x0700FEFF, 0x65653B3B},
-
-       /* TXVGA=0x1E */
-       {(0x05 << 24) | 0x24C78A, 32, 0x00292315, 0x0800FEFF, 0x66663B3B},
-       {(0x05 << 24) | 0x24C78A, 33, 0x00262114, 0x0700FEFF, 0x70704141},
-
-       /* TXVGA=0x1F */
-       {(0x05 << 24) | 0x24C7CA, 34, 0x00292315, 0x0800FEFF, 0x72724242}
-};
-
-/* ================================================================================================== */
-
-
-
-/*
- * =============================================================================================================
- *  Uxx_ReadEthernetAddress --
- *
- *  Routine Description:
- *    Reads in the Ethernet address from the IC.
- *
- *  Arguments:
- *    pHwData        - The pHwData structure
- *
- *  Return Value:
- *
- *    The address is stored in EthernetIDAddr.
- * =============================================================================================================
- */
-void Uxx_ReadEthernetAddress(struct hw_data *pHwData)
-{
-       u32     ltmp;
-
-       /*
-        * Reading Ethernet address from EEPROM and set into hardware due to MAC address maybe change.
-        * Only unplug and plug again can make hardware read EEPROM again.
-        */
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08000000); /* Start EEPROM access + Read + address(0x0d) */
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &ltmp);
-       *(u16 *)pHwData->PermanentMacAddress = cpu_to_le16((u16) ltmp);
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08010000); /* Start EEPROM access + Read + address(0x0d) */
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &ltmp);
-       *(u16 *)(pHwData->PermanentMacAddress + 2) = cpu_to_le16((u16) ltmp);
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08020000); /* Start EEPROM access + Read + address(0x0d) */
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &ltmp);
-       *(u16 *)(pHwData->PermanentMacAddress + 4) = cpu_to_le16((u16) ltmp);
-       *(u16 *)(pHwData->PermanentMacAddress + 6) = 0;
-       Wb35Reg_WriteSync(pHwData, 0x03e8, cpu_to_le32(*(u32 *)pHwData->PermanentMacAddress));
-       Wb35Reg_WriteSync(pHwData, 0x03ec, cpu_to_le32(*(u32 *)(pHwData->PermanentMacAddress + 4)));
-}
-
-
-/*
- * ===============================================================================================================
- *  CardGetMulticastBit --
- *  Description:
- *    For a given multicast address, returns the byte and bit in the card multicast registers that it hashes to.
- *    Calls CardComputeCrc() to determine the CRC value.
- *  Arguments:
- *    Address - the address
- *    Byte - the byte that it hashes to
- *    Value - will have a 1 in the relevant bit
- *  Return Value:
- *    None.
- * ==============================================================================================================
- */
-void CardGetMulticastBit(u8 Address[ETH_ALEN], u8 *Byte, u8 *Value)
-{
-       u32 Crc;
-       u32 BitNumber;
-
-       /* First compute the CRC. */
-       Crc = CardComputeCrc(Address, ETH_ALEN);
-
-       /* The computed CRC is bit0~31 from left to right */
-       /* At first we should do right shift 25bits, and read 7bits by using '&', 2^7=128 */
-       BitNumber = (u32) ((Crc >> 26) & 0x3f);
-
-       *Byte  = (u8) (BitNumber >> 3); /* 900514 original (BitNumber / 8) */
-       *Value = (u8) ((u8) 1 << (BitNumber % 8));
-}
-
-void Uxx_power_on_procedure(struct hw_data *pHwData)
-{
-       u32     ltmp, loop;
-
-       if (pHwData->phy_type <= RF_MAXIM_V1)
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0xffffff38);
-       else {
-               Wb35Reg_WriteSync(pHwData, 0x03f4, 0xFF5807FF);
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0x80); /* regulator on only */
-               msleep(10);
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0xb8); /* REG_ON RF_RSTN on, and */
-               msleep(10);
-               ltmp = 0x4968;
-               if ((pHwData->phy_type == RF_WB_242) ||
-                       (RF_WB_242_1 == pHwData->phy_type))
-                       ltmp = 0x4468;
-
-               Wb35Reg_WriteSync(pHwData, 0x03d0, ltmp);
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0xa0); /* PLL_PD REF_PD set to 0 */
-
-               msleep(20);
-               Wb35Reg_ReadSync(pHwData, 0x03d0, &ltmp);
-               loop = 500; /* Wait for 5 second */
-               while (!(ltmp & 0x20) && loop--) {
-                       msleep(10);
-                       if (!Wb35Reg_ReadSync(pHwData, 0x03d0, &ltmp))
-                               break;
-               }
-
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0xe0); /* MLK_EN */
-       }
-
-       Wb35Reg_WriteSync(pHwData, 0x03b0, 1); /* Reset hardware first */
-       msleep(10);
-
-       /* Set burst write delay */
-       Wb35Reg_WriteSync(pHwData, 0x03f8, 0x7ff);
-}
-
-static void Set_ChanIndep_RfData_al7230_24(struct hw_data *pHwData, u32 *pltmp,
-                                       char number)
-{
-       u8      i;
-       for (i = 0; i < number; i++) {
-               pHwData->phy_para[i] = al7230_rf_data_24[i];
-               pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_rf_data_24[i] & 0xffffff);
-       }
-}
-
-static void Set_ChanIndep_RfData_al7230_50(struct hw_data *pHwData, u32 *pltmp,
-                                       char number)
-{
-       u8      i;
-       for (i = 0; i < number; i++) {
-               pHwData->phy_para[i] = al7230_rf_data_50[i];
-               pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_rf_data_50[i] & 0xffffff);
-       }
-}
-
-
-/*
- * =============================================================================================================
- * RFSynthesizer_initial --
- * =============================================================================================================
- */
-void RFSynthesizer_initial(struct hw_data *pHwData)
-{
-       u32     altmp[32];
-       u32     *pltmp = altmp;
-       u32     ltmp;
-       u8      number = 0x00; /* The number of register vale */
-       u8      i;
-
-       /*
-        * bit[31]      SPI Enable.
-        *              1=perform synthesizer program operation. This bit will
-        *              cleared automatically after the operation is completed.
-        * bit[30]      SPI R/W Control
-        *              0=write,    1=read
-        * bit[29:24]   SPI Data Format Length
-        * bit[17:4 ]   RF Data bits.
-        * bit[3 :0 ]   RF address.
-        */
-       switch (pHwData->phy_type) {
-       case RF_MAXIM_2825:
-       case RF_MAXIM_V1: /* 11g Winbond 2nd BB(with Phy board (v1) + Maxim 331) */
-               number = ARRAY_SIZE(max2825_rf_data);
-               for (i = 0; i < number; i++) {
-                       pHwData->phy_para[i] = max2825_rf_data[i]; /* Backup Rf parameter */
-                       pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2825_rf_data[i], 18);
-               }
-               break;
-       case RF_MAXIM_2827:
-               number = ARRAY_SIZE(max2827_rf_data);
-               for (i = 0; i < number; i++) {
-                       pHwData->phy_para[i] = max2827_rf_data[i];
-                       pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_rf_data[i], 18);
-               }
-               break;
-       case RF_MAXIM_2828:
-               number = ARRAY_SIZE(max2828_rf_data);
-               for (i = 0; i < number; i++) {
-                       pHwData->phy_para[i] = max2828_rf_data[i];
-                       pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_rf_data[i], 18);
-               }
-               break;
-       case RF_MAXIM_2829:
-               number = ARRAY_SIZE(max2829_rf_data);
-               for (i = 0; i < number; i++) {
-                       pHwData->phy_para[i] = max2829_rf_data[i];
-                       pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2829_rf_data[i], 18);
-               }
-               break;
-       case RF_AIROHA_2230:
-               number = ARRAY_SIZE(al2230_rf_data);
-               for (i = 0; i < number; i++) {
-                       pHwData->phy_para[i] = al2230_rf_data[i];
-                       pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_rf_data[i], 20);
-               }
-               break;
-       case RF_AIROHA_2230S:
-               number = ARRAY_SIZE(al2230s_rf_data);
-               for (i = 0; i < number; i++) {
-                       pHwData->phy_para[i] = al2230s_rf_data[i];
-                       pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230s_rf_data[i], 20);
-               }
-               break;
-       case RF_AIROHA_7230:
-               /* Start to fill RF parameters, PLL_ON should be pulled low. */
-               Wb35Reg_WriteSync(pHwData, 0x03dc, 0x00000000);
-               pr_debug("* PLL_ON    low\n");
-               number = ARRAY_SIZE(al7230_rf_data_24);
-               Set_ChanIndep_RfData_al7230_24(pHwData, pltmp, number);
-               break;
-       case RF_WB_242:
-       case RF_WB_242_1:
-               number = ARRAY_SIZE(w89rf242_rf_data);
-               for (i = 0; i < number; i++) {
-                       ltmp = w89rf242_rf_data[i];
-                       if (i == 4) { /* Update the VCO trim from EEPROM */
-                               ltmp &= ~0xff0; /* Mask bit4 ~bit11 */
-                               ltmp |= pHwData->VCO_trim << 4;
-                       }
-
-                       pHwData->phy_para[i] = ltmp;
-                       pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse(ltmp, 24);
-               }
-               break;
-       }
-
-       pHwData->phy_number = number;
-
-       /* The 16 is the maximum capability of hardware. Here use 12 */
-       if (number > 12) {
-               for (i = 0; i < 12; i++) /* For Al2230 */
-                       Wb35Reg_WriteSync(pHwData, 0x0864, pltmp[i]);
-
-               pltmp += 12;
-               number -= 12;
-       }
-
-       /* Write to register. number must less and equal than 16 */
-       for (i = 0; i < number; i++)
-               Wb35Reg_WriteSync(pHwData, 0x864, pltmp[i]);
-
-       /* Calibration only 1 time */
-       if (pHwData->CalOneTime)
-               return;
-       pHwData->CalOneTime = 1;
-
-       switch (pHwData->phy_type) {
-       case RF_AIROHA_2230:
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x07 << 20) | 0xE168E, 20);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(10);
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_rf_data[7], 20);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(10);
-       case RF_AIROHA_2230S:
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0x80); /* regulator on only */
-               msleep(10);
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0xa0); /* PLL_PD REF_PD set to 0 */
-               msleep(10);
-               Wb35Reg_WriteSync(pHwData, 0x03d4, 0xe0); /* MLK_EN */
-               Wb35Reg_WriteSync(pHwData, 0x03b0, 1); /* Reset hardware first */
-               msleep(10);
-               /* ========================================================= */
-
-               /* The follow code doesn't use the burst-write mode */
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F<<20) | 0xF01A0, 20);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               ltmp = pHwData->reg.BB5C & 0xfffff000;
-               Wb35Reg_WriteSync(pHwData, 0x105c, ltmp);
-               pHwData->reg.BB50 |= 0x13; /* (MASK_IQCAL_MODE|MASK_CALIB_START) */
-               Wb35Reg_WriteSync(pHwData, 0x1050, pHwData->reg.BB50);
-               msleep(5);
-
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01B0, 20);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01E0, 20);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-
-               ltmp = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse((0x0F << 20) | 0xF01A0, 20);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               Wb35Reg_WriteSync(pHwData, 0x105c, pHwData->reg.BB5C);
-               pHwData->reg.BB50 &= ~0x13; /* (MASK_IQCAL_MODE|MASK_CALIB_START); */
-               Wb35Reg_WriteSync(pHwData, 0x1050, pHwData->reg.BB50);
-               break;
-       case RF_AIROHA_7230:
-               /* RF parameters have filled completely, PLL_ON should be pulled high */
-               Wb35Reg_WriteSync(pHwData, 0x03dc, 0x00000080);
-               pr_debug("* PLL_ON    high\n");
-
-               /* 2.4GHz */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x9ABA8F;
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x3ABA8F;
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x1ABA8F;
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-
-               /* 5GHz */
-               Wb35Reg_WriteSync(pHwData, 0x03dc, 0x00000000);
-               pr_debug("* PLL_ON    low\n");
-
-               number = ARRAY_SIZE(al7230_rf_data_50);
-               Set_ChanIndep_RfData_al7230_50(pHwData, pltmp, number);
-               /* Write to register. number must less and equal than 16 */
-               for (i = 0; i < number; i++)
-                       Wb35Reg_WriteSync(pHwData, 0x0864, pltmp[i]);
-               msleep(5);
-
-               Wb35Reg_WriteSync(pHwData, 0x03dc, 0x00000080);
-               pr_debug("* PLL_ON    high\n");
-
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x9ABA8F;
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x3ABA8F;
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x12BACF;
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               break;
-       case RF_WB_242:
-       case RF_WB_242_1:
-                /* for FA5976A */
-               ltmp = pHwData->reg.BB5C & 0xfffff000;
-               Wb35Reg_WriteSync(pHwData, 0x105c, ltmp);
-               Wb35Reg_WriteSync(pHwData, 0x1058, 0);
-               pHwData->reg.BB50 |= 0x3; /* (MASK_IQCAL_MODE|MASK_CALIB_START); */
-               Wb35Reg_WriteSync(pHwData, 0x1050, pHwData->reg.BB50);
-
-               /* ----- Calibration (1). VCO frequency calibration */
-               /* Calibration (1a.0). Synthesizer reset */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00101E, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               /* Calibration (1a). VCO frequency calibration mode ; waiting 2msec VCO calibration time */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFE69c0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(2);
-
-               /* ----- Calibration (2). TX baseband Gm-C filter auto-tuning */
-               /* Calibration (2a). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF8EBC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (2b.0). TX filter auto-tuning BW: TFLBW=101 (TC5376A default) */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x07<<24) | 0x0C68CE, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (2b). send TX reset signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00201E, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (2c). turn-on TX Gm-C filter auto-tuning */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFCEBC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               udelay(150); /* Sleep 150 us */
-               /* turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF8EBC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* ----- Calibration (3). RX baseband Gm-C filter auto-tuning */
-               /* Calibration (3a). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (3b.0). RX filter auto-tuning BW: RFLBW=100 (TC5376A+corner default;) */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x07<<24) | 0x0C68CE, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (3b). send RX reset signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x0F<<24) | 0x00401E, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (3c). turn-on RX Gm-C filter auto-tuning */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFEEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               udelay(150); /* Sleep 150 us */
-               /* Calibration (3e). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* ----- Calibration (4). TX LO leakage calibration */
-               /* Calibration (4a). TX LO leakage calibration */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFD6BC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               udelay(150); /* Sleep 150 us */
-
-               /* ----- Calibration (5). RX DC offset calibration */
-               /* Calibration (5a). turn off ENCAL signal and set to RX SW DC calibration mode */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (5b). turn off AGC servo-loop & RSSI */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x01<<24) | 0xEBFFC2, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* for LNA=11 -------- */
-               /* Calibration (5c-h). RX DC offset current bias ON; & LNA=11; RXVGA=111111 */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x343FCC, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(2);
-               /* Calibration (5f). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* for LNA=10 -------- */
-               /* Calibration (5c-m). RX DC offset current bias ON; & LNA=10; RXVGA=111111 */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x342FCC, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(2);
-               /* Calibration (5f). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* for LNA=01 -------- */
-               /* Calibration (5c-m). RX DC offset current bias ON; & LNA=01; RXVGA=111111 */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x341FCC, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(2);
-               /* Calibration (5f). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* for LNA=00 -------- */
-               /* Calibration (5c-l). RX DC offset current bias ON; & LNA=00; RXVGA=111111 */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x06<<24) | 0x340FCC, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (5d). turn on RX DC offset cal function; and waiting 2 msec cal time */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFF6DC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(2);
-               /* Calibration (5f). turn off ENCAL signal */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xFAEDC0, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               /* Calibration (5g). turn on AGC servo-loop */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x01<<24) | 0xEFFFC2, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-
-               /* ----- Calibration (7). Switch RF chip to normal mode */
-               /* 0x00 0xF86100 ; 3E184   ; Switch RF chip to normal mode */
-               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse((0x00<<24) | 0xF86100, 24);
-               Wb35Reg_WriteSync(pHwData, 0x0864, ltmp);
-               msleep(5);
-               break;
-       }
-}
-
-static void BBProcessor_AL7230_2400(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32     pltmp[12];
-
-       pltmp[0] = 0x16A8337A; /* 0x1000 AGC_Ctrl1 */
-       pltmp[1] = 0x9AFF9AA6; /* 0x1004 AGC_Ctrl2 */
-       pltmp[2] = 0x55D00A04; /* 0x1008 AGC_Ctrl3 */
-       pltmp[3] = 0xFFF72031; /* 0x100c AGC_Ctrl4 */
-       reg->BB0C = 0xFFF72031;
-       pltmp[4] = 0x0FacDCC5; /* 0x1010 AGC_Ctrl5 */
-       pltmp[5] = 0x00CAA333; /* 0x1014 AGC_Ctrl6 */
-       pltmp[6] = 0xF2211111; /* 0x1018 AGC_Ctrl7 */
-       pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-       pltmp[8] = 0x06443440; /* 0x1020 AGC_Ctrl9 */
-       pltmp[9] = 0xA8002A79; /* 0x1024 AGC_Ctrl10 */
-       pltmp[10] = 0x40000528;
-       pltmp[11] = 0x232D7F30; /* 0x102c A_ACQ_Ctrl */
-       reg->BB2C = 0x232D7F30;
-       Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-       pltmp[0] = 0x00002c54; /* 0x1030 B_ACQ_Ctrl */
-       reg->BB30 = 0x00002c54;
-       pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-       pltmp[2] = 0x5B2C8769; /* 0x1038 B_TXRX_Ctrl */
-       pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-       reg->BB3C = 0x00000000;
-       pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-       pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-       pltmp[6] = 0x00332C1B; /* 0x1048 11b TX RC filter */
-       pltmp[7] = 0x0A00FEFF; /* 0x104c 11b TX RC filter */
-       pltmp[8] = 0x2B106208; /* 0x1050 MODE_Ctrl */
-       reg->BB50 = 0x2B106208;
-       pltmp[9] = 0;           /* 0x1054 */
-       reg->BB54 = 0x00000000;
-       pltmp[10] = 0x52524242; /* 0x1058 IQ_Alpha */
-       reg->BB58 = 0x52524242;
-       pltmp[11] = 0xAA0AC000; /* 0x105c DC_Cancel */
-       Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-}
-
-static void BBProcessor_AL7230_5000(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32     pltmp[12];
-
-       pltmp[0] = 0x16AA6678; /* 0x1000 AGC_Ctrl1 */
-       pltmp[1] = 0x9AFFA0B2; /* 0x1004 AGC_Ctrl2 */
-       pltmp[2] = 0x55D00A04; /* 0x1008 AGC_Ctrl3 */
-       pltmp[3] = 0xEFFF233E; /* 0x100c AGC_Ctrl4 */
-       reg->BB0C = 0xEFFF233E;
-       pltmp[4] = 0x0FacDCC5; /* 0x1010 AGC_Ctrl5 */
-       pltmp[5] = 0x00CAA333; /* 0x1014 AGC_Ctrl6 */
-       pltmp[6] = 0xF2432111; /* 0x1018 AGC_Ctrl7 */
-       pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-       pltmp[8] = 0x05C43440; /* 0x1020 AGC_Ctrl9 */
-       pltmp[9] = 0x00002A79; /* 0x1024 AGC_Ctrl10 */
-       pltmp[10] = 0x40000528;
-       pltmp[11] = 0x232FDF30;/* 0x102c A_ACQ_Ctrl */
-       reg->BB2C = 0x232FDF30;
-       Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-       pltmp[0] = 0x80002C7C; /* 0x1030 B_ACQ_Ctrl */
-       pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-       pltmp[2] = 0x5B2C8769; /* 0x1038 B_TXRX_Ctrl */
-       pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-       reg->BB3C = 0x00000000;
-       pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-       pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-       pltmp[6] = 0x00332C1B; /* 0x1048 11b TX RC filter */
-       pltmp[7] = 0x0A00FEFF; /* 0x104c 11b TX RC filter */
-       pltmp[8] = 0x2B107208; /* 0x1050 MODE_Ctrl */
-       reg->BB50 = 0x2B107208;
-       pltmp[9] = 0;           /* 0x1054 */
-       reg->BB54 = 0x00000000;
-       pltmp[10] = 0x52524242; /* 0x1058 IQ_Alpha */
-       reg->BB58 = 0x52524242;
-       pltmp[11] = 0xAA0AC000; /* 0x105c DC_Cancel */
-       Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-}
-
-/*
- * ===========================================================================
- *  BBProcessorPowerupInit --
- *
- *  Description:
- *    Initialize the Baseband processor.
- *
- *  Arguments:
- *    pHwData    - Handle of the USB Device.
- *
- *  Return values:
- *    None.
- *============================================================================
- */
-void BBProcessor_initial(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32     i, pltmp[12];
-
-       switch (pHwData->phy_type) {
-       case RF_MAXIM_V1: /* Initializng the Winbond 2nd BB(with Phy board (v1) + Maxim 331) */
-               pltmp[0] = 0x16F47E77; /* 0x1000 AGC_Ctrl1 */
-               pltmp[1] = 0x9AFFAEA4; /* 0x1004 AGC_Ctrl2 */
-               pltmp[2] = 0x55D00A04; /* 0x1008 AGC_Ctrl3 */
-               pltmp[3] = 0xEFFF1A34; /* 0x100c AGC_Ctrl4 */
-               reg->BB0C = 0xEFFF1A34;
-               pltmp[4] = 0x0FABE0B7; /* 0x1010 AGC_Ctrl5 */
-               pltmp[5] = 0x00CAA332; /* 0x1014 AGC_Ctrl6 */
-               pltmp[6] = 0xF6632111; /* 0x1018 AGC_Ctrl7 */
-               pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-               pltmp[8] = 0x04CC3640; /* 0x1020 AGC_Ctrl9 */
-               pltmp[9] = 0x00002A79; /* 0x1024 AGC_Ctrl10 */
-               pltmp[10] = (pHwData->phy_type == 3) ? 0x40000a28 : 0x40000228; /* 0x1028 MAXIM_331(b31=0) + WBRF_V1(b11=1) : MAXIM_331(b31=0) + WBRF_V2(b11=0) */
-               pltmp[11] = 0x232FDF30; /* 0x102c A_ACQ_Ctrl */
-               reg->BB2C = 0x232FDF30; /* Modify for 33's 1.0.95.xxx version, antenna 1 */
-               Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-               pltmp[0] = 0x00002C54; /* 0x1030 B_ACQ_Ctrl */
-               reg->BB30 = 0x00002C54;
-               pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-               pltmp[2] = 0x5B6C8769; /* 0x1038 B_TXRX_Ctrl */
-               pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-               reg->BB3C = 0x00000000;
-               pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-               pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-               pltmp[6] = 0x00453B24; /* 0x1048 11b TX RC filter */
-               pltmp[7] = 0x0E00FEFF; /* 0x104c 11b TX RC filter */
-               pltmp[8] = 0x27106208; /* 0x1050 MODE_Ctrl */
-               reg->BB50 = 0x27106208;
-               pltmp[9] = 0;           /* 0x1054 */
-               reg->BB54 = 0x00000000;
-               pltmp[10] = 0x64646464; /* 0x1058 IQ_Alpha */
-               reg->BB58 = 0x64646464;
-               pltmp[11] = 0xAA0AC000; /* 0x105c DC_Cancel */
-               Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-
-       case RF_MAXIM_2825:
-       case RF_MAXIM_2827:
-       case RF_MAXIM_2828:
-               pltmp[0] = 0x16b47e77; /* 0x1000 AGC_Ctrl1 */
-               pltmp[1] = 0x9affaea4; /* 0x1004 AGC_Ctrl2 */
-               pltmp[2] = 0x55d00a04; /* 0x1008 AGC_Ctrl3 */
-               pltmp[3] = 0xefff1a34; /* 0x100c AGC_Ctrl4 */
-               reg->BB0C = 0xefff1a34;
-               pltmp[4] = 0x0fabe0b7; /* 0x1010 AGC_Ctrl5 */
-               pltmp[5] = 0x00caa332; /* 0x1014 AGC_Ctrl6 */
-               pltmp[6] = 0xf6632111; /* 0x1018 AGC_Ctrl7 */
-               pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-               pltmp[8] = 0x04CC3640; /* 0x1020 AGC_Ctrl9 */
-               pltmp[9] = 0x00002A79; /* 0x1024 AGC_Ctrl10 */
-               pltmp[10] = 0x40000528;
-               pltmp[11] = 0x232fdf30; /* 0x102c A_ACQ_Ctrl */
-               reg->BB2C = 0x232fdf30; /* antenna 1 */
-               Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-               pltmp[0] = 0x00002C54; /* 0x1030 B_ACQ_Ctrl */
-               reg->BB30 = 0x00002C54;
-               pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-               pltmp[2] = 0x5B6C8769; /* 0x1038 B_TXRX_Ctrl */
-               pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-               reg->BB3C = 0x00000000;
-               pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-               pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-               pltmp[6] = 0x00453B24; /* 0x1048 11b TX RC filter */
-               pltmp[7] = 0x0D00FDFF; /* 0x104c 11b TX RC filter */
-               pltmp[8] = 0x27106208; /* 0x1050 MODE_Ctrl */
-               reg->BB50 = 0x27106208;
-               pltmp[9] = 0;           /* 0x1054 */
-               reg->BB54 = 0x00000000;
-               pltmp[10] = 0x64646464; /* 0x1058 IQ_Alpha */
-               reg->BB58 = 0x64646464;
-               pltmp[11] = 0xAA28C000; /* 0x105c DC_Cancel */
-               Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-
-       case RF_MAXIM_2829:
-               pltmp[0] = 0x16b47e77; /* 0x1000 AGC_Ctrl1 */
-               pltmp[1] = 0x9affaea4; /* 0x1004 AGC_Ctrl2 */
-               pltmp[2] = 0x55d00a04; /* 0x1008 AGC_Ctrl3 */
-               pltmp[3] = 0xf4ff1632; /* 0x100c AGC_Ctrl4 */
-               reg->BB0C = 0xf4ff1632;
-               pltmp[4] = 0x0fabe0b7; /* 0x1010 AGC_Ctrl5 */
-               pltmp[5] = 0x00caa332; /* 0x1014 AGC_Ctrl6 */
-               pltmp[6] = 0xf8632112; /* 0x1018 AGC_Ctrl7 */
-               pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-               pltmp[8] = 0x04CC3640; /* 0x1020 AGC_Ctrl9 */
-               pltmp[9] = 0x00002A79; /* 0x1024 AGC_Ctrl10 */
-               pltmp[10] = 0x40000528;
-               pltmp[11] = 0x232fdf30; /* 0x102c A_ACQ_Ctrl */
-               reg->BB2C = 0x232fdf30; /* antenna 1 */
-               Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-               pltmp[0] = 0x00002C54; /* 0x1030 B_ACQ_Ctrl */
-               reg->BB30 = 0x00002C54;
-               pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-               pltmp[2] = 0x5b2c8769; /* 0x1038 B_TXRX_Ctrl */
-               pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-               reg->BB3C = 0x00000000;
-               pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-               pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-               pltmp[6] = 0x002c2617; /* 0x1048 11b TX RC filter */
-               pltmp[7] = 0x0800feff; /* 0x104c 11b TX RC filter */
-               pltmp[8] = 0x27106208; /* 0x1050 MODE_Ctrl */
-               reg->BB50 = 0x27106208;
-               pltmp[9] = 0;           /* 0x1054 */
-               reg->BB54 = 0x00000000;
-               pltmp[10] = 0x64644a4a; /* 0x1058 IQ_Alpha */
-               reg->BB58 = 0x64646464;
-               pltmp[11] = 0xAA28C000; /* 0x105c DC_Cancel */
-               Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-       case RF_AIROHA_2230:
-               pltmp[0] = 0X16764A77; /* 0x1000 AGC_Ctrl1 */
-               pltmp[1] = 0x9affafb2; /* 0x1004 AGC_Ctrl2 */
-               pltmp[2] = 0x55d00a04; /* 0x1008 AGC_Ctrl3 */
-               pltmp[3] = 0xFFFd203c; /* 0x100c AGC_Ctrl4 */
-               reg->BB0C = 0xFFFd203c;
-               pltmp[4] = 0X0FBFDCc5; /* 0x1010 AGC_Ctrl5 */
-               pltmp[5] = 0x00caa332; /* 0x1014 AGC_Ctrl6 */
-               pltmp[6] = 0XF6632111; /* 0x1018 AGC_Ctrl7 */
-               pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-               pltmp[8] = 0x04C43640; /* 0x1020 AGC_Ctrl9 */
-               pltmp[9] = 0x00002A79; /* 0x1024 AGC_Ctrl10 */
-               pltmp[10] = 0X40000528;
-               pltmp[11] = 0x232dfF30; /* 0x102c A_ACQ_Ctrl */
-               reg->BB2C = 0x232dfF30; /* antenna 1 */
-               Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-               pltmp[0] = 0x00002C54; /* 0x1030 B_ACQ_Ctrl */
-               reg->BB30 = 0x00002C54;
-               pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-               pltmp[2] = 0x5B2C8769; /* 0x1038 B_TXRX_Ctrl */
-               pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-               reg->BB3C = 0x00000000;
-               pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-               pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-               pltmp[6] = BB48_DEFAULT_AL2230_11G; /* 0x1048 11b TX RC filter */
-               reg->BB48 = BB48_DEFAULT_AL2230_11G; /* 20051221 ch14 */
-               pltmp[7] = BB4C_DEFAULT_AL2230_11G; /* 0x104c 11b TX RC filter */
-               reg->BB4C = BB4C_DEFAULT_AL2230_11G;
-               pltmp[8] = 0x27106200; /* 0x1050 MODE_Ctrl */
-               reg->BB50 = 0x27106200;
-               pltmp[9] = 0;           /* 0x1054 */
-               reg->BB54 = 0x00000000;
-               pltmp[10] = 0x52524242; /* 0x1058 IQ_Alpha */
-               reg->BB58 = 0x52524242;
-               pltmp[11] = 0xAA0AC000; /* 0x105c DC_Cancel */
-               Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-       case RF_AIROHA_2230S:
-               pltmp[0] = 0X16764A77; /* 0x1000 AGC_Ctrl1 */
-               pltmp[1] = 0x9affafb2; /* 0x1004 AGC_Ctrl2 */
-               pltmp[2] = 0x55d00a04; /* 0x1008 AGC_Ctrl3 */
-               pltmp[3] = 0xFFFd203c; /* 0x100c AGC_Ctrl4 */
-               reg->BB0C = 0xFFFd203c;
-               pltmp[4] = 0X0FBFDCc5; /* 0x1010 AGC_Ctrl5 */
-               pltmp[5] = 0x00caa332; /* 0x1014 AGC_Ctrl6 */
-               pltmp[6] = 0XF6632111; /* 0x1018 AGC_Ctrl7 */
-               pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-               pltmp[8] = 0x04C43640; /* 0x1020 AGC_Ctrl9 */
-               pltmp[9] = 0x00002A79; /* 0x1024 AGC_Ctrl10 */
-               pltmp[10] = 0X40000528;
-               pltmp[11] = 0x232dfF30; /* 0x102c A_ACQ_Ctrl */
-               reg->BB2C = 0x232dfF30; /* antenna 1 */
-               Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-               pltmp[0] = 0x00002C54; /* 0x1030 B_ACQ_Ctrl */
-               reg->BB30 = 0x00002C54;
-               pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-               pltmp[2] = 0x5B2C8769; /* 0x1038 B_TXRX_Ctrl */
-               pltmp[3] = 0x00000000; /* 0x103c 11a TX LS filter */
-               reg->BB3C = 0x00000000;
-               pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-               pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-               pltmp[6] = BB48_DEFAULT_AL2230_11G; /* 0x1048 11b TX RC filter */
-               reg->BB48 = BB48_DEFAULT_AL2230_11G; /* ch14 */
-               pltmp[7] = BB4C_DEFAULT_AL2230_11G; /* 0x104c 11b TX RC filter */
-               reg->BB4C = BB4C_DEFAULT_AL2230_11G;
-               pltmp[8] = 0x27106200; /* 0x1050 MODE_Ctrl */
-               reg->BB50 = 0x27106200;
-               pltmp[9] = 0;           /* 0x1054 */
-               reg->BB54 = 0x00000000;
-               pltmp[10] = 0x52523232; /* 0x1058 IQ_Alpha */
-               reg->BB58 = 0x52523232;
-               pltmp[11] = 0xAA0AC000; /* 0x105c DC_Cancel */
-               Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-       case RF_AIROHA_7230:
-               BBProcessor_AL7230_2400(pHwData);
-
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-       case RF_WB_242:
-       case RF_WB_242_1:
-               pltmp[0] = 0x16A8525D; /* 0x1000 AGC_Ctrl1 */
-               pltmp[1] = 0x9AFF9ABA; /* 0x1004 AGC_Ctrl2 */
-               pltmp[2] = 0x55D00A04; /* 0x1008 AGC_Ctrl3 */
-               pltmp[3] = 0xEEE91C32; /* 0x100c AGC_Ctrl4 */
-               reg->BB0C = 0xEEE91C32;
-               pltmp[4] = 0x0FACDCC5; /* 0x1010 AGC_Ctrl5 */
-               pltmp[5] = 0x000AA344; /* 0x1014 AGC_Ctrl6 */
-               pltmp[6] = 0x22222221; /* 0x1018 AGC_Ctrl7 */
-               pltmp[7] = 0x0FA3F0ED; /* 0x101c AGC_Ctrl8 */
-               pltmp[8] = 0x04CC3440; /* 0x1020 AGC_Ctrl9 */
-               pltmp[9] = 0xA9002A79; /* 0x1024 AGC_Ctrl10 */
-               pltmp[10] = 0x40000528; /* 0x1028 */
-               pltmp[11] = 0x23457F30; /* 0x102c A_ACQ_Ctrl */
-               reg->BB2C = 0x23457F30;
-               Wb35Reg_BurstWrite(pHwData, 0x1000, pltmp, 12, AUTO_INCREMENT);
-
-               pltmp[0] = 0x00002C54; /* 0x1030 B_ACQ_Ctrl */
-               reg->BB30 = 0x00002C54;
-               pltmp[1] = 0x00C0D6C5; /* 0x1034 A_TXRX_Ctrl */
-               pltmp[2] = 0x5B2C8769; /* 0x1038 B_TXRX_Ctrl */
-               pltmp[3] = pHwData->BB3c_cal; /* 0x103c 11a TX LS filter */
-               reg->BB3C = pHwData->BB3c_cal;
-               pltmp[4] = 0x00003F29; /* 0x1040 11a TX LS filter */
-               pltmp[5] = 0x0EFEFBFE; /* 0x1044 11a TX LS filter */
-               pltmp[6] = BB48_DEFAULT_WB242_11G; /* 0x1048 11b TX RC filter */
-               reg->BB48 = BB48_DEFAULT_WB242_11G;
-               pltmp[7] = BB4C_DEFAULT_WB242_11G; /* 0x104c 11b TX RC filter */
-               reg->BB4C = BB4C_DEFAULT_WB242_11G;
-               pltmp[8] = 0x27106208; /* 0x1050 MODE_Ctrl */
-               reg->BB50 = 0x27106208;
-               pltmp[9] = pHwData->BB54_cal; /* 0x1054 */
-               reg->BB54 = pHwData->BB54_cal;
-               pltmp[10] = 0x52523131; /* 0x1058 IQ_Alpha */
-               reg->BB58 = 0x52523131;
-               pltmp[11] = 0xAA0AC000; /* 0x105c DC_Cancel */
-               Wb35Reg_BurstWrite(pHwData, 0x1030, pltmp, 12, AUTO_INCREMENT);
-
-               Wb35Reg_Write(pHwData, 0x1070, 0x00000045);
-               break;
-       }
-
-       /* Fill the LNA table */
-       reg->LNAValue[0] = (u8) (reg->BB0C & 0xff);
-       reg->LNAValue[1] = 0;
-       reg->LNAValue[2] = (u8) ((reg->BB0C & 0xff00) >> 8);
-       reg->LNAValue[3] = 0;
-
-       /* Fill SQ3 table */
-       for (i = 0; i < MAX_SQ3_FILTER_SIZE; i++)
-               reg->SQ3_filter[i] = 0x2f; /* half of Bit 0 ~ 6 */
-}
-
-static inline void set_tx_power_per_channel_max2829(struct hw_data *pHwData,
-                                               struct chan_info Channel)
-{
-       RFSynthesizer_SetPowerIndex(pHwData, 100);
-}
-
-static void set_tx_power_per_channel_al2230(struct hw_data *pHwData,
-                                       struct chan_info Channel)
-{
-       u8      index = 100;
-       if (pHwData->TxVgaFor24[Channel.ChanNo - 1] != 0xff)
-               index = pHwData->TxVgaFor24[Channel.ChanNo - 1];
-
-       RFSynthesizer_SetPowerIndex(pHwData, index);
-}
-
-static void set_tx_power_per_channel_al7230(struct hw_data *pHwData,
-                                       struct chan_info Channel)
-{
-       u8      i, index = 100;
-
-       switch (Channel.band) {
-       case BAND_TYPE_DSSS:
-       case BAND_TYPE_OFDM_24:
-               if (pHwData->TxVgaFor24[Channel.ChanNo - 1] != 0xff)
-                       index = pHwData->TxVgaFor24[Channel.ChanNo - 1];
-               break;
-       case BAND_TYPE_OFDM_5:
-               for (i = 0; i < 35; i++) {
-                       if (Channel.ChanNo == pHwData->TxVgaFor50[i].ChanNo) {
-                               if (pHwData->TxVgaFor50[i].TxVgaValue != 0xff)
-                                       index = pHwData->TxVgaFor50[i].TxVgaValue;
-                               break;
-                       }
-               }
-               break;
-       }
-       RFSynthesizer_SetPowerIndex(pHwData, index);
-}
-
-static void set_tx_power_per_channel_wb242(struct hw_data *pHwData,
-                                       struct chan_info Channel)
-{
-       u8      index = 100;
-
-       switch (Channel.band) {
-       case BAND_TYPE_DSSS:
-       case BAND_TYPE_OFDM_24:
-               if (pHwData->TxVgaFor24[Channel.ChanNo - 1] != 0xff)
-                       index = pHwData->TxVgaFor24[Channel.ChanNo - 1];
-               break;
-       case BAND_TYPE_OFDM_5:
-               break;
-       }
-       RFSynthesizer_SetPowerIndex(pHwData, index);
-}
-
-/*
- * ==========================================================================
- * RFSynthesizer_SwitchingChannel --
- *
- * Description:
- *   Swithch the RF channel.
- *
- * Arguments:
- *   pHwData    - Handle of the USB Device.
- *   Channel    - The channel no.
- *
- * Return values:
- *   None.
- * ===========================================================================
- */
-void RFSynthesizer_SwitchingChannel(struct hw_data *pHwData,  struct chan_info Channel)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32     pltmp[16]; /* The 16 is the maximum capability of hardware */
-       u32     count, ltmp;
-       u8      i, j, number;
-       u8      ChnlTmp;
-
-       switch (pHwData->phy_type) {
-       case RF_MAXIM_2825:
-       case RF_MAXIM_V1: /* 11g Winbond 2nd BB(with Phy board (v1) + Maxim 331) */
-
-               if (Channel.band <= BAND_TYPE_OFDM_24) { /* channel 1 ~ 13 */
-                       for (i = 0; i < 3; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2825_channel_data_24[Channel.ChanNo-1][i], 18);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-               }
-               RFSynthesizer_SetPowerIndex(pHwData, 100);
-               break;
-       case RF_MAXIM_2827:
-               if (Channel.band <= BAND_TYPE_OFDM_24) { /* channel 1 ~ 13 */
-                       for (i = 0; i < 3; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_channel_data_24[Channel.ChanNo-1][i], 18);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-               } else if (Channel.band == BAND_TYPE_OFDM_5) { /* channel 36 ~ 64 */
-                       ChnlTmp = (Channel.ChanNo - 36) / 4;
-                       for (i = 0; i < 3; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_channel_data_50[ChnlTmp][i], 18);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-               }
-               RFSynthesizer_SetPowerIndex(pHwData, 100);
-               break;
-       case RF_MAXIM_2828:
-               if (Channel.band <= BAND_TYPE_OFDM_24) { /* channel 1 ~ 13 */
-                       for (i = 0; i < 3; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_channel_data_24[Channel.ChanNo-1][i], 18);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-               } else if (Channel.band == BAND_TYPE_OFDM_5) { /* channel 36 ~ 64 */
-                       ChnlTmp = (Channel.ChanNo - 36) / 4;
-                       for (i = 0; i < 3; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_channel_data_50[ChnlTmp][i], 18);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-               }
-               RFSynthesizer_SetPowerIndex(pHwData, 100);
-               break;
-       case RF_MAXIM_2829:
-               if (Channel.band <= BAND_TYPE_OFDM_24) {
-                       for (i = 0; i < 3; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2829_channel_data_24[Channel.ChanNo-1][i], 18);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-               } else if (Channel.band == BAND_TYPE_OFDM_5) {
-                       count = ARRAY_SIZE(max2829_channel_data_50);
-
-                       for (i = 0; i < count; i++) {
-                               if (max2829_channel_data_50[i][0] == Channel.ChanNo) {
-                                       for (j = 0; j < 3; j++)
-                                               pltmp[j] = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2829_channel_data_50[i][j+1], 18);
-                                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-
-                                       if ((max2829_channel_data_50[i][3] & 0x3FFFF) == 0x2A946) {
-                                               ltmp = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse((5 << 18) | 0x2A906, 18);
-                                               Wb35Reg_Write(pHwData, 0x0864, ltmp);
-                                       } else { /* 0x2A9C6 */
-                                               ltmp = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse((5 << 18) | 0x2A986, 18);
-                                               Wb35Reg_Write(pHwData, 0x0864, ltmp);
-                                       }
-                               }
-                       }
-               }
-               set_tx_power_per_channel_max2829(pHwData, Channel);
-               break;
-       case RF_AIROHA_2230:
-       case RF_AIROHA_2230S:
-               if (Channel.band <= BAND_TYPE_OFDM_24) { /* channel 1 ~ 14 */
-                       for (i = 0; i < 2; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_channel_data_24[Channel.ChanNo-1][i], 20);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 2, NO_INCREMENT);
-               }
-               set_tx_power_per_channel_al2230(pHwData, Channel);
-               break;
-       case RF_AIROHA_7230:
-               /* Channel independent registers */
-               if (Channel.band != pHwData->band) {
-                       if (Channel.band <= BAND_TYPE_OFDM_24) {
-                               /* Update BB register */
-                               BBProcessor_AL7230_2400(pHwData);
-
-                               number = ARRAY_SIZE(al7230_rf_data_24);
-                               Set_ChanIndep_RfData_al7230_24(pHwData, pltmp, number);
-                       } else {
-                               /* Update BB register */
-                               BBProcessor_AL7230_5000(pHwData);
-
-                               number = ARRAY_SIZE(al7230_rf_data_50);
-                               Set_ChanIndep_RfData_al7230_50(pHwData, pltmp, number);
-                       }
-
-                       /* Write to register. number must less and equal than 16 */
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, number, NO_INCREMENT);
-                       pr_debug("Band changed\n");
-               }
-
-               if (Channel.band <= BAND_TYPE_OFDM_24) { /* channel 1 ~ 14 */
-                       for (i = 0; i < 2; i++)
-                               pltmp[i] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_channel_data_24[Channel.ChanNo-1][i]&0xffffff);
-                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 2, NO_INCREMENT);
-               } else if (Channel.band == BAND_TYPE_OFDM_5) {
-                       /* Update Reg12 */
-                       if ((Channel.ChanNo > 64) && (Channel.ChanNo <= 165)) {
-                               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x00143c;
-                               Wb35Reg_Write(pHwData, 0x0864, ltmp);
-                       } else  { /* reg12 = 0x00147c at Channel 4920 ~ 5320 */
-                               ltmp = (1 << 31) | (0 << 30) | (24 << 24) | 0x00147c;
-                               Wb35Reg_Write(pHwData, 0x0864, ltmp);
-                       }
-
-                       count = ARRAY_SIZE(al7230_channel_data_5);
-
-                       for (i = 0; i < count; i++) {
-                               if (al7230_channel_data_5[i][0] == Channel.ChanNo) {
-                                       for (j = 0; j < 3; j++)
-                                               pltmp[j] = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_channel_data_5[i][j+1] & 0xffffff);
-                                       Wb35Reg_BurstWrite(pHwData, 0x0864, pltmp, 3, NO_INCREMENT);
-                               }
-                       }
-               }
-               set_tx_power_per_channel_al7230(pHwData, Channel);
-               break;
-       case RF_WB_242:
-       case RF_WB_242_1:
-
-               if (Channel.band <= BAND_TYPE_OFDM_24) { /* channel 1 ~ 14 */
-                       ltmp = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse(w89rf242_channel_data_24[Channel.ChanNo-1][0], 24);
-                       Wb35Reg_Write(pHwData, 0x864, ltmp);
-               }
-               set_tx_power_per_channel_wb242(pHwData, Channel);
-               break;
-       }
-
-       if (Channel.band <= BAND_TYPE_OFDM_24) {
-               /* BB: select 2.4 GHz, bit[12-11]=00 */
-               reg->BB50 &= ~(BIT(11) | BIT(12));
-               Wb35Reg_Write(pHwData, 0x1050, reg->BB50); /* MODE_Ctrl */
-               /* MAC: select 2.4 GHz, bit[5]=0 */
-               reg->M78_ERPInformation &= ~BIT(5);
-               Wb35Reg_Write(pHwData, 0x0878, reg->M78_ERPInformation);
-               /* enable 11b Baseband */
-               reg->BB30 &= ~BIT(31);
-               Wb35Reg_Write(pHwData, 0x1030, reg->BB30);
-       } else if (Channel.band == BAND_TYPE_OFDM_5) {
-               /* BB: select 5 GHz */
-               reg->BB50 &= ~(BIT(11) | BIT(12));
-               if (Channel.ChanNo <= 64)
-                       reg->BB50 |= BIT(12);                           /* 10-5.25GHz */
-               else if ((Channel.ChanNo >= 100) && (Channel.ChanNo <= 124))
-                       reg->BB50 |= BIT(11);                           /* 01-5.48GHz */
-               else if ((Channel.ChanNo >= 128) && (Channel.ChanNo <= 161))
-                       reg->BB50 |= (BIT(12) | BIT(11));       /* 11-5.775GHz */
-               else    /* Chan 184 ~ 196 will use bit[12-11] = 10 in version sh-src-1.2.25 */
-                       reg->BB50 |= BIT(12);
-               Wb35Reg_Write(pHwData, 0x1050, reg->BB50); /* MODE_Ctrl */
-
-               /* (1) M78 should alway use 2.4G setting when using RF_AIROHA_7230 */
-               /* (2) BB30 has been updated previously. */
-               if (pHwData->phy_type != RF_AIROHA_7230) {
-                       /* MAC: select 5 GHz, bit[5]=1 */
-                       reg->M78_ERPInformation |= BIT(5);
-                       Wb35Reg_Write(pHwData, 0x0878, reg->M78_ERPInformation);
-
-                       /* disable 11b Baseband */
-                       reg->BB30 |= BIT(31);
-                       Wb35Reg_Write(pHwData, 0x1030, reg->BB30);
-               }
-       }
-}
-
-/*
- * Set the tx power directly from DUT GUI, not from the EEPROM.
- * Return the current setting
- */
-u8 RFSynthesizer_SetPowerIndex(struct hw_data *pHwData,  u8 PowerIndex)
-{
-       u32     Band = pHwData->band;
-       u8      index = 0;
-
-       if (pHwData->power_index == PowerIndex)
-               return PowerIndex;
-
-       if (RF_MAXIM_2825 == pHwData->phy_type) {
-               /* Channel 1 - 13 */
-               index = RFSynthesizer_SetMaxim2825Power(pHwData, PowerIndex);
-       } else if (RF_MAXIM_2827 == pHwData->phy_type) {
-               if (Band <= BAND_TYPE_OFDM_24)    /* Channel 1 - 13 */
-                       index = RFSynthesizer_SetMaxim2827_24Power(pHwData, PowerIndex);
-               else /* Channel 36 - 64 */
-                       index = RFSynthesizer_SetMaxim2827_50Power(pHwData, PowerIndex);
-       } else if (RF_MAXIM_2828 == pHwData->phy_type) {
-               if (Band <= BAND_TYPE_OFDM_24) /* Channel 1 - 13 */
-                       index = RFSynthesizer_SetMaxim2828_24Power(pHwData, PowerIndex);
-               else /* Channel 36 - 64 */
-                       index = RFSynthesizer_SetMaxim2828_50Power(pHwData, PowerIndex);
-       } else if (RF_AIROHA_2230 == pHwData->phy_type) {
-               /* Power index: 0 ~ 63 --- Channel 1 - 14 */
-               index = RFSynthesizer_SetAiroha2230Power(pHwData, PowerIndex);
-               index = (u8) al2230_txvga_data[index][1];
-       } else if (RF_AIROHA_2230S == pHwData->phy_type) {
-               /* Power index: 0 ~ 63 --- Channel 1 - 14 */
-               index = RFSynthesizer_SetAiroha2230Power(pHwData, PowerIndex);
-               index = (u8) al2230_txvga_data[index][1];
-       } else if (RF_AIROHA_7230 == pHwData->phy_type) {
-               /* Power index: 0 ~ 63 */
-               index = RFSynthesizer_SetAiroha7230Power(pHwData, PowerIndex);
-               index = (u8)al7230_txvga_data[index][1];
-       } else if ((RF_WB_242 == pHwData->phy_type) ||
-                (RF_WB_242_1 == pHwData->phy_type)) {
-               /* Power index: 0 ~ 19 for original. New range is 0 ~ 33 */
-               index = RFSynthesizer_SetWinbond242Power(pHwData, PowerIndex);
-               index = (u8)w89rf242_txvga_data[index][1];
-       }
-
-       pHwData->power_index = index;  /* Backup current */
-       return index;
-}
-
-/* -- Sub function */
-u8 RFSynthesizer_SetMaxim2828_24Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       if (index > 1)
-               index = 1;
-       PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_power_data_24[index], 18);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return index;
-}
-
-u8 RFSynthesizer_SetMaxim2828_50Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       if (index > 1)
-               index = 1;
-       PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2828_power_data_50[index], 18);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return index;
-}
-
-u8 RFSynthesizer_SetMaxim2827_24Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       if (index > 1)
-               index = 1;
-       PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_power_data_24[index], 18);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return index;
-}
-
-u8 RFSynthesizer_SetMaxim2827_50Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       if (index > 1)
-               index = 1;
-       PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2827_power_data_50[index], 18);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return index;
-}
-
-u8 RFSynthesizer_SetMaxim2825Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       if (index > 1)
-               index = 1;
-       PowerData = (1 << 31) | (0 << 30) | (18 << 24) | BitReverse(max2825_power_data_24[index], 18);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return index;
-}
-
-u8 RFSynthesizer_SetAiroha2230Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       u8      i, count;
-
-       count = ARRAY_SIZE(al2230_txvga_data);
-       for (i = 0; i < count; i++) {
-               if (al2230_txvga_data[i][1] >= index)
-                       break;
-       }
-       if (i == count)
-               i--;
-
-       PowerData = (1 << 31) | (0 << 30) | (20 << 24) | BitReverse(al2230_txvga_data[i][0], 20);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return i;
-}
-
-u8 RFSynthesizer_SetAiroha7230Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       u8      i, count;
-
-       count = ARRAY_SIZE(al7230_txvga_data);
-       for (i = 0; i < count; i++) {
-               if (al7230_txvga_data[i][1] >= index)
-                       break;
-       }
-       if (i == count)
-               i--;
-       PowerData = (1 << 31) | (0 << 30) | (24 << 24) | (al7230_txvga_data[i][0] & 0xffffff);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-       return i;
-}
-
-u8 RFSynthesizer_SetWinbond242Power(struct hw_data *pHwData, u8 index)
-{
-       u32     PowerData;
-       u8      i, count;
-
-       count = ARRAY_SIZE(w89rf242_txvga_data);
-       for (i = 0; i < count; i++) {
-               if (w89rf242_txvga_data[i][1] >= index)
-                       break;
-       }
-       if (i == count)
-               i--;
-
-       /* Set TxVga into RF */
-       PowerData = (1 << 31) | (0 << 30) | (24 << 24) | BitReverse(w89rf242_txvga_data[i][0], 24);
-       Wb35Reg_Write(pHwData, 0x0864, PowerData);
-
-       /* Update BB48 BB4C BB58 for high precision txvga */
-       Wb35Reg_Write(pHwData, 0x1048, w89rf242_txvga_data[i][2]);
-       Wb35Reg_Write(pHwData, 0x104c, w89rf242_txvga_data[i][3]);
-       Wb35Reg_Write(pHwData, 0x1058, w89rf242_txvga_data[i][4]);
-
-       return i;
-}
-
-/*
- * ===========================================================================
- * Dxx_initial --
- * Mxx_initial --
- *
- *  Routine Description:
- *     Initial the hardware setting and module variable
- * ===========================================================================
- */
-void Dxx_initial(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       /*
-        * Old IC: Single mode only.
-        * New IC: operation decide by Software set bit[4]. 1:multiple 0: single
-        */
-       reg->D00_DmaControl = 0xc0000004;       /* Txon, Rxon, multiple Rx for new 4k DMA */
-                                               /* Txon, Rxon, single Rx for old 8k ASIC */
-       if (!HAL_USB_MODE_BURST(pHwData))
-               reg->D00_DmaControl = 0xc0000000; /* Txon, Rxon, single Rx for new 4k DMA */
-
-       Wb35Reg_WriteSync(pHwData, 0x0400, reg->D00_DmaControl);
-}
-
-void Mxx_initial(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32     tmp;
-       u32     pltmp[11];
-       u16     i;
-
-
-       /*
-        * ======================================================
-        * Initial Mxx register
-        * ======================================================
-        */
-
-       /* M00 bit set */
-       reg->M00_MacControl = 0x80000000; /* Solve beacon sequence number stop by hardware */
-
-       /* M24 disable enter power save, BB RxOn and enable NAV attack */
-       reg->M24_MacControl = 0x08040042;
-       pltmp[0] = reg->M24_MacControl;
-
-       pltmp[1] = 0; /* Skip M28, because no initialize value is required. */
-
-       /* M2C CWmin and CWmax setting */
-       pHwData->cwmin = DEFAULT_CWMIN;
-       pHwData->cwmax = DEFAULT_CWMAX;
-       reg->M2C_MacControl = DEFAULT_CWMIN << 10;
-       reg->M2C_MacControl |= DEFAULT_CWMAX;
-       pltmp[2] = reg->M2C_MacControl;
-
-       /* M30 BSSID */
-       pltmp[3] = *(u32 *)pHwData->bssid;
-
-       /* M34 */
-       pHwData->AID = DEFAULT_AID;
-       tmp = *(u16 *) (pHwData->bssid + 4);
-       tmp |= DEFAULT_AID << 16;
-       pltmp[4] = tmp;
-
-       /* M38 */
-       reg->M38_MacControl = (DEFAULT_RATE_RETRY_LIMIT << 8) | (DEFAULT_LONG_RETRY_LIMIT << 4) | DEFAULT_SHORT_RETRY_LIMIT;
-       pltmp[5] = reg->M38_MacControl;
-
-       /* M3C */
-       tmp = (DEFAULT_PIFST << 26) | (DEFAULT_EIFST << 16) | (DEFAULT_DIFST << 8) | (DEFAULT_SIFST << 4) | DEFAULT_OSIFST;
-       reg->M3C_MacControl = tmp;
-       pltmp[6] = tmp;
-
-       /* M40 */
-       pHwData->slot_time_select = DEFAULT_SLOT_TIME;
-       tmp = (DEFAULT_ATIMWD << 16) | DEFAULT_SLOT_TIME;
-       reg->M40_MacControl = tmp;
-       pltmp[7] = tmp;
-
-       /* M44 */
-       tmp = DEFAULT_MAX_TX_MSDU_LIFE_TIME << 10; /* *1024 */
-       reg->M44_MacControl = tmp;
-       pltmp[8] = tmp;
-
-       /* M48 */
-       pHwData->BeaconPeriod = DEFAULT_BEACON_INTERVAL;
-       pHwData->ProbeDelay = DEFAULT_PROBE_DELAY_TIME;
-       tmp = (DEFAULT_BEACON_INTERVAL << 16) | DEFAULT_PROBE_DELAY_TIME;
-       reg->M48_MacControl = tmp;
-       pltmp[9] = tmp;
-
-       /* M4C */
-       reg->M4C_MacStatus = (DEFAULT_PROTOCOL_VERSION << 30) | (DEFAULT_MAC_POWER_STATE << 28) | (DEFAULT_DTIM_ALERT_TIME << 24);
-       pltmp[10] = reg->M4C_MacStatus;
-
-       for (i = 0; i < 11; i++)
-               Wb35Reg_WriteSync(pHwData, 0x0824 + i * 4, pltmp[i]);
-
-       /* M60 */
-       Wb35Reg_WriteSync(pHwData, 0x0860, 0x12481248);
-       reg->M60_MacControl = 0x12481248;
-
-       /* M68 */
-       Wb35Reg_WriteSync(pHwData, 0x0868, 0x00050900);
-       reg->M68_MacControl = 0x00050900;
-
-       /* M98 */
-       Wb35Reg_WriteSync(pHwData, 0x0898, 0xffff8888);
-       reg->M98_MacControl = 0xffff8888;
-}
-
-
-void Uxx_power_off_procedure(struct hw_data *pHwData)
-{
-       /* SW, PMU reset and turn off clock */
-       Wb35Reg_WriteSync(pHwData, 0x03b0, 3);
-       Wb35Reg_WriteSync(pHwData, 0x03f0, 0xf9);
-}
-
-/*Decide the TxVga of every channel */
-void GetTxVgaFromEEPROM(struct hw_data *pHwData)
-{
-       u32     i, j, ltmp;
-       u16     Value[MAX_TXVGA_EEPROM];
-       u8      *pctmp;
-       u8      ctmp = 0;
-
-       /* Get the entire TxVga setting in EEPROM */
-       for (i = 0; i < MAX_TXVGA_EEPROM; i++) {
-               Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08100000 + 0x00010000 * i);
-               Wb35Reg_ReadSync(pHwData, 0x03b4, &ltmp);
-               Value[i] = (u16) (ltmp & 0xffff); /* Get 16 bit available */
-               Value[i] = cpu_to_le16(Value[i]); /* [7:0]2412 [7:0]2417 .... */
-       }
-
-       /* Adjust the filed which fills with reserved value. */
-       pctmp = (u8 *) Value;
-       for (i = 0; i < (MAX_TXVGA_EEPROM * 2); i++) {
-               if (pctmp[i] != 0xff)
-                       ctmp = pctmp[i];
-               else
-                       pctmp[i] = ctmp;
-       }
-
-       /* Adjust WB_242 to WB_242_1 TxVga scale */
-       if (pHwData->phy_type == RF_WB_242) {
-               for (i = 0; i < 4; i++) { /* Only 2412 2437 2462 2484 case must be modified */
-                       for (j = 0; j < ARRAY_SIZE(w89rf242_txvga_old_mapping); j++) {
-                               if (pctmp[i] < (u8) w89rf242_txvga_old_mapping[j][1]) {
-                                       pctmp[i] = (u8) w89rf242_txvga_old_mapping[j][0];
-                                       break;
-                               }
-                       }
-
-                       if (j == ARRAY_SIZE(w89rf242_txvga_old_mapping))
-                               pctmp[i] = (u8)w89rf242_txvga_old_mapping[j-1][0];
-               }
-       }
-
-       memcpy(pHwData->TxVgaSettingInEEPROM, pctmp, MAX_TXVGA_EEPROM * 2); /* MAX_TXVGA_EEPROM is u16 count */
-       EEPROMTxVgaAdjust(pHwData);
-}
-
-/*
- * This function will affect the TxVga parameter in HAL. If hal_set_current_channel
- * or RFSynthesizer_SetPowerIndex be called, new TxVga will take effect.
- * TxVgaSettingInEEPROM of sHwData is an u8 array point to EEPROM contain for IS89C35
- * This function will use default TxVgaSettingInEEPROM data to calculate new TxVga.
- */
-void EEPROMTxVgaAdjust(struct hw_data *pHwData)
-{
-       u8      *pTxVga = pHwData->TxVgaSettingInEEPROM;
-       s16     i, stmp;
-
-       /* -- 2.4G -- */
-       /* channel 1 ~ 5 */
-       stmp = pTxVga[1] - pTxVga[0];
-       for (i = 0; i < 5; i++)
-               pHwData->TxVgaFor24[i] = pTxVga[0] + stmp * i / 4;
-       /* channel 6 ~ 10 */
-       stmp = pTxVga[2] - pTxVga[1];
-       for (i = 5; i < 10; i++)
-               pHwData->TxVgaFor24[i] = pTxVga[1] + stmp * (i - 5) / 4;
-       /* channel 11 ~ 13 */
-       stmp = pTxVga[3] - pTxVga[2];
-       for (i = 10; i < 13; i++)
-               pHwData->TxVgaFor24[i] = pTxVga[2] + stmp * (i - 10) / 2;
-       /* channel 14 */
-       pHwData->TxVgaFor24[13] = pTxVga[3];
-
-       /* -- 5G -- */
-       if (pHwData->phy_type == RF_AIROHA_7230) {
-               /* channel 184 */
-               pHwData->TxVgaFor50[0].ChanNo = 184;
-               pHwData->TxVgaFor50[0].TxVgaValue = pTxVga[4];
-               /* channel 196 */
-               pHwData->TxVgaFor50[3].ChanNo = 196;
-               pHwData->TxVgaFor50[3].TxVgaValue = pTxVga[5];
-               /* interpolate */
-               pHwData->TxVgaFor50[1].ChanNo = 188;
-               pHwData->TxVgaFor50[2].ChanNo = 192;
-               stmp = pTxVga[5] - pTxVga[4];
-               pHwData->TxVgaFor50[2].TxVgaValue = pTxVga[5] - stmp / 3;
-               pHwData->TxVgaFor50[1].TxVgaValue = pTxVga[5] - stmp * 2 / 3;
-
-               /* channel 16 */
-               pHwData->TxVgaFor50[6].ChanNo = 16;
-               pHwData->TxVgaFor50[6].TxVgaValue = pTxVga[6];
-               pHwData->TxVgaFor50[4].ChanNo = 8;
-               pHwData->TxVgaFor50[4].TxVgaValue = pTxVga[6];
-               pHwData->TxVgaFor50[5].ChanNo = 12;
-               pHwData->TxVgaFor50[5].TxVgaValue = pTxVga[6];
-
-               /* channel 36 */
-               pHwData->TxVgaFor50[8].ChanNo = 36;
-               pHwData->TxVgaFor50[8].TxVgaValue = pTxVga[7];
-               pHwData->TxVgaFor50[7].ChanNo = 34;
-               pHwData->TxVgaFor50[7].TxVgaValue = pTxVga[7];
-               pHwData->TxVgaFor50[9].ChanNo = 38;
-               pHwData->TxVgaFor50[9].TxVgaValue = pTxVga[7];
-
-               /* channel 40 */
-               pHwData->TxVgaFor50[10].ChanNo = 40;
-               pHwData->TxVgaFor50[10].TxVgaValue = pTxVga[8];
-               /* channel 48 */
-               pHwData->TxVgaFor50[14].ChanNo = 48;
-               pHwData->TxVgaFor50[14].TxVgaValue = pTxVga[9];
-               /* interpolate */
-               pHwData->TxVgaFor50[11].ChanNo = 42;
-               pHwData->TxVgaFor50[12].ChanNo = 44;
-               pHwData->TxVgaFor50[13].ChanNo = 46;
-               stmp = pTxVga[9] - pTxVga[8];
-               pHwData->TxVgaFor50[13].TxVgaValue = pTxVga[9] - stmp / 4;
-               pHwData->TxVgaFor50[12].TxVgaValue = pTxVga[9] - stmp * 2 / 4;
-               pHwData->TxVgaFor50[11].TxVgaValue = pTxVga[9] - stmp * 3 / 4;
-
-               /* channel 52 */
-               pHwData->TxVgaFor50[15].ChanNo = 52;
-               pHwData->TxVgaFor50[15].TxVgaValue = pTxVga[10];
-               /* channel 64 */
-               pHwData->TxVgaFor50[18].ChanNo = 64;
-               pHwData->TxVgaFor50[18].TxVgaValue = pTxVga[11];
-               /* interpolate */
-               pHwData->TxVgaFor50[16].ChanNo = 56;
-               pHwData->TxVgaFor50[17].ChanNo = 60;
-               stmp = pTxVga[11] - pTxVga[10];
-               pHwData->TxVgaFor50[17].TxVgaValue = pTxVga[11] - stmp / 3;
-               pHwData->TxVgaFor50[16].TxVgaValue = pTxVga[11] - stmp * 2 / 3;
-
-               /* channel 100 */
-               pHwData->TxVgaFor50[19].ChanNo = 100;
-               pHwData->TxVgaFor50[19].TxVgaValue = pTxVga[12];
-               /* channel 112 */
-               pHwData->TxVgaFor50[22].ChanNo = 112;
-               pHwData->TxVgaFor50[22].TxVgaValue = pTxVga[13];
-               /* interpolate */
-               pHwData->TxVgaFor50[20].ChanNo = 104;
-               pHwData->TxVgaFor50[21].ChanNo = 108;
-               stmp = pTxVga[13] - pTxVga[12];
-               pHwData->TxVgaFor50[21].TxVgaValue = pTxVga[13] - stmp / 3;
-               pHwData->TxVgaFor50[20].TxVgaValue = pTxVga[13] - stmp * 2 / 3;
-
-               /* channel 128 */
-               pHwData->TxVgaFor50[26].ChanNo = 128;
-               pHwData->TxVgaFor50[26].TxVgaValue = pTxVga[14];
-               /* interpolate */
-               pHwData->TxVgaFor50[23].ChanNo = 116;
-               pHwData->TxVgaFor50[24].ChanNo = 120;
-               pHwData->TxVgaFor50[25].ChanNo = 124;
-               stmp = pTxVga[14] - pTxVga[13];
-               pHwData->TxVgaFor50[25].TxVgaValue = pTxVga[14] - stmp / 4;
-               pHwData->TxVgaFor50[24].TxVgaValue = pTxVga[14] - stmp * 2 / 4;
-               pHwData->TxVgaFor50[23].TxVgaValue = pTxVga[14] - stmp * 3 / 4;
-
-               /* channel 140 */
-               pHwData->TxVgaFor50[29].ChanNo = 140;
-               pHwData->TxVgaFor50[29].TxVgaValue = pTxVga[15];
-               /* interpolate */
-               pHwData->TxVgaFor50[27].ChanNo = 132;
-               pHwData->TxVgaFor50[28].ChanNo = 136;
-               stmp = pTxVga[15] - pTxVga[14];
-               pHwData->TxVgaFor50[28].TxVgaValue = pTxVga[15] - stmp / 3;
-               pHwData->TxVgaFor50[27].TxVgaValue = pTxVga[15] - stmp * 2 / 3;
-
-               /* channel 149 */
-               pHwData->TxVgaFor50[30].ChanNo = 149;
-               pHwData->TxVgaFor50[30].TxVgaValue = pTxVga[16];
-               /* channel 165 */
-               pHwData->TxVgaFor50[34].ChanNo = 165;
-               pHwData->TxVgaFor50[34].TxVgaValue = pTxVga[17];
-               /* interpolate */
-               pHwData->TxVgaFor50[31].ChanNo = 153;
-               pHwData->TxVgaFor50[32].ChanNo = 157;
-               pHwData->TxVgaFor50[33].ChanNo = 161;
-               stmp = pTxVga[17] - pTxVga[16];
-               pHwData->TxVgaFor50[33].TxVgaValue = pTxVga[17] - stmp / 4;
-               pHwData->TxVgaFor50[32].TxVgaValue = pTxVga[17] - stmp * 2 / 4;
-               pHwData->TxVgaFor50[31].TxVgaValue = pTxVga[17] - stmp * 3 / 4;
-       }
-}
-
-void BBProcessor_RateChanging(struct hw_data *pHwData,  u8 rate)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       unsigned char   Is11bRate;
-
-       Is11bRate = (rate % 6) ? 1 : 0;
-       switch (pHwData->phy_type) {
-       case RF_AIROHA_2230:
-       case RF_AIROHA_2230S:
-               if (Is11bRate) {
-                       if ((reg->BB48 != BB48_DEFAULT_AL2230_11B) &&
-                               (reg->BB4C != BB4C_DEFAULT_AL2230_11B)) {
-                               Wb35Reg_Write(pHwData, 0x1048, BB48_DEFAULT_AL2230_11B);
-                               Wb35Reg_Write(pHwData, 0x104c, BB4C_DEFAULT_AL2230_11B);
-                       }
-               } else {
-                       if ((reg->BB48 != BB48_DEFAULT_AL2230_11G) &&
-                               (reg->BB4C != BB4C_DEFAULT_AL2230_11G)) {
-                               Wb35Reg_Write(pHwData, 0x1048, BB48_DEFAULT_AL2230_11G);
-                               Wb35Reg_Write(pHwData, 0x104c, BB4C_DEFAULT_AL2230_11G);
-                       }
-               }
-               break;
-       case RF_WB_242:
-               if (Is11bRate) {
-                       if ((reg->BB48 != BB48_DEFAULT_WB242_11B) &&
-                               (reg->BB4C != BB4C_DEFAULT_WB242_11B)) {
-                               reg->BB48 = BB48_DEFAULT_WB242_11B;
-                               reg->BB4C = BB4C_DEFAULT_WB242_11B;
-                               Wb35Reg_Write(pHwData, 0x1048, BB48_DEFAULT_WB242_11B);
-                               Wb35Reg_Write(pHwData, 0x104c, BB4C_DEFAULT_WB242_11B);
-                       }
-               } else {
-                       if ((reg->BB48 != BB48_DEFAULT_WB242_11G) &&
-                               (reg->BB4C != BB4C_DEFAULT_WB242_11G)) {
-                               reg->BB48 = BB48_DEFAULT_WB242_11G;
-                               reg->BB4C = BB4C_DEFAULT_WB242_11G;
-                               Wb35Reg_Write(pHwData, 0x1048, BB48_DEFAULT_WB242_11G);
-                               Wb35Reg_Write(pHwData, 0x104c, BB4C_DEFAULT_WB242_11G);
-                       }
-               }
-               break;
-       }
-}
-
diff --git a/drivers/staging/winbond/sme_api.h b/drivers/staging/winbond/sme_api.h
deleted file mode 100644 (file)
index 652ae70..0000000
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
- * sme_api.h
- *
- * Copyright(C) 2002 Winbond Electronics Corp.
- */
-
-#ifndef __SME_API_H__
-#define __SME_API_H__
-
-#include <linux/types.h>
-
-#include "localpara.h"
-
-/****************** CONSTANT AND MACRO SECTION ******************************/
-
-#define MEDIA_STATE_DISCONNECTED       0
-#define MEDIA_STATE_CONNECTED          1
-
-/* ARRAY CHECK */
-#define MAX_POWER_TO_DB                        32
-
-/****************** TYPE DEFINITION SECTION *********************************/
-
-/****************** EXPORTED FUNCTION DECLARATION SECTION *******************/
-
-/* OID_802_11_BSSID */
-s8 sme_get_bssid(void *pcore_data, u8 *pbssid);
-s8 sme_get_desired_bssid(void *pcore_data, u8 *pbssid); /* Unused */
-s8 sme_set_desired_bssid(void *pcore_data, u8 *pbssid);
-
-/* OID_802_11_SSID */
-s8 sme_get_ssid(void *pcore_data, u8 *pssid, u8 *pssid_len);
-s8 sme_get_desired_ssid(void *pcore_data, u8 *pssid, u8 *pssid_len);/* Unused */
-s8 sme_set_desired_ssid(void *pcore_data, u8 *pssid, u8 ssid_len);
-
-/* OID_802_11_INFRASTRUCTURE_MODE */
-s8 sme_get_bss_type(void *pcore_data, u8 *pbss_type);
-s8 sme_get_desired_bss_type(void *pcore_data, u8 *pbss_type); /* Unused */
-s8 sme_set_desired_bss_type(void *pcore_data, u8 bss_type);
-
-/* OID_802_11_FRAGMENTATION_THRESHOLD */
-s8 sme_get_fragment_threshold(void *pcore_data, u32 *pthreshold);
-s8 sme_set_fragment_threshold(void *pcore_data, u32 threshold);
-
-/* OID_802_11_RTS_THRESHOLD */
-s8 sme_get_rts_threshold(void *pcore_data, u32 *pthreshold);
-s8 sme_set_rts_threshold(void *pcore_data, u32 threshold);
-
-/* OID_802_11_CONFIGURATION */
-s8 sme_get_beacon_period(void *pcore_data, u16 *pbeacon_period);
-s8 sme_set_beacon_period(void *pcore_data, u16 beacon_period);
-
-s8 sme_get_atim_window(void *pcore_data, u16 *patim_window);
-s8 sme_set_atim_window(void *pcore_data, u16 atim_window);
-
-s8 sme_get_current_channel(void *pcore_data, u8 *pcurrent_channel);
-s8 sme_get_current_band(void *pcore_data, u8 *pcurrent_band);
-s8 sme_set_current_channel(void *pcore_data, u8 current_channel);
-
-/* OID_802_11_BSSID_LIST */
-s8 sme_get_scan_bss_count(void *pcore_data, u8 *pcount);
-s8 sme_get_scan_bss(void *pcore_data, u8 index, void **ppbss);
-
-s8 sme_get_connected_bss(void *pcore_data, void **ppbss_now);
-
-/* OID_802_11_AUTHENTICATION_MODE */
-s8 sme_get_auth_mode(void *pcore_data, u8 *pauth_mode);
-s8 sme_set_auth_mode(void *pcore_data, u8 auth_mode);
-
-/* OID_802_11_WEP_STATUS / OID_802_11_ENCRYPTION_STATUS */
-s8 sme_get_wep_mode(void *pcore_data, u8 *pwep_mode);
-s8 sme_set_wep_mode(void *pcore_data, u8 wep_mode);
-
-/* OID_GEN_VENDOR_ID */
-/* OID_802_3_PERMANENT_ADDRESS */
-s8 sme_get_permanent_mac_addr(void *pcore_data, u8 *pmac_addr);
-
-/* OID_802_3_CURRENT_ADDRESS */
-s8 sme_get_current_mac_addr(void *pcore_data, u8 *pmac_addr);
-
-/* OID_802_11_NETWORK_TYPE_IN_USE */
-s8 sme_get_network_type_in_use(void *pcore_data, u8 *ptype);
-s8 sme_set_network_type_in_use(void *pcore_data, u8 type);
-
-/* OID_802_11_SUPPORTED_RATES */
-s8 sme_get_supported_rate(void *pcore_data, u8 *prates);
-
-/* OID_802_11_ADD_WEP */
-s8 sme_set_add_wep(void *pcore_data, u32 key_index, u32 key_len,
-                                        u8 *Address, u8 *key);
-
-/* OID_802_11_REMOVE_WEP */
-s8 sme_set_remove_wep(void *pcre_data, u32 key_index);
-
-/* OID_802_11_DISASSOCIATE */
-s8 sme_set_disassociate(void *pcore_data);
-
-/* OID_802_11_POWER_MODE */
-s8 sme_get_power_mode(void *pcore_data, u8 *pmode);
-s8 sme_set_power_mode(void *pcore_data, u8 mode);
-
-/* OID_802_11_BSSID_LIST_SCAN */
-s8 sme_set_bssid_list_scan(void *pcore_data, void *pscan_para);
-
-/* OID_802_11_RELOAD_DEFAULTS */
-s8 sme_set_reload_defaults(void *pcore_data, u8 reload_type);
-
-
-/*------------------------- non-standard ----------------------------------*/
-s8 sme_get_connect_status(void *pcore_data, u8 *pstatus);
-/*--------------------------------------------------------------------------*/
-
-void sme_get_encryption_status(void *pcore_data, u8 *EncryptStatus);
-void sme_set_encryption_status(void *pcore_data, u8 EncryptStatus);
-s8 sme_add_key(void    *pcore_data,
-               u32     key_index,
-               u8      key_len,
-               u8      key_type,
-               u8      *key_bssid,
-               u8      *ptx_tsc,
-               u8      *prx_tsc,
-               u8      *key_material);
-void sme_remove_default_key(void *pcore_data, int index);
-void sme_remove_mapping_key(void *pcore_data, u8 *pmac_addr);
-void sme_clear_all_mapping_key(void *pcore_data);
-void sme_clear_all_default_key(void *pcore_data);
-
-
-
-s8 sme_set_preamble_mode(void *pcore_data, u8 mode);
-s8 sme_get_preamble_mode(void *pcore_data, u8 *mode);
-s8 sme_get_preamble_type(void *pcore_data, u8 *type);
-s8 sme_set_slottime_mode(void *pcore_data, u8 mode);
-s8 sme_get_slottime_mode(void *pcore_data, u8 *mode);
-s8 sme_get_slottime_type(void *pcore_data, u8 *type);
-s8 sme_set_txrate_policy(void *pcore_data, u8 policy);
-s8 sme_get_txrate_policy(void *pcore_data, u8 *policy);
-s8 sme_get_cwmin_value(void *pcore_data, u8 *cwmin);
-s8 sme_get_cwmax_value(void *pcore_data, u16 *cwmax);
-s8 sme_get_ms_radio_mode(void *pcore_data, u8 *pMsRadioOff);
-s8 sme_set_ms_radio_mode(void *pcore_data, u8 boMsRadioOff);
-
-void sme_get_tx_power_level(void *pcore_data, u32 *TxPower);
-u8 sme_set_tx_power_level(void *pcore_data, u32 TxPower);
-void sme_get_antenna_count(void *pcore_data, u32 *AntennaCount);
-void sme_get_rx_antenna(void *pcore_data, u32 *RxAntenna);
-u8 sme_set_rx_antenna(void *pcore_data, u32 RxAntenna);
-void sme_get_tx_antenna(void *pcore_data, u32 *TxAntenna);
-s8 sme_set_tx_antenna(void *pcore_data, u32 TxAntenna);
-s8 sme_set_IBSS_chan(void *pcore_data, struct chan_info chan);
-s8 sme_set_IE_append(void *pcore_data, u8 *buffer, u16 buf_len);
-
-/* ================== Local functions ====================== */
-static const u32 PowerDbToMw[] = {
-       56,     /* mW, MAX - 0, 17.5 dbm */
-       40,     /* mW, MAX - 1, 16.0 dbm */
-       30,     /* mW, MAX - 2, 14.8 dbm */
-       20,     /* mW, MAX - 3, 13.0 dbm */
-       15,     /* mW, MAX - 4, 11.8 dbm */
-       12,     /* mW, MAX - 5, 10.6 dbm */
-       9,      /* mW, MAX - 6,  9.4 dbm */
-       7,      /* mW, MAX - 7,  8.3 dbm */
-       5,      /* mW, MAX - 8,  6.4 dbm */
-       4,      /* mW, MAX - 9,  5.3 dbm */
-       3,      /* mW, MAX - 10,  4.0 dbm */
-       2,      /* mW, MAX - 11,  ? dbm */
-       2,      /* mW, MAX - 12,  ? dbm */
-       2,      /* mW, MAX - 13,  ? dbm */
-       2,      /* mW, MAX - 14,  ? dbm */
-       2,      /* mW, MAX - 15,  ? dbm */
-       2,      /* mW, MAX - 16,  ? dbm */
-       2,      /* mW, MAX - 17,  ? dbm */
-       2,      /* mW, MAX - 18,  ? dbm */
-       1,      /* mW, MAX - 19,  ? dbm */
-       1,      /* mW, MAX - 20,  ? dbm */
-       1,      /* mW, MAX - 21,  ? dbm */
-       1,      /* mW, MAX - 22,  ? dbm */
-       1,      /* mW, MAX - 23,  ? dbm */
-       1,      /* mW, MAX - 24,  ? dbm */
-       1,      /* mW, MAX - 25,  ? dbm */
-       1,      /* mW, MAX - 26,  ? dbm */
-       1,      /* mW, MAX - 27,  ? dbm */
-       1,      /* mW, MAX - 28,  ? dbm */
-       1,      /* mW, MAX - 29,  ? dbm */
-       1,      /* mW, MAX - 30,  ? dbm */
-       1       /* mW, MAX - 31,  ? dbm */
-};
-
-#endif /* __SME_API_H__ */
-
-
diff --git a/drivers/staging/winbond/wb35reg.c b/drivers/staging/winbond/wb35reg.c
deleted file mode 100644 (file)
index bbc5ddc..0000000
+++ /dev/null
@@ -1,806 +0,0 @@
-#include "wb35reg_f.h"
-#include "phy_calibration.h"
-
-#include <linux/usb.h>
-#include <linux/slab.h>
-
-/*
- * true  : read command process successfully
- * false : register not support
- * RegisterNo : start base
- * pRegisterData : data point
- * NumberOfData : number of register data
- * Flag : AUTO_INCREMENT - RegisterNo will auto increment 4
- *       NO_INCREMENT - Function will write data into the same register
- */
-unsigned char Wb35Reg_BurstWrite(struct hw_data *pHwData, u16 RegisterNo,
-                                u32 *pRegisterData, u8 NumberOfData, u8 Flag)
-{
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct urb              *urb = NULL;
-       struct wb35_reg_queue   *reg_queue = NULL;
-       u16                     UrbSize;
-       struct usb_ctrlrequest  *dr;
-       u16                     i, DataSize = NumberOfData * 4;
-
-       /* Module shutdown */
-       if (pHwData->SurpriseRemove)
-               return false;
-
-       /* Trying to use burst write function if use new hardware */
-       UrbSize = sizeof(struct wb35_reg_queue) + DataSize + sizeof(struct usb_ctrlrequest);
-       reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
-       if (reg_queue == NULL)
-               return false;
-
-       urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (urb == NULL) {
-               kfree(reg_queue);
-               return false;
-       }
-
-       reg_queue->DIRECT = 2; /* burst write register */
-       reg_queue->INDEX = RegisterNo;
-       reg_queue->pBuffer = (u32 *)((u8 *)reg_queue + sizeof(struct wb35_reg_queue));
-       memcpy(reg_queue->pBuffer, pRegisterData, DataSize);
-       /* the function for reversing register data from little endian to big endian */
-       for (i = 0; i < NumberOfData; i++)
-               reg_queue->pBuffer[i] = cpu_to_le32(reg_queue->pBuffer[i]);
-
-       dr = (struct usb_ctrlrequest *)((u8 *)reg_queue + sizeof(struct wb35_reg_queue) + DataSize);
-       dr->bRequestType = USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE;
-       dr->bRequest = 0x04; /* USB or vendor-defined request code, burst mode */
-       dr->wValue = cpu_to_le16(Flag); /* 0: Register number auto-increment, 1: No auto increment */
-       dr->wIndex = cpu_to_le16(RegisterNo);
-       dr->wLength = cpu_to_le16(DataSize);
-       reg_queue->Next = NULL;
-       reg_queue->pUsbReq = dr;
-       reg_queue->urb = urb;
-
-       spin_lock_irq(&reg->EP0VM_spin_lock);
-       if (reg->reg_first == NULL)
-               reg->reg_first = reg_queue;
-       else
-               reg->reg_last->Next = reg_queue;
-       reg->reg_last = reg_queue;
-
-       spin_unlock_irq(&reg->EP0VM_spin_lock);
-
-       /* Start EP0VM */
-       Wb35Reg_EP0VM_start(pHwData);
-
-       return true;
-}
-
-void Wb35Reg_Update(struct hw_data *pHwData, u16 RegisterNo, u32 RegisterValue)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       switch (RegisterNo) {
-       case 0x3b0:
-               reg->U1B0 = RegisterValue;
-               break;
-       case 0x3bc:
-               reg->U1BC_LEDConfigure = RegisterValue;
-               break;
-       case 0x400:
-               reg->D00_DmaControl = RegisterValue;
-               break;
-       case 0x800:
-               reg->M00_MacControl = RegisterValue;
-               break;
-       case 0x804:
-               reg->M04_MulticastAddress1 = RegisterValue;
-               break;
-       case 0x808:
-               reg->M08_MulticastAddress2 = RegisterValue;
-               break;
-       case 0x824:
-               reg->M24_MacControl = RegisterValue;
-               break;
-       case 0x828:
-               reg->M28_MacControl = RegisterValue;
-               break;
-       case 0x82c:
-               reg->M2C_MacControl = RegisterValue;
-               break;
-       case 0x838:
-               reg->M38_MacControl = RegisterValue;
-               break;
-       case 0x840:
-               reg->M40_MacControl = RegisterValue;
-               break;
-       case 0x844:
-               reg->M44_MacControl = RegisterValue;
-               break;
-       case 0x848:
-               reg->M48_MacControl = RegisterValue;
-               break;
-       case 0x84c:
-               reg->M4C_MacStatus = RegisterValue;
-               break;
-       case 0x860:
-               reg->M60_MacControl = RegisterValue;
-               break;
-       case 0x868:
-               reg->M68_MacControl = RegisterValue;
-               break;
-       case 0x870:
-               reg->M70_MacControl = RegisterValue;
-               break;
-       case 0x874:
-               reg->M74_MacControl = RegisterValue;
-               break;
-       case 0x878:
-               reg->M78_ERPInformation = RegisterValue;
-               break;
-       case 0x87C:
-               reg->M7C_MacControl = RegisterValue;
-               break;
-       case 0x880:
-               reg->M80_MacControl = RegisterValue;
-               break;
-       case 0x884:
-               reg->M84_MacControl = RegisterValue;
-               break;
-       case 0x888:
-               reg->M88_MacControl = RegisterValue;
-               break;
-       case 0x898:
-               reg->M98_MacControl = RegisterValue;
-               break;
-       case 0x100c:
-               reg->BB0C = RegisterValue;
-               break;
-       case 0x102c:
-               reg->BB2C = RegisterValue;
-               break;
-       case 0x1030:
-               reg->BB30 = RegisterValue;
-               break;
-       case 0x103c:
-               reg->BB3C = RegisterValue;
-               break;
-       case 0x1048:
-               reg->BB48 = RegisterValue;
-               break;
-       case 0x104c:
-               reg->BB4C = RegisterValue;
-               break;
-       case 0x1050:
-               reg->BB50 = RegisterValue;
-               break;
-       case 0x1054:
-               reg->BB54 = RegisterValue;
-               break;
-       case 0x1058:
-               reg->BB58 = RegisterValue;
-               break;
-       case 0x105c:
-               reg->BB5C = RegisterValue;
-               break;
-       case 0x1060:
-               reg->BB60 = RegisterValue;
-               break;
-       }
-}
-
-/*
- * true  : read command process successfully
- * false : register not support
- */
-unsigned char Wb35Reg_WriteSync(struct hw_data *pHwData, u16 RegisterNo,
-                               u32 RegisterValue)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       int ret = -1;
-
-       /* Module shutdown */
-       if (pHwData->SurpriseRemove)
-               return false;
-
-       RegisterValue = cpu_to_le32(RegisterValue);
-
-       /* update the register by send usb message */
-       reg->SyncIoPause = 1;
-
-       /* Wait until EP0VM stop */
-       while (reg->EP0vm_state != VM_STOP)
-               msleep(10);
-
-       /* Sync IoCallDriver */
-       reg->EP0vm_state = VM_RUNNING;
-       ret = usb_control_msg(pHwData->udev,
-                             usb_sndctrlpipe(pHwData->udev, 0),
-                             0x03,
-                             USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_OUT,
-                             0x0, RegisterNo, &RegisterValue, 4, HZ * 100);
-       reg->EP0vm_state = VM_STOP;
-       reg->SyncIoPause = 0;
-
-       Wb35Reg_EP0VM_start(pHwData);
-
-       if (ret < 0) {
-               pr_debug("EP0 Write register usb message sending error\n");
-               pHwData->SurpriseRemove = 1;
-               return false;
-       }
-       return true;
-}
-
-/*
- * true  : read command process successfully
- * false : register not support
- */
-unsigned char Wb35Reg_Write(struct hw_data *pHwData, u16 RegisterNo,
-                           u32 RegisterValue)
-{
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct usb_ctrlrequest  *dr;
-       struct urb              *urb = NULL;
-       struct wb35_reg_queue   *reg_queue = NULL;
-       u16                     UrbSize;
-
-       /* Module shutdown */
-       if (pHwData->SurpriseRemove)
-               return false;
-
-       /* update the register by send urb request */
-       UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
-       reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
-       if (reg_queue == NULL)
-               return false;
-
-       urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (urb == NULL) {
-               kfree(reg_queue);
-               return false;
-       }
-
-       reg_queue->DIRECT = 1; /* burst write register */
-       reg_queue->INDEX = RegisterNo;
-       reg_queue->VALUE = cpu_to_le32(RegisterValue);
-       reg_queue->RESERVED_VALID = false;
-       dr = (struct usb_ctrlrequest *)((u8 *)reg_queue + sizeof(struct wb35_reg_queue));
-       dr->bRequestType = USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE;
-       dr->bRequest = 0x03; /* USB or vendor-defined request code, burst mode */
-       dr->wValue = cpu_to_le16(0x0);
-       dr->wIndex = cpu_to_le16(RegisterNo);
-       dr->wLength = cpu_to_le16(4);
-
-       /* Enter the sending queue */
-       reg_queue->Next = NULL;
-       reg_queue->pUsbReq = dr;
-       reg_queue->urb = urb;
-
-       spin_lock_irq(&reg->EP0VM_spin_lock);
-       if (reg->reg_first == NULL)
-               reg->reg_first = reg_queue;
-       else
-               reg->reg_last->Next = reg_queue;
-       reg->reg_last = reg_queue;
-
-       spin_unlock_irq(&reg->EP0VM_spin_lock);
-
-       /* Start EP0VM */
-       Wb35Reg_EP0VM_start(pHwData);
-
-       return true;
-}
-
-/*
- * This command will be executed with a user defined value. When it completes,
- * this value is useful. For example, hal_set_current_channel will use it.
- * true  : read command process successfully
- * false : register not supported
- */
-unsigned char Wb35Reg_WriteWithCallbackValue(struct hw_data *pHwData,
-                                               u16 RegisterNo,
-                                               u32 RegisterValue,
-                                               s8 *pValue,
-                                               s8 Len)
-{
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct usb_ctrlrequest  *dr;
-       struct urb              *urb = NULL;
-       struct wb35_reg_queue   *reg_queue = NULL;
-       u16                     UrbSize;
-
-       /* Module shutdown */
-       if (pHwData->SurpriseRemove)
-               return false;
-
-       /* update the register by send urb request */
-       UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
-       reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
-       if (reg_queue == NULL)
-               return false;
-
-       urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (urb == NULL) {
-               kfree(reg_queue);
-               return false;
-       }
-
-       reg_queue->DIRECT = 1; /* burst write register */
-       reg_queue->INDEX = RegisterNo;
-       reg_queue->VALUE = cpu_to_le32(RegisterValue);
-       /* NOTE : Users must guarantee the size of value will not exceed the buffer size. */
-       memcpy(reg_queue->RESERVED, pValue, Len);
-       reg_queue->RESERVED_VALID = true;
-       dr = (struct usb_ctrlrequest *)((u8 *)reg_queue + sizeof(struct wb35_reg_queue));
-       dr->bRequestType = USB_TYPE_VENDOR | USB_DIR_OUT | USB_RECIP_DEVICE;
-       dr->bRequest = 0x03; /* USB or vendor-defined request code, burst mode */
-       dr->wValue = cpu_to_le16(0x0);
-       dr->wIndex = cpu_to_le16(RegisterNo);
-       dr->wLength = cpu_to_le16(4);
-
-       /* Enter the sending queue */
-       reg_queue->Next = NULL;
-       reg_queue->pUsbReq = dr;
-       reg_queue->urb = urb;
-       spin_lock_irq(&reg->EP0VM_spin_lock);
-       if (reg->reg_first == NULL)
-               reg->reg_first = reg_queue;
-       else
-               reg->reg_last->Next = reg_queue;
-       reg->reg_last = reg_queue;
-
-       spin_unlock_irq(&reg->EP0VM_spin_lock);
-
-       /* Start EP0VM */
-       Wb35Reg_EP0VM_start(pHwData);
-
-       return true;
-}
-
-/*
- * true  : read command process successfully
- * false : register not support
- * pRegisterValue : It must be a resident buffer due to
- *                 asynchronous read register.
- */
-unsigned char Wb35Reg_ReadSync(struct hw_data *pHwData, u16 RegisterNo,
-                              u32 *pRegisterValue)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32             *pltmp = pRegisterValue;
-       int             ret = -1;
-
-       /* Module shutdown */
-       if (pHwData->SurpriseRemove)
-               return false;
-
-       /* Read the register by send usb message */
-       reg->SyncIoPause = 1;
-
-       /* Wait until EP0VM stop */
-       while (reg->EP0vm_state != VM_STOP)
-               msleep(10);
-
-       reg->EP0vm_state = VM_RUNNING;
-       ret = usb_control_msg(pHwData->udev,
-                             usb_rcvctrlpipe(pHwData->udev, 0),
-                             0x01,
-                             USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-                             0x0, RegisterNo, pltmp, 4, HZ * 100);
-
-       *pRegisterValue = cpu_to_le32(*pltmp);
-
-       reg->EP0vm_state = VM_STOP;
-
-       Wb35Reg_Update(pHwData, RegisterNo, *pRegisterValue);
-       reg->SyncIoPause = 0;
-
-       Wb35Reg_EP0VM_start(pHwData);
-
-       if (ret < 0) {
-               pr_debug("EP0 Read register usb message sending error\n");
-               pHwData->SurpriseRemove = 1;
-               return false;
-       }
-       return true;
-}
-
-/*
- * true  : read command process successfully
- * false : register not support
- * pRegisterValue : It must be a resident buffer due to
- *                 asynchronous read register.
- */
-unsigned char Wb35Reg_Read(struct hw_data *pHwData, u16 RegisterNo,
-                          u32 *pRegisterValue)
-{
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct usb_ctrlrequest  *dr;
-       struct urb              *urb;
-       struct wb35_reg_queue   *reg_queue;
-       u16                     UrbSize;
-
-       /* Module shutdown */
-       if (pHwData->SurpriseRemove)
-               return false;
-
-       /* update the variable by send Urb to read register */
-       UrbSize = sizeof(struct wb35_reg_queue) + sizeof(struct usb_ctrlrequest);
-       reg_queue = kzalloc(UrbSize, GFP_ATOMIC);
-       if (reg_queue == NULL)
-               return false;
-
-       urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (urb == NULL) {
-               kfree(reg_queue);
-               return false;
-       }
-       reg_queue->DIRECT = 0; /* read register */
-       reg_queue->INDEX = RegisterNo;
-       reg_queue->pBuffer = pRegisterValue;
-       dr = (struct usb_ctrlrequest *)((u8 *)reg_queue + sizeof(struct wb35_reg_queue));
-       dr->bRequestType = USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN;
-       dr->bRequest = 0x01; /* USB or vendor-defined request code, burst mode */
-       dr->wValue = cpu_to_le16(0x0);
-       dr->wIndex = cpu_to_le16(RegisterNo);
-       dr->wLength = cpu_to_le16(4);
-
-       /* Enter the sending queue */
-       reg_queue->Next = NULL;
-       reg_queue->pUsbReq = dr;
-       reg_queue->urb = urb;
-       spin_lock_irq(&reg->EP0VM_spin_lock);
-       if (reg->reg_first == NULL)
-               reg->reg_first = reg_queue;
-       else
-               reg->reg_last->Next = reg_queue;
-       reg->reg_last = reg_queue;
-
-       spin_unlock_irq(&reg->EP0VM_spin_lock);
-
-       /* Start EP0VM */
-       Wb35Reg_EP0VM_start(pHwData);
-
-       return true;
-}
-
-
-void Wb35Reg_EP0VM_start(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (atomic_inc_return(&reg->RegFireCount) == 1) {
-               reg->EP0vm_state = VM_RUNNING;
-               Wb35Reg_EP0VM(pHwData);
-       } else
-               atomic_dec(&reg->RegFireCount);
-}
-
-void Wb35Reg_EP0VM(struct hw_data *pHwData)
-{
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct urb              *urb;
-       struct usb_ctrlrequest  *dr;
-       u32                     *pBuffer;
-       int                     ret = -1;
-       struct wb35_reg_queue   *reg_queue;
-
-
-       if (reg->SyncIoPause)
-               goto cleanup;
-
-       if (pHwData->SurpriseRemove)
-               goto cleanup;
-
-       /* Get the register data and send to USB through Irp */
-       spin_lock_irq(&reg->EP0VM_spin_lock);
-       reg_queue = reg->reg_first;
-       spin_unlock_irq(&reg->EP0VM_spin_lock);
-
-       if (!reg_queue)
-               goto cleanup;
-
-       /* Get an Urb, send it */
-       urb = (struct urb *)reg_queue->urb;
-
-       dr = reg_queue->pUsbReq;
-       urb = reg_queue->urb;
-       pBuffer = reg_queue->pBuffer;
-       if (reg_queue->DIRECT == 1) /* output */
-               pBuffer = &reg_queue->VALUE;
-
-       usb_fill_control_urb(urb, pHwData->udev,
-                             REG_DIRECTION(pHwData->udev, reg_queue),
-                             (u8 *)dr, pBuffer, cpu_to_le16(dr->wLength),
-                             Wb35Reg_EP0VM_complete, (void *)pHwData);
-
-       reg->EP0vm_state = VM_RUNNING;
-
-       ret = usb_submit_urb(urb, GFP_ATOMIC);
-
-       if (ret < 0) {
-               pr_debug("EP0 Irp sending error\n");
-               goto cleanup;
-       }
-       return;
-
- cleanup:
-       reg->EP0vm_state = VM_STOP;
-       atomic_dec(&reg->RegFireCount);
-}
-
-
-void Wb35Reg_EP0VM_complete(struct urb *urb)
-{
-       struct hw_data          *pHwData = (struct hw_data *)urb->context;
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct wb35_reg_queue   *reg_queue;
-
-
-       /* Variable setting */
-       reg->EP0vm_state = VM_COMPLETED;
-       reg->EP0VM_status = urb->status;
-
-       if (pHwData->SurpriseRemove) { /* Let WbWlanHalt to handle surprise remove */
-               reg->EP0vm_state = VM_STOP;
-               atomic_dec(&reg->RegFireCount);
-       } else {
-               /* Complete to send, remove the URB from the first */
-               spin_lock_irq(&reg->EP0VM_spin_lock);
-               reg_queue = reg->reg_first;
-               if (reg_queue == reg->reg_last)
-                       reg->reg_last = NULL;
-               reg->reg_first = reg->reg_first->Next;
-               spin_unlock_irq(&reg->EP0VM_spin_lock);
-
-               if (reg->EP0VM_status) {
-                       pr_debug("EP0 IoCompleteRoutine return error\n");
-                       reg->EP0vm_state = VM_STOP;
-                       pHwData->SurpriseRemove = 1;
-               } else {
-                       /* Success. Update the result */
-
-                       /* Start the next send */
-                       Wb35Reg_EP0VM(pHwData);
-               }
-
-               kfree(reg_queue);
-       }
-
-       usb_free_urb(urb);
-}
-
-
-void Wb35Reg_destroy(struct hw_data *pHwData)
-{
-       struct wb35_reg         *reg = &pHwData->reg;
-       struct urb              *urb;
-       struct wb35_reg_queue   *reg_queue;
-
-       Uxx_power_off_procedure(pHwData);
-
-       /* Wait for Reg operation completed */
-       do {
-               msleep(10); /* Delay for waiting function enter */
-       } while (reg->EP0vm_state != VM_STOP);
-       msleep(10);  /* Delay for waiting function enter */
-
-       /* Release all the data in RegQueue */
-       spin_lock_irq(&reg->EP0VM_spin_lock);
-       reg_queue = reg->reg_first;
-       while (reg_queue) {
-               if (reg_queue == reg->reg_last)
-                       reg->reg_last = NULL;
-               reg->reg_first = reg->reg_first->Next;
-
-               urb = reg_queue->urb;
-               spin_unlock_irq(&reg->EP0VM_spin_lock);
-               if (urb) {
-                       usb_free_urb(urb);
-                       kfree(reg_queue);
-               } else {
-                       pr_debug("EP0 queue release error\n");
-               }
-               spin_lock_irq(&reg->EP0VM_spin_lock);
-
-               reg_queue = reg->reg_first;
-       }
-       spin_unlock_irq(&reg->EP0VM_spin_lock);
-}
-
-/*
- * =======================================================================
- * The function can be run in passive-level only.
- * =========================================================================
- */
-unsigned char Wb35Reg_initial(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-       u32 ltmp;
-       u32 SoftwareSet, VCO_trim, TxVga, Region_ScanInterval;
-
-       /* Spin lock is acquired for read and write IRP command */
-       spin_lock_init(&reg->EP0VM_spin_lock);
-
-       /* Getting RF module type from EEPROM */
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x080d0000); /* Start EEPROM access + Read + address(0x0d) */
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &ltmp);
-
-       /* Update RF module type and determine the PHY type by inf or EEPROM */
-       reg->EEPROMPhyType = (u8)(ltmp & 0xff);
-       /*
-        * 0 V MAX2825, 1 V MAX2827, 2 V MAX2828, 3 V MAX2829
-        * 16V AL2230, 17 - AL7230, 18 - AL2230S
-        * 32 Reserved
-        * 33 - W89RF242(TxVGA 0~19), 34 - W89RF242(TxVGA 0~34)
-        */
-       if (reg->EEPROMPhyType != RF_DECIDE_BY_INF) {
-               if ((reg->EEPROMPhyType == RF_MAXIM_2825)       ||
-                       (reg->EEPROMPhyType == RF_MAXIM_2827)   ||
-                       (reg->EEPROMPhyType == RF_MAXIM_2828)   ||
-                       (reg->EEPROMPhyType == RF_MAXIM_2829)   ||
-                       (reg->EEPROMPhyType == RF_MAXIM_V1)     ||
-                       (reg->EEPROMPhyType == RF_AIROHA_2230)  ||
-                       (reg->EEPROMPhyType == RF_AIROHA_2230S) ||
-                       (reg->EEPROMPhyType == RF_AIROHA_7230)  ||
-                       (reg->EEPROMPhyType == RF_WB_242)       ||
-                       (reg->EEPROMPhyType == RF_WB_242_1))
-                       pHwData->phy_type = reg->EEPROMPhyType;
-       }
-
-       /* Power On procedure running. The relative parameter will be set according to phy_type */
-       Uxx_power_on_procedure(pHwData);
-
-       /* Reading MAC address */
-       Uxx_ReadEthernetAddress(pHwData);
-
-       /* Read VCO trim for RF parameter */
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08200000);
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &VCO_trim);
-
-       /* Read Antenna On/Off of software flag */
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08210000);
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &SoftwareSet);
-
-       /* Read TXVGA */
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x08100000);
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &TxVga);
-
-       /* Get Scan interval setting from EEPROM offset 0x1c */
-       Wb35Reg_WriteSync(pHwData, 0x03b4, 0x081d0000);
-       Wb35Reg_ReadSync(pHwData, 0x03b4, &Region_ScanInterval);
-
-       /* Update Ethernet address */
-       memcpy(pHwData->CurrentMacAddress, pHwData->PermanentMacAddress, ETH_ALEN);
-
-       /* Update software variable */
-       pHwData->SoftwareSet = (u16)(SoftwareSet & 0xffff);
-       TxVga &= 0x000000ff;
-       pHwData->PowerIndexFromEEPROM = (u8)TxVga;
-       pHwData->VCO_trim = (u8)VCO_trim & 0xff;
-       if (pHwData->VCO_trim == 0xff)
-               pHwData->VCO_trim = 0x28;
-
-       reg->EEPROMRegion = (u8)(Region_ScanInterval >> 8);
-       if (reg->EEPROMRegion < 1 || reg->EEPROMRegion > 6)
-               reg->EEPROMRegion = REGION_AUTO;
-
-       /* For Get Tx VGA from EEPROM */
-       GetTxVgaFromEEPROM(pHwData);
-
-       /* Set Scan Interval */
-       pHwData->Scan_Interval = (u8)(Region_ScanInterval & 0xff) * 10;
-       if ((pHwData->Scan_Interval == 2550) || (pHwData->Scan_Interval < 10)) /* Is default setting 0xff * 10 */
-               pHwData->Scan_Interval = SCAN_MAX_CHNL_TIME;
-
-       /* Initial register */
-       RFSynthesizer_initial(pHwData);
-
-       BBProcessor_initial(pHwData); /* Async write, must wait until complete */
-
-       Wb35Reg_phy_calibration(pHwData);
-
-       Mxx_initial(pHwData);
-       Dxx_initial(pHwData);
-
-       if (pHwData->SurpriseRemove)
-               return false;
-       else
-               return true; /* Initial fail */
-}
-
-/*
- * ================================================================
- *  CardComputeCrc --
- *
- *  Description:
- *    Runs the AUTODIN II CRC algorithm on the buffers Buffer length.
- *
- *  Arguments:
- *    Buffer - the input buffer
- *    Length - the length of Buffer
- *
- *  Return Value:
- *    The 32-bit CRC value.
- * ===================================================================
- */
-u32 CardComputeCrc(u8 *Buffer, u32 Length)
-{
-       u32     Crc, Carry;
-       u32     i, j;
-       u8      CurByte;
-
-       Crc = 0xffffffff;
-
-       for (i = 0; i < Length; i++) {
-               CurByte = Buffer[i];
-               for (j = 0; j < 8; j++) {
-                       Carry = ((Crc & 0x80000000) ? 1 : 0) ^ (CurByte & 0x01);
-                       Crc <<= 1;
-                       CurByte >>= 1;
-                       if (Carry)
-                               Crc = (Crc ^ 0x04c11db6) | Carry;
-               }
-       }
-       return Crc;
-}
-
-
-/*
- * ==================================================================
- * BitReverse --
- *   Reverse the bits in the input argument, dwData, which is
- *   regarded as a string of bits with the length, DataLength.
- *
- * Arguments:
- *   dwData     :
- *   DataLength :
- *
- * Return:
- *   The converted value.
- * ==================================================================
- */
-u32 BitReverse(u32 dwData, u32 DataLength)
-{
-       u32     HalfLength, i, j;
-       u32     BitA, BitB;
-
-       if (DataLength <= 0)
-               return 0;       /* No conversion is done. */
-       dwData = dwData & (0xffffffff >> (32 - DataLength));
-
-       HalfLength = DataLength / 2;
-       for (i = 0, j = DataLength - 1; i < HalfLength; i++, j--) {
-               BitA = GetBit(dwData, i);
-               BitB = GetBit(dwData, j);
-               if (BitA && !BitB) {
-                       dwData = ClearBit(dwData, i);
-                       dwData = SetBit(dwData, j);
-               } else if (!BitA && BitB) {
-                       dwData = SetBit(dwData, i);
-                       dwData = ClearBit(dwData, j);
-               } else {
-                       /* Do nothing since these two bits are of the save values. */
-               }
-       }
-       return dwData;
-}
-
-void Wb35Reg_phy_calibration(struct hw_data *pHwData)
-{
-       u32     BB3c, BB54;
-
-       if ((pHwData->phy_type == RF_WB_242) ||
-               (pHwData->phy_type == RF_WB_242_1)) {
-               phy_calibration_winbond(pHwData, 2412); /* Sync operation */
-               Wb35Reg_ReadSync(pHwData, 0x103c, &BB3c);
-               Wb35Reg_ReadSync(pHwData, 0x1054, &BB54);
-
-               pHwData->BB3c_cal = BB3c;
-               pHwData->BB54_cal = BB54;
-
-               RFSynthesizer_initial(pHwData);
-               BBProcessor_initial(pHwData); /* Async operation */
-
-               Wb35Reg_WriteSync(pHwData, 0x103c, BB3c);
-               Wb35Reg_WriteSync(pHwData, 0x1054, BB54);
-       }
-}
-
-
diff --git a/drivers/staging/winbond/wb35reg_f.h b/drivers/staging/winbond/wb35reg_f.h
deleted file mode 100644 (file)
index 95dc980..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef __WINBOND_WB35REG_F_H
-#define __WINBOND_WB35REG_F_H
-
-#include "wbhal.h"
-
-/*
- * ====================================
- * Interface function declare
- * ====================================
- */
-unsigned char Wb35Reg_initial(struct hw_data *hw_data);
-void Uxx_power_on_procedure(struct hw_data *hw_data);
-void Uxx_power_off_procedure(struct hw_data *hw_data);
-void Uxx_ReadEthernetAddress(struct hw_data *hw_data);
-void Dxx_initial(struct hw_data *hw_data);
-void Mxx_initial(struct hw_data *hw_data);
-void RFSynthesizer_initial(struct hw_data *hw_data);
-void RFSynthesizer_SwitchingChannel(struct hw_data *hw_data, struct chan_info channel);
-void BBProcessor_initial(struct hw_data *hw_data);
-void BBProcessor_RateChanging(struct hw_data *hw_data, u8 rate);
-u8 RFSynthesizer_SetPowerIndex(struct hw_data *hw_data, u8 power_index);
-u8 RFSynthesizer_SetMaxim2828_24Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetMaxim2828_50Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetMaxim2827_24Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetMaxim2827_50Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetMaxim2825Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetAiroha2230Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetAiroha7230Power(struct hw_data *, u8 index);
-u8 RFSynthesizer_SetWinbond242Power(struct hw_data *, u8 index);
-void GetTxVgaFromEEPROM(struct hw_data *hw_data);
-void EEPROMTxVgaAdjust(struct hw_data *hw_data);
-
-#define RFWriteControlData(_A, _V) Wb35Reg_Write(_A, 0x0864, _V)
-
-void Wb35Reg_destroy(struct hw_data *hw_data);
-
-unsigned char Wb35Reg_Read(struct hw_data *hw_data, u16 register_no, u32 *register_value);
-unsigned char Wb35Reg_ReadSync(struct hw_data *hw_data, u16 register_no, u32 *register_value);
-unsigned char Wb35Reg_Write(struct hw_data *hw_data, u16 register_no, u32 register_value);
-unsigned char Wb35Reg_WriteSync(struct hw_data *hw_data, u16 register_no, u32 register_value);
-unsigned char Wb35Reg_WriteWithCallbackValue(struct hw_data *hw_data,
-                                                        u16 register_no,
-                                                        u32 register_value,
-                                                        s8 *value,
-                                                        s8 len);
-unsigned char Wb35Reg_BurstWrite(struct hw_data *hw_data,
-                                       u16 register_no,
-                                       u32 *register_data,
-                                       u8 number_of_data,
-                                       u8 flag);
-
-void Wb35Reg_EP0VM(struct hw_data *hw_data);
-void Wb35Reg_EP0VM_start(struct hw_data *hw_data);
-void Wb35Reg_EP0VM_complete(struct urb *urb);
-
-u32 BitReverse(u32 data, u32 data_length);
-
-void CardGetMulticastBit(u8 address[MAC_ADDR_LENGTH], u8 *byte, u8 *value);
-u32 CardComputeCrc(u8 *buffer, u32 length);
-
-void Wb35Reg_phy_calibration(struct hw_data *hw_data);
-void Wb35Reg_Update(struct hw_data *hw_data, u16 register_no, u32 register_value);
-unsigned char adjust_TXVGA_for_iq_mag(struct hw_data *hw_data);
-
-#endif
diff --git a/drivers/staging/winbond/wb35reg_s.h b/drivers/staging/winbond/wb35reg_s.h
deleted file mode 100644 (file)
index dc79faa..0000000
+++ /dev/null
@@ -1,240 +0,0 @@
-#ifndef __WINBOND_WB35REG_S_H
-#define __WINBOND_WB35REG_S_H
-
-#include <linux/spinlock.h>
-#include <linux/types.h>
-#include <linux/atomic.h>
-
-struct hw_data;
-
-/* =========================================================================
- *
- *                     HAL setting function
- *
- *             ========================================
- *             |Uxx|   |Dxx|   |Mxx|   |BB|    |RF|
- *             ========================================
- *                     |                                       |
- *             Wb35Reg_Read            Wb35Reg_Write
- *
- *             ----------------------------------------
- *                             WbUsb_CallUSBDASync     supplied By WbUsb module
- * ==========================================================================
- */
-#define GetBit(dwData, i)      (dwData & (0x00000001 << i))
-#define SetBit(dwData, i)      (dwData | (0x00000001 << i))
-#define ClearBit(dwData, i)    (dwData & ~(0x00000001 << i))
-
-#define        IGNORE_INCREMENT        0
-#define        AUTO_INCREMENT          0
-#define        NO_INCREMENT            1
-#define REG_DIRECTION(_x, _y)  ((_y)->DIRECT == 0 ? usb_rcvctrlpipe(_x, 0) : usb_sndctrlpipe(_x, 0))
-#define REG_BUF_SIZE(_x)       ((_x)->bRequest == 0x04 ? cpu_to_le16((_x)->wLength) : 4)
-
-#define BB48_DEFAULT_AL2230_11B                0x0033447c
-#define BB4C_DEFAULT_AL2230_11B                0x0A00FEFF
-#define BB48_DEFAULT_AL2230_11G                0x00332C1B
-#define BB4C_DEFAULT_AL2230_11G                0x0A00FEFF
-
-
-#define BB48_DEFAULT_WB242_11B         0x00292315      /* backoff  2dB */
-#define BB4C_DEFAULT_WB242_11B         0x0800FEFF      /* backoff  2dB */
-#define BB48_DEFAULT_WB242_11G         0x00453B24
-#define BB4C_DEFAULT_WB242_11G         0x0E00FEFF
-
-/*
- * ====================================
- *  Default setting for Mxx
- * ====================================
- */
-#define DEFAULT_CWMIN                  31      /* (M2C) CWmin. Its value is in the range 0-31. */
-#define DEFAULT_CWMAX                  1023    /* (M2C) CWmax. Its value is in the range 0-1023. */
-#define DEFAULT_AID                    1       /* (M34) AID. Its value is in the range 1-2007. */
-
-#define DEFAULT_RATE_RETRY_LIMIT       2       /* (M38) as named */
-
-#define DEFAULT_LONG_RETRY_LIMIT       7       /* (M38) LongRetryLimit. Its value is in the range 0-15. */
-#define DEFAULT_SHORT_RETRY_LIMIT      7       /* (M38) ShortRetryLimit. Its value is in the range 0-15. */
-#define DEFAULT_PIFST                  25      /* (M3C) PIFS Time. Its value is in the range 0-65535. */
-#define DEFAULT_EIFST                  354     /* (M3C) EIFS Time. Its value is in the range 0-1048575. */
-#define DEFAULT_DIFST                  45      /* (M3C) DIFS Time. Its value is in the range 0-65535. */
-#define DEFAULT_SIFST                  5       /* (M3C) SIFS Time. Its value is in the range 0-65535. */
-#define DEFAULT_OSIFST                 10      /* (M3C) Original SIFS Time. Its value is in the range 0-15. */
-#define DEFAULT_ATIMWD                 0       /* (M40) ATIM Window. Its value is in the range 0-65535. */
-#define DEFAULT_SLOT_TIME              20      /* (M40) ($) SlotTime. Its value is in the range 0-255. */
-#define DEFAULT_MAX_TX_MSDU_LIFE_TIME  512     /* (M44) MaxTxMSDULifeTime. Its value is in the range 0-4294967295. */
-#define DEFAULT_BEACON_INTERVAL                500     /* (M48) Beacon Interval. Its value is in the range 0-65535. */
-#define DEFAULT_PROBE_DELAY_TIME       200     /* (M48) Probe Delay Time. Its value is in the range 0-65535. */
-#define DEFAULT_PROTOCOL_VERSION       0       /* (M4C) */
-#define DEFAULT_MAC_POWER_STATE                2       /* (M4C) 2: MAC at power active */
-#define DEFAULT_DTIM_ALERT_TIME                0
-
-
-struct wb35_reg_queue {
-       struct urb      *urb;
-       void            *pUsbReq;
-       void            *Next;
-       union {
-               u32     VALUE;
-               u32     *pBuffer;
-       };
-       u8              RESERVED[4];    /* space reserved for communication */
-       u16             INDEX;          /* For storing the register index */
-       u8              RESERVED_VALID; /* Indicate whether the RESERVED space is valid at this command. */
-       u8              DIRECT;         /* 0:In   1:Out */
-};
-
-/*
- * ====================================
- * Internal variable for module
- * ====================================
- */
-#define MAX_SQ3_FILTER_SIZE            5
-struct wb35_reg {
-       /*
-        * ============================
-        *  Register Bank backup
-        * ============================
-        */
-       u32     U1B0;                   /* bit16 record the h/w radio on/off status */
-       u32     U1BC_LEDConfigure;
-       u32     D00_DmaControl;
-       u32     M00_MacControl;
-       union {
-               struct {
-                       u32     M04_MulticastAddress1;
-                       u32     M08_MulticastAddress2;
-               };
-               u8              Multicast[8];   /* contents of card multicast registers */
-       };
-
-       u32     M24_MacControl;
-       u32     M28_MacControl;
-       u32     M2C_MacControl;
-       u32     M38_MacControl;
-       u32     M3C_MacControl;
-       u32     M40_MacControl;
-       u32     M44_MacControl;
-       u32     M48_MacControl;
-       u32     M4C_MacStatus;
-       u32     M60_MacControl;
-       u32     M68_MacControl;
-       u32     M70_MacControl;
-       u32     M74_MacControl;
-       u32     M78_ERPInformation;
-       u32     M7C_MacControl;
-       u32     M80_MacControl;
-       u32     M84_MacControl;
-       u32     M88_MacControl;
-       u32     M98_MacControl;
-
-       /* Baseband register */
-       u32     BB0C;   /* Used for LNA calculation */
-       u32     BB2C;
-       u32     BB30;   /* 11b acquisition control register */
-       u32     BB3C;
-       u32     BB48;
-       u32     BB4C;
-       u32     BB50;   /* mode control register */
-       u32     BB54;
-       u32     BB58;   /* IQ_ALPHA */
-       u32     BB5C;   /* For test */
-       u32     BB60;   /* for WTO read value */
-
-       /* VM */
-       spinlock_t      EP0VM_spin_lock; /* 4B */
-       u32             EP0VM_status; /* $$ */
-       struct wb35_reg_queue *reg_first;
-       struct wb35_reg_queue *reg_last;
-       atomic_t        RegFireCount;
-
-       /* Hardware status */
-       u8      EP0vm_state;
-       u8      mac_power_save;
-       u8      EEPROMPhyType; /*
-                               * 0 ~ 15 for Maxim (0 ĄV MAX2825, 1 ĄV MAX2827, 2 ĄV MAX2828, 3 ĄV MAX2829),
-                               * 16 ~ 31 for Airoha (16 ĄV AL2230, 11 - AL7230)
-                               * 32 ~ Reserved
-                               * 33 ~ 47 For WB242 ( 33 - WB242, 34 - WB242 with new Txvga 0.5 db step)
-                               * 48 ~ 255 ARE RESERVED.
-                               */
-       u8      EEPROMRegion;   /* Region setting in EEPROM */
-
-       u32     SyncIoPause; /* If user use the Sync Io to access Hw, then pause the async access */
-
-       u8      LNAValue[4]; /* Table for speed up running */
-       u32     SQ3_filter[MAX_SQ3_FILTER_SIZE];
-       u32     SQ3_index;
-};
-
-/* =====================================================================
- * Function declaration
- * =====================================================================
- */
-void hal_remove_mapping_key(struct hw_data *hw_data, u8 *mac_addr);
-void hal_remove_default_key(struct hw_data *hw_data, u32 index);
-unsigned char hal_set_mapping_key(struct hw_data *adapter, u8 *mac_addr,
-                                 u8 null_key, u8 wep_on, u8 *tx_tsc,
-                                 u8 *rx_tsc, u8 key_type, u8 key_len,
-                                 u8 *key_data);
-unsigned char hal_set_default_key(struct hw_data *adapter, u8 index,
-                                 u8 null_key, u8 wep_on, u8 *tx_tsc,
-                                 u8 *rx_tsc, u8 key_type, u8 key_len,
-                                 u8 *key_data);
-void hal_clear_all_default_key(struct hw_data *hw_data);
-void hal_clear_all_group_key(struct hw_data *hw_data);
-void hal_clear_all_mapping_key(struct hw_data *hw_data);
-void hal_clear_all_key(struct hw_data *hw_data);
-void hal_set_power_save_mode(struct hw_data *hw_data, unsigned char power_save,
-                            unsigned char wakeup, unsigned char dtim);
-void hal_get_power_save_mode(struct hw_data *hw_data, u8 *in_pwr_save);
-void hal_set_slot_time(struct hw_data *hw_data, u8 type);
-
-#define hal_set_atim_window(_A, _ATM)
-
-void hal_start_bss(struct hw_data *hw_data, u8 mac_op_mode);
-
-/* 0:BSS STA 1:IBSS STA */
-void hal_join_request(struct hw_data *hw_data, u8 bss_type);
-
-void hal_stop_sync_bss(struct hw_data *hw_data);
-void hal_resume_sync_bss(struct hw_data *hw_data);
-void hal_set_aid(struct hw_data *hw_data, u16 aid);
-void hal_set_bssid(struct hw_data *hw_data, u8 *bssid);
-void hal_get_bssid(struct hw_data *hw_data, u8 *bssid);
-void hal_set_listen_interval(struct hw_data *hw_data, u16 listen_interval);
-void hal_set_cap_info(struct hw_data *hw_data, u16 capability_info);
-void hal_set_ssid(struct hw_data *hw_data, u8 *ssid, u8 ssid_len);
-void hal_start_tx0(struct hw_data *hw_data);
-
-#define hal_get_cwmin(_A)      ((_A)->cwmin)
-
-void hal_set_cwmax(struct hw_data *hw_data, u16 cwin_max);
-
-#define hal_get_cwmax(_A)      ((_A)->cwmax)
-
-void hal_set_rsn_wpa(struct hw_data *hw_data, u32 *rsn_ie_bitmap,
-                    u32 *rsn_oui_type , unsigned char desired_auth_mode);
-void hal_set_connect_info(struct hw_data *hw_data, unsigned char bo_connect);
-u8 hal_get_est_sq3(struct hw_data *hw_data, u8 count);
-void hal_descriptor_indicate(struct hw_data *hw_data,
-                            struct wb35_descriptor *des);
-u8 hal_get_antenna_number(struct hw_data *hw_data);
-u32 hal_get_bss_pk_cnt(struct hw_data *hw_data);
-
-#define hal_get_region_from_EEPROM(_A) ((_A)->reg.EEPROMRegion)
-#define hal_get_tx_buffer(_A, _B)      Wb35Tx_get_tx_buffer(_A, _B)
-#define hal_software_set(_A)           (_A->SoftwareSet)
-#define hal_driver_init_OK(_A)         (_A->IsInitOK)
-#define hal_rssi_boundary_high(_A)     (_A->RSSI_high)
-#define hal_rssi_boundary_low(_A)      (_A->RSSI_low)
-#define hal_scan_interval(_A)          (_A->Scan_Interval)
-
-#define PHY_DEBUG(msg, args...)
-
-/* return 100ms count */
-#define hal_get_time_count(_P)         (_P->time_count / 10)
-
-#define hal_ibss_disconnect(_A)                (hal_stop_sync_bss(_A))
-
-#endif
diff --git a/drivers/staging/winbond/wb35rx.c b/drivers/staging/winbond/wb35rx.c
deleted file mode 100644 (file)
index f006b16..0000000
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * ============================================================================
- *  Copyright (c) 1996-2002 Winbond Electronic Corporation
- *
- *  Module Name:
- *    Wb35Rx.c
- *
- *  Abstract:
- *    Processing the Rx message from down layer
- *
- * ============================================================================
- */
-#include <linux/usb.h>
-#include <linux/slab.h>
-
-#include "core.h"
-#include "wb35rx_f.h"
-
-static void packet_came(struct ieee80211_hw *hw, char *pRxBufferAddress,
-       int PacketSize)
-{
-       struct wbsoft_priv *priv = hw->priv;
-       struct sk_buff *skb;
-       struct ieee80211_rx_status rx_status = {0};
-
-       if (!priv->enabled)
-               return;
-
-       skb = dev_alloc_skb(PacketSize);
-       if (!skb) {
-               printk("Not enough memory for packet, FIXME\n");
-               return;
-       }
-
-       memcpy(skb_put(skb, PacketSize), pRxBufferAddress, PacketSize);
-
-       memcpy(IEEE80211_SKB_RXCB(skb), &rx_status, sizeof(rx_status));
-       ieee80211_rx_irqsafe(hw, skb);
-}
-
-static void Wb35Rx_adjust(struct wb35_descriptor *pRxDes)
-{
-       u32     *pRxBufferAddress;
-       u32     DecryptionMethod;
-       u32     i;
-       u16     BufferSize;
-
-       DecryptionMethod = pRxDes->R01.R01_decryption_method;
-       pRxBufferAddress = pRxDes->buffer_address[0];
-       BufferSize = pRxDes->buffer_size[0];
-
-       /* Adjust the last part of data. Only data left */
-       BufferSize -= 4; /* For CRC-32 */
-       if (DecryptionMethod)
-               BufferSize -= 4;
-       if (DecryptionMethod == 3) /* For CCMP */
-               BufferSize -= 4;
-
-       /* Adjust the IV field which after 802.11 header and ICV field. */
-       if (DecryptionMethod == 1) { /* For WEP */
-               for (i = 6; i > 0; i--)
-                       pRxBufferAddress[i] = pRxBufferAddress[i - 1];
-               pRxDes->buffer_address[0] = pRxBufferAddress + 1;
-               BufferSize -= 4; /* 4 byte for IV */
-       } else if (DecryptionMethod) { /* For TKIP and CCMP */
-               for (i = 7; i > 1; i--)
-                       pRxBufferAddress[i] = pRxBufferAddress[i - 2];
-               /* Update the descriptor, shift 8 byte */
-               pRxDes->buffer_address[0] = pRxBufferAddress + 2;
-               BufferSize -= 8; /* 8 byte for IV + ICV */
-       }
-       pRxDes->buffer_size[0] = BufferSize;
-}
-
-static u16 Wb35Rx_indicate(struct ieee80211_hw *hw)
-{
-       struct wbsoft_priv      *priv = hw->priv;
-       struct hw_data          *pHwData = &priv->sHwData;
-       struct wb35_descriptor  RxDes;
-       struct wb35_rx          *pWb35Rx = &pHwData->Wb35Rx;
-       u8                      *pRxBufferAddress;
-       u16                     PacketSize;
-       u16                     stmp, BufferSize, stmp2 = 0;
-       u32                     RxBufferId;
-
-       /* Only one thread be allowed to run into the following */
-       do {
-               RxBufferId = pWb35Rx->RxProcessIndex;
-               if (pWb35Rx->RxOwner[RxBufferId]) /* Owner by VM */
-                       break;
-
-               pWb35Rx->RxProcessIndex++;
-               pWb35Rx->RxProcessIndex %= MAX_USB_RX_BUFFER_NUMBER;
-
-               pRxBufferAddress = pWb35Rx->pDRx;
-               BufferSize = pWb35Rx->RxBufferSize[RxBufferId];
-
-               /* Parse the bulkin buffer */
-               while (BufferSize >= 4) {
-                       /* Is ending? */
-                       if ((cpu_to_le32(*(u32 *)pRxBufferAddress) & 0x0fffffff) ==
-                               RX_END_TAG)
-                               break;
-
-                       /* Get the R00 R01 first */
-                       RxDes.R00.value = le32_to_cpu(*(u32 *)pRxBufferAddress);
-                       PacketSize = (u16)RxDes.R00.R00_receive_byte_count;
-                       RxDes.R01.value = le32_to_cpu(*((u32 *)(pRxBufferAddress + 4)));
-                       /* For new DMA 4k */
-                       if ((PacketSize & 0x03) > 0)
-                               PacketSize -= 4;
-
-                       /* Basic check for Rx length. Is length valid? */
-                       if (PacketSize > MAX_PACKET_SIZE) {
-                               pr_debug("Serious ERROR : Rx data size too long, size =%d\n",
-                                       PacketSize);
-                               pWb35Rx->EP3vm_state = VM_STOP;
-                               pWb35Rx->Ep3ErrorCount2++;
-                               break;
-                       }
-
-                       /*
-                        * Wb35Rx_indicate() is called synchronously so it isn't
-                        * necessary to set "RxDes.Desctriptor_ID = RxBufferID;"
-                        */
-                       /* subtract 8 byte for 35's USB header length */
-                       BufferSize -= 8;
-                       pRxBufferAddress += 8;
-
-                       RxDes.buffer_address[0] = pRxBufferAddress;
-                       RxDes.buffer_size[0] = PacketSize;
-                       RxDes.buffer_number = 1;
-                       RxDes.buffer_start_index = 0;
-                       RxDes.buffer_total_size = RxDes.buffer_size[0];
-                       Wb35Rx_adjust(&RxDes);
-
-                       packet_came(hw, pRxBufferAddress, PacketSize);
-
-                       /* Move RxBuffer point to the next */
-                       stmp = PacketSize + 3;
-                       stmp &= ~0x03; /* 4n alignment */
-                       pRxBufferAddress += stmp;
-                       BufferSize -= stmp;
-                       stmp2 += stmp;
-               }
-
-               /* Reclaim resource */
-               pWb35Rx->RxOwner[RxBufferId] = 1;
-       } while (true);
-       return stmp2;
-}
-
-static void Wb35Rx(struct ieee80211_hw *hw);
-
-static void Wb35Rx_Complete(struct urb *urb)
-{
-       struct ieee80211_hw     *hw = urb->context;
-       struct wbsoft_priv      *priv = hw->priv;
-       struct hw_data          *pHwData = &priv->sHwData;
-       struct wb35_rx          *pWb35Rx = &pHwData->Wb35Rx;
-       u8                      *pRxBufferAddress;
-       u32                     SizeCheck;
-       u16                     BulkLength;
-       u32                     RxBufferId;
-       struct R00_descriptor           R00;
-
-       /* Variable setting */
-       pWb35Rx->EP3vm_state = VM_COMPLETED;
-       pWb35Rx->EP3VM_status = urb->status; /* Store the last result of Irp */
-
-       RxBufferId = pWb35Rx->CurrentRxBufferId;
-
-       pRxBufferAddress = pWb35Rx->pDRx;
-       BulkLength = (u16)urb->actual_length;
-
-       /* The IRP is completed */
-       pWb35Rx->EP3vm_state = VM_COMPLETED;
-
-       if (pHwData->SurpriseRemove) /* Must be here, or RxBufferId is invalid */
-               goto error;
-
-       if (pWb35Rx->rx_halt)
-               goto error;
-
-       /* Start to process the data only in successful condition */
-       pWb35Rx->RxOwner[RxBufferId] = 0; /* Set the owner to driver */
-       R00.value = le32_to_cpu(*(u32 *)pRxBufferAddress);
-
-       /* The URB is completed, check the result */
-       if (pWb35Rx->EP3VM_status != 0) {
-               pr_debug("EP3 IoCompleteRoutine return error\n");
-               pWb35Rx->EP3vm_state = VM_STOP;
-               goto error;
-       }
-
-       /* For recovering. check if operating in single USB mode */
-       if (!HAL_USB_MODE_BURST(pHwData)) {
-               SizeCheck = R00.R00_receive_byte_count;
-               if ((SizeCheck & 0x03) > 0)
-                       SizeCheck -= 4;
-               SizeCheck = (SizeCheck + 3) & ~0x03;
-               SizeCheck += 12; /* 8 + 4 badbeef */
-               if ((BulkLength > 1600) ||
-                       (SizeCheck > 1600) ||
-                       (BulkLength != SizeCheck) ||
-                       (BulkLength == 0)) { /* Add for fail Urb */
-                       pWb35Rx->EP3vm_state = VM_STOP;
-                       pWb35Rx->Ep3ErrorCount2++;
-               }
-       }
-
-       /* Indicating the receiving data */
-       pWb35Rx->ByteReceived += BulkLength;
-       pWb35Rx->RxBufferSize[RxBufferId] = BulkLength;
-
-       if (!pWb35Rx->RxOwner[RxBufferId])
-               Wb35Rx_indicate(hw);
-
-       kfree(pWb35Rx->pDRx);
-       /* Do the next receive */
-       Wb35Rx(hw);
-       return;
-
-error:
-       pWb35Rx->RxOwner[RxBufferId] = 1; /* Set the owner to hardware */
-       atomic_dec(&pWb35Rx->RxFireCounter);
-       pWb35Rx->EP3vm_state = VM_STOP;
-}
-
-/* This function cannot reentrain */
-static void Wb35Rx(struct ieee80211_hw *hw)
-{
-       struct wbsoft_priv      *priv = hw->priv;
-       struct hw_data          *pHwData = &priv->sHwData;
-       struct wb35_rx          *pWb35Rx = &pHwData->Wb35Rx;
-       u8                      *pRxBufferAddress;
-       struct urb              *urb = pWb35Rx->RxUrb;
-       int                     retv;
-       u32                     RxBufferId;
-
-       /* Issuing URB */
-       if (pHwData->SurpriseRemove)
-               goto error;
-
-       if (pWb35Rx->rx_halt)
-               goto error;
-
-       /* Get RxBuffer's ID */
-       RxBufferId = pWb35Rx->RxBufferId;
-       if (!pWb35Rx->RxOwner[RxBufferId]) {
-               /* It's impossible to run here. */
-               pr_debug("Rx driver fifo unavailable\n");
-               goto error;
-       }
-
-       /* Update buffer point, then start to bulkin the data from USB */
-       pWb35Rx->RxBufferId++;
-       pWb35Rx->RxBufferId %= MAX_USB_RX_BUFFER_NUMBER;
-
-       pWb35Rx->CurrentRxBufferId = RxBufferId;
-
-       pWb35Rx->pDRx = kzalloc(MAX_USB_RX_BUFFER, GFP_ATOMIC);
-       if (!pWb35Rx->pDRx) {
-               dev_info(&hw->wiphy->dev, "w35und: Rx memory alloc failed\n");
-               goto error;
-       }
-       pRxBufferAddress = pWb35Rx->pDRx;
-
-       usb_fill_bulk_urb(urb, pHwData->udev,
-                         usb_rcvbulkpipe(pHwData->udev, 3),
-                         pRxBufferAddress, MAX_USB_RX_BUFFER,
-                         Wb35Rx_Complete, hw);
-
-       pWb35Rx->EP3vm_state = VM_RUNNING;
-
-       retv = usb_submit_urb(urb, GFP_ATOMIC);
-
-       if (retv != 0) {
-               dev_info(&hw->wiphy->dev, "Rx URB sending error\n");
-               goto error;
-       }
-       return;
-
-error:
-       /* VM stop */
-       pWb35Rx->EP3vm_state = VM_STOP;
-       atomic_dec(&pWb35Rx->RxFireCounter);
-}
-
-void Wb35Rx_start(struct ieee80211_hw *hw)
-{
-       struct wbsoft_priv      *priv = hw->priv;
-       struct hw_data          *pHwData = &priv->sHwData;
-       struct wb35_rx          *pWb35Rx = &pHwData->Wb35Rx;
-
-       /* Allow only one thread to run into the Wb35Rx() function */
-       if (atomic_inc_return(&pWb35Rx->RxFireCounter) == 1) {
-               pWb35Rx->EP3vm_state = VM_RUNNING;
-               Wb35Rx(hw);
-       } else
-               atomic_dec(&pWb35Rx->RxFireCounter);
-}
-
-static void Wb35Rx_reset_descriptor(struct hw_data *pHwData)
-{
-       struct wb35_rx  *pWb35Rx = &pHwData->Wb35Rx;
-       u32             i;
-
-       pWb35Rx->ByteReceived = 0;
-       pWb35Rx->RxProcessIndex = 0;
-       pWb35Rx->RxBufferId = 0;
-       pWb35Rx->EP3vm_state = VM_STOP;
-       pWb35Rx->rx_halt = 0;
-
-       /* Initial the Queue. The last buffer is reserved for used
-        * if the Rx resource is unavailable.
-        */
-       for (i = 0; i < MAX_USB_RX_BUFFER_NUMBER; i++)
-               pWb35Rx->RxOwner[i] = 1;
-}
-
-unsigned char Wb35Rx_initial(struct hw_data *pHwData)
-{
-       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
-
-       /* Initial the Buffer Queue */
-       Wb35Rx_reset_descriptor(pHwData);
-
-       pWb35Rx->RxUrb = usb_alloc_urb(0, GFP_ATOMIC);
-       return !!pWb35Rx->RxUrb;
-}
-
-void Wb35Rx_stop(struct hw_data *pHwData)
-{
-       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
-
-       /* Canceling the Irp if already sends it out. */
-       if (pWb35Rx->EP3vm_state == VM_RUNNING) {
-               /* Only use unlink, let Wb35Rx_destroy to free them */
-               usb_unlink_urb(pWb35Rx->RxUrb);
-               pr_debug("EP3 Rx stop\n");
-       }
-}
-
-/* Needs process context */
-void Wb35Rx_destroy(struct hw_data *pHwData)
-{
-       struct wb35_rx *pWb35Rx = &pHwData->Wb35Rx;
-
-       do {
-               msleep(10); /* Delay for waiting function enter */
-       } while (pWb35Rx->EP3vm_state != VM_STOP);
-       msleep(10); /* Delay for waiting function exit */
-
-       usb_free_urb(pWb35Rx->RxUrb);
-       pr_debug("Wb35Rx_destroy OK\n");
-}
-
diff --git a/drivers/staging/winbond/wb35rx_f.h b/drivers/staging/winbond/wb35rx_f.h
deleted file mode 100644 (file)
index 559bdca..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __WINBOND_WB35RX_F_H
-#define __WINBOND_WB35RX_F_H
-
-#include <net/mac80211.h>
-#include "wbhal.h"
-
-/*
- * Interface function declaration
- */
-unsigned char  Wb35Rx_initial(struct hw_data *pHwData);
-void           Wb35Rx_destroy(struct hw_data *pHwData);
-void           Wb35Rx_stop(struct hw_data *pHwData);
-void           Wb35Rx_start(struct ieee80211_hw *hw);
-
-#endif
diff --git a/drivers/staging/winbond/wb35rx_s.h b/drivers/staging/winbond/wb35rx_s.h
deleted file mode 100644 (file)
index 545bc95..0000000
+++ /dev/null
@@ -1,44 +0,0 @@
-#ifndef __WINBOND_35RX_S_H
-#define __WINBOND_35RX_S_H
-
-/* Definition for this module used */
-#define MAX_USB_RX_BUFFER              4096    /* This parameter must be 4096 931130.4.f */
-#define MAX_USB_RX_BUFFER_NUMBER       ETHERNET_RX_DESCRIPTORS /* Maximum 254, 255 is RESERVED ID */
-#define RX_INTERFACE                   0       /* Interface 1 */
-#define RX_PIPE                                2       /* Pipe 3 */
-#define MAX_PACKET_SIZE                        1600    /* 1568 = 8 + 1532 + 4 + 24(IV EIV MIC ICV CRC) for check DMA data 931130.4.g */
-#define RX_END_TAG                     0x0badbeef
-
-
-/*
- * Internal variable for module
- */
-struct wb35_rx {
-       u32             ByteReceived; /* For calculating throughput of BulkIn */
-       atomic_t        RxFireCounter;/* Does Wb35Rx module fire? */
-
-       u8              RxBuffer[MAX_USB_RX_BUFFER_NUMBER][((MAX_USB_RX_BUFFER+3) & ~0x03)];
-       u16             RxBufferSize[((MAX_USB_RX_BUFFER_NUMBER+1) & ~0x01)];
-       u8              RxOwner[((MAX_USB_RX_BUFFER_NUMBER+3) & ~0x03)]; /* Ownership of buffer  0:SW 1:HW */
-
-       u32             RxProcessIndex; /* The next index to process */
-       u32             RxBufferId;
-       u32             EP3vm_state;
-
-       u32             rx_halt; /* For VM stopping */
-
-       u16             MoreDataSize;
-       u16             PacketSize;
-
-       u32             CurrentRxBufferId; /* For complete routine usage */
-       u32             Rx3UrbCancel;
-
-       u32             LastR1; /* For RSSI reporting */
-       struct urb      *RxUrb;
-       u32             Ep3ErrorCount2; /* 20060625.1 Usbd for Rx DMA error count */
-
-       int             EP3VM_status;
-       u8              *pDRx;
-};
-
-#endif /* __WINBOND_35RX_S_H */
diff --git a/drivers/staging/winbond/wb35tx.c b/drivers/staging/winbond/wb35tx.c
deleted file mode 100644 (file)
index 870cff3..0000000
+++ /dev/null
@@ -1,290 +0,0 @@
-/*
- *  Copyright (c) 1996-2002 Winbond Electronic Corporation
- *
- *  Module Name:
- *    Wb35Tx.c
- *
- *  Abstract:
- *    Processing the Tx message and put into down layer
- *
- */
-#include <linux/usb.h>
-#include <linux/gfp.h>
-
-#include "wb35tx_f.h"
-#include "mds_f.h"
-
-unsigned char
-Wb35Tx_get_tx_buffer(struct hw_data *pHwData, u8 **pBuffer)
-{
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-
-       *pBuffer = pWb35Tx->TxBuffer[0];
-       return true;
-}
-
-static void Wb35Tx(struct wbsoft_priv *adapter);
-
-static void Wb35Tx_complete(struct urb *pUrb)
-{
-       struct wbsoft_priv *adapter = pUrb->context;
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-       struct wb35_mds *pMds = &adapter->Mds;
-
-       printk("wb35: tx complete\n");
-       /* Variable setting */
-       pWb35Tx->EP4vm_state = VM_COMPLETED;
-       pWb35Tx->EP4VM_status = pUrb->status; /* Store the last result of Irp */
-       /* Set the owner. Free the owner bit always. */
-       pMds->TxOwner[pWb35Tx->TxSendIndex] = 0;
-       pWb35Tx->TxSendIndex++;
-       pWb35Tx->TxSendIndex %= MAX_USB_TX_BUFFER_NUMBER;
-
-       if (pHwData->SurpriseRemove) /* Let WbWlanHalt handle surprise remove */
-               goto error;
-
-       if (pWb35Tx->tx_halt)
-               goto error;
-
-       /* The URB is completed, check the result */
-       if (pWb35Tx->EP4VM_status != 0) {
-               dev_err(&pUrb->dev->dev, "URB submission failed\n");
-               pWb35Tx->EP4vm_state = VM_STOP;
-               goto error;
-       }
-
-       Mds_Tx(adapter);
-       Wb35Tx(adapter);
-       return;
-
-error:
-       atomic_dec(&pWb35Tx->TxFireCounter);
-       pWb35Tx->EP4vm_state = VM_STOP;
-}
-
-static void Wb35Tx(struct wbsoft_priv *adapter)
-{
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-       u8              *pTxBufferAddress;
-       struct wb35_mds *pMds = &adapter->Mds;
-       struct urb *pUrb = (struct urb *)pWb35Tx->Tx4Urb;
-       int             retv;
-       u32             SendIndex;
-
-       if (pHwData->SurpriseRemove)
-               goto cleanup;
-
-       if (pWb35Tx->tx_halt)
-               goto cleanup;
-
-       /* Ownership checking */
-       SendIndex = pWb35Tx->TxSendIndex;
-       /* No more data need to be sent, return immediately */
-       if (!pMds->TxOwner[SendIndex])
-               goto cleanup;
-
-       pTxBufferAddress = pWb35Tx->TxBuffer[SendIndex];
-
-       /* Issuing URB */
-       usb_fill_bulk_urb(pUrb, pHwData->udev,
-                         usb_sndbulkpipe(pHwData->udev, 4),
-                         pTxBufferAddress, pMds->TxBufferSize[SendIndex],
-                         Wb35Tx_complete, adapter);
-
-       pWb35Tx->EP4vm_state = VM_RUNNING;
-       retv = usb_submit_urb(pUrb, GFP_ATOMIC);
-       if (retv < 0) {
-               dev_err(&pUrb->dev->dev, "EP4 Tx Irp sending error\n");
-               goto cleanup;
-       }
-
-       /* Check if driver needs issue Irp for EP2 */
-       pWb35Tx->TxFillCount += pMds->TxCountInBuffer[SendIndex];
-       if (pWb35Tx->TxFillCount > 12)
-               Wb35Tx_EP2VM_start(adapter);
-
-       pWb35Tx->ByteTransfer += pMds->TxBufferSize[SendIndex];
-       return;
-
- cleanup:
-       pWb35Tx->EP4vm_state = VM_STOP;
-       atomic_dec(&pWb35Tx->TxFireCounter);
-}
-
-void Wb35Tx_start(struct wbsoft_priv *adapter)
-{
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-
-       /* Allow only one thread to run into function */
-       if (atomic_inc_return(&pWb35Tx->TxFireCounter) == 1) {
-               pWb35Tx->EP4vm_state = VM_RUNNING;
-               Wb35Tx(adapter);
-       } else
-               atomic_dec(&pWb35Tx->TxFireCounter);
-}
-
-unsigned char Wb35Tx_initial(struct hw_data *pHwData)
-{
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-
-       pWb35Tx->Tx4Urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (!pWb35Tx->Tx4Urb)
-               return false;
-
-       pWb35Tx->Tx2Urb = usb_alloc_urb(0, GFP_ATOMIC);
-       if (!pWb35Tx->Tx2Urb) {
-               usb_free_urb(pWb35Tx->Tx4Urb);
-               return false;
-       }
-
-       return true;
-}
-
-void Wb35Tx_stop(struct hw_data *pHwData)
-{
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-
-       /* Try to cancel the Trp of EP2 */
-       if (pWb35Tx->EP2vm_state == VM_RUNNING)
-               /* Only use unlink, let Wb35Tx_destroy free them */
-               usb_unlink_urb(pWb35Tx->Tx2Urb);
-       pr_debug("EP2 Tx stop\n");
-
-       /* Try to cancel the Irp of EP4 */
-       if (pWb35Tx->EP4vm_state == VM_RUNNING)
-               /* Only use unlink, let Wb35Tx_destroy free them */
-               usb_unlink_urb(pWb35Tx->Tx4Urb);
-       pr_debug("EP4 Tx stop\n");
-}
-
-void Wb35Tx_destroy(struct hw_data *pHwData)
-{
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-
-       /* Wait for VM stop */
-       do {
-               msleep(10); /* Delay for waiting function enter 940623.1.a */
-       } while ((pWb35Tx->EP2vm_state != VM_STOP) && (pWb35Tx->EP4vm_state != VM_STOP));
-       msleep(10); /* Delay for waiting function enter 940623.1.b */
-
-       usb_free_urb(pWb35Tx->Tx4Urb);
-       usb_free_urb(pWb35Tx->Tx2Urb);
-
-       pr_debug("Wb35Tx_destroy OK\n");
-}
-
-void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 TimeCount)
-{
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-       bool Trigger = false;
-
-       if (pWb35Tx->TxTimer > TimeCount)
-               Trigger = true;
-       else if (TimeCount > (pWb35Tx->TxTimer+500))
-               Trigger = true;
-
-       if (Trigger) {
-               pWb35Tx->TxTimer = TimeCount;
-               Wb35Tx_EP2VM_start(adapter);
-       }
-}
-
-static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter);
-
-static void Wb35Tx_EP2VM_complete(struct urb *pUrb)
-{
-       struct wbsoft_priv *adapter = pUrb->context;
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct T02_descriptor   T02, TSTATUS;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-       u32 *pltmp = (u32 *)pWb35Tx->EP2_buf;
-       u32             i;
-       u16             InterruptInLength;
-
-       /* Variable setting */
-       pWb35Tx->EP2vm_state = VM_COMPLETED;
-       pWb35Tx->EP2VM_status = pUrb->status;
-
-       /* For Linux 2.4. Interrupt will always trigger */
-       if (pHwData->SurpriseRemove) /* Let WbWlanHalt handle surprise remove */
-               goto error;
-
-       if (pWb35Tx->tx_halt)
-               goto error;
-
-       /* The Urb is completed, check the result */
-       if (pWb35Tx->EP2VM_status != 0) {
-               dev_err(&pUrb->dev->dev, "EP2 IoCompleteRoutine return error\n");
-               pWb35Tx->EP2vm_state = VM_STOP;
-               goto error;
-       }
-
-       /* Update the Tx result */
-       InterruptInLength = pUrb->actual_length;
-       /* Modify for minimum memory access and DWORD alignment. */
-       T02.value = cpu_to_le32(pltmp[0]) >> 8; /* [31:8] -> [24:0] */
-       InterruptInLength -= 1; /* 20051221.1.c Modify the follow for more stable */
-       InterruptInLength >>= 2; /* InterruptInLength/4 */
-       for (i = 1; i <= InterruptInLength; i++) {
-               T02.value |= ((cpu_to_le32(pltmp[i]) & 0xff) << 24);
-
-               TSTATUS.value = T02.value;  /* 20061009 anson's endian */
-               Mds_SendComplete(adapter, &TSTATUS);
-               T02.value = cpu_to_le32(pltmp[i]) >> 8;
-       }
-
-       return;
-error:
-       atomic_dec(&pWb35Tx->TxResultCount);
-       pWb35Tx->EP2vm_state = VM_STOP;
-}
-
-static void Wb35Tx_EP2VM(struct wbsoft_priv *adapter)
-{
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-       struct urb *pUrb = (struct urb *)pWb35Tx->Tx2Urb;
-       u32 *pltmp = (u32 *)pWb35Tx->EP2_buf;
-       int             retv;
-
-       if (pHwData->SurpriseRemove)
-               goto error;
-
-       if (pWb35Tx->tx_halt)
-               goto error;
-
-       /* Issuing URB */
-       usb_fill_int_urb(pUrb, pHwData->udev, usb_rcvintpipe(pHwData->udev, 2),
-                        pltmp, MAX_INTERRUPT_LENGTH, Wb35Tx_EP2VM_complete,
-                        adapter, 32);
-
-       pWb35Tx->EP2vm_state = VM_RUNNING;
-       retv = usb_submit_urb(pUrb, GFP_ATOMIC);
-
-       if (retv < 0) {
-               pr_debug("EP2 Tx Irp sending error\n");
-               goto error;
-       }
-
-       return;
-error:
-       pWb35Tx->EP2vm_state = VM_STOP;
-       atomic_dec(&pWb35Tx->TxResultCount);
-}
-
-void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter)
-{
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_tx *pWb35Tx = &pHwData->Wb35Tx;
-
-       /* Allow only one thread to run into function */
-       if (atomic_inc_return(&pWb35Tx->TxResultCount) == 1) {
-               pWb35Tx->EP2vm_state = VM_RUNNING;
-               Wb35Tx_EP2VM(adapter);
-       } else
-               atomic_dec(&pWb35Tx->TxResultCount);
-}
diff --git a/drivers/staging/winbond/wb35tx_f.h b/drivers/staging/winbond/wb35tx_f.h
deleted file mode 100644 (file)
index 018fd35..0000000
+++ /dev/null
@@ -1,22 +0,0 @@
-#ifndef __WINBOND_WB35TX_F_H
-#define __WINBOND_WB35TX_F_H
-
-#include "core.h"
-
-/*
- * ====================================
- * Interface function declare
- * ====================================
- */
-unsigned char Wb35Tx_initial(struct hw_data *hw_data);
-void Wb35Tx_destroy(struct hw_data *hw_data);
-unsigned char Wb35Tx_get_tx_buffer(struct hw_data *hw_data, u8 **buffer);
-
-void Wb35Tx_EP2VM_start(struct wbsoft_priv *adapter);
-
-void Wb35Tx_start(struct wbsoft_priv *adapter);
-void Wb35Tx_stop(struct hw_data *hw_data);
-
-void Wb35Tx_CurrentTime(struct wbsoft_priv *adapter, u32 time_count);
-
-#endif
diff --git a/drivers/staging/winbond/wb35tx_s.h b/drivers/staging/winbond/wb35tx_s.h
deleted file mode 100644 (file)
index dc12008..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-#ifndef __WINBOND_WB35_TX_S_H
-#define __WINBOND_WB35_TX_S_H
-
-#include "mds_s.h"
-
-/* IS89C35 Tx related definition */
-#define TX_INTERFACE           0       /* Interface 1 */
-#define TX_PIPE                        3       /* Endpoint 4 */
-#define TX_INTERRUPT           1       /* Endpoint 2 */
-#define MAX_INTERRUPT_LENGTH   64      /* It must be 64 for EP2 hardware */
-
-/* Internal variable for module */
-struct wb35_tx {
-       /* For Tx buffer */
-       u8      TxBuffer[MAX_USB_TX_BUFFER_NUMBER][MAX_USB_TX_BUFFER];
-
-       /* For Interrupt pipe */
-       u8      EP2_buf[MAX_INTERRUPT_LENGTH];
-
-       atomic_t        TxResultCount; /* For thread control of EP2 931130.4.m */
-       atomic_t        TxFireCounter; /* For thread control of EP4 931130.4.n */
-       u32             ByteTransfer;
-
-       u32     TxSendIndex; /* The next index of Mds array to be sent */
-       u32     EP2vm_state; /* for EP2vm state */
-       u32     EP4vm_state; /* for EP4vm state */
-       u32     tx_halt; /* Stopping VM */
-
-       struct urb      *Tx4Urb;
-       struct urb      *Tx2Urb;
-
-       int             EP2VM_status;
-       int             EP4VM_status;
-
-       u32     TxFillCount; /* 20060928 */
-       u32     TxTimer; /* 20060928 Add if sending packet is greater than 13 */
-};
-
-#endif
diff --git a/drivers/staging/winbond/wbhal.h b/drivers/staging/winbond/wbhal.h
deleted file mode 100644 (file)
index 289ee54..0000000
+++ /dev/null
@@ -1,513 +0,0 @@
-#ifndef __WINBOND_WBHAL_S_H
-#define __WINBOND_WBHAL_S_H
-
-#include <linux/types.h>
-#include <linux/if_ether.h> /* for ETH_ALEN */
-
-#define HAL_LED_SET_MASK       0x001c
-#define HAL_LED_SET_SHIFT      2
-
-/* supported RF type */
-#define RF_MAXIM_2825          0
-#define RF_MAXIM_2827          1
-#define RF_MAXIM_2828          2
-#define RF_MAXIM_2829          3
-#define RF_MAXIM_V1            15
-#define RF_AIROHA_2230         16
-#define RF_AIROHA_7230         17
-#define RF_AIROHA_2230S                18
-#define RF_WB_242              33
-#define RF_WB_242_1            34
-#define RF_DECIDE_BY_INF       255
-
-/*
- * ----------------------------------------------------------------
- * The follow define connect to upper layer
- *     User must modify for connection between HAL and upper layer
- * ----------------------------------------------------------------
- */
-
-/*
- * ==============================
- * Common define
- * ==============================
- */
-/* Bit 5 */
-#define HAL_USB_MODE_BURST(_H)                 (_H->SoftwareSet & 0x20)
-
-/* Scan interval */
-#define SCAN_MAX_CHNL_TIME                     (50)
-
-/* For TxL2 Frame typr recognise */
-#define FRAME_TYPE_802_3_DATA                  0
-#define FRAME_TYPE_802_11_MANAGEMENT           1
-#define FRAME_TYPE_802_11_MANAGEMENT_CHALLENGE 2
-#define FRAME_TYPE_802_11_CONTROL              3
-#define FRAME_TYPE_802_11_DATA                 4
-#define FRAME_TYPE_PROMISCUOUS                 5
-
-/* The follow definition is used for convert the frame------------ */
-#define DOT_11_SEQUENCE_OFFSET                 22 /* Sequence control offset */
-#define DOT_3_TYPE_OFFSET                      12
-#define DOT_11_MAC_HEADER_SIZE                 24
-#define DOT_11_SNAP_SIZE                       6
-#define DOT_11_TYPE_OFFSET                     30 /* The start offset of 802.11 Frame. Type encapsulation. */
-#define DEFAULT_SIFSTIME                       10
-#define DEFAULT_FRAGMENT_THRESHOLD             2346 /* No fragment */
-#define DEFAULT_MSDU_LIFE_TIME                 0xffff
-
-#define LONG_PREAMBLE_PLUS_PLCPHEADER_TIME             (144 + 48)
-#define SHORT_PREAMBLE_PLUS_PLCPHEADER_TIME            (72 + 24)
-#define PREAMBLE_PLUS_SIGNAL_PLUS_SIGNALEXTENSION      (16 + 4 + 6)
-#define Tsym                                           4
-
-/*  Frame Type of Bits (2, 3)----------------------------------- */
-#define MAC_TYPE_MANAGEMENT                    0x00
-#define MAC_TYPE_CONTROL                       0x04
-#define MAC_TYPE_DATA                          0x08
-#define MASK_FRAGMENT_NUMBER                   0x000F
-#define SEQUENCE_NUMBER_SHIFT                  4
-
-#define  HAL_WOL_TYPE_WAKEUP_FRAME             0x01
-#define  HAL_WOL_TYPE_MAGIC_PACKET             0x02
-
-#define HAL_KEYTYPE_WEP40                      0
-#define HAL_KEYTYPE_WEP104                     1
-#define HAL_KEYTYPE_TKIP                       2 /* 128 bit key */
-#define HAL_KEYTYPE_AES_CCMP                   3 /* 128 bit key */
-
-/* For VM state */
-enum {
-       VM_STOP = 0,
-       VM_RUNNING,
-       VM_COMPLETED
-};
-
-/*
- * ================================
- * Normal Key table format
- * ================================
- */
-
-/* The order of KEY index is MAPPING_KEY_START_INDEX > GROUP_KEY_START_INDEX */
-#define MAX_KEY_TABLE                  24 /* 24 entry for storing key data */
-#define GROUP_KEY_START_INDEX          4
-#define MAPPING_KEY_START_INDEX                8
-
-/*
- * =========================================
- * Descriptor
- * =========================================
- */
-#define MAX_DESCRIPTOR_BUFFER_INDEX    8 /* Have to multiple of 2 */
-#define FLAG_ERROR_TX_MASK             0x000000bf
-#define FLAG_ERROR_RX_MASK             0x0000083f
-
-#define FLAG_BAND_RX_MASK              0x10000000 /* Bit 28 */
-
-struct R00_descriptor {
-       union {
-               u32     value;
-#ifdef _BIG_ENDIAN_
-               struct {
-                       u32     R00_packet_or_buffer_status:1;
-                       u32     R00_packet_in_fifo:1;
-                       u32     R00_RESERVED:2;
-                       u32     R00_receive_byte_count:12;
-                       u32     R00_receive_time_index:16;
-               };
-#else
-               struct {
-                       u32     R00_receive_time_index:16;
-                       u32     R00_receive_byte_count:12;
-                       u32     R00_RESERVED:2;
-                       u32     R00_packet_in_fifo:1;
-                       u32     R00_packet_or_buffer_status:1;
-               };
-#endif
-       };
-};
-
-struct T00_descriptor {
-       union {
-               u32     value;
-#ifdef _BIG_ENDIAN_
-               struct {
-                       u32     T00_first_mpdu:1; /* for hardware use */
-                       u32     T00_last_mpdu:1; /* for hardware use */
-                       u32     T00_IsLastMpdu:1;/* 0:not 1:Yes for software used */
-                       u32     T00_IgnoreResult:1;/* The same mechanism with T00 setting. */
-                       u32     T00_RESERVED_ID:2;/* 3 bit ID reserved */
-                       u32     T00_tx_packet_id:4;
-                       u32     T00_RESERVED:4;
-                       u32     T00_header_length:6;
-                       u32     T00_frame_length:12;
-               };
-#else
-               struct {
-                       u32     T00_frame_length:12;
-                       u32     T00_header_length:6;
-                       u32     T00_RESERVED:4;
-                       u32     T00_tx_packet_id:4;
-                       u32     T00_RESERVED_ID:2; /* 3 bit ID reserved */
-                       u32     T00_IgnoreResult:1; /* The same mechanism with T00 setting. */
-                       u32     T00_IsLastMpdu:1; /* 0:not 1:Yes for software used */
-                       u32     T00_last_mpdu:1; /* for hardware use */
-                       u32     T00_first_mpdu:1; /* for hardware use */
-               };
-#endif
-       };
-};
-
-struct R01_descriptor {
-       union {
-               u32     value;
-#ifdef _BIG_ENDIAN_
-               struct {
-                       u32     R01_RESERVED:3;
-                       u32     R01_mod_type:1;
-                       u32     R01_pre_type:1;
-                       u32     R01_data_rate:3;
-                       u32     R01_AGC_state:8;
-                       u32     R01_LNA_state:2;
-                       u32     R01_decryption_method:2;
-                       u32     R01_mic_error:1;
-                       u32     R01_replay:1;
-                       u32     R01_broadcast_frame:1;
-                       u32     R01_multicast_frame:1;
-                       u32     R01_directed_frame:1;
-                       u32     R01_receive_frame_antenna_selection:1;
-                       u32     R01_frame_receive_during_atim_window:1;
-                       u32     R01_protocol_version_error:1;
-                       u32     R01_authentication_frame_icv_error:1;
-                       u32     R01_null_key_to_authentication_frame:1;
-                       u32     R01_icv_error:1;
-                       u32     R01_crc_error:1;
-               };
-#else
-               struct {
-                       u32     R01_crc_error:1;
-                       u32     R01_icv_error:1;
-                       u32     R01_null_key_to_authentication_frame:1;
-                       u32     R01_authentication_frame_icv_error:1;
-                       u32     R01_protocol_version_error:1;
-                       u32     R01_frame_receive_during_atim_window:1;
-                       u32     R01_receive_frame_antenna_selection:1;
-                       u32     R01_directed_frame:1;
-                       u32     R01_multicast_frame:1;
-                       u32     R01_broadcast_frame:1;
-                       u32     R01_replay:1;
-                       u32     R01_mic_error:1;
-                       u32     R01_decryption_method:2;
-                       u32     R01_LNA_state:2;
-                       u32     R01_AGC_state:8;
-                       u32     R01_data_rate:3;
-                       u32     R01_pre_type:1;
-                       u32     R01_mod_type:1;
-                       u32     R01_RESERVED:3;
-               };
-#endif
-       };
-};
-
-struct T01_descriptor {
-       union {
-               u32     value;
-#ifdef _BIG_ENDIAN_
-               struct {
-                       u32     T01_rts_cts_duration:16;
-                       u32     T01_fall_back_rate:3;
-                       u32     T01_add_rts:1;
-                       u32     T01_add_cts:1;
-                       u32     T01_modulation_type:1;
-                       u32     T01_plcp_header_length:1;
-                       u32     T01_transmit_rate:3;
-                       u32     T01_wep_id:2;
-                       u32     T01_add_challenge_text:1;
-                       u32     T01_inhibit_crc:1;
-                       u32     T01_loop_back_wep_mode:1;
-                       u32     T01_retry_abort_enable:1;
-               };
-#else
-               struct {
-                       u32     T01_retry_abort_enable:1;
-                       u32     T01_loop_back_wep_mode:1;
-                       u32     T01_inhibit_crc:1;
-                       u32     T01_add_challenge_text:1;
-                       u32     T01_wep_id:2;
-                       u32     T01_transmit_rate:3;
-                       u32     T01_plcp_header_length:1;
-                       u32     T01_modulation_type:1;
-                       u32     T01_add_cts:1;
-                       u32     T01_add_rts:1;
-                       u32     T01_fall_back_rate:3;
-                       u32     T01_rts_cts_duration:16;
-               };
-#endif
-       };
-};
-
-struct T02_descriptor {
-       union {
-               u32     value;
-#ifdef _BIG_ENDIAN_
-               struct {
-                       u32     T02_IsLastMpdu:1; /* The same mechanism with T00 setting */
-                       u32     T02_IgnoreResult:1; /* The same mechanism with T00 setting. */
-                       u32     T02_RESERVED_ID:2; /* The same mechanism with T00 setting */
-                       u32     T02_Tx_PktID:4;
-                       u32     T02_MPDU_Cnt:4;
-                       u32     T02_RTS_Cnt:4;
-                       u32     T02_RESERVED:7;
-                       u32     T02_transmit_complete:1;
-                       u32     T02_transmit_abort_due_to_TBTT:1;
-                       u32     T02_effective_transmission_rate:1;
-                       u32     T02_transmit_without_encryption_due_to_wep_on_false:1;
-                       u32     T02_discard_due_to_null_wep_key:1;
-                       u32     T02_RESERVED_1:1;
-                       u32     T02_out_of_MaxTxMSDULiftTime:1;
-                       u32     T02_transmit_abort:1;
-                       u32     T02_transmit_fail:1;
-               };
-#else
-               struct {
-                       u32     T02_transmit_fail:1;
-                       u32     T02_transmit_abort:1;
-                       u32     T02_out_of_MaxTxMSDULiftTime:1;
-                       u32     T02_RESERVED_1:1;
-                       u32     T02_discard_due_to_null_wep_key:1;
-                       u32     T02_transmit_without_encryption_due_to_wep_on_false:1;
-                       u32     T02_effective_transmission_rate:1;
-                       u32     T02_transmit_abort_due_to_TBTT:1;
-                       u32     T02_transmit_complete:1;
-                       u32     T02_RESERVED:7;
-                       u32     T02_RTS_Cnt:4;
-                       u32     T02_MPDU_Cnt:4;
-                       u32     T02_Tx_PktID:4;
-                       u32     T02_RESERVED_ID:2; /* The same mechanism with T00 setting */
-                       u32     T02_IgnoreResult:1; /* The same mechanism with T00 setting. */
-                       u32     T02_IsLastMpdu:1; /* The same mechanism with T00 setting */
-               };
-#endif
-       };
-};
-
-struct wb35_descriptor { /* Skip length = 8 DWORD */
-       /* ID for descriptor ---, The field doesn't be cleard in the operation of Descriptor definition */
-       u8      Descriptor_ID;
-       /* ----------------------The above region doesn't be cleared by DESCRIPTOR_RESET------ */
-       u8      RESERVED[3];
-
-       u16     FragmentThreshold;
-       u8      InternalUsed; /* Only can be used by operation of descriptor definition */
-       u8      Type; /* 0: 802.3 1:802.11 data frame 2:802.11 management frame */
-
-       u8      PreambleMode;/* 0: short 1:long */
-       u8      TxRate;
-       u8      FragmentCount;
-       u8      EapFix; /* For speed up key install */
-
-       /* For R00 and T00 ------------------------------ */
-       union {
-               struct R00_descriptor   R00;
-               struct T00_descriptor   T00;
-       };
-
-       /* For R01 and T01 ------------------------------ */
-       union {
-               struct R01_descriptor   R01;
-               struct T01_descriptor   T01;
-       };
-
-       /* For R02 and T02 ------------------------------ */
-       union {
-               u32             R02;
-               struct T02_descriptor   T02;
-       };
-
-       /* For R03 and T03 ------------------------------ */
-       /* For software used */
-       union {
-               u32     R03;
-               u32     T03;
-               struct {
-                       u8      buffer_number;
-                       u8      buffer_start_index;
-                       u16     buffer_total_size;
-               };
-       };
-
-       /* For storing the buffer */
-       u16     buffer_size[MAX_DESCRIPTOR_BUFFER_INDEX];
-       void    *buffer_address[MAX_DESCRIPTOR_BUFFER_INDEX];
-};
-
-#define MAX_TXVGA_EEPROM               9       /* How many word(u16) of EEPROM will be used for TxVGA */
-#define MAX_RF_PARAMETER               32
-
-struct txvga_for_50 {
-       u8      ChanNo;
-       u8      TxVgaValue;
-};
-
-/*
- * ==============================================
- * Device related include
- * ==============================================
- */
-
-#include "wb35reg_s.h"
-#include "wb35tx_s.h"
-#include "wb35rx_s.h"
-
-/* For Hal using ============================================ */
-struct hw_data {
-       /* For compatible with 33 */
-       u32     revision;
-       u32     BB3c_cal; /* The value for Tx calibration comes from EEPROM */
-       u32     BB54_cal; /* The value for Rx calibration comes from EEPROM */
-
-       /* For surprise remove */
-       u32     SurpriseRemove; /* 0: Normal 1: Surprise remove */
-       u8      IsKeyPreSet;
-       u8      CalOneTime;
-
-       u8      VCO_trim;
-
-       u32     FragCount;
-       u32     DMAFix; /* V1_DMA_FIX The variable can be removed if driver want to save mem space for V2. */
-
-       /*
-        * ===============================================
-        * Definition for MAC address
-        * ===============================================
-        */
-       u8      PermanentMacAddress[ETH_ALEN + 2]; /* The Ethernet addr that are stored in EEPROM. + 2 to 8-byte alignment */
-       u8      CurrentMacAddress[ETH_ALEN + 2]; /* The Enthernet addr that are in used. + 2 to 8-byte alignment */
-
-       /*
-        * =========================================
-        * Definition for 802.11
-        * =========================================
-        */
-       u8      *bssid_pointer; /* Used by hal_get_bssid for return value */
-       u8      bssid[8]; /* Only 6 byte will be used. 8 byte is required for read buffer */
-       u8      ssid[32]; /* maximum ssid length is 32 byte */
-
-       u16     AID;
-       u8      ssid_length;
-       u8      Channel;
-
-       u16     ListenInterval;
-       u16     CapabilityInformation;
-
-       u16     BeaconPeriod;
-       u16     ProbeDelay;
-
-       u8      bss_type;/* 0: IBSS_NET or 1:ESS_NET */
-       u8      preamble;/* 0: short preamble, 1: long preamble */
-       u8      slot_time_select; /* 9 or 20 value */
-       u8      phy_type; /* Phy select */
-
-       u32     phy_para[MAX_RF_PARAMETER];
-       u32     phy_number;
-
-       u32     CurrentRadioSw; /* 0:On 1:Off */
-       u32     CurrentRadioHw; /* 0:On 1:Off */
-
-       u8      *power_save_point; /* Used by hal_get_power_save_mode for return value */
-       u8      cwmin;
-       u8      desired_power_save;
-       u8      dtim; /* Is running dtim */
-       u8      mapping_key_replace_index; /* In Key table, the next index be replaced */
-
-       u16     MaxReceiveLifeTime;
-       u16     FragmentThreshold;
-       u16     FragmentThreshold_tmp;
-       u16     cwmax;
-
-       u8      Key_slot[MAX_KEY_TABLE][8]; /* Ownership record for key slot. For Alignment */
-       u32     Key_content[MAX_KEY_TABLE][12]; /* 10DW for each entry + 2 for burst command (Off and On valid bit) */
-       u8      CurrentDefaultKeyIndex;
-       u32     CurrentDefaultKeyLength;
-
-       /*
-        * ==================================================
-        * Variable for each module
-        * ==================================================
-        */
-       struct usb_device       *udev;
-       struct wb35_reg         reg;    /* Need Wb35Reg.h */
-       struct wb35_tx          Wb35Tx; /* Need Wb35Tx.h */
-       struct wb35_rx          Wb35Rx; /* Need Wb35Rx.h */
-
-       struct timer_list       LEDTimer; /* For LED */
-
-       u32                     LEDpoint; /* For LED */
-
-       u32                     dto_tx_retry_count;
-       u32                     dto_tx_frag_count;
-       u32                     rx_ok_count[13]; /* index=0: total rx ok */
-       u32                     rx_err_count[13]; /* index=0: total rx err */
-
-       /* for Tx debug */
-       u32                     tx_TBTT_start_count;
-       u32                     tx_ETR_count;
-       u32                     tx_WepOn_false_count;
-       u32                     tx_Null_key_count;
-       u32                     tx_retry_count[8];
-
-       u8                      PowerIndexFromEEPROM; /* For 2412MHz */
-       u8                      power_index;
-       u8                      IsWaitJoinComplete; /* TRUE: set join request */
-       u8                      band;
-
-       u16                     SoftwareSet;
-       u16                     Reserved_s;
-
-       u32                     IsInitOK; /* 0: Driver starting 1: Driver init OK */
-
-       /* For Phy calibration */
-       s32                     iq_rsdl_gain_tx_d2;
-       s32                     iq_rsdl_phase_tx_d2;
-       u32                     txvga_setting_for_cal;
-
-       u8                      TxVgaSettingInEEPROM[(((MAX_TXVGA_EEPROM * 2) + 3) & ~0x03)]; /* For EEPROM value */
-       u8                      TxVgaFor24[16]; /* Max is 14, 2 for alignment */
-       struct txvga_for_50             TxVgaFor50[36]; /* 35 channels in 5G. 35x2 = 70 byte. 2 for alignments */
-
-       u16                     Scan_Interval;
-       u16                     RESERVED6;
-
-       /* LED control */
-       u32             LED_control;
-       /*
-        * LED_control 4 byte: Gray_Led_1[3] Gray_Led_0[2] Led[1] Led[0]
-        * Gray_Led
-        *              For Led gray setting
-        * Led
-        *              0: normal control,
-        *                      LED behavior will decide by EEPROM setting
-        *              1: Turn off specific LED
-        *              2: Always on specific LED
-        *              3: slow blinking specific LED
-        *              4: fast blinking specific LED
-        *              5: WPS led control is set. Led0 is Red, Led1 id Green
-        *
-        * Led[1] is parameter for WPS LED mode
-        *              1:InProgress
-        *              2: Error
-        *              3: Session overlap
-        *              4: Success control
-        */
-       u32             LED_LinkOn;     /* Turn LED on control */
-       u32             LED_Scanning;   /* Let LED in scan process control */
-       u32             LED_Blinking;   /* Temp variable for shining */
-       u32             RxByteCountLast;
-       u32             TxByteCountLast;
-
-       /* For global timer */
-       u32             time_count;     /* TICK_TIME_100ms 1 = 100ms */
-};
-
-#endif
diff --git a/drivers/staging/winbond/wbusb.c b/drivers/staging/winbond/wbusb.c
deleted file mode 100644 (file)
index 0d29624..0000000
+++ /dev/null
@@ -1,853 +0,0 @@
-/*
- * Copyright 2008 Pavel Machek <pavel@ucw.cz>
- *
- * Distribute under GPLv2.
- *
- * The original driver was written by:
- *     Jeff Lee <YY_Lee@issc.com.tw>
- *
- * and was adapted to the 2.6 kernel by:
- *     Costantino Leandro (Rxart Desktop) <le_costantino@pixartargentina.com.ar>
- */
-#include <net/mac80211.h>
-#include <linux/usb.h>
-#include <linux/module.h>
-
-#include "core.h"
-#include "mds_f.h"
-#include "mto.h"
-#include "wbhal.h"
-#include "wb35reg_f.h"
-#include "wb35tx_f.h"
-#include "wb35rx_f.h"
-
-MODULE_DESCRIPTION("IS89C35 802.11bg WLAN USB Driver");
-MODULE_LICENSE("GPL");
-MODULE_VERSION("0.1");
-
-static const struct usb_device_id wb35_table[] = {
-       { USB_DEVICE(0x0416, 0x0035) },
-       { USB_DEVICE(0x18E8, 0x6201) },
-       { USB_DEVICE(0x18E8, 0x6206) },
-       { USB_DEVICE(0x18E8, 0x6217) },
-       { USB_DEVICE(0x18E8, 0x6230) },
-       { USB_DEVICE(0x18E8, 0x6233) },
-       { USB_DEVICE(0x1131, 0x2035) },
-       { 0, }
-};
-
-MODULE_DEVICE_TABLE(usb, wb35_table);
-
-static struct ieee80211_rate wbsoft_rates[] = {
-       { .bitrate = 10, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
-};
-
-static struct ieee80211_channel wbsoft_channels[] = {
-       { .center_freq = 2412 },
-};
-
-static struct ieee80211_supported_band wbsoft_band_2GHz = {
-       .channels       = wbsoft_channels,
-       .n_channels     = ARRAY_SIZE(wbsoft_channels),
-       .bitrates       = wbsoft_rates,
-       .n_bitrates     = ARRAY_SIZE(wbsoft_rates),
-};
-
-static void hal_set_beacon_period(struct hw_data *pHwData, u16 beacon_period)
-{
-       u32 tmp;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       pHwData->BeaconPeriod = beacon_period;
-       tmp = pHwData->BeaconPeriod << 16;
-       tmp |= pHwData->ProbeDelay;
-       Wb35Reg_Write(pHwData, 0x0848, tmp);
-}
-
-static int wbsoft_add_interface(struct ieee80211_hw *dev,
-                               struct ieee80211_vif *vif)
-{
-       struct wbsoft_priv *priv = dev->priv;
-
-       hal_set_beacon_period(&priv->sHwData, vif->bss_conf.beacon_int);
-
-       return 0;
-}
-
-static void wbsoft_remove_interface(struct ieee80211_hw *dev,
-                                   struct ieee80211_vif *vif)
-{
-}
-
-static void wbsoft_stop(struct ieee80211_hw *hw)
-{
-}
-
-static int wbsoft_get_stats(struct ieee80211_hw *hw,
-                           struct ieee80211_low_level_stats *stats)
-{
-       return 0;
-}
-
-static u64 wbsoft_prepare_multicast(struct ieee80211_hw *hw,
-                                   struct netdev_hw_addr_list *mc_list)
-{
-       return netdev_hw_addr_list_count(mc_list);
-}
-
-static void wbsoft_configure_filter(struct ieee80211_hw *dev,
-                                   unsigned int changed_flags,
-                                   unsigned int *total_flags,
-                                   u64 multicast)
-{
-       unsigned int new_flags;
-
-       new_flags = 0;
-
-       if (*total_flags & FIF_PROMISC_IN_BSS)
-               new_flags |= FIF_PROMISC_IN_BSS;
-       else if ((*total_flags & FIF_ALLMULTI) || (multicast > 32))
-               new_flags |= FIF_ALLMULTI;
-
-       dev->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
-
-       *total_flags = new_flags;
-}
-
-static void wbsoft_tx(struct ieee80211_hw *dev,
-                     struct ieee80211_tx_control *control,
-                     struct sk_buff *skb)
-{
-       struct wbsoft_priv *priv = dev->priv;
-
-       if (priv->sMlmeFrame.is_in_used != PACKET_FREE_TO_USE) {
-               priv->sMlmeFrame.wNumTxMMPDUDiscarded++;
-               kfree_skb(skb);
-               return;
-       }
-
-       priv->sMlmeFrame.is_in_used = PACKET_COME_FROM_MLME;
-
-       priv->sMlmeFrame.pMMPDU         = skb->data;
-       priv->sMlmeFrame.data_type      = FRAME_TYPE_802_11_MANAGEMENT;
-       priv->sMlmeFrame.len            = skb->len;
-       priv->sMlmeFrame.wNumTxMMPDU++;
-
-       /*
-        * H/W will enter power save by set the register. S/W don't send null
-        * frame with PWRMgt bit enbled to enter power save now.
-        */
-
-       Mds_Tx(priv);
-}
-
-static int wbsoft_start(struct ieee80211_hw *dev)
-{
-       struct wbsoft_priv *priv = dev->priv;
-
-       priv->enabled = true;
-
-       return 0;
-}
-
-static void hal_set_radio_mode(struct hw_data *pHwData, unsigned char radio_off)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       if (radio_off) {        /* disable Baseband receive off */
-               pHwData->CurrentRadioSw = 1;    /* off */
-               reg->M24_MacControl &= 0xffffffbf;
-       } else {
-               pHwData->CurrentRadioSw = 0;    /* on */
-               reg->M24_MacControl |= 0x00000040;
-       }
-       Wb35Reg_Write(pHwData, 0x0824, reg->M24_MacControl);
-}
-
-static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info channel)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */
-       pHwData->Channel = channel.ChanNo;
-       pHwData->band = channel.band;
-       reg->M28_MacControl &= ~0xff;   /* Clean channel information field */
-       reg->M28_MacControl |= channel.ChanNo;
-       Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl,
-                                      (s8 *) &channel,
-                                      sizeof(struct chan_info));
-}
-
-static void hal_set_current_channel(struct hw_data *pHwData, struct chan_info channel)
-{
-       hal_set_current_channel_ex(pHwData, channel);
-}
-
-static void hal_set_accept_broadcast(struct hw_data *pHwData, u8 enable)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       reg->M00_MacControl &= ~0x02000000;     /* The HW value */
-
-       if (enable)
-               reg->M00_MacControl |= 0x02000000;      /* The HW value */
-
-       Wb35Reg_Write(pHwData, 0x0800, reg->M00_MacControl);
-}
-
-/* For wep key error detection, we need to accept broadcast packets to be received temporary. */
-static void hal_set_accept_promiscuous(struct hw_data *pHwData, u8 enable)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       if (enable) {
-               reg->M00_MacControl |= 0x00400000;
-               Wb35Reg_Write(pHwData, 0x0800, reg->M00_MacControl);
-       } else {
-               reg->M00_MacControl &= ~0x00400000;
-               Wb35Reg_Write(pHwData, 0x0800, reg->M00_MacControl);
-       }
-}
-
-static void hal_set_accept_multicast(struct hw_data *pHwData, u8 enable)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       reg->M00_MacControl &= ~0x01000000;     /* The HW value */
-       if (enable)
-               reg->M00_MacControl |= 0x01000000;      /* The HW value */
-       Wb35Reg_Write(pHwData, 0x0800, reg->M00_MacControl);
-}
-
-static void hal_set_accept_beacon(struct hw_data *pHwData, u8 enable)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       if (!enable)    /* Due to SME and MLME are not suitable for 35 */
-               return;
-
-       reg->M00_MacControl &= ~0x04000000;     /* The HW value */
-       if (enable)
-               reg->M00_MacControl |= 0x04000000;      /* The HW value */
-
-       Wb35Reg_Write(pHwData, 0x0800, reg->M00_MacControl);
-}
-
-static int wbsoft_config(struct ieee80211_hw *dev, u32 changed)
-{
-       struct wbsoft_priv *priv = dev->priv;
-       struct chan_info ch;
-
-       /* Should use channel_num, or something, as that is already pre-translated */
-       ch.band = 1;
-       ch.ChanNo = 1;
-
-       hal_set_current_channel(&priv->sHwData, ch);
-       hal_set_accept_broadcast(&priv->sHwData, 1);
-       hal_set_accept_promiscuous(&priv->sHwData, 1);
-       hal_set_accept_multicast(&priv->sHwData, 1);
-       hal_set_accept_beacon(&priv->sHwData, 1);
-       hal_set_radio_mode(&priv->sHwData, 0);
-
-       return 0;
-}
-
-static u64 wbsoft_get_tsf(struct ieee80211_hw *dev, struct ieee80211_vif *vif)
-{
-       return 0;
-}
-
-static const struct ieee80211_ops wbsoft_ops = {
-       .tx                     = wbsoft_tx,
-       .start                  = wbsoft_start,
-       .stop                   = wbsoft_stop,
-       .add_interface          = wbsoft_add_interface,
-       .remove_interface       = wbsoft_remove_interface,
-       .config                 = wbsoft_config,
-       .prepare_multicast      = wbsoft_prepare_multicast,
-       .configure_filter       = wbsoft_configure_filter,
-       .get_stats              = wbsoft_get_stats,
-       .get_tsf                = wbsoft_get_tsf,
-};
-
-static void hal_set_ethernet_address(struct hw_data *pHwData, u8 *current_address)
-{
-       u32 ltmp[2];
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       memcpy(pHwData->CurrentMacAddress, current_address, ETH_ALEN);
-
-       ltmp[0] = cpu_to_le32(*(u32 *) pHwData->CurrentMacAddress);
-       ltmp[1] = cpu_to_le32(*(u32 *) (pHwData->CurrentMacAddress + 4)) & 0xffff;
-
-       Wb35Reg_BurstWrite(pHwData, 0x03e8, ltmp, 2, AUTO_INCREMENT);
-}
-
-static void hal_get_permanent_address(struct hw_data *pHwData, u8 *pethernet_address)
-{
-       if (pHwData->SurpriseRemove)
-               return;
-
-       memcpy(pethernet_address, pHwData->PermanentMacAddress, 6);
-}
-
-static void hal_stop(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       pHwData->Wb35Rx.rx_halt = 1;
-       Wb35Rx_stop(pHwData);
-
-       pHwData->Wb35Tx.tx_halt = 1;
-       Wb35Tx_stop(pHwData);
-
-       reg->D00_DmaControl &= ~0xc0000000;     /* Tx Off, Rx Off */
-       Wb35Reg_Write(pHwData, 0x0400, reg->D00_DmaControl);
-}
-
-static unsigned char hal_idle(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (!pHwData->SurpriseRemove && reg->EP0vm_state != VM_STOP)
-               return false;
-
-       return true;
-}
-
-u8 hal_get_antenna_number(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if ((reg->BB2C & BIT(11)) == 0)
-               return 0;
-       else
-               return 1;
-}
-
-/* 0 : radio on; 1: radio off */
-static u8 hal_get_hw_radio_off(struct hw_data *pHwData)
-{
-       struct wb35_reg *reg = &pHwData->reg;
-
-       if (pHwData->SurpriseRemove)
-               return 1;
-
-       /* read the bit16 of register U1B0 */
-       Wb35Reg_Read(pHwData, 0x3b0, &reg->U1B0);
-       if ((reg->U1B0 & 0x00010000)) {
-               pHwData->CurrentRadioHw = 1;
-               return 1;
-       } else {
-               pHwData->CurrentRadioHw = 0;
-               return 0;
-       }
-}
-
-static u8 LED_GRAY[20] = {
-       0, 3, 4, 6, 8, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 8, 6, 4, 2
-};
-
-static u8 LED_GRAY2[30] = {
-       7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-       0, 15, 14, 13, 12, 11, 10, 9, 8
-};
-
-static void hal_led_control(unsigned long data)
-{
-       struct wbsoft_priv *adapter = (struct wbsoft_priv *)data;
-       struct hw_data *pHwData = &adapter->sHwData;
-       struct wb35_reg *reg = &pHwData->reg;
-       u32 LEDSet = (pHwData->SoftwareSet & HAL_LED_SET_MASK) >> HAL_LED_SET_SHIFT;
-       u32 TimeInterval = 500, ltmp, ltmp2;
-       ltmp = 0;
-
-       if (pHwData->SurpriseRemove)
-               return;
-
-       if (pHwData->LED_control) {
-               ltmp2 = pHwData->LED_control & 0xff;
-               if (ltmp2 == 5) { /* 5 is WPS mode */
-                       TimeInterval = 100;
-                       ltmp2 = (pHwData->LED_control >> 8) & 0xff;
-                       switch (ltmp2) {
-                       case 1: /* [0.2 On][0.1 Off]... */
-                               pHwData->LED_Blinking %= 3;
-                               ltmp = 0x1010;  /* Led 1 & 0 Green and Red */
-                               if (pHwData->LED_Blinking == 2) /* Turn off */
-                                       ltmp = 0;
-                               break;
-                       case 2: /* [0.1 On][0.1 Off]... */
-                               pHwData->LED_Blinking %= 2;
-                               ltmp = 0x0010;  /* Led 0 red color */
-                               if (pHwData->LED_Blinking) /* Turn off */
-                                       ltmp = 0;
-                               break;
-                       case 3: /* [0.1 On][0.1 Off][0.1 On][0.1 Off][0.1 On][0.1 Off][0.1 On][0.1 Off][0.1 On][0.1 Off][0.5 Off]... */
-                               pHwData->LED_Blinking %= 15;
-                               ltmp = 0x0010;  /* Led 0 red color */
-                               if ((pHwData->LED_Blinking >= 9) || (pHwData->LED_Blinking % 2)) /* Turn off 0.6 sec */
-                                       ltmp = 0;
-                               break;
-                       case 4: /* [300 On][ off ] */
-                               ltmp = 0x1000;  /* Led 1 Green color */
-                               if (pHwData->LED_Blinking >= 3000)
-                                       ltmp = 0; /* led maybe on after 300sec * 32bit counter overlap. */
-                               break;
-                       }
-                       pHwData->LED_Blinking++;
-
-                       reg->U1BC_LEDConfigure = ltmp;
-                       if (LEDSet != 7) { /* Only 111 mode has 2 LEDs on PCB. */
-                               reg->U1BC_LEDConfigure |= (ltmp & 0xff) << 8; /* Copy LED result to each LED control register */
-                               reg->U1BC_LEDConfigure |= (ltmp & 0xff00) >> 8;
-                       }
-                       Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure);
-               }
-       } else if (pHwData->CurrentRadioSw || pHwData->CurrentRadioHw) { /* If radio off */
-               if (reg->U1BC_LEDConfigure & 0x1010) {
-                       reg->U1BC_LEDConfigure &= ~0x1010;
-                       Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure);
-               }
-       } else {
-               switch (LEDSet) {
-               case 4: /* [100] Only 1 Led be placed on PCB and use pin 21 of IC. Use LED_0 for showing */
-                       if (!pHwData->LED_LinkOn) { /* Blink only if not Link On */
-                               /* Blinking if scanning is on progress */
-                               if (pHwData->LED_Scanning) {
-                                       if (pHwData->LED_Blinking == 0) {
-                                               reg->U1BC_LEDConfigure |= 0x10;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 On */
-                                               pHwData->LED_Blinking = 1;
-                                               TimeInterval = 300;
-                                       } else {
-                                               reg->U1BC_LEDConfigure &= ~0x10;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 Off */
-                                               pHwData->LED_Blinking = 0;
-                                               TimeInterval = 300;
-                                       }
-                               } else {
-                                       /* Turn Off LED_0 */
-                                       if (reg->U1BC_LEDConfigure & 0x10) {
-                                               reg->U1BC_LEDConfigure &= ~0x10;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 Off */
-                                       }
-                               }
-                       } else {
-                               /* Turn On LED_0 */
-                               if ((reg->U1BC_LEDConfigure & 0x10) == 0) {
-                                       reg->U1BC_LEDConfigure |= 0x10;
-                                       Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 Off */
-                               }
-                       }
-                       break;
-               case 6: /* [110] Only 1 Led be placed on PCB and use pin 21 of IC. Use LED_0 for showing */
-                       if (!pHwData->LED_LinkOn) { /* Blink only if not Link On */
-                               /* Blinking if scanning is on progress */
-                               if (pHwData->LED_Scanning) {
-                                       if (pHwData->LED_Blinking == 0) {
-                                               reg->U1BC_LEDConfigure &= ~0xf;
-                                               reg->U1BC_LEDConfigure |= 0x10;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 On */
-                                               pHwData->LED_Blinking = 1;
-                                               TimeInterval = 300;
-                                       } else {
-                                               reg->U1BC_LEDConfigure &= ~0x1f;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 Off */
-                                               pHwData->LED_Blinking = 0;
-                                               TimeInterval = 300;
-                                       }
-                               } else {
-                                       /* Gray blinking if in disconnect state and not scanning */
-                                       ltmp = reg->U1BC_LEDConfigure;
-                                       reg->U1BC_LEDConfigure &= ~0x1f;
-                                       if (LED_GRAY2[(pHwData->LED_Blinking % 30)]) {
-                                               reg->U1BC_LEDConfigure |= 0x10;
-                                               reg->U1BC_LEDConfigure |=
-                                                   LED_GRAY2[(pHwData->LED_Blinking % 30)];
-                                       }
-                                       pHwData->LED_Blinking++;
-                                       if (reg->U1BC_LEDConfigure != ltmp)
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 Off */
-                                       TimeInterval = 100;
-                               }
-                       } else {
-                               /* Turn On LED_0 */
-                               if ((reg->U1BC_LEDConfigure & 0x10) == 0) {
-                                       reg->U1BC_LEDConfigure |= 0x10;
-                                       Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_0 Off */
-                               }
-                       }
-                       break;
-               case 5: /* [101] Only 1 Led be placed on PCB and use LED_1 for showing */
-                       if (!pHwData->LED_LinkOn) { /* Blink only if not Link On */
-                               /* Blinking if scanning is on progress */
-                               if (pHwData->LED_Scanning) {
-                                       if (pHwData->LED_Blinking == 0) {
-                                               reg->U1BC_LEDConfigure |= 0x1000;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_1 On */
-                                               pHwData->LED_Blinking = 1;
-                                               TimeInterval = 300;
-                                       } else {
-                                               reg->U1BC_LEDConfigure &= ~0x1000;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_1 Off */
-                                               pHwData->LED_Blinking = 0;
-                                               TimeInterval = 300;
-                                       }
-                               } else {
-                                       /* Turn Off LED_1 */
-                                       if (reg->U1BC_LEDConfigure & 0x1000) {
-                                               reg->U1BC_LEDConfigure &= ~0x1000;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_1 Off */
-                                       }
-                               }
-                       } else {
-                               /* Is transmitting/receiving ?? */
-                               if ((adapter->RxByteCount !=
-                                    pHwData->RxByteCountLast)
-                                   || (adapter->TxByteCount !=
-                                       pHwData->TxByteCountLast)) {
-                                       if ((reg->U1BC_LEDConfigure & 0x3000) !=
-                                           0x3000) {
-                                               reg->U1BC_LEDConfigure |= 0x3000;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_1 On */
-                                       }
-                                       /* Update variable */
-                                       pHwData->RxByteCountLast =
-                                           adapter->RxByteCount;
-                                       pHwData->TxByteCountLast =
-                                           adapter->TxByteCount;
-                                       TimeInterval = 200;
-                               } else {
-                                       /* Turn On LED_1 and blinking if transmitting/receiving */
-                                       if ((reg->U1BC_LEDConfigure & 0x3000) !=
-                                           0x1000) {
-                                               reg->U1BC_LEDConfigure &=
-                                                   ~0x3000;
-                                               reg->U1BC_LEDConfigure |=
-                                                   0x1000;
-                                               Wb35Reg_Write(pHwData, 0x03bc, reg->U1BC_LEDConfigure); /* LED_1 On */
-                                       }
-                               }
-                       }
-                       break;
-               default: /* Default setting. 2 LED be placed on PCB. LED_0: Link On LED_1 Active */
-                       if ((reg->U1BC_LEDConfigure & 0x3000) != 0x3000) {
-                               reg->U1BC_LEDConfigure |= 0x3000;       /* LED_1 is always on and event enable */
-                               Wb35Reg_Write(pHwData, 0x03bc,
-                                             reg->U1BC_LEDConfigure);
-                       }
-
-                       if (pHwData->LED_Blinking) {
-                               /* Gray blinking */
-                               reg->U1BC_LEDConfigure &= ~0x0f;
-                               reg->U1BC_LEDConfigure |= 0x10;
-                               reg->U1BC_LEDConfigure |=
-                                   LED_GRAY[(pHwData->LED_Blinking - 1) % 20];
-                               Wb35Reg_Write(pHwData, 0x03bc,
-                                             reg->U1BC_LEDConfigure);
-
-                               pHwData->LED_Blinking += 2;
-                               if (pHwData->LED_Blinking < 40)
-                                       TimeInterval = 100;
-                               else {
-                                       pHwData->LED_Blinking = 0; /* Stop blinking */
-                                       reg->U1BC_LEDConfigure &= ~0x0f;
-                                       Wb35Reg_Write(pHwData, 0x03bc,
-                                                     reg->U1BC_LEDConfigure);
-                               }
-                               break;
-                       }
-
-                       if (pHwData->LED_LinkOn) {
-                               if (!(reg->U1BC_LEDConfigure & 0x10)) { /* Check the LED_0 */
-                                       /* Try to turn ON LED_0 after gray blinking */
-                                       reg->U1BC_LEDConfigure |= 0x10;
-                                       pHwData->LED_Blinking = 1; /* Start blinking */
-                                       TimeInterval = 50;
-                               }
-                       } else {
-                               if (reg->U1BC_LEDConfigure & 0x10) { /* Check the LED_0 */
-                                       reg->U1BC_LEDConfigure &= ~0x10;
-                                       Wb35Reg_Write(pHwData, 0x03bc,
-                                                     reg->U1BC_LEDConfigure);
-                               }
-                       }
-                       break;
-               }
-       }
-
-       pHwData->time_count += TimeInterval;
-       Wb35Tx_CurrentTime(adapter, pHwData->time_count);
-       pHwData->LEDTimer.expires = jiffies + msecs_to_jiffies(TimeInterval);
-       add_timer(&pHwData->LEDTimer);
-}
-
-static int hal_init_hardware(struct ieee80211_hw *hw)
-{
-       struct wbsoft_priv *priv = hw->priv;
-       struct hw_data *pHwData = &priv->sHwData;
-       u16 SoftwareSet;
-
-       pHwData->MaxReceiveLifeTime = DEFAULT_MSDU_LIFE_TIME;
-       pHwData->FragmentThreshold = DEFAULT_FRAGMENT_THRESHOLD;
-
-       if (!Wb35Reg_initial(pHwData))
-               goto error_reg_destroy;
-
-       if (!Wb35Tx_initial(pHwData))
-               goto error_tx_destroy;
-
-       if (!Wb35Rx_initial(pHwData))
-               goto error_rx_destroy;
-
-       init_timer(&pHwData->LEDTimer);
-       pHwData->LEDTimer.function = hal_led_control;
-       pHwData->LEDTimer.data = (unsigned long)priv;
-       pHwData->LEDTimer.expires = jiffies + msecs_to_jiffies(1000);
-       add_timer(&pHwData->LEDTimer);
-
-       SoftwareSet = hal_software_set(pHwData);
-
-       Wb35Rx_start(hw);
-       Wb35Tx_EP2VM_start(priv);
-
-       return 0;
-
-error_rx_destroy:
-       Wb35Rx_destroy(pHwData);
-error_tx_destroy:
-       Wb35Tx_destroy(pHwData);
-error_reg_destroy:
-       Wb35Reg_destroy(pHwData);
-
-       pHwData->SurpriseRemove = 1;
-       return -EINVAL;
-}
-
-static int wb35_hw_init(struct ieee80211_hw *hw)
-{
-       struct wbsoft_priv *priv = hw->priv;
-       struct hw_data *pHwData = &priv->sHwData;
-       u8 EEPROM_region;
-       u8 HwRadioOff;
-       u8 *pMacAddr2;
-       u8 *pMacAddr;
-       int err;
-
-       pHwData->phy_type = RF_DECIDE_BY_INF;
-
-       priv->Mds.TxRTSThreshold                = DEFAULT_RTSThreshold;
-       priv->Mds.TxFragmentThreshold           = DEFAULT_FRAGMENT_THRESHOLD;
-
-       priv->sLocalPara.region_INF             = REGION_AUTO;
-       priv->sLocalPara.TxRateMode             = RATE_AUTO;
-       priv->sLocalPara.bMacOperationMode      = MODE_802_11_BG;
-       priv->sLocalPara.MTUsize                = MAX_ETHERNET_PACKET_SIZE;
-       priv->sLocalPara.bPreambleMode          = AUTO_MODE;
-       priv->sLocalPara.bWepKeyError           = false;
-       priv->sLocalPara.bToSelfPacketReceived  = false;
-       priv->sLocalPara.WepKeyDetectTimerCount = 2 * 100; /* 2 seconds */
-
-       priv->sLocalPara.RadioOffStatus.boSwRadioOff = false;
-
-       err = hal_init_hardware(hw);
-       if (err)
-               goto error;
-
-       EEPROM_region = hal_get_region_from_EEPROM(pHwData);
-       if (EEPROM_region != REGION_AUTO)
-               priv->sLocalPara.region = EEPROM_region;
-       else {
-               if (priv->sLocalPara.region_INF != REGION_AUTO)
-                       priv->sLocalPara.region = priv->sLocalPara.region_INF;
-               else
-                       priv->sLocalPara.region = REGION_USA;   /* default setting */
-       }
-
-       Mds_initial(priv);
-
-       /*
-        * If no user-defined address in the registry, use the address
-        * "burned" on the NIC instead.
-        */
-       pMacAddr = priv->sLocalPara.ThisMacAddress;
-       pMacAddr2 = priv->sLocalPara.PermanentAddress;
-
-       /* Reading ethernet address from EEPROM */
-       hal_get_permanent_address(pHwData, priv->sLocalPara.PermanentAddress);
-       if (memcmp(pMacAddr, "\x00\x00\x00\x00\x00\x00", MAC_ADDR_LENGTH) == 0)
-               memcpy(pMacAddr, pMacAddr2, MAC_ADDR_LENGTH);
-       else {
-               /* Set the user define MAC address */
-               hal_set_ethernet_address(pHwData,
-                                        priv->sLocalPara.ThisMacAddress);
-       }
-
-       priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData);
-       hal_get_hw_radio_off(pHwData);
-
-       /* Waiting for HAL setting OK */
-       while (!hal_idle(pHwData))
-               msleep(10);
-
-       MTO_Init(priv);
-
-       HwRadioOff = hal_get_hw_radio_off(pHwData);
-       priv->sLocalPara.RadioOffStatus.boHwRadioOff = !!HwRadioOff;
-
-       hal_set_radio_mode(pHwData,
-                          (unsigned char)(priv->sLocalPara.RadioOffStatus.
-                                          boSwRadioOff
-                                          || priv->sLocalPara.RadioOffStatus.
-                                          boHwRadioOff));
-
-       /* Notify hal that the driver is ready now. */
-       hal_driver_init_OK(pHwData) = 1;
-
-error:
-       return err;
-}
-
-static int wb35_probe(struct usb_interface *intf,
-                     const struct usb_device_id *id_table)
-{
-       struct usb_device *udev = interface_to_usbdev(intf);
-       struct usb_endpoint_descriptor *endpoint;
-       struct usb_host_interface *interface;
-       struct ieee80211_hw *dev;
-       struct wbsoft_priv *priv;
-       int err;
-       u32 ltmp;
-
-       usb_get_dev(udev);
-
-       /* Check the device if it already be opened */
-       err = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
-                            0x01,
-                            USB_TYPE_VENDOR | USB_RECIP_DEVICE | USB_DIR_IN,
-                            0x0, 0x400, &ltmp, 4, HZ * 100);
-       if (err < 0)
-               goto error;
-
-       /* Is already initialized? */
-       ltmp = cpu_to_le32(ltmp);
-       if (ltmp) {
-               err = -EBUSY;
-               goto error;
-       }
-
-       dev = ieee80211_alloc_hw(sizeof(*priv), &wbsoft_ops);
-       if (!dev) {
-               err = -ENOMEM;
-               goto error;
-       }
-
-       priv = dev->priv;
-
-       priv->sHwData.udev = udev;
-
-       interface = intf->cur_altsetting;
-       endpoint = &interface->endpoint[0].desc;
-
-       err = wb35_hw_init(dev);
-       if (err)
-               goto error_free_hw;
-
-       SET_IEEE80211_DEV(dev, &udev->dev);
-       {
-               struct hw_data *pHwData = &priv->sHwData;
-               unsigned char dev_addr[MAX_ADDR_LEN];
-               hal_get_permanent_address(pHwData, dev_addr);
-               SET_IEEE80211_PERM_ADDR(dev, dev_addr);
-       }
-
-       dev->extra_tx_headroom = 12;    /* FIXME */
-       dev->flags = IEEE80211_HW_SIGNAL_UNSPEC;
-       dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
-
-       dev->max_signal = 100;
-       dev->queues = 1;
-
-       dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &wbsoft_band_2GHz;
-
-       err = ieee80211_register_hw(dev);
-       if (err)
-               goto error_free_hw;
-
-       usb_set_intfdata(intf, dev);
-
-       return 0;
-
-error_free_hw:
-       ieee80211_free_hw(dev);
-error:
-       usb_put_dev(udev);
-       return err;
-}
-
-static void hal_halt(struct hw_data *pHwData)
-{
-       del_timer_sync(&pHwData->LEDTimer);
-       /* XXX: Wait for Timer DPC exit. */
-       msleep(100);
-       Wb35Rx_destroy(pHwData);
-       Wb35Tx_destroy(pHwData);
-       Wb35Reg_destroy(pHwData);
-}
-
-static void wb35_hw_halt(struct wbsoft_priv *adapter)
-{
-       /* Turn off Rx and Tx hardware ability */
-       hal_stop(&adapter->sHwData);
-       /* Waiting Irp completed */
-       msleep(100);
-
-       hal_halt(&adapter->sHwData);
-}
-
-static void wb35_disconnect(struct usb_interface *intf)
-{
-       struct ieee80211_hw *hw = usb_get_intfdata(intf);
-       struct wbsoft_priv *priv = hw->priv;
-
-       wb35_hw_halt(priv);
-
-       ieee80211_stop_queues(hw);
-       ieee80211_unregister_hw(hw);
-       ieee80211_free_hw(hw);
-
-       usb_set_intfdata(intf, NULL);
-       usb_put_dev(interface_to_usbdev(intf));
-}
-
-static struct usb_driver wb35_driver = {
-       .name           = "w35und",
-       .id_table       = wb35_table,
-       .probe          = wb35_probe,
-       .disconnect     = wb35_disconnect,
-};
-
-module_usb_driver(wb35_driver);
diff --git a/drivers/staging/wlags49_h2/Kconfig b/drivers/staging/wlags49_h2/Kconfig
deleted file mode 100644 (file)
index 3efcbf8..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-config WLAGS49_H2
-       tristate "Agere Systems HERMES II Wireless PC Card Model 0110"
-       depends on WLAN && PCMCIA
-       select WIRELESS_EXT
-       select WEXT_SPY
-       select WEXT_PRIV
-       ---help---
-       Driver for wireless cards using Agere's HERMES II chipset
-       which are identified with Manufacture ID: 0156,0003
-       The software is a modified version of wl_lkm_722_abg.tar.gz
-       from the Agere Systems website, addapted for Ubuntu 9.04.
diff --git a/drivers/staging/wlags49_h2/Makefile b/drivers/staging/wlags49_h2/Makefile
deleted file mode 100644 (file)
index 6eeb5d1..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-#
-# Makefile for wlags49_h2_cs.ko and wlags49_h25_cs.ko
-#
-# Default build for Hermes-II base cards (possibly identified with
-# "manfid: 0x0156, 0x0003" in "pccardctl ident" output), comment
-# -DHERMES25 below
-#
-# If you want to build for Hermes-II.5 base cards (possibly identified with
-# "manfid: 0x0156, 0x0004" in "pccardctl ident" output), uncomment
-# -DHERMES25 below
-#
-#  If you want to build AP support (untested), comment out -DSTA_ONLY
-
-ccflags-y := -I$(KERNELDIR)/include
-ccflags-y += -I$(src) \
-               -DBUS_PCMCIA \
-               -DUSE_WEXT \
-               -DSTA_ONLY \
-               -DWVLAN_49 \
-#              -DHERMES25 \
-#              -DDBG \
-#              -DDBG_LVL=5 \
-#              -DUSE_UIL \
-#              -DUSE_PROFILE \
-
-ifeq ($(findstring HERMES25,$(ccflags-y)),)
-WLNAME := wlags49_h2_cs
-$(WLNAME)-y := sta_h2.o
-ifeq ($(findstring STA_ONLY,$(ccflags-y)),)
-$(WLNAME)-y += ap_h2.o
-endif
-else
-WLNAME=wlags49_h25_cs
-$(WLNAME)-y := sta_h25.o
-ifeq ($(findstring STA_ONLY,$(ccflags-y)),)
-$(WLNAME)-y += ap_h25.o
-endif
-endif
-
-
-obj-m          += $(WLNAME).o
-
-$(WLNAME)-y += wl_profile.o \
-               wl_wext.o \
-               wl_priv.o \
-               wl_main.o \
-               wl_enc.o \
-               wl_util.o \
-               wl_netdev.o \
-               wl_cs.o \
-               mmd.o \
-               hcf.o \
-               dhf.o
diff --git a/drivers/staging/wlags49_h2/README.ubuntu b/drivers/staging/wlags49_h2/README.ubuntu
deleted file mode 100644 (file)
index bfad7dc..0000000
+++ /dev/null
@@ -1,180 +0,0 @@
-=======================================================================
-WLAN driver for cards using the HERMES II and HERMES II.5 chipset
-
-HERMES II Card
-
-PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110"
-             Manufacture ID: 0156,0003
-
-HERMES II.5 Card
-
-PCMCIA Info: "Linksys" "WCF54G_Wireless-G_CompactFlash_Card"
-             Manufacture ID: 0156,0004
-
-Based on Agere Systems Linux LKM Wireless Driver Source Code,
-Version 7.22; complies with Open Source BSD License.
-=======================================================================
-
-DESCRIPTION
-
-The software is a modified version of wl_lkm_722_abg.tar.gz from the
-Agere Systems website, addapted for Ubuntu 9.04.
-
-Modified for kernel 2.6 by Henk de Groot <pe1dnn@amsat.org>
-Based on 7.18 version by Andrey Borzenkov <arvidjaar@mail.ru> $Revision: 39 $
-
-INSTALLATION
-
-Unpack in a new directory.
-
-Open a terminal screen.
-
-Change directory to the source directory
-
-Type command
-
-make
-
-and wait until it is finshed. Now you have build the module
-wlags49_h2_cs; this module is meant for a HERMES II card.
-
-The driver is tested with a Thomson SpeedTouch 110 Wireless PC Card.
-For the test Station mode was used with WEP. The driver is supposed
-to support WAP and as accesspoint that is NOT tested.
-
-If you have a card using the HERMES II.5 chip you have to make
-changes to the Makefile and uncomment -DHERMES25. This will build
-driver wlags49_h25_cs.
-
-Note: You can determine the type with command "pccardctrl info"
-        MANIFID: 0156,0002 = HERMES - not supported by this driver
-        MANIFID: 0156,0003 = HERMES II   (Wireless B)
-        MANIFID: 0156,0004 = HERMES II.5 (Wireless B/G)
-
-After successful compile type command
-
-sudo make install
-
-to install the module.
-
-Now the card should be recognized. It should be able to configure
-and use the card with NetworkManager. Wpa_supplicant also works, as does
-manual configuration using the iwconfig/iwlist programs.
-
-Note: I only tested Station mode with WEP but if I didn't break anything
-WPA and AP mode should also work; note however that WPA was experimental
-in the original Agere driver!
-
-Note: to compile as AP change the makefile and remove the line
--DSTA_ONLY \
-
-(or comment it, but in that case make sure to move it after all the
- flags you want to use)
-
-CHANGES
-
-The HCF functions to control the card are virtually unchanged, the only
-changes are meant to fix compiler warnings. The only real change is in
-HCF_WAIT_WHILE which now has a udelay(2) added to give a small delay.
-
-The linux driver files (wl_xxxx.c) are changed in the following ways:
-- Addaptations of Andrey Borzenkov applied to 7.22 source
-- Alterations to avoid most HCF_ASSERTs
--- Switching interrupts off and on in the HCF
--- Bugfixes, things that were apparently wrong like reporting link status
-   change which checked a variable that was not changed in HCF anymore.
--- Used on WEP but setting keys via SIOCSIWENCODEEXT was not supported
--- Recovery actions added
-
-The major problem was the order in which calls can be made. The original
-looks like a traditional UNIX driver. To call an "ioctl" function you
-have to "open" the device first to get a handle and after "close" no
-"ioctl" function can be called anymore. With the 2.6 driver this all
-changed; the former ioctl functions are now called before "open" and
-after "close", which was not expected. One of the problems was enable/
-disable of interrupts in the HCF. Interrupt handling starts at "open"
-so if a former "ioctl" routine is called before "open" or after "close"
-then nothing should be done with interrupt switching in the HCF. Once
-this was solved most HCF_ASSERTS went away.
-
-The last point, recovery actions added, needs some clarification.
-Starting the card works most of the time, but unfortunately not always.
-At a few times recovery code was added; when the card starts to
-misbehave or the communication between the HCF and the card is
-out of sync and the HCF enters DEFUNCT mode everything is reset and
-reinitialized. Note, hcf.c contains a lot of documentation. It takes
-some time but slowly some things become clear. Also some unresolved
-issues are mentioned in hcf.c, so there are still unknown bugs.
-
-The card problems are almost in all cases when starting up and before
-the first association with an AP, once the card is in operation it
-seems to stay that way; when debugging no HCF_ASSERTS appear anymore.
-Note: some HCF_ASSERTS still appear, in a number of cases it is a real
-error, for example at card removal the missing card is detected.
-
-LICENSE
-
-The Agere Systems license applies. This is why I include the original
-README.wlags49. The instructions in that file are bogus now. I also
-include the man page. Even though setting parameters on the module
-does not work anymore but it provides some information about all the
-settings.
-
-I have no personal contact with Agere, but others have. Agere
-agreed to make their software available under the BSD license.
-This driver is based on the 7.22 version.
-
-The following was mailed by Agere to Andrey Borzenkov about this:
-
-    --- Begin Message ---
-
-        * From: TJ <tj@xxxxxxxxxxx>
-        * Date: Mon, 05 Feb 2007 19:28:59 +0000
-
-    Hi Andrey,
-
-    I've got some good news for you/us/the world of Hermes :)
-
-    I got a reply from the legal representative at Agere confirming that
-    their source-code is BSD licensed, and I've included the contents of the
-    email here.
-
-    I hope this re-assures you so that your excellent work on the drivers
-    can be made widely available for other hackers to work with.
-
-    Regards,
-
-    TJ.
-
-    ---------
-    On Mon, 2007-02-05 at 13:54 -0500, Pathare, Viren M (Viren) wrote:
-
-
-    "I would like to confirm that the two drivers; Linux LKM Wireless Driver
-    Source Code, Version 7.18 and Linux LKM Wireless Driver Source Code,
-    Version 7.22 comply with Open Source BSD License. Therefore the source
-    code can be distributed in unmodified or modified form consistent with
-    the terms of the license.
-
-    The Linux driver architecture was based on two modules, the MSF (Module
-    specific functions) and the HCF (Hardware Control Functions). Included
-    in the HCF is run-time firmware (binary format) which is downloaded into
-    the RAM of the Hermes 1/2/2.5 WMAC.
-
-    This hex coded firmware is not based on any open source software and
-    hence it is not subject to any Open Source License. The firmware was
-    developed by Agere and runs on the DISC processor embedded within the
-    Hermes 1/2/2.5 Wireless MAC devices.
-
-    Hope this helps.
-
-    Sincerely,
-
-    Viren Pathare
-    Intellectual Property Licensing Manager
-    Agere"
-
-
-
-    --- End Message ---
-
diff --git a/drivers/staging/wlags49_h2/README.wlags49 b/drivers/staging/wlags49_h2/README.wlags49
deleted file mode 100644 (file)
index f65acd6..0000000
+++ /dev/null
@@ -1,641 +0,0 @@
-==============================================================================
-Agere Systems Inc.                                                   July 2004
-Readme for Linux Driver Source for Wavelan                   Version: 7.22-abg
-==============================================================================
-
-This text file includes update information, installation instructions,
-limitations to the current version of the product, and suggestions to solve
-known issues or problems.
-
-
-TABLE OF CONTENTS.
-
-1.  DESCRIPTION
-2.  SYSTEM REQUIREMENTS
-3.  NEW IN THIS RELEASE
-4.  INSTALLATION NOTES
-5.  TECHNICAL CONSTRAINTS
-6.  KNOWN ISSUES
-7.  TECHNICAL SUPPORT
-
-------------------------------------------------------------------------------
-1.  DESCRIPTION
-
-    With this package, you can build and install a Wireless driver for a
-    specific Linux kernel.
-
-    The driver in this package supports the network interface cards based on:
-     - WL60010, a.k.a. Hermes-II
-     - WL60040, a.k.a. Hermes-II.5
-
-    Although derived from the Hermes-I/II Linux driver, this release ONLY
-    Supports Hermes-II/II.5 chipsets.  Hermes-I is no longer supported.
-
-    The software is distributed in a compressed source file archive:
-     - wl_lkm_7_22_abg.tar.gz
-
-    Because this release supports more than one Hermes CPU and bus
-    architecture, a naming convention is used for the resulting binaries that
-    can be built from this source code. Driver binaries are named as follows:
-
-    wlags49_<hermes_type>_<bus_arch>.o
-
-    where 'wlags49' denotes an Agere WaveLan Linux build,
-
-    <hermes_type> is: 'h2' for Hermes-II, 'h25' for Hermes-II.5
-
-    <bus_arch> is: 'cs' for Card Services (PCMCIA, Compact Flash), PCI for
-    PCI or MiniPCI.
-
-    For example, a driver built for Hermes-II Card Services (PCMCIA/Compact
-    Flash) is named wlags49_h2_cs.o, whereas a driver built for Hermes-II
-    MiniPCI is named wlags49_h2_pci.o.
-    The following software is included with this distribution:
-
-    General information:
-    * README.wlags49              This file
-    * LICENSE.wlags49             License
-    * wlags49.mk                  Top level Makefile
-    * Build                       Script to build driver
-    * Install                     Script to install driver
-
-    Driver source:
-    * wireless/                   MSF source
-    * hcf/                        HCF and F/W source
-    * wireless/wlags49_cs.mk      Driver Makefile, PC Card
-    * wireless/wlags49_pci.mk     Driver Makefile, PCI
-    * include/hcf/debug.h         Driver debug support
-    * include/hcf/hcfcfg.h        Header to configure HCF
-    * include/wireless/*.h        Driver source headers
-
-    Driver online manual page:
-    * man/wlags49.4               Driver manual page
-
-    PCMCIA configuration update:
-    * etc/wlags49.conf            Add-on config file
-    * etc/wlags49.mk              config update Makefile
-    * etc/wlags49.patch           config update patch file
-
-    The driver is build up of 2 modules:
-     - a higher module called Module Specific Functions (MSF), which contains
-       the functions of the driver that are network driver interface and
-       Operating System specific.
-     - a lower module called Hardware Control Functions (HCF), which contains
-       the functions to interface to the Network Interface Card (NIC).  The HCF
-       provides for all WaveLAN NIC types one standard interface to the MSF.
-       This I/F is called the Wireless Connection Interface (WCI) and is the
-       subject of a separate document (025726).
-
-    The HCF directory contains firmware images to allow the card to operate in
-    either station (STA) or Access Point (AP) mode. In the build process, the
-    files fw_h2.c and fw_h25.c are used for Hermes-II and Hermes-II.5
-    respectively. The firmware images in this release are identified as:
-        - HII Station F/W:      fw_h2.c.sta
-        - HII.5 Station F/W:    fw_h25.c.sta
-        - HII AccesPoint F/W:   fw_h2.c.ap
-        - HII.5 AccesPoint F/W: fw_h25.c.ap
-       To build a STA or AP mode driver, the suffix .sta or .ap must be removed.
-       The files as distributed by this release build STA drivers by default.
-
-------------------------------------------------------------------------------
-2.  SYSTEM REQUIREMENTS
-
-2.1 Operating System
-
-    This software can be compiled and installed with Linux kernel versions
-    2.4.x. Although this driver should compile for other CPUs as well, as of
-    the date of this release, no CPU architectures other than x86 have been
-    verified.
-
-    wl_lkm_7_22_abg is tested with the following Linux Distributions:
-    * Red Hat version 9.0
-    * Suse    version 9.0
-
-    If you're building for PC Card or Compact Flash, you need the Card Services
-    from David Hinds.
-
-    wl_lkm_7_22_abg is tested with:
-    * pcmcia-cs-3.2.7.tar.gz
-
-2.2 Free Disk Space
-
-    To compile the software you need to have the full set of Linux kernel
-    source files installed, as well as a sane build environment which includes
-    all tools necessary for compiling and linking code. Depending on the exact
-    version of the kernel, you need approximately 150 MB of free disk space.
-    Once compiled, the driver uses about 150-200 KB.  Please note, this size is
-    approximate and can vary depending on which version of the driver is built.
-    In addition, adding debug tracing support increases this size.
-
-------------------------------------------------------------------------------
-3.  NEW IN THIS RELEASE
-
-Version 7.22 abg - July 28, 2004
-
-------------------------------------------------------------------------------
-4.  INSTALLATION NOTES
-
-    The driver files for the Linux driver are not "ready" for direct
-    installation onto any Linux computer.  To build and install the driver you
-    need some expertise on the Linux operating system in general and the type
-    and version installed of the kernel installed on your computer.  With this
-    knowledge you can use the driver source files provided to build your own
-    Linux driver for your specific computer and kernel.
-
-4.1 Before you start
-
-    1) Determine the type and version of the Linux kernel of your computer and
-    check whether it meets the system requirements listed in section 2 of this
-    README.
-
-    2) If you're building for PC Card or Compact Flash, read the Linux
-    PCMCIA-HOWTO by David Hinds. This document is probably provided on the
-    CD-ROM of your Linux distribution. You can download the latest version
-    from:
-
-        http://pcmcia-cs.sourceforge.net
-
-   Please read the section titled "Prerequisites and kernel setup" of the
-   PCMCIA-HOWTO.
-
-4.2 Build the driver for PC Card / Compact Flash
-
-    1) Obtain a copy of the Linux PCMCIA package from a CD-ROM of your Linux
-    distribution or download the latest version.
-    For your convenience, the Agere Systems Wireless CD-ROM contains a copy of
-    the PCMCIA package in sub-directory: Xtras/Linux/PCMCIA
-
-    2) To unpack the Linux PCMCIA package, copy it to the current working
-    directory and type:
-       % tar xzvf pcmcia-cs-x.y.z.tar.gz
-       % mv pcmcia-cs-x.y.z pcmcia-cs
-
-    Note: If you use the archive supplied on the CDROM, use archive name
-    "pc3_2_1.tgz" instead of "pcmcia-cs-3.2.7.tar.gz".
-
-    Note: even though PCMCIA code exists in the kernel source tree, the PCMCIA
-    Card Services package needs to be unpacked locally to build drivers based
-    on it.
-
-    3) Extract the wlags49 distribution archive on top of the Linux PCMCIA
-    package.
-       % cd pcmcia-cs
-       % tar xzvf ../wl_lkm_7_22_abg.tar.gz
-
-    4) To build and install the driver, follow the procedure below:
-       % ./Configure
-
-    Answer the presented questions. Usually the default answers are OK and
-    pressing "Enter" is enough.
-    On newer RedHat systems, however, you should specify "/usr/src/linux-2.4"
-    as the Linux source directory instead of the default "/usr/src/linux".
-
-    For more detailed information on configuration, building and installing,
-    see the PCMCIA-HOWTO.
-
-    To build the default drivers, which support Hermes-II in station mode, run
-    the Build script:
-       % ./Build
-
-    This script determines whether your system uses in-kernel PCMCIA and either
-    builds the full PCMCIA package or just the driver.
-
-    Before installing the driver with the Install script, you must become
-    'root':
-       % su
-       ..
-       % ./Install
-
-    This script determines whether your system uses in-kernel PCMCIA and either
-    installs the full PCMCIA package or just the driver.
-
-    5) If it becomes necessary to clean the build, issue the following
-    commands:
-       % make clean
-       % make -C lib clean
-
-4.3 Build the driver for PCI
-
-    1) Extract the wlags49 to the current working directory.
-       % tar xzvf wl_lkm_7_22.tar.gz
-
-    Note: there is no need to unpack the driver source into a PCMCIA build
-    directory.
-
-    2) To build the PCI driver:
-       % make -f wlags49.mk wlags49_h2_pci
-       or
-       % make -f wlags49.mk wlags49_h25_pci
-
-    3) Install the driver.
-       % insmod ./wireless/wlags49_h25.o
-
-    4) If it becomes necessary to clean the build.
-       % make -f wlags49.mk pci_clean
-
-4.4 Configure your Wireless PC Card
-
-    There are 3 ways to configure the driver
-    - module parameters (/etc/pcmcia/config.opts)
-    - wireless extension (/etc/pcmcia/wireless.opts)
-    - Agere configuration file (/etc/agere/iwconfig-eth#)
-
-
-4.4.1 Configure through /etc/pcmcia/config.opts
-
-    To use this method, make sure that /etc/pcmcia/wireless.opts file is either
-    absent or contains blank parameter values as shown below.
-
-    *,*,*,00:60:1D:*|*,*,*,00:02:2D:*)
-        INFO=""
-        ESSID=""
-        MODE=""
-        KEY=""
-    ;;
-
-    1) To configure the Wireless PC Card, please refer to:
-       * The online manual page (wlags49.4)
-         % man wlags49
-       * The network adapter sections of the PCMCIA documentation.
-         % more PCMCIA-HOWTO
-
-    2) Use an editor to configure the module parameters:
-       # vi /etc/pcmcia/config.opts
-
-       a) To connect your computer to a wireless infrastructure that includes
-       access points such as the AP-1000 or AP-500, you need to identify the
-       network name of the wireless infrastructure.
-
-       For example if your infrastructure uses the network name "My Network",
-       edit the config.opts file to include the following:
-
-       module "<driver_name>" opts "network_name=My\ Network"
-
-       Notice that the space character needs to be escaped with a backslash.
-
-       b) To connect your computer to a Residential Gateway RG-1000, you need
-       to know the RG ID (=network_name) and the encryption key.  You can find
-       the RG ID on a small label on the rear of the unit.
-
-       For example if your RG-1000 has ID 225ccf and you did not change the
-       encryption key yet, edit the config.opts file to include the following:
-
-       module "<driver_name>" opts "network_name=\"225ccf\" key_1=\"25ccf\"
-       enable_encryption=Y"
-
-       If you changed your encryption key, you should specify this key as key_1
-       on the parameter line.
-
-       c) To connect your computer to a peer-to-peer network, in an environment
-       without access points, the IBSS mode is recommended.
-
-       For example to connect to a peer-to-peer network called "My Network",
-       enter the following in the config.opts file:
-
-       module "<driver_name>" opts "create_ibss=Y network_name=My\ Network"
-
-       d) Optionally you can also include a "Station Name" value that can be
-       used to indentify your computer on the wireless network.
-
-       For example if you wish to name your computer "Wave1" when connecting it
-       to a wireless infrastructure,  edit the config.opts file to include the
-       following:
-
-       module "<driver_name>" opts "network_name=Ocean station_name=Wave1"
-
-       e) To connect your computer to an Ad-Hoc workgroup of wireless
-       computers, enter the following in the config.opts file:
-
-       module "<driver_name>" opts "port_type=3"
-
-       Note that the "Ad-Hoc Demo Mode" is not the recommended mode for a
-       peer-to-peer network.  The configuration of this  non-interoperable mode
-       is only explained here for special applications (e.g. research, or
-       compatibility with other / previous WaveLAN/IEEE products).
-
-       The IBSS mode described in c) is the preferred and interoperable mode
-       for creating a peer-to-peer network.
-
-    3) Use an editor to modify the network options for your adapter.
-       # vi /etc/pcmcia/network.opts
-
-       The parameters need to be correct for the connected network. Check with
-       your system administrator for the correct network information.  Refer to
-       the PCMCIA-HOWTO for more configuration information.
-
-       For example:
-            *,*,*,*)
-                IF_PORT=""
-                BOOTP="n"
-                IPADDR="10.0.0.5"
-                NETMASK="255.255.255.0"
-                NETWORK="10.0.0.0"
-                BROADCAST="10.0.0.255"
-                GATEWAY="10.0.0.1"
-                DOMAIN="domain.org"
-                DNS_1="dns1.domain.org"
-                ;;
-
-       RedHat and Suse do not use the network.opts to configure the driver.
-       Instead RedHat uses a GUI-based tool called 'neat' ('net.cfg' in older
-       versions) and SuSE Linux uses 'YaST'. These tools creates scripts, like
-       ifcfg-eth0, in the directory /etc/sysconfig/network-scripts. Using the
-       default GNOME menu, you can start netcfg from: Programs->System->Network
-       Configuration.
-
-    4) Restart the PCMCIA services.
-       # /etc/rc.d/rc.pcmcia restart
-         or
-       # /etc/rc.d/init.d/pcmcia restart
-
-
-    For a more detailed description about the various configuration options and
-    definitions, please consult the Wireless documentation.
-
-4.4.2 Configure through /etc/pcmcia/wireless.opts
-
-    This driver has support for the "Wireless Extensions".  This interface
-    allows the "Wireless Tools" to get statistics from the driver and allows to
-    change the configuration of the driver on the fly.
-
-    The latest versions of the PCMCIA package contain scripts that use the
-    wireless extension to configure the driver as an alternative to the
-    configuration through module parameters as described in section 4.4.1.
-    Read the /etc/pcmcia/wireless.opts file for the theory of operation.  When
-    the driver is configured, go to section 4.4.1 step 3 to configure the
-    network parameters.
-
-    For more information, refer to the following WEB pages:
-    http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Linux.Wireless.Extensions.html
-    http://www.hpl.hp.com/personal/Jean_Tourrilhes/Linux/Tools.html
-
-4.4.3 Configure through /etc/agere/iwconfig-eth#
-
-    In addition to using either the module options or the wireless extensions
-    methods to configure a wireless device, this version of the software also
-    supports an Agere specific implementation. This was done because:
-    * Module options configures multiple devices the same.
-    * Wireless extensions parameters do not cover all of the available options
-      in the driver.
-
-    For each wireless ethernet device (identified by eth<n>, where n is a
-    positive integer), a file /etc/agere/iwconfig-eth<n> can be created which
-    contains configuration information for a wireless device. For example, the
-    file /etc/agere/iwconfig-eth1 is the config file for eth1. This file should
-    contain Key/Value pairs in the format:
-
-    <Key>=<Value>
-
-    where <Key> is the parameter to configure and <Value> is the value to
-    assign it. For example, if the config file /etc/agere/iwconfig-eth1
-    described above contains the following:
-
-    DesiredSSID=some_network
-    EnableEncryption=Y
-    Key1=net01
-    TxKey=1
-
-    this configures eth1 to associate to the ESSID 'some_network' with
-    encryption on, where the the first encryption key is 'net01' and the key to
-    use for encryption is Key 1.
-
-    Note that this only works on Agere hardware which uses this driver. For
-    other wireless drivers, or non-wireless devices, this file can be present,
-    but has no effect.
-
-    Please refer to the man page for more information on this configuration
-    file and the parameters that can be set.
-
-
-4.5 Configuring your Wireless PCI card
-
-    Note that the above method of configuring the card using
-    /etc/pcmcia/config.opts is only valid for PCMCIA/CF cards. For [mini]PCI
-    and CardBus cards, refer to your system's documentation on modules.conf to
-    load the driver with the proper options for a given wireless ethernet
-    interface. In addition, network configuration tools like 'netcfg', 'neat',
-    or 'YaST' (see Section 4.4.1, Step 3) can be used to configure the miniPCI
-    card. Lastly, the Agere configuration file described in Section 4.4.3 may
-    also be used for [mini]PCI and CardBus devices.
-
-4.6 Troubleshooting
-
-    When the Wireless PC Card is inserted, the card manager emit beeps in
-    different tones to indicate success or failure of particular configuration
-    steps.
-      a) Two high beeps
-         - The card was identified and configured successfully.
-      b) One high beep followed by a low beep
-         - The card was identified, but could not be configured.
-         - Examine the system log (dmesg) for PCMCIA error or warning messages.
-      c) One low beep
-         - The card could not be identified.
-         - Execute "cardctl ident" to display the adapter PnP information.
-           Verify the PnP information matches an entry in the PCMCIA
-           configuration file (/etc/pcmcia/config).
-         - Examine the system log (dmesg) for PCMCIA error or warning messages.
-
-    The Wireless PC Card has two LEDs that indicate the state of the adapter
-    and network.
-      * Power LED (toward the middle of the adapter)
-       - This LED indicates power has been applied, and the card is
-         functional. In normal operation mode with Card Power Management
-         disabled, it is steady-on. With Card Power Management enabled, it
-         blinks rapidly (several times per second).
-      * Transmit/Receive LED (closer to the edge of the adapter)
-        - This LED flashes when it detects transmit or receive packets.
-
-      * Both LEDs blink at the same time every 10 seconds.
-       - The adapter was unable to make contact with the named wireless
-         network. Verify the network_name, in the config.opts file matches the
-         network name of the access point.
-      * LEDs indicate normal operation with the Power LED
-       steady-on or blinking rapidly and Transmit/Receive LED flashing, but no
-       traffic.
-       - If the network is operating in normal mode (ie.  port_type = 0 or not
-         specified), and a network_name has been specified, verify the
-         workstation network parameters (ifconfig, route, etc.) are correct
-         for the wireless network.
-       - If the network is operating in Ad-Hoc (peer-to-peer) mode (ie.
-         port_type = 3), the adapter needs another workstation/adapter to
-         communicate with.  Verify the network parameters on both of the
-         workstations (ifconfig, route, etc.) are correct.
-
-    Refer to the online manual page for additional configuration, feature and
-    support information.
-       % man wlags49
-         or
-       % man 4 wlags49
-         or
-       % nroff -man wlags49.4 | more
-
-4.7 Identifying the software
-
-    This section explains how to identify the version of this software once it
-    is unpacked or installed.
-
-    The Linux Driver Source/Library distribution consist of two main
-    components, the driver source and the HCF module.
-
-    * To quickly identify the version of the source, type:
-      % grep DRV.*VERSION include/wireless/wl_version.h
-      #define DRV_MAJOR_VERSION   7
-      #define DRV_MINOR_VERSION   22
-
-    * To identify the revision of the HCF library contained in the driver,
-      type:
-      % grep HCF.Revision hcf/hcf.c
-      #define HCF_VERSION  TEXT( "HCF$Revision: 1.8 $" )
-
-    To identify a compiled wlags49 driver, go to the directory where the driver
-    is located. Card Services drivers (wlags49_h2_cs.o and wlags49_h25_cs.o)
-    are located in:
-    /lib/modules/<kernel-version>/pcmcia
-
-    PCI drivers (wlags49_h2.o) are located in:
-    /lib/modules/<kernel-version>/kernel/drivers/net
-
-    * To retrieve the version of the source used to compile the driver, type:
-      % strings <driver_name>.o | grep Agere
-      <driver_name> v7.22-abg-Beta for PCMCIA
-      <driver_name> v7.22-abg-Beta for PCI
-
-    * Likewise, to retrieve the revision of the HCF used to compile the driver,
-      type:
-      % strings <driver_name>.o | grep Revision
-      HCF$Revision: 5.15
-
-    At startup the wlags49 driver reports its version in the system log file
-    (/var/log/messages).
-
-------------------------------------------------------------------------------
-5.  TECHNICAL CONSTRAINTS
-
-    At the time of release of this software, the following constraints are
-    identified:
-
-5.1 Using the ISA adapter
-
-    Description: To allow operation in desktop computers Agere also provides an
-    optional ISA bus to PC Card adapter (also referred to as "swapbox").
-
-    This ISA Adapter can be configured for two different I/O Address values:
-      * 3E2 (factory-set default)
-      * 3E0
-
-    Impact: By default the i82365 module of the Linux pcmcia package only
-    probes at 3E0.
-
-    Actions:
-    1) Read the manual page on the probing of the i82365 module, by typing the
-    command:
-        man i82365
-
-    2) Apply one of the two following options:
-       a) Change the I/O address strapping of the ISA adapter by replacing the
-          jumper on the ISA adapter.  The correct jumper setting is pictured in
-          the electronic "Wireless ISA Adapter, Getting Started Guide" provided
-          on the Wireless Software CD-ROM. This guide is provided in Adobe's
-          Acrobat PDF format.
-
-       b) Alternatively, you can load the i82365 module with the
-          "extra_sockets" parameter set to 1.
-
-          On a RedHat 5.x thru 7.x, system, put this in the file
-          "/etc/sysconfig/pcmcia":
-             PCMCIA=yes
-             PCIC=i82365
-             PCIC_OPTS="extra_sockets=1"
-             CORE_OPTS=
-             CARDMGR_OPTS=
-
-          For other Linux distributions, you are advised to consult the
-          "PCMCIA-HOWTO" notes for information about changing the I/O Address
-          probing.
-
-5.2 Using the PCI Adapter
-
-    Description: To allow operation in desktop computers Agere also provides an
-    optional PCI bus to PC Card adapter (also referred to as "swapbox").
-
-    For correct interrupt assignment, the system should support PCIBIOS 2.2.
-    It is recommended to use PCMCIA package version 3.2.7 or higher.
-
-    The default configuration of the interrupt routing method of the PCI
-    Adapter's TI CardBus Controller is incorrect.
-
-    Actions:
-    1) Read the manual page on the "Options specific for TI CardBus
-    Controllers" of the i82365 module, by typing the command:
-        man i82365
-
-    2) Load the i82365 module with the "irq_mode" parameter set to 0.
-       On a RedHat 5.x thru 7.x system, put this in the file
-       "/etc/sysconfig/pcmcia":
-           PCMCIA=yes
-           PCIC=i82365
-           PCIC_OPTS="irq_mode=0"
-           CORE_OPTS=
-           CARDMGR_OPTS=
-
-   For the location of the PCMCIA scripts on other Linux distributions, you
-   are advised to consult the "PCMCIA-HOWTO", "Notes about specific Linux
-   distributions".
-
-------------------------------------------------------------------------------
-6.  KNOWN ISSUES
-
-    This is the current list of known issues for this release, and will be
-    addressed in the near future:
-
-    1. This driver release contains a version of Hermes-II.5 firmware which
-    REQUIRES calibrated cards. If there is no calibration data present in the
-    PDA of the hardware, the firmware does not operate.
-
-    2. WDS is not yet supported.
-
-    3. DMA is not yet supported.
-
-    4. WPA is not yet supported.
-
-    5. 32-bits I/O is not yet supported.
-
-    6. The current Build script also builds the PCI drivers.
-
-    7. The current Install script also copies the PCI drivers to the lib
-    directory.
-
-       8. If F/W files are required from outside this release, the entry points
-       inside these F/W files have to be renamed from "ap" and "station" to
-       "fw_image" and they have to be renamed to fw_h2.c and fw_h25.c for
-       Hermes-II and Hermes-II.5.
-
-------------------------------------------------------------------------------
-7.  TECHNICAL SUPPORT
-
-7.1 Finding Information
-
-    On the Agere Systems Web Site you can find the most recent device drivers,
-    software updates and user documentation.
-
-    World Wide Web:    http://www.agere.com
-
-7.2 Contact Technical Support
-
-    If you encounter problems when installing or using this product, or would
-    like information about our other "Wireless" products, please contact your
-    local Authorized "Wireless" Reseller or Agere Systems sales office.
-
-    Addresses and telephone numbers of the Agere Systems sales offices are
-    listed on our Agere Systems web site.
-
-    When contacting Technical Support, please use the Problem Report Form and
-    send it to us by Fax or E-Mail.  The Problem Report Form 'REPORT.TXT'
-    (Plain text format) is included on the disk. Alternatively, you can
-    download the Problem Report Form from the Agere Systems web site.
-
-    Include Product Name, Serial Number and software version number with each
-    request to help the Support Group helping you.
-
-==============================================================================
-                          END OF FILE
diff --git a/drivers/staging/wlags49_h2/TODO b/drivers/staging/wlags49_h2/TODO
deleted file mode 100644 (file)
index f1a4561..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-First of all, the best thing would be that this driver becomes obsolete by
-adding support for Hermes II and Hermes II.5 cards to the existing orinoco
-driver. The orinoco driver currently only supports Hermes I based cards.
-Since this will not happen by magic and has not happened until now this
-driver provides a stop-gap solution for these type of cards.
-
-Having said that, the following wishlist comes to mind to make the driver
-suitable as fully supported kernel driver. Feel free to expand/enhance the
-list.
-
-TODO:
-       - verify against a Hermes II.5 card
-       - verify with WPA encryption (both with H2 and H2.5 cards)
-       - sometimes the card does not initialize correctly, retry mechanisms
-         are built in to catch most cases but not all
-       - once the driver runs it is very stable, but I have the impression
-         that some of the critical sections take some time.
-       - the driver is split into a Hermes II and a Hermes II.5 part, it
-         would be nice to handle both with one module instead of two
-       - review by the wireless developer community
-       - verify the code against the coding standards for a proper linux
-         driver
-       - resolve license issues (?)
-
-DONE:
-       - verified against a Hermes II card (Thomson Speedtouch 110 PCMCIA
-         card)
-       - verified with WEP encryption
-
-Please send any patches or complaints about this driver to Greg
-Kroah-Hartman <greg@kroah.com> and Cc: Henk de Groot <pe1dnn@amsat.org>
-Don't bother the upstream wireless kernel developers about it, they
-want nothing to do with it.
diff --git a/drivers/staging/wlags49_h2/WARNING.txt b/drivers/staging/wlags49_h2/WARNING.txt
deleted file mode 100644 (file)
index 5d12973..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-These sources are shared with the wlags49_h25 driver. Some files are even
-exclusively used by that driver. Do not delete them here without looking
-at that other driver.
diff --git a/drivers/staging/wlags49_h2/ap_h2.c b/drivers/staging/wlags49_h2/ap_h2.c
deleted file mode 100644 (file)
index 3a08d42..0000000
+++ /dev/null
@@ -1,3337 +0,0 @@
-/*
- * File:       ap_h24.236
- *
- * Abstract:   This file contains memory image 'fw_image'.
- *
- * Contents:   Total size of the memory image: 51010 bytes.
- *             Total number of blocks: 4 blocks.
- *             Block  1 : load address 00000060, 326 bytes.
- *             Block  2 : load address 00000C16, 6424 bytes.
- *             Block  3 : load address 001E252E, 444 bytes.
- *             Block  4 : load address 001F4000, 43816 bytes.
- *
- * Identity:   component id: 32 (variant 2) version 2.36
- *
- * Compatibility:
- *             supplying interface 8 (variant 2) : 2 - 4
- *             acting on interface 1 (variant 4) : 6 - 7
- *             acting on interface 1 (variant 5) : 6 - 7
- *             acting on interface 1 (variant 6) : 6 - 7
- *             acting on interface 2 (variant 2) : 1 - 2
- *
- * Generated:  by g:\fw\fupu3.exe version 4.26
- *
- * Commandline:        g:\fw\fupu3.exe /f=4 /n=fw_image /i=t2023600.hex
- */
-
-
-#include "hcfcfg.h"                    /* to get hcf_16 etc defined as well as */
-                                       /* possible settings which inluence mdd.h or dhf.h */
-#include "mdd.h"                       /* to get COMP_ID_STA etc defined */
-#include "dhf.h"                       /* used to be "fhfmem.h", to get memblock,plugrecord, */
-
-static const hcf_8 fw_image_1_data[] = {
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x0D, 0x00, 0x00,
-        0x3A, 0x0C, 0x00, 0x00, 0x3A, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00,
-        0x0A, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0xEA, 0x00, 0x00, 0xFF, 0x07, 0x02, 0x00, 0x64, 0x00, 0x64, 0x00, 0x10, 0x27, 0x10, 0x27,
-        0x14, 0x00, 0xD0, 0x07, 0xD0, 0x07, 0x10, 0x27, 0x2F, 0x00, 0x32, 0x00, 0x32, 0x00, 0x05, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x10, 0x27, 0x05, 0x00, 0x00, 0x02, 0x00, 0x02, 0x13, 0x00, 0x0A, 0x00,
-        0x07, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x09, 0x2B, 0x09, 0x2B, 0x09,
-        0x03, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x00, 0x14, 0x01, 0x00, 0x40, 0x00, 0x32, 0x00, 0x32, 0x00,
-        0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
-};  /* fw_image_1_data */
-
-static const hcf_8 fw_image_2_data[] = {
-        0x9B, 0xA7, 0x00, 0x0A, 0x10, 0x01, 0x68, 0xA4, 0xB0, 0x01, 0x84, 0x01, 0x30, 0x33, 0x31, 0x33,
-        0x44, 0x44, 0x30, 0x33, 0x31, 0x33, 0x30, 0x33, 0x31, 0x33, 0x32, 0x33, 0x32, 0x33, 0x90, 0x00,
-        0x78, 0x04, 0xAE, 0xE4, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
-        0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC6, 0x84, 0xF8, 0x99, 0xEE,
-        0x8D, 0xF6, 0x0D, 0xFF, 0xBD, 0xD6, 0xB1, 0xDE, 0x54, 0x91, 0x50, 0x60, 0x03, 0x02, 0xA9, 0xCE,
-        0x7D, 0x56, 0x19, 0xE7, 0x62, 0xB5, 0xE6, 0x4D, 0x9A, 0xEC, 0x45, 0x8F, 0x9D, 0x1F, 0x40, 0x89,
-        0x87, 0xFA, 0x15, 0xEF, 0xEB, 0xB2, 0xC9, 0x8E, 0x0B, 0xFB, 0xEC, 0x41, 0x67, 0xB3, 0xFD, 0x5F,
-        0xEA, 0x45, 0xBF, 0x23, 0xF7, 0x53, 0x96, 0xE4, 0x5B, 0x9B, 0xC2, 0x75, 0x1C, 0xE1, 0xAE, 0x3D,
-        0x6A, 0x4C, 0x5A, 0x6C, 0x41, 0x7E, 0x02, 0xF5, 0x4F, 0x83, 0x5C, 0x68, 0xF4, 0x51, 0x34, 0xD1,
-        0x08, 0xF9, 0x93, 0xE2, 0x73, 0xAB, 0x53, 0x62, 0x3F, 0x2A, 0x0C, 0x08, 0x52, 0x95, 0x65, 0x46,
-        0x5E, 0x9D, 0x28, 0x30, 0xA1, 0x37, 0x0F, 0x0A, 0xB5, 0x2F, 0x09, 0x0E, 0x36, 0x24, 0x9B, 0x1B,
-        0x3D, 0xDF, 0x26, 0xCD, 0x69, 0x4E, 0xCD, 0x7F, 0x9F, 0xEA, 0x1B, 0x12, 0x9E, 0x1D, 0x74, 0x58,
-        0x2E, 0x34, 0x2D, 0x36, 0xB2, 0xDC, 0xEE, 0xB4, 0xFB, 0x5B, 0xF6, 0xA4, 0x4D, 0x76, 0x61, 0xB7,
-        0xCE, 0x7D, 0x7B, 0x52, 0x3E, 0xDD, 0x71, 0x5E, 0x97, 0x13, 0xF5, 0xA6, 0x68, 0xB9, 0x00, 0x00,
-        0x2C, 0xC1, 0x60, 0x40, 0x1F, 0xE3, 0xC8, 0x79, 0xED, 0xB6, 0xBE, 0xD4, 0x46, 0x8D, 0xD9, 0x67,
-        0x4B, 0x72, 0xDE, 0x94, 0xD4, 0x98, 0xE8, 0xB0, 0x4A, 0x85, 0x6B, 0xBB, 0x2A, 0xC5, 0xE5, 0x4F,
-        0x16, 0xED, 0xC5, 0x86, 0xD7, 0x9A, 0x55, 0x66, 0x94, 0x11, 0xCF, 0x8A, 0x10, 0xE9, 0x06, 0x04,
-        0x81, 0xFE, 0xF0, 0xA0, 0x44, 0x78, 0xBA, 0x25, 0xE3, 0x4B, 0xF3, 0xA2, 0xFE, 0x5D, 0xC0, 0x80,
-        0x8A, 0x05, 0xAD, 0x3F, 0xBC, 0x21, 0x48, 0x70, 0x04, 0xF1, 0xDF, 0x63, 0xC1, 0x77, 0x75, 0xAF,
-        0x63, 0x42, 0x30, 0x20, 0x1A, 0xE5, 0x0E, 0xFD, 0x6D, 0xBF, 0x4C, 0x81, 0x14, 0x18, 0x35, 0x26,
-        0x2F, 0xC3, 0xE1, 0xBE, 0xA2, 0x35, 0xCC, 0x88, 0x39, 0x2E, 0x57, 0x93, 0xF2, 0x55, 0x82, 0xFC,
-        0x47, 0x7A, 0xAC, 0xC8, 0xE7, 0xBA, 0x2B, 0x32, 0x95, 0xE6, 0xA0, 0xC0, 0x98, 0x19, 0xD1, 0x9E,
-        0x7F, 0xA3, 0x66, 0x44, 0x7E, 0x54, 0xAB, 0x3B, 0x83, 0x0B, 0xCA, 0x8C, 0x29, 0xC7, 0xD3, 0x6B,
-        0x3C, 0x28, 0x79, 0xA7, 0xE2, 0xBC, 0x1D, 0x16, 0x76, 0xAD, 0x3B, 0xDB, 0x56, 0x64, 0x4E, 0x74,
-        0x1E, 0x14, 0xDB, 0x92, 0x0A, 0x0C, 0x6C, 0x48, 0xE4, 0xB8, 0x5D, 0x9F, 0x6E, 0xBD, 0xEF, 0x43,
-        0xA6, 0xC4, 0xA8, 0x39, 0xA4, 0x31, 0x37, 0xD3, 0x8B, 0xF2, 0x32, 0xD5, 0x43, 0x8B, 0x59, 0x6E,
-        0xB7, 0xDA, 0x8C, 0x01, 0x64, 0xB1, 0xD2, 0x9C, 0xE0, 0x49, 0xB4, 0xD8, 0xFA, 0xAC, 0x07, 0xF3,
-        0x25, 0xCF, 0xAF, 0xCA, 0x8E, 0xF4, 0xE9, 0x47, 0x18, 0x10, 0xD5, 0x6F, 0x88, 0xF0, 0x6F, 0x4A,
-        0x72, 0x5C, 0x24, 0x38, 0xF1, 0x57, 0xC7, 0x73, 0x51, 0x97, 0x23, 0xCB, 0x7C, 0xA1, 0x9C, 0xE8,
-        0x21, 0x3E, 0xDD, 0x96, 0xDC, 0x61, 0x86, 0x0D, 0x85, 0x0F, 0x90, 0xE0, 0x42, 0x7C, 0xC4, 0x71,
-        0xAA, 0xCC, 0xD8, 0x90, 0x05, 0x06, 0x01, 0xF7, 0x12, 0x1C, 0xA3, 0xC2, 0x5F, 0x6A, 0xF9, 0xAE,
-        0xD0, 0x69, 0x91, 0x17, 0x58, 0x99, 0x27, 0x3A, 0xB9, 0x27, 0x38, 0xD9, 0x13, 0xEB, 0xB3, 0x2B,
-        0x33, 0x22, 0xBB, 0xD2, 0x70, 0xA9, 0x89, 0x07, 0xA7, 0x33, 0xB6, 0x2D, 0x22, 0x3C, 0x92, 0x15,
-        0x20, 0xC9, 0x49, 0x87, 0xFF, 0xAA, 0x78, 0x50, 0x7A, 0xA5, 0x8F, 0x03, 0xF8, 0x59, 0x80, 0x09,
-        0x17, 0x1A, 0xDA, 0x65, 0x31, 0xD7, 0xC6, 0x84, 0xB8, 0xD0, 0xC3, 0x82, 0xB0, 0x29, 0x77, 0x5A,
-        0x11, 0x1E, 0xCB, 0x7B, 0xFC, 0xA8, 0xD6, 0x6D, 0x3A, 0x2C, 0x00, 0x30, 0x00, 0x31, 0x00, 0x33,
-        0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x38, 0x00, 0x3A, 0x00, 0x3B,
-        0x00, 0x3C, 0x00, 0x3D, 0x00, 0x3E, 0x00, 0x3F, 0x00, 0x3F, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x02, 0x14,
-        0x05, 0x32, 0x0B, 0x37, 0x08, 0x50, 0x0B, 0x6E, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x3F, 0x00,
-        0x0C, 0x00, 0x30, 0x00, 0x03, 0x00, 0x0F, 0x00, 0x3E, 0x00, 0x3C, 0x00, 0x02, 0x00, 0x04, 0x00,
-        0x0A, 0x00, 0x0B, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x63, 0x00, 0x20, 0x00, 0x63, 0x00, 0x63, 0x00, 0x20, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x10,
-        0x9E, 0x10, 0x56, 0x10, 0x98, 0x10, 0x5C, 0x10, 0x92, 0x10, 0x62, 0x10, 0x8C, 0x10, 0x68, 0x10,
-        0x86, 0x10, 0x6E, 0x10, 0x80, 0x10, 0x74, 0x10, 0x7A, 0x10, 0x07, 0x01, 0x00, 0x00, 0x0A, 0x22,
-        0x00, 0x04, 0x08, 0x01, 0x00, 0x00, 0x0A, 0x26, 0x00, 0x04, 0x09, 0x01, 0x00, 0x00, 0x0A, 0x2A,
-        0x00, 0x04, 0x0A, 0x01, 0x00, 0x00, 0x0A, 0x2E, 0x00, 0x04, 0x0B, 0x01, 0x00, 0x00, 0x10, 0x24,
-        0x04, 0x04, 0x0C, 0x01, 0x00, 0x00, 0x10, 0x28, 0x04, 0x04, 0x0D, 0x01, 0x00, 0x00, 0x10, 0x2C,
-        0x04, 0x04, 0x0E, 0x01, 0x00, 0x00, 0x10, 0x30, 0x04, 0x04, 0x0F, 0x01, 0x00, 0x00, 0x16, 0x34,
-        0x08, 0x04, 0x10, 0x01, 0x00, 0x00, 0x16, 0x38, 0x08, 0x04, 0x11, 0x01, 0x00, 0x00, 0x16, 0x3C,
-        0x08, 0x04, 0x12, 0x01, 0x00, 0x00, 0x16, 0x40, 0x08, 0x04, 0x13, 0x01, 0x00, 0x00, 0x17, 0x64,
-        0x0C, 0x0B, 0x14, 0x01, 0x00, 0x00, 0x17, 0x68, 0x0C, 0x0B, 0x15, 0x01, 0x00, 0x00, 0x17, 0x6C,
-        0x0C, 0x0B, 0x16, 0x01, 0x00, 0x00, 0x17, 0x70, 0x0C, 0x0B, 0x17, 0x01, 0x00, 0x00, 0x17, 0x74,
-        0x0C, 0x0B, 0x18, 0x01, 0x00, 0x00, 0x17, 0x78, 0x0C, 0x0B, 0x19, 0x01, 0x00, 0x00, 0x17, 0x7C,
-        0x0C, 0x0B, 0x1A, 0x01, 0x00, 0x00, 0x17, 0x80, 0x0C, 0x0B, 0x1B, 0x01, 0x00, 0x00, 0x17, 0x84,
-        0x0C, 0x0B, 0x1C, 0x01, 0x00, 0x00, 0x17, 0x88, 0x0C, 0x0B, 0x1D, 0x01, 0x00, 0x00, 0x17, 0x8C,
-        0x0C, 0x0B, 0x1E, 0x01, 0x00, 0x00, 0x1D, 0x95, 0x17, 0x04, 0x1F, 0x01, 0x00, 0x00, 0x1D, 0x99,
-        0x17, 0x04, 0x20, 0x01, 0x00, 0x00, 0x1D, 0x9D, 0x17, 0x04, 0x21, 0x01, 0x00, 0x00, 0x1D, 0xA1,
-        0x17, 0x04, 0x22, 0x01, 0x00, 0x00, 0x0E, 0xA5, 0x00, 0x00, 0xC0, 0x10, 0xE0, 0x10, 0x00, 0x11,
-        0x20, 0x11, 0x78, 0x11, 0xC8, 0x10, 0xE8, 0x10, 0x08, 0x11, 0x28, 0x11, 0x80, 0x11, 0xD0, 0x10,
-        0xF0, 0x10, 0x10, 0x11, 0x30, 0x11, 0x88, 0x11, 0xD8, 0x10, 0xF8, 0x10, 0x18, 0x11, 0x38, 0x11,
-        0x90, 0x11, 0x40, 0x11, 0x48, 0x11, 0x50, 0x11, 0x58, 0x11, 0x60, 0x11, 0x68, 0x11, 0x70, 0x11,
-        0x98, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xD2, 0x14, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA1, 0xEB, 0xBA, 0xEB,
-        0xDF, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB,
-        0x57, 0xEB, 0x90, 0xF1, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0xD6, 0xED,
-        0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB,
-        0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x2F, 0xEE,
-        0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB,
-        0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0xA4, 0xED, 0xBE, 0xED,
-        0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x57, 0xEB, 0x7F, 0xF4, 0x19, 0xEC,
-        0x2C, 0xEC, 0xDC, 0xEC, 0xE0, 0xEC, 0x57, 0xEB, 0x57, 0xEB, 0x8F, 0xED, 0x84, 0xE3, 0x59, 0xE3,
-        0xD7, 0xE3, 0x28, 0xE4, 0x00, 0x00, 0x00, 0x00, 0xD0, 0xEB, 0xF6, 0xEB, 0x72, 0xF0, 0x72, 0xF0,
-        0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0x89, 0xEE, 0x45, 0xF0, 0x5A, 0x00, 0x02, 0x00, 0xF9, 0xFF,
-        0x89, 0xEE, 0x9F, 0xEE, 0xCC, 0x00, 0x02, 0x00, 0xF7, 0xFF, 0x89, 0xEE, 0x9F, 0xEE, 0xB6, 0x1F,
-        0x06, 0x00, 0xF0, 0xFF, 0x89, 0xEE, 0x73, 0xEE, 0x00, 0x00, 0x00, 0x02, 0xF6, 0xFF, 0x89, 0xEE,
-        0x9F, 0xEE, 0x6C, 0x00, 0x02, 0x00, 0xF4, 0xFF, 0x89, 0xEE, 0x9F, 0xEE, 0x6A, 0x01, 0x02, 0x00,
-        0xF5, 0xFF, 0x89, 0xEE, 0x4E, 0xF0, 0xA8, 0x1F, 0x02, 0x00, 0xE0, 0xFF, 0x89, 0xEE, 0x9F, 0xEE,
-        0xEE, 0x21, 0x02, 0x00, 0xE1, 0xFF, 0x89, 0xEE, 0x9F, 0xEE, 0xF0, 0x21, 0x02, 0x00, 0xE2, 0xFF,
-        0x89, 0xEE, 0x9F, 0xEE, 0xF2, 0x21, 0x02, 0x00, 0xE3, 0xFF, 0x89, 0xEE, 0x9F, 0xEE, 0xEA, 0x21,
-        0x02, 0x00, 0x03, 0xFC, 0x89, 0xEE, 0xE5, 0xEF, 0x7C, 0x21, 0x02, 0x00, 0x04, 0xFC, 0x89, 0xEE,
-        0x99, 0xEE, 0xBE, 0x1F, 0x22, 0x00, 0x06, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0xA6, 0x1F, 0x02, 0x00,
-        0x07, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x02, 0x20, 0x02, 0x00, 0x0E, 0xFC, 0x89, 0xEE, 0xF7, 0xEF,
-        0x0C, 0x20, 0x22, 0x00, 0xB1, 0xFC, 0x89, 0xEE, 0x58, 0xF2, 0x2C, 0x21, 0x02, 0x00, 0x20, 0xFC,
-        0x89, 0xEE, 0x9F, 0xEE, 0x32, 0x20, 0x02, 0x00, 0x25, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x3C, 0x20,
-        0x02, 0x00, 0x26, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x3E, 0x20, 0x02, 0x00, 0x27, 0xFC, 0x89, 0xEE,
-        0x9F, 0xEE, 0x40, 0x20, 0x02, 0x00, 0xB2, 0xFC, 0x89, 0xEE, 0x99, 0xEE, 0x50, 0x21, 0x22, 0x00,
-        0xC1, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x98, 0x21, 0x20, 0x00, 0xB0, 0xFC, 0x69, 0xEE, 0x5D, 0xF2,
-        0x00, 0x00, 0x00, 0x00, 0xC4, 0xFC, 0x69, 0xEE, 0x68, 0xF0, 0x00, 0x00, 0x08, 0x00, 0xC8, 0xFC,
-        0x69, 0xEE, 0x63, 0xF0, 0x00, 0x00, 0x08, 0x00, 0xB4, 0xFC, 0x69, 0xEE, 0x9B, 0xF2, 0x00, 0x00,
-        0x00, 0x00, 0xB6, 0xFC, 0x69, 0xEE, 0x4E, 0xF3, 0x00, 0x00, 0x00, 0x00, 0xB7, 0xFC, 0x69, 0xEE,
-        0x90, 0xF3, 0x00, 0x00, 0x00, 0x00, 0xB8, 0xFC, 0x69, 0xEE, 0xED, 0xF3, 0x00, 0x00, 0x00, 0x00,
-        0xB5, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0xE6, 0x21, 0x02, 0x00, 0xB9, 0xFC, 0x89, 0xEE, 0x9F, 0xEE,
-        0xE8, 0x21, 0x02, 0x00, 0x90, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0xEC, 0x21, 0x02, 0x00, 0x23, 0xFC,
-        0x89, 0xEE, 0x9F, 0xEE, 0x38, 0x20, 0x02, 0x00, 0x29, 0xFC, 0x48, 0xEF, 0xF5, 0xEE, 0x00, 0x00,
-        0x00, 0x00, 0xC2, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x74, 0x21, 0x02, 0x00, 0x32, 0xFC, 0x89, 0xEE,
-        0x9F, 0xEE, 0x60, 0x01, 0x02, 0x00, 0x33, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x62, 0x01, 0x02, 0x00,
-        0x10, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0xAE, 0x1F, 0x02, 0x00, 0x11, 0xFC, 0x89, 0xEE, 0x9F, 0xEE,
-        0x46, 0x20, 0x06, 0x00, 0x12, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x4C, 0x20, 0x06, 0x00, 0x13, 0xFC,
-        0x89, 0xEE, 0x9F, 0xEE, 0x52, 0x20, 0x06, 0x00, 0x14, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x58, 0x20,
-        0x06, 0x00, 0x15, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x5E, 0x20, 0x06, 0x00, 0x16, 0xFC, 0x89, 0xEE,
-        0x9F, 0xEE, 0x64, 0x20, 0x06, 0x00, 0x17, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x2E, 0x20, 0x02, 0x00,
-        0x83, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x6E, 0x01, 0x02, 0x00, 0x97, 0xFC, 0x89, 0xEE, 0x9F, 0xEE,
-        0x6C, 0x01, 0x02, 0x00, 0x98, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE4, 0x00, 0x02, 0x00, 0x99, 0xFC,
-        0x31, 0xF0, 0x1F, 0xF0, 0xE4, 0x02, 0x02, 0x00, 0x9A, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE4, 0x04,
-        0x02, 0x00, 0x9B, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE4, 0x06, 0x02, 0x00, 0x9C, 0xFC, 0x31, 0xF0,
-        0x1F, 0xF0, 0xE4, 0x08, 0x02, 0x00, 0x9D, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE4, 0x0A, 0x02, 0x00,
-        0x18, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x30, 0x20, 0x02, 0x00, 0x22, 0xFC, 0x89, 0xEE, 0x9F, 0xEE,
-        0x36, 0x20, 0x02, 0x00, 0x24, 0xFC, 0x89, 0xEE, 0x9F, 0xEE, 0x3A, 0x20, 0x02, 0x00, 0xC0, 0xFC,
-        0x69, 0xEE, 0x61, 0xF0, 0x00, 0x00, 0x06, 0x00, 0x9E, 0xFC, 0x89, 0xEE, 0x17, 0xF0, 0x70, 0x01,
-        0x02, 0x00, 0x9F, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE6, 0x00, 0x02, 0x00, 0xA0, 0xFC, 0x31, 0xF0,
-        0x1F, 0xF0, 0xE6, 0x02, 0x02, 0x00, 0xA1, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE6, 0x04, 0x02, 0x00,
-        0xA2, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE6, 0x06, 0x02, 0x00, 0xA3, 0xFC, 0x31, 0xF0, 0x1F, 0xF0,
-        0xE6, 0x08, 0x02, 0x00, 0xA4, 0xFC, 0x31, 0xF0, 0x1F, 0xF0, 0xE6, 0x0A, 0x02, 0x00, 0x20, 0xFD,
-        0xBA, 0xEE, 0x73, 0xEE, 0x53, 0xF5, 0x08, 0x00, 0x21, 0xFD, 0xBA, 0xEE, 0x73, 0xEE, 0x57, 0xF5,
-        0x0A, 0x00, 0x22, 0xFD, 0xBA, 0xEE, 0x73, 0xEE, 0x5C, 0xF5, 0x16, 0x00, 0x23, 0xFD, 0xBA, 0xEE,
-        0x73, 0xEE, 0x67, 0xF5, 0x0A, 0x00, 0x10, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0x34, 0x01, 0x02, 0x00,
-        0x45, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0xCC, 0x00, 0x02, 0x00, 0x47, 0xFD, 0x89, 0xEE, 0x73, 0xEE,
-        0x38, 0x01, 0x02, 0x00, 0x48, 0xFD, 0x9E, 0xEF, 0x73, 0xEE, 0x60, 0x01, 0x02, 0x00, 0x49, 0xFD,
-        0x9E, 0xEF, 0x73, 0xEE, 0x62, 0x01, 0x02, 0x00, 0x4A, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0x58, 0x01,
-        0x02, 0x00, 0x4B, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0x5A, 0x01, 0x02, 0x00, 0x4D, 0xFD, 0xBA, 0xEE,
-        0x73, 0xEE, 0x6C, 0xF5, 0x04, 0x00, 0x4F, 0xFD, 0xB2, 0xEF, 0x73, 0xEE, 0x80, 0x21, 0x02, 0x00,
-        0xC0, 0xFD, 0xBA, 0xEE, 0x73, 0xEE, 0x6E, 0xF5, 0x02, 0x00, 0xC2, 0xFD, 0xA8, 0xEF, 0x73, 0xEE,
-        0x00, 0x00, 0x02, 0x00, 0xC3, 0xFD, 0xBA, 0xEE, 0x73, 0xEE, 0x6F, 0xF5, 0x02, 0x00, 0x40, 0xFD,
-        0xB2, 0xEE, 0x73, 0xEE, 0x78, 0x01, 0x02, 0x00, 0x24, 0xFD, 0xD8, 0xEF, 0x73, 0xEE, 0x00, 0x00,
-        0x02, 0x00, 0x91, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0x86, 0x1B, 0x02, 0x00, 0x93, 0xFD, 0x89, 0xEE,
-        0x73, 0xEE, 0x8C, 0x1B, 0x02, 0x00, 0xC1, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0xCA, 0x00, 0x02, 0x00,
-        0xC6, 0xFD, 0xE7, 0xEE, 0x73, 0xEE, 0x8E, 0x21, 0x0A, 0x00, 0x89, 0xFD, 0x5F, 0xEF, 0x73, 0xEE,
-        0x00, 0x00, 0x00, 0x00, 0x8A, 0xFD, 0xD7, 0xEE, 0x73, 0xEE, 0xC0, 0x21, 0x24, 0x00, 0x46, 0xFD,
-        0x89, 0xEE, 0x73, 0xEE, 0x7A, 0x01, 0x06, 0x00, 0x86, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0xB6, 0x1F,
-        0x06, 0x00, 0x87, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0xB8, 0x21, 0x06, 0x00, 0x8B, 0xFD, 0x7A, 0xF3,
-        0x73, 0xEE, 0x00, 0x00, 0x12, 0x00, 0x8E, 0xFD, 0x89, 0xEE, 0x73, 0xEE, 0xB8, 0x12, 0x02, 0x00,
-        0x80, 0xFD, 0xBC, 0xEF, 0x73, 0xEE, 0x1C, 0x00, 0x02, 0x00, 0x81, 0xFD, 0xBC, 0xEF, 0x73, 0xEE,
-        0x1C, 0x02, 0x02, 0x00, 0x82, 0xFD, 0xBC, 0xEF, 0x73, 0xEE, 0x1C, 0x04, 0x02, 0x00, 0x83, 0xFD,
-        0xBC, 0xEF, 0x73, 0xEE, 0x1C, 0x06, 0x02, 0x00, 0x84, 0xFD, 0xBC, 0xEF, 0x73, 0xEE, 0x1C, 0x08,
-        0x02, 0x00, 0x85, 0xFD, 0xBC, 0xEF, 0x73, 0xEE, 0x1C, 0x0A, 0x02, 0x00, 0x00, 0xF1, 0x46, 0x00,
-        0x2D, 0xEE, 0xF8, 0x00, 0x00, 0x03, 0x8A, 0xEA, 0x1F, 0x00, 0x36, 0x01, 0xCA, 0x00, 0x96, 0x01,
-        0xCE, 0x00, 0xFC, 0x00, 0x78, 0x01, 0xDA, 0x1E, 0x1A, 0x01, 0x86, 0x1B, 0xC8, 0x00, 0x00, 0x00,
-        0xCE, 0x12, 0x00, 0x00, 0xD2, 0x14, 0x14, 0x01, 0x03, 0x00, 0xAE, 0x00, 0xE4, 0x00, 0x3C, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x77, 0xB4, 0xEA, 0xB3, 0x26, 0xB5, 0x2F, 0xB5, 0xFB, 0xB3, 0xA4, 0xB4, 0x69, 0xB4, 0xE7, 0xC5,
-        0x4A, 0xC5, 0xE7, 0xC5, 0xBE, 0xC5, 0x54, 0xC5, 0x48, 0xC5, 0x06, 0xC6, 0x17, 0xC6, 0x17, 0xC6,
-        0x17, 0xC6, 0x20, 0xC6, 0x3B, 0xC6, 0x98, 0xC6, 0xB4, 0xC6, 0xBF, 0xC5, 0xD2, 0xC5, 0xA6, 0xC5,
-        0x10, 0x00, 0x12, 0x00, 0x13, 0x00, 0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x30, 0x00, 0x31, 0x00,
-        0x32, 0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00,
-        0x3A, 0x00, 0x00, 0x00, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01,
-        0x14, 0x01, 0x14, 0x01, 0xF3, 0x02, 0xAD, 0x03, 0x60, 0x04, 0x04, 0x05, 0x07, 0x06, 0x08, 0x07,
-        0x0A, 0x08, 0x16, 0x09, 0x44, 0x0A, 0x04, 0x0B, 0x40, 0x0C, 0x80, 0x0D, 0x00, 0x0E, 0x84, 0x0F,
-        0x01, 0x10, 0x10, 0x11, 0x02, 0x14, 0x40, 0x20, 0x32, 0x21, 0x32, 0x22, 0x04, 0x23, 0x01, 0x24,
-        0x0F, 0x25, 0x00, 0x26, 0x00, 0x27, 0x00, 0x28, 0x00, 0x29, 0x00, 0x2A, 0x01, 0x2B, 0x06, 0x2C,
-        0x00, 0x38, 0x00, 0x39, 0xD6, 0x3A, 0x00, 0x3B, 0x00, 0x3C, 0x14, 0x3D, 0x7F, 0x3E, 0x00, 0x3F,
-        0x68, 0x40, 0x75, 0x41, 0x07, 0x42, 0x07, 0x43, 0x00, 0x45, 0x3B, 0x4A, 0x00, 0x4B, 0x00, 0x4C,
-        0x0F, 0x4D, 0x02, 0x75, 0x00, 0x76, 0x80, 0x00, 0x08, 0x01, 0x09, 0x01, 0x09, 0x01, 0x0A, 0x01,
-        0x0A, 0x01, 0x0B, 0x01, 0x0B, 0x01, 0x0C, 0x01, 0x0C, 0x01, 0x0D, 0x01, 0x0D, 0x01, 0x0E, 0x01,
-        0x0E, 0x01, 0x0F, 0x01, 0x0F, 0x01, 0x10, 0x01, 0x10, 0x01, 0x11, 0x01, 0x11, 0x01, 0x12, 0x01,
-        0x12, 0x01, 0x13, 0x01, 0x13, 0x01, 0x14, 0x01, 0x14, 0x01, 0x15, 0x01, 0x15, 0x01, 0x16, 0x01,
-        0x16, 0x01, 0x17, 0x01, 0x17, 0x01, 0x18, 0x01, 0x18, 0x01, 0x19, 0x01, 0x19, 0x01, 0x4D, 0x01,
-        0x4D, 0x01, 0x4E, 0x01, 0x4E, 0x01, 0x4F, 0x01, 0x4F, 0x01, 0x50, 0x01, 0x50, 0x01, 0x51, 0x01,
-        0x51, 0x01, 0x52, 0x01, 0x52, 0x01, 0x53, 0x01, 0x53, 0x01, 0x54, 0x01, 0x54, 0x01, 0x65, 0x01,
-        0x65, 0x01, 0x66, 0x01, 0x66, 0x01, 0x67, 0x01, 0x67, 0x01, 0x68, 0x01, 0x68, 0x01, 0x69, 0x01,
-        0x69, 0x01, 0x6A, 0x01, 0x6A, 0x01, 0x6B, 0x01, 0x6B, 0x01, 0x6C, 0x01, 0x6C, 0x01, 0x6D, 0x01,
-        0x6D, 0x01, 0x6E, 0x01, 0x6E, 0x01, 0x6F, 0x01, 0x6F, 0x01, 0x70, 0x01, 0x70, 0x01, 0x71, 0x01,
-        0x71, 0x01, 0x72, 0x01, 0x72, 0x01, 0x73, 0x01, 0x73, 0x01, 0x74, 0x01, 0x74, 0x01, 0x75, 0x01,
-        0x75, 0x01, 0x76, 0x01, 0x76, 0x01, 0x77, 0x01, 0x77, 0x01, 0x78, 0x01, 0x78, 0x01, 0x79, 0x01,
-        0x79, 0x01, 0x7A, 0x01, 0x7A, 0x01, 0x7B, 0x01, 0x7B, 0x01, 0x7C, 0x01, 0x7C, 0x01, 0x7D, 0x01,
-        0x7D, 0x01, 0x7E, 0x01, 0x7E, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01,
-        0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01,
-        0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01,
-        0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12,
-        0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12,
-        0x80, 0x12, 0x80, 0x12, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13,
-        0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13,
-        0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44,
-        0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x22, 0x46, 0x22, 0x46,
-        0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46,
-        0x22, 0x46, 0x23, 0x46, 0x23, 0x46, 0x23, 0x46, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47,
-        0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47,
-        0x1C, 0x47, 0x1D, 0x47, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0xDA, 0x48,
-        0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0x33, 0x48,
-        0x78, 0x49, 0x78, 0x49, 0x79, 0x49, 0x79, 0x49, 0x79, 0x49, 0x79, 0x49, 0x7A, 0x49, 0x7A, 0x49,
-        0x7A, 0x49, 0x7A, 0x49, 0x7B, 0x49, 0x7B, 0x49, 0x7B, 0x49, 0x7C, 0x49, 0x32, 0x00, 0x46, 0x00,
-        0x5A, 0x00, 0x6E, 0x00, 0x82, 0x00, 0x96, 0x00, 0xAA, 0x00, 0xBE, 0x00, 0xD2, 0x00, 0xE6, 0x00,
-        0xFA, 0x00, 0x0E, 0x01, 0x22, 0x01, 0x52, 0x01, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00,
-        0x04, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70,
-        0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x21, 0x21, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x09, 0x00, 0x00,
-        0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x48, 0x45, 0x52, 0x4D, 0x45, 0x53, 0x20, 0x32,
-        0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
-        0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70,
-        0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x21, 0x21, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x09, 0x00, 0x00,
-        0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x48, 0x45, 0x52, 0x4D, 0x45, 0x53, 0x20, 0x32,
-        0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20,
-        0x57, 0x61, 0x76, 0x65, 0x4C, 0x41, 0x4E, 0x20, 0x49, 0x49, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x28, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x02, 0x01, 0x82, 0x84, 0x8B, 0x96, 0x00, 0x00,
-        0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01,
-        0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xDD, 0x00, 0x50, 0xF2, 0x01,
-        0x01, 0x00, 0x00, 0x50, 0xF2, 0x05, 0x02, 0x00, 0x00, 0x50, 0xF2, 0x02, 0x00, 0x50, 0xF2, 0x04,
-        0x02, 0x00, 0x00, 0x50, 0xF2, 0x00, 0x00, 0x50, 0xF2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x04, 0x00,
-        0x15, 0x00, 0x02, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x02, 0x00,
-        0x01, 0x00, 0x04, 0x00, 0x15, 0x00, 0x20, 0x00, 0x11, 0x00, 0x20, 0x00, 0x1E, 0x1F, 0x8E, 0x21,
-        0x00, 0x23, 0xDA, 0x22, 0x04, 0x23, 0xC0, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, 0x34, 0x23, 0x00, 0x00,
-        0x50, 0x21, 0x8E, 0x21, 0xFF, 0xFF, 0x00, 0x00, 0x1E, 0x1F, 0x8E, 0x21, 0x00, 0x23, 0xFF, 0xFF,
-        0x04, 0x23, 0xC0, 0x21, 0xFF, 0xFF, 0xFF, 0xFF, 0x34, 0x23, 0x00, 0x00, 0x8E, 0x21, 0x3C, 0x23,
-        0xFF, 0xFF, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x06, 0x07,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80,
-        0x00, 0x60, 0x1D, 0x00, 0x00, 0x00, 0x0D, 0x81, 0x00, 0x60, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00,
-
-};  /* fw_image_2_data */
-
-static const hcf_8 fw_image_3_data[] = {
-        0x3F, 0x41, 0xA5, 0x4C, 0x50, 0x37, 0x04, 0x00, 0x01, 0xB9, 0x41, 0x5F, 0xB5, 0x60, 0x55, 0xE0,
-        0x0C, 0x60, 0x10, 0x62, 0xA2, 0xD3, 0x01, 0x60, 0x01, 0x65, 0xD4, 0x80, 0x5A, 0xD1, 0x0F, 0x02,
-        0x5A, 0xD3, 0x3E, 0x60, 0x00, 0x66, 0xE0, 0x87, 0x40, 0x4A, 0xEA, 0x60, 0x88, 0x61, 0x64, 0x44,
-        0xC8, 0x84, 0x0C, 0x63, 0xAA, 0x46, 0x58, 0xD0, 0xAA, 0x46, 0x59, 0xD8, 0xFB, 0x1F, 0x08, 0x60,
-        0x00, 0x63, 0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3, 0xA3, 0xD3, 0x02, 0xA8, 0xD4, 0x80, 0x61, 0x02,
-        0x60, 0x02, 0x26, 0x60, 0x6A, 0x61, 0x3C, 0x60, 0x00, 0x66, 0x41, 0x4B, 0x2B, 0x41, 0x26, 0x60,
-        0xB2, 0x7C, 0xD1, 0x80, 0xA1, 0xD2, 0x25, 0x05, 0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47,
-        0xE0, 0x87, 0x40, 0x4A, 0x59, 0xD2, 0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3,
-        0xBD, 0xD1, 0xEC, 0x18, 0xD4, 0x80, 0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01,
-        0x67, 0x44, 0xC0, 0x84, 0xE0, 0x85, 0x2C, 0x44, 0xD4, 0x80, 0x63, 0x41, 0x01, 0x06, 0x65, 0x44,
-        0xC8, 0x83, 0xAA, 0x46, 0x59, 0xD1, 0x27, 0xD8, 0x5A, 0x87, 0xFC, 0x1F, 0xAA, 0x46, 0x2B, 0x41,
-        0xD5, 0x01, 0x26, 0x60, 0xB2, 0x61, 0x41, 0x4B, 0x2B, 0x41, 0x26, 0x60, 0xEA, 0x7C, 0xD1, 0x80,
-        0xA1, 0xD2, 0x27, 0x05, 0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47, 0xE0, 0x87, 0x40, 0x4A,
-        0x59, 0xD2, 0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3, 0xBD, 0xD1, 0xEC, 0x18,
-        0xD4, 0x80, 0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x04, 0xA3, 0xA3, 0xD1,
-        0x5A, 0x88, 0x2C, 0x43, 0xD3, 0x80, 0xFF, 0xFF, 0x01, 0x06, 0x64, 0x43, 0xCF, 0x83, 0xAA, 0x46,
-        0x60, 0xFE, 0x28, 0xD1, 0x5E, 0x88, 0x27, 0xD8, 0x5A, 0x87, 0xFB, 0x1F, 0x20, 0xFE, 0xAA, 0x46,
-        0xD3, 0x01, 0xB8, 0xFE, 0xB9, 0xFE, 0xBA, 0xFE, 0xBB, 0xFE, 0xBD, 0xFE, 0xBF, 0xFE, 0x21, 0x60,
-        0x80, 0x62, 0xA2, 0xD3, 0x12, 0x63, 0x60, 0x40, 0x01, 0x27, 0x05, 0x00, 0x0B, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0xA2, 0x60, 0x49, 0x78, 0xFF, 0xFF, 0xF1, 0xFF, 0x94, 0x48,
-        0x1F, 0x00, 0x04, 0x00, 0xF2, 0xFF, 0x98, 0x48, 0x1F, 0x00, 0x04, 0x00, 0xFB, 0xFF, 0xA0, 0x48,
-        0x1F, 0x00, 0x04, 0x00, 0xF1, 0xFF, 0xF2, 0x4D, 0x1F, 0x00, 0x04, 0x00, 0xF2, 0xFF, 0xF6, 0x4D,
-        0x1F, 0x00, 0x04, 0x00, 0xFB, 0xFF, 0xFE, 0x4D, 0x1F, 0x00, 0x04, 0x00, 0x86, 0xFD, 0xB6, 0x1F,
-        0x00, 0x00, 0x06, 0x00, 0x10, 0xFD, 0x34, 0x01, 0x00, 0x00, 0x02, 0x00, 0x14, 0xFD, 0x7E, 0x21,
-        0x00, 0x00, 0x0A, 0x00, 0x20, 0xFA, 0xFA, 0x1D, 0x00, 0x00, 0x0E, 0x00, 0x21, 0xFA, 0xDE, 0x1D,
-        0x00, 0x00, 0x0E, 0x00, 0x22, 0xFA, 0x16, 0x1E, 0x00, 0x00, 0x0E, 0x00, 0x23, 0xFA, 0xCA, 0x1C,
-        0x00, 0x00, 0x01, 0x00, 0x24, 0xFA, 0xBE, 0x1E, 0x00, 0x00, 0x0E, 0x00, 0x25, 0xFA, 0xDE, 0x1C,
-        0x00, 0x00, 0x80, 0x00, 0x26, 0xFA, 0xC4, 0x1C, 0x00, 0x00, 0x01, 0x00,
-
-};  /* fw_image_3_data */
-
-static const hcf_8 fw_image_4_data[] = {
-        0xA6, 0x60, 0x25, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA6, 0x60, 0x0B, 0x78, 0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA6, 0x60, 0x11, 0x78, 0xC4, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA5, 0x60, 0x61, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x44, 0xFF, 0x20, 0x54, 0xCD, 0xE2, 0xA6, 0x60, 0x23, 0x78, 0x08, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA6, 0x60, 0x25, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA6, 0x60, 0x25, 0x78, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA6, 0x60, 0x25, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAC, 0x60, 0x81, 0x78, 0x4C, 0x4E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAC, 0x60, 0x18, 0x78, 0x4C, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC4, 0xE2, 0x84, 0xFF, 0x22, 0x58, 0x82, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA7, 0x60, 0xC4, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE4, 0xE2, 0xAC, 0x60, 0x31, 0x78, 0x95, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0x76, 0x78, 0x64, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAC, 0x60, 0x8C, 0x78, 0xA4, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAC, 0x60, 0x72, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB2, 0x60, 0xD1, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB2, 0x60, 0xFE, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB1, 0x60, 0x90, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB1, 0x60, 0xC0, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB1, 0x60, 0xC0, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB4, 0x60, 0x73, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB1, 0x60, 0xC3, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x83, 0x64, 0x80, 0x29, 0x09, 0xFB, 0xB2, 0x60, 0x99, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC0, 0x60, 0x29, 0x78, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xB4, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBE, 0x60, 0x78, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBD, 0x60, 0xE8, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB5, 0x60, 0x96, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x83, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC0, 0x60, 0x9F, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xB0, 0xFF, 0xB1, 0xFF, 0x40, 0xFF, 0x43, 0xFF, 0xC0, 0x60, 0x9A, 0x78, 0x44, 0xFF, 0xFF, 0x01,
-        0xC0, 0x60, 0x9F, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC6, 0x60, 0x66, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC0, 0x60, 0x9A, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC0, 0x60, 0x99, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC7, 0x60, 0x26, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE5, 0x60, 0x0E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC7, 0x60, 0x2E, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC7, 0x60, 0x2E, 0x78, 0x24, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE3, 0x60, 0x45, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC7, 0x60, 0x2E, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC7, 0x60, 0x2E, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC7, 0x60, 0x2E, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x87, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0xA0, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x84, 0x78, 0x28, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x84, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x84, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x84, 0x78, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x87, 0x64, 0x80, 0x29, 0x09, 0xFB, 0x47, 0xFF, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x87, 0xF3, 0x88, 0xF3, 0xDC, 0x81, 0x00, 0x7C, 0x01, 0x00, 0x00, 0xFA, 0x60, 0x46, 0xFE, 0x63,
-        0xA3, 0xD8, 0xFE, 0x1F, 0xCD, 0x81, 0xD8, 0x84, 0xF8, 0x02, 0x87, 0xF3, 0x88, 0xF5, 0xDC, 0x81,
-        0x80, 0x67, 0x40, 0x4A, 0x14, 0x60, 0x02, 0x65, 0x01, 0x7C, 0x07, 0x18, 0x2A, 0x43, 0x02, 0xFC,
-        0x5F, 0x8A, 0x8E, 0xF8, 0x70, 0xF8, 0x00, 0xF4, 0xF8, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0x89, 0xF5,
-        0x06, 0x64, 0x66, 0x43, 0x00, 0x7C, 0x63, 0x46, 0xFE, 0x63, 0xA3, 0xD8, 0xFE, 0x1F, 0xCC, 0x84,
-        0x66, 0x43, 0xDB, 0x83, 0xF8, 0x02, 0x14, 0x60, 0x02, 0x65, 0x09, 0x60, 0x2B, 0x7C, 0x89, 0xF3,
-        0x06, 0x61, 0x60, 0x46, 0x01, 0x63, 0x72, 0xF8, 0x00, 0xFC, 0x63, 0x47, 0x06, 0xFA, 0x72, 0xF8,
-        0x8E, 0xF8, 0xDF, 0x83, 0x66, 0x44, 0xCD, 0x81, 0x02, 0xA6, 0xF5, 0x02, 0x89, 0xF3, 0x06, 0x61,
-        0x60, 0x46, 0x03, 0x7C, 0x73, 0xF8, 0x66, 0x44, 0xCD, 0x81, 0x02, 0xA6, 0xFB, 0x02, 0x2E, 0x58,
-        0xFF, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x0A, 0x00, 0x42, 0x60, 0x09, 0xE0, 0x3F, 0x40, 0x01, 0x2A,
-        0x03, 0x00, 0x60, 0x60, 0x1C, 0xE0, 0x02, 0x00, 0x80, 0x60, 0x1C, 0xE0, 0x40, 0xEC, 0x00, 0xED,
-        0x02, 0xEE, 0x80, 0x60, 0x58, 0xEC, 0x80, 0x60, 0x00, 0xED, 0x80, 0x60, 0x82, 0xEE, 0xC0, 0x60,
-        0x59, 0xEC, 0xC0, 0x60, 0x07, 0xED, 0xAD, 0x4F, 0xFE, 0xB4, 0xA0, 0x5D, 0x00, 0xF3, 0x28, 0xFB,
-        0x40, 0x44, 0xA4, 0x60, 0x5D, 0x7C, 0x20, 0xF9, 0xA5, 0x60, 0x48, 0x7C, 0x21, 0xF9, 0xA7, 0x60,
-        0x30, 0x7C, 0x22, 0xF9, 0xB0, 0x60, 0xCD, 0x7C, 0x23, 0xF9, 0xB5, 0x60, 0x6C, 0x7C, 0x24, 0xF9,
-        0xC0, 0x60, 0x88, 0x7C, 0x25, 0xF9, 0xC6, 0x60, 0xE0, 0x7C, 0x26, 0xF9, 0x91, 0x60, 0x00, 0xE8,
-        0x28, 0xE8, 0x44, 0x60, 0x02, 0xE6, 0x00, 0x64, 0x40, 0x52, 0x10, 0x60, 0x04, 0xE6, 0x08, 0x60,
-        0x00, 0x63, 0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3, 0xBD, 0xD3, 0x02, 0xA8, 0xD4, 0x80, 0x47, 0x02,
-        0x46, 0x02, 0xDB, 0x83, 0xFA, 0x60, 0x27, 0x65, 0x5B, 0xD3, 0xBF, 0xD1, 0x1A, 0x18, 0xC3, 0x83,
-        0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xDB, 0x83, 0xD3, 0x83, 0xD3, 0x86, 0x64, 0x41, 0xCD, 0x81,
-        0xA6, 0xD1, 0xDA, 0x86, 0x1C, 0x60, 0x68, 0x65, 0x00, 0x60, 0x72, 0x63, 0xA5, 0xD3, 0xDA, 0x85,
-        0x90, 0x84, 0xFF, 0x27, 0x02, 0x00, 0xA2, 0xD9, 0x01, 0x00, 0xF8, 0x1F, 0xCD, 0x81, 0xFF, 0xFF,
-        0xEF, 0x02, 0x08, 0x60, 0x06, 0x63, 0xFA, 0x60, 0x28, 0x65, 0x5B, 0xD3, 0xBF, 0xD1, 0x0B, 0x18,
-        0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xBF, 0xD3, 0x21, 0x60, 0x72, 0x62, 0x0E, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0xA2, 0xDB, 0x08, 0x60, 0x06, 0x63, 0xFD, 0x60, 0x0C, 0x65, 0x5B, 0xD3,
-        0xBF, 0xD1, 0x0D, 0x18, 0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xFA, 0xA3, 0xA3, 0xD3,
-        0x02, 0x60, 0x00, 0x65, 0xF7, 0xA0, 0xFC, 0xA0, 0x0A, 0x05, 0x01, 0x05, 0x00, 0x00, 0x21, 0x60,
-        0x00, 0x65, 0x3F, 0x43, 0x3F, 0x43, 0x21, 0x60, 0x00, 0x65, 0xC0, 0x60, 0x8F, 0xEE, 0xB7, 0x84,
-        0x40, 0x5F, 0x00, 0x60, 0x30, 0xE2, 0x00, 0x60, 0x50, 0xE2, 0x00, 0x60, 0x79, 0xE2, 0x00, 0x60,
-        0x90, 0xE2, 0x01, 0x60, 0xD0, 0xE2, 0x01, 0x60, 0xF0, 0xE2, 0x01, 0x60, 0xB0, 0xE2, 0x26, 0x64,
-        0x35, 0xFB, 0x01, 0x60, 0x30, 0x64, 0x0A, 0xA4, 0x38, 0xFB, 0x60, 0x45, 0x00, 0x60, 0xF8, 0x64,
-        0x0A, 0xA4, 0x39, 0xFB, 0x35, 0xF1, 0x0A, 0x64, 0xC4, 0x84, 0x36, 0xFB, 0xC0, 0x84, 0x0A, 0xA4,
-        0x37, 0xFB, 0x09, 0x60, 0x2A, 0x64, 0x99, 0xFB, 0x82, 0xFF, 0x92, 0xFF, 0x5C, 0x41, 0x5C, 0x46,
-        0x5C, 0x47, 0x00, 0xE1, 0xA7, 0x60, 0x9B, 0x63, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x87, 0xFF,
-        0x97, 0xFF, 0x0C, 0x60, 0x02, 0x64, 0x40, 0x5A, 0x06, 0xA4, 0x40, 0x5B, 0x5C, 0x5E, 0x5C, 0x51,
-        0x1F, 0x60, 0xAA, 0x62, 0xA2, 0xD3, 0x65, 0xFB, 0x21, 0x60, 0xEC, 0x61, 0x27, 0x7C, 0xA1, 0xD9,
-        0x25, 0x60, 0x2E, 0x63, 0x7F, 0xA3, 0xE3, 0x87, 0x00, 0x7F, 0x8A, 0xFB, 0x02, 0x60, 0x80, 0x66,
-        0x22, 0x60, 0x22, 0x64, 0x77, 0x60, 0x77, 0x63, 0x00, 0xFA, 0x01, 0xFC, 0x00, 0xF0, 0x01, 0xF0,
-        0xD0, 0x80, 0xD3, 0x80, 0x1E, 0x02, 0x1D, 0x02, 0x06, 0x60, 0x80, 0x65, 0x45, 0x4A, 0xAA, 0x46,
-        0x00, 0xFC, 0x01, 0xFA, 0xAA, 0x46, 0x00, 0xF0, 0x2A, 0x41, 0x50, 0x65, 0xD3, 0x80, 0xCD, 0x84,
-        0x13, 0x03, 0x0A, 0x60, 0x80, 0x65, 0x45, 0x4A, 0xAA, 0x46, 0x00, 0xFC, 0x01, 0xFA, 0xAA, 0x46,
-        0x00, 0xF0, 0x65, 0x41, 0xC8, 0x65, 0xD3, 0x80, 0xCD, 0x84, 0x06, 0x03, 0x12, 0x60, 0x7F, 0x64,
-        0x03, 0x00, 0x10, 0x65, 0x02, 0x60, 0x7F, 0x64, 0x65, 0x43, 0x87, 0xFD, 0x1B, 0x60, 0x72, 0x62,
-        0xA2, 0xDD, 0x07, 0x61, 0xC5, 0x81, 0xE1, 0x85, 0xD4, 0x84, 0x8B, 0xFB, 0xDC, 0x84, 0x89, 0xFB,
-        0x0C, 0xA4, 0x88, 0xFB, 0x1B, 0x60, 0x74, 0x62, 0xA2, 0xDB, 0xA2, 0x60, 0x58, 0x4E, 0x1F, 0x78,
-        0xFF, 0xFF, 0xA2, 0x60, 0x58, 0x4E, 0x00, 0x78, 0xFF, 0xFF, 0x8B, 0xF1, 0x8A, 0xF3, 0x7C, 0x63,
-        0x8D, 0xFB, 0x60, 0x46, 0x01, 0xFC, 0xDC, 0x84, 0xD0, 0x80, 0x00, 0xFA, 0xFA, 0x04, 0x8E, 0xFB,
-        0x60, 0x46, 0x00, 0x64, 0x00, 0xFA, 0x63, 0x44, 0x80, 0x7F, 0x01, 0xFA, 0x8B, 0xF3, 0x8A, 0xF1,
-        0xDC, 0x84, 0xD0, 0x84, 0x8C, 0xFB, 0x03, 0x60, 0x26, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x64, 0x78,
-        0xFF, 0xFF, 0x66, 0x44, 0x2E, 0xFB, 0x82, 0xFF, 0x40, 0x42, 0x87, 0xFF, 0x8C, 0xF3, 0x94, 0xFB,
-        0x00, 0x64, 0x12, 0x60, 0xC8, 0x63, 0xA3, 0xDB, 0x00, 0x64, 0x40, 0x50, 0x63, 0xFF, 0x66, 0xFF,
-        0x65, 0xFF, 0x64, 0xFF, 0x61, 0xFF, 0x62, 0xFF, 0x49, 0x60, 0x02, 0xE1, 0x52, 0x60, 0x02, 0xE1,
-        0x5B, 0x60, 0x02, 0xE1, 0x65, 0x60, 0x02, 0xE1, 0x6C, 0x60, 0x02, 0xE1, 0x76, 0x60, 0x02, 0xE1,
-        0x41, 0x60, 0x02, 0xE1, 0x04, 0x65, 0x21, 0x60, 0x7E, 0x64, 0x44, 0xD3, 0xEA, 0x60, 0x58, 0x4E,
-        0x78, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0x04, 0x65, 0x0C, 0x64, 0xA5, 0xDB, 0xA3, 0x60, 0xED, 0x64,
-        0x80, 0xFB, 0x2D, 0xFF, 0x0A, 0x61, 0x41, 0x4B, 0x09, 0x60, 0x08, 0x61, 0xB3, 0x60, 0x58, 0x4D,
-        0x64, 0x78, 0xFF, 0xFF, 0xF0, 0x67, 0x0E, 0xFA, 0x1B, 0x60, 0xE0, 0x62, 0x1B, 0x60, 0xC4, 0x64,
-        0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x2B, 0x41,
-        0x4D, 0x8B, 0xFF, 0xFF, 0xE9, 0x02, 0x0A, 0x61, 0x41, 0x4B, 0x09, 0x60, 0x08, 0x61, 0xB3, 0x60,
-        0x58, 0x4D, 0x64, 0x78, 0xFF, 0xFF, 0x1B, 0x60, 0xE0, 0x62, 0x1B, 0x60, 0xB8, 0x64, 0xA2, 0xDB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x2B, 0x41, 0x4D, 0x8B,
-        0xFF, 0xFF, 0xEB, 0x02, 0xEB, 0x60, 0x4E, 0x78, 0xFF, 0xFF, 0x00, 0xEA, 0x00, 0xEB, 0x50, 0x60,
-        0x03, 0xEA, 0x51, 0x60, 0x13, 0xEA, 0x52, 0x60, 0x30, 0xEA, 0x53, 0x60, 0x40, 0xEA, 0x54, 0x60,
-        0x52, 0xEA, 0x55, 0x60, 0x6D, 0xEA, 0x56, 0x60, 0x71, 0xEA, 0x57, 0x60, 0x8B, 0xEA, 0x58, 0x60,
-        0x47, 0xEA, 0x59, 0x60, 0xA0, 0xEA, 0x5A, 0x60, 0xB2, 0xEA, 0x5B, 0x60, 0xC1, 0xEA, 0x5C, 0x60,
-        0xD7, 0xEA, 0x5D, 0x60, 0xEB, 0xEA, 0x5E, 0x60, 0xA0, 0xEA, 0x50, 0x60, 0x36, 0xEB, 0x51, 0x60,
-        0x37, 0xEB, 0x52, 0x60, 0x20, 0xEB, 0x53, 0x60, 0xE4, 0xEB, 0x54, 0x60, 0x34, 0xEB, 0x55, 0x60,
-        0x58, 0xEB, 0x56, 0x60, 0x48, 0xEB, 0x57, 0x60, 0xD0, 0xEB, 0x58, 0x60, 0xC3, 0xEB, 0x59, 0x60,
-        0xFC, 0xEB, 0x5A, 0x60, 0x34, 0xEB, 0x5B, 0x60, 0x58, 0xEB, 0x5C, 0x60, 0xC0, 0xEB, 0x5D, 0x60,
-        0xD0, 0xEB, 0x5E, 0x60, 0x91, 0xEB, 0x00, 0xEA, 0x00, 0xEB, 0xE0, 0x60, 0x02, 0xEA, 0xE0, 0x60,
-        0x03, 0xEB, 0xA0, 0x60, 0x00, 0xEB, 0xB0, 0x60, 0x00, 0xEB, 0xAB, 0x48, 0x40, 0x3B, 0x01, 0x00,
-        0xFC, 0x01, 0x00, 0xEB, 0x03, 0x60, 0x02, 0x62, 0x62, 0x44, 0xA2, 0xDB, 0x0F, 0x64, 0x60, 0x7F,
-        0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x3F, 0x40,
-        0x40, 0x26, 0x08, 0x00, 0x00, 0x60, 0x18, 0x64, 0x00, 0x60, 0x00, 0x65, 0x94, 0x84, 0xA0, 0x50,
-        0x1D, 0x60, 0x19, 0xE2, 0x24, 0x44, 0xFF, 0xB4, 0x04, 0xFB, 0x50, 0x60, 0x00, 0x64, 0x05, 0xFB,
-        0x10, 0x60, 0x10, 0x75, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0x80, 0xFF, 0x90, 0xFF, 0x98, 0xFF,
-        0x23, 0x60, 0x5C, 0x63, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB,
-        0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB,
-        0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB,
-        0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB,
-        0x2F, 0x44, 0xBD, 0xDB, 0x23, 0x60, 0x50, 0x64, 0xA0, 0xDD, 0x24, 0x60, 0x7C, 0x63, 0x23, 0x60,
-        0x52, 0x64, 0xA0, 0xDD, 0x23, 0x60, 0x54, 0x63, 0x30, 0x44, 0xA3, 0xDB, 0x23, 0x60, 0x56, 0x63,
-        0x31, 0x44, 0xA3, 0xDB, 0x23, 0x60, 0x58, 0x63, 0x32, 0x44, 0xA3, 0xDB, 0x23, 0x60, 0x5A, 0x63,
-        0x33, 0x44, 0xA3, 0xDB, 0x81, 0xFF, 0x91, 0xFF, 0x58, 0x51, 0x48, 0x00, 0x82, 0xFF, 0x92, 0xFF,
-        0x58, 0x51, 0x44, 0x00, 0x83, 0xFF, 0x93, 0xFF, 0x58, 0x51, 0x40, 0x00, 0x84, 0xFF, 0x94, 0xFF,
-        0x58, 0x51, 0x3C, 0x00, 0x85, 0xFF, 0x95, 0xFF, 0x58, 0x51, 0x38, 0x00, 0x86, 0xFF, 0x96, 0xFF,
-        0x58, 0x51, 0x34, 0x00, 0x87, 0xFF, 0x97, 0xFF, 0x58, 0x51, 0x30, 0x00, 0x80, 0xFF, 0x90, 0xFF,
-        0x99, 0xFF, 0x23, 0x60, 0x50, 0x64, 0xA0, 0xD1, 0x30, 0x44, 0x64, 0x43, 0xBD, 0xDB, 0x31, 0x44,
-        0xBD, 0xDB, 0x32, 0x44, 0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB, 0x35, 0x44,
-        0xBD, 0xDB, 0x36, 0x44, 0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB, 0x39, 0x44,
-        0xBD, 0xDB, 0x3A, 0x44, 0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB, 0x3D, 0x44,
-        0xBD, 0xDB, 0x3E, 0x44, 0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0xE3, 0x60, 0x50, 0x64, 0x0A, 0xFB,
-        0x40, 0x21, 0xFE, 0x01, 0xA1, 0xFF, 0xFF, 0xFF, 0x78, 0x01, 0xFF, 0xFF, 0x42, 0x50, 0x40, 0x53,
-        0x23, 0x60, 0x52, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x52, 0x33, 0x44, 0x32, 0x42, 0xA2, 0xDB,
-        0xDA, 0x82, 0xA2, 0xDD, 0xDA, 0x83, 0x65, 0x44, 0xBD, 0xDB, 0x61, 0x44, 0xBD, 0xDB, 0x66, 0x44,
-        0xBD, 0xDB, 0xBD, 0xD9, 0x30, 0x44, 0xBD, 0xDB, 0x99, 0xFF, 0xA4, 0x4C, 0xBD, 0xDB, 0xA5, 0x4C,
-        0xBD, 0xDB, 0xA0, 0x4C, 0xBD, 0xDB, 0xA1, 0x4C, 0xBD, 0xDB, 0x98, 0xFF, 0x23, 0x60, 0x52, 0x64,
-        0xA0, 0xDD, 0x23, 0x60, 0x54, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x50, 0x23, 0x60, 0x58, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x52, 0x23, 0x60, 0x5A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x53,
-        0x31, 0x41, 0x23, 0x60, 0x56, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x51, 0x23, 0x60, 0x50, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x43, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44,
-        0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44,
-        0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44,
-        0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44,
-        0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB, 0x23, 0x60, 0x50, 0x64, 0xA0, 0xDD, 0x61, 0x58, 0xFF, 0xFF,
-        0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x07, 0x02, 0x62, 0xFF, 0x63, 0xFF, 0x64, 0xFF, 0x65, 0xFF,
-        0x66, 0xFF, 0xBF, 0xFE, 0xA1, 0xFF, 0x82, 0xFF, 0x88, 0xFF, 0x6C, 0x40, 0x41, 0xFF, 0xC4, 0xE2,
-        0x43, 0xFF, 0x5C, 0x49, 0x08, 0xE1, 0xA5, 0x60, 0x5E, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0x98, 0xFF,
-        0x80, 0x3E, 0x9F, 0xFE, 0x03, 0x04, 0xA6, 0x60, 0x28, 0x78, 0xFF, 0xFF, 0xE2, 0xFE, 0x40, 0x05,
-        0xE0, 0xFE, 0x5B, 0x05, 0xE1, 0xFE, 0xF2, 0x04, 0x29, 0x40, 0x08, 0x26, 0xEF, 0x01, 0x72, 0x44,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x95, 0xF3, 0xE8, 0x85, 0xFF, 0xB7,
-        0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x85, 0x73, 0x44, 0xD4, 0x84, 0x10, 0x65, 0xD4, 0x80, 0xFF, 0xFF,
-        0x26, 0x04, 0x3F, 0x40, 0x40, 0x26, 0x13, 0x00, 0x0B, 0x60, 0xF8, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x10, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xF8, 0xA2, 0xA2, 0xD1, 0x0A, 0x60, 0x19, 0x64, 0x90, 0x84,
-        0xA0, 0x52, 0x06, 0xA2, 0xA2, 0xD1, 0x46, 0x60, 0x09, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xD2, 0xF4,
-        0x25, 0x60, 0x16, 0x7C, 0x63, 0x40, 0x01, 0x26, 0x08, 0x00, 0xA4, 0xD3, 0xFF, 0xFF, 0x01, 0xB4,
-        0xFF, 0xFF, 0x03, 0x02, 0xAD, 0x4F, 0xFE, 0xB4, 0xA0, 0x5D, 0x02, 0xEE, 0xBD, 0xFE, 0xBE, 0x01,
-        0x21, 0x46, 0x5E, 0x62, 0x9A, 0xFF, 0x07, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x06, 0x25, 0x10, 0x00,
-        0xA2, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x62, 0x62, 0x01, 0x5D, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC,
-        0x7A, 0xDC, 0x44, 0xFF, 0x06, 0x25, 0x04, 0x00, 0x0E, 0xE1, 0x02, 0x60, 0x01, 0xE1, 0x9E, 0x01,
-        0x62, 0xFF, 0xC4, 0xE2, 0x41, 0xFF, 0x0A, 0xE1, 0x99, 0x01, 0xC8, 0x74, 0xCD, 0xE2, 0x29, 0x44,
-        0x08, 0xBC, 0x40, 0x49, 0x05, 0xE1, 0x25, 0x60, 0x18, 0x63, 0xA3, 0xD3, 0xD2, 0xF3, 0x06, 0x18,
-        0x28, 0x40, 0x08, 0x2A, 0x05, 0x00, 0x28, 0x40, 0x48, 0x36, 0x02, 0x00, 0x02, 0xBC, 0xD2, 0xFB,
-        0x3F, 0x40, 0x01, 0x2B, 0xFF, 0xFF, 0xA1, 0xFF, 0x67, 0x4C, 0x06, 0x61, 0xCD, 0x81, 0x04, 0x25,
-        0x30, 0x00, 0x87, 0x4C, 0xFB, 0x02, 0x28, 0x40, 0x40, 0x2B, 0x02, 0x00, 0x15, 0x60, 0x6F, 0x6B,
-        0xF3, 0x60, 0xA0, 0x64, 0x04, 0x25, 0x25, 0x00, 0x80, 0x4C, 0x30, 0x64, 0x3A, 0xDB, 0x44, 0xFF,
-        0x04, 0x25, 0x1F, 0x00, 0x04, 0x60, 0x00, 0x65, 0x25, 0x44, 0x37, 0x36, 0xB4, 0x84, 0x6E, 0x36,
-        0xB4, 0x84, 0x80, 0x4E, 0x24, 0x41, 0x04, 0x25, 0x14, 0x00, 0x61, 0x4C, 0x64, 0xA1, 0x61, 0x54,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x04, 0x25, 0x0D, 0x00, 0x67, 0x4E, 0x07, 0x64, 0x1C, 0xFB, 0x00, 0xE1,
-        0x02, 0x60, 0x01, 0xE1, 0x53, 0x01, 0x33, 0xF3, 0xFD, 0x11, 0xFC, 0x18, 0x40, 0x64, 0x3A, 0xDB,
-        0x0A, 0x00, 0xC4, 0xE2, 0x27, 0x44, 0x20, 0x2A, 0x04, 0x00, 0x42, 0x64, 0x3A, 0xDB, 0x67, 0x4C,
-        0x02, 0x00, 0x41, 0x64, 0x3A, 0xDB, 0x62, 0xFF, 0x08, 0xE1, 0xE2, 0xFE, 0x72, 0x52, 0x5C, 0x49,
-        0x32, 0x7B, 0x4D, 0xE2, 0x3B, 0x01, 0x08, 0xE1, 0x39, 0x01, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E,
-        0x00, 0x60, 0x46, 0x74, 0xCD, 0xE2, 0x04, 0xE1, 0x02, 0x60, 0x00, 0xE1, 0x3F, 0x44, 0x40, 0x26,
-        0x0B, 0x00, 0x01, 0x2A, 0x05, 0x00, 0x42, 0x60, 0x09, 0xE0, 0x60, 0x60, 0x1C, 0xE0, 0x04, 0x00,
-        0x42, 0x60, 0x09, 0xE0, 0x80, 0x60, 0x1C, 0xE0, 0x04, 0x29, 0xFE, 0x01, 0xC4, 0xE2, 0x43, 0x64,
-        0x3A, 0xDB, 0x83, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x3F, 0x44, 0x02, 0x27, 0x84, 0x00, 0x20, 0x2B,
-        0xFF, 0x01, 0x80, 0xE1, 0x95, 0x60, 0x80, 0xE7, 0x61, 0x40, 0x40, 0x2B, 0x0D, 0x00, 0x05, 0x63,
-        0xA7, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0x28, 0x63, 0xFF, 0xFF, 0xFE, 0x1F, 0x01, 0x63,
-        0xA7, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0xFF, 0xB1, 0xCD, 0x81, 0xE1, 0x85, 0x1E, 0x60,
-        0xA2, 0x64, 0x44, 0xD1, 0xFF, 0xFF, 0x64, 0x43, 0xA7, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x00, 0x63, 0xA7, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xBE, 0x61,
-        0x21, 0x60, 0x72, 0x62, 0xA2, 0xD3, 0x45, 0xD1, 0x47, 0xBC, 0xE0, 0x84, 0x62, 0x45, 0x64, 0x5F,
-        0xE8, 0x83, 0xA7, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0x82, 0xF3, 0xCD, 0xE2, 0x60, 0x54,
-        0x04, 0xE1, 0x04, 0x29, 0xFE, 0x01, 0xC4, 0xE2, 0x15, 0x60, 0xA2, 0xE7, 0x38, 0x69, 0xFF, 0xFF,
-        0x68, 0x44, 0x01, 0x16, 0xFD, 0x01, 0x01, 0x2A, 0x36, 0x00, 0x03, 0x60, 0x80, 0x7C, 0xA3, 0x83,
-        0x21, 0x60, 0x72, 0x62, 0xA2, 0xD1, 0x43, 0xBB, 0xB3, 0x83, 0x95, 0x60, 0x80, 0xE7, 0xA7, 0x60,
-        0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0xE3, 0x83, 0x15, 0x60, 0xA2, 0xE7, 0x38, 0x69, 0xFF, 0xFF,
-        0x68, 0x41, 0x01, 0x16, 0xFD, 0x01, 0x63, 0x47, 0x61, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x00, 0x3A,
-        0xCC, 0x84, 0x02, 0x00, 0x07, 0x3A, 0xDC, 0x84, 0xFF, 0xB4, 0xA5, 0xDB, 0x60, 0x47, 0xE8, 0x84,
-        0x47, 0x65, 0x21, 0x60, 0x72, 0x62, 0xA2, 0xD3, 0xB4, 0x85, 0xB4, 0x83, 0x80, 0xE1, 0x95, 0x60,
-        0x80, 0xE7, 0xA7, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0x82, 0xF3, 0xCD, 0xE2, 0x60, 0x54,
-        0x04, 0x29, 0xFE, 0x01, 0xC4, 0xE2, 0x83, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x2B, 0x04, 0x00,
-        0xA6, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0xFF, 0x01, 0x83, 0xF3, 0x80, 0xE1, 0xCC, 0x84, 0xE0, 0x85,
-        0x15, 0x60, 0xA2, 0xE7, 0x1D, 0x60, 0xDE, 0x64, 0x58, 0x4F, 0x4F, 0x00, 0x1D, 0x60, 0xFA, 0x64,
-        0x58, 0x4F, 0x4B, 0x00, 0x1E, 0x60, 0x16, 0x64, 0x58, 0x4F, 0x47, 0x00, 0x1E, 0x60, 0x32, 0x64,
-        0x58, 0x4F, 0x43, 0x00, 0x1E, 0x60, 0x4E, 0x64, 0x58, 0x4F, 0x3F, 0x00, 0x1E, 0x60, 0x6A, 0x64,
-        0x58, 0x4F, 0x3B, 0x00, 0x1E, 0x60, 0x86, 0x64, 0x58, 0x4F, 0x37, 0x00, 0x01, 0x68, 0xFF, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x3F, 0x44, 0x20, 0x27, 0x00, 0x00, 0x3F, 0x40, 0x40, 0x26,
-        0x08, 0x00, 0x00, 0x60, 0x18, 0x64, 0x00, 0x60, 0x00, 0x65, 0x94, 0x84, 0xA0, 0x50, 0x1D, 0x60,
-        0x19, 0xE2, 0xC4, 0xE2, 0x00, 0x63, 0x82, 0xFD, 0x32, 0x7B, 0x4D, 0xE2, 0xBF, 0xFE, 0xC4, 0xE2,
-        0x41, 0xFF, 0xE0, 0xFE, 0xE1, 0xFE, 0xE2, 0xFE, 0x43, 0xFF, 0x44, 0xFF, 0x46, 0xFF, 0x84, 0xF3,
-        0x62, 0xFF, 0x60, 0x40, 0x05, 0x36, 0x2D, 0xFF, 0x07, 0x36, 0xD5, 0xFE, 0x08, 0xE1, 0x88, 0x60,
-        0x85, 0x71, 0x8D, 0xE2, 0xA5, 0x60, 0x5E, 0x78, 0xFF, 0xFF, 0x50, 0xEC, 0x63, 0x4A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x40, 0xEC, 0x2F, 0x58, 0xFF, 0xFF, 0x44, 0xD3, 0x80, 0x7C, 0x60, 0x48,
-        0x60, 0x47, 0x00, 0x7F, 0xB0, 0x8A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x2F, 0x58, 0xFF, 0xFF,
-        0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x02, 0x02, 0xA1, 0xFF, 0xFF, 0xFF, 0x82, 0xFF, 0x88, 0xFF,
-        0x48, 0xE2, 0x01, 0x70, 0xAE, 0xF1, 0x00, 0x6B, 0x89, 0xFF, 0x64, 0x54, 0x88, 0xFF, 0x9F, 0xFE,
-        0x02, 0x05, 0x64, 0x44, 0x60, 0x54, 0xCD, 0xE2, 0xC2, 0x64, 0x3A, 0xDB, 0xBC, 0xFF, 0xB5, 0xFF,
-        0x1D, 0xFF, 0x26, 0x44, 0x02, 0xB4, 0x40, 0x46, 0x3C, 0x44, 0x00, 0xBC, 0xFF, 0xFF, 0x06, 0x03,
-        0x27, 0x40, 0x26, 0x22, 0x03, 0x00, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x27, 0x44, 0x20, 0x2A,
-        0x04, 0x00, 0xA0, 0x60, 0x00, 0xEA, 0xB0, 0x60, 0x00, 0xEA, 0x5C, 0x4D, 0x27, 0x44, 0x18, 0xB4,
-        0x40, 0x47, 0x00, 0xE1, 0x6C, 0x40, 0x44, 0xE2, 0xC4, 0xE2, 0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF,
-        0x32, 0xF1, 0x08, 0x29, 0x09, 0x00, 0x64, 0x40, 0x07, 0x22, 0x06, 0x00, 0x43, 0xFF, 0x27, 0x44,
-        0x10, 0xBC, 0x40, 0x47, 0x00, 0x64, 0x32, 0xFB, 0x31, 0x41, 0x3C, 0x44, 0x01, 0xB1, 0x00, 0xBC,
-        0x0A, 0x02, 0x09, 0x03, 0x32, 0xF3, 0x00, 0x7C, 0x01, 0xB4, 0xFF, 0xFF, 0x04, 0x03, 0x32, 0xF9,
-        0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x00, 0x64,
-        0x33, 0xFB, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x32, 0xF3, 0x08, 0x29,
-        0x0A, 0x00, 0x60, 0x40, 0x07, 0x22, 0x07, 0x00, 0xFE, 0xB4, 0x32, 0xFB, 0x27, 0x44, 0x10, 0xBC,
-        0xF7, 0xB4, 0x40, 0x47, 0x43, 0xFF, 0x00, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x08, 0xE1, 0x31, 0x40,
-        0x01, 0x2A, 0x04, 0x00, 0x00, 0x64, 0x33, 0xFB, 0x01, 0x60, 0x0A, 0xE1, 0xE5, 0xFE, 0x13, 0x05,
-        0x27, 0x44, 0x10, 0x26, 0x13, 0x00, 0x9F, 0xFE, 0x02, 0x04, 0x02, 0xE1, 0x06, 0x00, 0x3E, 0xE1,
-        0x31, 0x44, 0x01, 0x2A, 0x02, 0x00, 0x04, 0x0A, 0xBF, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E,
-        0xAF, 0x60, 0x19, 0x78, 0xFF, 0xFF, 0xA8, 0x60, 0x09, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x08, 0x26,
-        0xFF, 0xFF, 0xBF, 0x60, 0x2A, 0x78, 0xFF, 0xFF, 0x48, 0xF3, 0x32, 0xF1, 0x00, 0x63, 0x64, 0x40,
-        0x03, 0x22, 0x3D, 0x00, 0x31, 0x40, 0x08, 0x26, 0xF4, 0x01, 0xCD, 0xE2, 0x84, 0xE1, 0x70, 0x41,
-        0xAD, 0x80, 0x71, 0x40, 0x80, 0x27, 0xED, 0x12, 0x03, 0x03, 0xBF, 0x60, 0x7C, 0x78, 0xFF, 0xFF,
-        0xA1, 0xFF, 0xFF, 0xFF, 0xC4, 0xE2, 0x32, 0xFD, 0x60, 0x40, 0x01, 0x2A, 0xDF, 0x01, 0x00, 0x63,
-        0x32, 0xFD, 0x6C, 0x40, 0x3C, 0x46, 0x3E, 0xF2, 0x2A, 0xF0, 0x27, 0x41, 0x44, 0x48, 0x20, 0xB9,
-        0x01, 0xB4, 0xF7, 0xB1, 0x0A, 0x03, 0x64, 0x40, 0x08, 0x27, 0x07, 0x00, 0x0F, 0x60, 0x92, 0x63,
-        0x00, 0x64, 0x45, 0xFB, 0x46, 0xFB, 0xBD, 0xDB, 0xA3, 0xDB, 0xCB, 0x0A, 0x41, 0x47, 0x3F, 0x40,
-        0x01, 0x2B, 0x04, 0x00, 0xF6, 0xFE, 0x67, 0x4C, 0x05, 0x60, 0x69, 0x6B, 0x02, 0xE1, 0x01, 0x60,
-        0x08, 0xE1, 0xF0, 0xFE, 0x84, 0xFF, 0xBF, 0x60, 0xAD, 0x64, 0x40, 0x42, 0x82, 0xFF, 0xE5, 0xFE,
-        0x03, 0x04, 0xAC, 0x60, 0x41, 0x78, 0xFF, 0xFF, 0xE4, 0xFE, 0x0A, 0x04, 0x1D, 0xFF, 0x00, 0xEB,
-        0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA,
-        0x43, 0xFF, 0xE6, 0xFE, 0x03, 0x05, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0x3C, 0x44, 0x60, 0x46,
-        0x0F, 0xF0, 0x40, 0x42, 0x64, 0x40, 0x01, 0x2A, 0x03, 0x00, 0xAB, 0x60, 0x03, 0x78, 0xFF, 0xFF,
-        0x0B, 0x64, 0x3A, 0xDB, 0x1C, 0x42, 0x22, 0x46, 0x13, 0xF2, 0xFF, 0x65, 0x60, 0x47, 0x2A, 0xF2,
-        0x40, 0x45, 0x40, 0x48, 0x04, 0x2B, 0x17, 0x00, 0x16, 0xF2, 0x1D, 0xF2, 0x40, 0x43, 0x0F, 0xF2,
-        0x40, 0x44, 0x25, 0x5E, 0x3F, 0x40, 0x01, 0x27, 0x40, 0x45, 0x0F, 0x64, 0x14, 0xF0, 0x35, 0xF2,
-        0xA0, 0x82, 0x0F, 0xB4, 0xCA, 0x85, 0xD4, 0x80, 0x10, 0xF2, 0x01, 0x02, 0x2B, 0xFA, 0x27, 0x44,
-        0x40, 0xBC, 0x40, 0x47, 0x13, 0x00, 0x17, 0xF2, 0x2C, 0xF0, 0x40, 0x43, 0x1B, 0xF2, 0x1D, 0xFA,
-        0x40, 0x44, 0x64, 0x40, 0x01, 0x2A, 0x02, 0x00, 0xAB, 0xFC, 0x05, 0x00, 0x28, 0x40, 0xA4, 0x36,
-        0x02, 0x00, 0x11, 0xF2, 0x2B, 0xFA, 0x27, 0x44, 0xBF, 0xB4, 0x40, 0x47, 0x28, 0x40, 0x40, 0x2B,
-        0xFF, 0xFF, 0xAF, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0x22, 0x46, 0x2C, 0xF0, 0x27, 0x44, 0xDF, 0xB4,
-        0x40, 0x47, 0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D,
-        0x08, 0x60, 0x00, 0x6B, 0x64, 0x40, 0x01, 0x2A, 0x01, 0x00, 0x13, 0x00, 0x2A, 0xF0, 0x01, 0x65,
-        0x64, 0x40, 0xA4, 0x3A, 0x04, 0x65, 0x27, 0x44, 0x34, 0x87, 0x36, 0xF3, 0xB4, 0xFF, 0x60, 0x5B,
-        0x4D, 0xE2, 0x04, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x0A, 0xE1, 0x2B, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x81, 0x3E, 0x06, 0x64, 0x3A, 0xDB, 0x22, 0x46, 0x01, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xBF, 0x60,
-        0x85, 0x78, 0xFF, 0xFF, 0xB5, 0xFF, 0xA1, 0xFF, 0x6C, 0x40, 0x3F, 0x40, 0x01, 0x2B, 0x03, 0x00,
-        0x67, 0x4C, 0x05, 0x60, 0x69, 0x6B, 0x02, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0xC4, 0xE2, 0x08, 0x64,
-        0x3A, 0xDB, 0xF0, 0xFE, 0x25, 0x46, 0x01, 0xF2, 0x61, 0x45, 0xD4, 0x9E, 0x21, 0x46, 0x16, 0xFA,
-        0x2A, 0x44, 0x72, 0x45, 0x24, 0xFA, 0x95, 0xF3, 0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40,
-        0x01, 0x26, 0x64, 0x44, 0x95, 0xF9, 0x25, 0xFA, 0x96, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x96, 0xFB,
-        0x28, 0xFA, 0x97, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x97, 0xFB, 0x29, 0xFA, 0x2D, 0x44, 0x04, 0x2A,
-        0x06, 0x00, 0x28, 0x40, 0xA4, 0x36, 0x03, 0x00, 0xA9, 0x60, 0xC9, 0x78, 0xFF, 0xFF, 0x94, 0xFC,
-        0x1F, 0x60, 0x9A, 0x65, 0xA5, 0xD1, 0x28, 0x44, 0x08, 0x2A, 0x51, 0x00, 0x03, 0x2B, 0x01, 0x00,
-        0x4E, 0x00, 0x64, 0x40, 0x00, 0x36, 0x4B, 0x00, 0x32, 0xF2, 0x2F, 0xF0, 0x50, 0xFE, 0x01, 0x2A,
-        0x03, 0x00, 0x01, 0x61, 0x8F, 0xF3, 0x31, 0x00, 0xD0, 0x80, 0x33, 0xF2, 0x30, 0xF0, 0x34, 0xF2,
-        0xD0, 0x80, 0x31, 0xF0, 0xFF, 0xFF, 0xD0, 0x80, 0x60, 0x47, 0x34, 0x0C, 0xFF, 0xB4, 0x12, 0x60,
-        0xCE, 0x65, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0xFF, 0xFF, 0x31, 0x18, 0x60, 0x43, 0x50, 0xFE,
-        0x66, 0x41, 0x32, 0xF0, 0x63, 0x46, 0x03, 0xF2, 0x61, 0x46, 0xD0, 0x80, 0x33, 0xF0, 0x63, 0x46,
-        0x04, 0xF2, 0x61, 0x46, 0xD0, 0x80, 0x34, 0xF0, 0x63, 0x46, 0x05, 0xF2, 0xFF, 0xFF, 0xD0, 0x80,
-        0xFF, 0xFF, 0x04, 0x0C, 0x00, 0xF2, 0x61, 0x46, 0x1A, 0x18, 0xE8, 0x01, 0x06, 0xF0, 0x8F, 0xF3,
-        0x61, 0x46, 0x02, 0x61, 0x64, 0x40, 0x02, 0x2A, 0x12, 0x00, 0xFC, 0xA0, 0xFF, 0xFF, 0x04, 0x0E,
-        0x61, 0x44, 0x14, 0xFA, 0x11, 0xFC, 0x0B, 0x00, 0x2C, 0xF2, 0x2F, 0xFA, 0x2D, 0xF2, 0x30, 0xFA,
-        0x2E, 0xF2, 0x31, 0xFA, 0x1D, 0xFF, 0x26, 0x44, 0x02, 0xBC, 0x40, 0x46, 0x20, 0x00, 0x26, 0x43,
-        0x84, 0xBB, 0xFC, 0xB3, 0x21, 0x46, 0x01, 0x5D, 0x0F, 0xFC, 0x5C, 0x46, 0x25, 0x44, 0x06, 0xFA,
-        0x05, 0xFF, 0x27, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x50, 0xFE, 0x28, 0x40, 0x08, 0x3A, 0x12, 0x00,
-        0x2F, 0xF2, 0x30, 0xF0, 0x60, 0x43, 0x31, 0xF2, 0x22, 0x46, 0x64, 0x41, 0x2C, 0xF0, 0x2D, 0xF0,
-        0xD3, 0x80, 0x2E, 0xF0, 0xD1, 0x80, 0xD0, 0x80, 0x27, 0x44, 0x09, 0x0C, 0x03, 0x00, 0x27, 0x44,
-        0x06, 0x22, 0x05, 0x00, 0xB8, 0xB4, 0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xD4, 0x64,
-        0x40, 0x48, 0x0D, 0x64, 0x3A, 0xDB, 0x21, 0x46, 0x1C, 0xF2, 0x62, 0xF1, 0xFF, 0xB4, 0xD0, 0x80,
-        0xFF, 0xFF, 0x01, 0x06, 0x64, 0x44, 0x40, 0x45, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64,
-        0x37, 0x3A, 0x03, 0x00, 0x04, 0x7F, 0x40, 0x45, 0x15, 0x64, 0x6E, 0x3A, 0x03, 0x00, 0x84, 0x7F,
-        0x40, 0x45, 0x0B, 0x64, 0x40, 0x44, 0x00, 0x63, 0x28, 0x44, 0xA4, 0x36, 0x07, 0x00, 0x04, 0x2B,
-        0x05, 0x00, 0x30, 0xF3, 0x24, 0x45, 0xD4, 0x84, 0xCA, 0x65, 0xD4, 0x83, 0xD4, 0x64, 0x1A, 0x00,
-        0x0F, 0x64, 0x3A, 0xDB, 0x21, 0x46, 0x70, 0x63, 0x1C, 0xF2, 0xCA, 0x65, 0x40, 0x45, 0x0A, 0x36,
-        0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x3A, 0x03, 0x00, 0x04, 0x7F, 0x40, 0x45, 0x15, 0x64,
-        0x6E, 0x3A, 0x03, 0x00, 0x84, 0x7F, 0x40, 0x45, 0x0B, 0x64, 0x40, 0x44, 0x2B, 0xF2, 0xC4, 0x85,
-        0xD4, 0x83, 0xC4, 0x64, 0x40, 0x48, 0x2F, 0xF0, 0xB0, 0xF0, 0xB1, 0xF2, 0x00, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x80, 0x4E, 0x83, 0x4C, 0x9A, 0xFF, 0x84, 0x4C, 0x85, 0x4C, 0x81, 0x4C, 0xA1, 0xFF,
-        0x98, 0xFF, 0x87, 0x4F, 0x87, 0x4C, 0x87, 0x4F, 0x87, 0x4D, 0x87, 0x4C, 0x01, 0x08, 0x01, 0x00,
-        0xFF, 0xFF, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0x44,
-        0xBC, 0xFF, 0xC4, 0xE2, 0x0C, 0x74, 0x04, 0xE1, 0xA1, 0xFF, 0x35, 0xF3, 0xC4, 0xE2, 0x60, 0x54,
-        0x89, 0xFF, 0x13, 0x74, 0x88, 0xFF, 0xB5, 0xFF, 0x47, 0xFF, 0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49,
-        0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x27, 0x44, 0x01, 0x2A,
-        0x05, 0x00, 0xFE, 0xB4, 0x40, 0x47, 0xA8, 0x60, 0x89, 0x78, 0xFF, 0xFF, 0xA7, 0x60, 0x8E, 0x78,
-        0xFF, 0xFF, 0x28, 0x40, 0xB4, 0x3A, 0x09, 0x00, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4,
-        0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x9B, 0x01, 0x28, 0x44, 0xD4, 0x36, 0x03, 0x00,
-        0xAA, 0x60, 0xEA, 0x78, 0xFF, 0xFF, 0x48, 0xE2, 0x27, 0x44, 0xFB, 0xB4, 0x40, 0x47, 0x21, 0x60,
-        0x98, 0x63, 0xA3, 0xD3, 0xB5, 0x60, 0x58, 0x4D, 0xE3, 0x78, 0xFF, 0xFF, 0x34, 0xFB, 0x1C, 0x42,
-        0x22, 0x46, 0x2A, 0xF0, 0xF7, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDA, 0x60, 0x40, 0x40, 0x2B,
-        0xCC, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x22, 0x26, 0x42, 0x00, 0x01, 0x26, 0x03, 0x00,
-        0x04, 0x26, 0x07, 0x00, 0xC2, 0x00, 0x04, 0x2B, 0xC0, 0x00, 0x88, 0xF3, 0xFF, 0xFF, 0x60, 0x46,
-        0x01, 0x00, 0x07, 0xF4, 0x47, 0xF2, 0xFF, 0xFF, 0xDC, 0x84, 0x47, 0xFA, 0x0D, 0x60, 0x3E, 0x62,
-        0x80, 0xFF, 0xC4, 0x60, 0x78, 0x44, 0x02, 0xA4, 0xA2, 0xDB, 0x7D, 0x78, 0xFF, 0xFF, 0x82, 0xFF,
-        0x88, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43, 0x22, 0x46, 0x22, 0xF2,
-        0x63, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x47, 0xF0, 0x64, 0x41, 0x64, 0x47,
-        0xFF, 0xB4, 0x60, 0x5F, 0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47, 0x22, 0x46, 0x3A, 0xFA,
-        0x64, 0x44, 0x20, 0x7F, 0x34, 0x94, 0x3B, 0xFA, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F,
-        0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x85, 0x00,
-        0x2A, 0xF2, 0x00, 0x60, 0x7C, 0x62, 0x60, 0x40, 0x40, 0x2B, 0x27, 0x00, 0xA2, 0xD3, 0x00, 0x61,
-        0x60, 0xFE, 0xA0, 0xD3, 0xDE, 0x82, 0xA2, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84,
-        0xF1, 0x81, 0xC0, 0x2B, 0x04, 0x00, 0x80, 0x2A, 0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B,
-        0x03, 0x00, 0x60, 0x47, 0xDC, 0x87, 0x01, 0x61, 0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB,
-        0x60, 0xFE, 0xDA, 0x82, 0xA2, 0xD1, 0xFF, 0xFF, 0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A,
-        0x01, 0x00, 0x00, 0x64, 0xA2, 0xDB, 0xFF, 0xFF, 0x20, 0xFE, 0x00, 0x60, 0x7C, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0xA0, 0xD3, 0x5A, 0xD1, 0x3A, 0xFA, 0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF,
-        0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A, 0x64, 0x44,
-        0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x80, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1,
-        0x64, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A,
-        0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xE7, 0x7F, 0xA0, 0x5A, 0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5A, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A,
-        0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xED, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F,
-        0xA0, 0x5A, 0x08, 0x60, 0x00, 0xEA, 0x65, 0x44, 0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60,
-        0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x0B, 0xF2, 0xFF, 0xFF, 0x7F, 0xB4,
-        0x0C, 0xF0, 0x04, 0x02, 0x64, 0x46, 0x00, 0xF0, 0x04, 0x64, 0x22, 0x46, 0x03, 0xFA, 0x60, 0x41,
-        0x64, 0x46, 0x01, 0xF2, 0xFC, 0xA1, 0x61, 0x45, 0xD4, 0x84, 0xFF, 0xFF, 0x08, 0x02, 0x00, 0xF0,
-        0x04, 0x63, 0x64, 0x46, 0x01, 0xF2, 0x22, 0x46, 0x1A, 0xFA, 0x03, 0xFC, 0x02, 0x00, 0x22, 0x46,
-        0x1A, 0xFA, 0x35, 0xF2, 0x04, 0xF8, 0xDC, 0x84, 0x35, 0xFA, 0x14, 0xF2, 0x0F, 0xB5, 0x0F, 0xB4,
-        0xCC, 0x84, 0x94, 0x80, 0x04, 0x60, 0x00, 0x65, 0x2A, 0xF2, 0x01, 0x02, 0x94, 0x84, 0x2A, 0xFA,
-        0x95, 0xFC, 0x06, 0x00, 0xC4, 0x3A, 0x07, 0x00, 0x27, 0x44, 0xFD, 0xB4, 0x40, 0x47, 0x48, 0xE2,
-        0xA8, 0x60, 0x28, 0x78, 0xFF, 0xFF, 0x28, 0x44, 0x04, 0x26, 0x05, 0x00, 0x68, 0x3A, 0x03, 0x00,
-        0x32, 0x44, 0x00, 0x27, 0x03, 0x00, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0x0A, 0x64, 0x3A, 0xDB,
-        0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0x0E, 0x64, 0x3A, 0xDB, 0x10, 0x60, 0x00, 0x65, 0x3C, 0x46,
-        0x2A, 0xF2, 0x13, 0xF0, 0xA4, 0x84, 0xB4, 0xBC, 0x40, 0x48, 0x62, 0xF1, 0x64, 0x47, 0xFF, 0xB4,
-        0x60, 0x45, 0xD0, 0x80, 0x70, 0x61, 0x01, 0x06, 0x64, 0x44, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36,
-        0x38, 0x64, 0x37, 0x36, 0x15, 0x64, 0x6E, 0x36, 0x0B, 0x64, 0x40, 0x4E, 0xA0, 0x63, 0x0A, 0x64,
-        0x65, 0x40, 0x0A, 0x36, 0x03, 0x00, 0x38, 0x61, 0x14, 0x64, 0xEB, 0x83, 0x40, 0x45, 0x43, 0x44,
-        0x02, 0x60, 0x5E, 0x65, 0x2A, 0xF2, 0x2B, 0xF2, 0x60, 0x40, 0x04, 0x2B, 0x04, 0x00, 0x2E, 0x45,
-        0xD4, 0x85, 0xC5, 0x84, 0x05, 0x00, 0x1B, 0xF0, 0xC5, 0x84, 0xC0, 0x84, 0x2E, 0x45, 0xC4, 0x84,
-        0x60, 0x43, 0x28, 0x44, 0x00, 0xE1, 0xA1, 0xFF, 0x80, 0x4E, 0x83, 0x4C, 0x9A, 0xFF, 0x56, 0x62,
-        0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x5C, 0x62, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0xA1, 0xFF,
-        0x98, 0xFF, 0x87, 0x4F, 0x87, 0x4C, 0x87, 0x4F, 0x87, 0x4D, 0x87, 0x4C, 0x01, 0x08, 0x01, 0x00,
-        0xFF, 0xFF, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0x44,
-        0xBC, 0xFF, 0xB5, 0xFF, 0x47, 0xFF, 0x27, 0x44, 0x02, 0xBC, 0x40, 0x47, 0x36, 0xF3, 0xB7, 0xFF,
-        0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x60, 0x5B, 0x4D, 0xE2, 0xA8, 0x60,
-        0x81, 0x78, 0xFF, 0xFF, 0x21, 0x46, 0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF,
-        0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x26, 0x43, 0x25, 0x44, 0x06, 0xFA, 0x2A, 0x44,
-        0x72, 0x45, 0x24, 0xFA, 0x95, 0xF3, 0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40, 0x01, 0x26,
-        0x64, 0x44, 0x95, 0xF9, 0x25, 0xFA, 0x96, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x96, 0xFB, 0x28, 0xFA,
-        0x97, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x97, 0xFB, 0x29, 0xFA, 0x2D, 0x40, 0x01, 0x2A, 0x0E, 0x00,
-        0x1D, 0xFF, 0x26, 0x44, 0x02, 0xBC, 0x40, 0x46, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4,
-        0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x30, 0xF1, 0x50, 0x00, 0xFC, 0xB3, 0x32, 0x40,
-        0x01, 0x2A, 0x06, 0x00, 0x0A, 0xBB, 0x0F, 0xFC, 0xCB, 0xFE, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF,
-        0x2D, 0x44, 0x04, 0x26, 0x02, 0x00, 0x0F, 0xFC, 0x05, 0xFF, 0x30, 0xF1, 0x27, 0x44, 0x05, 0x22,
-        0x2D, 0x00, 0xFA, 0xB4, 0x40, 0x47, 0x2D, 0x44, 0x10, 0x2A, 0x24, 0x00, 0x28, 0x40, 0xD4, 0x3A,
-        0x21, 0x00, 0x31, 0x40, 0x08, 0x26, 0x00, 0x7C, 0x2B, 0x44, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28,
-        0x64, 0x44, 0xC4, 0x84, 0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00,
-        0x20, 0x29, 0x6D, 0xE2, 0x12, 0x60, 0xC0, 0x63, 0x1D, 0xF0, 0xC0, 0x64, 0xC0, 0x84, 0xA3, 0xD1,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA3, 0xDB, 0xA8, 0x60,
-        0x89, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x07, 0x00, 0x02, 0x2A, 0x05, 0x00,
-        0xFD, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x05, 0x64, 0x3A, 0xDB, 0x28, 0x44,
-        0xA4, 0x3A, 0x04, 0x00, 0x39, 0xF1, 0x25, 0x44, 0x0A, 0x36, 0x38, 0xF1, 0x31, 0x40, 0x08, 0x26,
-        0x00, 0x7C, 0x2B, 0x44, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28, 0x64, 0x44, 0xC4, 0x84, 0xFF, 0xFF,
-        0x04, 0x24, 0x00, 0xB4, 0x28, 0x40, 0xE4, 0x36, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00,
-        0x20, 0x29, 0x6D, 0xE2, 0xA7, 0x60, 0x8E, 0x78, 0xFF, 0xFF, 0x21, 0x46, 0xB5, 0xFF, 0xBC, 0xFF,
-        0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x27, 0x44,
-        0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xEA, 0x01,
-        0x27, 0x44, 0x05, 0x22, 0x09, 0x00, 0xBA, 0xB4, 0x40, 0x47, 0x3C, 0x46, 0x02, 0x64, 0x31, 0xFB,
-        0xC0, 0xFE, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x02, 0x2A, 0x06, 0x00, 0xFD, 0xB4,
-        0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xF4, 0x01, 0xF3, 0x0A, 0x7C, 0x50, 0x6D, 0xE2,
-        0xF0, 0x01, 0x72, 0x45, 0xDC, 0x84, 0x95, 0xFB, 0x11, 0x64, 0x3A, 0xDB, 0x96, 0xF3, 0x06, 0x04,
-        0xDC, 0x84, 0x96, 0xFB, 0x97, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x97, 0xFB, 0xA7, 0x60, 0xA6, 0x78,
-        0xFF, 0xFF, 0x00, 0x61, 0x12, 0x64, 0x3A, 0xDB, 0x16, 0x60, 0xBA, 0x63, 0xBD, 0xD3, 0x72, 0x45,
-        0x44, 0x8A, 0x02, 0x28, 0x02, 0x00, 0xE4, 0xE2, 0xDD, 0x81, 0x02, 0x28, 0x02, 0x00, 0xE4, 0xE2,
-        0xDD, 0x81, 0xBD, 0xD3, 0x95, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9,
-        0xC4, 0x84, 0x60, 0x55, 0x2A, 0x52, 0x95, 0xFB, 0x02, 0x24, 0x01, 0xB9, 0xBD, 0xD3, 0x96, 0xF1,
-        0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9, 0xC4, 0x84, 0x96, 0xFB, 0x02, 0x24,
-        0x01, 0xB9, 0xBD, 0xD3, 0x97, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0xC4, 0x84, 0x97, 0xFB, 0xA8, 0x60,
-        0x0C, 0x78, 0xFF, 0xFF, 0xAE, 0x01, 0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x25, 0x09, 0x00, 0x04, 0x25,
-        0x03, 0x00, 0x47, 0xFF, 0x32, 0x74, 0xA5, 0x01, 0xC4, 0xE2, 0xAF, 0x60, 0x19, 0x78, 0xFF, 0xFF,
-        0x4C, 0x4E, 0x47, 0xFF, 0x32, 0x74, 0xCD, 0xE2, 0xAC, 0x60, 0x8F, 0x78, 0x00, 0x61, 0x10, 0x64,
-        0x3A, 0xDB, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0x5C, 0x4D,
-        0x26, 0x44, 0x02, 0x26, 0x0C, 0x00, 0x3E, 0x46, 0x09, 0xF2, 0x1E, 0x41, 0x03, 0x1B, 0xAE, 0x60,
-        0xCB, 0x78, 0xFF, 0xFF, 0x40, 0x5E, 0xFD, 0xFB, 0x21, 0x44, 0x02, 0x64, 0x40, 0x46, 0x41, 0x5D,
-        0x21, 0x46, 0x00, 0xF2, 0x46, 0x45, 0x87, 0xFC, 0x4C, 0xE2, 0x01, 0x64, 0x33, 0xFB, 0x01, 0x60,
-        0x0E, 0xE1, 0x03, 0xE1, 0x3F, 0x40, 0x01, 0x27, 0x00, 0x00, 0x21, 0x69, 0xB6, 0xFF, 0xA1, 0xFF,
-        0x6C, 0x5E, 0xB6, 0xFF, 0xB7, 0xFF, 0x60, 0x5C, 0x20, 0x64, 0x3A, 0xDB, 0x68, 0x43, 0x26, 0xFC,
-        0x22, 0x69, 0x64, 0x44, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x5F, 0x60, 0x43, 0x26, 0xF2, 0xFF, 0xFF,
-        0x68, 0x5F, 0x26, 0xFA, 0x3A, 0x69, 0x1D, 0xFC, 0x2E, 0x44, 0x36, 0xF1, 0x1C, 0xFA, 0xC3, 0x94,
-        0xCD, 0xE2, 0x2E, 0x44, 0x14, 0x36, 0x12, 0x00, 0x0A, 0x36, 0x0F, 0x00, 0x63, 0x45, 0xE3, 0x83,
-        0xE3, 0x83, 0xC7, 0x83, 0xE3, 0x83, 0xC7, 0x83, 0xFF, 0xFF, 0x37, 0x36, 0x05, 0x00, 0x6E, 0x36,
-        0x04, 0x00, 0xAE, 0x60, 0xE3, 0x78, 0xFF, 0xFF, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83,
-        0xFF, 0xFF, 0x80, 0x27, 0xCF, 0x83, 0x1B, 0xFC, 0x01, 0x64, 0x4F, 0xFB, 0xA1, 0xFF, 0x1C, 0xF2,
-        0x29, 0x41, 0xF9, 0x81, 0x52, 0x4A, 0x71, 0x89, 0x68, 0x5F, 0x27, 0xFA, 0x6C, 0x40, 0x03, 0x15,
-        0xAE, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0x88, 0x60, 0x85, 0x71, 0x8D, 0xE2, 0x99, 0xF1, 0xFC, 0xA3,
-        0xD3, 0x80, 0x43, 0x43, 0x03, 0x04, 0xAE, 0x60, 0xEB, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x01, 0x2A,
-        0x4C, 0x00, 0x9A, 0xFF, 0x23, 0x43, 0x18, 0x61, 0xA1, 0xFF, 0x8C, 0x44, 0xCB, 0x83, 0x2A, 0xFA,
-        0x40, 0x48, 0x40, 0x27, 0x04, 0xA1, 0x60, 0x40, 0x03, 0x2B, 0x01, 0x00, 0x06, 0xA1, 0x88, 0xB0,
-        0x88, 0x36, 0xD9, 0x81, 0x62, 0x45, 0x23, 0x44, 0x54, 0x94, 0x28, 0x40, 0x04, 0x26, 0x00, 0x64,
-        0x3F, 0xFA, 0xC9, 0x81, 0x65, 0x42, 0x7A, 0xDC, 0x00, 0xB9, 0xFD, 0x1C, 0x00, 0xF4, 0x6E, 0x61,
-        0x10, 0x62, 0x14, 0x02, 0x05, 0x1D, 0x12, 0x1E, 0x0C, 0x00, 0x00, 0xF4, 0x7C, 0x61, 0x02, 0x62,
-        0x7A, 0xDC, 0x63, 0x40, 0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1, 0x08, 0x1E, 0x02, 0x02, 0x00, 0xF4,
-        0x02, 0x62, 0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0x6C, 0x44, 0x5A, 0xDA, 0x98, 0xFF, 0x01, 0x60,
-        0x08, 0xE1, 0x81, 0xE1, 0xA1, 0xFF, 0x6C, 0x40, 0xA1, 0xFF, 0x47, 0xFF, 0x26, 0x44, 0xFD, 0xB4,
-        0x84, 0xBC, 0x01, 0x15, 0x7F, 0xB4, 0x40, 0x46, 0xA1, 0xFF, 0x6C, 0x40, 0x14, 0x63, 0x01, 0x11,
-        0x01, 0x00, 0xFD, 0x1F, 0xAE, 0x60, 0x61, 0x78, 0xFF, 0xFF, 0x9A, 0xFF, 0x54, 0x63, 0x12, 0x64,
-        0x40, 0x46, 0x00, 0x64, 0x0F, 0xFA, 0xA1, 0xFF, 0xCB, 0xF1, 0x12, 0x61, 0x50, 0xFE, 0x8C, 0x44,
-        0xCC, 0xF0, 0xBD, 0xDA, 0x40, 0x48, 0x04, 0x26, 0x40, 0x00, 0xA1, 0xFF, 0x8C, 0x44, 0xBD, 0xDA,
-        0x30, 0xFB, 0x6C, 0x44, 0xBD, 0xDA, 0xFF, 0xFF, 0x01, 0x26, 0x24, 0x00, 0xD0, 0x80, 0xA1, 0xFF,
-        0x8C, 0x44, 0x6C, 0x5C, 0xF2, 0xFE, 0xBD, 0xDA, 0xCD, 0xF3, 0xD4, 0x80, 0xD0, 0x80, 0xBD, 0xD8,
-        0x2D, 0x44, 0x15, 0x0C, 0x32, 0x40, 0x02, 0x2A, 0x07, 0x00, 0x28, 0x42, 0x0C, 0xB2, 0x08, 0x3A,
-        0x03, 0x00, 0x10, 0xBC, 0x40, 0x4D, 0x4D, 0x00, 0x03, 0x0A, 0xAE, 0x60, 0xF9, 0x78, 0xFF, 0xFF,
-        0x11, 0xBC, 0x40, 0x4D, 0x28, 0x45, 0xBF, 0x60, 0xFF, 0x64, 0x24, 0x88, 0x42, 0x00, 0x30, 0xBC,
-        0x40, 0x4D, 0x3F, 0x00, 0x20, 0xB9, 0x5C, 0x8E, 0xA1, 0xFF, 0x8C, 0x44, 0xBD, 0xDA, 0xDC, 0x9C,
-        0x6C, 0x44, 0xF2, 0xFE, 0xBD, 0xDA, 0x08, 0x28, 0x44, 0x4E, 0xDC, 0x84, 0x2E, 0x5C, 0xB0, 0x84,
-        0xEF, 0xB1, 0x08, 0x24, 0x40, 0xB9, 0x41, 0x46, 0x2C, 0x00, 0x8C, 0x44, 0x04, 0x61, 0xBD, 0xDA,
-        0x50, 0xFE, 0x80, 0x27, 0x00, 0x64, 0x30, 0xFB, 0x8C, 0x44, 0xBD, 0xDA, 0xD0, 0x80, 0x8C, 0x44,
-        0xBD, 0xDA, 0xD4, 0x80, 0x00, 0x65, 0x8C, 0x44, 0xCD, 0xF1, 0xBD, 0xDA, 0xD0, 0x80, 0x28, 0x44,
-        0x03, 0x0C, 0xA0, 0x2A, 0x0A, 0x00, 0x11, 0x00, 0x10, 0x65, 0x60, 0x40, 0xC4, 0x36, 0x04, 0x00,
-        0xD4, 0x3A, 0x08, 0x00, 0x27, 0x40, 0x40, 0x26, 0x30, 0x65, 0x00, 0x64, 0x3F, 0xFA, 0x46, 0x4E,
-        0x35, 0x8D, 0x5F, 0x00, 0x40, 0x26, 0xF9, 0x01, 0x30, 0x65, 0x9D, 0xDC, 0x9D, 0xDC, 0x9D, 0xDC,
-        0xF4, 0x01, 0x00, 0xE1, 0x23, 0x43, 0xE8, 0xA3, 0x6A, 0x62, 0x9A, 0xFF, 0xA1, 0xFF, 0x28, 0x44,
-        0x03, 0x2B, 0x04, 0x00, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x28, 0x44, 0x88, 0xB0, 0x88, 0x2A,
-        0x03, 0x00, 0x70, 0x62, 0x7A, 0xDC, 0x28, 0x44, 0x40, 0x2B, 0x13, 0x00, 0x72, 0x62, 0x7A, 0xDC,
-        0x04, 0xE6, 0x7A, 0xDC, 0x3B, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x2B, 0x02, 0x00, 0x7A, 0xDC,
-        0x7A, 0xDC, 0x08, 0x60, 0x00, 0xEB, 0xFC, 0xA3, 0x25, 0xFF, 0x3F, 0xFC, 0x04, 0xA3, 0xB0, 0xFF,
-        0x01, 0x00, 0x3F, 0xFC, 0xCF, 0x83, 0xDF, 0x83, 0x04, 0x02, 0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61,
-        0x1F, 0x00, 0x27, 0x03, 0xCB, 0x83, 0xFF, 0x60, 0xFE, 0x65, 0x0E, 0xA3, 0xA7, 0x84, 0xF2, 0xA3,
-        0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61, 0x7A, 0xDC, 0xFE, 0x1C, 0x03, 0x1D, 0x7C, 0xA8, 0xD9, 0x81,
-        0x0A, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xA7, 0x84, 0x7A, 0x61, 0x7A, 0xDC, 0xFE, 0x1C, 0xF9, 0x1D,
-        0x7C, 0xA8, 0xD9, 0x81, 0xF6, 0x03, 0xFF, 0xB1, 0x0C, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62,
-        0xA1, 0xFF, 0x01, 0x60, 0x0C, 0xE1, 0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0xCD, 0x81, 0x6C, 0x44,
-        0x5A, 0xDA, 0x98, 0xFF, 0x00, 0xE6, 0x7C, 0x44, 0x33, 0xFB, 0x01, 0x60, 0x0C, 0xE1, 0x83, 0xE1,
-        0xA1, 0xFF, 0x8C, 0x44, 0x46, 0x45, 0xA1, 0xFF, 0x14, 0x63, 0x01, 0x10, 0xFE, 0x1F, 0x01, 0x60,
-        0x08, 0xE1, 0x0A, 0x64, 0x60, 0x54, 0x47, 0xFF, 0x50, 0x4B, 0x67, 0x50, 0x69, 0xE2, 0x6A, 0x40,
-        0x40, 0x2B, 0x01, 0x15, 0x29, 0x00, 0x6C, 0x40, 0x28, 0x40, 0x03, 0x26, 0x15, 0x00, 0x31, 0x40,
-        0x20, 0x2A, 0x03, 0x00, 0x28, 0x40, 0x50, 0x3A, 0x0F, 0x00, 0x2D, 0x44, 0x20, 0x2A, 0x0C, 0x00,
-        0x2B, 0x44, 0xAC, 0x80, 0x28, 0x40, 0xB4, 0x3A, 0x03, 0x00, 0x02, 0x03, 0x30, 0xFB, 0x04, 0x00,
-        0x2B, 0x50, 0xA8, 0x60, 0x92, 0x78, 0x04, 0xE1, 0x04, 0xE1, 0xA1, 0xFF, 0x35, 0xF1, 0x26, 0x44,
-        0x64, 0x54, 0xCD, 0xE2, 0x84, 0xBC, 0x2D, 0x40, 0x0C, 0x22, 0xFD, 0xB4, 0x40, 0x46, 0x23, 0x64,
-        0x3A, 0xDB, 0xAB, 0x60, 0x6A, 0x78, 0xFF, 0xFF, 0x27, 0x40, 0x26, 0x22, 0x04, 0x00, 0x02, 0x64,
-        0x31, 0xFB, 0xC0, 0xFE, 0xFF, 0xFF, 0x6C, 0x40, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D,
-        0x08, 0x60, 0x00, 0x6B, 0x37, 0xF3, 0x2B, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x28, 0x65, 0x44,
-        0x60, 0x50, 0xA0, 0x4C, 0x20, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0x35, 0xF1, 0x74, 0x44, 0xC0, 0x94,
-        0x32, 0x40, 0x02, 0x2A, 0x18, 0x00, 0x28, 0x44, 0xA4, 0x36, 0x04, 0x00, 0x0C, 0xB4, 0xFF, 0xFF,
-        0x04, 0x36, 0x11, 0x00, 0x26, 0x43, 0xFD, 0xB3, 0x04, 0xBB, 0x43, 0x46, 0x01, 0x2A, 0x03, 0x00,
-        0x28, 0x47, 0x40, 0xBF, 0x40, 0x48, 0x0A, 0xBB, 0x0F, 0xFC, 0x50, 0x4B, 0x67, 0x50, 0x00, 0x64,
-        0x30, 0xFB, 0x05, 0xFF, 0xC6, 0x01, 0x24, 0x64, 0x3A, 0xDB, 0x28, 0x44, 0x04, 0x2A, 0x03, 0x00,
-        0xA7, 0x60, 0x8E, 0x78, 0xFF, 0xFF, 0x1D, 0xFF, 0x48, 0xE2, 0x27, 0x44, 0x06, 0x22, 0x05, 0x00,
-        0xF9, 0xB4, 0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x26, 0x40, 0x10, 0x2A, 0x18, 0x00,
-        0x26, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0xFF, 0xB4, 0xC0, 0xA0, 0xFF, 0xFF, 0x11, 0x0E, 0x98, 0xF1,
-        0x1E, 0x60, 0xF8, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0xAC, 0x60, 0x05, 0x78, 0xFF, 0xFF, 0x98, 0xF1, 0x1E, 0x60, 0xFA, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x2A, 0x64, 0x3A, 0xDB, 0x5C, 0x41, 0x87, 0xE1,
-        0xA1, 0xFF, 0x6C, 0x40, 0x02, 0x00, 0x29, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x08, 0xE1, 0x87, 0xE1,
-        0xA1, 0xFF, 0x6C, 0x40, 0x11, 0x00, 0x1F, 0x60, 0x0C, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84,
-        0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0xF1, 0x01, 0x01, 0x60, 0x08, 0xE1, 0x21, 0x64, 0x3A, 0xDB,
-        0x03, 0x00, 0x01, 0x60, 0x08, 0xE1, 0x6C, 0x40, 0x00, 0x64, 0x33, 0xFB, 0x32, 0x74, 0x40, 0x63,
-        0x01, 0x16, 0xFE, 0x01, 0x01, 0x68, 0x01, 0x11, 0x09, 0x00, 0xA7, 0x6A, 0x22, 0x64, 0x3A, 0xDB,
-        0x03, 0x60, 0xC9, 0x63, 0x01, 0x11, 0x02, 0x00, 0x6C, 0x40, 0xFC, 0x1F, 0x6C, 0x40, 0xB5, 0xFF,
-        0x6C, 0x40, 0xBC, 0xFF, 0x6C, 0x40, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60,
-        0x00, 0x6B, 0x03, 0x0A, 0xA7, 0x60, 0x9B, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x4F, 0xFB, 0x27, 0x44,
-        0x06, 0x22, 0x06, 0x00, 0xF9, 0xB4, 0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x48, 0xE2,
-        0x27, 0x64, 0x3A, 0xDB, 0xB3, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x54, 0x62, 0x22, 0x46,
-        0xA2, 0xD0, 0x16, 0x63, 0x7C, 0x41, 0x44, 0x48, 0x80, 0x36, 0x04, 0x61, 0x28, 0x40, 0x50, 0x36,
-        0x04, 0x61, 0x41, 0x4E, 0x28, 0x44, 0xA4, 0x36, 0x0E, 0x63, 0x12, 0x60, 0xC2, 0x62, 0xA2, 0xD1,
-        0x24, 0x44, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA2, 0xDB,
-        0x9A, 0xFF, 0xA1, 0xFF, 0x54, 0x62, 0xA2, 0xD2, 0xFF, 0xFF, 0x6A, 0x40, 0x80, 0x4E, 0x7A, 0xD4,
-        0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0xFF, 0xFF, 0x01, 0x1D,
-        0x78, 0x00, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x28, 0x40, 0x03, 0x2B, 0x04, 0x00,
-        0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x6A, 0x40, 0x70, 0x62, 0x28, 0x44, 0x88, 0xB0, 0x88, 0x36,
-        0x7A, 0xD4, 0x28, 0x40, 0x40, 0x2B, 0x0B, 0x00, 0x72, 0x62, 0x7A, 0xD4, 0x7A, 0xD4, 0xA2, 0xD2,
-        0xFF, 0xFF, 0x60, 0x40, 0x20, 0x2B, 0x02, 0x00, 0x7A, 0xD4, 0x7A, 0xD4, 0x46, 0x00, 0x23, 0x43,
-        0xCF, 0x83, 0xDF, 0x83, 0x02, 0x03, 0x55, 0x03, 0x04, 0x00, 0x03, 0xF0, 0x04, 0xF4, 0x64, 0x42,
-        0x37, 0x00, 0x2E, 0x40, 0x04, 0x2A, 0x21, 0x00, 0xA1, 0xFF, 0x02, 0xFE, 0x10, 0x25, 0x42, 0xFE,
-        0x72, 0x45, 0x65, 0x4C, 0x95, 0xF3, 0x03, 0x04, 0xE4, 0xE2, 0xDC, 0x84, 0x95, 0xFB, 0xA1, 0xFF,
-        0x80, 0x4C, 0x96, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x96, 0xFB, 0x80, 0x4C, 0x97, 0xF3, 0x02, 0x04,
-        0xDC, 0x84, 0x97, 0xFB, 0x80, 0x4C, 0x5C, 0x4E, 0xF8, 0xA3, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4,
-        0xFF, 0xB1, 0xF8, 0xA1, 0x06, 0xA4, 0x60, 0x42, 0x09, 0x00, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4,
-        0xC8, 0x82, 0xFF, 0xB1, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xB1, 0x7A, 0xD4, 0xFF, 0xFF,
-        0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1, 0x17, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82, 0xDA, 0x82,
-        0xA2, 0xD2, 0xA1, 0xFF, 0x09, 0x74, 0x80, 0x4D, 0x0E, 0x00, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4,
-        0x23, 0x43, 0xA1, 0xFF, 0xA0, 0xD2, 0xFE, 0xA1, 0xCB, 0x83, 0x80, 0x4E, 0xAF, 0x83, 0x02, 0x1D,
-        0x02, 0x03, 0xED, 0x01, 0xE3, 0x01, 0xA1, 0xFF, 0x28, 0x40, 0x40, 0x2B, 0x02, 0x00, 0x9C, 0x4E,
-        0x9C, 0x4C, 0xA1, 0xFF, 0xDA, 0x83, 0x66, 0x44, 0x22, 0x46, 0x0C, 0xFA, 0x0B, 0xFC, 0x87, 0x4F,
-        0x87, 0x4C, 0x87, 0x4F, 0x87, 0x4D, 0x87, 0x4C, 0x01, 0x08, 0x01, 0x00, 0xFF, 0xFF, 0x87, 0x4C,
-        0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0x44, 0xBC, 0xFF, 0x01, 0x60,
-        0x08, 0xE1, 0x0C, 0x74, 0x04, 0xE1, 0xA1, 0xFF, 0x35, 0xF3, 0xC4, 0xE2, 0x60, 0x54, 0x89, 0xFF,
-        0x13, 0x74, 0x88, 0xFF, 0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49, 0x34, 0x64, 0x3A, 0xDB, 0x06, 0xE1,
-        0x47, 0xFF, 0xA8, 0x60, 0x64, 0x78, 0xFF, 0xFF, 0xFF, 0x01, 0x08, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x43, 0xFF, 0x01, 0x60, 0x00, 0xE1, 0x28, 0xF3, 0x47, 0xFF, 0x60, 0x40, 0x07, 0x37, 0x4B, 0x00,
-        0x05, 0x3B, 0x04, 0x00, 0xFF, 0x0A, 0x80, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x29, 0xF5, 0x2A, 0xF3,
-        0x47, 0xFF, 0x3F, 0xF0, 0x01, 0x1B, 0x01, 0x64, 0x60, 0x56, 0xAD, 0xE2, 0xB5, 0xFF, 0x6C, 0x40,
-        0x40, 0xE1, 0xA1, 0xFF, 0x00, 0xF4, 0x6E, 0x61, 0x12, 0x62, 0x64, 0x43, 0x01, 0xE1, 0x03, 0x64,
-        0xE2, 0xD0, 0xC9, 0x81, 0x64, 0x4C, 0xCC, 0x84, 0xDA, 0x82, 0xFA, 0x02, 0x01, 0x60, 0x00, 0x6B,
-        0x9A, 0xFF, 0xCA, 0x82, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xFF, 0x7A, 0xD0, 0xA1, 0xFF,
-        0x64, 0x4C, 0xFC, 0x1C, 0xF8, 0x1D, 0x00, 0xB9, 0x06, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82,
-        0x5A, 0xD2, 0xA1, 0xFF, 0x60, 0x4D, 0x3F, 0x40, 0x02, 0x2B, 0x08, 0x00, 0x28, 0xF3, 0xA5, 0x60,
-        0xC4, 0x65, 0x60, 0x40, 0x0E, 0x3B, 0x02, 0x00, 0x80, 0x4C, 0xFE, 0x01, 0xA1, 0xFF, 0x87, 0x4E,
-        0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x67, 0x4C, 0xFF, 0xFF, 0xBC, 0xFF, 0x00, 0xE1,
-        0xD5, 0xFE, 0xA1, 0xFF, 0xFF, 0xFF, 0x00, 0x64, 0x40, 0x46, 0x60, 0x41, 0xB5, 0xFF, 0xB7, 0xFF,
-        0xB4, 0xFF, 0x29, 0xF5, 0x3F, 0xF0, 0x24, 0xF2, 0x44, 0x43, 0x40, 0x44, 0x00, 0xF4, 0xF3, 0x60,
-        0xA0, 0x65, 0x10, 0x62, 0x5A, 0xD2, 0xD9, 0x81, 0xD4, 0x80, 0xFF, 0xFF, 0xFB, 0x02, 0x61, 0x45,
-        0x24, 0x44, 0xD4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xFD, 0xA5, 0x48, 0x60, 0x00, 0x64,
-        0xC4, 0x9D, 0x0D, 0x60, 0x00, 0x6B, 0x24, 0x44, 0xC0, 0x83, 0xBB, 0xFF, 0x29, 0xF5, 0x01, 0xE1,
-        0x00, 0xF4, 0x6C, 0x61, 0x10, 0x62, 0x05, 0x00, 0x00, 0xF4, 0x01, 0xF2, 0xFF, 0xFF, 0x60, 0x41,
-        0x04, 0x62, 0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x10, 0x1A, 0x00, 0x26, 0x44, 0x01, 0x26, 0x0C, 0x00,
-        0x24, 0x44, 0xC8, 0x84, 0x40, 0x44, 0x02, 0x03, 0x6C, 0x45, 0xF3, 0x01, 0x03, 0x15, 0x01, 0x64,
-        0x05, 0xFA, 0x15, 0x00, 0x6C, 0x45, 0xED, 0x01, 0x23, 0x44, 0xC8, 0x84, 0x40, 0x43, 0x02, 0x03,
-        0x6C, 0x45, 0xE7, 0x01, 0x00, 0x64, 0x01, 0x15, 0x01, 0x64, 0x6C, 0x45, 0x05, 0xFB, 0xE2, 0xD2,
-        0xDA, 0x82, 0xC9, 0x81, 0x60, 0x4C, 0xDD, 0x1C, 0xD7, 0x03, 0xBC, 0xFF, 0xDA, 0x01, 0x00, 0xE1,
-        0xD5, 0xFE, 0xA1, 0xFF, 0xFF, 0xFF, 0x08, 0xE1, 0xA1, 0xFF, 0x67, 0x4C, 0x43, 0xFF, 0xAD, 0x4F,
-        0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x01, 0xE1, 0x01, 0x60, 0x69, 0x6B, 0xA5, 0x60, 0xC4, 0x64,
-        0x60, 0x4C, 0xBB, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C, 0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C,
-        0xFC, 0x01, 0x29, 0xF3, 0x2A, 0xF1, 0x07, 0xB5, 0x04, 0xE1, 0x65, 0x41, 0x64, 0x54, 0xCD, 0xE2,
-        0x95, 0x81, 0xA1, 0x5D, 0xA1, 0xFF, 0xFF, 0xFF, 0xF9, 0x01, 0x00, 0xE1, 0x30, 0x40, 0x02, 0x36,
-        0xA1, 0xFF, 0x83, 0xFF, 0x8D, 0xFF, 0x5C, 0x44, 0x5C, 0x43, 0x5C, 0x42, 0x5C, 0x41, 0x5C, 0x40,
-        0xAC, 0xFF, 0xAD, 0xFF, 0xE7, 0xE1, 0xB1, 0x60, 0xC0, 0x78, 0xFF, 0xFF, 0x10, 0x61, 0x7F, 0x60,
-        0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67, 0x02, 0x63, 0x26, 0x02, 0x98, 0xFE, 0x1A, 0x05, 0x1B, 0x60,
-        0xB8, 0x62, 0xA2, 0xD5, 0x0E, 0xF2, 0x15, 0x18, 0x02, 0x18, 0x09, 0xF4, 0xFB, 0x01, 0x23, 0x44,
-        0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02, 0x66, 0x44, 0x11, 0xFB, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF,
-        0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x08, 0xB9, 0x10, 0x7E, 0x00, 0x7F, 0x0E, 0xFA, 0x00, 0x67,
-        0x0A, 0x00, 0x20, 0x44, 0xDC, 0x85, 0x0F, 0xB4, 0xF6, 0xA0, 0x7F, 0x67, 0x07, 0x63, 0x03, 0x05,
-        0x45, 0x40, 0x00, 0x67, 0xD8, 0xFE, 0xFF, 0x27, 0x05, 0xFD, 0x0A, 0x7E, 0x04, 0xFB, 0x61, 0x55,
-        0x4A, 0x00, 0x28, 0xFB, 0x01, 0xF3, 0x29, 0xFB, 0x44, 0x46, 0x40, 0x45, 0x10, 0x61, 0x7E, 0x60,
-        0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67, 0x02, 0x63, 0x31, 0x02, 0xB3, 0x60, 0x58, 0x4F, 0x22, 0x78,
-        0xFF, 0xFF, 0x7F, 0x67, 0x03, 0x63, 0x2A, 0x02, 0x26, 0x40, 0x01, 0x2B, 0x24, 0x00, 0x98, 0xFE,
-        0x19, 0x05, 0x1B, 0x60, 0xB8, 0x62, 0xA2, 0xD5, 0x0E, 0xF2, 0x14, 0x18, 0x02, 0x18, 0x09, 0xF4,
-        0xFB, 0x01, 0x23, 0x44, 0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02, 0x66, 0x44, 0x11, 0xFB, 0x46, 0x43,
-        0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x08, 0xB9, 0x10, 0x7E, 0x00, 0x7F,
-        0x0E, 0xFA, 0x09, 0x00, 0x20, 0x44, 0xDC, 0x85, 0x0F, 0xB4, 0xF6, 0xA0, 0x7F, 0x67, 0x07, 0x63,
-        0x05, 0x05, 0x45, 0x40, 0xD8, 0xFE, 0x00, 0x67, 0xD0, 0xFE, 0xD9, 0xFE, 0xFF, 0x27, 0x05, 0xFD,
-        0x0B, 0x7E, 0x04, 0xFB, 0x12, 0x60, 0xC8, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB0, 0x80, 0xBC,
-        0x08, 0x28, 0xA3, 0xDB, 0x61, 0x55, 0x63, 0x00, 0x04, 0xB5, 0x82, 0xB5, 0x25, 0x02, 0x04, 0x03,
-        0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40, 0xA3, 0xD3, 0x99, 0xFE, 0x04, 0x04, 0x02, 0xBC, 0xFE, 0xB4,
-        0xA3, 0xDB, 0x56, 0x00, 0xBC, 0xF3, 0x20, 0x40, 0x80, 0x26, 0x52, 0x00, 0xA3, 0xD3, 0xFF, 0xA0,
-        0xF8, 0xB4, 0x02, 0x02, 0xA3, 0xDB, 0x1C, 0x00, 0x04, 0xBC, 0xBF, 0xB4, 0xA3, 0xDB, 0x08, 0xB0,
-        0x01, 0x64, 0x08, 0x24, 0x02, 0x64, 0x28, 0xFB, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40, 0xD0, 0xFE,
-        0x3F, 0x00, 0xBF, 0xB4, 0xA3, 0xDB, 0x3C, 0x00, 0x40, 0xB0, 0xFF, 0xFF, 0xFA, 0x02, 0xF8, 0xB4,
-        0xA3, 0xDB, 0x08, 0xB5, 0x07, 0x7C, 0x01, 0x02, 0xBC, 0xF9, 0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40,
-        0x12, 0x60, 0xC8, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB5, 0x07, 0xB5, 0x08, 0x28, 0xC4, 0x02,
-        0x99, 0xFE, 0x26, 0x05, 0x20, 0x44, 0x80, 0x26, 0x23, 0x00, 0x20, 0x2A, 0x00, 0x00, 0x40, 0x2A,
-        0x1F, 0x00, 0xBF, 0xB4, 0x40, 0x40, 0x09, 0x00, 0xA8, 0xFF, 0x20, 0x44, 0x99, 0xFE, 0x02, 0x05,
-        0x80, 0x2A, 0x03, 0x00, 0x40, 0xBC, 0x40, 0x40, 0x13, 0x00, 0x00, 0xF1, 0x80, 0xBC, 0x40, 0x40,
-        0x64, 0x44, 0xE0, 0x84, 0xE8, 0x84, 0x0A, 0x36, 0x29, 0x01, 0x0B, 0x36, 0x5A, 0x01, 0x28, 0xFB,
-        0x01, 0xF1, 0x29, 0xF9, 0x02, 0xF1, 0x2A, 0xF9, 0x03, 0xF1, 0x2B, 0xF9, 0xD0, 0xFE, 0xAE, 0xFF,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x82, 0x3E, 0x75, 0x44, 0x02, 0xB0, 0x01, 0xB0, 0x28, 0x02, 0xDC, 0x02,
-        0x04, 0xB0, 0x08, 0xB0, 0x0B, 0x02, 0x20, 0x02, 0x40, 0x26, 0xA7, 0xFF, 0x8C, 0xFF, 0x75, 0x40,
-        0x80, 0x2B, 0x01, 0x00, 0xAB, 0xFF, 0x75, 0x44, 0x8D, 0xFF, 0xEA, 0x01, 0x0A, 0xF3, 0xAA, 0xFF,
-        0x60, 0x40, 0x20, 0x2B, 0x02, 0x00, 0x60, 0xFF, 0x0D, 0x00, 0x01, 0x26, 0x0C, 0x00, 0xC0, 0x60,
-        0x00, 0x7C, 0xA0, 0x84, 0x80, 0x3B, 0x02, 0x00, 0xC0, 0x67, 0x03, 0x00, 0x40, 0x3B, 0x02, 0x00,
-        0x00, 0x67, 0x0A, 0xFB, 0xD5, 0x01, 0xD4, 0x01, 0xAB, 0xFF, 0x00, 0x00, 0xD1, 0x01, 0x79, 0x63,
-        0xFF, 0xFF, 0xFF, 0x1F, 0xA9, 0xFF, 0x77, 0x44, 0x60, 0x57, 0x10, 0x60, 0x00, 0x75, 0x40, 0x4A,
-        0x01, 0x2A, 0x1C, 0x00, 0x24, 0x44, 0xAC, 0x86, 0x08, 0xF2, 0x18, 0x03, 0x1B, 0x60, 0xBE, 0x65,
-        0xD4, 0x80, 0x0E, 0xF2, 0x02, 0x03, 0xA5, 0xD5, 0x04, 0x00, 0x01, 0xBC, 0x0E, 0xFA, 0x09, 0xF4,
-        0xD1, 0xFE, 0x46, 0x44, 0x0B, 0x18, 0x66, 0x44, 0x10, 0xFB, 0x66, 0x47, 0x20, 0xBF, 0x3B, 0x42,
-        0x04, 0xA2, 0xA2, 0xDB, 0x0E, 0xF2, 0x01, 0x75, 0x10, 0xBC, 0x0E, 0xFA, 0x2A, 0x44, 0x08, 0x2A,
-        0x18, 0x00, 0x23, 0x44, 0x00, 0xA8, 0x5C, 0x43, 0x14, 0x03, 0x1B, 0x60, 0xB8, 0x62, 0xA2, 0xD5,
-        0x01, 0x00, 0x09, 0xF4, 0x0E, 0xF2, 0x0D, 0x18, 0x08, 0xB0, 0x18, 0xAC, 0xFA, 0x03, 0x0E, 0xFA,
-        0x66, 0x43, 0x11, 0xFD, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB,
-        0x08, 0x75, 0x2A, 0x44, 0x06, 0x22, 0x2D, 0x00, 0x22, 0x44, 0x00, 0xA8, 0x60, 0x46, 0x0E, 0xF2,
-        0x28, 0x03, 0x10, 0xB0, 0x01, 0xBC, 0x03, 0x02, 0x00, 0x64, 0x40, 0x42, 0x22, 0x00, 0x0E, 0xFA,
-        0xD1, 0xFE, 0x1B, 0x60, 0xB2, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x80, 0x00, 0x46, 0x42, 0x19, 0x02,
-        0x22, 0x47, 0x40, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x23, 0xF2, 0x66, 0x43, 0x00, 0xA8,
-        0x0E, 0xF2, 0x08, 0x02, 0x60, 0x40, 0x02, 0x2A, 0xE4, 0x01, 0x12, 0xFD, 0x10, 0x64, 0x0E, 0xFA,
-        0x02, 0x75, 0x07, 0x00, 0x60, 0x40, 0x04, 0x2A, 0xDC, 0x01, 0x12, 0xFD, 0x10, 0x64, 0x0E, 0xFA,
-        0x04, 0x75, 0x2A, 0x44, 0x80, 0x2A, 0x19, 0x00, 0x21, 0x44, 0xAC, 0x86, 0x0E, 0xF2, 0x15, 0x03,
-        0x01, 0xBC, 0x0E, 0xFA, 0xD1, 0xFE, 0x1B, 0x60, 0xCA, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x56, 0x00,
-        0x46, 0x41, 0x0B, 0x02, 0x21, 0x47, 0x10, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x0E, 0xF2,
-        0x66, 0x43, 0x08, 0xFD, 0x10, 0xBC, 0x0E, 0xFA, 0x80, 0x75, 0x2A, 0x44, 0x10, 0xB0, 0x20, 0x44,
-        0x15, 0x03, 0x7F, 0xB4, 0x40, 0x40, 0x12, 0x60, 0xC8, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB0,
-        0x80, 0xB0, 0x09, 0x03, 0x08, 0x03, 0x40, 0xBC, 0x7F, 0xB4, 0x04, 0xB0, 0xA3, 0xDB, 0x03, 0x03,
-        0x20, 0x44, 0x80, 0xBC, 0x40, 0x40, 0xB1, 0x60, 0x90, 0x78, 0xFF, 0xFF, 0xB1, 0x60, 0xC0, 0x78,
-        0xFF, 0xFF, 0xE8, 0xFE, 0x14, 0x05, 0xEA, 0xFE, 0x24, 0x05, 0xE9, 0xFE, 0x1C, 0x05, 0xE7, 0xFE,
-        0x09, 0x05, 0x47, 0xFF, 0x20, 0x44, 0x0F, 0x22, 0x03, 0x00, 0xCC, 0x84, 0x40, 0x40, 0x0F, 0x22,
-        0xB8, 0xFE, 0xEC, 0x01, 0x23, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0xE8, 0x02, 0x6E, 0x01, 0x24, 0x41,
-        0x00, 0xB9, 0x1B, 0x60, 0xBE, 0x65, 0x45, 0x47, 0xE1, 0x02, 0x58, 0x4F, 0x0F, 0x00, 0xDE, 0x02,
-        0x5C, 0x4A, 0x46, 0x44, 0x50, 0x01, 0x22, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0x08, 0x24, 0x81, 0x01,
-        0xD5, 0x01, 0x21, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0xA6, 0x03, 0xD0, 0x01, 0x27, 0xD3, 0x03, 0x00,
-        0x10, 0xB0, 0x09, 0xF2, 0x04, 0x03, 0xAC, 0x86, 0x0E, 0xF2, 0xFA, 0x02, 0x08, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0E, 0xF3, 0x0F, 0x60, 0xFE, 0x65, 0x0C, 0xF3, 0x24, 0x86, 0x24, 0x46, 0x60, 0x40,
-        0xFB, 0x3B, 0x07, 0x00, 0x80, 0x26, 0x02, 0x00, 0x23, 0x46, 0x03, 0x4C, 0x46, 0x61, 0x3A, 0x65,
-        0x0C, 0x00, 0x2E, 0xF3, 0x40, 0x45, 0xF8, 0x2B, 0x02, 0x00, 0x40, 0x45, 0x03, 0x00, 0x58, 0x4F,
-        0x39, 0x00, 0x07, 0x02, 0x58, 0x4F, 0x45, 0x00, 0x04, 0x05, 0x66, 0x50, 0x65, 0x52, 0x61, 0x51,
-        0x09, 0x00, 0x26, 0x47, 0x00, 0xBF, 0x0E, 0xFB, 0x2E, 0xF5, 0x05, 0xF0, 0x80, 0x60, 0x64, 0x50,
-        0x00, 0x72, 0x7E, 0x71, 0xAC, 0xFF, 0xB1, 0x60, 0xC0, 0x78, 0xFF, 0xFF, 0x8E, 0xFF, 0x0F, 0xF3,
-        0x0F, 0x60, 0xFE, 0x65, 0x24, 0x86, 0x0D, 0xF3, 0x2E, 0xF3, 0x40, 0x45, 0xF8, 0x2B, 0x02, 0x00,
-        0x40, 0x45, 0x03, 0x00, 0x58, 0x4F, 0x16, 0x00, 0x07, 0x02, 0x58, 0x4F, 0x22, 0x00, 0x04, 0x05,
-        0x66, 0x50, 0x65, 0x52, 0x61, 0x51, 0x09, 0x00, 0x26, 0x47, 0x00, 0xBF, 0x0F, 0xFB, 0x2E, 0xF5,
-        0x05, 0xF0, 0x80, 0x60, 0x64, 0x50, 0x00, 0x72, 0x7E, 0x71, 0x8D, 0xFF, 0xAD, 0xFF, 0xB1, 0x60,
-        0xC0, 0x78, 0xFF, 0xFF, 0x25, 0x44, 0x8A, 0xF1, 0x8B, 0xF1, 0xD0, 0x80, 0xD0, 0x80, 0x07, 0x04,
-        0x01, 0x06, 0x05, 0x00, 0x25, 0x46, 0x01, 0xF0, 0x03, 0x67, 0xA0, 0x85, 0x94, 0x80, 0x2F, 0x58,
-        0xFF, 0xFF, 0x25, 0x46, 0x26, 0x41, 0x46, 0x63, 0x01, 0xF2, 0xFF, 0xFF, 0xFF, 0xB5, 0xD5, 0x81,
-        0x00, 0xF2, 0x05, 0x04, 0x04, 0x63, 0x60, 0x46, 0xF7, 0x1B, 0x42, 0xFE, 0x0D, 0x00, 0x61, 0x44,
-        0xC5, 0x81, 0x63, 0x45, 0xC5, 0x81, 0x9C, 0x84, 0xDC, 0x84, 0x01, 0xF2, 0xF0, 0x85, 0xF0, 0x80,
-        0x65, 0x44, 0xF8, 0x85, 0xFF, 0xFF, 0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x1B, 0x60,
-        0xD0, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xAC, 0x86, 0x0E, 0xF2, 0x07, 0x03, 0x00, 0xA8, 0x09, 0xF2,
-        0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA, 0x08, 0xFE, 0x17, 0x00, 0x8C, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0,
-        0x00, 0xB4, 0x12, 0x06, 0x09, 0x60, 0x08, 0x61, 0x41, 0x4A, 0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF,
-        0xB3, 0x60, 0x58, 0x4E, 0x97, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x06, 0x03, 0x2A, 0x43, 0xB3, 0x60,
-        0x58, 0x4E, 0xB8, 0x78, 0xFF, 0xFF, 0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0x41, 0x4A,
-        0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF, 0xB3, 0x60, 0x58, 0x4E, 0x97, 0x78, 0xFF, 0xFF, 0x07, 0x03,
-        0x2A, 0x43, 0xB3, 0x60, 0x58, 0x4E, 0xB8, 0x78, 0xFF, 0xFF, 0x08, 0xFE, 0x0D, 0x00, 0x1B, 0x60,
-        0xD0, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xAC, 0x86, 0x0E, 0xF2, 0x06, 0x03, 0x00, 0xA8, 0x09, 0xF2,
-        0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA, 0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0x8D, 0xF3,
-        0x7C, 0x63, 0x00, 0xBE, 0x40, 0x45, 0x1A, 0x03, 0x00, 0x65, 0x65, 0x44, 0xDC, 0x85, 0x84, 0xA1,
-        0x00, 0xF2, 0x06, 0x06, 0x01, 0xFC, 0x00, 0xA8, 0x60, 0x46, 0xF7, 0x02, 0x40, 0x45, 0x0E, 0x00,
-        0x8C, 0xF3, 0x00, 0x63, 0xD4, 0x84, 0x8C, 0xFB, 0x80, 0x60, 0x7C, 0x64, 0x01, 0xFA, 0x00, 0xF0,
-        0x00, 0xFC, 0xD3, 0x80, 0x8D, 0xF9, 0x02, 0x02, 0x8E, 0xF9, 0x08, 0xFE, 0x2E, 0x58, 0xFF, 0xFF,
-        0x66, 0x44, 0x25, 0x46, 0x05, 0xFA, 0x06, 0xFA, 0x01, 0xF0, 0x03, 0x67, 0x02, 0xFC, 0xB0, 0x84,
-        0x3A, 0x7E, 0x01, 0xFA, 0x12, 0x64, 0x03, 0xFA, 0x00, 0xF0, 0x04, 0xF8, 0x00, 0x64, 0x0C, 0x61,
-        0x10, 0x63, 0x59, 0xDA, 0xFE, 0x1F, 0x2E, 0x58, 0xFF, 0xFF, 0x27, 0x43, 0xE3, 0x81, 0xE9, 0x81,
-        0x03, 0x05, 0x16, 0x03, 0x00, 0x61, 0x01, 0x00, 0xE4, 0x63, 0x61, 0x46, 0xBF, 0xD2, 0x27, 0x45,
-        0xDC, 0x84, 0xA2, 0xDA, 0xBE, 0xD2, 0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B, 0x25, 0x44, 0x61, 0x46,
-        0xA3, 0xDA, 0x04, 0x00, 0x0A, 0xFA, 0x60, 0x46, 0x25, 0x44, 0x09, 0xFA, 0x61, 0x46, 0xBE, 0xDA,
-        0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x44, 0x00, 0xA8, 0x07, 0x4B, 0x0C, 0x03, 0x58, 0x4F, 0x33, 0x00,
-        0x0B, 0x47, 0x1B, 0x60, 0xC4, 0x65, 0x27, 0x44, 0xD4, 0x80, 0x00, 0x64, 0x01, 0x02, 0x0F, 0xFA,
-        0x58, 0x4F, 0xD3, 0x01, 0x70, 0x00, 0x25, 0x43, 0xE3, 0x84, 0x7C, 0x41, 0x02, 0x04, 0xE8, 0x81,
-        0xE4, 0x63, 0x61, 0x46, 0xA3, 0xD2, 0x00, 0x7C, 0x40, 0x45, 0xBF, 0xD8, 0xA3, 0xD8, 0xBE, 0xD8,
-        0x27, 0x42, 0x5A, 0xD3, 0x25, 0x5C, 0x60, 0x41, 0x02, 0x1B, 0x27, 0xD9, 0x05, 0x00, 0x25, 0x46,
-        0x0A, 0xFA, 0x61, 0x46, 0x25, 0x44, 0x09, 0xFA, 0x25, 0x44, 0x27, 0x43, 0x00, 0x61, 0x60, 0x46,
-        0x09, 0xF2, 0x08, 0xFC, 0x00, 0xA8, 0xDD, 0x81, 0xFA, 0x02, 0xBF, 0xD1, 0x66, 0x44, 0xBE, 0xDB,
-        0xC1, 0x84, 0xBF, 0xDB, 0x48, 0x00, 0x25, 0x46, 0xE4, 0x63, 0x08, 0xF2, 0x89, 0xF2, 0x1E, 0x18,
-        0x40, 0x47, 0xE0, 0x84, 0xE8, 0x85, 0x02, 0x05, 0xE8, 0x83, 0x00, 0x65, 0x65, 0x46, 0xBF, 0xD2,
-        0x61, 0x5C, 0xCC, 0x84, 0xA2, 0xDA, 0x25, 0x46, 0x0A, 0xF2, 0x00, 0xB9, 0x65, 0x46, 0x08, 0x24,
-        0xBE, 0xDA, 0x02, 0x1B, 0xA3, 0xD8, 0x02, 0x00, 0x60, 0x46, 0x89, 0xFA, 0x00, 0xB9, 0x61, 0x46,
-        0x08, 0x28, 0x0A, 0xFA, 0x25, 0x46, 0x89, 0xFC, 0x8A, 0xFC, 0x88, 0xFC, 0x2F, 0x58, 0xFF, 0xFF,
-        0x00, 0x61, 0x28, 0x65, 0x25, 0x43, 0x8E, 0xF3, 0xAF, 0x83, 0x00, 0xBE, 0x18, 0x03, 0x02, 0x03,
-        0x00, 0xFC, 0x01, 0x00, 0x8D, 0xFD, 0x63, 0x46, 0x65, 0x44, 0xCC, 0x85, 0x00, 0xF2, 0x07, 0x02,
-        0x8E, 0xF5, 0x00, 0x64, 0x00, 0xFA, 0xDE, 0x60, 0xAF, 0x64, 0x09, 0xFB, 0x08, 0x00, 0x66, 0x43,
-        0x00, 0xBE, 0xDD, 0x81, 0xF1, 0x02, 0x8C, 0xF1, 0x8E, 0xFD, 0xC1, 0x84, 0x8C, 0xFB, 0x2E, 0x58,
-        0xFF, 0xFF, 0x00, 0x66, 0x46, 0x45, 0x29, 0x43, 0xFC, 0xA3, 0x66, 0x44, 0xBD, 0xDB, 0x25, 0x44,
-        0xBD, 0xDB, 0x00, 0x64, 0xBD, 0xDB, 0x03, 0x61, 0x0E, 0x65, 0x1B, 0x60, 0xD8, 0x63, 0x43, 0x49,
-        0xA3, 0xD3, 0x06, 0xA3, 0x00, 0xA8, 0xCD, 0x81, 0x04, 0x02, 0xF9, 0x02, 0xB1, 0x60, 0xC0, 0x78,
-        0xFF, 0xFF, 0x01, 0x26, 0xE6, 0x01, 0xD4, 0x80, 0x60, 0x45, 0xE3, 0x05, 0xF6, 0xA3, 0xBD, 0xD1,
-        0xBD, 0xD1, 0x44, 0x47, 0x44, 0x48, 0x44, 0x45, 0x1C, 0x60, 0x16, 0x64, 0x44, 0xD7, 0xFF, 0xFF,
-        0xFF, 0xFF, 0x48, 0xFE, 0x8D, 0xF5, 0x8C, 0xF3, 0x0D, 0x18, 0xCC, 0x84, 0x8C, 0xFB, 0x80, 0x60,
-        0x7C, 0x64, 0x01, 0xFA, 0x00, 0x64, 0x00, 0xF0, 0x00, 0xFA, 0xD0, 0x80, 0x8D, 0xF9, 0x02, 0x02,
-        0x8E, 0xF9, 0x08, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x1B, 0x60, 0x88, 0x63, 0x0D, 0x65, 0x00, 0x61,
-        0x41, 0x48, 0xA3, 0xD3, 0x06, 0xA3, 0xAC, 0x86, 0x00, 0x61, 0x09, 0x03, 0x00, 0xF2, 0x09, 0xF0,
-        0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x64, 0x44, 0xAC, 0x86, 0xF6, 0x01, 0x61, 0x44,
-        0x25, 0x46, 0x27, 0xDA, 0x65, 0x44, 0x28, 0x45, 0x45, 0x88, 0xCC, 0x85, 0x5A, 0x87, 0xE9, 0x02,
-        0x00, 0x64, 0x27, 0xDA, 0x5A, 0xDA, 0x5A, 0x87, 0x88, 0xF3, 0x87, 0xF1, 0x02, 0xA4, 0x60, 0x46,
-        0x60, 0x45, 0x00, 0x61, 0x1E, 0xF2, 0xFF, 0xFF, 0xAC, 0x86, 0x00, 0xF2, 0x04, 0x03, 0xAC, 0x86,
-        0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x65, 0x44, 0x02, 0xA5, 0x65, 0x46, 0x64, 0x44, 0xCC, 0x9C,
-        0xFF, 0xFF, 0xF0, 0x02, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x5A, 0x87, 0x28, 0x45, 0x45, 0x88,
-        0x88, 0xF3, 0x87, 0xF1, 0x02, 0xA4, 0x60, 0x46, 0x60, 0x45, 0x00, 0x61, 0x72, 0xF2, 0xFF, 0xFF,
-        0xAC, 0x86, 0x00, 0xF2, 0x09, 0x03, 0x00, 0xF2, 0x09, 0xF0, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81,
-        0xFC, 0x02, 0x64, 0x44, 0xAC, 0x86, 0xF6, 0x01, 0x65, 0x44, 0x02, 0xA5, 0x65, 0x46, 0x64, 0x44,
-        0xCC, 0x9C, 0x61, 0x44, 0xEB, 0x02, 0x25, 0x46, 0x27, 0xDA, 0x5A, 0x87, 0x28, 0x45, 0x45, 0x88,
-        0x06, 0x60, 0x40, 0x65, 0x8D, 0xF3, 0x01, 0x61, 0xAC, 0x86, 0x00, 0xF2, 0x03, 0x03, 0xD5, 0x80,
-        0xDD, 0x81, 0xFA, 0x04, 0xCD, 0x84, 0x25, 0x46, 0x27, 0xDA, 0x28, 0x45, 0xC4, 0x84, 0x5A, 0xDA,
-        0xDA, 0x81, 0x8C, 0xF1, 0x59, 0xD8, 0x1B, 0x60, 0x86, 0x64, 0x18, 0x63, 0xA0, 0xD1, 0x06, 0xA4,
-        0x59, 0xD8, 0xFC, 0x1F, 0x00, 0x64, 0x59, 0xDA, 0x59, 0xDA, 0x01, 0x60, 0x1C, 0x64, 0x0A, 0x63,
-        0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F, 0x7E, 0xF1, 0x59, 0xD8, 0x45, 0x01, 0x07, 0x4B, 0xB4, 0x60,
-        0x58, 0x4F, 0x23, 0x78, 0xFF, 0xFF, 0x0B, 0x47, 0x58, 0x4F, 0x21, 0x00, 0x3C, 0x01, 0x07, 0x4B,
-        0xB4, 0x60, 0x58, 0x4F, 0x23, 0x78, 0xFF, 0xFF, 0x0B, 0x47, 0x27, 0x44, 0x00, 0xBE, 0x08, 0xF0,
-        0x15, 0x03, 0x64, 0x42, 0x4A, 0xD3, 0x09, 0xF2, 0xDC, 0x83, 0xA2, 0xDD, 0x25, 0x43, 0x09, 0xFC,
-        0x63, 0x46, 0x27, 0x43, 0x0A, 0xFC, 0x09, 0xFA, 0x08, 0xF8, 0x00, 0xA8, 0x66, 0x43, 0x03, 0x02,
-        0x64, 0x44, 0x58, 0xDD, 0x03, 0x00, 0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA, 0x1C, 0x01, 0x27, 0x43,
-        0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05, 0x16, 0x03, 0x00, 0x61, 0x01, 0x00, 0xE4, 0x63, 0x61, 0x46,
-        0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84, 0xA2, 0xDA, 0xA3, 0xD2, 0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B,
-        0x25, 0x44, 0x61, 0x46, 0xBE, 0xDA, 0x04, 0x00, 0x09, 0xFA, 0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA,
-        0x61, 0x46, 0xA3, 0xDA, 0x2F, 0x58, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x03, 0x02,
-        0x28, 0xE2, 0x40, 0xFF, 0xA1, 0xFF, 0x84, 0xFF, 0xBF, 0x60, 0xAD, 0x64, 0x40, 0x42, 0xB5, 0x60,
-        0xA2, 0x64, 0x40, 0x40, 0x9D, 0xF3, 0x66, 0xFB, 0x0F, 0x60, 0x9A, 0x63, 0xAA, 0xF3, 0xBD, 0xDB,
-        0x00, 0x60, 0x9A, 0x64, 0xBD, 0xDB, 0x02, 0x64, 0xBD, 0xDB, 0x04, 0x64, 0xA3, 0xDB, 0x5C, 0x49,
-        0x0A, 0x64, 0x40, 0x4B, 0x5C, 0x5C, 0x01, 0x60, 0x39, 0xE2, 0x04, 0x60, 0x00, 0x7A, 0x89, 0xFF,
-        0x03, 0x60, 0xFF, 0x73, 0x88, 0xFF, 0xB5, 0x60, 0xA2, 0x78, 0xFF, 0xFF, 0xA0, 0xFE, 0x07, 0x05,
-        0xA3, 0xFE, 0x07, 0x05, 0xA1, 0xFE, 0x50, 0x05, 0x60, 0x64, 0x3B, 0xDB, 0x10, 0x00, 0x20, 0x58,
-        0xFF, 0xFF, 0xFA, 0x01, 0x12, 0x60, 0xCC, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0xFB, 0xB4, 0xA3, 0xDB,
-        0xA0, 0x4C, 0x59, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0xA0, 0x4C, 0x7D, 0xB4, 0xA0, 0x51, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x83, 0x3E, 0x40, 0x60, 0x0B, 0x65, 0x2B, 0x44, 0x00, 0x63, 0xE8, 0x80, 0xF8, 0x84,
-        0x02, 0x24, 0x94, 0x84, 0xF3, 0x83, 0xCD, 0x81, 0xFF, 0xFF, 0xF8, 0x02, 0xDF, 0x83, 0x2F, 0x58,
-        0x40, 0x4B, 0x00, 0x62, 0x01, 0x64, 0xD4, 0x80, 0xE0, 0x84, 0x1A, 0x03, 0xD4, 0x80, 0xE0, 0x84,
-        0x15, 0x03, 0x61, 0x44, 0x11, 0x61, 0xE0, 0x84, 0xCD, 0x81, 0xFD, 0x04, 0x01, 0x00, 0xE0, 0x84,
-        0xF2, 0x82, 0xFF, 0xFF, 0x02, 0x24, 0xC6, 0x82, 0x02, 0x28, 0xD6, 0x82, 0xE2, 0x80, 0xCD, 0x81,
-        0x02, 0x28, 0x01, 0xBC, 0xF4, 0x02, 0x01, 0x2A, 0xC6, 0x82, 0x03, 0x00, 0xE9, 0x81, 0xF2, 0x82,
-        0x61, 0x44, 0x2D, 0x58, 0xFF, 0xFF, 0x00, 0xA8, 0x10, 0x61, 0x04, 0x03, 0xF0, 0x84, 0xCD, 0x81,
-        0xFD, 0x04, 0x61, 0x44, 0x2D, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x3B, 0xDB, 0x16, 0x60, 0xA8, 0x63,
-        0xBD, 0xD3, 0xA3, 0xD1, 0x60, 0x40, 0x04, 0x3A, 0x2D, 0x00, 0x00, 0x64, 0x4A, 0xDB, 0x1B, 0x60,
-        0x88, 0x63, 0xA3, 0xD3, 0x46, 0x43, 0xAC, 0x86, 0x3C, 0x45, 0x23, 0x03, 0xD4, 0x80, 0x07, 0xF2,
-        0x02, 0x02, 0x09, 0xF2, 0xF8, 0x01, 0xD0, 0x80, 0x09, 0xF2, 0xF5, 0x02, 0x60, 0x43, 0x80, 0x67,
-        0xB0, 0x81, 0x1B, 0x60, 0xDA, 0x62, 0x61, 0x44, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x09, 0x60, 0x08, 0x65, 0x0E, 0xF2, 0x02, 0xF2, 0x60, 0x40,
-        0xF0, 0x37, 0x05, 0x00, 0x90, 0xF3, 0xD4, 0x80, 0xCC, 0x84, 0x01, 0x02, 0x90, 0xFB, 0x63, 0x44,
-        0xDA, 0x01, 0x23, 0x46, 0x3C, 0x44, 0xAC, 0x80, 0xFF, 0xFF, 0x89, 0x02, 0x6A, 0xF3, 0x6B, 0xF3,
-        0x02, 0xA8, 0x02, 0xA8, 0x08, 0x02, 0x00, 0x64, 0x6C, 0xFB, 0x6A, 0xFB, 0x6B, 0xFB, 0x00, 0x64,
-        0x6D, 0xFB, 0xCA, 0xFE, 0x97, 0x00, 0x03, 0x02, 0x00, 0x64, 0x6B, 0xFB, 0xCA, 0xFE, 0x01, 0x64,
-        0x3B, 0xDB, 0x1B, 0x60, 0x8E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x35, 0x03,
-        0x2C, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x8A, 0x00, 0x2E, 0xF2, 0x12, 0x60, 0xCE, 0x65,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2,
-        0x16, 0x18, 0x61, 0x46, 0x2E, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46,
-        0x2D, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2C, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x88, 0xF3,
-        0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x63, 0x02, 0x66, 0x45, 0x63, 0x46, 0x06, 0xF2, 0x65, 0x46,
-        0x80, 0xB0, 0x09, 0xF2, 0x5C, 0x03, 0xAC, 0x86, 0xCA, 0x01, 0x6B, 0xF3, 0xFF, 0xFF, 0x01, 0xA8,
-        0xFF, 0xFF, 0x50, 0x02, 0x1B, 0x60, 0xA0, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x0F, 0x03, 0x77, 0xF1, 0x07, 0xF2, 0xFF, 0xFF, 0xD0, 0x80, 0x09, 0xF2, 0x03, 0x02, 0xAC, 0x86,
-        0x07, 0xF2, 0xFA, 0x02, 0x03, 0x02, 0x00, 0x64, 0x77, 0xFB, 0xEC, 0x01, 0x46, 0x5C, 0x3F, 0x00,
-        0x1B, 0x60, 0xA6, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x01, 0x03, 0x37, 0x02,
-        0x6C, 0xF3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x14, 0x02, 0x1B, 0x60, 0x94, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x0B, 0x03, 0x2A, 0xF0, 0x20, 0x67, 0x09, 0xF2, 0xB0, 0x83,
-        0x00, 0xA8, 0x00, 0x64, 0x02, 0x03, 0x2A, 0xFC, 0x01, 0x00, 0x6C, 0xFB, 0x20, 0x00, 0x00, 0x64,
-        0x6C, 0xFB, 0x1B, 0x60, 0x88, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x12, 0x03,
-        0x2A, 0xF0, 0x08, 0x67, 0xA0, 0x80, 0xFF, 0xFF, 0x12, 0x03, 0x77, 0xF1, 0x07, 0xF2, 0xFF, 0xFF,
-        0xD0, 0x80, 0x09, 0xF2, 0x03, 0x02, 0xAC, 0x86, 0x07, 0xF2, 0xFA, 0x02, 0x08, 0x02, 0x00, 0x64,
-        0x77, 0xFB, 0xE7, 0x01, 0x00, 0x64, 0x77, 0xFB, 0xB5, 0x60, 0xA2, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0xFC, 0xFB, 0x46, 0x5C, 0x21, 0x60, 0x98, 0x63, 0xA3, 0xD3, 0xB5, 0x60, 0x58, 0x4D, 0xE3, 0x78,
-        0xFF, 0xFF, 0x0D, 0xF2, 0x60, 0x5C, 0x64, 0x5F, 0x0D, 0xFA, 0x07, 0xF0, 0x2A, 0xF2, 0xFF, 0xFF,
-        0x77, 0xF9, 0x60, 0x40, 0x08, 0x2B, 0x05, 0x00, 0x00, 0x64, 0x48, 0xFB, 0xB8, 0x60, 0x2D, 0x78,
-        0xFF, 0xFF, 0x00, 0x64, 0xD0, 0x80, 0x88, 0xF3, 0x07, 0x02, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84,
-        0xA2, 0xDA, 0xBD, 0x60, 0x28, 0x78, 0xFF, 0xFF, 0xD0, 0x80, 0xB8, 0xF3, 0x03, 0x03, 0x60, 0x40,
-        0x03, 0x3A, 0x00, 0x00, 0x2A, 0xF2, 0x00, 0x63, 0x40, 0x47, 0x50, 0x36, 0x01, 0x00, 0x01, 0x63,
-        0x48, 0xFD, 0x4A, 0xF3, 0x35, 0xFA, 0x10, 0xA4, 0x4A, 0xFB, 0x00, 0x64, 0x15, 0xFA, 0x16, 0xFA,
-        0x0F, 0xFA, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x0E, 0xF0, 0x63, 0x46, 0x00, 0x7F,
-        0x64, 0x5E, 0x4B, 0xFB, 0x64, 0x44, 0x00, 0x7E, 0xBB, 0xFB, 0x07, 0xF0, 0x88, 0xF3, 0xFF, 0xFF,
-        0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0xBB, 0xF3, 0xBA, 0xFB, 0x60, 0x41, 0x03, 0xF2, 0x00, 0xF4,
-        0x01, 0xF2, 0xFC, 0xA5, 0x00, 0x7F, 0xD4, 0x84, 0x27, 0x45, 0x3C, 0x46, 0x1A, 0xFA, 0x22, 0x63,
-        0x7B, 0x60, 0xFF, 0x64, 0xA4, 0x84, 0x03, 0x2B, 0x1C, 0x63, 0x2A, 0xFA, 0x60, 0x40, 0xA4, 0x36,
-        0x14, 0x63, 0x43, 0x4C, 0x00, 0x7C, 0x22, 0xF8, 0x64, 0x41, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46,
-        0x36, 0xF2, 0x63, 0x46, 0xFF, 0xB4, 0x22, 0xFA, 0x60, 0x40, 0x00, 0x36, 0x8E, 0x00, 0x2A, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x08, 0x3A, 0x89, 0x00, 0x03, 0xF2, 0x00, 0xF4, 0xA0, 0xD2, 0xAA, 0x60,
-        0xAA, 0x65, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64, 0x0A, 0x02, 0xD0, 0x80, 0x00, 0x64, 0x5A, 0xD0,
-        0x06, 0x02, 0xD0, 0x80, 0xF8, 0x7F, 0xD0, 0x80, 0x01, 0x03, 0x01, 0x02, 0x01, 0x61, 0x62, 0x43,
-        0x46, 0x43, 0x3C, 0x46, 0x07, 0xF4, 0x36, 0xF2, 0xFF, 0xFF, 0xA3, 0x46, 0x60, 0x40, 0x22, 0x26,
-        0x45, 0x00, 0x60, 0x45, 0x63, 0x42, 0x5A, 0xD0, 0xCD, 0x81, 0x3C, 0x46, 0x14, 0x02, 0x64, 0x44,
-        0x88, 0x3A, 0x11, 0x00, 0x8E, 0x3B, 0x0F, 0x00, 0x65, 0x44, 0x01, 0x26, 0x5E, 0x00, 0x04, 0x26,
-        0x03, 0x00, 0x10, 0x26, 0x01, 0x00, 0x2D, 0x00, 0xA3, 0x46, 0x37, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x80, 0x2B, 0x53, 0x00, 0x3A, 0x00, 0xA3, 0x46, 0x65, 0x44, 0x01, 0x26, 0x0B, 0x00, 0x04, 0x26,
-        0x03, 0x00, 0x10, 0x26, 0x01, 0x00, 0x1D, 0x00, 0x37, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x27,
-        0x2C, 0x00, 0x17, 0x00, 0x88, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x36, 0xF2, 0x66, 0x43, 0xFF, 0xB4,
-        0x3C, 0x46, 0x22, 0xF0, 0x60, 0x47, 0xB0, 0x84, 0x22, 0xFA, 0x63, 0x46, 0x37, 0xF0, 0x60, 0x40,
-        0x04, 0x27, 0x03, 0x00, 0x10, 0x27, 0x01, 0x00, 0x04, 0x00, 0x64, 0x40, 0x80, 0x27, 0x15, 0x00,
-        0x00, 0x00, 0x3C, 0x46, 0x02, 0x65, 0xBC, 0x60, 0x58, 0x78, 0xFF, 0xFF, 0xCD, 0x81, 0x63, 0x42,
-        0x5A, 0xD0, 0x3C, 0x46, 0x0A, 0x02, 0x64, 0x44, 0x88, 0x3A, 0x07, 0x00, 0x77, 0x37, 0x1D, 0x00,
-        0x78, 0x37, 0x1B, 0x00, 0x8E, 0x37, 0x19, 0x00, 0xF1, 0x01, 0x3C, 0x46, 0x22, 0xF0, 0x80, 0x67,
-        0xB0, 0x84, 0xA2, 0xDA, 0xFF, 0xFF, 0x3F, 0xF2, 0x3E, 0xF0, 0x08, 0xA4, 0x60, 0x41, 0x22, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x03, 0x00, 0x06, 0x00, 0x04, 0x2B,
-        0x04, 0x00, 0x61, 0x44, 0x64, 0x40, 0x10, 0x26, 0x3F, 0xFA, 0x3C, 0x46, 0x2C, 0xF2, 0x27, 0x40,
-        0x01, 0x27, 0x32, 0xF2, 0xB5, 0xF1, 0x60, 0x40, 0x01, 0x26, 0x53, 0x00, 0x09, 0x60, 0x00, 0x64,
-        0xD0, 0x80, 0x3F, 0xF2, 0x09, 0x06, 0x2C, 0x45, 0xC4, 0x84, 0xD0, 0x80, 0x40, 0x4A, 0x40, 0x06,
-        0x60, 0x43, 0x64, 0x44, 0x54, 0x88, 0x18, 0x00, 0x60, 0x45, 0x1F, 0x60, 0x9C, 0x64, 0xA0, 0xD3,
-        0xBB, 0xF3, 0x00, 0xBC, 0x60, 0x47, 0xEC, 0xA0, 0x33, 0x03, 0x32, 0x07, 0x2C, 0x44, 0xC4, 0x81,
-        0x02, 0x60, 0x1C, 0x65, 0x45, 0x4A, 0xD5, 0x80, 0x2C, 0x45, 0x2A, 0x06, 0x27, 0x40, 0x04, 0x27,
-        0x30, 0x00, 0x2A, 0x43, 0xD7, 0x85, 0x45, 0x48, 0xB6, 0xF1, 0x0F, 0xF2, 0xD3, 0x80, 0x01, 0x65,
-        0x01, 0x07, 0x00, 0x65, 0xB4, 0x84, 0x0F, 0xFA, 0x00, 0x63, 0x3F, 0xF2, 0x28, 0x45, 0x60, 0x41,
-        0xD4, 0x84, 0xDF, 0x83, 0xFC, 0x07, 0x14, 0xFC, 0x61, 0x44, 0x01, 0x36, 0x02, 0x00, 0x09, 0x3A,
-        0x06, 0x00, 0x28, 0x44, 0x48, 0x88, 0x2A, 0x44, 0xC8, 0x83, 0x43, 0x4A, 0xE5, 0x01, 0x17, 0xFA,
-        0x04, 0x60, 0x00, 0x64, 0x27, 0x45, 0xB4, 0x84, 0x2A, 0xFA, 0x28, 0x43, 0x16, 0xFC, 0x0D, 0x00,
-        0x3F, 0xF2, 0x2C, 0x45, 0xB6, 0xF1, 0xC4, 0x81, 0xD1, 0x80, 0x0F, 0xF2, 0x01, 0x06, 0x01, 0xBC,
-        0x0F, 0xFA, 0x3F, 0xF2, 0x17, 0xFA, 0x01, 0x64, 0x14, 0xFA, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46,
-        0x0E, 0xF0, 0x63, 0x46, 0x00, 0x7F, 0x64, 0x5E, 0x4B, 0xFB, 0x64, 0x44, 0x00, 0x7E, 0xBB, 0xFB,
-        0x62, 0xF1, 0x60, 0x43, 0x60, 0x47, 0xD0, 0x80, 0xC0, 0x65, 0x01, 0x06, 0x64, 0x44, 0x0A, 0x36,
-        0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x36, 0x15, 0x64, 0x6E, 0x36, 0x0B, 0x64, 0x44, 0x86,
-        0x2A, 0xF2, 0x07, 0xF0, 0x60, 0x40, 0xB0, 0x3A, 0x03, 0x00, 0x40, 0x3B, 0x01, 0x00, 0x12, 0x00,
-        0x0C, 0xB4, 0x08, 0x3A, 0x55, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B, 0x50, 0x00,
-        0x17, 0xF2, 0x22, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x22, 0x22, 0x04, 0x00, 0x00, 0xA8, 0x01, 0xA8,
-        0x47, 0x03, 0x46, 0x03, 0x3C, 0x46, 0x2A, 0xF0, 0x40, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x60, 0x45,
-        0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x43, 0x60, 0x40, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x0A, 0x00,
-        0x02, 0x00, 0x04, 0x27, 0x07, 0x00, 0x65, 0x44, 0x2A, 0x65, 0x60, 0x40, 0x03, 0x2B, 0x24, 0x65,
-        0x45, 0x4C, 0x2E, 0x00, 0x65, 0x44, 0x2E, 0x65, 0x60, 0x40, 0x03, 0x2B, 0x28, 0x65, 0x45, 0x4C,
-        0x07, 0xF0, 0x88, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0x00, 0x7C, 0x03, 0x03, 0x63, 0x40, 0x01, 0x2A,
-        0x01, 0x00, 0x3D, 0xF1, 0x2A, 0xF2, 0xFF, 0xFF, 0x08, 0xB0, 0x3E, 0xF2, 0x19, 0x03, 0x60, 0x47,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x03, 0xB4, 0xD0, 0x80, 0xFF, 0xFF, 0x11, 0x03, 0x1B, 0x60,
-        0xD4, 0x62, 0x1B, 0x60, 0xAC, 0x64, 0xA2, 0xDB, 0x3C, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0x5C, 0x5C, 0xFC, 0xFC, 0xCE, 0xFE, 0xB5, 0x60, 0xEC, 0x78, 0xFF, 0xFF,
-        0xBB, 0xF1, 0x2C, 0x45, 0x64, 0x43, 0x17, 0xF2, 0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x81, 0x63, 0x40, 0x37, 0x37, 0xE1, 0x81, 0x64, 0x45, 0xB5, 0x60, 0x58, 0x4D, 0xC1, 0x78,
-        0xFF, 0xFF, 0xAE, 0x82, 0xFC, 0xA2, 0x0A, 0x03, 0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41,
-        0x04, 0x0D, 0x63, 0x44, 0x80, 0x7E, 0xBB, 0xFB, 0x61, 0x44, 0xDC, 0x84, 0x2B, 0xF0, 0x1B, 0xFA,
-        0x64, 0x44, 0x80, 0x27, 0x34, 0x00, 0x16, 0xF2, 0x0F, 0xF0, 0xAC, 0x84, 0x2C, 0x45, 0x29, 0x03,
-        0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x63, 0x40, 0x37, 0x37, 0xE1, 0x81,
-        0x64, 0x45, 0x0F, 0xF0, 0xB5, 0x60, 0x58, 0x4D, 0xC1, 0x78, 0xFF, 0xFF, 0xAE, 0x82, 0xFC, 0xA2,
-        0x0A, 0x03, 0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41, 0x04, 0x0D, 0x80, 0x67, 0xB0, 0x84,
-        0x0F, 0xFA, 0x61, 0x44, 0xDC, 0x84, 0x1D, 0xFA, 0xDE, 0x65, 0xC4, 0x85, 0x26, 0x41, 0xE1, 0x81,
-        0xC5, 0x84, 0x2B, 0xFA, 0x1B, 0xF0, 0xDE, 0x64, 0xC0, 0x85, 0x26, 0x44, 0xE0, 0x84, 0xC4, 0x84,
-        0x10, 0xFA, 0x26, 0x44, 0x2C, 0xF0, 0x0A, 0xA4, 0x64, 0x40, 0x01, 0x26, 0x00, 0x64, 0x11, 0xFA,
-        0xBB, 0xF3, 0x13, 0xFA, 0xFF, 0xFF, 0x0D, 0xF2, 0x3E, 0xF0, 0x60, 0x47, 0xFF, 0xB4, 0x64, 0x41,
-        0x01, 0xB1, 0x01, 0x63, 0x1D, 0x02, 0x60, 0x41, 0xFF, 0x22, 0x04, 0x00, 0xB5, 0x60, 0x58, 0x4F,
-        0xB2, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0x92, 0x64, 0xA0, 0xDD, 0x21, 0x60, 0x98, 0x62, 0xA2, 0xD3,
-        0xB5, 0x60, 0x58, 0x4D, 0xE3, 0x78, 0xFF, 0xFF, 0x60, 0x41, 0x01, 0x63, 0x61, 0x40, 0xFF, 0x22,
-        0x04, 0x00, 0xB5, 0x60, 0x58, 0x4F, 0xB2, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0x94, 0x64, 0xA0, 0xDD,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27, 0x03, 0x00, 0xBA, 0x60, 0x4A, 0x78, 0xFF, 0xFF,
-        0x22, 0xF2, 0x46, 0x43, 0x60, 0x40, 0x22, 0x26, 0x8B, 0x00, 0x01, 0x26, 0x05, 0x00, 0x04, 0x26,
-        0x0C, 0x00, 0xBA, 0x60, 0x4A, 0x78, 0xFF, 0xFF, 0x04, 0x27, 0x03, 0x00, 0xBA, 0x60, 0x4A, 0x78,
-        0xFF, 0xFF, 0x88, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x02, 0x00, 0x07, 0xF4, 0xFF, 0xFF, 0xA3, 0x46,
-        0x2A, 0xF2, 0xA3, 0x46, 0x60, 0x40, 0x08, 0x27, 0x3B, 0x00, 0x88, 0xF3, 0x66, 0x5C, 0xD0, 0x80,
-        0x37, 0xF0, 0x08, 0x03, 0x64, 0x40, 0x10, 0x2A, 0x12, 0x00, 0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84,
-        0x37, 0xFA, 0x24, 0x00, 0x3D, 0xF3, 0x01, 0x61, 0x60, 0x43, 0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D,
-        0xE9, 0x81, 0xA1, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0x91, 0x84, 0x37, 0xFA, 0x17, 0x00, 0x47, 0xF2,
-        0xFF, 0xFF, 0x10, 0xA0, 0xFF, 0xFF, 0x02, 0x04, 0xFF, 0x60, 0xFF, 0x64, 0xDC, 0x84, 0x47, 0xFA,
-        0x46, 0xF2, 0x16, 0x04, 0xDC, 0x84, 0x46, 0xFA, 0x45, 0xF2, 0x08, 0x04, 0xDC, 0x84, 0x45, 0xFA,
-        0x05, 0x04, 0x37, 0xF2, 0xFF, 0xFF, 0xE0, 0x84, 0xE8, 0x84, 0x37, 0xFA, 0x0D, 0x60, 0x3E, 0x62,
-        0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC4, 0x60, 0x05, 0x78, 0xFF, 0xFF, 0x84, 0xFF,
-        0x0D, 0x60, 0x3E, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC4, 0x60, 0x7D, 0x78,
-        0xFF, 0xFF, 0x84, 0xFF, 0x88, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43,
-        0x3C, 0x46, 0x22, 0xF2, 0x63, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x47, 0xF0,
-        0x64, 0x41, 0x64, 0x47, 0xFF, 0xB4, 0x60, 0x5F, 0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47,
-        0xA3, 0x46, 0x3A, 0xFA, 0x64, 0x44, 0x20, 0x7F, 0x34, 0x94, 0x3B, 0xFA, 0xA3, 0x46, 0x46, 0xF2,
-        0x45, 0xF0, 0xA3, 0x46, 0x3C, 0xFA, 0x3D, 0xF8, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F,
-        0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x8A, 0x00,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x27, 0x35, 0x00, 0x2A, 0xF2, 0x00, 0x60, 0x7C, 0x62,
-        0x60, 0x40, 0x40, 0x2B, 0x27, 0x00, 0xA2, 0xD3, 0x00, 0x61, 0x60, 0xFE, 0xA0, 0xD3, 0xDE, 0x82,
-        0xA2, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81, 0xC0, 0x2B, 0x04, 0x00,
-        0x80, 0x2A, 0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00, 0x60, 0x47, 0xDC, 0x87,
-        0x01, 0x61, 0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE, 0xDA, 0x82, 0xA2, 0xD1,
-        0xFF, 0xFF, 0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64, 0xA2, 0xDB,
-        0xFF, 0xFF, 0x20, 0xFE, 0x00, 0x60, 0x7C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD3, 0x5A, 0xD1,
-        0x3A, 0xFA, 0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60,
-        0x80, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1, 0x64, 0x45, 0x64, 0x44, 0xE3, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5A, 0x65, 0x40,
-        0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE9, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5A, 0x08, 0x60, 0x00, 0xEA,
-        0x65, 0x44, 0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA,
-        0xD1, 0x60, 0x00, 0xEA, 0x02, 0x64, 0x3B, 0xDB, 0xBD, 0x60, 0xEB, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0xFC, 0xFB, 0x07, 0xF0, 0x00, 0x64, 0xD0, 0x80, 0x88, 0xF3, 0x17, 0x03, 0xD0, 0x80, 0x66, 0x41,
-        0x64, 0x46, 0x6F, 0xF2, 0x61, 0x46, 0x6D, 0x03, 0x60, 0x40, 0x00, 0x36, 0x6A, 0x00, 0x47, 0xF1,
-        0x07, 0xF0, 0x64, 0x40, 0x02, 0x26, 0x01, 0x00, 0x0B, 0x00, 0x03, 0x12, 0xBB, 0x60, 0x4E, 0x78,
-        0xFF, 0xFF, 0xFC, 0x0A, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF,
-        0x3E, 0xF2, 0x60, 0x45, 0x60, 0x47, 0x07, 0xB0, 0x00, 0x3A, 0x01, 0x00, 0xA6, 0x00, 0x65, 0x44,
-        0x60, 0x40, 0x01, 0x36, 0x4E, 0x00, 0x02, 0x36, 0x4F, 0x00, 0x03, 0x36, 0x2D, 0x00, 0x04, 0x36,
-        0x3E, 0x00, 0x52, 0x00, 0x00, 0x64, 0x4C, 0xFB, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF,
-        0x05, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x00, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2,
-        0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB,
-        0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04,
-        0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3,
-        0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF, 0x1D, 0x00, 0x4C, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x4C, 0xFB,
-        0xAB, 0xF3, 0x60, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x14, 0x02, 0x1C, 0x60, 0x0C, 0x62, 0x0F, 0x60,
-        0x96, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xC3, 0x01, 0x4C, 0xF3,
-        0x66, 0x41, 0xDC, 0x84, 0x4C, 0xFB, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x03, 0x7E, 0x6F, 0xFA,
-        0x61, 0x46, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF,
-        0x01, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0xF5, 0x01, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0x8C, 0xFA,
-        0x60, 0x47, 0x70, 0xF2, 0xFF, 0xB5, 0x08, 0x18, 0xE4, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x03, 0x02,
-        0xFB, 0x04, 0x01, 0x64, 0x01, 0x00, 0x00, 0x64, 0x0C, 0xF4, 0x00, 0xA8, 0xFF, 0xFF, 0xE4, 0x02,
-        0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x70, 0xF2, 0xFF, 0xB5, 0x61, 0x46,
-        0x00, 0xA8, 0xFF, 0xFF, 0x29, 0x03, 0xE0, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0x66, 0x41,
-        0x64, 0x46, 0x70, 0xFA, 0x61, 0x46, 0x01, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2,
-        0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB,
-        0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04,
-        0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3,
-        0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF, 0xA3, 0x01, 0xA2, 0x01, 0x65, 0x44, 0x60, 0x40, 0x01, 0x36,
-        0xA8, 0x01, 0x02, 0x36, 0x01, 0x00, 0xA5, 0x01, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF,
-        0x01, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x00, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2,
-        0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB,
-        0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04,
-        0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3,
-        0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x3E, 0xF2, 0x60, 0x45,
-        0x60, 0x47, 0x07, 0xB0, 0x00, 0x3A, 0x01, 0x00, 0xA3, 0x00, 0x65, 0x44, 0x60, 0x40, 0x01, 0x36,
-        0x0B, 0x00, 0x02, 0x36, 0x14, 0x00, 0x03, 0x36, 0x47, 0x00, 0x04, 0x36, 0x5E, 0x00, 0x05, 0x36,
-        0x0E, 0x00, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2,
-        0xFF, 0xFF, 0x02, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x07, 0xF0,
-        0x01, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2,
-        0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84,
-        0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF,
-        0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0x00, 0x63, 0x03, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x4C, 0xFD,
-        0x1C, 0x60, 0x0C, 0x62, 0x0F, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x4C, 0xF3,
-        0x02, 0xB0, 0x61, 0x46, 0xCC, 0x84, 0x05, 0x03, 0x04, 0x28, 0x4C, 0xFB, 0xBC, 0x60, 0x48, 0x78,
-        0xFF, 0xFF, 0x04, 0x28, 0x4C, 0xFB, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x04, 0x7E,
-        0x6F, 0xFA, 0x61, 0x46, 0xBC, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2,
-        0xFF, 0xFF, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x61, 0x46, 0xFF, 0xA0, 0xFF, 0xFF, 0x2F, 0x06,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x29, 0x00, 0x64, 0x46, 0x70, 0xFA,
-        0x01, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2,
-        0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84,
-        0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF,
-        0x6F, 0xF2, 0x00, 0x63, 0x03, 0x7E, 0x6F, 0xFA, 0x3C, 0x46, 0x4C, 0xFD, 0x51, 0x00, 0x50, 0x00,
-        0x65, 0x44, 0x60, 0x40, 0x01, 0x36, 0x03, 0x00, 0x02, 0x36, 0x12, 0x00, 0x49, 0x00, 0x66, 0x41,
-        0x64, 0x46, 0x70, 0xF2, 0x61, 0x46, 0x01, 0xB0, 0xFF, 0xFF, 0x42, 0x02, 0x07, 0xF0, 0x66, 0x41,
-        0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x02, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x39, 0x00, 0x38, 0x00,
-        0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x6F, 0xFA, 0x60, 0x47,
-        0xFF, 0xB5, 0x70, 0xF2, 0x61, 0x46, 0xFF, 0xA0, 0xFF, 0xFF, 0xF1, 0x06, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0xEB, 0x01, 0x66, 0x41, 0x64, 0x46, 0x70, 0xFA, 0x61, 0x46,
-        0x00, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2,
-        0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84,
-        0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF,
-        0x03, 0x64, 0x3B, 0xDB, 0xCA, 0xFE, 0x47, 0xF1, 0x01, 0x65, 0x32, 0x40, 0x04, 0x27, 0x08, 0x00,
-        0x2C, 0xF2, 0x64, 0x45, 0x02, 0x22, 0x04, 0x00, 0x60, 0x40, 0x01, 0x26, 0x01, 0x00, 0xEC, 0x00,
-        0x14, 0xF2, 0x65, 0x40, 0x01, 0x26, 0x1D, 0x00, 0x60, 0x45, 0x05, 0x64, 0x3B, 0xDB, 0x65, 0x44,
-        0xCC, 0x85, 0x98, 0xF1, 0x1E, 0x60, 0xDE, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84,
-        0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE,
-        0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0xAF, 0x00, 0x60, 0x41, 0x2A, 0xF0, 0x00, 0x60, 0x0C, 0x64, 0xA0, 0x84, 0x04, 0x36, 0x02, 0x00,
-        0x0C, 0x3A, 0x01, 0x00, 0xA5, 0x00, 0x61, 0x45, 0x60, 0x41, 0x98, 0xF1, 0x1E, 0x60, 0xDE, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80,
-        0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x61, 0x40, 0x08, 0x36, 0x01, 0x00, 0x88, 0x00,
-        0x14, 0xF2, 0x1C, 0x65, 0x60, 0x41, 0x00, 0x63, 0xCD, 0x81, 0xC7, 0x83, 0xFD, 0x02, 0x3F, 0xF0,
-        0x2C, 0xF2, 0xC3, 0x83, 0x60, 0x40, 0x01, 0x2A, 0x29, 0x00, 0x98, 0xF1, 0x1E, 0x60, 0xDC, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x98, 0xF1, 0x1E, 0x60,
-        0xE2, 0x64, 0xA0, 0xD3, 0x63, 0x45, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84,
-        0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x52, 0x00, 0x98, 0xF1, 0x1E, 0x60,
-        0xDA, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x98, 0xF1,
-        0x1E, 0x60, 0xE0, 0x64, 0xA0, 0xD3, 0x63, 0x45, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05,
-        0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64,
-        0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x15, 0xF2, 0xFF, 0xFF,
-        0x0F, 0xB4, 0x00, 0xA8, 0x01, 0xA8, 0x24, 0x03, 0x12, 0x03, 0x98, 0xF1, 0x1E, 0x60, 0xE8, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x11, 0x00, 0x98, 0xF1,
-        0x1E, 0x60, 0xE6, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0x04, 0x64, 0x3B, 0xDB, 0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x06, 0xF0, 0xFF, 0x60, 0x5F, 0x64,
-        0xA0, 0x84, 0x06, 0xFA, 0x61, 0x46, 0x1B, 0x60, 0xD4, 0x62, 0x1B, 0x60, 0xAC, 0x64, 0xA2, 0xDB,
-        0x3C, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x5C, 0x5C, 0xFC, 0xFC,
-        0xCE, 0xFE, 0xB5, 0x60, 0xEC, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0x64, 0x62, 0xA2, 0xD3, 0x07, 0xF4,
-        0x06, 0xF2, 0x02, 0xA8, 0x3C, 0x46, 0x10, 0x03, 0x10, 0xB0, 0x2A, 0xF2, 0x0D, 0x03, 0x0E, 0xF2,
-        0x0C, 0xB0, 0x60, 0x40, 0xF0, 0x37, 0x20, 0xBC, 0x02, 0x03, 0xFE, 0x7F, 0x0E, 0xFA, 0x23, 0xF0,
-        0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xCC, 0x01, 0x0F, 0xF0, 0x15, 0xF2, 0x64, 0x41, 0x01, 0x2A,
-        0x02, 0x00, 0xB1, 0xF1, 0x09, 0x00, 0x03, 0x65, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x06, 0xF0,
-        0x63, 0x46, 0xB0, 0xF1, 0x64, 0x40, 0x10, 0x2A, 0x64, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x15, 0xFA,
-        0x3B, 0x07, 0x61, 0x40, 0x01, 0x2A, 0x09, 0x00, 0x1F, 0x60, 0x0E, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x08, 0x00, 0x1F, 0x60, 0x10, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x2A, 0xF0, 0x08, 0x67, 0xB0, 0x84,
-        0xA2, 0xDA, 0x08, 0xF0, 0x1B, 0x60, 0x8E, 0x64, 0xD0, 0x80, 0x07, 0xF2, 0x46, 0x43, 0x88, 0xF1,
-        0x06, 0x03, 0x60, 0x46, 0x86, 0xF4, 0xD0, 0x80, 0x80, 0xBB, 0x01, 0x03, 0x06, 0xFC, 0x23, 0x46,
-        0x3E, 0xF2, 0x00, 0x63, 0x01, 0xB0, 0x43, 0x5C, 0xFC, 0xFC, 0x0B, 0x03, 0x1B, 0x60, 0xDA, 0x62,
-        0x1B, 0x60, 0xA6, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xB5, 0x60, 0xEC, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x49, 0xFB, 0x98, 0xF1, 0x1E, 0x60,
-        0xE8, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x98, 0xF1,
-        0x1E, 0x60, 0xEA, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0x21, 0x60, 0x98, 0x63, 0xA3, 0xD3, 0xB5, 0x60, 0x58, 0x4D, 0xE3, 0x78, 0xFF, 0xFF, 0x0D, 0xF2,
-        0x60, 0x5C, 0x64, 0x5F, 0x0D, 0xFA, 0x23, 0xF0, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x07, 0xF0,
-        0x66, 0x41, 0x64, 0x46, 0x06, 0xF2, 0x7F, 0x65, 0xA4, 0x9E, 0x06, 0xFA, 0x61, 0x46, 0x40, 0x01,
-        0xBE, 0x60, 0x70, 0x78, 0xFF, 0xFF, 0x21, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0x01, 0x63, 0xC4, 0xB4,
-        0x31, 0xFB, 0x32, 0xFD, 0xBE, 0x60, 0x1C, 0x62, 0x42, 0x40, 0xA0, 0x4C, 0x40, 0xBC, 0x7D, 0xB4,
-        0xA0, 0x51, 0xA0, 0xFE, 0x1A, 0xFF, 0x1B, 0x60, 0xA0, 0x64, 0x08, 0xF0, 0x07, 0xF0, 0xD0, 0x80,
-        0x1B, 0x60, 0xA6, 0x62, 0x14, 0x02, 0xA2, 0xD3, 0x01, 0x63, 0xAC, 0x86, 0x07, 0xF2, 0x0F, 0x03,
-        0xD0, 0x80, 0x09, 0xF2, 0xFA, 0x02, 0x23, 0xFC, 0x1B, 0x60, 0xD4, 0x62, 0x1B, 0x60, 0xAC, 0x64,
-        0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x3C, 0x46,
-        0x06, 0x64, 0xA1, 0xFF, 0x49, 0xFB, 0x83, 0x3E, 0x31, 0xF3, 0x87, 0x60, 0x80, 0x61, 0x1D, 0xF0,
-        0x60, 0x40, 0x01, 0x2A, 0x15, 0x00, 0xFE, 0xB4, 0x31, 0xFB, 0x00, 0x64, 0x49, 0xFB, 0x01, 0x64,
-        0x47, 0xFB, 0x21, 0x60, 0x98, 0x63, 0xA3, 0xD3, 0xB5, 0x60, 0x58, 0x4D, 0xE3, 0x78, 0xFF, 0xFF,
-        0x00, 0x71, 0x64, 0x5F, 0x0D, 0xFA, 0x40, 0x64, 0x3B, 0xDB, 0xBE, 0x60, 0x70, 0x78, 0xFF, 0xFF,
-        0x02, 0x2A, 0x1B, 0x00, 0xD1, 0x91, 0x8D, 0xE2, 0x41, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0x21, 0x60,
-        0xA0, 0x63, 0xFD, 0xB4, 0x31, 0xFB, 0xA3, 0xD3, 0xB5, 0x60, 0x58, 0x4D, 0xE3, 0x78, 0xFF, 0xFF,
-        0x02, 0x63, 0x60, 0x5C, 0x0D, 0xF2, 0x47, 0xFD, 0xFF, 0xB5, 0x60, 0x47, 0xD0, 0x80, 0xDC, 0x84,
-        0x1F, 0x03, 0x60, 0x47, 0xB4, 0x84, 0x0D, 0xFA, 0x1B, 0x00, 0x08, 0x2A, 0x07, 0x00, 0x42, 0x64,
-        0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xF7, 0xB4, 0x31, 0xFB, 0x12, 0x00, 0x10, 0x2A, 0x09, 0x00,
-        0x43, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xEF, 0xB4, 0x31, 0xFB, 0xBD, 0x60, 0xEB, 0x78,
-        0xFF, 0xFF, 0x44, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xDF, 0xB4, 0x31, 0xFB, 0x00, 0x00,
-        0x2A, 0x64, 0x3B, 0xDB, 0xB5, 0x60, 0xA2, 0x64, 0x40, 0x40, 0xBA, 0x60, 0x4F, 0x78, 0xFF, 0xFF,
-        0x12, 0x60, 0xCC, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x02, 0xB5, 0x04, 0xB5, 0x04, 0x03, 0x03, 0x03,
-        0xBE, 0x60, 0xF7, 0x78, 0xFF, 0xFF, 0xEB, 0x60, 0x58, 0x4E, 0x24, 0x78, 0xFF, 0xFF, 0x31, 0x40,
-        0x01, 0x2A, 0x29, 0x00, 0x9D, 0xFE, 0x27, 0x04, 0x26, 0x0A, 0x9F, 0xFE, 0x24, 0x05, 0x85, 0xFF,
-        0x20, 0x44, 0x84, 0xFF, 0x40, 0x26, 0x1F, 0x00, 0x3F, 0x40, 0x20, 0x2B, 0x1C, 0x00, 0x38, 0x69,
-        0xFF, 0xFF, 0x68, 0x44, 0x01, 0x16, 0xFD, 0x01, 0x01, 0x2A, 0x15, 0x00, 0x1F, 0x60, 0x1A, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x65, 0xF1, 0x02, 0x60,
-        0xEE, 0x64, 0x82, 0xFB, 0xFF, 0xFF, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0x83, 0xFB, 0x04, 0x64,
-        0x84, 0xFB, 0xDF, 0xFE, 0x19, 0xFF, 0x10, 0x64, 0x3B, 0xDB, 0x66, 0xF3, 0x73, 0x45, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0x75, 0xF1, 0xC9, 0xFE, 0x64, 0x40, 0x01, 0x26, 0x3D, 0x00,
-        0x49, 0xF3, 0x3C, 0x46, 0x33, 0x18, 0xCC, 0x84, 0x49, 0xFB, 0x30, 0x02, 0xBF, 0x60, 0xAD, 0x64,
-        0x40, 0x42, 0xFC, 0xFC, 0x00, 0x64, 0x5C, 0x5C, 0x32, 0xFB, 0x82, 0xFF, 0x5C, 0x47, 0x84, 0xFF,
-        0x62, 0xFF, 0x1F, 0x60, 0x0A, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28,
-        0xA2, 0xDB, 0x2A, 0xF2, 0x07, 0xF0, 0x0C, 0xB4, 0x08, 0x3A, 0x07, 0x00, 0x66, 0x41, 0x64, 0x46,
-        0x06, 0xF0, 0xFF, 0x60, 0xDF, 0x64, 0xA0, 0x84, 0x06, 0xFA, 0x23, 0xF0, 0x01, 0x64, 0xB0, 0x84,
-        0xA2, 0xDA, 0x1B, 0x60, 0xD4, 0x62, 0x1B, 0x60, 0xAC, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xCE, 0xFE, 0x06, 0x00, 0x66, 0xF3,
-        0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0x12, 0x60, 0xC8, 0x63, 0xA3, 0xD3,
-        0xAD, 0x49, 0x20, 0xB5, 0x08, 0xB1, 0x23, 0x03, 0xE1, 0x81, 0x10, 0xB5, 0x95, 0x81, 0x60, 0x41,
-        0x18, 0x02, 0x12, 0x60, 0xCA, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA4, 0xDB, 0x17, 0x02,
-        0x0A, 0x64, 0xA4, 0xDB, 0x61, 0x44, 0x07, 0xB4, 0xFF, 0xFF, 0x11, 0x02, 0x08, 0xB1, 0xE1, 0x81,
-        0x95, 0x81, 0xA3, 0xD3, 0x0C, 0x03, 0x08, 0xAC, 0x01, 0xBC, 0xA3, 0xDB, 0xFF, 0xFF, 0x13, 0xFF,
-        0x06, 0x00, 0x10, 0xAC, 0xA3, 0xDB, 0x12, 0x60, 0xCA, 0x63, 0x0A, 0x7C, 0xA3, 0xD9, 0xB5, 0x60,
-        0xAF, 0x78, 0xFF, 0xFF, 0x46, 0xF3, 0x45, 0xF1, 0x05, 0x1B, 0x64, 0x44, 0x03, 0x1B, 0x0F, 0x60,
-        0x92, 0x62, 0xA2, 0xD3, 0x45, 0xFB, 0x00, 0x63, 0x46, 0xFD, 0x60, 0x41, 0x25, 0x64, 0x3B, 0xDB,
-        0x27, 0x44, 0xEF, 0xB4, 0x40, 0x47, 0x00, 0xB9, 0x71, 0x40, 0x80, 0x27, 0x01, 0x12, 0x19, 0x03,
-        0xBF, 0x60, 0x4D, 0x62, 0x84, 0xFF, 0x42, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4,
-        0xA0, 0x51, 0x1F, 0x0A, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x19, 0x0A,
-        0x71, 0x40, 0x80, 0x27, 0xF7, 0x12, 0x45, 0xF3, 0x27, 0x02, 0x03, 0x18, 0xCC, 0x84, 0x45, 0xFB,
-        0xF1, 0x02, 0x06, 0x0A, 0xA0, 0x4C, 0xFB, 0xB4, 0xA0, 0x51, 0xA7, 0x60, 0xDF, 0x78, 0xFF, 0xFF,
-        0x84, 0xFF, 0xBF, 0x60, 0x2A, 0x64, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4,
-        0xA0, 0x51, 0xAF, 0x60, 0x19, 0x78, 0xFF, 0xFF, 0x3C, 0x44, 0xAC, 0x80, 0x32, 0xF1, 0x12, 0x03,
-        0x64, 0x40, 0x07, 0x22, 0x0F, 0x00, 0xA7, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0xA0, 0x4C, 0x1C, 0xBC,
-        0xDF, 0xB4, 0xA0, 0x51, 0xF1, 0x01, 0x06, 0x00, 0x28, 0x64, 0x3A, 0xDB, 0xA0, 0x4C, 0x30, 0xBC,
-        0xF3, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x28, 0x64, 0x3B, 0xDB, 0x0F, 0x60,
-        0x94, 0x62, 0xA2, 0xD3, 0x32, 0x40, 0x02, 0x27, 0x16, 0x00, 0x46, 0xFB, 0x14, 0x18, 0xBF, 0x60,
-        0x9B, 0x64, 0x84, 0xFF, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xF7, 0xB4, 0xA0, 0x51,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x46, 0xF3, 0xCA, 0x0A, 0xDC, 0x02,
-        0xCC, 0x84, 0x46, 0xFB, 0xF5, 0x02, 0x84, 0xFF, 0xBF, 0x60, 0xAD, 0x64, 0x40, 0x42, 0x82, 0xFF,
-        0x27, 0x44, 0x08, 0xBC, 0x40, 0x47, 0xBB, 0xE1, 0x04, 0x00, 0x3A, 0xE1, 0x31, 0x40, 0x01, 0x26,
-        0xBB, 0xE1, 0xA7, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0x24, 0xE2, 0x2D, 0xF3, 0x2C, 0xF3, 0x00, 0xBD,
-        0xCC, 0x84, 0x08, 0x03, 0x2C, 0xFB, 0x06, 0x02, 0x65, 0x44, 0x2C, 0xFB, 0x8A, 0xFF, 0x80, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0xD2, 0xF3, 0x31, 0x40, 0x01, 0x2A, 0x44, 0x00, 0x60, 0x43, 0x04, 0xB0,
-        0x02, 0xB0, 0x08, 0x24, 0x16, 0x02, 0x29, 0x44, 0xFF, 0xFF, 0x00, 0xA8, 0xCC, 0x81, 0x0E, 0x03,
-        0x41, 0x49, 0x37, 0x02, 0x63, 0x40, 0x08, 0x2A, 0x09, 0x00, 0xF7, 0xB3, 0x25, 0x60, 0x1C, 0x7C,
-        0xA4, 0xD1, 0xAD, 0x4F, 0xFD, 0xB4, 0xA0, 0x5D, 0x44, 0x49, 0x2B, 0x00, 0x63, 0x40, 0x02, 0x2A,
-        0x14, 0x00, 0x25, 0x60, 0x1E, 0x64, 0xA0, 0xD3, 0x25, 0x60, 0x1A, 0x7C, 0xA4, 0xDB, 0x40, 0x49,
-        0x25, 0x60, 0x20, 0x64, 0xA0, 0xD3, 0x25, 0x60, 0x1C, 0x7C, 0xA4, 0xDB, 0x0C, 0xBB, 0xFD, 0xB3,
-        0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x14, 0x00, 0x25, 0x60, 0x22, 0x64, 0xA0, 0xD3,
-        0x25, 0x60, 0x1A, 0x7C, 0x0E, 0x18, 0xA4, 0xDB, 0x40, 0x49, 0x25, 0x60, 0x24, 0x64, 0xA0, 0xD3,
-        0x25, 0x60, 0x1C, 0x7C, 0xA4, 0xDB, 0x08, 0xBB, 0xFB, 0xB3, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F,
-        0xA0, 0x5D, 0xD2, 0xFD, 0x01, 0x60, 0x0C, 0x61, 0xA1, 0xD3, 0x61, 0x43, 0x17, 0x18, 0x58, 0xD3,
-        0x62, 0x41, 0x03, 0x18, 0xCC, 0x84, 0xA1, 0xDB, 0x11, 0x00, 0x49, 0xD3, 0xA3, 0xDB, 0x06, 0xA1,
-        0xA1, 0xD3, 0x59, 0xD1, 0x60, 0x45, 0xA5, 0xD3, 0x59, 0xD1, 0xB0, 0x84, 0xA5, 0xDB, 0x64, 0x44,
-        0x06, 0x36, 0xCD, 0xFE, 0x07, 0x36, 0xD6, 0xFE, 0xE5, 0x01, 0x23, 0x46, 0xB5, 0x60, 0xAF, 0x78,
-        0xFF, 0xFF, 0x46, 0x43, 0x1C, 0x60, 0x0A, 0x61, 0xA1, 0xD3, 0x59, 0xD1, 0x06, 0x1B, 0x59, 0xD3,
-        0x59, 0xD1, 0x03, 0x1B, 0x59, 0xD3, 0x59, 0xD1, 0xF0, 0x18, 0x00, 0x63, 0x49, 0xDD, 0x60, 0x40,
-        0x02, 0x36, 0x11, 0x00, 0x03, 0x36, 0x32, 0x00, 0x01, 0x36, 0x08, 0x00, 0x05, 0x3A, 0xEA, 0x01,
-        0xA4, 0xD3, 0x5A, 0xD3, 0x9C, 0x85, 0xA4, 0x84, 0xA2, 0xDB, 0xE4, 0x01, 0x01, 0x60, 0x0C, 0x61,
-        0x00, 0x64, 0xA1, 0xDB, 0xDF, 0x01, 0xC0, 0x60, 0x4F, 0x64, 0x40, 0x45, 0x22, 0x00, 0x01, 0x60,
-        0x0C, 0x66, 0xA6, 0xD3, 0x04, 0xA1, 0x60, 0x43, 0xA1, 0xD3, 0xC9, 0x81, 0x60, 0x45, 0x00, 0xBB,
-        0xA1, 0xDB, 0xBE, 0xD3, 0x09, 0x03, 0xD4, 0x84, 0x9C, 0x84, 0xDC, 0x84, 0xFF, 0xFF, 0x04, 0x0E,
-        0xA3, 0xD1, 0x63, 0x46, 0x64, 0x43, 0xF2, 0x01, 0x9C, 0x84, 0xDC, 0x85, 0x49, 0xDD, 0x61, 0x44,
-        0x00, 0xBB, 0xA6, 0xDB, 0x02, 0x03, 0x65, 0x44, 0xBE, 0xDB, 0xBC, 0x01, 0xC0, 0x60, 0x2A, 0x64,
-        0x40, 0x45, 0x01, 0x60, 0x0C, 0x66, 0xA6, 0xD3, 0xFF, 0xFF, 0xD0, 0x80, 0x0F, 0x18, 0x02, 0x03,
-        0x60, 0x46, 0xF9, 0x01, 0x58, 0xD3, 0xA4, 0xD3, 0x60, 0x45, 0x00, 0x63, 0xA4, 0xDD, 0x05, 0x18,
-        0x58, 0xD3, 0xFF, 0xFF, 0xC4, 0x83, 0xA2, 0xDD, 0xCA, 0x84, 0xA6, 0xDB, 0x25, 0x58, 0x64, 0x41,
-        0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x06, 0x02, 0x40, 0xFF, 0x42, 0xFF, 0x43, 0xFF, 0x44, 0xFF,
-        0x45, 0xFF, 0xA1, 0xFF, 0x88, 0xFF, 0x85, 0xFF, 0x21, 0xE1, 0x5C, 0x40, 0xC0, 0x60, 0x9A, 0x78,
-        0xFF, 0xFF, 0x43, 0xFF, 0x39, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x84, 0x3E, 0xFB, 0x01, 0xA0, 0x4C,
-        0x3D, 0x46, 0x2A, 0xF2, 0x46, 0x4D, 0x10, 0x25, 0x0E, 0x00, 0x09, 0xE1, 0xA1, 0xFF, 0x66, 0x40,
-        0x0F, 0xF2, 0x01, 0x29, 0x02, 0x00, 0x40, 0xFF, 0x0A, 0xBC, 0xA2, 0xDA, 0x08, 0x25, 0xE9, 0x01,
-        0xCB, 0xFE, 0x5C, 0x5D, 0xE7, 0x01, 0x44, 0xFF, 0x03, 0x2B, 0x21, 0x00, 0x89, 0xF3, 0x06, 0x61,
-        0x60, 0x43, 0x66, 0x45, 0x31, 0xF0, 0x63, 0x46, 0x05, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0x30, 0xF0,
-        0x0F, 0x02, 0x63, 0x46, 0x04, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0x2F, 0xF0, 0x09, 0x02, 0x63, 0x46,
-        0x03, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0xFF, 0xFF, 0x48, 0xFE, 0x06, 0x00,
-        0xCD, 0x81, 0x02, 0xA3, 0xE7, 0x02, 0x88, 0xF1, 0x08, 0xFE, 0x64, 0x43, 0x26, 0x03, 0x31, 0xF2,
-        0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0x88, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x07, 0xFC, 0x3F, 0xF2, 0x09, 0x60,
-        0xB0, 0x65, 0xD4, 0x80, 0x2A, 0xF2, 0xA1, 0x05, 0x08, 0x25, 0x93, 0x01, 0x00, 0x64, 0x0D, 0x60,
-        0x2C, 0x61, 0x40, 0x4B, 0xA1, 0xDB, 0x2D, 0x46, 0x3B, 0xF2, 0x88, 0xF1, 0x87, 0xF4, 0x60, 0x40,
-        0x20, 0x2B, 0x12, 0x00, 0xD3, 0x80, 0x2C, 0xF0, 0x90, 0x03, 0x07, 0xF4, 0x64, 0x40, 0x01, 0x26,
-        0x88, 0xF5, 0xB6, 0xF4, 0x2D, 0x46, 0x04, 0x64, 0x04, 0xB3, 0x22, 0xFA, 0x04, 0x03, 0xC2, 0x60,
-        0x11, 0x78, 0xFF, 0xFF, 0x01, 0x00, 0xE0, 0x00, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44,
-        0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5B, 0x64, 0x44, 0xE2, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0x7C, 0x5F, 0xE8, 0x84, 0xE8, 0x85, 0x0C, 0x60, 0x3A, 0x64, 0x44, 0xD3,
-        0x5A, 0xD1, 0x03, 0x1B, 0xC2, 0x60, 0x04, 0x78, 0xFF, 0xFF, 0x60, 0x45, 0x64, 0x44, 0xE3, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5B,
-        0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5B, 0x65, 0x40,
-        0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xE9, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5B,
-        0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5B, 0x64, 0x47,
-        0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5B, 0x65, 0x44, 0xD8, 0x84,
-        0x08, 0x25, 0x78, 0x00, 0x60, 0x7F, 0xA0, 0x5B, 0x80, 0x60, 0x00, 0xEB, 0xA0, 0x60, 0x00, 0xEB,
-        0xD1, 0x60, 0x00, 0xEB, 0x3F, 0xF2, 0x04, 0x65, 0xC4, 0x83, 0x0A, 0xE1, 0xB3, 0xFF, 0x9A, 0xFF,
-        0xCB, 0x83, 0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61, 0x0E, 0xA3, 0xAB, 0x84, 0xF2, 0xA3, 0xA1, 0xFF,
-        0x08, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0x02, 0x62, 0xC9, 0x81, 0xAB, 0x84, 0xA1, 0xFF, 0x01, 0x00,
-        0xA2, 0xDC, 0x7A, 0xD4, 0xFD, 0x1C, 0xA2, 0xDC, 0x08, 0x25, 0x54, 0x00, 0xF2, 0x1D, 0x7C, 0xA8,
-        0xD9, 0x81, 0xEF, 0x03, 0xFF, 0xB1, 0x09, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62, 0x5A, 0xD2,
-        0x89, 0xFF, 0x80, 0x4F, 0x6F, 0x44, 0xA2, 0xDA, 0x88, 0xFF, 0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF,
-        0x3D, 0x46, 0x08, 0x25, 0x3F, 0x00, 0x40, 0xFF, 0x0F, 0xF0, 0x0A, 0x64, 0xB0, 0x84, 0x18, 0x14,
-        0xF7, 0xB4, 0xA2, 0xDA, 0x0D, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A,
-        0x0C, 0x00, 0xD1, 0xF5, 0xD0, 0xF4, 0x0D, 0x60, 0x2C, 0x61, 0x59, 0xD1, 0x37, 0xF8, 0x05, 0x64,
-        0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8, 0xFC, 0x02, 0x2D, 0x46, 0xC0, 0x60, 0xB0, 0x78, 0xFF, 0xFF,
-        0xA2, 0xDA, 0x2D, 0x46, 0x3B, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x20, 0x2B, 0x18, 0x00, 0xD1, 0xF5,
-        0xB7, 0xF0, 0x2A, 0x44, 0xA4, 0x84, 0xFF, 0xFF, 0x2F, 0x26, 0x10, 0x00, 0x2D, 0x46, 0x64, 0x44,
-        0x3A, 0xF0, 0xBC, 0xF0, 0x64, 0x5F, 0x3D, 0xF0, 0x07, 0xF4, 0xD0, 0xF4, 0xFF, 0xFF, 0x08, 0xA3,
-        0x5B, 0xD8, 0x65, 0x5C, 0x5B, 0xD8, 0x5B, 0xDA, 0x2D, 0x46, 0x01, 0x00, 0x2D, 0x46, 0xC0, 0x60,
-        0xB0, 0x78, 0xFF, 0xFF, 0x98, 0xFF, 0x43, 0xFF, 0x40, 0xFF, 0xB0, 0xFF, 0xB1, 0xFF, 0x2D, 0x46,
-        0x0D, 0x60, 0x2C, 0x61, 0xA1, 0xD3, 0x2D, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x0A, 0x00, 0xD1, 0xF5,
-        0xD0, 0xF4, 0x59, 0xD1, 0x37, 0xF8, 0x05, 0x64, 0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8, 0xFC, 0x02,
-        0x2D, 0x46, 0xC0, 0x60, 0x9A, 0x78, 0xFF, 0xFF, 0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF, 0x3D, 0x46,
-        0x08, 0x25, 0xE0, 0x01, 0x0F, 0xF2, 0x40, 0xFF, 0x02, 0xBC, 0xA2, 0xDA, 0xC0, 0x60, 0xB0, 0x78,
-        0xFF, 0xFF, 0x00, 0x64, 0x0D, 0x60, 0x2C, 0x62, 0xA2, 0xDB, 0x04, 0x64, 0x22, 0xFA, 0x87, 0xF4,
-        0x88, 0xF1, 0xFF, 0xFF, 0xD3, 0x80, 0x3B, 0xF2, 0xE7, 0x03, 0x60, 0x47, 0xC0, 0xB7, 0x02, 0xFE,
-        0xF0, 0x84, 0xF0, 0x84, 0xF0, 0x84, 0x00, 0xA8, 0x40, 0x4A, 0x16, 0x03, 0xE0, 0x81, 0x61, 0x43,
-        0x42, 0xFE, 0x00, 0x64, 0xF0, 0x84, 0xFE, 0x1F, 0x40, 0x4A, 0xE1, 0x84, 0xE0, 0x84, 0x2D, 0x46,
-        0x07, 0xF4, 0xE0, 0x81, 0x37, 0xF0, 0x2A, 0x47, 0x0C, 0x60, 0x7A, 0x63, 0xA0, 0x84, 0x47, 0x9C,
-        0x10, 0x03, 0x7C, 0x44, 0xA0, 0x63, 0x11, 0x00, 0x20, 0x64, 0x40, 0x4A, 0x63, 0x46, 0x37, 0xF0,
-        0x66, 0x44, 0x64, 0x40, 0x80, 0x2B, 0x05, 0x00, 0x00, 0x60, 0x70, 0x7C, 0x00, 0x60, 0x90, 0x63,
-        0x04, 0x00, 0x2D, 0x46, 0xC2, 0x60, 0x04, 0x78, 0xFF, 0xFF, 0x2D, 0x46, 0xCE, 0xFB, 0xCF, 0xF9,
-        0xD0, 0xFD, 0x07, 0xF2, 0xD1, 0xFB, 0x60, 0x46, 0x37, 0xF0, 0x2A, 0x44, 0x0D, 0x60, 0x2C, 0x62,
-        0x5A, 0xD9, 0x00, 0x65, 0x45, 0x4B, 0xA0, 0x84, 0xFF, 0xFF, 0x3F, 0x22, 0x05, 0x00, 0x90, 0x84,
-        0x37, 0xFA, 0x01, 0x64, 0x40, 0x4B, 0x21, 0x00, 0xAD, 0x46, 0x0A, 0xA3, 0x3D, 0xF2, 0xAD, 0x46,
-        0xA3, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3C, 0xF2, 0xAD, 0x46, 0x02, 0x03, 0x16, 0x07, 0x14, 0x04,
-        0x5B, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3B, 0xF2, 0x03, 0x03, 0xAD, 0x46, 0x0E, 0x07, 0x0C, 0x04,
-        0x3A, 0xF0, 0xAD, 0x46, 0x5B, 0xD0, 0x64, 0x5F, 0xD0, 0x80, 0x2B, 0x44, 0x18, 0x07, 0x04, 0x03,
-        0xD0, 0x84, 0x10, 0xA4, 0xFF, 0xFF, 0x13, 0x07, 0x7F, 0x01, 0x01, 0x64, 0x0D, 0x60, 0x2C, 0x62,
-        0xA2, 0xDB, 0x2D, 0x46, 0x0D, 0x60, 0x3C, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB,
-        0xC2, 0x60, 0xAA, 0x78, 0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x53, 0x01, 0x2D, 0x46,
-        0x0D, 0x60, 0x3C, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC3, 0x60, 0x33, 0x78,
-        0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x45, 0x01, 0x00, 0x60, 0x0F, 0x64, 0xC1, 0x60,
-        0x70, 0x78, 0xFF, 0xFF, 0x07, 0xF4, 0x66, 0x41, 0x03, 0xF2, 0x04, 0xF2, 0x40, 0x42, 0x05, 0xF2,
-        0x40, 0x43, 0x40, 0x44, 0x61, 0x46, 0x3C, 0xF2, 0x3D, 0xF2, 0x40, 0x40, 0x40, 0x41, 0x0D, 0x60,
-        0x70, 0x65, 0x00, 0x61, 0xCF, 0xF1, 0xCE, 0xF5, 0x44, 0x4C, 0x2C, 0x5C, 0xE9, 0x80, 0x00, 0x64,
-        0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x24, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x20, 0x44, 0x40, 0x80, 0xDB, 0x83, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x21, 0x44, 0x40, 0x81, 0xDB, 0x83, 0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x22, 0x44, 0x40, 0x82, 0xDB, 0x83, 0xBD, 0xD2, 0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x23, 0x44, 0x40, 0x83, 0xF2, 0xA3, 0xBD, 0xD2, 0x23, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x24, 0x44, 0xC0, 0x9C, 0x41, 0x84, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01, 0x0D, 0x60, 0x2E, 0x61,
-        0x05, 0x64, 0xD0, 0xF4, 0xD1, 0xF5, 0xFE, 0xA3, 0x5B, 0xD0, 0xCC, 0x84, 0x59, 0xD9, 0xFC, 0x02,
-        0xD0, 0xF3, 0xD1, 0xF5, 0x60, 0x42, 0x20, 0x44, 0xA2, 0xDA, 0x21, 0x44, 0x5A, 0xDA, 0x22, 0x44,
-        0x5A, 0xDA, 0x23, 0x44, 0x5A, 0xDA, 0x24, 0x44, 0x5A, 0xDA, 0x61, 0x46, 0x0D, 0x60, 0x3C, 0x62,
-        0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, 0x41, 0xD0, 0xF3, 0xD1, 0xF5, 0xA0, 0xD2, 0x5A, 0xD0,
-        0x40, 0x40, 0x44, 0x41, 0x5A, 0xD2, 0x5A, 0xD0, 0x40, 0x42, 0x5A, 0xD0, 0x44, 0x43, 0x61, 0x46,
-        0xBA, 0xF0, 0x3B, 0xF2, 0x44, 0x44, 0x65, 0x5F, 0x40, 0x85, 0xCF, 0xF4, 0xCE, 0xF5, 0x43, 0x4C,
-        0x0D, 0x60, 0x70, 0x65, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x20, 0x44,
-        0x40, 0x80, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x21, 0x44, 0x40, 0x81,
-        0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x22, 0x44, 0x40, 0x82, 0xBD, 0xD2,
-        0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x23, 0x44, 0x40, 0x83, 0xBD, 0xD2, 0x23, 0x5C,
-        0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x24, 0x44, 0x40, 0x84, 0xBD, 0xD2, 0x24, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x25, 0x44, 0x40, 0x85, 0x61, 0x46, 0x3A, 0xF0, 0xFF, 0xFF, 0x64, 0x44,
-        0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5B, 0x64, 0x44, 0xE2, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0xCE, 0xF5, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84,
-        0x20, 0x5C, 0x40, 0x80, 0x20, 0x44, 0xE4, 0x7F, 0xA0, 0x5B, 0x20, 0x47, 0xE5, 0x7F, 0xA0, 0x5B,
-        0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x21, 0x5C, 0x40, 0x81, 0x21, 0x44,
-        0xE6, 0x7F, 0xA0, 0x5B, 0x21, 0x47, 0xE7, 0x7F, 0xA0, 0x5B, 0x21, 0x44, 0xE8, 0x80, 0xF8, 0x84,
-        0x22, 0x5C, 0x40, 0x82, 0x22, 0x44, 0xE8, 0x7F, 0xA0, 0x5B, 0x22, 0x47, 0xE9, 0x7F, 0xA0, 0x5B,
-        0x22, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x23, 0x5C, 0x40, 0x83, 0x23, 0x44, 0xEA, 0x7F, 0xA0, 0x5B,
-        0x23, 0x47, 0xEB, 0x7F, 0xA0, 0x5B, 0x23, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x24, 0x5C, 0x40, 0x84,
-        0x24, 0x44, 0xEC, 0x7F, 0xA0, 0x5B, 0x24, 0x47, 0xED, 0x7F, 0xA0, 0x5B, 0x24, 0x44, 0xE8, 0x80,
-        0xF8, 0x84, 0x25, 0x5C, 0x40, 0x85, 0x25, 0x44, 0xEE, 0x7F, 0xA0, 0x5B, 0x25, 0x47, 0xEF, 0x7F,
-        0xA0, 0x5B, 0x2C, 0x43, 0xA3, 0xD2, 0x25, 0x5C, 0x90, 0x81, 0xE9, 0x84, 0xE3, 0x7F, 0xA0, 0x5B,
-        0x0D, 0x60, 0x3C, 0x62, 0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF3, 0x5A, 0xD3, 0x40, 0x48,
-        0x5A, 0xD3, 0x40, 0x49, 0x40, 0x4A, 0x00, 0x60, 0x70, 0x7C, 0x44, 0x4D, 0x45, 0xF2, 0x46, 0xF2,
-        0x40, 0x47, 0x40, 0x46, 0x0D, 0x60, 0x70, 0x65, 0x00, 0x61, 0x2D, 0x5C, 0xE9, 0x80, 0x00, 0x64,
-        0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x26, 0x44, 0x40, 0x86, 0xDB, 0x83, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x27, 0x44, 0x40, 0x87, 0xDB, 0x83, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x28, 0x44, 0x40, 0x88, 0xDB, 0x83, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x29, 0x44, 0x40, 0x89, 0xF2, 0xA3, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x2A, 0x44, 0xC0, 0x9C, 0x41, 0x8A, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01, 0x26, 0x44, 0x40, 0xFA,
-        0x27, 0x44, 0x41, 0xFA, 0x28, 0x44, 0x42, 0xFA, 0x29, 0x44, 0x43, 0xFA, 0x2A, 0x44, 0x44, 0xFA,
-        0x0D, 0x60, 0x3E, 0x62, 0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x80, 0x7C, 0x44, 0x4D,
-        0x2D, 0x42, 0xA2, 0xD2, 0x5A, 0xD0, 0x40, 0x46, 0x44, 0x47, 0x5A, 0xD2, 0x5A, 0xD0, 0x40, 0x48,
-        0x5A, 0xD0, 0x44, 0x49, 0x47, 0xF2, 0x44, 0x4A, 0x40, 0x8B, 0x60, 0x5C, 0x64, 0x47, 0xE0, 0x7F,
-        0xA0, 0x5A, 0xFF, 0xB4, 0x20, 0xBC, 0x7F, 0xB4, 0xE1, 0x7F, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F,
-        0xA0, 0x5A, 0x00, 0x60, 0x70, 0x63, 0x0D, 0x60, 0x70, 0x65, 0xBD, 0xD2, 0x2B, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x26, 0x44, 0x40, 0x86, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x27, 0x44, 0x40, 0x87, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x28, 0x44, 0x40, 0x88, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x29, 0x44,
-        0x40, 0x89, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2A, 0x44, 0x40, 0x8A,
-        0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2B, 0x44, 0x40, 0x8B, 0xBD, 0xD2,
-        0x2B, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x26, 0x5C, 0x40, 0x86, 0x26, 0x44, 0xE4, 0x7F,
-        0xA0, 0x5A, 0x26, 0x47, 0xE5, 0x7F, 0xA0, 0x5A, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x84, 0xE8, 0x80,
-        0xF8, 0x84, 0x27, 0x5C, 0x40, 0x87, 0x27, 0x44, 0xE6, 0x7F, 0xA0, 0x5A, 0x27, 0x47, 0xE7, 0x7F,
-        0xA0, 0x5A, 0x27, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x28, 0x5C, 0x40, 0x88, 0x28, 0x44, 0xE8, 0x7F,
-        0xA0, 0x5A, 0x28, 0x47, 0xE9, 0x7F, 0xA0, 0x5A, 0x28, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x29, 0x5C,
-        0x40, 0x89, 0x29, 0x44, 0xEA, 0x7F, 0xA0, 0x5A, 0x29, 0x47, 0xEB, 0x7F, 0xA0, 0x5A, 0x29, 0x44,
-        0xE8, 0x80, 0xF8, 0x84, 0x2A, 0x5C, 0x40, 0x8A, 0x2A, 0x44, 0xEC, 0x7F, 0xA0, 0x5A, 0x2A, 0x47,
-        0xED, 0x7F, 0xA0, 0x5A, 0x2A, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x2B, 0x5C, 0x40, 0x8B, 0x2B, 0x44,
-        0xEE, 0x7F, 0xA0, 0x5A, 0x2B, 0x47, 0xEF, 0x7F, 0xA0, 0x5A, 0x38, 0xF0, 0x2B, 0x44, 0x90, 0x84,
-        0xE8, 0x84, 0xE3, 0x7F, 0xA0, 0x5A, 0x0D, 0x60, 0x3E, 0x62, 0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x42, 0xFF, 0x40, 0xFF, 0xDD, 0xFE, 0xAD, 0x4F, 0x00, 0x7F, 0x01, 0xBC, 0xA0, 0x5D, 0x00, 0xEE,
-        0x19, 0x61, 0xCD, 0x81, 0xFF, 0xFF, 0xFD, 0x02, 0x43, 0x45, 0x20, 0x44, 0x60, 0xBC, 0x40, 0x40,
-        0x02, 0x60, 0xEE, 0x63, 0x65, 0xF3, 0x82, 0xFD, 0x40, 0x7F, 0x83, 0xFB, 0x05, 0x64, 0x84, 0xFB,
-        0xDF, 0xFE, 0x19, 0xFF, 0xC5, 0x60, 0x6D, 0x64, 0x3F, 0x40, 0x01, 0x2B, 0x02, 0x00, 0xC5, 0x60,
-        0x6D, 0x64, 0x85, 0xFB, 0xC0, 0x60, 0x9A, 0x78, 0xFF, 0xFF, 0x04, 0xEE, 0xAD, 0x4F, 0x00, 0x7F,
-        0x01, 0xBC, 0xA0, 0x5D, 0x19, 0x61, 0xCD, 0x81, 0xFF, 0xFF, 0xFD, 0x02, 0xAD, 0x4F, 0x00, 0x7F,
-        0x01, 0xBC, 0xA0, 0x5D, 0x00, 0xEE, 0x15, 0x60, 0xA2, 0xE7, 0x1C, 0x60, 0x68, 0x63, 0x1C, 0x60,
-        0xDC, 0x65, 0xDF, 0xFE, 0x80, 0xE1, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47, 0x80, 0xBC,
-        0x00, 0x7F, 0x60, 0x4A, 0xD7, 0x80, 0xA1, 0xFF, 0xFF, 0xFF, 0xF5, 0x02, 0x1C, 0x60, 0xDC, 0x63,
-        0x1D, 0x60, 0xDE, 0x65, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47, 0x80, 0xBC, 0x00, 0x7F,
-        0x60, 0x4A, 0xD7, 0x80, 0xA1, 0xFF, 0xFF, 0xFF, 0xF5, 0x02, 0x3F, 0x40, 0x20, 0x2B, 0x00, 0x00,
-        0x01, 0x68, 0xFF, 0x6A, 0xBF, 0xFE, 0xC6, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x3F, 0x40, 0x20, 0x2B,
-        0xAD, 0x00, 0x01, 0x16, 0xFE, 0x01, 0x38, 0x69, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x2A,
-        0xA5, 0x00, 0x1F, 0x60, 0x1A, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28,
-        0xA2, 0xDB, 0x65, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x9C, 0x01, 0x00, 0x65, 0xF1, 0xDD, 0xFE,
-        0xAD, 0x4F, 0x00, 0x7F, 0x01, 0xBC, 0xA0, 0x5D, 0x00, 0xEE, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC,
-        0x40, 0x40, 0x02, 0x60, 0xEE, 0x64, 0x82, 0xFB, 0x83, 0xF9, 0x05, 0x64, 0x84, 0xFB, 0xDF, 0xFE,
-        0x19, 0xFF, 0x83, 0x00, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x43, 0x45, 0xA4, 0xD1, 0xDA, 0x83,
-        0xC3, 0x85, 0x80, 0xE1, 0xDF, 0xFE, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47, 0x80, 0xBC,
-        0x00, 0x7F, 0x60, 0x4A, 0xD7, 0x80, 0xA1, 0xFF, 0xF6, 0x02, 0xBF, 0xFE, 0x6E, 0x00, 0x3F, 0x40,
-        0x40, 0x26, 0x13, 0x00, 0x0B, 0x60, 0xF8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x10, 0x64, 0x90, 0x84,
-        0xA0, 0x50, 0xF8, 0xA2, 0xA2, 0xD1, 0x0A, 0x60, 0x19, 0x64, 0x90, 0x84, 0xA0, 0x52, 0x06, 0xA2,
-        0xA2, 0xD1, 0x46, 0x60, 0x09, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xAD, 0x4F, 0xFE, 0xB4, 0xA0, 0x5D,
-        0xAD, 0x4F, 0xFD, 0xB4, 0xA0, 0x5D, 0x02, 0xEE, 0xBD, 0xFE, 0x50, 0x00, 0x80, 0xE1, 0x01, 0x16,
-        0xFE, 0x01, 0x64, 0x48, 0x92, 0x6A, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x40, 0x1F, 0x60, 0x08, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x3F, 0x00, 0x80, 0xE1,
-        0x01, 0x16, 0xFE, 0x01, 0x01, 0x68, 0xA7, 0x6A, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x40, 0x36, 0x00,
-        0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x80, 0xE1, 0x64, 0x46, 0x01, 0x16, 0xFE, 0x01, 0x21, 0x69,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x5E, 0x01, 0x16, 0xFE, 0x01, 0x22, 0x69, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x68, 0x5F, 0x26, 0xFA, 0x1C, 0xF2, 0x01, 0x16, 0xFE, 0x01, 0x3A, 0x69, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x68, 0x5F, 0x27, 0xFA, 0x1B, 0x00, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x43, 0x45, 0xBE, 0xD5,
-        0xA4, 0xD2, 0x5A, 0x86, 0xEF, 0xA0, 0x11, 0x61, 0x01, 0x06, 0x60, 0x41, 0x1C, 0x60, 0x46, 0x63,
-        0x80, 0xE1, 0xBD, 0xD3, 0x26, 0x42, 0x01, 0x16, 0xFE, 0x01, 0x60, 0x49, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x68, 0x44, 0xCD, 0x81, 0xA2, 0xDA, 0x5A, 0x86, 0xF4, 0x02, 0x25, 0x43, 0x21, 0xE1, 0x00, 0x64,
-        0xBF, 0xDB, 0x20, 0x44, 0x20, 0x2A, 0x07, 0x00, 0x07, 0xB4, 0x04, 0x36, 0xC3, 0xFE, 0x06, 0x36,
-        0xCC, 0xFE, 0x07, 0x36, 0xD5, 0xFE, 0x20, 0x44, 0xD8, 0xB4, 0x40, 0x40, 0x20, 0x44, 0x40, 0x2A,
-        0x07, 0x00, 0x9F, 0xFE, 0x1E, 0x05, 0xBF, 0xB4, 0x40, 0x40, 0x85, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x1B, 0x60, 0xE6, 0x63, 0xBD, 0xD3, 0x02, 0x61, 0x17, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x02, 0x61,
-        0x13, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x02, 0x61, 0x0F, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x04, 0x61,
-        0x0B, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x06, 0x61, 0x07, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x07, 0x61,
-        0x03, 0x1B, 0xC0, 0x60, 0x9A, 0x78, 0xFF, 0xFF, 0xA3, 0xD1, 0x40, 0x44, 0x20, 0x44, 0x07, 0xB5,
-        0xD4, 0x85, 0x35, 0x80, 0x24, 0x45, 0x1C, 0x60, 0x22, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x80, 0xE1, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x64, 0x43, 0xBD, 0xD3, 0xBD, 0xD1,
-        0x40, 0x44, 0x10, 0x27, 0x10, 0x00, 0xFF, 0x60, 0x7F, 0x65, 0x15, 0x60, 0xA2, 0x64, 0x24, 0x40,
-        0x08, 0x2B, 0xA4, 0x84, 0xA0, 0x57, 0xFF, 0xFF, 0x64, 0x49, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x16,
-        0xFD, 0x01, 0x00, 0x7F, 0xA3, 0xDB, 0xA1, 0x01, 0x80, 0xE1, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC,
-        0x40, 0x40, 0x64, 0x43, 0xBD, 0xD3, 0xBD, 0xD1, 0x40, 0x44, 0x10, 0x2B, 0x11, 0x00, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x15, 0x60, 0x80, 0xE7, 0x24, 0x40, 0x07, 0x27, 0x02, 0x00, 0x50, 0xEC, 0x00, 0x00,
-        0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x24, 0x40, 0x20, 0x2B, 0x40, 0xEC, 0x0F, 0x00,
-        0x15, 0x60, 0x22, 0x64, 0x24, 0x40, 0x08, 0x27, 0x80, 0xBC, 0xA3, 0xD3, 0xA0, 0x57, 0x60, 0x48,
-        0x64, 0x44, 0x80, 0xBC, 0xFF, 0xB4, 0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x75, 0x01,
-        0xA2, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x01, 0x02, 0xA1, 0xFF, 0x86, 0xFF, 0x88, 0xFF,
-        0x5C, 0x46, 0x5C, 0x49, 0x5C, 0x40, 0xDE, 0x60, 0x58, 0x4F, 0xE2, 0x78, 0xFF, 0xFF, 0xCE, 0x60,
-        0x58, 0x4F, 0x00, 0x78, 0xFF, 0xFF, 0xE7, 0x60, 0x58, 0x4F, 0xBE, 0x78, 0xFF, 0xFF, 0xDB, 0x60,
-        0x58, 0x4F, 0x3B, 0x78, 0xFF, 0xFF, 0x13, 0xE1, 0xA3, 0xFF, 0xC7, 0x60, 0x2E, 0x78, 0xFF, 0xFF,
-        0xDC, 0x60, 0x87, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xCE, 0x62, 0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x22, 0x00, 0x75, 0xF3, 0x31, 0x40, 0x01, 0x2A, 0x1E, 0x00,
-        0xDC, 0x84, 0x01, 0xB4, 0x75, 0xFB, 0x09, 0x02, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x11, 0x00, 0x0F, 0x60, 0xDC, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x08, 0x00, 0xA9, 0xFE, 0xE4, 0x05,
-        0xAB, 0xFE, 0x07, 0x05, 0xA8, 0xFE, 0xD4, 0x05, 0xAA, 0xFE, 0xD5, 0x05, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x85, 0x3E, 0x1B, 0x60, 0xC4, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x03, 0x02,
-        0xC7, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0x26, 0x45, 0xD4, 0x80, 0x0F, 0xF0, 0xF9, 0x03, 0x64, 0x44,
-        0x70, 0xB0, 0x70, 0x2A, 0x14, 0x00, 0x1F, 0x60, 0x18, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84,
-        0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0xA2, 0xFF, 0x8F, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0xFE, 0xA0,
-        0x8F, 0xFB, 0x01, 0x07, 0xD4, 0xFE, 0xA3, 0xFF, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x64, 0x40,
-        0x02, 0x26, 0x09, 0x00, 0x66, 0x45, 0x09, 0xF4, 0x0F, 0xF2, 0x02, 0x18, 0x65, 0x46, 0xE3, 0x1B,
-        0x00, 0x64, 0x40, 0x46, 0xCB, 0x01, 0xA2, 0xFF, 0x8F, 0xF3, 0x46, 0x46, 0xCC, 0x84, 0xFE, 0xA0,
-        0x8F, 0xFB, 0x01, 0x07, 0xD4, 0xFE, 0xA3, 0xFF, 0x0F, 0xF0, 0xA3, 0xFC, 0x64, 0x44, 0x80, 0x26,
-        0x22, 0x00, 0x98, 0xF1, 0x1E, 0x60, 0xF8, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00, 0x07, 0x60, 0x01, 0x64, 0x04, 0x00,
-        0x02, 0x2A, 0x06, 0x00, 0x00, 0x60, 0x01, 0x64, 0x23, 0xFA, 0xCB, 0x60, 0xC8, 0x78, 0xFF, 0xFF,
-        0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x08, 0x26, 0x3F, 0x00, 0x2A, 0xF2, 0x60, 0x63, 0x60, 0x40,
-        0x02, 0x2B, 0x66, 0x63, 0xBE, 0xD2, 0x69, 0xF1, 0xA3, 0xD2, 0xD0, 0x80, 0x68, 0xF1, 0x18, 0x02,
-        0xBF, 0xD2, 0xD0, 0x80, 0x67, 0xF1, 0x14, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x11, 0x02, 0x98, 0xF1,
-        0x1F, 0x60, 0x04, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0x32, 0x44, 0x01, 0x2A, 0x03, 0x00, 0x07, 0x60, 0x02, 0x64, 0x04, 0x00, 0x02, 0x2A, 0x06, 0x00,
-        0x00, 0x60, 0x02, 0x64, 0x23, 0xFA, 0xCB, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0xB0, 0x3A, 0x06, 0x00, 0x00, 0x60, 0x02, 0x64, 0x23, 0xFA, 0xC8, 0x60, 0x6D, 0x78,
-        0xFF, 0xFF, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x32, 0x44, 0x01, 0x2A, 0x4A, 0x00, 0x20, 0x60,
-        0x6C, 0x63, 0xBF, 0xD3, 0x00, 0x65, 0xB4, 0x81, 0xDB, 0x83, 0x3D, 0x03, 0xBF, 0xD3, 0xA3, 0xD3,
-        0x40, 0x48, 0xBE, 0xD3, 0x40, 0x4A, 0x2E, 0xF0, 0x40, 0x4C, 0xD0, 0x80, 0x2D, 0xF0, 0x08, 0x02,
-        0x2A, 0x44, 0xD0, 0x80, 0x2C, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x2B, 0x03,
-        0x31, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x30, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x2F, 0xF0,
-        0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x1E, 0x03, 0x34, 0xF0, 0x2C, 0x44, 0xD0, 0x80,
-        0x33, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x32, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80,
-        0xFF, 0xFF, 0x11, 0x03, 0x38, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x37, 0xF0, 0x08, 0x02, 0x2A, 0x44,
-        0xD0, 0x80, 0x36, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x03, 0xFA, 0xA1,
-        0x06, 0xA3, 0xB7, 0x03, 0xC3, 0x01, 0x07, 0x60, 0x00, 0x64, 0x23, 0xFA, 0xCB, 0x60, 0xC8, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0x0F, 0xF0, 0x60, 0x45, 0xA4, 0x36, 0x08, 0x00, 0x0C, 0xB4, 0x04, 0x36,
-        0x02, 0x00, 0x0C, 0x3A, 0x06, 0x00, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0xC9, 0x60, 0x42, 0x78,
-        0xFF, 0xFF, 0x26, 0xF2, 0x50, 0xF1, 0x60, 0x47, 0x00, 0x7E, 0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF, 0xC0, 0x84, 0xA2, 0xDB, 0x0F, 0xF0,
-        0x65, 0x40, 0x40, 0x2B, 0x22, 0x00, 0x32, 0x40, 0x08, 0x26, 0x1F, 0x00, 0x07, 0xF4, 0x36, 0xF2,
-        0xFF, 0xFF, 0x37, 0xB4, 0x26, 0x46, 0x19, 0x02, 0x2C, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26,
-        0x11, 0x00, 0x98, 0xF1, 0x1E, 0x60, 0xFE, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x64, 0x40, 0x60, 0x26,
-        0x03, 0x00, 0xC9, 0x60, 0x1A, 0x78, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x3A, 0xF3, 0x01, 0x98, 0xF1,
-        0x1E, 0x60, 0xF2, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3B, 0x12, 0x00, 0x98, 0xF1, 0x1F, 0x60, 0x00, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x13, 0x00, 0x02, 0x3B,
-        0x11, 0x00, 0x98, 0xF1, 0x1F, 0x60, 0x02, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x2A, 0xF2, 0x28, 0x41, 0x40, 0xA8, 0x01, 0xB1, 0x02, 0x02, 0x5F, 0x02,
-        0x89, 0x00, 0x60, 0x40, 0x08, 0x2A, 0x2B, 0x00, 0x98, 0xF1, 0x1E, 0x60, 0xF0, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE,
-        0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45,
-        0x98, 0xF1, 0x1E, 0x60, 0xF6, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03,
-        0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00,
-        0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x0F, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x40, 0x26, 0x28, 0x00, 0x32, 0x44, 0x02, 0x26, 0x25, 0x00, 0x10, 0x2B,
-        0x26, 0x00, 0x20, 0x60, 0x6C, 0x63, 0xBF, 0xD3, 0x2C, 0xF0, 0x00, 0xA8, 0x60, 0x41, 0x0D, 0x03,
-        0x50, 0xFE, 0xBD, 0xD3, 0x2D, 0xF0, 0xD0, 0x80, 0xBD, 0xD3, 0x2E, 0xF0, 0xD0, 0x80, 0xBD, 0xD3,
-        0x2C, 0xF0, 0xD0, 0x80, 0xFA, 0xA1, 0x10, 0x0C, 0xF3, 0x02, 0x50, 0xFE, 0x60, 0x60, 0x01, 0x64,
-        0xD0, 0x80, 0x2D, 0xF0, 0x1D, 0x64, 0xD0, 0x80, 0x2E, 0xF0, 0x01, 0x64, 0xD0, 0x80, 0xFF, 0xFF,
-        0x03, 0x0C, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x40, 0x2A, 0x00, 0x00, 0xCB, 0x60,
-        0xB6, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x40, 0x26, 0xFA, 0x01, 0x2A, 0xF0, 0xFF, 0xFF, 0x64, 0x40,
-        0x08, 0x2A, 0x20, 0x00, 0x32, 0x40, 0x02, 0x2A, 0x1D, 0x00, 0x03, 0x67, 0xA0, 0x84, 0x00, 0x37,
-        0x64, 0x63, 0x60, 0x40, 0x02, 0x37, 0x5E, 0x63, 0x60, 0x40, 0x01, 0x37, 0x58, 0x63, 0x60, 0x40,
-        0x03, 0x37, 0x0D, 0x00, 0xBD, 0xD2, 0x67, 0xF1, 0xBD, 0xD2, 0xD0, 0x80, 0x68, 0xF1, 0x07, 0x02,
-        0xD0, 0x80, 0xBD, 0xD2, 0x69, 0xF1, 0x03, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0xCB, 0x60,
-        0xBC, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x87, 0xF4, 0x60, 0x40, 0x03, 0x2B, 0x31, 0x00, 0x89, 0xF3,
-        0x06, 0x61, 0x60, 0x43, 0x66, 0x45, 0x31, 0xF0, 0x63, 0x46, 0x05, 0xF2, 0x65, 0x46, 0xD0, 0x80,
-        0x30, 0xF0, 0x0F, 0x02, 0x63, 0x46, 0x04, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0x2F, 0xF0, 0x09, 0x02,
-        0x63, 0x46, 0x03, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0xFF, 0xFF, 0x48, 0xFE,
-        0x06, 0x00, 0xCD, 0x81, 0x02, 0xA3, 0xE7, 0x02, 0x88, 0xF1, 0x08, 0xFE, 0x64, 0x43, 0x03, 0x03,
-        0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x43, 0x43, 0x23, 0x46, 0x06, 0xF0, 0x26, 0x46, 0x07, 0x67,
-        0xA0, 0x84, 0x23, 0xFA, 0x64, 0x40, 0x02, 0x26, 0x2B, 0x00, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF,
-        0x26, 0x1B, 0x31, 0xF2, 0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3,
-        0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2,
-        0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4,
-        0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x88, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x43, 0x43,
-        0x07, 0xFC, 0x43, 0x43, 0x02, 0xFE, 0x1D, 0xF0, 0x12, 0x60, 0xC0, 0x62, 0xC0, 0x64, 0xC0, 0x84,
-        0xA2, 0xD1, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA2, 0xDB,
-        0x63, 0x45, 0x2A, 0xF2, 0x35, 0xF0, 0x60, 0x40, 0xA4, 0x36, 0x0B, 0x00, 0x08, 0x2B, 0x0C, 0x00,
-        0x23, 0x46, 0x22, 0xF2, 0x26, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x06, 0x02, 0xCB, 0x60, 0xBC, 0x78,
-        0xFF, 0xFF, 0xCB, 0x60, 0xB6, 0x78, 0xFF, 0xFF, 0x23, 0x46, 0x1E, 0xF2, 0x26, 0x46, 0x44, 0x4C,
-        0x0F, 0x26, 0x19, 0x00, 0x00, 0xBC, 0x40, 0x45, 0x0B, 0x03, 0x00, 0x64, 0x23, 0x46, 0x1E, 0xFA,
-        0x26, 0x46, 0xA2, 0xFF, 0xB4, 0x60, 0x58, 0x4E, 0x48, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46,
-        0x2A, 0xF0, 0x2C, 0x44, 0x64, 0x40, 0x04, 0x27, 0x06, 0x00, 0x23, 0x46, 0x22, 0xFA, 0x26, 0x46,
-        0xCA, 0x60, 0xB6, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x02, 0xFA, 0xA2, 0xFF, 0x16, 0xF0, 0xFF, 0xFF,
-        0x64, 0x44, 0x01, 0x26, 0xDC, 0x9C, 0x93, 0xF3, 0x2A, 0xF2, 0xDC, 0x83, 0x93, 0xFD, 0x06, 0xF4,
-        0x01, 0xF8, 0x26, 0x46, 0x60, 0x40, 0x40, 0x2B, 0x18, 0x00, 0x64, 0x44, 0x00, 0x65, 0xFF, 0xB4,
-        0xFC, 0xA4, 0x06, 0xF0, 0x03, 0x03, 0x64, 0x46, 0x0C, 0x0D, 0x02, 0x65, 0x26, 0x46, 0x00, 0xF2,
-        0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x60, 0x46, 0xF9, 0x01, 0x01, 0xF2, 0xFF, 0xFF,
-        0xD4, 0x84, 0x01, 0xFA, 0x66, 0x44, 0x26, 0x46, 0x06, 0xFA, 0x06, 0xF4, 0x00, 0xF2, 0x80, 0xFC,
-        0x40, 0x45, 0xB4, 0x60, 0x58, 0x4E, 0x48, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46, 0x2C, 0x44,
-        0x0F, 0x26, 0x10, 0x00, 0x23, 0x46, 0x22, 0xFA, 0x26, 0x44, 0x1E, 0xFA, 0x26, 0x46, 0x1B, 0x60,
-        0xDA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x6F, 0x00, 0xA3, 0x46, 0x22, 0xF2, 0x60, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x22, 0xFA,
-        0xA3, 0x46, 0x6C, 0x02, 0x2A, 0xF0, 0xA3, 0x46, 0x1E, 0xF2, 0xA3, 0x46, 0x00, 0xBC, 0x00, 0xF2,
-        0x01, 0x02, 0x64, 0x00, 0x44, 0x4C, 0x3F, 0xF0, 0x60, 0x43, 0x23, 0x46, 0x1E, 0xF4, 0x09, 0x60,
-        0x00, 0x65, 0x3F, 0xF2, 0x26, 0x46, 0xC0, 0x84, 0xD4, 0x80, 0x60, 0x45, 0x57, 0x07, 0x80, 0xFC,
-        0x1B, 0xF2, 0x06, 0xF2, 0x60, 0x41, 0x23, 0x46, 0x1E, 0xF4, 0x1B, 0xF0, 0x06, 0xF0, 0xC1, 0x81,
-        0x06, 0xFA, 0x05, 0xFA, 0x9B, 0xFA, 0x65, 0x44, 0x3F, 0xFA, 0x64, 0x46, 0x00, 0xFC, 0x63, 0x46,
-        0x01, 0xF2, 0x10, 0x61, 0xF2, 0xA4, 0x01, 0xFA, 0xC8, 0x83, 0x02, 0x64, 0x59, 0xD0, 0x58, 0xD8,
-        0xFD, 0x1F, 0x06, 0x45, 0x1B, 0x60, 0xDA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x25, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18,
-        0x70, 0x67, 0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03, 0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46, 0x25, 0x44,
-        0x80, 0xFC, 0x05, 0xFA, 0xB4, 0x60, 0x58, 0x4E, 0x48, 0x78, 0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF,
-        0x2C, 0x44, 0x04, 0x27, 0x16, 0x00, 0x23, 0x46, 0x1E, 0xF2, 0x9E, 0xFC, 0x60, 0x46, 0x46, 0x46,
-        0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA, 0x26, 0x46, 0x2C, 0x43, 0x2A, 0xFC, 0x06, 0xF4,
-        0x00, 0x64, 0x00, 0xFA, 0x01, 0xF0, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0x01, 0xFA, 0x26, 0x46,
-        0x1D, 0x00, 0x00, 0x66, 0x46, 0x46, 0xC7, 0x60, 0x31, 0x78, 0xFF, 0xFF, 0xA3, 0x46, 0x1E, 0xF0,
-        0x9E, 0xFC, 0x00, 0x63, 0x33, 0x85, 0xA3, 0x46, 0x0D, 0x03, 0xA3, 0x46, 0x22, 0xF2, 0x0F, 0x65,
-        0xA4, 0x85, 0xD4, 0x84, 0x22, 0xFA, 0xA3, 0x46, 0xA2, 0xFF, 0xB4, 0x60, 0x58, 0x4E, 0x48, 0x78,
-        0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46, 0xCB, 0x60, 0xBC, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x88, 0xF3,
-        0xFF, 0xFF, 0xD0, 0x80, 0x64, 0x46, 0x6F, 0xF2, 0x26, 0x46, 0x50, 0x03, 0x60, 0x40, 0x00, 0x36,
-        0x4D, 0x00, 0x64, 0x46, 0x0E, 0xF2, 0x26, 0x46, 0x60, 0x47, 0xFF, 0xB5, 0x27, 0xF2, 0xFF, 0xFF,
-        0xFF, 0xB4, 0xD4, 0x80, 0xFF, 0xFF, 0x42, 0x06, 0x64, 0x46, 0x6F, 0xF2, 0x26, 0x46, 0x60, 0x47,
-        0xFF, 0xB5, 0x65, 0x41, 0x0F, 0x60, 0xA2, 0x65, 0x00, 0x64, 0xE9, 0x81, 0xD8, 0x84, 0xFD, 0x02,
-        0xC8, 0x84, 0x60, 0x43, 0x44, 0xD1, 0xFF, 0xFF, 0x64, 0x47, 0xFF, 0xB5, 0x27, 0xF2, 0xFF, 0xFF,
-        0xFF, 0xB4, 0xD4, 0x80, 0x64, 0x44, 0x06, 0x06, 0x07, 0xF0, 0xFF, 0xFF, 0x64, 0x46, 0x0E, 0xFA,
-        0x26, 0x46, 0x19, 0x00, 0x00, 0x61, 0x27, 0xF0, 0x0F, 0x60, 0xA2, 0x65, 0x61, 0x43, 0x45, 0xD3,
-        0x64, 0x41, 0xFF, 0xB1, 0x61, 0x45, 0x60, 0x47, 0xFF, 0xB4, 0xDB, 0x83, 0xD4, 0x80, 0x63, 0x41,
-        0xF3, 0x02, 0xCB, 0x83, 0x63, 0x41, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x07, 0xF0, 0xFF, 0xFF,
-        0x64, 0x46, 0x0E, 0xFA, 0x26, 0x46, 0xAF, 0x84, 0xE8, 0x81, 0x05, 0x03, 0x00, 0x60, 0x01, 0x64,
-        0xCD, 0x81, 0xE0, 0x84, 0xFD, 0x02, 0x64, 0x46, 0x70, 0xFA, 0x26, 0x46, 0x2A, 0xF2, 0x32, 0xF0,
-        0x60, 0x40, 0x08, 0x2A, 0x5C, 0x00, 0x01, 0x2B, 0x2F, 0x00, 0x64, 0x40, 0x01, 0x2A, 0x2C, 0x00,
-        0x98, 0xF1, 0x1E, 0x60, 0xF0, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80,
-        0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75,
-        0x88, 0xFF, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0x98, 0xF1, 0x1E, 0x60, 0xF6, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF,
-        0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x2B, 0x00, 0x98, 0xF1, 0x1E, 0x60, 0xEE, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE,
-        0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45,
-        0x98, 0xF1, 0x1E, 0x60, 0xF4, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03,
-        0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00,
-        0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x07, 0xF4,
-        0xFF, 0xFF, 0x22, 0xF2, 0x26, 0x46, 0x0F, 0xB4, 0xDC, 0x85, 0x98, 0xF1, 0x1E, 0x60, 0xF2, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80,
-        0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3B,
-        0x12, 0x00, 0x98, 0xF1, 0x1F, 0x60, 0x00, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x13, 0x00, 0x02, 0x3B, 0x11, 0x00, 0x98, 0xF1, 0x1F, 0x60, 0x02, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xCC, 0x60, 0x06, 0x78,
-        0xFF, 0xFF, 0xC7, 0x60, 0x31, 0x78, 0xFF, 0xFF, 0x1B, 0x60, 0xDA, 0x64, 0x40, 0x4B, 0xF0, 0x60,
-        0x58, 0x4D, 0x75, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xC7, 0x60, 0x31, 0x78, 0xFF, 0xFF,
-        0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xBE, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0x00, 0x66, 0x46, 0x46, 0xC7, 0x60, 0x31, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0x58, 0x63, 0x60, 0x47, 0x01, 0x27, 0x64, 0x63, 0x25, 0x60, 0x26, 0x62,
-        0x61, 0x5C, 0xA2, 0xD9, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41, 0xBD, 0xD0, 0x00, 0xF4,
-        0x04, 0xF8, 0x83, 0xFA, 0x82, 0xF8, 0xA6, 0x46, 0x02, 0xB0, 0x5E, 0x63, 0x04, 0x03, 0x64, 0x63,
-        0x03, 0xB0, 0x02, 0x3A, 0x6C, 0x63, 0x3F, 0xF2, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41,
-        0xBD, 0xD0, 0xA6, 0x46, 0x07, 0xF8, 0x86, 0xFA, 0x85, 0xF8, 0x60, 0x47, 0x08, 0xFA, 0x25, 0x60,
-        0x26, 0x62, 0xA2, 0xD1, 0x26, 0x46, 0x64, 0x41, 0x2F, 0x58, 0xFF, 0xFF, 0x2A, 0xF2, 0x2C, 0xF0,
-        0x31, 0x40, 0x20, 0x26, 0x09, 0x00, 0x60, 0x40, 0xA4, 0x36, 0x21, 0x00, 0x08, 0x26, 0x07, 0x00,
-        0x7E, 0xF1, 0xCC, 0x60, 0xCF, 0x78, 0xFF, 0xFF, 0xCC, 0x60, 0xFF, 0x78, 0xFF, 0xFF, 0x64, 0x40,
-        0x01, 0x26, 0x12, 0x00, 0x3F, 0xF0, 0x32, 0x40, 0x10, 0x2A, 0x0A, 0x00, 0x64, 0x41, 0x60, 0x40,
-        0x40, 0x27, 0x06, 0x00, 0xCD, 0x81, 0xDD, 0x81, 0x03, 0x03, 0x02, 0x03, 0x01, 0x61, 0x01, 0x00,
-        0x00, 0x61, 0x60, 0x40, 0x18, 0x3A, 0x03, 0x00, 0xCD, 0x60, 0x3B, 0x78, 0xFF, 0xFF, 0x07, 0xF2,
-        0x88, 0xF1, 0x66, 0x45, 0xD0, 0x80, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x03, 0x03, 0xFF, 0xFF,
-        0x02, 0x26, 0x07, 0x00, 0xDA, 0x60, 0x58, 0x4F, 0xDB, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0x37, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xA4, 0x3A, 0x07, 0x00, 0xDD, 0x60, 0x58, 0x4F,
-        0x45, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0x37, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0xCB, 0x60, 0x58, 0x4F,
-        0xD9, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x06, 0x65, 0xD4, 0x80, 0x60, 0x43, 0x52, 0x04, 0x00, 0xF4,
-        0xAA, 0x60, 0xAA, 0x65, 0x09, 0xF2, 0x0A, 0xF0, 0xD4, 0x80, 0x03, 0x64, 0x4A, 0x02, 0xD0, 0x80,
-        0x00, 0x64, 0x0B, 0xF0, 0x46, 0x02, 0x64, 0x45, 0xD4, 0x80, 0xF8, 0x7F, 0x08, 0x02, 0x0C, 0xF0,
-        0x26, 0x46, 0x64, 0x45, 0x23, 0xF0, 0x20, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x0B, 0x00, 0xD4, 0x80,
-        0x1D, 0x60, 0x60, 0x64, 0x11, 0x02, 0x0C, 0xF0, 0x26, 0x46, 0x64, 0x45, 0x23, 0xF0, 0x40, 0x67,
-        0xB0, 0x84, 0xA2, 0xDA, 0x65, 0x44, 0x88, 0x3A, 0x2C, 0x00, 0x77, 0x37, 0x03, 0x00, 0x78, 0x37,
-        0x01, 0x00, 0x8E, 0x37, 0x00, 0x61, 0x25, 0x00, 0xD4, 0x80, 0x08, 0x65, 0x22, 0x02, 0xD7, 0x80,
-        0x01, 0x60, 0x00, 0x64, 0x0C, 0xF0, 0x1D, 0x04, 0xD0, 0x80, 0x0D, 0xF0, 0x1A, 0x02, 0x26, 0x46,
-        0x14, 0xF2, 0x01, 0x63, 0x02, 0xA8, 0x64, 0x47, 0x14, 0x03, 0x7F, 0xB4, 0xFD, 0xA0, 0x06, 0x03,
-        0x10, 0x07, 0x23, 0xF0, 0x60, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x6A, 0x00, 0xD2, 0xF3, 0xFF, 0xFF,
-        0x02, 0xBC, 0xD2, 0xFB, 0xE5, 0x60, 0x58, 0x4F, 0x94, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0x37, 0x78,
-        0xFF, 0xFF, 0x26, 0x46, 0x61, 0x40, 0x01, 0x2A, 0x12, 0x00, 0x98, 0xF1, 0x1F, 0x60, 0x06, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x7C, 0x00, 0xDD, 0x60,
-        0x58, 0x4F, 0x45, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0x36, 0x73, 0x00,
-        0xCD, 0x60, 0x58, 0x4F, 0x48, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0x37, 0x78, 0xFF, 0xFF, 0x60, 0x40,
-        0x0C, 0x26, 0x69, 0x00, 0x64, 0x40, 0x01, 0x2A, 0x66, 0x00, 0xB0, 0x3A, 0x05, 0x00, 0xD1, 0x60,
-        0x58, 0x4F, 0x80, 0x78, 0xFF, 0xFF, 0x5B, 0x00, 0x00, 0x3A, 0x05, 0x00, 0xD4, 0x60, 0x58, 0x4F,
-        0xF3, 0x78, 0xFF, 0xFF, 0x54, 0x00, 0x20, 0x3A, 0x05, 0x00, 0xD4, 0x60, 0x58, 0x4F, 0xF3, 0x78,
-        0xFF, 0xFF, 0x4D, 0x00, 0xC0, 0x3A, 0x05, 0x00, 0xDA, 0x60, 0x58, 0x4F, 0x48, 0x78, 0xFF, 0xFF,
-        0x46, 0x00, 0xA0, 0x3A, 0x05, 0x00, 0xDA, 0x60, 0x58, 0x4F, 0xA6, 0x78, 0xFF, 0xFF, 0x3F, 0x00,
-        0x40, 0x3A, 0x0D, 0x00, 0xE1, 0x60, 0x58, 0x4F, 0x10, 0x78, 0xFF, 0xFF, 0x38, 0x00, 0x60, 0x40,
-        0x50, 0x3A, 0x05, 0x00, 0xEA, 0x60, 0x58, 0x4F, 0xF5, 0x78, 0xFF, 0xFF, 0x30, 0x00, 0x33, 0x00,
-        0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0x2A, 0xF2, 0x3B, 0xF0, 0x60, 0x40, 0x40, 0x2B,
-        0x19, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x04, 0xB4, 0xFF, 0xFF, 0x14, 0x03, 0xC0, 0x60, 0x00, 0x64,
-        0x64, 0x40, 0x20, 0x2B, 0x0F, 0x00, 0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x23, 0xF2,
-        0x10, 0xBD, 0xB4, 0x9C, 0x3F, 0xF2, 0x23, 0xF8, 0xF8, 0xA4, 0x3F, 0xFA, 0x00, 0xF4, 0x60, 0x47,
-        0x08, 0xFA, 0x26, 0x46, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xBE, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0x0C, 0x00, 0x66, 0x44,
-        0x00, 0xA8, 0xFF, 0xFF, 0x0A, 0x03, 0x26, 0x46, 0x1B, 0x60, 0xDA, 0x64, 0x40, 0x4B, 0xF0, 0x60,
-        0x58, 0x4D, 0x75, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xCB, 0x60, 0xB9, 0x78, 0xFF, 0xFF,
-        0x14, 0xF2, 0x00, 0x7C, 0x3E, 0xF8, 0xCC, 0x84, 0xCC, 0x84, 0x19, 0x03, 0x60, 0x02, 0x11, 0xF2,
-        0x07, 0xFA, 0xAC, 0xF3, 0x19, 0xFA, 0xCD, 0x60, 0x58, 0x4E, 0xE4, 0x78, 0xFF, 0xFF, 0x1B, 0x60,
-        0xDA, 0x62, 0x1B, 0x60, 0x9A, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0xF2, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x79, 0x00, 0xA2, 0xFF,
-        0x46, 0x45, 0xB4, 0x60, 0x58, 0x4E, 0x91, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x11, 0x03, 0x7E, 0x63,
-        0x46, 0x4B, 0x25, 0x46, 0xA3, 0xD0, 0x2B, 0x46, 0xA3, 0xD8, 0xFB, 0x1F, 0x89, 0xFC, 0x8A, 0xFC,
-        0x88, 0xFC, 0x05, 0x18, 0x64, 0x46, 0x01, 0xF0, 0x10, 0x67, 0xC0, 0x84, 0x01, 0xFA, 0x08, 0xFE,
-        0x2B, 0x46, 0x46, 0x46, 0x25, 0x46, 0xCD, 0x60, 0x58, 0x4E, 0xE4, 0x78, 0xFF, 0xFF, 0x1F, 0x60,
-        0x8E, 0x62, 0xA2, 0xD3, 0x88, 0xF3, 0x00, 0xA8, 0x07, 0xFA, 0x0F, 0x03, 0x1B, 0x60, 0xDA, 0x62,
-        0x1B, 0x60, 0x94, 0x64, 0xA2, 0xDB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xF3, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x0E, 0x00, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60,
-        0x88, 0x64, 0xA2, 0xDB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xF4, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x26, 0x44, 0x00, 0xA8, 0xC1, 0xFE, 0x31, 0x03, 0xD2, 0xF3,
-        0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0x26, 0x46, 0x2A, 0xF2, 0x3B, 0xF0, 0x60, 0x40, 0x40, 0x2B,
-        0x18, 0x00, 0x64, 0x40, 0x20, 0x2B, 0x15, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x04, 0xB4, 0xFF, 0xFF,
-        0x10, 0x03, 0xC0, 0x67, 0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x23, 0xF2, 0x10, 0xBD,
-        0xB4, 0x9C, 0x3F, 0xF2, 0x23, 0xF8, 0xF8, 0xA4, 0x3F, 0xFA, 0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA,
-        0x26, 0x46, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xBE, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0xF1, 0x64, 0x3B, 0x42, 0x4A, 0xDB,
-        0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x2A, 0xF2, 0x82, 0x60, 0xFF, 0x65, 0xA4, 0x87,
-        0x02, 0xBF, 0x2A, 0xFA, 0x1C, 0xF2, 0x13, 0xFA, 0x32, 0xF2, 0x2C, 0xFA, 0x33, 0xF2, 0x2D, 0xFA,
-        0x34, 0xF2, 0x2E, 0xFA, 0x2F, 0xF2, 0x32, 0xFA, 0x30, 0xF2, 0x33, 0xFA, 0x31, 0xF2, 0x34, 0xFA,
-        0x67, 0xF3, 0x2F, 0xFA, 0x68, 0xF3, 0x30, 0xFA, 0x69, 0xF3, 0x31, 0xFA, 0x2E, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xF8, 0x62, 0xD0, 0x60, 0x7B, 0x64, 0xA2, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x1F, 0x60,
-        0x62, 0x63, 0x20, 0x60, 0x02, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1E, 0x63, 0x1F, 0x60, 0x6C, 0x61,
-        0x20, 0x60, 0x0C, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x1F, 0x60, 0x8E, 0x63, 0x20, 0x60,
-        0x2E, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60, 0x90, 0x63, 0x20, 0x60, 0x30, 0x62, 0xA2, 0xD3,
-        0xA3, 0xDB, 0x1F, 0x60, 0x9A, 0x63, 0x20, 0x60, 0x3A, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60,
-        0x9C, 0x63, 0x20, 0x60, 0x3C, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60, 0x9E, 0x63, 0x20, 0x60,
-        0x3E, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60, 0xA0, 0x63, 0x20, 0x60, 0x40, 0x62, 0xA2, 0xD3,
-        0xA3, 0xDB, 0x1F, 0x60, 0x92, 0x63, 0x20, 0x60, 0x32, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60,
-        0x94, 0x63, 0x20, 0x60, 0x34, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60, 0x96, 0x63, 0x20, 0x60,
-        0x36, 0x62, 0xA2, 0xD3, 0xA3, 0xDB, 0x1F, 0x60, 0xB6, 0x63, 0xBD, 0xD1, 0xCB, 0xF9, 0x67, 0xF9,
-        0xBD, 0xD1, 0xCC, 0xF9, 0x68, 0xF9, 0xA3, 0xD1, 0xCD, 0xF9, 0x69, 0xF9, 0x01, 0x64, 0x6B, 0xFB,
-        0x1F, 0x60, 0xA8, 0x62, 0xA2, 0xD3, 0xC4, 0xFB, 0x00, 0x63, 0x4A, 0xFD, 0x5A, 0xFD, 0x6C, 0xFD,
-        0x6D, 0xFD, 0x21, 0x60, 0x82, 0x64, 0xA0, 0xD3, 0xEA, 0x60, 0x58, 0x4E, 0x78, 0x78, 0xFF, 0xFF,
-        0x21, 0x60, 0x80, 0x64, 0xA0, 0xD1, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD3, 0xFF, 0x60, 0xE7, 0x65,
-        0x32, 0x41, 0xA5, 0x81, 0xFF, 0xA0, 0xFF, 0xFF, 0x01, 0x03, 0x0B, 0x00, 0x08, 0x65, 0xB5, 0x81,
-        0x1F, 0x60, 0x96, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x02, 0x00, 0x10, 0x65,
-        0xB5, 0x81, 0x41, 0x52, 0x88, 0xF5, 0x32, 0x44, 0x10, 0xB0, 0xFF, 0xFF, 0x0B, 0x03, 0x21, 0x60,
-        0x2C, 0x62, 0xA2, 0xD3, 0x06, 0xF0, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF,
-        0xB0, 0x84, 0x06, 0xFA, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD3, 0x22, 0x7C, 0xFF, 0xA0, 0xFD, 0xA0,
-        0x05, 0x06, 0x03, 0x03, 0xFE, 0xA0, 0x04, 0x7C, 0x01, 0x02, 0x36, 0xF8, 0x0E, 0xF0, 0x0F, 0x60,
-        0xA2, 0x65, 0x20, 0x60, 0x38, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xFE, 0xA0, 0x03, 0xA8, 0x11, 0x06,
-        0x5F, 0xF1, 0x06, 0x02, 0x64, 0x44, 0x08, 0x2A, 0x09, 0x00, 0x06, 0x64, 0x44, 0xD3, 0x0D, 0x00,
-        0x64, 0x44, 0x20, 0x2A, 0x03, 0x00, 0x0A, 0x64, 0x44, 0xD3, 0x07, 0x00, 0x01, 0x64, 0x44, 0xD3,
-        0x04, 0x00, 0xE8, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x00, 0x00, 0x0E, 0xFA, 0x1F, 0x60, 0x9E, 0x62,
-        0xA2, 0xD1, 0x20, 0x44, 0x20, 0xB5, 0x64, 0x41, 0x00, 0xB9, 0xD4, 0x84, 0x08, 0x28, 0x20, 0xBC,
-        0x40, 0x40, 0x11, 0x60, 0xF0, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x00, 0xB8, 0x10, 0x60, 0x0C, 0x65,
-        0x0D, 0x03, 0x11, 0x60, 0xF8, 0x63, 0xC5, 0xF3, 0xA3, 0xD1, 0xE0, 0x84, 0xC4, 0x84, 0xA0, 0xD3,
-        0xFF, 0xFF, 0x01, 0xB0, 0xFF, 0xFF, 0x02, 0x02, 0xC5, 0xF9, 0x65, 0xF9, 0xC5, 0xF3, 0x01, 0x61,
-        0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0xE1, 0x81, 0xFB, 0x01, 0x9A, 0xF3, 0x61, 0x45, 0xA4, 0x80,
-        0xFF, 0xFF, 0x0B, 0x02, 0x00, 0xB8, 0x01, 0x63, 0x08, 0x03, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x24,
-        0x02, 0x00, 0xDF, 0x83, 0xFA, 0x01, 0xC5, 0xFD, 0x65, 0xFD, 0x0A, 0x64, 0x25, 0x60, 0x1E, 0x63,
-        0xA3, 0xDB, 0x01, 0x64, 0x25, 0x60, 0x20, 0x63, 0xA3, 0xDB, 0xB6, 0xF1, 0x09, 0x60, 0x2A, 0x64,
-        0xD0, 0x80, 0x03, 0x64, 0x01, 0x06, 0x06, 0x64, 0xB0, 0xFB, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xD8, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0xCF, 0x60, 0x05, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD6, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x65, 0xF1, 0x1C, 0x60, 0x00, 0x62, 0xA2, 0xD9, 0x08, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCF, 0x60,
-        0x2D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xCE, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x20, 0x44, 0x01, 0x65, 0x34, 0x80, 0x1F, 0x60, 0xA6, 0x64, 0xA0, 0xD3,
-        0xC3, 0xFB, 0x60, 0x40, 0x05, 0x3A, 0x03, 0x00, 0xEB, 0x60, 0x1A, 0x61, 0x11, 0x00, 0x04, 0x3A,
-        0x03, 0x00, 0xEB, 0x60, 0x0E, 0x61, 0x0C, 0x00, 0x03, 0x3A, 0x03, 0x00, 0xEB, 0x60, 0x02, 0x61,
-        0x07, 0x00, 0x02, 0x3A, 0x03, 0x00, 0xEA, 0x60, 0xF6, 0x61, 0x02, 0x00, 0xEA, 0x60, 0xEA, 0x61,
-        0x3E, 0x60, 0x00, 0x66, 0x01, 0x60, 0x78, 0x64, 0x0A, 0x63, 0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F,
-        0x00, 0x66, 0xC4, 0xF3, 0x60, 0x41, 0x00, 0xA8, 0xFA, 0xA1, 0x01, 0x03, 0xA1, 0xDB, 0x01, 0x60,
-        0x7A, 0x63, 0x16, 0x60, 0xC4, 0x61, 0xBD, 0xD3, 0xFF, 0xFF, 0x20, 0x7F, 0xA1, 0xDB, 0xBD, 0xD3,
-        0xFF, 0xFF, 0x21, 0x7F, 0x59, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0x59, 0xDB, 0x0F, 0x60,
-        0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xD8, 0x62, 0x40, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xCF, 0x60, 0x77, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x1C, 0x60, 0x00, 0x62, 0x16, 0x60, 0xC2, 0x64, 0xA2, 0xDB, 0x20, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCF, 0x60, 0x9C, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x65, 0xF1, 0x1C, 0x60, 0x00, 0x62, 0xA2, 0xD9, 0x08, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x0F, 0x60, 0xD8, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCF, 0x60, 0xB3, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE,
-        0x0F, 0x60, 0xCE, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x20, 0x40, 0x20, 0x2A, 0x04, 0x00, 0xEB, 0x60, 0x58, 0x4E, 0x16, 0x78, 0xFF, 0xFF, 0x0F, 0x60,
-        0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x4E, 0xF3, 0xFF, 0xFF, 0x13, 0x1B, 0x1F, 0x60, 0xAE, 0x64,
-        0xA0, 0xD3, 0xC7, 0xFB, 0x1F, 0x60, 0x1E, 0x65, 0x1F, 0x60, 0xBC, 0x61, 0x1F, 0x60, 0x1C, 0x64,
-        0x20, 0x63, 0x59, 0xD1, 0x58, 0xD9, 0xA5, 0xD9, 0xDA, 0x85, 0xFB, 0x1F, 0xD0, 0x60, 0x62, 0x78,
-        0xFF, 0xFF, 0x20, 0x60, 0x40, 0x63, 0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x85, 0xC7, 0x83, 0xFE, 0xA5,
-        0x89, 0xF3, 0xFF, 0xFF, 0xC4, 0x84, 0x66, 0x45, 0x60, 0x46, 0x60, 0x41, 0xBD, 0xD1, 0x03, 0xF8,
-        0xBD, 0xD1, 0x04, 0xF8, 0xA3, 0xD1, 0x05, 0xF8, 0x06, 0xF2, 0xFF, 0xFF, 0x02, 0x7E, 0x06, 0xFA,
-        0x5F, 0xF3, 0x60, 0xFB, 0x73, 0xF0, 0x63, 0xF9, 0x66, 0x43, 0x21, 0x60, 0x2C, 0x62, 0x32, 0x40,
-        0x08, 0x2A, 0x09, 0x00, 0xA2, 0xD3, 0x06, 0xF0, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0x80, 0xBF, 0xB0, 0x84, 0x06, 0xFA, 0x63, 0x44, 0x63, 0xF3, 0x60, 0x45, 0x66, 0x41, 0x65, 0x46,
-        0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36, 0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00,
-        0x05, 0x3A, 0x02, 0x00, 0x00, 0x64, 0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x5F, 0xF3, 0x60, 0xF1,
-        0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43, 0x02, 0x02, 0x5F, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60,
-        0xAE, 0x65, 0x63, 0xF3, 0xFF, 0xFF, 0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF,
-        0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x61, 0xFB, 0x6F, 0xF0,
-        0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA, 0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF,
-        0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01, 0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA,
-        0x66, 0x43, 0x0C, 0xF4, 0xC5, 0xFE, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60,
-        0xD8, 0x62, 0x00, 0x60, 0x30, 0x64, 0xA2, 0xDB, 0xCF, 0x60, 0xC7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x4E, 0xDF, 0x60, 0x58, 0x4F, 0x13, 0x78, 0xFF, 0xFF, 0x0E, 0x4F,
-        0x0F, 0x4E, 0xDC, 0x60, 0x58, 0x4F, 0x6B, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x4E, 0xDB, 0x60,
-        0x58, 0x4F, 0xE8, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x4E, 0xDB, 0x60, 0x58, 0x4F, 0x42, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0xD7, 0x01, 0x4E, 0xF3, 0x7E, 0xF5, 0x60, 0x40, 0xFF, 0x22, 0x0A, 0x00,
-        0x89, 0xF1, 0xCC, 0x84, 0xE0, 0x84, 0xC0, 0x86, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA,
-        0x7E, 0xF5, 0x08, 0x00, 0x0F, 0x60, 0xF4, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x11, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x4E, 0xF3, 0x66, 0x40, 0xFF, 0x22, 0x05, 0x00, 0xFF, 0x22, 0x37, 0x00,
-        0xD1, 0x60, 0x30, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x6A, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x6A, 0xF3,
-        0x00, 0x65, 0xD4, 0x80, 0x4E, 0xF3, 0x0F, 0x03, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x0F, 0x60, 0xD8, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD0, 0x60, 0x9F, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE,
-        0x0B, 0x04, 0x0F, 0x60, 0xD8, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD0, 0x60, 0xB3, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x00, 0x62, 0x06, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x44, 0x01, 0xB5, 0x54, 0x80, 0xDA, 0xFE, 0xBE, 0xFE, 0x88, 0xF1,
-        0x02, 0x64, 0x87, 0xF3, 0xC0, 0x83, 0x40, 0x48, 0x76, 0xFD, 0xE4, 0x60, 0x58, 0x4E, 0x9D, 0x78,
-        0xFF, 0xFF, 0x28, 0x44, 0x4C, 0x88, 0x76, 0xF3, 0x02, 0x65, 0xC4, 0x83, 0xF5, 0x02, 0xA2, 0x60,
-        0x58, 0x4E, 0x00, 0x78, 0xFF, 0xFF, 0x14, 0x60, 0xD0, 0x62, 0x14, 0x60, 0xD2, 0x64, 0xA2, 0xDB,
-        0x00, 0x64, 0x4A, 0xDB, 0x01, 0x60, 0xFE, 0x63, 0x12, 0x60, 0xCC, 0x61, 0x00, 0x64, 0x59, 0xDB,
-        0xFE, 0x1F, 0x7E, 0xF1, 0x1B, 0x60, 0x9A, 0x61, 0x64, 0x40, 0xFF, 0x26, 0x39, 0x00, 0xD1, 0x60,
-        0x58, 0x4E, 0x33, 0x78, 0xFF, 0xFF, 0x1B, 0x60, 0x88, 0x61, 0xD1, 0x60, 0x58, 0x4E, 0x33, 0x78,
-        0xFF, 0xFF, 0x1B, 0x60, 0x8E, 0x61, 0xD1, 0x60, 0x58, 0x4E, 0x33, 0x78, 0xFF, 0xFF, 0x1B, 0x60,
-        0xA0, 0x61, 0xD1, 0x60, 0x58, 0x4E, 0x33, 0x78, 0xFF, 0xFF, 0x1B, 0x60, 0xA6, 0x61, 0xD1, 0x60,
-        0x58, 0x4E, 0x33, 0x78, 0xFF, 0xFF, 0x1B, 0x60, 0xB2, 0x61, 0xD1, 0x60, 0x58, 0x4E, 0x33, 0x78,
-        0xFF, 0xFF, 0x1B, 0x60, 0xBE, 0x61, 0xD1, 0x60, 0x58, 0x4E, 0x33, 0x78, 0xFF, 0xFF, 0x1B, 0x60,
-        0xAC, 0x61, 0xD1, 0x60, 0x58, 0x4E, 0x33, 0x78, 0xFF, 0xFF, 0x1B, 0x60, 0x94, 0x61, 0xD1, 0x60,
-        0x58, 0x4E, 0x5F, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xD6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB,
-        0xC5, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xA1, 0xD3, 0x0E, 0x57, 0x24, 0x00, 0x0E, 0xF2, 0x44, 0x4C,
-        0x80, 0xB0, 0x10, 0xB0, 0x0B, 0x03, 0x1B, 0x60, 0xDA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x13, 0x00, 0x12, 0x02, 0xF0, 0x37,
-        0x09, 0x00, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0x90, 0xF3, 0x02, 0x02,
-        0xCC, 0x84, 0x90, 0xFB, 0x1B, 0x60, 0xDA, 0x64, 0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D, 0x75, 0x78,
-        0xFF, 0xFF, 0x2C, 0x44, 0xAC, 0x86, 0x09, 0xF0, 0xD9, 0x02, 0x37, 0x58, 0xFF, 0xFF, 0xA1, 0xD3,
-        0x0E, 0x57, 0x19, 0x00, 0x0E, 0xF2, 0x44, 0x4C, 0x80, 0xB0, 0x10, 0xB0, 0x0B, 0x03, 0x1B, 0x60,
-        0xDA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x08, 0x00, 0x07, 0x02, 0x1B, 0x60, 0xDA, 0x64, 0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D,
-        0x75, 0x78, 0xFF, 0xFF, 0x2C, 0x44, 0xAC, 0x86, 0x09, 0xF0, 0xE4, 0x02, 0x37, 0x58, 0xFF, 0xFF,
-        0x00, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xB0, 0x64, 0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2,
-        0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0xCD, 0xF3,
-        0x31, 0xFA, 0x67, 0xF3, 0x32, 0xFA, 0x68, 0xF3, 0x33, 0xFA, 0x69, 0xF3, 0x34, 0xFA, 0xAC, 0xF1,
-        0x19, 0xF8, 0x06, 0x63, 0x3F, 0xFC, 0x1C, 0xF2, 0x13, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x07, 0xF2,
-        0x88, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x0C, 0x03, 0x60, 0x46, 0x06, 0xF2, 0x26, 0x46,
-        0x01, 0xB0, 0xFF, 0xFF, 0x03, 0x02, 0xD3, 0x60, 0x64, 0x78, 0xFF, 0xFF, 0xD4, 0x60, 0xBA, 0x78,
-        0xFF, 0xFF, 0x00, 0xF4, 0x0A, 0xF2, 0x09, 0xF2, 0xFF, 0xA0, 0x00, 0xA0, 0x13, 0x02, 0xFF, 0xA0,
-        0x04, 0x03, 0x08, 0x03, 0xD1, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x55, 0xFB, 0xD1, 0x60,
-        0xE0, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0x32, 0x40, 0x08, 0x2A, 0x0F, 0x00, 0x55, 0xFD, 0xD1, 0x60,
-        0xE0, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x0A, 0xF2, 0x0E, 0x63, 0x01, 0xA4, 0x0A, 0xFA,
-        0x0B, 0xFC, 0x43, 0x59, 0xD4, 0x60, 0x93, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x0A, 0xF2,
-        0x0D, 0x63, 0x01, 0xA4, 0x0A, 0xFA, 0x0B, 0xFC, 0x43, 0x59, 0xD4, 0x60, 0x93, 0x78, 0xFF, 0xFF,
-        0x88, 0xF5, 0x00, 0xF2, 0x26, 0x46, 0x00, 0xA0, 0x2E, 0xF0, 0x37, 0x03, 0x66, 0x41, 0x12, 0x60,
-        0xCE, 0x65, 0x64, 0x47, 0x00, 0x7F, 0x88, 0xF1, 0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18,
-        0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46,
-        0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8,
-        0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC,
-        0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46, 0x87, 0xF1, 0x14, 0x60, 0xCE, 0x61,
-        0xA1, 0xD3, 0xDA, 0x81, 0xD0, 0x80, 0xDC, 0x9C, 0x05, 0x05, 0xA1, 0xD3, 0x4A, 0xD9, 0xA0, 0xDD,
-        0xDA, 0x9C, 0xA1, 0xD9, 0xD3, 0x60, 0x2D, 0x78, 0xFF, 0xFF, 0x14, 0x60, 0xCE, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0x62, 0x18, 0x14, 0x60, 0xCE, 0x64, 0x04, 0xA5, 0xA0, 0xD1, 0x72, 0x44, 0xFF, 0xB4,
-        0x64, 0x40, 0xE0, 0x22, 0x1F, 0xB4, 0x64, 0x40, 0xF8, 0x22, 0x07, 0xB4, 0x02, 0x00, 0x03, 0x04,
-        0xD0, 0x84, 0xD0, 0x80, 0xFC, 0x01, 0xE0, 0x84, 0x44, 0xD3, 0xFF, 0xFF, 0x60, 0x43, 0x66, 0x41,
-        0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B,
-        0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46,
-        0x00, 0xF8, 0x88, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18,
-        0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA,
-        0x61, 0x46, 0x2E, 0xF0, 0x66, 0x41, 0x12, 0x60, 0xCE, 0x65, 0x64, 0x47, 0x00, 0x7F, 0x88, 0xF1,
-        0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B,
-        0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0,
-        0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2,
-        0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43,
-        0x61, 0x46, 0xD3, 0x60, 0x2D, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x02, 0x61, 0xB3, 0x60, 0x58, 0x4D,
-        0x77, 0x78, 0xFF, 0xFF, 0x87, 0xF1, 0x72, 0x44, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x04,
-        0xD0, 0x84, 0xFB, 0x01, 0xE0, 0x83, 0x88, 0xF3, 0x02, 0xA3, 0x43, 0x93, 0x66, 0x44, 0x00, 0xA8,
-        0x56, 0xFD, 0x37, 0x03, 0x00, 0x64, 0x2B, 0xFA, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA, 0x66, 0x45,
-        0x63, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x85, 0xF2, 0x65, 0x46, 0x2C, 0xFA, 0x2D, 0xF8, 0xAE, 0xFA,
-        0xCB, 0xF3, 0x2F, 0xFA, 0x32, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0x33, 0xFA, 0xCD, 0xF3, 0x31, 0xFA,
-        0x34, 0xFA, 0xAC, 0xF1, 0x19, 0xF8, 0xFF, 0x67, 0x0E, 0xFA, 0x66, 0x45, 0x63, 0x46, 0x0E, 0xF2,
-        0x65, 0x46, 0x02, 0x63, 0x00, 0x7E, 0x13, 0xFA, 0x3F, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0x88, 0xF3,
-        0x07, 0xFA, 0x66, 0x41, 0x00, 0xF4, 0x05, 0x64, 0x09, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60,
-        0x8E, 0x64, 0xA2, 0xDB, 0x61, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x56, 0xF3, 0xA3, 0xFF, 0x60, 0x43, 0xE4, 0x60, 0x58, 0x4E, 0x9D, 0x78, 0xFF, 0xFF,
-        0x56, 0xF3, 0xFF, 0xFF, 0x40, 0x58, 0x03, 0x65, 0xE2, 0x60, 0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF,
-        0x56, 0xF3, 0x26, 0x46, 0x60, 0x43, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0,
-        0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0x88, 0xF3, 0x63, 0x45, 0x60, 0x46,
-        0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA,
-        0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x2E, 0xF0, 0x66, 0x41, 0x12, 0x60,
-        0xCE, 0x65, 0x64, 0x47, 0x00, 0x7F, 0x88, 0xF1, 0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18,
-        0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46,
-        0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8,
-        0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC,
-        0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46, 0x2C, 0xF2, 0x2D, 0xF0, 0xAE, 0xF2,
-        0x66, 0x45, 0x63, 0x46, 0x03, 0xFA, 0x04, 0xF8, 0x55, 0xF3, 0x85, 0xFA, 0xFF, 0xA0, 0x65, 0x46,
-        0x03, 0x03, 0xD4, 0x60, 0xD6, 0x78, 0xFF, 0xFF, 0x95, 0xF3, 0x66, 0x45, 0x63, 0x46, 0x1B, 0xFA,
-        0x65, 0x46, 0xBA, 0x65, 0x60, 0x44, 0xC4, 0x85, 0x01, 0x60, 0xFE, 0x61, 0x00, 0x64, 0x80, 0x63,
-        0xC7, 0x85, 0x94, 0x84, 0x59, 0xDB, 0xFC, 0x1F, 0x00, 0x60, 0x88, 0x64, 0x3F, 0xFA, 0x00, 0xF4,
-        0x02, 0x64, 0x0A, 0xFA, 0x00, 0x64, 0x0B, 0xFA, 0x80, 0x7F, 0x10, 0x7E, 0x0C, 0xFA, 0x1A, 0x65,
-        0x80, 0x61, 0x02, 0x60, 0x00, 0x63, 0x0F, 0x4E, 0xF2, 0x60, 0x58, 0x4F, 0x4A, 0x78, 0xFF, 0xFF,
-        0x0E, 0x4F, 0xD4, 0x60, 0xA7, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x23, 0xF0, 0x00, 0x60, 0x02, 0x64,
-        0xA0, 0x80, 0x00, 0xF4, 0x03, 0x03, 0xD4, 0x60, 0x50, 0x78, 0xFF, 0xFF, 0x09, 0xF2, 0xFF, 0xFF,
-        0xFF, 0xA0, 0x00, 0xA0, 0x0C, 0x03, 0x03, 0x03, 0xD3, 0x60, 0xCC, 0x78, 0xFF, 0xFF, 0x0A, 0xF2,
-        0x26, 0x46, 0xFF, 0xA0, 0x87, 0xF4, 0x10, 0x02, 0xD4, 0x60, 0xD6, 0x78, 0xFF, 0xFF, 0x0A, 0xF2,
-        0xFF, 0xFF, 0xFF, 0xA0, 0xFD, 0xA0, 0x02, 0x03, 0x04, 0x03, 0x06, 0x00, 0xD4, 0x60, 0x0C, 0x78,
-        0xFF, 0xFF, 0xD4, 0x60, 0x17, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x87, 0xF4, 0x66, 0x41, 0x63, 0x46,
-        0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x12, 0x60,
-        0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8,
-        0x88, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04,
-        0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46,
-        0x14, 0x60, 0xD0, 0x62, 0xA2, 0xD3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03,
-        0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28,
-        0xA1, 0xDB, 0x14, 0x60, 0xD0, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84,
-        0xA2, 0xDB, 0xD1, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x87, 0xF4, 0x66, 0x41, 0x63, 0x46,
-        0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x12, 0x60,
-        0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8,
-        0x88, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04,
-        0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46,
-        0x14, 0x60, 0xD0, 0x62, 0xA2, 0xD3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03,
-        0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28,
-        0xA1, 0xDB, 0x14, 0x60, 0xD0, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84,
-        0xA2, 0xDB, 0xD1, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x32, 0x44, 0x08, 0xB0, 0x87, 0xF4,
-        0x03, 0x02, 0xD1, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0xD3, 0x60, 0x3C, 0x78, 0xFF, 0xFF, 0x32, 0x44,
-        0x26, 0x46, 0x08, 0xB0, 0x07, 0xF2, 0x03, 0x02, 0xD1, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0x60, 0x46,
-        0x1B, 0xF2, 0x26, 0x46, 0xBA, 0x65, 0x60, 0x44, 0xC4, 0x85, 0x01, 0x60, 0xFE, 0x61, 0x00, 0x64,
-        0x80, 0x63, 0xC7, 0x85, 0x94, 0x84, 0x59, 0xDB, 0xFC, 0x1F, 0x00, 0xF4, 0x01, 0x60, 0xFE, 0x61,
-        0x7E, 0x65, 0x18, 0x63, 0x5B, 0xD2, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0xD7, 0x80, 0x18, 0x02,
-        0xF9, 0x02, 0x00, 0xF4, 0x02, 0x63, 0x0E, 0x65, 0x5B, 0xD2, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80,
-        0xD7, 0x80, 0x0E, 0x02, 0xF9, 0x02, 0x26, 0x46, 0x07, 0xF4, 0x06, 0xF2, 0xFF, 0xFF, 0x01, 0x7E,
-        0x06, 0xFA, 0x26, 0x46, 0x00, 0xF4, 0x04, 0x64, 0x0A, 0xFA, 0x00, 0x64, 0x0B, 0xFA, 0x57, 0x00,
-        0x26, 0x46, 0x87, 0xF4, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18,
-        0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0x88, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2,
-        0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2,
-        0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x14, 0x60, 0xD0, 0x62, 0xA2, 0xD3, 0xDA, 0x81,
-        0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81,
-        0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x14, 0x60, 0xD0, 0x62, 0x65, 0x44,
-        0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0x00, 0xF4, 0x04, 0x64, 0x0A, 0xFA,
-        0x0F, 0x64, 0x0B, 0xFA, 0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x41, 0x58, 0x26, 0x46, 0x2C, 0xF2,
-        0xA1, 0xDB, 0x2D, 0xF2, 0x59, 0xDB, 0x2E, 0xF2, 0x59, 0xDB, 0x03, 0x65, 0xE2, 0x60, 0x58, 0x4E,
-        0x5B, 0x78, 0xFF, 0xFF, 0x03, 0x65, 0xE2, 0x60, 0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x88, 0xF3, 0x07, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0xF4, 0x0A, 0xF2, 0x09, 0xF2, 0xFF, 0xA0, 0x00, 0xA0, 0x06, 0x02,
-        0xFF, 0xA0, 0x07, 0x03, 0x09, 0x03, 0xD3, 0x60, 0xCC, 0x78, 0xFF, 0xFF, 0xD3, 0x60, 0x8C, 0x78,
-        0xFF, 0xFF, 0xD4, 0x60, 0xDB, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x07, 0xF4, 0x06, 0xF2, 0x66, 0x43,
-        0x00, 0x7E, 0x06, 0xFA, 0x26, 0x46, 0xD3, 0x60, 0x3C, 0x78, 0xFF, 0xFF, 0x63, 0x46, 0x06, 0xF2,
-        0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x26, 0x46, 0x88, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x02, 0x64,
-        0x0A, 0xFA, 0x00, 0x64, 0x0B, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB,
-        0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66,
-        0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x16, 0x60, 0xAC, 0x7C, 0x2A, 0xF2, 0xA4, 0xDB, 0x22, 0x60,
-        0x2A, 0x63, 0xFF, 0xB4, 0x01, 0x61, 0x00, 0x60, 0x10, 0x7C, 0xA3, 0xDB, 0x60, 0x40, 0x00, 0x36,
-        0x03, 0x00, 0x02, 0x61, 0x00, 0x60, 0x30, 0x7C, 0x41, 0x47, 0x2A, 0xF8, 0x2F, 0xF2, 0x2C, 0xFA,
-        0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0xCC, 0xF3, 0x30, 0xFA,
-        0xCD, 0xF3, 0x31, 0xFA, 0x67, 0xF3, 0x32, 0xFA, 0x68, 0xF3, 0x33, 0xFA, 0x69, 0xF3, 0x34, 0xFA,
-        0xAC, 0xF1, 0x19, 0xF8, 0x00, 0x7C, 0x3E, 0xF8, 0x1C, 0xF0, 0x13, 0xF8, 0x07, 0xF2, 0x88, 0xF1,
-        0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0xD9, 0x60, 0xA3, 0x78, 0xFF, 0xFF, 0x40, 0x4B,
-        0xAB, 0x46, 0x06, 0xF2, 0xAB, 0x46, 0x00, 0xF4, 0x01, 0xB0, 0xFF, 0xFF, 0x03, 0x02, 0xD9, 0x60,
-        0xA3, 0x78, 0xFF, 0xFF, 0x22, 0x60, 0x2C, 0x63, 0x09, 0xF2, 0xBD, 0xDB, 0x43, 0x44, 0x10, 0xB0,
-        0x80, 0x60, 0x00, 0x63, 0x0D, 0x03, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x44,
-        0xFE, 0x26, 0x08, 0x00, 0x32, 0x40, 0x08, 0x26, 0x06, 0x00, 0xDA, 0x60, 0x02, 0x78, 0xFF, 0xFF,
-        0x32, 0x40, 0x10, 0x2A, 0x00, 0x63, 0xAB, 0x46, 0x06, 0xF0, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84,
-        0x63, 0x45, 0xB4, 0x84, 0x06, 0xFA, 0xAB, 0x46, 0x0A, 0xF0, 0x56, 0xF9, 0x24, 0x43, 0xBD, 0xD9,
-        0x43, 0x44, 0x01, 0x63, 0x32, 0x40, 0x10, 0x26, 0x10, 0xBB, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0x60, 0x40, 0xFE, 0x26, 0x10, 0xBB, 0x09, 0xFC, 0x27, 0x44, 0xFE, 0xA0, 0xFF, 0xFF,
-        0x03, 0x03, 0xD5, 0x60, 0xFE, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0xA2, 0x64, 0x24, 0x43, 0x0B, 0xF0,
-        0xA0, 0xD9, 0xBD, 0xD9, 0x0C, 0xF0, 0x58, 0xD9, 0xBD, 0xD9, 0x0D, 0xF0, 0x58, 0xD9, 0xBD, 0xD9,
-        0x43, 0x44, 0x1C, 0x65, 0x2D, 0x61, 0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x64, 0x44,
-        0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB,
-        0xF4, 0x02, 0x02, 0x60, 0x02, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0xE0, 0x84, 0x04, 0xA5, 0xC5, 0x81,
-        0xA1, 0xD3, 0x00, 0x65, 0x60, 0x43, 0x59, 0xD3, 0xFF, 0xFF, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00,
-        0x01, 0x64, 0x15, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64, 0x11, 0x00, 0x0A, 0x3A, 0x02, 0x00,
-        0x04, 0x64, 0x0D, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x09, 0x00, 0x10, 0x3A, 0x02, 0x00,
-        0x10, 0x64, 0x05, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x20, 0x64, 0x01, 0x00, 0x00, 0x64, 0xCF, 0x83,
-        0xB4, 0x85, 0xE1, 0x02, 0x65, 0x44, 0x60, 0xFB, 0xB8, 0xF3, 0x2B, 0x45, 0x66, 0x41, 0x65, 0x46,
-        0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36, 0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00,
-        0x05, 0x3A, 0x02, 0x00, 0x00, 0x64, 0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x5F, 0xF3, 0x60, 0xF1,
-        0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43, 0x02, 0x02, 0x5F, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60,
-        0xAE, 0x65, 0xB8, 0xF3, 0xFF, 0xFF, 0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF,
-        0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x61, 0xFB, 0x6F, 0xF0,
-        0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA, 0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF,
-        0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01, 0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA,
-        0x66, 0x43, 0x0C, 0xF4, 0xFF, 0xFF, 0xD6, 0x60, 0x80, 0x78, 0xFF, 0xFF, 0x16, 0x65, 0x2D, 0x61,
-        0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB,
-        0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0xF4, 0x02, 0x02, 0x60, 0x02, 0x61,
-        0xA1, 0xD3, 0xFF, 0xFF, 0xE0, 0x84, 0x04, 0xA5, 0xC5, 0x81, 0xA1, 0xD3, 0x00, 0x65, 0x60, 0x43,
-        0x59, 0xD3, 0xFF, 0xFF, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x01, 0x64, 0x15, 0x00, 0x04, 0x3A,
-        0x02, 0x00, 0x02, 0x64, 0x11, 0x00, 0x0A, 0x3A, 0x02, 0x00, 0x04, 0x64, 0x0D, 0x00, 0x0B, 0x3A,
-        0x02, 0x00, 0x08, 0x64, 0x09, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x10, 0x64, 0x05, 0x00, 0x16, 0x3A,
-        0x02, 0x00, 0x20, 0x64, 0x01, 0x00, 0x00, 0x64, 0xCF, 0x83, 0xB4, 0x85, 0xE1, 0x02, 0x65, 0x44,
-        0x60, 0xFB, 0xB8, 0xF3, 0x2B, 0x45, 0x66, 0x41, 0x65, 0x46, 0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36,
-        0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00, 0x05, 0x3A, 0x02, 0x00, 0x00, 0x64,
-        0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x5F, 0xF3, 0x60, 0xF1, 0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43,
-        0x02, 0x02, 0x5F, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60, 0xAE, 0x65, 0xB8, 0xF3, 0xFF, 0xFF,
-        0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x61, 0xFB, 0x6F, 0xF0, 0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA,
-        0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84,
-        0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01,
-        0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x66, 0x43, 0x0C, 0xF4, 0xFF, 0xFF,
-        0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x16, 0x65, 0x27, 0x40, 0x02, 0x3A, 0x03, 0x00, 0x1C, 0x65,
-        0xF6, 0xA4, 0x01, 0x00, 0xFC, 0xA4, 0x24, 0x43, 0x22, 0x60, 0x82, 0x61, 0x5D, 0x91, 0x51, 0x90,
-        0xFF, 0xFF, 0x04, 0x28, 0x60, 0x41, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2,
-        0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93,
-        0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x22, 0x60, 0x28, 0x7C, 0x03, 0x1E,
-        0x60, 0xFE, 0xBD, 0xDF, 0x20, 0xFE, 0x22, 0x60, 0x2C, 0x64, 0x53, 0x93, 0xA4, 0xDD, 0x26, 0x46,
-        0x00, 0xF4, 0x1F, 0x60, 0x90, 0x64, 0xA0, 0xD3, 0x00, 0x63, 0x00, 0xB8, 0x0A, 0xFC, 0x03, 0x02,
-        0xD7, 0x60, 0x14, 0x78, 0xFF, 0xFF, 0x0B, 0xF2, 0x27, 0x40, 0x02, 0x3A, 0x02, 0x00, 0x0E, 0xF2,
-        0xFF, 0xFF, 0x60, 0x47, 0x00, 0x3A, 0x26, 0x00, 0x60, 0x41, 0x00, 0x36, 0x23, 0x00, 0xE0, 0xA0,
-        0xDA, 0x85, 0x20, 0x07, 0x1F, 0x60, 0x1E, 0x63, 0xA3, 0xD1, 0x65, 0x42, 0xD1, 0x80, 0x1F, 0x60,
-        0x20, 0x63, 0x18, 0x02, 0x50, 0xFE, 0x61, 0x40, 0xFE, 0x22, 0x08, 0x00, 0x62, 0x45, 0xBD, 0xD3,
-        0xA5, 0xD0, 0xDA, 0x82, 0xD0, 0x80, 0xC9, 0x81, 0xF6, 0x0C, 0x0C, 0x00, 0x61, 0x40, 0x00, 0x36,
-        0x33, 0x00, 0x62, 0x45, 0xA3, 0xD3, 0xA5, 0xD0, 0xFF, 0xFF, 0x90, 0x80, 0xFF, 0x26, 0x02, 0x00,
-        0xDE, 0x82, 0x2A, 0x00, 0x0C, 0x63, 0x0A, 0xFC, 0x00, 0x64, 0x09, 0xFA, 0x0B, 0xFA, 0x01, 0x7E,
-        0x0C, 0xFA, 0x26, 0x46, 0x08, 0x64, 0x3F, 0xFA, 0x07, 0xF2, 0x88, 0xF1, 0x40, 0x58, 0x07, 0xF8,
-        0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xDA, 0x60, 0x1E, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x21, 0x60, 0xE2, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x22, 0xB0, 0xFF, 0xFF, 0x03, 0x03, 0xD8, 0x60,
-        0x9F, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0xD7, 0x01, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0xFF, 0xA4, 0xFF, 0xFF, 0x0C, 0x20, 0x0D, 0x00, 0xD8, 0x60, 0x9F, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x28, 0x46, 0x2A, 0x41, 0xFF, 0xB1, 0x60, 0xFE, 0x82, 0x64, 0xA1, 0xDA, 0xFF, 0xFF, 0x20, 0xFE,
-        0x15, 0x00, 0x21, 0x60, 0xEE, 0x61, 0xA1, 0xDF, 0xD9, 0x81, 0xA1, 0xDF, 0xD9, 0x81, 0xA1, 0xDF,
-        0x04, 0xA1, 0xA1, 0xDF, 0xD9, 0x81, 0xA1, 0xDF, 0xD9, 0x81, 0xA1, 0xDF, 0xD9, 0x81, 0xA1, 0xDF,
-        0x2B, 0x46, 0x37, 0xF2, 0x7F, 0x60, 0xCF, 0x65, 0xA4, 0x84, 0xA2, 0xDA, 0x26, 0x46, 0x3F, 0xF2,
-        0x00, 0xF4, 0x27, 0x40, 0x02, 0x3A, 0x40, 0x00, 0x60, 0x43, 0xF6, 0xA3, 0x00, 0x60, 0x1B, 0x61,
-        0x00, 0x60, 0xDD, 0x65, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1, 0x02, 0x06, 0x00, 0xF4, 0x03, 0x61,
-        0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0xD4, 0x80, 0x2D, 0x03, 0x17, 0x03, 0xCF, 0x83, 0x61, 0x44,
-        0x80, 0xA0, 0x28, 0x03, 0x02, 0x02, 0x00, 0xF4, 0x03, 0x61, 0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83,
-        0x81, 0xA1, 0x20, 0x03, 0x05, 0x07, 0x7F, 0xA1, 0xCC, 0x84, 0xDD, 0x81, 0xE4, 0x03, 0xF7, 0x01,
-        0x00, 0xF4, 0x00, 0xB8, 0x04, 0x61, 0xE4, 0x03, 0xF2, 0x01, 0x01, 0x60, 0xFF, 0x63, 0x46, 0x48,
-        0x41, 0x4A, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9, 0x64, 0x44, 0xDD, 0x81, 0xA1, 0xD0,
-        0xDF, 0x83, 0xA3, 0xD9, 0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03, 0x7F, 0xA1, 0xF7, 0x04, 0x00, 0xF4,
-        0x03, 0x61, 0xF4, 0x01, 0x20, 0xFE, 0x3F, 0x00, 0x60, 0x43, 0xFC, 0xA3, 0x00, 0x60, 0x15, 0x61,
-        0x00, 0x60, 0xDD, 0x65, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1, 0x02, 0x06, 0x00, 0xF4, 0x03, 0x61,
-        0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0xD4, 0x80, 0x2D, 0x03, 0x17, 0x03, 0xCF, 0x83, 0x61, 0x44,
-        0x80, 0xA0, 0x28, 0x03, 0x02, 0x02, 0x00, 0xF4, 0x03, 0x61, 0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83,
-        0x81, 0xA1, 0x20, 0x03, 0x05, 0x07, 0x7F, 0xA1, 0xCC, 0x84, 0xDD, 0x81, 0xE4, 0x03, 0xF7, 0x01,
-        0x00, 0xF4, 0x00, 0xB8, 0x04, 0x61, 0xE4, 0x03, 0xF2, 0x01, 0x01, 0x60, 0xFF, 0x63, 0x46, 0x48,
-        0x41, 0x4A, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9, 0x64, 0x44, 0xDD, 0x81, 0xA1, 0xD0,
-        0xDF, 0x83, 0xA3, 0xD9, 0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03, 0x7F, 0xA1, 0xF7, 0x04, 0x00, 0xF4,
-        0x03, 0x61, 0xF4, 0x01, 0x20, 0xFE, 0x00, 0xBB, 0x02, 0x60, 0x00, 0x61, 0x08, 0x24, 0xD7, 0x00,
-        0x60, 0xFE, 0xA1, 0xD3, 0xFF, 0xFF, 0xFA, 0xA4, 0xFF, 0xFF, 0x01, 0x05, 0x50, 0x01, 0xDD, 0x81,
-        0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x3A, 0x4A, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF,
-        0x64, 0x40, 0x50, 0x3A, 0x44, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0xF2, 0x3A,
-        0x3E, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x3A, 0x20, 0x01, 0xDD, 0x81,
-        0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x3A, 0x1A, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF,
-        0x64, 0x40, 0x00, 0x3A, 0x14, 0x01, 0x60, 0x5C, 0x00, 0x36, 0x30, 0x00, 0x00, 0x64, 0xD8, 0x60,
-        0x58, 0x4E, 0xC4, 0x78, 0xFF, 0xFF, 0x21, 0x60, 0xF6, 0x62, 0xA2, 0xDB, 0x64, 0x40, 0x00, 0x36,
-        0x2B, 0x00, 0xDD, 0x81, 0xA1, 0xD3, 0xDD, 0x81, 0xD8, 0x60, 0x58, 0x4E, 0xC4, 0x78, 0xFF, 0xFF,
-        0x21, 0x60, 0xF8, 0x62, 0xA2, 0xDB, 0x64, 0x40, 0x00, 0x36, 0x24, 0x00, 0xDD, 0x81, 0xA1, 0xD3,
-        0xDD, 0x81, 0xD8, 0x60, 0x58, 0x4E, 0xC4, 0x78, 0xFF, 0xFF, 0x21, 0x60, 0xFA, 0x62, 0xA2, 0xDB,
-        0x64, 0x40, 0x00, 0x36, 0x1D, 0x00, 0xDD, 0x81, 0xA1, 0xD1, 0x21, 0x60, 0xFC, 0x62, 0xA2, 0xD9,
-        0xDD, 0x81, 0xA1, 0xD1, 0x21, 0x60, 0xFD, 0x62, 0xA2, 0xD9, 0x19, 0x00, 0x20, 0xFE, 0x21, 0x60,
-        0xF6, 0x62, 0x00, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0x20, 0xFE, 0x21, 0x60, 0xF8, 0x62, 0x00, 0x60,
-        0x04, 0x64, 0xA2, 0xDB, 0x20, 0xFE, 0x21, 0x60, 0xFA, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB,
-        0x20, 0xFE, 0x21, 0x60, 0xFC, 0x62, 0x00, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x00, 0x20, 0xFE,
-        0x21, 0x60, 0xE2, 0x62, 0xA2, 0xD1, 0x21, 0x60, 0xF6, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0x84,
-        0xFF, 0xFF, 0x10, 0x26, 0x09, 0x00, 0x04, 0x26, 0x09, 0x00, 0x20, 0x26, 0x09, 0x00, 0x02, 0x26,
-        0x09, 0x00, 0xD7, 0x60, 0x07, 0x78, 0xFF, 0xFF, 0x10, 0x7C, 0x05, 0x00, 0x04, 0x7C, 0x03, 0x00,
-        0x20, 0x7C, 0x01, 0x00, 0x02, 0x7C, 0x21, 0x60, 0xEE, 0x61, 0xA1, 0xD9, 0x21, 0x60, 0xE4, 0x61,
-        0xA1, 0xD1, 0x21, 0x60, 0xF8, 0x61, 0xA1, 0xD3, 0x21, 0x60, 0xEE, 0x61, 0xA0, 0x84, 0xA1, 0xD1,
-        0xFF, 0xFF, 0x10, 0x26, 0x07, 0x00, 0x04, 0x26, 0x07, 0x00, 0x01, 0x26, 0x0D, 0x00, 0xD7, 0x60,
-        0x07, 0x78, 0xFF, 0xFF, 0x10, 0x7C, 0x09, 0x00, 0x64, 0x40, 0x10, 0x22, 0x03, 0x00, 0xD7, 0x60,
-        0x07, 0x78, 0xFF, 0xFF, 0x04, 0x7C, 0x01, 0x00, 0x01, 0x7C, 0x21, 0x60, 0xF0, 0x61, 0xA1, 0xD9,
-        0x21, 0x60, 0xE6, 0x61, 0xA1, 0xD1, 0x21, 0x60, 0xFA, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0xA0, 0x84,
-        0x02, 0x26, 0x07, 0x00, 0x04, 0x26, 0x07, 0x00, 0x01, 0x26, 0x07, 0x00, 0xD7, 0x60, 0x07, 0x78,
-        0xFF, 0xFF, 0x02, 0x7C, 0x03, 0x00, 0x04, 0x7C, 0x01, 0x00, 0x20, 0x7C, 0x21, 0x60, 0xF2, 0x61,
-        0xA1, 0xD9, 0x21, 0x60, 0xFC, 0x61, 0xA1, 0xD1, 0x21, 0x60, 0xF4, 0x61, 0xA1, 0xD9, 0x21, 0x60,
-        0xF2, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x21, 0x60, 0xF0, 0x61, 0xA1, 0xD1, 0xFF, 0xFF,
-        0xB0, 0x84, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x22, 0xBC,
-        0xAB, 0x46, 0x36, 0xFA, 0xAB, 0x46, 0x21, 0x60, 0xEE, 0x61, 0xA1, 0xD3, 0x1F, 0x60, 0x92, 0x62,
-        0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x22, 0xBC, 0x88, 0xF1, 0x66, 0x41, 0x64, 0x46,
-        0x36, 0xFA, 0xFF, 0xFF, 0x61, 0x46, 0x50, 0x00, 0x21, 0x60, 0xFE, 0x62, 0xA2, 0xDB, 0xE0, 0x84,
-        0xE0, 0x84, 0x03, 0x02, 0x01, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x02, 0xA5, 0x64, 0x44, 0xD4, 0x9C,
-        0x22, 0x60, 0x00, 0x62, 0xA2, 0xD9, 0x22, 0x60, 0x02, 0x62, 0xA2, 0xDF, 0xDD, 0x81, 0xA1, 0xD1,
-        0x00, 0x65, 0x64, 0x40, 0x00, 0x3A, 0x01, 0x65, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40,
-        0x50, 0x3A, 0x01, 0x65, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0xF2, 0x3A, 0x01, 0x65,
-        0xDD, 0x81, 0xA1, 0xD1, 0x65, 0x40, 0x00, 0x3A, 0x18, 0x00, 0x00, 0x60, 0x00, 0x65, 0x64, 0x40,
-        0x00, 0x36, 0x01, 0x65, 0x64, 0x40, 0x01, 0x36, 0x02, 0x65, 0x64, 0x40, 0x02, 0x36, 0x04, 0x65,
-        0x64, 0x40, 0x04, 0x36, 0x10, 0x65, 0x64, 0x40, 0x05, 0x36, 0x20, 0x65, 0x65, 0x5C, 0x22, 0x60,
-        0x02, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xB0, 0x84, 0xA2, 0xDB, 0x21, 0x60, 0xFE, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0xFF, 0xA4, 0xA2, 0xDB, 0xCA, 0x02, 0x22, 0x60, 0x02, 0x62, 0xA2, 0xD3, 0x22, 0x60,
-        0x00, 0x62, 0xA2, 0xD1, 0x2E, 0x58, 0xFF, 0xFF, 0xAB, 0x46, 0x82, 0xF0, 0xC0, 0x67, 0xB4, 0x84,
-        0xAB, 0x46, 0x0B, 0xFA, 0x1F, 0x60, 0xA0, 0x64, 0xA0, 0xD1, 0x22, 0x60, 0xD4, 0x7C, 0x04, 0x1B,
-        0xFF, 0x60, 0xFF, 0x63, 0xA4, 0xDD, 0x29, 0x00, 0x23, 0x60, 0x3C, 0x63, 0xA4, 0xDD, 0xDB, 0x83,
-        0x60, 0xFE, 0x00, 0x64, 0xBD, 0xDB, 0x60, 0x64, 0xBD, 0xDB, 0x1D, 0x64, 0xBD, 0xDB, 0xC3, 0xF3,
-        0xBD, 0xDB, 0xFF, 0xFF, 0x20, 0xFE, 0x01, 0x60, 0x78, 0x64, 0x06, 0x61, 0x58, 0xD1, 0xFF, 0xFF,
-        0x60, 0xFE, 0xBD, 0xD9, 0x20, 0xFE, 0xCD, 0x81, 0x61, 0x40, 0x08, 0x28, 0xF7, 0x01, 0xB7, 0xF1,
-        0xFF, 0xFF, 0x64, 0x47, 0x60, 0xFE, 0xBD, 0xD9, 0xBD, 0xDB, 0x20, 0xFE, 0x1F, 0x60, 0x9C, 0x64,
-        0xA0, 0xD1, 0x60, 0xFE, 0xBD, 0xD9, 0xFF, 0xFF, 0x20, 0xFE, 0x22, 0x60, 0xD2, 0x64, 0x40, 0x48,
-        0x18, 0x61, 0x26, 0x46, 0x00, 0xF4, 0xFF, 0x60, 0xF2, 0x64, 0xE1, 0x60, 0x58, 0x4D, 0xE5, 0x78,
-        0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xFC, 0x2B, 0x46, 0x56, 0xF1, 0x16, 0x60, 0xAC, 0x61, 0x1B, 0xF8,
-        0xA1, 0xD1, 0x10, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x06, 0xF2, 0x0C, 0x03, 0x10, 0xBC, 0x06, 0xFA,
-        0x87, 0xF3, 0x00, 0x60, 0xE2, 0x62, 0xA2, 0xD3, 0x60, 0x45, 0xD4, 0x80, 0xDC, 0x84, 0x07, 0x07,
-        0xA2, 0xDB, 0x05, 0x00, 0x10, 0xB5, 0xFF, 0xFF, 0x02, 0x03, 0xD4, 0x84, 0x06, 0xFA, 0x07, 0xF2,
-        0x66, 0x45, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x02, 0xB0, 0xFF, 0xFF, 0x12, 0x03, 0x26, 0x46,
-        0x88, 0xF3, 0x07, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x4C, 0x00, 0x26, 0x46, 0x88, 0xF3, 0x07, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64,
-        0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0x00, 0x66, 0x46, 0x46, 0x1A, 0x00, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA, 0x02, 0x64, 0x3F, 0xFA,
-        0x88, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x09, 0x64, 0x09, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60,
-        0x8E, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x2B, 0x43, 0x14, 0x60, 0xD0, 0x62,
-        0xA2, 0xD3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81,
-        0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x14, 0x60,
-        0xD0, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0xAB, 0x46,
-        0x06, 0xF2, 0xFF, 0xFF, 0x02, 0xBC, 0x06, 0xFA, 0xAB, 0x46, 0xAB, 0x46, 0x0F, 0x60, 0xFF, 0x64,
-        0x02, 0xF0, 0x72, 0xF1, 0xA0, 0x84, 0xD0, 0x80, 0x02, 0xFA, 0xAB, 0x46, 0x01, 0x06, 0x72, 0xFB,
-        0x27, 0x41, 0x01, 0xB1, 0xFF, 0xFF, 0x08, 0x03, 0x2B, 0x46, 0x0B, 0x58, 0x01, 0x65, 0xE2, 0x60,
-        0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x0A, 0x00, 0x2B, 0x46, 0x0B, 0x58, 0x16, 0x60, 0xA2, 0x64,
-        0x40, 0x59, 0x02, 0x65, 0xE2, 0x60, 0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x00, 0x64, 0x09, 0xFA, 0x0B, 0xFA, 0x01, 0x7E,
-        0x0C, 0xFA, 0x0A, 0x64, 0x0A, 0xFA, 0x26, 0x46, 0x08, 0x64, 0x3F, 0xFA, 0x07, 0xF2, 0x88, 0xF1,
-        0x40, 0x58, 0x07, 0xF8, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xFF, 0x60, 0xFD, 0x65,
-        0x38, 0x46, 0x06, 0xF2, 0xFF, 0xFF, 0xA4, 0x83, 0x06, 0xFC, 0x02, 0xB0, 0x26, 0x46, 0x1C, 0x03,
-        0x38, 0x43, 0x87, 0xF1, 0x14, 0x60, 0xCE, 0x61, 0xA1, 0xD3, 0xDA, 0x81, 0xD0, 0x80, 0xDC, 0x9C,
-        0x05, 0x05, 0xA1, 0xD3, 0x4A, 0xD9, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0x02, 0x60, 0x00, 0x61,
-        0x2C, 0xF2, 0xA1, 0xDB, 0x2D, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x2E, 0xF2, 0x59, 0xDB, 0x03, 0x65,
-        0xE2, 0x60, 0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0x07, 0xF2, 0x88, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF,
-        0x40, 0x47, 0x07, 0xF2, 0x66, 0x45, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x02, 0xB0, 0xFF, 0xFF,
-        0x1B, 0x02, 0x27, 0x43, 0x14, 0x60, 0xD0, 0x62, 0xA2, 0xD3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80,
-        0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80,
-        0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x14, 0x60, 0xD0, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3,
-        0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0x0C, 0x00, 0x27, 0x44, 0x40, 0x58, 0x03, 0x65, 0xE2, 0x60,
-        0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x27, 0x43, 0xE4, 0x60, 0x58, 0x4E, 0x9D, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x87, 0xF4, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18,
-        0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0x88, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2,
-        0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2,
-        0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x07, 0xF2, 0x88, 0xF1,
-        0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF, 0x40, 0x47, 0x07, 0xF2,
-        0x66, 0x45, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x02, 0xB0, 0xFF, 0xFF, 0x02, 0x02, 0x2F, 0x58,
-        0xFF, 0xFF, 0x27, 0x46, 0x06, 0xF0, 0xFF, 0x60, 0xED, 0x64, 0xA0, 0x84, 0x06, 0xFA, 0x27, 0x43,
-        0x87, 0xF1, 0x14, 0x60, 0xCE, 0x61, 0xA1, 0xD3, 0xDA, 0x81, 0xD0, 0x80, 0xDC, 0x9C, 0x05, 0x05,
-        0xA1, 0xD3, 0x4A, 0xD9, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0x07, 0x58, 0x03, 0x65, 0xE2, 0x60,
-        0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x27, 0x43, 0xE4, 0x60, 0x58, 0x4E, 0x9D, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA,
-        0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0xCD, 0xF3, 0x31, 0xFA,
-        0x67, 0xF3, 0x32, 0xFA, 0x68, 0xF3, 0x33, 0xFA, 0x69, 0xF3, 0x34, 0xFA, 0xAC, 0xF1, 0x19, 0xF8,
-        0x1C, 0xF2, 0x13, 0xFA, 0x02, 0x63, 0x3F, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0x02, 0x60, 0x00, 0x61,
-        0x2C, 0xF2, 0xA1, 0xDB, 0x2D, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x2E, 0xF2, 0x59, 0xDB, 0x06, 0x63,
-        0x07, 0xF2, 0x88, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x0D, 0x02, 0x43, 0x59, 0x02, 0x65,
-        0xE2, 0x60, 0x58, 0x4E, 0x5B, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0xC0, 0x64, 0x2A, 0xFA, 0x00, 0xF4,
-        0x06, 0x64, 0x09, 0xFA, 0x15, 0x00, 0x07, 0xF2, 0x66, 0x45, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46,
-        0x02, 0xB0, 0xFF, 0xFF, 0x1E, 0x02, 0x07, 0x63, 0x43, 0x59, 0x01, 0x65, 0xE2, 0x60, 0x58, 0x4E,
-        0x5B, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0xA0, 0x64, 0x2A, 0xFA, 0x00, 0xF4, 0x07, 0x64, 0x09, 0xFA,
-        0x26, 0x46, 0x88, 0xF3, 0x07, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB,
-        0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66,
-        0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xFE, 0x62, 0xDB, 0x60, 0xB0, 0x64, 0xA2, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x60, 0x03, 0x64, 0xA2, 0xDB, 0xDB, 0x60,
-        0x4D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xE8, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x5A, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x72, 0xF3,
-        0x88, 0xF5, 0xDC, 0x81, 0x66, 0x43, 0x02, 0xA3, 0x63, 0x46, 0xCD, 0x81, 0x06, 0xF2, 0xED, 0x03,
-        0x60, 0x40, 0x08, 0x2A, 0xF7, 0x01, 0x0C, 0xAC, 0x06, 0xFA, 0x46, 0x49, 0x00, 0x60, 0x02, 0x61,
-        0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF, 0xE0, 0x03, 0x25, 0x60, 0x2C, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x03, 0x1B, 0x00, 0x60, 0xA0, 0x64, 0x02, 0x00, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA,
-        0xAB, 0xFC, 0x66, 0x45, 0x29, 0x44, 0x07, 0xFA, 0x29, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x85, 0xF2,
-        0x65, 0x46, 0x2C, 0xFA, 0x2D, 0xF8, 0xAE, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0x32, 0xFA, 0xCC, 0xF3,
-        0x30, 0xFA, 0x33, 0xFA, 0xCD, 0xF3, 0x31, 0xFA, 0x34, 0xFA, 0xAC, 0xF1, 0x19, 0xF8, 0x18, 0x67,
-        0x0E, 0xFA, 0x66, 0x45, 0x63, 0x46, 0x0E, 0xF2, 0x65, 0x46, 0x00, 0x7E, 0x13, 0xFA, 0x02, 0x63,
-        0x3F, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0x66, 0x41, 0x00, 0xF4, 0x25, 0x60, 0x28, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0x09, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x9A, 0x64, 0xA2, 0xDB, 0x61, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0x9E, 0x01, 0x92, 0x01,
-        0x0F, 0x60, 0xE8, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x07, 0xF0,
-        0xFF, 0xFF, 0x64, 0x43, 0x14, 0x60, 0xD0, 0x62, 0xA2, 0xD3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80,
-        0xA1, 0xD1, 0x04, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0x09, 0x00, 0xA1, 0xDD, 0x14, 0x60,
-        0xD0, 0x62, 0xD9, 0x84, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xA2, 0xDB, 0x66, 0x45,
-        0x63, 0x46, 0x06, 0xF2, 0xFF, 0x60, 0x01, 0x7C, 0xA0, 0x9C, 0x06, 0xF8, 0x65, 0x46, 0x71, 0xF3,
-        0x60, 0x40, 0x10, 0x2A, 0x03, 0x00, 0xCC, 0x84, 0x80, 0x2B, 0x71, 0xFB, 0x0F, 0x60, 0xE8, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xDC, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xDE, 0x62, 0x00, 0x60, 0x02, 0x64,
-        0xA2, 0xDB, 0xDB, 0x60, 0xF7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x71, 0xF3,
-        0x72, 0xF3, 0x00, 0xA8, 0x60, 0x88, 0x50, 0x03, 0xE0, 0x83, 0x6C, 0x03, 0xCB, 0x83, 0x88, 0xF3,
-        0x73, 0xF1, 0x02, 0xA4, 0x40, 0x47, 0x64, 0x45, 0x27, 0x46, 0x72, 0xF4, 0x12, 0xF2, 0x40, 0x18,
-        0xD4, 0x80, 0x02, 0x64, 0x3D, 0x07, 0x23, 0xFA, 0x2A, 0xF2, 0x0E, 0xF2, 0x0C, 0xB0, 0x02, 0xF0,
-        0x0D, 0x02, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xE6, 0x01, 0x60, 0x40, 0xF0, 0x37,
-        0x08, 0x00, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0x90, 0xF3, 0x02, 0x02, 0xDC, 0x84,
-        0x90, 0xFB, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xAC, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA3, 0xFF, 0xCE, 0xFE, 0x98, 0xF1, 0x1E, 0x60,
-        0xEC, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xBC, 0x01,
-        0x27, 0x44, 0x02, 0xA4, 0x40, 0x47, 0xB8, 0x1F, 0x28, 0x43, 0xCB, 0x83, 0x88, 0xF3, 0x1A, 0x0E,
-        0x02, 0xA4, 0x40, 0x4C, 0x43, 0x48, 0x2C, 0x46, 0x1E, 0xF2, 0x73, 0xF1, 0xAC, 0x86, 0x12, 0xF2,
-        0x0C, 0x03, 0xD0, 0x80, 0xFF, 0xFF, 0x09, 0x07, 0x1B, 0x60, 0xDA, 0x64, 0x40, 0x4B, 0xF0, 0x60,
-        0x58, 0x4D, 0x75, 0x78, 0xFF, 0xFF, 0x2C, 0x46, 0x9E, 0xFC, 0x2C, 0x44, 0x02, 0xA4, 0x28, 0x43,
-        0x40, 0x4C, 0xE8, 0x1F, 0x7D, 0x01, 0x01, 0x63, 0x66, 0xF3, 0xAC, 0xF3, 0x00, 0xBD, 0xAC, 0x81,
-        0x06, 0x03, 0x05, 0x03, 0xB5, 0x60, 0x58, 0x4D, 0xC1, 0x78, 0xFF, 0xFF, 0x60, 0x43, 0x5B, 0xFD,
-        0x3E, 0x63, 0x16, 0x60, 0x60, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F, 0x71, 0xFB, 0x72, 0xFB,
-        0x16, 0x60, 0xA8, 0x65, 0x00, 0x64, 0xA5, 0xDB, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x1B, 0x60,
-        0x9A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x03, 0x02, 0xC7, 0x60, 0x2E, 0x78,
-        0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x45, 0x64, 0x46, 0x1B, 0xF2, 0x65, 0x46, 0x64, 0x45, 0x5B, 0xF1,
-        0xE0, 0x84, 0x73, 0xF1, 0xC0, 0x84, 0xC0, 0x84, 0x12, 0xFA, 0x2C, 0xF2, 0x71, 0xF3, 0x60, 0x40,
-        0x01, 0x2A, 0x36, 0x00, 0x00, 0xA8, 0x1F, 0x60, 0x8E, 0x62, 0xA2, 0xD3, 0x37, 0x03, 0x00, 0xA8,
-        0xFF, 0xFF, 0x34, 0x03, 0xDE, 0x60, 0x58, 0x4D, 0x6B, 0x78, 0xFF, 0xFF, 0x25, 0x46, 0x09, 0x60,
-        0x08, 0x61, 0xA2, 0xFF, 0x0E, 0xF2, 0x02, 0xF0, 0x60, 0x40, 0xF0, 0x37, 0x0D, 0x00, 0x92, 0xF3,
-        0x90, 0xF3, 0xDC, 0x83, 0xD1, 0x80, 0x92, 0xFD, 0x0C, 0x03, 0x8C, 0xF3, 0xCC, 0x83, 0xD8, 0xA0,
-        0x90, 0xFD, 0x07, 0x04, 0xD4, 0xFE, 0x05, 0x00, 0xD1, 0x80, 0x93, 0xF3, 0x02, 0x03, 0xDC, 0x84,
-        0x93, 0xFB, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x94, 0x64, 0xA2, 0xDB, 0x25, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA3, 0xFF, 0xDC, 0x60, 0x87, 0x78, 0xFF, 0xFF,
-        0x66, 0x41, 0x65, 0x46, 0x06, 0xF2, 0x61, 0x46, 0x60, 0x40, 0x10, 0x2A, 0x4C, 0x00, 0x80, 0x67,
-        0xB4, 0x81, 0x1B, 0x60, 0xDA, 0x62, 0x61, 0x44, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xDE, 0x60, 0x58, 0x4D, 0x6B, 0x78, 0xFF, 0xFF, 0x25, 0x46,
-        0x2A, 0xF2, 0x09, 0x60, 0x08, 0x61, 0x0C, 0xB0, 0xA2, 0xFF, 0x17, 0x03, 0x0E, 0xF2, 0x02, 0xF0,
-        0x60, 0x40, 0xF0, 0x37, 0x0D, 0x00, 0x90, 0xF3, 0x92, 0xF3, 0xCC, 0x83, 0xD1, 0x80, 0x90, 0xFD,
-        0x0C, 0x03, 0x8C, 0xF3, 0xDC, 0x83, 0xD8, 0xA0, 0x92, 0xFD, 0x07, 0x04, 0xD4, 0xFE, 0x05, 0x00,
-        0xD1, 0x80, 0x93, 0xF3, 0x02, 0x03, 0xDC, 0x84, 0x93, 0xFB, 0x07, 0xF0, 0x0A, 0xF2, 0xA3, 0xFF,
-        0x64, 0x45, 0x30, 0x1B, 0x66, 0x41, 0x65, 0x46, 0x02, 0xF0, 0x61, 0x46, 0x0F, 0x60, 0xFF, 0x61,
-        0xA1, 0x84, 0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61,
-        0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x16, 0x60, 0x62, 0x65, 0x46, 0xD1, 0x61, 0x44,
-        0xB0, 0x84, 0xA2, 0xDB, 0x17, 0x00, 0x1B, 0x60, 0x8E, 0x61, 0x2A, 0xF2, 0x3E, 0xF2, 0x0C, 0xB0,
-        0x01, 0xB0, 0x05, 0x03, 0x1B, 0x60, 0xA0, 0x61, 0x02, 0x02, 0x1B, 0x60, 0x88, 0x61, 0x1B, 0x60,
-        0xDA, 0x62, 0x61, 0x44, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xC1, 0xFE, 0xDC, 0x60, 0x87, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x2B, 0xF2, 0x2A, 0xF2,
-        0x60, 0x41, 0x44, 0x49, 0x60, 0x45, 0xA4, 0x3A, 0x0D, 0x00, 0x61, 0x40, 0xC0, 0x3B, 0x7B, 0x00,
-        0xA9, 0x46, 0x06, 0xF2, 0xA9, 0x46, 0x60, 0x40, 0x20, 0x26, 0x75, 0x00, 0x20, 0xBC, 0xA9, 0x46,
-        0x06, 0xFA, 0xA9, 0x46, 0xA9, 0x46, 0x06, 0xF0, 0xA9, 0x46, 0x65, 0x40, 0x10, 0x2B, 0x6E, 0x00,
-        0x64, 0x40, 0x10, 0x2A, 0x36, 0x00, 0x65, 0x40, 0xA4, 0x3A, 0x65, 0x00, 0x29, 0x45, 0x65, 0x46,
-        0x72, 0xF2, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x04, 0x02, 0x78, 0x00, 0xDE, 0x60, 0x51, 0x78,
-        0xFF, 0xFF, 0x09, 0xF2, 0x2A, 0xF0, 0x00, 0xA8, 0x20, 0x67, 0x02, 0x03, 0xB0, 0x84, 0x2A, 0xFA,
-        0x0E, 0xF2, 0x02, 0xF0, 0x60, 0x40, 0xF0, 0x37, 0x08, 0x00, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80,
-        0xA2, 0xFF, 0x90, 0xF3, 0x02, 0x02, 0xDC, 0x84, 0x90, 0xFB, 0x3E, 0xF2, 0xA3, 0xFF, 0x01, 0xB0,
-        0x1B, 0x60, 0xA0, 0x61, 0x02, 0x02, 0x1B, 0x60, 0x8E, 0x61, 0x1B, 0x60, 0xDA, 0x62, 0x61, 0x44,
-        0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0x17, 0x00, 0x10, 0x64, 0xB0, 0x84, 0xDF, 0x65, 0xA4, 0x9E, 0xA9, 0x46, 0x06, 0xFA, 0xA9, 0x46,
-        0xA2, 0xFF, 0x16, 0x60, 0xA8, 0x62, 0x04, 0x64, 0xA2, 0xDB, 0x29, 0x44, 0x5A, 0xDB, 0x71, 0xF3,
-        0xC1, 0xFE, 0xD4, 0xFE, 0x87, 0xF1, 0xA3, 0xFF, 0xD0, 0x80, 0xDC, 0x84, 0x01, 0x07, 0x71, 0xFB,
-        0xA9, 0x46, 0x72, 0xF2, 0xA9, 0x46, 0x65, 0x18, 0xA9, 0x46, 0x02, 0xF0, 0xA9, 0x46, 0x0F, 0x60,
-        0xFF, 0x61, 0xA1, 0x84, 0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4,
-        0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x16, 0x60, 0x62, 0x65, 0x46, 0xD1,
-        0xFF, 0xFF, 0xB1, 0x84, 0xA2, 0xDB, 0xDE, 0x60, 0x68, 0x78, 0xFF, 0xFF, 0x64, 0x40, 0x10, 0x2A,
-        0xFA, 0x01, 0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84, 0xA9, 0x46, 0x06, 0xFA, 0xA9, 0x46, 0x65, 0x41,
-        0x71, 0xF3, 0x29, 0x45, 0xCC, 0x84, 0x80, 0x2B, 0x71, 0xFB, 0x65, 0x46, 0x72, 0xF2, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x37, 0x02, 0x61, 0x40, 0xA4, 0x3A, 0xE5, 0x01, 0x00, 0x60, 0x3A, 0x61,
-        0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF, 0x81, 0x03, 0x02, 0x60, 0x48, 0x64, 0x2A, 0xFA,
-        0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x67, 0xF1, 0x32, 0xF8,
-        0x68, 0xF1, 0x33, 0xF8, 0x69, 0xF1, 0x34, 0xF8, 0xA9, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x85, 0xF0,
-        0xA9, 0x46, 0x2C, 0xFA, 0x2D, 0xF8, 0xAE, 0xF8, 0xAC, 0xF1, 0x19, 0xF8, 0xFF, 0x67, 0x0E, 0xFA,
-        0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x29, 0x44, 0x07, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60,
-        0x8E, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x37, 0x00, 0x80, 0x67, 0xB4, 0x83, 0x2A, 0xF2, 0x09, 0x60, 0x08, 0x65, 0x0C, 0xB0,
-        0x09, 0xF0, 0x0D, 0x02, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x9D, 0x18, 0x64, 0x46, 0x3E, 0xF2,
-        0xA2, 0xFF, 0x01, 0xB0, 0x1B, 0x60, 0xA0, 0x61, 0x02, 0x02, 0x1B, 0x60, 0x88, 0x61, 0x02, 0xF2,
-        0x0E, 0xF0, 0xD4, 0x80, 0x09, 0xF4, 0x06, 0x02, 0x90, 0xF3, 0x64, 0x40, 0xF0, 0x37, 0x02, 0x00,
-        0xDC, 0x84, 0x90, 0xFB, 0x66, 0x44, 0x00, 0xA8, 0xFF, 0xFF, 0xF1, 0x02, 0x1B, 0x60, 0xDA, 0x62,
-        0x61, 0x44, 0xA2, 0xDB, 0x5A, 0xDD, 0x08, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0xA3, 0xFF, 0xA9, 0x46, 0x02, 0xF0, 0xA9, 0x46, 0x0F, 0x60, 0xFF, 0x61, 0xA1, 0x84, 0x60, 0x41,
-        0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84,
-        0xE1, 0x81, 0xFD, 0x02, 0x16, 0x60, 0x62, 0x65, 0x46, 0xD3, 0x9D, 0x85, 0xA4, 0x84, 0xA2, 0xDB,
-        0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x46, 0x45, 0x3F, 0xF2, 0x05, 0x48, 0x00, 0xA8, 0x60, 0x41,
-        0x66, 0x44, 0x0B, 0x03, 0x0E, 0xA1, 0x00, 0xF2, 0x42, 0xFE, 0xAC, 0x86, 0x01, 0xF2, 0x1F, 0x03,
-        0x7F, 0xB5, 0xD5, 0x81, 0x66, 0x44, 0xF7, 0x07, 0x25, 0x46, 0x05, 0xF0, 0x06, 0xFA, 0x05, 0xFA,
-        0xD0, 0x80, 0x64, 0x43, 0x13, 0x03, 0x60, 0x46, 0x01, 0xF0, 0x80, 0x67, 0xB0, 0x84, 0x01, 0xFA,
-        0x00, 0xF0, 0x00, 0x64, 0x00, 0xFA, 0x44, 0x45, 0xA2, 0xFF, 0xB4, 0x60, 0x58, 0x4E, 0x48, 0x78,
-        0xFF, 0xFF, 0xA3, 0xFF, 0x08, 0x45, 0x25, 0x46, 0x01, 0x64, 0x02, 0xFA, 0x02, 0xFE, 0x2D, 0x58,
-        0xFF, 0xFF, 0x23, 0xF2, 0x07, 0xF0, 0x10, 0xB0, 0x10, 0xAC, 0x3B, 0x03, 0x23, 0xFA, 0x80, 0x67,
-        0xB0, 0x81, 0x1B, 0x60, 0xDA, 0x62, 0x61, 0x44, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x04, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x46, 0x45, 0x64, 0x46, 0x02, 0xF0, 0x0F, 0x60, 0xFF, 0x61,
-        0xA1, 0x84, 0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61,
-        0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x16, 0x60, 0x62, 0x65, 0x46, 0xD1, 0xFF, 0xFF,
-        0xB1, 0x84, 0xA2, 0xDB, 0x9B, 0xF2, 0x25, 0x46, 0xE1, 0x81, 0x5B, 0xF1, 0x73, 0xF1, 0xC1, 0x81,
-        0xC1, 0x81, 0x92, 0xFA, 0xA2, 0xFF, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x61, 0xD1, 0x80, 0x0E, 0xF2,
-        0x05, 0x02, 0x90, 0xF3, 0x20, 0xB0, 0xCC, 0x84, 0x01, 0x02, 0x90, 0xFB, 0xA3, 0xFF, 0x48, 0xFE,
-        0x07, 0x00, 0x0E, 0xF2, 0x08, 0xFE, 0xF0, 0x7F, 0x60, 0x40, 0x20, 0x2A, 0x00, 0x7F, 0x0E, 0xFA,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0xA0, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x57, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x80, 0x64, 0x2A, 0xFA, 0xAC, 0xF1, 0x19, 0xF8,
-        0x00, 0x64, 0x3E, 0xFA, 0x00, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0x88, 0xF1, 0x07, 0xF8, 0x67, 0x44,
-        0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0x0F, 0x60, 0xF6, 0x62, 0xE1, 0x60, 0x9E, 0x64, 0xA2, 0xDB,
-        0x10, 0x60, 0x02, 0x62, 0xE0, 0x60, 0x0D, 0x64, 0xA2, 0xDB, 0x16, 0x60, 0xB2, 0x63, 0x65, 0x44,
-        0xBD, 0xDB, 0x10, 0x60, 0x04, 0x64, 0xBD, 0xDB, 0x02, 0x64, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB,
-        0xE6, 0x60, 0x5A, 0x78, 0xFF, 0xFF, 0xE6, 0x60, 0x58, 0x4D, 0x66, 0x78, 0xFF, 0xFF, 0x57, 0xF5,
-        0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x67, 0xF1, 0x32, 0xF8,
-        0x68, 0xF1, 0x33, 0xF8, 0x69, 0xF1, 0x34, 0xF8, 0x1F, 0x60, 0x92, 0x62, 0xA2, 0xD1, 0x01, 0x64,
-        0x64, 0x40, 0xFE, 0x26, 0x10, 0xBC, 0x32, 0x40, 0x10, 0x26, 0x10, 0xBC, 0x23, 0x60, 0x4C, 0x62,
-        0xA2, 0xDB, 0x1F, 0x60, 0x90, 0x62, 0xA2, 0xD1, 0x1F, 0x60, 0x1E, 0x64, 0x02, 0x18, 0x1F, 0x60,
-        0x40, 0x64, 0x22, 0x60, 0xA2, 0x62, 0xA2, 0xDB, 0x22, 0x60, 0xBE, 0x62, 0xA2, 0xDB, 0x21, 0x60,
-        0xC6, 0x61, 0x20, 0x60, 0x32, 0x62, 0xA2, 0xD3, 0x22, 0x60, 0x82, 0x65, 0xFE, 0xA4, 0xE0, 0x84,
-        0x02, 0x05, 0x67, 0x44, 0x99, 0x00, 0xE0, 0x84, 0xC4, 0x85, 0x21, 0x60, 0xEC, 0x62, 0xA2, 0xD3,
-        0xA5, 0xD1, 0xDA, 0x85, 0x21, 0x60, 0xE4, 0x62, 0xA0, 0x83, 0xA2, 0xDD, 0xA5, 0xD1, 0x21, 0x60,
-        0xE2, 0x62, 0xA0, 0x83, 0xA2, 0xDD, 0x21, 0x60, 0xC0, 0x61, 0xDD, 0x60, 0x06, 0x64, 0xA1, 0xDB,
-        0x06, 0xA1, 0x21, 0x60, 0xEA, 0x62, 0xA2, 0xD3, 0x21, 0x60, 0xE2, 0x62, 0x60, 0x40, 0xFD, 0xA0,
-        0xA2, 0xD3, 0x74, 0x03, 0x50, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60,
-        0xF2, 0x63, 0x0E, 0x00, 0x04, 0x2A, 0x03, 0x00, 0x02, 0x60, 0xF2, 0x63, 0x09, 0x00, 0x10, 0x2A,
-        0x03, 0x00, 0x04, 0x60, 0xF2, 0x63, 0x04, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60, 0xF2, 0x63,
-        0x59, 0xD9, 0x59, 0xDD, 0x21, 0x60, 0xEA, 0x62, 0xA2, 0xD3, 0x21, 0x60, 0xE4, 0x62, 0xFE, 0xA0,
-        0xA2, 0xD3, 0x54, 0x03, 0x00, 0x60, 0x00, 0x63, 0x59, 0xDD, 0x61, 0x45, 0x60, 0x40, 0x01, 0x2A,
-        0x04, 0x00, 0x00, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x02, 0x2A, 0x04, 0x00,
-        0x01, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x04, 0x2A, 0x04, 0x00, 0x02, 0x60,
-        0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x10, 0x2A, 0x04, 0x00, 0x04, 0x60, 0xF2, 0x63,
-        0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60, 0xF2, 0x63, 0x59, 0xD9,
-        0x59, 0xDD, 0xD5, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xA5, 0xDD, 0x21, 0x60, 0xEA, 0x62, 0xA2, 0xD3,
-        0x21, 0x60, 0xE6, 0x62, 0xFF, 0xA0, 0xA2, 0xD3, 0x21, 0x03, 0x00, 0x60, 0x00, 0x63, 0x59, 0xDD,
-        0x61, 0x45, 0x60, 0x40, 0x01, 0x2A, 0x04, 0x00, 0x00, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD,
-        0x60, 0x40, 0x02, 0x2A, 0x04, 0x00, 0x01, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40,
-        0x04, 0x2A, 0x04, 0x00, 0x02, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0xD5, 0x83, 0xEB, 0x83,
-        0xEB, 0x83, 0xA5, 0xDD, 0x21, 0x60, 0xE8, 0x62, 0xA2, 0xD1, 0x59, 0xD9, 0x21, 0x60, 0xC0, 0x65,
-        0xD5, 0x84, 0xDD, 0x7F, 0xA5, 0xDB, 0x65, 0x44, 0x22, 0x60, 0xAC, 0x62, 0xA2, 0xDB, 0x22, 0x60,
-        0xC8, 0x62, 0xA2, 0xDB, 0x57, 0xF5, 0xCB, 0xF3, 0xCC, 0xF1, 0x00, 0x63, 0xC0, 0x87, 0xCD, 0xF1,
-        0x5A, 0xFD, 0xC0, 0x85, 0x65, 0x47, 0xC4, 0x84, 0x07, 0xB5, 0x1C, 0x60, 0x10, 0x62, 0x16, 0x60,
-        0xAE, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xD0, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xD2, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0xE0, 0x60,
-        0x17, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xD0, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x57, 0xF5, 0x00, 0x64, 0x95, 0xFB, 0x96, 0xFB, 0x97, 0xFB,
-        0x75, 0xFB, 0x66, 0xF3, 0x00, 0x75, 0x00, 0x72, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x93, 0xC7, 0xF3,
-        0xED, 0xE2, 0xCC, 0x84, 0x5A, 0xFB, 0x0F, 0x60, 0xD2, 0x62, 0x00, 0x60, 0x04, 0x64, 0xA2, 0xDB,
-        0xE0, 0x60, 0x36, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD0, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x65, 0xF1, 0x23, 0x60, 0x02, 0x62, 0xA2, 0xD9, 0x22, 0x60, 0xAA, 0x65,
-        0xE2, 0x60, 0x58, 0x4D, 0x2F, 0x78, 0xFF, 0xFF, 0xE1, 0x60, 0x58, 0x4D, 0xA8, 0x78, 0xFF, 0xFF,
-        0xE2, 0x60, 0x58, 0x4D, 0x49, 0x78, 0xFF, 0xFF, 0x57, 0xF5, 0x00, 0xF4, 0x66, 0xF1, 0x06, 0xF8,
-        0x23, 0x60, 0x4C, 0x62, 0xA2, 0xD3, 0x07, 0xFA, 0x22, 0x60, 0xA2, 0x64, 0x40, 0x48, 0x10, 0x61,
-        0x00, 0x60, 0x00, 0x64, 0xE1, 0x60, 0x58, 0x4D, 0xE5, 0x78, 0xFF, 0xFF, 0x57, 0xF5, 0x3F, 0xFC,
-        0x5A, 0xF3, 0xC7, 0xF1, 0xAC, 0x83, 0x01, 0x64, 0x02, 0x02, 0x6C, 0xFB, 0x64, 0x43, 0x1B, 0x60,
-        0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x04, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xCF, 0x83, 0x73, 0xF3, 0x5A, 0xFD, 0xDC, 0x84, 0x73, 0xFB,
-        0x5C, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0x5C, 0xFB, 0x03, 0x03, 0xE1, 0x60, 0x0A, 0x78, 0xFF, 0xFF,
-        0x0A, 0x64, 0x5C, 0xFB, 0xA2, 0x4C, 0x20, 0x27, 0xF8, 0x01, 0x46, 0x60, 0x50, 0x65, 0x72, 0x44,
-        0xD4, 0x80, 0xFF, 0xFF, 0xF2, 0x04, 0x5D, 0xFB, 0x40, 0x48, 0x95, 0xF3, 0x5E, 0xFB, 0x40, 0x4A,
-        0x96, 0xF3, 0x97, 0xF3, 0x40, 0x4C, 0x60, 0x41, 0x66, 0xF1, 0x40, 0x63, 0xAD, 0x80, 0xF0, 0xA3,
-        0x09, 0x02, 0x3C, 0x03, 0x2C, 0x41, 0x2A, 0x44, 0x40, 0x4C, 0x28, 0x44, 0x40, 0x4A, 0x00, 0x64,
-        0x40, 0x48, 0xF4, 0x01, 0xD1, 0x80, 0x01, 0x02, 0x31, 0x04, 0x10, 0xA3, 0x80, 0x60, 0x00, 0x65,
-        0xA5, 0x80, 0xCF, 0x83, 0x08, 0x02, 0x28, 0x44, 0x60, 0x88, 0x2A, 0x44, 0x70, 0x8A, 0x2C, 0x44,
-        0x70, 0x8C, 0xF1, 0x81, 0xF5, 0x01, 0xE7, 0xA3, 0x64, 0x44, 0x00, 0xA0, 0x00, 0x62, 0x02, 0x02,
-        0x00, 0x61, 0x1C, 0x00, 0xE0, 0x84, 0xDE, 0x82, 0xFD, 0x04, 0x42, 0xFE, 0xF8, 0x84, 0x62, 0x45,
-        0xC7, 0x83, 0x60, 0x45, 0x02, 0xFE, 0xD5, 0x84, 0x02, 0x05, 0x01, 0x05, 0x61, 0x44, 0xCF, 0x83,
-        0x60, 0x41, 0x08, 0x03, 0x28, 0x44, 0x60, 0x88, 0x2A, 0x44, 0x70, 0x8A, 0x2C, 0x44, 0x70, 0x8C,
-        0xF1, 0x81, 0xF1, 0x01, 0xCE, 0x82, 0xE9, 0x81, 0xFD, 0x02, 0xF1, 0x81, 0x61, 0x44, 0x00, 0xA8,
-        0xFF, 0xFF, 0x30, 0x03, 0x73, 0x40, 0x5D, 0xF3, 0xFF, 0xFF, 0x60, 0x47, 0xE8, 0x84, 0xE8, 0x84,
-        0x5E, 0xF3, 0x3F, 0xB5, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xB4, 0x84, 0x61, 0x45, 0xD4, 0x84, 0xC0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81,
-        0x64, 0x44, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x85, 0x61, 0x44, 0xD4, 0x80,
-        0xFF, 0xFF, 0x10, 0x03, 0x60, 0x53, 0xD4, 0x84, 0xFF, 0xFF, 0x75, 0xF3, 0xFF, 0xFF, 0xDC, 0x84,
-        0x01, 0xB4, 0x75, 0xFB, 0x1F, 0x60, 0x14, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF,
-        0x08, 0x28, 0xA2, 0xDB, 0xE6, 0x60, 0xA3, 0x78, 0xFF, 0xFF, 0xC1, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x04, 0x64, 0x03, 0xFA, 0x00, 0xF4, 0x09, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x3A, 0x1C, 0x00,
-        0x60, 0x43, 0x00, 0x36, 0x1C, 0x00, 0xE0, 0xA0, 0xDA, 0x85, 0x16, 0x07, 0x1F, 0x60, 0x1E, 0x61,
-        0xA1, 0xD1, 0xFF, 0xFF, 0xD3, 0x80, 0xCB, 0x83, 0x0F, 0x02, 0x07, 0x0E, 0x59, 0xD3, 0xA5, 0xD0,
-        0xDA, 0x85, 0xD0, 0x80, 0xFF, 0xFF, 0x08, 0x02, 0xF9, 0x1F, 0x13, 0x1E, 0xA5, 0xD0, 0x59, 0xD3,
-        0xFF, 0xFF, 0x90, 0x80, 0xFF, 0x22, 0x0D, 0x00, 0xE1, 0x60, 0x9C, 0x78, 0xFF, 0xFF, 0x1F, 0x60,
-        0x90, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x1F, 0x60, 0x40, 0x64,
-        0x02, 0x00, 0x1F, 0x60, 0x1E, 0x64, 0x22, 0x60, 0xBE, 0x62, 0xA2, 0xDB, 0x26, 0x46, 0x2F, 0xF2,
-        0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1,
-        0x30, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x67, 0xF1, 0x32, 0xF8, 0x68, 0xF1, 0x33, 0xF8, 0x69, 0xF1,
-        0x34, 0xF8, 0x50, 0x63, 0x2A, 0xFC, 0xAC, 0xF3, 0x19, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x88, 0xF3,
-        0x07, 0xFA, 0x00, 0xF4, 0x66, 0xF1, 0x06, 0xF8, 0x23, 0x60, 0x4C, 0x62, 0xA2, 0xD3, 0x07, 0xFA,
-        0x22, 0x60, 0xC6, 0x65, 0xE2, 0x60, 0x58, 0x4D, 0x2F, 0x78, 0xFF, 0xFF, 0x22, 0x60, 0xBE, 0x64,
-        0x40, 0x48, 0x10, 0x61, 0x00, 0x60, 0x00, 0x64, 0xE1, 0x60, 0x58, 0x4D, 0xE5, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x3F, 0xFC, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x20, 0x44, 0x80, 0x26,
-        0x11, 0x00, 0x80, 0xBC, 0x40, 0x40, 0x00, 0x64, 0x95, 0xFB, 0x96, 0xFB, 0x97, 0xFB, 0x75, 0xFB,
-        0x66, 0xF3, 0x00, 0x75, 0x00, 0x72, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x93, 0xC7, 0xF3, 0xED, 0xE2,
-        0xCC, 0x84, 0x5A, 0xFB, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD0, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x00, 0x64, 0x73, 0xFB, 0x75, 0xFB, 0x2F, 0x58, 0xFF, 0xFF,
-        0x3E, 0x63, 0x16, 0x60, 0x60, 0x61, 0x59, 0xD1, 0x61, 0x46, 0x08, 0x1B, 0xFC, 0x1F, 0x22, 0x60,
-        0xDE, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x65, 0x00, 0x61, 0x17, 0x00, 0x16, 0x60, 0xA2, 0x61,
-        0x49, 0xD1, 0xCB, 0x83, 0xFD, 0x18, 0x63, 0x41, 0x04, 0xA1, 0x61, 0x45, 0x66, 0x43, 0x22, 0x60,
-        0xDE, 0x64, 0xDC, 0x84, 0x60, 0xFE, 0xA3, 0xD1, 0xDF, 0x83, 0xA0, 0xD9, 0xCD, 0x81, 0x20, 0xFE,
-        0xF8, 0x02, 0x66, 0x44, 0x16, 0x60, 0x62, 0x7C, 0xD0, 0x81, 0x5A, 0xF3, 0xC7, 0xF1, 0x22, 0x60,
-        0xDC, 0x63, 0x00, 0xA0, 0x64, 0x5F, 0xBD, 0xDB, 0x1B, 0x60, 0x94, 0x66, 0xA6, 0xD1, 0x02, 0x02,
-        0x01, 0x18, 0x01, 0xB9, 0x61, 0x44, 0x60, 0xFE, 0xA3, 0xDB, 0xFC, 0xA3, 0x65, 0x44, 0x03, 0xA4,
-        0xA3, 0xDB, 0xFF, 0xFF, 0x20, 0xFE, 0x2D, 0x58, 0xFF, 0xFF, 0x23, 0x60, 0x4E, 0x62, 0xA2, 0xDB,
-        0xCD, 0x81, 0x28, 0xD3, 0x5A, 0x88, 0xDC, 0x83, 0x39, 0x18, 0xFB, 0x03, 0x61, 0x40, 0x7F, 0x3A,
-        0x07, 0x00, 0x23, 0x60, 0x4E, 0x62, 0xA2, 0xD3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x00, 0xF4,
-        0x60, 0xFE, 0xA3, 0xD1, 0xDD, 0x81, 0xA1, 0xD8, 0x61, 0x40, 0x7F, 0x3A, 0x09, 0x00, 0x20, 0xFE,
-        0x23, 0x60, 0x4E, 0x62, 0xA2, 0xD3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x00, 0xF4, 0x60, 0xFE,
-        0xCF, 0x83, 0xA3, 0xD3, 0xDD, 0x81, 0xA1, 0xDA, 0xFF, 0xB4, 0x00, 0x7F, 0x15, 0x03, 0xDB, 0x83,
-        0x61, 0x40, 0x7F, 0x3A, 0x0B, 0x00, 0x20, 0xFE, 0x60, 0x45, 0x23, 0x60, 0x4E, 0x62, 0xA2, 0xD3,
-        0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x65, 0x44, 0x00, 0xF4, 0x60, 0xFE, 0xA3, 0xD1, 0xDF, 0x83,
-        0xDD, 0x81, 0xCC, 0x84, 0xA1, 0xD8, 0xEC, 0x02, 0x20, 0xFE, 0xC3, 0x01, 0x23, 0x60, 0x4E, 0x62,
-        0xA2, 0xD1, 0xFD, 0xA1, 0xFF, 0xB1, 0xC1, 0x83, 0xA2, 0xDD, 0x2D, 0x58, 0xFF, 0xFF, 0x67, 0x5C,
-        0x11, 0x60, 0xF0, 0x61, 0xA1, 0xD3, 0xA5, 0xD9, 0x12, 0x18, 0x60, 0x43, 0x23, 0x60, 0x04, 0x64,
-        0xA5, 0xDB, 0x60, 0xFE, 0xA0, 0xDD, 0xFF, 0xFF, 0x20, 0xFE, 0xDC, 0x84, 0xCF, 0x83, 0xE3, 0x83,
-        0x59, 0xD1, 0xDC, 0x84, 0x60, 0xFE, 0xA0, 0xD9, 0xFF, 0xFF, 0x20, 0xFE, 0xF9, 0x1F, 0x2D, 0x58,
-        0xFF, 0xFF, 0x20, 0x40, 0x20, 0x2A, 0x0D, 0x00, 0x12, 0x60, 0xB8, 0x62, 0xA2, 0xD1, 0x50, 0xF3,
-        0x23, 0x60, 0x39, 0x63, 0x60, 0xFE, 0xA3, 0xD9, 0xDF, 0x83, 0x60, 0x47, 0xA3, 0xDB, 0xFF, 0xFF,
-        0x20, 0xFE, 0x2D, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26, 0x25, 0x00, 0x45, 0x48,
-        0x00, 0x60, 0x10, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF, 0x1D, 0x03, 0xF2, 0x60,
-        0x02, 0x64, 0x24, 0xFA, 0x00, 0x60, 0x48, 0x61, 0x28, 0x44, 0x59, 0xDA, 0x03, 0x64, 0x38, 0x43,
-        0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02, 0x39, 0x44, 0x59, 0xDA, 0x06, 0x64, 0x23, 0xFA,
-        0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xCA, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40,
-        0x40, 0x26, 0x51, 0x00, 0x45, 0x48, 0x00, 0x60, 0x68, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78,
-        0xFF, 0xFF, 0x49, 0x03, 0xF2, 0x60, 0x01, 0x64, 0x24, 0xFA, 0x02, 0x60, 0x00, 0x61, 0x46, 0x4A,
-        0x38, 0x44, 0x54, 0x94, 0x03, 0x64, 0x01, 0x02, 0x09, 0x00, 0x06, 0x63, 0x4A, 0x61, 0x38, 0x46,
-        0xBD, 0xD0, 0xCC, 0x84, 0x2A, 0x46, 0x59, 0xD8, 0xFA, 0x02, 0x06, 0x00, 0xDA, 0x81, 0x38, 0x43,
-        0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02, 0x05, 0x63, 0x28, 0x44, 0x02, 0xA8, 0x25, 0xFA,
-        0x07, 0x02, 0x03, 0x64, 0x39, 0x43, 0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02, 0x08, 0x63,
-        0x22, 0x60, 0x28, 0x7C, 0x28, 0x44, 0x03, 0xA8, 0xA4, 0xD3, 0x0F, 0x03, 0xE8, 0x85, 0xC7, 0x85,
-        0x60, 0x43, 0xFE, 0xA3, 0x22, 0x60, 0x2A, 0x64, 0x58, 0xD1, 0xD9, 0x81, 0xA1, 0xD8, 0x7E, 0x2A,
-        0x02, 0x00, 0x00, 0xF4, 0x02, 0x61, 0xF8, 0x1F, 0x65, 0x43, 0x2A, 0x46, 0x23, 0xFC, 0x1B, 0x60,
-        0xDA, 0x62, 0x1B, 0x60, 0xCA, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26,
-        0x1C, 0x00, 0x45, 0x48, 0x00, 0x60, 0x06, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF,
-        0x14, 0x03, 0x02, 0x64, 0x23, 0xFA, 0xF2, 0x60, 0x00, 0x64, 0x5A, 0xDA, 0x28, 0x44, 0x5A, 0xDA,
-        0xFF, 0xFF, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xCA, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0xA2, 0xFF,
-        0x32, 0x40, 0x40, 0x26, 0x3E, 0x00, 0x7C, 0xF3, 0x67, 0x43, 0xDC, 0x84, 0xCC, 0x84, 0x39, 0x03,
-        0x60, 0x46, 0x0A, 0x02, 0x7C, 0xFD, 0x00, 0x60, 0x46, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78,
-        0xFF, 0xFF, 0x66, 0x44, 0x7C, 0xFB, 0x2E, 0x03, 0x46, 0x4B, 0x1E, 0x60, 0xD8, 0x61, 0x18, 0x64,
-        0x23, 0xFA, 0xF1, 0x60, 0x00, 0x64, 0x24, 0xFA, 0x4A, 0x65, 0xA2, 0xFF, 0x2C, 0x63, 0x00, 0x64,
-        0x59, 0xD1, 0xA2, 0xDB, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65,
-        0xF7, 0x1F, 0x12, 0x63, 0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4,
-        0x04, 0x65, 0xF8, 0x1F, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xCA, 0x64, 0xA2, 0xDB, 0x2B, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0xA6, 0xFE, 0x00, 0x64,
-        0x7C, 0xFB, 0xA3, 0xFF, 0xC7, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0xA6, 0xFE, 0xB8, 0x05, 0xA7, 0xFE,
-        0x0A, 0x05, 0xA5, 0xFE, 0x03, 0x04, 0xE3, 0x60, 0xD3, 0x78, 0xFF, 0xFF, 0xA4, 0xFE, 0xF2, 0x04,
-        0xE4, 0x60, 0x69, 0x78, 0xFF, 0xFF, 0x36, 0x45, 0x17, 0x60, 0x52, 0x64, 0x44, 0xD7, 0xFF, 0xFF,
-        0xFF, 0xFF, 0x28, 0xF3, 0x7E, 0xF1, 0x60, 0x47, 0x07, 0xB4, 0x4E, 0xFB, 0x01, 0x61, 0x03, 0x03,
-        0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x9D, 0x84, 0xA1, 0x80, 0xA0, 0x83, 0x1A, 0x03, 0x7E, 0xFD,
-        0x0F, 0x60, 0xF4, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x7E, 0xF1, 0x31, 0x44, 0x64, 0x40, 0xFF, 0x26, 0x09, 0x00, 0xFE, 0xB4, 0x40, 0x51, 0x01, 0x7C,
-        0xBC, 0xF9, 0x49, 0xF3, 0x01, 0x63, 0x60, 0x40, 0xFF, 0x26, 0x49, 0xFD, 0xC7, 0x60, 0x2E, 0x78,
-        0xFF, 0xFF, 0xE3, 0x60, 0xD3, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0xB6, 0x63, 0xBD, 0xD3, 0xBD, 0xD1,
-        0xBD, 0xD1, 0xB0, 0x84, 0xB0, 0x84, 0xFF, 0xFF, 0x07, 0x02, 0x6B, 0xFB, 0x31, 0x44, 0xFE, 0xB4,
-        0x40, 0x51, 0x0D, 0x64, 0x05, 0xFB, 0x3F, 0x00, 0x28, 0xF3, 0x7E, 0xF1, 0x60, 0x47, 0x64, 0x41,
-        0x07, 0xB1, 0x07, 0xB4, 0x08, 0x24, 0x67, 0x4C, 0x4E, 0xFB, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84,
-        0xE1, 0x81, 0xFD, 0x02, 0xA1, 0x80, 0xB1, 0x83, 0x2E, 0x02, 0x7E, 0xFD, 0x1F, 0x60, 0xAA, 0x62,
-        0xA2, 0xD3, 0xC5, 0xFB, 0x65, 0xFB, 0x7E, 0xF3, 0xFF, 0xFF, 0xCC, 0x85, 0xA4, 0x80, 0x7E, 0xFB,
-        0x17, 0x02, 0x1B, 0x60, 0xC4, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x46, 0x5E,
-        0x31, 0x44, 0x01, 0xBC, 0x40, 0x51, 0xED, 0xE2, 0x0F, 0x4E, 0xCE, 0x60, 0x58, 0x4F, 0x07, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0x01, 0x65, 0xE2, 0x60, 0x58, 0x4E, 0xDD, 0x78, 0xFF, 0xFF, 0x08, 0x00,
-        0x0F, 0x60, 0xD6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0xE5, 0x60, 0x16, 0x78, 0xFF, 0xFF, 0xD7, 0xFE, 0xC7, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0x2E, 0xF5,
-        0x27, 0xF2, 0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41,
-        0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02,
-        0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF,
-        0x63, 0x46, 0xE8, 0x1B, 0x88, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x28, 0x02, 0x14, 0x60,
-        0xD0, 0x62, 0xA2, 0xD3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x04, 0x03, 0xD3, 0x80,
-        0xD9, 0x81, 0xFA, 0x02, 0x09, 0x00, 0xA1, 0xDD, 0x14, 0x60, 0xD0, 0x62, 0xD9, 0x84, 0xA2, 0xDB,
-        0x4A, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xA2, 0xDB, 0x66, 0x45, 0x63, 0x46, 0x06, 0xF2, 0xFF, 0x60,
-        0x01, 0x7C, 0xA0, 0x9C, 0x06, 0xF8, 0x65, 0x46, 0x71, 0xF3, 0x60, 0x40, 0x10, 0x2A, 0x03, 0x00,
-        0xCC, 0x84, 0x80, 0x2B, 0x71, 0xFB, 0xE4, 0x60, 0x58, 0x4E, 0x9D, 0x78, 0xFF, 0xFF, 0xAB, 0x01,
-        0x2E, 0xF5, 0x25, 0x60, 0x28, 0x61, 0x28, 0xF0, 0xFF, 0xFF, 0xA1, 0xD9, 0x27, 0xF2, 0x12, 0x60,
-        0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43,
-        0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02,
-        0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B,
-        0x88, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x13, 0x02, 0x63, 0x46, 0x06, 0xF2, 0xFF, 0xFF,
-        0x02, 0xB0, 0x08, 0xBC, 0x0D, 0x03, 0x06, 0xFA, 0xE4, 0x60, 0x58, 0x4E, 0x9D, 0x78, 0xFF, 0xFF,
-        0x0F, 0x60, 0xE8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x6A, 0x01, 0x7E, 0xF1, 0xFF, 0xFF, 0x64, 0x41, 0x07, 0xB1, 0xFF, 0xFF, 0x08, 0x24, 0x67, 0x4C,
-        0x1B, 0x60, 0xC4, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x46, 0x5E, 0x1F, 0x60,
-        0xAA, 0x62, 0xA2, 0xD3, 0xC5, 0xFB, 0x65, 0xFB, 0x1F, 0x60, 0xB6, 0x63, 0xBD, 0xD1, 0xCB, 0xF9,
-        0x67, 0xF9, 0xBD, 0xD1, 0xCC, 0xF9, 0x68, 0xF9, 0xA3, 0xD1, 0xCD, 0xF9, 0x69, 0xF9, 0x01, 0x64,
-        0x6B, 0xFB, 0x31, 0x44, 0x21, 0xBC, 0x40, 0x51, 0x20, 0x44, 0x01, 0x65, 0x34, 0x80, 0x01, 0x64,
-        0x51, 0xFB, 0x21, 0x60, 0x50, 0x64, 0x52, 0xFB, 0x0F, 0x4E, 0xE8, 0x60, 0x58, 0x4F, 0x02, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0xC7, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0x0E, 0x57, 0x63, 0x46, 0x43, 0x47,
-        0x1E, 0xF2, 0x72, 0xF2, 0x02, 0x1B, 0x01, 0x1B, 0x0C, 0x00, 0x60, 0x46, 0x1B, 0x60, 0xDA, 0x64,
-        0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D, 0x75, 0x78, 0xFF, 0xFF, 0x27, 0x46, 0x72, 0xF2, 0xFF, 0xFF,
-        0xF4, 0x1B, 0x37, 0x58, 0xFF, 0xFF, 0x1B, 0x60, 0xAC, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8,
-        0x60, 0x46, 0x0E, 0xF2, 0x5B, 0x03, 0x60, 0x40, 0xF0, 0x37, 0x48, 0x00, 0xFF, 0x37, 0x3D, 0x00,
-        0xFD, 0x37, 0x35, 0x00, 0x18, 0x37, 0x29, 0x00, 0xFE, 0x37, 0x2C, 0x00, 0xF8, 0x37, 0x0A, 0x00,
-        0x60, 0x47, 0xFF, 0xB5, 0x0F, 0x60, 0xD0, 0x62, 0x46, 0xD1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x1B, 0x60, 0xDA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xD6, 0x01, 0x06, 0xB4, 0xFD, 0x7F, 0x0E, 0xFA,
-        0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xB2, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF9, 0xFE, 0xC6, 0x01, 0xDB, 0x60, 0x58, 0x4F, 0xB7, 0x78,
-        0xFF, 0xFF, 0x14, 0x00, 0xDE, 0x60, 0x58, 0x4F, 0x99, 0x78, 0xFF, 0xFF, 0xBC, 0x03, 0x23, 0xF0,
-        0x60, 0x40, 0x04, 0x26, 0xE2, 0x1B, 0x02, 0x26, 0xE0, 0x18, 0xA2, 0xFF, 0x02, 0xF0, 0x09, 0x60,
-        0x08, 0x64, 0xD0, 0x80, 0x90, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0x90, 0xFB, 0x1B, 0x60, 0xDA, 0x64,
-        0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D, 0x75, 0x78, 0xFF, 0xFF, 0xA5, 0x01, 0xAC, 0xFE, 0x09, 0x05,
-        0xAD, 0xFE, 0x10, 0x05, 0xAE, 0xFE, 0x9F, 0x05, 0xAF, 0xFE, 0x3A, 0x05, 0xC7, 0x60, 0x2E, 0x78,
-        0xFF, 0xFF, 0x0F, 0x60, 0xCE, 0x62, 0xA2, 0xD1, 0x20, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0xF4, 0x01, 0x10, 0x60, 0x02, 0x65, 0x03, 0x61, 0x07, 0x00, 0xA2, 0xDD, 0x58, 0x4F,
-        0x64, 0x58, 0xFF, 0xFF, 0x00, 0xB9, 0xFF, 0xFF, 0x08, 0x03, 0x00, 0x63, 0xA5, 0xD1, 0x5A, 0xD3,
-        0xDA, 0x85, 0x00, 0xA8, 0xCD, 0x81, 0xF2, 0x02, 0xF8, 0x02, 0xE0, 0x01, 0x0F, 0x60, 0xCC, 0x62,
-        0x0F, 0x60, 0xF2, 0x65, 0xE5, 0x60, 0x4E, 0x63, 0x00, 0x64, 0x5A, 0xDB, 0xD6, 0x80, 0xFF, 0xFF,
-        0x04, 0x03, 0x5A, 0xDB, 0x5A, 0xDB, 0x5A, 0xDD, 0xF9, 0x01, 0x10, 0x60, 0x00, 0x65, 0x00, 0x64,
-        0x5A, 0xDB, 0xD6, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x5A, 0xDD, 0xFB, 0x01, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xD0, 0x64, 0x40, 0x41, 0x0F, 0x60, 0xCE, 0x63, 0xA3, 0xD1, 0x00, 0x64, 0xD0, 0x80,
-        0x06, 0x61, 0x08, 0x03, 0xBD, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0xB0, 0x84, 0xCD, 0x81, 0xA3, 0xDB,
-        0x06, 0xA3, 0xF9, 0x02, 0x0F, 0x60, 0xF4, 0x63, 0xA3, 0xD1, 0x00, 0x64, 0xD0, 0x80, 0x07, 0x61,
-        0x19, 0x03, 0xBD, 0xDB, 0x64, 0x44, 0xFE, 0xA3, 0x02, 0xA3, 0xCD, 0x81, 0xE8, 0x84, 0xE3, 0x03,
-        0x02, 0x05, 0xE1, 0x03, 0xF9, 0x01, 0x78, 0xFB, 0x7A, 0xFD, 0x61, 0x5C, 0xA3, 0xD3, 0x79, 0xF9,
-        0x03, 0x18, 0x58, 0x4F, 0x60, 0x58, 0xFF, 0xFF, 0x7A, 0xF3, 0x79, 0xF1, 0x60, 0x43, 0x78, 0xF3,
-        0x64, 0x41, 0xEA, 0x01, 0x21, 0x43, 0x0F, 0x60, 0xF4, 0x65, 0xD7, 0x80, 0xBD, 0xD1, 0xBD, 0xD3,
-        0x03, 0x02, 0xC7, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0xA0, 0x84, 0xBD, 0xD1, 0x43, 0x41, 0xF5, 0x03,
-        0xE5, 0x60, 0x53, 0x64, 0x64, 0x58, 0x40, 0x4F, 0x2A, 0xF0, 0x83, 0x60, 0xFF, 0x65, 0x64, 0x47,
-        0x03, 0x2B, 0x01, 0x00, 0x17, 0x00, 0x03, 0x26, 0x03, 0xAC, 0x60, 0x47, 0xA4, 0x84, 0x2A, 0xFA,
-        0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x64, 0x41, 0xCB, 0xF3,
-        0x2F, 0xFA, 0x60, 0x43, 0xCC, 0xF3, 0x30, 0xFA, 0xCD, 0xF1, 0x31, 0xF8, 0x32, 0xFC, 0x33, 0xFA,
-        0x34, 0xF8, 0x19, 0x00, 0x60, 0x47, 0xA4, 0x84, 0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2,
-        0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x36, 0xF2, 0x32, 0xFA, 0x37, 0xF2, 0x33, 0xFA, 0x38, 0xF2,
-        0x34, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0x36, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0x37, 0xFA, 0xCD, 0xF3,
-        0x31, 0xFA, 0x38, 0xFA, 0x64, 0x41, 0x1C, 0xF2, 0x13, 0xFA, 0x00, 0xF4, 0x0D, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x80, 0x2B, 0x29, 0x00, 0x26, 0x46, 0x04, 0x63, 0x03, 0xFC, 0x00, 0xF4, 0x0D, 0xF2,
-        0x06, 0xFA, 0xE6, 0x60, 0x58, 0x4E, 0xF4, 0x78, 0xFF, 0xFF, 0xFF, 0xA0, 0x59, 0xF5, 0x1A, 0x02,
-        0x39, 0xF2, 0x26, 0x46, 0x3F, 0xFA, 0x00, 0xF4, 0x00, 0x60, 0x81, 0x67, 0x0D, 0xFA, 0x7C, 0x64,
-        0x01, 0xFA, 0x26, 0x46, 0x00, 0x64, 0x3E, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x9A, 0x64,
-        0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE,
-        0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xF0, 0x42, 0x64, 0xD0, 0x80,
-        0xFF, 0xFF, 0x01, 0x04, 0x3F, 0xFA, 0x1C, 0xF2, 0x13, 0xFA, 0x26, 0xF2, 0x27, 0xF0, 0x60, 0x47,
-        0x00, 0xF4, 0x1F, 0xFA, 0x64, 0x47, 0x20, 0xFA, 0x61, 0x44, 0x21, 0xFA, 0x01, 0x67, 0x0D, 0xFA,
-        0x10, 0x61, 0x1F, 0x60, 0x6C, 0x64, 0x1E, 0x63, 0x58, 0xD1, 0xCD, 0x81, 0xBD, 0xD8, 0xFC, 0x02,
-        0x9B, 0xF1, 0xB8, 0xF1, 0x64, 0x5E, 0x64, 0x5F, 0x44, 0x63, 0xBD, 0xDA, 0x1F, 0x60, 0x66, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x09, 0xBC, 0x4A, 0xD3, 0x60, 0x45,
-        0x60, 0x40, 0x01, 0x36, 0x03, 0x64, 0x02, 0x36, 0x01, 0x64, 0xB4, 0x84, 0x06, 0xA2, 0xA2, 0xD1,
-        0xBD, 0xDA, 0x64, 0x47, 0xBD, 0xDA, 0xB5, 0xF3, 0xB6, 0xF1, 0x60, 0x47, 0xBD, 0xDA, 0x64, 0x47,
-        0xC3, 0xF1, 0xBD, 0xDA, 0x64, 0x44, 0xBD, 0xDA, 0x26, 0x46, 0x00, 0x64, 0x23, 0xF0, 0x3B, 0xF0,
-        0x64, 0x40, 0x10, 0x2A, 0x06, 0x00, 0xC0, 0x67, 0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0x10, 0xBC, 0x3E, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0x9A, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x04, 0x60, 0x5C, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x59, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x2F, 0x58, 0xFF, 0xFF, 0x59, 0xF5, 0xAC, 0xF1,
-        0x19, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x08, 0x64, 0x2A, 0xFA, 0x80, 0x7E, 0xF8, 0x7F, 0x0E, 0xFA,
-        0x88, 0xF1, 0x07, 0xF8, 0x01, 0x60, 0x60, 0x67, 0x2C, 0xFA, 0x1D, 0x60, 0x00, 0x67, 0x2D, 0xFA,
-        0x01, 0x60, 0x00, 0x67, 0x2E, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8, 0x32, 0xF8, 0xCC, 0xF1, 0x30, 0xF8,
-        0x33, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x34, 0xF8, 0x00, 0x63, 0x3B, 0xFC, 0x3D, 0xFC, 0x01, 0x64,
-        0x3A, 0xFA, 0x66, 0x64, 0x39, 0xFA, 0x3C, 0xFC, 0xAA, 0x60, 0xAA, 0x64, 0x00, 0xF4, 0x02, 0xFA,
-        0x00, 0x60, 0x03, 0x64, 0x5A, 0xDA, 0x1D, 0x60, 0x60, 0x64, 0x5A, 0xDA, 0x01, 0x60, 0x00, 0x64,
-        0x5A, 0xDA, 0x82, 0x7F, 0x24, 0x7E, 0x08, 0xFA, 0x01, 0x60, 0x01, 0x64, 0x0A, 0xFA, 0x00, 0x64,
-        0x0E, 0xFA, 0x2D, 0x58, 0xFF, 0xFF, 0x59, 0xF5, 0x3D, 0xF2, 0x3C, 0xF2, 0xCC, 0x83, 0x00, 0xA8,
-        0x03, 0x03, 0x08, 0x28, 0x3D, 0xFC, 0x45, 0x00, 0x3D, 0xFA, 0x3A, 0xF2, 0x3B, 0xF0, 0x00, 0x63,
-        0x00, 0xF4, 0x07, 0xFC, 0x01, 0xB0, 0x0B, 0xFA, 0x1A, 0x03, 0x1F, 0xF8, 0xFF, 0xFF, 0x1B, 0x60,
-        0xDA, 0x62, 0x18, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x1F, 0xF2, 0x1E, 0xF0, 0x59, 0xF5, 0x00, 0xA8, 0x3B, 0xF8, 0xD0, 0x80, 0x06, 0x03,
-        0x05, 0x03, 0x04, 0x60, 0x5C, 0x63, 0x0F, 0x64, 0x3A, 0xFA, 0x39, 0xFC, 0x00, 0xF4, 0x00, 0x64,
-        0x06, 0xFA, 0xE6, 0x60, 0x58, 0x4E, 0xF4, 0x78, 0xFF, 0xFF, 0x59, 0xF5, 0x00, 0xF4, 0x81, 0x60,
-        0x00, 0x64, 0x06, 0xFA, 0x32, 0x47, 0x04, 0xBC, 0x07, 0xFA, 0xB8, 0xF1, 0x00, 0x7F, 0x64, 0x5E,
-        0x09, 0xFA, 0x59, 0xF5, 0x00, 0x64, 0x15, 0xFA, 0x39, 0xF2, 0x3F, 0xFA, 0x1B, 0x60, 0xDA, 0x62,
-        0x1B, 0x60, 0x88, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xE1, 0x60, 0x0D, 0x78, 0xFF, 0xFF, 0x66, 0x45, 0x0E, 0xF2, 0x0F, 0xF0, 0x10, 0xF0,
-        0x64, 0x41, 0x01, 0xA8, 0x59, 0xF5, 0x09, 0x02, 0xAD, 0x83, 0x64, 0x44, 0xAC, 0x84, 0x08, 0x24,
-        0x0A, 0x63, 0x3C, 0xFC, 0x3D, 0xFC, 0x1A, 0x02, 0x2D, 0x00, 0x03, 0x3A, 0x03, 0x00, 0x00, 0x64,
-        0x3C, 0xFA, 0x29, 0x00, 0x04, 0x3A, 0x09, 0x00, 0x0A, 0x64, 0x3C, 0xFA, 0x01, 0x64, 0x3A, 0xFA,
-        0x00, 0xF4, 0x00, 0x64, 0x1F, 0xFA, 0x1E, 0xFA, 0x1E, 0x00, 0x02, 0x3A, 0x1E, 0x00, 0x64, 0x44,
-        0xAD, 0x83, 0xAC, 0x84, 0x02, 0x03, 0x3C, 0xFC, 0x3D, 0xFC, 0x15, 0x03, 0x3A, 0xFA, 0xF8, 0x65,
-        0x52, 0x63, 0x64, 0x44, 0x01, 0x36, 0x0D, 0x00, 0x12, 0xA3, 0x64, 0x40, 0x02, 0x2A, 0x02, 0x00,
-        0xC7, 0x83, 0xC7, 0x83, 0x64, 0x40, 0x08, 0x2A, 0x01, 0x00, 0xC7, 0x83, 0x64, 0x40, 0x04, 0x26,
-        0xC7, 0x83, 0x39, 0xFC, 0x00, 0x64, 0x2E, 0x58, 0xFF, 0xFF, 0x3B, 0xF0, 0x3A, 0xF2, 0x65, 0x46,
-        0x06, 0xF2, 0x40, 0x47, 0x1D, 0x18, 0x32, 0x47, 0x07, 0xFA, 0x24, 0x7E, 0x82, 0x7F, 0x08, 0xFA,
-        0x01, 0x60, 0x01, 0x63, 0xB8, 0xF3, 0x0A, 0xFC, 0x00, 0x7F, 0x09, 0xFA, 0x27, 0x40, 0x01, 0x2A,
-        0x0F, 0x00, 0x1F, 0xF8, 0x1B, 0x60, 0xDA, 0x62, 0x18, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x1E, 0xF0, 0x59, 0xF5, 0x3B, 0xF8, 0x65, 0x46,
-        0x27, 0x40, 0x02, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x13, 0x00, 0x6E, 0x61, 0xFF, 0x60, 0xFE, 0x64,
-        0x00, 0x60, 0x0E, 0x63, 0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F, 0x01, 0x60, 0xEE, 0x63, 0x00, 0xF4,
-        0x02, 0x61, 0x58, 0xD1, 0x59, 0xD8, 0x7E, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x02, 0x61, 0xF9, 0x1F,
-        0x27, 0x40, 0x04, 0x26, 0x1B, 0x00, 0x46, 0x4B, 0x1B, 0x60, 0x88, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x0E, 0x03, 0x89, 0xF0, 0xE7, 0x60, 0x58, 0x4D, 0xAE, 0x78, 0xFF, 0xFF,
-        0x65, 0x44, 0xAC, 0x86, 0xFF, 0xFF, 0x08, 0x03, 0xE7, 0x60, 0x58, 0x4D, 0xAE, 0x78, 0xFF, 0xFF,
-        0x04, 0x00, 0x2B, 0x46, 0x82, 0xFC, 0x00, 0xF4, 0x82, 0xFC, 0x00, 0xF4, 0x27, 0x40, 0x08, 0x26,
-        0x1A, 0x00, 0x46, 0x4B, 0x1B, 0x60, 0xC4, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x0E, 0x03, 0x89, 0xF0, 0xE7, 0x60, 0x58, 0x4D, 0xAE, 0x78, 0xFF, 0xFF, 0x65, 0x44, 0xAC, 0x86,
-        0xFF, 0xFF, 0x08, 0x03, 0xE7, 0x60, 0x58, 0x4D, 0xAE, 0x78, 0xFF, 0xFF, 0x04, 0x00, 0x65, 0x46,
-        0x02, 0xFA, 0x00, 0xF4, 0x82, 0xFC, 0x01, 0x64, 0x2E, 0x58, 0xFF, 0xFF, 0x01, 0x61, 0x02, 0x64,
-        0x7A, 0x63, 0x58, 0xD0, 0xAB, 0x46, 0xA0, 0xD8, 0xAB, 0x46, 0xFB, 0x1F, 0xAB, 0x46, 0x00, 0xF4,
-        0xCD, 0x81, 0xAB, 0x46, 0x00, 0xF4, 0xF3, 0x02, 0x2D, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0x2A, 0x61,
-        0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x58, 0xFB, 0x04, 0x64, 0x03, 0xFA,
-        0x67, 0x44, 0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0x32, 0xFA, 0x33, 0xFA, 0x34, 0xFA, 0x12, 0x60,
-        0x80, 0x64, 0x88, 0xF1, 0x0E, 0xFA, 0x07, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x11, 0x60, 0xD8, 0x63,
-        0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x08, 0x64, 0xBD, 0xDB, 0x04, 0x64, 0xBD, 0xDB, 0x06, 0x64,
-        0xA3, 0xDB, 0x10, 0x60, 0x06, 0x62, 0xEA, 0x60, 0x08, 0x64, 0xA2, 0xDB, 0x11, 0x60, 0xE4, 0x63,
-        0x00, 0x64, 0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x0C, 0x64, 0xBD, 0xDB, 0x08, 0x64, 0xBD, 0xDB,
-        0x06, 0x64, 0xA3, 0xDB, 0x10, 0x60, 0x0A, 0x62, 0xEA, 0x60, 0x12, 0x64, 0xA2, 0xDB, 0x0F, 0x60,
-        0xFC, 0x62, 0xE9, 0x60, 0xF2, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x25, 0x60, 0x2A, 0x62, 0xA2, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x58, 0xF5, 0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1,
-        0x31, 0xF8, 0xAC, 0xF1, 0x19, 0xF8, 0xEA, 0x60, 0x58, 0x4E, 0x1C, 0x78, 0xFF, 0xFF, 0x30, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x16, 0x60, 0xCC, 0x61,
-        0xA1, 0xD3, 0xFF, 0xFF, 0x59, 0x18, 0x58, 0xF5, 0x40, 0x64, 0x2A, 0xFA, 0x52, 0xF3, 0x00, 0xF4,
-        0x60, 0x43, 0xBD, 0xD1, 0x04, 0x65, 0x64, 0x47, 0xA5, 0xDA, 0x64, 0x41, 0xDD, 0x81, 0xE9, 0x81,
-        0x62, 0x44, 0x04, 0x03, 0xBD, 0xD1, 0xCD, 0x81, 0x58, 0xD8, 0xFC, 0x02, 0x58, 0x8B, 0x21, 0x60,
-        0x8E, 0x63, 0xA3, 0xD1, 0x2B, 0x44, 0xC8, 0x84, 0x64, 0x41, 0xFF, 0xB1, 0x61, 0x45, 0x03, 0xA1,
-        0xE9, 0x81, 0x41, 0x4C, 0xBD, 0xD1, 0xCD, 0x81, 0x58, 0xD8, 0xFC, 0x02, 0x2B, 0xD2, 0x2B, 0x43,
-        0x60, 0x47, 0x01, 0x7E, 0x52, 0xF1, 0xA3, 0xDA, 0xA4, 0xD3, 0xCB, 0x83, 0x44, 0x8B, 0xF8, 0x84,
-        0x2C, 0x41, 0x0C, 0x04, 0xBE, 0xD2, 0xFF, 0xFF, 0x60, 0x47, 0xBE, 0xDA, 0x00, 0x7E, 0xA3, 0xD2,
-        0x60, 0x45, 0x00, 0x7F, 0xB4, 0x84, 0xCD, 0x81, 0xBD, 0xDA, 0xF4, 0x02, 0x58, 0xF5, 0x2B, 0x44,
-        0x04, 0xA4, 0x3F, 0xFA, 0x65, 0xF3, 0x64, 0xFB, 0x16, 0x60, 0xCE, 0x61, 0x01, 0x64, 0x52, 0xF1,
-        0xA1, 0xDB, 0x65, 0xFB, 0xA4, 0xD3, 0x04, 0x65, 0x51, 0xF3, 0x01, 0x18, 0x0C, 0x65, 0xF3, 0xB4,
-        0xB4, 0x84, 0x51, 0xFB, 0x02, 0xB0, 0xFF, 0xFF, 0x16, 0x03, 0x65, 0xF3, 0xFF, 0xFF, 0x60, 0x47,
-        0x0F, 0xB4, 0x65, 0xFB, 0x01, 0x03, 0x0F, 0x00, 0xE9, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0x51, 0xF1,
-        0x65, 0xF3, 0x64, 0x40, 0x02, 0x26, 0xF8, 0x01, 0xF3, 0xA0, 0x04, 0xA4, 0x01, 0x04, 0xF1, 0xA4,
-        0x10, 0x36, 0xF2, 0x01, 0x65, 0xFB, 0x65, 0xF3, 0x16, 0x60, 0xCC, 0x61, 0xA1, 0xD1, 0xCC, 0x84,
-        0x01, 0x61, 0x08, 0x24, 0x03, 0x00, 0xE1, 0x81, 0xCC, 0x84, 0xFB, 0x01, 0xA1, 0x84, 0x51, 0xF1,
-        0xE7, 0x03, 0x16, 0x60, 0xCE, 0x61, 0xA1, 0xDB, 0x00, 0x00, 0x65, 0xF3, 0x01, 0x61, 0xCC, 0x84,
-        0xFF, 0xFF, 0x02, 0x03, 0xE1, 0x81, 0xFB, 0x01, 0x9A, 0xF3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF,
-        0xD7, 0x03, 0x31, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xE4, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xE8, 0x60,
-        0x95, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x65, 0xF1, 0x1C, 0x60, 0x00, 0x62,
-        0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xE4, 0x62, 0x20, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xE8, 0x60, 0xC8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0xBE, 0xFE, 0x0F, 0x60, 0xCE, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x58, 0xF5, 0x1B, 0x60, 0xDA, 0x62,
-        0x1B, 0x60, 0x8E, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x00, 0x64, 0x4F, 0xFB, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB,
-        0xE8, 0x60, 0xF2, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x33, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x34, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xA6, 0xF1, 0x11, 0x60, 0xDC, 0x62, 0xA2, 0xD9, 0x1C, 0x60, 0x10, 0x62, 0x11, 0x60,
-        0xD8, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xA7, 0xF1, 0x11, 0x60,
-        0xE8, 0x62, 0xA2, 0xD9, 0x1C, 0x60, 0x0E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xFD, 0x1B, 0x1C, 0x60,
-        0x10, 0x62, 0x11, 0x60, 0xE4, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x0F, 0x60, 0xE4, 0x62, 0x00, 0x60, 0x08, 0x64, 0xA2, 0xDB, 0xE9, 0x60, 0x23, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x4F, 0xF1, 0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x64, 0x40, 0xFF, 0x26, 0x03, 0x00, 0xE8, 0x60, 0x77, 0x78, 0xFF, 0xFF, 0x02, 0x0A, 0x00, 0x64,
-        0x4F, 0xFB, 0xA8, 0xF1, 0x11, 0x60, 0xE8, 0x62, 0xA2, 0xD9, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x60,
-        0x0C, 0x64, 0xA2, 0xDB, 0xE9, 0x60, 0x49, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x1C, 0x60, 0x10, 0x62,
-        0x11, 0x60, 0xE4, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xE2, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x0C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x10, 0x62, 0x11, 0x60, 0xE4, 0x64, 0xA2, 0xDB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x14, 0x00, 0xFF, 0x60, 0xF7, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x4F, 0xF3, 0xDB, 0x0A, 0x00, 0xA0, 0x00, 0x64, 0x02, 0x03, 0x4F, 0xFB, 0xD6, 0x01,
-        0x1C, 0x60, 0x10, 0x62, 0x11, 0x60, 0xD8, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0xE8, 0x60, 0x77, 0x78, 0xFF, 0xFF, 0x35, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x1C, 0x60,
-        0x10, 0x62, 0x11, 0x60, 0xD8, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x51, 0xF3, 0xFF, 0xFF, 0xE3, 0xB4, 0x51, 0xFB, 0x16, 0x60, 0xCA, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xFE, 0xB4, 0xA2, 0xDB, 0x00, 0x64, 0x25, 0x60, 0x2A, 0x62, 0xA2, 0xDB, 0x0F, 0x60, 0xE2, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0E, 0x04, 0x32, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60,
-        0xE4, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xE9, 0x60, 0x8E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x64, 0xF1, 0x65, 0xF9, 0x1C, 0x60, 0x00, 0x62, 0xA2, 0xD9, 0x1E, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xE4, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0xE9, 0x60, 0xB6, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x0F, 0x60,
-        0xCE, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60,
-        0xCE, 0x62, 0xA2, 0xD1, 0x10, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x60,
-        0x04, 0x61, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x23, 0xFA, 0xF1, 0x60,
-        0x02, 0x64, 0x24, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xCA, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0xEA, 0x60, 0x58, 0x4E,
-        0x2E, 0x78, 0xFF, 0xFF, 0x20, 0x44, 0x01, 0xB5, 0x54, 0x80, 0x31, 0x44, 0xDE, 0xB4, 0x40, 0x51,
-        0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x3E, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x3F, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x1C, 0x60, 0x10, 0x62, 0x11, 0x60,
-        0xD8, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x51, 0xFB,
-        0x0F, 0x60, 0xE2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0xBE, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xE2, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xE2, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x66, 0x01, 0x60, 0x7A, 0x61, 0x16, 0x60,
-        0xC4, 0x63, 0xA1, 0xD3, 0xFF, 0xFF, 0x20, 0x7F, 0xBD, 0xDB, 0x21, 0x60, 0x32, 0x64, 0xBD, 0xDB,
-        0x04, 0xA1, 0xA1, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x10, 0x00, 0x01, 0x60, 0x7A, 0x61,
-        0x16, 0x60, 0xC4, 0x63, 0xA1, 0xD3, 0x00, 0x66, 0x20, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF,
-        0x21, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60, 0xE2, 0x62,
-        0xA2, 0xD1, 0x9F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60,
-        0xE4, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xEA, 0x60, 0x3E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x00, 0x62, 0x16, 0x60, 0xC2, 0x64, 0xA2, 0xDB, 0x20, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xE4, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0xEA, 0x60, 0x66, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xE2, 0x62,
-        0xA2, 0xD1, 0x9F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xCE, 0x62,
-        0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2E, 0x58, 0xFF, 0xFF,
-        0x5F, 0xFB, 0xAC, 0x85, 0x60, 0x41, 0x20, 0x03, 0x01, 0x60, 0x00, 0x63, 0x08, 0x64, 0xE9, 0x81,
-        0xCC, 0x84, 0x02, 0x24, 0xDF, 0x83, 0xFB, 0x02, 0x21, 0x60, 0x8E, 0x64, 0xA0, 0xDD, 0x65, 0x41,
-        0x21, 0x60, 0x90, 0x63, 0x0F, 0x60, 0xC0, 0x64, 0xE9, 0x81, 0x58, 0xD1, 0xFD, 0x04, 0xA3, 0xD9,
-        0x0B, 0x03, 0x58, 0xD1, 0xE9, 0x81, 0x60, 0x45, 0xFC, 0x04, 0xA3, 0xD1, 0x64, 0x47, 0xB0, 0x84,
-        0xBD, 0xDB, 0x00, 0xB9, 0x65, 0x44, 0xF0, 0x02, 0x20, 0x60, 0x38, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x01, 0xA8, 0x01, 0x60, 0x70, 0x62, 0x06, 0x02, 0xA2, 0xD3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF,
-        0x01, 0x03, 0x02, 0x64, 0x60, 0x41, 0x21, 0x60, 0x8E, 0x63, 0xBD, 0xD3, 0xA3, 0xD3, 0xFF, 0xB5,
-        0x80, 0xBF, 0xCD, 0x81, 0x65, 0x5C, 0x0F, 0x03, 0x80, 0xBF, 0xBD, 0xDB, 0x65, 0x44, 0xC8, 0x84,
-        0xFF, 0xFF, 0x0C, 0x03, 0x60, 0x45, 0xCD, 0x81, 0xA3, 0xD3, 0x08, 0x03, 0x80, 0xBF, 0xCD, 0x81,
-        0xFF, 0xFF, 0x01, 0x03, 0x80, 0xBC, 0x60, 0x47, 0xBD, 0xDB, 0x00, 0x65, 0x64, 0x41, 0x21, 0x60,
-        0x90, 0x63, 0xBD, 0xD3, 0xFF, 0xFF, 0x80, 0xB0, 0xFF, 0xFF, 0x01, 0x03, 0x60, 0x45, 0x60, 0x47,
-        0x80, 0xB0, 0xFF, 0xFF, 0x01, 0x03, 0x60, 0x45, 0xCD, 0x81, 0xFF, 0xFF, 0xF2, 0x02, 0x65, 0x44,
-        0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x0A, 0x64, 0x15, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x14, 0x64,
-        0x11, 0x00, 0x0A, 0x3A, 0x02, 0x00, 0x32, 0x64, 0x0D, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x37, 0x64,
-        0x09, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x50, 0x64, 0x05, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x6E, 0x64,
-        0x01, 0x00, 0x14, 0x64, 0x62, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x3C, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x31, 0x40, 0x20, 0x2A, 0x18, 0x00, 0x3F, 0xF2, 0x47, 0x65, 0xC4, 0x84, 0xE8, 0x84, 0x23, 0xFA,
-        0xF1, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x1B, 0x60, 0xDA, 0x62, 0x1B, 0x60, 0xCA, 0x64, 0xA2, 0xDB,
-        0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x00, 0x66,
-        0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x0C, 0x63, 0x12, 0x60,
-        0xB6, 0x62, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x53, 0xFB, 0x54, 0xFB, 0x12, 0x60, 0xBA, 0x63,
-        0x02, 0x64, 0xA3, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0x12, 0x60, 0xBE, 0x62, 0xA2, 0xD3, 0x00, 0x63,
-        0xF0, 0xA0, 0x01, 0xA4, 0x03, 0x03, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0xA2, 0xDD, 0x12, 0x60,
-        0xC0, 0x62, 0xA2, 0xD1, 0xA2, 0xDD, 0x5A, 0xD3, 0xA2, 0xDD, 0xC0, 0x81, 0x61, 0x44, 0x02, 0x24,
-        0xFF, 0xFF, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0x5A, 0xD3, 0xE9, 0x81, 0xE8, 0x83,
-        0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x85, 0xD4, 0x85, 0xC5, 0x83, 0xA2, 0xDD, 0x12, 0x60,
-        0xB8, 0x62, 0x63, 0x47, 0x00, 0x7F, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0x03, 0xE1, 0xA3, 0xFF,
-        0x1B, 0x60, 0x5A, 0x63, 0x17, 0xFD, 0xAE, 0xFF, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0x7F, 0x67,
-        0x01, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0xB1, 0xFE, 0x05, 0x05, 0xB0, 0xFE, 0x06, 0x05, 0xB2, 0xFE,
-        0xB3, 0xFE, 0x22, 0x00, 0xF0, 0x60, 0xFA, 0x78, 0xFF, 0xFF, 0x28, 0xF3, 0x29, 0xF1, 0x40, 0x44,
-        0x44, 0x45, 0x2A, 0xF1, 0x2B, 0xF1, 0x44, 0x46, 0x44, 0x47, 0x3F, 0xB4, 0xE0, 0x85, 0x16, 0x60,
-        0xD2, 0x64, 0x44, 0xD7, 0x58, 0x43, 0xFF, 0xFF, 0x60, 0x45, 0x12, 0x60, 0xC8, 0x7C, 0xA4, 0xD3,
-        0x61, 0x43, 0x04, 0xB4, 0x24, 0x44, 0x02, 0x03, 0x13, 0xFF, 0x06, 0x00, 0x3F, 0xB4, 0xB4, 0x84,
-        0xFF, 0x27, 0x05, 0xFD, 0x04, 0xFB, 0x10, 0x75, 0xA1, 0xFF, 0xFF, 0xFF, 0x86, 0x3E, 0xB4, 0xFE,
-        0x09, 0x05, 0xB5, 0xFE, 0x02, 0x24, 0x80, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xFE, 0x05, 0x05,
-        0xB6, 0xFE, 0xF2, 0x01, 0xF1, 0x60, 0x35, 0x78, 0xFF, 0xFF, 0x36, 0x44, 0x00, 0x7F, 0xF4, 0xA0,
-        0x60, 0x45, 0x05, 0x05, 0x17, 0x60, 0x5E, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x01,
-        0xE3, 0x01, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x10, 0x02,
-        0x10, 0x64, 0x40, 0x40, 0x02, 0x64, 0x40, 0x50, 0x61, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x04, 0x00,
-        0x10, 0xE0, 0x46, 0x60, 0x09, 0xE0, 0x00, 0x00, 0x27, 0xF1, 0x00, 0x66, 0x20, 0x78, 0x42, 0xFE,
-        0x23, 0x58, 0xFF, 0xFF, 0x78, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61,
-        0x1C, 0x02, 0x12, 0x60, 0xC8, 0x63, 0xA3, 0xD3, 0x07, 0x7C, 0x20, 0xB5, 0x0C, 0xB5, 0x04, 0x03,
-        0x03, 0x02, 0xBC, 0xF9, 0x00, 0x67, 0x11, 0x00, 0x00, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0xB4, 0x01,
-        0x36, 0x47, 0xFF, 0x23, 0x04, 0x00, 0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x06, 0x00, 0x04, 0x7C,
-        0xBC, 0xF9, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x78, 0x60,
-        0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x31, 0x02, 0x12, 0x60, 0xC8, 0x63,
-        0xA3, 0xD3, 0x01, 0x7C, 0x20, 0xB5, 0x0C, 0xB5, 0x03, 0x03, 0x02, 0x02, 0xBC, 0xF9, 0xFF, 0xFF,
-        0x02, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0x7E, 0xF1, 0x20, 0x44,
-        0x64, 0x40, 0xFF, 0x26, 0x1B, 0x00, 0x7F, 0xB4, 0x40, 0x40, 0x5C, 0x5E, 0x82, 0xFF, 0x26, 0x44,
-        0xFD, 0xB4, 0x40, 0x46, 0x5C, 0x41, 0x87, 0xFF, 0x62, 0xFF, 0x00, 0x63, 0x1B, 0x60, 0xC4, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x04, 0x03, 0x09, 0xF2, 0x0F, 0xFC, 0xAC, 0x86,
-        0xFB, 0x01, 0x1C, 0x60, 0x04, 0x62, 0x06, 0x64, 0xA2, 0xDB, 0x2D, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x25, 0x46, 0x01, 0xF2, 0x08, 0xF0, 0x60, 0x47, 0x03, 0xB4, 0x03, 0xAC, 0x7F, 0x67,
-        0x03, 0x61, 0x08, 0x02, 0x1B, 0x60, 0xE0, 0x64, 0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D, 0x75, 0x78,
-        0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x2B, 0x49, 0x00, 0x25, 0x44,
-        0x1F, 0xB4, 0xE0, 0x85, 0xEC, 0x60, 0x36, 0x64, 0xC4, 0x98, 0xFF, 0xFF, 0xC0, 0xFE, 0x3D, 0x00,
-        0xC1, 0xFE, 0x3B, 0x00, 0xC2, 0xFE, 0x39, 0x00, 0xC3, 0xFE, 0x37, 0x00, 0xC4, 0xFE, 0x35, 0x00,
-        0xC5, 0xFE, 0x33, 0x00, 0xC6, 0xFE, 0x31, 0x00, 0xC7, 0xFE, 0x2F, 0x00, 0xC8, 0xFE, 0x2D, 0x00,
-        0xC9, 0xFE, 0x2B, 0x00, 0xCA, 0xFE, 0x29, 0x00, 0xCB, 0xFE, 0x27, 0x00, 0xCC, 0xFE, 0x25, 0x00,
-        0xCD, 0xFE, 0x23, 0x00, 0xCE, 0xFE, 0x21, 0x00, 0xCF, 0xFE, 0x1F, 0x00, 0xD0, 0xFE, 0x1D, 0x00,
-        0xD1, 0xFE, 0x1B, 0x00, 0xD2, 0xFE, 0x19, 0x00, 0xD3, 0xFE, 0x17, 0x00, 0xD4, 0xFE, 0x15, 0x00,
-        0xD5, 0xFE, 0x13, 0x00, 0xD6, 0xFE, 0x11, 0x00, 0xD7, 0xFE, 0x0F, 0x00, 0xD8, 0xFE, 0x0D, 0x00,
-        0xD9, 0xFE, 0x0B, 0x00, 0xDA, 0xFE, 0x09, 0x00, 0xDB, 0xFE, 0x07, 0x00, 0xDC, 0xFE, 0x05, 0x00,
-        0xDD, 0xFE, 0x03, 0x00, 0xDE, 0xFE, 0x01, 0x00, 0xDF, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x00, 0x64, 0x9F, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9D, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x9C, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x9A, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x99, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x98, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x97, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x96, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x95, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x94, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x93, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x92, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x91, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x90, 0xFE, 0xF0, 0x84,
-        0x06, 0xFB, 0x8F, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8D, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x8C, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x8A, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x89, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x88, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x87, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x86, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x85, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x84, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x83, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x82, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x81, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x80, 0xFE, 0xF0, 0x84,
-        0x05, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x5C, 0x5C, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x24, 0x40, 0x01, 0x27, 0x55, 0x00, 0x05, 0x60, 0x00, 0x63, 0x05, 0xFD, 0x30, 0x44, 0xBD, 0xDB,
-        0x31, 0x44, 0xBD, 0xDB, 0x32, 0x44, 0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB,
-        0x35, 0x44, 0xBD, 0xDB, 0x36, 0x44, 0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB,
-        0x39, 0x44, 0xBD, 0xDB, 0x3A, 0x44, 0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB,
-        0x3D, 0x44, 0xBD, 0xDB, 0x3E, 0x44, 0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0x02, 0x61, 0x61, 0x44,
-        0x02, 0x36, 0x82, 0xFF, 0x03, 0x36, 0x83, 0xFF, 0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF,
-        0x06, 0x36, 0x86, 0xFF, 0x07, 0x36, 0x87, 0xFF, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB,
-        0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB,
-        0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB,
-        0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB,
-        0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB, 0xDD, 0x81, 0x08, 0x3A, 0xD0, 0x01, 0x54, 0x00,
-        0x27, 0x40, 0x10, 0x26, 0x30, 0x00, 0x26, 0x44, 0x01, 0x36, 0x2D, 0x00, 0x02, 0x36, 0x82, 0xFF,
-        0x03, 0x36, 0x83, 0xFF, 0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF, 0x06, 0x36, 0x86, 0xFF,
-        0x25, 0x44, 0x00, 0x36, 0x44, 0x40, 0x01, 0x36, 0x44, 0x41, 0x02, 0x36, 0x44, 0x42, 0x03, 0x36,
-        0x44, 0x43, 0x04, 0x36, 0x44, 0x44, 0x05, 0x36, 0x44, 0x45, 0x06, 0x36, 0x44, 0x46, 0x07, 0x36,
-        0x44, 0x47, 0x08, 0x36, 0x44, 0x48, 0x09, 0x36, 0x44, 0x49, 0x0A, 0x36, 0x44, 0x4A, 0x0B, 0x36,
-        0x44, 0x4B, 0x0C, 0x36, 0x44, 0x4C, 0x0D, 0x36, 0x44, 0x4D, 0x0E, 0x36, 0x44, 0x4E, 0x0F, 0x36,
-        0x44, 0x4F, 0x87, 0xFF, 0x21, 0x00, 0x25, 0x44, 0x10, 0x36, 0x44, 0x50, 0x11, 0x36, 0x44, 0x51,
-        0x12, 0x36, 0x44, 0x52, 0x13, 0x36, 0x44, 0x53, 0x14, 0x36, 0x44, 0x54, 0x15, 0x36, 0x44, 0x55,
-        0x16, 0x36, 0x44, 0x56, 0x17, 0x36, 0x44, 0x57, 0x18, 0x36, 0x44, 0x58, 0x19, 0x36, 0x44, 0x59,
-        0x1A, 0x36, 0x44, 0x5A, 0x1B, 0x36, 0x44, 0x5B, 0x1C, 0x36, 0x44, 0x5C, 0x1D, 0x36, 0x44, 0x5D,
-        0x1E, 0x36, 0x44, 0x5E, 0x1F, 0x36, 0x44, 0x5F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0x46,
-        0xB3, 0x60, 0x58, 0x4F, 0x22, 0x78, 0xFF, 0xFF, 0x03, 0x61, 0x7F, 0x67, 0x0B, 0x02, 0x00, 0xF0,
-        0x1B, 0x60, 0xE0, 0x62, 0x04, 0x64, 0xA2, 0xDB, 0x5A, 0xD9, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x7F, 0x67, 0x02, 0x61, 0x11, 0x02, 0x1C, 0x60, 0x04, 0x62, 0x1A, 0x64, 0xA2, 0xDB, 0x00, 0x60,
-        0x50, 0x63, 0x5A, 0xDD, 0xED, 0x60, 0xB9, 0x64, 0x80, 0xFB, 0x2D, 0xFF, 0xEB, 0x60, 0x84, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF3, 0x05, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64,
-        0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x0F, 0x02, 0x1C, 0x60, 0x04, 0x62, 0x1C, 0x64,
-        0xA2, 0xDB, 0x00, 0x60, 0x50, 0x63, 0x5A, 0xDD, 0xED, 0x60, 0xD3, 0x64, 0x80, 0xFB, 0x2D, 0xFF,
-        0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64,
-        0x24, 0x45, 0xA4, 0x80, 0x02, 0x61, 0x34, 0x02, 0x25, 0x45, 0x20, 0x44, 0x80, 0x2A, 0x35, 0x00,
-        0xF1, 0x60, 0x00, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x01, 0x03, 0x29, 0x00, 0x21, 0x60, 0x74, 0x62,
-        0xA2, 0xD1, 0x9A, 0xF3, 0x16, 0x60, 0xCC, 0x61, 0xA0, 0x84, 0xA1, 0xDB, 0x25, 0x45, 0x1B, 0x60,
-        0x52, 0x63, 0x01, 0x61, 0xBD, 0xD3, 0xBD, 0xD1, 0xD4, 0x80, 0xBD, 0xD3, 0xBD, 0xD5, 0xCD, 0x81,
-        0x02, 0x03, 0x15, 0x03, 0xF7, 0x01, 0xA2, 0xFF, 0xA6, 0xD3, 0x40, 0x4C, 0x00, 0xA8, 0x67, 0x43,
-        0x0C, 0x02, 0xA2, 0xDD, 0x42, 0x48, 0x64, 0x41, 0xB3, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x28, 0xDB, 0x02, 0x03, 0x2C, 0x58, 0xA3, 0xFF, 0x0C, 0x61, 0x03, 0x00, 0x04, 0x61,
-        0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xF1, 0x60, 0x02, 0x64, 0xD4, 0x80,
-        0x7F, 0x67, 0x06, 0x63, 0xF8, 0x02, 0x31, 0x40, 0x20, 0x26, 0xF5, 0x01, 0x21, 0x60, 0x74, 0x62,
-        0xA2, 0xD1, 0x9A, 0xF3, 0x16, 0x60, 0xCC, 0x61, 0xA0, 0x84, 0xA1, 0xDB, 0x16, 0x60, 0xD0, 0x61,
-        0x01, 0x64, 0xA1, 0xDB, 0xFF, 0xFF, 0xC4, 0xFE, 0xE5, 0x01, 0xC6, 0xFE, 0xE3, 0x01, 0x7E, 0x60,
-        0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x02, 0x61, 0x3F, 0x02, 0x25, 0x45, 0xF8, 0x2B, 0x3B, 0x00,
-        0x2E, 0xF5, 0x67, 0x44, 0xD4, 0x80, 0x17, 0x60, 0x6A, 0x63, 0x39, 0x03, 0x64, 0x61, 0x24, 0x44,
-        0x01, 0x27, 0x29, 0x00, 0xA3, 0xFC, 0xA4, 0xF8, 0xBD, 0xD3, 0xA3, 0xD1, 0xD4, 0x80, 0xCD, 0x81,
-        0x08, 0x24, 0x64, 0x58, 0x08, 0xA3, 0xF8, 0x02, 0x08, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xA3, 0xD1,
-        0xFE, 0xA0, 0xFA, 0x60, 0x00, 0x64, 0xD0, 0x80, 0x14, 0x02, 0x13, 0x02, 0x04, 0xA3, 0xBE, 0xD3,
-        0xBD, 0xD1, 0x0F, 0x18, 0xD4, 0x80, 0x0D, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01,
-        0x64, 0x41, 0xDD, 0x81, 0xE1, 0x81, 0xCB, 0x83, 0x46, 0x65, 0xF2, 0x60, 0x58, 0x4F, 0x4A, 0x78,
-        0xFF, 0xFF, 0x00, 0x67, 0x0A, 0x00, 0xBD, 0xD3, 0xBE, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24,
-        0x64, 0x58, 0x08, 0xA3, 0xF8, 0x02, 0x04, 0x61, 0x7F, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x0F, 0x64,
-        0x23, 0xFA, 0x67, 0x44, 0x24, 0xFA, 0x62, 0x41, 0x3E, 0x60, 0x00, 0x65, 0x1A, 0x63, 0xEA, 0x60,
-        0x88, 0x64, 0x65, 0x46, 0x58, 0xD0, 0x2E, 0xF5, 0x59, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x4B, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0xE8, 0x84, 0xDC, 0x84, 0x23, 0xFA, 0xBF, 0xD1,
-        0x4A, 0x65, 0x64, 0x43, 0xF2, 0x60, 0x58, 0x4F, 0x4A, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xE0, 0xA0, 0x20, 0x64, 0x01, 0x06, 0x25, 0xFA, 0x23, 0xF2,
-        0xDF, 0xD1, 0xCC, 0x84, 0xE0, 0x85, 0x0B, 0x06, 0xBF, 0xD1, 0x64, 0x41, 0xD5, 0x80, 0x64, 0x43,
-        0x01, 0x06, 0x65, 0x41, 0x4A, 0x65, 0xEF, 0x60, 0x58, 0x4F, 0x87, 0x78, 0xFF, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0xBC, 0xF3, 0x02, 0x63, 0x23, 0xFC, 0x07, 0xB4, 0x25, 0xFA, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x4B, 0xD3, 0xBF, 0xD3, 0x60, 0x41, 0xC9, 0x83, 0xE9, 0x81, 0xDD, 0x81,
-        0xA3, 0xFA, 0xE0, 0x81, 0x3C, 0x60, 0x00, 0x67, 0x02, 0x24, 0x02, 0xA4, 0x60, 0x47, 0x40, 0x4B,
-        0xC9, 0x81, 0x4A, 0x65, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A,
-        0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF6, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3,
-        0xA3, 0xD1, 0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83, 0x60, 0x47, 0x25, 0xFA, 0x00, 0x7E, 0x60, 0x47,
-        0x01, 0x26, 0xDC, 0x84, 0x60, 0x41, 0xE8, 0x84, 0xD8, 0x84, 0x23, 0xFA, 0xAB, 0x01, 0xFC, 0xA3,
-        0xA3, 0xD1, 0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83, 0x00, 0x7F, 0x25, 0xFA, 0x60, 0x41, 0x01, 0x26,
-        0xDD, 0x81, 0xE9, 0x84, 0xD8, 0x84, 0x23, 0xFA, 0x9D, 0x01, 0x23, 0xF2, 0x12, 0x60, 0xB8, 0x65,
-        0x60, 0x41, 0x12, 0x60, 0x54, 0x63, 0xA3, 0xDB, 0xFF, 0xA1, 0x48, 0x64, 0x58, 0xD0, 0x7E, 0xA8,
-        0x5B, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xFF, 0xA1, 0xD7, 0x80, 0x02, 0x03, 0x01, 0x03,
-        0xF5, 0x01, 0x2E, 0xF5, 0x00, 0x60, 0x2F, 0x65, 0x25, 0xF2, 0x00, 0x63, 0xCC, 0x84, 0x03, 0xA3,
-        0xFD, 0x05, 0x4A, 0x64, 0xD7, 0x80, 0x11, 0x60, 0xF0, 0x61, 0x2F, 0x05, 0xA1, 0xDD, 0xE3, 0x83,
-        0xFE, 0xA3, 0x58, 0xD0, 0x7E, 0xA8, 0x59, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F,
-        0x00, 0x63, 0x59, 0xDD, 0x2E, 0xF5, 0x11, 0x60, 0xF0, 0x64, 0x25, 0xF0, 0xA0, 0xD3, 0xD3, 0x80,
-        0x01, 0xB0, 0x04, 0x03, 0x01, 0xA4, 0x03, 0x03, 0xA2, 0xDB, 0x01, 0x00, 0xA2, 0xDD, 0x11, 0x60,
-        0xF8, 0x63, 0x10, 0x60, 0x0A, 0x65, 0xBD, 0xD3, 0xBD, 0xD1, 0xE0, 0x84, 0xC4, 0x82, 0x10, 0x60,
-        0x2A, 0x65, 0x07, 0x64, 0x64, 0x41, 0x5A, 0xDB, 0xD6, 0x80, 0xCD, 0x81, 0x06, 0x03, 0xFB, 0x02,
-        0x25, 0xF2, 0x02, 0xA3, 0xCC, 0x84, 0xA2, 0xDA, 0xEC, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x12, 0x60, 0x54, 0x61, 0xA1, 0xD3, 0x23, 0xFA, 0xE0, 0x83, 0x4A, 0x65, 0x04, 0x02, 0x02, 0x63,
-        0x23, 0xFC, 0xA5, 0xFC, 0x09, 0x00, 0xDB, 0x83, 0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A,
-        0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x11, 0x60,
-        0xF0, 0x62, 0xA2, 0xD3, 0x00, 0x61, 0x02, 0xA4, 0xFE, 0xA0, 0x23, 0xFA, 0x1B, 0x03, 0xFA, 0xA4,
-        0xFD, 0xA4, 0x01, 0xA1, 0xFD, 0x07, 0x61, 0x43, 0x23, 0xF2, 0x25, 0xFC, 0xE0, 0x83, 0x02, 0xA3,
-        0x11, 0x60, 0xF0, 0x61, 0x00, 0x60, 0x4A, 0x64, 0x59, 0xD1, 0x58, 0xD8, 0x7E, 0x3A, 0x02, 0x00,
-        0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x25, 0xF2, 0x23, 0xF2, 0x01, 0xB0, 0xCC, 0x84, 0x04, 0x02,
-        0x23, 0xFA, 0x02, 0x00, 0x00, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x41, 0x4B,
-        0x65, 0x42, 0x80, 0x64, 0xD4, 0x85, 0x2B, 0x41, 0x00, 0xA1, 0x55, 0x8B, 0x0D, 0x03, 0x02, 0x04,
-        0x65, 0x41, 0x02, 0x00, 0x00, 0x64, 0x40, 0x4B, 0xCA, 0x84, 0x58, 0xD0, 0xC9, 0x81, 0xBD, 0xD9,
-        0xFC, 0x02, 0x00, 0xF4, 0x04, 0x65, 0xEC, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD3,
-        0x02, 0x7C, 0xA0, 0xD3, 0x23, 0xF8, 0xDC, 0x84, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x02, 0x64, 0x23, 0xFA, 0x01, 0x64, 0x9D, 0xFE, 0x02, 0x28, 0x02, 0x64, 0x25, 0xFA, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x21, 0x60, 0x80, 0x62, 0xA2, 0xD3, 0x02, 0x7C, 0x23, 0xF8, 0x01, 0xB4,
-        0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1, 0x02, 0x64, 0x23, 0xFA,
-        0x64, 0x44, 0x7C, 0x5F, 0x60, 0x45, 0x64, 0x47, 0x7C, 0x5F, 0x89, 0xF1, 0x66, 0x41, 0xC0, 0x86,
-        0xA5, 0xD2, 0x61, 0x46, 0x00, 0x63, 0x60, 0x40, 0x0A, 0x37, 0x01, 0x63, 0x14, 0x37, 0x02, 0x63,
-        0x37, 0x37, 0x06, 0x63, 0x6E, 0x37, 0x0B, 0x63, 0x25, 0xFC, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x02, 0x64, 0x23, 0xFA, 0x88, 0xFF, 0x75, 0x44, 0x8D, 0xFF, 0xE8, 0x87, 0xE8, 0x84, 0xE8, 0x84,
-        0x03, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF0, 0x21, 0x60, 0x7C, 0x65,
-        0x23, 0xF2, 0xA5, 0xD9, 0x02, 0xA8, 0x64, 0x44, 0x07, 0x02, 0x00, 0xBC, 0xF2, 0xA4, 0x04, 0x03,
-        0x03, 0x07, 0x1F, 0x60, 0xAA, 0x62, 0xA2, 0xD9, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x20, 0x63,
-        0x20, 0x60, 0x0A, 0x61, 0x48, 0x64, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x25, 0xF0, 0x20, 0x64,
-        0xD0, 0x81, 0xFF, 0xFF, 0x02, 0x07, 0x25, 0xFA, 0x0F, 0x00, 0x20, 0x60, 0x0E, 0x63, 0xC3, 0x83,
-        0x01, 0x2A, 0x06, 0x00, 0xCF, 0x83, 0xA3, 0xD3, 0xCD, 0x81, 0x00, 0x7F, 0xBD, 0xDB, 0x04, 0x03,
-        0x00, 0x64, 0xC9, 0x81, 0xBD, 0xDB, 0xFD, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2,
-        0x25, 0xF0, 0x01, 0x60, 0x70, 0x63, 0xA3, 0xD9, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3,
-        0xA5, 0xF0, 0xA3, 0xD1, 0xFF, 0xFF, 0x64, 0x5E, 0x00, 0x7F, 0x60, 0x41, 0x64, 0x47, 0x7C, 0x5F,
-        0x89, 0xF1, 0x66, 0x43, 0xC0, 0x86, 0x65, 0x44, 0xA1, 0xDA, 0x63, 0x46, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1, 0xFF, 0xFF, 0x64, 0x5E, 0x00, 0x7F, 0x60, 0x45, 0x64, 0x47,
-        0x7C, 0x5F, 0x89, 0xF1, 0x66, 0x41, 0xC0, 0x86, 0x65, 0x44, 0xA0, 0xD2, 0x61, 0x46, 0x25, 0xFA,
-        0x02, 0x64, 0x23, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8,
-        0x00, 0x67, 0x02, 0x02, 0x2D, 0xF9, 0x2C, 0xF9, 0x23, 0x58, 0xFF, 0xFF, 0x1F, 0x60, 0xA8, 0x61,
-        0x23, 0xF2, 0x25, 0xF2, 0x02, 0xA8, 0x00, 0xA8, 0x09, 0x02, 0x07, 0x03, 0xD0, 0xA0, 0x30, 0x65,
-        0x03, 0x04, 0xA7, 0xA0, 0x59, 0x65, 0x01, 0x06, 0x65, 0x44, 0xA1, 0xDB, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x04, 0x61, 0x0A, 0x00, 0x25, 0x60, 0x2C, 0x61, 0x01, 0x64, 0xA1, 0xDB, 0x04, 0x00,
-        0x25, 0x60, 0x2C, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x06, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0xEB, 0x60,
-        0x84, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x46, 0x45, 0x02, 0xF0,
-        0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0x00, 0xF4, 0x01, 0xF2, 0x66, 0x5C, 0x25, 0x46, 0x56, 0x02,
-        0x70, 0x27, 0x54, 0x00, 0x12, 0x64, 0x03, 0xFA, 0x04, 0xF8, 0x0E, 0xF2, 0x87, 0xFC, 0x8D, 0xFC,
-        0x8E, 0xFC, 0xDA, 0x82, 0x16, 0x61, 0x00, 0x63, 0xC9, 0x81, 0x5A, 0xDC, 0xFD, 0x02, 0x60, 0x40,
-        0xF0, 0x3B, 0x16, 0x00, 0x32, 0x44, 0x8F, 0xF3, 0x01, 0xB0, 0xF6, 0xA0, 0x08, 0x24, 0x2C, 0x05,
-        0xDC, 0x83, 0xF0, 0x67, 0x0E, 0xFA, 0x1B, 0x60, 0xC4, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0x8F, 0xFD, 0x2B, 0xFF, 0xFE, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x4F, 0x00,
-        0x90, 0xF3, 0x0A, 0x65, 0xD4, 0x80, 0xDC, 0x83, 0x17, 0x05, 0x90, 0xFD, 0x98, 0xFE, 0x04, 0x04,
-        0x00, 0x7F, 0x08, 0x7E, 0x0E, 0xFA, 0x3B, 0xFF, 0x1B, 0x60, 0xB8, 0x64, 0x2B, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0x0E, 0xF2, 0x2B, 0xFF, 0x60, 0x40, 0x08, 0x26, 0xF7, 0xFE,
-        0xFD, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x32, 0x00, 0x8C, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0, 0xFF, 0xFF,
-        0x0D, 0x04, 0x1B, 0x60, 0xD0, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xFC, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x21, 0x00, 0x46, 0x45, 0x00, 0x64,
-        0x2B, 0xDB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA2, 0xFF,
-        0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18, 0x70, 0x67, 0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03, 0xC0, 0x84,
-        0x01, 0xFA, 0x25, 0x46, 0x25, 0x44, 0x80, 0xFC, 0x05, 0xFA, 0xB4, 0x60, 0x58, 0x4E, 0x48, 0x78,
-        0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF, 0xFF, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0xD4, 0xFE, 0xA3, 0xFF,
-        0x2D, 0x58, 0xFF, 0xFF, 0x1B, 0x60, 0xBE, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x0D, 0x00, 0x1B, 0x60,
-        0xB2, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x18, 0x00, 0x1B, 0x60, 0xCA, 0x64, 0x40, 0x47, 0x58, 0x4F,
-        0x03, 0x00, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0x27, 0xD5, 0x0E, 0xF2, 0x0B, 0x18, 0x60, 0x40,
-        0x01, 0x2A, 0x08, 0x00, 0x1B, 0x60, 0xE0, 0x64, 0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D, 0x75, 0x78,
-        0xFF, 0xFF, 0xF2, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD5, 0x0E, 0xF2, 0x14, 0x18, 0x60, 0x40,
-        0x01, 0x2A, 0x11, 0x00, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0x90, 0xF3,
-        0x02, 0x02, 0xCC, 0x84, 0x90, 0xFB, 0x1B, 0x60, 0xE0, 0x64, 0x40, 0x4B, 0xF0, 0x60, 0x58, 0x4D,
-        0x75, 0x78, 0xFF, 0xFF, 0xE9, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFB, 0x64, 0x3A, 0x42, 0x4A, 0xDB,
-        0xA2, 0xFF, 0x93, 0xF3, 0x8F, 0xF3, 0xCC, 0x80, 0xFA, 0xA0, 0x01, 0x14, 0x1E, 0x05, 0xB3, 0x60,
-        0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0xA2, 0xFF, 0x18, 0x03, 0xF0, 0x67, 0x0E, 0xFA, 0x1B, 0x60,
-        0xE0, 0x62, 0x1B, 0x60, 0xC4, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xF6, 0x64, 0x3A, 0x42, 0x4A, 0xDB, 0x93, 0xF3, 0x8F, 0xF3, 0xCC, 0x83,
-        0xDC, 0x84, 0x01, 0x15, 0x93, 0xFD, 0x8F, 0xFB, 0xD4, 0xFE, 0x92, 0xF3, 0x90, 0xF3, 0x00, 0xA8,
-        0x91, 0xF1, 0x03, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x27, 0x05, 0xB3, 0x60, 0x58, 0x4D, 0x4E, 0x78,
-        0xFF, 0xFF, 0xA2, 0xFF, 0x21, 0x03, 0x00, 0x63, 0x92, 0xF3, 0x0E, 0xFC, 0xCC, 0x84, 0xFF, 0x3A,
-        0x92, 0xFB, 0x98, 0xFE, 0x03, 0x04, 0x08, 0xBB, 0x0E, 0xFC, 0x3B, 0xFF, 0x1B, 0x60, 0xE0, 0x62,
-        0x1B, 0x60, 0xB8, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xF7, 0x64, 0x3A, 0x42, 0x4A, 0xDB, 0x90, 0xF3, 0x0E, 0xF2, 0xDC, 0x83, 0x08, 0xB0,
-        0x90, 0xFD, 0x08, 0x28, 0xF7, 0xFE, 0xD4, 0xFE, 0xA3, 0xFF, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF,
-        0xB9, 0xFE, 0x13, 0xFF, 0x24, 0x40, 0x80, 0x2B, 0x0B, 0x00, 0xA2, 0xFF, 0x25, 0x46, 0x09, 0xF4,
-        0x0E, 0xF2, 0x05, 0x18, 0x08, 0xBC, 0x0E, 0xFA, 0xFF, 0xFF, 0xF7, 0xFE, 0x01, 0x00, 0xD8, 0xFE,
-        0xA3, 0xFF, 0x25, 0x46, 0x3E, 0xF2, 0x00, 0xF4, 0x08, 0xF0, 0x25, 0x46, 0x06, 0xB4, 0xFF, 0x7F,
-        0x10, 0xBC, 0x06, 0x26, 0xFD, 0x7F, 0x0E, 0xFA, 0x3E, 0xF2, 0x3F, 0xF2, 0x60, 0x41, 0x08, 0x2A,
-        0x64, 0x47, 0x3F, 0xFA, 0x60, 0x45, 0x1F, 0x60, 0x62, 0x62, 0xA2, 0xD3, 0xA3, 0xFC, 0xAB, 0xFC,
-        0x91, 0xFC, 0xD4, 0x80, 0xE0, 0x60, 0xC1, 0x65, 0xA5, 0x80, 0x01, 0x04, 0x07, 0x03, 0x23, 0xF0,
-        0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xF2, 0x60, 0x25, 0x78, 0xFF, 0xFF, 0xF4, 0x60, 0x58, 0x4F,
-        0x2D, 0x78, 0xFF, 0xFF, 0x14, 0x04, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x98, 0xF1,
-        0x1E, 0x60, 0xFC, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x02, 0x00, 0x20, 0x60, 0x00, 0x75, 0x46, 0x00, 0x3E, 0xF0,
-        0x89, 0xF1, 0x64, 0x47, 0x07, 0xB4, 0x07, 0x36, 0x3B, 0x00, 0x04, 0x03, 0xCC, 0x84, 0xE0, 0x84,
-        0xC0, 0x83, 0x2D, 0x00, 0x2C, 0xF2, 0x88, 0xF1, 0x01, 0xB0, 0x64, 0x43, 0x35, 0x02, 0x2E, 0xF2,
-        0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x2E, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x2D, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x2C, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0x88, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x09, 0x00, 0x66, 0x45,
-        0x63, 0x46, 0x06, 0xF0, 0x65, 0x46, 0x64, 0x44, 0x0C, 0x26, 0x02, 0x00, 0x02, 0x26, 0x04, 0x00,
-        0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x07, 0xFC, 0x23, 0xF2, 0xFF, 0xFF, 0x10, 0x1B,
-        0x1B, 0x60, 0xE0, 0x62, 0x1B, 0x60, 0x9A, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xC8, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x0F, 0x00,
-        0x1B, 0x60, 0xE0, 0x62, 0x1B, 0x60, 0xAC, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xCE, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0xEB, 0x60,
-        0x84, 0x78, 0xFF, 0xFF, 0xCB, 0x84, 0xC9, 0x83, 0xFF, 0xFF, 0x08, 0x04, 0x58, 0xD1, 0xA5, 0xD8,
-        0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x2F, 0x58, 0xFF, 0xFF,
-        0x25, 0xF0, 0x21, 0x60, 0x2C, 0x62, 0xA2, 0xD9, 0x19, 0x00, 0x21, 0x60, 0x80, 0x64, 0xA0, 0xD1,
-        0x7F, 0xF9, 0x0C, 0x60, 0x38, 0x62, 0x40, 0x63, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x64, 0x40,
-        0x01, 0x2A, 0x0C, 0x00, 0x04, 0x65, 0x0C, 0x60, 0x38, 0x61, 0x48, 0x64, 0x3E, 0x63, 0x7C, 0xA8,
-        0x58, 0xD0, 0x59, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x21, 0x60, 0x2C, 0x62,
-        0xA2, 0xD1, 0x0D, 0x60, 0x1C, 0x65, 0x02, 0xFE, 0x64, 0x44, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x87,
-        0x60, 0x41, 0x64, 0x44, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x84, 0x3E, 0xFB, 0x60, 0x42, 0x61, 0x44,
-        0x03, 0xA2, 0x60, 0xFE, 0xA2, 0xDB, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x44, 0x0C, 0x60, 0x3A, 0x65,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x84, 0x40, 0xFB, 0xFF, 0xFF, 0x00, 0x67,
-        0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x21, 0x60, 0x80, 0x64, 0xA0, 0xD1, 0x7F, 0xF9, 0x00, 0x64,
-        0x40, 0x41, 0x64, 0x40, 0x01, 0x2A, 0xA6, 0x00, 0x4A, 0x64, 0xA0, 0xD2, 0xFF, 0xFF, 0x40, 0x42,
-        0x80, 0x2B, 0x04, 0x00, 0xFF, 0xB4, 0x40, 0x42, 0x01, 0x64, 0x40, 0x41, 0x88, 0xF3, 0x46, 0x4B,
-        0x87, 0xF3, 0x60, 0x46, 0xE0, 0x83, 0xAB, 0x46, 0x26, 0xF0, 0xAB, 0x46, 0x55, 0xF8, 0xAB, 0x46,
-        0x27, 0xF0, 0xAB, 0x46, 0x56, 0xF8, 0xAB, 0x46, 0x28, 0xF0, 0xAB, 0x46, 0x57, 0xF8, 0x66, 0x44,
-        0x02, 0xA6, 0xF1, 0x1F, 0x88, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xAB, 0x46, 0x0C, 0x60, 0x7A, 0x65,
-        0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81, 0xC9, 0x81,
-        0x52, 0x64, 0x0E, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00,
-        0xAB, 0x46, 0xF0, 0xA1, 0x6E, 0x64, 0x0E, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46,
-        0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x0C, 0x60, 0xDC, 0x65, 0xC4, 0x81,
-        0x60, 0x45, 0xC9, 0x81, 0x62, 0x64, 0x06, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44,
-        0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF8, 0xA1, 0xAE, 0x64, 0x06, 0x63, 0x59, 0xD1, 0x58, 0xD8,
-        0xFD, 0x1F, 0xAB, 0x46, 0x65, 0x44, 0x0C, 0x60, 0xFC, 0x65, 0xC4, 0x81, 0xC9, 0x81, 0x6A, 0x64,
-        0x06, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x85,
-        0xC4, 0x84, 0x0C, 0x60, 0xC2, 0x65, 0xC4, 0x81, 0x72, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9,
-        0xFD, 0x1F, 0xAB, 0x46, 0x21, 0x44, 0x01, 0x2A, 0x06, 0x00, 0xFA, 0xA1, 0x88, 0x64, 0x04, 0x63,
-        0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0x37, 0xF0, 0x21, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x22, 0x44,
-        0x3D, 0xFB, 0x60, 0x41, 0x02, 0xFE, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x84, 0x3C, 0xFB, 0x0C, 0x60,
-        0xBE, 0x63, 0x88, 0xFF, 0xCD, 0x81, 0x06, 0xA3, 0xFD, 0x0D, 0x8D, 0xFF, 0x3B, 0xFD, 0x64, 0x47,
-        0x80, 0xBF, 0x60, 0x5C, 0x22, 0x43, 0x80, 0x61, 0x88, 0xFF, 0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D,
-        0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0xB1, 0x84, 0x37, 0xFA, 0x87, 0xF3, 0xFF, 0xFF, 0xCC, 0x83,
-        0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0x37, 0xF0, 0x66, 0x44, 0xB1, 0x9C, 0x37, 0xF8, 0x02, 0xA6,
-        0xFA, 0x1F, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0,
-        0x02, 0xA8, 0x00, 0x67, 0x24, 0x02, 0x3D, 0xF1, 0x64, 0x44, 0x03, 0xB4, 0x40, 0x42, 0xD0, 0x80,
-        0x88, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xB7, 0xF4, 0x80, 0x61, 0x02, 0x02, 0xE3, 0x83, 0xEB, 0x83,
-        0x22, 0x44, 0x88, 0xFF, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91,
-        0x9D, 0x85, 0xA7, 0x83, 0x37, 0xFC, 0x87, 0xF3, 0xFF, 0xFF, 0xCC, 0x83, 0xE3, 0x83, 0x66, 0x44,
-        0x02, 0xA6, 0xB7, 0xF2, 0x66, 0x44, 0xA5, 0x81, 0xB7, 0xFA, 0x02, 0xA6, 0xFA, 0x1F, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x11, 0x64, 0x23, 0xFA, 0x25, 0x44, 0x24, 0xFA, 0x04, 0x64, 0x40, 0x4B,
-        0x62, 0x41, 0x0C, 0x60, 0xC2, 0x64, 0x04, 0x63, 0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F, 0x2B, 0x43,
-        0x00, 0x7C, 0x59, 0xD8, 0x4F, 0x8B, 0x06, 0xA4, 0xF6, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x21, 0x60, 0x80, 0x64, 0xA0, 0xD1, 0x7F, 0xF9, 0x64, 0x40, 0x01, 0x2A, 0x4E, 0x00, 0x27, 0xF2,
-        0x12, 0x60, 0xCE, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0x88, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x2A, 0x00, 0x43, 0x4B,
-        0xAB, 0x46, 0x37, 0xF2, 0x80, 0x60, 0x30, 0x7C, 0xB0, 0x84, 0xA2, 0xDA, 0x4E, 0x61, 0x6E, 0x64,
-        0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x88, 0x64, 0x04, 0x63,
-        0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0xD9, 0x81, 0x98, 0x64, 0x04, 0x63,
-        0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0xD9, 0x81, 0xAE, 0x64, 0x0E, 0x63,
-        0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x21, 0x60, 0x80, 0x64, 0xA0, 0xD1,
-        0x7F, 0xF9, 0x64, 0x40, 0x01, 0x2A, 0x31, 0x00, 0x27, 0xF2, 0x12, 0x60, 0xCE, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18,
-        0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x88, 0xF3, 0x08, 0xFE,
-        0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x0D, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x37, 0xF2, 0x80, 0x60,
-        0x30, 0x61, 0x9D, 0x85, 0xA4, 0x84, 0xA2, 0xDA, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x3E, 0xF2, 0xAC, 0xF1, 0x08, 0xB0,
-        0x19, 0xF8, 0x4A, 0x02, 0x07, 0x23, 0x2B, 0x00, 0x60, 0x47, 0x07, 0xB4, 0x89, 0xF1, 0xCC, 0x84,
-        0xE0, 0x84, 0x40, 0x8A, 0xAA, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x05, 0xF2, 0x60, 0x43, 0xAA, 0x46,
-        0x2C, 0xFC, 0x2D, 0xF8, 0x2E, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1,
-        0x31, 0xF8, 0x46, 0x4A, 0x00, 0xF4, 0x02, 0xF2, 0x03, 0xF0, 0x04, 0xF2, 0x60, 0x43, 0xAA, 0x46,
-        0x32, 0xFC, 0x33, 0xF8, 0x34, 0xFA, 0xAA, 0x46, 0x05, 0xF2, 0x06, 0xF0, 0x07, 0xF2, 0x60, 0x43,
-        0xAA, 0x46, 0x36, 0xFC, 0x37, 0xF8, 0x38, 0xFA, 0x03, 0x60, 0x08, 0x64, 0x1C, 0x00, 0x67, 0xF1,
-        0x2F, 0xF8, 0x68, 0xF1, 0x30, 0xF8, 0x69, 0xF1, 0x31, 0xF8, 0x46, 0x4A, 0x00, 0xF4, 0x02, 0xF2,
-        0x03, 0xF0, 0x04, 0xF2, 0x60, 0x43, 0xAA, 0x46, 0x2C, 0xFC, 0x2D, 0xF8, 0x2E, 0xFA, 0xAA, 0x46,
-        0x05, 0xF2, 0x06, 0xF0, 0x07, 0xF2, 0x60, 0x43, 0xAA, 0x46, 0x32, 0xFC, 0x33, 0xF8, 0x34, 0xFA,
-        0x02, 0x60, 0x08, 0x64, 0x00, 0x00, 0x2A, 0xFA, 0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x28, 0xF3,
-        0xFF, 0xFF, 0x60, 0x47, 0x0F, 0xB4, 0x59, 0x00, 0xFF, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x1C, 0x60,
-        0x04, 0x65, 0x04, 0x64, 0xA5, 0xDB, 0x12, 0x00, 0x1C, 0x60, 0x04, 0x65, 0x0C, 0x64, 0xA5, 0xDB,
-        0x0D, 0x00, 0x1C, 0x60, 0x04, 0x65, 0x06, 0x64, 0xA5, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x04, 0x65, 0x08, 0x64, 0xA5, 0xDB, 0xF4, 0x60, 0xD9, 0x64,
-        0x80, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0x29, 0xF3, 0x65, 0xFB,
-        0x83, 0xFB, 0x02, 0x60, 0xEE, 0x64, 0x82, 0xFB, 0x07, 0x64, 0x84, 0xFB, 0xF4, 0x60, 0xD9, 0x64,
-        0x80, 0xFB, 0xFF, 0xFF, 0xDF, 0xFE, 0x00, 0x64, 0x19, 0xFF, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF,
-        0xAF, 0x60, 0xFD, 0x63, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0xF4, 0x60, 0xC6, 0x63,
-        0x80, 0xFD, 0xFF, 0xFF, 0x1A, 0xFF, 0xEB, 0x60, 0x84, 0x78, 0xFF, 0xFF, 0xA7, 0x60, 0x9B, 0x63,
-        0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0x29, 0xF5, 0x1B, 0x60, 0xE0, 0x63, 0x1B, 0x60,
-        0xB2, 0x64, 0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0x02, 0x64, 0xA3, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xF9, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xA7, 0x01, 0x00, 0x36, 0xA8, 0x01, 0x01, 0x36,
-        0xAB, 0x01, 0x02, 0x36, 0xAE, 0x01, 0x03, 0x36, 0xB5, 0x01, 0x04, 0x36, 0xD1, 0x01, 0x05, 0x36,
-        0xCF, 0x01, 0x06, 0x36, 0xF1, 0x01, 0x07, 0x36, 0xCB, 0x01, 0x08, 0x36, 0xB7, 0x01, 0x09, 0x36,
-        0x0C, 0x00, 0x0A, 0x36, 0x0D, 0x00, 0x0B, 0x36, 0x0E, 0x00, 0x0C, 0x36, 0x17, 0x00, 0x0D, 0x36,
-        0x0D, 0x00, 0x0E, 0x36, 0x1E, 0x00, 0x0F, 0x36, 0x32, 0x00, 0x02, 0x60, 0x00, 0x64, 0x08, 0x00,
-        0x04, 0x60, 0x00, 0x64, 0x05, 0x00, 0x00, 0x60, 0x01, 0x64, 0x02, 0x00, 0x20, 0x60, 0x00, 0x64,
-        0x32, 0x45, 0xB4, 0x85, 0x45, 0x52, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xB0, 0x60, 0xC1, 0x63,
-        0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x3F, 0x40, 0x02, 0x2B, 0x05, 0x00, 0x90, 0x60, 0x00, 0xE8, 0xAF, 0x60, 0xFD, 0x63,
-        0x04, 0x00, 0x91, 0x60, 0x00, 0xE8, 0xB0, 0x60, 0xAB, 0x63, 0x28, 0xE8, 0x0C, 0x60, 0x16, 0x64,
-        0xA0, 0xDD, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x91, 0x60,
-        0x00, 0xE8, 0x28, 0xE8, 0xD9, 0x60, 0xFE, 0x64, 0x32, 0x45, 0xA4, 0x85, 0x45, 0x52, 0x99, 0xFF,
-        0xA5, 0x4F, 0xFF, 0xB4, 0x07, 0xFB, 0x98, 0xFF, 0xA7, 0x60, 0x9B, 0x63, 0x0C, 0x60, 0x16, 0x64,
-        0xA0, 0xDD, 0x62, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x42, 0x6F, 0x6F, 0x74, 0x63, 0x6F,
-        0x64, 0x65, 0x20, 0x21, 0x21, 0x20, 0x20, 0x00, 0x53, 0x54, 0x41, 0x2F, 0x41, 0x50, 0x20, 0x46,
-        0x75, 0x6E, 0x63, 0x27, 0x73, 0x00, 0x20, 0x00, 0x02, 0x00, 0x02, 0x00, 0x24, 0x00, 0x00, 0x00,
-        0x08, 0x00, 0x02, 0x00, 0x02, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x06, 0x00,
-        0x07, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x07, 0x00, 0x01, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00,
-        0x40, 0x00, 0x32, 0x00, 0x32, 0x00, 0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x40, 0x00, 0x32, 0x00,
-        0x36, 0x00, 0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x40, 0x00, 0x3B, 0x00, 0x40, 0x00, 0x17, 0x00,
-        0x07, 0x00, 0x07, 0x00, 0x4A, 0x00, 0x40, 0x00, 0x4A, 0x00, 0x1E, 0x00, 0x0C, 0x00, 0x08, 0x00,
-        0x57, 0x00, 0x4D, 0x00, 0x57, 0x00, 0x2B, 0x00, 0x19, 0x00, 0x08, 0x00, 0x5D, 0x00, 0x53, 0x00,
-        0x5D, 0x00, 0x31, 0x00, 0x1F, 0x00, 0x08, 0x00,
-
-};  /* fw_image_4_data */
-
-static const CFG_IDENTITY_STRCT fw_image_infoidentity[] = {
-       {
-               sizeof(CFG_IDENTITY_STRCT) / sizeof(hcf_16) - 1,
-               CFG_FW_IDENTITY,
-               COMP_ID_FW_AP,
-               2,                                                      /* Variant /
-               2,                                                      /* Major */
-               36                                                      /* Minor */
-       },
-       { 0000, 0000, 0000, 0000, 0000, 0000 }          /* endsentinel */
-};
-
-static const CFG_PROG_STRCT fw_image_code[] = {
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      /* mode */
-               0x0146,         /* sizeof(fw_image_1_data), */
-               0x00000060,                                     /* Target address in NIC Memory */
-               0x0000,                                         /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_1_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      /* mode */
-               0x1918,         /* sizeof(fw_image_2_data), */
-               0x00000C16,                                     /* Target address in NIC Memory */
-               0x0000,                                         /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_2_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      /* mode */
-               0x01bc,         /* sizeof(fw_image_3_data), */
-               0x001E252E,                                     /* Target address in NIC Memory */
-               0x0000,                                         /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_3_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      /* mode */
-               0xab28,         /* sizeof(fw_image_4_data), */
-               0x001F4000,                                     /* Target address in NIC Memory */
-               0x0000,                                         /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_4_data
-       },
-       {
-               5,
-               CFG_PROG,
-               CFG_PROG_STOP,                          /* mode*/
-               0000,
-       0x000F1297,                                     /* Start execution address */
-       },
-       { 0000, 0000, 0000, 0000, 00000000, 0000, 00000000}
-};
-
-static const CFG_RANGE20_STRCT fw_image_infocompat[] = {
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_FW_SUP_RANGE,
-               COMP_ROLE_SUPL,
-               COMP_ID_APF,
-               {
-                       { 2, 2, 4 }                             /* variant, bottom, top */
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_MFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_MFI,
-               {
-                       { 4, 6, 7 },                            /* variant, bottom, top */
-                       { 5, 6, 7 },                            /* variant, bottom, top */
-                       { 6, 6, 7 }                             /* variant, bottom, top */
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_CFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_CFI,
-               {
-                       { 2, 1, 2 }                             /* variant, bottom, top */
-               }
-       },
-       { 0000, 0000, 0000, 0000, { { 0000, 0000, 0000 } } }                    /* endsentinel */
-};
-
-memimage fw_image = {
-       "FUPU7D37dhfwci\001C",                  /* signature, <format number>, C/Bin type */
-       (CFG_PROG_STRCT *) fw_image_code,
-       0x000F1297,
-       00000000,                                       /* (dummy) pdaplug */
-       00000000,                                       /* (dummy) priplug */
-       (CFG_RANGE20_STRCT *) fw_image_infocompat,
-       (CFG_IDENTITY_STRCT *) fw_image_infoidentity,
-};
-
diff --git a/drivers/staging/wlags49_h2/ap_h25.c b/drivers/staging/wlags49_h2/ap_h25.c
deleted file mode 100644 (file)
index d3a0faa..0000000
+++ /dev/null
@@ -1,4094 +0,0 @@
-/*
- * File:       ap_h54.124
- *
- * Abstract:   This file contains memory image 'fw_image'.
- *
- * Contents:   Total size of the memory image: 63146 bytes.
- *             Total number of blocks: 4 blocks.
- *             Block  1 : load address 00000060, 328 bytes.
- *             Block  2 : load address 00000C16, 9266 bytes.
- *             Block  3 : load address 001E3048, 6476 bytes.
- *             Block  4 : load address 001F4000, 47076 bytes.
- *
- * Identity:   component id: 32 (variant 3) version 1.24
- *
- * Compatibility:
- *             supplying interface 8 (variant 4) : 1 - 1
- *             acting on interface 1 (variant 7) : 3 - 3
- *             acting on interface 1 (variant 8) : 1 - 1
- *             acting on interface 2 (variant 4) : 1 - 2
- *
- * Generated:  by g:\fw\fupu3.exe version 4.26
- *
- * Commandline:        g:\fw\fupu3.exe /f=4 /n=fw_image /i=t3012400.hex
- */
-
-
-#include "hcfcfg.h"    /* to get hcf_16 etc defined as well as */
-                       /* possible settings which inluence mdd.h or dhf.h */
-#include "mdd.h"       /* to get COMP_ID_STA etc defined */
-#include "dhf.h"       /* used to be fhfmem.h, to get memblock,plugrecord, */
-
-static const hcf_8 fw_image_1_data[] = {
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDC, 0x0C, 0x00, 0x00,
-        0x02, 0x0D, 0x00, 0x00, 0x02, 0x0D, 0xD6, 0xA2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC8, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x09, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEA,
-        0x00, 0x00, 0xFF, 0x07, 0x02, 0x00, 0x64, 0x00, 0x64, 0x00, 0x10, 0x27, 0x10, 0x27, 0x14, 0x00,
-        0xD0, 0x07, 0xD0, 0x07, 0x10, 0x27, 0x2F, 0x00, 0x32, 0x00, 0x32, 0x00, 0x05, 0x00, 0x02, 0x00,
-        0x02, 0x00, 0x10, 0x27, 0x05, 0x00, 0x00, 0x02, 0x00, 0x02, 0x13, 0x00, 0x07, 0x00, 0x03, 0x00,
-        0x32, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x09, 0x2B, 0x09, 0x2B, 0x09, 0xFF, 0x0F,
-        0xF0, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x40, 0x00, 0x32, 0x00, 0x32, 0x00,
-        0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
-};  /* fw_image_1_data */
-
-static const hcf_8 fw_image_2_data[] = {
-        0x7C, 0xA4, 0x00, 0x16, 0x08, 0x40, 0x0F, 0xD2, 0xE1, 0x28, 0xA5, 0x7C, 0x50, 0x30, 0xF1, 0x84,
-        0x44, 0x08, 0xAB, 0xAE, 0xA5, 0xB8, 0xFC, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03,
-        0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC6, 0x84, 0xF8,
-        0x99, 0xEE, 0x8D, 0xF6, 0x0D, 0xFF, 0xBD, 0xD6, 0xB1, 0xDE, 0x54, 0x91, 0x50, 0x60, 0x03, 0x02,
-        0xA9, 0xCE, 0x7D, 0x56, 0x19, 0xE7, 0x62, 0xB5, 0xE6, 0x4D, 0x9A, 0xEC, 0x45, 0x8F, 0x9D, 0x1F,
-        0x40, 0x89, 0x87, 0xFA, 0x15, 0xEF, 0xEB, 0xB2, 0xC9, 0x8E, 0x0B, 0xFB, 0xEC, 0x41, 0x67, 0xB3,
-        0xFD, 0x5F, 0xEA, 0x45, 0xBF, 0x23, 0xF7, 0x53, 0x96, 0xE4, 0x5B, 0x9B, 0xC2, 0x75, 0x1C, 0xE1,
-        0xAE, 0x3D, 0x6A, 0x4C, 0x5A, 0x6C, 0x41, 0x7E, 0x02, 0xF5, 0x4F, 0x83, 0x5C, 0x68, 0xF4, 0x51,
-        0x34, 0xD1, 0x08, 0xF9, 0x93, 0xE2, 0x73, 0xAB, 0x53, 0x62, 0x3F, 0x2A, 0x0C, 0x08, 0x52, 0x95,
-        0x65, 0x46, 0x5E, 0x9D, 0x28, 0x30, 0xA1, 0x37, 0x0F, 0x0A, 0xB5, 0x2F, 0x09, 0x0E, 0x36, 0x24,
-        0x9B, 0x1B, 0x3D, 0xDF, 0x26, 0xCD, 0x69, 0x4E, 0xCD, 0x7F, 0x9F, 0xEA, 0x1B, 0x12, 0x9E, 0x1D,
-        0x74, 0x58, 0x2E, 0x34, 0x2D, 0x36, 0xB2, 0xDC, 0xEE, 0xB4, 0xFB, 0x5B, 0xF6, 0xA4, 0x4D, 0x76,
-        0x61, 0xB7, 0xCE, 0x7D, 0x7B, 0x52, 0x3E, 0xDD, 0x71, 0x5E, 0x97, 0x13, 0xF5, 0xA6, 0x68, 0xB9,
-        0x00, 0x00, 0x2C, 0xC1, 0x60, 0x40, 0x1F, 0xE3, 0xC8, 0x79, 0xED, 0xB6, 0xBE, 0xD4, 0x46, 0x8D,
-        0xD9, 0x67, 0x4B, 0x72, 0xDE, 0x94, 0xD4, 0x98, 0xE8, 0xB0, 0x4A, 0x85, 0x6B, 0xBB, 0x2A, 0xC5,
-        0xE5, 0x4F, 0x16, 0xED, 0xC5, 0x86, 0xD7, 0x9A, 0x55, 0x66, 0x94, 0x11, 0xCF, 0x8A, 0x10, 0xE9,
-        0x06, 0x04, 0x81, 0xFE, 0xF0, 0xA0, 0x44, 0x78, 0xBA, 0x25, 0xE3, 0x4B, 0xF3, 0xA2, 0xFE, 0x5D,
-        0xC0, 0x80, 0x8A, 0x05, 0xAD, 0x3F, 0xBC, 0x21, 0x48, 0x70, 0x04, 0xF1, 0xDF, 0x63, 0xC1, 0x77,
-        0x75, 0xAF, 0x63, 0x42, 0x30, 0x20, 0x1A, 0xE5, 0x0E, 0xFD, 0x6D, 0xBF, 0x4C, 0x81, 0x14, 0x18,
-        0x35, 0x26, 0x2F, 0xC3, 0xE1, 0xBE, 0xA2, 0x35, 0xCC, 0x88, 0x39, 0x2E, 0x57, 0x93, 0xF2, 0x55,
-        0x82, 0xFC, 0x47, 0x7A, 0xAC, 0xC8, 0xE7, 0xBA, 0x2B, 0x32, 0x95, 0xE6, 0xA0, 0xC0, 0x98, 0x19,
-        0xD1, 0x9E, 0x7F, 0xA3, 0x66, 0x44, 0x7E, 0x54, 0xAB, 0x3B, 0x83, 0x0B, 0xCA, 0x8C, 0x29, 0xC7,
-        0xD3, 0x6B, 0x3C, 0x28, 0x79, 0xA7, 0xE2, 0xBC, 0x1D, 0x16, 0x76, 0xAD, 0x3B, 0xDB, 0x56, 0x64,
-        0x4E, 0x74, 0x1E, 0x14, 0xDB, 0x92, 0x0A, 0x0C, 0x6C, 0x48, 0xE4, 0xB8, 0x5D, 0x9F, 0x6E, 0xBD,
-        0xEF, 0x43, 0xA6, 0xC4, 0xA8, 0x39, 0xA4, 0x31, 0x37, 0xD3, 0x8B, 0xF2, 0x32, 0xD5, 0x43, 0x8B,
-        0x59, 0x6E, 0xB7, 0xDA, 0x8C, 0x01, 0x64, 0xB1, 0xD2, 0x9C, 0xE0, 0x49, 0xB4, 0xD8, 0xFA, 0xAC,
-        0x07, 0xF3, 0x25, 0xCF, 0xAF, 0xCA, 0x8E, 0xF4, 0xE9, 0x47, 0x18, 0x10, 0xD5, 0x6F, 0x88, 0xF0,
-        0x6F, 0x4A, 0x72, 0x5C, 0x24, 0x38, 0xF1, 0x57, 0xC7, 0x73, 0x51, 0x97, 0x23, 0xCB, 0x7C, 0xA1,
-        0x9C, 0xE8, 0x21, 0x3E, 0xDD, 0x96, 0xDC, 0x61, 0x86, 0x0D, 0x85, 0x0F, 0x90, 0xE0, 0x42, 0x7C,
-        0xC4, 0x71, 0xAA, 0xCC, 0xD8, 0x90, 0x05, 0x06, 0x01, 0xF7, 0x12, 0x1C, 0xA3, 0xC2, 0x5F, 0x6A,
-        0xF9, 0xAE, 0xD0, 0x69, 0x91, 0x17, 0x58, 0x99, 0x27, 0x3A, 0xB9, 0x27, 0x38, 0xD9, 0x13, 0xEB,
-        0xB3, 0x2B, 0x33, 0x22, 0xBB, 0xD2, 0x70, 0xA9, 0x89, 0x07, 0xA7, 0x33, 0xB6, 0x2D, 0x22, 0x3C,
-        0x92, 0x15, 0x20, 0xC9, 0x49, 0x87, 0xFF, 0xAA, 0x78, 0x50, 0x7A, 0xA5, 0x8F, 0x03, 0xF8, 0x59,
-        0x80, 0x09, 0x17, 0x1A, 0xDA, 0x65, 0x31, 0xD7, 0xC6, 0x84, 0xB8, 0xD0, 0xC3, 0x82, 0xB0, 0x29,
-        0x77, 0x5A, 0x11, 0x1E, 0xCB, 0x7B, 0xFC, 0xA8, 0xD6, 0x6D, 0x3A, 0x2C, 0x00, 0x30, 0x00, 0x31,
-        0x00, 0x33, 0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x38, 0x00, 0x3A,
-        0x00, 0x3B, 0x00, 0x3C, 0x00, 0x3D, 0x00, 0x3E, 0x00, 0x3F, 0x00, 0x3F, 0x59, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEC, 0x21, 0x10, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x20, 0x03, 0xE0, 0x01, 0x40, 0x01, 0x20, 0x03, 0xE0, 0x01,
-        0x40, 0x01, 0x18, 0x08, 0xF0, 0x3F, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x02, 0x14, 0x05, 0x32, 0x0B, 0x37,
-        0x08, 0x50, 0x0B, 0x6E, 0x02, 0x00, 0x04, 0x00, 0x0B, 0x00, 0x16, 0x00, 0x0C, 0x00, 0x12, 0x00,
-        0x18, 0x00, 0x24, 0x00, 0x30, 0x00, 0x48, 0x00, 0x60, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x39, 0x00, 0x20, 0x00, 0x39, 0x00,
-        0x39, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0xA4, 0x10, 0xF2, 0x10, 0xAA, 0x10, 0xEC, 0x10, 0xB0, 0x10, 0xE6, 0x10, 0xB6, 0x10,
-        0xE0, 0x10, 0xBC, 0x10, 0xDA, 0x10, 0xC2, 0x10, 0xD4, 0x10, 0xC8, 0x10, 0xCE, 0x10, 0x07, 0x01,
-        0x00, 0x00, 0x16, 0x22, 0x00, 0x04, 0x08, 0x01, 0x00, 0x00, 0x16, 0x26, 0x00, 0x04, 0x09, 0x01,
-        0x00, 0x00, 0x16, 0x2A, 0x00, 0x04, 0x0A, 0x01, 0x00, 0x00, 0x16, 0x2E, 0x00, 0x04, 0x0B, 0x01,
-        0x00, 0x00, 0x10, 0x24, 0x04, 0x04, 0x0C, 0x01, 0x00, 0x00, 0x10, 0x28, 0x04, 0x04, 0x0D, 0x01,
-        0x00, 0x00, 0x10, 0x2C, 0x04, 0x04, 0x0E, 0x01, 0x00, 0x00, 0x10, 0x30, 0x04, 0x04, 0x0F, 0x01,
-        0x00, 0x00, 0x14, 0x34, 0x08, 0x84, 0x10, 0x01, 0x00, 0x00, 0x14, 0x38, 0x08, 0x84, 0x11, 0x01,
-        0x00, 0x00, 0x14, 0x3C, 0x08, 0x84, 0x12, 0x01, 0x00, 0x00, 0x14, 0x40, 0x08, 0x84, 0x13, 0x01,
-        0x00, 0x00, 0x17, 0x64, 0x0C, 0x8B, 0x14, 0x01, 0x00, 0x00, 0x17, 0x68, 0x0C, 0x8B, 0x15, 0x01,
-        0x00, 0x00, 0x17, 0x6C, 0x0C, 0x8B, 0x16, 0x01, 0x00, 0x00, 0x17, 0x70, 0x0C, 0x8B, 0x17, 0x01,
-        0x00, 0x00, 0x17, 0x74, 0x0C, 0x8B, 0x18, 0x01, 0x00, 0x00, 0x17, 0x78, 0x0C, 0x8B, 0x19, 0x01,
-        0x00, 0x00, 0x17, 0x7C, 0x0C, 0x8B, 0x1A, 0x01, 0x00, 0x00, 0x17, 0x80, 0x0C, 0x8B, 0x1B, 0x01,
-        0x00, 0x00, 0x17, 0x84, 0x0C, 0x8B, 0x1C, 0x01, 0x00, 0x00, 0x17, 0x88, 0x0C, 0x8B, 0x1D, 0x01,
-        0x00, 0x00, 0x17, 0x8C, 0x0C, 0x8B, 0x1E, 0x01, 0x00, 0x00, 0x0E, 0x95, 0x17, 0x04, 0x1F, 0x01,
-        0x00, 0x00, 0x0E, 0x99, 0x17, 0x04, 0x20, 0x01, 0x00, 0x00, 0x0E, 0x9D, 0x17, 0x04, 0x21, 0x01,
-        0x00, 0x00, 0x0E, 0xA1, 0x17, 0x04, 0x22, 0x01, 0x00, 0x00, 0x0E, 0xA5, 0x00, 0x00, 0x14, 0x11,
-        0x34, 0x11, 0x54, 0x11, 0x74, 0x11, 0xCC, 0x11, 0x1C, 0x11, 0x3C, 0x11, 0x5C, 0x11, 0x7C, 0x11,
-        0xD4, 0x11, 0x24, 0x11, 0x44, 0x11, 0x64, 0x11, 0x84, 0x11, 0xDC, 0x11, 0x2C, 0x11, 0x4C, 0x11,
-        0x6C, 0x11, 0x8C, 0x11, 0xE4, 0x11, 0x94, 0x11, 0x9C, 0x11, 0xA4, 0x11, 0xAC, 0x11, 0xB4, 0x11,
-        0xBC, 0x11, 0xC4, 0x11, 0xEC, 0x11, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
-        0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
-        0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E,
-        0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x10, 0x10, 0x10, 0x10,
-        0x17, 0x17, 0x17, 0x17, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x11, 0x11, 0x11, 0x11, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x16, 0x16, 0x16, 0x16,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
-        0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x0A, 0x0A, 0x0A,
-        0x0A, 0x7F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x10, 0x10, 0x10, 0x10, 0x7F, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x9D, 0x9D, 0xA1, 0xAA, 0x10, 0x10,
-        0x9D, 0x9D, 0x08, 0x02, 0x06, 0x00, 0xA5, 0xA5, 0xAA, 0xAA, 0x17, 0x17, 0xA2, 0xA2, 0x15, 0x05,
-        0x07, 0x00, 0xAA, 0xAA, 0xB4, 0xB4, 0x1C, 0x1C, 0xA7, 0xA7, 0x1C, 0x0A, 0x08, 0x00, 0xB7, 0xB7,
-        0xC1, 0xC1, 0x09, 0x09, 0xB4, 0xB4, 0x29, 0x17, 0x08, 0x00, 0xBD, 0xBD, 0xC7, 0xC7, 0x0F, 0x0F,
-        0xBA, 0xBA, 0x2F, 0x1D, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x17,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0xE4, 0xF0, 0xFD, 0xF0, 0x1F, 0xF1, 0x60, 0xF6, 0x9B, 0xF0, 0x79, 0xF6, 0x9B, 0xF0, 0x9B, 0xF0,
-        0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0xCC, 0xF7, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0,
-        0x9B, 0xF0, 0x15, 0xF3, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0,
-        0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0,
-        0x9B, 0xF0, 0x66, 0xF3, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0,
-        0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0,
-        0xE3, 0xF2, 0xFE, 0xF2, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0, 0x9B, 0xF0,
-        0xB4, 0x1C, 0x59, 0xF1, 0x6C, 0xF1, 0x1C, 0xF2, 0x20, 0xF2, 0x9B, 0xF0, 0x9B, 0xF0, 0xCF, 0xF2,
-        0x64, 0xE6, 0x3E, 0xE6, 0x92, 0xE6, 0xE1, 0xE6, 0xA9, 0xE7, 0xCF, 0xE7, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x12, 0xF1, 0x35, 0xF1, 0x5D, 0xF6, 0x5D, 0xF6, 0x6D, 0xF6, 0x86, 0xF6, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0xC0, 0xF3, 0xF2, 0xF5, 0x5A, 0x00, 0x02, 0x00, 0xF9, 0xFF,
-        0xC0, 0xF3, 0xD6, 0xF3, 0xCA, 0x00, 0x02, 0x00, 0xF7, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xB0, 0x26,
-        0x06, 0x00, 0xF0, 0xFF, 0xC0, 0xF3, 0xAA, 0xF3, 0x00, 0x00, 0x00, 0x02, 0xF6, 0xFF, 0xC0, 0xF3,
-        0xD6, 0xF3, 0x6C, 0x00, 0x02, 0x00, 0xF4, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0x68, 0x01, 0x02, 0x00,
-        0xF5, 0xFF, 0xC0, 0xF3, 0xFB, 0xF5, 0xA2, 0x26, 0x02, 0x00, 0xED, 0xFF, 0xC0, 0xF3, 0x0D, 0xF6,
-        0x9E, 0x2B, 0x02, 0x00, 0xEC, 0xFF, 0xC0, 0xF3, 0x3B, 0xF6, 0xA0, 0x2B, 0x02, 0x00, 0xEB, 0xFF,
-        0xC0, 0xF3, 0x41, 0xF6, 0xA2, 0x2B, 0x02, 0x00, 0xEE, 0xFF, 0xC0, 0xF3, 0x47, 0xF6, 0xD6, 0x2B,
-        0x02, 0x00, 0xDA, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xD0, 0x13, 0x0C, 0x00, 0xEA, 0xFF, 0xC0, 0xF3,
-        0xAA, 0xF3, 0xEC, 0x2B, 0x06, 0x00, 0xE9, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xF2, 0x2B, 0x02, 0x00,
-        0xE8, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xF4, 0x2B, 0x02, 0x00, 0xE7, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3,
-        0xF6, 0x2B, 0x02, 0x00, 0xE6, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xF8, 0x2B, 0x02, 0x00, 0xE5, 0xFF,
-        0xC0, 0xF3, 0xD6, 0xF3, 0xFA, 0x2B, 0x10, 0x00, 0xE4, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0x0A, 0x2C,
-        0x18, 0x00, 0xDB, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0x22, 0x2C, 0x02, 0x00, 0xDC, 0xFF, 0xC0, 0xF3,
-        0xD6, 0xF3, 0x24, 0x2C, 0x02, 0x00, 0xE1, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xC6, 0x2C, 0x02, 0x00,
-        0xE0, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3, 0xC4, 0x2C, 0x02, 0x00, 0xE3, 0xFF, 0xC0, 0xF3, 0xD6, 0xF3,
-        0xA8, 0x2C, 0x02, 0x00, 0xE2, 0xFF, 0x0E, 0xF4, 0xAA, 0xF3, 0x7E, 0x2C, 0x24, 0x00, 0x03, 0xFC,
-        0xC0, 0xF3, 0x3A, 0xF5, 0x92, 0x2B, 0x02, 0x00, 0x04, 0xFC, 0xC0, 0xF3, 0xD0, 0xF3, 0xBA, 0x26,
-        0x22, 0x00, 0x06, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0xA0, 0x26, 0x02, 0x00, 0x07, 0xFC, 0xC0, 0xF3,
-        0xD6, 0xF3, 0xFE, 0x26, 0x02, 0x00, 0x0E, 0xFC, 0xC0, 0xF3, 0x63, 0xF5, 0x08, 0x27, 0x22, 0x00,
-        0xB1, 0xFC, 0xC0, 0xF3, 0x88, 0xF8, 0x2A, 0x28, 0x02, 0x00, 0x20, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3,
-        0x2E, 0x27, 0x02, 0x00, 0x25, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x3A, 0x27, 0x02, 0x00, 0x26, 0xFC,
-        0xC0, 0xF3, 0xD6, 0xF3, 0x3C, 0x27, 0x02, 0x00, 0x27, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x3E, 0x27,
-        0x02, 0x00, 0xB2, 0xFC, 0xC0, 0xF3, 0xD0, 0xF3, 0x4E, 0x28, 0x22, 0x00, 0xC1, 0xFC, 0xC0, 0xF3,
-        0xD6, 0xF3, 0x56, 0x2C, 0x20, 0x00, 0xB0, 0xFC, 0xA0, 0xF3, 0x8C, 0xF8, 0x00, 0x00, 0x00, 0x00,
-        0xC4, 0xFC, 0xA0, 0xF3, 0x54, 0xF6, 0x00, 0x00, 0x08, 0x00, 0xC8, 0xFC, 0xA0, 0xF3, 0x52, 0xF6,
-        0x00, 0x00, 0x08, 0x00, 0xB4, 0xFC, 0xA0, 0xF3, 0xC0, 0xF8, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xFC,
-        0xA0, 0xF3, 0x6A, 0xF9, 0x00, 0x00, 0x00, 0x00, 0xB7, 0xFC, 0xA0, 0xF3, 0xAC, 0xF9, 0x00, 0x00,
-        0x00, 0x00, 0xB8, 0xFC, 0xA0, 0xF3, 0x02, 0xFA, 0x00, 0x00, 0x00, 0x00, 0xBC, 0xFC, 0xA0, 0xF3,
-        0x3B, 0xFA, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xFC, 0xA0, 0xF3, 0xC3, 0xFA, 0x00, 0x00, 0x00, 0x00,
-        0xBE, 0xFC, 0xA0, 0xF3, 0xEF, 0xFA, 0x00, 0x00, 0x00, 0x00, 0xBF, 0xFC, 0xA0, 0xF3, 0x3C, 0xFB,
-        0x00, 0x00, 0x00, 0x00, 0xB3, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0xA2, 0x0F, 0x10, 0x00, 0xB5, 0xFC,
-        0xC0, 0xF3, 0xD6, 0xF3, 0xA4, 0x2C, 0x02, 0x00, 0xB9, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0xA6, 0x2C,
-        0x02, 0x00, 0x90, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0xAA, 0x2C, 0x02, 0x00, 0x88, 0xFC, 0xC0, 0xF3,
-        0xD6, 0xF3, 0x78, 0x2B, 0x04, 0x00, 0x89, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x7C, 0x2B, 0x04, 0x00,
-        0xC5, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x80, 0x2B, 0x04, 0x00, 0x23, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3,
-        0x34, 0x27, 0x04, 0x00, 0x2A, 0xFC, 0xC0, 0xF3, 0x2C, 0xF4, 0xB6, 0x26, 0x02, 0x00, 0xC7, 0xFD,
-        0xC0, 0xF3, 0xAA, 0xF3, 0xA6, 0x2B, 0x0A, 0x00, 0x29, 0xFC, 0x7F, 0xF4, 0x43, 0xF4, 0x00, 0x00,
-        0x00, 0x00, 0xC2, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x86, 0x2B, 0x08, 0x00, 0x32, 0xFC, 0xC0, 0xF3,
-        0xD6, 0xF3, 0x5C, 0x01, 0x02, 0x00, 0x33, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x5E, 0x01, 0x02, 0x00,
-        0x35, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x8E, 0x2B, 0x02, 0x00, 0xC7, 0xFC, 0xC0, 0xF3, 0xEB, 0xF5,
-        0x90, 0x2B, 0x02, 0x00, 0x10, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0xA8, 0x26, 0x02, 0x00, 0x11, 0xFC,
-        0xC0, 0xF3, 0xD6, 0xF3, 0x44, 0x27, 0x06, 0x00, 0x12, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x4A, 0x27,
-        0x06, 0x00, 0x13, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x50, 0x27, 0x06, 0x00, 0x14, 0xFC, 0xC0, 0xF3,
-        0xD6, 0xF3, 0x56, 0x27, 0x06, 0x00, 0x15, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x5C, 0x27, 0x06, 0x00,
-        0x16, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x62, 0x27, 0x06, 0x00, 0x17, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3,
-        0x2A, 0x27, 0x02, 0x00, 0x83, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x6C, 0x01, 0x02, 0x00, 0x97, 0xFC,
-        0xC0, 0xF3, 0xD6, 0xF3, 0x6A, 0x01, 0x02, 0x00, 0x98, 0xFC, 0xD7, 0xF5, 0xC5, 0xF5, 0xEC, 0x00,
-        0x02, 0x00, 0x99, 0xFC, 0xD7, 0xF5, 0xC5, 0xF5, 0xEC, 0x02, 0x02, 0x00, 0x9A, 0xFC, 0xD7, 0xF5,
-        0xC5, 0xF5, 0xEC, 0x04, 0x02, 0x00, 0x9B, 0xFC, 0xD7, 0xF5, 0xC5, 0xF5, 0xEC, 0x06, 0x02, 0x00,
-        0x9C, 0xFC, 0xD7, 0xF5, 0xC5, 0xF5, 0xEC, 0x08, 0x02, 0x00, 0x9D, 0xFC, 0xD7, 0xF5, 0xC5, 0xF5,
-        0xEC, 0x0A, 0x02, 0x00, 0x18, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x2C, 0x27, 0x02, 0x00, 0x22, 0xFC,
-        0xC0, 0xF3, 0xD6, 0xF3, 0x32, 0x27, 0x02, 0x00, 0x24, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x38, 0x27,
-        0x02, 0x00, 0xC0, 0xFC, 0xA0, 0xF3, 0x50, 0xF6, 0x00, 0x00, 0x06, 0x00, 0x9E, 0xFC, 0xC0, 0xF3,
-        0x83, 0xF5, 0x6E, 0x01, 0x04, 0x00, 0x9F, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x3E, 0x2C, 0x04, 0x00,
-        0xA0, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x42, 0x2C, 0x04, 0x00, 0xA1, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3,
-        0x46, 0x2C, 0x04, 0x00, 0xA2, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x4A, 0x2C, 0x04, 0x00, 0xA3, 0xFC,
-        0xC0, 0xF3, 0xD6, 0xF3, 0x4E, 0x2C, 0x04, 0x00, 0xA4, 0xFC, 0xC0, 0xF3, 0xD6, 0xF3, 0x52, 0x2C,
-        0x04, 0x00, 0x20, 0xFD, 0xF1, 0xF3, 0xAA, 0xF3, 0xD5, 0xFB, 0x08, 0x00, 0x21, 0xFD, 0xF1, 0xF3,
-        0xAA, 0xF3, 0xD9, 0xFB, 0x0A, 0x00, 0x22, 0xFD, 0xF1, 0xF3, 0xAA, 0xF3, 0xDE, 0xFB, 0x16, 0x00,
-        0x23, 0xFD, 0xF1, 0xF3, 0xAA, 0xF3, 0xE9, 0xFB, 0x0A, 0x00, 0x45, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3,
-        0xCA, 0x00, 0x02, 0x00, 0x47, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0x36, 0x01, 0x02, 0x00, 0x48, 0xFD,
-        0xD4, 0xF4, 0xAA, 0xF3, 0x5C, 0x01, 0x02, 0x00, 0x49, 0xFD, 0xD4, 0xF4, 0xAA, 0xF3, 0x5E, 0x01,
-        0x02, 0x00, 0x4A, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0x56, 0x01, 0x02, 0x00, 0x4B, 0xFD, 0xC0, 0xF3,
-        0xAA, 0xF3, 0x58, 0x01, 0x02, 0x00, 0x4D, 0xFD, 0xF1, 0xF3, 0xAA, 0xF3, 0xEE, 0xFB, 0x08, 0x00,
-        0x4F, 0xFD, 0xE8, 0xF4, 0xAA, 0xF3, 0x96, 0x2B, 0x02, 0x00, 0xC2, 0xFD, 0xDE, 0xF4, 0xAA, 0xF3,
-        0x00, 0x00, 0x02, 0x00, 0x40, 0xFD, 0xE9, 0xF3, 0xAA, 0xF3, 0x78, 0x01, 0x02, 0x00, 0x24, 0xFD,
-        0x01, 0xF5, 0xAA, 0xF3, 0x00, 0x00, 0x02, 0x00, 0x91, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0xCC, 0x1E,
-        0x02, 0x00, 0x93, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0xD2, 0x1E, 0x02, 0x00, 0x8F, 0xFD, 0x0E, 0xF5,
-        0xAA, 0xF3, 0x00, 0x00, 0x08, 0x00, 0xC1, 0xFD, 0x92, 0xF6, 0xAA, 0xF3, 0xC8, 0x00, 0x02, 0x00,
-        0xC6, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0x20, 0x30, 0x04, 0x00, 0x25, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3,
-        0x62, 0x01, 0x02, 0x00, 0x89, 0xFD, 0x96, 0xF4, 0xAA, 0xF3, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xFD,
-        0x0E, 0xF4, 0xAA, 0xF3, 0x7E, 0x2C, 0x24, 0x00, 0x46, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0x7A, 0x01,
-        0x06, 0x00, 0x86, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3, 0xB0, 0x26, 0x06, 0x00, 0x87, 0xFD, 0xC0, 0xF3,
-        0xAA, 0xF3, 0x76, 0x2C, 0x06, 0x00, 0x8B, 0xFD, 0x96, 0xF9, 0xAA, 0xF3, 0x00, 0x00, 0x12, 0x00,
-        0x8B, 0xFD, 0x96, 0xF9, 0xAA, 0xF3, 0x00, 0x00, 0x12, 0x00, 0x8E, 0xFD, 0xC0, 0xF3, 0xAA, 0xF3,
-        0xEE, 0x14, 0x02, 0x00, 0x80, 0xFD, 0xEF, 0xF4, 0xAA, 0xF3, 0x22, 0x00, 0x02, 0x00, 0x81, 0xFD,
-        0xEF, 0xF4, 0xAA, 0xF3, 0x22, 0x02, 0x02, 0x00, 0x82, 0xFD, 0xEF, 0xF4, 0xAA, 0xF3, 0x22, 0x04,
-        0x02, 0x00, 0x83, 0xFD, 0xEF, 0xF4, 0xAA, 0xF3, 0x22, 0x06, 0x02, 0x00, 0x84, 0xFD, 0xEF, 0xF4,
-        0xAA, 0xF3, 0x22, 0x08, 0x02, 0x00, 0x85, 0xFD, 0xEF, 0xF4, 0xAA, 0xF3, 0x22, 0x0A, 0x02, 0x00,
-        0x00, 0xF1, 0x46, 0x00, 0x64, 0xF3, 0xF6, 0x00, 0x00, 0x03, 0x8E, 0xF7, 0x1F, 0x00, 0x34, 0x01,
-        0xC8, 0x00, 0x96, 0x01, 0xCC, 0x00, 0xFA, 0x00, 0x78, 0x01, 0xD2, 0x25, 0x18, 0x01, 0xCC, 0x1E,
-        0xC8, 0x00, 0x00, 0x00, 0x02, 0x15, 0x00, 0x00, 0x06, 0x17, 0x12, 0x01, 0x03, 0x00, 0xAE, 0x00,
-        0xEC, 0x00, 0x44, 0x00, 0xDC, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x09, 0x08, 0x24, 0x28, 0x06,
-        0x0C, 0x18, 0x08, 0x30, 0x14, 0x0C, 0x08, 0x36, 0x10, 0x12, 0xA1, 0xB6, 0x14, 0xB6, 0x50, 0xB7,
-        0x59, 0xB7, 0x25, 0xB6, 0xCE, 0xB6, 0x93, 0xB6, 0x15, 0x1C, 0xD0, 0x1A, 0x15, 0x1C, 0x8B, 0x1B,
-        0xEE, 0x1A, 0xCB, 0x1A, 0xD2, 0x1B, 0xF1, 0x1B, 0x06, 0x1C, 0x48, 0x1C, 0x74, 0x1C, 0x74, 0x1B,
-        0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46,
-        0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x23, 0x46, 0x23, 0x46, 0x23, 0x46, 0x1C, 0x47, 0x1C, 0x47,
-        0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47,
-        0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1D, 0x47, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48,
-        0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48,
-        0x9A, 0x48, 0x33, 0x48, 0x78, 0x49, 0x78, 0x49, 0x79, 0x49, 0x79, 0x49, 0x79, 0x49, 0x79, 0x49,
-        0x7A, 0x49, 0x7A, 0x49, 0x7A, 0x49, 0x7A, 0x49, 0x7B, 0x49, 0x7B, 0x49, 0x7B, 0x49, 0x7C, 0x49,
-        0xD8, 0x03, 0xDC, 0x03, 0xE0, 0x03, 0xE4, 0x03, 0xF0, 0x03, 0xF4, 0x03, 0xF8, 0x03, 0x0A, 0x04,
-        0x0E, 0x04, 0x12, 0x04, 0x16, 0x04, 0x0C, 0x04, 0x10, 0x04, 0x14, 0x04, 0x18, 0x04, 0x1C, 0x04,
-        0x20, 0x04, 0x24, 0x04, 0x28, 0x04, 0x4C, 0x04, 0x50, 0x04, 0x54, 0x04, 0x58, 0x04, 0x5C, 0x04,
-        0x60, 0x04, 0x64, 0x04, 0x68, 0x04, 0x6C, 0x04, 0x70, 0x04, 0x74, 0x04, 0x7D, 0x04, 0x81, 0x04,
-        0x85, 0x04, 0x89, 0x04, 0x8D, 0x04, 0x10, 0x00, 0x8E, 0x19, 0xAC, 0x00, 0x04, 0x00, 0x00, 0x00,
-        0x00, 0x80, 0x3C, 0x0C, 0x00, 0x00, 0xFF, 0x3F, 0x44, 0x04, 0x00, 0x00, 0xD3, 0x22, 0x44, 0x04,
-        0x9C, 0x02, 0xCB, 0x54, 0x44, 0x04, 0x00, 0x00, 0x01, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x03,
-        0x00, 0x0C, 0x71, 0x00, 0x30, 0x50, 0x20, 0x00, 0x80, 0xBF, 0x1F, 0xA6, 0x28, 0x00, 0x0B, 0x02,
-        0x60, 0x84, 0x4C, 0x00, 0x02, 0x00, 0x4B, 0x1C, 0x98, 0x00, 0x00, 0x00, 0x20, 0x0B, 0x34, 0x04,
-        0xFD, 0x34, 0x34, 0x00, 0x38, 0x04, 0xFD, 0x34, 0x34, 0x00, 0x3C, 0x04, 0x01, 0x00, 0x10, 0x00,
-        0x00, 0x08, 0x00, 0x52, 0x14, 0x00, 0x04, 0x08, 0x0E, 0x32, 0x00, 0xA6, 0x10, 0x08, 0xC4, 0x03,
-        0x50, 0x60, 0x18, 0x08, 0xF0, 0x3F, 0xFC, 0x01, 0x10, 0x0C, 0x00, 0x00, 0x80, 0x04, 0x14, 0x0C,
-        0x00, 0x00, 0x00, 0x41, 0x20, 0x0C, 0xB0, 0x00, 0xB0, 0xB8, 0x24, 0x0C, 0x00, 0x00, 0xAB, 0x05,
-        0x2C, 0x0C, 0x80, 0x05, 0x00, 0xFF, 0x30, 0x0C, 0x00, 0x00, 0xB0, 0x04, 0x34, 0x0C, 0x03, 0x00,
-        0x00, 0xE8, 0x44, 0x0C, 0x04, 0x00, 0xFF, 0x0F, 0x00, 0x10, 0x2E, 0x00, 0x0C, 0xE3, 0x44, 0x04,
-        0x00, 0x00, 0x01, 0x04, 0x44, 0x04, 0x00, 0x00, 0x01, 0x01, 0x44, 0x04, 0x00, 0x00, 0x01, 0x00,
-        0x44, 0x04, 0x00, 0x00, 0x01, 0x04, 0x44, 0x04, 0x00, 0x00, 0x80, 0x03, 0x48, 0x0C, 0x00, 0x00,
-        0x7F, 0x00, 0x04, 0x04, 0x08, 0x48, 0x00, 0x00, 0x04, 0x04, 0x08, 0x40, 0x00, 0x00, 0x00, 0x0C,
-        0x71, 0x00, 0x30, 0x30, 0x00, 0x00, 0x5E, 0x40, 0x01, 0x00, 0x18, 0x00, 0x36, 0xC0, 0xE8, 0x0E,
-        0x1C, 0x00, 0x78, 0xC8, 0xA5, 0x40, 0x24, 0x00, 0x9E, 0xB0, 0xB9, 0x95, 0x08, 0x08, 0x00, 0xEA,
-        0x40, 0x01, 0x0C, 0x08, 0x00, 0xEA, 0x00, 0x00, 0x1C, 0x08, 0x00, 0x00, 0x42, 0x07, 0x20, 0x08,
-        0x7B, 0x00, 0xD4, 0x09, 0x2C, 0x04, 0x14, 0x00, 0x50, 0x14, 0x30, 0x04, 0x28, 0x0F, 0x28, 0x7F,
-        0x18, 0x08, 0x20, 0x00, 0xFC, 0x01, 0x04, 0x10, 0x69, 0x00, 0xFD, 0xC3, 0x08, 0x10, 0x69, 0x00,
-        0xFD, 0xC3, 0x08, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0C,
-        0x00, 0x00, 0x7F, 0x00, 0x04, 0x04, 0x08, 0x48, 0x02, 0x00, 0x00, 0x00, 0x5E, 0x48, 0x00, 0x00,
-        0x04, 0x04, 0x08, 0x40, 0x02, 0x00, 0x00, 0x0C, 0x71, 0x00, 0x30, 0x50, 0x00, 0x00, 0x5E, 0x48,
-        0x01, 0x00, 0x18, 0x00, 0x3A, 0xC0, 0xE8, 0x04, 0x1C, 0x00, 0x78, 0xD0, 0xA5, 0x40, 0x24, 0x00,
-        0x9E, 0xB0, 0xB9, 0x85, 0x2C, 0x04, 0x14, 0x00, 0x50, 0x14, 0x30, 0x04, 0x28, 0x0F, 0x28, 0x7F,
-        0x08, 0x08, 0x00, 0xEA, 0x40, 0x01, 0x0C, 0x08, 0x00, 0xEA, 0x00, 0x00, 0x1C, 0x08, 0x00, 0x00,
-        0x42, 0x07, 0x20, 0x08, 0x7B, 0x00, 0xD4, 0x09, 0x18, 0x08, 0xF0, 0x3F, 0xFC, 0x01, 0x04, 0x10,
-        0x69, 0x00, 0xDD, 0xCD, 0x08, 0x10, 0x69, 0x00, 0xDD, 0xCD, 0x08, 0x0C, 0x00, 0x00, 0x00, 0x00,
-        0x48, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x08, 0x04, 0x40, 0x01, 0x41, 0x01, 0x0C, 0x04, 0x40, 0x04,
-        0x41, 0x04, 0x10, 0x04, 0xD6, 0x08, 0x56, 0x0A, 0x14, 0x04, 0x42, 0x02, 0x56, 0x0A, 0x18, 0x04,
-        0x56, 0x0A, 0x40, 0x02, 0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x20, 0x04, 0xC2, 0x00, 0xD6, 0x08,
-        0x24, 0x04, 0xD6, 0x08, 0xC0, 0x00, 0x28, 0x04, 0xC2, 0x08, 0xC2, 0x28, 0x08, 0x04, 0x40, 0x01,
-        0x41, 0x01, 0x0C, 0x04, 0x00, 0x01, 0x01, 0x01, 0x10, 0x04, 0x56, 0x0A, 0x56, 0x0A, 0x14, 0x04,
-        0x42, 0x02, 0x56, 0x0A, 0x18, 0x04, 0x56, 0x0A, 0x40, 0x02, 0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A,
-        0x20, 0x04, 0x42, 0x02, 0x56, 0x0A, 0x24, 0x04, 0x56, 0x0A, 0x40, 0x02, 0x28, 0x04, 0x42, 0x0A,
-        0x42, 0x2A, 0x08, 0x04, 0x40, 0x01, 0x41, 0x01, 0x0C, 0x04, 0x40, 0x04, 0x41, 0x04, 0x10, 0x04,
-        0xCE, 0x08, 0x4E, 0x0A, 0x14, 0x04, 0x42, 0x02, 0x4E, 0x0A, 0x18, 0x04, 0x4E, 0x0A, 0x40, 0x02,
-        0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x20, 0x04, 0xC2, 0x00, 0xCE, 0x08, 0x24, 0x04, 0xCE, 0x08,
-        0xC0, 0x00, 0x28, 0x04, 0xC2, 0x08, 0xC2, 0x28, 0x08, 0x04, 0x40, 0x01, 0x41, 0x01, 0x0C, 0x04,
-        0x00, 0x01, 0x01, 0x01, 0x10, 0x04, 0x4E, 0x0A, 0x4E, 0x0A, 0x14, 0x04, 0x42, 0x02, 0x4E, 0x0A,
-        0x18, 0x04, 0x4E, 0x0A, 0x40, 0x02, 0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x20, 0x04, 0x42, 0x02,
-        0x4E, 0x0A, 0x24, 0x04, 0x4E, 0x0A, 0x40, 0x02, 0x28, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00,
-        0x05, 0x00, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x17, 0xA0, 0x17, 0xA0, 0x17,
-        0xA0, 0x18, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0x00, 0x00, 0x65, 0x00, 0x65, 0x00, 0x65, 0x00, 0x65, 0x00, 0x5D, 0x00, 0x52, 0x00,
-        0x48, 0x00, 0x40, 0x00, 0x38, 0x00, 0x31, 0x00, 0x2C, 0x00, 0x27, 0x00, 0x23, 0x00, 0x1F, 0x00,
-        0x00, 0x00, 0x65, 0x00, 0x65, 0x00, 0x65, 0x00, 0x65, 0x00, 0x5D, 0x00, 0x52, 0x00, 0x48, 0x00,
-        0x40, 0x00, 0x38, 0x00, 0x31, 0x00, 0x2C, 0x00, 0x27, 0x00, 0x23, 0x00, 0x1F, 0x00, 0x00, 0x00,
-        0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00,
-        0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
-        0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20,
-        0x53, 0x53, 0x49, 0x44, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x01, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00,
-        0x48, 0x45, 0x52, 0x4D, 0x45, 0x53, 0x20, 0x32, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x14, 0x00, 0x03, 0x00, 0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66,
-        0x69, 0x65, 0x64, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00,
-        0x64, 0x00, 0x00, 0x00, 0x48, 0x45, 0x52, 0x4D, 0x45, 0x53, 0x20, 0x32, 0x00, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00,
-        0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x57, 0x61,
-        0x76, 0x65, 0x4C, 0x41, 0x4E, 0x20, 0x49, 0x49, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0xFF, 0x0F, 0xF0, 0x0F, 0x0F, 0x00, 0x50, 0x01, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x14, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x07, 0x00, 0x30, 0x00, 0xFF, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00,
-        0x0A, 0x00, 0x0A, 0x00, 0x0B, 0x00, 0x0B, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x0A, 0x00,
-        0x00, 0x00, 0x02, 0x01, 0x02, 0x04, 0x0B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x82, 0x84,
-        0x8B, 0x96, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x1B, 0x00, 0x17, 0x00, 0x11, 0x00, 0x10, 0x00, 0x0B, 0x00,
-        0x0B, 0x00, 0x09, 0x00, 0x17, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x09, 0x00,
-        0x08, 0x00, 0x07, 0x00, 0x0D, 0x00, 0x0A, 0x00, 0x09, 0x00, 0x08, 0x00, 0x05, 0x00, 0x05, 0x00,
-        0xD8, 0x0C, 0xC0, 0x08, 0x90, 0x0D, 0x60, 0x09, 0x48, 0x0E, 0x30, 0x0A, 0x24, 0x0F, 0x18, 0x0B,
-        0x0B, 0x6E, 0x0B, 0x37, 0x02, 0x14, 0x01, 0x0A, 0xFF, 0x0F, 0xF0, 0x0F, 0xFF, 0x0F, 0xF0, 0x0F,
-        0xFF, 0x0F, 0xF0, 0x0F, 0xFF, 0x0F, 0xF0, 0x0F, 0xFF, 0x0F, 0xF0, 0x0F, 0xFF, 0x0F, 0xF0, 0x0F,
-        0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x03, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xDD, 0x00, 0x50, 0xF2, 0x01, 0x01, 0x00,
-        0x00, 0x50, 0xF2, 0x05, 0x02, 0x00, 0x00, 0x50, 0xF2, 0x02, 0x00, 0x50, 0xF2, 0x04, 0x02, 0x00,
-        0x00, 0x50, 0xF2, 0x00, 0x00, 0x50, 0xF2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x04, 0x00, 0x15, 0x00, 0x02, 0x00,
-        0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x04, 0x00, 0x10, 0x00, 0x02, 0x00, 0x04, 0x00, 0x04, 0x00,
-        0x15, 0x00, 0x20, 0x00, 0x11, 0x00, 0x20, 0x00, 0x16, 0x26, 0xE2, 0x2B, 0xEA, 0x2D, 0xC4, 0x2D,
-        0xEE, 0x2D, 0x7E, 0x2C, 0x1E, 0x2E, 0x22, 0x2E, 0xFF, 0xFF, 0x2C, 0x2E, 0x00, 0x00, 0x4E, 0x28,
-        0xD8, 0x2B, 0x22, 0x2E, 0xFF, 0xFF, 0x00, 0x00, 0x16, 0x26, 0xE2, 0x2B, 0xEA, 0x2D, 0xFF, 0xFF,
-        0xEE, 0x2D, 0x7E, 0x2C, 0x1E, 0x2E, 0x22, 0x2E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0x2C, 0x2E, 0x00, 0x00, 0xE2, 0x2B, 0x34, 0x2E, 0x22, 0x2E, 0x00, 0x00, 0x00, 0x05,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x06, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2A, 0x00, 0x00, 0x08, 0x32, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x80, 0x00, 0x60, 0x1D, 0x00, 0x00, 0x00, 0x0D, 0x81,
-        0x00, 0x60, 0x1D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00,
-        0x00, 0x00, 0xDD, 0x00, 0xFF, 0xFF, 0x97, 0xDA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x10, 0x00, 0x19, 0x0A, 0x09, 0x46, 0x1C, 0x60, 0x18, 0x00, 0x19, 0x1D, 0x09, 0x42,
-        0x1C, 0x60,
-
-};  /* fw_image_2_data */
-
-static const hcf_8 fw_image_3_data[] = {
-        0x00, 0x60, 0x46, 0x74, 0xCD, 0xE2, 0x04, 0xE1, 0x02, 0x60, 0x00, 0xE1, 0x82, 0xF3, 0x21, 0x60,
-        0xCE, 0x61, 0x60, 0x40, 0x01, 0x2B, 0x02, 0x00, 0x21, 0x60, 0x56, 0x61, 0x0F, 0x60, 0xE8, 0x64,
-        0x59, 0xD1, 0x58, 0xD9, 0x59, 0xD1, 0x58, 0xD9, 0x3F, 0x44, 0x40, 0x26, 0x05, 0x00, 0x18, 0x60,
-        0x22, 0xF3, 0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x50, 0x3F, 0x40, 0x02, 0x2B, 0x03, 0x00, 0x18, 0x60,
-        0x74, 0x78, 0xFF, 0xFF, 0x04, 0x29, 0xFE, 0x01, 0xC4, 0xE2, 0x43, 0x64, 0x3A, 0xDB, 0x82, 0xF3,
-        0xFF, 0xFF, 0x60, 0x41, 0x3F, 0x44, 0xFF, 0x01, 0x3F, 0x40, 0x40, 0x26, 0x05, 0x00, 0x18, 0x60,
-        0x20, 0xF3, 0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x52, 0xC4, 0xE2, 0x00, 0x63, 0x81, 0xFD, 0x32, 0x7B,
-        0x4D, 0xE2, 0xBF, 0xFE, 0xC4, 0xE2, 0x41, 0xFF, 0xE0, 0xFE, 0xE1, 0xFE, 0xE2, 0xFE, 0x43, 0xFF,
-        0x44, 0xFF, 0x46, 0xFF, 0x83, 0xF3, 0x62, 0xFF, 0x60, 0x40, 0x05, 0x36, 0x2D, 0xFF, 0x07, 0x36,
-        0xD5, 0xFE, 0x08, 0xE1, 0x88, 0x60, 0x85, 0x71, 0x8D, 0xE2, 0xA3, 0x60, 0x30, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x10, 0x62, 0x1A, 0x60, 0x58, 0x4D, 0xB4, 0x78, 0xFF, 0xFF, 0x64, 0x41, 0xA9, 0x9C,
-        0x60, 0x45, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF, 0x82, 0xF1, 0x09, 0x60, 0xB4, 0x61,
-        0x64, 0x44, 0x01, 0x27, 0x24, 0x00, 0x60, 0x40, 0x0E, 0x3A, 0x0D, 0x00, 0x01, 0x7C, 0x10, 0x60,
-        0xF2, 0xF9, 0x44, 0x60, 0x08, 0x7C, 0x10, 0x60, 0xC4, 0xF9, 0x12, 0x60, 0xE5, 0xF1, 0x02, 0x60,
-        0xB0, 0x61, 0xB1, 0x9C, 0x26, 0x00, 0x00, 0x7C, 0x10, 0x60, 0xF2, 0xF9, 0x40, 0x60, 0x08, 0x7C,
-        0x10, 0x60, 0xC4, 0xF9, 0x12, 0x60, 0xE5, 0xF1, 0x02, 0x60, 0x90, 0x61, 0xB1, 0x9C, 0x09, 0x60,
-        0x67, 0x65, 0xFF, 0xB4, 0xC4, 0x85, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81, 0x12, 0x00, 0xFF, 0xB4,
-        0xED, 0xA0, 0x25, 0x60, 0xCC, 0x61, 0x04, 0x04, 0xE2, 0xA0, 0xD9, 0x81, 0x01, 0x04, 0xD9, 0x81,
-        0xA1, 0xD1, 0x02, 0x60, 0x50, 0x61, 0x1F, 0x60, 0xF6, 0x65, 0xE0, 0x84, 0x44, 0xD3, 0xB1, 0x9C,
-        0xC8, 0x81, 0x61, 0x47, 0x00, 0x7E, 0xE9, 0x81, 0x07, 0x60, 0xF0, 0x65, 0xA5, 0x81, 0x0B, 0xB9,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x85, 0xB5, 0x85, 0x04, 0x60, 0x44, 0x62, 0x1A, 0x60, 0x58, 0x4D,
-        0x88, 0x78, 0xFF, 0xFF, 0x82, 0xF3, 0xC8, 0x61, 0x61, 0x54, 0xCD, 0xE2, 0x60, 0x40, 0x01, 0x27,
-        0x2E, 0x00, 0xCC, 0x84, 0xE0, 0x85, 0x15, 0x60, 0xA2, 0xE7, 0x1F, 0x60, 0x86, 0x64, 0x1A, 0x60,
-        0x58, 0x4F, 0x7D, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0xA2, 0x64, 0x1A, 0x60, 0x58, 0x4F, 0x7D, 0x78,
-        0xFF, 0xFF, 0x1F, 0x60, 0xBE, 0x64, 0x1A, 0x60, 0x58, 0x4F, 0x7D, 0x78, 0xFF, 0xFF, 0x1F, 0x60,
-        0xDA, 0x64, 0x1A, 0x60, 0x58, 0x4F, 0x7D, 0x78, 0xFF, 0xFF, 0x75, 0x64, 0x06, 0x61, 0x61, 0x48,
-        0x60, 0x44, 0x80, 0xBC, 0xFF, 0xB4, 0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x21, 0x60,
-        0xEC, 0x7C, 0x07, 0x60, 0xE9, 0xF9, 0x21, 0x60, 0x74, 0x63, 0x14, 0x61, 0x21, 0x00, 0x11, 0x60,
-        0x62, 0xF1, 0xFF, 0xB4, 0xED, 0xA0, 0x64, 0x41, 0x04, 0x04, 0xE2, 0xA0, 0xD9, 0x81, 0x01, 0x04,
-        0xD9, 0x81, 0xA1, 0xD1, 0x10, 0x60, 0x91, 0xF3, 0x64, 0x41, 0xFF, 0xB1, 0xFF, 0x60, 0x00, 0x65,
-        0xA4, 0x84, 0x34, 0x94, 0xA2, 0xDB, 0x5A, 0xD3, 0x64, 0x41, 0xA5, 0x81, 0xFF, 0xB4, 0x34, 0x94,
-        0xA2, 0xDB, 0x22, 0x60, 0x58, 0x7C, 0x07, 0x60, 0xE9, 0xF9, 0x21, 0x60, 0x02, 0x63, 0x13, 0x61,
-        0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x07, 0x60, 0xE9, 0xF3, 0x31, 0x40, 0x80, 0x26,
-        0x36, 0xA4, 0x07, 0x60, 0xE9, 0xFB, 0x60, 0x43, 0x09, 0x61, 0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78,
-        0xFF, 0xFF, 0x82, 0xF3, 0x22, 0x60, 0xC4, 0x61, 0x00, 0x7C, 0x7E, 0x63, 0x59, 0xD9, 0xFE, 0x1F,
-        0x60, 0x40, 0x01, 0x27, 0x03, 0x00, 0x23, 0x60, 0x46, 0x65, 0x15, 0x00, 0xFF, 0xB4, 0xF9, 0xA0,
-        0x23, 0x60, 0x68, 0x65, 0x01, 0x7C, 0x0D, 0x04, 0xED, 0xA0, 0x23, 0x60, 0x8A, 0x65, 0x11, 0x7C,
-        0x08, 0x04, 0xE2, 0xA0, 0x23, 0x60, 0xAC, 0x65, 0x21, 0x7C, 0x03, 0x04, 0x23, 0x60, 0xCE, 0x65,
-        0x31, 0x7C, 0x64, 0x5F, 0x64, 0xFB, 0xA5, 0xD3, 0xDA, 0x85, 0xF0, 0xA0, 0x22, 0x60, 0xC4, 0x61,
-        0x08, 0x06, 0x40, 0x54, 0x58, 0x53, 0x08, 0xFF, 0xA2, 0x60, 0xE7, 0x64, 0x43, 0xFB, 0x08, 0xFF,
-        0xFF, 0x01, 0x60, 0x43, 0x60, 0x46, 0xA5, 0xD1, 0xDA, 0x85, 0xA5, 0xD3, 0xDA, 0x85, 0x59, 0xD9,
-        0x59, 0xDB, 0x59, 0xD9, 0x59, 0xDB, 0xFB, 0x1F, 0x0C, 0x63, 0xA5, 0xD1, 0xDA, 0x85, 0xA5, 0xD3,
-        0xDA, 0x85, 0x59, 0xD9, 0x59, 0xDB, 0x59, 0xD9, 0x59, 0xDB, 0xF7, 0x1F, 0x66, 0x44, 0x0E, 0x63,
-        0x53, 0x93, 0x60, 0x40, 0x10, 0x36, 0x07, 0x00, 0x65, 0x44, 0x48, 0xD3, 0x59, 0xD9, 0x59, 0xDB,
-        0x59, 0xD9, 0x59, 0xDB, 0xFB, 0x1F, 0x12, 0x60, 0xBC, 0xF1, 0x64, 0xF3, 0x64, 0x43, 0xDB, 0x81,
-        0x25, 0x60, 0x5A, 0x65, 0x60, 0x40, 0x01, 0x37, 0x12, 0x00, 0x11, 0x37, 0x17, 0x00, 0x21, 0x37,
-        0x1D, 0x00, 0x31, 0x37, 0x22, 0x00, 0xA3, 0xD1, 0x12, 0x60, 0xB7, 0xF5, 0x64, 0x44, 0xFF, 0xB4,
-        0x12, 0x60, 0xB6, 0xFB, 0x64, 0x47, 0xFF, 0xB4, 0x12, 0x60, 0xAD, 0xF1, 0x1D, 0x00, 0xA1, 0xD3,
-        0x12, 0x60, 0xB8, 0xF5, 0xFF, 0xB4, 0x12, 0x60, 0xAE, 0xF1, 0x16, 0x00, 0xA1, 0xD3, 0x12, 0x60,
-        0xB9, 0xF5, 0x60, 0x47, 0xFF, 0xB4, 0x12, 0x60, 0xAF, 0xF1, 0x0E, 0x00, 0x59, 0xD3, 0x12, 0x60,
-        0xBA, 0xF5, 0xFF, 0xB4, 0x12, 0x60, 0xB0, 0xF1, 0x07, 0x00, 0x59, 0xD3, 0x12, 0x60, 0xBB, 0xF5,
-        0x60, 0x47, 0xFF, 0xB4, 0x12, 0x60, 0xB1, 0xF1, 0x12, 0x60, 0xB5, 0xFB, 0x12, 0x60, 0xB2, 0xF9,
-        0x66, 0x42, 0xFC, 0xA2, 0xA2, 0xD3, 0x24, 0x60, 0x48, 0x63, 0xCC, 0x84, 0xE8, 0x84, 0xCC, 0x81,
-        0x63, 0x45, 0xA6, 0xD3, 0xDA, 0x82, 0xFF, 0xB4, 0xFF, 0xFF, 0x03, 0x03, 0x60, 0x40, 0x80, 0x2B,
-        0x03, 0x00, 0xDA, 0x86, 0xCD, 0x81, 0xF5, 0x01, 0x00, 0xB9, 0xA6, 0xD3, 0x0B, 0x03, 0x5A, 0xD1,
-        0xDA, 0x86, 0xFF, 0xB4, 0xE0, 0x84, 0xC4, 0x84, 0x5C, 0x90, 0xBD, 0xD9, 0xFD, 0x02, 0xCD, 0x81,
-        0x66, 0x42, 0xF2, 0x02, 0x5A, 0xD3, 0x24, 0x60, 0x86, 0x65, 0xD7, 0x80, 0xBD, 0xDB, 0xFD, 0x02,
-        0x64, 0xF3, 0x15, 0x60, 0xDD, 0xF1, 0x60, 0x40, 0x01, 0x27, 0x09, 0x00, 0x64, 0x40, 0x10, 0x26,
-        0x06, 0x00, 0x13, 0x64, 0xAD, 0xFB, 0x01, 0x60, 0x67, 0x64, 0x37, 0xFB, 0x09, 0x00, 0x08, 0x64,
-        0xAD, 0xFB, 0x82, 0xF3, 0x01, 0x60, 0x67, 0x7C, 0x60, 0x40, 0x01, 0x27, 0x5B, 0x7C, 0x37, 0xF9,
-        0x13, 0x60, 0x5B, 0xF1, 0x64, 0xF3, 0x15, 0x60, 0xD2, 0xF9, 0x15, 0x60, 0xD6, 0xF9, 0x60, 0x40,
-        0x01, 0x27, 0x0A, 0x00, 0xFF, 0xB5, 0x10, 0x60, 0xA8, 0x63, 0x65, 0x41, 0xCD, 0x81, 0x06, 0xA3,
-        0xFD, 0x02, 0xFA, 0xA3, 0xA3, 0xD3, 0x0F, 0x00, 0x01, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x11, 0x60,
-        0x14, 0x61, 0xA1, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0x08, 0xA1, 0xFB, 0x02, 0xFC, 0xA1, 0xA1, 0xD3,
-        0x15, 0x60, 0xD2, 0xF1, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x07, 0x15, 0x60, 0xD2, 0xFB,
-        0x15, 0x60, 0xD6, 0xFB, 0x25, 0x60, 0x7A, 0x63, 0x24, 0x60, 0x08, 0x65, 0x12, 0x60, 0xB6, 0xF1,
-        0x23, 0x60, 0xF0, 0x61, 0x25, 0x60, 0x68, 0x64, 0x40, 0x4F, 0x04, 0x64, 0xC3, 0x60, 0x58, 0x4D,
-        0x25, 0x78, 0xFF, 0xFF, 0x25, 0x60, 0x82, 0x63, 0x12, 0x60, 0xB5, 0xF1, 0x24, 0x60, 0x48, 0x65,
-        0x25, 0x60, 0x66, 0x64, 0x40, 0x4F, 0x08, 0x64, 0xC3, 0x60, 0x58, 0x4D, 0x25, 0x78, 0xFF, 0xFF,
-        0x64, 0xF3, 0x08, 0x7C, 0x38, 0xF9, 0x24, 0x60, 0xE0, 0x61, 0x60, 0x40, 0x01, 0x2B, 0x0E, 0x00,
-        0x01, 0x37, 0x06, 0x00, 0x11, 0x37, 0x03, 0x00, 0x21, 0x3B, 0x1E, 0xA1, 0x1E, 0xA1, 0x1E, 0xA1,
-        0x1C, 0x63, 0x24, 0x60, 0xC2, 0x64, 0x59, 0xD1, 0x58, 0xD9, 0xFD, 0x1F, 0x12, 0x60, 0xB2, 0xF3,
-        0x00, 0x7C, 0x60, 0x45, 0x70, 0x62, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF, 0x04, 0x29,
-        0xFE, 0x01, 0x00, 0x60, 0x10, 0x62, 0x1A, 0x60, 0x58, 0x4D, 0xB4, 0x78, 0xFF, 0xFF, 0x01, 0x61,
-        0xB1, 0x9C, 0x60, 0x45, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF, 0x18, 0x60, 0x50, 0x78,
-        0xFF, 0xFF, 0x44, 0xD3, 0x80, 0x7C, 0x60, 0x48, 0x60, 0x47, 0x00, 0x7F, 0xB0, 0x8A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xD5, 0x60, 0x84, 0xE7, 0x62, 0x47, 0x80, 0xBF,
-        0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x64, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x2D, 0x58, 0xFF, 0xFF,
-        0x00, 0x7C, 0xBD, 0xD3, 0xD5, 0x60, 0x84, 0xE7, 0x60, 0x47, 0x80, 0xBF, 0x60, 0x4A, 0xBD, 0xD3,
-        0x01, 0x16, 0xFE, 0x01, 0x90, 0x8A, 0xBD, 0xD3, 0x01, 0x16, 0xFE, 0x01, 0x90, 0x8A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0xCD, 0x81, 0x95, 0x60, 0x84, 0xE7, 0xEB, 0x02, 0x2D, 0x58, 0xFF, 0xFF,
-        0xD5, 0x60, 0x84, 0xE7, 0x62, 0x4A, 0x02, 0x64, 0x01, 0x16, 0xFE, 0x01, 0xCC, 0x84, 0xFF, 0xFF,
-        0xFD, 0x02, 0x7C, 0x49, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x68, 0x5C, 0x7C, 0x49, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x68, 0x44, 0x95, 0x60, 0x84, 0xE7, 0x2D, 0x58, 0xFF, 0xFF, 0x42, 0xFF,
-        0x40, 0xFF, 0x3F, 0x40, 0x02, 0x27, 0x33, 0x00, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40,
-        0x3F, 0x40, 0x02, 0x27, 0x1B, 0x00, 0x60, 0xBC, 0x40, 0x40, 0xDD, 0xFE, 0x18, 0x60, 0x07, 0xF1,
-        0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x64, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02,
-        0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x00, 0xEE, 0x19, 0x61, 0xCD, 0x81,
-        0xFF, 0xFF, 0xFD, 0x02, 0x43, 0x45, 0x3F, 0x40, 0x02, 0x27, 0x11, 0x00, 0xAE, 0x4F, 0xFD, 0xB4,
-        0x04, 0xBC, 0xA0, 0x5E, 0x00, 0x60, 0x02, 0x71, 0x8D, 0xE2, 0x40, 0xE1, 0xA1, 0xFF, 0x04, 0xAC,
-        0xA0, 0x5E, 0x0F, 0x60, 0xA0, 0x71, 0x8D, 0xE2, 0xA1, 0xFF, 0xDD, 0xFE, 0x1E, 0x00, 0x43, 0x45,
-        0x20, 0x44, 0x60, 0xBC, 0x40, 0x40, 0xAE, 0x4F, 0xFD, 0xB4, 0x04, 0xBC, 0xA0, 0x5E, 0xDD, 0xFE,
-        0x00, 0x60, 0x02, 0x71, 0x8D, 0xE2, 0x40, 0xE1, 0xA1, 0xFF, 0x04, 0xAC, 0xA0, 0x5E, 0x00, 0x60,
-        0xC8, 0x71, 0x8D, 0xE2, 0xA1, 0xFF, 0x0C, 0x60, 0x00, 0x62, 0x00, 0x60, 0x71, 0x7C, 0x10, 0x60,
-        0x00, 0x65, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF, 0x20, 0x60, 0x3C, 0x63, 0x1E, 0x61,
-        0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x14, 0x71, 0x8D, 0xE2, 0xA1, 0xFF,
-        0x31, 0x44, 0x40, 0x26, 0x02, 0x00, 0x80, 0x26, 0x17, 0x00, 0x21, 0x60, 0xEC, 0x63, 0x07, 0x60,
-        0xE9, 0xFD, 0x09, 0x61, 0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x31, 0x44, 0x40, 0x2A,
-        0x14, 0x00, 0x31, 0x44, 0x7F, 0xB4, 0x40, 0x51, 0xAE, 0x4C, 0x10, 0x26, 0x0E, 0x00, 0x07, 0x60,
-        0xEA, 0xFB, 0x31, 0x44, 0x80, 0xBC, 0x40, 0x51, 0x22, 0x60, 0x22, 0x63, 0x07, 0x60, 0xE9, 0xFD,
-        0x09, 0x61, 0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x20, 0x60, 0xF0, 0x63, 0x03, 0x61,
-        0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x62, 0x19, 0x60, 0x8F, 0x7C,
-        0x00, 0x60, 0xAC, 0x65, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF, 0x80, 0xE1, 0xBF, 0xFE,
-        0xA1, 0x4F, 0x70, 0xB4, 0x50, 0x36, 0xAF, 0x00, 0x20, 0x36, 0x03, 0x00, 0x18, 0x60, 0x24, 0x78,
-        0xFF, 0xFF, 0x01, 0x60, 0x1A, 0xE1, 0xDF, 0xFE, 0x19, 0xFF, 0x00, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x3F, 0x40, 0x20, 0x2B, 0xA1, 0x00, 0x01, 0x16, 0xFE, 0x01, 0x38, 0x69, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x68, 0x44, 0x01, 0x2A, 0x99, 0x00, 0x13, 0x60, 0x09, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36,
-        0x00, 0x3B, 0xA2, 0xDB, 0x64, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x9C, 0x47, 0x00, 0x43, 0x45,
-        0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x18, 0x60, 0x22, 0xF3, 0x3F, 0x40, 0x40, 0x26, 0x01, 0x00,
-        0xA0, 0x50, 0x3F, 0x40, 0x02, 0x2B, 0x29, 0x00, 0xAE, 0x4F, 0xFD, 0xB4, 0xA0, 0x5E, 0xDD, 0xFE,
-        0xAC, 0x4F, 0x10, 0xBC, 0xA0, 0x5C, 0xFF, 0xFF, 0x10, 0xAC, 0xA0, 0x5C, 0x00, 0x60, 0xC8, 0x71,
-        0x8D, 0xE2, 0x40, 0xE1, 0x40, 0x29, 0xFE, 0x01, 0x0C, 0x60, 0x00, 0x62, 0x00, 0x60, 0x71, 0x7C,
-        0x10, 0x60, 0x00, 0x65, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0xC8, 0x71,
-        0x8D, 0xE2, 0x40, 0xE1, 0x40, 0x29, 0xFE, 0x01, 0x01, 0x60, 0x08, 0xE1, 0x64, 0xF1, 0x82, 0xF9,
-        0x05, 0x7C, 0x83, 0xF9, 0xDF, 0xFE, 0x19, 0xFF, 0xFF, 0xFF, 0x18, 0x60, 0x07, 0xF1, 0xAD, 0x4F,
-        0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x64, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02, 0x64, 0x40,
-        0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0xBF, 0xFE, 0x45, 0x00, 0x18, 0x60, 0x07, 0xF1,
-        0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x64, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02,
-        0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC,
-        0x40, 0x40, 0x02, 0x60, 0xEE, 0x64, 0x3F, 0x40, 0x02, 0x27, 0xC8, 0x64, 0x81, 0xFB, 0x82, 0xF9,
-        0x05, 0x64, 0x83, 0xFB, 0xDF, 0xFE, 0x19, 0xFF, 0x26, 0x00, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40,
-        0x43, 0x45, 0xA4, 0xD1, 0xDA, 0x83, 0xC3, 0x85, 0x80, 0xE1, 0xDF, 0xFE, 0xBD, 0xD3, 0xFF, 0xFF,
-        0x60, 0x48, 0x60, 0x47, 0x80, 0xBC, 0x00, 0x7F, 0x60, 0x4A, 0xD7, 0x80, 0xA1, 0xFF, 0xF6, 0x02,
-        0xBF, 0xFE, 0x11, 0x00, 0x43, 0x45, 0xA4, 0xD1, 0xDA, 0x83, 0x0D, 0x18, 0x64, 0x44, 0x00, 0x61,
-        0xFA, 0xA4, 0xDD, 0x81, 0xFD, 0x02, 0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0xBF, 0xFE,
-        0x02, 0x00, 0xF1, 0xFE, 0x01, 0x00, 0x25, 0x43, 0x21, 0xE1, 0x00, 0x64, 0xBF, 0xDB, 0x20, 0x44,
-        0x20, 0x2A, 0x07, 0x00, 0x07, 0xB4, 0x04, 0x36, 0xC3, 0xFE, 0x06, 0x36, 0xCC, 0xFE, 0x07, 0x36,
-        0xD5, 0xFE, 0x20, 0x44, 0xD8, 0xB4, 0x40, 0x40, 0x1F, 0x60, 0x2C, 0x63, 0xBD, 0xD3, 0x03, 0x61,
-        0x0F, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x04, 0x61, 0x0B, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x06, 0x61,
-        0x07, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x07, 0x61, 0x03, 0x1B, 0xC3, 0x60, 0x53, 0x78, 0xFF, 0xFF,
-        0xA3, 0xD1, 0x40, 0x44, 0x20, 0x44, 0x07, 0xB5, 0xD4, 0x85, 0x35, 0x80, 0x24, 0x45, 0x1F, 0x60,
-        0x6C, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40,
-        0x64, 0x43, 0xBD, 0xD3, 0xBD, 0xD1, 0x40, 0x44, 0x10, 0x27, 0x19, 0x00, 0x3F, 0x40, 0x02, 0x2B,
-        0x06, 0x00, 0x24, 0x47, 0x08, 0x2B, 0x13, 0x00, 0x07, 0xB4, 0x01, 0x36, 0x11, 0x00, 0xFF, 0x60,
-        0x7F, 0x65, 0x15, 0x60, 0xA2, 0x64, 0x24, 0x40, 0x08, 0x2B, 0xA4, 0x84, 0xA0, 0x57, 0xFF, 0xFF,
-        0x64, 0x49, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x16, 0xFD, 0x01, 0x00, 0x7F, 0xA3, 0xDB, 0xAB, 0x01,
-        0x64, 0x42, 0x1A, 0x60, 0x58, 0x4D, 0xB4, 0x78, 0xFF, 0xFF, 0xBD, 0xD9, 0xA3, 0xDB, 0xA3, 0x01,
-        0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x64, 0x43, 0xBD, 0xD3, 0xA3, 0xD1, 0x40, 0x44,
-        0x10, 0x2B, 0x16, 0x00, 0xBE, 0xD1, 0xFF, 0xFF, 0x15, 0x60, 0x80, 0xE7, 0x24, 0x40, 0x07, 0x27,
-        0x04, 0x00, 0xAC, 0x4F, 0x10, 0xBC, 0x00, 0x7F, 0xA0, 0x5C, 0x64, 0x4A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x24, 0x40, 0x20, 0x27, 0x1D, 0x00, 0xAC, 0x4F, 0xEF, 0xB4, 0xA0, 0x5C, 0x19, 0x00,
-        0x3F, 0x40, 0x02, 0x2B, 0x06, 0x00, 0x24, 0x47, 0x08, 0x2B, 0x13, 0x00, 0x07, 0xB4, 0x01, 0x36,
-        0x11, 0x00, 0x15, 0x60, 0x22, 0x64, 0x24, 0x40, 0x08, 0x27, 0x80, 0xBC, 0x7C, 0x48, 0xBE, 0xD3,
-        0xA0, 0x57, 0x60, 0x48, 0x64, 0x44, 0x80, 0xBC, 0xFF, 0xB4, 0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x69, 0x01, 0x01, 0x61, 0x1A, 0x60, 0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x63, 0x01,
-        0x28, 0xF3, 0xFF, 0xFF, 0x60, 0x47, 0x0F, 0xB4, 0x9A, 0x00, 0xFF, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x04, 0x64, 0x0F, 0x60, 0x9F, 0xFB, 0x27, 0x00, 0x0C, 0x64, 0x3F, 0x40, 0x02, 0x2B, 0x23, 0x00,
-        0x29, 0xF1, 0x0F, 0x60, 0x9F, 0xFB, 0x5A, 0xD9, 0x1C, 0x60, 0xD0, 0x64, 0x7F, 0xFB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x22, 0x60, 0x22, 0x63, 0x09, 0x61, 0x1A, 0x60,
-        0x58, 0x4D, 0x9C, 0x78, 0xFF, 0xFF, 0x77, 0x00, 0xD3, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xD3, 0xFB,
-        0x06, 0x64, 0x0F, 0x60, 0x9F, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x08, 0x64, 0x0F, 0x60, 0x9F, 0xFB, 0x1D, 0x60, 0x4F, 0x64, 0x7F, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x29, 0xF3, 0x11, 0x60, 0xF9, 0x65, 0x60, 0x5C, 0x3F, 0x40,
-        0x02, 0x2B, 0x13, 0x00, 0x00, 0x37, 0x11, 0x00, 0x01, 0x3B, 0x55, 0x00, 0x11, 0x60, 0x19, 0x63,
-        0xFF, 0xB7, 0x60, 0x5C, 0xA3, 0xD3, 0x08, 0xA3, 0x00, 0x7E, 0xD0, 0x80, 0xD7, 0x80, 0x02, 0x03,
-        0xF9, 0x02, 0x49, 0x00, 0xF4, 0xA3, 0xA3, 0xD3, 0x05, 0x00, 0x00, 0xBC, 0xF2, 0xA4, 0x43, 0x03,
-        0x42, 0x07, 0x64, 0x44, 0x64, 0xFB, 0x82, 0xFB, 0xC8, 0x64, 0x81, 0xFB, 0x07, 0x64, 0x83, 0xFB,
-        0x1D, 0x60, 0x4F, 0x64, 0x7F, 0xFB, 0xFF, 0xFF, 0xDF, 0xFE, 0x00, 0x64, 0x19, 0xFF, 0xF0, 0x60,
-        0xC7, 0x78, 0xFF, 0xFF, 0x88, 0xFF, 0xBA, 0x60, 0x98, 0x71, 0x8D, 0xE2, 0x01, 0x11, 0x09, 0x00,
-        0x71, 0x40, 0x80, 0x27, 0xFB, 0x01, 0x88, 0xE2, 0xBA, 0x60, 0xD0, 0x64, 0x03, 0xFB, 0x8D, 0xFF,
-        0x15, 0x00, 0x8D, 0xFF, 0xB1, 0x60, 0xED, 0x63, 0x06, 0x60, 0x0B, 0xFD, 0xFF, 0xFF, 0x62, 0xFF,
-        0x1D, 0x60, 0x3C, 0x63, 0x7F, 0xFD, 0xFF, 0xFF, 0x1A, 0xFF, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF,
-        0xA4, 0x60, 0x7C, 0x63, 0x06, 0x60, 0x0B, 0xFD, 0xFF, 0xFF, 0x62, 0xFF, 0x29, 0xF5, 0x1F, 0x60,
-        0x26, 0x63, 0x1E, 0x60, 0xF8, 0x64, 0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0x02, 0x64, 0xA3, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xF9, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x66, 0x01, 0x00, 0x36,
-        0x67, 0x01, 0x01, 0x36, 0x69, 0x01, 0x02, 0x36, 0x7F, 0x01, 0x03, 0x36, 0x89, 0x01, 0x04, 0x36,
-        0xC1, 0x01, 0x05, 0x36, 0xBF, 0x01, 0x06, 0x36, 0xF1, 0x01, 0x07, 0x36, 0xBB, 0x01, 0x08, 0x36,
-        0x8A, 0x01, 0x09, 0x36, 0x0C, 0x00, 0x0A, 0x36, 0x0D, 0x00, 0x0B, 0x36, 0x0E, 0x00, 0x0C, 0x36,
-        0x17, 0x00, 0x0D, 0x36, 0x0D, 0x00, 0x0E, 0x36, 0x1D, 0x00, 0x0F, 0x36, 0x41, 0x00, 0x02, 0x60,
-        0x00, 0x64, 0x08, 0x00, 0x04, 0x60, 0x00, 0x64, 0x05, 0x00, 0x00, 0x60, 0x01, 0x64, 0x02, 0x00,
-        0x20, 0x60, 0x00, 0x64, 0x32, 0x45, 0xB4, 0x85, 0x45, 0x52, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0xB2, 0x60, 0xD0, 0x63, 0x06, 0x60, 0x0B, 0xFD, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x3F, 0x40, 0x02, 0x2B, 0x15, 0x00, 0x88, 0xFF, 0xBA, 0x60, 0x98, 0x71,
-        0x8D, 0xE2, 0x01, 0x11, 0x09, 0x00, 0x71, 0x40, 0x80, 0x27, 0xFB, 0x01, 0x88, 0xE2, 0xBA, 0x60,
-        0xD0, 0x64, 0x03, 0xFB, 0x8D, 0xFF, 0x11, 0x00, 0x8D, 0xFF, 0x90, 0x60, 0x00, 0xE8, 0xB1, 0x60,
-        0xED, 0x63, 0x04, 0x00, 0x91, 0x60, 0x00, 0xE8, 0xB2, 0x60, 0xB6, 0x63, 0x2A, 0xE8, 0x06, 0x60,
-        0x0B, 0xFD, 0xFF, 0xFF, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0xD2, 0xF3, 0xFF, 0xFF, 0xEF, 0xB4, 0xD2, 0xFB, 0xAD, 0x4F, 0xFD, 0xB4, 0xA0, 0x5D, 0xD0, 0x60,
-        0x00, 0xE8, 0x2A, 0xE8, 0xD9, 0x60, 0xFE, 0x64, 0x32, 0x45, 0xA4, 0x85, 0x45, 0x52, 0x99, 0xFF,
-        0xA5, 0x4F, 0xFF, 0xB4, 0x07, 0xFB, 0x98, 0xFF, 0xA4, 0x60, 0x7C, 0x63, 0x06, 0x60, 0x0B, 0xFD,
-        0x62, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x07, 0x02,
-        0x62, 0xFF, 0x63, 0xFF, 0x64, 0xFF, 0x65, 0xFF, 0x66, 0xFF, 0xBF, 0xFE, 0xA1, 0xFF, 0x82, 0xFF,
-        0x88, 0xFF, 0x6C, 0x40, 0x41, 0xFF, 0xC4, 0xE2, 0x43, 0xFF, 0x5C, 0x49, 0x08, 0xE1, 0xA3, 0x60,
-        0x30, 0x78, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x02, 0x02, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x82, 0xFF, 0x88, 0xFF, 0xA8, 0xE2, 0x01, 0x70, 0xAD, 0xF1, 0x00, 0x6B, 0x89, 0xFF, 0x64, 0x54,
-        0x88, 0xFF, 0x9F, 0xFE, 0x02, 0x05, 0x64, 0x44, 0x60, 0x54, 0xCD, 0xE2, 0xC2, 0x64, 0x3A, 0xDB,
-        0xBC, 0xFF, 0xB5, 0xFF, 0x1D, 0xFF, 0x26, 0x44, 0x02, 0xB4, 0x40, 0x46, 0x3C, 0x44, 0x00, 0xBC,
-        0xFF, 0xFF, 0x06, 0x03, 0x27, 0x40, 0x26, 0x22, 0x03, 0x00, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0x27, 0x44, 0x20, 0x2A, 0x04, 0x00, 0xA0, 0x60, 0x00, 0xEA, 0xB0, 0x60, 0x00, 0xEA, 0x5C, 0x44,
-        0x27, 0x44, 0x18, 0xB4, 0x40, 0x47, 0x00, 0xE1, 0xA4, 0xE2, 0xC4, 0xE2, 0x47, 0xFF, 0xB6, 0xFF,
-        0xB7, 0xFF, 0xB4, 0xFF, 0x32, 0xF1, 0x08, 0x29, 0x09, 0x00, 0x64, 0x40, 0x07, 0x22, 0x06, 0x00,
-        0x43, 0xFF, 0x27, 0x44, 0x10, 0xBC, 0x40, 0x47, 0x00, 0x64, 0x32, 0xFB, 0x31, 0x41, 0x3C, 0x44,
-        0x01, 0xB1, 0x00, 0xBC, 0x0A, 0x02, 0x09, 0x03, 0x32, 0xF3, 0x00, 0x7C, 0x01, 0xB4, 0xFF, 0xFF,
-        0x04, 0x03, 0x32, 0xF9, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xC8, 0x60, 0x09, 0x7D, 0x00, 0x60,
-        0x00, 0x6B, 0x00, 0x64, 0x33, 0xFB, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0xE1, 0x30, 0x40, 0x02, 0x36, 0xA1, 0xFF, 0x83, 0xFF, 0x8D, 0xFF, 0x5C, 0x44, 0x5C, 0x43,
-        0x5C, 0x42, 0x5C, 0x41, 0x5C, 0x40, 0xAC, 0xFF, 0xAD, 0xFF, 0xE7, 0xE1, 0xB3, 0x60, 0xBE, 0x78,
-        0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x03, 0x02, 0x28, 0xE2, 0x40, 0xFF, 0xA1, 0xFF,
-        0x84, 0xFF, 0xC1, 0x60, 0x6B, 0x64, 0x40, 0x42, 0xB7, 0x60, 0xA2, 0x64, 0x40, 0x40, 0x9C, 0xF3,
-        0x65, 0xFB, 0x0F, 0x60, 0xF6, 0x63, 0xA9, 0xF3, 0xBD, 0xDB, 0x00, 0x60, 0x9A, 0x64, 0xBD, 0xDB,
-        0x02, 0x64, 0xBD, 0xDB, 0x04, 0x64, 0xA3, 0xDB, 0x5C, 0x49, 0x0A, 0x64, 0x40, 0x4B, 0x5C, 0x5C,
-        0x01, 0x60, 0x39, 0xE2, 0x04, 0x60, 0x00, 0x7A, 0x89, 0xFF, 0x03, 0x60, 0xFF, 0x73, 0x88, 0xFF,
-        0xB7, 0x60, 0xA2, 0x78, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x06, 0x02, 0x40, 0xFF,
-        0x42, 0xFF, 0x43, 0xFF, 0x44, 0xFF, 0x45, 0xFF, 0xA1, 0xFF, 0x88, 0xFF, 0x85, 0xFF, 0x21, 0xE1,
-        0x5C, 0x40, 0xC3, 0x60, 0x53, 0x78, 0xFF, 0xFF, 0xA2, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1,
-        0x01, 0x02, 0xA1, 0xFF, 0x86, 0xFF, 0x88, 0xFF, 0x5C, 0x46, 0x5C, 0x49, 0x5C, 0x40, 0xE1, 0x60,
-        0x58, 0x4F, 0x7A, 0x78, 0xFF, 0xFF, 0xD0, 0x60, 0x58, 0x4F, 0xA2, 0x78, 0xFF, 0xFF, 0xEB, 0x60,
-        0x58, 0x4F, 0x10, 0x78, 0xFF, 0xFF, 0xDD, 0x60, 0x58, 0x4F, 0xF5, 0x78, 0xFF, 0xFF, 0x1F, 0xE1,
-        0xA3, 0xFF, 0xCA, 0x60, 0x7E, 0x78, 0xFF, 0xFF, 0x03, 0xE1, 0xA3, 0xFF, 0x1E, 0x60, 0x9E, 0x63,
-        0x17, 0xFD, 0xAE, 0xFF, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x86, 0xF3, 0x87, 0xF3, 0xDC, 0x81,
-        0x00, 0x7C, 0x01, 0x00, 0x00, 0xFA, 0x60, 0x46, 0xFE, 0x63, 0xA3, 0xD8, 0xFE, 0x1F, 0xCD, 0x81,
-        0xD8, 0x84, 0xF8, 0x02, 0x86, 0xF3, 0x87, 0xF5, 0xDC, 0x81, 0x80, 0x67, 0x40, 0x4A, 0x05, 0x18,
-        0x2A, 0x43, 0x02, 0xFC, 0x5F, 0x8A, 0x00, 0xF4, 0xFA, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0x88, 0xF3,
-        0x06, 0x61, 0x00, 0x7C, 0x60, 0x46, 0xFE, 0x63, 0xA3, 0xD8, 0xFE, 0x1F, 0xCD, 0x81, 0x66, 0x44,
-        0xD8, 0x84, 0xF8, 0x02, 0x09, 0x60, 0x2B, 0x7C, 0x88, 0xF3, 0x06, 0x61, 0x60, 0x46, 0x01, 0x63,
-        0x76, 0xF8, 0x00, 0xFC, 0x63, 0x47, 0x06, 0xFA, 0x76, 0xF8, 0x03, 0x64, 0x77, 0xFA, 0xDF, 0x83,
-        0x66, 0x44, 0xCD, 0x81, 0x02, 0xA6, 0xF4, 0x02, 0x2E, 0x58, 0xFF, 0xFF, 0x8A, 0xF1, 0x89, 0xF3,
-        0x7C, 0x63, 0x8C, 0xFB, 0x60, 0x46, 0x01, 0xFC, 0xDC, 0x84, 0xD0, 0x80, 0x00, 0xFA, 0xFA, 0x04,
-        0x8D, 0xFB, 0x60, 0x46, 0x00, 0x64, 0x00, 0xFA, 0x63, 0x44, 0x80, 0x7F, 0x01, 0xFA, 0x8A, 0xF3,
-        0x89, 0xF1, 0xDC, 0x84, 0xD0, 0x84, 0x8B, 0xFB, 0x03, 0x60, 0x26, 0x61, 0xB5, 0x60, 0x58, 0x4D,
-        0x8C, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x2E, 0xFB, 0x82, 0xFF, 0x40, 0x42, 0x87, 0xFF, 0x8B, 0xF3,
-        0x93, 0xFB, 0x00, 0x64, 0x40, 0x50, 0x63, 0xFF, 0x60, 0xFF, 0x66, 0xFF, 0x65, 0xFF, 0x64, 0xFF,
-        0x61, 0xFF, 0x62, 0xFF, 0x49, 0x60, 0x02, 0xE1, 0x52, 0x60, 0x02, 0xE1, 0x5C, 0x60, 0x02, 0xE1,
-        0x65, 0x60, 0x02, 0xE1, 0x6B, 0x60, 0x02, 0xE1, 0x76, 0x60, 0x02, 0xE1, 0x41, 0x60, 0x02, 0xE1,
-        0x04, 0x64, 0x0F, 0x60, 0x9F, 0xFB, 0x1F, 0x60, 0x64, 0x64, 0x7F, 0xFB, 0x2D, 0xFF, 0x0A, 0x61,
-        0x41, 0x4B, 0x09, 0x60, 0x08, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x8C, 0x78, 0xFF, 0xFF, 0xF0, 0x67,
-        0x0E, 0xFA, 0x1F, 0x60, 0x0A, 0x64, 0x0F, 0x60, 0x93, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x2B, 0x41, 0x4D, 0x8B, 0xFF, 0xFF, 0xEA, 0x02, 0x09, 0x61,
-        0x41, 0x4B, 0x09, 0x60, 0x08, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x8C, 0x78, 0xFF, 0xFF, 0x1E, 0x60,
-        0xFE, 0x64, 0x0F, 0x60, 0x93, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x2B, 0x41, 0x4D, 0x8B, 0xFF, 0xFF, 0xEC, 0x02, 0x1E, 0x60, 0xB0, 0x78, 0xFF, 0xFF,
-        0x00, 0xEA, 0x00, 0xEB, 0x50, 0x60, 0x03, 0xEA, 0x51, 0x60, 0x13, 0xEA, 0x52, 0x60, 0x30, 0xEA,
-        0x53, 0x60, 0x40, 0xEA, 0x54, 0x60, 0x52, 0xEA, 0x55, 0x60, 0x6D, 0xEA, 0x56, 0x60, 0x71, 0xEA,
-        0x57, 0x60, 0x8B, 0xEA, 0x58, 0x60, 0x47, 0xEA, 0x59, 0x60, 0xA0, 0xEA, 0x5A, 0x60, 0xB2, 0xEA,
-        0x5B, 0x60, 0xC1, 0xEA, 0x5C, 0x60, 0xD7, 0xEA, 0x5D, 0x60, 0xEB, 0xEA, 0x5E, 0x60, 0xA0, 0xEA,
-        0x50, 0x60, 0x36, 0xEB, 0x51, 0x60, 0x37, 0xEB, 0x52, 0x60, 0x20, 0xEB, 0x53, 0x60, 0xE4, 0xEB,
-        0x54, 0x60, 0x34, 0xEB, 0x55, 0x60, 0x58, 0xEB, 0x56, 0x60, 0x48, 0xEB, 0x57, 0x60, 0xD0, 0xEB,
-        0x58, 0x60, 0xC3, 0xEB, 0x59, 0x60, 0xFC, 0xEB, 0x5A, 0x60, 0x34, 0xEB, 0x5B, 0x60, 0x58, 0xEB,
-        0x5C, 0x60, 0xC0, 0xEB, 0x5D, 0x60, 0xD0, 0xEB, 0x5E, 0x60, 0x91, 0xEB, 0x00, 0xEA, 0x00, 0xEB,
-        0xE0, 0x60, 0x02, 0xEA, 0xE0, 0x60, 0x03, 0xEB, 0xA0, 0x60, 0x00, 0xEB, 0xB0, 0x60, 0x00, 0xEB,
-        0xAB, 0x48, 0x40, 0x3B, 0x01, 0x00, 0xFC, 0x01, 0x00, 0xEB, 0x03, 0x60, 0x02, 0x64, 0xA0, 0xDB,
-        0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60,
-        0x00, 0xEA, 0x24, 0x44, 0xFF, 0xB4, 0x04, 0xFB, 0x50, 0x60, 0x00, 0x64, 0x05, 0xFB, 0x10, 0x60,
-        0x10, 0x75, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x40, 0x00, 0x05, 0x60,
-        0xF9, 0xF1, 0x42, 0x60, 0x08, 0x64, 0x09, 0x60, 0x19, 0x63, 0x64, 0x40, 0x01, 0x2B, 0x04, 0x00,
-        0x42, 0x60, 0x09, 0x64, 0x0A, 0x60, 0x19, 0x63, 0x18, 0x60, 0x22, 0xFB, 0x04, 0x60, 0x00, 0xBC,
-        0x18, 0x60, 0x1E, 0xFB, 0x18, 0x60, 0x1D, 0xFD, 0x1D, 0x60, 0x19, 0x63, 0x18, 0x60, 0x21, 0xFD,
-        0x80, 0x60, 0x1C, 0x64, 0x3F, 0x40, 0x01, 0x2A, 0x02, 0x00, 0x60, 0x60, 0x1C, 0x64, 0x18, 0x60,
-        0x23, 0xFB, 0x18, 0x60, 0x1F, 0xFB, 0x18, 0x60, 0x22, 0xF3, 0xA0, 0x50, 0xA0, 0x50, 0x0B, 0x60,
-        0xF8, 0x63, 0xA3, 0xD1, 0x30, 0x60, 0x38, 0x61, 0xA1, 0xD3, 0xF8, 0xA3, 0x90, 0x84, 0xA2, 0xDB,
-        0xA3, 0xD1, 0x59, 0xD3, 0x06, 0xA3, 0x90, 0x84, 0xA2, 0xDB, 0xA3, 0xD1, 0x59, 0xD3, 0xFE, 0xA3,
-        0x90, 0x84, 0xA2, 0xDB, 0xA3, 0xD1, 0x59, 0xD3, 0xFF, 0xFF, 0x90, 0x84, 0xA2, 0xDB, 0x80, 0x60,
-        0x58, 0xEC, 0x80, 0x60, 0x00, 0xED, 0x80, 0x60, 0x80, 0xEE, 0x40, 0xEC, 0x00, 0xED, 0x00, 0xEE,
-        0xC0, 0x60, 0x59, 0xEC, 0xC0, 0x60, 0x07, 0xED, 0xC0, 0x60, 0x8F, 0xEE, 0xAD, 0x4F, 0xFA, 0xB4,
-        0xA0, 0x5D, 0x00, 0xF3, 0x28, 0xFB, 0x40, 0x44, 0xA2, 0x60, 0xE8, 0x7C, 0x20, 0xF9, 0x1D, 0x60,
-        0xD0, 0x7C, 0x21, 0xF9, 0x1D, 0x60, 0xE6, 0x7C, 0x22, 0xF9, 0x1E, 0x60, 0x44, 0x7C, 0x23, 0xF9,
-        0x1E, 0x60, 0x55, 0x7C, 0x24, 0xF9, 0x1E, 0x60, 0x7F, 0x7C, 0x25, 0xF9, 0x1E, 0x60, 0x90, 0x7C,
-        0x26, 0xF9, 0xD0, 0x60, 0x00, 0xE8, 0x28, 0xE8, 0x44, 0x60, 0x01, 0xE6, 0x00, 0x64, 0x40, 0x52,
-        0x10, 0x60, 0x04, 0xE6, 0x08, 0x60, 0x06, 0x63, 0xFD, 0x60, 0x0C, 0x65, 0x5B, 0xD3, 0xBF, 0xD1,
-        0x0C, 0x18, 0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xFA, 0xA3, 0xA3, 0xD3, 0x02, 0x60,
-        0x00, 0x65, 0xF9, 0xA0, 0xFC, 0xA0, 0x09, 0x05, 0x00, 0x05, 0x21, 0x60, 0x00, 0x65, 0x3F, 0x43,
-        0x21, 0x60, 0x00, 0x65, 0xC0, 0x60, 0x8F, 0xEE, 0x08, 0x00, 0x02, 0x60, 0x00, 0x65, 0x00, 0x60,
-        0x00, 0x64, 0x18, 0xFB, 0x3F, 0x43, 0x11, 0x60, 0x10, 0xE6, 0xB7, 0x84, 0x40, 0x5F, 0x30, 0x60,
-        0x20, 0x63, 0x3F, 0x40, 0x20, 0x27, 0x06, 0x00, 0x0F, 0x60, 0xFF, 0x64, 0xBD, 0xDB, 0x0F, 0x60,
-        0xF0, 0x64, 0x03, 0x00, 0x0F, 0x64, 0xBD, 0xDB, 0x00, 0x64, 0xA3, 0xDB, 0x00, 0x60, 0x30, 0xE2,
-        0x00, 0x60, 0x50, 0xE2, 0x00, 0x60, 0x79, 0xE2, 0x00, 0x60, 0x90, 0xE2, 0x01, 0x60, 0xD0, 0xE2,
-        0x01, 0x60, 0xF0, 0xE2, 0x01, 0x60, 0xB0, 0xE2, 0x13, 0x64, 0xAD, 0xFB, 0x01, 0x60, 0x67, 0x64,
-        0x37, 0xFB, 0x00, 0x60, 0x50, 0x64, 0x36, 0xFB, 0x09, 0x60, 0x2A, 0x64, 0x98, 0xFB, 0x82, 0xFF,
-        0x92, 0xFF, 0x5C, 0x41, 0x5C, 0x46, 0x5C, 0x47, 0x00, 0xE1, 0xA4, 0x60, 0x7C, 0x63, 0x0C, 0x60,
-        0x16, 0x64, 0xA0, 0xDD, 0x87, 0xFF, 0x97, 0xFF, 0x0C, 0x60, 0x02, 0x64, 0x40, 0x5A, 0x06, 0xA4,
-        0x40, 0x5B, 0x5C, 0x5E, 0x13, 0x60, 0x52, 0xF3, 0x64, 0xFB, 0x3F, 0x40, 0x01, 0x22, 0x03, 0x00,
-        0x80, 0x60, 0x37, 0x7C, 0x02, 0x00, 0x80, 0x60, 0x27, 0x7C, 0x16, 0x60, 0x55, 0xF9, 0x00, 0x60,
-        0x80, 0x64, 0x89, 0xFB, 0x02, 0x60, 0x80, 0x66, 0x22, 0x60, 0x22, 0x64, 0x77, 0x60, 0x77, 0x63,
-        0x00, 0xFA, 0x01, 0xFC, 0x00, 0xF0, 0x01, 0xF0, 0xD0, 0x80, 0xD3, 0x80, 0x1E, 0x02, 0x1D, 0x02,
-        0x06, 0x60, 0x80, 0x65, 0x45, 0x4A, 0xAA, 0x46, 0x00, 0xFC, 0x01, 0xFA, 0xAA, 0x46, 0x00, 0xF0,
-        0x2A, 0x41, 0x50, 0x65, 0xD3, 0x80, 0xCD, 0x84, 0x13, 0x03, 0x0A, 0x60, 0x80, 0x65, 0x45, 0x4A,
-        0xAA, 0x46, 0x00, 0xFC, 0x01, 0xFA, 0xAA, 0x46, 0x00, 0xF0, 0x65, 0x41, 0xC8, 0x65, 0xD3, 0x80,
-        0xCD, 0x84, 0x06, 0x03, 0x12, 0x60, 0x7F, 0x64, 0x03, 0x00, 0x10, 0x65, 0x02, 0x60, 0x7F, 0x64,
-        0x65, 0x43, 0x86, 0xFD, 0x0F, 0x60, 0x5B, 0xFD, 0x07, 0x61, 0xC5, 0x81, 0xE1, 0x85, 0xD4, 0x84,
-        0x8A, 0xFB, 0xDC, 0x84, 0x88, 0xFB, 0x0C, 0xA4, 0x87, 0xFB, 0x0F, 0x60, 0x5C, 0xFB, 0x1E, 0x60,
-        0x58, 0x4E, 0xD3, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0x58, 0x4E, 0xB9, 0x78, 0xFF, 0xFF, 0x3F, 0x40,
-        0x40, 0x26, 0x05, 0x00, 0x18, 0x60, 0x20, 0xF3, 0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x52, 0x00, 0x64,
-        0x0A, 0x60, 0x7E, 0xFB, 0x1E, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0x5C, 0x51, 0x3F, 0x41, 0xA5, 0x4C,
-        0x50, 0x37, 0x0B, 0x00, 0x01, 0xB9, 0x41, 0x5F, 0xB5, 0x60, 0x55, 0xE0, 0x05, 0x60, 0xF9, 0xF1,
-        0xC0, 0x67, 0x90, 0x84, 0x3F, 0x40, 0x01, 0x26, 0xA0, 0x50, 0x06, 0x60, 0x08, 0xF3, 0x01, 0x60,
-        0x01, 0x65, 0x01, 0x60, 0x02, 0x7C, 0xD4, 0x80, 0xD0, 0x80, 0x01, 0x03, 0x10, 0x02, 0x5A, 0xD1,
-        0x5A, 0xD3, 0x3E, 0x60, 0x00, 0x66, 0xE0, 0x87, 0x40, 0x4A, 0xF7, 0x60, 0x8C, 0x61, 0x64, 0x44,
-        0xC8, 0x84, 0x0C, 0x63, 0xAA, 0x46, 0x58, 0xD0, 0xAA, 0x46, 0x59, 0xD8, 0xFB, 0x1F, 0x08, 0x60,
-        0x00, 0x63, 0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3, 0xA3, 0xD3, 0x02, 0xA8, 0xD4, 0x80, 0x07, 0x02,
-        0x06, 0x02, 0x49, 0x60, 0x4C, 0x61, 0x3C, 0x60, 0x00, 0x66, 0x41, 0x4B, 0x03, 0x00, 0x24, 0x60,
-        0x84, 0x78, 0xFF, 0xFF, 0x2B, 0x41, 0x49, 0x60, 0x94, 0x7C, 0xD1, 0x80, 0xA1, 0xD2, 0x25, 0x05,
-        0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47, 0xE0, 0x87, 0x40, 0x4A, 0x59, 0xD2, 0x59, 0x8B,
-        0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3, 0xBD, 0xD1, 0xEC, 0x18, 0xD4, 0x80, 0xEA, 0x18,
-        0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x67, 0x44, 0xC0, 0x84, 0xE0, 0x85, 0x2C, 0x44,
-        0xD4, 0x80, 0x63, 0x41, 0x01, 0x06, 0x65, 0x44, 0xC8, 0x83, 0xAA, 0x46, 0x59, 0xD1, 0x27, 0xD8,
-        0x5A, 0x87, 0xFC, 0x1F, 0xAA, 0x46, 0x2B, 0x41, 0xD5, 0x01, 0x49, 0x60, 0x94, 0x61, 0x41, 0x4B,
-        0x2B, 0x41, 0x49, 0x60, 0x94, 0x7C, 0xD1, 0x80, 0xA1, 0xD2, 0x27, 0x05, 0x59, 0xD0, 0x60, 0x45,
-        0x59, 0xD2, 0x44, 0x47, 0xE0, 0x87, 0x40, 0x4A, 0x59, 0xD2, 0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60,
-        0x00, 0x63, 0xBE, 0xD3, 0xBD, 0xD1, 0xEC, 0x18, 0xD4, 0x80, 0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83,
-        0xC3, 0x83, 0xF7, 0x01, 0x04, 0xA3, 0xA3, 0xD1, 0x5A, 0x88, 0x2C, 0x43, 0xD3, 0x80, 0xFF, 0xFF,
-        0x01, 0x06, 0x64, 0x43, 0xCF, 0x83, 0xAA, 0x46, 0x60, 0xFE, 0x28, 0xD1, 0x5E, 0x88, 0x27, 0xD8,
-        0x5A, 0x87, 0xFB, 0x1F, 0x20, 0xFE, 0xAA, 0x46, 0xD3, 0x01, 0xFA, 0x60, 0x39, 0x65, 0x24, 0x60,
-        0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x03, 0x03, 0xBE, 0xD1, 0x07, 0x60, 0xED, 0xF9, 0x07, 0x60,
-        0xED, 0xF3, 0x20, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x10, 0x2A, 0x05, 0x00, 0x07, 0x60, 0xEC, 0xF9,
-        0x07, 0x60, 0xEB, 0xF9, 0x12, 0x00, 0x04, 0xB0, 0x10, 0x60, 0x55, 0xF3, 0x0E, 0x03, 0x02, 0xBC,
-        0xA2, 0xDB, 0x07, 0x60, 0xF5, 0xFB, 0x10, 0x60, 0xE8, 0xF3, 0x10, 0x60, 0xAC, 0xF3, 0x02, 0xBD,
-        0x02, 0xBC, 0xA2, 0xDB, 0x65, 0x44, 0x10, 0x60, 0xE8, 0xFB, 0x07, 0x60, 0xED, 0xF3, 0x31, 0x41,
-        0x60, 0x40, 0x20, 0x2A, 0x40, 0xB9, 0x40, 0x26, 0x03, 0x00, 0x60, 0x40, 0x01, 0x26, 0x80, 0xB9,
-        0x41, 0x51, 0xFA, 0x60, 0x3A, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x03, 0x02,
-        0x23, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x5B, 0xD3, 0xF8, 0x60, 0x3F, 0x65, 0x00, 0x7F, 0xE0, 0x84,
-        0xE0, 0x84, 0x10, 0x60, 0xF7, 0xF3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0xE0, 0x84, 0x10, 0x60, 0xFA, 0xF3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x21, 0x60, 0xFA, 0x61, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0xA1, 0xD3, 0xE0, 0x9C, 0xA4, 0x84,
-        0xB0, 0x84, 0xA1, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x59, 0xD3,
-        0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB, 0x11, 0x60, 0x00, 0xF3, 0xFF, 0xFF, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x11, 0x60,
-        0x03, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x11, 0x60, 0x06, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x11, 0x60, 0x09, 0xF3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x11, 0x60, 0x0C, 0xF3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x11, 0x60, 0x0F, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x02, 0xA3, 0xA3, 0xD3, 0xF8, 0x60, 0x3F, 0x65,
-        0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x11, 0x60, 0x12, 0xF3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0xBD, 0xD3, 0xFF, 0xFF,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x11, 0x60, 0x15, 0xF3, 0xE0, 0x9C, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x22, 0x60,
-        0x30, 0x61, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0xA1, 0xD3,
-        0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0x00, 0x7F, 0xE0, 0x84,
-        0xE0, 0x84, 0x59, 0xD3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB, 0x11, 0x60, 0x1B, 0xF3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x11, 0x60, 0x1E, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x11, 0x60, 0x21, 0xF3, 0xFF, 0xFF, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x11, 0x60, 0x24, 0xF3, 0xE0, 0x9C,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0x11, 0x60, 0x27, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x11, 0x60, 0x2A, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x00, 0x60, 0x6A, 0x63,
-        0x22, 0x60, 0x56, 0x61, 0x21, 0x60, 0xEA, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x11, 0x60,
-        0x33, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB,
-        0x11, 0x60, 0x37, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60, 0x39, 0xF3, 0xFF, 0xFF,
-        0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60, 0x40, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60,
-        0x42, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60, 0x4E, 0xF3, 0xFF, 0xFF, 0x18, 0xAC,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60, 0x52, 0xF3, 0xFF, 0xFF,
-        0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60, 0x54, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60,
-        0x5B, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x11, 0x60, 0x5D, 0xF3, 0xFF, 0xFF, 0x18, 0xAC,
-        0xA2, 0xDB, 0xFA, 0x60, 0x2C, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x0E, 0x03,
-        0x63, 0x45, 0x23, 0x60, 0xF0, 0x63, 0x06, 0x61, 0xA5, 0xD1, 0xDA, 0x85, 0x64, 0x44, 0x0F, 0xB4,
-        0xBD, 0xDB, 0x64, 0x47, 0x0F, 0xB4, 0xCD, 0x81, 0xBD, 0xDB, 0xF6, 0x02, 0xFA, 0x60, 0x30, 0x65,
-        0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x14, 0x03, 0xBD, 0xD3, 0x63, 0x46, 0x24, 0x60,
-        0x88, 0x63, 0x12, 0x60, 0x53, 0xFB, 0xDA, 0x85, 0xBD, 0xDB, 0x0E, 0x61, 0xA6, 0xD1, 0xDA, 0x86,
-        0x64, 0x44, 0xFF, 0xB4, 0xA5, 0xDB, 0xDA, 0x85, 0x64, 0x47, 0xFF, 0xB4, 0xCD, 0x81, 0xBD, 0xDB,
-        0xF5, 0x02, 0xFA, 0x60, 0x31, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x22, 0x03,
-        0xBD, 0xD3, 0x12, 0x60, 0x71, 0xFB, 0x5A, 0x81, 0x12, 0x60, 0x80, 0xFB, 0x5A, 0x82, 0x12, 0x60,
-        0x8F, 0xFB, 0x5A, 0x83, 0x12, 0x60, 0x9E, 0xFB, 0x5A, 0x84, 0x0E, 0x61, 0xBD, 0xD1, 0xBD, 0xD5,
-        0x64, 0x44, 0xFF, 0xB4, 0x21, 0xDB, 0x5A, 0x81, 0x64, 0x47, 0xFF, 0xB4, 0x22, 0xDB, 0x5A, 0x82,
-        0x66, 0x44, 0xFF, 0xB4, 0x23, 0xDB, 0x5A, 0x83, 0x66, 0x47, 0xFF, 0xB4, 0x24, 0xDB, 0xCD, 0x81,
-        0x5A, 0x84, 0xEC, 0x02, 0xFA, 0x60, 0x47, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF,
-        0x11, 0x03, 0x63, 0x45, 0x25, 0x60, 0x5A, 0x63, 0xA5, 0xD1, 0xDA, 0x85, 0xBD, 0xD9, 0x02, 0x61,
-        0xA5, 0xD1, 0xDA, 0x85, 0x64, 0x47, 0x00, 0x7E, 0xBD, 0xDB, 0x64, 0x44, 0x00, 0x7E, 0xCD, 0x81,
-        0xBD, 0xDB, 0xF6, 0x02, 0xFA, 0x60, 0x2E, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF,
-        0x1F, 0x03, 0x63, 0x46, 0xFC, 0xA3, 0xA3, 0xD3, 0x24, 0x60, 0x08, 0x63, 0xCC, 0x84, 0xE8, 0x84,
-        0xCC, 0x81, 0x00, 0x36, 0x0D, 0x00, 0x63, 0x45, 0xA6, 0xD3, 0x5A, 0xD1, 0xDA, 0x86, 0xFF, 0xB4,
-        0xE0, 0x84, 0xC4, 0x84, 0x5C, 0x90, 0xBD, 0xD9, 0xFD, 0x02, 0xCD, 0x81, 0x66, 0x42, 0xF4, 0x02,
-        0x66, 0x42, 0x5A, 0xD3, 0x24, 0x60, 0x48, 0x65, 0xBD, 0xDB, 0xD7, 0x80, 0xFF, 0xFF, 0xFC, 0x02,
-        0x25, 0x60, 0x6E, 0x61, 0xFA, 0x60, 0x46, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF,
-        0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60, 0x2F, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78,
-        0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60, 0x3E, 0x65, 0x24, 0x60, 0x58, 0x4D,
-        0x97, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60, 0x3F, 0x65, 0x24, 0x60,
-        0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60, 0x40, 0x65,
-        0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60,
-        0x3B, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xFA, 0x60,
-        0x48, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x10, 0x03, 0xBD, 0xD3, 0x25, 0x60,
-        0xCA, 0x61, 0x0E, 0xB4, 0xBD, 0xD1, 0xA1, 0xDB, 0x64, 0x47, 0x0E, 0xB4, 0xA3, 0xD1, 0x59, 0xDB,
-        0x64, 0x44, 0x0E, 0xB4, 0x59, 0xDB, 0x64, 0x47, 0x0E, 0xB4, 0x59, 0xDB, 0xFA, 0x60, 0x29, 0x65,
-        0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x04, 0xA3, 0xA3, 0xD3, 0x20, 0x60,
-        0x00, 0x65, 0xB4, 0x84, 0x10, 0x60, 0x29, 0xFB, 0xFA, 0x60, 0x2A, 0x65, 0x24, 0x60, 0x58, 0x4D,
-        0x97, 0x78, 0xFF, 0xFF, 0x39, 0x03, 0x04, 0xA3, 0xBD, 0xD1, 0x10, 0x60, 0xCD, 0xF3, 0x64, 0x41,
-        0x64, 0x5E, 0xA2, 0xDB, 0x64, 0x47, 0x5A, 0xD3, 0x60, 0x5C, 0x64, 0x5F, 0xA2, 0xDB, 0x10, 0x60,
-        0xE3, 0xF3, 0xFF, 0x60, 0xC0, 0xB5, 0x61, 0x40, 0x80, 0x27, 0x05, 0x00, 0xE9, 0x87, 0x3F, 0xB4,
-        0xB4, 0x84, 0xA2, 0xDB, 0x1E, 0x00, 0x65, 0x44, 0xA2, 0xDB, 0x10, 0x60, 0xDC, 0xF1, 0xE1, 0x80,
-        0xF9, 0x81, 0xE1, 0x80, 0xF9, 0x84, 0xFF, 0x60, 0x80, 0xB4, 0xC0, 0x9C, 0xA2, 0xD9, 0x10, 0x60,
-        0xDF, 0xF1, 0xFF, 0xFF, 0xC0, 0x9C, 0xA2, 0xD9, 0x10, 0x60, 0xE6, 0xF1, 0x01, 0x7E, 0x60, 0x47,
-        0x60, 0x41, 0x64, 0x44, 0xFE, 0x60, 0x00, 0xB5, 0xC1, 0x84, 0x01, 0x60, 0xFF, 0xB4, 0xB4, 0x84,
-        0xA2, 0xDB, 0xDB, 0x83, 0x11, 0x60, 0x62, 0xFD, 0xFA, 0x60, 0x2B, 0x65, 0x24, 0x60, 0x58, 0x4D,
-        0x97, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x04, 0xA3, 0xBD, 0xD3, 0x10, 0x60, 0xD0, 0xFB, 0xA3, 0xD3,
-        0x10, 0x60, 0x94, 0xFB, 0xFA, 0x60, 0x3C, 0x65, 0x24, 0x60, 0x58, 0x4D, 0x97, 0x78, 0xFF, 0xFF,
-        0x1F, 0x03, 0xA3, 0xD3, 0xFC, 0x60, 0xFC, 0x65, 0xA4, 0x84, 0x60, 0x5C, 0x00, 0x7E, 0xC0, 0x60,
-        0x00, 0xA0, 0x60, 0x43, 0x07, 0x04, 0x10, 0x60, 0xD4, 0xF3, 0xFF, 0xFF, 0x03, 0x60, 0xFF, 0xB4,
-        0x3C, 0x94, 0xA2, 0xDB, 0x21, 0x60, 0x30, 0x61, 0x64, 0x44, 0x00, 0x7F, 0xC0, 0xA0, 0x60, 0x47,
-        0x07, 0x04, 0x60, 0x43, 0xA1, 0xD3, 0xFF, 0xFF, 0x03, 0x60, 0xFF, 0xB4, 0x3C, 0x94, 0xA1, 0xDB,
-        0xB8, 0xFE, 0xB9, 0xFE, 0xBA, 0xFE, 0xBB, 0xFE, 0xBD, 0xFE, 0xBF, 0xFE, 0x15, 0x60, 0xCB, 0xF3,
-        0x12, 0x63, 0x60, 0x40, 0x01, 0x27, 0x04, 0x00, 0x0B, 0x60, 0xEA, 0x62, 0x5A, 0xDF, 0xFE, 0x1F,
-        0x1F, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x06, 0x63, 0xBE, 0xD3, 0xBD, 0xD1, 0x07, 0x18,
-        0xD4, 0x80, 0x05, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0xDB, 0x83, 0x00, 0xBC,
-        0x2D, 0x58, 0xFF, 0xFF, 0x86, 0xFD, 0xB0, 0x26, 0x00, 0x00, 0x06, 0x00, 0x10, 0xFD, 0x32, 0x01,
-        0x00, 0x00, 0x02, 0x00, 0x14, 0xFD, 0x94, 0x2B, 0x00, 0x00, 0x0A, 0x00, 0x41, 0xFA, 0x46, 0x23,
-        0x00, 0x00, 0x22, 0x00, 0x42, 0xFA, 0x68, 0x23, 0x00, 0x00, 0x22, 0x00, 0x43, 0xFA, 0x8A, 0x23,
-        0x00, 0x00, 0x22, 0x00, 0x44, 0xFA, 0xAC, 0x23, 0x00, 0x00, 0x22, 0x00, 0x45, 0xFA, 0xCE, 0x23,
-        0x00, 0x00, 0x22, 0x00, 0x25, 0xFD, 0x62, 0x01, 0x00, 0x00, 0x02, 0x00,
-
-};  /* fw_image_3_data */
-
-static const hcf_8 fw_image_4_data[] = {
-        0x6C, 0x40, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x41, 0xFF, 0x33, 0xF3, 0x32, 0x11, 0x31, 0x18, 0x40, 0x64, 0x3A, 0xDB, 0x1C, 0x00, 0xFF, 0xFF,
-        0xC4, 0xE2, 0x27, 0x44, 0x20, 0x2A, 0x01, 0x00, 0xFF, 0xFF, 0x42, 0x64, 0x3A, 0xDB, 0x23, 0x00,
-        0x41, 0xFF, 0xA3, 0x60, 0x34, 0x78, 0xE2, 0xFE, 0x40, 0x49, 0x02, 0x60, 0x01, 0xE1, 0x1D, 0x00,
-        0x44, 0xFF, 0x1B, 0x09, 0x29, 0x44, 0x10, 0x2A, 0x04, 0x74, 0xCD, 0xE2, 0x10, 0x65, 0x0B, 0x00,
-        0xA4, 0x60, 0x49, 0x78, 0xA4, 0xE2, 0x29, 0x44, 0x20, 0x2A, 0x0D, 0x00, 0x20, 0xAC, 0xEC, 0x01,
-        0xA4, 0x60, 0x49, 0x78, 0x46, 0xFF, 0xB4, 0x84, 0x40, 0x49, 0xA1, 0xFF, 0xFF, 0xFF, 0x80, 0x3E,
-        0xA4, 0x60, 0x49, 0x78, 0xFF, 0xFF, 0x62, 0xFF, 0x08, 0xE1, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E,
-        0xAA, 0x60, 0xF4, 0x78, 0x4C, 0x4E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAA, 0x60, 0xFB, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC4, 0xE2, 0x84, 0xFF, 0x22, 0x58, 0x82, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA4, 0x60, 0xB9, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0xE1, 0x01, 0xFF, 0xFF,
-        0x10, 0x29, 0xFA, 0x01, 0xE4, 0xE2, 0xAA, 0x60, 0xB0, 0x78, 0x94, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC1, 0x60, 0x35, 0x78, 0x64, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAA, 0x60, 0x97, 0x78, 0xAC, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x80, 0x29, 0xE2, 0x01, 0xAA, 0x60, 0xF3, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB4, 0x60, 0xEF, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB5, 0x60, 0x1C, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0x8B, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xBE, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xBE, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB6, 0x60, 0x9D, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x83, 0x64, 0x80, 0x29, 0x09, 0xFB, 0xB4, 0x60, 0xB7, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x98, 0xFF, 0xC2, 0x60, 0x69, 0x78, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC1, 0x60, 0xE0, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC0, 0x60, 0x3D, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xB8, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB7, 0x60, 0x96, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA1, 0xFF, 0x98, 0xFF, 0x83, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC3, 0x60, 0x58, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xB0, 0xFF, 0xB1, 0xFF, 0x40, 0xFF, 0x43, 0xFF, 0xC3, 0x60, 0x53, 0x78, 0x44, 0xFF, 0xFF, 0x01,
-        0xC3, 0x60, 0x58, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x1C, 0x60, 0x28, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC3, 0x60, 0x53, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC3, 0x60, 0x52, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xCA, 0x60, 0x76, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE8, 0x60, 0x6C, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x42, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x85, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0x7E, 0x78, 0x24, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE6, 0x60, 0x2A, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0x7E, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0x7E, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0x7E, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0x9F, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0xE3, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0xC7, 0x78, 0x28, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0xC7, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0xC7, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF0, 0x60, 0xC7, 0x78, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x87, 0x64, 0x80, 0x29, 0x09, 0xFB, 0x47, 0xFF, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x43, 0xF7, 0xA7, 0xFF, 0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0xA2, 0x60, 0x00, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2E, 0x60, 0x54, 0x63, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB,
-        0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB,
-        0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB,
-        0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB,
-        0x2F, 0x44, 0xBD, 0xDB, 0x17, 0x60, 0x24, 0xFD, 0x2F, 0x60, 0x74, 0x63, 0x17, 0x60, 0x25, 0xFD,
-        0x30, 0x44, 0x17, 0x60, 0x26, 0xFB, 0x31, 0x44, 0x17, 0x60, 0x27, 0xFB, 0x32, 0x44, 0x17, 0x60,
-        0x28, 0xFB, 0x33, 0x44, 0x17, 0x60, 0x29, 0xFB, 0x81, 0xFF, 0x91, 0xFF, 0x58, 0x51, 0x44, 0x00,
-        0x82, 0xFF, 0x92, 0xFF, 0x58, 0x51, 0x40, 0x00, 0x83, 0xFF, 0x93, 0xFF, 0x58, 0x51, 0x3C, 0x00,
-        0x84, 0xFF, 0x94, 0xFF, 0x58, 0x51, 0x38, 0x00, 0x85, 0xFF, 0x95, 0xFF, 0x58, 0x51, 0x34, 0x00,
-        0x86, 0xFF, 0x96, 0xFF, 0x58, 0x51, 0x30, 0x00, 0x87, 0xFF, 0x97, 0xFF, 0x58, 0x51, 0x2C, 0x00,
-        0x80, 0xFF, 0x90, 0xFF, 0x99, 0xFF, 0x17, 0x60, 0x24, 0xF1, 0x30, 0x44, 0x64, 0x43, 0xBD, 0xDB,
-        0x31, 0x44, 0xBD, 0xDB, 0x32, 0x44, 0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB,
-        0x35, 0x44, 0xBD, 0xDB, 0x36, 0x44, 0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB,
-        0x39, 0x44, 0xBD, 0xDB, 0x3A, 0x44, 0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB,
-        0x3D, 0x44, 0xBD, 0xDB, 0x3E, 0x44, 0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0xEE, 0x60, 0x48, 0x64,
-        0x0A, 0xFB, 0x40, 0x21, 0xFE, 0x01, 0x70, 0x00, 0x42, 0x50, 0x40, 0x53, 0x17, 0x60, 0x25, 0xF3,
-        0xFF, 0xFF, 0x40, 0x52, 0x33, 0x44, 0x32, 0x42, 0xA2, 0xDB, 0xDA, 0x82, 0xA2, 0xDD, 0xDA, 0x83,
-        0x65, 0x44, 0xBD, 0xDB, 0x61, 0x44, 0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0xBD, 0xD9, 0x30, 0x44,
-        0xBD, 0xDB, 0x99, 0xFF, 0xA4, 0x4C, 0xBD, 0xDB, 0xA5, 0x4C, 0xBD, 0xDB, 0xA0, 0x4C, 0xBD, 0xDB,
-        0xA1, 0x4C, 0xBD, 0xDB, 0x98, 0xFF, 0x17, 0x60, 0x25, 0xFD, 0x17, 0x60, 0x26, 0xF3, 0xFF, 0xFF,
-        0x40, 0x50, 0x17, 0x60, 0x28, 0xF3, 0xFF, 0xFF, 0x40, 0x52, 0x17, 0x60, 0x29, 0xF3, 0xFF, 0xFF,
-        0x40, 0x53, 0x31, 0x41, 0x17, 0x60, 0x27, 0xF3, 0xFF, 0xFF, 0x40, 0x51, 0x17, 0x60, 0x24, 0xF3,
-        0xFF, 0xFF, 0x60, 0x43, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB,
-        0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB,
-        0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB,
-        0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB,
-        0x2F, 0x44, 0xBD, 0xDB, 0x17, 0x60, 0x24, 0xFD, 0x61, 0x58, 0xFF, 0xFF, 0x28, 0x60, 0x76, 0x63,
-        0xA3, 0xD3, 0x33, 0x5C, 0x02, 0xA4, 0xBD, 0xDB, 0xFE, 0xB4, 0xE0, 0x85, 0xC4, 0x85, 0x47, 0xD9,
-        0x34, 0x44, 0x5B, 0xDB, 0x44, 0xF3, 0x5B, 0xDB, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E, 0xFF, 0x01,
-        0x82, 0xE1, 0x80, 0xFF, 0x90, 0xFF, 0x88, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E, 0x41, 0xFF,
-        0x00, 0x60, 0x03, 0xE1, 0x21, 0x46, 0x66, 0x45, 0x00, 0xF4, 0x2E, 0x44, 0x09, 0xFA, 0x6A, 0x61,
-        0x7F, 0x60, 0xFE, 0x63, 0xA1, 0xFF, 0x9A, 0xFF, 0x05, 0x11, 0x0A, 0x00, 0x00, 0xF4, 0x01, 0xF2,
-        0x17, 0x18, 0x7A, 0x61, 0x02, 0x25, 0x04, 0x00, 0x6C, 0x44, 0x7A, 0xDA, 0xFB, 0x1C, 0xF6, 0x11,
-        0xD9, 0x81, 0x41, 0xFF, 0x02, 0x1C, 0x00, 0xF4, 0xDA, 0x82, 0x41, 0xFF, 0xC9, 0x81, 0xCB, 0x83,
-        0x6C, 0x44, 0x5A, 0xDA, 0x02, 0x1C, 0x00, 0xF4, 0x81, 0xF2, 0x6C, 0x44, 0x5A, 0xDA, 0xCB, 0x83,
-        0x02, 0x74, 0x02, 0x60, 0x04, 0xE1, 0x80, 0x60, 0x00, 0x61, 0x5D, 0x93, 0xB5, 0xFF, 0x98, 0xFF,
-        0x26, 0x44, 0xFD, 0xB4, 0x84, 0xBC, 0x40, 0x46, 0x65, 0x46, 0x00, 0x64, 0x23, 0xFA, 0x3F, 0xFC,
-        0x63, 0x47, 0x0A, 0x63, 0x0F, 0xFC, 0x00, 0xF4, 0x08, 0xFA, 0xCB, 0xFE, 0x18, 0xE1, 0x44, 0xFF,
-        0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0xE2, 0xFE, 0x03, 0x04, 0xA3, 0x60, 0x99, 0x78, 0xFF, 0xFF,
-        0xE0, 0xFE, 0x03, 0x04, 0xA3, 0x60, 0xAF, 0x78, 0xFF, 0xFF, 0xE1, 0xFE, 0x07, 0x05, 0x9F, 0xFE,
-        0x03, 0x04, 0x18, 0x60, 0x24, 0x78, 0xFF, 0xFF, 0x43, 0xFF, 0xA9, 0x01, 0xD3, 0xF3, 0xFF, 0xFF,
-        0x01, 0xB4, 0xFF, 0xFF, 0x08, 0x24, 0x15, 0x00, 0x29, 0x44, 0x08, 0x26, 0xE1, 0x01, 0x72, 0x44,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x94, 0xF3, 0xE8, 0x85, 0xFF, 0xB7,
-        0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x85, 0x73, 0x44, 0xD4, 0x84, 0x10, 0x65, 0xD4, 0x80, 0xFF, 0xFF,
-        0x37, 0x04, 0x3F, 0x40, 0x40, 0x26, 0x09, 0x00, 0x18, 0x60, 0x1C, 0xF3, 0x5A, 0xD1, 0xA0, 0x50,
-        0xA4, 0x52, 0x5A, 0xD3, 0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x50, 0xBC, 0xF3, 0xD2, 0xF1, 0x01, 0xA8,
-        0x07, 0xA8, 0x0A, 0x03, 0x09, 0x03, 0x64, 0x40, 0x01, 0x26, 0x09, 0x00, 0x18, 0x60, 0x07, 0xF3,
-        0xFF, 0xFF, 0x01, 0xB4, 0xFF, 0xFF, 0x03, 0x02, 0xAD, 0x4F, 0xFA, 0xB4, 0xA0, 0x5D, 0xAE, 0x4F,
-        0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x3F, 0x40, 0x02, 0x2B, 0x11, 0x00, 0x0C, 0x60, 0x00, 0x62,
-        0x00, 0x60, 0x71, 0x7C, 0x00, 0x60, 0xB1, 0x65, 0x1A, 0x60, 0x58, 0x4D, 0x88, 0x78, 0xFF, 0xFF,
-        0x08, 0xE1, 0x62, 0xFF, 0xA3, 0xFF, 0xFF, 0xFF, 0xA2, 0xFF, 0x02, 0x60, 0x08, 0xE1, 0xBD, 0xFE,
-        0x97, 0x01, 0x21, 0x46, 0x01, 0x5D, 0x5C, 0x62, 0x03, 0xE1, 0x44, 0xFF, 0xA1, 0xFF, 0x9A, 0xFF,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x62, 0x62, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0xA1, 0xFF,
-        0x5A, 0xDC, 0x12, 0xE1, 0x02, 0x60, 0x01, 0xE1, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x28, 0x40,
-        0x40, 0x2B, 0x03, 0x00, 0x29, 0x40, 0x20, 0x27, 0x97, 0x00, 0xC8, 0x74, 0xCD, 0xE2, 0x29, 0x44,
-        0x08, 0xBC, 0x40, 0x49, 0x44, 0xFF, 0x05, 0xE1, 0x28, 0x40, 0x08, 0x2A, 0x07, 0x00, 0x28, 0x40,
-        0x48, 0x36, 0x04, 0x00, 0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0x29, 0x44, 0xFF, 0x60,
-        0xEF, 0x65, 0x24, 0x89, 0x40, 0x27, 0x3F, 0x00, 0x00, 0x00, 0x29, 0x40, 0x80, 0x27, 0x0B, 0x00,
-        0x07, 0x61, 0xA1, 0xFF, 0xCD, 0x81, 0x04, 0x25, 0x61, 0x00, 0x87, 0x4C, 0xFB, 0x02, 0xF3, 0x60,
-        0xA0, 0x64, 0x80, 0x4C, 0x07, 0x00, 0xA1, 0xFF, 0x9C, 0x4C, 0x9C, 0x4C, 0x9C, 0x4D, 0x05, 0x60,
-        0xCF, 0x64, 0x80, 0x4C, 0x28, 0x40, 0x40, 0x2B, 0x05, 0x00, 0x29, 0x40, 0x20, 0x27, 0x02, 0x00,
-        0x15, 0x60, 0x6F, 0x6B, 0x04, 0x25, 0x4A, 0x00, 0x30, 0x64, 0x3A, 0xDB, 0x44, 0xFF, 0x04, 0x25,
-        0x45, 0x00, 0x04, 0x60, 0x00, 0x65, 0x25, 0x44, 0xB4, 0x84, 0x80, 0x4E, 0x2D, 0x41, 0x04, 0x25,
-        0x3D, 0x00, 0x61, 0x4C, 0x00, 0x60, 0x8A, 0x65, 0xC5, 0x81, 0x61, 0x54, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x04, 0x25, 0x34, 0x00, 0x67, 0x4E, 0x07, 0x64, 0x1C, 0xFB, 0x00, 0xE1, 0x02, 0x60, 0x05, 0xE1,
-        0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x28, 0x40, 0x40, 0x27, 0x0A, 0x00, 0x1C, 0x65, 0x28, 0x40,
-        0xA4, 0x36, 0x14, 0x65, 0x23, 0x44, 0xC4, 0x84, 0x28, 0x40, 0x08, 0x2A, 0x0C, 0x00, 0x07, 0x00,
-        0x23, 0x44, 0x1C, 0xA4, 0x29, 0x40, 0x20, 0x27, 0x02, 0x00, 0x11, 0x60, 0x0F, 0x6B, 0x3C, 0x46,
-        0x98, 0xF0, 0x23, 0x44, 0xC4, 0x84, 0x06, 0x74, 0x25, 0x5C, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xB0, 0x84, 0x80, 0x4C, 0x9C, 0x4C, 0x44, 0xFF, 0x18, 0xE1, 0x0A, 0x64, 0x1E, 0x74,
-        0x02, 0x60, 0x05, 0xE1, 0x40, 0x40, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0xC4, 0xE2, 0x27, 0x44,
-        0x20, 0x2A, 0x06, 0x00, 0x42, 0x64, 0x3A, 0xDB, 0x67, 0x4C, 0xB0, 0x60, 0x80, 0x78, 0xFF, 0xFF,
-        0x41, 0x64, 0x3A, 0xDB, 0x62, 0xFF, 0x08, 0xE1, 0xE2, 0xFE, 0x72, 0x52, 0xA1, 0xFF, 0x98, 0xFF,
-        0x80, 0x3E, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x28, 0x40, 0x08, 0x27, 0x66, 0x01, 0x3C, 0x46,
-        0x8B, 0xFF, 0x84, 0x60, 0x00, 0xE4, 0x0F, 0x60, 0x92, 0x64, 0xC9, 0x60, 0x58, 0x4F, 0x10, 0x78,
-        0xFF, 0xFF, 0x3F, 0xF2, 0x00, 0x60, 0x18, 0x70, 0x18, 0x71, 0x20, 0x72, 0x00, 0xF2, 0x60, 0x53,
-        0x20, 0xE1, 0xA1, 0xFF, 0x88, 0x75, 0x00, 0xE1, 0xFF, 0xFF, 0x60, 0x50, 0x75, 0x44, 0x12, 0x71,
-        0x6E, 0x72, 0x81, 0x75, 0xFF, 0xFF, 0x88, 0xFF, 0xA3, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0x32, 0xF3,
-        0x08, 0x29, 0x0A, 0x00, 0x60, 0x40, 0x07, 0x22, 0x07, 0x00, 0xFE, 0xB4, 0x32, 0xFB, 0x27, 0x44,
-        0x10, 0xBC, 0xF7, 0xB4, 0x40, 0x47, 0x43, 0xFF, 0x00, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x08, 0xE1,
-        0x31, 0x40, 0x01, 0x2A, 0x04, 0x00, 0x00, 0x64, 0x33, 0xFB, 0x01, 0x60, 0x0A, 0xE1, 0xE5, 0xFE,
-        0x27, 0x05, 0x9F, 0xFE, 0x12, 0x05, 0x31, 0x41, 0x40, 0x2A, 0x0F, 0x00, 0x07, 0x60, 0xEA, 0xF1,
-        0xAE, 0x4C, 0x90, 0x80, 0x10, 0x2A, 0x09, 0x00, 0x7F, 0xB1, 0x07, 0x60, 0xEA, 0xFB, 0x60, 0x40,
-        0x10, 0x2A, 0x80, 0xB9, 0x41, 0x51, 0xDF, 0xFE, 0x19, 0xFF, 0x27, 0x44, 0x10, 0x26, 0x13, 0x00,
-        0x9F, 0xFE, 0x02, 0x04, 0x40, 0xE1, 0x06, 0x00, 0x7C, 0xE1, 0x31, 0x44, 0x01, 0x2A, 0x02, 0x00,
-        0x04, 0x0A, 0xFD, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0xAF, 0x60, 0x7B, 0x78, 0xFF, 0xFF,
-        0xAA, 0x60, 0xC0, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x08, 0x26, 0xFF, 0xFF, 0xC0, 0x60, 0xEA, 0x78,
-        0xFF, 0xFF, 0x48, 0xF3, 0x32, 0xF1, 0x00, 0x63, 0x64, 0x40, 0x07, 0x26, 0x03, 0x00, 0xA5, 0x60,
-        0x6C, 0x78, 0xFF, 0xFF, 0x31, 0x40, 0x08, 0x26, 0xF1, 0x01, 0xCD, 0xE2, 0x84, 0xE1, 0x70, 0x41,
-        0xAD, 0x80, 0x71, 0x40, 0x80, 0x27, 0xEA, 0x12, 0x03, 0x03, 0xC1, 0x60, 0x3B, 0x78, 0xFF, 0xFF,
-        0xA1, 0xFF, 0xFF, 0xFF, 0xC4, 0xE2, 0x32, 0xFD, 0x60, 0x40, 0x01, 0x2A, 0xDC, 0x01, 0x3C, 0x46,
-        0x3E, 0xF2, 0x2A, 0xF0, 0x27, 0x41, 0x44, 0x48, 0x20, 0xB9, 0x01, 0xB4, 0xF7, 0xB1, 0x0A, 0x03,
-        0x64, 0x40, 0x08, 0x27, 0x07, 0x00, 0x0F, 0x60, 0xEE, 0x63, 0x00, 0x64, 0x45, 0xFB, 0x46, 0xFB,
-        0xBD, 0xDB, 0xA3, 0xDB, 0xCB, 0x0A, 0xCA, 0x11, 0x41, 0x47, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x10, 0x26, 0x04, 0x00, 0x01, 0x2A, 0x05, 0x00, 0x10, 0x2B, 0x03, 0x00, 0x29, 0x47, 0x20, 0xBF,
-        0x40, 0x49, 0x05, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0x2A, 0xE8, 0x3C, 0x46, 0x00, 0x63, 0x32, 0xFD,
-        0x43, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2A, 0x03, 0x00, 0xA8, 0x60, 0x76, 0x78,
-        0xFF, 0xFF, 0x64, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x0E, 0x00, 0x1F, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x40, 0x2B, 0x09, 0x00, 0x15, 0x60, 0xDD, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x02, 0x2A,
-        0x03, 0x00, 0xA9, 0x60, 0x81, 0x78, 0xFF, 0xFF, 0x1F, 0xF2, 0xC0, 0x60, 0x00, 0x65, 0xA4, 0x9C,
-        0x3F, 0x60, 0xCF, 0x65, 0x29, 0x44, 0xA4, 0x84, 0x30, 0x89, 0x15, 0x60, 0xD9, 0xF3, 0xFF, 0xFF,
-        0x15, 0x60, 0xD8, 0xFB, 0x1F, 0xF2, 0x39, 0xF1, 0xE0, 0x60, 0xFF, 0xB5, 0x0A, 0x18, 0x60, 0x47,
-        0x1F, 0xB4, 0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64,
-        0x60, 0x47, 0xB4, 0x81, 0x07, 0x60, 0xEB, 0xF1, 0xFF, 0xFF, 0xB1, 0x8C, 0x29, 0x40, 0x40, 0x2B,
-        0x10, 0x00, 0x22, 0x60, 0xC6, 0x65, 0x60, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3,
-        0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x01, 0x60, 0x09, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C,
-        0x14, 0x00, 0x22, 0x60, 0xC6, 0x65, 0x60, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3,
-        0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C,
-        0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B, 0x67, 0x44, 0x60, 0x4C, 0x00, 0xE1, 0x84, 0xFF, 0xC1, 0x60,
-        0x6B, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x0D, 0x00, 0xE5, 0xFE, 0x03, 0x04, 0xAA, 0x60, 0xC0, 0x78,
-        0xFF, 0xFF, 0x32, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x07, 0x22, 0x43, 0xFF, 0xA4, 0x60, 0x7C, 0x78,
-        0xFF, 0xFF, 0x3C, 0x44, 0x0B, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x0A, 0xE1, 0x1C, 0x42, 0x22, 0x46,
-        0x13, 0xF2, 0xFF, 0x65, 0x60, 0x47, 0x2A, 0xF2, 0x40, 0x45, 0x40, 0x48, 0x04, 0x2B, 0x13, 0x00,
-        0x16, 0xF2, 0x1D, 0xF2, 0x40, 0x43, 0x0F, 0xF2, 0x40, 0x4D, 0x0F, 0x64, 0x14, 0xF0, 0x35, 0xF2,
-        0xA0, 0x82, 0x0F, 0xB4, 0xCA, 0x85, 0xD4, 0x80, 0x10, 0xF2, 0x01, 0x02, 0x2B, 0xFA, 0x27, 0x44,
-        0x40, 0xBC, 0x40, 0x47, 0x13, 0x00, 0x17, 0xF2, 0x2C, 0xF0, 0x40, 0x43, 0x1B, 0xF2, 0x1D, 0xFA,
-        0x40, 0x4D, 0x64, 0x40, 0x01, 0x2A, 0x02, 0x00, 0xAB, 0xFC, 0x05, 0x00, 0x28, 0x40, 0xA4, 0x36,
-        0x02, 0x00, 0x11, 0xF2, 0x2B, 0xFA, 0x27, 0x44, 0xBF, 0xB4, 0x40, 0x47, 0xF0, 0xFE, 0xAF, 0x60,
-        0x85, 0x78, 0xFF, 0xFF, 0x22, 0x46, 0x2C, 0xF0, 0x27, 0x44, 0xDF, 0xB4, 0x40, 0x47, 0x64, 0x40,
-        0x01, 0x26, 0x01, 0x00, 0x01, 0x00, 0x11, 0x00, 0x2A, 0xF0, 0x01, 0x65, 0x64, 0x40, 0xA4, 0x3A,
-        0x04, 0x65, 0x27, 0x44, 0x34, 0x87, 0x36, 0xF3, 0xFF, 0xFF, 0x60, 0x56, 0xAD, 0xE2, 0x04, 0x64,
-        0x3A, 0xDB, 0x69, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x06, 0x64, 0x3A, 0xDB, 0x22, 0x46,
-        0x01, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xC1, 0x60, 0x44, 0x78, 0xFF, 0xFF, 0x28, 0x40, 0xC4, 0x3A,
-        0x0C, 0x00, 0x27, 0x44, 0xFD, 0xB4, 0x40, 0x47, 0xA8, 0xE2, 0x05, 0xE1, 0x01, 0x60, 0x08, 0xE1,
-        0x2A, 0xE8, 0x3C, 0x46, 0xA5, 0x60, 0x1C, 0x78, 0xFF, 0xFF, 0x3F, 0x40, 0x01, 0x2B, 0x05, 0x00,
-        0x67, 0x4C, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B, 0x07, 0x60, 0xEC, 0xF1, 0x1F, 0xF2,
-        0x2A, 0xE8, 0xB0, 0x81, 0x29, 0x40, 0x40, 0x2B, 0x14, 0x00, 0x61, 0x4C, 0x22, 0x60, 0xC6, 0x65,
-        0x61, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1,
-        0x01, 0x60, 0x09, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0xFF, 0x60, 0xF2, 0x64, 0x64, 0x4C, 0x40, 0x43,
-        0x18, 0x00, 0x29, 0x47, 0x80, 0xB7, 0x34, 0x94, 0x60, 0x4C, 0x22, 0x60, 0xC6, 0x65, 0x61, 0x47,
-        0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60,
-        0x69, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B, 0x67, 0x44,
-        0x60, 0x4C, 0x40, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0x28, 0x45, 0xBF, 0x60, 0xFF, 0x64, 0x24, 0x88,
-        0xC4, 0xE2, 0x08, 0x64, 0x3A, 0xDB, 0x21, 0x46, 0x2A, 0x44, 0x72, 0x45, 0x24, 0xFA, 0x94, 0xF3,
-        0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40, 0x01, 0x26, 0x64, 0x44, 0x94, 0xF9, 0x25, 0xFA,
-        0x95, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x95, 0xFB, 0x28, 0xFA, 0x96, 0xF3, 0x02, 0x04, 0xDC, 0x84,
-        0x96, 0xFB, 0x29, 0xFA, 0x24, 0x44, 0x04, 0x2A, 0x06, 0x00, 0x28, 0x40, 0xA4, 0x36, 0x03, 0x00,
-        0xA7, 0x60, 0x46, 0x78, 0xFF, 0xFF, 0x94, 0xFC, 0x13, 0x60, 0x4A, 0xF1, 0x28, 0x44, 0x08, 0x2A,
-        0x51, 0x00, 0x03, 0x2B, 0x01, 0x00, 0x4E, 0x00, 0x64, 0x40, 0x00, 0x36, 0x4B, 0x00, 0x32, 0xF2,
-        0x2F, 0xF0, 0x50, 0xFE, 0x01, 0x2A, 0x03, 0x00, 0x01, 0x61, 0x8E, 0xF3, 0x31, 0x00, 0xD0, 0x80,
-        0x33, 0xF2, 0x30, 0xF0, 0x34, 0xF2, 0xD0, 0x80, 0x31, 0xF0, 0xFF, 0xFF, 0xD0, 0x80, 0x60, 0x47,
-        0x34, 0x0C, 0xFF, 0xB4, 0x15, 0x60, 0x02, 0x65, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0xFF, 0xFF,
-        0x31, 0x18, 0x60, 0x43, 0x50, 0xFE, 0x66, 0x41, 0x32, 0xF0, 0x63, 0x46, 0x03, 0xF2, 0x61, 0x46,
-        0xD0, 0x80, 0x33, 0xF0, 0x63, 0x46, 0x04, 0xF2, 0x61, 0x46, 0xD0, 0x80, 0x34, 0xF0, 0x63, 0x46,
-        0x05, 0xF2, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x0C, 0x00, 0xF2, 0x61, 0x46, 0x1A, 0x18,
-        0xE8, 0x01, 0x06, 0xF0, 0x8E, 0xF3, 0x61, 0x46, 0x02, 0x61, 0x64, 0x40, 0x02, 0x2A, 0x12, 0x00,
-        0xFC, 0xA0, 0xFF, 0xFF, 0x04, 0x0E, 0x61, 0x44, 0x14, 0xFA, 0x11, 0xFC, 0x0B, 0x00, 0x2C, 0xF2,
-        0x2F, 0xFA, 0x2D, 0xF2, 0x30, 0xFA, 0x2E, 0xF2, 0x31, 0xFA, 0x1D, 0xFF, 0x26, 0x44, 0x02, 0xBC,
-        0x40, 0x46, 0x1E, 0x00, 0x26, 0x43, 0x84, 0xBB, 0xFC, 0xB3, 0x21, 0x46, 0x01, 0x5D, 0x0F, 0xFC,
-        0x5C, 0x46, 0x05, 0xFF, 0x27, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x50, 0xFE, 0x28, 0x40, 0x08, 0x3A,
-        0x12, 0x00, 0x2F, 0xF2, 0x30, 0xF0, 0x60, 0x43, 0x31, 0xF2, 0x22, 0x46, 0x64, 0x41, 0x2C, 0xF0,
-        0x2D, 0xF0, 0xD3, 0x80, 0x2E, 0xF0, 0xD1, 0x80, 0xD0, 0x80, 0x27, 0x44, 0x09, 0x0C, 0x03, 0x00,
-        0x27, 0x44, 0x06, 0x22, 0x05, 0x00, 0xB8, 0xB4, 0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0xD4, 0x64, 0x40, 0x48, 0x0D, 0x64, 0x3A, 0xDB, 0x21, 0x46, 0x1C, 0xF2, 0x00, 0xE1, 0xF0, 0xFE,
-        0x00, 0x63, 0x28, 0x44, 0xA4, 0x36, 0x07, 0x00, 0x04, 0x2B, 0x05, 0x00, 0x30, 0xF3, 0x2D, 0x45,
-        0xD4, 0x84, 0xCA, 0x65, 0xD4, 0x83, 0xD4, 0x64, 0x35, 0x00, 0x0F, 0x64, 0x3A, 0xDB, 0x21, 0x46,
-        0x29, 0x40, 0x40, 0x27, 0x15, 0x00, 0x80, 0x27, 0x02, 0x00, 0xCA, 0x65, 0x01, 0x00, 0x6A, 0x65,
-        0x1C, 0xF2, 0xFF, 0xFF, 0x04, 0x7F, 0x40, 0x45, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64,
-        0x37, 0x36, 0x15, 0x64, 0x6E, 0x3A, 0x17, 0x00, 0x84, 0x7F, 0x40, 0x45, 0x0B, 0x64, 0x13, 0x00,
-        0x1C, 0xF2, 0x1E, 0x65, 0x40, 0x45, 0x0B, 0x36, 0x1E, 0x64, 0x0F, 0x36, 0x16, 0x64, 0x0A, 0x36,
-        0x12, 0x64, 0x0E, 0x36, 0x0E, 0x64, 0x09, 0x36, 0x0E, 0x64, 0x0D, 0x36, 0x0A, 0x64, 0x08, 0x36,
-        0x0A, 0x64, 0x0C, 0x36, 0x0A, 0x64, 0x40, 0x4D, 0x00, 0xE1, 0xF0, 0xFE, 0x2B, 0xF2, 0xC4, 0x85,
-        0xD4, 0x83, 0xC4, 0x64, 0x40, 0x48, 0x2F, 0xF0, 0xB0, 0xF0, 0xB1, 0xF2, 0xA1, 0xFF, 0x12, 0x74,
-        0xCD, 0xE2, 0x80, 0x4E, 0x12, 0x74, 0x83, 0x4C, 0x12, 0x74, 0x9A, 0xFF, 0x84, 0x4C, 0x12, 0x74,
-        0x85, 0x4C, 0x12, 0x74, 0x81, 0x4C, 0x12, 0x74, 0xA1, 0xFF, 0x98, 0xFF, 0xB1, 0x60, 0x58, 0x4F,
-        0x00, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0x18, 0xE1, 0x78, 0x44, 0x03, 0xA4, 0x35, 0xFB, 0xB1, 0x60,
-        0x43, 0x78, 0xFF, 0xFF, 0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49, 0x27, 0x44, 0x01, 0x2A, 0x05, 0x00,
-        0xFE, 0xB4, 0x40, 0x47, 0xA5, 0x60, 0xCD, 0x78, 0xFF, 0xFF, 0x13, 0x60, 0x2E, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x02, 0x36, 0xC1, 0xFE, 0xA4, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x28, 0x40, 0xB4, 0x3A,
-        0x0B, 0x00, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x02, 0x64, 0x31, 0xFB,
-        0xC0, 0xFE, 0xA6, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x28, 0x44, 0xD4, 0x36, 0x03, 0x00, 0xA8, 0x60,
-        0x5D, 0x78, 0xFF, 0xFF, 0xA8, 0xE2, 0x27, 0x44, 0xFB, 0xB4, 0x40, 0x47, 0x1C, 0x42, 0x22, 0x46,
-        0x16, 0x60, 0x2B, 0xF3, 0xFF, 0xFF, 0x34, 0xFB, 0x2A, 0xF0, 0xF7, 0x60, 0xFF, 0x64, 0xA0, 0x84,
-        0xA2, 0xDA, 0x60, 0x40, 0x40, 0x2B, 0xC4, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x22, 0x26,
-        0x3F, 0x00, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x05, 0x00, 0xBA, 0x00, 0x04, 0x2B, 0xB8, 0x00,
-        0x87, 0xF5, 0x01, 0x00, 0x07, 0xF4, 0x4B, 0xF2, 0xFF, 0xFF, 0xDC, 0x84, 0x4B, 0xFA, 0x0C, 0x60,
-        0xFE, 0x62, 0x80, 0xFF, 0xC8, 0x60, 0x78, 0x44, 0x02, 0xA4, 0xA2, 0xDB, 0x46, 0x78, 0xFF, 0xFF,
-        0x82, 0xFF, 0x87, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43, 0x22, 0x46,
-        0x22, 0xF2, 0x63, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x4B, 0xF0, 0x64, 0x41,
-        0x64, 0x47, 0x60, 0x5F, 0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47, 0x22, 0x46, 0x3A, 0xFA,
-        0x64, 0x44, 0x20, 0x7F, 0x34, 0x94, 0x3B, 0xFA, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F,
-        0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x80, 0x00,
-        0x2A, 0xF2, 0x00, 0x60, 0x7C, 0x62, 0x60, 0x40, 0x40, 0x2B, 0x24, 0x00, 0xA2, 0xD3, 0x00, 0x61,
-        0x60, 0xFE, 0xA0, 0xD3, 0x5E, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81,
-        0xC0, 0x2B, 0x04, 0x00, 0x80, 0x2A, 0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00,
-        0x60, 0x47, 0xDC, 0x87, 0x01, 0x61, 0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE,
-        0x5A, 0xD1, 0xFF, 0xFF, 0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64,
-        0xA2, 0xDB, 0x20, 0xFE, 0x00, 0x60, 0x3E, 0xF3, 0xFF, 0xFF, 0xA0, 0xD3, 0x5A, 0xD1, 0x3A, 0xFA,
-        0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x40, 0xF3,
-        0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1, 0x64, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE6, 0x7F,
-        0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5A, 0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00,
-        0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEC, 0x7F,
-        0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5A, 0x08, 0x60, 0x00, 0xEA, 0x65, 0x44, 0x02, 0xA4,
-        0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA,
-        0x0B, 0xF2, 0xFF, 0xFF, 0x7F, 0xB4, 0x0C, 0xF0, 0x04, 0x02, 0x64, 0x46, 0x00, 0xF0, 0x04, 0x64,
-        0x22, 0x46, 0x03, 0xFA, 0x60, 0x41, 0x64, 0x46, 0x01, 0xF2, 0xFC, 0xA1, 0x61, 0x45, 0xD4, 0x84,
-        0xFF, 0xFF, 0x08, 0x02, 0x00, 0xF0, 0x04, 0x63, 0x64, 0x46, 0x01, 0xF2, 0x22, 0x46, 0x1A, 0xFA,
-        0x03, 0xFC, 0x02, 0x00, 0x22, 0x46, 0x1A, 0xFA, 0x35, 0xF2, 0x04, 0xF8, 0xDC, 0x84, 0x35, 0xFA,
-        0x14, 0xF2, 0x0F, 0xB5, 0x0F, 0xB4, 0xCC, 0x84, 0x94, 0x80, 0x04, 0x60, 0x00, 0x65, 0x2A, 0xF2,
-        0x01, 0x02, 0x94, 0x84, 0x2A, 0xFA, 0x95, 0xFC, 0x06, 0x00, 0xC4, 0x3A, 0x07, 0x00, 0x27, 0x44,
-        0xFD, 0xB4, 0x40, 0x47, 0xA8, 0xE2, 0xA5, 0x60, 0x7A, 0x78, 0xFF, 0xFF, 0x28, 0x44, 0x04, 0x26,
-        0x05, 0x00, 0x68, 0x3A, 0x03, 0x00, 0x32, 0x44, 0x00, 0x27, 0x03, 0x00, 0xA4, 0x60, 0x7C, 0x78,
-        0xFF, 0xFF, 0x0A, 0x64, 0x3A, 0xDB, 0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0x0E, 0x64, 0x3A, 0xDB,
-        0x3C, 0x44, 0x60, 0x46, 0x1E, 0xF0, 0x40, 0x42, 0x64, 0x40, 0x40, 0x27, 0x48, 0x00, 0x1F, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27, 0x3C, 0x00, 0x80, 0x2B, 0x0B, 0x00, 0xBF, 0x60, 0xFF, 0x65,
-        0x29, 0x44, 0x24, 0x89, 0x80, 0x60, 0x00, 0x65, 0x29, 0x44, 0x34, 0x89, 0x80, 0x60, 0x00, 0x63,
-        0x05, 0x00, 0x3F, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x00, 0x63, 0x1E, 0xF2, 0x39, 0xF1,
-        0xC0, 0x60, 0xFF, 0xB5, 0x0A, 0x18, 0x60, 0x47, 0x1F, 0xB4, 0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D,
-        0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47, 0xB4, 0x84, 0x07, 0x60, 0xEB, 0xF1,
-        0x3C, 0x94, 0xB0, 0x84, 0x60, 0x4C, 0x22, 0x60, 0xC6, 0x65, 0x60, 0x47, 0x1F, 0xB4, 0xE0, 0x84,
-        0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B, 0x60, 0x4C,
-        0xB5, 0xFF, 0x64, 0x4C, 0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B, 0x67, 0x44, 0x60, 0x4C, 0x32, 0x00,
-        0x15, 0x60, 0xDD, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x04, 0x26, 0xCB, 0x01, 0xBF, 0x01, 0x40, 0x60,
-        0x00, 0x65, 0x29, 0x44, 0x34, 0x89, 0x40, 0x60, 0x00, 0x63, 0x9F, 0xF2, 0x1E, 0xF2, 0x39, 0xF1,
-        0xC0, 0x60, 0xFF, 0xB5, 0x0A, 0x18, 0x60, 0x47, 0x1F, 0xB4, 0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D,
-        0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47, 0xB4, 0x84, 0x07, 0x60, 0xEB, 0xF1,
-        0x3C, 0x94, 0xB0, 0x81, 0x61, 0x4C, 0x22, 0x60, 0xC6, 0x65, 0x61, 0x47, 0x1F, 0xB4, 0xE0, 0x84,
-        0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x01, 0x60, 0x09, 0x6B, 0x60, 0x4C,
-        0xB5, 0xFF, 0x64, 0x4C, 0x40, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0x84, 0xFF, 0xC1, 0x60, 0x6B, 0x64,
-        0x40, 0x42, 0x82, 0xFF, 0x2A, 0xF2, 0x10, 0x60, 0x00, 0x65, 0xA4, 0x84, 0xB4, 0xBC, 0x1E, 0xF0,
-        0x40, 0x48, 0x64, 0x40, 0x40, 0x27, 0x17, 0x00, 0x1C, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x0A, 0x36,
-        0x06, 0x00, 0x14, 0x36, 0x07, 0x00, 0x37, 0x36, 0x08, 0x00, 0x6E, 0x36, 0x09, 0x00, 0x70, 0x7C,
-        0xA0, 0x63, 0x0F, 0x00, 0x38, 0x7C, 0x50, 0x63, 0x0C, 0x00, 0x15, 0x7C, 0x1E, 0x63, 0x09, 0x00,
-        0x0B, 0x7C, 0x0F, 0x63, 0x06, 0x00, 0x9C, 0xF4, 0xFF, 0x65, 0x63, 0x47, 0xA4, 0x9C, 0xA7, 0x84,
-        0x23, 0x00, 0x40, 0x45, 0x43, 0x4D, 0x00, 0xE1, 0xF0, 0xFE, 0x29, 0x40, 0x80, 0x2B, 0x03, 0x00,
-        0x00, 0x60, 0x6A, 0x65, 0x02, 0x00, 0x00, 0x60, 0xCA, 0x65, 0x1F, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x40, 0x27, 0x0E, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x04, 0x27, 0x03, 0x00, 0x65, 0x44,
-        0xE0, 0x85, 0x12, 0x00, 0x2B, 0xF2, 0x11, 0xF0, 0xC0, 0x84, 0xD0, 0x84, 0xC4, 0x83, 0x11, 0x00,
-        0x1E, 0x64, 0xC4, 0x84, 0x60, 0x45, 0x08, 0x00, 0x40, 0x45, 0xFF, 0x60, 0xF8, 0x64, 0x40, 0x43,
-        0x00, 0xE1, 0xF0, 0xFE, 0x00, 0x60, 0x3C, 0x65, 0x91, 0xF4, 0x1B, 0xF0, 0xC3, 0x84, 0xC4, 0x84,
-        0xC0, 0x83, 0x28, 0x44, 0xA1, 0xFF, 0x12, 0x74, 0x80, 0x4E, 0x12, 0x74, 0x83, 0x4C, 0x9A, 0xFF,
-        0x12, 0x74, 0x56, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74,
-        0x5C, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0xA1, 0xFF,
-        0x98, 0xFF, 0xB1, 0x60, 0x58, 0x4F, 0x00, 0x78, 0xFF, 0xFF, 0xBC, 0xFF, 0xB5, 0xFF, 0x01, 0x60,
-        0x18, 0xE1, 0x47, 0xFF, 0x27, 0x44, 0x02, 0xBC, 0x40, 0x47, 0x36, 0xF3, 0xB6, 0xFF, 0xB7, 0xFF,
-        0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0x60, 0x56, 0xAD, 0xE2, 0xA5, 0x60, 0xC7, 0x78,
-        0xFF, 0xFF, 0x15, 0x60, 0xDD, 0xF3, 0x15, 0x60, 0xBE, 0xF3, 0x60, 0x40, 0x04, 0x26, 0x0B, 0x00,
-        0x07, 0xB4, 0x60, 0x40, 0x01, 0x36, 0x07, 0x00, 0x29, 0x44, 0xBF, 0x60, 0xFF, 0xB7, 0x80, 0xBF,
-        0x40, 0x49, 0x80, 0x67, 0x05, 0x00, 0x3F, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x00, 0x64,
-        0x12, 0x60, 0xD3, 0xF1, 0xFF, 0xFF, 0x15, 0x60, 0xD8, 0xF9, 0x39, 0xF1, 0x12, 0x60, 0xBF, 0xF1,
-        0x64, 0x41, 0x64, 0x5E, 0x60, 0x45, 0x64, 0x47, 0x1F, 0xB4, 0x54, 0x94, 0xE0, 0xA0, 0x02, 0x0D,
-        0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47, 0x07, 0x60, 0xEB, 0xF1, 0xB4, 0x84,
-        0xB0, 0x8C, 0x22, 0x60, 0xC6, 0x7C, 0x60, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x40, 0xD3,
-        0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C,
-        0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B, 0x67, 0x44, 0x60, 0x4C, 0x40, 0xE1, 0x01, 0x60, 0x08, 0xE1,
-        0x84, 0xFF, 0xC1, 0x60, 0x6B, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x3C, 0x44, 0x60, 0x46, 0x40, 0x42,
-        0x13, 0x64, 0x3A, 0xDB, 0x10, 0x60, 0x00, 0x65, 0x3C, 0x46, 0x2A, 0xF2, 0x15, 0x60, 0xBE, 0xF1,
-        0xA4, 0x84, 0xC4, 0xBC, 0x40, 0x48, 0x64, 0x44, 0x04, 0x26, 0x09, 0x00, 0x02, 0x26, 0x0A, 0x00,
-        0x01, 0x26, 0x0B, 0x00, 0x08, 0x2A, 0x03, 0x00, 0x0B, 0x63, 0x6E, 0x64, 0x08, 0x00, 0x15, 0x63,
-        0x37, 0x64, 0x05, 0x00, 0x38, 0x63, 0x14, 0x64, 0x02, 0x00, 0x70, 0x63, 0x0A, 0x64, 0x43, 0x4D,
-        0x40, 0x45, 0x00, 0xE1, 0xF0, 0xFE, 0x00, 0x60, 0x1E, 0x64, 0x1B, 0xF0, 0x11, 0xF0, 0xC0, 0x84,
-        0xC0, 0x84, 0x60, 0x43, 0x28, 0x44, 0xA1, 0xFF, 0x12, 0x74, 0x80, 0x4E, 0x12, 0x74, 0x83, 0x4C,
-        0x9A, 0xFF, 0x12, 0x74, 0x5C, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0xA1, 0xFF, 0x98, 0xFF, 0xB1, 0x60, 0x58, 0x4F, 0x00, 0x78, 0xFF, 0xFF, 0x01, 0x60,
-        0x18, 0xE1, 0x78, 0x44, 0x03, 0xA4, 0x35, 0xFB, 0xB1, 0x60, 0x43, 0x78, 0xFF, 0xFF, 0xC4, 0xE2,
-        0x08, 0x64, 0x3A, 0xDB, 0xA5, 0x60, 0x1C, 0x78, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x2A, 0x0E, 0x00,
-        0x1D, 0xFF, 0x26, 0x44, 0x02, 0xBC, 0x40, 0x46, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4,
-        0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x30, 0xF1, 0x52, 0x00, 0xFC, 0xB3, 0x32, 0x40,
-        0x01, 0x2A, 0x06, 0x00, 0x0A, 0xBB, 0x0F, 0xFC, 0xCB, 0xFE, 0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF,
-        0x24, 0x44, 0x04, 0x26, 0x02, 0x00, 0x0F, 0xFC, 0x05, 0xFF, 0x30, 0xF1, 0x27, 0x44, 0x05, 0x22,
-        0x2C, 0x00, 0xFA, 0xB4, 0x40, 0x47, 0x24, 0x44, 0x10, 0x2A, 0x23, 0x00, 0x28, 0x40, 0xD4, 0x3A,
-        0x20, 0x00, 0x31, 0x40, 0x08, 0x26, 0x00, 0x7C, 0x2B, 0x44, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28,
-        0x64, 0x44, 0xC4, 0x84, 0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00,
-        0x20, 0x29, 0x6D, 0xE2, 0x1D, 0xF0, 0xC0, 0x64, 0xC0, 0x84, 0x0A, 0x60, 0x7B, 0xF1, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA2, 0xDB, 0xA5, 0x60, 0xCD, 0x78,
-        0xFF, 0xFF, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x07, 0x00, 0x02, 0x2A, 0x05, 0x00, 0xFD, 0xB4,
-        0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x05, 0x64, 0x3A, 0xDB, 0x28, 0x44, 0xA4, 0x3A,
-        0x07, 0x00, 0x01, 0x60, 0x02, 0x7C, 0x25, 0x44, 0x0A, 0x3A, 0x02, 0x00, 0x01, 0x60, 0x3A, 0x7C,
-        0x31, 0x40, 0x08, 0x26, 0x00, 0x7C, 0x2B, 0x44, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28, 0x64, 0x44,
-        0xC4, 0x84, 0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x28, 0x40, 0xE4, 0x36, 0x00, 0xB4, 0x60, 0x50,
-        0x08, 0x28, 0x01, 0x00, 0x20, 0x29, 0x6D, 0xE2, 0xA4, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x27, 0x44,
-        0x05, 0x22, 0x09, 0x00, 0xBA, 0xB4, 0x40, 0x47, 0x3C, 0x46, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x02, 0x2A, 0x06, 0x00, 0xFD, 0xB4, 0x40, 0x47,
-        0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xF4, 0x01, 0xF3, 0x0A, 0x7C, 0x50, 0x6D, 0xE2, 0xF0, 0x01,
-        0x72, 0x45, 0xDC, 0x84, 0x94, 0xFB, 0x11, 0x64, 0x3A, 0xDB, 0x95, 0xF3, 0x06, 0x04, 0xDC, 0x84,
-        0x95, 0xFB, 0x96, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x96, 0xFB, 0xA4, 0x60, 0x87, 0x78, 0xFF, 0xFF,
-        0x00, 0x61, 0x12, 0x64, 0x3A, 0xDB, 0x18, 0x60, 0xEE, 0x63, 0xBD, 0xD3, 0x72, 0x45, 0x44, 0x8A,
-        0x02, 0x28, 0x03, 0x00, 0xE4, 0xE2, 0xDD, 0x81, 0x04, 0x00, 0x02, 0x28, 0x02, 0x00, 0xE4, 0xE2,
-        0xDD, 0x81, 0xBD, 0xD3, 0x94, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9,
-        0xC4, 0x84, 0x60, 0x55, 0x2A, 0x52, 0xE4, 0xE2, 0x94, 0xFB, 0x02, 0x24, 0x01, 0xB9, 0xBD, 0xD3,
-        0x95, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9, 0xC4, 0x84, 0x95, 0xFB,
-        0x02, 0x24, 0x01, 0xB9, 0xBD, 0xD3, 0x96, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0xC4, 0x84, 0x96, 0xFB,
-        0xA5, 0x60, 0x71, 0x78, 0xFF, 0xFF, 0xAC, 0x01, 0x47, 0xFF, 0x44, 0xFF, 0xC8, 0x74, 0xCD, 0xE2,
-        0xAA, 0x60, 0xFE, 0x78, 0x00, 0x61, 0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0x5C, 0x44, 0x26, 0x44,
-        0x02, 0x26, 0x0C, 0x00, 0x3E, 0x46, 0x09, 0xF2, 0x1E, 0x41, 0x03, 0x1B, 0xAC, 0x60, 0x14, 0x78,
-        0xFF, 0xFF, 0x40, 0x5E, 0xFD, 0xFB, 0x21, 0x44, 0x02, 0x64, 0x40, 0x46, 0x41, 0x5D, 0x21, 0x46,
-        0x00, 0x64, 0x31, 0xFA, 0x00, 0xF2, 0x46, 0x45, 0x87, 0xFC, 0xAC, 0xE2, 0x01, 0x64, 0x33, 0xFB,
-        0x32, 0x40, 0x01, 0x2A, 0x21, 0x00, 0x19, 0xF3, 0x01, 0x60, 0x1E, 0xE1, 0x1D, 0x18, 0x80, 0x64,
-        0x40, 0x49, 0x00, 0xE1, 0x19, 0xFF, 0x08, 0x64, 0x2A, 0xFA, 0x5A, 0xDA, 0x2C, 0xFA, 0x5A, 0xDA,
-        0x5A, 0xDA, 0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0x72, 0x44, 0x24, 0xFA, 0x94, 0xF3,
-        0x25, 0xFA, 0xA1, 0xFF, 0xFF, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D,
-        0x7C, 0x4B, 0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0x01, 0xE1, 0x01, 0x60, 0x1A, 0xE1, 0x3F, 0x60,
-        0xCF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x2E, 0x44, 0x00, 0x36, 0x41, 0x00, 0x01, 0x3A, 0xC9, 0x00,
-        0x88, 0xFF, 0x40, 0x67, 0x29, 0x45, 0x34, 0x89, 0x04, 0x64, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF,
-        0xA1, 0xFF, 0x6C, 0x45, 0x65, 0x44, 0x0F, 0xB4, 0x40, 0x45, 0x1C, 0xFA, 0x65, 0x44, 0x29, 0x41,
-        0xF9, 0x81, 0x52, 0x4A, 0x71, 0x89, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x83, 0x1D, 0xFC,
-        0x1B, 0xFC, 0x98, 0xF1, 0xFC, 0xA3, 0xD3, 0x80, 0x43, 0x43, 0x03, 0x04, 0xAC, 0x60, 0x0A, 0x78,
-        0xFF, 0xFF, 0x09, 0x7C, 0xD3, 0x80, 0x9A, 0xFF, 0x03, 0x07, 0xAC, 0x60, 0x0A, 0x78, 0xFF, 0xFF,
-        0x25, 0x44, 0x01, 0x26, 0x0F, 0xAC, 0x1F, 0x60, 0x50, 0x65, 0x44, 0xD3, 0x12, 0x65, 0x45, 0x46,
-        0x60, 0x47, 0x40, 0x7F, 0x27, 0xFA, 0x8F, 0xFC, 0x18, 0x61, 0xCB, 0xF1, 0xA1, 0xFF, 0x6C, 0x44,
-        0xDC, 0x80, 0xFF, 0xFF, 0x21, 0x03, 0x50, 0xFE, 0xAC, 0x60, 0x20, 0x78, 0xFF, 0xFF, 0xC8, 0x60,
-        0x0B, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0xB5, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xAA, 0x74, 0xCD, 0xE2,
-        0x02, 0x64, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0x01, 0x60, 0x08, 0xE1, 0x05, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x04, 0x25, 0x76, 0x00, 0x6C, 0x44, 0x0A, 0x36, 0x07, 0x00, 0x14, 0x36, 0x05, 0x00,
-        0x37, 0x36, 0x03, 0x00, 0x6E, 0x36, 0x01, 0x00, 0x6C, 0x00, 0x40, 0x45, 0x32, 0x74, 0xA1, 0xFF,
-        0x1C, 0xFA, 0x40, 0x4E, 0x8C, 0x44, 0x60, 0x43, 0x1D, 0xFA, 0x01, 0xE1, 0x20, 0x64, 0x3A, 0xDB,
-        0x2E, 0x44, 0x14, 0x36, 0x12, 0x00, 0x0A, 0x36, 0x0F, 0x00, 0x63, 0x45, 0xE3, 0x83, 0xE3, 0x83,
-        0xC7, 0x83, 0xE3, 0x83, 0xC7, 0x83, 0xFF, 0xFF, 0x37, 0x36, 0x05, 0x00, 0x6E, 0x36, 0x04, 0x00,
-        0xAC, 0x60, 0x1E, 0x78, 0xFF, 0xFF, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xFF, 0xFF,
-        0x80, 0x27, 0xCF, 0x83, 0x1B, 0xFC, 0x01, 0x64, 0x4F, 0xFB, 0xA1, 0xFF, 0x29, 0x41, 0xF9, 0x81,
-        0x52, 0x4A, 0x71, 0x89, 0x2E, 0x44, 0x27, 0xFA, 0x98, 0xF1, 0xFC, 0xA3, 0xD3, 0x80, 0x43, 0x43,
-        0x03, 0x04, 0xAC, 0x60, 0x0A, 0x78, 0xFF, 0xFF, 0x9A, 0xFF, 0x54, 0x63, 0x12, 0x64, 0x40, 0x46,
-        0x8F, 0xFC, 0x18, 0x61, 0xCB, 0xF1, 0x50, 0xFE, 0x6C, 0x40, 0x9E, 0x15, 0x01, 0x60, 0x08, 0xE1,
-        0x80, 0xE1, 0x00, 0x64, 0x33, 0xFB, 0x01, 0x60, 0x18, 0xE1, 0x01, 0x11, 0x0F, 0x00, 0x29, 0x44,
-        0x20, 0xBC, 0x40, 0x49, 0x01, 0x64, 0x33, 0xFB, 0xB6, 0xFF, 0x00, 0xE1, 0x01, 0x60, 0x1A, 0xE1,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x40, 0xFC, 0x11, 0x01, 0x60, 0x18, 0xE1, 0xB5, 0xFF, 0xB6, 0xFF,
-        0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0x35, 0xE1, 0xAC, 0xE2, 0xAA, 0x60,
-        0x97, 0x78, 0xFF, 0xFF, 0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B,
-        0xA2, 0xDB, 0x21, 0x64, 0x3A, 0xDB, 0xD2, 0x01, 0x25, 0x60, 0xF2, 0x64, 0xE5, 0x60, 0x78, 0x41,
-        0xC7, 0x78, 0x97, 0xF1, 0x2A, 0x64, 0x3A, 0xDB, 0x5C, 0x41, 0xC8, 0x01, 0x29, 0x64, 0x3A, 0xDB,
-        0x88, 0x60, 0x85, 0x71, 0x8D, 0xE2, 0xA2, 0xFC, 0x32, 0x40, 0x01, 0x2A, 0xA8, 0x00, 0x01, 0x60,
-        0x1A, 0xE1, 0x23, 0x43, 0xA1, 0xFF, 0xEC, 0x44, 0x2A, 0xFA, 0x40, 0x48, 0xA1, 0xFF, 0x7A, 0xDC,
-        0x7E, 0x36, 0x04, 0xA2, 0xFC, 0x1C, 0x03, 0x1D, 0x00, 0x64, 0x3F, 0xFA, 0x2E, 0x00, 0x03, 0x2B,
-        0x04, 0x00, 0xA1, 0xFF, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x8F, 0xB0, 0x88, 0x3A, 0x03, 0x00,
-        0x70, 0x62, 0xA1, 0xFF, 0x7A, 0xDC, 0x28, 0x40, 0x40, 0x2B, 0x06, 0x00, 0x72, 0x62, 0xA1, 0xFF,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x3F, 0xFC, 0x00, 0xF4, 0x10, 0x62, 0x6E, 0x61,
-        0xA1, 0xFF, 0x05, 0x1D, 0x12, 0x1E, 0x0C, 0x00, 0x00, 0xF4, 0x7C, 0x61, 0x02, 0x62, 0x7A, 0xDC,
-        0x63, 0x40, 0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1, 0x08, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62,
-        0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0x6C, 0x44, 0x5A, 0xDA, 0x98, 0xFF, 0xA1, 0xFF, 0x6C, 0x40,
-        0xA1, 0xFF, 0x47, 0xFF, 0x7C, 0x44, 0x33, 0xFB, 0x26, 0x44, 0xFD, 0xB4, 0x84, 0xBC, 0x01, 0x15,
-        0x7F, 0xB4, 0x40, 0x46, 0x6C, 0x40, 0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0x6C, 0x45, 0xA1, 0xFF,
-        0x7F, 0x60, 0x7F, 0x7C, 0x6C, 0x44, 0xA0, 0x84, 0x15, 0xA7, 0x15, 0xA4, 0x21, 0x46, 0x26, 0xFA,
-        0x29, 0x40, 0x40, 0x2B, 0x07, 0x00, 0xB6, 0xFF, 0x40, 0x60, 0x00, 0x65, 0xA1, 0xFF, 0x6C, 0x44,
-        0x1A, 0xFA, 0x09, 0x00, 0x65, 0x44, 0x0F, 0xB4, 0x06, 0xA8, 0x80, 0x60, 0x00, 0x65, 0x08, 0x28,
-        0x7C, 0x45, 0x29, 0x44, 0x34, 0x89, 0x27, 0xF0, 0x65, 0x44, 0x64, 0x5E, 0x27, 0xFA, 0x81, 0xE1,
-        0x01, 0x60, 0x18, 0xE1, 0x01, 0x11, 0x0F, 0x00, 0x29, 0x44, 0x20, 0xBC, 0x40, 0x49, 0x01, 0x64,
-        0x33, 0xFB, 0xB6, 0xFF, 0x00, 0xE1, 0x01, 0x60, 0x1A, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x40,
-        0xFC, 0x11, 0x01, 0x60, 0x18, 0xE1, 0x21, 0x46, 0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB6, 0xFF,
-        0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0x26, 0x43, 0x2A, 0x44, 0x72, 0x45,
-        0x24, 0xFA, 0x94, 0xF3, 0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40, 0x01, 0x26, 0x64, 0x44,
-        0x94, 0xF9, 0x25, 0xFA, 0x95, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x95, 0xFB, 0x28, 0xFA, 0x96, 0xF3,
-        0x02, 0x04, 0xDC, 0x84, 0x96, 0xFB, 0x29, 0xFA, 0xAA, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0xA1, 0xFF,
-        0x12, 0x61, 0x8C, 0x44, 0xCC, 0xF0, 0x2A, 0xFA, 0x40, 0x48, 0x04, 0x26, 0x43, 0x00, 0xA1, 0xFF,
-        0x8C, 0x44, 0x5A, 0xDA, 0x30, 0xFB, 0x6C, 0x44, 0x2C, 0xFA, 0xFF, 0xFF, 0x01, 0x26, 0x26, 0x00,
-        0xD0, 0x80, 0xA1, 0xFF, 0x8C, 0x44, 0x6C, 0x5C, 0x00, 0xE1, 0xF2, 0xFE, 0x2D, 0xFA, 0xCD, 0xF3,
-        0xD4, 0x80, 0xD0, 0x80, 0x2E, 0xF8, 0x24, 0x44, 0x16, 0x0C, 0x32, 0x40, 0x02, 0x2A, 0x07, 0x00,
-        0x28, 0x42, 0x0C, 0xB2, 0x08, 0x3A, 0x03, 0x00, 0x10, 0xBC, 0x40, 0x44, 0x5C, 0x00, 0x04, 0x0A,
-        0xA1, 0xFF, 0xAC, 0x60, 0x13, 0x78, 0xFF, 0xFF, 0x11, 0xBC, 0x40, 0x44, 0x28, 0x45, 0xBF, 0x60,
-        0xFF, 0x64, 0x24, 0x88, 0x50, 0x00, 0x30, 0xBC, 0x40, 0x44, 0x4D, 0x00, 0x20, 0xB9, 0x5C, 0x8E,
-        0xA1, 0xFF, 0x8C, 0x44, 0x2D, 0xFA, 0xDC, 0x9C, 0x6C, 0x44, 0x00, 0xE1, 0xF2, 0xFE, 0x2E, 0xFA,
-        0x08, 0x28, 0x44, 0x4E, 0xDC, 0x84, 0x2E, 0x5C, 0xB0, 0x84, 0xEF, 0xB1, 0x08, 0x24, 0x40, 0xB9,
-        0x41, 0x46, 0x39, 0x00, 0x23, 0x41, 0x13, 0x64, 0x51, 0x90, 0x56, 0x63, 0x03, 0x04, 0xAC, 0x60,
-        0x0A, 0x78, 0xFF, 0xFF, 0x8C, 0x44, 0x04, 0x61, 0x2B, 0xFA, 0x50, 0xFE, 0x80, 0x27, 0x00, 0x64,
-        0x30, 0xFB, 0x8C, 0x44, 0x2C, 0xFA, 0xD0, 0x80, 0x8C, 0x44, 0x2D, 0xFA, 0xD4, 0x80, 0x00, 0x65,
-        0x8C, 0x44, 0xCD, 0xF1, 0x2E, 0xFA, 0xD0, 0x80, 0x28, 0x44, 0x03, 0x0C, 0xA0, 0x2A, 0x0A, 0x00,
-        0x11, 0x00, 0x10, 0x65, 0x60, 0x40, 0xC4, 0x36, 0x04, 0x00, 0xD4, 0x3A, 0x08, 0x00, 0x27, 0x40,
-        0x40, 0x26, 0x30, 0x65, 0x00, 0x64, 0x3F, 0xFA, 0x46, 0x4E, 0x35, 0x84, 0x66, 0x00, 0x40, 0x26,
-        0xF9, 0x01, 0x30, 0x65, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x04, 0x61, 0xF3, 0x01, 0xA1, 0xFF,
-        0xAB, 0x60, 0xE6, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xFE, 0x65, 0x23, 0x43, 0xE8, 0xA3, 0x80, 0x27,
-        0xF6, 0x01, 0x20, 0xE6, 0x08, 0x60, 0x00, 0xEB, 0x28, 0x44, 0x03, 0x2B, 0x05, 0x00, 0x6A, 0x62,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x28, 0x44, 0x8F, 0xB0, 0x88, 0x3A, 0x03, 0x00, 0x70, 0x62,
-        0x7A, 0xDC, 0x28, 0x44, 0x40, 0x2B, 0x0D, 0x00, 0x72, 0x62, 0x7A, 0xDC, 0xA1, 0xFF, 0x6C, 0x5C,
-        0x5A, 0xD8, 0xE4, 0x40, 0x20, 0x2B, 0x03, 0x00, 0x7A, 0xDC, 0x7A, 0xDC, 0xF8, 0xA3, 0x25, 0xFF,
-        0xB0, 0xFF, 0x3F, 0xFC, 0x00, 0xF4, 0x10, 0x62, 0x10, 0x61, 0x57, 0x90, 0x6C, 0x61, 0xA1, 0xFF,
-        0x09, 0x07, 0x02, 0x1D, 0x2A, 0x1E, 0x21, 0x00, 0xCB, 0x83, 0x7A, 0xDC, 0xFE, 0x1C, 0xD9, 0x81,
-        0x24, 0x1E, 0x1B, 0x00, 0xCB, 0x83, 0x0E, 0xA3, 0xA7, 0x84, 0xF2, 0xA3, 0x7A, 0xDC, 0xFE, 0x1C,
-        0x05, 0x1D, 0x01, 0x60, 0x18, 0xE1, 0x7C, 0xA8, 0xD9, 0x81, 0x0A, 0x02, 0x00, 0xF4, 0x02, 0x62,
-        0xA7, 0x84, 0x7A, 0x61, 0x7A, 0xDC, 0xFE, 0x1C, 0xF9, 0x1D, 0x7C, 0xA8, 0xD9, 0x81, 0xF6, 0x03,
-        0xFF, 0xB1, 0x0B, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xA1, 0xFF, 0xFF, 0xFF, 0xB6, 0xFF,
-        0xB7, 0xFF, 0x6C, 0x44, 0x5A, 0xDA, 0xCD, 0x81, 0x64, 0x40, 0x46, 0x45, 0x28, 0x44, 0x40, 0x2B,
-        0x0E, 0x00, 0x64, 0x40, 0x20, 0x2B, 0x0B, 0x00, 0x01, 0xA2, 0x62, 0x44, 0x46, 0x45, 0x21, 0x46,
-        0x00, 0xF4, 0x02, 0x62, 0x9A, 0xFF, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x98, 0xFF,
-        0x00, 0xE6, 0x01, 0xF2, 0x61, 0x45, 0xD4, 0x9E, 0x21, 0x46, 0x16, 0xFA, 0x25, 0x44, 0x06, 0xFA,
-        0xA1, 0xFF, 0x8C, 0x44, 0xA1, 0xFF, 0x47, 0xFF, 0x50, 0x4B, 0x67, 0x50, 0x69, 0xE2, 0x25, 0x46,
-        0x01, 0xF2, 0x61, 0x45, 0xD4, 0x9E, 0x21, 0x46, 0x16, 0xFA, 0x25, 0x45, 0x86, 0xF8, 0xFF, 0xFF,
-        0x6A, 0x44, 0x40, 0x2B, 0x03, 0x15, 0xAF, 0x60, 0x10, 0x78, 0xFF, 0xFF, 0x29, 0x40, 0x10, 0x26,
-        0x04, 0x00, 0x04, 0x74, 0xCD, 0xE2, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x44, 0xB6, 0xFF, 0xB7, 0xFF,
-        0xC4, 0xE2, 0x01, 0x60, 0x18, 0xE1, 0x05, 0x76, 0xAD, 0xE2, 0x41, 0xE1, 0xA1, 0xFF, 0x6C, 0x45,
-        0xA1, 0xFF, 0x65, 0x41, 0x7F, 0x60, 0x7F, 0x7C, 0x6C, 0x44, 0xA0, 0x84, 0x15, 0xA7, 0x15, 0xA4,
-        0x21, 0x46, 0x26, 0xFA, 0x22, 0x46, 0x10, 0xFA, 0x21, 0x46, 0x29, 0x40, 0x40, 0x2B, 0x07, 0x00,
-        0xB6, 0xFF, 0xA1, 0xFF, 0x40, 0x60, 0x00, 0x65, 0x6C, 0x44, 0x1A, 0xFA, 0x09, 0x00, 0x65, 0x44,
-        0x0F, 0xB4, 0x06, 0xA8, 0x80, 0x60, 0x00, 0x65, 0x08, 0x28, 0x7C, 0x45, 0x29, 0x44, 0x34, 0x89,
-        0x27, 0xF0, 0x65, 0x47, 0x1F, 0xB1, 0x34, 0x97, 0x64, 0x5E, 0x07, 0x60, 0xF5, 0xF1, 0x29, 0x40,
-        0x40, 0x2B, 0x04, 0x00, 0x64, 0x40, 0x02, 0x26, 0x10, 0x60, 0x00, 0xBC, 0x27, 0xFA, 0x01, 0x60,
-        0x18, 0xE1, 0x00, 0x64, 0x33, 0xFB, 0xA8, 0xE2, 0x05, 0xE1, 0x28, 0x40, 0x03, 0x26, 0xCE, 0x00,
-        0x31, 0x40, 0x20, 0x2A, 0x03, 0x00, 0x28, 0x40, 0x50, 0x3A, 0xC8, 0x00, 0x24, 0x44, 0x20, 0x2A,
-        0xC5, 0x00, 0x2B, 0x44, 0xAC, 0x80, 0x28, 0x40, 0xB4, 0x3A, 0x03, 0x00, 0x02, 0x03, 0x30, 0xFB,
-        0xBD, 0x00, 0x28, 0x44, 0xBF, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x40, 0x48, 0x2B, 0x50, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x01, 0x60, 0x08, 0xE1, 0x1C, 0xF2, 0xC4, 0xE2, 0x40, 0x45, 0x28, 0x40, 0xC4, 0x36,
-        0x9D, 0x00, 0x29, 0x40, 0x40, 0x2B, 0x49, 0x00, 0x2B, 0x60, 0xBE, 0x63, 0x60, 0x40, 0x0B, 0x36,
-        0x20, 0x00, 0x0F, 0x36, 0x1B, 0x00, 0x0A, 0x36, 0x16, 0x00, 0x0E, 0x36, 0x11, 0x00, 0x09, 0x36,
-        0x0C, 0x00, 0x0D, 0x36, 0x07, 0x00, 0x08, 0x36, 0x02, 0x00, 0xA3, 0xD3, 0x15, 0x00, 0x02, 0xA3,
-        0xA3, 0xD3, 0x12, 0x00, 0x04, 0xA3, 0xA3, 0xD3, 0x0F, 0x00, 0x06, 0xA3, 0xA3, 0xD3, 0x0C, 0x00,
-        0x08, 0xA3, 0xA3, 0xD3, 0x09, 0x00, 0x0A, 0xA3, 0xA3, 0xD3, 0x06, 0x00, 0x0C, 0xA3, 0xA3, 0xD3,
-        0x03, 0x00, 0x0E, 0xA3, 0xA3, 0xD3, 0xFF, 0xFF, 0x25, 0x60, 0x82, 0x63, 0x60, 0x40, 0x0C, 0x36,
-        0x19, 0x00, 0x08, 0x36, 0x15, 0x00, 0x0D, 0x36, 0x11, 0x00, 0x09, 0x36, 0x0D, 0x00, 0x0E, 0x36,
-        0x09, 0x00, 0x0A, 0x36, 0x05, 0x00, 0x0F, 0x36, 0x01, 0x00, 0x3A, 0x00, 0x02, 0xA3, 0x38, 0x00,
-        0x04, 0xA3, 0x36, 0x00, 0x06, 0xA3, 0x34, 0x00, 0x08, 0xA3, 0x32, 0x00, 0x0A, 0xA3, 0x30, 0x00,
-        0x0C, 0xA3, 0x2E, 0x00, 0x0E, 0xA3, 0x2C, 0x00, 0x2B, 0x00, 0x2B, 0x60, 0xCE, 0x63, 0x25, 0x44,
-        0x0A, 0x36, 0x0C, 0x00, 0x14, 0x36, 0x07, 0x00, 0x37, 0x36, 0x02, 0x00, 0xA3, 0xD3, 0x09, 0x00,
-        0x02, 0xA3, 0xA3, 0xD3, 0x06, 0x00, 0x04, 0xA3, 0xA3, 0xD3, 0x03, 0x00, 0x06, 0xA3, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x40, 0x45, 0x0A, 0x36, 0x0D, 0x00, 0x14, 0x36, 0x38, 0x64, 0x37, 0x3A, 0x03, 0x00,
-        0x04, 0x7F, 0x40, 0x45, 0x15, 0x64, 0x6E, 0x3A, 0x09, 0x00, 0x84, 0x7F, 0x40, 0x45, 0x0B, 0x64,
-        0x05, 0x00, 0x29, 0x44, 0x7F, 0x60, 0xFF, 0xB4, 0x40, 0x49, 0x70, 0x64, 0x40, 0x4D, 0x02, 0x00,
-        0x40, 0x45, 0x0A, 0x00, 0x25, 0x60, 0x7A, 0x63, 0x0A, 0x36, 0x06, 0x00, 0x14, 0x36, 0x02, 0xA3,
-        0x37, 0x36, 0x04, 0xA3, 0x6E, 0x36, 0x06, 0xA3, 0x28, 0xA3, 0xA3, 0xD1, 0xD8, 0xA3, 0x15, 0x60,
-        0xD8, 0xF9, 0x39, 0xF1, 0xA3, 0xD1, 0x64, 0x41, 0x64, 0x5E, 0x60, 0x45, 0x64, 0x47, 0x1F, 0xB4,
-        0x54, 0x94, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47,
-        0xB4, 0x85, 0x29, 0x44, 0xC0, 0x60, 0x00, 0xB4, 0xB4, 0x84, 0x1F, 0xFA, 0xB5, 0xFF, 0xA1, 0xFF,
-        0xAD, 0xF3, 0xC4, 0xE2, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0xDC, 0x84, 0xE0, 0x94, 0xFF, 0x60,
-        0xCF, 0x65, 0x29, 0x44, 0x24, 0x89, 0xA5, 0x60, 0xD6, 0x78, 0x04, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF,
-        0xC4, 0xE2, 0xA1, 0xFF, 0xFF, 0x60, 0xCF, 0x65, 0x29, 0x44, 0x24, 0x89, 0xAD, 0xF3, 0xC4, 0xE2,
-        0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0xDC, 0x84, 0xE0, 0x94, 0x26, 0x44, 0x84, 0xBC, 0x24, 0x40,
-        0x0C, 0x22, 0xFD, 0xB4, 0x40, 0x46, 0x23, 0x64, 0x3A, 0xDB, 0xAC, 0x60, 0xAB, 0x78, 0xFF, 0xFF,
-        0x27, 0x40, 0x26, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0x29, 0x40, 0x10, 0x26, 0x02, 0x00, 0x04, 0x74, 0xCD, 0xE2, 0x01, 0x60, 0x18, 0xE1, 0x01, 0x60,
-        0x18, 0xE1, 0x01, 0x11, 0x0F, 0x00, 0x29, 0x44, 0x20, 0xBC, 0x40, 0x49, 0x01, 0x64, 0x33, 0xFB,
-        0xB6, 0xFF, 0x00, 0xE1, 0x01, 0x60, 0x1A, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x40, 0xFC, 0x11,
-        0x01, 0x60, 0x18, 0xE1, 0xB5, 0xFF, 0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60,
-        0x09, 0x7D, 0x7C, 0x4B, 0x37, 0xF3, 0x2B, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x28, 0x65, 0x44,
-        0x60, 0x50, 0xA0, 0x4C, 0x20, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0x00, 0x60, 0x2E, 0x7C, 0x74, 0x44,
-        0xC0, 0x94, 0x32, 0x40, 0x02, 0x2A, 0x19, 0x00, 0x28, 0x44, 0xA4, 0x36, 0x03, 0x00, 0x0C, 0xB4,
-        0x04, 0x36, 0x13, 0x00, 0x26, 0x43, 0xFD, 0xB3, 0x04, 0xBB, 0x43, 0x46, 0x01, 0x2A, 0x03, 0x00,
-        0x28, 0x47, 0x40, 0xBF, 0x40, 0x48, 0x0A, 0xBB, 0x0F, 0xFC, 0x50, 0x4B, 0x67, 0x50, 0x00, 0x64,
-        0x30, 0xFB, 0x05, 0xFF, 0xAC, 0x60, 0xAB, 0x78, 0xFF, 0xFF, 0x24, 0x64, 0x3A, 0xDB, 0x28, 0x44,
-        0x04, 0x2A, 0x03, 0x00, 0xA4, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x1D, 0xFF, 0xA8, 0xE2, 0x26, 0x40,
-        0x10, 0x2A, 0x06, 0x00, 0x25, 0x60, 0xF0, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1,
-        0xA4, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x03, 0x0A, 0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0x01, 0x64,
-        0x4F, 0xFB, 0xE1, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x54, 0x62, 0x22, 0x46, 0xA2, 0xD0,
-        0x16, 0x63, 0x7C, 0x41, 0x44, 0x48, 0x80, 0x36, 0x04, 0x61, 0x28, 0x40, 0x50, 0x36, 0x04, 0x61,
-        0x41, 0x4E, 0x28, 0x44, 0xA4, 0x36, 0x0E, 0x63, 0x0A, 0x60, 0x7C, 0xF1, 0x2D, 0x44, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA2, 0xDB, 0x9A, 0xFF, 0xA1, 0xFF,
-        0x12, 0x74, 0xCD, 0xE2, 0x54, 0x62, 0xA2, 0xD2, 0xFF, 0xFF, 0x6A, 0x40, 0x80, 0x4E, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0xFF, 0xFF, 0x01, 0x1D,
-        0xB2, 0x00, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0x28, 0x40, 0x03, 0x2B, 0x06, 0x00, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0x70, 0x62, 0x28, 0x44, 0x8F, 0xB0, 0x88, 0x3A, 0x02, 0x00, 0x7A, 0xD4,
-        0x12, 0x74, 0x28, 0x40, 0x40, 0x2B, 0x16, 0x00, 0x72, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD2,
-        0x12, 0x74, 0x80, 0x4C, 0x20, 0x2B, 0x05, 0x00, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x10, 0x26, 0x04, 0x00, 0x26, 0x26, 0x4D, 0x00,
-        0x26, 0x27, 0x4B, 0x00, 0x23, 0x43, 0xFF, 0xFF, 0x06, 0x1D, 0x2E, 0x1E, 0x00, 0x00, 0x03, 0xF0,
-        0x04, 0xF4, 0x64, 0x42, 0x3D, 0x00, 0x2E, 0x40, 0x04, 0x2A, 0x27, 0x00, 0xA1, 0xFF, 0x02, 0xFE,
-        0x10, 0x25, 0x42, 0xFE, 0x12, 0x74, 0x72, 0x45, 0x65, 0x4C, 0x94, 0xF3, 0x03, 0x04, 0xE4, 0xE2,
-        0xDC, 0x84, 0x94, 0xFB, 0xA1, 0xFF, 0x12, 0x74, 0x80, 0x4C, 0x12, 0x74, 0x95, 0xF3, 0x02, 0x04,
-        0xDC, 0x84, 0x95, 0xFB, 0x80, 0x4C, 0x12, 0x74, 0x96, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0x96, 0xFB,
-        0x80, 0x4C, 0x12, 0x74, 0x5C, 0x4E, 0xF8, 0xA3, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4, 0xFF, 0xB1,
-        0xF8, 0xA1, 0x06, 0xA4, 0x60, 0x42, 0x0A, 0x00, 0x4E, 0x00, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4,
-        0xC8, 0x82, 0xFF, 0xB1, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xB1, 0x7A, 0xD4, 0x12, 0x74,
-        0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1, 0x1B, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82, 0xDA, 0x82,
-        0xA2, 0xD2, 0xA1, 0xFF, 0x09, 0x74, 0x60, 0x4D, 0x12, 0x00, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4,
-        0x23, 0x43, 0xA1, 0xFF, 0x12, 0x74, 0xA0, 0xD2, 0xFE, 0xA1, 0xCB, 0x83, 0x60, 0x4E, 0xAF, 0x83,
-        0x03, 0x1D, 0x05, 0x03, 0x12, 0x74, 0xEB, 0x01, 0xA1, 0xFF, 0x12, 0x74, 0xDF, 0x01, 0x12, 0x74,
-        0xDA, 0x83, 0x66, 0x44, 0x22, 0x46, 0x0C, 0xFA, 0x22, 0xF2, 0x0B, 0xFC, 0x28, 0x40, 0x40, 0x2B,
-        0x1A, 0x00, 0x10, 0x26, 0x04, 0x00, 0x26, 0x26, 0x0F, 0x00, 0x26, 0x27, 0x0D, 0x00, 0x00, 0xF4,
-        0x02, 0x62, 0xA1, 0xFF, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x07, 0x00, 0xA1, 0xFF, 0x12, 0x74, 0x9C, 0x4E, 0x12, 0x74,
-        0x9C, 0x4C, 0x12, 0x74, 0x00, 0x00, 0x88, 0xFF, 0xA1, 0xFF, 0xB1, 0x60, 0x58, 0x4F, 0x00, 0x78,
-        0xFF, 0xFF, 0x01, 0x60, 0x18, 0xE1, 0x78, 0x44, 0x02, 0xA4, 0x35, 0xFB, 0xCC, 0x00, 0x29, 0x44,
-        0xF7, 0xB4, 0x40, 0x49, 0x34, 0x64, 0x3A, 0xDB, 0x44, 0xE1, 0xA5, 0x60, 0xB2, 0x78, 0xFF, 0xFF,
-        0x00, 0x6B, 0xBC, 0xFF, 0x15, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x15, 0xFB, 0x78, 0x5C, 0x07, 0x00,
-        0x78, 0x5C, 0x2F, 0x00, 0x62, 0xFF, 0xFF, 0xFF, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x80, 0x60,
-        0x01, 0xE0, 0xD5, 0x60, 0x84, 0xE7, 0x82, 0xF3, 0x40, 0x60, 0x60, 0x40, 0x01, 0x23, 0x48, 0x60,
-        0x5E, 0x65, 0x80, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x80, 0x60,
-        0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x00, 0x60, 0x01, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x64, 0x58,
-        0xFF, 0xFF, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60, 0x84, 0xE7, 0x82, 0xF3, 0x7C, 0x45, 0x60, 0x40,
-        0x01, 0x23, 0x02, 0x65, 0x8C, 0x60, 0x48, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60,
-        0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x7F, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x48, 0x60, 0x08, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x84, 0x60,
-        0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x40, 0x60, 0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x8C, 0x60, 0x48, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60,
-        0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x64, 0x58, 0xFF, 0xFF,
-        0x12, 0x74, 0x6A, 0x40, 0x87, 0x4F, 0x12, 0x74, 0x87, 0x4C, 0x12, 0x74, 0x29, 0x40, 0x40, 0x2B,
-        0x08, 0x00, 0x0A, 0x64, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0x87, 0x4D, 0x12, 0x74, 0x87, 0x4D,
-        0x09, 0x00, 0x03, 0x64, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0x87, 0x4F, 0x12, 0x74, 0x87, 0x4D,
-        0x12, 0x74, 0x87, 0x4D, 0x7C, 0x44, 0x01, 0x08, 0x01, 0x00, 0x67, 0x44, 0x12, 0x74, 0x87, 0x4C,
-        0x12, 0x74, 0x87, 0x4C, 0x12, 0x74, 0x87, 0x4C, 0x12, 0x74, 0x87, 0x4D, 0x12, 0x74, 0x87, 0x4D,
-        0x12, 0x74, 0x87, 0x4D, 0x12, 0x74, 0x04, 0x21, 0x04, 0x00, 0xFF, 0x2A, 0x01, 0x00, 0x04, 0x00,
-        0x03, 0x00, 0xFF, 0x2A, 0x0D, 0x00, 0x0C, 0x00, 0xBC, 0xFF, 0x61, 0xFF, 0x78, 0x5C, 0x57, 0x01,
-        0x78, 0x5C, 0x7F, 0x01, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B,
-        0x6A, 0x44, 0x2F, 0x58, 0xFF, 0xFF, 0x04, 0x74, 0xC4, 0xE2, 0x04, 0xE1, 0x29, 0x40, 0x40, 0x2B,
-        0x05, 0x00, 0xA1, 0xFF, 0xFF, 0xFF, 0xBC, 0xFF, 0x14, 0x74, 0x01, 0x00, 0x04, 0x74, 0xC4, 0xE2,
-        0x04, 0xE1, 0xBC, 0xFF, 0xB5, 0xFF, 0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60,
-        0x09, 0x7D, 0x7C, 0x4B, 0x29, 0x40, 0x40, 0x27, 0x04, 0x00, 0xC2, 0x60, 0x58, 0x4F, 0xC8, 0x78,
-        0xFF, 0xFF, 0xA1, 0xFF, 0x29, 0x40, 0x10, 0x26, 0x6D, 0x00, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60,
-        0x84, 0xE7, 0x82, 0xF3, 0x40, 0x60, 0x60, 0x40, 0x01, 0x23, 0x48, 0x60, 0x5E, 0x65, 0x80, 0x60,
-        0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x80, 0x60, 0x00, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x01, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60,
-        0x84, 0xE7, 0x82, 0xF3, 0x7C, 0x45, 0x60, 0x40, 0x01, 0x23, 0x02, 0x65, 0x8C, 0x60, 0x48, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x00, 0x60, 0x7F, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x48, 0x60, 0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x40, 0x60, 0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x8C, 0x60, 0x48, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x95, 0x60, 0x84, 0xE7, 0x01, 0x60, 0x08, 0xE1, 0xFF, 0xFF, 0xC4, 0xE2, 0x29, 0x40, 0x40, 0x2B,
-        0x04, 0x00, 0xC2, 0x60, 0x58, 0x4F, 0xC8, 0x78, 0xFF, 0xFF, 0xC2, 0x60, 0x58, 0x4F, 0xD0, 0x78,
-        0xFF, 0xFF, 0xA1, 0xFF, 0xAD, 0xF3, 0xC4, 0xE2, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0xDC, 0x84,
-        0xE0, 0x94, 0x35, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01, 0x08, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x43, 0xFF, 0x01, 0x60, 0x00, 0xE1, 0x28, 0xF3, 0x47, 0xFF, 0x60, 0x40, 0x07, 0x37, 0x66, 0x00,
-        0x05, 0x3B, 0x04, 0x00, 0xFF, 0x0A, 0x80, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x18, 0x60, 0x07, 0xF1,
-        0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x64, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02,
-        0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x29, 0xF5, 0x2A, 0xF3, 0x47, 0xFF,
-        0x3F, 0xF0, 0x01, 0x1B, 0x01, 0x64, 0x60, 0x56, 0xAD, 0xE2, 0xB5, 0xFF, 0x6C, 0x40, 0x40, 0xE1,
-        0xA1, 0xFF, 0x00, 0xF4, 0x6E, 0x61, 0x12, 0x62, 0x64, 0x43, 0x01, 0xE1, 0x03, 0x64, 0xE2, 0xD0,
-        0xC9, 0x81, 0x64, 0x4C, 0xCC, 0x84, 0xDA, 0x82, 0xFA, 0x02, 0x01, 0x60, 0x00, 0x6B, 0x9A, 0xFF,
-        0xCA, 0x82, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xFF, 0x7A, 0xD0, 0xA1, 0xFF, 0x64, 0x4C,
-        0xFC, 0x1C, 0xF8, 0x1D, 0x00, 0xB9, 0x06, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82, 0x5A, 0xD2,
-        0xA1, 0xFF, 0x60, 0x4D, 0x3F, 0x40, 0x02, 0x2B, 0x10, 0x00, 0x28, 0xF3, 0xA5, 0x60, 0xC4, 0x65,
-        0x60, 0x40, 0x0E, 0x3B, 0x0A, 0x00, 0xD2, 0xF3, 0xFF, 0xFF, 0x10, 0xBC, 0xD2, 0xFB, 0xAD, 0x4F,
-        0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x85, 0x4C, 0xFE, 0x01, 0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC,
-        0xD2, 0xFB, 0xA1, 0xFF, 0x87, 0x4E, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x67, 0x4C,
-        0xFF, 0xFF, 0xBC, 0xFF, 0x00, 0xE1, 0xD5, 0xFE, 0xA1, 0xFF, 0xFF, 0xFF, 0x00, 0x64, 0x40, 0x46,
-        0x60, 0x41, 0xB5, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0x29, 0xF5, 0x3F, 0xF0, 0x24, 0xF2, 0x44, 0x43,
-        0x40, 0x4D, 0x00, 0xF4, 0xF3, 0x60, 0xA0, 0x65, 0x10, 0x62, 0x5A, 0xD2, 0xD9, 0x81, 0xD4, 0x80,
-        0xFF, 0xFF, 0xFB, 0x02, 0x61, 0x45, 0x2D, 0x44, 0xD4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xFD, 0xA5, 0x48, 0x60, 0x00, 0x64, 0xC4, 0x9D, 0x0D, 0x60, 0x00, 0x6B, 0x2D, 0x44, 0xC0, 0x83,
-        0xBB, 0xFF, 0x29, 0xF5, 0x01, 0xE1, 0x00, 0xF4, 0x6C, 0x61, 0x10, 0x62, 0x05, 0x00, 0x00, 0xF4,
-        0x01, 0xF2, 0xFF, 0xFF, 0x60, 0x41, 0x04, 0x62, 0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x10, 0x1A, 0x00,
-        0x26, 0x44, 0x01, 0x26, 0x0C, 0x00, 0x2D, 0x44, 0xC8, 0x84, 0x40, 0x4D, 0x02, 0x03, 0x6C, 0x45,
-        0xF3, 0x01, 0x03, 0x15, 0x01, 0x64, 0x05, 0xFA, 0x15, 0x00, 0x6C, 0x45, 0xED, 0x01, 0x23, 0x44,
-        0xC8, 0x84, 0x40, 0x43, 0x02, 0x03, 0x6C, 0x45, 0xE7, 0x01, 0x00, 0x64, 0x01, 0x15, 0x01, 0x64,
-        0x6C, 0x45, 0x05, 0xFB, 0xE2, 0xD2, 0xDA, 0x82, 0xC9, 0x81, 0x60, 0x4C, 0xDD, 0x1C, 0xD7, 0x03,
-        0xBC, 0xFF, 0xDA, 0x01, 0x00, 0xE1, 0xD5, 0xFE, 0xA1, 0xFF, 0xFF, 0xFF, 0x08, 0xE1, 0xA1, 0xFF,
-        0x67, 0x4C, 0x43, 0xFF, 0xD2, 0xF3, 0xFF, 0xFF, 0x10, 0xBC, 0xD2, 0xFB, 0xAD, 0x4F, 0x02, 0xBC,
-        0x00, 0x7F, 0xA0, 0x5D, 0x01, 0xE1, 0x01, 0x60, 0x69, 0x6B, 0xA5, 0x60, 0xC4, 0x64, 0x60, 0x4C,
-        0xBB, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C, 0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C, 0xFC, 0x01,
-        0x29, 0xF3, 0x2A, 0xF1, 0x07, 0xB5, 0x04, 0xE1, 0x65, 0x41, 0x64, 0x54, 0xCD, 0xE2, 0x95, 0x81,
-        0xA1, 0x5D, 0xA1, 0xFF, 0xFF, 0xFF, 0xF9, 0x01, 0x10, 0x61, 0x7F, 0x60, 0xC0, 0x64, 0xA0, 0x80,
-        0x7F, 0x67, 0x02, 0x63, 0x25, 0x02, 0x98, 0xFE, 0x19, 0x05, 0x0F, 0x60, 0x7F, 0xF5, 0x0E, 0xF2,
-        0x15, 0x18, 0x02, 0x18, 0x09, 0xF4, 0xFB, 0x01, 0x23, 0x44, 0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02,
-        0x66, 0x44, 0x11, 0xFB, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB,
-        0x28, 0xB9, 0x10, 0x7E, 0x00, 0x7F, 0x0E, 0xFA, 0x00, 0x67, 0x0A, 0x00, 0x20, 0x44, 0xDC, 0x85,
-        0x0F, 0xB4, 0xF7, 0xA0, 0x7F, 0x67, 0x07, 0x63, 0x03, 0x05, 0x45, 0x40, 0x00, 0x67, 0xD8, 0xFE,
-        0xFF, 0x27, 0x05, 0xFD, 0x0A, 0x7E, 0x04, 0xFB, 0x61, 0x55, 0x48, 0x00, 0x28, 0xFB, 0x01, 0xF3,
-        0x29, 0xFB, 0x44, 0x46, 0x40, 0x45, 0x10, 0x61, 0x7E, 0x60, 0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67,
-        0x02, 0x63, 0x30, 0x02, 0xB5, 0x60, 0x58, 0x4F, 0x4B, 0x78, 0xFF, 0xFF, 0x7F, 0x67, 0x03, 0x63,
-        0x29, 0x02, 0x26, 0x40, 0x01, 0x2B, 0x23, 0x00, 0x98, 0xFE, 0x18, 0x05, 0x0F, 0x60, 0x7F, 0xF5,
-        0x0E, 0xF2, 0x14, 0x18, 0x02, 0x18, 0x09, 0xF4, 0xFB, 0x01, 0x23, 0x44, 0x00, 0xA8, 0x08, 0x7E,
-        0x0A, 0x02, 0x66, 0x44, 0x11, 0xFB, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2,
-        0xA2, 0xDB, 0x08, 0xB9, 0x10, 0x7E, 0x00, 0x7F, 0x0E, 0xFA, 0x09, 0x00, 0x20, 0x44, 0xDC, 0x85,
-        0x0F, 0xB4, 0xF7, 0xA0, 0x7F, 0x67, 0x07, 0x63, 0x05, 0x05, 0x45, 0x40, 0xD8, 0xFE, 0x00, 0x67,
-        0xD0, 0xFE, 0xD9, 0xFE, 0xFF, 0x27, 0x05, 0xFD, 0x0B, 0x7E, 0x04, 0xFB, 0x0A, 0x60, 0x7E, 0xF3,
-        0xFF, 0xFF, 0x20, 0xB0, 0x80, 0xBC, 0x08, 0x28, 0xA2, 0xDB, 0x61, 0x55, 0x66, 0x00, 0x04, 0xB5,
-        0x82, 0xB5, 0x25, 0x02, 0x04, 0x03, 0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40, 0xA3, 0xD3, 0x99, 0xFE,
-        0x04, 0x04, 0x02, 0xBC, 0xFE, 0xB4, 0xA3, 0xDB, 0x59, 0x00, 0xBC, 0xF3, 0x20, 0x40, 0x80, 0x26,
-        0x55, 0x00, 0xA3, 0xD3, 0xFF, 0xA0, 0xF8, 0xB4, 0x02, 0x02, 0xA3, 0xDB, 0x1C, 0x00, 0x04, 0xBC,
-        0xBF, 0xB4, 0xA3, 0xDB, 0x08, 0xB0, 0x01, 0x64, 0x08, 0x24, 0x02, 0x64, 0x28, 0xFB, 0x20, 0x44,
-        0x80, 0xBC, 0x40, 0x40, 0xD0, 0xFE, 0x42, 0x00, 0xBF, 0xB4, 0xA3, 0xDB, 0x3F, 0x00, 0x40, 0xB0,
-        0xFF, 0xFF, 0xFA, 0x02, 0xF8, 0xB4, 0xA3, 0xDB, 0x08, 0xB5, 0x07, 0x7C, 0x01, 0x02, 0xBC, 0xF9,
-        0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40, 0x14, 0x60, 0xFC, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB5,
-        0x07, 0xB5, 0x08, 0x28, 0xC4, 0x02, 0x99, 0xFE, 0x29, 0x05, 0x20, 0x44, 0x80, 0x26, 0x26, 0x00,
-        0x20, 0x2A, 0x03, 0x00, 0xDF, 0xB4, 0x40, 0x40, 0x6A, 0x00, 0x40, 0x2A, 0x1F, 0x00, 0xBF, 0xB4,
-        0x40, 0x40, 0x09, 0x00, 0xA8, 0xFF, 0x20, 0x44, 0x99, 0xFE, 0x02, 0x05, 0x80, 0x2A, 0x03, 0x00,
-        0x40, 0xBC, 0x40, 0x40, 0x13, 0x00, 0x00, 0xF1, 0x80, 0xBC, 0x40, 0x40, 0x64, 0x44, 0xE0, 0x84,
-        0xE8, 0x84, 0x0A, 0x36, 0x29, 0x01, 0x0B, 0x36, 0x59, 0x01, 0x28, 0xFB, 0x01, 0xF1, 0x29, 0xF9,
-        0x02, 0xF1, 0x2A, 0xF9, 0x03, 0xF1, 0x2B, 0xF9, 0xD0, 0xFE, 0xAE, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x82, 0x3E, 0x75, 0x44, 0x02, 0xB0, 0x01, 0xB0, 0x4A, 0x02, 0xDC, 0x02, 0x04, 0xB0, 0x08, 0xB0,
-        0x0B, 0x02, 0x20, 0x02, 0x40, 0x26, 0xA7, 0xFF, 0x8C, 0xFF, 0x75, 0x40, 0x80, 0x2B, 0x01, 0x00,
-        0xAB, 0xFF, 0x75, 0x44, 0x8D, 0xFF, 0xEA, 0x01, 0x0A, 0xF3, 0xAA, 0xFF, 0x60, 0x40, 0x20, 0x2B,
-        0x02, 0x00, 0x38, 0xFF, 0x0D, 0x00, 0x01, 0x26, 0x0C, 0x00, 0xC0, 0x60, 0x00, 0x7C, 0xA0, 0x84,
-        0x80, 0x3B, 0x02, 0x00, 0xC0, 0x67, 0x03, 0x00, 0x40, 0x3B, 0x02, 0x00, 0x00, 0x67, 0x0A, 0xFB,
-        0xD5, 0x01, 0xD4, 0x01, 0x0B, 0xF1, 0xAB, 0xFF, 0x64, 0x44, 0xFF, 0x27, 0x1F, 0x00, 0x20, 0x26,
-        0x03, 0x00, 0x02, 0x60, 0x00, 0x75, 0x1A, 0x00, 0x19, 0xF3, 0xFF, 0xFF, 0x03, 0x1B, 0x04, 0x60,
-        0x00, 0x75, 0x0A, 0x64, 0xCC, 0x84, 0x19, 0xFB, 0x01, 0x60, 0x00, 0x75, 0x64, 0x40, 0x03, 0x22,
-        0x0D, 0x00, 0x20, 0x44, 0x80, 0x2A, 0x03, 0x00, 0x20, 0xBC, 0x40, 0x40, 0x07, 0x00, 0xD9, 0xFE,
-        0x81, 0x60, 0x0B, 0x64, 0x28, 0xFB, 0x2C, 0x44, 0x29, 0xFB, 0xD0, 0xFE, 0xAF, 0x01, 0xA9, 0xFF,
-        0x77, 0x44, 0x60, 0x57, 0x40, 0x4A, 0x01, 0x2A, 0x20, 0x00, 0x24, 0x44, 0xAC, 0x86, 0x08, 0xF2,
-        0x1C, 0x03, 0x1F, 0x60, 0x04, 0x65, 0xD4, 0x80, 0x0E, 0xF2, 0x02, 0x03, 0xA5, 0xD5, 0x04, 0x00,
-        0x01, 0xBC, 0x0E, 0xFA, 0x09, 0xF4, 0xD1, 0xFE, 0x46, 0x44, 0x0F, 0x18, 0x3F, 0xF2, 0x48, 0x65,
-        0xC4, 0x84, 0x13, 0xFB, 0x66, 0x44, 0x10, 0xFB, 0x66, 0x47, 0x20, 0xBF, 0x3B, 0x42, 0x04, 0xA2,
-        0xA2, 0xDB, 0x0E, 0xF2, 0x41, 0x75, 0x10, 0xBC, 0x0E, 0xFA, 0x2A, 0x44, 0x08, 0x2A, 0x17, 0x00,
-        0x23, 0x44, 0x00, 0xA8, 0x5C, 0x43, 0x13, 0x03, 0x0F, 0x60, 0x7F, 0xF5, 0x01, 0x00, 0x09, 0xF4,
-        0x0E, 0xF2, 0x0D, 0x18, 0x08, 0xB0, 0x18, 0xAC, 0xFA, 0x03, 0x0E, 0xFA, 0x66, 0x43, 0x11, 0xFD,
-        0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x28, 0x75, 0x2A, 0x44,
-        0x06, 0x22, 0x2D, 0x00, 0x22, 0x44, 0x00, 0xA8, 0x60, 0x46, 0x0E, 0xF2, 0x28, 0x03, 0x10, 0xB0,
-        0x01, 0xBC, 0x03, 0x02, 0x00, 0x64, 0x40, 0x42, 0x22, 0x00, 0x0E, 0xFA, 0xD1, 0xFE, 0x1E, 0x60,
-        0xF8, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x80, 0x00, 0x46, 0x42, 0x19, 0x02, 0x22, 0x47, 0x40, 0xBF,
-        0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x23, 0xF2, 0x66, 0x43, 0x00, 0xA8, 0x0E, 0xF2, 0x08, 0x02,
-        0x60, 0x40, 0x02, 0x2A, 0xE4, 0x01, 0x12, 0xFD, 0x10, 0x64, 0x0E, 0xFA, 0x02, 0x75, 0x07, 0x00,
-        0x60, 0x40, 0x04, 0x2A, 0xDC, 0x01, 0x12, 0xFD, 0x10, 0x64, 0x0E, 0xFA, 0x04, 0x75, 0x2A, 0x44,
-        0x80, 0x2A, 0x19, 0x00, 0x21, 0x44, 0xAC, 0x86, 0x0E, 0xF2, 0x15, 0x03, 0x01, 0xBC, 0x0E, 0xFA,
-        0xD1, 0xFE, 0x1F, 0x60, 0x10, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x56, 0x00, 0x46, 0x41, 0x0B, 0x02,
-        0x21, 0x47, 0x10, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x0E, 0xF2, 0x66, 0x43, 0x08, 0xFD,
-        0x10, 0xBC, 0x0E, 0xFA, 0x80, 0x75, 0x2A, 0x44, 0x10, 0xB0, 0x20, 0x44, 0x15, 0x03, 0x7F, 0xB4,
-        0x40, 0x40, 0x14, 0x60, 0xFC, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB0, 0x80, 0xB0, 0x09, 0x03,
-        0x08, 0x03, 0x40, 0xBC, 0x7F, 0xB4, 0x04, 0xB0, 0xA3, 0xDB, 0x03, 0x03, 0x20, 0x44, 0x80, 0xBC,
-        0x40, 0x40, 0xB3, 0x60, 0x8B, 0x78, 0xFF, 0xFF, 0xB3, 0x60, 0xBE, 0x78, 0xFF, 0xFF, 0xE8, 0xFE,
-        0x14, 0x05, 0xEA, 0xFE, 0x24, 0x05, 0xE9, 0xFE, 0x1C, 0x05, 0xE7, 0xFE, 0x09, 0x05, 0x47, 0xFF,
-        0x20, 0x44, 0x0F, 0x22, 0x03, 0x00, 0xCC, 0x84, 0x40, 0x40, 0x0F, 0x22, 0xB8, 0xFE, 0xEC, 0x01,
-        0x23, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0xE8, 0x02, 0x6F, 0x01, 0x24, 0x41, 0x00, 0xB9, 0x1F, 0x60,
-        0x04, 0x65, 0x45, 0x47, 0xE1, 0x02, 0x58, 0x4F, 0x0F, 0x00, 0xDE, 0x02, 0x5C, 0x4A, 0x46, 0x44,
-        0x4D, 0x01, 0x22, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0x08, 0x24, 0x81, 0x01, 0xD5, 0x01, 0x21, 0x41,
-        0x00, 0xB9, 0x5C, 0x4A, 0xA6, 0x03, 0xD0, 0x01, 0x27, 0xD3, 0x03, 0x00, 0x10, 0xB0, 0x09, 0xF2,
-        0x04, 0x03, 0xAC, 0x86, 0x0E, 0xF2, 0xFA, 0x02, 0x08, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0E, 0xF3,
-        0x0F, 0x60, 0xFE, 0x65, 0x0C, 0xF3, 0x24, 0x86, 0x24, 0x46, 0x60, 0x40, 0xFB, 0x3B, 0x07, 0x00,
-        0x80, 0x26, 0x02, 0x00, 0x23, 0x46, 0x03, 0x4C, 0x46, 0x61, 0x3A, 0x65, 0x0C, 0x00, 0x2E, 0xF3,
-        0x40, 0x45, 0xF8, 0x2B, 0x02, 0x00, 0x40, 0x45, 0x03, 0x00, 0x58, 0x4F, 0x44, 0x00, 0x07, 0x02,
-        0x58, 0x4F, 0x50, 0x00, 0x04, 0x05, 0x66, 0x50, 0x65, 0x52, 0x61, 0x51, 0x09, 0x00, 0x26, 0x47,
-        0x00, 0xBF, 0x0E, 0xFB, 0x2E, 0xF5, 0x05, 0xF0, 0x80, 0x60, 0x64, 0x50, 0x00, 0x72, 0x7E, 0x71,
-        0xAC, 0xFF, 0xB3, 0x60, 0xBE, 0x78, 0xFF, 0xFF, 0x8E, 0xFF, 0x0F, 0xF3, 0x0F, 0x60, 0xFE, 0x65,
-        0x24, 0x86, 0x0D, 0xF3, 0x24, 0x46, 0x60, 0x40, 0xFB, 0x3B, 0x07, 0x00, 0x80, 0x26, 0x02, 0x00,
-        0x23, 0x46, 0x03, 0x4C, 0x46, 0x61, 0x3A, 0x65, 0x0C, 0x00, 0x2E, 0xF3, 0x40, 0x45, 0xF8, 0x2B,
-        0x02, 0x00, 0x40, 0x45, 0x03, 0x00, 0x58, 0x4F, 0x16, 0x00, 0x07, 0x02, 0x58, 0x4F, 0x22, 0x00,
-        0x04, 0x05, 0x66, 0x50, 0x65, 0x52, 0x61, 0x51, 0x09, 0x00, 0x26, 0x47, 0x00, 0xBF, 0x0F, 0xFB,
-        0x2E, 0xF5, 0x05, 0xF0, 0x80, 0x60, 0x64, 0x50, 0x00, 0x72, 0x7E, 0x71, 0x8D, 0xFF, 0xAD, 0xFF,
-        0xB3, 0x60, 0xBE, 0x78, 0xFF, 0xFF, 0x25, 0x44, 0x89, 0xF1, 0x8A, 0xF1, 0xD0, 0x80, 0xD0, 0x80,
-        0x07, 0x04, 0x01, 0x06, 0x05, 0x00, 0x25, 0x46, 0x01, 0xF0, 0x03, 0x67, 0xA0, 0x85, 0x94, 0x80,
-        0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x46, 0x26, 0x41, 0x46, 0x63, 0x01, 0xF2, 0xFF, 0xFF, 0xFF, 0xB5,
-        0xD5, 0x81, 0x00, 0xF2, 0x05, 0x04, 0x04, 0x63, 0x60, 0x46, 0xF7, 0x1B, 0x42, 0xFE, 0x0D, 0x00,
-        0x61, 0x44, 0xC5, 0x81, 0x63, 0x45, 0xC5, 0x81, 0x9C, 0x84, 0xDC, 0x84, 0x01, 0xF2, 0xF0, 0x85,
-        0xF0, 0x80, 0x65, 0x44, 0xF8, 0x85, 0xFF, 0xFF, 0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xA2, 0xFF,
-        0x0F, 0x60, 0x8B, 0xF3, 0xFF, 0xFF, 0xAC, 0x86, 0x0E, 0xF2, 0x07, 0x03, 0x00, 0xA8, 0x09, 0xF2,
-        0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA, 0x08, 0xFE, 0x17, 0x00, 0x8B, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0,
-        0x00, 0xB4, 0x12, 0x06, 0x09, 0x60, 0x08, 0x61, 0x41, 0x4A, 0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF,
-        0xB5, 0x60, 0x58, 0x4E, 0xC1, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x06, 0x03, 0x2A, 0x43, 0xB5, 0x60,
-        0x58, 0x4E, 0xE2, 0x78, 0xFF, 0xFF, 0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0x41, 0x4A,
-        0x42, 0xA1, 0x03, 0x00, 0x41, 0x4A, 0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF, 0xB5, 0x60, 0x58, 0x4E,
-        0xC1, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x2A, 0x43, 0xB5, 0x60, 0x58, 0x4E, 0xE2, 0x78, 0xFF, 0xFF,
-        0x08, 0xFE, 0x0C, 0x00, 0x0F, 0x60, 0x8B, 0xF3, 0xFF, 0xFF, 0xAC, 0x86, 0x0E, 0xF2, 0x06, 0x03,
-        0x00, 0xA8, 0x09, 0xF2, 0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA, 0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58,
-        0xFF, 0xFF, 0x8C, 0xF3, 0x7C, 0x63, 0x00, 0xBE, 0x40, 0x45, 0x1A, 0x03, 0x00, 0x65, 0x65, 0x44,
-        0xDC, 0x85, 0x84, 0xA1, 0x00, 0xF2, 0x06, 0x06, 0x01, 0xFC, 0x00, 0xA8, 0x60, 0x46, 0xF7, 0x02,
-        0x40, 0x45, 0x0E, 0x00, 0x8B, 0xF3, 0x00, 0x63, 0xD4, 0x84, 0x8B, 0xFB, 0x80, 0x60, 0x7C, 0x64,
-        0x01, 0xFA, 0x00, 0xF0, 0x00, 0xFC, 0xD3, 0x80, 0x8C, 0xF9, 0x02, 0x02, 0x8D, 0xF9, 0x08, 0xFE,
-        0x2E, 0x58, 0xFF, 0xFF, 0x66, 0x44, 0x25, 0x46, 0x05, 0xFA, 0x06, 0xFA, 0x01, 0xF0, 0x03, 0x67,
-        0x02, 0xFC, 0xB0, 0x84, 0x3A, 0x7E, 0x01, 0xFA, 0x12, 0x64, 0x03, 0xFA, 0x00, 0xF0, 0x04, 0xF8,
-        0x00, 0x64, 0x0C, 0x61, 0x10, 0x63, 0x59, 0xDA, 0xFE, 0x1F, 0x2E, 0x58, 0xFF, 0xFF, 0x27, 0x43,
-        0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05, 0x16, 0x03, 0x00, 0x61, 0x01, 0x00, 0xEC, 0x63, 0x61, 0x46,
-        0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84, 0xA2, 0xDA, 0xBE, 0xD2, 0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B,
-        0x25, 0x44, 0x61, 0x46, 0xA3, 0xDA, 0x04, 0x00, 0x0A, 0xFA, 0x60, 0x46, 0x25, 0x44, 0x09, 0xFA,
-        0x61, 0x46, 0xBE, 0xDA, 0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x44, 0x00, 0xA8, 0x07, 0x4B, 0x0C, 0x03,
-        0x58, 0x4F, 0x33, 0x00, 0x0B, 0x47, 0x1F, 0x60, 0x0A, 0x65, 0x27, 0x44, 0xD4, 0x80, 0x00, 0x64,
-        0x01, 0x02, 0x0F, 0xFA, 0x58, 0x4F, 0xD3, 0x01, 0x70, 0x00, 0x25, 0x43, 0xE3, 0x84, 0x7C, 0x41,
-        0x02, 0x04, 0xE8, 0x81, 0xEC, 0x63, 0x61, 0x46, 0xA3, 0xD2, 0x00, 0x7C, 0x40, 0x45, 0xBF, 0xD8,
-        0xA3, 0xD8, 0xBE, 0xD8, 0x27, 0x42, 0x5A, 0xD3, 0x25, 0x5C, 0x60, 0x41, 0x02, 0x1B, 0x27, 0xD9,
-        0x05, 0x00, 0x25, 0x46, 0x0A, 0xFA, 0x61, 0x46, 0x25, 0x44, 0x09, 0xFA, 0x25, 0x44, 0x27, 0x43,
-        0x00, 0x61, 0x60, 0x46, 0x09, 0xF2, 0x08, 0xFC, 0x00, 0xA8, 0xDD, 0x81, 0xFA, 0x02, 0xBF, 0xD1,
-        0x66, 0x44, 0xBE, 0xDB, 0xC1, 0x84, 0xBF, 0xDB, 0x48, 0x00, 0x25, 0x46, 0xEC, 0x63, 0x08, 0xF2,
-        0x89, 0xF2, 0x1E, 0x18, 0x40, 0x47, 0xE0, 0x84, 0xE8, 0x85, 0x02, 0x05, 0xE8, 0x83, 0x00, 0x65,
-        0x65, 0x46, 0xBF, 0xD2, 0x61, 0x5C, 0xCC, 0x84, 0xA2, 0xDA, 0x25, 0x46, 0x0A, 0xF2, 0x00, 0xB9,
-        0x65, 0x46, 0x08, 0x24, 0xBE, 0xDA, 0x02, 0x1B, 0xA3, 0xD8, 0x02, 0x00, 0x60, 0x46, 0x89, 0xFA,
-        0x00, 0xB9, 0x61, 0x46, 0x08, 0x28, 0x0A, 0xFA, 0x25, 0x46, 0x89, 0xFC, 0x8A, 0xFC, 0x88, 0xFC,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x61, 0x28, 0x65, 0x25, 0x43, 0x8D, 0xF3, 0xAF, 0x83, 0x00, 0xBE,
-        0x18, 0x03, 0x02, 0x03, 0x00, 0xFC, 0x01, 0x00, 0x8C, 0xFD, 0x63, 0x46, 0x65, 0x44, 0xCC, 0x85,
-        0x00, 0xF2, 0x07, 0x02, 0x8D, 0xF5, 0x00, 0x64, 0x00, 0xFA, 0xDE, 0x60, 0xAF, 0x64, 0x09, 0xFB,
-        0x08, 0x00, 0x66, 0x43, 0x00, 0xBE, 0xDD, 0x81, 0xF1, 0x02, 0x8B, 0xF1, 0x8D, 0xFD, 0xC1, 0x84,
-        0x8B, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x45, 0x29, 0x43, 0xFC, 0xA3, 0x66, 0x44,
-        0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x00, 0x64, 0xBD, 0xDB, 0x03, 0x61, 0x0E, 0x65, 0x1F, 0x60,
-        0x1E, 0x63, 0x43, 0x49, 0xA3, 0xD3, 0x06, 0xA3, 0x00, 0xA8, 0xCD, 0x81, 0x04, 0x02, 0xF9, 0x02,
-        0xB3, 0x60, 0xBE, 0x78, 0xFF, 0xFF, 0x01, 0x26, 0xE6, 0x01, 0xD4, 0x80, 0x60, 0x45, 0xE3, 0x05,
-        0xF6, 0xA3, 0xBD, 0xD1, 0xBD, 0xD1, 0x44, 0x47, 0x44, 0x48, 0x44, 0x45, 0x1F, 0x60, 0x60, 0x64,
-        0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0xFE, 0x8C, 0xF5, 0x8B, 0xF3, 0x0D, 0x18, 0xCC, 0x84,
-        0x8B, 0xFB, 0x80, 0x60, 0x7C, 0x64, 0x01, 0xFA, 0x00, 0x64, 0x00, 0xF0, 0x00, 0xFA, 0xD0, 0x80,
-        0x8C, 0xF9, 0x02, 0x02, 0x8D, 0xF9, 0x08, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x1E, 0x60, 0xCE, 0x63,
-        0x0D, 0x65, 0x00, 0x61, 0x41, 0x48, 0xA3, 0xD3, 0x06, 0xA3, 0xAC, 0x86, 0x00, 0x61, 0x09, 0x03,
-        0x00, 0xF2, 0x09, 0xF0, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x64, 0x44, 0xAC, 0x86,
-        0xF6, 0x01, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x65, 0x44, 0x28, 0x45, 0x45, 0x88, 0xCC, 0x85,
-        0x5A, 0x87, 0xE9, 0x02, 0x00, 0x64, 0x27, 0xDA, 0x5A, 0xDA, 0x5A, 0x87, 0x87, 0xF3, 0x86, 0xF1,
-        0x02, 0xA4, 0x60, 0x46, 0x60, 0x45, 0x00, 0x61, 0x22, 0xF2, 0xFF, 0xFF, 0xAC, 0x86, 0x00, 0xF2,
-        0x04, 0x03, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x65, 0x44, 0x02, 0xA5, 0x65, 0x46,
-        0x64, 0x44, 0xCC, 0x9C, 0xFF, 0xFF, 0xF0, 0x02, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x5A, 0x87,
-        0x28, 0x45, 0x45, 0x88, 0x87, 0xF3, 0x86, 0xF1, 0x02, 0xA4, 0x60, 0x46, 0x60, 0x45, 0x00, 0x61,
-        0x76, 0xF2, 0xFF, 0xFF, 0xAC, 0x86, 0x00, 0xF2, 0x09, 0x03, 0x00, 0xF2, 0x09, 0xF0, 0xAC, 0x86,
-        0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x64, 0x44, 0xAC, 0x86, 0xF6, 0x01, 0x65, 0x44, 0x02, 0xA5,
-        0x65, 0x46, 0x64, 0x44, 0xCC, 0x9C, 0x61, 0x44, 0xEB, 0x02, 0x25, 0x46, 0x27, 0xDA, 0x5A, 0x87,
-        0x28, 0x45, 0x45, 0x88, 0x06, 0x60, 0x40, 0x65, 0x8C, 0xF3, 0x01, 0x61, 0xAC, 0x86, 0x00, 0xF2,
-        0x03, 0x03, 0xD5, 0x80, 0xDD, 0x81, 0xFA, 0x04, 0xCD, 0x84, 0x25, 0x46, 0x27, 0xDA, 0x28, 0x45,
-        0xC4, 0x84, 0x5A, 0xDA, 0xDA, 0x81, 0x8B, 0xF1, 0x59, 0xD8, 0x1E, 0x60, 0xCC, 0x64, 0x18, 0x63,
-        0xA0, 0xD1, 0x06, 0xA4, 0x59, 0xD8, 0xFC, 0x1F, 0x00, 0x64, 0x59, 0xDA, 0x59, 0xDA, 0x01, 0x60,
-        0x1A, 0x64, 0x0A, 0x63, 0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F, 0x7D, 0xF1, 0x59, 0xD8, 0x45, 0x01,
-        0x07, 0x4B, 0xB6, 0x60, 0x58, 0x4F, 0x4D, 0x78, 0xFF, 0xFF, 0x0B, 0x47, 0x58, 0x4F, 0x21, 0x00,
-        0x3C, 0x01, 0x07, 0x4B, 0xB6, 0x60, 0x58, 0x4F, 0x4D, 0x78, 0xFF, 0xFF, 0x0B, 0x47, 0x27, 0x44,
-        0x00, 0xBE, 0x08, 0xF0, 0x15, 0x03, 0x64, 0x42, 0x4A, 0xD3, 0x09, 0xF2, 0xDC, 0x83, 0xA2, 0xDD,
-        0x25, 0x43, 0x09, 0xFC, 0x63, 0x46, 0x27, 0x43, 0x0A, 0xFC, 0x09, 0xFA, 0x08, 0xF8, 0x00, 0xA8,
-        0x66, 0x43, 0x03, 0x02, 0x64, 0x44, 0x58, 0xDD, 0x03, 0x00, 0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA,
-        0x1C, 0x01, 0x27, 0x43, 0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05, 0x16, 0x03, 0x00, 0x61, 0x01, 0x00,
-        0xEC, 0x63, 0x61, 0x46, 0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84, 0xA2, 0xDA, 0xA3, 0xD2, 0x25, 0x46,
-        0x88, 0xF8, 0x04, 0x1B, 0x25, 0x44, 0x61, 0x46, 0xBE, 0xDA, 0x04, 0x00, 0x09, 0xFA, 0x60, 0x46,
-        0x25, 0x44, 0x0A, 0xFA, 0x61, 0x46, 0xA3, 0xDA, 0x2F, 0x58, 0xFF, 0xFF, 0xA0, 0xFE, 0x07, 0x05,
-        0xA3, 0xFE, 0x07, 0x05, 0xA1, 0xFE, 0x46, 0x05, 0x60, 0x64, 0x3B, 0xDB, 0x0F, 0x00, 0x20, 0x58,
-        0xFF, 0xFF, 0xFA, 0x01, 0x0A, 0x60, 0x80, 0xF3, 0xFF, 0xFF, 0xFB, 0xB4, 0xA2, 0xDB, 0xA0, 0x4C,
-        0x59, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0xA0, 0x4C, 0x7D, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x83, 0x3E, 0x40, 0x60, 0x0B, 0x65, 0x2B, 0x44, 0x00, 0x63, 0xE8, 0x80, 0xF8, 0x84, 0x02, 0x24,
-        0x94, 0x84, 0xF3, 0x83, 0xCD, 0x81, 0xFF, 0xFF, 0xF8, 0x02, 0xDF, 0x83, 0x2F, 0x58, 0x40, 0x4B,
-        0x00, 0x62, 0x01, 0x64, 0xD4, 0x80, 0xE0, 0x84, 0x1A, 0x03, 0xD4, 0x80, 0xE0, 0x84, 0x15, 0x03,
-        0x61, 0x44, 0x11, 0x61, 0xE0, 0x84, 0xCD, 0x81, 0xFD, 0x04, 0x01, 0x00, 0xE0, 0x84, 0xF2, 0x82,
-        0xFF, 0xFF, 0x02, 0x24, 0xC6, 0x82, 0x02, 0x28, 0xD6, 0x82, 0xE2, 0x80, 0xCD, 0x81, 0x02, 0x28,
-        0x01, 0xBC, 0xF4, 0x02, 0x01, 0x2A, 0xC6, 0x82, 0x03, 0x00, 0xE9, 0x81, 0xF2, 0x82, 0x61, 0x44,
-        0x2D, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x3B, 0xDB, 0x0C, 0x60, 0x6E, 0xF3, 0x5A, 0xD1, 0x60, 0x40,
-        0x04, 0x3A, 0x2C, 0x00, 0x00, 0x64, 0x4A, 0xDB, 0x1E, 0x60, 0xCE, 0x63, 0xA3, 0xD3, 0x46, 0x43,
-        0xAC, 0x86, 0x3C, 0x45, 0x22, 0x03, 0xD4, 0x80, 0x07, 0xF2, 0x02, 0x02, 0x09, 0xF2, 0xF8, 0x01,
-        0xD0, 0x80, 0x09, 0xF2, 0xF5, 0x02, 0x60, 0x43, 0x80, 0x67, 0xB0, 0x81, 0x61, 0x44, 0x0F, 0x60,
-        0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x09, 0x60,
-        0x08, 0x65, 0x0E, 0xF2, 0x02, 0xF2, 0x60, 0x40, 0xF0, 0x37, 0x05, 0x00, 0x8F, 0xF3, 0xD4, 0x80,
-        0xCC, 0x84, 0x01, 0x02, 0x8F, 0xFB, 0x63, 0x44, 0xDB, 0x01, 0x23, 0x46, 0x3C, 0x44, 0xAC, 0x80,
-        0xFF, 0xFF, 0x94, 0x02, 0x69, 0xF3, 0x6A, 0xF3, 0x02, 0xA8, 0x02, 0xA8, 0x08, 0x02, 0x00, 0x64,
-        0x6B, 0xFB, 0x69, 0xFB, 0x6A, 0xFB, 0x00, 0x64, 0x6C, 0xFB, 0xCA, 0xFE, 0x92, 0x00, 0x03, 0x02,
-        0x00, 0x64, 0x6A, 0xFB, 0xCA, 0xFE, 0x01, 0x64, 0x3B, 0xDB, 0x0F, 0x60, 0x6A, 0xF3, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x35, 0x03, 0x2C, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x86, 0x00,
-        0x2E, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41,
-        0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x2E, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x2D, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02,
-        0x61, 0x46, 0x2C, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF,
-        0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x5F, 0x02, 0x66, 0x45,
-        0x63, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x80, 0xB0, 0x09, 0xF2, 0x58, 0x03, 0xAC, 0x86, 0xCA, 0x01,
-        0x6A, 0xF3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x4C, 0x02, 0x0F, 0x60, 0x73, 0xF3, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x0F, 0x03, 0x76, 0xF1, 0x07, 0xF2, 0xFF, 0xFF, 0xD0, 0x80, 0x09, 0xF2,
-        0x03, 0x02, 0xAC, 0x86, 0x07, 0xF2, 0xFA, 0x02, 0x03, 0x02, 0x00, 0x64, 0x76, 0xFB, 0xED, 0x01,
-        0x46, 0x5C, 0x3C, 0x00, 0x0F, 0x60, 0x76, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x01, 0x03,
-        0x35, 0x02, 0x6B, 0xF3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x13, 0x02, 0x0F, 0x60, 0x6D, 0xF3,
-        0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x0B, 0x03, 0x2A, 0xF0, 0x20, 0x67, 0x09, 0xF2, 0xB0, 0x83,
-        0x00, 0xA8, 0x00, 0x64, 0x02, 0x03, 0x2A, 0xFC, 0x01, 0x00, 0x6B, 0xFB, 0x1F, 0x00, 0x00, 0x64,
-        0x6B, 0xFB, 0x0F, 0x60, 0x67, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x12, 0x03, 0x2A, 0xF0,
-        0x08, 0x67, 0xA0, 0x80, 0xFF, 0xFF, 0x12, 0x03, 0x76, 0xF1, 0x07, 0xF2, 0xFF, 0xFF, 0xD0, 0x80,
-        0x09, 0xF2, 0x03, 0x02, 0xAC, 0x86, 0x07, 0xF2, 0xFA, 0x02, 0x08, 0x02, 0x00, 0x64, 0x76, 0xFB,
-        0xE8, 0x01, 0x00, 0x64, 0x76, 0xFB, 0xB7, 0x60, 0xA2, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0xFC, 0xFB,
-        0x46, 0x5C, 0x16, 0x60, 0x2B, 0xF3, 0x0D, 0xF2, 0x60, 0x5C, 0x64, 0x5F, 0x0D, 0xFA, 0x07, 0xF0,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x76, 0xF9, 0x60, 0x40, 0x08, 0x2B, 0x05, 0x00, 0x00, 0x64, 0x48, 0xFB,
-        0xBA, 0x60, 0x03, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x02, 0x23, 0xF0,
-        0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xBF, 0x60, 0x16, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x00, 0x63,
-        0x40, 0x47, 0x50, 0x36, 0x01, 0x00, 0x01, 0x63, 0x48, 0xFD, 0x4A, 0xF3, 0x35, 0xFA, 0x10, 0xA4,
-        0x4A, 0xFB, 0x00, 0x64, 0x15, 0xFA, 0x16, 0xFA, 0x0F, 0xFA, 0x07, 0xF0, 0x87, 0xF3, 0xFF, 0xFF,
-        0xD0, 0x80, 0xFF, 0xFF, 0x05, 0x03, 0x66, 0x43, 0x64, 0x46, 0x11, 0xF2, 0xBA, 0xFB, 0x63, 0x46,
-        0x03, 0xF2, 0x00, 0xF4, 0x01, 0xF2, 0xFC, 0xA5, 0x00, 0x7F, 0xD4, 0x84, 0x27, 0x45, 0x3C, 0x46,
-        0x1A, 0xFA, 0x22, 0x63, 0x7B, 0x60, 0xFF, 0x64, 0xA4, 0x84, 0x03, 0x2B, 0x1C, 0x63, 0x2A, 0xFA,
-        0x8F, 0xB0, 0x88, 0x36, 0x02, 0xA3, 0x60, 0x40, 0xA4, 0x36, 0x14, 0x63, 0x43, 0x4C, 0x18, 0xFC,
-        0x00, 0x7C, 0x22, 0xF8, 0x64, 0x41, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x3A, 0xF2, 0x63, 0x46,
-        0xFF, 0xB4, 0x22, 0xFA, 0x60, 0x40, 0x00, 0x36, 0x92, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x0C, 0xB0,
-        0x08, 0x3A, 0x8D, 0x00, 0x60, 0x40, 0x40, 0x26, 0x8A, 0x00, 0x03, 0xF2, 0x00, 0xF4, 0xA0, 0xD2,
-        0xAA, 0x60, 0xAA, 0x65, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64, 0x0A, 0x02, 0xD0, 0x80, 0x00, 0x64,
-        0x5A, 0xD0, 0x06, 0x02, 0xD0, 0x80, 0xF8, 0x7F, 0xD0, 0x80, 0x01, 0x03, 0x01, 0x02, 0x01, 0x61,
-        0x62, 0x43, 0x46, 0x43, 0x3C, 0x46, 0x07, 0xF4, 0x3A, 0xF2, 0xFF, 0xFF, 0xA3, 0x46, 0x60, 0x40,
-        0x22, 0x26, 0x49, 0x00, 0x60, 0x45, 0x63, 0x42, 0x5A, 0xD0, 0xCD, 0x81, 0x3C, 0x46, 0x18, 0x02,
-        0x64, 0x44, 0x88, 0x3A, 0x15, 0x00, 0x8E, 0x37, 0x00, 0x00, 0x65, 0x44, 0x01, 0x26, 0x5F, 0x00,
-        0x04, 0x26, 0x03, 0x00, 0x10, 0x26, 0x01, 0x00, 0x31, 0x00, 0xA3, 0x46, 0x3B, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x80, 0x27, 0x3E, 0x00, 0xA3, 0x46, 0x00, 0x7C, 0x22, 0xF8, 0xA3, 0x46, 0x4F, 0x00,
-        0xA3, 0x46, 0x65, 0x44, 0x01, 0x26, 0x0B, 0x00, 0x04, 0x26, 0x03, 0x00, 0x10, 0x26, 0x01, 0x00,
-        0x1D, 0x00, 0x3B, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x27, 0x2B, 0x00, 0x17, 0x00, 0x87, 0xF3,
-        0xFF, 0xFF, 0x60, 0x46, 0x3A, 0xF2, 0x66, 0x43, 0xFF, 0xB4, 0x3C, 0x46, 0x22, 0xF0, 0x60, 0x47,
-        0xB0, 0x84, 0x22, 0xFA, 0x63, 0x46, 0x3B, 0xF0, 0x60, 0x40, 0x04, 0x27, 0x03, 0x00, 0x10, 0x27,
-        0x01, 0x00, 0x04, 0x00, 0x64, 0x40, 0x80, 0x27, 0x14, 0x00, 0x00, 0x00, 0x3C, 0x46, 0x02, 0x65,
-        0xBE, 0x60, 0xB6, 0x78, 0xFF, 0xFF, 0xCD, 0x81, 0x63, 0x42, 0x5A, 0xD0, 0x3C, 0x46, 0x09, 0x02,
-        0x64, 0x44, 0x88, 0x3A, 0x06, 0x00, 0x77, 0x37, 0x1A, 0x00, 0x78, 0x37, 0x18, 0x00, 0x8E, 0x37,
-        0x16, 0x00, 0x3C, 0x46, 0x22, 0xF0, 0x80, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0xFF, 0xFF, 0x3F, 0xF2,
-        0x3E, 0xF0, 0x08, 0xA4, 0x60, 0x41, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x03, 0x00,
-        0x04, 0x26, 0x03, 0x00, 0x04, 0x00, 0x04, 0x2B, 0x02, 0x00, 0x61, 0x44, 0x3F, 0xFA, 0x3C, 0x46,
-        0x2C, 0xF2, 0x27, 0x40, 0x01, 0x27, 0x32, 0xF2, 0xB4, 0xF1, 0x60, 0x40, 0x01, 0x26, 0x47, 0x00,
-        0x09, 0x60, 0x00, 0x64, 0xD0, 0x80, 0x3F, 0xF2, 0x09, 0x06, 0x2C, 0x45, 0xC4, 0x84, 0xD0, 0x80,
-        0x40, 0x4A, 0x34, 0x06, 0x60, 0x43, 0x64, 0x44, 0x54, 0x88, 0x17, 0x00, 0x60, 0x45, 0x13, 0x60,
-        0x4B, 0xF3, 0xBB, 0xF3, 0x00, 0xBC, 0x60, 0x47, 0xEC, 0xA0, 0x28, 0x03, 0x27, 0x07, 0x2C, 0x44,
-        0xC4, 0x81, 0x02, 0x60, 0x1C, 0x65, 0x45, 0x4A, 0xD5, 0x80, 0x2C, 0x45, 0x1F, 0x06, 0x27, 0x40,
-        0x04, 0x27, 0x25, 0x00, 0x2A, 0x43, 0xD7, 0x85, 0x45, 0x48, 0xB5, 0xF1, 0x0F, 0xF2, 0xD3, 0x80,
-        0x01, 0x65, 0x01, 0x07, 0x00, 0x65, 0xB4, 0x84, 0x0F, 0xFA, 0x00, 0x63, 0x3F, 0xF2, 0x28, 0x45,
-        0x60, 0x41, 0xD4, 0x84, 0xDF, 0x83, 0xFC, 0x07, 0x14, 0xFC, 0x17, 0xFA, 0x04, 0x60, 0x00, 0x64,
-        0x27, 0x45, 0xB4, 0x84, 0x2A, 0xFA, 0x28, 0x43, 0x16, 0xFC, 0x0D, 0x00, 0x3F, 0xF2, 0x2C, 0x45,
-        0xB5, 0xF1, 0xC4, 0x81, 0xD1, 0x80, 0x0F, 0xF2, 0x01, 0x06, 0x01, 0xBC, 0x0F, 0xFA, 0x3F, 0xF2,
-        0x17, 0xFA, 0x01, 0x64, 0x14, 0xFA, 0x0F, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2A, 0x6F, 0x00,
-        0x64, 0xF1, 0x15, 0x60, 0xDD, 0xF3, 0x64, 0x40, 0x01, 0x27, 0x03, 0x00, 0x60, 0x40, 0x02, 0x26,
-        0x14, 0x00, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x12, 0xF0, 0x15, 0x60, 0xDE, 0xF3, 0x63, 0x46,
-        0x64, 0x40, 0x10, 0x2A, 0x20, 0x00, 0x60, 0x40, 0x02, 0x26, 0x07, 0x00, 0x01, 0x26, 0x08, 0x00,
-        0x04, 0x26, 0x09, 0x00, 0x06, 0x61, 0x6E, 0x63, 0x08, 0x00, 0x02, 0x61, 0x14, 0x63, 0x05, 0x00,
-        0x00, 0x61, 0x0A, 0x63, 0x02, 0x00, 0x04, 0x61, 0x37, 0x63, 0x00, 0x64, 0x25, 0x60, 0xA2, 0x65,
-        0x45, 0xD1, 0xD5, 0x81, 0x15, 0x60, 0xDA, 0xF9, 0x25, 0x60, 0x7A, 0x65, 0x45, 0xD1, 0x1C, 0xFC,
-        0xB0, 0x84, 0x1E, 0xFA, 0x3C, 0x00, 0x60, 0x40, 0x10, 0x2A, 0x04, 0x00, 0x08, 0x61, 0x1E, 0x60,
-        0x0B, 0x63, 0x27, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x0A, 0x61, 0x16, 0x60, 0x0F, 0x63, 0x21, 0x00,
-        0x40, 0x2A, 0x04, 0x00, 0x0C, 0x61, 0x12, 0x60, 0x0A, 0x63, 0x1B, 0x00, 0x80, 0x2A, 0x04, 0x00,
-        0x0E, 0x61, 0x0E, 0x60, 0x0E, 0x63, 0x15, 0x00, 0x01, 0x2B, 0x04, 0x00, 0x10, 0x61, 0x0E, 0x60,
-        0x09, 0x63, 0x0F, 0x00, 0x02, 0x2B, 0x04, 0x00, 0x12, 0x61, 0x0A, 0x60, 0x0D, 0x63, 0x09, 0x00,
-        0x04, 0x2B, 0x04, 0x00, 0x14, 0x61, 0x0A, 0x60, 0x08, 0x63, 0x03, 0x00, 0x16, 0x61, 0x0A, 0x60,
-        0x0C, 0x63, 0x1E, 0xF0, 0x40, 0x67, 0x25, 0x60, 0xA2, 0x65, 0x45, 0xD1, 0xD5, 0x81, 0x15, 0x60,
-        0xDA, 0xF9, 0x25, 0x60, 0x7A, 0x65, 0x45, 0xD1, 0x1C, 0xFC, 0xB0, 0x84, 0x1E, 0xFA, 0xAA, 0xF2,
-        0x15, 0x60, 0xC2, 0xF3, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x44, 0x44, 0x61, 0x40, 0x08, 0x26,
-        0x02, 0x00, 0x61, 0x40, 0x80, 0x36, 0x12, 0xF2, 0x63, 0x46, 0x2C, 0x60, 0x26, 0x61, 0x00, 0x7F,
-        0x60, 0x45, 0x45, 0xD3, 0xFF, 0xFF, 0x60, 0x45, 0x00, 0x7F, 0x4B, 0xFB, 0x65, 0x44, 0x00, 0x7E,
-        0xBB, 0xFB, 0x62, 0xF1, 0x60, 0x43, 0x60, 0x47, 0xD0, 0x80, 0xC0, 0x65, 0x01, 0x06, 0x64, 0x44,
-        0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x36, 0x15, 0x64, 0x6E, 0x36, 0x0B, 0x64,
-        0x44, 0x86, 0x2A, 0xF2, 0x07, 0xF0, 0x60, 0x40, 0xB0, 0x3A, 0x03, 0x00, 0x40, 0x3B, 0x01, 0x00,
-        0x12, 0x00, 0x0C, 0xB4, 0x08, 0x3A, 0x44, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B,
-        0x3F, 0x00, 0x17, 0xF2, 0x22, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x22, 0x22, 0x04, 0x00, 0x00, 0xA8,
-        0x01, 0xA8, 0x36, 0x03, 0x35, 0x03, 0x3C, 0x46, 0x2A, 0xF0, 0x40, 0x67, 0xB0, 0x84, 0xA2, 0xDA,
-        0x60, 0x45, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x43, 0x60, 0x40, 0x01, 0x26, 0x05, 0x00, 0x04, 0x26,
-        0x1D, 0x00, 0x10, 0x26, 0x10, 0x00, 0x04, 0x00, 0x04, 0x27, 0x18, 0x00, 0x10, 0x27, 0x0B, 0x00,
-        0x65, 0x44, 0x2A, 0x61, 0x60, 0x40, 0x03, 0x2B, 0x24, 0x61, 0x8F, 0xB0, 0x88, 0x36, 0x02, 0xA1,
-        0x41, 0x4C, 0x98, 0xFA, 0x15, 0x00, 0x65, 0x44, 0x32, 0x61, 0x60, 0x40, 0x03, 0x2B, 0x2C, 0x61,
-        0x8F, 0xB0, 0x88, 0x36, 0x02, 0xA1, 0x41, 0x4C, 0x98, 0xFA, 0x0A, 0x00, 0x65, 0x44, 0x2E, 0x61,
-        0x60, 0x40, 0x03, 0x2B, 0x28, 0x61, 0x8F, 0xB0, 0x88, 0x36, 0x02, 0xA1, 0x41, 0x4C, 0x98, 0xFA,
-        0xBB, 0x60, 0xFB, 0x78, 0xFF, 0xFF, 0x66, 0x45, 0xAA, 0xF2, 0x15, 0x60, 0xC2, 0xF3, 0x24, 0x46,
-        0x61, 0x40, 0x08, 0x26, 0x02, 0x00, 0x61, 0x40, 0x80, 0x36, 0x12, 0xF2, 0x65, 0x46, 0x60, 0x40,
-        0x10, 0x26, 0x34, 0x00, 0x2C, 0x45, 0x17, 0xF2, 0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x81, 0x64, 0x45, 0x16, 0xA1, 0xB7, 0x60, 0x58, 0x4D, 0xC0, 0x78, 0xFF, 0xFF, 0x64, 0xF1,
-        0x01, 0xA4, 0xE0, 0x84, 0xE0, 0x84, 0x64, 0x40, 0x01, 0x2B, 0x06, 0xA4, 0x1B, 0xFA, 0xBB, 0xF3,
-        0x25, 0x60, 0x82, 0x65, 0x60, 0x40, 0x0B, 0x37, 0x00, 0x63, 0x0F, 0x37, 0x02, 0x63, 0x0A, 0x37,
-        0x04, 0x63, 0x0E, 0x37, 0x06, 0x63, 0x09, 0x37, 0x08, 0x63, 0x0D, 0x37, 0x0A, 0x63, 0x08, 0x37,
-        0x0C, 0x63, 0x0C, 0x37, 0x0E, 0x63, 0x28, 0xA3, 0x47, 0xD1, 0xD8, 0xA3, 0xD7, 0x83, 0x15, 0x60,
-        0xD9, 0xF9, 0x47, 0xD1, 0x40, 0x67, 0xB0, 0x84, 0x1F, 0xFA, 0x56, 0x00, 0x2A, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x80, 0x36, 0x17, 0x00, 0x50, 0x36, 0x15, 0x00, 0x10, 0x36, 0x13, 0x00, 0x30, 0x36,
-        0x11, 0x00, 0xA0, 0x36, 0x0F, 0x00, 0xB0, 0x36, 0x0D, 0x00, 0xC0, 0x36, 0x0B, 0x00, 0xBB, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x0A, 0x37, 0x06, 0x00, 0x15, 0x60, 0xDD, 0xF3, 0x80, 0x60, 0x00, 0x61,
-        0x60, 0x40, 0x04, 0x26, 0x00, 0x61, 0xBB, 0xF3, 0x25, 0x60, 0x7A, 0x65, 0x60, 0x40, 0x0A, 0x37,
-        0x00, 0x63, 0x14, 0x37, 0x02, 0x63, 0x37, 0x37, 0x04, 0x63, 0x6E, 0x37, 0x06, 0x63, 0x28, 0xA3,
-        0x47, 0xD1, 0xD8, 0xA3, 0xD7, 0x83, 0x15, 0x60, 0xD9, 0xF9, 0x47, 0xD1, 0xFF, 0xFF, 0xB1, 0x84,
-        0x1F, 0xFA, 0xBB, 0xF1, 0x2C, 0x45, 0x64, 0x43, 0x17, 0xF2, 0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x81, 0x63, 0x40, 0x37, 0x37, 0xE1, 0x81, 0x64, 0x45, 0xB7, 0x60, 0x58, 0x4D,
-        0xC0, 0x78, 0xFF, 0xFF, 0xAE, 0x82, 0xFC, 0xA2, 0x0A, 0x03, 0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00,
-        0x60, 0x41, 0x04, 0x0D, 0x63, 0x44, 0x80, 0x7E, 0xBB, 0xFB, 0x61, 0x44, 0xDC, 0x84, 0x2B, 0xF0,
-        0x1B, 0xFA, 0x64, 0x44, 0x80, 0x27, 0x47, 0x00, 0x07, 0xF0, 0x66, 0x45, 0x64, 0x46, 0x12, 0xF2,
-        0x65, 0x46, 0x60, 0x40, 0x10, 0x2A, 0x2E, 0x00, 0x16, 0xF2, 0x0F, 0xF0, 0xAC, 0x84, 0x2C, 0x45,
-        0x29, 0x03, 0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x63, 0x40, 0x37, 0x37,
-        0xE1, 0x81, 0x64, 0x45, 0x0F, 0xF0, 0xB7, 0x60, 0x58, 0x4D, 0xC0, 0x78, 0xFF, 0xFF, 0xAE, 0x82,
-        0xFC, 0xA2, 0x0A, 0x03, 0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41, 0x04, 0x0D, 0x80, 0x67,
-        0xB0, 0x84, 0x0F, 0xFA, 0x61, 0x44, 0xDC, 0x84, 0x1D, 0xFA, 0xDE, 0x65, 0xC4, 0x85, 0x26, 0x41,
-        0xE1, 0x81, 0xC5, 0x84, 0x2B, 0xFA, 0x1B, 0xF0, 0xDE, 0x64, 0xC0, 0x85, 0x26, 0x44, 0xE0, 0x84,
-        0xC4, 0x84, 0x10, 0xFA, 0x26, 0x44, 0x2C, 0xF0, 0x0A, 0xA4, 0x66, 0x45, 0x24, 0x46, 0x92, 0xF2,
-        0x65, 0x46, 0x9F, 0xF0, 0x61, 0x40, 0x10, 0x2A, 0x03, 0x00, 0x65, 0x40, 0x80, 0x27, 0xA0, 0xA4,
-        0x64, 0x40, 0x01, 0x26, 0x00, 0x64, 0x11, 0xFA, 0xBB, 0xF3, 0x13, 0xFA, 0x7C, 0x44, 0x1D, 0xFA,
-        0xFF, 0xFF, 0x0D, 0xF2, 0x3E, 0xF0, 0x60, 0x47, 0xFF, 0xB4, 0x64, 0x41, 0x01, 0xB1, 0x01, 0x63,
-        0x17, 0x02, 0x60, 0x41, 0xFF, 0x22, 0x04, 0x00, 0xB7, 0x60, 0x58, 0x4F, 0xB1, 0x78, 0xFF, 0xFF,
-        0x07, 0x60, 0xF7, 0xFD, 0x16, 0x60, 0x2B, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x01, 0x63, 0x61, 0x40,
-        0xFF, 0x22, 0x04, 0x00, 0xB7, 0x60, 0x58, 0x4F, 0xB1, 0x78, 0xFF, 0xFF, 0x07, 0x60, 0xF8, 0xFD,
-        0xBD, 0x60, 0x7A, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27, 0x03, 0x00,
-        0xBD, 0x60, 0x75, 0x78, 0xFF, 0xFF, 0x22, 0xF2, 0x46, 0x43, 0x60, 0x40, 0x22, 0x26, 0x09, 0x00,
-        0x01, 0x26, 0x0A, 0x00, 0x04, 0x26, 0x4B, 0x00, 0x10, 0x26, 0x10, 0x00, 0xBD, 0x60, 0x75, 0x78,
-        0xFF, 0xFF, 0xBC, 0x60, 0xF0, 0x78, 0xFF, 0xFF, 0x04, 0x27, 0x3D, 0x00, 0x10, 0x27, 0x03, 0x00,
-        0xBD, 0x60, 0x75, 0x78, 0xFF, 0xFF, 0x87, 0xF3, 0x3C, 0xF1, 0x02, 0x00, 0x07, 0xF2, 0x00, 0x7C,
-        0x40, 0x43, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x27, 0x21, 0x00, 0xA3, 0x46, 0x4B, 0xF2,
-        0xFF, 0xFF, 0xDC, 0x84, 0x4B, 0xFA, 0x4A, 0xF2, 0x08, 0x04, 0xDC, 0x84, 0x4A, 0xFA, 0x49, 0xF2,
-        0x04, 0x04, 0xDC, 0x84, 0x49, 0xFA, 0x01, 0x04, 0xFF, 0xFF, 0x87, 0xF3, 0x66, 0x5C, 0xD0, 0x80,
-        0x00, 0x7C, 0x01, 0x02, 0x3C, 0xF1, 0x4B, 0xF0, 0x64, 0x47, 0x20, 0xBF, 0xA3, 0x46, 0x3A, 0xF8,
-        0x3B, 0xFA, 0xA3, 0x46, 0x4A, 0xF2, 0x49, 0xF0, 0xA3, 0x46, 0x3C, 0xFA, 0x3D, 0xF8, 0x0F, 0x60,
-        0xA0, 0x64, 0xA3, 0x46, 0x76, 0x61, 0x0E, 0x63, 0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F, 0xA3, 0x46,
-        0xBD, 0x60, 0x75, 0x78, 0xFF, 0xFF, 0x87, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x02, 0x00, 0x07, 0xF4,
-        0xFF, 0xFF, 0xA3, 0x46, 0x2A, 0xF2, 0xA3, 0x46, 0x60, 0x40, 0x08, 0x27, 0x48, 0x00, 0x87, 0xF3,
-        0x66, 0x5C, 0xD0, 0x80, 0x3B, 0xF0, 0x08, 0x03, 0x64, 0x40, 0x10, 0x2A, 0x12, 0x00, 0xFF, 0x60,
-        0xEF, 0x64, 0xA0, 0x84, 0x3B, 0xFA, 0x24, 0x00, 0x3D, 0xF3, 0x01, 0x61, 0x60, 0x43, 0xCF, 0x83,
-        0xE1, 0x81, 0xFD, 0x0D, 0xE9, 0x81, 0xA1, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0x91, 0x84, 0x3B, 0xFA,
-        0x17, 0x00, 0x4B, 0xF2, 0xFF, 0xFF, 0x10, 0xA0, 0xFF, 0xFF, 0x02, 0x04, 0xFF, 0x60, 0xFF, 0x64,
-        0xDC, 0x84, 0x4B, 0xFA, 0x4A, 0xF2, 0x16, 0x04, 0xDC, 0x84, 0x4A, 0xFA, 0x49, 0xF2, 0x08, 0x04,
-        0xDC, 0x84, 0x49, 0xFA, 0x05, 0x04, 0x3B, 0xF2, 0xFF, 0xFF, 0xE0, 0x84, 0xE8, 0x84, 0x3B, 0xFA,
-        0x0C, 0x60, 0xFE, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC7, 0x60, 0xCF, 0x78,
-        0xFF, 0xFF, 0x84, 0xFF, 0x06, 0x60, 0x17, 0xE1, 0x77, 0x40, 0x8B, 0xFF, 0x02, 0x60, 0x00, 0x75,
-        0xC9, 0x60, 0x58, 0x4F, 0x67, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x06, 0x60, 0x80, 0xFB, 0x0C, 0x60,
-        0xFE, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC8, 0x60, 0x46, 0x78, 0xFF, 0xFF,
-        0x84, 0xFF, 0x00, 0x7C, 0x06, 0x60, 0x80, 0xF3, 0xA2, 0xD9, 0x60, 0x40, 0x01, 0x2A, 0x04, 0x00,
-        0xC9, 0x60, 0x58, 0x4F, 0xAF, 0x78, 0xFF, 0xFF, 0x3C, 0x46, 0x07, 0xF4, 0x87, 0xF3, 0x66, 0x5C,
-        0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43, 0x3C, 0x46, 0x22, 0xF2, 0x63, 0x46, 0x60, 0x40,
-        0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x4B, 0xF0, 0x64, 0x41, 0x64, 0x47, 0xFF, 0xB4, 0x60, 0x5F,
-        0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47, 0xA3, 0x46, 0x3A, 0xFA, 0x64, 0x44, 0x20, 0x7F,
-        0x34, 0x94, 0x3B, 0xFA, 0xA3, 0x46, 0x4A, 0xF2, 0x49, 0xF0, 0xA3, 0x46, 0x3C, 0xFA, 0x3D, 0xF8,
-        0x80, 0x60, 0x10, 0xE0, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60,
-        0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0xBD, 0x60, 0x75, 0x78, 0xFF, 0xFF,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x27, 0x31, 0x00, 0x2A, 0xF2, 0x00, 0x60, 0x7C, 0x62,
-        0x60, 0x40, 0x40, 0x2B, 0x24, 0x00, 0xA2, 0xD3, 0x00, 0x61, 0x60, 0xFE, 0xA0, 0xD3, 0x5E, 0xD1,
-        0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81, 0xC0, 0x2B, 0x04, 0x00, 0x80, 0x2A,
-        0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00, 0x60, 0x47, 0xDC, 0x87, 0x01, 0x61,
-        0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE, 0x5A, 0xD1, 0xFF, 0xFF, 0xC1, 0x84,
-        0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64, 0xA2, 0xDB, 0x20, 0xFE, 0x00, 0x60,
-        0x3E, 0xF3, 0xFF, 0xFF, 0xA0, 0xD3, 0x5A, 0xD1, 0x3A, 0xFA, 0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0,
-        0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A,
-        0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x40, 0xF3, 0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1,
-        0x64, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A,
-        0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xE7, 0x7F, 0xA0, 0x5A, 0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5A, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A,
-        0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xED, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F,
-        0xA0, 0x5A, 0x08, 0x60, 0x00, 0xEA, 0x65, 0x44, 0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60,
-        0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x02, 0x64, 0x3B, 0xDB, 0xBA, 0x60,
-        0xF3, 0x78, 0xFF, 0xFF, 0xBF, 0x60, 0xBB, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0xFC, 0xFB, 0x07, 0xF0,
-        0x00, 0x64, 0xD0, 0x80, 0x87, 0xF3, 0x0E, 0x03, 0xD0, 0x80, 0xFF, 0xFF, 0x0B, 0x03, 0x47, 0xF1,
-        0x07, 0xF0, 0x64, 0x40, 0x02, 0x26, 0x01, 0x00, 0x08, 0x00, 0x03, 0x12, 0xBE, 0x60, 0x46, 0x78,
-        0xFF, 0xFF, 0xFC, 0x0A, 0xBE, 0x60, 0xA6, 0x78, 0xFF, 0xFF, 0x87, 0xF0, 0x87, 0xF3, 0x10, 0xF0,
-        0xD4, 0x80, 0xFF, 0xFF, 0x3D, 0x03, 0x66, 0x43, 0x65, 0x46, 0xFF, 0x67, 0x20, 0x85, 0x64, 0x5F,
-        0x40, 0x44, 0x15, 0xF0, 0x25, 0x44, 0xD0, 0x84, 0x03, 0xA4, 0x03, 0x0E, 0xE8, 0x84, 0xE8, 0x84,
-        0x04, 0x00, 0xFA, 0xA4, 0xE8, 0x84, 0xE8, 0x87, 0xC0, 0xBF, 0xC0, 0x84, 0x15, 0xFA, 0x40, 0x45,
-        0x14, 0xF0, 0x24, 0x44, 0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x87, 0xF8, 0xBF, 0xC0, 0x84, 0x14, 0xFA, 0x60, 0x5C, 0x2F, 0x67, 0xD0, 0x80, 0x60, 0x45,
-        0x02, 0x28, 0x64, 0x45, 0x25, 0x5C, 0x8B, 0x67, 0xD0, 0x80, 0x60, 0x41, 0x02, 0x24, 0x64, 0x41,
-        0xD5, 0x84, 0x80, 0x65, 0xC4, 0x87, 0x01, 0x05, 0x00, 0x64, 0xFF, 0xB4, 0x0E, 0xFA, 0x63, 0x46,
-        0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x17, 0xF2, 0x63, 0x46, 0x60, 0x40, 0x00, 0x36, 0x2E, 0x00,
-        0x01, 0x36, 0x1E, 0x00, 0x03, 0x3A, 0x25, 0x00, 0x64, 0x46, 0x10, 0xF2, 0x11, 0xFA, 0x12, 0xF2,
-        0x00, 0x61, 0x60, 0x47, 0x00, 0x7F, 0x12, 0xFA, 0x97, 0xFA, 0x46, 0x44, 0x63, 0x46, 0xC1, 0x60,
-        0x58, 0x4E, 0x72, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x00, 0x3A, 0x04, 0x00, 0xC1, 0x60, 0x58, 0x4E,
-        0xBC, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x96, 0xFC, 0x63, 0x46, 0x43, 0x00,
-        0x64, 0x46, 0x16, 0xF2, 0x00, 0x61, 0x20, 0x28, 0xFF, 0xA4, 0x97, 0xFA, 0x16, 0xFA, 0x63, 0x46,
-        0x3A, 0x00, 0x64, 0x46, 0x00, 0x61, 0x97, 0xFA, 0x63, 0x46, 0x35, 0x00, 0x07, 0xF0, 0x66, 0x41,
-        0x64, 0x46, 0x16, 0xF2, 0xFF, 0xFF, 0x20, 0x28, 0xFF, 0xA4, 0x16, 0xFA, 0x93, 0xF4, 0x12, 0xF2,
-        0x20, 0x28, 0xFF, 0xA3, 0x13, 0xFC, 0x61, 0x46, 0x63, 0x40, 0x00, 0x3A, 0x24, 0x00, 0xC1, 0x60,
-        0x58, 0x4E, 0x93, 0x78, 0xFF, 0xFF, 0x61, 0x40, 0xFF, 0x36, 0x1D, 0x00, 0x66, 0x41, 0x64, 0x46,
-        0x12, 0xF2, 0x93, 0xF4, 0x61, 0x46, 0x20, 0x28, 0x16, 0x00, 0x44, 0x44, 0xC1, 0x60, 0x58, 0x4E,
-        0x72, 0x78, 0xFF, 0xFF, 0x24, 0x5C, 0x65, 0x40, 0x00, 0x36, 0x06, 0x00, 0x66, 0x41, 0x64, 0x46,
-        0x01, 0x64, 0x17, 0xFA, 0x61, 0x46, 0x07, 0x00, 0x66, 0x43, 0x64, 0x46, 0xC1, 0x60, 0x58, 0x4E,
-        0xBC, 0x78, 0xFF, 0xFF, 0x63, 0x46, 0xBE, 0x60, 0xA6, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x43,
-        0x64, 0x46, 0x17, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xFF, 0x27, 0xFF, 0xFF, 0x00, 0x36, 0x07, 0x00,
-        0x01, 0x36, 0x1C, 0x00, 0x02, 0x36, 0x24, 0x00, 0x03, 0x36, 0x43, 0x00, 0xFF, 0xFF, 0x15, 0x60,
-        0xF9, 0xF1, 0x16, 0xF2, 0x43, 0x44, 0xD0, 0x80, 0x2C, 0x60, 0x24, 0x61, 0x09, 0x03, 0xA1, 0xD1,
-        0x2C, 0x60, 0x22, 0x63, 0xC0, 0x84, 0x16, 0xFA, 0xA3, 0xD3, 0xFF, 0xFF, 0x13, 0xFA, 0x39, 0x00,
-        0x96, 0xFC, 0xC1, 0x60, 0x58, 0x4E, 0xBC, 0x78, 0xFF, 0xFF, 0x33, 0x00, 0x43, 0x44, 0xC1, 0x60,
-        0x58, 0x4E, 0xBC, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0x11, 0xF3, 0x96, 0xFC, 0x13, 0xFA, 0x29, 0x00,
-        0x63, 0x46, 0x2B, 0x60, 0xF4, 0x63, 0xA3, 0xD3, 0x15, 0xF2, 0x60, 0x45, 0xD4, 0x80, 0x07, 0xF0,
-        0x0C, 0x03, 0x66, 0x41, 0x44, 0x44, 0x64, 0x46, 0x12, 0xF2, 0x61, 0x46, 0xC1, 0x60, 0x58, 0x4E,
-        0x72, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x00, 0x3A, 0x19, 0x00, 0x66, 0x43, 0x24, 0x46, 0xC1, 0x60,
-        0x58, 0x4E, 0xBC, 0x78, 0xFF, 0xFF, 0x12, 0xF2, 0x91, 0xF2, 0x90, 0xFA, 0x60, 0x5F, 0x12, 0xFA,
-        0x04, 0x00, 0xC1, 0x60, 0x58, 0x4E, 0xBC, 0x78, 0xFF, 0xFF, 0x03, 0x64, 0x17, 0xFA, 0x63, 0x46,
-        0x05, 0x00, 0x24, 0x43, 0x02, 0x64, 0x17, 0xFA, 0x63, 0x46, 0x00, 0x00, 0x03, 0x64, 0x3B, 0xDB,
-        0xCA, 0xFE, 0x47, 0xF1, 0x01, 0x65, 0x32, 0x40, 0x04, 0x27, 0x08, 0x00, 0x2C, 0xF2, 0x64, 0x45,
-        0x02, 0x22, 0x04, 0x00, 0x60, 0x40, 0x01, 0x26, 0x01, 0x00, 0x7B, 0x00, 0x14, 0xF2, 0x65, 0x40,
-        0x01, 0x26, 0x0C, 0x00, 0x60, 0x45, 0x05, 0x64, 0x3B, 0xDB, 0x65, 0x44, 0xCC, 0x85, 0x25, 0x60,
-        0xD6, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xD3, 0x78, 0x97, 0xF1, 0x50, 0x00, 0x60, 0x41, 0x2A, 0xF0,
-        0x00, 0x60, 0x0C, 0x64, 0xA0, 0x84, 0x04, 0x36, 0x02, 0x00, 0x0C, 0x3A, 0x01, 0x00, 0x46, 0x00,
-        0x61, 0x45, 0x60, 0x43, 0x25, 0x60, 0xD6, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xD3, 0x78, 0x97, 0xF1,
-        0x63, 0x40, 0x08, 0x36, 0x01, 0x00, 0x3A, 0x00, 0x14, 0xF2, 0x1C, 0x65, 0x60, 0x41, 0x00, 0x63,
-        0xCD, 0x81, 0xC7, 0x83, 0xFD, 0x02, 0x3F, 0xF0, 0x2C, 0xF2, 0xC3, 0x83, 0x60, 0x40, 0x01, 0x2A,
-        0x0D, 0x00, 0x25, 0x60, 0xD4, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x25, 0x60,
-        0xDA, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xD2, 0x78, 0x63, 0x45, 0x20, 0x00, 0x25, 0x60, 0xD2, 0x64,
-        0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x25, 0x60, 0xD8, 0x64, 0xE5, 0x60, 0x78, 0x41,
-        0xD2, 0x78, 0x63, 0x45, 0x15, 0xF2, 0xFF, 0xFF, 0x0F, 0xB4, 0x00, 0xA8, 0x01, 0xA8, 0x0E, 0x03,
-        0x07, 0x03, 0x25, 0x60, 0xE0, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x06, 0x00,
-        0x25, 0x60, 0xDE, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x04, 0x64, 0x3B, 0xDB,
-        0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x06, 0xF0, 0xFF, 0x60, 0x5F, 0x64, 0xA0, 0x84, 0x06, 0xFA,
-        0x61, 0x46, 0x1E, 0x60, 0xF2, 0x64, 0x0F, 0x60, 0x8D, 0xFB, 0x3C, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x5C, 0x5C, 0xFC, 0xFC, 0xCE, 0xFE, 0xB7, 0x60, 0xE2, 0x78,
-        0xFF, 0xFF, 0x13, 0x60, 0x2E, 0xF3, 0x07, 0xF4, 0x06, 0xF2, 0x02, 0xA8, 0x3C, 0x46, 0x10, 0x03,
-        0x10, 0xB0, 0x2A, 0xF2, 0x0D, 0x03, 0x0E, 0xF2, 0x0C, 0xB0, 0x60, 0x40, 0xF0, 0x37, 0x20, 0xBC,
-        0x02, 0x03, 0xFE, 0x7F, 0x0E, 0xFA, 0x23, 0xF0, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xCE, 0x01,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x50, 0xA8, 0x02, 0x7C, 0x10, 0x03, 0x0F, 0xF0, 0x15, 0xF2, 0x64, 0x41,
-        0x01, 0x2A, 0x02, 0x00, 0xAF, 0xF1, 0x09, 0x00, 0x03, 0x65, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46,
-        0x06, 0xF0, 0x63, 0x46, 0xAE, 0xF1, 0x64, 0x40, 0x10, 0x2A, 0x64, 0x45, 0xDC, 0x84, 0xD4, 0x80,
-        0x15, 0xFA, 0x38, 0x07, 0x61, 0x40, 0x01, 0x2A, 0x08, 0x00, 0x13, 0x60, 0x03, 0xF3, 0xFF, 0xFF,
-        0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB, 0x07, 0x00, 0x13, 0x60, 0x04, 0xF3, 0xFF, 0xFF,
-        0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB, 0x2A, 0xF0, 0x08, 0x67, 0xB0, 0x84, 0xA2, 0xDA,
-        0x08, 0xF0, 0x1E, 0x60, 0xD4, 0x64, 0xD0, 0x80, 0x07, 0xF2, 0x46, 0x43, 0x87, 0xF1, 0x06, 0x03,
-        0x60, 0x46, 0x86, 0xF4, 0xD0, 0x80, 0x80, 0xBB, 0x01, 0x03, 0x06, 0xFC, 0x23, 0x46, 0x3E, 0xF2,
-        0x00, 0x63, 0x01, 0xB0, 0x43, 0x5C, 0xFC, 0xFC, 0x0A, 0x03, 0x1E, 0x60, 0xEC, 0x64, 0x0F, 0x60,
-        0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xB7, 0x60,
-        0xE2, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x49, 0xFB, 0x25, 0x60, 0xE0, 0x64, 0xE5, 0x60, 0x78, 0x41,
-        0xC7, 0x78, 0x97, 0xF1, 0x25, 0x60, 0xE2, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1,
-        0x27, 0x44, 0xF7, 0xB4, 0x40, 0x47, 0x23, 0xF0, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x07, 0xF0,
-        0x66, 0x41, 0x64, 0x46, 0x06, 0xF2, 0x7F, 0x65, 0xA4, 0x9E, 0x06, 0xFA, 0x61, 0x46, 0x5E, 0x01,
-        0xC0, 0x60, 0x35, 0x78, 0xFF, 0xFF, 0x21, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0x01, 0x63, 0xC4, 0xB4,
-        0x31, 0xFB, 0x32, 0xFD, 0xBF, 0x60, 0xEB, 0x62, 0x42, 0x40, 0xA0, 0x4C, 0x40, 0xBC, 0x7D, 0xB4,
-        0xA0, 0x51, 0xA0, 0xFE, 0x1A, 0xFF, 0x1E, 0x60, 0xE6, 0x64, 0x08, 0xF0, 0x07, 0xF0, 0xD0, 0x80,
-        0x1E, 0x60, 0xEC, 0x62, 0x13, 0x02, 0xA2, 0xD3, 0x01, 0x63, 0xAC, 0x86, 0x07, 0xF2, 0x0E, 0x03,
-        0xD0, 0x80, 0x09, 0xF2, 0xFA, 0x02, 0x23, 0xFC, 0x1E, 0x60, 0xF2, 0x64, 0x0F, 0x60, 0x8D, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x3C, 0x46, 0x06, 0x64,
-        0xA1, 0xFF, 0x49, 0xFB, 0x83, 0x3E, 0x31, 0xF3, 0x87, 0x60, 0x80, 0x61, 0x1D, 0xF0, 0x60, 0x40,
-        0x01, 0x2A, 0x0F, 0x00, 0xFE, 0xB4, 0x31, 0xFB, 0x00, 0x64, 0x49, 0xFB, 0x01, 0x64, 0x47, 0xFB,
-        0x00, 0x71, 0x05, 0x64, 0x64, 0x5F, 0x0D, 0xFA, 0x40, 0x64, 0x3B, 0xDB, 0xC0, 0x60, 0x35, 0x78,
-        0xFF, 0xFF, 0x02, 0x2A, 0x17, 0x00, 0xD1, 0x91, 0x8D, 0xE2, 0x41, 0x64, 0x3B, 0xDB, 0x31, 0xF3,
-        0x2C, 0x60, 0x5E, 0x63, 0xFD, 0xB4, 0x31, 0xFB, 0xA3, 0xD3, 0x02, 0x63, 0x60, 0x5C, 0x0D, 0xF2,
-        0x47, 0xFD, 0xFF, 0xB5, 0x60, 0x47, 0xD0, 0x80, 0xDC, 0x84, 0x1F, 0x03, 0x60, 0x47, 0xB4, 0x84,
-        0x0D, 0xFA, 0x1B, 0x00, 0x08, 0x2A, 0x07, 0x00, 0x42, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF,
-        0xF7, 0xB4, 0x31, 0xFB, 0x12, 0x00, 0x10, 0x2A, 0x09, 0x00, 0x43, 0x64, 0x3B, 0xDB, 0x31, 0xF3,
-        0xFF, 0xFF, 0xEF, 0xB4, 0x31, 0xFB, 0xBF, 0x60, 0xBB, 0x78, 0xFF, 0xFF, 0x44, 0x64, 0x3B, 0xDB,
-        0x31, 0xF3, 0xFF, 0xFF, 0xDF, 0xB4, 0x31, 0xFB, 0x00, 0x00, 0x2A, 0x64, 0x3B, 0xDB, 0xB7, 0x60,
-        0xA2, 0x64, 0x40, 0x40, 0xBD, 0x60, 0x7D, 0x78, 0xFF, 0xFF, 0x0A, 0x60, 0x80, 0xF3, 0xFF, 0xFF,
-        0x02, 0xB5, 0x04, 0xB5, 0x04, 0x03, 0x03, 0x03, 0xC0, 0x60, 0xB8, 0x78, 0xFF, 0xFF, 0xF0, 0x60,
-        0x58, 0x4E, 0x74, 0x78, 0xFF, 0xFF, 0x31, 0x40, 0x01, 0x2A, 0x28, 0x00, 0x9D, 0xFE, 0x26, 0x04,
-        0x25, 0x0A, 0x9F, 0xFE, 0x23, 0x05, 0x85, 0xFF, 0x20, 0x44, 0x84, 0xFF, 0x40, 0x26, 0x1E, 0x00,
-        0x3F, 0x40, 0x20, 0x2B, 0x1B, 0x00, 0x38, 0x69, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x16, 0xFD, 0x01,
-        0x01, 0x2A, 0x14, 0x00, 0x13, 0x60, 0x09, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B,
-        0xA2, 0xDB, 0x64, 0xF1, 0x02, 0x60, 0xEE, 0x64, 0x81, 0xFB, 0xFF, 0xFF, 0x80, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0x82, 0xFB, 0x04, 0x64, 0x83, 0xFB, 0xDF, 0xFE, 0x19, 0xFF, 0x10, 0x64, 0x3B, 0xDB,
-        0x65, 0xF3, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0x74, 0xF1, 0xC9, 0xFE,
-        0x64, 0x40, 0x01, 0x26, 0x3B, 0x00, 0x49, 0xF3, 0x3C, 0x46, 0x31, 0x18, 0xCC, 0x84, 0x49, 0xFB,
-        0x2E, 0x02, 0xC1, 0x60, 0x6B, 0x64, 0x40, 0x42, 0xFC, 0xFC, 0x00, 0x64, 0x5C, 0x5C, 0x32, 0xFB,
-        0x82, 0xFF, 0x5C, 0x47, 0x84, 0xFF, 0x62, 0xFF, 0x13, 0x60, 0x01, 0xF3, 0xFF, 0xFF, 0xDC, 0x84,
-        0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB, 0x2A, 0xF2, 0x07, 0xF0, 0x0C, 0xB4, 0x08, 0x3A, 0x07, 0x00,
-        0x66, 0x41, 0x64, 0x46, 0x06, 0xF0, 0xFF, 0x60, 0xDF, 0x64, 0xA0, 0x84, 0x06, 0xFA, 0x23, 0xF0,
-        0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x1E, 0x60, 0xF2, 0x64, 0x0F, 0x60, 0x8D, 0xFB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xCE, 0xFE, 0x06, 0x00,
-        0x65, 0xF3, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0x14, 0x60, 0xFC, 0x63,
-        0xA3, 0xD3, 0xAD, 0x49, 0x20, 0xB5, 0x08, 0xB1, 0x22, 0x03, 0xE1, 0x81, 0x10, 0xB5, 0x95, 0x81,
-        0x60, 0x41, 0x18, 0x02, 0x14, 0x60, 0xFE, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA4, 0xDB,
-        0x16, 0x02, 0x0A, 0x64, 0xA4, 0xDB, 0x61, 0x44, 0x07, 0xB4, 0xFF, 0xFF, 0x10, 0x02, 0x08, 0xB1,
-        0xE1, 0x81, 0x95, 0x81, 0xA3, 0xD3, 0x0B, 0x03, 0x08, 0xAC, 0x01, 0xBC, 0xA3, 0xDB, 0xFF, 0xFF,
-        0x13, 0xFF, 0x05, 0x00, 0x10, 0xAC, 0xA3, 0xDB, 0x0A, 0x7C, 0x0A, 0x60, 0x7F, 0xF9, 0xB7, 0x60,
-        0xAE, 0x78, 0xFF, 0xFF, 0x46, 0xF3, 0x45, 0xF1, 0x04, 0x1B, 0x64, 0x44, 0x02, 0x1B, 0x07, 0x60,
-        0xF7, 0xF3, 0x45, 0xFB, 0x00, 0x63, 0x46, 0xFD, 0x60, 0x41, 0x25, 0x64, 0x3B, 0xDB, 0x27, 0x44,
-        0xEF, 0xB4, 0x40, 0x47, 0x00, 0xB9, 0x71, 0x40, 0x80, 0x27, 0x01, 0x12, 0x19, 0x03, 0xC1, 0x60,
-        0x0C, 0x62, 0x84, 0xFF, 0x42, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4, 0xA0, 0x51,
-        0x1F, 0x0A, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x19, 0x0A, 0x71, 0x40,
-        0x80, 0x27, 0xF7, 0x12, 0x45, 0xF3, 0x27, 0x02, 0x03, 0x18, 0xCC, 0x84, 0x45, 0xFB, 0xF1, 0x02,
-        0x06, 0x0A, 0xA0, 0x4C, 0xFB, 0xB4, 0xA0, 0x51, 0xA4, 0x60, 0xD7, 0x78, 0xFF, 0xFF, 0x84, 0xFF,
-        0xC0, 0x60, 0xEA, 0x64, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4, 0xA0, 0x51,
-        0xAF, 0x60, 0x7B, 0x78, 0xFF, 0xFF, 0x3C, 0x44, 0xAC, 0x80, 0x32, 0xF1, 0x12, 0x03, 0x64, 0x40,
-        0x07, 0x22, 0x0F, 0x00, 0xA4, 0x60, 0xB6, 0x78, 0xFF, 0xFF, 0xA0, 0x4C, 0x1C, 0xBC, 0xDF, 0xB4,
-        0xA0, 0x51, 0xF1, 0x01, 0x06, 0x00, 0x28, 0x64, 0x3A, 0xDB, 0xA0, 0x4C, 0x30, 0xBC, 0xF3, 0xB4,
-        0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x28, 0x64, 0x3B, 0xDB, 0x07, 0x60, 0xF8, 0xF3,
-        0x32, 0x40, 0x02, 0x27, 0x16, 0x00, 0x46, 0xFB, 0x14, 0x18, 0xC1, 0x60, 0x59, 0x64, 0x84, 0xFF,
-        0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x15, 0xBC, 0xF7, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x46, 0xF3, 0xCB, 0x0A, 0xDD, 0x02, 0xCC, 0x84, 0x46, 0xFB,
-        0xF5, 0x02, 0x84, 0xFF, 0xC1, 0x60, 0x6B, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x27, 0x44, 0x08, 0xBC,
-        0x40, 0x47, 0xF9, 0xE1, 0x04, 0x00, 0x78, 0xE1, 0x31, 0x40, 0x01, 0x26, 0xF9, 0xE1, 0xA4, 0x60,
-        0xAA, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xFB, 0xF1, 0x60, 0x45, 0x2C, 0x60, 0x0A, 0x61, 0xC5, 0x83,
-        0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0x66, 0x45, 0x24, 0x46, 0x0E, 0xF2, 0x65, 0x46, 0x64, 0x45,
-        0xD5, 0x81, 0x61, 0x45, 0x00, 0x7F, 0xD4, 0x80, 0x64, 0x43, 0x08, 0x04, 0xE3, 0x83, 0x63, 0x45,
-        0xC5, 0x81, 0x61, 0x45, 0xD4, 0x80, 0x02, 0x65, 0x03, 0x07, 0x03, 0x00, 0x00, 0x65, 0x01, 0x00,
-        0x01, 0x65, 0x2E, 0x58, 0xFF, 0xFF, 0x66, 0x43, 0x64, 0x46, 0x8F, 0xF0, 0x12, 0xF2, 0x91, 0xF2,
-        0x60, 0x40, 0x10, 0x36, 0x05, 0x00, 0x12, 0x36, 0x08, 0x00, 0x0C, 0x36, 0x0B, 0x00, 0x0F, 0x00,
-        0x40, 0x61, 0xA5, 0x80, 0x0A, 0x64, 0x13, 0x02, 0xF3, 0x01, 0x10, 0x61, 0xA5, 0x80, 0x0E, 0x64,
-        0x0E, 0x02, 0xEE, 0x01, 0x08, 0x61, 0xA5, 0x80, 0x10, 0x64, 0x09, 0x02, 0xE9, 0x01, 0xE1, 0x81,
-        0xA5, 0x80, 0x03, 0x05, 0xC8, 0x84, 0x03, 0x02, 0xE3, 0x01, 0xFF, 0x61, 0x02, 0x00, 0x12, 0xFA,
-        0x91, 0xFA, 0x63, 0x46, 0x2E, 0x58, 0xFF, 0xFF, 0x8F, 0xF0, 0x12, 0xF2, 0x91, 0xF2, 0x60, 0x40,
-        0x0A, 0x36, 0x05, 0x00, 0x0E, 0x36, 0x08, 0x00, 0x10, 0x36, 0x0B, 0x00, 0x0F, 0x00, 0x08, 0x61,
-        0xA5, 0x80, 0x10, 0x7E, 0x11, 0x02, 0xF3, 0x01, 0x04, 0x61, 0xA5, 0x80, 0x12, 0x7E, 0x0C, 0x02,
-        0xEE, 0x01, 0x20, 0x61, 0xA5, 0x80, 0x0C, 0x7E, 0x07, 0x02, 0xE9, 0x01, 0xE9, 0x81, 0xA5, 0x80,
-        0x05, 0x05, 0xD8, 0x84, 0x01, 0x02, 0xE3, 0x01, 0x12, 0xFA, 0x91, 0xFA, 0x2E, 0x58, 0xFF, 0xFF,
-        0x24, 0xE2, 0x2D, 0xF3, 0x2C, 0xF3, 0x00, 0xBD, 0xCC, 0x84, 0x08, 0x03, 0x2C, 0xFB, 0x06, 0x02,
-        0x65, 0x44, 0x2C, 0xFB, 0x8A, 0xFF, 0x80, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x44, 0xF3, 0xFF, 0xFF,
-        0xDC, 0x84, 0x44, 0xFB, 0x28, 0x60, 0x72, 0x65, 0x28, 0x60, 0x70, 0x61, 0xA5, 0xD3, 0xA1, 0xD3,
-        0x11, 0x18, 0xCC, 0x84, 0xA1, 0xDB, 0x0E, 0x02, 0xA5, 0xD3, 0xA1, 0xDB, 0x14, 0x60, 0x3B, 0xF3,
-        0x14, 0x60, 0x3A, 0xF1, 0xA2, 0xDB, 0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x03, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0xD2, 0xF3, 0x31, 0x40, 0x01, 0x2A, 0x3D, 0x00, 0x60, 0x43, 0x04, 0xB0,
-        0x02, 0xB0, 0x08, 0x24, 0x16, 0x02, 0x10, 0xB0, 0x29, 0x44, 0x34, 0x02, 0x00, 0xA8, 0xCC, 0x81,
-        0x0D, 0x03, 0x41, 0x49, 0x2F, 0x02, 0x63, 0x40, 0x08, 0x2A, 0x08, 0x00, 0xF7, 0xB3, 0x18, 0x60,
-        0x0A, 0xF1, 0xAD, 0x4F, 0xFD, 0xB4, 0xA0, 0x5D, 0x44, 0x49, 0x24, 0x00, 0x63, 0x40, 0x02, 0x2A,
-        0x10, 0x00, 0x18, 0x60, 0x0B, 0xF3, 0x18, 0x60, 0x09, 0xFB, 0x40, 0x49, 0x18, 0x60, 0x0C, 0xF3,
-        0x18, 0x60, 0x0A, 0xFB, 0x0C, 0xBB, 0xFD, 0xB3, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D,
-        0x11, 0x00, 0x18, 0x60, 0x0D, 0xF3, 0x30, 0x60, 0x12, 0x7C, 0x0C, 0x18, 0xA4, 0xDB, 0x40, 0x49,
-        0x18, 0x60, 0x0E, 0xF3, 0x18, 0x60, 0x0A, 0xFB, 0x08, 0xBB, 0xFB, 0xB3, 0xAD, 0x4F, 0x02, 0xBC,
-        0x00, 0x7F, 0xA0, 0x5D, 0xD2, 0xFD, 0x00, 0x60, 0x85, 0xF3, 0x62, 0x43, 0x17, 0x18, 0x58, 0xD3,
-        0x62, 0x41, 0x03, 0x18, 0xCC, 0x84, 0xA1, 0xDB, 0x11, 0x00, 0x49, 0xD3, 0xA3, 0xDB, 0x06, 0xA1,
-        0xA1, 0xD3, 0x59, 0xD1, 0x60, 0x45, 0xA5, 0xD3, 0x59, 0xD1, 0xB0, 0x84, 0xA5, 0xDB, 0x64, 0x44,
-        0x06, 0x36, 0xCD, 0xFE, 0x07, 0x36, 0xD6, 0xFE, 0xE6, 0x01, 0x23, 0x46, 0xB7, 0x60, 0xAE, 0x78,
-        0xFF, 0xFF, 0x46, 0x43, 0x1F, 0x60, 0x44, 0x61, 0xA1, 0xD3, 0x59, 0xD1, 0x06, 0x1B, 0x59, 0xD3,
-        0x59, 0xD1, 0x03, 0x1B, 0x59, 0xD3, 0x59, 0xD1, 0xF0, 0x18, 0x00, 0x63, 0x49, 0xDD, 0x60, 0x40,
-        0x02, 0x36, 0x11, 0x00, 0x03, 0x36, 0x32, 0x00, 0x01, 0x36, 0x08, 0x00, 0x05, 0x3A, 0xEA, 0x01,
-        0xA4, 0xD3, 0x5A, 0xD3, 0x9C, 0x85, 0xA4, 0x84, 0xA2, 0xDB, 0xE4, 0x01, 0x01, 0x60, 0x0A, 0x61,
-        0x00, 0x64, 0xA1, 0xDB, 0xDF, 0x01, 0xC2, 0x60, 0x8F, 0x64, 0x40, 0x45, 0x22, 0x00, 0x01, 0x60,
-        0x0A, 0x66, 0xA6, 0xD3, 0x04, 0xA1, 0x60, 0x43, 0xA1, 0xD3, 0xC9, 0x81, 0x60, 0x45, 0x00, 0xBB,
-        0xA1, 0xDB, 0xBE, 0xD3, 0x09, 0x03, 0xD4, 0x84, 0x9C, 0x84, 0xDC, 0x84, 0xFF, 0xFF, 0x04, 0x0E,
-        0xA3, 0xD1, 0x63, 0x46, 0x64, 0x43, 0xF2, 0x01, 0x9C, 0x84, 0xDC, 0x85, 0x49, 0xDD, 0x61, 0x44,
-        0x00, 0xBB, 0xA6, 0xDB, 0x02, 0x03, 0x65, 0x44, 0xBE, 0xDB, 0xBC, 0x01, 0xC2, 0x60, 0x6A, 0x64,
-        0x40, 0x45, 0x01, 0x60, 0x0A, 0x66, 0xA6, 0xD3, 0xFF, 0xFF, 0xD0, 0x80, 0x0F, 0x18, 0x02, 0x03,
-        0x60, 0x46, 0xF9, 0x01, 0x58, 0xD3, 0xA4, 0xD3, 0x60, 0x45, 0x00, 0x63, 0xA4, 0xDD, 0x05, 0x18,
-        0x58, 0xD3, 0xFF, 0xFF, 0xC4, 0x83, 0xA2, 0xDD, 0xCA, 0x84, 0xA6, 0xDB, 0x25, 0x58, 0x64, 0x41,
-        0x04, 0x60, 0x40, 0x62, 0x1A, 0x60, 0x58, 0x4D, 0xB4, 0x78, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF,
-        0x64, 0x40, 0x01, 0x2B, 0x50, 0x00, 0x28, 0x40, 0x08, 0x3A, 0x4D, 0x00, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0x15, 0x60, 0xD5, 0xFB, 0x64, 0xF1, 0x24, 0x60, 0x88, 0x63, 0x64, 0x40,
-        0x01, 0x27, 0x3C, 0xA3, 0x29, 0x40, 0x40, 0x2B, 0x1E, 0xA3, 0xBD, 0xD1, 0x63, 0x45, 0x44, 0x4E,
-        0x0E, 0x61, 0xBD, 0xD1, 0xCD, 0x81, 0xD0, 0x80, 0x01, 0x03, 0xFB, 0x04, 0xCB, 0x83, 0x15, 0x60,
-        0xD8, 0xF3, 0x39, 0xF1, 0xD7, 0x83, 0xEB, 0x83, 0x2E, 0x41, 0x5D, 0x93, 0xDF, 0x83, 0x15, 0x60,
-        0xD4, 0xFD, 0x15, 0x60, 0xD3, 0xFB, 0x53, 0x93, 0xDF, 0x80, 0x10, 0x03, 0x38, 0xF3, 0xCF, 0x83,
-        0x08, 0x03, 0xDF, 0x83, 0x0B, 0x02, 0xDF, 0x83, 0xDC, 0x84, 0xF0, 0xA0, 0x38, 0xFB, 0x06, 0x03,
-        0x03, 0x00, 0xCC, 0x84, 0x38, 0xFB, 0x02, 0x03, 0x00, 0x63, 0x02, 0x00, 0x08, 0x64, 0x38, 0xFB,
-        0xE3, 0x80, 0xFB, 0x83, 0xC3, 0x83, 0x63, 0x44, 0xFC, 0xA0, 0x02, 0x0E, 0x08, 0x07, 0x08, 0x00,
-        0x04, 0xA4, 0xFF, 0xFF, 0x05, 0x0D, 0xFC, 0x64, 0xFF, 0x7F, 0x60, 0x43, 0x01, 0x00, 0x04, 0x63,
-        0x39, 0xFD, 0x15, 0x60, 0xD7, 0xFD, 0x2F, 0x58, 0xFF, 0xFF, 0x15, 0x60, 0xD2, 0xF3, 0x40, 0x4E,
-        0x60, 0x46, 0x2F, 0xDB, 0x44, 0x44, 0xA1, 0xD3, 0xD9, 0x81, 0x48, 0x94, 0x24, 0x5C, 0xD0, 0x9C,
-        0x66, 0x42, 0x04, 0x06, 0xD2, 0x9C, 0x2F, 0xD9, 0x64, 0x46, 0x24, 0x44, 0xE0, 0x84, 0x44, 0xD3,
-        0xA3, 0xDB, 0xFF, 0xB4, 0x60, 0x5C, 0x66, 0x44, 0x22, 0xA4, 0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D,
-        0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0xA2, 0xD3, 0x60, 0x5C, 0x64, 0x5E, 0x60, 0x47,
-        0x2F, 0xD1, 0x28, 0xA3, 0xA3, 0xD9, 0xD8, 0xA3, 0x2E, 0x42, 0x4E, 0x8E, 0xBD, 0xDB, 0xDB, 0x02,
-        0x2D, 0x58, 0xFF, 0xFF, 0x43, 0xFF, 0x39, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x84, 0x3E, 0xFB, 0x01,
-        0x3D, 0x44, 0x00, 0xA8, 0xFF, 0xFF, 0x03, 0x02, 0x40, 0xFF, 0x44, 0xFF, 0xF4, 0x01, 0xA0, 0x4C,
-        0x3D, 0x46, 0x2A, 0xF2, 0x46, 0x4D, 0x10, 0x25, 0x12, 0x00, 0x09, 0xE1, 0xA1, 0xFF, 0x2D, 0x46,
-        0x0F, 0xF2, 0x01, 0x29, 0x06, 0x00, 0x2A, 0xF0, 0x40, 0xFF, 0x64, 0x40, 0x40, 0x2B, 0x08, 0xBC,
-        0x02, 0xBC, 0x0F, 0xFA, 0x08, 0x25, 0xDE, 0x01, 0xCB, 0xFE, 0x5C, 0x5D, 0xDC, 0x01, 0x44, 0xFF,
-        0x03, 0x2B, 0x21, 0x00, 0x88, 0xF3, 0x06, 0x61, 0x60, 0x43, 0x66, 0x45, 0x31, 0xF0, 0x63, 0x46,
-        0x05, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0x30, 0xF0, 0x0F, 0x02, 0x63, 0x46, 0x04, 0xF2, 0x65, 0x46,
-        0xD0, 0x80, 0x2F, 0xF0, 0x09, 0x02, 0x63, 0x46, 0x03, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0xFF, 0xFF,
-        0x03, 0x02, 0xFF, 0xFF, 0x48, 0xFE, 0x06, 0x00, 0xCD, 0x81, 0x02, 0xA3, 0xE7, 0x02, 0x87, 0xF1,
-        0x08, 0xFE, 0x64, 0x43, 0x26, 0x03, 0x31, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46,
-        0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF,
-        0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE, 0x60, 0x43,
-        0x61, 0x46, 0x07, 0xFC, 0x3F, 0xF2, 0x09, 0x60, 0xB0, 0x65, 0xD4, 0x80, 0x2A, 0xF2, 0x9D, 0x05,
-        0x08, 0x25, 0x88, 0x01, 0x5C, 0x4B, 0x0C, 0x60, 0xEC, 0x61, 0xA1, 0xDF, 0x2D, 0x46, 0x3B, 0xF2,
-        0x87, 0xF1, 0x87, 0xF4, 0x60, 0x40, 0x20, 0x2B, 0xB7, 0x00, 0xD3, 0x80, 0x2C, 0xF0, 0x8D, 0x03,
-        0x07, 0xF4, 0x64, 0x40, 0x01, 0x26, 0x87, 0xF5, 0xBA, 0xF4, 0x2D, 0x46, 0x04, 0x64, 0x04, 0xB3,
-        0x22, 0xF0, 0x04, 0x03, 0xC5, 0x60, 0xBD, 0x78, 0xFF, 0xFF, 0xA6, 0x00, 0x10, 0x64, 0xB0, 0x9C,
-        0x3B, 0xF2, 0x22, 0xF8, 0x60, 0x47, 0xC0, 0xB7, 0x02, 0xFE, 0xF0, 0x84, 0xF0, 0x84, 0xF0, 0x84,
-        0x00, 0xA8, 0x40, 0x4A, 0x17, 0x03, 0xE0, 0x81, 0x61, 0x43, 0x42, 0xFE, 0x00, 0x64, 0xF0, 0x84,
-        0xFE, 0x1F, 0x40, 0x4A, 0xE1, 0x84, 0xE0, 0x84, 0x2D, 0x46, 0x07, 0xF4, 0xE0, 0x81, 0x3B, 0xF0,
-        0x2A, 0x47, 0x0C, 0x60, 0x3A, 0x63, 0xA0, 0x84, 0x47, 0x9C, 0x10, 0x03, 0x7C, 0x44, 0x00, 0x60,
-        0xB2, 0x63, 0x14, 0x00, 0x07, 0xF4, 0x3B, 0xF0, 0x66, 0x44, 0x64, 0x40, 0x80, 0x2B, 0x06, 0x00,
-        0x00, 0x60, 0x78, 0x7C, 0x00, 0x60, 0xA2, 0x63, 0x43, 0x4C, 0x08, 0x00, 0x2D, 0x46, 0xC5, 0x60,
-        0xB0, 0x78, 0xFF, 0xFF, 0x2D, 0x46, 0xC5, 0x60, 0xB0, 0x78, 0xFF, 0xFF, 0xCE, 0xFB, 0xCF, 0xF9,
-        0xD0, 0xFD, 0xAD, 0x46, 0x3D, 0xF2, 0xAD, 0x46, 0xA3, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3C, 0xF2,
-        0xAD, 0x46, 0x02, 0x03, 0x15, 0x07, 0xEE, 0x04, 0x5B, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3A, 0xF2,
-        0x03, 0x03, 0xAD, 0x46, 0x0D, 0x07, 0xE6, 0x04, 0x3A, 0xF0, 0xAD, 0x46, 0x5B, 0xD0, 0x64, 0x44,
-        0xD0, 0x80, 0x2B, 0x44, 0x05, 0x07, 0xDE, 0x03, 0xD0, 0x84, 0x10, 0xA4, 0xFF, 0xFF, 0x00, 0x07,
-        0xCF, 0xF3, 0xCE, 0xF5, 0xFE, 0xA4, 0x0F, 0x60, 0xC0, 0x61, 0x0E, 0x63, 0x58, 0xD0, 0x59, 0xD9,
-        0xFD, 0x1F, 0x2D, 0x46, 0x8B, 0xFF, 0x2D, 0x46, 0x0F, 0x60, 0xB2, 0x64, 0xC9, 0x60, 0x58, 0x4F,
-        0x10, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x00, 0x60, 0x18, 0x70, 0x18, 0x71, 0x20, 0x72, 0x60, 0x53,
-        0x88, 0x75, 0x00, 0xF2, 0x09, 0xE1, 0x60, 0x50, 0x12, 0x71, 0x6E, 0x72, 0x83, 0x75, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x08, 0x25, 0x1F, 0x00, 0x40, 0xFF, 0x02, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x75, 0x40,
-        0x03, 0x2A, 0x03, 0x00, 0x80, 0x75, 0x0A, 0x64, 0x0B, 0x00, 0x80, 0x75, 0x1B, 0xF3, 0x8B, 0xFF,
-        0x02, 0x60, 0x00, 0x75, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x75, 0xDC, 0x84, 0xA2, 0xDB, 0x02, 0x64,
-        0x98, 0xFF, 0x2D, 0x46, 0x0F, 0xF0, 0xFF, 0xFF, 0xB0, 0x84, 0xA2, 0xDA, 0x88, 0xFF, 0xC3, 0x60,
-        0x74, 0x78, 0xFF, 0xFF, 0x8B, 0xFF, 0x02, 0x60, 0x00, 0x75, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x75,
-        0x88, 0xFF, 0xC5, 0x60, 0x96, 0x78, 0xFF, 0xFF, 0x22, 0xF0, 0x22, 0x64, 0xB0, 0x84, 0x22, 0xFA,
-        0x3A, 0xF0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0,
-        0xA0, 0x5B, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0x7C, 0x5F, 0xE8, 0x84, 0xE8, 0x85,
-        0x0D, 0x60, 0x02, 0x64, 0x44, 0xD3, 0x5A, 0xD1, 0x03, 0x1B, 0xC5, 0x60, 0xB0, 0x78, 0xFF, 0xFF,
-        0x60, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B,
-        0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44,
-        0xE7, 0x7F, 0xA0, 0x5B, 0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5B, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B,
-        0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44,
-        0xED, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xEF, 0x7F,
-        0xA0, 0x5B, 0x65, 0x44, 0xD8, 0x84, 0x08, 0x25, 0xB9, 0x00, 0x60, 0x7F, 0xA0, 0x5B, 0x80, 0x60,
-        0x00, 0xEB, 0xA0, 0x60, 0x00, 0xEB, 0xD1, 0x60, 0x00, 0xEB, 0x3F, 0xF2, 0x3B, 0xF0, 0x60, 0x43,
-        0xFC, 0xA4, 0x64, 0x40, 0x20, 0x2B, 0x03, 0x00, 0x08, 0xA4, 0x3F, 0xFA, 0x08, 0xA3, 0xF8, 0xA3,
-        0x3F, 0xFA, 0x0A, 0xE1, 0xB3, 0xFF, 0x9A, 0xFF, 0xCB, 0x83, 0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61,
-        0x0E, 0xA3, 0xAB, 0x84, 0xF2, 0xA3, 0xA1, 0xFF, 0x08, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0x6C, 0x18,
-        0x02, 0x62, 0xC9, 0x81, 0xAB, 0x84, 0x01, 0x00, 0xA2, 0xDC, 0x7A, 0xD4, 0xFD, 0x1C, 0xA2, 0xDC,
-        0x08, 0x25, 0x8C, 0x00, 0xF2, 0x1D, 0x41, 0x44, 0x7C, 0xA8, 0xD9, 0x81, 0xEE, 0x03, 0xFF, 0xB1,
-        0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x08, 0x25, 0x80, 0x00, 0x40, 0xFF, 0x42, 0x42,
-        0x46, 0x43, 0x06, 0x1E, 0x04, 0x02, 0x00, 0xF4, 0x02, 0x62, 0x42, 0x42, 0x46, 0x43, 0x01, 0xA2,
-        0x63, 0x45, 0x01, 0xA2, 0x62, 0x43, 0x46, 0x4C, 0xC6, 0x60, 0x58, 0x4F, 0x4B, 0x78, 0xFF, 0xFF,
-        0x0A, 0xE1, 0x9A, 0xFF, 0x24, 0x41, 0x02, 0xA1, 0x65, 0x43, 0x08, 0xA3, 0x23, 0x46, 0x22, 0x42,
-        0x7E, 0x3A, 0x0A, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0x37, 0x18, 0x02, 0x62, 0xC9, 0x81, 0xAB, 0x84,
-        0x03, 0x00, 0xA2, 0xDC, 0x7E, 0x36, 0xF6, 0x01, 0x7A, 0xD4, 0xFF, 0xFF, 0xFA, 0x1C, 0xA2, 0xDC,
-        0xF1, 0x1D, 0xD9, 0x81, 0xFF, 0xB1, 0x0B, 0x1E, 0x62, 0x40, 0x7E, 0x3A, 0x02, 0x00, 0x00, 0xF4,
-        0x02, 0x62, 0x5A, 0xD2, 0x89, 0xFF, 0x80, 0x4F, 0x6F, 0x44, 0xA2, 0xDA, 0x88, 0xFF, 0x98, 0xFF,
-        0x3D, 0x46, 0x0F, 0xF0, 0x0A, 0x64, 0xB0, 0x84, 0x18, 0x14, 0xF7, 0xB4, 0xA2, 0xDA, 0x06, 0x60,
-        0x76, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0C, 0x00, 0xD1, 0xF5, 0xD0, 0xF4, 0x0C, 0x60,
-        0xEC, 0x61, 0x59, 0xD1, 0x3B, 0xF8, 0x05, 0x64, 0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8, 0xFC, 0x02,
-        0x2D, 0x46, 0xC3, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0x28, 0x00, 0xA2, 0xDA, 0x2D, 0x46, 0x3B, 0xF0,
-        0xFF, 0xFF, 0x64, 0x40, 0x20, 0x2B, 0x1E, 0x00, 0x07, 0xF4, 0xBB, 0xF0, 0x2A, 0x44, 0xA4, 0x84,
-        0xFF, 0xFF, 0x2F, 0x26, 0x16, 0x00, 0x2D, 0x46, 0x64, 0x44, 0x3A, 0xF0, 0xBC, 0xF0, 0x64, 0x5F,
-        0x3D, 0xF0, 0x07, 0xF4, 0xD0, 0xF4, 0xFF, 0xFF, 0x08, 0xA3, 0x5B, 0xD8, 0x65, 0x5C, 0x5B, 0xD8,
-        0x5B, 0xDA, 0x2D, 0x46, 0xCE, 0xF3, 0x3C, 0xFA, 0xCF, 0xF3, 0x3D, 0xFA, 0x2A, 0x44, 0x23, 0xFA,
-        0x01, 0x00, 0x2D, 0x46, 0xC3, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0xFF, 0x43, 0xFF,
-        0x40, 0xFF, 0xB0, 0xFF, 0xB1, 0xFF, 0x2D, 0x46, 0x0C, 0x60, 0xEC, 0x61, 0xA1, 0xD3, 0x2D, 0x46,
-        0x60, 0x40, 0x01, 0x2A, 0x0A, 0x00, 0xD1, 0xF5, 0xD0, 0xF4, 0x59, 0xD1, 0x3B, 0xF8, 0x05, 0x64,
-        0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8, 0xFC, 0x02, 0x2D, 0x46, 0xC3, 0x60, 0x53, 0x78, 0xFF, 0xFF,
-        0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF, 0x3D, 0x46, 0x08, 0x25, 0xE0, 0x01, 0x0F, 0xF2, 0x40, 0xFF,
-        0x02, 0xBC, 0xA2, 0xDA, 0xC3, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0xB0, 0x84, 0x22, 0xFA, 0x00, 0x63,
-        0x3B, 0xF2, 0x06, 0x60, 0x76, 0xFD, 0x60, 0x47, 0xC0, 0xB7, 0x02, 0xFE, 0xF0, 0x84, 0xF0, 0x84,
-        0xF0, 0x84, 0x00, 0xA8, 0x40, 0x4A, 0x16, 0x03, 0xE0, 0x81, 0x61, 0x43, 0x42, 0xFE, 0x00, 0x64,
-        0xF0, 0x84, 0xFE, 0x1F, 0x40, 0x4A, 0xE1, 0x84, 0xE0, 0x84, 0x2D, 0x46, 0x07, 0xF4, 0xE0, 0x81,
-        0x3B, 0xF0, 0x2A, 0x47, 0x0C, 0x60, 0x3A, 0x63, 0xA0, 0x84, 0x47, 0x9C, 0x10, 0x03, 0x7C, 0x44,
-        0xA8, 0x63, 0x0F, 0x00, 0x07, 0xF4, 0x20, 0x64, 0x40, 0x4A, 0x3B, 0xF0, 0x66, 0x44, 0x64, 0x40,
-        0x80, 0x2B, 0x05, 0x00, 0x00, 0x60, 0x78, 0x7C, 0x00, 0x60, 0x98, 0x63, 0x02, 0x00, 0x2D, 0x46,
-        0xBF, 0x01, 0x2D, 0x46, 0xCE, 0xFB, 0xCF, 0xF9, 0xD0, 0xFD, 0x07, 0xF2, 0xD1, 0xFB, 0x60, 0x46,
-        0x3B, 0xF0, 0x2A, 0x44, 0x06, 0x60, 0x77, 0xF9, 0x5C, 0x4B, 0xA0, 0x84, 0xFF, 0xFF, 0x3F, 0x22,
-        0x05, 0x00, 0x90, 0x84, 0x3B, 0xFA, 0x01, 0x64, 0x40, 0x4B, 0x21, 0x00, 0xAD, 0x46, 0x0A, 0xA3,
-        0x3D, 0xF2, 0xAD, 0x46, 0xA3, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3C, 0xF2, 0xAD, 0x46, 0x02, 0x03,
-        0x16, 0x07, 0x14, 0x04, 0x5B, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3B, 0xF2, 0x03, 0x03, 0xAD, 0x46,
-        0x0E, 0x07, 0x0C, 0x04, 0x3A, 0xF0, 0xAD, 0x46, 0x5B, 0xD0, 0x64, 0x5F, 0xD0, 0x80, 0x2B, 0x44,
-        0x17, 0x07, 0x04, 0x03, 0xD0, 0x84, 0x10, 0xA4, 0xFF, 0xFF, 0x12, 0x07, 0x89, 0x01, 0x01, 0x64,
-        0x06, 0x60, 0x76, 0xFB, 0x2D, 0x46, 0x0C, 0x60, 0xFC, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4,
-        0xA2, 0xDB, 0xC6, 0x60, 0x76, 0x78, 0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x5E, 0x01,
-        0x2D, 0x46, 0x0C, 0x60, 0xFC, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC6, 0x60,
-        0xFE, 0x78, 0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x50, 0x01, 0x00, 0x60, 0x0F, 0x64,
-        0xC4, 0x60, 0xDB, 0x78, 0xFF, 0xFF, 0x2D, 0x46, 0x3B, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x20, 0x2B,
-        0x23, 0x00, 0x00, 0xF4, 0x08, 0x61, 0x2D, 0x46, 0x00, 0xF4, 0x0A, 0x62, 0x56, 0x92, 0x5A, 0xD0,
-        0x2C, 0x46, 0x64, 0x47, 0x63, 0x40, 0x7F, 0x2A, 0x03, 0x00, 0x00, 0xF4, 0x03, 0x63, 0x46, 0x4C,
-        0x60, 0xFE, 0xDE, 0xD8, 0x7F, 0x3A, 0x03, 0x00, 0x00, 0xF4, 0x03, 0x63, 0x46, 0x4C, 0xDE, 0xDA,
-        0xFE, 0xA1, 0x20, 0xFE, 0xE8, 0x02, 0x63, 0x41, 0xFD, 0xA1, 0x46, 0x4C, 0x01, 0xF2, 0x2D, 0x46,
-        0x61, 0x5E, 0x16, 0xFA, 0x2C, 0x44, 0x06, 0xFA, 0x2F, 0x58, 0xFF, 0xFF, 0x07, 0xF4, 0x66, 0x41,
-        0x03, 0xF2, 0x04, 0xF2, 0x40, 0x42, 0x05, 0xF2, 0x40, 0x43, 0x40, 0x44, 0x61, 0x46, 0x3C, 0xF2,
-        0x3D, 0xF2, 0x40, 0x40, 0x40, 0x41, 0x0D, 0x60, 0x72, 0x65, 0x00, 0x61, 0xCF, 0xF1, 0xCE, 0xF5,
-        0x44, 0x4C, 0x2C, 0x5C, 0xE9, 0x80, 0x00, 0x64, 0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2,
-        0x24, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x20, 0x44, 0x40, 0x80, 0xDB, 0x83, 0xBD, 0xD2,
-        0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x21, 0x44, 0x40, 0x81, 0xDB, 0x83, 0xBD, 0xD2,
-        0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x22, 0x44, 0x40, 0x82, 0xDB, 0x83, 0xBD, 0xD2,
-        0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x23, 0x44, 0x40, 0x83, 0xF2, 0xA3, 0xBD, 0xD2,
-        0x23, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x24, 0x44, 0xC0, 0x9C, 0x41, 0x84, 0xDD, 0x81,
-        0x08, 0x2A, 0xA7, 0x01, 0x0C, 0x60, 0xEE, 0x61, 0x05, 0x64, 0xD0, 0xF4, 0xD1, 0xF5, 0xFE, 0xA3,
-        0x5B, 0xD0, 0xCC, 0x84, 0x59, 0xD9, 0xFC, 0x02, 0xD0, 0xF3, 0xD1, 0xF5, 0x60, 0x42, 0x20, 0x44,
-        0xA2, 0xDA, 0x21, 0x44, 0x5A, 0xDA, 0x22, 0x44, 0x5A, 0xDA, 0x23, 0x44, 0x5A, 0xDA, 0x24, 0x44,
-        0x5A, 0xDA, 0x61, 0x46, 0x06, 0x60, 0x7E, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, 0x41, 0xD0, 0xF3,
-        0xD1, 0xF5, 0xA0, 0xD2, 0x5A, 0xD0, 0x40, 0x40, 0x44, 0x41, 0x5A, 0xD2, 0x5A, 0xD0, 0x40, 0x42,
-        0x5A, 0xD0, 0x44, 0x43, 0x61, 0x46, 0xBA, 0xF0, 0x3B, 0xF2, 0x44, 0x44, 0x65, 0x5F, 0x40, 0x85,
-        0xCF, 0xF4, 0xCE, 0xF5, 0x43, 0x4C, 0x0D, 0x60, 0x72, 0x65, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x20, 0x44, 0x40, 0x80, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x21, 0x44, 0x40, 0x81, 0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x22, 0x44, 0x40, 0x82, 0xBD, 0xD2, 0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x23, 0x44,
-        0x40, 0x83, 0xBD, 0xD2, 0x23, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x24, 0x44, 0x40, 0x84,
-        0xBD, 0xD2, 0x24, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x25, 0x44, 0x40, 0x85, 0x61, 0x46,
-        0x3A, 0xF0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0,
-        0xA0, 0x5B, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xCE, 0xF5, 0xBD, 0xD2, 0x25, 0x5C,
-        0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x20, 0x5C, 0x40, 0x80, 0x20, 0x44, 0xE4, 0x7F, 0xA0, 0x5B,
-        0x20, 0x47, 0xE5, 0x7F, 0xA0, 0x5B, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84,
-        0x21, 0x5C, 0x40, 0x81, 0x21, 0x44, 0xE6, 0x7F, 0xA0, 0x5B, 0x21, 0x47, 0xE7, 0x7F, 0xA0, 0x5B,
-        0x21, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x22, 0x5C, 0x40, 0x82, 0x22, 0x44, 0xE8, 0x7F, 0xA0, 0x5B,
-        0x22, 0x47, 0xE9, 0x7F, 0xA0, 0x5B, 0x22, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x23, 0x5C, 0x40, 0x83,
-        0x23, 0x44, 0xEA, 0x7F, 0xA0, 0x5B, 0x23, 0x47, 0xEB, 0x7F, 0xA0, 0x5B, 0x23, 0x44, 0xE8, 0x80,
-        0xF8, 0x84, 0x24, 0x5C, 0x40, 0x84, 0x24, 0x44, 0xEC, 0x7F, 0xA0, 0x5B, 0x24, 0x47, 0xED, 0x7F,
-        0xA0, 0x5B, 0x24, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x25, 0x5C, 0x40, 0x85, 0x25, 0x44, 0xEE, 0x7F,
-        0xA0, 0x5B, 0x25, 0x47, 0xEF, 0x7F, 0xA0, 0x5B, 0x2C, 0x43, 0xA3, 0xD2, 0x25, 0x5C, 0x90, 0x81,
-        0xE9, 0x84, 0xE3, 0x7F, 0xA0, 0x5B, 0x06, 0x60, 0x7E, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xCB, 0xF3,
-        0x5A, 0xD3, 0x40, 0x48, 0x5A, 0xD3, 0x40, 0x49, 0x40, 0x4A, 0x00, 0x60, 0x78, 0x7C, 0x44, 0x4D,
-        0x49, 0xF2, 0x4A, 0xF2, 0x40, 0x47, 0x40, 0x46, 0x0D, 0x60, 0x72, 0x65, 0x00, 0x61, 0x2D, 0x5C,
-        0xE9, 0x80, 0x00, 0x64, 0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x26, 0x44, 0x40, 0x86, 0xDB, 0x83, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x27, 0x44, 0x40, 0x87, 0xDB, 0x83, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x28, 0x44, 0x40, 0x88, 0xDB, 0x83, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x29, 0x44, 0x40, 0x89, 0xF2, 0xA3, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x2A, 0x44, 0xC0, 0x9C, 0x41, 0x8A, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01,
-        0x26, 0x44, 0x44, 0xFA, 0x27, 0x44, 0x45, 0xFA, 0x28, 0x44, 0x46, 0xFA, 0x29, 0x44, 0x47, 0xFA,
-        0x2A, 0x44, 0x48, 0xFA, 0x06, 0x60, 0x7F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x88, 0x7C,
-        0x44, 0x4D, 0x2D, 0x42, 0xA2, 0xD2, 0x5A, 0xD0, 0x40, 0x46, 0x44, 0x47, 0x5A, 0xD2, 0x5A, 0xD0,
-        0x40, 0x48, 0x5A, 0xD0, 0x44, 0x49, 0x4B, 0xF2, 0x44, 0x4A, 0x40, 0x8B, 0x60, 0x5C, 0x64, 0x47,
-        0xE0, 0x7F, 0xA0, 0x5A, 0xFF, 0xB4, 0x20, 0xBC, 0x7F, 0xB4, 0xE1, 0x7F, 0xA0, 0x5A, 0x64, 0x44,
-        0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x78, 0x63, 0x0D, 0x60, 0x72, 0x65, 0xBD, 0xD2, 0x2B, 0x5C,
-        0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x26, 0x44, 0x40, 0x86, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x27, 0x44, 0x40, 0x87, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x28, 0x44, 0x40, 0x88, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x29, 0x44, 0x40, 0x89, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2A, 0x44,
-        0x40, 0x8A, 0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2B, 0x44, 0x40, 0x8B,
-        0xBD, 0xD2, 0x2B, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x26, 0x5C, 0x40, 0x86, 0x26, 0x44,
-        0xE4, 0x7F, 0xA0, 0x5A, 0x26, 0x47, 0xE5, 0x7F, 0xA0, 0x5A, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x84,
-        0xE8, 0x80, 0xF8, 0x84, 0x27, 0x5C, 0x40, 0x87, 0x27, 0x44, 0xE6, 0x7F, 0xA0, 0x5A, 0x27, 0x47,
-        0xE7, 0x7F, 0xA0, 0x5A, 0x27, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x28, 0x5C, 0x40, 0x88, 0x28, 0x44,
-        0xE8, 0x7F, 0xA0, 0x5A, 0x28, 0x47, 0xE9, 0x7F, 0xA0, 0x5A, 0x28, 0x44, 0xE8, 0x80, 0xF8, 0x84,
-        0x29, 0x5C, 0x40, 0x89, 0x29, 0x44, 0xEA, 0x7F, 0xA0, 0x5A, 0x29, 0x47, 0xEB, 0x7F, 0xA0, 0x5A,
-        0x29, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x2A, 0x5C, 0x40, 0x8A, 0x2A, 0x44, 0xEC, 0x7F, 0xA0, 0x5A,
-        0x2A, 0x47, 0xED, 0x7F, 0xA0, 0x5A, 0x2A, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x2B, 0x5C, 0x40, 0x8B,
-        0x2B, 0x44, 0xEE, 0x7F, 0xA0, 0x5A, 0x2B, 0x47, 0xEF, 0x7F, 0xA0, 0x5A, 0x3C, 0xF0, 0x2B, 0x44,
-        0x90, 0x84, 0xE8, 0x84, 0xE3, 0x7F, 0xA0, 0x5A, 0x06, 0x60, 0x7F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x60, 0x45, 0x00, 0xF0, 0x84, 0x60, 0x00, 0xE3, 0x04, 0x71, 0x64, 0x50, 0x01, 0x2A, 0x04, 0x71,
-        0x5C, 0x61, 0x04, 0x63, 0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F, 0x3D, 0xF2, 0x60, 0x43, 0x60, 0x47,
-        0x5B, 0xDB, 0x3C, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x5B, 0xDB, 0x3A, 0xF2, 0xFF, 0xFF, 0x60, 0x47,
-        0x5B, 0xDB, 0x3F, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x5B, 0xDB, 0x81, 0x60, 0x18, 0xE3, 0x65, 0x43,
-        0xE3, 0x84, 0x60, 0x47, 0x00, 0x7F, 0x60, 0x50, 0x7F, 0x64, 0x23, 0x94, 0x60, 0x51, 0x7C, 0x72,
-        0x04, 0x75, 0x0C, 0x60, 0x16, 0x61, 0x16, 0x60, 0x00, 0x63, 0x59, 0xDD, 0x2A, 0xF2, 0x87, 0x60,
-        0x8F, 0x65, 0xA4, 0x87, 0x40, 0xBF, 0x59, 0xDB, 0x56, 0x64, 0x0A, 0x63, 0x58, 0xD0, 0x59, 0xD9,
-        0xFD, 0x1F, 0x62, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x35, 0xF2, 0x0F, 0x65,
-        0xA4, 0x9C, 0x59, 0xD9, 0x06, 0x63, 0x59, 0xDF, 0xFE, 0x1F, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x45,
-        0x03, 0x2B, 0x05, 0x00, 0x6A, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x65, 0x40,
-        0x8F, 0xB0, 0x88, 0x3A, 0x02, 0x00, 0x39, 0xF0, 0x59, 0xD9, 0x2F, 0x58, 0xFF, 0xFF, 0x0C, 0x60,
-        0x16, 0x61, 0xA3, 0x46, 0x00, 0xF4, 0x02, 0x64, 0x0A, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F,
-        0x59, 0xDF, 0x59, 0xDF, 0xA0, 0x4C, 0x04, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0x23, 0x44, 0x01, 0xA7,
-        0x80, 0xBF, 0x60, 0x50, 0x80, 0x60, 0x38, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x01, 0x76, 0xFF, 0xFF,
-        0x76, 0x44, 0x01, 0x3A, 0xFD, 0x01, 0x40, 0x76, 0x42, 0xFF, 0xFF, 0xFF, 0x40, 0x76, 0x80, 0x60,
-        0x18, 0x70, 0x80, 0x60, 0x18, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x80, 0x60, 0x10, 0x73, 0x02, 0x76,
-        0x76, 0x44, 0xFF, 0xFF, 0x76, 0x44, 0x02, 0x3A, 0xFD, 0x01, 0x40, 0x76, 0x42, 0xFF, 0x3C, 0x46,
-        0x00, 0xF2, 0x80, 0x60, 0x00, 0xBC, 0x60, 0x50, 0x80, 0x60, 0x12, 0x71, 0x80, 0x60, 0x6E, 0x72,
-        0x3F, 0xF2, 0xFF, 0xFF, 0xF8, 0xA7, 0x80, 0xBF, 0x60, 0x53, 0x04, 0x76, 0xFF, 0xFF, 0x88, 0xFF,
-        0x3C, 0x46, 0x07, 0xF2, 0xFF, 0xFF, 0x40, 0x43, 0xA3, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x77, 0x40,
-        0x8B, 0xFF, 0xA0, 0x4C, 0x04, 0xE1, 0xFF, 0xFF, 0x76, 0x44, 0x04, 0x3A, 0xFD, 0x01, 0x40, 0x76,
-        0x42, 0xFF, 0xFF, 0xFF, 0x10, 0x76, 0xFF, 0xFF, 0x76, 0x44, 0x20, 0x3A, 0xFD, 0x01, 0x40, 0x76,
-        0x42, 0xFF, 0xA0, 0x48, 0x00, 0x7F, 0xA0, 0x51, 0x02, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xA0, 0x4C,
-        0xFB, 0xB4, 0xA0, 0x51, 0x06, 0x60, 0x1F, 0xE1, 0x16, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46,
-        0x3F, 0xF2, 0xFF, 0xFF, 0xF8, 0xA4, 0x3F, 0xFA, 0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA, 0xA0, 0x48,
-        0x08, 0x26, 0x07, 0x00, 0xA0, 0x4C, 0x04, 0xE1, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x00, 0x7F,
-        0xA0, 0x51, 0x42, 0xFF, 0x26, 0x46, 0x8B, 0xFF, 0x02, 0x60, 0x00, 0x75, 0x3C, 0xF2, 0x40, 0x76,
-        0x14, 0x1B, 0x26, 0x46, 0x3B, 0xF2, 0x0C, 0x60, 0xBC, 0x63, 0x60, 0x47, 0xC0, 0xB4, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0x43, 0x93, 0xE3, 0x9C, 0x64, 0x47, 0x80, 0x7C, 0x64, 0x5F, 0x60, 0x50,
-        0x7F, 0x64, 0x23, 0x97, 0x80, 0xBF, 0x60, 0x51, 0x07, 0x00, 0x01, 0xA7, 0x80, 0xBF, 0x60, 0x50,
-        0x80, 0x60, 0x40, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x01, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x0C, 0x21, 0xFC, 0x01, 0x04, 0x25, 0xD5, 0x01, 0x40, 0x76, 0x43, 0xFF, 0x0C, 0x60, 0x22, 0x61,
-        0x26, 0x46, 0x00, 0xF4, 0x02, 0x64, 0x0A, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x59, 0xDF,
-        0x59, 0xDF, 0x80, 0x60, 0x18, 0x70, 0x80, 0x60, 0x24, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x80, 0x60,
-        0x10, 0x73, 0x02, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21, 0xFC, 0x01, 0x04, 0x25,
-        0xB8, 0x01, 0x40, 0x76, 0x43, 0xFF, 0x26, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x80, 0xBF,
-        0x60, 0x50, 0x80, 0x60, 0x12, 0x71, 0x3F, 0xF2, 0x80, 0x60, 0x6E, 0x72, 0x60, 0x47, 0x80, 0xBF,
-        0x60, 0x53, 0x04, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21, 0xFC, 0x01, 0x04, 0x25,
-        0xA0, 0x01, 0x40, 0x76, 0x43, 0xFF, 0x08, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21,
-        0xFC, 0x01, 0x04, 0x25, 0x96, 0x01, 0x76, 0x5C, 0xFF, 0xFF, 0x40, 0x76, 0x43, 0xFF, 0x88, 0xFF,
-        0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0xDF, 0x60, 0x2A, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x11, 0xF1,
-        0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x20, 0x00, 0x74, 0xF3, 0x31, 0x40,
-        0x01, 0x2A, 0x1C, 0x00, 0xDC, 0x84, 0x01, 0xB4, 0x74, 0xFB, 0x08, 0x02, 0x08, 0x60, 0x12, 0xF1,
-        0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x00, 0x08, 0x60, 0x18, 0xF1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x08, 0x00, 0xA9, 0xFE, 0xE6, 0x05,
-        0xAB, 0xFE, 0x07, 0x05, 0xA8, 0xFE, 0xD7, 0x05, 0xAA, 0xFE, 0xD8, 0x05, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x85, 0x3E, 0x0F, 0x60, 0x85, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x03, 0x02, 0xCA, 0x60,
-        0x7E, 0x78, 0xFF, 0xFF, 0x26, 0x45, 0xD4, 0x80, 0x0F, 0xF0, 0xF9, 0x03, 0x64, 0x44, 0x70, 0xB0,
-        0x70, 0x2A, 0x13, 0x00, 0x13, 0x60, 0x08, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B,
-        0xA2, 0xDB, 0xA2, 0xFF, 0x8E, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0xFE, 0xA0, 0x8E, 0xFB, 0x01, 0x07,
-        0xD4, 0xFE, 0xA3, 0xFF, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x64, 0x40, 0x02, 0x26, 0x09, 0x00,
-        0x66, 0x45, 0x09, 0xF4, 0x0F, 0xF2, 0x02, 0x18, 0x65, 0x46, 0xE4, 0x1B, 0x00, 0x64, 0x40, 0x46,
-        0xCD, 0x01, 0xA2, 0xFF, 0x8E, 0xF3, 0x46, 0x46, 0xCC, 0x84, 0xFE, 0xA0, 0x8E, 0xFB, 0x01, 0x07,
-        0xD4, 0xFE, 0xA3, 0xFF, 0x0F, 0xF0, 0xA3, 0xFC, 0x64, 0x44, 0x80, 0x26, 0x17, 0x00, 0x25, 0x60,
-        0xF0, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00,
-        0x07, 0x60, 0x01, 0x64, 0x04, 0x00, 0x02, 0x2A, 0x06, 0x00, 0x00, 0x60, 0x01, 0x64, 0x23, 0xFA,
-        0xCE, 0x60, 0x44, 0x78, 0xFF, 0xFF, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x0F, 0xF0, 0xFF, 0xFF,
-        0x64, 0x44, 0x08, 0x26, 0x34, 0x00, 0x2A, 0xF2, 0x60, 0x63, 0x60, 0x40, 0x02, 0x2B, 0x66, 0x63,
-        0xBE, 0xD2, 0x68, 0xF1, 0xA3, 0xD2, 0xD0, 0x80, 0x67, 0xF1, 0x0D, 0x02, 0xBF, 0xD2, 0xD0, 0x80,
-        0x66, 0xF1, 0x09, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x06, 0x02, 0x25, 0x60, 0xFC, 0x64, 0xE5, 0x60,
-        0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00, 0x07, 0x60, 0x02, 0x64,
-        0x04, 0x00, 0x02, 0x2A, 0x06, 0x00, 0x00, 0x60, 0x02, 0x64, 0x23, 0xFA, 0xCE, 0x60, 0x44, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xB0, 0x3A, 0x06, 0x00, 0x00, 0x60, 0x02, 0x64,
-        0x23, 0xFA, 0xCB, 0x60, 0x9D, 0x78, 0xFF, 0xFF, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x32, 0x44,
-        0x01, 0x2A, 0x4A, 0x00, 0x27, 0x60, 0x6A, 0x63, 0xBF, 0xD3, 0x00, 0x65, 0xB4, 0x81, 0xDB, 0x83,
-        0x3D, 0x03, 0xBF, 0xD3, 0xA3, 0xD3, 0x40, 0x48, 0xBE, 0xD3, 0x40, 0x4A, 0x2E, 0xF0, 0x40, 0x4C,
-        0xD0, 0x80, 0x2D, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x2C, 0xF0, 0x04, 0x02, 0x28, 0x44,
-        0xD0, 0x80, 0xFF, 0xFF, 0x2B, 0x03, 0x31, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x30, 0xF0, 0x08, 0x02,
-        0x2A, 0x44, 0xD0, 0x80, 0x2F, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x1E, 0x03,
-        0x34, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x33, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x32, 0xF0,
-        0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x11, 0x03, 0x38, 0xF0, 0x2C, 0x44, 0xD0, 0x80,
-        0x37, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x36, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80,
-        0xFF, 0xFF, 0x04, 0x03, 0xFA, 0xA1, 0x06, 0xA3, 0xB7, 0x03, 0xC3, 0x01, 0x07, 0x60, 0x00, 0x64,
-        0x23, 0xFA, 0xCE, 0x60, 0x44, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x0F, 0xF0, 0x60, 0x45, 0xA4, 0x36,
-        0x08, 0x00, 0x0C, 0xB4, 0x04, 0x36, 0x02, 0x00, 0x0C, 0x3A, 0x06, 0x00, 0xCE, 0x60, 0x38, 0x78,
-        0xFF, 0xFF, 0xCC, 0x60, 0x35, 0x78, 0xFF, 0xFF, 0x26, 0xF2, 0x50, 0xF1, 0x60, 0x47, 0x00, 0x7E,
-        0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF,
-        0xC0, 0x84, 0xA2, 0xDB, 0x0F, 0xF0, 0x65, 0x40, 0x40, 0x2B, 0x17, 0x00, 0x32, 0x40, 0x08, 0x26,
-        0x14, 0x00, 0x07, 0xF4, 0x3A, 0xF2, 0xFF, 0xFF, 0x37, 0xB4, 0x26, 0x46, 0x0E, 0x02, 0x2C, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x06, 0x00, 0x25, 0x60, 0xF6, 0x64, 0xE5, 0x60, 0x78, 0x41,
-        0xC7, 0x78, 0x97, 0xF1, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x64, 0x40, 0x60, 0x26,
-        0x03, 0x00, 0xCC, 0x60, 0x0D, 0x78, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x3A, 0xF3, 0x01, 0x25, 0x60,
-        0xEA, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x01, 0x3B, 0x07, 0x00, 0x25, 0x60, 0xF8, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1,
-        0x08, 0x00, 0x02, 0x3B, 0x06, 0x00, 0x25, 0x60, 0xFA, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78,
-        0x97, 0xF1, 0x2A, 0xF2, 0x28, 0x41, 0x40, 0xA8, 0x01, 0xB1, 0x02, 0x02, 0x43, 0x02, 0x6D, 0x00,
-        0x60, 0x40, 0x08, 0x2A, 0x0F, 0x00, 0x25, 0x60, 0xE8, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78,
-        0x97, 0xF1, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0x25, 0x60, 0xEE, 0x64, 0xE5, 0x60, 0x78, 0x41,
-        0xD3, 0x78, 0x97, 0xF1, 0x0F, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x26, 0x28, 0x00, 0x32, 0x44,
-        0x02, 0x26, 0x25, 0x00, 0x10, 0x2B, 0x26, 0x00, 0x27, 0x60, 0x6A, 0x63, 0xBF, 0xD3, 0x2C, 0xF0,
-        0x00, 0xA8, 0x60, 0x41, 0x0D, 0x03, 0x50, 0xFE, 0xBD, 0xD3, 0x2D, 0xF0, 0xD0, 0x80, 0xBD, 0xD3,
-        0x2E, 0xF0, 0xD0, 0x80, 0xBD, 0xD3, 0x2C, 0xF0, 0xD0, 0x80, 0xFA, 0xA1, 0x10, 0x0C, 0xF3, 0x02,
-        0x50, 0xFE, 0x60, 0x60, 0x01, 0x64, 0xD0, 0x80, 0x2D, 0xF0, 0x1D, 0x64, 0xD0, 0x80, 0x2E, 0xF0,
-        0x01, 0x64, 0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x0C, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x32, 0x40,
-        0x40, 0x2A, 0x00, 0x00, 0xCD, 0x60, 0xEE, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x40, 0x26, 0xFA, 0x01,
-        0x2A, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x08, 0x2A, 0x20, 0x00, 0x32, 0x40, 0x02, 0x2A, 0x1D, 0x00,
-        0x03, 0x67, 0xA0, 0x84, 0x00, 0x37, 0x64, 0x63, 0x60, 0x40, 0x02, 0x37, 0x5E, 0x63, 0x60, 0x40,
-        0x01, 0x37, 0x58, 0x63, 0x60, 0x40, 0x03, 0x37, 0x0D, 0x00, 0xBD, 0xD2, 0x66, 0xF1, 0xBD, 0xD2,
-        0xD0, 0x80, 0x67, 0xF1, 0x07, 0x02, 0xD0, 0x80, 0xBD, 0xD2, 0x68, 0xF1, 0x03, 0x02, 0xD0, 0x80,
-        0xFF, 0xFF, 0x03, 0x03, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x87, 0xF4, 0x60, 0x40,
-        0x03, 0x2B, 0x31, 0x00, 0x88, 0xF3, 0x06, 0x61, 0x60, 0x43, 0x66, 0x45, 0x31, 0xF0, 0x63, 0x46,
-        0x05, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0x30, 0xF0, 0x0F, 0x02, 0x63, 0x46, 0x04, 0xF2, 0x65, 0x46,
-        0xD0, 0x80, 0x2F, 0xF0, 0x09, 0x02, 0x63, 0x46, 0x03, 0xF2, 0x65, 0x46, 0xD0, 0x80, 0xFF, 0xFF,
-        0x03, 0x02, 0xFF, 0xFF, 0x48, 0xFE, 0x06, 0x00, 0xCD, 0x81, 0x02, 0xA3, 0xE7, 0x02, 0x87, 0xF1,
-        0x08, 0xFE, 0x64, 0x43, 0x03, 0x03, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x43, 0x43, 0x23, 0x46,
-        0x06, 0xF0, 0x26, 0x46, 0x07, 0x67, 0xA0, 0x84, 0x23, 0xFA, 0x64, 0x40, 0x02, 0x26, 0x2B, 0x00,
-        0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x26, 0x1B, 0x31, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18,
-        0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE,
-        0x60, 0x43, 0x61, 0x46, 0x43, 0x43, 0x07, 0xFC, 0x43, 0x43, 0x1D, 0xF0, 0xC0, 0x64, 0xC0, 0x84,
-        0x0A, 0x60, 0x7B, 0xF1, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84,
-        0xA2, 0xDB, 0x63, 0x45, 0x2A, 0xF2, 0x35, 0xF0, 0x60, 0x40, 0xA4, 0x36, 0x0B, 0x00, 0x08, 0x2B,
-        0x0C, 0x00, 0x23, 0x46, 0x26, 0xF2, 0x26, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x06, 0x02, 0xCE, 0x60,
-        0x38, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0xEE, 0x78, 0xFF, 0xFF, 0x23, 0x46, 0x22, 0xF2, 0x26, 0x46,
-        0x44, 0x4C, 0x0F, 0x26, 0x19, 0x00, 0x00, 0xBC, 0x40, 0x45, 0x0B, 0x03, 0x00, 0x64, 0x23, 0x46,
-        0x22, 0xFA, 0x26, 0x46, 0xA2, 0xFF, 0xB6, 0x60, 0x58, 0x4E, 0x72, 0x78, 0xFF, 0xFF, 0xA3, 0xFF,
-        0x26, 0x46, 0x2A, 0xF0, 0x2C, 0x44, 0x64, 0x40, 0x04, 0x27, 0x06, 0x00, 0x23, 0x46, 0x26, 0xFA,
-        0x26, 0x46, 0xCD, 0x60, 0xA5, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x02, 0xFA, 0xA2, 0xFF, 0x16, 0xF0,
-        0xFF, 0xFF, 0x64, 0x44, 0x01, 0x26, 0xDC, 0x9C, 0x92, 0xF3, 0x2A, 0xF2, 0xDC, 0x83, 0x92, 0xFD,
-        0x06, 0xF4, 0x01, 0xF8, 0x26, 0x46, 0x60, 0x40, 0x40, 0x2B, 0x18, 0x00, 0x64, 0x44, 0x00, 0x65,
-        0xFF, 0xB4, 0xFC, 0xA4, 0x06, 0xF0, 0x03, 0x03, 0x64, 0x46, 0x0C, 0x0D, 0x02, 0x65, 0x26, 0x46,
-        0x00, 0xF2, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x60, 0x46, 0xF9, 0x01, 0x01, 0xF2,
-        0xFF, 0xFF, 0xD4, 0x84, 0x01, 0xFA, 0x66, 0x44, 0x26, 0x46, 0x06, 0xFA, 0x06, 0xF4, 0x00, 0xF2,
-        0x80, 0xFC, 0x40, 0x45, 0xB6, 0x60, 0x58, 0x4E, 0x72, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46,
-        0x2C, 0x44, 0x0F, 0x26, 0x0F, 0x00, 0x23, 0x46, 0x26, 0xFA, 0x26, 0x44, 0x22, 0xFA, 0x26, 0x46,
-        0x00, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x6E, 0x00, 0xA3, 0x46, 0x26, 0xF2, 0x60, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x26, 0xFA,
-        0xA3, 0x46, 0x6B, 0x02, 0x2A, 0xF0, 0xA3, 0x46, 0x22, 0xF2, 0xA3, 0x46, 0x00, 0xBC, 0x00, 0xF2,
-        0x01, 0x02, 0x63, 0x00, 0x44, 0x4C, 0x3F, 0xF0, 0x60, 0x43, 0x23, 0x46, 0x22, 0xF4, 0x09, 0x60,
-        0x00, 0x65, 0x3F, 0xF2, 0x26, 0x46, 0xC0, 0x84, 0xD4, 0x80, 0x60, 0x45, 0x56, 0x07, 0x80, 0xFC,
-        0x1B, 0xF2, 0x06, 0xF2, 0x60, 0x41, 0x23, 0x46, 0x22, 0xF4, 0x1B, 0xF0, 0x06, 0xF0, 0xC1, 0x81,
-        0x06, 0xFA, 0x05, 0xFA, 0x9B, 0xFA, 0x65, 0x44, 0x3F, 0xFA, 0x64, 0x46, 0x00, 0xFC, 0x63, 0x46,
-        0x01, 0xF2, 0x10, 0x61, 0xF2, 0xA4, 0x01, 0xFA, 0xC8, 0x83, 0x02, 0x64, 0x59, 0xD0, 0x58, 0xD8,
-        0xFD, 0x1F, 0x06, 0x45, 0x00, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18, 0x70, 0x67,
-        0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03, 0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46, 0x25, 0x44, 0x80, 0xFC,
-        0x05, 0xFA, 0xB6, 0x60, 0x58, 0x4E, 0x72, 0x78, 0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF, 0x2C, 0x44,
-        0x04, 0x27, 0x16, 0x00, 0x23, 0x46, 0x22, 0xF2, 0xA2, 0xFC, 0x60, 0x46, 0x46, 0x46, 0x3F, 0xF2,
-        0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA, 0x26, 0x46, 0x2C, 0x43, 0x2A, 0xFC, 0x06, 0xF4, 0x00, 0x64,
-        0x00, 0xFA, 0x01, 0xF0, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0x01, 0xFA, 0x26, 0x46, 0x1D, 0x00,
-        0x00, 0x66, 0x46, 0x46, 0xCA, 0x60, 0x81, 0x78, 0xFF, 0xFF, 0xA3, 0x46, 0x22, 0xF0, 0xA2, 0xFC,
-        0x00, 0x63, 0x33, 0x85, 0xA3, 0x46, 0x0D, 0x03, 0xA3, 0x46, 0x26, 0xF2, 0x0F, 0x65, 0xA4, 0x85,
-        0xD4, 0x84, 0x26, 0xFA, 0xA3, 0x46, 0xA2, 0xFF, 0xB6, 0x60, 0x58, 0x4E, 0x72, 0x78, 0xFF, 0xFF,
-        0xA3, 0xFF, 0x26, 0x46, 0xCE, 0x60, 0x38, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x32, 0xF0, 0x60, 0x40,
-        0x08, 0x2A, 0x24, 0x00, 0x01, 0x2B, 0x13, 0x00, 0x64, 0x40, 0x01, 0x2A, 0x10, 0x00, 0x25, 0x60,
-        0xE8, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45,
-        0x25, 0x60, 0xEE, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xD3, 0x78, 0x97, 0xF1, 0x0F, 0x00, 0x25, 0x60,
-        0xE6, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45,
-        0x25, 0x60, 0xEC, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xD3, 0x78, 0x97, 0xF1, 0x07, 0xF4, 0xFF, 0xFF,
-        0x26, 0xF2, 0x26, 0x46, 0x0F, 0xB4, 0xDC, 0x85, 0x25, 0x60, 0xEA, 0x64, 0xE5, 0x60, 0x78, 0x41,
-        0xD3, 0x78, 0x97, 0xF1, 0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3B, 0x07, 0x00, 0x25, 0x60,
-        0xF8, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x08, 0x00, 0x02, 0x3B, 0x06, 0x00,
-        0x25, 0x60, 0xFA, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0x07, 0xF2, 0x26, 0xF0,
-        0x41, 0x18, 0x60, 0x46, 0xFF, 0x67, 0x20, 0x88, 0x64, 0x5F, 0x40, 0x4A, 0x15, 0xF0, 0x28, 0x44,
-        0xD0, 0x84, 0x03, 0xA4, 0x03, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0x04, 0x00, 0xFA, 0xA4, 0xE8, 0x84,
-        0xE8, 0x87, 0xC0, 0xBF, 0xC0, 0x84, 0x15, 0xFA, 0x40, 0x48, 0x14, 0xF0, 0x2A, 0x44, 0xD0, 0x84,
-        0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x07, 0x00,
-        0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF, 0xC0, 0x84,
-        0x14, 0xFA, 0x2B, 0x60, 0xEC, 0x63, 0xBD, 0xDB, 0x60, 0x5C, 0x2F, 0x67, 0xD0, 0x80, 0x60, 0x45,
-        0x02, 0x28, 0x64, 0x45, 0x28, 0x5C, 0xBD, 0xD9, 0x8B, 0x67, 0xD0, 0x80, 0x60, 0x41, 0x02, 0x24,
-        0x64, 0x41, 0xD5, 0x84, 0x80, 0x65, 0xC4, 0x87, 0x01, 0x05, 0x00, 0x64, 0xFF, 0xB4, 0x0E, 0xFA,
-        0xA3, 0xDB, 0x26, 0x46, 0xCE, 0x60, 0x7F, 0x78, 0xFF, 0xFF, 0xCA, 0x60, 0x81, 0x78, 0xFF, 0xFF,
-        0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF, 0x00, 0x66,
-        0x46, 0x46, 0xCA, 0x60, 0x81, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0x04, 0x64, 0x0F, 0x60, 0x90, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0x00, 0x66,
-        0x46, 0x46, 0xCA, 0x60, 0x81, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x58, 0x63, 0x60, 0x47, 0x01, 0x27,
-        0x64, 0x63, 0x61, 0x5C, 0x18, 0x60, 0x0F, 0xF9, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41,
-        0xBD, 0xD0, 0x00, 0xF4, 0x04, 0xF8, 0x83, 0xFA, 0x82, 0xF8, 0xA6, 0x46, 0x02, 0xB0, 0x5E, 0x63,
-        0x04, 0x03, 0x64, 0x63, 0x03, 0xB0, 0x02, 0x3A, 0x6C, 0x63, 0x3F, 0xF2, 0xBD, 0xD0, 0xBD, 0xD0,
-        0x64, 0x45, 0x64, 0x41, 0xBD, 0xD0, 0xA6, 0x46, 0x07, 0xF8, 0x86, 0xFA, 0x85, 0xF8, 0x60, 0x47,
-        0x08, 0xFA, 0x18, 0x60, 0x0F, 0xF1, 0x26, 0x46, 0x64, 0x41, 0x2F, 0x58, 0xFF, 0xFF, 0x2A, 0xF2,
-        0x2C, 0xF0, 0x31, 0x40, 0x20, 0x26, 0x09, 0x00, 0x60, 0x40, 0xA4, 0x36, 0x21, 0x00, 0x08, 0x26,
-        0x07, 0x00, 0x7D, 0xF1, 0xCF, 0x60, 0x47, 0x78, 0xFF, 0xFF, 0xCF, 0x60, 0x77, 0x78, 0xFF, 0xFF,
-        0x64, 0x40, 0x01, 0x26, 0x12, 0x00, 0x3F, 0xF0, 0x32, 0x40, 0x10, 0x2A, 0x0A, 0x00, 0x64, 0x41,
-        0x60, 0x40, 0x40, 0x27, 0x06, 0x00, 0xCD, 0x81, 0xDD, 0x81, 0x03, 0x03, 0x02, 0x03, 0x01, 0x61,
-        0x01, 0x00, 0x00, 0x61, 0x60, 0x40, 0x18, 0x3A, 0x03, 0x00, 0xCF, 0x60, 0xC9, 0x78, 0xFF, 0xFF,
-        0x07, 0xF2, 0x87, 0xF1, 0x66, 0x45, 0xD0, 0x80, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x03, 0x03,
-        0xFF, 0xFF, 0x02, 0x26, 0x07, 0x00, 0xDD, 0x60, 0x58, 0x4F, 0x90, 0x78, 0xFF, 0xFF, 0xCF, 0x60,
-        0xC5, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xA4, 0x3A, 0x07, 0x00, 0xDF, 0x60,
-        0x58, 0x4F, 0xE3, 0x78, 0xFF, 0xFF, 0xCF, 0x60, 0xC5, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0xCE, 0x60,
-        0x58, 0x4F, 0x54, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x06, 0x65, 0xD4, 0x80, 0x60, 0x43, 0x5B, 0x04,
-        0x00, 0xF4, 0xAA, 0x60, 0xAA, 0x65, 0x09, 0xF2, 0x0A, 0xF0, 0xD4, 0x80, 0x03, 0x64, 0x53, 0x02,
-        0xD0, 0x80, 0x00, 0x64, 0x0B, 0xF0, 0x4F, 0x02, 0x64, 0x45, 0xD4, 0x80, 0xF8, 0x7F, 0x08, 0x02,
-        0x0C, 0xF0, 0x26, 0x46, 0x64, 0x45, 0x23, 0xF0, 0x20, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x0B, 0x00,
-        0xD4, 0x80, 0x1D, 0x60, 0x60, 0x64, 0x11, 0x02, 0x0C, 0xF0, 0x26, 0x46, 0x64, 0x45, 0x23, 0xF0,
-        0x40, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x65, 0x44, 0x88, 0x3A, 0x35, 0x00, 0x77, 0x37, 0x03, 0x00,
-        0x78, 0x37, 0x01, 0x00, 0x8E, 0x37, 0x00, 0x61, 0x2E, 0x00, 0xD4, 0x80, 0x08, 0x65, 0x2B, 0x02,
-        0xD7, 0x80, 0x01, 0x60, 0x00, 0x64, 0x0C, 0xF0, 0x26, 0x04, 0xD0, 0x80, 0x0D, 0xF0, 0x23, 0x02,
-        0x26, 0x46, 0x14, 0xF2, 0x01, 0x63, 0x02, 0xA8, 0x64, 0x47, 0x1D, 0x03, 0x7F, 0xB4, 0xFD, 0xA0,
-        0x06, 0x03, 0x19, 0x07, 0x23, 0xF0, 0x60, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x6B, 0x00, 0x26, 0x46,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x2A, 0x07, 0x00, 0x60, 0x40, 0x48, 0x36, 0x04, 0x00,
-        0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0xE8, 0x60, 0x58, 0x4F, 0xEF, 0x78, 0xFF, 0xFF,
-        0xCF, 0x60, 0xC5, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x61, 0x40, 0x01, 0x2A, 0x09, 0x00, 0x25, 0x60,
-        0xFE, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0xCF, 0x60, 0xC9, 0x78, 0xFF, 0xFF,
-        0xDF, 0x60, 0x58, 0x4F, 0xE3, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0x36,
-        0x88, 0x00, 0xCF, 0x60, 0xD6, 0x78, 0xFF, 0xFF, 0xCF, 0x60, 0xC5, 0x78, 0xFF, 0xFF, 0x60, 0x40,
-        0x0C, 0x26, 0x7F, 0x00, 0x64, 0x40, 0x01, 0x2A, 0x7C, 0x00, 0xB0, 0x3A, 0x05, 0x00, 0xD4, 0x60,
-        0x58, 0x4F, 0x5A, 0x78, 0xFF, 0xFF, 0x71, 0x00, 0x00, 0x3A, 0x05, 0x00, 0xD7, 0x60, 0x58, 0x4F,
-        0xCA, 0x78, 0xFF, 0xFF, 0x6A, 0x00, 0x20, 0x3A, 0x05, 0x00, 0xD7, 0x60, 0x58, 0x4F, 0xCA, 0x78,
-        0xFF, 0xFF, 0x63, 0x00, 0xC0, 0x3A, 0x05, 0x00, 0xDC, 0x60, 0x58, 0x4F, 0xFE, 0x78, 0xFF, 0xFF,
-        0x5C, 0x00, 0xA0, 0x3A, 0x05, 0x00, 0xDD, 0x60, 0x58, 0x4F, 0x5B, 0x78, 0xFF, 0xFF, 0x55, 0x00,
-        0x40, 0x3A, 0x0D, 0x00, 0xE3, 0x60, 0x58, 0x4F, 0xC3, 0x78, 0xFF, 0xFF, 0x4E, 0x00, 0x60, 0x40,
-        0x50, 0x3A, 0x05, 0x00, 0xED, 0x60, 0x58, 0x4F, 0xEB, 0x78, 0xFF, 0xFF, 0x46, 0x00, 0xCF, 0x60,
-        0xC9, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x2A, 0x07, 0x00,
-        0x60, 0x40, 0x48, 0x36, 0x04, 0x00, 0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0x2A, 0xF2,
-        0x3B, 0xF0, 0x60, 0x40, 0x40, 0x2B, 0x04, 0x00, 0x64, 0x40, 0x20, 0x2B, 0x01, 0x00, 0x03, 0x00,
-        0xCF, 0x60, 0xB9, 0x78, 0xFF, 0xFF, 0x22, 0xF2, 0xFF, 0xFF, 0x04, 0xB4, 0xFF, 0xFF, 0xF8, 0x03,
-        0x23, 0xF2, 0x07, 0xF4, 0xBB, 0xF0, 0x26, 0x46, 0xA4, 0x84, 0xFF, 0xFF, 0x60, 0x40, 0x2F, 0x26,
-        0x20, 0x00, 0xC9, 0x60, 0x58, 0x4F, 0xCF, 0x78, 0xFF, 0xFF, 0x64, 0x40, 0x18, 0x36, 0x09, 0x00,
-        0x04, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0xCF, 0x60, 0xC9, 0x78,
-        0xFF, 0xFF, 0x1F, 0x60, 0x04, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0x0C, 0x00, 0x66, 0x44, 0x00, 0xA8, 0xFF, 0xFF,
-        0x0A, 0x03, 0x26, 0x46, 0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78,
-        0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xCE, 0x60, 0x35, 0x78, 0xFF, 0xFF, 0x14, 0xF2, 0x00, 0x7C,
-        0x3E, 0xF8, 0xCC, 0x84, 0xCC, 0x84, 0x18, 0x03, 0x5C, 0x02, 0x11, 0xF2, 0x07, 0xFA, 0xAB, 0xF3,
-        0x19, 0xFA, 0xD0, 0x60, 0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xE0, 0x64, 0x0F, 0x60,
-        0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE,
-        0xF2, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x8D, 0x00, 0xA2, 0xFF, 0x46, 0x45, 0xB6, 0x60, 0x58, 0x4E,
-        0xBB, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x11, 0x03, 0x7E, 0x63, 0x46, 0x4B, 0x25, 0x46, 0xA3, 0xD0,
-        0x2B, 0x46, 0xA3, 0xD8, 0xFB, 0x1F, 0x89, 0xFC, 0x8A, 0xFC, 0x88, 0xFC, 0x05, 0x18, 0x64, 0x46,
-        0x01, 0xF0, 0x10, 0x67, 0xC0, 0x84, 0x01, 0xFA, 0x08, 0xFE, 0x2B, 0x46, 0x46, 0x46, 0x25, 0x46,
-        0xD0, 0x60, 0x58, 0x4E, 0x86, 0x78, 0xFF, 0xFF, 0x13, 0x60, 0x43, 0xF3, 0x87, 0xF3, 0x00, 0xA8,
-        0x07, 0xFA, 0x0E, 0x03, 0x1E, 0x60, 0xDA, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x25, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF3, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x0D, 0x00,
-        0x1E, 0x60, 0xCE, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xF4, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x26, 0x44, 0x00, 0xA8, 0xC1, 0xFE,
-        0x48, 0x03, 0x26, 0x46, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x2A, 0x07, 0x00, 0x60, 0x40,
-        0x48, 0x36, 0x04, 0x00, 0xD2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xD2, 0xFB, 0x26, 0x46, 0x2A, 0xF2,
-        0x3B, 0xF0, 0x60, 0x40, 0x40, 0x2B, 0x06, 0x00, 0xC0, 0x60, 0x00, 0x64, 0x64, 0x40, 0x20, 0x2B,
-        0x01, 0x00, 0x03, 0x00, 0xD0, 0x60, 0x73, 0x78, 0xFF, 0xFF, 0x22, 0xF2, 0xFF, 0xFF, 0x04, 0xB4,
-        0xFF, 0xFF, 0xF8, 0x03, 0x23, 0xF2, 0x07, 0xF4, 0xBB, 0xF0, 0x26, 0x46, 0xA4, 0x84, 0xFF, 0xFF,
-        0x60, 0x40, 0x2F, 0x26, 0x07, 0x00, 0xC9, 0x60, 0x58, 0x4F, 0xCF, 0x78, 0xFF, 0xFF, 0x64, 0x40,
-        0x18, 0x36, 0x09, 0x00, 0x04, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0xCF, 0x60, 0xC9, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0x04, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0xF1, 0x64, 0x3B, 0x42,
-        0x4A, 0xDB, 0x00, 0x66, 0x46, 0x46, 0xCF, 0x60, 0xC5, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x82, 0x60,
-        0xFF, 0x65, 0xA4, 0x87, 0x02, 0xBF, 0x2A, 0xFA, 0x1C, 0xF2, 0x13, 0xFA, 0x32, 0xF2, 0x2C, 0xFA,
-        0x33, 0xF2, 0x2D, 0xFA, 0x34, 0xF2, 0x2E, 0xFA, 0x2F, 0xF2, 0x32, 0xFA, 0x30, 0xF2, 0x33, 0xFA,
-        0x31, 0xF2, 0x34, 0xFA, 0x66, 0xF3, 0x2F, 0xFA, 0x67, 0xF3, 0x30, 0xFA, 0x68, 0xF3, 0x31, 0xFA,
-        0x2E, 0x58, 0xFF, 0xFF, 0xD3, 0x60, 0x59, 0x64, 0x08, 0x60, 0x26, 0xFB, 0x2F, 0x58, 0xFF, 0xFF,
-        0xB1, 0xF3, 0x12, 0x60, 0x2C, 0x63, 0xF7, 0xA0, 0xFF, 0xFF, 0x02, 0x06, 0x00, 0x64, 0xB1, 0xFB,
-        0xB1, 0xF3, 0xB1, 0xFB, 0x01, 0xA4, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0x2A, 0xA3, 0xFB, 0x01,
-        0x63, 0x46, 0x10, 0x60, 0xA6, 0x63, 0x0E, 0x61, 0x60, 0xFE, 0xA6, 0xD1, 0xDE, 0x86, 0x01, 0x64,
-        0x64, 0x40, 0x7F, 0x36, 0x00, 0x64, 0xA3, 0xDB, 0xDB, 0x83, 0xA3, 0xD9, 0xCD, 0x81, 0x04, 0xA3,
-        0xF4, 0x02, 0x11, 0x60, 0x16, 0x63, 0x1C, 0x61, 0xA6, 0xD1, 0xDE, 0x86, 0x01, 0x64, 0x64, 0x40,
-        0x7F, 0x36, 0x00, 0x64, 0xA3, 0xDB, 0xDB, 0x83, 0xA3, 0xD9, 0xCD, 0x81, 0x06, 0xA3, 0xF4, 0x02,
-        0x20, 0xFE, 0x13, 0x60, 0x7F, 0xF3, 0x13, 0x60, 0x2D, 0xFB, 0x1E, 0x63, 0x26, 0x60, 0x64, 0x61,
-        0x27, 0x60, 0x08, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x13, 0x60, 0x95, 0xF3, 0x13, 0x60,
-        0x43, 0xFB, 0x13, 0x60, 0x96, 0xF3, 0x13, 0x60, 0x44, 0xFB, 0x13, 0x60, 0x9C, 0xF3, 0x13, 0x60,
-        0x4A, 0xFB, 0x13, 0x60, 0x9D, 0xF3, 0x13, 0x60, 0x4B, 0xFB, 0x13, 0x60, 0x9E, 0xF3, 0x13, 0x60,
-        0x4C, 0xFB, 0x13, 0x60, 0x9F, 0xF3, 0x13, 0x60, 0x4D, 0xFB, 0x13, 0x60, 0x97, 0xF3, 0x13, 0x60,
-        0x45, 0xFB, 0x13, 0x60, 0x98, 0xF3, 0x13, 0x60, 0x46, 0xFB, 0x13, 0x60, 0x99, 0xF3, 0x13, 0x60,
-        0x47, 0xFB, 0x26, 0x60, 0xB0, 0x63, 0xBD, 0xD1, 0xCB, 0xF9, 0x66, 0xF9, 0xBD, 0xD1, 0xCC, 0xF9,
-        0x67, 0xF9, 0xA3, 0xD1, 0xCD, 0xF9, 0x68, 0xF9, 0x01, 0x64, 0x6A, 0xFB, 0x13, 0x60, 0x51, 0xF3,
-        0xC4, 0xFB, 0x00, 0x63, 0x4A, 0xFD, 0x5A, 0xFD, 0x6B, 0xFD, 0x6C, 0xFD, 0x13, 0x60, 0x45, 0xF3,
-        0x15, 0x60, 0xCB, 0xF1, 0xFF, 0x60, 0xE7, 0x65, 0x32, 0x41, 0xA5, 0x81, 0xFF, 0xA0, 0xFF, 0xFF,
-        0x01, 0x03, 0x06, 0x00, 0x13, 0x60, 0x47, 0xF3, 0x08, 0xB9, 0x60, 0x40, 0x01, 0x26, 0x10, 0xB9,
-        0x41, 0x52, 0x87, 0xF5, 0x32, 0x44, 0x10, 0xB0, 0xFF, 0xFF, 0x0A, 0x03, 0x14, 0x60, 0x15, 0xF3,
-        0x06, 0xF0, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF, 0xB0, 0x84, 0x06, 0xFA,
-        0x13, 0x60, 0x45, 0xF3, 0x22, 0x7C, 0xFF, 0xA0, 0xFD, 0xA0, 0x05, 0x06, 0x03, 0x03, 0xFE, 0xA0,
-        0x04, 0x7C, 0x01, 0x02, 0x3A, 0xF8, 0x13, 0x60, 0x4C, 0xF1, 0x20, 0x44, 0x20, 0xB5, 0x64, 0x41,
-        0x00, 0xB9, 0xD4, 0x84, 0x08, 0x28, 0x20, 0xBC, 0x40, 0x40, 0x15, 0x60, 0xCB, 0xF3, 0x30, 0x60,
-        0x0E, 0x63, 0xF0, 0x84, 0xF0, 0x84, 0xF0, 0x84, 0x02, 0xB5, 0xF0, 0x84, 0xF0, 0x84, 0x03, 0xB4,
-        0x65, 0x5C, 0xA3, 0xD9, 0x02, 0xA8, 0x18, 0x60, 0x08, 0xFB, 0x15, 0x02, 0x00, 0x60, 0xC8, 0x64,
-        0x18, 0x60, 0x09, 0xFB, 0x18, 0x60, 0x0D, 0xFB, 0x07, 0x60, 0xD0, 0x64, 0x18, 0x60, 0x0A, 0xFB,
-        0x18, 0x60, 0x0E, 0xFB, 0x01, 0x60, 0x90, 0x64, 0x18, 0x60, 0x0B, 0xFB, 0x00, 0x60, 0x64, 0x64,
-        0x18, 0x60, 0x0C, 0xFB, 0x06, 0x00, 0x64, 0x64, 0x18, 0x60, 0x0B, 0xFB, 0x64, 0x64, 0x18, 0x60,
-        0x0C, 0xFB, 0xB1, 0xF1, 0x10, 0x60, 0xA0, 0x63, 0x2F, 0x18, 0x60, 0x40, 0x01, 0x27, 0x12, 0x00,
-        0xCC, 0x84, 0x06, 0xA3, 0xFD, 0x02, 0xA3, 0xD3, 0x10, 0x60, 0xA6, 0x63, 0x25, 0x1B, 0x10, 0x60,
-        0xF8, 0x65, 0xA3, 0xD3, 0x06, 0xA3, 0xD7, 0x80, 0x02, 0x1B, 0xFB, 0x04, 0x1D, 0x00, 0xF8, 0xA3,
-        0xA3, 0xD3, 0x18, 0x00, 0x11, 0x60, 0x14, 0x63, 0x11, 0x60, 0xF4, 0x65, 0xA3, 0xD1, 0x08, 0xA3,
-        0xD0, 0x80, 0xD7, 0x80, 0x02, 0x03, 0xFA, 0x04, 0x0F, 0x00, 0xFA, 0xA3, 0xA3, 0xD3, 0x11, 0x60,
-        0x16, 0x63, 0x0A, 0x1B, 0xA3, 0xD3, 0x08, 0xA3, 0xD7, 0x80, 0x02, 0x1B, 0xFB, 0x04, 0x04, 0x00,
-        0xF6, 0xA3, 0xA3, 0xD3, 0xC5, 0xFB, 0x64, 0xFB, 0x27, 0x60, 0x34, 0x64, 0x26, 0x60, 0x90, 0x63,
-        0xA0, 0xD1, 0xA3, 0xD9, 0x64, 0x41, 0x58, 0xD1, 0x5B, 0xD9, 0x64, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x01, 0x2B, 0x03, 0x00, 0xD1, 0x60, 0xE9, 0x78, 0xFF, 0xFF, 0x91, 0xFA, 0x61, 0x44, 0xEF, 0x60,
-        0x58, 0x4E, 0xAB, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x15, 0x60, 0xBC, 0xF3, 0x3F, 0x40, 0x01, 0x27,
-        0x08, 0x00, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xEE, 0x60, 0x58, 0x4E, 0x26, 0x78, 0xFF, 0xFF,
-        0x06, 0x00, 0x0F, 0x65, 0xA4, 0x84, 0xEE, 0x60, 0x58, 0x4E, 0x26, 0x78, 0xFF, 0xFF, 0x00, 0x65,
-        0xEE, 0x60, 0x58, 0x4E, 0xC6, 0x78, 0xFF, 0xFF, 0xEF, 0x60, 0x58, 0x4E, 0x10, 0x78, 0xFF, 0xFF,
-        0x15, 0x00, 0x11, 0xF8, 0x64, 0x44, 0xEF, 0x60, 0x58, 0x4E, 0xAB, 0x78, 0xFF, 0xFF, 0x12, 0xFA,
-        0x15, 0x60, 0xBD, 0xF3, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xEE, 0x60, 0x58, 0x4E, 0x26, 0x78,
-        0xFF, 0xFF, 0xFF, 0x65, 0xEE, 0x60, 0x58, 0x4E, 0xC6, 0x78, 0xFF, 0xFF, 0xB5, 0xF1, 0x09, 0x60,
-        0x2A, 0x64, 0xD0, 0x80, 0x03, 0x64, 0x01, 0x06, 0x06, 0x64, 0xAE, 0xFB, 0x46, 0x48, 0xC3, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x05, 0x3A, 0x03, 0x00, 0x14, 0x60, 0x00, 0x66, 0x11, 0x00, 0x04, 0x3A,
-        0x03, 0x00, 0x13, 0x60, 0xF4, 0x66, 0x0C, 0x00, 0x03, 0x3A, 0x03, 0x00, 0x13, 0x60, 0xE8, 0x66,
-        0x07, 0x00, 0x02, 0x3A, 0x03, 0x00, 0x13, 0x60, 0xDC, 0x66, 0x02, 0x00, 0x13, 0x60, 0xD0, 0x66,
-        0x60, 0xFE, 0xA6, 0xD3, 0xDE, 0x86, 0x10, 0x60, 0x5F, 0xFB, 0xA6, 0xD3, 0xDE, 0x86, 0x21, 0x60,
-        0x2F, 0x63, 0xA3, 0xDB, 0x21, 0x60, 0xA7, 0x63, 0xA3, 0xDB, 0xA6, 0xD3, 0xDE, 0x86, 0x10, 0x60,
-        0x5E, 0xFB, 0xA6, 0xD3, 0xDE, 0x86, 0x20, 0x60, 0xBF, 0x63, 0xA3, 0xDB, 0x20, 0xFE, 0xA6, 0xD3,
-        0xDA, 0x86, 0x60, 0x43, 0x1F, 0xB3, 0x63, 0x5C, 0x1F, 0x60, 0x00, 0xB4, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xB0, 0x85, 0x10, 0x60, 0x95, 0xF3, 0xFF, 0xFF, 0xFC, 0x60, 0x00, 0xB4, 0xB4, 0x84,
-        0xA2, 0xDB, 0x10, 0x60, 0xD1, 0xFB, 0x21, 0x60, 0xCA, 0x63, 0xA3, 0xD3, 0xA6, 0xD1, 0xDE, 0x86,
-        0x80, 0x60, 0x7F, 0xB5, 0x64, 0x44, 0xE8, 0x84, 0x7F, 0x60, 0x80, 0xB4, 0xB4, 0x84, 0xA3, 0xDB,
-        0x60, 0xFE, 0xA6, 0xD3, 0xDE, 0x86, 0x10, 0x60, 0x62, 0xFB, 0x20, 0xFE, 0x10, 0x60, 0x2A, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB,
-        0xD2, 0x60, 0x5E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x64, 0xF1, 0x0F, 0x60,
-        0x9D, 0xF9, 0x0C, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x44, 0x01, 0x65, 0x34, 0x80,
-        0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD2, 0x60, 0x82, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x64, 0xF1, 0x0F, 0x60,
-        0x9D, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x16, 0xFB, 0xD2, 0x60, 0x97, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x08, 0x60, 0x11, 0xF1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xBE, 0xFE, 0x08, 0x60, 0x11, 0xF1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x20, 0x40, 0x20, 0x2A, 0x04, 0x00, 0xF0, 0x60, 0x58, 0x4E,
-        0x66, 0x78, 0xFF, 0xFF, 0x36, 0x40, 0x08, 0x3A, 0x6A, 0x00, 0x36, 0x40, 0x08, 0x3A, 0x05, 0x00,
-        0x10, 0x60, 0x42, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x04, 0x00, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x4E, 0xF3, 0xFF, 0xFF, 0x1D, 0x1B, 0x13, 0x60, 0x54, 0xF3, 0xC7, 0xFB, 0x26, 0x60,
-        0x16, 0x65, 0x26, 0x60, 0xB8, 0x61, 0x26, 0x60, 0x14, 0x64, 0x20, 0x63, 0x59, 0xD1, 0x58, 0xD9,
-        0xA5, 0xD9, 0xDA, 0x85, 0xFB, 0x1F, 0x00, 0x60, 0x01, 0x64, 0x08, 0x60, 0x22, 0xFB, 0xD3, 0x60,
-        0x3C, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x36, 0x40, 0x08, 0x3A, 0x41, 0x00, 0xE7, 0x60, 0xC5, 0x78,
-        0xFF, 0xFF, 0x27, 0x60, 0x3E, 0x63, 0x60, 0x41, 0x00, 0x62, 0xCD, 0x81, 0x04, 0xA2, 0xFD, 0x02,
-        0x2C, 0x60, 0x3E, 0x61, 0xFC, 0xA2, 0x62, 0x45, 0xC5, 0x81, 0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x85,
-        0xC7, 0x83, 0xFE, 0xA5, 0x88, 0xF3, 0xFF, 0xFF, 0xC4, 0x84, 0x66, 0x45, 0x60, 0x46, 0xBD, 0xD1,
-        0x03, 0xF8, 0xBD, 0xD1, 0x04, 0xF8, 0xA3, 0xD1, 0x05, 0xF8, 0x06, 0xF2, 0xFF, 0xFF, 0x02, 0x7E,
-        0x06, 0xFA, 0x64, 0xF3, 0x61, 0x43, 0x60, 0x40, 0x01, 0x27, 0x02, 0xA3, 0xA3, 0xD1, 0x0F, 0xF8,
-        0x16, 0x64, 0x12, 0xFA, 0x01, 0x64, 0x11, 0xFA, 0x66, 0x5C, 0xC1, 0x60, 0x58, 0x4E, 0x93, 0x78,
-        0xFF, 0xFF, 0x66, 0x43, 0x32, 0x40, 0x08, 0x2A, 0x0A, 0x00, 0x14, 0x60, 0x15, 0xF3, 0x06, 0xF0,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF, 0xB0, 0x84, 0x06, 0xFA, 0xC5, 0xFE,
-        0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x30, 0x64, 0x08, 0x60, 0x16, 0xFB,
-        0xD2, 0x60, 0xB5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x03, 0x64, 0x08, 0x60, 0x22, 0xFB, 0xD2, 0x60, 0xB5, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x42, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x0F, 0x4E, 0xE1, 0x60, 0x58, 0x4F, 0xA9, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x4E, 0xDF, 0x60,
-        0x58, 0x4F, 0x0F, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x4E, 0xDE, 0x60, 0x58, 0x4F, 0x9A, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x4E, 0xDD, 0x60, 0x58, 0x4F, 0xFB, 0x78, 0xFF, 0xFF, 0x0E, 0x4F,
-        0xD5, 0x01, 0x4E, 0xF3, 0x7D, 0xF5, 0x60, 0x40, 0xFF, 0x22, 0x0A, 0x00, 0x88, 0xF1, 0xCC, 0x84,
-        0xE0, 0x84, 0xC0, 0x86, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x7D, 0xF5, 0x07, 0x00,
-        0x08, 0x60, 0x24, 0xF1, 0x00, 0x60, 0x11, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x4E, 0xF3,
-        0x66, 0x40, 0xFF, 0x22, 0x05, 0x00, 0xFF, 0x22, 0x39, 0x00, 0xD4, 0x60, 0x0C, 0x78, 0xFF, 0xFF,
-        0x02, 0x64, 0x69, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x69, 0xF3, 0x00, 0x65, 0xD4, 0x80, 0x4E, 0xF3,
-        0x0E, 0x03, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x16, 0xFB, 0xD3, 0x60, 0x7C, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x16, 0xFB, 0xD3, 0x60, 0x8F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xD3, 0xF3,
-        0xFF, 0xFF, 0xFE, 0xB4, 0xD3, 0xFB, 0x1F, 0x60, 0x3A, 0x62, 0x06, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0x20, 0x44, 0x01, 0xB5, 0x54, 0x80, 0xDA, 0xFE, 0xBE, 0xFE, 0x87, 0xF1, 0x02, 0x64,
-        0x86, 0xF3, 0xC0, 0x83, 0x40, 0x48, 0x75, 0xFD, 0xE7, 0x60, 0x58, 0x4E, 0x81, 0x78, 0xFF, 0xFF,
-        0x28, 0x44, 0x4C, 0x88, 0x75, 0xF3, 0x02, 0x65, 0xC4, 0x83, 0xF5, 0x02, 0x1E, 0x60, 0x58, 0x4E,
-        0xB9, 0x78, 0xFF, 0xFF, 0x17, 0x60, 0x06, 0x64, 0x0B, 0x60, 0x82, 0xFB, 0x4A, 0xDF, 0x01, 0x60,
-        0xFE, 0x63, 0x15, 0x60, 0x00, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F, 0x7D, 0xF1, 0x1E, 0x60,
-        0xE0, 0x61, 0x64, 0x40, 0xFF, 0x26, 0x38, 0x00, 0xD4, 0x60, 0x58, 0x4E, 0x0F, 0x78, 0xFF, 0xFF,
-        0x1E, 0x60, 0xCE, 0x61, 0xD4, 0x60, 0x58, 0x4E, 0x0F, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xD4, 0x61,
-        0xD4, 0x60, 0x58, 0x4E, 0x0F, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xE6, 0x61, 0xD4, 0x60, 0x58, 0x4E,
-        0x0F, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xEC, 0x61, 0xD4, 0x60, 0x58, 0x4E, 0x0F, 0x78, 0xFF, 0xFF,
-        0x1E, 0x60, 0xF8, 0x61, 0xD4, 0x60, 0x58, 0x4E, 0x0F, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0x04, 0x61,
-        0xD4, 0x60, 0x58, 0x4E, 0x0F, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xF2, 0x61, 0xD4, 0x60, 0x58, 0x4E,
-        0x0F, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xDA, 0x61, 0xD4, 0x60, 0x58, 0x4E, 0x3A, 0x78, 0xFF, 0xFF,
-        0x00, 0x64, 0x08, 0x60, 0x15, 0xFB, 0x5A, 0xDB, 0xC5, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xA1, 0xD3,
-        0x0E, 0x57, 0x23, 0x00, 0x0E, 0xF2, 0x44, 0x4C, 0x80, 0xB0, 0x10, 0xB0, 0x0A, 0x03, 0x00, 0x64,
-        0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x13, 0x00, 0x12, 0x02, 0xF0, 0x37, 0x09, 0x00, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80,
-        0xA2, 0xFF, 0x8F, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0x8F, 0xFB, 0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B,
-        0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF, 0x2C, 0x44, 0xAC, 0x86, 0x09, 0xF0, 0xDA, 0x02,
-        0x37, 0x58, 0xFF, 0xFF, 0xA1, 0xD3, 0x0E, 0x57, 0x18, 0x00, 0x0E, 0xF2, 0x44, 0x4C, 0x80, 0xB0,
-        0x10, 0xB0, 0x0A, 0x03, 0x00, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x08, 0x00, 0x07, 0x02, 0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B,
-        0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF, 0x2C, 0x44, 0xAC, 0x86, 0x09, 0xF0, 0xE5, 0x02,
-        0x37, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xB0, 0x64, 0x2A, 0xFA, 0x2F, 0xF2,
-        0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0xCC, 0xF3,
-        0x30, 0xFA, 0xCD, 0xF3, 0x31, 0xFA, 0x66, 0xF3, 0x32, 0xFA, 0x67, 0xF3, 0x33, 0xFA, 0x68, 0xF3,
-        0x34, 0xFA, 0xAB, 0xF1, 0x19, 0xF8, 0x06, 0x63, 0x3F, 0xFC, 0x1C, 0xF2, 0x13, 0xFA, 0x00, 0x64,
-        0x3E, 0xFA, 0x07, 0xF2, 0x87, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x0C, 0x03, 0x60, 0x46,
-        0x06, 0xF2, 0x26, 0x46, 0x01, 0xB0, 0xFF, 0xFF, 0x03, 0x02, 0xD6, 0x60, 0x40, 0x78, 0xFF, 0xFF,
-        0xD7, 0x60, 0x92, 0x78, 0xFF, 0xFF, 0x00, 0xF4, 0x0A, 0xF2, 0x09, 0xF2, 0xFF, 0xA0, 0x00, 0xA0,
-        0x13, 0x02, 0xFF, 0xA0, 0x04, 0x03, 0x08, 0x03, 0xD4, 0x60, 0xAF, 0x78, 0xFF, 0xFF, 0x02, 0x64,
-        0x55, 0xFB, 0xD4, 0x60, 0xBA, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0x32, 0x40, 0x08, 0x2A, 0x0F, 0x00,
-        0x55, 0xFD, 0xD4, 0x60, 0xBA, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x0A, 0xF2, 0x0E, 0x63,
-        0x01, 0xA4, 0x0A, 0xFA, 0x0B, 0xFC, 0x43, 0x59, 0xD7, 0x60, 0x6C, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x00, 0xF4, 0x0A, 0xF2, 0x0D, 0x63, 0x01, 0xA4, 0x0A, 0xFA, 0x0B, 0xFC, 0x43, 0x59, 0xD7, 0x60,
-        0x6C, 0x78, 0xFF, 0xFF, 0x87, 0xF5, 0x00, 0xF2, 0x26, 0x46, 0x00, 0xA0, 0x2E, 0xF0, 0x37, 0x03,
-        0x66, 0x41, 0x15, 0x60, 0x02, 0x65, 0x64, 0x47, 0x00, 0x7F, 0x87, 0xF1, 0xE0, 0x84, 0x44, 0xD3,
-        0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46,
-        0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC,
-        0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46,
-        0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46, 0x86, 0xF1,
-        0x17, 0x60, 0x02, 0x61, 0xA1, 0xD3, 0xDA, 0x81, 0xD0, 0x80, 0xDC, 0x9C, 0x05, 0x05, 0xA1, 0xD3,
-        0x4A, 0xD9, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0xD6, 0x60, 0x09, 0x78, 0xFF, 0xFF, 0x0B, 0x60,
-        0x81, 0xF3, 0xFF, 0xFF, 0x62, 0x18, 0x17, 0x60, 0x02, 0x64, 0x04, 0xA5, 0xA0, 0xD1, 0x72, 0x44,
-        0xFF, 0xB4, 0x64, 0x40, 0xE0, 0x22, 0x1F, 0xB4, 0x64, 0x40, 0xF8, 0x22, 0x07, 0xB4, 0x02, 0x00,
-        0x03, 0x04, 0xD0, 0x84, 0xD0, 0x80, 0xFC, 0x01, 0xE0, 0x84, 0x44, 0xD3, 0xFF, 0xFF, 0x60, 0x43,
-        0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8,
-        0x07, 0x1B, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00,
-        0x65, 0x46, 0x00, 0xF8, 0x87, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80,
-        0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E,
-        0x06, 0xFA, 0x61, 0x46, 0x2E, 0xF0, 0x66, 0x41, 0x15, 0x60, 0x02, 0x65, 0x64, 0x47, 0x00, 0x7F,
-        0x87, 0xF1, 0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF,
-        0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43,
-        0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43,
-        0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8,
-        0x60, 0x43, 0x61, 0x46, 0xD6, 0x60, 0x09, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x02, 0x61, 0xB5, 0x60,
-        0x58, 0x4D, 0xA2, 0x78, 0xFF, 0xFF, 0x86, 0xF1, 0x72, 0x44, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF,
-        0x02, 0x04, 0xD0, 0x84, 0xFB, 0x01, 0xE0, 0x83, 0x87, 0xF3, 0x02, 0xA3, 0x43, 0x93, 0x66, 0x44,
-        0x00, 0xA8, 0x56, 0xFD, 0x3A, 0x03, 0x00, 0x64, 0x2B, 0xFA, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA,
-        0x66, 0x45, 0x63, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x85, 0xF2, 0x65, 0x46, 0x2C, 0xFA, 0x2D, 0xF8,
-        0xAE, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0x32, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0x33, 0xFA, 0xCD, 0xF3,
-        0x31, 0xFA, 0x34, 0xFA, 0xAB, 0xF1, 0x19, 0xF8, 0xFF, 0x67, 0x0E, 0xFA, 0x66, 0x41, 0x43, 0x49,
-        0x29, 0x46, 0x92, 0xF0, 0x2C, 0x60, 0x26, 0x63, 0x47, 0xD3, 0x61, 0x46, 0x02, 0x63, 0x00, 0x7E,
-        0x13, 0xFA, 0x3F, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0x87, 0xF3, 0x07, 0xFA, 0x66, 0x41, 0x00, 0xF4,
-        0x05, 0x64, 0x09, 0xFA, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x61, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x56, 0xF3, 0xA3, 0xFF, 0x60, 0x43,
-        0xE7, 0x60, 0x58, 0x4E, 0x81, 0x78, 0xFF, 0xFF, 0x56, 0xF3, 0xFF, 0xFF, 0x40, 0x58, 0x03, 0x65,
-        0xE5, 0x60, 0x58, 0x4E, 0x51, 0x78, 0xFF, 0xFF, 0x56, 0xF3, 0x26, 0x46, 0x60, 0x43, 0x66, 0x41,
-        0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B,
-        0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46,
-        0x00, 0xF8, 0x87, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18,
-        0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA,
-        0x61, 0x46, 0x2E, 0xF0, 0x66, 0x41, 0x15, 0x60, 0x02, 0x65, 0x64, 0x47, 0x00, 0x7F, 0x87, 0xF1,
-        0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B,
-        0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0,
-        0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2,
-        0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43,
-        0x61, 0x46, 0x2C, 0xF2, 0x2D, 0xF0, 0xAE, 0xF2, 0x66, 0x45, 0x63, 0x46, 0x03, 0xFA, 0x04, 0xF8,
-        0x55, 0xF3, 0x85, 0xFA, 0xFF, 0xA0, 0x65, 0x46, 0x03, 0x03, 0xD7, 0x60, 0xAE, 0x78, 0xFF, 0xFF,
-        0x94, 0xF3, 0x66, 0x45, 0x63, 0x46, 0x1F, 0xFA, 0x65, 0x46, 0xBA, 0x65, 0x60, 0x44, 0xC4, 0x85,
-        0x01, 0x60, 0xFE, 0x61, 0x00, 0x64, 0x80, 0x63, 0xC7, 0x85, 0x94, 0x84, 0x59, 0xDB, 0xFC, 0x1F,
-        0x00, 0x60, 0x88, 0x64, 0x3F, 0xFA, 0x00, 0xF4, 0x02, 0x64, 0x0A, 0xFA, 0x00, 0x64, 0x0B, 0xFA,
-        0x80, 0x7F, 0x10, 0x7E, 0x0C, 0xFA, 0x1A, 0x65, 0x80, 0x61, 0x02, 0x60, 0x00, 0x63, 0x0F, 0x4E,
-        0xF8, 0x60, 0x58, 0x4F, 0x7A, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0xD7, 0x60, 0x80, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x23, 0xF0, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x00, 0xF4, 0x03, 0x03, 0xD7, 0x60,
-        0x2A, 0x78, 0xFF, 0xFF, 0x09, 0xF2, 0xFF, 0xFF, 0xFF, 0xA0, 0x00, 0xA0, 0x0C, 0x03, 0x03, 0x03,
-        0xD6, 0x60, 0xA7, 0x78, 0xFF, 0xFF, 0x0A, 0xF2, 0x26, 0x46, 0xFF, 0xA0, 0x87, 0xF4, 0x10, 0x02,
-        0xD7, 0x60, 0xAE, 0x78, 0xFF, 0xFF, 0x0A, 0xF2, 0xFF, 0xFF, 0xFF, 0xA0, 0xFD, 0xA0, 0x02, 0x03,
-        0x04, 0x03, 0x06, 0x00, 0xD6, 0x60, 0xE6, 0x78, 0xFF, 0xFF, 0xD6, 0x60, 0xF1, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x87, 0xF4, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18,
-        0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0x87, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2,
-        0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2,
-        0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x0B, 0x60, 0x82, 0xF3, 0xDA, 0x81, 0x60, 0x45,
-        0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85,
-        0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x17, 0x60, 0x04, 0x62, 0x65, 0x44, 0xA2, 0xDB,
-        0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0xD4, 0x60, 0xA4, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x87, 0xF4, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46,
-        0x81, 0xF8, 0x07, 0x1B, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9,
-        0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0x87, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF,
-        0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF,
-        0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x0B, 0x60, 0x82, 0xF3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80,
-        0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80,
-        0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x17, 0x60, 0x04, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3,
-        0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0xD4, 0x60, 0xAF, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x32, 0x44,
-        0x08, 0xB0, 0x87, 0xF4, 0x03, 0x02, 0xD4, 0x60, 0xAF, 0x78, 0xFF, 0xFF, 0xD6, 0x60, 0x18, 0x78,
-        0xFF, 0xFF, 0x32, 0x44, 0x26, 0x46, 0x08, 0xB0, 0x07, 0xF2, 0x03, 0x02, 0xD4, 0x60, 0xAF, 0x78,
-        0xFF, 0xFF, 0x60, 0x46, 0x1F, 0xF2, 0x26, 0x46, 0xBA, 0x65, 0x60, 0x44, 0xC4, 0x85, 0x01, 0x60,
-        0xFE, 0x61, 0x00, 0x64, 0x80, 0x63, 0xC7, 0x85, 0x94, 0x84, 0x59, 0xDB, 0xFC, 0x1F, 0x00, 0xF4,
-        0x01, 0x60, 0xFE, 0x61, 0x7E, 0x65, 0x18, 0x63, 0x5B, 0xD2, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80,
-        0xD7, 0x80, 0x18, 0x02, 0xF9, 0x02, 0x00, 0xF4, 0x02, 0x63, 0x0E, 0x65, 0x5B, 0xD2, 0x59, 0xD1,
-        0xFF, 0xFF, 0xD0, 0x80, 0xD7, 0x80, 0x0E, 0x02, 0xF9, 0x02, 0x26, 0x46, 0x07, 0xF4, 0x06, 0xF2,
-        0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x26, 0x46, 0x00, 0xF4, 0x04, 0x64, 0x0A, 0xFA, 0x00, 0x64,
-        0x0B, 0xFA, 0x56, 0x00, 0x26, 0x46, 0x87, 0xF4, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0,
-        0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0x87, 0xF3, 0x63, 0x45,
-        0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46,
-        0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x0B, 0x60, 0x82, 0xF3,
-        0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02,
-        0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x17, 0x60, 0x04, 0x62,
-        0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0x00, 0xF4, 0x04, 0x64,
-        0x0A, 0xFA, 0x0F, 0x64, 0x0B, 0xFA, 0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x41, 0x58, 0x26, 0x46,
-        0x2C, 0xF2, 0xA1, 0xDB, 0x2D, 0xF2, 0x59, 0xDB, 0x2E, 0xF2, 0x59, 0xDB, 0x03, 0x65, 0xE5, 0x60,
-        0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x03, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x51, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x87, 0xF3, 0x07, 0xFA, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0xF4, 0x0A, 0xF2, 0x09, 0xF2, 0xFF, 0xA0, 0x00, 0xA0, 0x06, 0x02,
-        0xFF, 0xA0, 0x07, 0x03, 0x09, 0x03, 0xD6, 0x60, 0xA7, 0x78, 0xFF, 0xFF, 0xD6, 0x60, 0x68, 0x78,
-        0xFF, 0xFF, 0xD7, 0x60, 0xB3, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x07, 0xF4, 0x06, 0xF2, 0x66, 0x43,
-        0x00, 0x7E, 0x06, 0xFA, 0x26, 0x46, 0xD6, 0x60, 0x18, 0x78, 0xFF, 0xFF, 0x63, 0x46, 0x06, 0xF2,
-        0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x26, 0x46, 0x87, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x02, 0x64,
-        0x0A, 0xFA, 0x00, 0x64, 0x0B, 0xFA, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x01, 0x61, 0x00, 0x60, 0x10, 0x7C, 0x2A, 0xF2, 0x0C, 0x60, 0x70, 0xFB,
-        0xFF, 0xB4, 0x16, 0x60, 0x83, 0xFB, 0x60, 0x40, 0x00, 0x36, 0x03, 0x00, 0x02, 0x61, 0x00, 0x60,
-        0x30, 0x7C, 0x41, 0x47, 0x2A, 0xF8, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2,
-        0x2E, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0xCD, 0xF3, 0x31, 0xFA, 0x66, 0xF3,
-        0x32, 0xFA, 0x67, 0xF3, 0x33, 0xFA, 0x68, 0xF3, 0x34, 0xFA, 0xAB, 0xF1, 0x19, 0xF8, 0x00, 0x7C,
-        0x3E, 0xF8, 0x1C, 0xF0, 0x13, 0xF8, 0x07, 0xF2, 0x87, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF,
-        0x03, 0x02, 0xDC, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x40, 0x4B, 0x01, 0x65, 0xEF, 0x60, 0x58, 0x4E,
-        0xDC, 0x78, 0xFF, 0xFF, 0xAB, 0x46, 0x06, 0xF2, 0xAB, 0x46, 0x00, 0xF4, 0x01, 0xB0, 0xFF, 0xFF,
-        0x03, 0x02, 0xDC, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x09, 0xF2, 0x16, 0x60, 0x84, 0xFB, 0x5A, 0x84,
-        0x00, 0x63, 0x60, 0x40, 0x20, 0x26, 0x02, 0xBB, 0x60, 0x40, 0x04, 0x27, 0x04, 0xBB, 0xAB, 0x46,
-        0x78, 0xFC, 0xAB, 0x46, 0xFF, 0xFF, 0x10, 0xB0, 0x80, 0x60, 0x00, 0x63, 0x0C, 0x03, 0x13, 0x60,
-        0x45, 0xF1, 0xFF, 0xFF, 0x64, 0x44, 0xFE, 0x26, 0x08, 0x00, 0x32, 0x40, 0x08, 0x26, 0x06, 0x00,
-        0xDC, 0x60, 0xB9, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x10, 0x2A, 0x00, 0x63, 0xAB, 0x46, 0x06, 0xF0,
-        0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0x63, 0x45, 0xB4, 0x84, 0x06, 0xFA, 0xAB, 0x46, 0x0A, 0xF0,
-        0x56, 0xF9, 0x24, 0xD9, 0x5A, 0x84, 0x01, 0x63, 0x32, 0x40, 0x10, 0x26, 0x10, 0xBB, 0x13, 0x60,
-        0x45, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0xFE, 0x26, 0x10, 0xBB, 0x15, 0x60, 0xDD, 0xF1, 0x63, 0x44,
-        0x20, 0xBC, 0xFB, 0x60, 0xFF, 0xB7, 0x64, 0x40, 0x10, 0x26, 0x04, 0xBC, 0x60, 0x47, 0x60, 0x43,
-        0x09, 0xFC, 0x27, 0x44, 0xFE, 0xA0, 0xFF, 0xFF, 0x03, 0x03, 0xD8, 0x60, 0xC8, 0x78, 0xFF, 0xFF,
-        0x18, 0x60, 0xD6, 0x64, 0x24, 0x43, 0x0B, 0xF0, 0xA0, 0xD9, 0xBD, 0xD9, 0x0C, 0xF0, 0x58, 0xD9,
-        0xBD, 0xD9, 0x0D, 0xF0, 0x58, 0xD9, 0xBD, 0xD9, 0x43, 0x44, 0x26, 0x46, 0x87, 0xF2, 0x3F, 0xF2,
-        0x41, 0x4B, 0x00, 0xF4, 0x60, 0x43, 0xF6, 0xA3, 0x00, 0x60, 0x1B, 0x61, 0x00, 0x60, 0x01, 0x65,
-        0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xEF, 0x60, 0x58, 0x4E, 0x79, 0x78, 0xFF, 0xFF, 0x00, 0xBB,
-        0xFF, 0xFF, 0x00, 0x02, 0x00, 0x64, 0x40, 0x4A, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3,
-        0xBD, 0xD3, 0x60, 0x41, 0xF0, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x20, 0xFE, 0x26, 0x46,
-        0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF6, 0xA3, 0x00, 0x60, 0x1B, 0x61, 0x00, 0x60, 0x32, 0x65,
-        0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xEF, 0x60, 0x58, 0x4E, 0x79, 0x78, 0xFF, 0xFF, 0x00, 0xBB,
-        0xFF, 0xFF, 0x0B, 0x03, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41,
-        0xF0, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x00, 0x00, 0x20, 0xFE, 0x30, 0x60, 0x20, 0x61,
-        0xA1, 0xD1, 0x82, 0xF3, 0x01, 0x60, 0x6E, 0x63, 0x60, 0x45, 0x2A, 0x44, 0x60, 0xFB, 0xA3, 0xD5,
-        0x65, 0x40, 0x01, 0x27, 0x5B, 0xD5, 0x65, 0x40, 0x01, 0x27, 0x59, 0xD1, 0x66, 0x41, 0xA0, 0x84,
-        0x24, 0x94, 0x2B, 0x46, 0x0F, 0xFA, 0x61, 0xFB, 0x16, 0x64, 0x12, 0xFA, 0x01, 0x64, 0x11, 0xFA,
-        0x66, 0x5C, 0xC1, 0x60, 0x58, 0x4E, 0x93, 0x78, 0xFF, 0xFF, 0xD9, 0x60, 0x28, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x87, 0xF2, 0x3F, 0xF2, 0x41, 0x4B, 0x00, 0xF4, 0x60, 0x43, 0xFC, 0xA3, 0x00, 0x60,
-        0x15, 0x61, 0x00, 0x60, 0x01, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xEF, 0x60, 0x58, 0x4E,
-        0x79, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x00, 0x02, 0x00, 0x64, 0x40, 0x4A, 0x60, 0xFE,
-        0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xF0, 0x60, 0x58, 0x4E, 0x27, 0x78,
-        0xFF, 0xFF, 0x20, 0xFE, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xFC, 0xA3, 0x00, 0x60,
-        0x15, 0x61, 0x00, 0x60, 0x32, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xEF, 0x60, 0x58, 0x4E,
-        0x79, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x0B, 0x03, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63,
-        0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xF0, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x00, 0x00,
-        0x20, 0xFE, 0x30, 0x60, 0x20, 0x61, 0xA1, 0xD1, 0x82, 0xF3, 0x01, 0x60, 0x6E, 0x63, 0x60, 0x45,
-        0x2A, 0x44, 0x60, 0xFB, 0xA3, 0xD5, 0x65, 0x40, 0x01, 0x27, 0x5B, 0xD5, 0x65, 0x40, 0x01, 0x27,
-        0x59, 0xD1, 0x66, 0x41, 0xA0, 0x84, 0x24, 0x94, 0x2B, 0x46, 0x0F, 0xFA, 0x61, 0xFB, 0x16, 0x64,
-        0x12, 0xFA, 0x01, 0x64, 0x11, 0xFA, 0x66, 0x5C, 0xC1, 0x60, 0x58, 0x4E, 0x93, 0x78, 0xFF, 0xFF,
-        0x2B, 0x46, 0x0F, 0xF2, 0x12, 0x63, 0x7C, 0x18, 0x26, 0x46, 0x87, 0xF2, 0x01, 0x65, 0x41, 0x4B,
-        0xAB, 0x46, 0x0F, 0xF2, 0xFF, 0xFF, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xFF, 0x22,
-        0x00, 0x65, 0x78, 0xF2, 0xFF, 0xFF, 0xB4, 0x84, 0x78, 0xFA, 0xAB, 0x46, 0xFF, 0xFF, 0x26, 0x46,
-        0x3F, 0xF2, 0x00, 0xF4, 0x16, 0x65, 0x27, 0x40, 0x02, 0x3A, 0x03, 0x00, 0x1C, 0x65, 0xF6, 0xA4,
-        0x01, 0x00, 0xFC, 0xA4, 0x24, 0x43, 0x2D, 0x60, 0x5E, 0x61, 0x5D, 0x91, 0x51, 0x90, 0xFF, 0xFF,
-        0x04, 0x28, 0x60, 0x41, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85,
-        0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2,
-        0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x2D, 0x60, 0x04, 0x7C, 0x03, 0x1E, 0x60, 0xFE,
-        0xBD, 0xDF, 0x20, 0xFE, 0x2D, 0x60, 0x08, 0x64, 0x53, 0x93, 0xA4, 0xDD, 0x26, 0x46, 0x00, 0xF4,
-        0x13, 0x60, 0x44, 0xF3, 0x00, 0x63, 0x00, 0xB8, 0x0A, 0xFC, 0x03, 0x02, 0xD9, 0x60, 0xCF, 0x78,
-        0xFF, 0xFF, 0x0B, 0xF2, 0x27, 0x40, 0x02, 0x3A, 0x02, 0x00, 0x0E, 0xF2, 0xFF, 0xFF, 0x60, 0x47,
-        0x00, 0x3A, 0x25, 0x00, 0x60, 0x41, 0x00, 0x36, 0x22, 0x00, 0xE0, 0xA0, 0xDA, 0x85, 0x1F, 0x07,
-        0x13, 0x60, 0x0B, 0xF1, 0x65, 0x42, 0xD1, 0x80, 0x26, 0x60, 0x18, 0x63, 0x18, 0x02, 0x50, 0xFE,
-        0x61, 0x40, 0xFE, 0x22, 0x08, 0x00, 0x62, 0x45, 0xBD, 0xD3, 0xA5, 0xD0, 0xDA, 0x82, 0xD0, 0x80,
-        0xC9, 0x81, 0xF6, 0x0C, 0x0C, 0x00, 0x61, 0x40, 0x00, 0x36, 0x31, 0x00, 0x62, 0x45, 0xA3, 0xD3,
-        0xA5, 0xD0, 0xFF, 0xFF, 0x90, 0x80, 0xFF, 0x26, 0x02, 0x00, 0xDE, 0x82, 0x28, 0x00, 0x0C, 0x63,
-        0x0A, 0xFC, 0x00, 0x64, 0x09, 0xFA, 0x0B, 0xFA, 0x01, 0x7E, 0x0C, 0xFA, 0x26, 0x46, 0x08, 0x64,
-        0x3F, 0xFA, 0x07, 0xF2, 0x87, 0xF1, 0x40, 0x58, 0x07, 0xF8, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60,
-        0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0xDC, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0x20, 0xFE, 0x16, 0x60, 0x50, 0xF3, 0xFF, 0xFF, 0x22, 0xB0,
-        0xFF, 0xFF, 0x03, 0x03, 0xDB, 0x60, 0xB1, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0xD9, 0x01, 0x13, 0x60,
-        0x45, 0xF3, 0xFF, 0xFF, 0xFF, 0xA4, 0xFF, 0xFF, 0x0C, 0x20, 0x03, 0x00, 0xDB, 0x60, 0xB1, 0x78,
-        0xFF, 0xFF, 0x00, 0x64, 0x16, 0x60, 0x56, 0xFB, 0x16, 0x60, 0x57, 0xFB, 0x16, 0x60, 0x58, 0xFB,
-        0x16, 0x60, 0x5A, 0xFB, 0x16, 0x60, 0x5B, 0xFB, 0x16, 0x60, 0x5C, 0xFB, 0x16, 0x60, 0x5D, 0xFB,
-        0x18, 0x60, 0x17, 0xFB, 0x2B, 0x46, 0x3B, 0xF2, 0x7F, 0x60, 0xCF, 0x65, 0xA4, 0x84, 0xA2, 0xDA,
-        0x26, 0x46, 0x00, 0xF4, 0x0B, 0xF2, 0x27, 0x40, 0x02, 0x3A, 0x02, 0x00, 0x0E, 0xF2, 0xFF, 0xFF,
-        0xCE, 0x81, 0x20, 0xFE, 0x30, 0x60, 0x28, 0x64, 0x40, 0x4A, 0xDA, 0x60, 0x58, 0x4D, 0x62, 0x78,
-        0xFF, 0xFF, 0x20, 0xFE, 0x18, 0x60, 0x17, 0xF3, 0xFF, 0xFF, 0x08, 0x18, 0x18, 0x60, 0x19, 0xF3,
-        0x18, 0x60, 0x1A, 0xF5, 0x60, 0x41, 0x30, 0x60, 0x2E, 0x62, 0xA2, 0xDF, 0x2A, 0xD1, 0xDA, 0x85,
-        0x64, 0x44, 0x01, 0xA0, 0xFF, 0xFF, 0x01, 0x02, 0x75, 0x00, 0x45, 0x4A, 0x7C, 0x44, 0x60, 0xFE,
-        0xA1, 0xD2, 0xFF, 0xFF, 0xD0, 0x80, 0x20, 0xFE, 0x01, 0x03, 0xE3, 0x01, 0x30, 0x60, 0x2E, 0x62,
-        0xA2, 0xDF, 0x60, 0xFE, 0x5D, 0xD2, 0xFF, 0xFF, 0x60, 0x5C, 0x41, 0x94, 0x81, 0xA0, 0x20, 0xFE,
-        0x2D, 0x04, 0x01, 0x64, 0x18, 0x60, 0x17, 0xFB, 0xC1, 0x84, 0x84, 0xA4, 0x18, 0x60, 0x19, 0xFB,
-        0x00, 0xF2, 0x18, 0x60, 0x1A, 0xFB, 0x18, 0x60, 0x18, 0xFD, 0x02, 0x60, 0x00, 0x63, 0xCD, 0x85,
-        0x64, 0x44, 0xD8, 0x81, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85,
-        0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2,
-        0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x00, 0x60, 0x01, 0x61, 0x02, 0x60, 0x00, 0x64,
-        0xE0, 0x87, 0x60, 0x46, 0x18, 0x60, 0x18, 0xF3, 0xFF, 0xFF, 0x60, 0x43, 0x60, 0xFE, 0xCD, 0x81,
-        0x20, 0xFE, 0x2A, 0x44, 0x00, 0x60, 0x02, 0x65, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0xDB, 0x60,
-        0x5C, 0x78, 0xFF, 0xFF, 0x18, 0x60, 0x17, 0xF3, 0xFF, 0xFF, 0x08, 0x18, 0x18, 0x60, 0x19, 0xF3,
-        0x18, 0x60, 0x1A, 0xF5, 0x60, 0x41, 0x30, 0x60, 0x2E, 0x62, 0xA2, 0xDF, 0x66, 0x5C, 0x26, 0x46,
-        0x00, 0xF2, 0x64, 0x46, 0x58, 0x90, 0xFF, 0xFF, 0x03, 0x02, 0x61, 0x44, 0x0B, 0xA5, 0x04, 0x00,
-        0x61, 0x44, 0xFC, 0xA4, 0x8B, 0x7C, 0xC0, 0x85, 0xDD, 0x81, 0x66, 0x44, 0x18, 0x60, 0x1A, 0xFB,
-        0x26, 0x46, 0x1B, 0xF0, 0x18, 0x60, 0x1A, 0xF5, 0x64, 0x44, 0xD4, 0x80, 0xFF, 0xFF, 0xD7, 0x06,
-        0x2D, 0x58, 0xFF, 0xFF, 0x60, 0xFE, 0x5D, 0xD2, 0xFF, 0xFF, 0x20, 0xFE, 0xFF, 0xB4, 0x41, 0x94,
-        0x81, 0xA0, 0xFF, 0xFF, 0x02, 0x04, 0x00, 0xF4, 0x84, 0xA4, 0x60, 0x41, 0x62, 0x01, 0x60, 0xFE,
-        0x5D, 0xD2, 0xFF, 0xFF, 0xFA, 0xA4, 0xFF, 0xFF, 0x04, 0x20, 0x02, 0x00, 0xFF, 0xA1, 0x61, 0x01,
-        0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x36, 0x02, 0x00, 0xC9, 0x81, 0x5A, 0x01, 0x5D, 0xD0,
-        0xFF, 0xFF, 0x64, 0x40, 0x50, 0x36, 0x02, 0x00, 0xFD, 0xA1, 0x53, 0x01, 0x5D, 0xD0, 0xFF, 0xFF,
-        0x64, 0x40, 0xF2, 0x36, 0x04, 0x00, 0xFC, 0xA1, 0xDA, 0x60, 0x01, 0x78, 0xFF, 0xFF, 0x5D, 0xD0,
-        0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x04, 0x00, 0xFB, 0xA1, 0xDA, 0x60, 0x01, 0x78, 0xFF, 0xFF,
-        0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x04, 0x00, 0xFA, 0xA1, 0xDA, 0x60, 0x01, 0x78,
-        0xFF, 0xFF, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x36, 0x04, 0x00, 0xF9, 0xA1, 0xDA, 0x60,
-        0x01, 0x78, 0xFF, 0xFF, 0x60, 0x5C, 0x00, 0x36, 0x2A, 0x00, 0x00, 0x64, 0xDB, 0x60, 0x58, 0x4E,
-        0x16, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0x5A, 0xFB, 0x64, 0x40, 0x00, 0x36, 0x25, 0x00, 0x5D, 0xD2,
-        0xDD, 0x81, 0xDB, 0x60, 0x58, 0x4E, 0x16, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0x5B, 0xFB, 0x64, 0x40,
-        0x00, 0x36, 0x1F, 0x00, 0x5D, 0xD2, 0xDD, 0x81, 0xDB, 0x60, 0x58, 0x4E, 0x16, 0x78, 0xFF, 0xFF,
-        0x16, 0x60, 0x5C, 0xFB, 0x64, 0x40, 0x00, 0x36, 0x19, 0x00, 0x5D, 0xD0, 0x16, 0x60, 0x5D, 0xF9,
-        0x5D, 0xD0, 0x2C, 0x60, 0xBB, 0x62, 0xA2, 0xD9, 0xD9, 0x60, 0xF9, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x00, 0x60, 0x04, 0x64, 0x16, 0x60, 0x5A, 0xFB, 0x20, 0xFE, 0x00, 0x60, 0x04, 0x64, 0x16, 0x60,
-        0x5B, 0xFB, 0x20, 0xFE, 0x00, 0x60, 0x02, 0x64, 0x16, 0x60, 0x5C, 0xFB, 0x20, 0xFE, 0x00, 0x60,
-        0x00, 0x64, 0x16, 0x60, 0x5D, 0xFB, 0xD9, 0x60, 0xF9, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0x5E, 0xFB,
-        0xE0, 0x84, 0xE0, 0x84, 0x03, 0x02, 0x01, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x02, 0xA5, 0x64, 0x44,
-        0xD4, 0x9C, 0x16, 0x60, 0x5F, 0xF9, 0x2C, 0x60, 0xC0, 0x62, 0xA2, 0xDF, 0x5D, 0xD0, 0x00, 0x65,
-        0x64, 0x40, 0x00, 0x3A, 0x01, 0x65, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x50, 0x3A, 0x01, 0x65,
-        0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0xF2, 0x3A, 0x01, 0x65, 0x5D, 0xD0, 0x65, 0x40, 0x00, 0x3A,
-        0x17, 0x00, 0x00, 0x60, 0x00, 0x65, 0x64, 0x40, 0x00, 0x36, 0x01, 0x65, 0x64, 0x40, 0x01, 0x36,
-        0x02, 0x65, 0x64, 0x40, 0x02, 0x36, 0x04, 0x65, 0x64, 0x40, 0x04, 0x36, 0x10, 0x65, 0x64, 0x40,
-        0x05, 0x36, 0x20, 0x65, 0x65, 0x5C, 0x16, 0x60, 0x60, 0xF3, 0xFF, 0xFF, 0xB0, 0x84, 0xA2, 0xDB,
-        0x16, 0x60, 0x5E, 0xF3, 0xFF, 0xFF, 0xFF, 0xA4, 0xA2, 0xDB, 0xD0, 0x02, 0x16, 0x60, 0x60, 0xF3,
-        0x16, 0x60, 0x5F, 0xF1, 0x2E, 0x58, 0xFF, 0xFF, 0x20, 0xFE, 0x16, 0x60, 0x50, 0xF1, 0x16, 0x60,
-        0x5A, 0xF3, 0xFF, 0xFF, 0xA0, 0x84, 0xFF, 0xFF, 0x10, 0x26, 0x09, 0x00, 0x04, 0x26, 0x09, 0x00,
-        0x20, 0x26, 0x09, 0x00, 0x02, 0x26, 0x09, 0x00, 0xD9, 0x60, 0xC3, 0x78, 0xFF, 0xFF, 0x10, 0x7C,
-        0x05, 0x00, 0x04, 0x7C, 0x03, 0x00, 0x20, 0x7C, 0x01, 0x00, 0x02, 0x7C, 0x16, 0x60, 0x56, 0xF9,
-        0x16, 0x60, 0x51, 0xF1, 0x16, 0x60, 0x5B, 0xF3, 0x2C, 0x60, 0xAC, 0x62, 0xA0, 0x84, 0xA2, 0xD1,
-        0xFF, 0xFF, 0x10, 0x26, 0x07, 0x00, 0x04, 0x26, 0x07, 0x00, 0x01, 0x26, 0x0D, 0x00, 0xD9, 0x60,
-        0xC3, 0x78, 0xFF, 0xFF, 0x10, 0x7C, 0x09, 0x00, 0x64, 0x40, 0x10, 0x22, 0x03, 0x00, 0xD9, 0x60,
-        0xC3, 0x78, 0xFF, 0xFF, 0x04, 0x7C, 0x01, 0x00, 0x01, 0x7C, 0x16, 0x60, 0x57, 0xF9, 0x16, 0x60,
-        0x52, 0xF1, 0x16, 0x60, 0x5C, 0xF3, 0xFF, 0xFF, 0xA0, 0x84, 0x02, 0x26, 0x07, 0x00, 0x04, 0x26,
-        0x07, 0x00, 0x01, 0x26, 0x07, 0x00, 0xD9, 0x60, 0xC3, 0x78, 0xFF, 0xFF, 0x02, 0x7C, 0x03, 0x00,
-        0x04, 0x7C, 0x01, 0x00, 0x20, 0x7C, 0x16, 0x60, 0x58, 0xF9, 0x16, 0x60, 0x5D, 0xF1, 0x16, 0x60,
-        0x59, 0xF9, 0x16, 0x60, 0x58, 0xF3, 0x16, 0x60, 0x57, 0xF1, 0x60, 0x47, 0xB0, 0x84, 0x13, 0x60,
-        0x45, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x22, 0xBC, 0xAB, 0x46, 0x3A, 0xFA, 0xAB, 0x46,
-        0x16, 0x60, 0x56, 0xF3, 0x13, 0x60, 0x45, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x22, 0xBC,
-        0x87, 0xF1, 0x66, 0x41, 0x64, 0x46, 0x3A, 0xFA, 0xFF, 0xFF, 0x61, 0x46, 0xAB, 0x46, 0x82, 0xF0,
-        0xC0, 0x67, 0xB4, 0x84, 0xAB, 0x46, 0x0B, 0xFA, 0x13, 0x60, 0x4D, 0xF1, 0x2D, 0x60, 0xBE, 0x7C,
-        0x04, 0x1B, 0xFF, 0x60, 0xFF, 0x63, 0xA4, 0xDD, 0x26, 0x00, 0x2E, 0x60, 0x34, 0x63, 0xA4, 0xDD,
-        0xDB, 0x83, 0x60, 0xFE, 0x00, 0x64, 0xBD, 0xDB, 0x60, 0x64, 0xBD, 0xDB, 0x1D, 0x64, 0xBD, 0xDB,
-        0xC3, 0xF3, 0xBD, 0xDB, 0x20, 0xFE, 0x01, 0x60, 0x78, 0x64, 0x06, 0x61, 0x58, 0xD1, 0xFF, 0xFF,
-        0x60, 0xFE, 0xBD, 0xD9, 0x20, 0xFE, 0xCD, 0x81, 0x61, 0x40, 0x08, 0x28, 0xF7, 0x01, 0xB6, 0xF1,
-        0xFF, 0xFF, 0x64, 0x47, 0x60, 0xFE, 0xBD, 0xD9, 0xBD, 0xDB, 0x20, 0xFE, 0x13, 0x60, 0x4B, 0xF1,
-        0x60, 0xFE, 0xBD, 0xD9, 0x20, 0xFE, 0x2D, 0x60, 0xBC, 0x64, 0x40, 0x48, 0x18, 0x61, 0x26, 0x46,
-        0x00, 0xF4, 0xFF, 0x60, 0xF2, 0x64, 0xE4, 0x60, 0x58, 0x4D, 0xA7, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x3F, 0xFC, 0x2B, 0x46, 0x56, 0xF1, 0x1F, 0xF8, 0x0C, 0x60, 0x70, 0xF1, 0x10, 0x60, 0x00, 0x64,
-        0xA0, 0x80, 0x06, 0xF2, 0x0B, 0x03, 0x10, 0xBC, 0x06, 0xFA, 0x86, 0xF3, 0x00, 0x60, 0x70, 0xF3,
-        0x60, 0x45, 0xD4, 0x80, 0xDC, 0x84, 0x07, 0x07, 0xA2, 0xDB, 0x05, 0x00, 0x10, 0xB5, 0xFF, 0xFF,
-        0x02, 0x03, 0xD4, 0x84, 0x06, 0xFA, 0x07, 0xF2, 0x66, 0x45, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46,
-        0x02, 0xB0, 0xFF, 0xFF, 0x11, 0x03, 0x26, 0x46, 0x87, 0xF3, 0x07, 0xFA, 0x1E, 0x60, 0xD4, 0x64,
-        0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x50, 0x00, 0x26, 0x46, 0x87, 0xF3, 0x07, 0xFA, 0x1E, 0x60,
-        0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x19, 0x00, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA,
-        0x02, 0x64, 0x3F, 0xFA, 0x87, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x09, 0x64, 0x09, 0xFA, 0x1E, 0x60,
-        0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x2B, 0x43, 0x0B, 0x60,
-        0x82, 0xF3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80, 0xD9, 0x81,
-        0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB, 0x17, 0x60,
-        0x04, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB, 0xAB, 0x46,
-        0x06, 0xF2, 0xFF, 0xFF, 0x02, 0xBC, 0x06, 0xFA, 0x78, 0xF2, 0x15, 0x60, 0xDC, 0xF3, 0x60, 0x45,
-        0xA4, 0x84, 0x15, 0x60, 0xDC, 0xFB, 0xAB, 0x46, 0xAB, 0x46, 0x0F, 0x60, 0xFF, 0x64, 0x02, 0xF0,
-        0x71, 0xF1, 0xA0, 0x84, 0xD0, 0x80, 0x02, 0xFA, 0xAB, 0x46, 0x01, 0x06, 0x71, 0xFB, 0x27, 0x41,
-        0x01, 0xB1, 0xFF, 0xFF, 0x08, 0x03, 0x2B, 0x46, 0x0B, 0x58, 0x01, 0x65, 0xE5, 0x60, 0x58, 0x4E,
-        0x51, 0x78, 0xFF, 0xFF, 0x0A, 0x00, 0x2B, 0x46, 0x0B, 0x58, 0x18, 0x60, 0xD6, 0x64, 0x40, 0x59,
-        0x02, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x51, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58,
-        0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x00, 0x64, 0x09, 0xFA, 0x0B, 0xFA, 0x01, 0x7E, 0x0C, 0xFA,
-        0x0A, 0x64, 0x0A, 0xFA, 0x26, 0x46, 0x08, 0x64, 0x3F, 0xFA, 0x07, 0xF2, 0x87, 0xF1, 0x40, 0x58,
-        0x07, 0xF8, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xFF, 0x60, 0xFD, 0x65, 0x38, 0x46, 0x06, 0xF2,
-        0xFF, 0xFF, 0xA4, 0x83, 0x06, 0xFC, 0x02, 0xB0, 0x26, 0x46, 0x1C, 0x03, 0x38, 0x43, 0x86, 0xF1,
-        0x17, 0x60, 0x02, 0x61, 0xA1, 0xD3, 0xDA, 0x81, 0xD0, 0x80, 0xDC, 0x9C, 0x05, 0x05, 0xA1, 0xD3,
-        0x4A, 0xD9, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0x02, 0x60, 0x00, 0x61, 0x2C, 0xF2, 0xA1, 0xDB,
-        0x2D, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x2E, 0xF2, 0x59, 0xDB, 0x03, 0x65, 0xE5, 0x60, 0x58, 0x4E,
-        0x51, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x07, 0xF2, 0x87, 0xF1,
-        0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF, 0x40, 0x47, 0x07, 0xF2,
-        0x66, 0x45, 0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x02, 0xB0, 0xFF, 0xFF, 0x1A, 0x02, 0x27, 0x43,
-        0x0B, 0x60, 0x82, 0xF3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x11, 0x03, 0xD3, 0x80,
-        0xD9, 0x81, 0xFA, 0x02, 0xC9, 0x81, 0xC8, 0x85, 0xD5, 0x80, 0xA5, 0xD3, 0x08, 0x28, 0xA1, 0xDB,
-        0x17, 0x60, 0x04, 0x62, 0x65, 0x44, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA2, 0xDB,
-        0x0C, 0x00, 0x27, 0x44, 0x40, 0x58, 0x03, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x51, 0x78, 0xFF, 0xFF,
-        0x27, 0x43, 0xE7, 0x60, 0x58, 0x4E, 0x81, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x87, 0xF4, 0x66, 0x41,
-        0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B,
-        0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46,
-        0x00, 0xF8, 0x87, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18,
-        0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA,
-        0x61, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x07, 0xF2, 0x87, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF,
-        0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF, 0x40, 0x47, 0x07, 0xF2, 0x66, 0x45, 0x60, 0x46, 0x06, 0xF2,
-        0x65, 0x46, 0x02, 0xB0, 0xFF, 0xFF, 0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF, 0x27, 0x46, 0x06, 0xF0,
-        0xFF, 0x60, 0xED, 0x64, 0xA0, 0x84, 0x06, 0xFA, 0x27, 0x43, 0x86, 0xF1, 0x17, 0x60, 0x02, 0x61,
-        0xA1, 0xD3, 0xDA, 0x81, 0xD0, 0x80, 0xDC, 0x9C, 0x05, 0x05, 0xA1, 0xD3, 0x4A, 0xD9, 0xA0, 0xDD,
-        0xDA, 0x9C, 0xA1, 0xD9, 0x07, 0x58, 0x03, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x51, 0x78, 0xFF, 0xFF,
-        0x27, 0x43, 0xE7, 0x60, 0x58, 0x4E, 0x81, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0x26, 0x46, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF3,
-        0x2F, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0xCD, 0xF3, 0x31, 0xFA, 0x66, 0xF3, 0x32, 0xFA, 0x67, 0xF3,
-        0x33, 0xFA, 0x68, 0xF3, 0x34, 0xFA, 0xAB, 0xF1, 0x19, 0xF8, 0x00, 0x65, 0xEF, 0x60, 0x58, 0x4E,
-        0xDC, 0x78, 0xFF, 0xFF, 0x61, 0x44, 0x15, 0x60, 0xC2, 0xFB, 0x02, 0x63, 0x3F, 0xFC, 0x00, 0x64,
-        0x3E, 0xFA, 0x02, 0x60, 0x00, 0x61, 0x2C, 0xF2, 0xA1, 0xDB, 0x2D, 0xF2, 0x41, 0x58, 0x59, 0xDB,
-        0x2E, 0xF2, 0x59, 0xDB, 0x06, 0x63, 0x07, 0xF2, 0x87, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF,
-        0x0D, 0x02, 0x43, 0x59, 0x02, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0xC0, 0x64, 0x2A, 0xFA, 0x00, 0xF4, 0x06, 0x64, 0x09, 0xFA, 0x15, 0x00, 0x07, 0xF2, 0x66, 0x45,
-        0x60, 0x46, 0x06, 0xF2, 0x65, 0x46, 0x02, 0xB0, 0xFF, 0xFF, 0x1D, 0x02, 0x07, 0x63, 0x43, 0x59,
-        0x01, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0xA0, 0x64, 0x2A, 0xFA,
-        0x00, 0xF4, 0x07, 0x64, 0x09, 0xFA, 0x26, 0x46, 0x87, 0xF3, 0x07, 0xFA, 0x1E, 0x60, 0xD4, 0x64,
-        0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0xDE, 0x60, 0x66, 0x64, 0x08, 0x60,
-        0x29, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0x03, 0x64, 0x08, 0x60, 0x1F, 0xFB, 0xDE, 0x60,
-        0x05, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1E, 0xF1, 0x00, 0x60,
-        0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x59, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x71, 0xF3, 0x87, 0xF5,
-        0xDC, 0x81, 0x66, 0x43, 0x02, 0xA3, 0x63, 0x46, 0xCD, 0x81, 0x06, 0xF2, 0xEE, 0x03, 0x60, 0x40,
-        0x08, 0x2A, 0xF7, 0x01, 0x0C, 0xAC, 0x06, 0xFA, 0x46, 0x49, 0x00, 0x60, 0x02, 0x61, 0xB5, 0x60,
-        0x58, 0x4D, 0xA2, 0x78, 0xFF, 0xFF, 0xE1, 0x03, 0x18, 0x60, 0x13, 0xF3, 0xFF, 0xFF, 0x03, 0x1B,
-        0x00, 0x60, 0xA0, 0x64, 0x02, 0x00, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA, 0xAB, 0xFC, 0x66, 0x45,
-        0x29, 0x44, 0x07, 0xFA, 0x29, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x85, 0xF2, 0x65, 0x46, 0x2C, 0xFA,
-        0x2D, 0xF8, 0xAE, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0x32, 0xFA, 0xCC, 0xF3, 0x30, 0xFA, 0x33, 0xFA,
-        0xCD, 0xF3, 0x31, 0xFA, 0x34, 0xFA, 0xAB, 0xF1, 0x19, 0xF8, 0x18, 0x67, 0x0E, 0xFA, 0x66, 0x41,
-        0x29, 0x46, 0x92, 0xF0, 0x2C, 0x60, 0x26, 0x63, 0x47, 0xD3, 0x61, 0x46, 0x00, 0x7E, 0x13, 0xFA,
-        0x02, 0x63, 0x3F, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0x66, 0x41, 0x00, 0xF4, 0x18, 0x60, 0x12, 0xF3,
-        0x09, 0xFA, 0x1E, 0x60, 0xE0, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x61, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0xA0, 0x01, 0x95, 0x01, 0x00, 0x64, 0x08, 0x60,
-        0x1E, 0xFB, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x07, 0xF0, 0xFF, 0xFF, 0x64, 0x43, 0x0B, 0x60,
-        0x82, 0xF3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1, 0x04, 0x03, 0xD3, 0x80, 0xD9, 0x81,
-        0xFA, 0x02, 0x08, 0x00, 0xA1, 0xDD, 0xD9, 0x84, 0x0B, 0x60, 0x82, 0xFB, 0x4A, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xA2, 0xDB, 0x66, 0x45, 0x63, 0x46, 0x06, 0xF2, 0xFF, 0x60, 0x01, 0x7C, 0xA0, 0x9C,
-        0x06, 0xF8, 0x65, 0x46, 0x70, 0xF3, 0x60, 0x40, 0x10, 0x2A, 0x03, 0x00, 0xCC, 0x84, 0x80, 0x2B,
-        0x70, 0xFB, 0x08, 0x60, 0x1E, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x30, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x02, 0x64,
-        0x08, 0x60, 0x19, 0xFB, 0xDE, 0x60, 0xA8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x70, 0xF3, 0x71, 0xF3, 0x00, 0xA8, 0x60, 0x88, 0x43, 0x03, 0xE0, 0x83, 0x5F, 0x03, 0xCB, 0x83,
-        0x87, 0xF3, 0x72, 0xF1, 0x02, 0xA4, 0x40, 0x47, 0x64, 0x45, 0x27, 0x46, 0x76, 0xF4, 0x12, 0xF2,
-        0x33, 0x18, 0xD4, 0x80, 0x02, 0x64, 0x30, 0x07, 0x23, 0xFA, 0x2A, 0xF2, 0x0E, 0xF2, 0x0C, 0xB0,
-        0x02, 0xF0, 0x0C, 0x02, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xE7, 0x01, 0x60, 0x40, 0xF0, 0x37,
-        0x08, 0x00, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0x8F, 0xF3, 0x02, 0x02, 0xDC, 0x84,
-        0x8F, 0xFB, 0x1E, 0x60, 0xF2, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA3, 0xFF, 0xCE, 0xFE, 0x25, 0x60, 0xE4, 0x64, 0xE5, 0x60,
-        0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1, 0xC9, 0x01, 0x27, 0x44, 0x02, 0xA4, 0x40, 0x47, 0xC5, 0x1F,
-        0x28, 0x43, 0xCB, 0x83, 0x87, 0xF3, 0x1A, 0x0E, 0x02, 0xA4, 0x40, 0x4C, 0x43, 0x48, 0x2C, 0x46,
-        0x22, 0xF2, 0x72, 0xF1, 0xAC, 0x86, 0x12, 0xF2, 0x0C, 0x03, 0xD0, 0x80, 0xFF, 0xFF, 0x09, 0x07,
-        0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF, 0x2C, 0x46,
-        0xA2, 0xFC, 0x2C, 0x44, 0x02, 0xA4, 0x28, 0x43, 0x40, 0x4C, 0xE8, 0x1F, 0x8B, 0x01, 0x01, 0x63,
-        0x65, 0xF3, 0xAB, 0xF3, 0x00, 0xBD, 0xAC, 0x81, 0x06, 0x03, 0x05, 0x03, 0xB7, 0x60, 0x58, 0x4D,
-        0xC0, 0x78, 0xFF, 0xFF, 0x60, 0x43, 0x5B, 0xFD, 0x3E, 0x63, 0x18, 0x60, 0x94, 0x61, 0x00, 0x64,
-        0x59, 0xDB, 0xFE, 0x1F, 0x70, 0xFB, 0x71, 0xFB, 0x18, 0x60, 0xDC, 0x65, 0xA5, 0xDF, 0x5A, 0xDF,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0x70, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x03, 0x02,
-        0xCA, 0x60, 0x7E, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x45, 0x64, 0x46, 0x1F, 0xF2, 0x65, 0x46,
-        0x64, 0x45, 0x5B, 0xF1, 0xE0, 0x84, 0x72, 0xF1, 0xC0, 0x84, 0xC0, 0x84, 0x12, 0xFA, 0x2C, 0xF2,
-        0x70, 0xF3, 0x60, 0x40, 0x01, 0x2A, 0x34, 0x00, 0x00, 0xA8, 0x13, 0x60, 0x43, 0xF3, 0x36, 0x03,
-        0x00, 0xA8, 0xFF, 0xFF, 0x33, 0x03, 0xE1, 0x60, 0x58, 0x4D, 0x04, 0x78, 0xFF, 0xFF, 0x25, 0x46,
-        0x09, 0x60, 0x08, 0x61, 0xA2, 0xFF, 0x0E, 0xF2, 0x02, 0xF0, 0x60, 0x40, 0xF0, 0x37, 0x0D, 0x00,
-        0x91, 0xF3, 0x8F, 0xF3, 0xDC, 0x83, 0xD1, 0x80, 0x91, 0xFD, 0x0C, 0x03, 0x8B, 0xF3, 0xCC, 0x83,
-        0xD8, 0xA0, 0x8F, 0xFD, 0x07, 0x04, 0xD4, 0xFE, 0x05, 0x00, 0xD1, 0x80, 0x92, 0xF3, 0x02, 0x03,
-        0xDC, 0x84, 0x92, 0xFB, 0x1E, 0x60, 0xDA, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x25, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA3, 0xFF, 0xDF, 0x60, 0x2A, 0x78, 0xFF, 0xFF,
-        0x66, 0x41, 0x65, 0x46, 0x06, 0xF2, 0x61, 0x46, 0x60, 0x40, 0x10, 0x2A, 0x4B, 0x00, 0x80, 0x67,
-        0xB4, 0x81, 0x61, 0x44, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xE1, 0x60, 0x58, 0x4D, 0x04, 0x78, 0xFF, 0xFF, 0x25, 0x46, 0x2A, 0xF2,
-        0x09, 0x60, 0x08, 0x61, 0x0C, 0xB0, 0xA2, 0xFF, 0x17, 0x03, 0x0E, 0xF2, 0x02, 0xF0, 0x60, 0x40,
-        0xF0, 0x37, 0x0D, 0x00, 0x8F, 0xF3, 0x91, 0xF3, 0xCC, 0x83, 0xD1, 0x80, 0x8F, 0xFD, 0x0C, 0x03,
-        0x8B, 0xF3, 0xDC, 0x83, 0xD8, 0xA0, 0x91, 0xFD, 0x07, 0x04, 0xD4, 0xFE, 0x05, 0x00, 0xD1, 0x80,
-        0x92, 0xF3, 0x02, 0x03, 0xDC, 0x84, 0x92, 0xFB, 0x07, 0xF0, 0x0A, 0xF2, 0xA3, 0xFF, 0x64, 0x45,
-        0x2F, 0x1B, 0x66, 0x41, 0x65, 0x46, 0x02, 0xF0, 0x61, 0x46, 0x0F, 0x60, 0xFF, 0x61, 0xA1, 0x84,
-        0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03,
-        0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x18, 0x60, 0x96, 0x65, 0x46, 0xD1, 0x61, 0x44, 0xB0, 0x84,
-        0xA2, 0xDB, 0x16, 0x00, 0x1E, 0x60, 0xD4, 0x61, 0x2A, 0xF2, 0x3E, 0xF2, 0x0C, 0xB0, 0x01, 0xB0,
-        0x05, 0x03, 0x1E, 0x60, 0xE6, 0x61, 0x02, 0x02, 0x1E, 0x60, 0xCE, 0x61, 0x61, 0x44, 0x0F, 0x60,
-        0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0xDF, 0x60, 0x2A, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x2B, 0xF2, 0x2A, 0xF2, 0x60, 0x41, 0x44, 0x49,
-        0x60, 0x45, 0xA4, 0x3A, 0x0D, 0x00, 0x61, 0x40, 0xC0, 0x3B, 0x79, 0x00, 0xA9, 0x46, 0x06, 0xF2,
-        0xA9, 0x46, 0x60, 0x40, 0x20, 0x26, 0x73, 0x00, 0x20, 0xBC, 0xA9, 0x46, 0x06, 0xFA, 0xA9, 0x46,
-        0xA9, 0x46, 0x06, 0xF0, 0xA9, 0x46, 0x65, 0x40, 0x10, 0x2B, 0x6C, 0x00, 0x64, 0x40, 0x10, 0x2A,
-        0x35, 0x00, 0x65, 0x40, 0xA4, 0x3A, 0x63, 0x00, 0x29, 0x45, 0x65, 0x46, 0x76, 0xF2, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x04, 0x02, 0x76, 0x00, 0xE0, 0x60, 0xEA, 0x78, 0xFF, 0xFF, 0x09, 0xF2,
-        0x2A, 0xF0, 0x00, 0xA8, 0x20, 0x67, 0x02, 0x03, 0xB0, 0x84, 0x2A, 0xFA, 0x0E, 0xF2, 0x02, 0xF0,
-        0x60, 0x40, 0xF0, 0x37, 0x08, 0x00, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0x8F, 0xF3,
-        0x02, 0x02, 0xDC, 0x84, 0x8F, 0xFB, 0x3E, 0xF2, 0xA3, 0xFF, 0x01, 0xB0, 0x1E, 0x60, 0xE6, 0x61,
-        0x02, 0x02, 0x1E, 0x60, 0xD4, 0x61, 0x61, 0x44, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x16, 0x00, 0x10, 0x64, 0xB0, 0x84,
-        0xDF, 0x65, 0xA4, 0x9E, 0xA9, 0x46, 0x06, 0xFA, 0xA9, 0x46, 0xA2, 0xFF, 0x04, 0x64, 0x0C, 0x60,
-        0x6E, 0xFB, 0x29, 0x44, 0x5A, 0xDB, 0x70, 0xF3, 0xC1, 0xFE, 0xD4, 0xFE, 0x86, 0xF1, 0xA3, 0xFF,
-        0xD0, 0x80, 0xDC, 0x84, 0x01, 0x07, 0x70, 0xFB, 0xA9, 0x46, 0x76, 0xF2, 0xA9, 0x46, 0x64, 0x18,
-        0xA9, 0x46, 0x02, 0xF0, 0xA9, 0x46, 0x0F, 0x60, 0xFF, 0x61, 0xA1, 0x84, 0x60, 0x41, 0xE9, 0x81,
-        0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81,
-        0xFD, 0x02, 0x18, 0x60, 0x96, 0x65, 0x46, 0xD1, 0xFF, 0xFF, 0xB1, 0x84, 0xA2, 0xDB, 0xE1, 0x60,
-        0x01, 0x78, 0xFF, 0xFF, 0x64, 0x40, 0x10, 0x2A, 0xFA, 0x01, 0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84,
-        0xA9, 0x46, 0x06, 0xFA, 0xA9, 0x46, 0x65, 0x41, 0x70, 0xF3, 0x29, 0x45, 0xCC, 0x84, 0x80, 0x2B,
-        0x70, 0xFB, 0x65, 0x46, 0x76, 0xF2, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x36, 0x02, 0x61, 0x40,
-        0xA4, 0x3A, 0xE5, 0x01, 0x00, 0x60, 0x3A, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x9F, 0x78, 0xFF, 0xFF,
-        0x83, 0x03, 0x02, 0x60, 0x48, 0x64, 0x2A, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8,
-        0xCD, 0xF1, 0x31, 0xF8, 0x66, 0xF1, 0x32, 0xF8, 0x67, 0xF1, 0x33, 0xF8, 0x68, 0xF1, 0x34, 0xF8,
-        0xA9, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x85, 0xF0, 0xA9, 0x46, 0x2C, 0xFA, 0x2D, 0xF8, 0xAE, 0xF8,
-        0xAB, 0xF1, 0x19, 0xF8, 0xFF, 0x67, 0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x29, 0x44,
-        0x07, 0xFA, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x35, 0x00, 0x80, 0x67, 0xB4, 0x83, 0x2A, 0xF2,
-        0x09, 0x60, 0x08, 0x65, 0x0C, 0xB0, 0x09, 0xF0, 0x0C, 0x02, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60,
-        0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x9F, 0x18,
-        0x64, 0x46, 0x3E, 0xF2, 0xA2, 0xFF, 0x01, 0xB0, 0x1E, 0x60, 0xE6, 0x61, 0x02, 0x02, 0x1E, 0x60,
-        0xCE, 0x61, 0x02, 0xF2, 0x0E, 0xF0, 0xD4, 0x80, 0x09, 0xF4, 0x06, 0x02, 0x8F, 0xF3, 0x64, 0x40,
-        0xF0, 0x37, 0x02, 0x00, 0xDC, 0x84, 0x8F, 0xFB, 0x66, 0x44, 0x00, 0xA8, 0xFF, 0xFF, 0xF1, 0x02,
-        0x61, 0x44, 0x0F, 0x60, 0x90, 0xFB, 0x5A, 0xDD, 0x08, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0xA3, 0xFF, 0xA9, 0x46, 0x02, 0xF0, 0xA9, 0x46, 0x0F, 0x60, 0xFF, 0x61, 0xA1, 0x84,
-        0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03,
-        0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x18, 0x60, 0x96, 0x65, 0x46, 0xD3, 0x9D, 0x85, 0xA4, 0x84,
-        0xA2, 0xDB, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x46, 0x45, 0x3F, 0xF2, 0x05, 0x48, 0x00, 0xA8,
-        0x60, 0x41, 0x66, 0x44, 0x0B, 0x03, 0x0E, 0xA1, 0x00, 0xF2, 0x42, 0xFE, 0xAC, 0x86, 0x01, 0xF2,
-        0x1F, 0x03, 0x7F, 0xB5, 0xD5, 0x81, 0x66, 0x44, 0xF7, 0x07, 0x25, 0x46, 0x05, 0xF0, 0x06, 0xFA,
-        0x05, 0xFA, 0xD0, 0x80, 0x64, 0x43, 0x13, 0x03, 0x60, 0x46, 0x01, 0xF0, 0x80, 0x67, 0xB0, 0x84,
-        0x01, 0xFA, 0x00, 0xF0, 0x00, 0x64, 0x00, 0xFA, 0x44, 0x45, 0xA2, 0xFF, 0xB6, 0x60, 0x58, 0x4E,
-        0x72, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x08, 0x45, 0x25, 0x46, 0x01, 0x64, 0x02, 0xFA, 0x02, 0xFE,
-        0x2D, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x07, 0xF0, 0x10, 0xB0, 0x10, 0xAC, 0x3A, 0x03, 0x23, 0xFA,
-        0x80, 0x67, 0xB0, 0x81, 0x61, 0x44, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x04, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x46, 0x45, 0x64, 0x46, 0x02, 0xF0, 0x0F, 0x60, 0xFF, 0x61,
-        0xA1, 0x84, 0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE1, 0x82, 0x07, 0xB4, 0x01, 0x61,
-        0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x18, 0x60, 0x96, 0x65, 0x46, 0xD1, 0xFF, 0xFF,
-        0xB1, 0x84, 0xA2, 0xDB, 0x9F, 0xF2, 0x25, 0x46, 0xE1, 0x81, 0x5B, 0xF1, 0x72, 0xF1, 0xC1, 0x81,
-        0xC1, 0x81, 0x92, 0xFA, 0xA2, 0xFF, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x61, 0xD1, 0x80, 0x0E, 0xF2,
-        0x05, 0x02, 0x8F, 0xF3, 0x20, 0xB0, 0xCC, 0x84, 0x01, 0x02, 0x8F, 0xFB, 0xA3, 0xFF, 0x48, 0xFE,
-        0x07, 0x00, 0x0E, 0xF2, 0x08, 0xFE, 0xF0, 0x7F, 0x60, 0x40, 0x20, 0x2A, 0x00, 0x7F, 0x0E, 0xFA,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0xC5, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0xA2, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x57, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x80, 0x64, 0x2A, 0xFA, 0xAB, 0xF1, 0x19, 0xF8,
-        0x00, 0x64, 0x3E, 0xFA, 0x00, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0x87, 0xF1, 0x07, 0xF8, 0x67, 0x44,
-        0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0xE4, 0x60, 0x65, 0x64, 0x08, 0x60, 0x25, 0xFB, 0xE2, 0x60,
-        0xA0, 0x64, 0x08, 0x60, 0x2B, 0xFB, 0x18, 0x60, 0xE6, 0x63, 0x65, 0x44, 0xBD, 0xDB, 0x10, 0x60,
-        0x58, 0x64, 0xBD, 0xDB, 0x02, 0x64, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB, 0xE9, 0x60, 0xB2, 0x78,
-        0xFF, 0xFF, 0xE9, 0x60, 0x58, 0x4D, 0xBE, 0x78, 0xFF, 0xFF, 0x57, 0xF5, 0xCB, 0xF1, 0x2F, 0xF8,
-        0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x66, 0xF1, 0x32, 0xF8, 0x67, 0xF1, 0x33, 0xF8,
-        0x68, 0xF1, 0x34, 0xF8, 0x13, 0x60, 0x45, 0xF1, 0x01, 0x64, 0x64, 0x40, 0xFE, 0x26, 0x10, 0xBC,
-        0x32, 0x40, 0x10, 0x26, 0x10, 0xBC, 0x20, 0xBC, 0x04, 0x60, 0x00, 0x65, 0x60, 0x44, 0xB4, 0x84,
-        0x17, 0x60, 0x22, 0xFB, 0x13, 0x60, 0x44, 0xF1, 0x26, 0x60, 0x16, 0x64, 0x02, 0x18, 0x26, 0x60,
-        0x38, 0x64, 0x16, 0x60, 0xBF, 0xFB, 0x16, 0x60, 0xCF, 0xFB, 0x2C, 0x60, 0x84, 0x61, 0x13, 0x60,
-        0x97, 0xF3, 0x2D, 0x60, 0x5E, 0x65, 0xFE, 0xA4, 0xE0, 0x84, 0x02, 0x05, 0x67, 0x44, 0x21, 0x00,
-        0xE0, 0x84, 0xC4, 0x85, 0x16, 0x60, 0x55, 0xF3, 0xA5, 0xD1, 0xDA, 0x85, 0xA0, 0x83, 0x16, 0x60,
-        0x51, 0xFD, 0xA5, 0xD1, 0x2C, 0x60, 0xA0, 0x62, 0xA0, 0x83, 0xA2, 0xDD, 0x2C, 0x60, 0x84, 0x61,
-        0x50, 0x60, 0x00, 0x7C, 0x00, 0x60, 0xF2, 0x65, 0xE2, 0x60, 0x58, 0x4D, 0x06, 0x78, 0xFF, 0xFF,
-        0x16, 0x60, 0x53, 0xF1, 0x59, 0xD9, 0x2C, 0x60, 0x7E, 0x65, 0xD5, 0x84, 0xDD, 0x7F, 0xA5, 0xDB,
-        0x65, 0x44, 0x16, 0x60, 0xC4, 0xFB, 0x16, 0x60, 0xD4, 0xFB, 0x79, 0x00, 0x16, 0x60, 0x54, 0xF3,
-        0x2C, 0x60, 0xA0, 0x62, 0xFD, 0xA0, 0xA2, 0xD3, 0xEE, 0x03, 0x60, 0x40, 0x02, 0x2A, 0x02, 0x00,
-        0x01, 0x63, 0x0B, 0x00, 0x04, 0x2A, 0x02, 0x00, 0x02, 0x63, 0x07, 0x00, 0x10, 0x2A, 0x02, 0x00,
-        0x04, 0x63, 0x03, 0x00, 0x20, 0x2A, 0x01, 0x00, 0x05, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9,
-        0x59, 0xDD, 0x16, 0x60, 0x54, 0xF3, 0x16, 0x60, 0x51, 0xF3, 0xFE, 0xA0, 0x40, 0x4C, 0xD3, 0x03,
-        0x00, 0x60, 0x00, 0x63, 0x59, 0xDD, 0x41, 0x4A, 0x2C, 0x40, 0x01, 0x2A, 0x05, 0x00, 0x00, 0x63,
-        0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x63,
-        0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x04, 0x2A, 0x05, 0x00, 0x02, 0x63, 0x63, 0x47, 0xB4, 0x83,
-        0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x10, 0x2A, 0x05, 0x00, 0x04, 0x63, 0x63, 0x47, 0xB4, 0x83,
-        0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x20, 0x2A, 0x05, 0x00, 0x05, 0x63, 0x63, 0x47, 0xB4, 0x83,
-        0x59, 0xD9, 0x59, 0xDD, 0x2A, 0x44, 0x51, 0x93, 0xEB, 0x83, 0xEB, 0x83, 0xA0, 0xDD, 0x16, 0x60,
-        0x54, 0xF3, 0x16, 0x60, 0x52, 0xF3, 0xFF, 0xA0, 0x40, 0x4C, 0x9D, 0x03, 0x59, 0xDF, 0x41, 0x4A,
-        0x2C, 0x40, 0x01, 0x2A, 0x05, 0x00, 0x00, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD,
-        0x2C, 0x40, 0x02, 0x2A, 0x05, 0x00, 0x01, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD,
-        0x2C, 0x40, 0x04, 0x2A, 0x05, 0x00, 0x02, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD,
-        0x2A, 0x44, 0x51, 0x93, 0xEB, 0x83, 0xEB, 0x83, 0xA0, 0xDD, 0x2D, 0x58, 0xFF, 0xFF, 0x57, 0xF5,
-        0xCB, 0xF3, 0xCC, 0xF1, 0x00, 0x63, 0xC0, 0x87, 0xCD, 0xF1, 0x5A, 0xFD, 0xC0, 0x85, 0x65, 0x47,
-        0xC4, 0x84, 0x07, 0xB5, 0x18, 0x60, 0xE2, 0x64, 0x0F, 0x60, 0xA5, 0xFB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x10, 0x60, 0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x02, 0x64,
-        0x08, 0x60, 0x13, 0xFB, 0xE2, 0x60, 0xA9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x57, 0xF5, 0x00, 0x64, 0x94, 0xFB,
-        0x95, 0xFB, 0x96, 0xFB, 0x74, 0xFB, 0x65, 0xF3, 0x00, 0x75, 0x00, 0x72, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x93, 0xC7, 0xF3, 0xED, 0xE2, 0xCC, 0x84, 0x5A, 0xFB, 0x00, 0x60, 0x04, 0x64, 0x08, 0x60,
-        0x13, 0xFB, 0xE2, 0x60, 0xC7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60,
-        0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x64, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2B, 0x05, 0x00,
-        0x67, 0x44, 0x16, 0x60, 0xC1, 0xFB, 0x16, 0x60, 0xD1, 0xFB, 0x16, 0x60, 0xF6, 0xF9, 0x2D, 0x60,
-        0x86, 0x65, 0xE4, 0x60, 0x58, 0x4D, 0xE7, 0x78, 0xFF, 0xFF, 0x64, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x01, 0x2B, 0x05, 0x00, 0xFF, 0x60, 0xFF, 0x63, 0x16, 0x60, 0xC5, 0xFD, 0x08, 0x00, 0x2E, 0x60,
-        0x1E, 0x63, 0x16, 0x60, 0xC5, 0xFD, 0xE4, 0x60, 0x58, 0x4D, 0xFF, 0x78, 0xFF, 0xFF, 0xE4, 0x60,
-        0x58, 0x4D, 0x6E, 0x78, 0xFF, 0xFF, 0xE5, 0x60, 0x58, 0x4D, 0x18, 0x78, 0xFF, 0xFF, 0x57, 0xF5,
-        0x00, 0xF4, 0x65, 0xF1, 0x06, 0xF8, 0x17, 0x60, 0x22, 0xF3, 0x15, 0x60, 0xDD, 0xF1, 0xFB, 0x60,
-        0xFF, 0x65, 0x60, 0x44, 0xA4, 0x84, 0x60, 0x47, 0x64, 0x40, 0x10, 0x26, 0x04, 0xBC, 0x60, 0x47,
-        0x07, 0xFA, 0x2D, 0x60, 0x7E, 0x64, 0x40, 0x48, 0x10, 0x61, 0x00, 0x60, 0x00, 0x64, 0xE4, 0x60,
-        0x58, 0x4D, 0xA7, 0x78, 0xFF, 0xFF, 0x57, 0xF5, 0x3F, 0xFC, 0x5A, 0xF3, 0xC7, 0xF1, 0xAC, 0x83,
-        0x01, 0x64, 0x02, 0x02, 0x6B, 0xFB, 0x64, 0x43, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x04, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xCF, 0x83,
-        0x72, 0xF3, 0x5A, 0xFD, 0xDC, 0x84, 0x72, 0xFB, 0x5C, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0x5C, 0xFB,
-        0x03, 0x03, 0xE3, 0x60, 0xBD, 0x78, 0xFF, 0xFF, 0x0A, 0x64, 0x5C, 0xFB, 0xA2, 0x4C, 0x20, 0x27,
-        0xF8, 0x01, 0x46, 0x60, 0x50, 0x65, 0x72, 0x44, 0xD4, 0x80, 0xFF, 0xFF, 0xF2, 0x04, 0x5D, 0xFB,
-        0x40, 0x48, 0x94, 0xF3, 0x5E, 0xFB, 0x40, 0x4A, 0x95, 0xF3, 0x96, 0xF3, 0x40, 0x4C, 0x60, 0x41,
-        0x65, 0xF1, 0x40, 0x63, 0xAD, 0x80, 0xF0, 0xA3, 0x09, 0x02, 0x3C, 0x03, 0x2C, 0x41, 0x2A, 0x44,
-        0x40, 0x4C, 0x28, 0x44, 0x40, 0x4A, 0x00, 0x64, 0x40, 0x48, 0xF4, 0x01, 0xD1, 0x80, 0x01, 0x02,
-        0x31, 0x04, 0x10, 0xA3, 0x80, 0x60, 0x00, 0x65, 0xA5, 0x80, 0xCF, 0x83, 0x08, 0x02, 0x28, 0x44,
-        0x60, 0x88, 0x2A, 0x44, 0x70, 0x8A, 0x2C, 0x44, 0x70, 0x8C, 0xF1, 0x81, 0xF5, 0x01, 0xE7, 0xA3,
-        0x64, 0x44, 0x00, 0xA0, 0x00, 0x62, 0x02, 0x02, 0x00, 0x61, 0x1C, 0x00, 0xE0, 0x84, 0xDE, 0x82,
-        0xFD, 0x04, 0x42, 0xFE, 0xF8, 0x84, 0x62, 0x45, 0xC7, 0x83, 0x60, 0x45, 0x02, 0xFE, 0xD5, 0x84,
-        0x02, 0x05, 0x01, 0x05, 0x61, 0x44, 0xCF, 0x83, 0x60, 0x41, 0x08, 0x03, 0x28, 0x44, 0x60, 0x88,
-        0x2A, 0x44, 0x70, 0x8A, 0x2C, 0x44, 0x70, 0x8C, 0xF1, 0x81, 0xF1, 0x01, 0xCE, 0x82, 0xE9, 0x81,
-        0xFD, 0x02, 0xF1, 0x81, 0x61, 0x44, 0x00, 0xA8, 0xFF, 0xFF, 0x2F, 0x03, 0x73, 0x40, 0x5D, 0xF3,
-        0xFF, 0xFF, 0x60, 0x47, 0xE8, 0x84, 0xE8, 0x84, 0x5E, 0xF3, 0x3F, 0xB5, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x84, 0x61, 0x45, 0xD4, 0x84, 0xC0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x64, 0x44, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xC4, 0x85, 0x61, 0x44, 0xD4, 0x80, 0xFF, 0xFF, 0x0F, 0x03, 0x60, 0x53, 0xD4, 0x84,
-        0xFF, 0xFF, 0x74, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x01, 0xB4, 0x74, 0xFB, 0x13, 0x60, 0x06, 0xF3,
-        0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB, 0xE9, 0x60, 0xFB, 0x78, 0xFF, 0xFF,
-        0xC1, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x04, 0x64, 0x03, 0xFA, 0x00, 0xF4, 0x09, 0xF2, 0xFF, 0xFF,
-        0x60, 0x47, 0x00, 0x3A, 0x1C, 0x00, 0x60, 0x43, 0x00, 0x36, 0x1C, 0x00, 0xE0, 0xA0, 0xDA, 0x85,
-        0x16, 0x07, 0x26, 0x60, 0x16, 0x61, 0xA1, 0xD1, 0xFF, 0xFF, 0xD3, 0x80, 0xCB, 0x83, 0x0F, 0x02,
-        0x07, 0x0E, 0x59, 0xD3, 0xA5, 0xD0, 0xDA, 0x85, 0xD0, 0x80, 0xFF, 0xFF, 0x08, 0x02, 0xF9, 0x1F,
-        0x12, 0x1E, 0xA5, 0xD0, 0x59, 0xD3, 0xFF, 0xFF, 0x90, 0x80, 0xFF, 0x22, 0x0C, 0x00, 0xE4, 0x60,
-        0x63, 0x78, 0xFF, 0xFF, 0x13, 0x60, 0x44, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x03, 0x00,
-        0x26, 0x60, 0x38, 0x64, 0x02, 0x00, 0x26, 0x60, 0x16, 0x64, 0x16, 0x60, 0xCF, 0xFB, 0x26, 0x46,
-        0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8,
-        0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x66, 0xF1, 0x32, 0xF8, 0x67, 0xF1, 0x33, 0xF8,
-        0x68, 0xF1, 0x34, 0xF8, 0x00, 0x65, 0xEF, 0x60, 0x58, 0x4E, 0xDC, 0x78, 0xFF, 0xFF, 0x61, 0x44,
-        0x15, 0x60, 0xC2, 0xFB, 0x50, 0x63, 0x2A, 0xFC, 0xAB, 0xF3, 0x19, 0xFA, 0x00, 0x64, 0x3E, 0xFA,
-        0x87, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x65, 0xF1, 0x06, 0xF8, 0x17, 0x60, 0x22, 0xF3, 0x15, 0x60,
-        0xDD, 0xF1, 0xFB, 0x60, 0xFF, 0xB7, 0x64, 0x40, 0x10, 0x26, 0x04, 0xBC, 0x60, 0x47, 0x07, 0xFA,
-        0x2D, 0x60, 0xA6, 0x65, 0xE4, 0x60, 0x58, 0x4D, 0xE7, 0x78, 0xFF, 0xFF, 0x64, 0xF3, 0x2E, 0x60,
-        0x1E, 0x63, 0x60, 0x40, 0x01, 0x27, 0x67, 0x43, 0x16, 0x60, 0xD5, 0xFD, 0x2D, 0x60, 0x9E, 0x64,
-        0x40, 0x48, 0x10, 0x61, 0x00, 0x60, 0x00, 0x64, 0xE4, 0x60, 0x58, 0x4D, 0xA7, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x3F, 0xFC, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x20, 0x44, 0x80, 0x26, 0x11, 0x00,
-        0x80, 0xBC, 0x40, 0x40, 0x00, 0x64, 0x94, 0xFB, 0x95, 0xFB, 0x96, 0xFB, 0x74, 0xFB, 0x65, 0xF3,
-        0x00, 0x75, 0x00, 0x72, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x93, 0xC7, 0xF3, 0xED, 0xE2, 0xCC, 0x84,
-        0x5A, 0xFB, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x12, 0xFB,
-        0x5A, 0xDB, 0x00, 0x64, 0x72, 0xFB, 0x74, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x3E, 0x63, 0x18, 0x60,
-        0x94, 0x61, 0x59, 0xD1, 0x61, 0x46, 0x07, 0x1B, 0xFC, 0x1F, 0x2D, 0x60, 0xC8, 0x62, 0xA2, 0xDF,
-        0x01, 0x65, 0x00, 0x61, 0x16, 0x00, 0x18, 0x60, 0xD6, 0x61, 0x49, 0xD1, 0xCB, 0x83, 0xFD, 0x18,
-        0x63, 0x41, 0x04, 0xA1, 0x61, 0x45, 0x66, 0x43, 0x2D, 0x60, 0xC8, 0x64, 0xDC, 0x84, 0x60, 0xFE,
-        0xBD, 0xD1, 0xA0, 0xD9, 0xCD, 0x81, 0x20, 0xFE, 0xF9, 0x02, 0x66, 0x44, 0x18, 0x60, 0x96, 0x7C,
-        0xD0, 0x81, 0x5A, 0xF3, 0xC7, 0xF1, 0x2D, 0x60, 0xC6, 0x63, 0x00, 0xA0, 0x64, 0x5F, 0xBD, 0xDB,
-        0x0F, 0x60, 0x6D, 0xF1, 0x02, 0x02, 0x01, 0x18, 0x01, 0xB9, 0x61, 0x44, 0x60, 0xFE, 0xA3, 0xDB,
-        0xFC, 0xA3, 0x65, 0x44, 0x03, 0xA4, 0xA3, 0xDB, 0x20, 0xFE, 0x2D, 0x58, 0xFF, 0xFF, 0x17, 0x60,
-        0x23, 0xFB, 0xCD, 0x81, 0x28, 0xD3, 0x5A, 0x88, 0xDC, 0x83, 0x31, 0x18, 0xFB, 0x03, 0x61, 0x40,
-        0x7F, 0x3A, 0x06, 0x00, 0x17, 0x60, 0x23, 0xF3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x00, 0xF4,
-        0x60, 0xFE, 0xA3, 0xD1, 0x5D, 0xD8, 0x61, 0x40, 0x7F, 0x3A, 0x08, 0x00, 0x20, 0xFE, 0x17, 0x60,
-        0x23, 0xF3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x00, 0xF4, 0x60, 0xFE, 0xBF, 0xD3, 0x5D, 0xDA,
-        0xFF, 0xB4, 0x00, 0x7F, 0x12, 0x03, 0xDF, 0x83, 0x61, 0x40, 0x7F, 0x3A, 0x0A, 0x00, 0x20, 0xFE,
-        0x60, 0x45, 0x17, 0x60, 0x23, 0xF3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x65, 0x44, 0x00, 0xF4,
-        0x60, 0xFE, 0xBD, 0xD1, 0xCC, 0x84, 0x5D, 0xD8, 0xEF, 0x02, 0x20, 0xFE, 0xCB, 0x01, 0x17, 0x60,
-        0x23, 0xF1, 0xFD, 0xA1, 0xFF, 0xB1, 0xC1, 0x83, 0xA2, 0xDD, 0x2D, 0x58, 0xFF, 0xFF, 0x67, 0x5C,
-        0x14, 0x60, 0x26, 0x61, 0xA1, 0xD3, 0xA5, 0xD9, 0x10, 0x18, 0x60, 0x43, 0x2D, 0x60, 0xEE, 0x64,
-        0xA5, 0xDB, 0x60, 0xFE, 0xA0, 0xDD, 0x20, 0xFE, 0xDC, 0x84, 0xCF, 0x83, 0xE3, 0x83, 0x59, 0xD1,
-        0xDC, 0x84, 0x60, 0xFE, 0xA0, 0xD9, 0x20, 0xFE, 0xFA, 0x1F, 0x2D, 0x58, 0xFF, 0xFF, 0x15, 0x60,
-        0xDC, 0xF1, 0x15, 0x60, 0xDD, 0xF3, 0x64, 0x40, 0x01, 0x2A, 0x02, 0xBC, 0x64, 0x40, 0x02, 0x2A,
-        0x04, 0xBC, 0x64, 0x40, 0x04, 0x2A, 0xEF, 0xB4, 0x15, 0x60, 0xDD, 0xFB, 0x07, 0xB4, 0x60, 0xFE,
-        0x17, 0x60, 0x10, 0xFB, 0x20, 0xFE, 0x07, 0x7C, 0x15, 0x60, 0xDC, 0xF9, 0x2D, 0x58, 0xFF, 0xFF,
-        0x20, 0x40, 0x20, 0x2A, 0x0A, 0x00, 0x0A, 0x60, 0x77, 0xF1, 0x50, 0xF3, 0x2E, 0x60, 0x31, 0x63,
-        0x60, 0xFE, 0xBD, 0xD9, 0x60, 0x47, 0xA3, 0xDB, 0x20, 0xFE, 0x2D, 0x58, 0xFF, 0xFF, 0x0E, 0x57,
-        0x32, 0x40, 0x40, 0x26, 0x24, 0x00, 0x45, 0x48, 0x00, 0x60, 0x10, 0x61, 0xB5, 0x60, 0x58, 0x4D,
-        0x9F, 0x78, 0xFF, 0xFF, 0x1C, 0x03, 0xF2, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x00, 0x60, 0x48, 0x61,
-        0x28, 0x44, 0x59, 0xDA, 0x03, 0x64, 0x38, 0x43, 0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02,
-        0x39, 0x44, 0x59, 0xDA, 0x06, 0x64, 0x23, 0xFA, 0x1F, 0x60, 0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58,
-        0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26, 0x4F, 0x00, 0x45, 0x48, 0x00, 0x60, 0x68, 0x61,
-        0xB5, 0x60, 0x58, 0x4D, 0x9F, 0x78, 0xFF, 0xFF, 0x47, 0x03, 0xF2, 0x60, 0x01, 0x64, 0x24, 0xFA,
-        0x02, 0x60, 0x00, 0x61, 0x46, 0x4A, 0x38, 0x44, 0x54, 0x94, 0x03, 0x64, 0x01, 0x02, 0x09, 0x00,
-        0x06, 0x63, 0x4A, 0x61, 0x38, 0x46, 0xBD, 0xD0, 0xCC, 0x84, 0x2A, 0x46, 0x59, 0xD8, 0xFA, 0x02,
-        0x06, 0x00, 0xDA, 0x81, 0x38, 0x43, 0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02, 0x05, 0x63,
-        0x28, 0x44, 0x02, 0xA8, 0x25, 0xFA, 0x07, 0x02, 0x03, 0x64, 0x39, 0x43, 0xBD, 0xD1, 0xCC, 0x84,
-        0x59, 0xD8, 0xFC, 0x02, 0x08, 0x63, 0x28, 0x44, 0x03, 0xA8, 0x16, 0x60, 0x82, 0xF3, 0x0F, 0x03,
-        0xE8, 0x85, 0xC7, 0x85, 0x60, 0x43, 0xFE, 0xA3, 0x2D, 0x60, 0x06, 0x64, 0x58, 0xD1, 0xD9, 0x81,
-        0xA1, 0xD8, 0x7E, 0x2A, 0x02, 0x00, 0x00, 0xF4, 0x02, 0x61, 0xF8, 0x1F, 0x65, 0x43, 0x2A, 0x46,
-        0x23, 0xFC, 0x1F, 0x60, 0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40,
-        0x40, 0x26, 0x1B, 0x00, 0x45, 0x48, 0x00, 0x60, 0x06, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x9F, 0x78,
-        0xFF, 0xFF, 0x13, 0x03, 0x02, 0x64, 0x23, 0xFA, 0xF2, 0x60, 0x00, 0x64, 0x5A, 0xDA, 0x28, 0x44,
-        0x5A, 0xDA, 0xFF, 0xFF, 0x1F, 0x60, 0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x03, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE,
-        0xDD, 0x98, 0xFF, 0xFF, 0x97, 0xF1, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0C, 0x03,
-        0x08, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x05, 0x03, 0xA2, 0xDB, 0x02, 0x24, 0xC6, 0xFE, 0xDD, 0x98,
-        0xFF, 0xFF, 0xFF, 0x60, 0xFE, 0x64, 0xA2, 0xDB, 0xDD, 0x98, 0xFF, 0xFF, 0xA2, 0xFF, 0x32, 0x40,
-        0x40, 0x26, 0x3C, 0x00, 0x7B, 0xF3, 0x67, 0x43, 0xDC, 0x84, 0xCC, 0x84, 0x37, 0x03, 0x60, 0x46,
-        0x0A, 0x02, 0x7B, 0xFD, 0x00, 0x60, 0x46, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x9F, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x7B, 0xFB, 0x2C, 0x03, 0x46, 0x4B, 0x25, 0x60, 0xD0, 0x61, 0x18, 0x64, 0x23, 0xFA,
-        0xF1, 0x60, 0x00, 0x64, 0x24, 0xFA, 0x4A, 0x65, 0xA2, 0xFF, 0x2C, 0x63, 0x59, 0xD1, 0xA2, 0xDF,
-        0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF7, 0x1F, 0x12, 0x63,
-        0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F,
-        0x1F, 0x60, 0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x2B, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0xA6, 0xFE, 0x00, 0x64, 0x7B, 0xFB, 0xA3, 0xFF, 0xCA, 0x60,
-        0x7E, 0x78, 0xFF, 0xFF, 0xA6, 0xFE, 0xBA, 0x05, 0xA7, 0xFE, 0x0A, 0x05, 0xA5, 0xFE, 0x03, 0x04,
-        0xE6, 0x60, 0x8E, 0x78, 0xFF, 0xFF, 0xA4, 0xFE, 0xF2, 0x04, 0xE7, 0x60, 0x1F, 0x78, 0xFF, 0xFF,
-        0x36, 0x45, 0x19, 0x60, 0x86, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x28, 0xF3, 0x7D, 0xF1,
-        0x60, 0x47, 0x07, 0xB4, 0x4E, 0xFB, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02,
-        0x9D, 0x84, 0xA1, 0x80, 0xA0, 0x83, 0x15, 0x03, 0x7D, 0xFD, 0x08, 0x60, 0x24, 0xF1, 0x00, 0x60,
-        0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x31, 0x44, 0xDE, 0xB4, 0x40, 0x51, 0x01, 0x7C,
-        0xBC, 0xF9, 0x49, 0xF3, 0x01, 0x63, 0x60, 0x40, 0xFF, 0x26, 0x49, 0xFD, 0xCA, 0x60, 0x7E, 0x78,
-        0xFF, 0xFF, 0xE6, 0x60, 0x8E, 0x78, 0xFF, 0xFF, 0x26, 0x60, 0xB0, 0x63, 0xBD, 0xD3, 0xBD, 0xD1,
-        0xBD, 0xD1, 0xB0, 0x84, 0xB0, 0x84, 0xFF, 0xFF, 0x07, 0x02, 0x6A, 0xFB, 0x31, 0x44, 0xFE, 0xB4,
-        0x40, 0x51, 0x0D, 0x64, 0x05, 0xFB, 0x1A, 0x00, 0x28, 0xF3, 0xFF, 0xFF, 0x13, 0x60, 0x52, 0xF3,
-        0xC5, 0xFB, 0x64, 0xFB, 0x0F, 0x60, 0x85, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x46, 0x5E,
-        0x31, 0x44, 0x21, 0xBC, 0x40, 0x51, 0xED, 0xE2, 0x0F, 0x4E, 0xD0, 0x60, 0x58, 0x4F, 0xA8, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0x00, 0x00, 0xE8, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0xD7, 0xFE, 0xCA, 0x60,
-        0x7E, 0x78, 0xFF, 0xFF, 0x2E, 0xF5, 0x27, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46,
-        0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF,
-        0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE, 0x60, 0x43,
-        0x61, 0x46, 0x26, 0x02, 0x0B, 0x60, 0x82, 0xF3, 0xDA, 0x81, 0x60, 0x45, 0xD5, 0x80, 0xA1, 0xD1,
-        0x04, 0x03, 0xD3, 0x80, 0xD9, 0x81, 0xFA, 0x02, 0x08, 0x00, 0xA1, 0xDD, 0xD9, 0x84, 0x0B, 0x60,
-        0x82, 0xFB, 0x4A, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xA2, 0xDB, 0x66, 0x45, 0x63, 0x46, 0x06, 0xF2,
-        0xFF, 0x60, 0x01, 0x7C, 0xA0, 0x9C, 0x06, 0xF8, 0x65, 0x46, 0x70, 0xF3, 0x60, 0x40, 0x10, 0x2A,
-        0x03, 0x00, 0xCC, 0x84, 0x80, 0x2B, 0x70, 0xFB, 0xE7, 0x60, 0x58, 0x4E, 0x81, 0x78, 0xFF, 0xFF,
-        0xAD, 0x01, 0x2E, 0xF5, 0x28, 0xF0, 0x18, 0x60, 0x12, 0xF9, 0x27, 0xF2, 0x15, 0x60, 0x02, 0x65,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2,
-        0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46,
-        0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3,
-        0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x12, 0x02, 0x63, 0x46, 0x06, 0xF2, 0xFF, 0xFF, 0x02, 0xB0,
-        0x08, 0xBC, 0x0C, 0x03, 0x06, 0xFA, 0xE7, 0x60, 0x58, 0x4E, 0x81, 0x78, 0xFF, 0xFF, 0x08, 0x60,
-        0x1E, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x6F, 0x01, 0x01, 0x64,
-        0x51, 0xFB, 0x28, 0x60, 0x4E, 0x64, 0x52, 0xFB, 0x15, 0x60, 0xC3, 0xF3, 0xFF, 0xFF, 0x15, 0x18,
-        0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x10, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE7, 0x60,
-        0x3D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2B, 0x60, 0x88, 0x61, 0xFF, 0x60,
-        0x80, 0x65, 0xA1, 0xD3, 0xFF, 0xFF, 0xA4, 0x80, 0x59, 0xD3, 0x05, 0x02, 0x04, 0x1B, 0x59, 0xD3,
-        0xFF, 0xFF, 0x01, 0x1B, 0x15, 0x00, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x08, 0x60,
-        0x1B, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xE7, 0x60, 0x60, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x00, 0x60, 0x04, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x9F, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x23, 0xFA,
-        0xF1, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x1F, 0x60, 0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x00, 0x60, 0x30, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xD2, 0x60, 0xB5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0xCA, 0x60, 0x7E, 0x78,
-        0xFF, 0xFF, 0x0E, 0x57, 0x63, 0x46, 0x43, 0x47, 0x22, 0xF2, 0x76, 0xF2, 0x02, 0x1B, 0x01, 0x1B,
-        0x0C, 0x00, 0x60, 0x46, 0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78,
-        0xFF, 0xFF, 0x27, 0x46, 0x76, 0xF2, 0xFF, 0xFF, 0xF4, 0x1B, 0x37, 0x58, 0xFF, 0xFF, 0xE7, 0x60,
-        0x9F, 0x64, 0x08, 0x60, 0x2A, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64,
-        0x08, 0x60, 0x21, 0xFB, 0x5A, 0xDB, 0x10, 0x60, 0x42, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x2F, 0x58,
-        0xFF, 0xFF, 0x28, 0xF3, 0x7D, 0xF1, 0x60, 0x47, 0x07, 0xB4, 0x4E, 0xFB, 0x01, 0x61, 0x03, 0x03,
-        0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0xA1, 0x80, 0xB1, 0x83, 0x16, 0x02, 0xCF, 0x85, 0xA7, 0x80,
-        0x7D, 0xFD, 0x0B, 0x02, 0x01, 0x65, 0xE5, 0x60, 0x58, 0x4E, 0xA6, 0x78, 0xFF, 0xFF, 0x31, 0x44,
-        0xDF, 0xB4, 0x40, 0x51, 0xD0, 0x60, 0xD9, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x21, 0xF1, 0x00, 0x60,
-        0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xE6, 0x60, 0x8E, 0x78, 0xFF, 0xFF, 0x28, 0xF3,
-        0x7D, 0xF1, 0x60, 0x47, 0x07, 0xB4, 0x4E, 0xFB, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81,
-        0xFD, 0x02, 0x9D, 0x84, 0xA1, 0x80, 0xA0, 0x83, 0x13, 0x03, 0x7D, 0xFD, 0x08, 0x60, 0x24, 0xF1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x7D, 0xF1, 0x31, 0x44, 0x64, 0x40,
-        0xFF, 0x26, 0x03, 0x00, 0x21, 0xBC, 0x40, 0x51, 0x03, 0x00, 0xCA, 0x60, 0x7E, 0x78, 0xFF, 0xFF,
-        0xE6, 0x60, 0x8E, 0x78, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26, 0x1B, 0x00, 0x45, 0x48,
-        0x00, 0x60, 0x06, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0x9F, 0x78, 0xFF, 0xFF, 0x13, 0x03, 0x02, 0x64,
-        0x23, 0xFA, 0xF2, 0x60, 0x04, 0x64, 0x5A, 0xDA, 0x28, 0x44, 0x5A, 0xDA, 0xFF, 0xFF, 0x1F, 0x60,
-        0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0x79, 0xF3, 0xFF, 0xFF, 0x00, 0xA8,
-        0x60, 0x46, 0x0E, 0xF2, 0x59, 0x03, 0x60, 0x40, 0xF0, 0x37, 0x46, 0x00, 0xFF, 0x37, 0x3B, 0x00,
-        0xFD, 0x37, 0x33, 0x00, 0x18, 0x37, 0x27, 0x00, 0xFE, 0x37, 0x2A, 0x00, 0xF8, 0x37, 0x0A, 0x00,
-        0x60, 0x47, 0xFF, 0xB5, 0x10, 0x60, 0x24, 0x62, 0x46, 0xD1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xD8, 0x01, 0x06, 0xB4, 0xFD, 0x7F, 0x0E, 0xFA, 0x1E, 0x60,
-        0xF8, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xF9, 0xFE, 0xC9, 0x01, 0xDE, 0x60, 0x58, 0x4F, 0x6C, 0x78, 0xFF, 0xFF, 0x14, 0x00,
-        0xE1, 0x60, 0x58, 0x4F, 0x32, 0x78, 0xFF, 0xFF, 0xBF, 0x03, 0x23, 0xF0, 0x60, 0x40, 0x04, 0x26,
-        0xE3, 0x1B, 0x02, 0x26, 0xE1, 0x18, 0xA2, 0xFF, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80,
-        0x8F, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0x8F, 0xFB, 0x1F, 0x60, 0x20, 0x64, 0x40, 0x4B, 0xF6, 0x60,
-        0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF, 0xA8, 0x01, 0xAC, 0xFE, 0x09, 0x05, 0xAD, 0xFE, 0x0F, 0x05,
-        0xAE, 0xFE, 0xA2, 0x05, 0xAF, 0xFE, 0x37, 0x05, 0xCA, 0x60, 0x7E, 0x78, 0xFF, 0xFF, 0x08, 0x60,
-        0x11, 0xF1, 0x20, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xF5, 0x01, 0x10, 0x60,
-        0x56, 0x65, 0x03, 0x61, 0x07, 0x00, 0xA2, 0xDD, 0x58, 0x4F, 0x64, 0x58, 0xFF, 0xFF, 0x00, 0xB9,
-        0xFF, 0xFF, 0x08, 0x03, 0x00, 0x63, 0xA5, 0xD1, 0x5A, 0xD3, 0xDA, 0x85, 0x00, 0xA8, 0xCD, 0x81,
-        0xF2, 0x02, 0xF8, 0x02, 0xE1, 0x01, 0x10, 0x60, 0x20, 0x62, 0x10, 0x60, 0x46, 0x65, 0xE8, 0x60,
-        0xA9, 0x63, 0x5A, 0xDF, 0xD6, 0x80, 0xFF, 0xFF, 0x04, 0x03, 0x5A, 0xDF, 0x5A, 0xDF, 0x5A, 0xDD,
-        0xF9, 0x01, 0x10, 0x60, 0x54, 0x65, 0x5A, 0xDF, 0xD6, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x5A, 0xDD,
-        0xFB, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x24, 0x64, 0x40, 0x41, 0x10, 0x60, 0x22, 0x63,
-        0xA3, 0xD1, 0x00, 0x64, 0xD0, 0x80, 0x06, 0x61, 0x08, 0x03, 0xBD, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF,
-        0xB0, 0x84, 0xCD, 0x81, 0xA3, 0xDB, 0x06, 0xA3, 0xF9, 0x02, 0x10, 0x60, 0x48, 0x63, 0xA3, 0xD1,
-        0x00, 0x64, 0xD0, 0x80, 0x07, 0x61, 0x19, 0x03, 0xBD, 0xDB, 0x64, 0x44, 0xFE, 0xA3, 0x02, 0xA3,
-        0xCD, 0x81, 0xE8, 0x84, 0xE3, 0x03, 0x02, 0x05, 0xE1, 0x03, 0xF9, 0x01, 0x77, 0xFB, 0x79, 0xFD,
-        0x61, 0x5C, 0xA3, 0xD3, 0x78, 0xF9, 0x03, 0x18, 0x58, 0x4F, 0x60, 0x58, 0xFF, 0xFF, 0x79, 0xF3,
-        0x78, 0xF1, 0x60, 0x43, 0x77, 0xF3, 0x64, 0x41, 0xEA, 0x01, 0x21, 0x43, 0x10, 0x60, 0x48, 0x65,
-        0xD7, 0x80, 0xBD, 0xD1, 0xBD, 0xD3, 0x03, 0x02, 0xCA, 0x60, 0x7E, 0x78, 0xFF, 0xFF, 0xA0, 0x84,
-        0xBD, 0xD1, 0x43, 0x41, 0xF5, 0x03, 0xE8, 0x60, 0xAE, 0x64, 0x64, 0x58, 0x40, 0x4F, 0x2A, 0xF0,
-        0x83, 0x60, 0xFF, 0x65, 0x64, 0x47, 0x03, 0x2B, 0x01, 0x00, 0x17, 0x00, 0x03, 0x26, 0x03, 0xAC,
-        0x60, 0x47, 0xA4, 0x84, 0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2,
-        0x2E, 0xFA, 0x64, 0x41, 0xCB, 0xF3, 0x2F, 0xFA, 0x60, 0x43, 0xCC, 0xF3, 0x30, 0xFA, 0xCD, 0xF1,
-        0x31, 0xF8, 0x32, 0xFC, 0x33, 0xFA, 0x34, 0xF8, 0x19, 0x00, 0x60, 0x47, 0xA4, 0x84, 0x2A, 0xFA,
-        0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x36, 0xF2, 0x32, 0xFA,
-        0x37, 0xF2, 0x33, 0xFA, 0x38, 0xF2, 0x34, 0xFA, 0xCB, 0xF3, 0x2F, 0xFA, 0x36, 0xFA, 0xCC, 0xF3,
-        0x30, 0xFA, 0x37, 0xFA, 0xCD, 0xF3, 0x31, 0xFA, 0x38, 0xFA, 0x64, 0x41, 0x1C, 0xF2, 0x13, 0xFA,
-        0x00, 0xF4, 0x0D, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B, 0x28, 0x00, 0x26, 0x46, 0x04, 0x63,
-        0x03, 0xFC, 0x00, 0xF4, 0x0D, 0xF2, 0x06, 0xFA, 0xEA, 0x60, 0x58, 0x4E, 0x49, 0x78, 0xFF, 0xFF,
-        0xFF, 0xA0, 0x59, 0xF5, 0x19, 0x02, 0x39, 0xF2, 0x26, 0x46, 0x3F, 0xFA, 0x00, 0xF4, 0x00, 0x60,
-        0x81, 0x67, 0x0D, 0xFA, 0x7C, 0x64, 0x01, 0xFA, 0x26, 0x46, 0x00, 0x64, 0x3E, 0xFA, 0x1E, 0x60,
-        0xE0, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xC8, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xF0,
-        0x42, 0x64, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x04, 0x3F, 0xFA, 0x1C, 0xF2, 0x13, 0xFA, 0x26, 0xF2,
-        0x27, 0xF0, 0x60, 0x47, 0x00, 0xF4, 0x1F, 0xFA, 0x64, 0x47, 0x20, 0xFA, 0x61, 0x44, 0x21, 0xFA,
-        0x01, 0x67, 0x0D, 0xFA, 0x10, 0x61, 0x26, 0x60, 0x64, 0x64, 0x1E, 0x63, 0x58, 0xD1, 0xCD, 0x81,
-        0xBD, 0xD8, 0xFC, 0x02, 0x9A, 0xF1, 0xB7, 0xF1, 0x64, 0x5E, 0x64, 0x5F, 0x44, 0x63, 0xBD, 0xDA,
-        0x13, 0x60, 0x2F, 0xF3, 0xFF, 0xFF, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x09, 0xBC, 0x4A, 0xD3,
-        0x60, 0x45, 0x60, 0x40, 0x01, 0x36, 0x03, 0x64, 0x02, 0x36, 0x01, 0x64, 0xB4, 0x84, 0x06, 0xA2,
-        0xA2, 0xD1, 0xBD, 0xDA, 0x64, 0x47, 0xBD, 0xDA, 0xB4, 0xF3, 0xB5, 0xF1, 0x60, 0x47, 0xBD, 0xDA,
-        0x64, 0x47, 0xC3, 0xF1, 0xBD, 0xDA, 0x64, 0x44, 0xBD, 0xDA, 0x26, 0x46, 0x00, 0x64, 0x23, 0xF0,
-        0x3B, 0xF0, 0x64, 0x40, 0x10, 0x2A, 0x06, 0x00, 0xC0, 0x67, 0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0x10, 0xBC, 0x3E, 0xFA, 0x1E, 0x60, 0xE0, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x04, 0x60, 0x5C, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0xA2, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x59, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x2F, 0x58, 0xFF, 0xFF, 0x59, 0xF5, 0xAB, 0xF1,
-        0x19, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x08, 0x64, 0x2A, 0xFA, 0x80, 0x7E, 0xF8, 0x7F, 0x0E, 0xFA,
-        0x87, 0xF1, 0x07, 0xF8, 0x01, 0x60, 0x60, 0x67, 0x2C, 0xFA, 0x1D, 0x60, 0x00, 0x67, 0x2D, 0xFA,
-        0x01, 0x60, 0x00, 0x67, 0x2E, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8, 0x32, 0xF8, 0xCC, 0xF1, 0x30, 0xF8,
-        0x33, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0x34, 0xF8, 0x00, 0x63, 0x3B, 0xFC, 0x3D, 0xFC, 0x01, 0x64,
-        0x3A, 0xFA, 0x66, 0x64, 0x39, 0xFA, 0x3C, 0xFC, 0xAA, 0x60, 0xAA, 0x64, 0x00, 0xF4, 0x02, 0xFA,
-        0x00, 0x60, 0x03, 0x64, 0x5A, 0xDA, 0x1D, 0x60, 0x60, 0x64, 0x5A, 0xDA, 0x01, 0x60, 0x00, 0x64,
-        0x5A, 0xDA, 0x81, 0x7F, 0x18, 0x7E, 0x08, 0xFA, 0x01, 0x60, 0x01, 0x64, 0x0A, 0xFA, 0x00, 0x64,
-        0x0E, 0xFA, 0x2D, 0x58, 0xFF, 0xFF, 0x59, 0xF5, 0x3D, 0xF2, 0x3C, 0xF2, 0xCC, 0x83, 0x00, 0xA8,
-        0x03, 0x03, 0x08, 0x28, 0x3D, 0xFC, 0x42, 0x00, 0x3D, 0xFA, 0x3A, 0xF2, 0x3B, 0xF0, 0x00, 0x63,
-        0x00, 0xF4, 0x07, 0xFC, 0x01, 0xB0, 0x0B, 0xFA, 0x19, 0x03, 0x1F, 0xF8, 0xFF, 0xFF, 0x18, 0x64,
-        0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x1F, 0xF2, 0x1E, 0xF0, 0x59, 0xF5, 0x00, 0xA8, 0x3B, 0xF8, 0xD0, 0x80, 0x06, 0x03, 0x05, 0x03,
-        0x04, 0x60, 0x5C, 0x63, 0x0F, 0x64, 0x3A, 0xFA, 0x39, 0xFC, 0x00, 0xF4, 0x00, 0x64, 0x06, 0xFA,
-        0xEA, 0x60, 0x58, 0x4E, 0x49, 0x78, 0xFF, 0xFF, 0x59, 0xF5, 0x00, 0xF4, 0x81, 0x60, 0x00, 0x64,
-        0x06, 0xFA, 0x32, 0x47, 0x07, 0xFA, 0xB7, 0xF1, 0x00, 0x7F, 0x64, 0x5E, 0x09, 0xFA, 0x59, 0xF5,
-        0x00, 0x64, 0x15, 0xFA, 0x39, 0xF2, 0x3F, 0xFA, 0x1E, 0x60, 0xCE, 0x64, 0x0F, 0x60, 0x90, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xE3, 0x60, 0xC0, 0x78,
-        0xFF, 0xFF, 0x66, 0x45, 0x0E, 0xF2, 0x0F, 0xF0, 0x10, 0xF0, 0x64, 0x41, 0x01, 0xA8, 0x59, 0xF5,
-        0x09, 0x02, 0xAD, 0x83, 0x64, 0x44, 0xAC, 0x84, 0x08, 0x24, 0x0A, 0x63, 0x3C, 0xFC, 0x3D, 0xFC,
-        0x1A, 0x02, 0x2D, 0x00, 0x03, 0x3A, 0x03, 0x00, 0x00, 0x64, 0x3C, 0xFA, 0x29, 0x00, 0x04, 0x3A,
-        0x09, 0x00, 0x0A, 0x64, 0x3C, 0xFA, 0x01, 0x64, 0x3A, 0xFA, 0x00, 0xF4, 0x00, 0x64, 0x1F, 0xFA,
-        0x1E, 0xFA, 0x1E, 0x00, 0x02, 0x3A, 0x1E, 0x00, 0x64, 0x44, 0xAD, 0x83, 0xAC, 0x84, 0x02, 0x03,
-        0x3C, 0xFC, 0x3D, 0xFC, 0x15, 0x03, 0x3A, 0xFA, 0xF8, 0x65, 0x52, 0x63, 0x64, 0x44, 0x01, 0x36,
-        0x0D, 0x00, 0x12, 0xA3, 0x64, 0x40, 0x02, 0x2A, 0x02, 0x00, 0xC7, 0x83, 0xC7, 0x83, 0x64, 0x40,
-        0x08, 0x2A, 0x01, 0x00, 0xC7, 0x83, 0x64, 0x40, 0x04, 0x26, 0xC7, 0x83, 0x39, 0xFC, 0x00, 0x64,
-        0x2E, 0x58, 0xFF, 0xFF, 0x3B, 0xF0, 0x3A, 0xF2, 0x65, 0x46, 0x06, 0xF2, 0x40, 0x47, 0x1C, 0x18,
-        0x32, 0x47, 0x07, 0xFA, 0x18, 0x7E, 0x81, 0x7F, 0x08, 0xFA, 0x01, 0x60, 0x01, 0x63, 0xB7, 0xF3,
-        0x0A, 0xFC, 0x00, 0x7F, 0x09, 0xFA, 0x27, 0x40, 0x01, 0x2A, 0x0E, 0x00, 0x1F, 0xF8, 0x18, 0x64,
-        0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x1E, 0xF0, 0x59, 0xF5, 0x3B, 0xF8, 0x65, 0x46, 0x27, 0x40, 0x02, 0x26, 0x02, 0x00, 0x00, 0xF4,
-        0x13, 0x00, 0x6E, 0x61, 0xFF, 0x60, 0xFE, 0x64, 0x00, 0x60, 0x0E, 0x63, 0x58, 0xD1, 0x59, 0xD8,
-        0xFD, 0x1F, 0x01, 0x60, 0xEE, 0x63, 0x00, 0xF4, 0x02, 0x61, 0x58, 0xD1, 0x59, 0xD8, 0x7E, 0x3A,
-        0x02, 0x00, 0x00, 0xF4, 0x02, 0x61, 0xF9, 0x1F, 0x27, 0x40, 0x04, 0x26, 0x1A, 0x00, 0x46, 0x4B,
-        0x0F, 0x60, 0x67, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x0E, 0x03, 0x89, 0xF0, 0xEB, 0x60,
-        0x58, 0x4D, 0x00, 0x78, 0xFF, 0xFF, 0x65, 0x44, 0xAC, 0x86, 0xFF, 0xFF, 0x08, 0x03, 0xEB, 0x60,
-        0x58, 0x4D, 0x00, 0x78, 0xFF, 0xFF, 0x04, 0x00, 0x2B, 0x46, 0x82, 0xFC, 0x00, 0xF4, 0x82, 0xFC,
-        0x00, 0xF4, 0x27, 0x40, 0x08, 0x26, 0x19, 0x00, 0x46, 0x4B, 0x0F, 0x60, 0x85, 0xF3, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x0E, 0x03, 0x89, 0xF0, 0xEB, 0x60, 0x58, 0x4D, 0x00, 0x78, 0xFF, 0xFF,
-        0x65, 0x44, 0xAC, 0x86, 0xFF, 0xFF, 0x08, 0x03, 0xEB, 0x60, 0x58, 0x4D, 0x00, 0x78, 0xFF, 0xFF,
-        0x04, 0x00, 0x65, 0x46, 0x02, 0xFA, 0x00, 0xF4, 0x82, 0xFC, 0x01, 0x64, 0x2E, 0x58, 0xFF, 0xFF,
-        0x01, 0x61, 0x02, 0x64, 0x7A, 0x63, 0x58, 0xD0, 0xAB, 0x46, 0xA0, 0xD8, 0xAB, 0x46, 0xFB, 0x1F,
-        0xAB, 0x46, 0x00, 0xF4, 0xCD, 0x81, 0xAB, 0x46, 0x00, 0xF4, 0xF3, 0x02, 0x2D, 0x58, 0xFF, 0xFF,
-        0x00, 0x60, 0x2A, 0x61, 0xB5, 0x60, 0x58, 0x4D, 0xA2, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x58, 0xFB,
-        0x04, 0x64, 0x03, 0xFA, 0x67, 0x44, 0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0x32, 0xFA, 0x33, 0xFA,
-        0x34, 0xFA, 0x12, 0x60, 0x80, 0x64, 0x87, 0xF1, 0x0E, 0xFA, 0x07, 0xF8, 0x00, 0x64, 0x3E, 0xFA,
-        0x0A, 0x60, 0x07, 0xFB, 0x06, 0xA2, 0x10, 0x60, 0x5C, 0x64, 0xA2, 0xDB, 0x04, 0x64, 0x5A, 0xDB,
-        0x06, 0x64, 0x5A, 0xDB, 0xED, 0x60, 0xD9, 0x64, 0x08, 0x60, 0x2D, 0xFB, 0x00, 0x64, 0x0A, 0x60,
-        0x0D, 0xFB, 0x06, 0xA2, 0x10, 0x60, 0x60, 0x64, 0xA2, 0xDB, 0x08, 0x64, 0x5A, 0xDB, 0x06, 0x64,
-        0x5A, 0xDB, 0xED, 0x60, 0xE2, 0x64, 0x08, 0x60, 0x2F, 0xFB, 0xED, 0x60, 0xBE, 0x64, 0x08, 0x60,
-        0x28, 0xFB, 0x00, 0x60, 0x30, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEB, 0x60, 0x58, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0xED, 0x60, 0x70, 0x78, 0xFF, 0xFF,
-        0x58, 0xF5, 0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1, 0x31, 0xF8, 0xAB, 0xF1,
-        0x19, 0xF8, 0x58, 0xF5, 0x40, 0x64, 0x2A, 0xFA, 0x64, 0xF3, 0x63, 0xFB, 0x08, 0x60, 0x1B, 0xF1,
-        0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x03, 0x00,
-        0xEC, 0x60, 0xCB, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xC0, 0xF3, 0xEF, 0x60, 0x58, 0x4E, 0xAB, 0x78,
-        0xFF, 0xFF, 0x15, 0x60, 0xC2, 0xFB, 0x15, 0x60, 0xBC, 0xF3, 0x3F, 0x40, 0x01, 0x27, 0x08, 0x00,
-        0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xEE, 0x60, 0x58, 0x4E, 0x26, 0x78, 0xFF, 0xFF, 0x05, 0x00,
-        0x0F, 0xB4, 0xEE, 0x60, 0x58, 0x4E, 0x26, 0x78, 0xFF, 0xFF, 0x58, 0xF5, 0x2D, 0x60, 0x94, 0x64,
-        0x00, 0xF4, 0x40, 0x48, 0x28, 0x60, 0x4E, 0x64, 0x20, 0x40, 0x10, 0x27, 0x02, 0x00, 0x28, 0x60,
-        0x2C, 0x64, 0x28, 0xDB, 0x04, 0x61, 0x00, 0x60, 0x00, 0x64, 0xE4, 0x60, 0x58, 0x4D, 0xA7, 0x78,
-        0xFF, 0xFF, 0x58, 0xF5, 0x3F, 0xFC, 0x01, 0x64, 0x52, 0xF1, 0x0C, 0x60, 0x81, 0xFB, 0x64, 0xFB,
-        0xA4, 0xD3, 0x04, 0x65, 0x51, 0xF3, 0x01, 0x18, 0x0C, 0x65, 0xF3, 0xB4, 0xB4, 0x84, 0x51, 0xFB,
-        0x0D, 0x00, 0xED, 0x60, 0x70, 0x78, 0xFF, 0xFF, 0x51, 0xF1, 0x64, 0xF3, 0xFF, 0xFF, 0xF3, 0xA0,
-        0x04, 0xA4, 0x01, 0x04, 0xF1, 0xA4, 0x10, 0x36, 0xF4, 0x01, 0x64, 0xFB, 0x64, 0xF3, 0x15, 0x60,
-        0xC3, 0xF1, 0xCC, 0x84, 0x01, 0x61, 0x08, 0x24, 0x03, 0x00, 0xE1, 0x81, 0xCC, 0x84, 0xFB, 0x01,
-        0xA1, 0x84, 0x51, 0xF1, 0xEA, 0x03, 0x0C, 0x60, 0x81, 0xFB, 0x9D, 0xFE, 0x3D, 0x05, 0xBA, 0xFE,
-        0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x1C, 0xFB, 0xEB, 0x60, 0xD0, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x64, 0xF1, 0x0F, 0x60, 0x9D, 0xF9, 0x08, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEB, 0x60,
-        0xF5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x08, 0x60, 0x11, 0xF1,
-        0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x18, 0x60, 0x07, 0xF1, 0xAD, 0x4F,
-        0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x64, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02, 0x64, 0x40,
-        0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEB, 0x60, 0xCD, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x64, 0xF1, 0x0F, 0x60, 0x9D, 0xF9, 0x0E, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEC, 0x60,
-        0x2D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x08, 0x60, 0x11, 0xF1,
-        0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x58, 0xF5, 0x1E, 0x60, 0xD4, 0x64, 0x0F, 0x60, 0x90, 0xFB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x64, 0x4F, 0xFB, 0x00, 0x60, 0x01, 0x64,
-        0x08, 0x60, 0x1C, 0xFB, 0xEC, 0x60, 0x51, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xA5, 0xF1, 0x0A, 0x60, 0x09, 0xF9,
-        0x14, 0x60, 0x0E, 0x64, 0x0F, 0x60, 0xA5, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0xA6, 0xF1, 0x0A, 0x60, 0x0F, 0xF9, 0x1F, 0x60, 0x48, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xFD, 0x1B,
-        0x14, 0x60, 0x1A, 0x64, 0x0F, 0x60, 0xA5, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x00, 0x60, 0x08, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEC, 0x60, 0x7A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x4F, 0xF1, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x64, 0x40,
-        0xFF, 0x26, 0x0B, 0x00, 0x51, 0xF3, 0xFF, 0xFF, 0x80, 0xB0, 0xFF, 0xFF, 0x03, 0x03, 0xED, 0x60,
-        0x6A, 0x78, 0xFF, 0xFF, 0xEB, 0x60, 0xB4, 0x78, 0xFF, 0xFF, 0x02, 0x0A, 0x00, 0x64, 0x4F, 0xFB,
-        0xA7, 0xF1, 0x0A, 0x60, 0x0F, 0xF9, 0x00, 0x60, 0x0C, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEC, 0x60,
-        0xA5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x14, 0x60, 0x1A, 0x64, 0x0F, 0x60, 0xA5, 0xFB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60,
-        0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0B, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0x1A, 0x64,
-        0x0F, 0x60, 0xA5, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x13, 0x00, 0xFF, 0x60,
-        0xF7, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x4F, 0xF3, 0xDE, 0x0A, 0x00, 0xA0, 0x00, 0x64, 0x02, 0x03,
-        0x4F, 0xFB, 0xD9, 0x01, 0x14, 0x60, 0x0E, 0x64, 0x0F, 0x60, 0xA5, 0xFB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0xB7, 0x01, 0x15, 0x60, 0xC1, 0xF3, 0xEF, 0x60, 0x58, 0x4E, 0xAB, 0x78,
-        0xFF, 0xFF, 0x15, 0x60, 0xC2, 0xFB, 0x15, 0x60, 0xBD, 0xF3, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84,
-        0xEE, 0x60, 0x58, 0x4E, 0x26, 0x78, 0xFF, 0xFF, 0x58, 0xF5, 0x2D, 0x60, 0x94, 0x64, 0x00, 0xF4,
-        0x40, 0x48, 0x28, 0x60, 0x4E, 0x64, 0x20, 0x40, 0x10, 0x27, 0x02, 0x00, 0x28, 0x60, 0x2C, 0x64,
-        0x28, 0xDB, 0x04, 0x61, 0x00, 0x60, 0x00, 0x64, 0xE4, 0x60, 0x58, 0x4D, 0xA7, 0x78, 0xFF, 0xFF,
-        0x58, 0xF5, 0x3F, 0xFC, 0x51, 0xF3, 0x20, 0x40, 0x10, 0x23, 0x02, 0x00, 0x20, 0xBC, 0x04, 0x00,
-        0x60, 0x40, 0x01, 0x22, 0x40, 0xBC, 0x04, 0xBC, 0x80, 0xBC, 0x51, 0xFB, 0x11, 0x60, 0x16, 0x64,
-        0x08, 0x60, 0x46, 0xFB, 0x06, 0x64, 0x08, 0x60, 0x4D, 0xFB, 0x15, 0x60, 0xC6, 0xF3, 0xFF, 0xFF,
-        0x07, 0xB4, 0xA2, 0xDB, 0x51, 0xF3, 0x08, 0x60, 0x46, 0xF1, 0x60, 0x40, 0x20, 0x26, 0x03, 0x00,
-        0x01, 0x26, 0x32, 0x00, 0x45, 0x00, 0x08, 0x60, 0x4D, 0xF3, 0xFF, 0xFF, 0xDD, 0xA0, 0x01, 0xA4,
-        0x57, 0x03, 0xA2, 0xDB, 0x2B, 0x60, 0x88, 0x61, 0xE0, 0xA0, 0xF0, 0xA0, 0x05, 0x05, 0x01, 0x05,
-        0x05, 0x00, 0x02, 0xA1, 0xF0, 0xA4, 0x02, 0x00, 0x04, 0xA1, 0xE0, 0xA4, 0xA1, 0xD1, 0x01, 0x61,
-        0xDC, 0x84, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0xE1, 0x81, 0xFB, 0x01, 0xA1, 0x80, 0x10, 0x60,
-        0x9A, 0x64, 0x01, 0x02, 0xE0, 0x01, 0xA0, 0xD3, 0x11, 0x60, 0x0E, 0x63, 0xFA, 0xA4, 0xCC, 0x84,
-        0x08, 0xA3, 0xFD, 0x02, 0xB1, 0xF1, 0xA3, 0xD3, 0x01, 0x18, 0xD5, 0x18, 0xFE, 0xA3, 0xA3, 0xD3,
-        0x64, 0xFB, 0xEB, 0x60, 0xCD, 0x78, 0xFF, 0xFF, 0x11, 0x60, 0xF4, 0x65, 0x64, 0x41, 0xA1, 0xD3,
-        0xD5, 0x80, 0x00, 0xB8, 0x25, 0x07, 0x02, 0x02, 0x08, 0xA1, 0xF9, 0x01, 0x61, 0x44, 0x08, 0x60,
-        0x46, 0xFB, 0x01, 0x64, 0xA1, 0xDB, 0x49, 0xD3, 0x64, 0xFB, 0xEB, 0x60, 0xCD, 0x78, 0xFF, 0xFF,
-        0x11, 0x60, 0xF4, 0x65, 0x64, 0x41, 0xA1, 0xD3, 0xD5, 0x80, 0x04, 0xB0, 0x11, 0x07, 0x02, 0x02,
-        0x08, 0xA1, 0xF9, 0x01, 0x61, 0x44, 0x08, 0x60, 0x46, 0xFB, 0x49, 0xD3, 0x64, 0xFB, 0xEB, 0x60,
-        0xCD, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x46, 0xF3, 0xFF, 0xFF, 0x08, 0xA4, 0xA2, 0xDB, 0x9A, 0x01,
-        0x14, 0x60, 0x0E, 0x64, 0x0F, 0x60, 0xA5, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x51, 0xF3, 0xFF, 0xFF, 0xE3, 0xB4, 0x51, 0xFB, 0x0C, 0x60, 0x7F, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4,
-        0xA2, 0xDB, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xED, 0x60, 0x81, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x63, 0xF1, 0x64, 0xF9, 0x0F, 0x60, 0x9D, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xED, 0x60, 0xA3, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x08, 0x60, 0x11, 0xF1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x08, 0x60, 0x11, 0xF1, 0x10, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x60, 0x30, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEB, 0x60, 0x58, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x14, 0x60, 0x0E, 0x64,
-        0x0F, 0x60, 0xA5, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x51, 0xFB,
-        0x00, 0x64, 0x08, 0x60, 0x1B, 0xFB, 0x5A, 0xDB, 0xBE, 0xFE, 0x00, 0x60, 0x30, 0x64, 0x08, 0x60,
-        0x1C, 0xFB, 0xEB, 0x60, 0x58, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58,
-        0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x31, 0x40, 0x20, 0x2A, 0x35, 0x00, 0x3F, 0xF2, 0x47, 0x65,
-        0xC4, 0x84, 0xE8, 0x84, 0x23, 0xFA, 0xF1, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x64, 0xF3, 0x01, 0x60,
-        0xFF, 0x65, 0xA4, 0x84, 0x01, 0x23, 0x14, 0x00, 0x11, 0x60, 0x14, 0x61, 0x11, 0x60, 0xF4, 0x65,
-        0xA1, 0xD1, 0xD5, 0x80, 0xD0, 0x80, 0x0B, 0x03, 0x02, 0x03, 0x08, 0xA1, 0xF9, 0x01, 0x04, 0xA1,
-        0xA1, 0xD3, 0x01, 0x60, 0x00, 0x65, 0x60, 0x47, 0xFF, 0xB4, 0xB4, 0x84, 0x01, 0x00, 0x01, 0x64,
-        0x00, 0xF4, 0x08, 0xFA, 0xFF, 0xFF, 0x26, 0x46, 0x1F, 0x60, 0x10, 0x64, 0x0F, 0x60, 0x90, 0xFB,
-        0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x00, 0x66,
-        0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x5F, 0xFB, 0xAC, 0x85,
-        0x60, 0x41, 0x2E, 0x60, 0x22, 0x63, 0x16, 0x60, 0xC6, 0xFD, 0x16, 0x60, 0xCC, 0xFD, 0x16, 0x60,
-        0xD6, 0xFD, 0x16, 0x60, 0xE0, 0xFD, 0x5C, 0x03, 0x61, 0x5C, 0x00, 0x63, 0xE9, 0x81, 0xFF, 0xFF,
-        0x02, 0x24, 0xDF, 0x83, 0xFB, 0x02, 0x08, 0x64, 0x53, 0x90, 0x64, 0x41, 0x03, 0x04, 0x01, 0x60,
-        0x08, 0x63, 0x0C, 0x00, 0x01, 0x60, 0x00, 0x63, 0x10, 0x64, 0xE9, 0x81, 0xFF, 0xFF, 0x02, 0x24,
-        0xDF, 0x83, 0x08, 0x36, 0x03, 0x00, 0xCC, 0x84, 0xFF, 0xFF, 0xF7, 0x02, 0x15, 0x60, 0xEC, 0xFD,
-        0x43, 0x48, 0x65, 0x41, 0x2B, 0x60, 0xDA, 0x63, 0x28, 0x44, 0xFF, 0xB5, 0x10, 0x60, 0x08, 0x64,
-        0xE9, 0x81, 0x58, 0xD1, 0xFD, 0x04, 0xA3, 0xD9, 0x0C, 0x03, 0x58, 0xD1, 0xE9, 0x81, 0x40, 0x4A,
-        0xFC, 0x04, 0xA3, 0xD1, 0x64, 0x47, 0xB0, 0x84, 0xBD, 0xDB, 0x65, 0x44, 0xC8, 0x85, 0x2A, 0x44,
-        0xEF, 0x02, 0x28, 0x43, 0x08, 0x3A, 0x24, 0x00, 0x60, 0x45, 0x04, 0x64, 0x32, 0x60, 0x00, 0x63,
-        0x41, 0x48, 0xE9, 0x81, 0xCC, 0x84, 0x02, 0x24, 0xDF, 0x83, 0xFB, 0x02, 0x63, 0x40, 0x00, 0x36,
-        0x17, 0x00, 0x17, 0x60, 0x11, 0xFD, 0x2E, 0x60, 0x24, 0x63, 0x65, 0x44, 0x28, 0x41, 0xE9, 0x81,
-        0x58, 0xD1, 0xFD, 0x04, 0xA3, 0xD9, 0x15, 0x03, 0x58, 0xD1, 0xE9, 0x81, 0x60, 0x45, 0xFC, 0x04,
-        0xA3, 0xD1, 0x64, 0x47, 0xB0, 0x84, 0xBD, 0xDB, 0x00, 0xB9, 0x65, 0x44, 0xF0, 0x02, 0x09, 0x00,
-        0x67, 0x43, 0x16, 0x60, 0xC6, 0xFD, 0x16, 0x60, 0xCC, 0xFD, 0x16, 0x60, 0xD6, 0xFD, 0x16, 0x60,
-        0xE0, 0xFD, 0x20, 0x40, 0x10, 0x27, 0x0D, 0x00, 0x2B, 0x60, 0xE2, 0x61, 0x15, 0x60, 0xEC, 0xF3,
-        0xA1, 0xDB, 0xFF, 0xB4, 0xCC, 0x84, 0xA8, 0x83, 0x2B, 0x60, 0xD8, 0x64, 0x58, 0xD1, 0x59, 0xD9,
-        0xFD, 0x1F, 0x2B, 0x60, 0xE4, 0x63, 0x15, 0x60, 0xBE, 0xF3, 0x08, 0x61, 0x60, 0xFE, 0xA3, 0xD1,
-        0xFF, 0xFF, 0x20, 0xFE, 0x00, 0xA8, 0xE8, 0x84, 0x0F, 0x03, 0x60, 0xFE, 0x02, 0x28, 0xF6, 0x01,
-        0x80, 0x62, 0xB2, 0x9C, 0xBD, 0xD9, 0x62, 0xF9, 0xCD, 0x81, 0x00, 0x36, 0x01, 0x00, 0xEE, 0x01,
-        0x2E, 0x60, 0x24, 0x63, 0x08, 0x61, 0xEA, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0x2B, 0x60, 0x7C, 0x63,
-        0x65, 0x40, 0xFF, 0x36, 0x02, 0xA3, 0xA3, 0xD3, 0xFF, 0xFF, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0x40, 0x26, 0x7F, 0xB4, 0x20, 0x26, 0x3F, 0xB4, 0x60, 0x45, 0x80, 0x63, 0xEF, 0x60,
-        0x58, 0x4D, 0x33, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xDF, 0xFB, 0x40, 0x63, 0xEF, 0x60, 0x58, 0x4D,
-        0x33, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xE0, 0xFB, 0x20, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x33, 0x78,
-        0xFF, 0xFF, 0x15, 0x60, 0xE1, 0xFB, 0x10, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x33, 0x78, 0xFF, 0xFF,
-        0x15, 0x60, 0xE2, 0xFB, 0x08, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x33, 0x78, 0xFF, 0xFF, 0x15, 0x60,
-        0xE3, 0xFB, 0x04, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x33, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xE4, 0xFB,
-        0x02, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x33, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xE5, 0xFB, 0x01, 0x63,
-        0xEF, 0x60, 0x58, 0x4D, 0x33, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xE6, 0xFB, 0x2E, 0x58, 0xFF, 0xFF,
-        0x15, 0x60, 0xBE, 0xF3, 0xFF, 0xFF, 0x0F, 0xB4, 0x60, 0x45, 0x08, 0x63, 0xEF, 0x60, 0x58, 0x4D,
-        0x5E, 0x78, 0xFF, 0xFF, 0x15, 0x60, 0xE7, 0xFB, 0x04, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x5E, 0x78,
-        0xFF, 0xFF, 0x15, 0x60, 0xE8, 0xFB, 0x02, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x5E, 0x78, 0xFF, 0xFF,
-        0x15, 0x60, 0xE9, 0xFB, 0x01, 0x63, 0xEF, 0x60, 0x58, 0x4D, 0x5E, 0x78, 0xFF, 0xFF, 0x15, 0x60,
-        0xEA, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x63, 0x5C, 0xA7, 0x84, 0xEB, 0x83, 0x14, 0x02, 0x01, 0x03,
-        0xFB, 0x01, 0x64, 0x44, 0x01, 0x36, 0x0B, 0x64, 0x02, 0x36, 0x0B, 0x64, 0x04, 0x36, 0x0A, 0x64,
-        0x08, 0x36, 0x0A, 0x64, 0x10, 0x36, 0x09, 0x64, 0x20, 0x36, 0x09, 0x64, 0x40, 0x36, 0x09, 0x64,
-        0x80, 0x36, 0x09, 0x64, 0x11, 0x00, 0x60, 0x40, 0x01, 0x36, 0x0B, 0x64, 0x02, 0x36, 0x0F, 0x64,
-        0x04, 0x36, 0x0A, 0x64, 0x08, 0x36, 0x0E, 0x64, 0x10, 0x36, 0x09, 0x64, 0x20, 0x36, 0x0D, 0x64,
-        0x40, 0x36, 0x08, 0x64, 0x80, 0x36, 0x0C, 0x64, 0x2D, 0x58, 0xFF, 0xFF, 0x63, 0x5C, 0xA7, 0x84,
-        0xEB, 0x83, 0x0C, 0x02, 0x01, 0x03, 0xFB, 0x01, 0x64, 0x44, 0x01, 0x36, 0x0A, 0x64, 0x02, 0x36,
-        0x14, 0x64, 0x04, 0x36, 0x37, 0x64, 0x08, 0x36, 0x6E, 0x64, 0x09, 0x00, 0x60, 0x40, 0x01, 0x36,
-        0x0A, 0x64, 0x02, 0x36, 0x14, 0x64, 0x04, 0x36, 0x37, 0x64, 0x08, 0x36, 0x6E, 0x64, 0x2D, 0x58,
-        0xFF, 0xFF, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1, 0x02, 0x06, 0x00, 0xF4, 0x03, 0x61, 0x5D, 0xD2,
-        0xCF, 0x83, 0xD4, 0x80, 0x25, 0x03, 0x16, 0x03, 0xCF, 0x83, 0x61, 0x44, 0x80, 0xA0, 0x20, 0x03,
-        0x02, 0x02, 0x00, 0xF4, 0x03, 0x61, 0x5D, 0xD2, 0xCF, 0x83, 0x81, 0xA1, 0x19, 0x03, 0x05, 0x07,
-        0x7F, 0xA1, 0xCC, 0x84, 0xDD, 0x81, 0xE6, 0x03, 0xF7, 0x01, 0x00, 0xF4, 0x00, 0xB8, 0x04, 0x61,
-        0xE6, 0x03, 0xF2, 0x01, 0x2C, 0x43, 0x5D, 0xD0, 0xDE, 0xD9, 0x64, 0x44, 0x5D, 0xD0, 0xDE, 0xD9,
-        0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03, 0x7F, 0xA1, 0xF9, 0x04, 0x00, 0xF4, 0x03, 0x61, 0xF6, 0x01,
-        0x20, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x01, 0x3A, 0x02, 0x00, 0x16, 0x64, 0x2B, 0x00, 0x02, 0x3A,
-        0x02, 0x00, 0x14, 0x64, 0x27, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x12, 0x64, 0x23, 0x00, 0x08, 0x3A,
-        0x02, 0x00, 0x10, 0x64, 0x1F, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x0E, 0x64, 0x1B, 0x00, 0x20, 0x3A,
-        0x02, 0x00, 0x0C, 0x64, 0x17, 0x00, 0x40, 0x3A, 0x02, 0x00, 0x0A, 0x64, 0x13, 0x00, 0x80, 0x3A,
-        0x02, 0x00, 0x08, 0x64, 0x0F, 0x00, 0x01, 0x3B, 0x02, 0x00, 0x06, 0x64, 0x0B, 0x00, 0x02, 0x3B,
-        0x02, 0x00, 0x04, 0x64, 0x07, 0x00, 0x04, 0x3B, 0x02, 0x00, 0x02, 0x64, 0x03, 0x00, 0x08, 0x3B,
-        0xFF, 0x01, 0x00, 0x64, 0x2E, 0x58, 0xFF, 0xFF, 0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x36, 0x3A,
-        0x02, 0x00, 0x00, 0x61, 0x2C, 0x00, 0x30, 0x3A, 0x02, 0x00, 0x02, 0x61, 0x28, 0x00, 0x24, 0x3A,
-        0x02, 0x00, 0x04, 0x61, 0x24, 0x00, 0x18, 0x3A, 0x02, 0x00, 0x06, 0x61, 0x20, 0x00, 0x12, 0x3A,
-        0x02, 0x00, 0x08, 0x61, 0x1C, 0x00, 0x0C, 0x3A, 0x02, 0x00, 0x0A, 0x61, 0x18, 0x00, 0x09, 0x3A,
-        0x02, 0x00, 0x0C, 0x61, 0x14, 0x00, 0x06, 0x3A, 0x02, 0x00, 0x0E, 0x61, 0x10, 0x00, 0x6E, 0x3A,
-        0x02, 0x00, 0x10, 0x61, 0x0C, 0x00, 0x37, 0x3A, 0x02, 0x00, 0x12, 0x61, 0x08, 0x00, 0x14, 0x3A,
-        0x02, 0x00, 0x14, 0x61, 0x04, 0x00, 0x0A, 0x3A, 0xFF, 0xFF, 0x16, 0x61, 0x00, 0x00, 0x65, 0x40,
-        0x01, 0x3A, 0x13, 0x00, 0x66, 0x45, 0x2B, 0x46, 0x92, 0xFA, 0x65, 0x46, 0x26, 0xF2, 0xFF, 0xFF,
-        0x60, 0x41, 0x00, 0x7F, 0x60, 0x45, 0x61, 0x47, 0x00, 0x7F, 0xD4, 0x84, 0x66, 0x41, 0x2B, 0x46,
-        0x0E, 0xF2, 0x60, 0x45, 0x65, 0x5E, 0x0E, 0xFA, 0x61, 0x46, 0x2E, 0x58, 0xFF, 0xFF, 0xCD, 0x81,
-        0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x01, 0x64, 0x2E, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64,
-        0x2A, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x04, 0x64, 0x26, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x08, 0x64,
-        0x22, 0x00, 0x0C, 0x3A, 0x02, 0x00, 0x10, 0x64, 0x1E, 0x00, 0x12, 0x3A, 0x02, 0x00, 0x20, 0x64,
-        0x1A, 0x00, 0x18, 0x3A, 0x02, 0x00, 0x40, 0x64, 0x16, 0x00, 0x24, 0x3A, 0x02, 0x00, 0x80, 0x64,
-        0x12, 0x00, 0x30, 0x3A, 0x02, 0x00, 0x01, 0x7F, 0x0E, 0x00, 0x48, 0x3A, 0x02, 0x00, 0x02, 0x7F,
-        0x0A, 0x00, 0x60, 0x3A, 0x02, 0x00, 0x04, 0x7F, 0x06, 0x00, 0x6C, 0x3A, 0x02, 0x00, 0x08, 0x7F,
-        0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x20, 0xFE, 0x2A, 0x45, 0x34, 0x8A, 0x60, 0xFE, 0x61, 0x40,
-        0x00, 0x36, 0x02, 0x00, 0xBD, 0xD3, 0xC3, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0x53, 0xFB, 0x54, 0xFB,
-        0x00, 0x60, 0x0C, 0x63, 0x14, 0x60, 0xEC, 0x62, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x02, 0x64,
-        0x0A, 0x60, 0x78, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x0A, 0x60, 0x7A, 0xF3, 0x00, 0x63, 0xF0, 0xA0,
-        0x01, 0xA4, 0x03, 0x03, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0xA2, 0xDD, 0x0A, 0x60, 0x7B, 0xF1,
-        0xA2, 0xDD, 0x5A, 0xD3, 0xA2, 0xDD, 0xC0, 0x81, 0x61, 0x44, 0x02, 0x24, 0xFF, 0xFF, 0xE9, 0x81,
-        0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0x5A, 0xD3, 0xE9, 0x81, 0xE8, 0x83, 0xEB, 0x83, 0xEB, 0x83,
-        0xEB, 0x83, 0xEB, 0x85, 0xD4, 0x85, 0xC5, 0x83, 0xA2, 0xDD, 0x63, 0x47, 0x00, 0x7F, 0x0A, 0x60,
-        0x77, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x7F, 0x67, 0x01, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0xB1, 0xFE,
-        0x05, 0x05, 0xB0, 0xFE, 0x06, 0x05, 0xB2, 0xFE, 0xB3, 0xFE, 0x21, 0x00, 0xF7, 0x60, 0x38, 0x78,
-        0xFF, 0xFF, 0x28, 0xF3, 0x29, 0xF1, 0x40, 0x44, 0x44, 0x45, 0x2A, 0xF1, 0x2B, 0xF1, 0x44, 0x46,
-        0x44, 0x47, 0x3F, 0xB4, 0xE0, 0x85, 0x19, 0x60, 0x06, 0x64, 0x44, 0xD7, 0x58, 0x43, 0xFF, 0xFF,
-        0x60, 0x45, 0x0A, 0x60, 0x7E, 0xF3, 0x61, 0x43, 0x04, 0xB4, 0x24, 0x44, 0x02, 0x03, 0x13, 0xFF,
-        0x06, 0x00, 0x3F, 0xB4, 0xB4, 0x84, 0xFF, 0x27, 0x05, 0xFD, 0x04, 0xFB, 0x10, 0x75, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x86, 0x3E, 0xB4, 0xFE, 0x09, 0x05, 0xB5, 0xFE, 0x02, 0x24, 0x7F, 0xF7, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xB7, 0xFE, 0x05, 0x05, 0xB6, 0xFE, 0xF2, 0x01, 0xF7, 0x60, 0x73, 0x78, 0xFF, 0xFF,
-        0x36, 0x44, 0x00, 0x7F, 0xEE, 0xA0, 0x60, 0x45, 0x05, 0x05, 0x19, 0x60, 0x98, 0x64, 0x44, 0xD7,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xE4, 0x01, 0xE3, 0x01, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x7F, 0x67, 0x02, 0x61, 0x10, 0x02, 0x10, 0x64, 0x40, 0x40, 0x02, 0x64, 0x40, 0x50, 0x61, 0xFF,
-        0x3F, 0x40, 0x40, 0x26, 0x04, 0x00, 0x10, 0xE0, 0x46, 0x60, 0x09, 0xE0, 0x00, 0x00, 0x27, 0xF1,
-        0x00, 0x66, 0x20, 0x78, 0x42, 0xFE, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45,
-        0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x19, 0x02, 0x0A, 0x60, 0x7E, 0xF3, 0x07, 0x7C, 0x20, 0xB5,
-        0x0C, 0xB5, 0x04, 0x03, 0x03, 0x02, 0xBC, 0xF9, 0x00, 0x67, 0x0F, 0x00, 0x00, 0x61, 0x41, 0x56,
-        0xC7, 0xFE, 0xB5, 0x01, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00, 0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67,
-        0x04, 0x00, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60,
-        0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x31, 0x02, 0x0A, 0x60, 0x7E, 0xF3,
-        0x01, 0x7C, 0x20, 0xB5, 0x0C, 0xB5, 0x03, 0x03, 0x02, 0x02, 0xBC, 0xF9, 0xFF, 0xFF, 0x02, 0x61,
-        0x41, 0x56, 0xC7, 0xFE, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x7D, 0xF1, 0x20, 0x44, 0x64, 0x40,
-        0xFF, 0x26, 0x1C, 0x00, 0x7F, 0xB4, 0x40, 0x40, 0x5C, 0x5E, 0x82, 0xFF, 0x26, 0x44, 0xFD, 0xB4,
-        0x40, 0x46, 0x5C, 0x41, 0x87, 0xFF, 0x62, 0xFF, 0x0F, 0x60, 0x85, 0xF3, 0xFF, 0xFF, 0x00, 0xA8,
-        0x60, 0x46, 0x04, 0x03, 0x09, 0xF2, 0x8F, 0xFC, 0xAC, 0x86, 0xFB, 0x01, 0xD3, 0xF3, 0xFF, 0xFF,
-        0xFE, 0xB4, 0xD3, 0xFB, 0x06, 0x64, 0x0F, 0x60, 0x9F, 0xFB, 0x2D, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x25, 0x46, 0x01, 0xF2, 0x08, 0xF0, 0x60, 0x47, 0x03, 0xB4, 0x03, 0xAC, 0x7F, 0x67,
-        0x03, 0x61, 0x08, 0x02, 0x1F, 0x60, 0x26, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78,
-        0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x2B, 0x49, 0x00, 0x25, 0x44,
-        0x1F, 0xB4, 0xE0, 0x85, 0xF1, 0x60, 0x76, 0x64, 0xC4, 0x98, 0xFF, 0xFF, 0xC0, 0xFE, 0x3D, 0x00,
-        0xC1, 0xFE, 0x3B, 0x00, 0xC2, 0xFE, 0x39, 0x00, 0xC3, 0xFE, 0x37, 0x00, 0xC4, 0xFE, 0x35, 0x00,
-        0xC5, 0xFE, 0x33, 0x00, 0xC6, 0xFE, 0x31, 0x00, 0xC7, 0xFE, 0x2F, 0x00, 0xC8, 0xFE, 0x2D, 0x00,
-        0xC9, 0xFE, 0x2B, 0x00, 0xCA, 0xFE, 0x29, 0x00, 0xCB, 0xFE, 0x27, 0x00, 0xCC, 0xFE, 0x25, 0x00,
-        0xCD, 0xFE, 0x23, 0x00, 0xCE, 0xFE, 0x21, 0x00, 0xCF, 0xFE, 0x1F, 0x00, 0xD0, 0xFE, 0x1D, 0x00,
-        0xD1, 0xFE, 0x1B, 0x00, 0xD2, 0xFE, 0x19, 0x00, 0xD3, 0xFE, 0x17, 0x00, 0xD4, 0xFE, 0x15, 0x00,
-        0xD5, 0xFE, 0x13, 0x00, 0xD6, 0xFE, 0x11, 0x00, 0xD7, 0xFE, 0x0F, 0x00, 0xD8, 0xFE, 0x0D, 0x00,
-        0xD9, 0xFE, 0x0B, 0x00, 0xDA, 0xFE, 0x09, 0x00, 0xDB, 0xFE, 0x07, 0x00, 0xDC, 0xFE, 0x05, 0x00,
-        0xDD, 0xFE, 0x03, 0x00, 0xDE, 0xFE, 0x01, 0x00, 0xDF, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x00, 0x64, 0x9F, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9D, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x9C, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x9A, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x99, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x98, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x97, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x96, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x95, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x94, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x93, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x92, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x91, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x90, 0xFE, 0xF0, 0x84,
-        0x06, 0xFB, 0x8F, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8D, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x8C, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x8A, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x89, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x88, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x87, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x86, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x85, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x84, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x83, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x82, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x81, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x80, 0xFE, 0xF0, 0x84,
-        0x05, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x5C, 0x5C, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x24, 0x40, 0x01, 0x27, 0x55, 0x00, 0x05, 0x60, 0x00, 0x63, 0x05, 0xFD, 0x30, 0x44, 0xBD, 0xDB,
-        0x31, 0x44, 0xBD, 0xDB, 0x32, 0x44, 0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB,
-        0x35, 0x44, 0xBD, 0xDB, 0x36, 0x44, 0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB,
-        0x39, 0x44, 0xBD, 0xDB, 0x3A, 0x44, 0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB,
-        0x3D, 0x44, 0xBD, 0xDB, 0x3E, 0x44, 0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0x02, 0x61, 0x61, 0x44,
-        0x02, 0x36, 0x82, 0xFF, 0x03, 0x36, 0x83, 0xFF, 0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF,
-        0x06, 0x36, 0x86, 0xFF, 0x07, 0x36, 0x87, 0xFF, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB,
-        0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB,
-        0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB,
-        0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB,
-        0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB, 0xDD, 0x81, 0x08, 0x3A, 0xD0, 0x01, 0x54, 0x00,
-        0x27, 0x40, 0x10, 0x26, 0x30, 0x00, 0x26, 0x44, 0x01, 0x36, 0x2D, 0x00, 0x02, 0x36, 0x82, 0xFF,
-        0x03, 0x36, 0x83, 0xFF, 0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF, 0x06, 0x36, 0x86, 0xFF,
-        0x25, 0x44, 0x00, 0x36, 0x44, 0x40, 0x01, 0x36, 0x44, 0x41, 0x02, 0x36, 0x44, 0x42, 0x03, 0x36,
-        0x44, 0x43, 0x04, 0x36, 0x44, 0x44, 0x05, 0x36, 0x44, 0x45, 0x06, 0x36, 0x44, 0x46, 0x07, 0x36,
-        0x44, 0x47, 0x08, 0x36, 0x44, 0x48, 0x09, 0x36, 0x44, 0x49, 0x0A, 0x36, 0x44, 0x4A, 0x0B, 0x36,
-        0x44, 0x4B, 0x0C, 0x36, 0x44, 0x4C, 0x0D, 0x36, 0x44, 0x4D, 0x0E, 0x36, 0x44, 0x4E, 0x0F, 0x36,
-        0x44, 0x4F, 0x87, 0xFF, 0x21, 0x00, 0x25, 0x44, 0x10, 0x36, 0x44, 0x50, 0x11, 0x36, 0x44, 0x51,
-        0x12, 0x36, 0x44, 0x52, 0x13, 0x36, 0x44, 0x53, 0x14, 0x36, 0x44, 0x54, 0x15, 0x36, 0x44, 0x55,
-        0x16, 0x36, 0x44, 0x56, 0x17, 0x36, 0x44, 0x57, 0x18, 0x36, 0x44, 0x58, 0x19, 0x36, 0x44, 0x59,
-        0x1A, 0x36, 0x44, 0x5A, 0x1B, 0x36, 0x44, 0x5B, 0x1C, 0x36, 0x44, 0x5C, 0x1D, 0x36, 0x44, 0x5D,
-        0x1E, 0x36, 0x44, 0x5E, 0x1F, 0x36, 0x44, 0x5F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0x46,
-        0xB5, 0x60, 0x58, 0x4F, 0x4B, 0x78, 0xFF, 0xFF, 0x03, 0x61, 0x7F, 0x67, 0x0A, 0x02, 0x00, 0xF0,
-        0x04, 0x64, 0x0F, 0x60, 0x93, 0xFB, 0x5A, 0xD9, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67,
-        0x02, 0x61, 0x12, 0x02, 0x14, 0x64, 0x0F, 0x60, 0x9F, 0xFB, 0x00, 0x60, 0x50, 0x63, 0x5A, 0xDD,
-        0xF2, 0x60, 0xF7, 0x64, 0x7F, 0xFB, 0x2D, 0xFF, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x2A, 0xF3,
-        0x05, 0xFB, 0x2B, 0xF3, 0x06, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64,
-        0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x0E, 0x02, 0x16, 0x64, 0x0F, 0x60, 0x9F, 0xFB,
-        0x00, 0x60, 0x50, 0x63, 0x5A, 0xDD, 0xF3, 0x60, 0x12, 0x64, 0x7F, 0xFB, 0x2D, 0xFF, 0xF0, 0x60,
-        0xC7, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45,
-        0xA4, 0x80, 0x02, 0x61, 0x35, 0x02, 0x25, 0x45, 0xF1, 0x60, 0x02, 0x64, 0xD4, 0x80, 0xFF, 0xFF,
-        0x34, 0x03, 0xF1, 0x60, 0x00, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x01, 0x03, 0x28, 0x00, 0x15, 0x60,
-        0xC3, 0xF1, 0x99, 0xF3, 0x19, 0x60, 0x00, 0x61, 0xA0, 0x84, 0xA1, 0xDB, 0x25, 0x45, 0x1E, 0x60,
-        0x96, 0x63, 0x01, 0x61, 0xBD, 0xD3, 0xBD, 0xD1, 0xD4, 0x80, 0xBD, 0xD3, 0xBD, 0xD5, 0xCD, 0x81,
-        0x02, 0x03, 0x15, 0x03, 0xF7, 0x01, 0xA2, 0xFF, 0xA6, 0xD3, 0x40, 0x4C, 0x00, 0xA8, 0x67, 0x43,
-        0x0C, 0x02, 0xA2, 0xDD, 0x42, 0x48, 0x64, 0x41, 0xB5, 0x60, 0x58, 0x4D, 0xA2, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x28, 0xDB, 0x02, 0x03, 0x2C, 0x58, 0xA3, 0xFF, 0x0C, 0x61, 0x03, 0x00, 0x04, 0x61,
-        0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xF1, 0x60, 0x02, 0x64, 0xD4, 0x80,
-        0x7F, 0x67, 0x06, 0x63, 0xF8, 0x02, 0x31, 0x40, 0x21, 0x2A, 0xF5, 0x01, 0x01, 0x64, 0x0C, 0x60,
-        0x82, 0xFB, 0xFF, 0xFF, 0xC4, 0xFE, 0xEE, 0x01, 0xC6, 0xFE, 0xEC, 0x01, 0x7E, 0x60, 0xC0, 0x64,
-        0x24, 0x45, 0xA4, 0x80, 0x02, 0x61, 0x3F, 0x02, 0x25, 0x45, 0xF8, 0x2B, 0x3B, 0x00, 0x2E, 0xF5,
-        0x67, 0x44, 0xD4, 0x80, 0x19, 0x60, 0xAA, 0x63, 0x39, 0x03, 0x7E, 0x61, 0x24, 0x44, 0x01, 0x27,
-        0x29, 0x00, 0xA3, 0xFC, 0xA4, 0xF8, 0xBD, 0xD3, 0xA3, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24,
-        0x64, 0x58, 0x08, 0xA3, 0xF8, 0x02, 0x08, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xA3, 0xD1, 0xFE, 0xA0,
-        0xFA, 0x60, 0x00, 0x64, 0xD0, 0x80, 0x14, 0x02, 0x13, 0x02, 0x04, 0xA3, 0xBE, 0xD3, 0xBD, 0xD1,
-        0x0F, 0x18, 0xD4, 0x80, 0x0D, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x64, 0x41,
-        0xDD, 0x81, 0xE1, 0x81, 0xCB, 0x83, 0x46, 0x65, 0xF8, 0x60, 0x58, 0x4F, 0x7A, 0x78, 0xFF, 0xFF,
-        0x00, 0x67, 0x0A, 0x00, 0xBD, 0xD3, 0xBE, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24, 0x64, 0x58,
-        0x08, 0xA3, 0xF8, 0x02, 0x04, 0x61, 0x7F, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x0F, 0x64, 0x23, 0xFA,
-        0x67, 0x44, 0x24, 0xFA, 0x62, 0x41, 0x3E, 0x60, 0x00, 0x65, 0x1A, 0x63, 0xF7, 0x60, 0x8C, 0x64,
-        0x65, 0x46, 0x58, 0xD0, 0x2E, 0xF5, 0x59, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x4B, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0xE8, 0x84, 0xDC, 0x84, 0x23, 0xFA, 0xBF, 0xD1, 0x4A, 0x65,
-        0x64, 0x43, 0xF8, 0x60, 0x58, 0x4F, 0x7A, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x25, 0xF2, 0xFF, 0xFF, 0xE0, 0xA0, 0x20, 0x64, 0x01, 0x06, 0x25, 0xFA, 0x23, 0xF2, 0xDF, 0xD1,
-        0xCC, 0x84, 0xE0, 0x85, 0x0B, 0x06, 0xBF, 0xD1, 0x64, 0x41, 0xD5, 0x80, 0x64, 0x43, 0x01, 0x06,
-        0x65, 0x41, 0x4A, 0x65, 0xF4, 0x60, 0x58, 0x4F, 0xBD, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0xBC, 0xF3, 0x02, 0x63, 0x23, 0xFC, 0x07, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x4B, 0xD3, 0xBF, 0xD3, 0x60, 0x41, 0xC9, 0x83, 0xE9, 0x81, 0xDD, 0x81, 0xA3, 0xFA,
-        0xE0, 0x81, 0x3C, 0x60, 0x00, 0x67, 0x02, 0x24, 0x02, 0xA4, 0x60, 0x47, 0x40, 0x4B, 0xC9, 0x81,
-        0x4A, 0x65, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00,
-        0x00, 0xF4, 0x04, 0x65, 0xF6, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1,
-        0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83, 0x60, 0x47, 0x25, 0xFA, 0x00, 0x7E, 0x60, 0x47, 0x01, 0x26,
-        0xDC, 0x84, 0x60, 0x41, 0xE8, 0x84, 0xD8, 0x84, 0x23, 0xFA, 0xAB, 0x01, 0xFC, 0xA3, 0xA3, 0xD1,
-        0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83, 0x00, 0x7F, 0x25, 0xFA, 0x60, 0x41, 0x01, 0x26, 0xDD, 0x81,
-        0xE9, 0x84, 0xD8, 0x84, 0x23, 0xFA, 0x9D, 0x01, 0x23, 0xF2, 0x25, 0xF2, 0x02, 0xA8, 0xF8, 0xA0,
-        0x0F, 0x02, 0xEC, 0xA0, 0x0D, 0x04, 0x0C, 0x07, 0x15, 0x60, 0xD2, 0xF1, 0xFF, 0xFF, 0xD0, 0x80,
-        0xFF, 0xFF, 0x04, 0x07, 0x15, 0x60, 0xD2, 0xFB, 0x15, 0x60, 0xD6, 0xFB, 0x13, 0x60, 0x5B, 0xFB,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x14, 0x60, 0xEE, 0x65, 0x60, 0x41, 0x14, 0x60,
-        0x8A, 0x63, 0xA3, 0xDB, 0xFF, 0xA1, 0x48, 0x64, 0x58, 0xD0, 0x7E, 0xA8, 0x5B, 0xD9, 0x02, 0x02,
-        0x00, 0xF4, 0x02, 0x64, 0xFF, 0xA1, 0xD7, 0x80, 0x02, 0x03, 0x01, 0x03, 0xF5, 0x01, 0x2E, 0xF5,
-        0x00, 0x60, 0x2F, 0x65, 0x25, 0xF2, 0x00, 0x63, 0xCC, 0x84, 0x03, 0xA3, 0xFD, 0x05, 0x4A, 0x64,
-        0xD7, 0x80, 0x14, 0x60, 0x26, 0x61, 0x18, 0x05, 0xA1, 0xDD, 0xE3, 0x83, 0xFE, 0xA3, 0x58, 0xD0,
-        0x7E, 0xA8, 0x59, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x00, 0x63, 0x59, 0xDD,
-        0x2E, 0xF5, 0x25, 0xF0, 0x0A, 0x60, 0x13, 0xF3, 0xD3, 0x80, 0x01, 0xB0, 0x04, 0x03, 0x01, 0xA4,
-        0x03, 0x03, 0xA2, 0xDB, 0x01, 0x00, 0xA2, 0xDD, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x14, 0x60,
-        0x8A, 0x61, 0xA1, 0xD3, 0x23, 0xFA, 0xE0, 0x83, 0x4A, 0x65, 0x04, 0x02, 0x02, 0x63, 0x23, 0xFC,
-        0xA5, 0xFC, 0x09, 0x00, 0xDB, 0x83, 0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00,
-        0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x0A, 0x60, 0x13, 0xF3,
-        0x00, 0x61, 0x02, 0xA4, 0xFE, 0xA0, 0x23, 0xFA, 0x1B, 0x03, 0xFA, 0xA4, 0xFD, 0xA4, 0x01, 0xA1,
-        0xFD, 0x07, 0x61, 0x43, 0x23, 0xF2, 0x25, 0xFC, 0xE0, 0x83, 0x02, 0xA3, 0x14, 0x60, 0x26, 0x61,
-        0x00, 0x60, 0x4A, 0x64, 0x59, 0xD1, 0x58, 0xD8, 0x7E, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x02, 0x64,
-        0xF9, 0x1F, 0x25, 0xF2, 0x23, 0xF2, 0x01, 0xB0, 0xCC, 0x84, 0x04, 0x02, 0x23, 0xFA, 0x02, 0x00,
-        0x00, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x41, 0x4B, 0x65, 0x42, 0x80, 0x64,
-        0xD4, 0x85, 0x2B, 0x41, 0x00, 0xA1, 0x55, 0x8B, 0x0D, 0x03, 0x02, 0x04, 0x65, 0x41, 0x02, 0x00,
-        0x00, 0x64, 0x40, 0x4B, 0xCA, 0x84, 0x58, 0xD0, 0xC9, 0x81, 0xBD, 0xD9, 0xFC, 0x02, 0x00, 0xF4,
-        0x04, 0x65, 0xEC, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD3, 0x02, 0x7C, 0xA0, 0xD3,
-        0x23, 0xF8, 0xDC, 0x84, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x02, 0x64, 0x23, 0xFA,
-        0x01, 0x64, 0x9D, 0xFE, 0x02, 0x28, 0x02, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x02, 0x7C, 0x23, 0xF8, 0x01, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3,
-        0xA3, 0xD1, 0x02, 0x64, 0x23, 0xFA, 0x64, 0x44, 0x7C, 0x5F, 0x60, 0x45, 0x64, 0x47, 0x7C, 0x5F,
-        0x88, 0xF1, 0x66, 0x41, 0xC0, 0x86, 0xA5, 0xD2, 0x61, 0x46, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x02, 0x64, 0x23, 0xFA, 0x88, 0xFF, 0x75, 0x44, 0x8D, 0xFF, 0xE8, 0x87, 0xE8, 0x84,
-        0xE8, 0x84, 0x03, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x05, 0x64, 0x23, 0xFA,
-        0x52, 0x63, 0x96, 0xF3, 0x4B, 0xDA, 0x95, 0xF3, 0x4B, 0xDA, 0x94, 0xF3, 0x4B, 0xDA, 0x60, 0x41,
-        0x88, 0xFF, 0x72, 0x5C, 0x89, 0xFF, 0x4A, 0xD8, 0xA2, 0x48, 0x20, 0x23, 0x0E, 0x00, 0x64, 0x40,
-        0x80, 0x27, 0x15, 0x00, 0xDC, 0x84, 0xBD, 0xDA, 0xBD, 0xD2, 0x11, 0x04, 0xDC, 0x84, 0xA2, 0xDA,
-        0xA3, 0xD2, 0x0D, 0x04, 0xDC, 0x84, 0xA3, 0xDA, 0x0A, 0x00, 0x52, 0x63, 0x96, 0xF3, 0x4B, 0xDA,
-        0x95, 0xF3, 0x4B, 0xDA, 0x94, 0xF3, 0x4B, 0xDA, 0x54, 0x90, 0x4C, 0x63, 0xE0, 0x02, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF0, 0x23, 0xF2, 0x15, 0x60, 0xC9, 0xF9, 0x02, 0xA8, 0x64, 0x44,
-        0x1F, 0x02, 0x3F, 0x40, 0x02, 0x2B, 0x16, 0x00, 0x00, 0x37, 0x14, 0x00, 0x01, 0x3B, 0x18, 0x00,
-        0x11, 0x60, 0xF9, 0x65, 0x11, 0x60, 0x19, 0x63, 0xFF, 0xB7, 0x60, 0x5C, 0xA3, 0xD3, 0x08, 0xA3,
-        0x00, 0x7E, 0xD0, 0x80, 0xD7, 0x80, 0x03, 0x03, 0xF9, 0x02, 0x7F, 0x67, 0x0A, 0x00, 0xF4, 0xA3,
-        0xA3, 0xD1, 0x04, 0x00, 0x00, 0xBC, 0xF2, 0xA4, 0x03, 0x03, 0x02, 0x07, 0x13, 0x60, 0x52, 0xF9,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x20, 0x63, 0x27, 0x60, 0x06, 0x61, 0x48, 0x64, 0x58, 0xD0,
-        0x59, 0xD9, 0xFD, 0x1F, 0x25, 0xF0, 0x20, 0x64, 0xD0, 0x81, 0xFF, 0xFF, 0x02, 0x07, 0x25, 0xFA,
-        0x0F, 0x00, 0x27, 0x60, 0x0A, 0x63, 0xC3, 0x83, 0x01, 0x2A, 0x06, 0x00, 0xCF, 0x83, 0xA3, 0xD3,
-        0xCD, 0x81, 0x00, 0x7F, 0xBD, 0xDB, 0x04, 0x03, 0x00, 0x64, 0xC9, 0x81, 0xBD, 0xDB, 0xFD, 0x02,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x01, 0x60, 0x6E, 0x63, 0x7F, 0x67,
-        0x3A, 0x18, 0xA3, 0xD9, 0x26, 0xF0, 0x7F, 0x67, 0x36, 0x18, 0x5B, 0xD9, 0x13, 0x60, 0x0A, 0xF3,
-        0x25, 0xF0, 0x60, 0x40, 0x03, 0x3A, 0x2E, 0x00, 0x86, 0xF3, 0x87, 0xF3, 0x60, 0x43, 0xE3, 0x83,
-        0x60, 0x46, 0x0F, 0xF8, 0x30, 0x61, 0x94, 0xFA, 0x01, 0x61, 0x91, 0xFA, 0x16, 0x64, 0x12, 0xFA,
-        0x60, 0x40, 0x10, 0x36, 0x05, 0x00, 0x12, 0x36, 0x08, 0x00, 0x0C, 0x36, 0x0B, 0x00, 0x0F, 0x00,
-        0x40, 0x61, 0xA1, 0x80, 0x0A, 0x64, 0x11, 0x02, 0xF3, 0x01, 0x10, 0x61, 0xA1, 0x80, 0x0E, 0x64,
-        0x0C, 0x02, 0xEE, 0x01, 0x08, 0x61, 0xA1, 0x80, 0x10, 0x64, 0x07, 0x02, 0xE9, 0x01, 0xE1, 0x81,
-        0xA1, 0x80, 0x05, 0x05, 0xC8, 0x84, 0x01, 0x02, 0xE3, 0x01, 0x12, 0xFA, 0x91, 0xFA, 0x66, 0x44,
-        0x02, 0xA6, 0xD7, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA5, 0xF0, 0xA3, 0xD1,
-        0xFF, 0xFF, 0x64, 0x5E, 0x00, 0x7F, 0x60, 0x41, 0x64, 0x47, 0x7C, 0x5F, 0x88, 0xF1, 0x66, 0x43,
-        0xC0, 0x86, 0x65, 0x44, 0xA1, 0xDA, 0x63, 0x46, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3,
-        0xA3, 0xD1, 0xFF, 0xFF, 0x64, 0x5E, 0x00, 0x7F, 0x60, 0x45, 0x64, 0x47, 0x7C, 0x5F, 0x88, 0xF1,
-        0x66, 0x41, 0xC0, 0x86, 0x65, 0x44, 0xA0, 0xD2, 0x61, 0x46, 0x25, 0xFA, 0x02, 0x64, 0x23, 0xFA,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0x15, 0x60, 0xC8, 0xFB, 0xFF, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x00, 0x67, 0x02, 0x02, 0x2D, 0xF9,
-        0x2C, 0xF9, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF2, 0x02, 0xA8, 0x00, 0xA8, 0x0A, 0x02,
-        0x07, 0x03, 0xD0, 0xA0, 0x30, 0x65, 0x03, 0x04, 0xA7, 0xA0, 0x59, 0x65, 0x01, 0x06, 0x65, 0x44,
-        0x13, 0x60, 0x51, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0x15, 0x60, 0xCF, 0xFB,
-        0xFF, 0xFF, 0x08, 0x2A, 0x25, 0x00, 0x15, 0x60, 0xDD, 0xF3, 0xFF, 0xFF, 0xE9, 0xB4, 0x60, 0x44,
-        0x15, 0x60, 0xCF, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x26, 0x02, 0xBC, 0x64, 0x40, 0x02, 0x2A,
-        0x04, 0xBC, 0x64, 0x40, 0x04, 0x26, 0x08, 0x00, 0x15, 0x60, 0xDD, 0xFB, 0x13, 0x64, 0xAD, 0xFB,
-        0x01, 0x60, 0x67, 0x64, 0x37, 0xFB, 0x0C, 0x00, 0x10, 0xBC, 0x15, 0x60, 0xDD, 0xFB, 0x08, 0x64,
-        0xAD, 0xFB, 0x82, 0xF3, 0x01, 0x60, 0x67, 0x7C, 0x60, 0x40, 0x01, 0x27, 0x5B, 0x7C, 0x37, 0xF9,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0x15, 0x60, 0xD0, 0xFB, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x25, 0xF2, 0x15, 0x60, 0xD1, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2,
-        0x15, 0x60, 0xEB, 0xFB, 0xFF, 0xFF, 0x0F, 0x22, 0x41, 0x75, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x04, 0x61, 0x06, 0x00, 0x01, 0x64, 0x01, 0x00, 0x00, 0x64, 0x18, 0x60, 0x13, 0xFB, 0x06, 0x61,
-        0x41, 0x56, 0xC7, 0xFE, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x78, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x10, 0x02, 0x08, 0x61,
-        0x41, 0x56, 0xC7, 0xFE, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00,
-        0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x03, 0x00, 0x04, 0x7C, 0xBC, 0xF9, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x78, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x10, 0x02,
-        0x0A, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23,
-        0x04, 0x00, 0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x03, 0x00, 0x01, 0x7C, 0xBC, 0xF9, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x02, 0x63, 0x64, 0xF3, 0x23, 0xFC, 0x60, 0x40, 0x01, 0x23, 0x17, 0x00,
-        0x01, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x11, 0x60, 0x14, 0x61, 0x11, 0x60, 0xF4, 0x65, 0xA1, 0xD1,
-        0xD5, 0x80, 0xD0, 0x80, 0x0B, 0x03, 0x02, 0x03, 0x08, 0xA1, 0xF9, 0x01, 0x04, 0xA1, 0xA1, 0xD3,
-        0x01, 0x60, 0x00, 0x65, 0x60, 0x47, 0xFF, 0xB4, 0xB4, 0x84, 0x01, 0x00, 0xFF, 0x64, 0x25, 0xFA,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x46, 0x45, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64,
-        0xD0, 0x80, 0x00, 0xF4, 0x01, 0xF2, 0x66, 0x5C, 0x25, 0x46, 0x56, 0x02, 0x70, 0x27, 0x54, 0x00,
-        0x12, 0x64, 0x03, 0xFA, 0x04, 0xF8, 0x0E, 0xF2, 0x87, 0xFC, 0x8D, 0xFC, 0x8E, 0xFC, 0xDA, 0x82,
-        0x16, 0x61, 0x00, 0x63, 0xC9, 0x81, 0x5A, 0xDC, 0xFD, 0x02, 0x60, 0x40, 0xF0, 0x3B, 0x16, 0x00,
-        0x32, 0x44, 0x8E, 0xF3, 0x01, 0xB0, 0xF6, 0xA0, 0x08, 0x24, 0x2C, 0x05, 0xDC, 0x83, 0xF0, 0x67,
-        0x0E, 0xFA, 0x1F, 0x60, 0x0A, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0x8E, 0xFD, 0x2B, 0xFF, 0xFE, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x4F, 0x00, 0x8F, 0xF3, 0x09, 0x65,
-        0xD4, 0x80, 0xDC, 0x83, 0x17, 0x05, 0x8F, 0xFD, 0x98, 0xFE, 0x04, 0x04, 0x00, 0x7F, 0x08, 0x7E,
-        0x0E, 0xFA, 0x3B, 0xFF, 0x1E, 0x60, 0xFE, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0x0E, 0xF2, 0x2B, 0xFF, 0x60, 0x40, 0x08, 0x26, 0xF7, 0xFE, 0xFD, 0x64, 0x3B, 0x42,
-        0x4A, 0xDB, 0x32, 0x00, 0x8B, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0, 0xFF, 0xFF, 0x0D, 0x04, 0x1F, 0x60,
-        0x16, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xFC, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x21, 0x00, 0x46, 0x45, 0x00, 0x64, 0x2B, 0xDB, 0x25, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0,
-        0x0A, 0x18, 0x70, 0x67, 0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03, 0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46,
-        0x25, 0x44, 0x80, 0xFC, 0x05, 0xFA, 0xB6, 0x60, 0x58, 0x4E, 0x72, 0x78, 0xFF, 0xFF, 0xD4, 0xFE,
-        0xA3, 0xFF, 0xFF, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0xD4, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF,
-        0x1F, 0x60, 0x04, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x0D, 0x00, 0x1E, 0x60, 0xF8, 0x64, 0x40, 0x47,
-        0x58, 0x4F, 0x18, 0x00, 0x1F, 0x60, 0x10, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x03, 0x00, 0xF0, 0x60,
-        0xC7, 0x78, 0xFF, 0xFF, 0x27, 0xD5, 0x0E, 0xF2, 0x0B, 0x18, 0x60, 0x40, 0x01, 0x2A, 0x08, 0x00,
-        0x1F, 0x60, 0x26, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF, 0xF2, 0x01,
-        0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD5, 0x0E, 0xF2, 0x14, 0x18, 0x60, 0x40, 0x01, 0x2A, 0x11, 0x00,
-        0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0x8F, 0xF3, 0x02, 0x02, 0xCC, 0x84,
-        0x8F, 0xFB, 0x1F, 0x60, 0x26, 0x64, 0x40, 0x4B, 0xF6, 0x60, 0x58, 0x4D, 0xB3, 0x78, 0xFF, 0xFF,
-        0xE9, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFB, 0x64, 0x3A, 0x42, 0x4A, 0xDB, 0xA2, 0xFF, 0x92, 0xF3,
-        0x8E, 0xF3, 0xCC, 0x80, 0xFA, 0xA0, 0x01, 0x14, 0x1D, 0x05, 0xB5, 0x60, 0x58, 0x4D, 0x77, 0x78,
-        0xFF, 0xFF, 0xA2, 0xFF, 0x17, 0x03, 0xF0, 0x67, 0x0E, 0xFA, 0x1F, 0x60, 0x0A, 0x64, 0x0F, 0x60,
-        0x93, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF6, 0x64,
-        0x3A, 0x42, 0x4A, 0xDB, 0x92, 0xF3, 0x8E, 0xF3, 0xCC, 0x83, 0xDC, 0x84, 0x01, 0x15, 0x92, 0xFD,
-        0x8E, 0xFB, 0xD4, 0xFE, 0x91, 0xF3, 0x8F, 0xF3, 0x00, 0xA8, 0x90, 0xF1, 0x03, 0x02, 0xD0, 0x80,
-        0xFF, 0xFF, 0x26, 0x05, 0xB5, 0x60, 0x58, 0x4D, 0x77, 0x78, 0xFF, 0xFF, 0xA2, 0xFF, 0x20, 0x03,
-        0x00, 0x63, 0x91, 0xF3, 0x0E, 0xFC, 0xCC, 0x84, 0xFF, 0x3A, 0x91, 0xFB, 0x98, 0xFE, 0x03, 0x04,
-        0x08, 0xBB, 0x0E, 0xFC, 0x3B, 0xFF, 0x1E, 0x60, 0xFE, 0x64, 0x0F, 0x60, 0x93, 0xFB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF7, 0x64, 0x3A, 0x42, 0x4A, 0xDB,
-        0x8F, 0xF3, 0x0E, 0xF2, 0xDC, 0x83, 0x08, 0xB0, 0x8F, 0xFD, 0x08, 0x28, 0xF7, 0xFE, 0xD4, 0xFE,
-        0xA3, 0xFF, 0xF0, 0x60, 0xC7, 0x78, 0xFF, 0xFF, 0xB9, 0xFE, 0x13, 0xFF, 0x24, 0x40, 0x80, 0x2B,
-        0x0B, 0x00, 0xA2, 0xFF, 0x25, 0x46, 0x09, 0xF4, 0x0E, 0xF2, 0x05, 0x18, 0x08, 0xBC, 0x0E, 0xFA,
-        0xFF, 0xFF, 0xF7, 0xFE, 0x01, 0x00, 0xD8, 0xFE, 0xA3, 0xFF, 0x25, 0x46, 0x3E, 0xF2, 0x00, 0xF4,
-        0x08, 0xF0, 0x25, 0x46, 0x06, 0xB4, 0xFF, 0x7F, 0x10, 0xBC, 0x06, 0x26, 0xFD, 0x7F, 0x0E, 0xFA,
-        0x3E, 0xF2, 0x3F, 0xF2, 0x60, 0x41, 0x08, 0x2A, 0x64, 0x47, 0x3F, 0xFA, 0x60, 0x45, 0x13, 0x60,
-        0x2D, 0xF3, 0xA3, 0xFC, 0xAB, 0xFC, 0x91, 0xFC, 0xD4, 0x80, 0x38, 0x60, 0xC1, 0x65, 0xA5, 0x80,
-        0x01, 0x04, 0x07, 0x03, 0x23, 0xF0, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xF8, 0x60, 0x57, 0x78,
-        0xFF, 0xFF, 0xFB, 0x60, 0x58, 0x4F, 0x75, 0x78, 0xFF, 0xFF, 0x0B, 0x04, 0x23, 0xF0, 0x04, 0x64,
-        0xB0, 0x84, 0xA2, 0xDA, 0x25, 0x60, 0xF4, 0x64, 0xE5, 0x60, 0x78, 0x41, 0xC7, 0x78, 0x97, 0xF1,
-        0x46, 0x00, 0x3E, 0xF0, 0x88, 0xF1, 0x64, 0x47, 0x07, 0xB4, 0x07, 0x36, 0x3B, 0x00, 0x04, 0x03,
-        0xCC, 0x84, 0xE0, 0x84, 0xC0, 0x83, 0x2D, 0x00, 0x2C, 0xF2, 0x87, 0xF1, 0x01, 0xB0, 0x64, 0x43,
-        0x35, 0x02, 0x2E, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3,
-        0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x2E, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x2D, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2,
-        0x06, 0x02, 0x61, 0x46, 0x2C, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4,
-        0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03,
-        0x09, 0x00, 0x66, 0x45, 0x63, 0x46, 0x06, 0xF0, 0x65, 0x46, 0x64, 0x44, 0x0C, 0x26, 0x02, 0x00,
-        0x02, 0x26, 0x04, 0x00, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x07, 0xFC, 0x23, 0xF2,
-        0xFF, 0xFF, 0x0F, 0x1B, 0x1E, 0x60, 0xE0, 0x64, 0x0F, 0x60, 0x93, 0xFB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xC8, 0xFE, 0x10, 0xAC, 0x0E, 0xFA,
-        0x0E, 0x00, 0x1E, 0x60, 0xF2, 0x64, 0x0F, 0x60, 0x93, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xCE, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0xF0, 0x60,
-        0xC7, 0x78, 0xFF, 0xFF, 0xCB, 0x84, 0xC9, 0x83, 0xFF, 0xFF, 0x08, 0x04, 0x58, 0xD1, 0xA5, 0xD8,
-        0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x2F, 0x58, 0xFF, 0xFF,
-        0x25, 0xF0, 0x14, 0x60, 0x15, 0xF9, 0x11, 0x00, 0x0D, 0x60, 0x00, 0x62, 0x40, 0x63, 0x5A, 0xDF,
-        0xFE, 0x1F, 0x04, 0x65, 0x0D, 0x60, 0x00, 0x61, 0x48, 0x64, 0x3E, 0x63, 0x7C, 0xA8, 0x58, 0xD0,
-        0x59, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x14, 0x60, 0x15, 0xF1, 0x0C, 0x60,
-        0xDC, 0x65, 0x02, 0xFE, 0x64, 0x44, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x87, 0x60, 0x41, 0x64, 0x44,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x84, 0x3E, 0xFB, 0x60, 0x42, 0x61, 0x44, 0x03, 0xA2, 0x60, 0xFE,
-        0xA2, 0xDB, 0x20, 0xFE, 0x64, 0x44, 0x0D, 0x60, 0x02, 0x65, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xC4, 0x84, 0x40, 0xFB, 0xFF, 0xFF, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF,
-        0x5C, 0x41, 0x25, 0xF2, 0xFF, 0xFF, 0x40, 0x42, 0x80, 0x2B, 0x04, 0x00, 0xFF, 0xB4, 0x40, 0x42,
-        0x01, 0x64, 0x40, 0x41, 0x87, 0xF3, 0x46, 0x4B, 0x86, 0xF3, 0x60, 0x46, 0xE0, 0x83, 0xAB, 0x46,
-        0x26, 0xF0, 0xAB, 0x46, 0x59, 0xF8, 0xAB, 0x46, 0x27, 0xF0, 0xAB, 0x46, 0x5A, 0xF8, 0xAB, 0x46,
-        0x28, 0xF0, 0xAB, 0x46, 0x5B, 0xF8, 0x66, 0x44, 0x02, 0xA6, 0xF1, 0x1F, 0x87, 0xF3, 0xFF, 0xFF,
-        0x60, 0x46, 0xAB, 0x46, 0x0C, 0x60, 0x3A, 0x65, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81, 0xC9, 0x81, 0x52, 0x64, 0x0E, 0x63, 0x58, 0xD0, 0x59, 0xD9,
-        0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF0, 0xA1, 0x76, 0x64, 0x0E, 0x63,
-        0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0x0C, 0x60, 0x9C, 0x65, 0xC4, 0x81, 0x60, 0x45, 0xC9, 0x81, 0x62, 0x64, 0x06, 0x63,
-        0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF8, 0xA1,
-        0xB6, 0x64, 0x06, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46, 0x65, 0x44, 0x0C, 0x60,
-        0xBC, 0x65, 0xC4, 0x81, 0xC9, 0x81, 0x6A, 0x64, 0x06, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F,
-        0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x84, 0x0C, 0x60, 0x82, 0x65, 0xC4, 0x81,
-        0x72, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0xAB, 0x46, 0x21, 0x44, 0x01, 0x2A,
-        0x06, 0x00, 0xFA, 0xA1, 0x90, 0x64, 0x04, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0x3B, 0xF0,
-        0x21, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x22, 0x44, 0x3D, 0xFB, 0x60, 0x41, 0x02, 0xFE, 0xF8, 0x84,
-        0xF8, 0x84, 0xF8, 0x84, 0x3C, 0xFB, 0x0C, 0x60, 0x7E, 0x63, 0x88, 0xFF, 0xCD, 0x81, 0x06, 0xA3,
-        0xFD, 0x0D, 0x8D, 0xFF, 0x3B, 0xFD, 0x64, 0x47, 0x80, 0xBF, 0x60, 0x5C, 0x22, 0x43, 0x80, 0x61,
-        0x88, 0xFF, 0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0xB1, 0x84,
-        0x3B, 0xFA, 0x86, 0xF3, 0xFF, 0xFF, 0xCC, 0x83, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0x3B, 0xF0,
-        0x66, 0x44, 0xB1, 0x9C, 0x3B, 0xF8, 0x02, 0xA6, 0xFA, 0x1F, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61,
-        0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x00, 0x67, 0x24, 0x02, 0x3D, 0xF1,
-        0x64, 0x44, 0x03, 0xB4, 0x40, 0x42, 0xD0, 0x80, 0x87, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xBB, 0xF4,
-        0x80, 0x61, 0x02, 0x02, 0xE3, 0x83, 0xEB, 0x83, 0x22, 0x44, 0x88, 0xFF, 0xCC, 0x84, 0xE1, 0x81,
-        0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0x9D, 0x85, 0xA7, 0x83, 0x3B, 0xFC, 0x86, 0xF3,
-        0xFF, 0xFF, 0xCC, 0x83, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0xBB, 0xF2, 0x66, 0x44, 0xA5, 0x81,
-        0xBB, 0xFA, 0x02, 0xA6, 0xFA, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x11, 0x64, 0x23, 0xFA,
-        0x25, 0x44, 0x24, 0xFA, 0x04, 0x64, 0x40, 0x4B, 0x62, 0x41, 0x0C, 0x60, 0x82, 0x64, 0x04, 0x63,
-        0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F, 0x2B, 0x43, 0x00, 0x7C, 0x59, 0xD8, 0x4F, 0x8B, 0x06, 0xA4,
-        0xF6, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x27, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18,
-        0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE,
-        0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x2A, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60,
-        0x30, 0x7C, 0xB0, 0x84, 0xA2, 0xDA, 0x4E, 0x61, 0x76, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0,
-        0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x90, 0x64, 0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46,
-        0x58, 0xD8, 0xFB, 0x1F, 0xD9, 0x81, 0xA0, 0x64, 0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46,
-        0x58, 0xD8, 0xFB, 0x1F, 0xD9, 0x81, 0xB6, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46,
-        0x58, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61,
-        0x23, 0x58, 0xFF, 0xFF, 0x27, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03,
-        0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46,
-        0x01, 0x03, 0x0D, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60, 0x30, 0x61, 0x9D, 0x85,
-        0xA4, 0x84, 0xA2, 0xDA, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67,
-        0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x40, 0x41, 0x4A, 0x64, 0xA0, 0xD2, 0xFF, 0xFF,
-        0x40, 0x42, 0x80, 0x2B, 0x04, 0x00, 0xFF, 0xB4, 0x40, 0x42, 0x01, 0x64, 0x40, 0x41, 0x87, 0xF3,
-        0x46, 0x4B, 0x86, 0xF3, 0x60, 0x46, 0xE0, 0x83, 0xAB, 0x46, 0x32, 0xF0, 0xAB, 0x46, 0x59, 0xF8,
-        0xAB, 0x46, 0x33, 0xF0, 0xAB, 0x46, 0x5A, 0xF8, 0xAB, 0x46, 0x34, 0xF0, 0xAB, 0x46, 0x5B, 0xF8,
-        0x66, 0x44, 0x02, 0xA6, 0xF1, 0x1F, 0x87, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xAB, 0x46, 0x0C, 0x60,
-        0x3A, 0x65, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81,
-        0xC9, 0x81, 0x4A, 0x64, 0x0E, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A,
-        0x08, 0x00, 0xAB, 0x46, 0xF0, 0xA1, 0x76, 0x64, 0x0E, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F,
-        0xAB, 0x46, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x84, 0x0C, 0x60, 0x82, 0x65,
-        0xC4, 0x81, 0x5A, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0xAB, 0x46, 0x21, 0x44,
-        0x01, 0x2A, 0x06, 0x00, 0xFA, 0xA1, 0x90, 0x64, 0x04, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F,
-        0x3B, 0xF0, 0x21, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x22, 0x44, 0x3D, 0xFB, 0x60, 0x41, 0x02, 0xFE,
-        0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x84, 0x3C, 0xFB, 0x0C, 0x60, 0x7E, 0x63, 0x88, 0xFF, 0xCD, 0x81,
-        0x06, 0xA3, 0xFD, 0x0D, 0x8D, 0xFF, 0x3B, 0xFD, 0x64, 0x47, 0x80, 0xBF, 0x60, 0x5C, 0x22, 0x43,
-        0x80, 0x61, 0x88, 0xFF, 0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91,
-        0xB1, 0x84, 0x3B, 0xFA, 0x86, 0xF3, 0xFF, 0xFF, 0xCC, 0x83, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6,
-        0x3B, 0xF0, 0x66, 0x44, 0xB1, 0x9C, 0x3B, 0xF8, 0x02, 0xA6, 0xFA, 0x1F, 0xAB, 0x46, 0x00, 0x67,
-        0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x00, 0x67, 0x24, 0x02,
-        0x3D, 0xF1, 0x64, 0x44, 0x03, 0xB4, 0x40, 0x42, 0xD0, 0x80, 0x87, 0xF3, 0xFF, 0xFF, 0x60, 0x46,
-        0xBB, 0xF4, 0x80, 0x61, 0x02, 0x02, 0xE3, 0x83, 0xEB, 0x83, 0x22, 0x44, 0x88, 0xFF, 0xCC, 0x84,
-        0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0x9D, 0x85, 0xA7, 0x83, 0x3B, 0xFC,
-        0x86, 0xF3, 0xFF, 0xFF, 0xCC, 0x83, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0xBB, 0xF2, 0x66, 0x44,
-        0xA5, 0x81, 0xBB, 0xFA, 0x02, 0xA6, 0xFA, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x27, 0xF2,
-        0x15, 0x60, 0x02, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x21, 0x00, 0x43, 0x4B,
-        0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60, 0x30, 0x7C, 0xB0, 0x84, 0xA2, 0xDA, 0x4E, 0x61, 0x76, 0x64,
-        0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x90, 0x64, 0x04, 0x63,
-        0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0xA0, 0x64, 0x04, 0x63, 0xAB, 0x46,
-        0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF,
-        0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x27, 0xF2, 0x15, 0x60, 0x02, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18,
-        0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0x87, 0xF3, 0x08, 0xFE,
-        0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x0D, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60,
-        0x30, 0x61, 0x9D, 0x85, 0xA4, 0x84, 0xA2, 0xDA, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x3E, 0xF2, 0xAB, 0xF1, 0x08, 0xB0,
-        0x19, 0xF8, 0x4A, 0x02, 0x07, 0x23, 0x2B, 0x00, 0x60, 0x47, 0x07, 0xB4, 0x88, 0xF1, 0xCC, 0x84,
-        0xE0, 0x84, 0x40, 0x8A, 0xAA, 0x46, 0x03, 0xF2, 0x04, 0xF0, 0x05, 0xF2, 0x60, 0x43, 0xAA, 0x46,
-        0x2C, 0xFC, 0x2D, 0xF8, 0x2E, 0xFA, 0xCB, 0xF1, 0x2F, 0xF8, 0xCC, 0xF1, 0x30, 0xF8, 0xCD, 0xF1,
-        0x31, 0xF8, 0x46, 0x4A, 0x00, 0xF4, 0x02, 0xF2, 0x03, 0xF0, 0x04, 0xF2, 0x60, 0x43, 0xAA, 0x46,
-        0x32, 0xFC, 0x33, 0xF8, 0x34, 0xFA, 0xAA, 0x46, 0x05, 0xF2, 0x06, 0xF0, 0x07, 0xF2, 0x60, 0x43,
-        0xAA, 0x46, 0x36, 0xFC, 0x37, 0xF8, 0x38, 0xFA, 0x03, 0x60, 0x08, 0x64, 0x1C, 0x00, 0x66, 0xF1,
-        0x2F, 0xF8, 0x67, 0xF1, 0x30, 0xF8, 0x68, 0xF1, 0x31, 0xF8, 0x46, 0x4A, 0x00, 0xF4, 0x02, 0xF2,
-        0x03, 0xF0, 0x04, 0xF2, 0x60, 0x43, 0xAA, 0x46, 0x2C, 0xFC, 0x2D, 0xF8, 0x2E, 0xFA, 0xAA, 0x46,
-        0x05, 0xF2, 0x06, 0xF0, 0x07, 0xF2, 0x60, 0x43, 0xAA, 0x46, 0x32, 0xFC, 0x33, 0xF8, 0x34, 0xFA,
-        0x02, 0x60, 0x08, 0x64, 0x00, 0x00, 0x2A, 0xFA, 0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x42, 0x6F,
-        0x6F, 0x74, 0x63, 0x6F, 0x64, 0x65, 0x20, 0x21, 0x21, 0x20, 0x20, 0x00, 0x53, 0x54, 0x41, 0x2F,
-        0x41, 0x50, 0x20, 0x46, 0x75, 0x6E, 0x63, 0x27, 0x73, 0x00, 0x20, 0x00, 0x03, 0x00, 0x01, 0x00,
-        0x18, 0x00, 0x00, 0x00, 0x08, 0x00, 0x04, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00,
-        0x04, 0x00, 0x06, 0x00, 0x07, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00,
-        0x07, 0x00, 0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00,
-        0x02, 0x00, 0x00, 0x00,
-
-};  /* fw_image_4_data */
-
-static const CFG_IDENTITY_STRCT fw_image_infoidentity[] = {
-       {
-               sizeof(CFG_IDENTITY_STRCT) / sizeof(hcf_16) - 1,
-               CFG_FW_IDENTITY,
-               COMP_ID_FW_AP,
-               3,      /* Variant */
-               1,      /* Major */
-               24      /* Minor */
-       },
-       { 0000, 0000, 0000, 0000, 0000, 0000 }  /* endsentinel */
-};
-
-static const CFG_PROG_STRCT fw_image_code[] = {
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode */
-               0x0148,                 /* sizeof(fw_image_1_data), */
-               0x00000060,             /* Target address in NIC Memory */
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_1_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode */
-               0x2432,                 /* sizeof(fw_image_2_data), */
-               0x00000C16,             /* Target address in NIC Memory */
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_2_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /*  mode */
-               0x194c,                 /*  sizeof(fw_image_3_data), */
-               0x001E3048,             /*  Target address in NIC Memory */
-               0x0000,                 /*  CRC: yes/no TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_3_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode*/
-               0xb7e4,                 /* sizeof(fw_image_4_data),*/
-               0x001F4000,             /* Target address in NIC Memory*/
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary*/
-               (hcf_8 *)fw_image_4_data
-       },
-       {
-               5,
-               CFG_PROG,
-               CFG_PROG_STOP,          /* mode*/
-               0000,
-               0x000F2101,             /* Start execution address*/
-       },
-       { 0000, 0000, 0000, 0000, 00000000, 0000, 00000000}
-};
-
-static const CFG_RANGE20_STRCT fw_image_infocompat[] = {
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_FW_SUP_RANGE,
-               COMP_ROLE_SUPL,
-               COMP_ID_APF,
-               {
-                       { 4, 1, 1 }     /* variant, bottom, top*/
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_MFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_MFI,
-               {
-                       { 7, 3, 3 },    /* variant, bottom, top */
-                       { 8, 1, 1 }     /* variant, bottom, top */
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_CFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_CFI,
-               {
-                       { 4, 1, 2 }     /* variant, bottom, top */
-               }
-       },
-       { 0000, 0000, 0000, 0000, { { 0000, 0000, 0000 } } }    /* endsentinel */
-};
-
-memimage fw_image = {
-       "FUPU7D37dhfwci\001C",                  /* signature, <format number>, C/Bin type */
-       (CFG_PROG_STRCT *) fw_image_code,
-       0x000F2101,
-       00000000,                               /* (dummy) pdaplug */
-       00000000,                               /* (dummy) priplug */
-       (CFG_RANGE20_STRCT *) fw_image_infocompat,
-       (CFG_IDENTITY_STRCT *) fw_image_infoidentity,
-};
-
diff --git a/drivers/staging/wlags49_h2/debug.h b/drivers/staging/wlags49_h2/debug.h
deleted file mode 100644 (file)
index 40f6a3e..0000000
+++ /dev/null
@@ -1,199 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file contains definitions and macros for debugging.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright (c) 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef _DEBUG_H
-#define _DEBUG_H
-
-
-
-
-/* Turn on debugging here if not done with a preprocessor define */
-#ifndef DBG
-#define DBG 0
-#else
-#undef DBG
-#define DBG 1
-#endif /* DBG */
-
-
-
-
-#if DBG
-/****************************************************************************/
-
-/* Set the level of debugging if not done with a preprocessor define. See
-   wl_main.c, init_module() for how the debug level translates into the
-   the types of messages displayed */
-#ifndef DBG_LVL
-#define DBG_LVL 5                      /* yields nothing via init_module,
-                                          original value of 5 yields
-                                          DBG_TRACE_ON and DBG_VERBOSE_ON */
-#endif  /*  DBG_LVL*/
-
-
-#define DBG_ERROR_ON        0x00000001L
-#define DBG_WARNING_ON      0x00000002L
-#define DBG_NOTICE_ON       0x00000004L
-#define DBG_TRACE_ON        0x00000008L
-#define DBG_VERBOSE_ON      0x00000010L
-#define DBG_PARAM_ON        0x00000020L
-#define DBG_BREAK_ON        0x00000040L
-#define DBG_RX_ON           0x00000100L
-#define DBG_TX_ON           0x00000200L
-#define DBG_DS_ON           0x00000400L
-
-#define DBG_DEFAULTS        (DBG_ERROR_ON | DBG_WARNING_ON | DBG_BREAK_ON)
-
-#define DBG_FLAGS(A)        ((A)->DebugFlag)
-#define DBG_NAME(A)         ((A)->dbgName)
-#define DBG_LEVEL(A)        ((A)->dbgLevel)
-
-
-#ifndef DBG_PRINT
-#   define DBG_PRINT(S...)  printk(KERN_DEBUG S)
-#endif /* DBG_PRINT */
-
-
-#ifndef DBG_PRINTC
-#   define DBG_PRINTC(S...) printk(S)
-#endif /* DBG_PRINTC */
-
-
-#define DBG_PARAM(A, N, F, S...)   {if (DBG_FLAGS(A) & DBG_PARAM_ON) \
-                               DBG_PRINT("  %s -- "F"\n", N, S); }
-
-
-#define DBG_ERROR(A, S...) do {                                                \
-               if (DBG_FLAGS(A) & DBG_ERROR_ON) {                      \
-                       DBG_PRINT("%s:ERROR:%s ", DBG_NAME(A), __func__); \
-                       DBG_PRINTC(S);                                  \
-               } } while (0)
-
-
-#define DBG_WARNING(A, S...) do {                                      \
-               if (DBG_FLAGS(A) & DBG_WARNING_ON) {                    \
-                       DBG_PRINT("%s:WARNING:%s ", DBG_NAME(A), __func__); \
-                       DBG_PRINTC(S);                                  \
-               } } while (0)
-
-
-#define DBG_NOTICE(A, S...)  do {                                      \
-               if (DBG_FLAGS(A) & DBG_NOTICE_ON) {                     \
-                       DBG_PRINT("%s:NOTICE:%s ", DBG_NAME(A), __func__); \
-                       DBG_PRINTC(S);                                  \
-               } } while (0)
-
-
-#define DBG_TRACE(A, S...)   do { \
-               if (DBG_FLAGS(A) & DBG_TRACE_ON) {                      \
-                       DBG_PRINT("%s:%s ", DBG_NAME(A), __func__);     \
-                       DBG_PRINTC(S);                                  \
-               } } while (0)
-
-
-#define DBG_RX(A, S...)      {if (DBG_FLAGS(A) & DBG_RX_ON) {\
-                               DBG_PRINT(S); } }
-
-
-#define DBG_TX(A, S...)      {if (DBG_FLAGS(A) & DBG_TX_ON) {\
-                               DBG_PRINT(S); } }
-
-#define DBG_DS(A, S...)      {if (DBG_FLAGS(A) & DBG_DS_ON) {\
-                               DBG_PRINT(S); } }
-
-
-#define DBG_ASSERT(C) do { \
-               if (!(C)) {                                             \
-                       DBG_PRINT("ASSERT(%s) -- %s#%d (%s)\n",         \
-                                 #C, __FILE__, __LINE__, __func__);    \
-               } } while (0)
-
-struct dbg_info {
-       char            *dbgName;
-       int             dbgLevel;
-       unsigned long   DebugFlag;
-};
-
-extern struct dbg_info *DbgInfo;
-
-
-/****************************************************************************/
-#else /* DBG */
-/****************************************************************************/
-
-#define DBG_PRINT(S...)
-#define DBG_PARAM(A, N, F, S...)
-#define DBG_ERROR(A, S...)
-#define DBG_WARNING(A, S...)
-#define DBG_NOTICE(A, S...)
-#define DBG_TRACE(A, S...)
-#define DBG_RX(A, S...)
-#define DBG_TX(A, S...)
-#define DBG_DS(A, S...)
-#define DBG_ASSERT(C)
-
-#endif /* DBG */
-/****************************************************************************/
-
-
-
-
-#endif /* _DEBUG_H */
-
diff --git a/drivers/staging/wlags49_h2/dhf.c b/drivers/staging/wlags49_h2/dhf.c
deleted file mode 100644 (file)
index 4877464..0000000
+++ /dev/null
@@ -1,380 +0,0 @@
-
-/**************************************************************************************************************
-*
-* FILE   :     DHF.C
-*
-* DATE :       $Date: 2004/07/19 08:16:14 $   $Revision: 1.2 $
-* Original     :       2004/05/28 14:05:34    Revision: 1.36      Tag: hcf7_t20040602_01
-* Original     :       2004/05/11 06:22:57    Revision: 1.32      Tag: hcf7_t7_20040513_01
-* Original     :       2004/04/15 09:24:42    Revision: 1.28      Tag: hcf7_t7_20040415_01
-* Original     :       2004/04/08 15:18:16    Revision: 1.27      Tag: t7_20040413_01
-* Original     :       2004/04/01 15:32:55    Revision: 1.25      Tag: t7_20040401_01
-* Original     :       2004/03/10 15:39:28    Revision: 1.21      Tag: t20040310_01
-* Original     :       2004/03/04 11:03:37    Revision: 1.19      Tag: t20040304_01
-* Original     :       2004/03/02 09:27:11    Revision: 1.17      Tag: t20040302_03
-* Original     :       2004/02/24 13:00:28    Revision: 1.15      Tag: t20040224_01
-* Original     :       2004/02/19 10:57:28    Revision: 1.14      Tag: t20040219_01
-* Original     :       2003/11/27 09:00:09    Revision: 1.3      Tag: t20021216_01
-*
-* AUTHOR :     John Meertens
-*                      Nico Valster
-*
-* SPECIFICATION: ........
-*
-* DESC   :     generic functions to handle the download of NIC firmware
-*                      Local Support Routines for above procedures
-*
-*                      Customizable via HCFCFG.H, which is included by HCF.H
-*
-*
-*      DHF is (intended to be) platform-independent.
-*      DHF is a module that provides a number of routines to download firmware
-*      images (the names primary, station, access point, secondary and tertiary
-*      are used or have been used) to volatile or nonvolatile memory
-*      in WaveLAN/IEEE NICs. To achieve this DHF makes use of the WaveLAN/IEEE
-*      WCI as implemented by the HCF-module.
-*
-*      Download to non-volatile memory is used to update a WaveLAN/IEEE NIC to new
-*      firmware. Normally this will be an upgrade to newer firmware, although
-*      downgrading to older firmware is possible too.
-*
-* Note: relative to Asserts, the following can be observed:
-*      Since the IFB is not known inside the routine, the macro HCFASSERT is replaced with MMDASSERT.
-*      Also the line number reported in the assert is raised by FILE_NAME_OFFSET (10000) to discriminate the
-*      DHF Asserts from HCF and MMD asserts.
-*
-***************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT (C) 1999 - 2000 by Lucent Technologies.    All Rights Reserved
-* COPYRIGHT (C) 2001 - 2004    by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-**************************************************************************************************************/
-
-#include "hcf.h"
-#include "hcfdef.h"
-#include "dhf.h"
-#include "mmd.h"
-
-/* to distinguish MMD from HCF asserts by means of line number */
-#undef FILE_NAME_OFFSET
-#define FILE_NAME_OFFSET MMD_FILE_NAME_OFFSET
-/*-----------------------------------------------------------------------------
- *
- * Defines, data structures, and global variables
- *
- *---------------------------------------------------------------------------*/
-
-/*                    12345678901234 */
-static char signature[14] = "FUPU7D37dhfwci";
-
-/*-----------------------------------------------------------------------------
- *
- * LTV-records retrieved from the NIC to:
- *     - determine compatibility between NIC and image
- *     - ((setup the buffer size dynamically for non-volatile download (see note below) ))
- *     - supply plugging information contained in the PDA (H-I only)
- *
- *---------------------------------------------------------------------------*/
-
-/* for USB/H1 we needed a smaller value than the CFG_DL_BUF_STRCT reported 8192
-       for the time being it seems simpler to always use 2000 for USB/H1 as well as all other cases rather than
-       using the "fixed anyway" CFG_DL_BUF_STRCT. */
-#define DL_SIZE 2000
-
-/* CFG_IDENTITY_STRCT          pri_identity    = { LOF(CFG_IDENTITY_STRCT), CFG_PRI_IDENTITY }; */
-static CFG_SUP_RANGE_STRCT     mfi_sup         = { LOF(CFG_SUP_RANGE_STRCT), CFG_NIC_MFI_SUP_RANGE };
-static CFG_SUP_RANGE_STRCT     cfi_sup         = { LOF(CFG_SUP_RANGE_STRCT), CFG_NIC_CFI_SUP_RANGE };
-/* Note: could be used rather than the above explained and defined DL_SIZE if need arises
- * CFG_DL_BUF_STRCT            dl_buf          = { LOF(CFG_DL_BUF_STRCT), CFG_DL_BUF };
-*/
-
-/*-----------------------------------------------------------------------------
- * Array ltv_info stores NIC information (in the form of LTV-records)
- * needed for download. A NULL record indicates the end of the array.
- *---------------------------------------------------------------------------*/
-
-/* The LTV_INFO_STRUCT is needed to save the sizes of the structs, because after a GET_INFO()
- * the len field is changed to the real len of the RID by the called routine.
- * This is only relevant if the DHF used without reloading the driver/utility.
- */
-
-static LTV_INFO_STRUCT ltv_info[] = {
-       { (LTVP)&mfi_sup,                       LOF(CFG_SUP_RANGE_STRCT) } ,
-       { (LTVP)&cfi_sup,                       LOF(CFG_SUP_RANGE_STRCT) } ,
-       { (LTVP) NULL,                          0 }
-};
-
-
-/***********************************************************************************************************/
-/***************************************  PROTOTYPES  ******************************************************/
-/***********************************************************************************************************/
-static int                             check_comp_fw(memimage *fw);
-
-
-/************************************************************************************************************
-*.SUBMODULE            int check_comp_fw( memimage *fw )
-*.PURPOSE              Checks compatibility of CFI and MFI, NIC as supplier, station/AP firmware image as supplier.
-*
-*.ARGUMENTS
-*   fw                 F/W image to be downloaded
-*
-*.RETURNS
-*   HFC_SUCCESS        - firmware OK
-*   DHF_ERR_INCOMP_FW
-*
-*.DESCRIPTION
-*   This function uses compatibility and identity information that has been
-*   retrieved from the card which is currently inserted to check whether the
-*   station firmware image to be downloaded is compatible.
-*.ENDDOC                               END DOCUMENTATION
-*************************************************************************************************************/
-static int
-check_comp_fw(memimage *fw)
-{
-CFG_RANGE20_STRCT              *p;
-int                                    rc = HCF_SUCCESS;
-CFG_RANGE_SPEC_STRCT *i;
-
-       switch (fw->identity->typ) {
-       case CFG_FW_IDENTITY:                           /* Station F/W */
-       case COMP_ID_FW_AP_FAKE:                        /* ;?is this useful (used to be:  CFG_AP_IDENTITY) */
-               break;
-       default:
-               MMDASSERT(DO_ASSERT, fw->identity->typ)         /* unknown/unsupported firmware_type: */
-               rc = DHF_ERR_INCOMP_FW;
-               return rc; /* ;? how useful is this anyway,
-                                       *  till that is sorted out might as well violate my own single exit principle
-                                       */
-       }
-       p = fw->compat;
-       i = NULL;
-       while (p->len && i == NULL) {                                   /* check the MFI ranges */
-               if (p->typ  == CFG_MFI_ACT_RANGES_STA) {
-                       i = mmd_check_comp((void *)p, &mfi_sup);
-               }
-               p++;
-       }
-       MMDASSERT(i, 0) /* MFI: NIC Supplier not compatible with F/W image Actor */
-       if (i) {
-               p = fw->compat;
-               i = NULL;
-               while (p->len && i == NULL) {                   /* check the CFI ranges */
-                       if (p->typ  == CFG_CFI_ACT_RANGES_STA) {
-                                i = mmd_check_comp((void *)p, &cfi_sup);
-                       }
-                       p++;
-               }
-               MMDASSERT(i, 0) /* CFI: NIC Supplier not compatible with F/W image Actor */
-       }
-       if (i == NULL) {
-               rc = DHF_ERR_INCOMP_FW;
-       }
-       return rc;
-} /* check_comp_fw */
-
-
-
-
-
-/*-----------------------------------------------------------------------------
- *
- * Exported functions
- *
- *---------------------------------------------------------------------------*/
-
-
-
-/*************************************************************************************************************
-*
-*.MODULE               int dhf_download_binary( void *ifbp, memimage *fw )
-*.PURPOSE              Downloads a complete (primary, station, or access point) firmware image to the NIC.
-*
-*.ARGUMENTS
-*      ifbp            address of the Interface Block
-*   fw                 F/W image to be downloaded
-*
-*.RETURNS
-*   HCF_SUCCESS                - download completed successfully.
-*   DHF_ERR_INCOMP_FW          - firmware not compatible
-*
-*.DESCRIPTION
-*   Initialize global variables
-*   Connect to the DHF
-*   Check the compatibility of the image (For primary firmware images it is checked first
-*      whether download is necessary).
-*   If everything's download the firmware.
-*   Disconnect from the DHF.
-*
-*
-*.DIAGRAM
-*
-*.NOTICE:
-       MMDASSERT is unacceptable because some drivers call dhf_download_binary before hcf_connect
-
-* The old comment was:
-*.ENDDOC                               END DOCUMENTATION
-*************************************************************************************************************/
-int
-dhf_download_binary(memimage *fw)
-{
-int                    rc = HCF_SUCCESS;
-CFG_PROG_STRCT         *p;
-int                            i;
-
-       /* validate the image */
-       for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++)
-               ; /* NOP */
-       if (i != sizeof(signature)              ||
-                fw->signature[i] != 0x01       ||
-                /* test for Little/Big Endian Binary flag */
-                fw->signature[i+1] != (/* HCF_BIG_ENDIAN ? 'B' : */ 'L'))
-               rc = DHF_ERR_INCOMP_FW;
-       else {                                  /* Little Endian Binary format */
-               fw->codep    = (CFG_PROG_STRCT FAR*)((char *)fw->codep + (hcf_32)fw);
-               fw->identity = (CFG_IDENTITY_STRCT FAR*)((char *)fw->identity + (hcf_32)fw);
-               fw->compat   = (CFG_RANGE20_STRCT FAR*)((char *)fw->compat + (hcf_32)fw);
-               for (i = 0; fw->p[i]; i++)
-                       fw->p[i] = ((char *)fw->p[i] + (hcf_32)fw);
-               p = fw->codep;
-               while (p->len) {
-                       p->host_addr = (char *)p->host_addr + (hcf_32)fw;
-                       p++;
-               }
-       }
-       return rc;
-}   /* dhf_download_binary */
-
-
-/*************************************************************************************************************
-*
-*.MODULE               int dhf_download_fw( void *ifbp, memimage *fw )
-*.PURPOSE              Downloads a complete (primary or tertiary) firmware image to the NIC.
-*
-*.ARGUMENTS
-*      ifbp            address of the Interface Block
-*   fw                 F/W image to be downloaded
-*
-*.RETURNS
-*      HCF_SUCCESS             - download completed successfully.
-*      HCF_ERR_NO_NIC          - no NIC present
-*      DHF_ERR_INCOMP_FW       - firmware not compatible
-*
-*.DESCRIPTION
-* - check the signature of the image
-* - get the compatibility information from the components on the NIC
-*        - Primary Firmware Identity
-*        -     Modem - Firmware I/F
-*        -     Controller - Firmware I/F
-*!! - if necessary ( i.e. H-I) get the PDA contents from the NIC
-* - check the compatibility of the MFI and CFI of the NIC with the F/W image
-*      Note: the Primary F/W compatibility is only relevant for the "running" HCF and is already verified in
-*      hcf_connect
-*!! -  if necessary ( i.e. H-I)
-*!!      -     verify the sumcheck of the PDA
-*!!      -     plug the image (based on the PDA and the default plug records)
-* - loop over all the download LTVs in the image which consists of a sequence of
-*        - CFG_PROG_VOLATILE/CFG_PROG_NON_VOLATILE
-*        - 1 or more sequences of CFG_PROG_ADDR, CFG_PROG_DATA,....,CFG_PROG_DATA
-*        -     CFG_PROG_STOP
-*
-*.DIAGRAM
-*
-*.NOTICE
-* The old comment was:
-*      // Download primary firmware if necessary and allowed. This is done silently (without telling
-*      // the user) and only if the firmware in the download image is newer than the firmware in the
-*      // card.  In Major version 4 of the primary firmware functions of Hermes and Shark were
-*      // combined. Prior to that two separate versions existed. We only have to download primary
-*      // firmware if major version of primary firmware in the NIC < 4.
-*      //              download = pri_identity.version_major < 4;
-*      //              if ( download ) {
-*      //                      rc = check_comp_primary( fw );
-*      //              }
-* It is my understanding that Pri Variant 1 must be updated by Pri Variant 2. The test on
-* major version < 4 should amount to the same result but be "principally" less correct
-* In deliberation with the Architecture team, it was decided that this upgrade for old H-I
-* NICs, is an aspect which belongs on the WSU level not on the DHF level
-*
-*.ENDDOC                               END DOCUMENTATION
-*************************************************************************************************************/
-int
-dhf_download_fw(void *ifbp, memimage *fw)
-{
-int                            rc = HCF_SUCCESS;
-LTV_INFO_STRUCT_PTR pp = ltv_info;
-CFG_PROG_STRCT                 *p = fw->codep;
-LTVP                           ltvp;
-int                                    i;
-
-       MMDASSERT(fw != NULL, 0)
-       /* validate the image */
-       for (i = 0; i < sizeof(signature) && fw->signature[i] == signature[i]; i++)
-               ; /* NOP */
-       if (i != sizeof(signature)              ||
-                fw->signature[i] != 0x01               ||
-                /* check for binary image */
-                (fw->signature[i+1] != 'C' && fw->signature[i+1] != (/*HCF_BIG_ENDIAN ? 'B' : */ 'L')))
-                rc = DHF_ERR_INCOMP_FW;
-
-/*     Retrieve all information needed for download from the NIC */
-       while ((rc == HCF_SUCCESS) && ((ltvp = pp->ltvp) != NULL)) {
-               ltvp->len = pp++->len;  /* Set len to original len. This len is changed to real len by GET_INFO() */
-               rc = GET_INFO(ltvp);
-               MMDASSERT(rc == HCF_SUCCESS, rc)
-               MMDASSERT(rc == HCF_SUCCESS, ltvp->typ)
-               MMDASSERT(rc == HCF_SUCCESS, ltvp->len)
-       }
-       if (rc == HCF_SUCCESS)
-               rc = check_comp_fw(fw);
-       if (rc == HCF_SUCCESS) {
-               while (rc == HCF_SUCCESS && p->len) {
-                       rc = PUT_INFO(p);
-                       p++;
-               }
-       }
-       MMDASSERT(rc == HCF_SUCCESS, rc)
-       return rc;
-}   /* dhf_download_fw */
-
-
diff --git a/drivers/staging/wlags49_h2/dhf.h b/drivers/staging/wlags49_h2/dhf.h
deleted file mode 100644 (file)
index 1299b82..0000000
+++ /dev/null
@@ -1,225 +0,0 @@
-
-#ifndef DHF_H
-#define DHF_H
-
-/**************************************************************************************************************
-*
-* FILE   :     DHF.H
-*
-* DATE :       $Date: 2004/07/19 08:16:14 $   $Revision: 1.2 $
-* Original     :       2004/05/17 07:33:13    Revision: 1.25      Tag: hcf7_t20040602_01
-* Original     :       2004/05/11 06:03:14    Revision: 1.24      Tag: hcf7_t7_20040513_01
-* Original     :       2004/04/15 09:24:42    Revision: 1.22      Tag: hcf7_t7_20040415_01
-* Original     :       2004/04/09 14:35:52    Revision: 1.21      Tag: t7_20040413_01
-* Original     :       2004/04/01 15:32:55    Revision: 1.18      Tag: t7_20040401_01
-* Original     :       2004/03/10 15:39:28    Revision: 1.15      Tag: t20040310_01
-* Original     :       2004/03/04 11:03:38    Revision: 1.13      Tag: t20040304_01
-* Original     :       2004/02/25 14:14:37    Revision: 1.11      Tag: t20040302_03
-* Original     :       2004/02/24 13:00:28    Revision: 1.10      Tag: t20040224_01
-* Original     :       2004/02/19 10:57:28    Revision: 1.8      Tag: t20040219_01
-*
-* AUTHOR :     John Meertens
-*                      Nico Valster
-*
-* SPECIFICATION: .........
-*
-* DESC   :     structure definitions and function prototypes for unit DHF.
-*
-*                      Customizable via HCFCFG.H, which is included indirectly via HCF.H
-*
-***************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT (C) 1994 - 1995    by AT&T.                                All Rights Reserved
-* COPYRIGHT (C) 1999 - 2000 by Lucent Technologies.    All Rights Reserved
-* COPYRIGHT (C) 2001 - 2004    by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-**************************************************************************************************************/
-
-
-#ifdef _WIN32_WCE
-#include <windef.h>
-#endif
-
-#include "hcf.h"                       /* includes HCFCFG.H too */
-
-#ifdef DHF_UIL
-#define GET_INFO(pp)  uil_get_info((LTVP)pp)
-#define PUT_INFO(pp)  uil_put_info((LTVP)pp)
-#else
-#define GET_INFO(pp)  hcf_get_info(ifbp, (LTVP)pp)
-#define PUT_INFO(pp)  hcf_put_info(ifbp, (LTVP)pp)
-#endif
-
-
-/*---- Defines --------------------------------------------------------------*/
-#define CODEMASK                               0x0000FFFFL     /* Codemask for plug records */
-
-/*---- Error numbers --------------------------------------------------------*/
-
-#define DHF_ERR_INCOMP_FW              0x40    /* Image not compatible with NIC */
-
-/*---- Type definitions -----------------------------------------------------*/
-/* needed by dhf_wrap.c */
-
-typedef struct {
-       LTVP    ltvp;
-       hcf_16  len;
-} LTV_INFO_STRUCT , *LTV_INFO_STRUCT_PTR;
-
-
-/*
- * Type:       plugrecord
- *
- * Abstract: This structure represents a Plug Data Record.
- *
- * Description:
- * This structure is used to overlay the plug records in the firmware memory image.
- */
-
-typedef struct {
-       hcf_32  code;           /* Code to plug */
-       hcf_32  addr;           /* Address within the memory image to plug it in */
-       hcf_32  len;            /* The # of bytes which are available to store it */
-} plugrecord;
-
-/*
- * Type:       stringrecord
- *
- * Abstract: This structure represents a Firmware debug/assert string
- *
- * Description:
- * This structure is used to get assert and debug outputs in the driver and/or utility to be
- * able to get more visability of the FW.
- */
-
-#define MAX_DEBUGSTRINGS               1024
-#define MAX_DEBUGSTRING_LEN      82
-
-typedef struct {
-       hcf_32  id;
-       char    str[MAX_DEBUGSTRING_LEN];
-} stringrecord;
-
-/*
- * Type:       exportrecord
- *
- * Abstract: This structure represents a Firmware export of a variable
- *
- * Description:
- * This structure is used to get the address and name of a FW variable.
- */
-
-#define MAX_DEBUGEXPORTS               2048
-#define MAX_DEBUGEXPORT_LEN      12
-
-typedef struct {
-       hcf_32  id;
-       char    str[MAX_DEBUGEXPORT_LEN];
-} exportrecord;
-
-/* Offsets in memimage array p[] */
-#define FWSTRINGS_FUNCTION             0
-#define FWEXPORTS_FUNCTION             1
-
-/*
- * Type: memimage
- *
- * Abstract: The "root" description of a complete memory image
- *
- * Description:
- * This type represents an entire memory image. The image is built up of several
- * segments. These segments need not be contiguous areas in memory, in other words
- * the image may contain 'holes'.
- *
- * The 'codep' field points to an array of segment_descriptor structures.
- * The end of the array is indicated by a segment_descriptor of which all fields are zero.
- * The 'execution' field is a 32-bit address representing the execution address
- *     of the firmware within the memory image. This address is zero in case of non-volatile
- *     memory download.
- * The 'compat' field points to an array of TODO
- *     The end of the array is indicated by a plug record of which all fields are zero.
- * The 'identity' field points to an array of TODO
- *     The end of the array is indicated by a plug record of which all fields are zero.
- * The Hermes-I specific 'pdaplug' field points to an array of Production Data Plug record structures.
- *     The end of the array is indicated by a plug record of which all fields are zero.
- * The Hermes-I specific 'priplug' field points to an array of Primary Information Plug record structures.
- *     The end of the array is indicated by a plug record of which all fields are zero.
- */
-typedef struct {
-       char                                    signature[14+1+1];      /* signature (see DHF.C) + C/LE-Bin/BE-Bin-flag + format version */
-       CFG_PROG_STRCT FAR *codep;                              /* */
-       hcf_32                          execution;              /* Execution address of the firmware */
-       void FAR *place_holder_1;
-       void FAR                        *place_holder_2;
-       CFG_RANGE20_STRCT FAR   *compat;                /* Pointer to the compatibility info records */
-       CFG_IDENTITY_STRCT FAR  *identity;              /* Pointer to the identity info records */
-       void FAR                                *p[2];                          /* (Up to 9) pointers for (future) expansion
-                                                                                                * currently in use:
-                                                                                                *  - F/W printf information
-                                                                                                */
-} memimage;
-
-
-
-/*-----------------------------------------------------------------------------
- *
- * DHF function prototypes
- *
- *---------------------------------------------------------------------------*/
-
-EXTERN_C int dhf_download_fw(void *ifbp, memimage *fw);        /* ifbp, ignored when using the UIL */
-EXTERN_C int dhf_download_binary(memimage *fw);
-
-
-/*-----------------------------------------------------------------------------
- *
- * Functions to be provided by the user of the DHF module.
- *
- *---------------------------------------------------------------------------*/
-
-/* defined in DHF.C; see there for comments */
-EXTERN_C hcf_16 *find_record_in_pda(hcf_16 *pdap, hcf_16 code);
-
-#endif  /* DHF_H */
-
diff --git a/drivers/staging/wlags49_h2/dhfcfg.h b/drivers/staging/wlags49_h2/dhfcfg.h
deleted file mode 100644 (file)
index 147f4c8..0000000
+++ /dev/null
@@ -1,158 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file contains DHF configuration info.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright (c) 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef DHFCFG_H
-#define DHFCFG_H
-/*-----------------------------------------------------------------------------
- * File DHFCFG.H
- *
- * Contents: #defines for the DHF module
- *
- * Comments:
- *   Some combinations of the #defines in this file are illegal (as noted below).
- *   If an illegal combinations of #defines is specified a compile error is
- *   generated. See document DHFUG.DOC for more information.
- *
- * Author: John Meertens
- * Date:   11-01-2000
- *
- * Change history:
- *---------------------------------------------------------------------------*/
-
-
-/* Define DHF_WCI if you want to use the WCI to access the ORiNOCO card.
-   Define DHF_UIL if you want to use the UIL to access the ORiNOCO card.
-   You must define either DHF_WCI or DHF_UIL. If neither of the two is defined
-   or both a compile error is generated. */
-#define DHF_WCI
-/* !!!#define DHF_UIL */
-
-/* Define DHF_BIG_ENDIAN if you are working on a big endian platform.
-   Define DHF_LITTLE_ENDIAN if you are working on a little endian platform.
-   You must define either DHF_BIG_ENDIAN or DHF_LITTLE_ENDIAN. If neither of
-   the two is defined or both a compile error is generated. */
-#ifdef USE_BIG_ENDIAN
-#define DHF_BIG_ENDIAN
-#else
-#define DHF_LITTLE_ENDIAN
-#endif  /* USE_BIG_ENDIAN */
-
-/* Define DHF_WIN if you are working on Windows platform.
-   Define DHF_DOS if you are working on DOS.
-   You must define either DHF_WIN or DHF_DOS. If neither of
-   the two is defined or both a compile error is generated.
-  !!!#define DHF_WIN
-  !!!#define DHF_DOS */
-
-/* Define if you want the DHF to users. Not defining DHF_GET_RES_MSG
-   leads to a decrease in code size as message strings are not included.
-  !!!#define DHF_GET_RES_MSG */
-
-/* Linux driver specific
-   Prevent inclusion of stdlib.h and string.h */
-#define _INC_STDLIB
-#define _INC_STRING
-
-/*-----------------------------------------------------------------------------
-   Define one or more of the following DSF #defines if you want to implement
-   the related DSF-function. Function dsf_callback must allways be implemented.
-   See file DHF.H for prototypes of the functions. */
-
-/* Define DSF_ALLOC if you want to manage memory allocation and de-allocation
-   for the DHF. If DSF_ALLOC is defined you must implement dsf_alloc and dsf_free.
-  !!!#define DSF_ALLOC */
-
-/* Define DSF_CONFIRM if you want the DHF to ask the user for confirmation in a
-   number of situations. If DSF_CONFIRM is defined you must implement dsf_confirm.
-   Not defining DSF_CONFIRM leads to a decrease in code size as confirmation
-   strings are not included.
-  !!!#define DSF_CONFIRM */
-
-/* Define DSF_DEBUG_MESSAGE if you want debug messages added to your output.
-   If you define DSF_DEBUG_MESSAGE then you must implement function
-   dsf_debug_message.
-  #define DSF_DEBUG_MESSAGE */
-
-/* Define DSF_ASSERT if you want asserts to be activated.
-   If you define DSF_ASSERT then you must implement function dsf_assert.
-  #define DBG 1
-  #define DSF_ASSERT */
-
-/* Define DSF_DBWIN if you want asserts and debug messages to be send to a debug
-   window like SOFTICE or DebugView from SysInternals.
-  !!!#define DSF_DBWIN
-  !!! Not implemented yet! */
-
-/* Define DSF_VOLATILE_ONLY if you only wants to use valatile functions
-   This is a typical setting for a AP and a driver. */
-#define DSF_VOLATILE_ONLY
-
-/* Define DSF_HERMESII if you want to use the DHF for the Hermes-II */
-#ifdef HERMES2
-#define DSF_HERMESII
-#else
-#undef DSF_HERMESII
-#endif /* HERMES2 */
-
-/* Define DSF_BINARY_FILE if you want to use the DHF in combination with
-   reading the Firmware from a separate binary file.
-  !!!#define DSF_BINARY_FILE */
-
-#endif /* DHFCFG_H */
diff --git a/drivers/staging/wlags49_h2/hcf.c b/drivers/staging/wlags49_h2/hcf.c
deleted file mode 100644 (file)
index f44d888..0000000
+++ /dev/null
@@ -1,4748 +0,0 @@
-/************************************************************************************************************
- *
- * FILE   :  HCF.C
- *
- * DATE    : $Date: 2004/08/05 11:47:10 $   $Revision: 1.10 $
- * Original: 2004/06/02 10:22:22    Revision: 1.85      Tag: hcf7_t20040602_01
- * Original: 2004/04/15 09:24:41    Revision: 1.63      Tag: hcf7_t7_20040415_01
- * Original: 2004/04/13 14:22:44    Revision: 1.62      Tag: t7_20040413_01
- * Original: 2004/04/01 15:32:55    Revision: 1.59      Tag: t7_20040401_01
- * Original: 2004/03/10 15:39:27    Revision: 1.55      Tag: t20040310_01
- * Original: 2004/03/04 11:03:37    Revision: 1.53      Tag: t20040304_01
- * Original: 2004/03/02 14:51:21    Revision: 1.50      Tag: t20040302_03
- * Original: 2004/02/24 13:00:27    Revision: 1.43      Tag: t20040224_01
- * Original: 2004/02/19 10:57:25    Revision: 1.39      Tag: t20040219_01
- *
- * AUTHOR :  Nico Valster
- *
- * SPECIFICATION: ........
- *
- * DESCRIPTION : HCF Routines for Hermes-II (callable via the Wireless Connection I/F or WCI)
- *               Local Support Routines for above procedures
- *
- *           Customizable via HCFCFG.H, which is included by HCF.H
- *
- *************************************************************************************************************
- *
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * COPYRIGHT © 1994 - 1995   by AT&T.                All Rights Reserved
- * COPYRIGHT © 1996 - 2000 by Lucent Technologies.   All Rights Reserved
- * COPYRIGHT © 2001 - 2004   by Agere Systems Inc.   All Rights Reserved
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- *
- ************************************************************************************************************/
-
-
-/************************************************************************************************************
- **
- ** Implementation Notes
- **
- * - a leading marker of //! is used. The purpose of such a sequence is to help to understand the flow
- *   An example is:  //!rc = HCF_SUCCESS;
- *   if this is superfluous because rc is already guaranteed to be 0 but it shows to the (maintenance)
- *   programmer it is an intentional omission at the place where someone could consider it most appropriate at
- *   first glance
- * - using near pointers in a model where ss!=ds is an invitation for disaster, so be aware of how you specify
- *   your model and how you define variables which are used at interrupt time
- * - remember that sign extension on 32 bit platforms may cause problems unless code is carefully constructed,
- *   e.g. use "(hcf_16)~foo" rather than "~foo"
- *
- ************************************************************************************************************/
-
-#include "hcf.h"                // HCF and MSF common include file
-#include "hcfdef.h"             // HCF specific include file
-#include "mmd.h"                // MoreModularDriver common include file
-#include <linux/bug.h>
-#include <linux/kernel.h>
-
-#if ! defined offsetof
-#define offsetof(s,m)   ((unsigned int)&(((s *)0)->m))
-#endif // offsetof
-
-
-/***********************************************************************************************************/
-/***************************************  PROTOTYPES  ******************************************************/
-/***********************************************************************************************************/
-HCF_STATIC int          cmd_exe( IFBP ifbp, hcf_16 cmd_code, hcf_16 par_0 );
-HCF_STATIC int          init( IFBP ifbp );
-HCF_STATIC int          put_info( IFBP ifbp, LTVP ltvp );
-HCF_STATIC int          put_info_mb( IFBP ifbp, CFG_MB_INFO_STRCT FAR * ltvp );
-#if (HCF_TYPE) & HCF_TYPE_WPA
-HCF_STATIC void         calc_mic( hcf_32* p, hcf_32 M );
-void                    calc_mic_rx_frag( IFBP ifbp, wci_bufp p, int len );
-void                    calc_mic_tx_frag( IFBP ifbp, wci_bufp p, int len );
-HCF_STATIC int          check_mic( IFBP ifbp );
-#endif // HCF_TYPE_WPA
-
-HCF_STATIC void         calibrate( IFBP ifbp );
-HCF_STATIC int          cmd_cmpl( IFBP ifbp );
-HCF_STATIC hcf_16       get_fid( IFBP ifbp );
-HCF_STATIC void         isr_info( IFBP ifbp );
-#if HCF_DMA
-HCF_STATIC DESC_STRCT*  get_frame_lst(IFBP ifbp, int tx_rx_flag);
-#endif // HCF_DMA
-HCF_STATIC void         get_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) );   //char*, byte count (usually even)
-#if HCF_DMA
-HCF_STATIC void         put_frame_lst( IFBP ifbp, DESC_STRCT *descp, int tx_rx_flag );
-#endif // HCF_DMA
-HCF_STATIC void         put_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) );
-HCF_STATIC void         put_frag_finalize( IFBP ifbp );
-HCF_STATIC int          setup_bap( IFBP ifbp, hcf_16 fid, int offset, int type );
-#if (HCF_ASSERT) & HCF_ASSERT_PRINTF
-static int fw_printf(IFBP ifbp, CFG_FW_PRINTF_STRCT FAR *ltvp);
-#endif // HCF_ASSERT_PRINTF
-
-HCF_STATIC int          download( IFBP ifbp, CFG_PROG_STRCT FAR *ltvp );
-HCF_STATIC hcf_8        hcf_encap( wci_bufp type );
-HCF_STATIC hcf_8        null_addr[4] = { 0, 0, 0, 0 };
-#if ! defined IN_PORT_WORD          //replace I/O Macros with logging facility
-extern FILE *log_file;
-
-#define IN_PORT_WORD(port)          in_port_word( (hcf_io)(port) )
-
-static hcf_16 in_port_word( hcf_io port ) {
-       hcf_16 i = (hcf_16)_inpw( port );
-       if ( log_file ) {
-               fprintf( log_file, "\nR %2.2x %4.4x", (port)&0xFF, i);
-       }
-       return i;
-} // in_port_word
-
-#define OUT_PORT_WORD(port, value)  out_port_word( (hcf_io)(port), (hcf_16)(value) )
-
-static void out_port_word( hcf_io port, hcf_16 value ) {
-       _outpw( port, value );
-       if ( log_file ) {
-               fprintf( log_file, "\nW %2.02x %4.04x", (port)&0xFF, value );
-       }
-}
-
-void IN_PORT_STRING_32( hcf_io prt, hcf_32 FAR * dst, int n)    {
-       int i = 0;
-       hcf_16 FAR * p;
-       if ( log_file ) {
-               fprintf( log_file, "\nread string_32 length %04x (%04d) at port %02.2x to addr %lp",
-                        (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF, dst);
-       }
-       while ( n-- ) {
-               p = (hcf_16 FAR *)dst;
-               *p++ = (hcf_16)_inpw( prt );
-               *p   = (hcf_16)_inpw( prt );
-               if ( log_file ) {
-                       fprintf( log_file, "%s%08lx ", i++ % 0x08 ? " " : "\n", *dst);
-               }
-               dst++;
-       }
-} // IN_PORT_STRING_32
-
-void IN_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * dst, int n) { //also handles byte alignment problems
-       hcf_16 FAR * p = (hcf_16 FAR *)dst;                         //this needs more elaborate code in non-x86 platforms
-       int i = 0;
-       if ( log_file ) {
-               fprintf( log_file, "\nread string_16 length %04x (%04d) at port %02.2x to addr %lp",
-                        (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF, dst );
-       }
-       while ( n-- ) {
-               *p =(hcf_16)_inpw( prt);
-               if ( log_file ) {
-                       if ( i++ % 0x10 ) {
-                               fprintf( log_file, "%04x ", *p);
-                       } else {
-                               fprintf( log_file, "\n%04x ", *p);
-                       }
-               }
-               p++;
-       }
-} // IN_PORT_STRING_8_16
-
-void OUT_PORT_STRING_32( hcf_io prt, hcf_32 FAR * src, int n)   {
-       int i = 0;
-       hcf_16 FAR * p;
-       if ( log_file ) {
-               fprintf( log_file, "\nwrite string_32 length %04x (%04d) at port %02.2x",
-                        (hcf_16)n, (hcf_16)n, (hcf_16)(prt)&0xFF);
-       }
-       while ( n-- ) {
-               p = (hcf_16 FAR *)src;
-               _outpw( prt, *p++ );
-               _outpw( prt, *p   );
-               if ( log_file ) {
-                       fprintf( log_file, "%s%08lx ", i++ % 0x08 ? " " : "\n", *src);
-               }
-               src++;
-       }
-} // OUT_PORT_STRING_32
-
-void OUT_PORT_STRING_8_16( hcf_io prt, hcf_8 FAR * src, int n)  {   //also handles byte alignment problems
-       hcf_16 FAR * p = (hcf_16 FAR *)src;                             //this needs more elaborate code in non-x86 platforms
-       int i = 0;
-       if ( log_file ) {
-               fprintf( log_file, "\nwrite string_16 length %04x (%04d) at port %04x", n, n, (hcf_16)prt);
-       }
-       while ( n-- ) {
-               (void)_outpw( prt, *p);
-               if ( log_file ) {
-                       if ( i++ % 0x10 ) {
-                               fprintf( log_file, "%04x ", *p);
-                       } else {
-                               fprintf( log_file, "\n%04x ", *p);
-                       }
-               }
-               p++;
-       }
-} // OUT_PORT_STRING_8_16
-
-#endif // IN_PORT_WORD
-
-/************************************************************************************************************
- ******************************* D A T A    D E F I N I T I O N S ********************************************
- ************************************************************************************************************/
-
-#if HCF_ASSERT
-IFBP BASED assert_ifbp = NULL;          //to make asserts easily work under MMD and DHF
-#endif // HCF_ASSERT
-
-/* SNAP header to be inserted in Ethernet-II frames */
-HCF_STATIC  hcf_8 BASED snap_header[] = { 0xAA, 0xAA, 0x03, 0x00, 0x00, //5 bytes signature +
-                                          0 };                          //1 byte protocol identifier
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-HCF_STATIC hcf_8 BASED mic_pad[8] = { 0x5A, 0, 0, 0, 0, 0, 0, 0 };      //MIC padding of message
-#endif // HCF_TYPE_WPA
-
-#if defined MSF_COMPONENT_ID
-static CFG_IDENTITY_STRCT BASED cfg_drv_identity = {
-       sizeof(cfg_drv_identity)/sizeof(hcf_16) - 1,    //length of RID
-       CFG_DRV_IDENTITY,           // (0x0826)
-       MSF_COMPONENT_ID,
-       MSF_COMPONENT_VAR,
-       MSF_COMPONENT_MAJOR_VER,
-       MSF_COMPONENT_MINOR_VER
-} ;
-
-static CFG_RANGES_STRCT BASED cfg_drv_sup_range = {
-       sizeof(cfg_drv_sup_range)/sizeof(hcf_16) - 1,   //length of RID
-       CFG_DRV_SUP_RANGE,          // (0x0827)
-
-       COMP_ROLE_SUPL,
-       COMP_ID_DUI,
-       {{  DUI_COMPAT_VAR,
-           DUI_COMPAT_BOT,
-           DUI_COMPAT_TOP
-       }}
-} ;
-
-static struct CFG_RANGE3_STRCT BASED cfg_drv_act_ranges_pri = {
-       sizeof(cfg_drv_act_ranges_pri)/sizeof(hcf_16) - 1,  //length of RID
-       CFG_DRV_ACT_RANGES_PRI,     // (0x0828)
-
-       COMP_ROLE_ACT,
-       COMP_ID_PRI,
-       {
-               { 0, 0, 0 },                           // HCF_PRI_VAR_1 not supported by HCF 7
-               { 0, 0, 0 },                           // HCF_PRI_VAR_2 not supported by HCF 7
-               {  3,                                  //var_rec[2] - Variant number
-                  CFG_DRV_ACT_RANGES_PRI_3_BOTTOM,        //       - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_PRI_3_TOP            //       - Top Compatibility
-               }
-       }
-} ;
-
-
-static struct CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_sta = {
-       sizeof(cfg_drv_act_ranges_sta)/sizeof(hcf_16) - 1,  //length of RID
-       CFG_DRV_ACT_RANGES_STA,     // (0x0829)
-
-       COMP_ROLE_ACT,
-       COMP_ID_STA,
-       {
-#if defined HCF_STA_VAR_1
-               {  1,                                  //var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_STA_1_BOTTOM,        //       - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_STA_1_TOP            //       - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_STA_VAR_1
-#if defined HCF_STA_VAR_2
-               {  2,                                  //var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_STA_2_BOTTOM,        //       - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_STA_2_TOP            //       - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_STA_VAR_2
-// For Native_USB (Not used!)
-#if defined HCF_STA_VAR_3
-               {  3,                                  //var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_STA_3_BOTTOM,        //       - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_STA_3_TOP            //       - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_STA_VAR_3
-// Warp
-#if defined HCF_STA_VAR_4
-               {  4,                                  //var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_STA_4_BOTTOM,        //           - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_STA_4_TOP            //           - Top Compatibility
-               }
-#else
-               { 0, 0, 0 }
-#endif // HCF_STA_VAR_4
-       }
-} ;
-
-
-static struct CFG_RANGE6_STRCT BASED cfg_drv_act_ranges_hsi = {
-       sizeof(cfg_drv_act_ranges_hsi)/sizeof(hcf_16) - 1,  //length of RID
-       CFG_DRV_ACT_RANGES_HSI,     // (0x082A)
-       COMP_ROLE_ACT,
-       COMP_ID_HSI,
-       {
-#if defined HCF_HSI_VAR_0                   // Controlled deployment
-               {  0,                                  // var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_HSI_0_BOTTOM,        //           - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_HSI_0_TOP            //           - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_HSI_VAR_0
-               { 0, 0, 0 },                           // HCF_HSI_VAR_1 not supported by HCF 7
-               { 0, 0, 0 },                           // HCF_HSI_VAR_2 not supported by HCF 7
-               { 0, 0, 0 },                           // HCF_HSI_VAR_3 not supported by HCF 7
-#if defined HCF_HSI_VAR_4                   // Hermes-II all types
-               {  4,                                  // var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_HSI_4_BOTTOM,        //           - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_HSI_4_TOP            //           - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_HSI_VAR_4
-#if defined HCF_HSI_VAR_5                   // WARP Hermes-2.5
-               {  5,                                  // var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_HSI_5_BOTTOM,        //           - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_HSI_5_TOP            //           - Top Compatibility
-               }
-#else
-               { 0, 0, 0 }
-#endif // HCF_HSI_VAR_5
-       }
-} ;
-
-
-static CFG_RANGE4_STRCT BASED cfg_drv_act_ranges_apf = {
-       sizeof(cfg_drv_act_ranges_apf)/sizeof(hcf_16) - 1,  //length of RID
-       CFG_DRV_ACT_RANGES_APF,     // (0x082B)
-
-       COMP_ROLE_ACT,
-       COMP_ID_APF,
-       {
-#if defined HCF_APF_VAR_1               //(Fake) Hermes-I
-               {  1,                                  //var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_APF_1_BOTTOM,        //           - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_APF_1_TOP            //           - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_APF_VAR_1
-#if defined HCF_APF_VAR_2               //Hermes-II
-               {  2,                                  // var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_APF_2_BOTTOM,        //           - Bottom Compatibility
-                  CFG_DRV_ACT_RANGES_APF_2_TOP            //           - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_APF_VAR_2
-#if defined HCF_APF_VAR_3                       // Native_USB
-               {  3,                                      // var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_APF_3_BOTTOM,        //           - Bottom Compatibility !!!!!see note below!!!!!!!
-                  CFG_DRV_ACT_RANGES_APF_3_TOP            //           - Top Compatibility
-               },
-#else
-               { 0, 0, 0 },
-#endif // HCF_APF_VAR_3
-#if defined HCF_APF_VAR_4                       // WARP Hermes 2.5
-               {  4,                                      // var_rec[1] - Variant number
-                  CFG_DRV_ACT_RANGES_APF_4_BOTTOM,        //           - Bottom Compatibility !!!!!see note below!!!!!!!
-                  CFG_DRV_ACT_RANGES_APF_4_TOP            //           - Top Compatibility
-               }
-#else
-               { 0, 0, 0 }
-#endif // HCF_APF_VAR_4
-       }
-} ;
-#define HCF_VERSION  TEXT( "HCF$Revision: 1.10 $" )
-
-static struct /*CFG_HCF_OPT_STRCT*/ {
-       hcf_16  len;                    //length of cfg_hcf_opt struct
-       hcf_16  typ;                    //type 0x082C
-       hcf_16   v0;                        //offset HCF_VERSION
-       hcf_16   v1;                        // MSF_COMPONENT_ID
-       hcf_16   v2;                        // HCF_ALIGN
-       hcf_16   v3;                        // HCF_ASSERT
-       hcf_16   v4;                        // HCF_BIG_ENDIAN
-       hcf_16   v5;                        // /* HCF_DLV | HCF_DLNV */
-       hcf_16   v6;                        // HCF_DMA
-       hcf_16   v7;                        // HCF_ENCAP
-       hcf_16   v8;                        // HCF_EXT
-       hcf_16   v9;                        // HCF_INT_ON
-       hcf_16  v10;                        // HCF_IO
-       hcf_16  v11;                        // HCF_LEGACY
-       hcf_16  v12;                        // HCF_MAX_LTV
-       hcf_16  v13;                        // HCF_PROT_TIME
-       hcf_16  v14;                        // HCF_SLEEP
-       hcf_16  v15;                        // HCF_TALLIES
-       hcf_16  v16;                        // HCF_TYPE
-       hcf_16  v17;                        // HCF_NIC_TAL_CNT
-       hcf_16  v18;                        // HCF_HCF_TAL_CNT
-       hcf_16  v19;                        // offset tallies
-       char    val[sizeof(HCF_VERSION)];
-} BASED cfg_hcf_opt = {
-       sizeof(cfg_hcf_opt)/sizeof(hcf_16) -1,
-       CFG_HCF_OPT,                // (0x082C)
-       ( sizeof(cfg_hcf_opt) - sizeof(HCF_VERSION) - 4 )/sizeof(hcf_16),
-#if defined MSF_COMPONENT_ID
-       MSF_COMPONENT_ID,
-#else
-       0,
-#endif // MSF_COMPONENT_ID
-       HCF_ALIGN,
-       HCF_ASSERT,
-       HCF_BIG_ENDIAN,
-       0,                                  // /* HCF_DLV | HCF_DLNV*/,
-       HCF_DMA,
-       HCF_ENCAP,
-       HCF_EXT,
-       HCF_INT_ON,
-       HCF_IO,
-       HCF_LEGACY,
-       HCF_MAX_LTV,
-       HCF_PROT_TIME,
-       HCF_SLEEP,
-       HCF_TALLIES,
-       HCF_TYPE,
-#if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
-       HCF_NIC_TAL_CNT,
-       HCF_HCF_TAL_CNT,
-       offsetof(IFB_STRCT, IFB_TallyLen ),
-#else
-       0, 0, 0,
-#endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
-       HCF_VERSION
-}; // cfg_hcf_opt
-#endif // MSF_COMPONENT_ID
-
-HCF_STATIC LTV_STRCT BASED cfg_null = { 1, CFG_NULL, {0} };
-
-HCF_STATIC hcf_16* BASED xxxx[ ] = {
-       &cfg_null.len,                          //CFG_NULL                      0x0820
-#if defined MSF_COMPONENT_ID
-       &cfg_drv_identity.len,                  //CFG_DRV_IDENTITY              0x0826
-       &cfg_drv_sup_range.len,                 //CFG_DRV_SUP_RANGE             0x0827
-       &cfg_drv_act_ranges_pri.len,            //CFG_DRV_ACT_RANGES_PRI        0x0828
-       &cfg_drv_act_ranges_sta.len,            //CFG_DRV_ACT_RANGES_STA        0x0829
-       &cfg_drv_act_ranges_hsi.len,            //CFG_DRV_ACT_RANGES_HSI        0x082A
-       &cfg_drv_act_ranges_apf.len,            //CFG_DRV_ACT_RANGES_APF        0x082B
-       &cfg_hcf_opt.len,                       //CFG_HCF_OPT                   0x082C
-       NULL,                                   //IFB_PRIIdentity placeholder   0xFD02
-       NULL,                                   //IFB_PRISup placeholder        0xFD03
-#endif // MSF_COMPONENT_ID
-       NULL                                    //endsentinel
-};
-#define xxxx_PRI_IDENTITY_OFFSET    (ARRAY_SIZE(xxxx) - 3)
-
-
-/************************************************************************************************************
- ************************** T O P   L E V E L   H C F   R O U T I N E S **************************************
- ************************************************************************************************************/
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_action( IFBP ifbp, hcf_16 action )
- *.PURPOSE       Changes the run-time Card behavior.
- *               Performs Miscellanuous actions.
- *
- *.ARGUMENTS
- *   ifbp                    address of the Interface Block
- *   action                  number identifying the type of change
- *    - HCF_ACT_INT_FORCE_ON enable interrupt generation by WaveLAN NIC
- *    - HCF_ACT_INT_OFF      disable interrupt generation by WaveLAN NIC
- *    - HCF_ACT_INT_ON       compensate 1 HCF_ACT_INT_OFF, enable interrupt generation if balance reached
- *    - HCF_ACT_PRS_SCAN     Hermes Probe Response Scan (F102) command
- *    - HCF_ACT_RX_ACK       acknowledge non-DMA receiver to Hermes
- *    - HCF_ACT_SCAN         Hermes Inquire Scan (F101) command (non-WARP only)
- *    - HCF_ACT_SLEEP        DDS Sleep request
- *    - HCF_ACT_TALLIES      Hermes Inquire Tallies (F100) command
- *
- *.RETURNS
- *   HCF_SUCCESS             all (including invalid)
- *   HCF_INT_PENDING         HCF_ACT_INT_OFF, interrupt pending
- *   HCF_ERR_NO_NIC          HCF_ACT_INT_OFF, NIC presence check fails
- *
- *.CONDITIONS
- * Except for hcf_action with HCF_ACT_INT_FORCE_ON or HCF_ACT_INT_OFF as parameter or hcf_connect with an I/O
- * address (i.e. not HCF_DISCONNECT), all hcf-function calls MUST be preceded by a call of hcf_action with
- * HCF_ACT_INT_OFF as parameter.
- * Note that hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF )
- * was called.
- *
- *.DESCRIPTION
- * hcf_action supports the following mode changing action-code pairs that are antonyms
- *    - HCF_ACT_INT_[FORCE_]ON / HCF_ACT_INT_OFF
- *
- * Additionally hcf_action can start the following actions in the NIC:
- *    - HCF_ACT_PRS_SCAN
- *    - HCF_ACT_RX_ACK
- *    - HCF_ACT_SCAN
- *    - HCF_ACT_SLEEP
- *    - HCF_ACT_TALLIES
- *
- * o HCF_ACT_INT_OFF: Sets NIC Interrupts mode Disabled.
- * This command, and the associated [Force] Enable NIC interrupts command, are only available if the HCF_INT_ON
- * compile time option is not set at 0x0000.
- *
- * o HCF_ACT_INT_ON: Sets NIC Interrupts mode Enabled.
- * Enable NIC Interrupts, depending on the number of preceding Disable NIC Interrupt calls.
- *
- * o HCF_ACT_INT_FORCE_ON: Force NIC Interrupts mode Enabled.
- * Sets NIC Interrupts mode Enabled, regardless off the number of preceding Disable NIC Interrupt calls.
- *
- * The disabling and enabling of interrupts are antonyms.
- * These actions must be balanced.
- * For each "disable interrupts" there must be a matching "enable interrupts".
- * The disable interrupts may be executed multiple times in a row without intervening enable interrupts, in
- * other words, the disable interrupts may be nested.
- * The interrupt generation mechanism is disabled at the first call with HCF_ACT_INT_OFF.
- * The interrupt generation mechanism is re-enabled when the number of calls with HCF_ACT_INT_ON matches the
- * number of calls with INT_OFF.
- *
- * It is not allowed to have more Enable NIC Interrupts calls than Disable NIC Interrupts calls.
- * The interrupt generation mechanism is initially (i.e. after hcf_connect) disabled.
- * An MSF based on a interrupt strategy must call hcf_action with INT_ON in its initialization logic.
- *
- *!  The INT_OFF/INT_ON housekeeping is initialized at 0x0000 by hcf_connect, causing the interrupt generation
- *   mechanism to be disabled at first. This suits MSF implementation based on a polling strategy.
- *
- * o HCF_ACT_SLEEP: Initiates the Disconnected DeepSleep process
- * This command is only available if the HCF_DDS compile time option is set. It triggers the F/W to start the
- * sleep handshaking. Regardless whether the Host initiates a Disconnected DeepSleep (DDS) or the F/W initiates
- * a Connected DeepSleep (CDS), the Host-F/W sleep handshaking is completed when the NIC Interrupts mode is
- * enabled (by means of the balancing HCF_ACT_INT_ON), i.e. at that moment the F/W really goes into sleep mode.
- * The F/W is wokenup by the HCF when the NIC Interrupts mode are disabled, i.e. at the first HCF_ACT_INT_OFF
- * after going into sleep.
- *
- * The following Miscellaneous actions are defined:
- *
- * o HCF_ACT_RX_ACK: Receiver Acknowledgement (non-DMA, non-USB mode only)
- * Acking the receiver, frees the NIC memory used to hold the Rx frame and allows the F/W to
- * report the existence of the next Rx frame.
- * If the MSF does not need access (any longer) to the current frame, e.g. because it is rejected based on the
- * look ahead or copied to another buffer, the receiver may be acked. Acking earlier is assumed to have the
- * potential of improving the performance.
- * If the MSF does not explicitly ack the receiver, the acking is done implicitly if:
- * - the received frame fits in the look ahead buffer, by the hcf_service_nic call that reported the Rx frame
- * - if not in the above step, by hcf_rcv_msg (assuming hcf_rcv_msg is called)
- * - if neither of the above implicit acks nor an explicit ack by the MSF, by the first hcf_service_nic after
- *   the hcf_service_nic that reported the Rx frame.
- * Note: If an Rx frame is already acked, an explicit ACK by the MSF acts as a NoOperation.
- *
- * o HCF_ACT_TALLIES: Inquire Tallies command
- * This command is only operational if the F/W is enabled.
- * The Inquire Tallies command requests the F/W to provide its current set of tallies.
- * See also hcf_get_info with CFG_TALLIES as parameter.
- *
- * o HCF_ACT_PRS_SCAN: Inquire Probe Response Scan command
- * This command is only operational if the F/W is enabled.
- * The Probe Response Scan command starts a scan sequence.
- * The HCF puts the result of this action in an MSF defined buffer (see CFG_RID_LOG_STRCT).
- *
- * o HCF_ACT_SCAN: Inquire Scan command
- * This command is only supported for HII F/W (i.e. pre-WARP) and it is operational if the F/W is enabled.
- * The Inquire Scan command starts a scan sequence.
- * The HCF puts the result of this action in an MSF defined buffer (see CFG_RID_LOG_STRCT).
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value.
- * - NIC interrupts are not disabled while required by parameter action.
- * - an invalid code is specified in parameter action.
- * - HCF_ACT_INT_ON commands outnumber the HCF_ACT_INT_OFF commands.
- * - reentrancy, may be caused by calling hcf_functions without adequate protection against NIC interrupts or
- *   multi-threading
- *
- * - Since the HCF does not maintain status information relative to the F/W enabled state, it is not asserted
- *   whether HCF_ACT_SCAN, HCF_ACT_PRS_SCAN or HCF_ACT_TALLIES are only used while F/W is enabled.
- *
- *.DIAGRAM
- * 0: The assert embedded in HCFLOGENTRY checks against re-entrancy. Re-entrancy could be caused by a MSF logic
- *   at task-level calling hcf_functions without shielding with HCF_ACT_ON/_OFF. However the HCF_ACT_INT_OFF
- *   action itself can per definition not be protected this way. Based on code inspection, it can be concluded,
- *   that there is no re-entrancy PROBLEM in this particular flow. It does not seem worth the trouble to
- *   explicitly check for this condition (although there was a report of an MSF which ran into this assert.
- * 2:IFB_IntOffCnt is used to balance the INT_OFF and INT_ON calls.  Disabling of the interrupts is achieved by
- *   writing a zero to the Hermes IntEn register.  In a shared interrupt environment (e.g. the mini-PCI NDIS
- *   driver) it is considered more correct to return the status HCF_INT_PENDING if and only if, the current
- *   invocation of hcf_service_nic is (apparently) called in the ISR when the ISR was activated as result of a
- *   change in HREG_EV_STAT matching a bit in HREG_INT_EN, i.e. not if invoked as result of another device
- *   generating an interrupt on the shared interrupt line.
- *   Note 1: it has been observed that under certain adverse conditions on certain platforms the writing of
- *   HREG_INT_EN can apparently fail, therefore it is paramount that HREG_INT_EN is written again with 0 for
- *   each and every call to HCF_ACT_INT_OFF.
- *   Note 2: it has been observed that under certain H/W & S/W architectures this logic is called when there is
- *   no NIC at all. To cater for this, the value of HREG_INT_EN is validated. If the unused bit 0x0100 is set,
- *   it is assumed there is no NIC.
- *   Note 3: During the download process, some versions of the F/W reset HREG_SW_0, hence checking this
- *   register for HCF_MAGIC (the classical NIC presence test) when HCF_ACT_INT_OFF is called due to another
- *   card interrupting via a shared IRQ during a download, fails.
- *4: The construction "if ( ifbp->IFB_IntOffCnt-- == 0 )" is optimal (in the sense of shortest/quickest
- *   path in error free flows) but NOT fail safe in case of too many INT_ON invocations compared to INT_OFF).
- *   Enabling of the interrupts is achieved by writing the Hermes IntEn register.
- *    - If the HCF is in Defunct mode, the interrupts stay disabled.
- *    - Under "normal" conditions, the HCF is only interested in Info Events, Rx Events and Notify Events.
- *    - When the HCF is out of Tx/Notify resources, the HCF is also interested in Alloc Events.
- *    - via HCF_EXT, the MSF programmer can also request HREG_EV_TICK and/or HREG_EV_TX_EXC interrupts.
- *   For DMA operation, the DMA hardware handles the alloc events. The DMA engine will generate a 'TxDmaDone'
- *   event as soon as it has pumped a frame from host ram into NIC-RAM (note that the frame does not have to be
- *   transmitted then), and a 'RxDmaDone' event as soon as a received frame has been pumped from NIC-RAM into
- *   host ram.  Note that the 'alloc' event has been removed from the event-mask, because the DMA engine will
- *   react to and acknowledge this event.
- *6: ack the "old" Rx-event. See "Rx Buffer free strategy" in hcf_service_nic above for more explanation.
- *   IFB_RxFID and IFB_RxLen must be cleared to bring both the internal HCF house keeping and the information
- *   supplied to the MSF in the state "no frame received".
- *8: The HCF_ACT_SCAN, HCF_ACT_PRS_SCAN and HCF_ACT_TALLIES activity are merged by "clever" algebraic
- *   manipulations of the RID-values and action codes, so foregoing robustness against migration problems for
- *   ease of implementation. The assumptions about numerical relationships between CFG_TALLIES etc and
- *   HCF_ACT_TALLIES etc are checked by the "#if" statements just prior to the body of this routine, resulting
- *   in: err "maintenance" during compilation if the assumptions are no longer met. The writing of HREG_PARAM_1
- *   with 0x3FFF in case of an PRS scan, is a kludge to get around lack of specification, hence different
- *   implementation in F/W and Host.
- *   When there is no NIC RAM available, some versions of the Hermes F/W do report 0x7F00 as error in the
- *   Result field of the Status register and some F/W versions don't. To mask this difference to the MSF all
- *   return codes of the Hermes are ignored ("best" and "most simple" solution to these types of analomies with
- *   an acceptable loss due to ignoring all error situations as well).
- *   The "No inquire space" is reported via the Hermes tallies.
- *30: do not HCFASSERT( rc, rc ) since rc == HCF_INT_PENDING is no error
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-#if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
-#if CFG_SCAN != CFG_TALLIES - HCF_ACT_TALLIES + HCF_ACT_SCAN
-err: "maintenance" apparently inviolated the underlying assumption about the numerical values of these macros
-#endif
-#endif // HCF_TYPE_HII5
-#if CFG_PRS_SCAN != CFG_TALLIES - HCF_ACT_TALLIES + HCF_ACT_PRS_SCAN
-err: "maintenance" apparently inviolated the underlying assumption about the numerical values of these macros
-#endif
-int
-hcf_action( IFBP ifbp, hcf_16 action )
-{
-       int rc = HCF_SUCCESS;
-
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-#if HCF_INT_ON
-       HCFLOGENTRY( action == HCF_ACT_INT_FORCE_ON ? HCF_TRACE_ACTION_KLUDGE : HCF_TRACE_ACTION, action );                                                      /* 0 */
-#if (HCF_SLEEP)
-       HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFE || action == HCF_ACT_INT_OFF,
-                  MERGE_2( action, ifbp->IFB_IntOffCnt ) );
-#else
-       HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFE, action );
-#endif // HCF_SLEEP
-       HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFF ||
-                  action == HCF_ACT_INT_OFF || action == HCF_ACT_INT_FORCE_ON,  action );
-       HCFASSERT( ifbp->IFB_IntOffCnt <= 16 || ifbp->IFB_IntOffCnt >= 0xFFFE,
-                  MERGE_2( action, ifbp->IFB_IntOffCnt ) ); //nesting more than 16 deep seems unreasonable
-#endif // HCF_INT_ON
-
-       switch (action) {
-#if HCF_INT_ON
-               hcf_16  i;
-       case HCF_ACT_INT_OFF:                     // Disable Interrupt generation
-#if HCF_SLEEP
-               if ( ifbp->IFB_IntOffCnt == 0xFFFE ) {  // WakeUp test  ;?tie this to the "new" super-LinkStat
-                       ifbp->IFB_IntOffCnt++;                      // restore conventional I/F
-                       OPW(HREG_IO, HREG_IO_WAKEUP_ASYNC );        // set wakeup bit
-                       OPW(HREG_IO, HREG_IO_WAKEUP_ASYNC );        // set wakeup bit to counteract the clearing by F/W
-                       // 800 us latency before FW switches to high power
-                       MSF_WAIT(800);                              // MSF-defined function to wait n microseconds.
-//OOR                  if ( ifbp->IFB_DSLinkStat & CFG_LINK_STAT_DS_OOR ) { // OutOfRange
-//                             printk(KERN_NOTICE "ACT_INT_OFF: Deepsleep phase terminated, enable and go to AwaitConnection\n" );     //;?remove me 1 day
-//                             hcf_cntl( ifbp, HCF_CNTL_ENABLE );
-//                     }
-//                     ifbp->IFB_DSLinkStat &= ~( CFG_LINK_STAT_DS_IR | CFG_LINK_STAT_DS_OOR); //clear IR/OOR state
-               }
-#endif // HCF_SLEEP
-       /*2*/   ifbp->IFB_IntOffCnt++;
-//!            rc = 0;
-               i = IPW( HREG_INT_EN );
-               OPW( HREG_INT_EN, 0 );
-               if ( i & 0x1000 ) {
-                       rc = HCF_ERR_NO_NIC;
-               } else {
-                       if ( i & IPW( HREG_EV_STAT ) ) {
-                               rc = HCF_INT_PENDING;
-                       }
-               }
-               break;
-
-       case HCF_ACT_INT_FORCE_ON:                // Enforce Enable Interrupt generation
-               ifbp->IFB_IntOffCnt = 0;
-               //Fall through in HCF_ACT_INT_ON
-
-       case HCF_ACT_INT_ON:                      // Enable Interrupt generation
-       /*4*/   if ( ifbp->IFB_IntOffCnt-- == 0 && ifbp->IFB_CardStat == 0 ) {
-                                                 //determine Interrupt Event mask
-#if HCF_DMA
-                       if ( ifbp->IFB_CntlOpt & USE_DMA ) {
-                               i = HREG_EV_INFO | HREG_EV_RDMAD | HREG_EV_TDMAD | HREG_EV_TX_EXT;  //mask when DMA active
-                       } else
-#endif // HCF_DMA
-                       {
-                               i = HREG_EV_INFO | HREG_EV_RX | HREG_EV_TX_EXT;                     //mask when DMA not active
-                               if ( ifbp->IFB_RscInd == 0 ) {
-                                       i |= HREG_EV_ALLOC;                                         //mask when no TxFID available
-                               }
-                       }
-#if HCF_SLEEP
-                       if ( ( IPW(HREG_EV_STAT) & ( i | HREG_EV_SLEEP_REQ ) ) == HREG_EV_SLEEP_REQ ) {
-                               // firmware indicates it would like to go into sleep modus
-                               // only acknowledge this request if no other events that can cause an interrupt are pending
-                               ifbp->IFB_IntOffCnt--;          //becomes 0xFFFE
-                               OPW( HREG_INT_EN, i | HREG_EV_TICK );
-                               OPW( HREG_EV_ACK, HREG_EV_SLEEP_REQ | HREG_EV_TICK | HREG_EV_ACK_REG_READY );
-                       } else
-#endif // HCF_SLEEP
-                       {
-                               OPW( HREG_INT_EN, i | HREG_EV_SLEEP_REQ );
-                       }
-               }
-               break;
-#endif // HCF_INT_ON
-
-#if (HCF_SLEEP) & HCF_DDS
-       case HCF_ACT_SLEEP:                       // DDS Sleep request
-               hcf_cntl( ifbp, HCF_CNTL_DISABLE );
-               cmd_exe( ifbp, HCMD_SLEEP, 0 );
-               break;
-//     case HCF_ACT_WAKEUP:                      // DDS Wakeup request
-//             HCFASSERT( ifbp->IFB_IntOffCnt == 0xFFFE, ifbp->IFB_IntOffCnt );
-//             ifbp->IFB_IntOffCnt++;                  // restore conventional I/F
-//             OPW( HREG_IO, HREG_IO_WAKEUP_ASYNC );
-//             MSF_WAIT(800);                          // MSF-defined function to wait n microseconds.
-//             rc = hcf_action( ifbp, HCF_ACT_INT_OFF );   /*bogus, IFB_IntOffCnt == 0xFFFF, so if you carefully look
-//                                                          *at the #if HCF_DDS statements, HCF_ACT_INT_OFF is empty
-//                                                          *for DDS. "Much" better would be to merge the flows for
-//                                                          *DDS and DEEP_SLEEP
-//                                                          */
-//             break;
-#endif // HCF_DDS
-
-       case HCF_ACT_RX_ACK:                      //Receiver ACK
-       /*6*/   if ( ifbp->IFB_RxFID ) {
-                       DAWA_ACK( HREG_EV_RX );
-               }
-               ifbp->IFB_RxFID = ifbp->IFB_RxLen = 0;
-               break;
-
-  /*8*/ case  HCF_ACT_PRS_SCAN:                   // Hermes PRS Scan (F102)
-               OPW( HREG_PARAM_1, 0x3FFF );
-               //Fall through in HCF_ACT_TALLIES
-       case HCF_ACT_TALLIES:                     // Hermes Inquire Tallies (F100)
-#if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
-       case HCF_ACT_SCAN:                        // Hermes Inquire Scan (F101)
-#endif // HCF_TYPE_HII5
-               /*!! the assumptions about numerical relationships between CFG_TALLIES etc and HCF_ACT_TALLIES etc
-                *   are checked by #if statements just prior to this routine resulting in: err "maintenance"   */
-               cmd_exe( ifbp, HCMD_INQUIRE, action - HCF_ACT_TALLIES + CFG_TALLIES );
-               break;
-
-       default:
-               HCFASSERT( DO_ASSERT, action );
-               break;
-       }
-       //! do not HCFASSERT( rc == HCF_SUCCESS, rc )                                                       /* 30*/
-       HCFLOGEXIT( HCF_TRACE_ACTION );
-       return rc;
-} // hcf_action
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_cntl( IFBP ifbp, hcf_16 cmd )
- *.PURPOSE       Connect or disconnect a specific port to a specific network.
- *!!  ;???????????????? continue needs more explanation
- *               recovers by means of "continue" when the connect process in CCX mode fails
- *               Enables or disables data transmission and reception for the NIC.
- *               Activates static NIC configuration for a specific port at connect.
- *               Activates static configuration for all ports at enable.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   cmd         0x001F: Hermes command (disable, enable, connect, disconnect, continue)
- *                   HCF_CNTL_ENABLE     Enable
- *                   HCF_CNTL_DISABLE    Disable
- *                   HCF_CNTL_CONTINUE   Continue
- *                   HCF_CNTL_CONNECT    Connect
- *                   HCF_CNTL_DISCONNECT Disconnect
- *               0x0100: command qualifier (continue)
- *                   HCMD_RETRY          retry flag
- *               0x0700:  port number (connect/disconnect)
- *                   HCF_PORT_0          MAC Port 0
- *                   HCF_PORT_1          MAC Port 1
- *                   HCF_PORT_2          MAC Port 2
- *                   HCF_PORT_3          MAC Port 3
- *                   HCF_PORT_4          MAC Port 4
- *                   HCF_PORT_5          MAC Port 5
- *                   HCF_PORT_6          MAC Port 6
- *
- *.RETURNS
- *   HCF_SUCCESS
- *!! via cmd_exe
- *   HCF_ERR_NO_NIC
- *   HCF_ERR_DEFUNCT_...
- *   HCF_ERR_TIME_OUT
- *
- *.DESCRIPTION
- * The parameter cmd contains a number of subfields.
- * The actual value for cmd is created by logical or-ing the appropriate mnemonics for the subfields.
- * The field 0x001F contains the command code
- *  - HCF_CNTL_ENABLE
- *  - HCF_CNTL_DISABLE
- *  - HCF_CNTL_CONNECT
- *  - HCF_CNTL_DISCONNECT
- *  - HCF_CNTL_CONTINUE
- *
- * For HCF_CNTL_CONTINUE, the field 0x0100 contains the retry flag HCMD_RETRY.
- * For HCF_CNTL_CONNECT and HCF_CNTL_DISCONNECT, the field 0x0700 contains the port number as HCF_PORT_#.
- * For Station as well as AccessPoint F/W, MAC Port 0 is the "normal" communication channel.
- * For AccessPoint F/W, MAC Port 1 through 6 control the WDS links.
- *
- * Note that despite the names HCF_CNTL_DISABLE and HCF_CNTL_ENABLE, hcf_cntl does not influence the NIC
- * Interrupts mode.
- *
- * The Connect is used by the MSF to bring a particular port in an inactive state as far as data transmission
- * and reception are concerned.
- * When a particular port is disconnected:
- * - the F/W disables the receiver for that port.
- * - the F/W ignores send commands for that port.
- * - all frames (Receive as well as pending Transmit) for that port on the NIC are discarded.
- *
- * When the NIC is disabled, above list applies to all ports, i.e. the result is like all ports are
- * disconnected.
- *
- * When a particular port is connected:
- * - the F/W effectuates the static configuration for that port.
- * - enables the receiver for that port.
- * - accepts send commands for that port.
- *
- * Enabling has the following effects:
- * - the F/W effectuates the static configuration for all ports.
- *   The F/W only updates its static configuration at a transition from disabled to enabled or from
- *   disconnected to connected.
- *   In order to enforce the static configuration, the MSF must assure that such a transition takes place.
- *   Due to such a disable/enable or disconnect/connect sequence, Rx/Tx frames may be lost, in other words,
- *   configuration may impact communication.
- * - The DMA Engine (if applicable) is enabled.
- * Note that the Enable Function by itself only enables data transmission and reception, it
- * does not enable the Interrupt Generation mechanism. This is done by hcf_action.
- *
- * Disabling has the following effects:
- *!!  ;?????is the following statement really true
- * - it acts as a disconnect on all ports.
- * - The DMA Engine (if applicable) is disabled.
- *
- * For impact of the disable command on the behavior of hcf_dma_tx/rx_get see the appropriate sections.
- *
- * Although the Enable/Disable and Connect/Disconnect are antonyms, there is no restriction on their sequencing,
- * in other words, they may be called multiple times in arbitrary sequence without being paired or balanced.
- * Each time one of these functions is called, the effects of the preceding calls cease.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value.
- * - NIC interrupts are not disabled.
- * - A command other than Continue, Enable, Disable, Connect or Disconnect is given.
- * - An invalid combination of the subfields is given or a bit outside the subfields is given.
- * - any return code besides HCF_SUCCESS.
- * - reentrancy, may be caused by calling a hcf_function without adequate protection against NIC interrupts or
- *   multi-threading
- *
- *.DIAGRAM
- *   hcf_cntl takes successively the following actions:
- *2: If the HCF is in Defunct mode or incompatible with the Primary or Station Supplier in the Hermes,
- *   hcf_cntl() returns immediately with HCF_ERR_NO_NIC;? as status.
- *8: when the port is disabled, the DMA engine needs to be de-activated, so the host can safely reclaim tx
- *   packets from the tx descriptor chain.
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-int
-hcf_cntl( IFBP ifbp, hcf_16 cmd )
-{
-       int rc = HCF_ERR_INCOMP_FW;
-#if HCF_ASSERT
-       {   int x = cmd & HCMD_CMD_CODE;
-               if ( x == HCF_CNTL_CONTINUE ) x &= ~HCMD_RETRY;
-               else if ( (x == HCMD_DISABLE || x == HCMD_ENABLE) && ifbp->IFB_FWIdentity.comp_id == COMP_ID_FW_AP ) {
-                       x &= ~HFS_TX_CNTL_PORT;
-               }
-               HCFASSERT( x==HCF_CNTL_ENABLE  || x==HCF_CNTL_DISABLE    || HCF_CNTL_CONTINUE ||
-                          x==HCF_CNTL_CONNECT || x==HCF_CNTL_DISCONNECT, cmd );
-       }
-#endif // HCF_ASSERT
-// #if (HCF_SLEEP) & HCF_DDS
-//     HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFE, cmd );
-// #endif // HCF_DDS
-       HCFLOGENTRY( HCF_TRACE_CNTL, cmd );
-       if ( ifbp->IFB_CardStat == 0 ) {                                                                 /*2*/
-       /*6*/   rc = cmd_exe( ifbp, cmd, 0 );
-#if (HCF_SLEEP) & HCF_DDS
-               ifbp->IFB_TickCnt = 0;              //start 2 second period (with 1 tick uncertanty)
-#endif // HCF_DDS
-       }
-#if HCF_DMA
-       //!rlav : note that this piece of code is always executed, regardless of the DEFUNCT bit in IFB_CardStat.
-       // The reason behind this is that the MSF should be able to get all its DMA resources back from the HCF,
-       // even if the hardware is disfunctional. Practical example under Windows : surprise removal.
-       if ( ifbp->IFB_CntlOpt & USE_DMA ) {
-               hcf_io io_port = ifbp->IFB_IOBase;
-               DESC_STRCT *p;
-               if ( cmd == HCF_CNTL_DISABLE || cmd == HCF_CNTL_ENABLE ) {
-                       OUT_PORT_DWORD( (io_port + HREG_DMA_CTRL), DMA_CTRLSTAT_RESET);                     /*8*/
-                       ifbp->IFB_CntlOpt &= ~DMA_ENABLED;
-               }
-               if ( cmd == HCF_CNTL_ENABLE ) {
-                       OUT_PORT_DWORD( (io_port + HREG_DMA_CTRL), DMA_CTRLSTAT_GO);
-                       /* ;? by rewriting hcf_dma_rx_put you can probably just call hcf_dma_rx_put( ifbp->IFB_FirstDesc[DMA_RX] )
-                        * as additional beneficiary side effect, the SOP and EOP bits will also be cleared
-                        */
-                       ifbp->IFB_CntlOpt |= DMA_ENABLED;
-                       HCFASSERT( NT_ASSERT, NEVER_TESTED );
-                       // make the entire rx descriptor chain DMA-owned, so the DMA engine can (re-)use it.
-                       p = ifbp->IFB_FirstDesc[DMA_RX];
-                       if (p != NULL) {   //;? Think this over again in the light of the new chaining strategy
-                               if ( 1 )    { //begin alternative
-                                       HCFASSERT( NT_ASSERT, NEVER_TESTED );
-                                       put_frame_lst( ifbp, ifbp->IFB_FirstDesc[DMA_RX], DMA_RX );
-                                       if ( ifbp->IFB_FirstDesc[DMA_RX] ) {
-                                               put_frame_lst( ifbp, ifbp->IFB_FirstDesc[DMA_RX]->next_desc_addr, DMA_RX );
-                                       }
-                               } else {
-                                       while ( p ) {
-                                               //p->buf_cntl.cntl_stat |= DESC_DMA_OWNED;
-                                               p->BUF_CNT |= DESC_DMA_OWNED;
-                                               p = p->next_desc_addr;
-                                       }
-                                       // a rx chain is available so hand it over to the DMA engine
-                                       p = ifbp->IFB_FirstDesc[DMA_RX];
-                                       OUT_PORT_DWORD( (io_port + HREG_RXDMA_PTR32), p->desc_phys_addr);
-                               }  //end alternative
-                       }
-               }
-       }
-#endif // HCF_DMA
-       HCFASSERT( rc == HCF_SUCCESS, rc );
-       HCFLOGEXIT( HCF_TRACE_CNTL );
-       return rc;
-} // hcf_cntl
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_connect( IFBP ifbp, hcf_io io_base )
- *.PURPOSE       Grants access right for the HCF to the IFB.
- *               Initializes Card and HCF housekeeping.
- *
- *.ARGUMENTS
- *   ifbp        (near) address of the Interface Block
- *   io_base     non-USB: I/O Base address of the NIC (connect)
- *               non-USB: HCF_DISCONNECT
- *               USB:     HCF_CONNECT, HCF_DISCONNECT
- *
- *.RETURNS
- *   HCF_SUCCESS
- *   HCF_ERR_INCOMP_PRI
- *   HCF_ERR_INCOMP_FW
- *   HCF_ERR_DEFUNCT_CMD_SEQ
- *!! HCF_ERR_NO_NIC really returned ;?
- *   HCF_ERR_NO_NIC
- *   HCF_ERR_TIME_OUT
- *
- *   MSF-accessible fields of Result Block:
- *   IFB_IOBase              entry parameter io_base
- *   IFB_IORange             HREG_IO_RANGE (0x40/0x80)
- *   IFB_Version             version of the IFB layout
- *   IFB_FWIdentity          CFG_FW_IDENTITY_STRCT, specifies the identity of the
- *                           "running" F/W, i.e. tertiary F/W under normal conditions
- *   IFB_FWSup               CFG_SUP_RANGE_STRCT, specifies the supplier range of
- *                           the "running" F/W, i.e. tertiary F/W under normal conditions
- *   IFB_HSISup              CFG_SUP_RANGE_STRCT, specifies the HW/SW I/F range of the NIC
- *   IFB_PRIIdentity         CFG_PRI_IDENTITY_STRCT, specifies the Identity of the Primary F/W
- *   IFB_PRISup              CFG_SUP_RANGE_STRCT, specifies the supplier range of the Primary F/W
- *   all other               all MSF accessible fields, which are not specified above, are zero-filled
- *
- *.CONDITIONS
- * It is the responsibility of the MSF to assure the correctness of the I/O Base address.
- *
- * Note: hcf_connect defaults to NIC interrupt disabled mode, i.e. as if hcf_action( HCF_ACT_INT_OFF )
- * was called.
- *
- *.DESCRIPTION
- * hcf_connect passes the MSF-defined location of the IFB to the HCF and grants or revokes access right for the
- * HCF to the IFB. Revoking is done by specifying HCF_DISCONNECT rather than an I/O address for the parameter
- * io_base.  Every call of hcf_connect in "connect" mode, must eventually be followed by a call of hcf_connect
- * in "disconnect" mode. Calling hcf_connect in "connect"/"disconnect" mode can not be nested.
- * The IFB address must be used as a handle with all subsequent HCF-function calls and the HCF uses the IFB
- * address as a handle when it performs a call(back) of an MSF-function (i.e. msf_assert).
- *
- * Note that not only the MSF accessible fields are cleared, but also all internal housekeeping
- * information is re-initialized.
- * This implies that all settings which are done via hcf_action and hcf_put_info (e.g. CFG_MB_ASSERT, CFG_REG_MB,
- * CFG_REG_INFO_LOG) must be done again. The only field which is not cleared, is IFB_MSFSup.
- *
- * If HCF_INT_ON is selected as compile option, NIC interrupts are disabled.
- *
- * Assert fails if
- * - ifbp is not properly aligned ( ref chapter HCF_ALIGN in 4.1.1)
- * - I/O Base Address is not a multiple of 0x40 (note: 0x0000 is explicitly allowed).
- *
- *.DIAGRAM
- *
- *0: Throughout hcf_connect you need to distinguish the connect from the disconnect case, which requires
- *   some attention about what to use as "I/O" address when for which purpose.
- *2:
- *2a: Reset H-II by toggling reset bit in IO-register on and off.
- *   The HCF_TYPE_PRELOADED caters for the DOS environment where H-II is loaded by a separate program to
- *   overcome the 64k size limit posed on DOS drivers.
- *   The macro OPW is not yet useable because the IFB_IOBase field is not set.
- *   Note 1: hopefully the clearing and initializing of the IFB (see below) acts as a delay which meets the
- *   specification for S/W reset
- *   Note 2: it turns out that on some H/W constellations, the clock to access the EEProm is not lowered
- *   to an appropriate frequency by HREG_IO_SRESET. By giving an HCMD_INI first, this problem is worked around.
- *2b: Experimentally it is determined over a wide range of F/W versions that are waiting for the for Cmd bit in
- *   Ev register gives a workable strategy. The available documentation does not give much clues.
- *4: clear and initialize the IFB
- *   The HCF house keeping info is designed such that zero is the appropriate initial value for as much as
- *   feasible IFB-items.
- *   The readable fields mentioned in the description section and some HCF specific fields are given their
- *   actual value.
- *   IFB_TickIni is initialized at best guess before calibration
- *   Hcf_connect defaults to "no interrupt generation" (implicitly achieved by the zero-filling).
- *6: Register compile-time linked MSF Routine and set default filter level
- *   cast needed to get around the "near" problem in DOS COM model
- *   er C2446: no conversion from void (__near __cdecl *)(unsigned char __far *,unsigned int,unsigned short,int)
- *                           to   void (__far  __cdecl *)(unsigned char __far *,unsigned int,unsigned short,int)
- *8: If a command is apparently still active (as indicated by the Busy bit in Cmd register) this may indicate a
- *   blocked cmd pipe line.  To unblock the following actions are done:
- *    - Ack everything
- *    - Wait for Busy bit drop  in Cmd register
- *    - Wait for Cmd  bit raise in Ev  register
- *   The two waits are combined in a single HCF_WAIT_WHILE to optimize memory size. If either of these waits
- *   fail (prot_cnt becomes 0), then something is serious wrong. Rather than PANICK, the assumption is that the
- *   next cmd_exe will fail, causing the HCF to go into DEFUNCT mode
- *10:    Ack everything to unblock a (possibly blocked) cmd pipe line
- *   Note 1: it is very likely that an Alloc event is pending and very well possible that a (Send) Cmd event is
- *   pending on non-initial calls
- *   Note 2: it is assumed that this strategy takes away the need to ack every conceivable event after an
- *   Hermes Initialize
- *12:    Only H-II NEEDS the Hermes Initialize command. Due to the different semantics for H-I and H-II
- *   Initialize command, init() does not (and can not, since it is called e.g. after a download) execute the
- *   Hermes Initialize command. Executing the Hermes Initialize command for H-I would not harm but not do
- *   anything useful either, so it is skipped.
- *   The return status of cmd_exe is ignored. It is assumed that if cmd_exe fails, init fails too
- *14:    use io_base as a flag to merge hcf_connect and hcf_disconnect into 1 routine
- *   the call to init and its subsequent call of cmd_exe will return HCF_ERR_NO_NIC if appropriate. This status
- *   is (badly) needed by some legacy combination of NT4 and card services which do not yield an I/O address in
- *   time.
- *
- *.NOTICE
- *   On platforms where the NULL-pointer is not a bit-pattern of all zeros, the zero-filling of the IFB results
- *   in an incorrect initialization of pointers.
- *   The implementation of the MailBox manipulation in put_mb_info protects against the absence of a MailBox
- *   based on IFB_MBSize, IFB_MBWp and ifbp->IFB_MBRp. This has ramifications on the initialization of the
- *   MailBox via hcf_put_info with the CFG_REG_MB type, but it prevents dependency on the "NULL-"ness of
- *   IFB_MBp.
- *
- *.NOTICE
- *   There are a number of problems when asserting and logging hcf_connect, e.g.
- *    - Asserting on re-entrancy of hcf_connect by means of
- *    "HCFASSERT( (ifbp->IFB_AssertTrace & HCF_ASSERT_CONNECT) == 0, 0 )" is not useful because IFB contents
- *    are undefined
- *    - Asserting before the IFB is cleared will cause mdd_assert() to interpret the garbage in IFB_AssertRtn
- *    as a routine address
- *   Therefore HCFTRACE nor HCFLOGENTRY is called by hcf_connect.
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-int
-hcf_connect( IFBP ifbp, hcf_io io_base )
-{
-       int         rc = HCF_SUCCESS;
-       hcf_io      io_addr;
-       hcf_32      prot_cnt;
-       hcf_8       *q;
-       LTV_STRCT   x;
-#if HCF_ASSERT
-       hcf_16 xa = ifbp->IFB_FWIdentity.typ;
-       /* is assumed to cause an assert later on if hcf_connect is called without intervening hcf_disconnect.
-        * xa == CFG_FW_IDENTITY in subsequent calls without preceding hcf_disconnect,
-        * xa == 0 in subsequent calls with preceding hcf_disconnect,
-        * xa == "garbage" (any value except CFG_FW_IDENTITY is acceptable) in the initial call
-        */
-#endif // HCF_ASSERT
-
-       if ( io_base == HCF_DISCONNECT ) {                  //disconnect
-               io_addr = ifbp->IFB_IOBase;
-               OPW( HREG_INT_EN, 0 );      //;?workaround against dying F/W on subsequent hcf_connect calls
-       } else {                                            //connect                               /* 0 */
-               io_addr = io_base;
-       }
-
-#if 0 //;? if a subsequent hcf_connect is preceded by an hcf_disconnect the wakeup is not needed !!
-#if HCF_SLEEP
-       OUT_PORT_WORD( .....+HREG_IO, HREG_IO_WAKEUP_ASYNC );       //OPW not yet useable
-       MSF_WAIT(800);                              // MSF-defined function to wait n microseconds.
-       note that MSF_WAIT uses not yet defined!!!! IFB_IOBase and IFB_TickIni (via PROT_CNT_INI)
-       so be careful if this code is restored
-#endif // HCF_SLEEP
-#endif // 0
-
-#if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0    //switch clock back for SEEPROM access  !!!
-       OUT_PORT_WORD( io_addr + HREG_CMD, HCMD_INI );          //OPW not yet useable
-       prot_cnt = INI_TICK_INI;
-       HCF_WAIT_WHILE( (IN_PORT_WORD( io_addr +  HREG_EV_STAT) & HREG_EV_CMD) == 0 );
-       OUT_PORT_WORD( (io_addr + HREG_IO), HREG_IO_SRESET );   //OPW not yet useable                   /* 2a*/
-#endif // HCF_TYPE_PRELOADED
-       for ( q = (hcf_8*)(&ifbp->IFB_Magic); q > (hcf_8*)ifbp; *--q = 0 ) /*NOP*/;                     /* 4 */
-       ifbp->IFB_Magic     = HCF_MAGIC;
-       ifbp->IFB_Version   = IFB_VERSION;
-#if defined MSF_COMPONENT_ID //a new IFB demonstrates how dirty the solution is
-       xxxx[xxxx_PRI_IDENTITY_OFFSET] = NULL;      //IFB_PRIIdentity placeholder   0xFD02
-       xxxx[xxxx_PRI_IDENTITY_OFFSET+1] = NULL;    //IFB_PRISup placeholder        0xFD03
-#endif // MSF_COMPONENT_ID
-#if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
-       ifbp->IFB_TallyLen = 1 + 2 * (HCF_NIC_TAL_CNT + HCF_HCF_TAL_CNT);   //convert # of Tallies to L value for LTV
-       ifbp->IFB_TallyTyp = CFG_TALLIES;           //IFB_TallyTyp: set T value
-#endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
-       ifbp->IFB_IOBase    = io_addr;              //set IO_Base asap, so asserts via HREG_SW_2 don't harm
-       ifbp->IFB_IORange   = HREG_IO_RANGE;
-       ifbp->IFB_CntlOpt   = USE_16BIT;
-#if HCF_ASSERT
-       assert_ifbp = ifbp;
-       ifbp->IFB_AssertLvl = 1;
-#if (HCF_ASSERT) & HCF_ASSERT_LNK_MSF_RTN
-       if ( io_base != HCF_DISCONNECT ) {
-               ifbp->IFB_AssertRtn = (MSF_ASSERT_RTNP)msf_assert;                                          /* 6 */
-       }
-#endif // HCF_ASSERT_LNK_MSF_RTN
-#if (HCF_ASSERT) & HCF_ASSERT_MB                //build the structure to pass the assert info to hcf_put_info
-       ifbp->IFB_AssertStrct.len = sizeof(ifbp->IFB_AssertStrct)/sizeof(hcf_16) - 1;
-       ifbp->IFB_AssertStrct.typ = CFG_MB_INFO;
-       ifbp->IFB_AssertStrct.base_typ = CFG_MB_ASSERT;
-       ifbp->IFB_AssertStrct.frag_cnt = 1;
-       ifbp->IFB_AssertStrct.frag_buf[0].frag_len =
-               ( offsetof(IFB_STRCT, IFB_AssertLvl) - offsetof(IFB_STRCT, IFB_AssertLine) ) / sizeof(hcf_16);
-       ifbp->IFB_AssertStrct.frag_buf[0].frag_addr = &ifbp->IFB_AssertLine;
-#endif // HCF_ASSERT_MB
-#endif // HCF_ASSERT
-       IF_PROT_TIME( prot_cnt = ifbp->IFB_TickIni = INI_TICK_INI );
-#if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0
-       //!! No asserts before Reset-bit in HREG_IO is cleared
-       OPW( HREG_IO, 0x0000 );                     //OPW useable                                       /* 2b*/
-       HCF_WAIT_WHILE( (IPW( HREG_EV_STAT) & HREG_EV_CMD) == 0 );
-       IF_PROT_TIME( HCFASSERT( prot_cnt, IPW( HREG_EV_STAT) ) );
-       IF_PROT_TIME( if ( prot_cnt ) prot_cnt = ifbp->IFB_TickIni );
-#endif // HCF_TYPE_PRELOADED
-       //!! No asserts before Reset-bit in HREG_IO is cleared
-       HCFASSERT( DO_ASSERT, MERGE_2( HCF_ASSERT, 0xCAF0 ) ); //just to proof that the complete assert machinery is working
-       HCFASSERT( xa != CFG_FW_IDENTITY, 0 );       // assert if hcf_connect is called without intervening hcf_disconnect.
-       HCFASSERT( ((hcf_32)(void*)ifbp & (HCF_ALIGN-1) ) == 0, (hcf_32)(void*)ifbp );
-       HCFASSERT( (io_addr & 0x003F) == 0, io_addr );
-                                               //if Busy bit in Cmd register
-       if (IPW( HREG_CMD ) & HCMD_BUSY ) {                                                             /* 8 */
-               //.  Ack all to unblock a (possibly) blocked cmd pipe line
-               OPW( HREG_EV_ACK, ~HREG_EV_SLEEP_REQ );
-                                               //.  Wait for Busy bit drop  in Cmd register
-                                               //.  Wait for Cmd  bit raise in Ev  register
-               HCF_WAIT_WHILE( ( IPW( HREG_CMD ) & HCMD_BUSY ) && (IPW( HREG_EV_STAT) & HREG_EV_CMD) == 0 );
-               IF_PROT_TIME( HCFASSERT( prot_cnt, IPW( HREG_EV_STAT) ) ); /* if prot_cnt == 0, cmd_exe will fail, causing DEFUNCT */
-       }
-       OPW( HREG_EV_ACK, ~HREG_EV_SLEEP_REQ );
-#if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0                                                        /*12*/
-       (void)cmd_exe( ifbp, HCMD_INI, 0 );
-#endif // HCF_TYPE_PRELOADED
-       if ( io_base != HCF_DISCONNECT ) {
-               rc = init( ifbp );                                                                          /*14*/
-               if ( rc == HCF_SUCCESS ) {
-                       x.len = 2;
-                       x.typ = CFG_NIC_BUS_TYPE;
-                       (void)hcf_get_info( ifbp, &x );
-                       ifbp->IFB_BusType = x.val[0];
-                       //CFG_NIC_BUS_TYPE not supported -> default 32 bits/DMA, MSF has to overrule via CFG_CNTL_OPT
-                       if ( x.len == 0 || x.val[0] == 0x0002 || x.val[0] == 0x0003 ) {
-#if (HCF_IO) & HCF_IO_32BITS
-                               ifbp->IFB_CntlOpt &= ~USE_16BIT;            //reset USE_16BIT
-#endif // HCF_IO_32BITS
-#if HCF_DMA
-                               ifbp->IFB_CntlOpt |= USE_DMA;               //SET DMA
-#else
-                               ifbp->IFB_IORange = 0x40 /*i.s.o. HREG_IO_RANGE*/;
-#endif // HCF_DMA
-                       }
-               }
-       } else HCFASSERT(  ( ifbp->IFB_Magic ^= HCF_MAGIC ) == 0, ifbp->IFB_Magic ) /*NOP*/;
-       /* of above HCFASSERT only the side effect is needed, NOP in case HCFASSERT is dummy */
-       ifbp->IFB_IOBase = io_base;                                                                     /* 0*/
-       return rc;
-} // hcf_connect
-
-#if HCF_DMA
-/************************************************************************************************************
- * Function get_frame_lst
- *  - resolve the "last host-owned descriptor" problems when a descriptor list is reclaimed by the MSF.
- *
- * The FrameList to be reclaimed as well as the DescriptorList always start in IFB_FirstDesc[tx_rx_flag]
- * and this is always the "current" DELWA Descriptor.
- *
- * If a FrameList is available, the last descriptor of the FrameList to turned into a new DELWA Descriptor:
- *  - a copy is made from the information in the last descriptor of the FrameList into the current
- *    DELWA Descriptor
- *  - the remainder of the DescriptorList is detached from the copy by setting the next_desc_addr at NULL
- *  - the DMA control bits of the copy are cleared to do not confuse the MSF
- *  - the copy of the last descriptor (i.e. the "old" DELWA Descriptor) is chained to the prev Descriptor
- *    of the FrameList, thus replacing the original last Descriptor of the FrameList.
- *  - IFB_FirstDesc is changed to the address of that replaced (original) last descriptor of the FrameList,
- *    i.e. the "new" DELWA Descriptor.
- *
- * This function makes a copy of that last host-owned descriptor, so the MSF will get a copy of the descriptor.
- * On top of that, it adjusts DMA related fields in the IFB structure.
- // perform a copying-scheme to circumvent the 'last host owned descriptor cannot be reclaimed' limitation imposed by H2.5's DMA hardware design
- // a 'reclaim descriptor' should be available in the HCF:
- *
- * Returns: address of the first descriptor of the FrameList
- *
- 8: Be careful once you start re-ordering the steps in the copy process, that it still works for cases
- *   of FrameLists of 1, 2 and more than 2 descriptors
- *
- * Input parameters:
- * tx_rx_flag      : specifies 'transmit' or 'receive' descriptor.
- *
- ************************************************************************************************************/
-HCF_STATIC DESC_STRCT*
-get_frame_lst( IFBP ifbp, int tx_rx_flag )
-{
-
-       DESC_STRCT *head = ifbp->IFB_FirstDesc[tx_rx_flag];
-       DESC_STRCT *copy, *p, *prev;
-
-       HCFASSERT( tx_rx_flag == DMA_RX || tx_rx_flag == DMA_TX, tx_rx_flag );
-                                               //if FrameList
-       if ( head ) {
-                                               //.  search for last descriptor of first FrameList
-               p = prev = head;
-               while ( ( p->BUF_SIZE & DESC_EOP ) == 0 && p->next_desc_addr ) {
-                       if ( ( ifbp->IFB_CntlOpt & DMA_ENABLED ) == 0 ) {   //clear control bits when disabled
-                               p->BUF_CNT &= DESC_CNT_MASK;
-                       }
-                       prev = p;
-                       p = p->next_desc_addr;
-               }
-                                               //.  if DMA enabled
-               if ( ifbp->IFB_CntlOpt & DMA_ENABLED ) {
-                                               //.  .  if last descriptor of FrameList is DMA owned
-                                               //.  .  or if FrameList is single (DELWA) Descriptor
-                       if ( p->BUF_CNT & DESC_DMA_OWNED || head->next_desc_addr == NULL ) {
-                                               //.  .  .  refuse to return FrameList to caller
-                               head = NULL;
-                       }
-               }
-       }
-                                               //if returnable FrameList found
-       if ( head ) {
-                                               //.  if FrameList is single (DELWA) Descriptor (implies DMA disabled)
-               if ( head->next_desc_addr == NULL ) {
-                                               //.  .  clear DescriptorList
-                       /*;?ifbp->IFB_LastDesc[tx_rx_flag] =*/ ifbp->IFB_FirstDesc[tx_rx_flag] = NULL;
-                                               //.  else
-               } else {
-                                               //.  .  strip hardware-related bits from last descriptor
-                                               //.  .  remove DELWA Descriptor from head of DescriptorList
-                       copy = head;
-                       head = head->next_desc_addr;
-                                               //.   .  exchange first (Confined) and last (possibly imprisoned) Descriptor
-                       copy->buf_phys_addr = p->buf_phys_addr;
-                       copy->buf_addr = p->buf_addr;
-                       copy->BUF_SIZE = p->BUF_SIZE &= DESC_CNT_MASK;  //get rid of DESC_EOP and possibly DESC_SOP
-                       copy->BUF_CNT = p->BUF_CNT &= DESC_CNT_MASK;    //get rid of DESC_DMA_OWNED
-#if (HCF_EXT) & HCF_DESC_STRCT_EXT
-                       copy->DESC_MSFSup = p->DESC_MSFSup;
-#endif // HCF_DESC_STRCT_EXT
-                                               //.  .  turn into a DELWA Descriptor
-                       p->buf_addr = NULL;
-                                               //.  .  chain copy to prev                                          /* 8*/
-                       prev->next_desc_addr = copy;
-                                               //.  .  detach remainder of the DescriptorList from FrameList
-                       copy->next_desc_addr = NULL;
-                       copy->next_desc_phys_addr = 0xDEAD0000; //! just to be nice, not really needed
-                                               //.  .  save the new start (i.e. DELWA Descriptor) in IFB_FirstDesc
-                       ifbp->IFB_FirstDesc[tx_rx_flag] = p;
-               }
-                                               //.  strip DESC_SOP from first descriptor
-               head->BUF_SIZE &= DESC_CNT_MASK;
-               //head->BUF_CNT &= DESC_CNT_MASK;  get rid of DESC_DMA_OWNED
-               head->next_desc_phys_addr = 0xDEAD0000; //! just to be nice, not really needed
-       }
-                                               //return the just detached FrameList (if any)
-       return head;
-} // get_frame_lst
-
-
-/************************************************************************************************************
- * Function put_frame_lst
- *
- * This function
- *
- * Returns: address of the first descriptor of the FrameList
- *
- * Input parameters:
- * tx_rx_flag      : specifies 'transmit' or 'receive' descriptor.
- *
- * The following list should be kept in sync with hcf_dma_tx/rx_put, in order to get them in the WCI-spec !!!!
- * Assert fails if
- * - DMA is not enabled
- * - descriptor list is NULL
- * - a descriptor in the descriptor list is not double word aligned
- * - a count of size field of a descriptor contains control bits, i.e. bits in the high order nibble.
- * - the DELWA descriptor is not a "singleton" DescriptorList.
- * - the DELWA descriptor is not the first Descriptor supplied
- * - a non_DMA descriptor is supplied before the DELWA Descriptor is supplied
- * - Possibly more checks could be added !!!!!!!!!!!!!
-
- *.NOTICE
- * The asserts marked with *sc* are really sanity checks for the HCF, they can (supposedly) not be influenced
- * by incorrect MSF behavior
-
- // The MSF is required to supply the HCF with a single descriptor for MSF tx reclaim purposes.
- // This 'reclaim descriptor' can be recognized by the fact that its buf_addr field is zero.
- *********************************************************************************************
- * Although not required from a hardware perspective:
- * - make each descriptor in this rx-chain DMA-owned.
- * - Also set the count to zero. EOP and SOP bits are also cleared.
- *********************************************************************************************/
-HCF_STATIC void
-put_frame_lst( IFBP ifbp, DESC_STRCT *descp, int tx_rx_flag )
-{
-       DESC_STRCT  *p = descp;
-       hcf_16 port;
-
-       HCFASSERT( ifbp->IFB_CntlOpt & USE_DMA, ifbp->IFB_CntlOpt); //only hcf_dma_tx_put must also be DMA_ENABLED
-       HCFASSERT( tx_rx_flag == DMA_RX || tx_rx_flag == DMA_TX, tx_rx_flag );
-       HCFASSERT( p , 0 );
-
-       while ( p ) {
-               HCFASSERT( ((hcf_32)p & 3 ) == 0, (hcf_32)p );
-               HCFASSERT( (p->BUF_CNT & ~DESC_CNT_MASK) == 0, p->BUF_CNT );
-               HCFASSERT( (p->BUF_SIZE & ~DESC_CNT_MASK) == 0, p->BUF_SIZE );
-               p->BUF_SIZE &= DESC_CNT_MASK;                   //!!this SHOULD be superfluous in case of correct MSF
-               p->BUF_CNT &= tx_rx_flag == DMA_RX ? 0 : DESC_CNT_MASK; //!!this SHOULD be superfluous in case of correct MSF
-               p->BUF_CNT |= DESC_DMA_OWNED;
-               if ( p->next_desc_addr ) {
-//                     HCFASSERT( p->buf_addr && p->buf_phys_addr  && p->BUF_SIZE && +/- p->BUF_SIZE, ... );
-                       HCFASSERT( p->next_desc_addr->desc_phys_addr, (hcf_32)p->next_desc_addr );
-                       p->next_desc_phys_addr = p->next_desc_addr->desc_phys_addr;
-               } else {                                    //
-                       p->next_desc_phys_addr = 0;
-                       if ( p->buf_addr == NULL ) {            // DELWA Descriptor
-                               HCFASSERT( descp == p, (hcf_32)descp );  //singleton DescriptorList
-                               HCFASSERT( ifbp->IFB_FirstDesc[tx_rx_flag] == NULL, (hcf_32)ifbp->IFB_FirstDesc[tx_rx_flag]);
-                               HCFASSERT( ifbp->IFB_LastDesc[tx_rx_flag] == NULL, (hcf_32)ifbp->IFB_LastDesc[tx_rx_flag]);
-                               descp->BUF_CNT = 0; //&= ~DESC_DMA_OWNED;
-                               ifbp->IFB_FirstDesc[tx_rx_flag] = descp;
-// part of alternative ifbp->IFB_LastDesc[tx_rx_flag] = ifbp->IFB_FirstDesc[tx_rx_flag] = descp;
-                                               // if "recycling" a FrameList
-                                               // (e.g. called from hcf_cntl( HCF_CNTL_ENABLE )
-                                               // .  prepare for activation DMA controller
-// part of alternative descp = descp->next_desc_addr;
-                       } else {                                //a "real" FrameList, hand it over to the DMA engine
-                               HCFASSERT( ifbp->IFB_FirstDesc[tx_rx_flag], (hcf_32)descp );
-                               HCFASSERT( ifbp->IFB_LastDesc[tx_rx_flag], (hcf_32)descp );
-                               HCFASSERT( ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_addr == NULL,
-                                          (hcf_32)ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_addr);
-//                             p->buf_cntl.cntl_stat |= DESC_DMA_OWNED;
-                               ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_addr = descp;
-                               ifbp->IFB_LastDesc[tx_rx_flag]->next_desc_phys_addr = descp->desc_phys_addr;
-                               port = HREG_RXDMA_PTR32;
-                               if ( tx_rx_flag ) {
-                                       p->BUF_SIZE |= DESC_EOP;    // p points at the last descriptor in the caller-supplied descriptor chain
-                                       descp->BUF_SIZE |= DESC_SOP;
-                                       port = HREG_TXDMA_PTR32;
-                               }
-                               OUT_PORT_DWORD( (ifbp->IFB_IOBase + port), descp->desc_phys_addr );
-                       }
-                       ifbp->IFB_LastDesc[tx_rx_flag] = p;
-               }
-               p = p->next_desc_addr;
-       }
-} // put_frame_lst
-
-
-/************************************************************************************************************
- *
- *.MODULE        DESC_STRCT* hcf_dma_rx_get( IFBP ifbp )
- *.PURPOSE       decapsulate a message and provides that message to the MSF.
- *               reclaim all descriptors in the rx descriptor chain.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS
- *   pointer to a FrameList
- *
- *.DESCRIPTION
- * hcf_dma_rx_get is intended to  return a received frame when such a frame is deposited in Host memory by the
- * DMA engine. In addition hcf_dma_rx_get can be used to reclaim all descriptors in the rx descriptor chain
- * when the DMA Engine is disabled, e.g. as part of a driver unloading strategy.
- * hcf_dma_rx_get must be called repeatedly by the MSF when hcf_service_nic signals availability of a rx frame
- * through the HREG_EV_RDMAD flag of IFB_DmaPackets. The calling must stop when a NULL pointer is returned, at
- * which time the HREG_EV_RDMAD flag is also cleared by the HCF to arm the mechanism for the next frame
- * reception.
- * Regardless whether the DMA Engine is currently enabled (as controlled via hcf_cntl), if the DMA controller
- * deposited an Rx-frame in the Rx-DescriptorList, this frame is detached from the Rx-DescriptorList,
- * transformed into a FrameList (i.e.  updating the housekeeping fields in the descriptors) and returned to the
- * caller.
- * If no such Rx-frame is available in the Rx-DescriptorList, the behavior of hcf_dma_rx_get depends on the
- * status of the DMA Engine.
- * If the DMA Engine is enabled, a NULL pointer is returned.
- * If the DMA Engine is disabled, the following strategy is used:
- * - the complete Rx-DescriptorList is returned. The DELWA Descriptor is not part of the Rx-DescriptorList.
- * - If there is no Rx-DescriptorList, the DELWA Descriptor is returned.
- * - If there is no DELWA Descriptor, a NULL pointer is returned.
- *
- * If the MSF performs an disable/enable sequence without exhausting the Rx-DescriptorList as described above,
- * the enable command will reset all house keeping information, i.e. already received but not yet by the MSF
- * retrieved frames are lost and the next frame will be received starting with the oldest descriptor.
- *
- * The HCF can be used in 2 fashions: with and without decapsulation for data transfer.
- * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant.
- * If appropriate, decapsulation is done by moving some data inside the buffers and updating the descriptors
- * accordingly.
- *!! ;?????where did I describe why a simple manipulation with the count values does not suffice?
- *
- *.DIAGRAM
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-
-DESC_STRCT*
-hcf_dma_rx_get (IFBP ifbp)
-{
-       DESC_STRCT *descp;  // pointer to start of FrameList
-
-       descp = get_frame_lst( ifbp, DMA_RX );
-       if ( descp && descp->buf_addr ) {
-
-                                               //skip decapsulation at confined descriptor
-#if (HCF_ENCAP) == HCF_ENC
-               int i;
-               DESC_STRCT *p = descp->next_desc_addr;  //pointer to 2nd descriptor of frame
-               HCFASSERT(p, 0);
-               // The 2nd descriptor contains (maybe) a SNAP header plus part or whole of the payload.
-               //determine decapsulation sub-flag in RxFS
-               i = *(wci_recordp)&descp->buf_addr[HFS_STAT] & ( HFS_STAT_MSG_TYPE | HFS_STAT_ERR );
-               if ( i == HFS_STAT_TUNNEL ||
-                    ( i == HFS_STAT_1042 && hcf_encap( (wci_bufp)&p->buf_addr[HCF_DASA_SIZE] ) != ENC_TUNNEL )) {
-                       // The 2nd descriptor contains a SNAP header plus part or whole of the payload.
-                       HCFASSERT( p->BUF_CNT == (p->buf_addr[5] + (p->buf_addr[4]<<8) + 2*6 + 2 - 8), p->BUF_CNT );
-                       // perform decapsulation
-                       HCFASSERT(p->BUF_SIZE >=8, p->BUF_SIZE);
-                       // move SA[2:5] in the second buffer to replace part of the SNAP header
-                       for ( i=3; i >= 0; i--) p->buf_addr[i+8] = p->buf_addr[i];
-                       // copy DA[0:5], SA[0:1] from first buffer to second buffer
-                       for ( i=0; i<8; i++) p->buf_addr[i] = descp->buf_addr[HFS_ADDR_DEST + i];
-                       // make first buffer shorter in count
-                       descp->BUF_CNT = HFS_ADDR_DEST;
-               }
-       }
-#endif // HCF_ENC
-       if ( descp == NULL ) ifbp->IFB_DmaPackets &= (hcf_16)~HREG_EV_RDMAD;  //;?could be integrated into get_frame_lst
-       HCFLOGEXIT( HCF_TRACE_DMA_RX_GET );
-       return descp;
-} // hcf_dma_rx_get
-
-
-/************************************************************************************************************
- *
- *.MODULE        void hcf_dma_rx_put( IFBP ifbp, DESC_STRCT *descp )
- *.PURPOSE       supply buffers for receive purposes.
- *               supply the Rx-DELWA descriptor.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   descp       address of a DescriptorList
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * This function is called by the MSF to supply the HCF with new/more buffers for receive purposes.
- * The HCF can be used in 2 fashions: with and without encapsulation for data transfer.
- * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant.
- * As a consequence, some additional constraints apply to the number of descriptor and the buffers associated
- * with the first 2 descriptors. Independent of the encapsulation feature, the COUNT fields are ignored.
- * A special case is the supplying of the DELWA descriptor, which must be supplied as the first descriptor.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value.
- * - NIC interrupts are not disabled while required by parameter action.
- * - in case decapsulation by the HCF is selected:
- *     - The first databuffer does not have the exact size corresponding with the RxFS up to the 802.3 DestAddr
- *       field (== 29 words).
- *     - The FrameList does not consists of at least 2 Descriptors.
- *     - The second databuffer does not have the minimum size of 8 bytes.
- *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get
- *!! them in the WCI-spec !!!!
- * - DMA is not enabled
- * - descriptor list is NULL
- * - a descriptor in the descriptor list is not double word aligned
- * - a count of size field of a descriptor contains control bits, i.e. bits in the high order nibble.
- * - the DELWA descriptor is not a "singleton" DescriptorList.
- * - the DELWA descriptor is not the first Descriptor supplied
- * - a non_DMA descriptor is supplied before the DELWA Descriptor is supplied
- *!! - Possibly more checks could be added !!!!!!!!!!!!!
- *
- *.DIAGRAM
- *
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-void
-hcf_dma_rx_put( IFBP ifbp, DESC_STRCT *descp )
-{
-
-       HCFLOGENTRY( HCF_TRACE_DMA_RX_PUT, 0xDA01 );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-
-       put_frame_lst( ifbp, descp, DMA_RX );
-#if HCF_ASSERT && (HCF_ENCAP) == HCF_ENC
-       if ( descp->buf_addr ) {
-               HCFASSERT( descp->BUF_SIZE == HCF_DMA_RX_BUF1_SIZE, descp->BUF_SIZE );
-               HCFASSERT( descp->next_desc_addr, 0 ); // first descriptor should be followed by another descriptor
-               // The second DB is for SNAP and payload purposes. It should be a minimum of 12 bytes in size.
-               HCFASSERT( descp->next_desc_addr->BUF_SIZE >= 12, descp->next_desc_addr->BUF_SIZE );
-       }
-#endif // HCFASSERT / HCF_ENC
-       HCFLOGEXIT( HCF_TRACE_DMA_RX_PUT );
-} // hcf_dma_rx_put
-
-
-/************************************************************************************************************
- *
- *.MODULE        DESC_STRCT* hcf_dma_tx_get( IFBP ifbp )
- *.PURPOSE       DMA mode: reclaims and decapsulates packets in the tx descriptor chain if:
- *                - A Tx packet has been copied from host-RAM into NIC-RAM by the DMA engine
- *                - The Hermes/DMAengine have been disabled
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS
- *   pointer to a reclaimed Tx packet.
- *
- *.DESCRIPTION
- * impact of the disable command:
- * When a non-empty pool of Tx descriptors exists (created by means of hcf_dma_put_tx), the MSF
- * is supposed to empty that pool by means of hcf_dma_tx_get calls after the disable in an
- * disable/enable sequence.
- *
- *.DIAGRAM
- *
- *.NOTICE
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-DESC_STRCT*
-hcf_dma_tx_get( IFBP ifbp )
-{
-       DESC_STRCT *descp;  // pointer to start of FrameList
-
-       descp = get_frame_lst( ifbp, DMA_TX );
-       if ( descp && descp->buf_addr ) {
-                                               //skip decapsulation at confined descriptor
-#if (HCF_ENCAP) == HCF_ENC
-               if ( ( descp->BUF_CNT == HFS_TYPE )) {
-                       // perform decapsulation if needed
-                       descp->next_desc_addr->buf_phys_addr -= HCF_DASA_SIZE;
-                       descp->next_desc_addr->BUF_CNT       += HCF_DASA_SIZE;
-               }
-#endif // HCF_ENC
-       }
-       if ( descp == NULL ) {  //;?could be integrated into get_frame_lst
-               ifbp->IFB_DmaPackets &= (hcf_16)~HREG_EV_TDMAD;
-       }
-       HCFLOGEXIT( HCF_TRACE_DMA_TX_GET );
-       return descp;
-} // hcf_dma_tx_get
-
-
-/************************************************************************************************************
- *
- *.MODULE        void hcf_dma_tx_put( IFBP ifbp, DESC_STRCT *descp, hcf_16 tx_cntl )
- *.PURPOSE       puts a packet in the Tx DMA queue in host ram and kicks off the TxDma engine.
- *               supply the Tx-DELWA descriptor.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   descp       address of Tx Descriptor Chain (i.e. a single Tx frame)
- *   tx_cntl     indicates MAC-port and (Hermes) options
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * The HCF can be used in 2 fashions: with and without encapsulation for data transfer.
- * This is controlled at compile time by the HCF_ENC bit of the HCF_ENCAP system constant.
- *
- * Regardless of the HCF_ENCAP system constant, the descriptor list created to describe the frame to be
- * transmitted, must supply space to contain the 802.11 header, preceding the actual frame to be transmitted.
- * Basically, this only supplies working storage to the HCF which passes this on to the DMA engine.
- * As a consequence the contents of this space do not matter.
- * Nevertheless BUF_CNT must take in account this storage.
- * This working space to contain the 802.11 header may not be fragmented, the first buffer must be
- * sufficiently large to contain at least the 802.11 header, i.e. HFS_ADDR_DEST (29 words or 0x3A bytes).
- * This way, the HCF can simply, regardless whether or not the HCF encapsulates the frame, write the parameter
- * tx_cntl at offset 0x36 (HFS_TX_CNTL) in the first buffer.
- * Note that it is allowed to have part or all of the actual frame represented by the first descriptor as long
- * as the requirement for storage for the 802.11 header is met, i.e. the 802.3 frame starts at offset
- * HFS_ADDR_DEST.
- * Except for the Assert on the 1st buffer in case of Encapsualtion, the SIZE fields are ignored.
- *
- * In case the encapsulation feature is compiled in, there are the following additional requirements.
- * o The BUF_CNT of the first buffer changes from a minimum of 0x3A bytes to exactly 0x3A, i.e. the workspace
- *   to store the 802.11 header
- * o The BUF_SIZE of the first buffer is at least the space needed to store the
- *   - 802.11 header (29 words)
- *   - 802.3 header, i.e. 12 bytes addressing information and 2 bytes length field
- *   - 6 bytes SNAP-header
- *   This results in 39 words or 0x4E bytes or HFS_TYPE.
- *   Note that if the BUF_SIZE is larger than 0x4E, this surplus is not used.
- * o The actual frame begins in the 2nd descriptor (which is already implied by the BUF_CNT == 0x3A requirement) and the associated buffer contains at least the 802.3 header, i.e. the 14 bytes representing addressing information and length/type field
- *
- *   When the HCF does not encapsulates (i.e. length/type field <= 1500),  no changes are made to descriptors
- *   or buffers.
- *
- *   When the HCF actually encapsulates (i.e. length/type field > 1500), it successively writes, starting at
- *   offset HFS_ADDR_DEST (0x3A) in the first buffer:
- *     - the 802.3 addressing information, copied from the begin of the second buffer
- *     - the frame length, derived from the total length of the individual fragments, corrected for the SNAP
- *       header length and Type field and ignoring the Destination Address, Source Address and Length field
- *     - the appropriate snap header (Tunnel or 1042, depending on the value of the type field).
- *
- *    The information in the first two descriptors is adjusted accordingly:
- *     - the first descriptor count is changed from 0x3A to 0x4E (HFS_TYPE), which matches 0x3A + 12 + 2 + 6
- *     - the second descriptor count is decreased by 12, being the moved addressing information
- *     - the second descriptor (physical) buffer address is increased by 12.
- *
- * When the descriptors are returned by hcf_dma_tx_get, the transformation of the first two descriptors is
- * undone.
- *
- * Under any of the above scenarios, the assert BUF_CNT <= BUF_SIZE must be true for all descriptors
- * In case of encapsulation, BUF_SIZE of the 1st descriptor is asserted to be at least HFS_TYPE (0x4E), so it is NOT tested.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value.
- * - tx_cntl has a recognizable out-of-range value.
- * - NIC interrupts are not disabled while required by parameter action.
- * - in case encapsulation by the HCF is selected:
- *     - The FrameList does not consists of at least 2 Descriptors.
- *     - The first databuffer does not contain exactly the (space for) the 802.11 header (== 28 words)
- *     - The first databuffer does not have a size to additionally accommodate the 802.3 header and the
- *       SNAP header of the frame after encapsulation (== 39 words).
- *     - The second databuffer does not contain at least DA, SA and 'type/length' (==14 bytes or 7 words)
- *!! The 2nd part of the list of asserts should be kept in sync with put_frame_lst, in order to get
- *!! them in the WCI-spec !!!!
- * - DMA is not enabled
- * - descriptor list is NULL
- * - a descriptor in the descriptor list is not double word aligned
- * - a count of size field of a descriptor contains control bits, i.e. bits in the high order nibble.
- * - the DELWA descriptor is not a "singleton" DescriptorList.
- * - the DELWA descriptor is not the first Descriptor supplied
- * - a non_DMA descriptor is supplied before the DELWA Descriptor is supplied
- *!! - Possibly more checks could be added !!!!!!!!!!!!!
- *.DIAGRAM
- *
- *.NOTICE
- *
- *.ENDDOC                END DOCUMENTATION
- *
- *
- *1: Write tx_cntl parameter to HFS_TX_CNTL field into the Hermes-specific header in buffer 1
- *4: determine whether encapsulation is needed and write the type (tunnel or 1042) already at the appropriate
- *   offset in the 1st buffer
- *6: Build the encapsualtion enveloppe in the free space at the end of the 1st buffer
- *   - Copy DA/SA fields from the 2nd buffer
- *   - Calculate total length of the message (snap-header + type-field + the length of all buffer fragments
- *     associated with the 802.3 frame (i.e all descriptors except the first), but not the DestinationAddress,
- *     SourceAddress and length-field)
- *     Assert the message length
- *     Write length. Note that the message is in BE format, hence on LE platforms the length must be converted
- *     ;? THIS IS NOT WHAT CURRENTLY IS IMPLEMENTED
- *   - Write snap header. Note that the last byte of the snap header is NOT copied, that byte is already in
- *     place as result of the call to hcf_encap.
- *   Note that there are many ways to skin a cat. To express the offsets in the 1st buffer while writing
- *   the snap header, HFS_TYPE is chosen as a reference point to make it easier to grasp that the snap header
- *   and encapsualtion type are at least relative in the right.
- *8: modify 1st descriptor to reflect moved part of the 802.3 header + Snap-header
- *   modify 2nd descriptor to skip the moved part of the 802.3 header (DA/SA
- *10: set each descriptor to 'DMA owned',  clear all other control bits.
- *   Set SOP bit on first descriptor. Set EOP bit on last descriptor.
- *12: Either append the current frame to an existing descriptor list or
- *14: create a list beginning with the current frame
- *16: remember the new end of the list
- *20: hand the frame over to the DMA engine
- ************************************************************************************************************/
-void
-hcf_dma_tx_put( IFBP ifbp, DESC_STRCT *descp, hcf_16 tx_cntl )
-{
-       DESC_STRCT  *p = descp->next_desc_addr;
-       int         i;
-
-#if HCF_ASSERT
-       int x = ifbp->IFB_FWIdentity.comp_id == COMP_ID_FW_AP ? tx_cntl & ~HFS_TX_CNTL_PORT : tx_cntl;
-       HCFASSERT( (x & ~HCF_TX_CNTL_MASK ) == 0, tx_cntl );
-#endif // HCF_ASSERT
-       HCFLOGENTRY( HCF_TRACE_DMA_TX_PUT, 0xDA03 );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-       HCFASSERT( ( ifbp->IFB_CntlOpt & (USE_DMA|DMA_ENABLED) ) == (USE_DMA|DMA_ENABLED), ifbp->IFB_CntlOpt);
-
-       if ( descp->buf_addr ) {
-               *(hcf_16*)(descp->buf_addr + HFS_TX_CNTL) = tx_cntl;                                            /*1*/
-#if (HCF_ENCAP) == HCF_ENC
-               HCFASSERT( descp->next_desc_addr, 0 );                                   //at least 2 descripors
-               HCFASSERT( descp->BUF_CNT == HFS_ADDR_DEST, descp->BUF_CNT );    //exact length required for 1st buffer
-               HCFASSERT( descp->BUF_SIZE >= HCF_DMA_TX_BUF1_SIZE, descp->BUF_SIZE );   //minimal storage for encapsulation
-               HCFASSERT( p->BUF_CNT >= 14, p->BUF_CNT );                  //at least DA, SA and 'type' in 2nd buffer
-
-               descp->buf_addr[HFS_TYPE-1] = hcf_encap(&descp->next_desc_addr->buf_addr[HCF_DASA_SIZE]);       /*4*/
-               if ( descp->buf_addr[HFS_TYPE-1] != ENC_NONE ) {
-                       for ( i=0; i < HCF_DASA_SIZE; i++ ) {                                                       /*6*/
-                               descp->buf_addr[i + HFS_ADDR_DEST] = descp->next_desc_addr->buf_addr[i];
-                       }
-                       i = sizeof(snap_header) + 2 - ( 2*6 + 2 );
-                       do { i += p->BUF_CNT; } while ( ( p = p->next_desc_addr ) != NULL );
-                       *(hcf_16*)(&descp->buf_addr[HFS_LEN]) = CNV_END_SHORT(i);   //!! this converts on ALL platforms, how does that relate to the CCX code
-                       for ( i=0; i < sizeof(snap_header) - 1; i++) {
-                               descp->buf_addr[HFS_TYPE - sizeof(snap_header) + i] = snap_header[i];
-                       }
-                       descp->BUF_CNT = HFS_TYPE;                                                                  /*8*/
-                       descp->next_desc_addr->buf_phys_addr    += HCF_DASA_SIZE;
-                       descp->next_desc_addr->BUF_CNT          -= HCF_DASA_SIZE;
-               }
-#endif // HCF_ENC
-       }
-       put_frame_lst( ifbp, descp, DMA_TX );
-       HCFLOGEXIT( HCF_TRACE_DMA_TX_PUT );
-} // hcf_dma_tx_put
-
-#endif // HCF_DMA
-
-/************************************************************************************************************
- *
- *.MODULE        hcf_8 hcf_encap( wci_bufp type )
- *.PURPOSE       test whether RFC1042 or Bridge-Tunnel encapsulation is needed.
- *
- *.ARGUMENTS
- *   type        (Far) pointer to the (Big Endian) Type/Length field in the message
- *
- *.RETURNS
- *   ENC_NONE        len/type is "len" ( (BIG_ENDIAN)type <= 1500 )
- *   ENC_TUNNEL      len/type is "type" and 0x80F3 or 0x8137
- *   ENC_1042        len/type is "type" but not 0x80F3 or 0x8137
- *
- *.CONDITIONS
- *   NIC Interrupts  d.c
- *
- *.DESCRIPTION
- * Type must point to the Len/Type field of the message, this is the 2-byte field immediately after the 6 byte
- * Destination Address and 6 byte Source Address.  The 2 successive bytes addressed by type are interpreted as
- * a Big Endian value.  If that value is less than or equal to 1500, the message is assumed to be in 802.3
- * format.  Otherwise the message is assumed to be in Ethernet-II format.  Depending on the value of Len/Typ,
- * Bridge Tunnel or RFC1042 encapsulation is needed.
- *
- *.DIAGRAM
- *
- *  1:   presume 802.3, hence preset return value at ENC_NONE
- *  2:   convert type from "network" Endian format to native Endian
- *  4:   the litmus test to distinguish type and len.
- *   The hard code "magic" value of 1500 is intentional and should NOT be replaced by a mnemonic because it is
- *   not related at all to the maximum frame size supported  by the Hermes.
- *  6:   check type against:
- *       0x80F3  //AppleTalk Address Resolution Protocol (AARP)
- *       0x8137  //IPX
- *   to determine the type of encapsulation
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC hcf_8
-hcf_encap( wci_bufp type )
-{
-
-       hcf_8   rc = ENC_NONE;                                                                                  /* 1 */
-       hcf_16  t = (hcf_16)(*type<<8) + *(type+1);                                                             /* 2 */
-
-       if ( t > 1500 ) {                                                                                   /* 4 */
-               if ( t == 0x8137 || t == 0x80F3 ) {
-                       rc = ENC_TUNNEL;                                                                            /* 6 */
-               } else {
-                       rc = ENC_1042;
-               }
-       }
-       return rc;
-} // hcf_encap
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_get_info( IFBP ifbp, LTVP ltvp )
- *.PURPOSE       Obtains transient and persistent configuration information from the Card and from the HCF.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   ltvp        address of LengthTypeValue structure specifying the "what" and the "how much" of the
- *               information to be collected from the HCF or from the Hermes
- *
- *.RETURNS
- *   HCF_ERR_LEN         The provided buffer was too small
- *   HCF_SUCCESS         Success
- *!! via cmd_exe ( type >= CFG_RID_FW_MIN )
- *   HCF_ERR_NO_NIC      NIC removed during retrieval
- *   HCF_ERR_TIME_OUT    Expected Hermes event did not occur in expected time
- *!! via cmd_exe and setup_bap (type >= CFG_RID_FW_MIN )
- *   HCF_ERR_DEFUNCT_... HCF is in defunct mode (bits 0x7F reflect cause)
- *
- *.DESCRIPTION
- * The T-field of the LTV-record (provided by the MSF in parameter ltvp) specifies the RID wanted. The RID
- * information identified by the T-field is copied into the V-field.
- * On entry, the L-field specifies the size of the buffer, also called the "Initial DataLength". The L-value
- * includes the size of the T-field, but not the size of the L-field itself.
- * On return, the L-field indicates the number of words actually contained by the Type and Value fields.
- * As the size of the Type field in the LTV-record is included in the "Initial DataLength" of the record, the
- * V-field can contain at most "Initial DataLength" - 1 words of data.
- * Copying stops if either the complete Information is copied or if the number of words indicated by the
- * "Initial DataLength" were copied.  The "Initial DataLength" acts as a safe guard against Configuration
- * Information blocks that have different sizes for different F/W versions, e.g. when later versions support
- * more tallies than earlier versions.
- * If the size of Value field of the RID exceeds the size of the "Initial DataLength" -1, as much data
- * as fits is copied, and an error status of HCF_ERR_LEN is returned.
- *
- * It is the responsibility of the MSF to detect card removal and re-insertion and not call the HCF when the
- * NIC is absent. The MSF cannot, however, timely detect a Card removal if the Card is removed while
- * hcf_get_info is in progress.  Therefore, the HCF performs its own check on Card presence after the read
- * operation of the NIC data.  If the Card is not present or removed during the execution of hcf_get_info,
- * HCF_ERR_NO_NIC is returned and the content of the Data Buffer is unpredictable. This check is not performed
- * in case of the "HCF embedded" pseudo RIDs like CFG_TALLIES.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value.
- * - reentrancy, may be  caused by calling hcf_functions without adequate protection
- *   against NIC interrupts or multi-threading.
- * - ltvp is a NULL pointer.
- * - length field of the LTV-record at entry is 0 or 1 or has an excessive value (i.e. exceeds HCF_MAX_LTV).
- * - type field of the LTV-record is invalid.
- *
- *.DIAGRAM
- *   Hcf_get_mb_info copies the contents of the oldest MailBox Info block in the MailBox to PC RAM. If len is
- *   less than the size of the MailBox Info block, only as much as fits in the PC RAM buffer is copied. After
- *   the copying the MailBox Read pointer is updated to point to the next MailBox Info block, hence the
- *   remainder of an "oversized" MailBox Info block is lost. The truncation of the MailBox Info block is NOT
- *   reflected in the return status. Note that hcf_get_info guarantees the length of the PC RAM buffer meets
- *   the minimum requirements of at least 2, so no PC RAM buffer overrun.
- *
- *   Calling hcf_get_mb_info when their is no MailBox Info block available or when there is no MailBox at all,
- *   results in a "NULL" MailBox Info block.
- *
- *12:    see NOTICE
- *17: The return status of cmd_wait and the first hcfio_in_string can be ignored, because when one fails, the
- *   other fails via the IFB_DefunctStat mechanism
- *20: "HCFASSERT( rc == HCF_SUCCESS, rc )" is not suitable because this will always trigger as side effect of
- *   the HCFASSERT in hcf_put_info which calls hcf_get_info to figure out whether the RID exists at all.
-
- *.NOTICE
- *
- *   "HCF embedded" pseudo RIDs:
- *   CFG_MB_INFO, CFG_TALLIES, CFG_DRV_IDENTITY, CFG_DRV_SUP_RANGE, CFG_DRV_ACT_RANGES_PRI,
- *   CFG_DRV_ACT_RANGES_STA, CFG_DRV_ACT_RANGES_HSI
- *   Note the HCF_ERR_LEN is NOT adequately set, when L >= 2 but less than needed
- *
- *   Remarks: Transfers operation information and transient and persistent configuration information from the
- *   Card and from the HCF to the MSF.
- *   The exact layout of the provided data structure depends on the action code. Copying stops if either the
- *   complete Configuration Information is copied or if the number of bytes indicated by len is copied.  Len
- *   acts as a safe guard against Configuration Information blocks which have different sizes for different
- *   Hermes versions, e.g. when later versions support more tallies than earlier versions. It is a conscious
- *   decision that unused parts of the PC RAM buffer are not cleared.
- *
- *   Remarks: The only error against which is protected is the "Read error" as result of Card removal. Only the
- *   last hcf_io_string need to be protected because if the first fails the second will fail as well. Checking
- *   for cmd_exe errors is supposed superfluous because problems in cmd_exe are already caught or will be
- *   caught by hcf_enable.
- *
- *   CFG_MB_INFO: copy the oldest MailBox Info Block or the "null" block if none available.
- *
- *   The mechanism to HCF_ASSERT on invalid typ-codes in the LTV record is based on the following strategy:
- *     - during the pseudo-asynchronous Hermes commands (diagnose, download) only CFG_MB_INFO is acceptable
- *     - some codes (e.g. CFG_TALLIES) are explicitly handled by the HCF which implies that these codes
- *       are valid
- *     - all other codes in the range 0xFC00 through 0xFFFF are passed to the Hermes.  The Hermes returns an
- *       LTV record with a zero value in the L-field for all Typ-codes it does not recognize. This is
- *       defined and intended behavior, so HCF_ASSERT does not catch on this phenomena.
- *     - all remaining codes are invalid and cause an ASSERT.
- *
- *.CONDITIONS
- * In case of USB, HCF_MAX_MSG ;?USED;? to limit the amount of data that can be retrieved via hcf_get_info.
- *
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-int
-hcf_get_info( IFBP ifbp, LTVP ltvp )
-{
-
-       int         rc = HCF_SUCCESS;
-       hcf_16      len = ltvp->len;
-       hcf_16      type = ltvp->typ;
-       wci_recordp p = &ltvp->len;     //destination word pointer (in LTV record)
-       hcf_16      *q = NULL;              /* source word pointer  Note!! DOS COM can't cope with FAR
-                                            * as a consequence MailBox must be near which is usually true anyway
-                                            */
-       int         i;
-
-       HCFLOGENTRY( HCF_TRACE_GET_INFO, ltvp->typ );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-       HCFASSERT( ltvp, 0 );
-       HCFASSERT( 1 < ltvp->len && ltvp->len <= HCF_MAX_LTV + 1, MERGE_2( ltvp->typ, ltvp->len ) );
-
-       ltvp->len = 0;                              //default to: No Info Available
-       //filter out all specials
-       for ( i = 0; ( q = xxxx[i] ) != NULL && q[1] != type; i++ ) /*NOP*/;
-
-#if HCF_TALLIES
-       if ( type == CFG_TALLIES ) {                                                    /*3*/
-               (void)hcf_action( ifbp, HCF_ACT_TALLIES );
-               q = (hcf_16*)&ifbp->IFB_TallyLen;
-       }
-#endif // HCF_TALLIES
-
-       if ( type == CFG_MB_INFO ) {
-               if ( ifbp->IFB_MBInfoLen ) {
-                       if ( ifbp->IFB_MBp[ifbp->IFB_MBRp] == 0xFFFF ) {
-                               ifbp->IFB_MBRp = 0; //;?Probably superfluous
-                       }
-                       q = &ifbp->IFB_MBp[ifbp->IFB_MBRp];
-                       ifbp->IFB_MBRp += *q + 1;   //update read pointer
-                       if ( ifbp->IFB_MBp[ifbp->IFB_MBRp] == 0xFFFF ) {
-                               ifbp->IFB_MBRp = 0;
-                       }
-                       ifbp->IFB_MBInfoLen = ifbp->IFB_MBp[ifbp->IFB_MBRp];
-               }
-       }
-
-       if ( q != NULL ) {                      //a special or CFG_TALLIES or CFG_MB_INFO
-               i = min( len, *q ) + 1;             //total size of destination (including T-field)
-               while ( i-- ) {
-                       *p++ = *q;
-#if (HCF_TALLIES) & HCF_TALLIES_RESET
-                       if ( q > &ifbp->IFB_TallyTyp && type == CFG_TALLIES ) {
-                               *q = 0;
-                       }
-#endif // HCF_TALLIES_RESET
-                       q++;
-               }
-       } else {                                // not a special nor CFG_TALLIES nor CFG_MB_INFO
-               if ( type == CFG_CNTL_OPT ) {                                       //read back effective options
-                       ltvp->len = 2;
-                       ltvp->val[0] = ifbp->IFB_CntlOpt;
-#if (HCF_EXT) & HCF_EXT_NIC_ACCESS
-               } else if ( type == CFG_PROD_DATA ) {  //only needed for some test tool on top of H-II NDIS driver
-                       hcf_io      io_port;
-                       wci_bufp    pt;                 //pointer with the "right" type, just to help ease writing macros with embedded assembly
-                       OPW( HREG_AUX_PAGE, (hcf_16)(PLUG_DATA_OFFSET >> 7) );
-                       OPW( HREG_AUX_OFFSET, (hcf_16)(PLUG_DATA_OFFSET & 0x7E) );
-                       io_port = ifbp->IFB_IOBase + HREG_AUX_DATA;     //to prevent side effects of the MSF-defined macro
-                       p = ltvp->val;                  //destination char pointer (in LTV record)
-                       i = len - 1;
-                       if (i > 0 ) {
-                               pt = (wci_bufp)p;   //just to help ease writing macros with embedded assembly
-                               IN_PORT_STRING_8_16( io_port, pt, i ); //space used by T: -1
-                       }
-               } else if ( type == CFG_CMD_HCF ) {
-#define P ((CFG_CMD_HCF_STRCT FAR *)ltvp)
-                       HCFASSERT( P->cmd == CFG_CMD_HCF_REG_ACCESS, P->cmd );       //only Hermes register access supported
-                       if ( P->cmd == CFG_CMD_HCF_REG_ACCESS ) {
-                               HCFASSERT( P->mode < ifbp->IFB_IOBase, P->mode );        //Check Register space
-                               ltvp->len = min( len, 4 );                              //RESTORE ltv length
-                               P->add_info = IPW( P->mode );
-                       }
-#undef P
-#endif // HCF_EXT_NIC_ACCESS
-#if (HCF_ASSERT) & HCF_ASSERT_PRINTF
-               } else if (type == CFG_FW_PRINTF) {
-                       rc = fw_printf(ifbp, (CFG_FW_PRINTF_STRCT*)ltvp);
-#endif // HCF_ASSERT_PRINTF
-               } else if ( type >= CFG_RID_FW_MIN ) {
-//;? by using HCMD_BUSY option when calling cmd_exe, using a get_frag with length 0 just to set up the
-//;? BAP and calling cmd_cmpl, you could merge the 2 Busy waits. Whether this really helps (and what
-//;? would be the optimal sequence in cmd_exe and get_frag) would have to be MEASURED
-               /*17*/  if ( ( rc = cmd_exe( ifbp, HCMD_ACCESS, type ) ) == HCF_SUCCESS &&
-                                ( rc = setup_bap( ifbp, type, 0, IO_IN ) ) == HCF_SUCCESS ) {
-                               get_frag( ifbp, (wci_bufp)&ltvp->len, 2*len+2 BE_PAR(2) );
-                               if ( IPW( HREG_STAT ) == 0xFFFF ) {                 //NIC removal test
-                                       ltvp->len = 0;
-                                       HCFASSERT( DO_ASSERT, type );
-                               }
-                       }
-       /*12*/  } else HCFASSERT( DO_ASSERT, type ) /*NOP*/; //NOP in case HCFASSERT is dummy
-       }
-       if ( len < ltvp->len ) {
-               ltvp->len = len;
-               if ( rc == HCF_SUCCESS ) {
-                       rc = HCF_ERR_LEN;
-               }
-       }
-       HCFASSERT( rc == HCF_SUCCESS || ( rc == HCF_ERR_LEN && ifbp->IFB_AssertTrace & 1<<HCF_TRACE_PUT_INFO ),
-                  MERGE_2( type, rc ) );                                                                /*20*/
-       HCFLOGEXIT( HCF_TRACE_GET_INFO );
-       return rc;
-} // hcf_get_info
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_put_info( IFBP ifbp, LTVP ltvp )
- *.PURPOSE       Transfers operation and configuration information to the Card and to the HCF.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   ltvp        specifies the RID (as defined by Hermes I/F) or pseudo-RID (as defined by WCI)
- *
- *.RETURNS
- *   HCF_SUCCESS
- *!! via cmd_exe
- *   HCF_ERR_NO_NIC      NIC removed during data retrieval
- *   HCF_ERR_TIME_OUT    Expected F/W event did not occur in time
- *   HCF_ERR_DEFUNCT_...
- *!! via download                CFG_DLNV_START <= type <= CFG_DL_STOP
- *!! via put_info                CFG_RID_CFG_MIN <= type <= CFG_RID_CFG_MAX
- *!! via put_frag
- *
- *.DESCRIPTION
- * The L-field of the LTV-record (provided by the MSF in parameter ltvp) specifies the size of the buffer.
- * The L-value includes the size of the T-field, but not the size of the L-field.
- * The T- field specifies the RID placed in the V-field by the MSF.
- *
- * Not all CFG-codes can be used for hcf_put_info.  The following CFG-codes are valid for hcf_put_info:
- * o One of the CFG-codes in the group "Network Parameters, Static Configuration Entities"
- * Changes made by hcf_put_info to CFG_codes in this group will not affect the F/W
- * and HCF behavior until hcf_cntl_port( HCF_PORT_ENABLE) is called.
- * o One of the CFG-codes in the group "Network Parameters, Dynamic Configuration Entities"
- * Changes made by hcf_put_info to CFG_codes will affect the F/W and HCF behavior immediately.
- * o CFG_PROG.
- * This code is used to initiate and terminate the process to download data either to
- * volatile or to non-volatile RAM on the NIC as well as for the actual download.
- * o CFG-codes related to the HCF behavior.
- * The related CFG-codes are:
- *  - CFG_REG_MB
- *  - CFG_REG_ASSERT_RTNP
- *  - CFG_REG_INFO_LOG
- *  - CFG_CMD_NIC
- *  - CFG_CMD_DONGLE
- *  - CFG_CMD_HCF
- *  - CFG_NOTIFY
- *
- * All LTV-records "unknown" to the HCF are forwarded to the F/W.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value.
- * - ltvp is a NULL pointer.
- * - hcf_put_info was called without prior call to hcf_connect
- * - type field of the LTV-record is invalid, i.e. neither HCF nor F/W can handle the value.
- * - length field of the LTV-record at entry is less than 1 or exceeds MAX_LTV_SIZE.
- * - registering a MailBox with size less than 60 or a non-aligned buffer address is used.
- * - reentrancy, may be  caused by calling hcf_functions without adequate protection against
- *   NIC interrupts or multi-threading.
- *
- *.DIAGRAM
- *
- *.NOTICE
- *   Remarks:  In case of Hermes Configuration LTVs, the codes for the type are "cleverly" chosen to be
- *   identical to the RID. Hermes Configuration information is copied from the provided data structure into the
- *   Card.
- *   In case of HCF Configuration LTVs, the type values are chosen in a range which does not overlap the
- *   RID-range.
- *
- *20:
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-
-int
-hcf_put_info( IFBP ifbp, LTVP ltvp )
-{
-       int rc = HCF_SUCCESS;
-
-       HCFLOGENTRY( HCF_TRACE_PUT_INFO, ltvp->typ );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-       HCFASSERT( ltvp, 0 );
-       HCFASSERT( 1 < ltvp->len && ltvp->len <= HCF_MAX_LTV + 1, ltvp->len );
-
-                                               //all codes between 0xFA00 and 0xFCFF are passed to Hermes
-#if (HCF_TYPE) & HCF_TYPE_WPA
-       {
-               hcf_16 i;
-               hcf_32 FAR * key_p;
-
-               if ( ltvp->typ == CFG_ADD_TKIP_DEFAULT_KEY || ltvp->typ == CFG_ADD_TKIP_MAPPED_KEY ) {
-                       key_p = (hcf_32*)((CFG_ADD_TKIP_MAPPED_KEY_STRCT FAR *)ltvp)->tx_mic_key;
-                       i = TX_KEY;     //i.e. TxKeyIndicator == 1, KeyID == 0
-                       if ( ltvp->typ == CFG_ADD_TKIP_DEFAULT_KEY ) {
-                               key_p = (hcf_32*)((CFG_ADD_TKIP_DEFAULT_KEY_STRCT FAR *)ltvp)->tx_mic_key;
-                               i = CNV_LITTLE_TO_SHORT(((CFG_ADD_TKIP_DEFAULT_KEY_STRCT FAR *)ltvp)->tkip_key_id_info);
-                       }
-                       if ( i & TX_KEY ) { /* TxKeyIndicator == 1
-                                              (either really set by MSF in case of DEFAULT or faked by HCF in case of MAPPED ) */
-                               ifbp->IFB_MICTxCntl = (hcf_16)( HFS_TX_CNTL_MIC | (i & KEY_ID )<<8 );
-                               ifbp->IFB_MICTxKey[0] = CNV_LONGP_TO_LITTLE( key_p );
-                               ifbp->IFB_MICTxKey[1] = CNV_LONGP_TO_LITTLE( (key_p+1) );
-                       }
-                       i = ( i & KEY_ID ) * 2;
-                       ifbp->IFB_MICRxKey[i]   = CNV_LONGP_TO_LITTLE( (key_p+2) );
-                       ifbp->IFB_MICRxKey[i+1] = CNV_LONGP_TO_LITTLE( (key_p+3) );
-               }
-#define P ((CFG_REMOVE_TKIP_DEFAULT_KEY_STRCT FAR *)ltvp)
-               if ( ( ltvp->typ == CFG_REMOVE_TKIP_MAPPED_KEY )    ||
-                    ( ltvp->typ == CFG_REMOVE_TKIP_DEFAULT_KEY &&
-                      ( (ifbp->IFB_MICTxCntl >> 8) & KEY_ID ) == CNV_SHORT_TO_LITTLE(P->tkip_key_id )
-                            )
-                       ) { ifbp->IFB_MICTxCntl = 0; }      //disable MIC-engine
-#undef P
-       }
-#endif // HCF_TYPE_WPA
-
-       if ( ltvp->typ == CFG_PROG ) {
-               rc = download( ifbp, (CFG_PROG_STRCT FAR *)ltvp );
-       } else switch (ltvp->typ) {
-#if (HCF_ASSERT) & HCF_ASSERT_RT_MSF_RTN
-               case CFG_REG_ASSERT_RTNP:                                         //Register MSF Routines
-#define P ((CFG_REG_ASSERT_RTNP_STRCT FAR *)ltvp)
-                       ifbp->IFB_AssertRtn = P->rtnp;
-//                     ifbp->IFB_AssertLvl = P->lvl;       //TODO not yet supported so default is set in hcf_connect
-                       HCFASSERT( DO_ASSERT, MERGE_2( HCF_ASSERT, 0xCAF1 ) );   //just to proof that the complete assert machinery is working
-#undef P
-                       break;
-#endif // HCF_ASSERT_RT_MSF_RTN
-#if (HCF_EXT) & HCF_EXT_INFO_LOG
-               case CFG_REG_INFO_LOG:                                            //Register Log filter
-                       ifbp->IFB_RIDLogp = ((CFG_RID_LOG_STRCT FAR*)ltvp)->recordp;
-                       break;
-#endif // HCF_EXT_INFO_LOG
-               case CFG_CNTL_OPT:                                                //overrule option
-                       HCFASSERT( ( ltvp->val[0] & ~(USE_DMA | USE_16BIT) ) == 0, ltvp->val[0] );
-                       if ( ( ltvp->val[0] & USE_DMA ) == 0 ) ifbp->IFB_CntlOpt &= ~USE_DMA;
-                       ifbp->IFB_CntlOpt |=  ltvp->val[0] & USE_16BIT;
-                       break;
-
-               case CFG_REG_MB:                                                  //Register MailBox
-#define P ((CFG_REG_MB_STRCT FAR *)ltvp)
-                       HCFASSERT( ( (hcf_32)P->mb_addr & 0x0001 ) == 0, (hcf_32)P->mb_addr );
-                       HCFASSERT( (P)->mb_size >= 60, (P)->mb_size );
-                       ifbp->IFB_MBp = P->mb_addr;
-                       /* if no MB present, size must be 0 for ;?the old;? put_info_mb to work correctly */
-                       ifbp->IFB_MBSize = ifbp->IFB_MBp == NULL ? 0 : P->mb_size;
-                       ifbp->IFB_MBWp = ifbp->IFB_MBRp = 0;
-                       ifbp->IFB_MBp[0] = 0;                                           //flag the MailBox as empty
-                       ifbp->IFB_MBInfoLen = 0;
-                       HCFASSERT( ifbp->IFB_MBSize >= 60 || ifbp->IFB_MBp == NULL, ifbp->IFB_MBSize );
-#undef P
-                       break;
-               case CFG_MB_INFO:                                                 //store MailBoxInfoBlock
-                       rc = put_info_mb( ifbp, (CFG_MB_INFO_STRCT FAR *)ltvp );
-                       break;
-
-#if (HCF_EXT) & HCF_EXT_NIC_ACCESS
-               case CFG_CMD_NIC:
-#define P ((CFG_CMD_NIC_STRCT FAR *)ltvp)
-                       OPW( HREG_PARAM_2, P->parm2 );
-                       OPW( HREG_PARAM_1, P->parm1 );
-                       rc = cmd_exe( ifbp, P->cmd, P->parm0 );
-                       P->hcf_stat = (hcf_16)rc;
-                       P->stat = IPW( HREG_STAT );
-                       P->resp0 = IPW( HREG_RESP_0 );
-                       P->resp1 = IPW( HREG_RESP_1 );
-                       P->resp2 = IPW( HREG_RESP_2 );
-                       P->ifb_err_cmd = ifbp->IFB_ErrCmd;
-                       P->ifb_err_qualifier = ifbp->IFB_ErrQualifier;
-#undef P
-                       break;
-               case CFG_CMD_HCF:
-#define P ((CFG_CMD_HCF_STRCT FAR *)ltvp)
-                       HCFASSERT( P->cmd == CFG_CMD_HCF_REG_ACCESS, P->cmd );       //only Hermes register access supported
-                       if ( P->cmd == CFG_CMD_HCF_REG_ACCESS ) {
-                               HCFASSERT( P->mode < ifbp->IFB_IOBase, P->mode );        //Check Register space
-                               OPW( P->mode, P->add_info);
-                       }
-#undef P
-                       break;
-#endif // HCF_EXT_NIC_ACCESS
-
-#if (HCF_ASSERT) & HCF_ASSERT_PRINTF
-               case CFG_FW_PRINTF_BUFFER_LOCATION:
-                       ifbp->IFB_FwPfBuff = *(CFG_FW_PRINTF_BUFFER_LOCATION_STRCT*)ltvp;
-                       break;
-#endif // HCF_ASSERT_PRINTF
-
-               default:                      //pass everything unknown above the "FID" range to the Hermes or Dongle
-                       rc = put_info( ifbp, ltvp );
-               }
-       //DO NOT !!! HCFASSERT( rc == HCF_SUCCESS, rc )                                             /* 20 */
-       HCFLOGEXIT( HCF_TRACE_PUT_INFO );
-       return rc;
-} // hcf_put_info
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_rcv_msg( IFBP ifbp, DESC_STRCT *descp, unsigned int offset )
- *.PURPOSE       All: decapsulate a message.
- *               pre-HermesII.5: verify MIC.
- *               non-USB, non-DMA mode: Transfer a message from the NIC to the Host and acknowledge reception.
- *               USB: Transform a message from proprietary USB format to 802.3 format
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   descp       Pointer to the Descriptor List location.
- *   offset      USB: not used
- *               non-USB: specifies the beginning of the data to be obtained (0 corresponds with DestAddr field
- *               of frame).
- *
- *.RETURNS
- *   HCF_SUCCESS         No WPA error ( or HCF_ERR_MIC already reported by hcf_service_nic)
- *   HCF_ERR_MIC         message contains an erroneous MIC ( HCF_SUCCESS is reported if HCF_ERR_MIC is already
- *                       reported by hcf_service_nic)
- *   HCF_ERR_NO_NIC      NIC removed during data retrieval
- *   HCF_ERR_DEFUNCT...
- *
- *.DESCRIPTION
- * The Receive Message Function can be executed by the MSF to obtain the Data Info fields of the message that
- * is reported to be available by the Service NIC Function.
- *
- * The Receive Message Function copies the message data available in the Card memory into a buffer structure
- * provided by the MSF.
- * Only data of the message indicated by the Service NIC Function can be obtained.
- * Execution of the Service NIC function may result in the availability of a new message, but it definitely
- * makes the message reported by the preceding Service NIC function, unavailable.
- *
- * in non-USB/non-DMA mode, hcf_rcv_msg starts the copy process at the (non-negative) offset requested by the
- * parameter offset, relative to HFS_ADDR_DEST, e.g offset 0 starts copying from the Destination Address, the
- * very begin of the 802.3 frame message. Offset must either lay within the part of the 802.3 frame as stored
- * by hcf_service_nic in the lookahead buffer or be just behind it, i.e. the first byte not yet read.
- * When offset is within lookahead, data is copied from lookahead.
- * When offset is beyond lookahead, data is read directly from RxFS in NIC with disregard of the actual value
- * of offset
- *
- *.NOTICE:
- * o at entry: look ahead buffer as passed with hcf_service_nic is still accessible and unchanged
- * o at exit: Receive Frame in NIC memory is released
- *
- * Description:
- * Starting at the byte indicated by the Offset value, the bytes are copied from the Data Info
- * Part of the current Receive Frame Structure to the Host memory data buffer structure
- * identified by descp.
- * The maximum value for Offset is the number of characters of the 802.3 frame read into the
- * look ahead buffer by hcf_service_nic (i.e. the look ahead buffer size minus
- * Control and 802.11 fields)
- * If Offset is less than the maximum value, copying starts from the look ahead buffer till the
- * end of that buffer is reached
- * Then (or if the maximum value is specified for Offset), the
- * message is directly copied from NIC memory to Host memory.
- * If an invalid (i.e. too large) offset is specified, an assert catches but the buffer contents are
- * undefined.
- * Copying stops if either:
- * o the end of the 802.3 frame is reached
- * o the Descriptor with a NULL pointer in the next_desc_addr field is reached
- *
- * When the copying stops, the receiver is ack'ed, thus freeing the NIC memory where the frame is stored
- * As a consequence, hcf_rcv_msg can only be called once for any particular Rx frame.
- *
- * For the time being (PCI Bus mastering not yet supported), only the following fields of each
- * of the descriptors in the descriptor list must be set by the MSF:
- * o buf_cntl.buf_dim[1]
- * o *next_desc_addr
- * o *buf_addr
- * At return from hcf_rcv_msg, the field buf_cntl.buf_dim[0] of the used Descriptors reflects
- * the number of bytes in the buffer corresponding with the Descriptor.
- * On the last used Descriptor, buf_cntl.buf_dim[0] is less or equal to buf_cntl.buf_dim[1].
- * On all preceding Descriptors buf_cntl.buf_dim[0] is equal to buf_cntl.buf_dim[1].
- * On all succeeding (unused) Descriptors, buf_cntl.buf_dim[0] is zero.
- * Note: this I/F is based on the assumptions how the I/F needed for PCI Bus mastering will
- * be, so it may change.
- *
- * The most likely handling of HCF_ERR_NO_NIC by the MSF is to drop the already copied
- * data as elegantly as possible under the constraints and requirements posed by the (N)OS.
- * If no received Frame Structure is pending, "Success" rather than "Read error" is returned.
- * This error constitutes a logic flaw in the MSF
- * The HCF can only catch a minority of this
- * type of errors
- * Based on consistency ideas, the HCF catches none of these errors.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value
- * - there is no unacknowledged Rx-message available
- * - offset is out of range (outside look ahead buffer)
- * - descp is a NULL pointer
- * - any of the descriptors is not double word aligned
- * - reentrancy, may be  caused by calling hcf_functions without adequate protection
- *   against NIC interrupts or multi-threading.
- * - Interrupts are enabled.
- *
- *.DIAGRAM
- *
- *.NOTICE
- * - by using unsigned int as type for offset, no need to worry about negative offsets
- * - Asserting on being enabled/present is superfluous, since a non-zero IFB_lal implies that hcf_service_nic
- *   was called and detected a Rx-message. A zero IFB_lal will set the BUF_CNT field of at least the first
- *   descriptor to zero.
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-int
-hcf_rcv_msg( IFBP ifbp, DESC_STRCT *descp, unsigned int offset )
-{
-       int         rc = HCF_SUCCESS;
-       wci_bufp    cp;                                     //char oriented working pointer
-       hcf_16      i;
-       int         tot_len = ifbp->IFB_RxLen - offset;     //total length
-       wci_bufp    lap = ifbp->IFB_lap + offset;           //start address in LookAhead Buffer
-       hcf_16      lal = ifbp->IFB_lal - offset;           //available data within LookAhead Buffer
-       hcf_16      j;
-
-       HCFLOGENTRY( HCF_TRACE_RCV_MSG, offset );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-       HCFASSERT( descp, HCF_TRACE_RCV_MSG );
-       HCFASSERT( ifbp->IFB_RxLen, HCF_TRACE_RCV_MSG );
-       HCFASSERT( ifbp->IFB_RxLen >= offset, MERGE_2( offset, ifbp->IFB_RxLen ) );
-       HCFASSERT( ifbp->IFB_lal >= offset, offset );
-       HCFASSERT( (ifbp->IFB_CntlOpt & USE_DMA) == 0, 0xDADA );
-
-       if ( tot_len < 0 ) {
-               lal = 0; tot_len = 0;               //suppress all copying activity in the do--while loop
-       }
-       do {                                    //loop over all available fragments
-               // obnoxious hcf.c(1480) : warning C4769: conversion of near pointer to long integer
-               HCFASSERT( ((hcf_32)descp & 3 ) == 0, (hcf_32)descp );
-               cp = descp->buf_addr;
-               j = min( (hcf_16)tot_len, descp->BUF_SIZE );    //minimum of "what's` available" and fragment size
-               descp->BUF_CNT = j;
-               tot_len -= j;                       //adjust length still to go
-               if ( lal ) {                        //if lookahead Buffer not yet completely copied
-                       i = min( lal, j );              //minimum of "what's available" in LookAhead and fragment size
-                       lal -= i;                       //adjust length still available in LookAhead
-                       j -= i;                         //adjust length still available in current fragment
-                       /*;? while loop could be improved by moving words but that is complicated on platforms with
-                        * alignment requirements*/
-                       while ( i-- ) *cp++ = *lap++;
-               }
-               if ( j ) {  //if LookAhead Buffer exhausted but still space in fragment, copy directly from NIC RAM
-                       get_frag( ifbp, cp, j BE_PAR(0) );
-                       CALC_RX_MIC( cp, j );
-               }
-       } while ( ( descp = descp->next_desc_addr ) != NULL );
-#if (HCF_TYPE) & HCF_TYPE_WPA
-       if ( ifbp->IFB_RxFID ) {
-               rc = check_mic( ifbp );             //prevents MIC error report if hcf_service_nic already consumed all
-       }
-#endif // HCF_TYPE_WPA
-       (void)hcf_action( ifbp, HCF_ACT_RX_ACK );       //only 1 shot to get the data, so free the resources in the NIC
-       HCFASSERT( rc == HCF_SUCCESS, rc );
-       HCFLOGEXIT( HCF_TRACE_RCV_MSG );
-       return rc;
-} // hcf_rcv_msg
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_send_msg( IFBP ifbp, DESC_STRCT *descp, hcf_16 tx_cntl )
- *.PURPOSE       Encapsulate a message and append padding and MIC.
- *               non-USB: Transfers the resulting message from Host to NIC and initiates transmission.
- *               USB: Transfer resulting message into a flat buffer.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   descp       pointer to the DescriptorList or NULL
- *   tx_cntl     indicates MAC-port and (Hermes) options
- *                   HFS_TX_CNTL_SPECTRALINK
- *                   HFS_TX_CNTL_PRIO
- *                   HFS_TX_CNTL_TX_OK
- *                   HFS_TX_CNTL_TX_EX
- *                   HFS_TX_CNTL_TX_DELAY
- *                   HFS_TX_CNTL_TX_CONT
- *                   HCF_PORT_0               MAC Port 0 (default)
- *                   HCF_PORT_1 (AP only)     MAC Port 1
- *                   HCF_PORT_2 (AP only)     MAC Port 2
- *                   HCF_PORT_3 (AP only)     MAC Port 3
- *                   HCF_PORT_4 (AP only)     MAC Port 4
- *                   HCF_PORT_5 (AP only)     MAC Port 5
- *                   HCF_PORT_6 (AP only)     MAC Port 6
- *
- *.RETURNS
- *   HCF_SUCCESS
- *   HCF_ERR_DEFUNCT_..
- *   HCF_ERR_TIME_OUT
- *
- *.DESCRIPTION:
- * The Send Message Function embodies 2 functions:
- * o transfers a message (including MAC header) from the provided buffer structure in Host memory to the Transmit
- * Frame Structure (TxFS) in NIC memory.
- * o Issue a send command to the F/W to actually transmit the contents of the TxFS.
- *
- * Control is based on the Resource Indicator IFB_RscInd.
- * The Resource Indicator is maintained by the HCF and should only be interpreted but not changed by the MSF.
- * The MSF must check IFB_RscInd to be non-zero before executing the call to the Send Message Function.
- * When no resources are available, the MSF must handle the queuing of the Transmit frame and check the
- * Resource Indicator periodically after calling hcf_service_nic.
- *
- * The Send Message Functions transfers a message to NIC memory when it is called with a non-NULL descp.
- * Before the Send Message Function is invoked this way, the Resource Indicator (IFB_RscInd) must be checked.
- * If the Resource is not available, Send Message Function execution must be postponed until after processing of
- * a next hcf_service_nic it appears that the Resource has become available.
- * The message is copied from the buffer structure identified by descp to the NIC.
- * Copying stops if a NULL pointer in the next_desc_addr field is reached.
- * Hcf_send_msg does not check for transmit buffer overflow, because the F/W does this protection.
- * In case of a transmit buffer overflow, the surplus which does not fit in the buffer is simply dropped.
- *
- * The Send Message Function activates the F/W to actually send the message to the medium when the
- * HFS_TX_CNTL_TX_DELAY bit of the tx_cntl parameter is not set.
- * If the descp parameter of the current call is non-NULL, the message as represented by descp is send.
- * If the descp parameter of the current call is NULL, and if the preceding call of the Send Message Function had
- * a non-NULL descp and the preceding call had the HFS_TX_CNTL_TX_DELAY bit of tx_cntl set, then the message as
- * represented by the descp of the preceding call is send.
- *
- * Hcf_send_msg supports encapsulation (see HCF_ENCAP) of Ethernet-II frames.
- * An Ethernet-II frame is transferred to the Transmit Frame structure as an 802.3 frame.
- * Hcf_send_msg distinguishes between an 802.3 and an Ethernet-II frame by looking at the data length/type field
- * of the frame. If this field contains a value larger than 1514, the frame is considered to be an Ethernet-II
- * frame, otherwise it is treated as an 802.3 frame.
- * To ease implementation of the HCF, this type/type field must be located in the first descriptor structure,
- * i.e. the 1st fragment must have a size of at least 14 (to contain DestAddr, SrcAddr and Len/Type field).
- * An Ethernet-II frame is encapsulated by inserting a SNAP header between the addressing information and the
- * type field.  This insertion is transparent for the MSF.
- * The HCF contains a fixed table that stores a number of types. If the value specified by the type/type field
- * occurs in this table, Bridge Tunnel Encapsulation is used, otherwise RFC1042 encapsulation is used.
- * Bridge Tunnel uses    AA AA 03 00 00 F8 as SNAP header,
- * RFC1042 uses  AA AA 03 00 00 00 as SNAP header.
- * The table currently contains:
- * 0 0x80F3  AppleTalk Address Resolution Protocol (AARP)
- * 0 0x8137  IPX
- *
- * The algorithm to distinguish between 802.3 and Ethernet-II frames limits the maximum length for frames of
- * 802.3 frames to 1514 bytes.
- * Encapsulation can be suppressed by means of the system constant HCF_ENCAP, e.g. to support proprietary
- * protocols with 802.3 like frames with a size larger than 1514 bytes.
- *
- * In case the HCF encapsulates the frame, the number of bytes that is actually transmitted is determined by the
- * cumulative value of the buf_cntl.buf_dim[0] fields.
- * In case the HCF does not encapsulate the frame, the number of bytes that is actually transmitted is not
- * determined by the cumulative value of the buf_cntl.buf_dim[DESC_CNTL_CNT] fields of the desc_strct's but by
- * the Length field of the 802.3 frame.
- * If there is a conflict between the cumulative value of the buf_cntl.buf_dim[0] fields and the
- * 802.3 Length field the 802.3 Length field determines the number of bytes actually transmitted by the NIC while
- * the cumulative value of the buf_cntl.buf_dim[0] fields determines the position of the MIC, hence a mismatch
- * will result in MIC errors on the Receiving side.
- * Currently this problem is flagged on the Transmit side by an Assert.
- * The following fields of each of the descriptors in the descriptor list must be set by the MSF:
- * o buf_cntl.buf_dim[0]
- * o *next_desc_addr
- * o *buf_addr
- *
- * All bits of the tx_cntl parameter except HFS_TX_CNTL_TX_DELAY and the HCF_PORT# bits are passed to the F/W via
- * the HFS_TX_CNTL field of the TxFS.
- *
- * Note that hcf_send_msg does not detect NIC absence.  The MSF is supposed to have its own -platform dependent-
- * way to recognize card removal/insertion.
- * The total system must be robust against card removal and there is no principal difference between card removal
- * just after hcf_send_msg returns but before the actual transmission took place or sometime earlier.
- *
- * Assert fails if
- * - ifbp has a recognizable out-of-range value
- * - descp is a NULL pointer
- * - no resources for PIF available.
- * - Interrupts are enabled.
- * - reentrancy, may be  caused by calling hcf_functions without adequate protection
- *   against NIC interrupts or multi-threading.
- *
- *.DIAGRAM
- *4: for the normal case (i.e. no HFS_TX_CNTL_TX_DELAY option active), a fid is acquired via the
- *   routine get_fid.  If no FID is acquired, the remainder is skipped without an error notification.  After
- *   all, the MSF is not supposed to call hcf_send_msg when no Resource is available.
- *7: The ControlField of the TxFS is written.  Since put_frag can only return the fatal Defunct or "No NIC", the
- *   return status can be ignored because when it fails, cmd_wait will fail as well.  (see also the note on the
- *   need for a return code below).
- *   Note that HFS_TX_CNTL has different values for H-I, H-I/WPA and H-II and HFS_ADDR_DEST has different
- *   values for H-I (regardless of WPA) and H-II.
- *   By writing 17, 1 or 2 ( implying 16, 0 or 1 garbage word after HFS_TX_CNTL) the BAP just gets to
- *   HFS_ADDR_DEST for H-I, H-I/WPA and H-II respectively.
- *10: if neither encapsulation nor MIC calculation is needed, splitting the first fragment in two does not
- *   really help but it makes the flow easier to follow to do not optimize on this difference
- *
- *   hcf_send_msg checks whether the frame is an Ethernet-II rather than an "official" 802.3 frame.
- *   The E-II check is based on the length/type field in the MAC header. If this field has a value larger than
- *   1500, E-II is assumed. The implementation of this test fails if the length/type field is not in the first
- *   descriptor.  If E-II is recognized, a SNAP header is inserted. This SNAP header represents either RFC1042
- *   or Bridge-Tunnel encapsulation, depending on the return status of the support routine hcf_encap.
- *
- *.NOTICE
- *   hcf_send_msg leaves the responsibility to only send messages on enabled ports at the MSF level.
- *   This is considered the strategy which is sufficiently adequate for all "robust" MSFs, have the least
- *   processor utilization and being still acceptable robust at the WCI !!!!!
- *
- *   hcf_send_msg does not NEED a return value to report NIC absence or removal during the execution of
- *   hcf_send_msg(), because the MSF and higher layers must be able to cope anyway with the NIC being removed
- *   after a successful completion of hcf_send_msg() but before the actual transmission took place.
- *   To accommodate user expectations the current implementation does report NIC absence.
- *   Defunct blocks all NIC access and will (also) be reported on a number of other calls.
- *
- *   hcf_send_msg does not check for transmit buffer overflow because the Hermes does this protection.
- *   In case of a transmit buffer overflow, the surplus which does not fit in the buffer is simply dropped.
- *   Note that this possibly results in the transmission of incomplete frames.
- *
- *   After some deliberation with F/W team, it is decided that - being in the twilight zone of not knowing
- *   whether the problem at hand is an MSF bug, HCF buf, F/W bug, H/W malfunction or even something else - there
- *   is no "best thing to do" in case of a failing send, hence the HCF considers the TxFID ownership to be taken
- *   over by the F/W and hopes for an Allocate event in due time
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-int
-hcf_send_msg( IFBP ifbp, DESC_STRCT *descp, hcf_16 tx_cntl )
-{
-       int         rc = HCF_SUCCESS;
-       DESC_STRCT  *p /* = descp*/;        //working pointer
-       hcf_16      len;                    // total byte count
-       hcf_16      i;
-
-       hcf_16      fid = 0;
-
-       HCFASSERT( ifbp->IFB_RscInd || descp == NULL, ifbp->IFB_RscInd );
-       HCFASSERT( (ifbp->IFB_CntlOpt & USE_DMA) == 0, 0xDADB );
-
-       HCFLOGENTRY( HCF_TRACE_SEND_MSG, tx_cntl );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-       /* obnoxious c:/hcf/hcf.c(1480) : warning C4769: conversion of near pointer to long integer,
-        * so skip */
-       HCFASSERT( ((hcf_32)descp & 3 ) == 0, (hcf_32)descp );
-#if HCF_ASSERT
-       {   int x = ifbp->IFB_FWIdentity.comp_id == COMP_ID_FW_AP ? tx_cntl & ~HFS_TX_CNTL_PORT : tx_cntl;
-               HCFASSERT( (x & ~HCF_TX_CNTL_MASK ) == 0, tx_cntl );
-       }
-#endif // HCF_ASSERT
-
-       if ( descp ) ifbp->IFB_TxFID = 0;               //cancel a pre-put message
-
-       /* the following initialization code is redundant for a pre-put message
-        * but moving it inside the "if fid" logic makes the merging with the
-        * USB flow awkward
-        */
-#if (HCF_TYPE) & HCF_TYPE_WPA
-       tx_cntl |= ifbp->IFB_MICTxCntl;
-#endif // HCF_TYPE_WPA
-       fid = ifbp->IFB_TxFID;
-       if (fid == 0 && ( fid = get_fid( ifbp ) ) != 0 )        /* 4 */
-               /* skip the next compound statement if:
-                  - pre-put message or
-                  - no fid available (which should never occur if the MSF adheres to the WCI)
-               */
-       {       // to match the closing curly bracket of above "if" in case of HCF_TYPE_USB
-                                               //calculate total length ;? superfluous unless CCX or Encapsulation
-               len = 0;
-               p = descp;
-               do len += p->BUF_CNT; while ( ( p = p->next_desc_addr ) != NULL );
-               p = descp;
-//;?           HCFASSERT( len <= HCF_MAX_MSG, len );
-       /*7*/   (void)setup_bap( ifbp, fid, HFS_TX_CNTL, IO_OUT );
-#if (HCF_TYPE) & HCF_TYPE_TX_DELAY
-               HCFASSERT( ( descp != NULL ) ^ ( tx_cntl & HFS_TX_CNTL_TX_DELAY ), tx_cntl );
-               if ( tx_cntl & HFS_TX_CNTL_TX_DELAY ) {
-                       tx_cntl &= ~HFS_TX_CNTL_TX_DELAY;       //!!HFS_TX_CNTL_TX_DELAY no longer available
-                       ifbp->IFB_TxFID = fid;
-                       fid = 0;                                //!!fid no longer available, be careful when modifying code
-               }
-#endif // HCF_TYPE_TX_DELAY
-               OPW( HREG_DATA_1, tx_cntl ) ;
-               OPW( HREG_DATA_1, 0 );
-
-               HCFASSERT( p->BUF_CNT >= 14, p->BUF_CNT );
-                                               /* assume DestAddr/SrcAddr/Len/Type ALWAYS contained in 1st fragment
-                                                * otherwise life gets too cumbersome for MIC and Encapsulation !!!!!!!!
-                if ( p->BUF_CNT >= 14 ) {   alternatively: add a safety escape !!!!!!!!!!!! }   */
-
-               CALC_TX_MIC( NULL, -1 );        //initialize MIC
-       /*10*/  put_frag( ifbp, p->buf_addr, HCF_DASA_SIZE BE_PAR(0) ); //write DA, SA with MIC calculation
-               CALC_TX_MIC( p->buf_addr, HCF_DASA_SIZE );      //MIC over DA, SA
-               CALC_TX_MIC( null_addr, 4 );        //MIC over (virtual) priority field
-
-                                               //if encapsulation needed
-#if (HCF_ENCAP) == HCF_ENC
-                                               //write length (with SNAP-header,Type, without //DA,SA,Length ) no MIC calc.
-               if ( ( snap_header[sizeof(snap_header)-1] = hcf_encap( &p->buf_addr[HCF_DASA_SIZE] ) ) != ENC_NONE ) {
-                       OPW( HREG_DATA_1, CNV_END_SHORT( len + (sizeof(snap_header) + 2) - ( 2*6 + 2 ) ) );
-                                               //write splice with MIC calculation
-                       put_frag( ifbp, snap_header, sizeof(snap_header) BE_PAR(0) );
-                       CALC_TX_MIC( snap_header, sizeof(snap_header) );    //MIC over 6 byte SNAP
-                       i = HCF_DASA_SIZE;
-               } else
-#endif // HCF_ENC
-               {
-                       OPW( HREG_DATA_1, *(wci_recordp)&p->buf_addr[HCF_DASA_SIZE] );
-                       i = 14;
-               }
-                                               //complete 1st fragment starting with Type with MIC calculation
-               put_frag( ifbp, &p->buf_addr[i], p->BUF_CNT - i BE_PAR(0) );
-               CALC_TX_MIC( &p->buf_addr[i], p->BUF_CNT - i );
-
-                                               //do the remaining fragments with MIC calculation
-               while ( ( p = p->next_desc_addr ) != NULL ) {
-                       /* obnoxious c:/hcf/hcf.c(1480) : warning C4769: conversion of near pointer to long integer,
-                        * so skip */
-                       HCFASSERT( ((hcf_32)p & 3 ) == 0, (hcf_32)p );
-                       put_frag( ifbp, p->buf_addr, p->BUF_CNT BE_PAR(0) );
-                       CALC_TX_MIC( p->buf_addr, p->BUF_CNT );
-               }
-                                               //pad message, finalize MIC calculation and write MIC to NIC
-               put_frag_finalize( ifbp );
-       }
-       if ( fid ) {
-       /*16*/  rc = cmd_exe( ifbp, HCMD_BUSY | HCMD_TX | HCMD_RECL, fid );
-               ifbp->IFB_TxFID = 0;
-               /* probably this (i.e. no RscInd AND "HREG_EV_ALLOC") at this point in time occurs so infrequent,
-                * that it might just as well be acceptable to skip this
-                * "optimization" code and handle that additional interrupt once in a while
-                */
-// 180 degree error in logic ;? #if ALLOC_15
-       /*20*/  if ( ifbp->IFB_RscInd == 0 ) {
-                       ifbp->IFB_RscInd = get_fid( ifbp );
-               }
-// #endif // ALLOC_15
-       }
-//     HCFASSERT( level::ifbp->IFB_RscInd, ifbp->IFB_RscInd );
-       HCFLOGEXIT( HCF_TRACE_SEND_MSG );
-       return rc;
-} // hcf_send_msg
-
-
-/************************************************************************************************************
- *
- *.MODULE        int hcf_service_nic( IFBP ifbp, wci_bufp bufp, unsigned int len )
- *.PURPOSE       Services (most) NIC events.
- *               Provides received message
- *               Provides status information.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *  In non-DMA mode:
- *   bufp        address of char buffer, sufficiently large to hold the first part of the RxFS up through HFS_TYPE
- *   len         length in bytes of buffer specified by bufp
- *               value between HFS_TYPE + 2 and HFS_ADDR_DEST + HCF_MAX_MSG
- *
- *.RETURNS
- *   HCF_SUCCESS
- *   HCF_ERR_MIC message contains an erroneous MIC (only if frame fits completely in bufp)
- *
- *.DESCRIPTION
- *
- * MSF-accessible fields of Result Block
- * - IFB_RxLen           0 or Frame size.
- * - IFB_MBInfoLen       0 or the L-field of the oldest MBIB.
- * - IFB_RscInd
- * - IFB_HCF_Tallies     updated if a corresponding event occurred.
- * - IFB_NIC_Tallies     updated if a Tally Info frame received from the NIC.
- * - IFB_DmaPackets
- * - IFB_TxFsStat
- * - IFB_TxFsSwSup
- * - IFB_LinkStat        reflects new link status or 0x0000 if no change relative to previous hcf_service_nic call.
-or
-* - IFB_LinkStat        link status, 0x8000 reflects change relative to previous hcf_service_nic call.
-*
-* When IFB_MBInfoLen is non-zero, at least one MBIB is available.
-*
-* IFB_RxLen reflects the number of received bytes in 802.3 view (Including DestAddr, SrcAddr and Length,
-* excluding MIC-padding, MIC and sum check) of active Rx Frame Structure. If no Rx Data s available, IFB_RxLen
-* equals 0x0000.
-* Repeated execution causes the Service NIC Function to provide information about subsequently received
-* messages, irrespective whether a hcf_rcv_msg or hcf_action(HCF_ACT_RX) is performed in between.
-*
-* When IFB_RxLen is non-zero, a Received Frame Structure is available to be routed to the protocol stack.
-* When Monitor Mode is not active, this is guaranteed to be an error-free non-WMP frame.
-* In case of Monitor Mode, it may also be a frame with an error or a WMP frame.
-* Erroneous frames have a non-zero error-sub field in the HFS_STAT field in the look ahead buffer.
-*
-* If a Receive message is available in NIC RAM, the Receive Frame Structure is (partly) copied from the NIC to
-* the buffer identified by bufp.
-* Copying stops either after len bytes or when the complete 802.3 frame is copied.
-* During the copying the message is decapsulated (if appropriate).
-* If the frame is read completely by hcf_service_nic (i.e. the frame fits completely in the lookahead buffer),
-* the frame is automatically ACK'ed to the F/W and still available via the look ahead buffer and hcf_rcv_msg.
-* Only if the frame is read completely by hcf_service_nic, hcf_service_nic checks the MIC and sets the return
-* status accordingly.  In this case, hcf_rcv_msg does not check the MIC.
-*
-* The MIC calculation algorithm works more efficient if the length of the look ahead buffer is
-* such that it fits exactly 4 n bytes of the 802.3 frame, i.e. len == HFS_ADDR_DEST + 4*n.
-*
-* The Service NIC Function supports the NIC event service handling process.
-* It performs the appropriate actions to service the NIC, such that the event cause is eliminated and related
-* information is saved.
-* The Service NIC Function is executed by the MSF ISR or polling routine as first step to determine the event
-* cause(s).  It is the responsibility of the MSF to perform all not directly NIC related interrupt service
-* actions, e.g. in a PC environment this includes servicing the PIC, and managing the Processor Interrupt
-* Enabling/Disabling.
-* In case of a polled based system, the Service NIC Function must be executed "frequently".
-* The Service NIC Function may have side effects related to the Mailbox and Resource Indicator (IFB_RscInd).
-*
-* hcf_service_nic returns:
-* - The length of the data in the available MBIB (IFB_MBInfoLen)
-* - Changes in the link status (IFB_LinkStat)
-* - The length of the data in the available Receive Frame Structure (IFB_RxLen)
-* - updated IFB_RscInd
-* - Updated Tallies
-*
-* hcf_service_nic is presumed to neither interrupt other HCF-tasks nor to be interrupted by other HCF-tasks.
-* A way to achieve this is to precede hcf_service_nic as well as all other HCF-tasks with a call to
-* hcf_action to disable the card interrupts and, after all work is completed, with a call to hcf_action to
-* restore (which is not necessarily the same as enabling) the card interrupts.
-* In case of a polled environment, it is assumed that the MSF programmer is sufficiently familiar with the
-* specific requirements of that environment to translate the interrupt strategy to a polled strategy.
-*
-* hcf_service_nic services the following Hermes events:
-* - HREG_EV_INFO        Asynchronous Information Frame
-* - HREG_EV_INFO_DROP   WMAC did not have sufficient RAM to build Unsolicited Information Frame
-* - HREG_EV_TX_EXC      (if applicable, i.e. selected via HCF_EXT_INT_TX_EX bit of HCF_EXT)
-* - HREG_EV_SLEEP_REQ   (if applicable, i.e. selected via HCF_DDS/HCF_CDS bit of HCF_SLEEP)
-* ** in non_DMA mode
-* - HREG_EV_ALLOC       Asynchronous part of Allocation/Reclaim completed while out of resources at
-*                       completion of hcf_send_msg/notify
-* - HREG_EV_RX          the detection of the availability of received messages
-*                       including WaveLAN Management Protocol (WMP) message processing
-* ** in DMA mode
-* - HREG_EV_RDMAD
-* - HREG_EV_TDMAD
-*!! hcf_service_nic does not service the following Hermes events:
-*!!     HREG_EV_TX          (the "OK" Tx Event) is no longer supported by the WCI, if it occurs it is unclear
-*!!                         what the cause is, so no meaningful strategy is available. Not acking the bit is
-*!!                         probably the best help that can be given to the debugger.
-*!!     HREG_EV_CMD         handled in cmd_wait.
-*!!     HREG_EV_FW_DMA      (i.e. HREG_EV_RXDMA, HREG_EV_TXDMA and_EV_LPESC) are either not used or used
-*!!                         between the F/W and the DMA engine.
-*!!     HREG_EV_ACK_REG_READY is only applicable for H-II (i.e. not HII.5 and up, see DAWA)
-*
-*   If, in non-DMA mode, a Rx message is available, its length is reflected by the IFB_RxLen field of the IFB.
-*   This length reflects the data itself and the Destination Address, Source Address and DataLength/Type field
-*   but not the SNAP-header in case of decapsulation by the HCF.  If no message is available, IFB_RxLen is
-*   zero.  Former versions of the HCF handled WMP messages and supported a "monitor" mode in hcf_service_nic,
-*   which deposited certain or all Rx messages in the MailBox. The responsibility to handle these frames is
-*   moved to the MSF. The HCF offers as supports hcf_put_info with CFG_MB_INFO as parameter to emulate the old
-*   implementation under control of the MSF.
-*
-* **Rx Buffer free strategy
-*   When hcf_service_nic reports the availability of a non-DMA message, the MSF can access that message by
-*   means of hcf_rcv_msg. It must be prevented that the LAN Controller writes new data in the NIC buffer
-*   before the MSF is finished with the current message. The NIC buffer is returned to the LAN Controller
-*   when:
-*    - the complete frame fits in the lookahead buffer or
-*    - hcf_rcv_msg is called or
-*    - hcf_action with HCF_ACT_RX is called or
-*    - hcf_service_nic is called again
-*   It can be reasoned that hcf_action( INT_ON ) should not be given before the MSF has completely processed
-*   a reported Rx-frame. The reason is that the INT_ON action is guaranteed to cause a (Rx-)interrupt (the
-*   MSF is processing a Rx-frame, hence the Rx-event bit in the Hermes register must be active). This
-*   interrupt will cause hcf_service_nic to be called, which will cause the ack-ing of the "last" Rx-event
-*   to the Hermes, causing the Hermes to discard the associated NIC RAM buffer.
-* Assert fails if
-* - ifbp is zero or other recognizable out-of-range value.
-* - hcf_service_nic is called without a prior call to hcf_connect.
-* - interrupts are enabled.
-* - reentrancy, may be  caused by calling hcf_functions without adequate protection
-*   against NIC interrupts or multi-threading.
-*
-*
-*.DIAGRAM
-*1: IFB_LinkStat is cleared, if a LinkStatus frame is received, IFB_LinkStat will be updated accordingly
-*   by isr_info.
-or
-*1: IFB_LinkStat change indication is cleared. If a LinkStatus frame is received, IFB_LinkStat will be updated
-*   accordingly by isr_info.
-*2: IFB_RxLen must be cleared before the NIC presence check otherwise:
-*    -  this value may stay non-zero if the NIC is pulled out at an inconvenient moment.
-*    -  the RxAck on a zero-FID needs a zero-value for IFB_RxLen to work
-*    Note that as side-effect of the hcf_action call, the remainder of Rx related info is re-initialized as
-*    well.
-*4: In case of Defunct mode, the information supplied by Hermes is unreliable, so the body of
-*   hcf_service_nic is skipped. Since hcf_cntl turns into a NOP if Primary or Station F/W is incompatible,
-*   hcf_service_nic is also skipped in those cases.
-*   To prevent that hcf_service_nic reports bogus information to the MSF with all - possibly difficult to
-*   debug - undesirable side effects, it is paramount to check the NIC presence. In former days the presence
-*   test was based on the Hermes register HREG_SW_0. Since in HCF_ACT_INT_OFF is chosen for strategy based on
-*   HREG_EV_STAT, this is now also used in hcf_service_nic. The motivation to change strategy is partly
-*   due to inconsistent F/W implementations with respect to HREG_SW_0 manipulation around reset and download.
-*   Note that in polled environments Card Removal is not detected by INT_OFF which makes the check in
-*   hcf_service_nic even more important.
-*8: The event status register of the Hermes is sampled
-*   The assert checks for unexpected events ;?????????????????????????????????????.
-*    - HREG_EV_INFO_DROP is explicitly excluded from the acceptable HREG_EV_STAT bits because it indicates
-*      a too heavily loaded system.
-*    - HREG_EV_ACK_REG_READY is 0x0000 for H-I (and hopefully H-II.5)
-*
-*
-*   HREG_EV_TX_EXC is accepted (via HREG_EV_TX_EXT) if and only if HCF_EXT_INT_TX_EX set in the HCF_EXT
-*   definition at compile time.
-*   The following activities are handled:
-*    -  Alloc events are handled by hcf_send_msg (and notify). Only if there is no "spare" resource, the
-*       alloc event is superficially serviced by hcf_service_nic to create a pseudo-resource with value
-*       0x001. This value is recognized by get_fid (called by hcf_send_msg and notify) where the real
-*       TxFid is retrieved and the Hermes is acked and - hopefully - the "normal" case with a spare TxFid
-*       in IFB_RscInd is restored.
-*    -  Info drop events are handled by incrementing a tally
-*    -  LinkEvent (including solicited and unsolicited tallies) are handled by procedure isr_info.
-*   -   TxEx (if selected at compile time) is handled by copying the significant part of the TxFS
-*       into the IFB for further processing by the MSF.
-*       Note the complication of the zero-FID protection sub-scheme in DAWA.
-*   Note, the Ack of all of above events is handled at the end of hcf_service_nic
-*16: In case of  non-DMA ( either not compiled in or due to a run-time choice):
-*   If an Rx-frame is available, first the FID of that frame is read, including the complication of the
-*   zero-FID protection sub-scheme in DAWA. Note that such a zero-FID is acknowledged at the end of
-*   hcf_service_nic and that this depends on the IFB_RxLen initialization in the begin of hcf_service_nic.
-*   The Assert validates the HCF assumption about Hermes implementation upon which the range of
-*   Pseudo-RIDs is based.
-*   Then the control fields up to the start of the 802.3 frame are read from the NIC into the lookahead buffer.
-*   The status field is converted to native Endianness.
-*   The length is, after implicit Endianness conversion if needed, and adjustment for the 14 bytes of the
-*   802.3 MAC header, stored in IFB_RxLen.
-*   In MAC Monitor mode, 802.11 control frames with a TOTAL length of 14 are received, so without this
-*   length adjustment, IFB_RxLen could not be used to distinguish these frames from "no frame".
-*   No MIC calculation processes are associated with the reading of these Control fields.
-*26: This length test feels like superfluous robustness against malformed frames, but it turned out to be
-*   needed in the real (hostile) world.
-*   The decapsulation check needs sufficient data to represent DA, SA, L, SNAP and Type which amounts to
-*   22 bytes. In MAC Monitor mode, 802.11 control frames with a smaller length are received. To prevent
-*   that the implementation goes haywire, a check on the length is needed.
-*   The actual decapsulation takes place on the fly in the copying process by overwriting the SNAP header.
-*   Note that in case of decapsulation the SNAP header is not passed to the MSF, hence IFB_RxLen must be
-*   compensated for the SNAP header length.
-*   The 22 bytes needed for decapsulation are (more than) sufficient for the exceptional handling of the
-*   MIC algorithm of the L-field (replacing the 2 byte L-field with 4 0x00 bytes).
-*30: The 12 in the no-WPA branch corresponds with the get_frag, the 2 with the IPW of the WPA branch
-*32: If Hermes reported MIC-presence, than the MIC engine is initialized with the non-dummy MIC calculation
-*   routine address and appropriate key.
-*34: The 8 bytes after the DA, SA, L are read and it is checked whether decapsulation is needed i.e.:
-*     - the Hermes reported Tunnel encapsulation or
-*     - the Hermes reported 1042 Encapsulation and hcf_encap reports that the HCF would not have used
-*       1042 as the encapsulation mechanism
-*   Note that the first field of the RxFS in bufp has Native Endianness due to the conversion done by the
-*   BE_PAR in get_frag.
-*36: The Type field is the only word kept (after moving) of the just read 8 bytes, it is moved to the
-*   L-field.  The original L-field and 6 byte SNAP header are discarded, so IFB_RxLen and buf_addr must
-*   be adjusted by 8.
-*40: Determine how much of the frame (starting with DA) fits in the Lookahead buffer, then read the not-yet
-*   read data into the lookahead buffer.
-*   If the lookahead buffer contains the complete message, check the MIC. The majority considered this
-*   I/F more appropriate then have the MSF call hcf_get_data only to check the MIC.
-*44: Since the complete message is copied from NIC RAM to PC RAM, the Rx can be acknowledged to the Hermes
-*   to optimize the flow ( a better chance to get new Rx data in the next pass through hcf_service_nic ).
-*   This acknowledgement can not be done via hcf_action( HCF_ACT_RX_ACK ) because this also clears
-*   IFB_RxLEN thus corrupting the I/F to the MSF.
-*;?: In case of DMA (compiled in and activated):
-
-
-*54: Limiting the number of places where the F/W is acked (e.g. the merging of the Rx-ACK with the other
-*   ACKs), is supposed to diminish the potential of race conditions in the F/W.
-*   Note 1: The CMD event is acknowledged in cmd_cmpl
-*   Note 2: HREG_EV_ACK_REG_READY is 0x0000 for H-I (and hopefully H-II.5)
-*   Note 3: The ALLOC event is acknowledged in get_fid (except for the initialization flow)
-*
-*.NOTICE
-* The Non-DMA HREG_EV_RX is handled different compared with the other F/W events.
-* The HREG_EV_RX event is acknowledged by the first hcf_service_nic call after the
-* hcf_service_nic call that reported the occurrence of this event.
-* This acknowledgment
-* makes the next Receive Frame Structure (if any) available.
-* An updated IFB_RxLen
-* field reflects this availability.
-*
-*.NOTICE
-* The minimum size for Len must supply space for:
-* - an F/W dependent number of bytes of Control Info field including the 802.11 Header field
-* - Destination Address
-* - Source Address
-* - Length field
-* - [ SNAP Header]
-* - [ Ethernet-II Type]
-* This results in 68 for Hermes-I and 80 for Hermes-II
-* This way the minimum amount of information is available needed by the HCF to determine whether the frame
-* must be decapsulated.
-*.ENDDOC                END DOCUMENTATION
-*
-************************************************************************************************************/
-int
-hcf_service_nic( IFBP ifbp, wci_bufp bufp, unsigned int len )
-{
-
-       int         rc = HCF_SUCCESS;
-       hcf_16      stat;
-       wci_bufp    buf_addr;
-       hcf_16      i;
-
-       HCFLOGENTRY( HCF_TRACE_SERVICE_NIC, ifbp->IFB_IntOffCnt );
-       HCFASSERT( ifbp->IFB_Magic == HCF_MAGIC, ifbp->IFB_Magic );
-       HCFASSERT_INT;
-
-       ifbp->IFB_LinkStat = 0; // ;? to be obsoleted ASAP                                              /* 1*/
-       ifbp->IFB_DSLinkStat &= ~CFG_LINK_STAT_CHANGE;                                                  /* 1*/
-       (void)hcf_action( ifbp, HCF_ACT_RX_ACK );                                                       /* 2*/
-       if ( ifbp->IFB_CardStat == 0 && ( stat = IPW( HREG_EV_STAT ) ) != 0xFFFF ) {                    /* 4*/
-/*             IF_NOT_DMA( HCFASSERT( !( stat & ~HREG_EV_BASIC_MASK, stat ) )
- *             IF_NOT_USE_DMA( HCFASSERT( !( stat & ~HREG_EV_BASIC_MASK, stat ) )
- *             IF_USE_DMA( HCFASSERT( !( stat & ~( HREG_EV_BASIC_MASK ^ ( HREG_EV_...DMA.... ), stat ) )
- */
-                                                                                                       /* 8*/
-               if ( ifbp->IFB_RscInd == 0 && stat & HREG_EV_ALLOC ) { //Note: IFB_RscInd is ALWAYS 1 for DMA
-                       ifbp->IFB_RscInd = 1;
-               }
-               IF_TALLY( if ( stat & HREG_EV_INFO_DROP ) { ifbp->IFB_HCF_Tallies.NoBufInfo++; } );
-#if (HCF_EXT) & HCF_EXT_INT_TICK
-               if ( stat & HREG_EV_TICK ) {
-                       ifbp->IFB_TickCnt++;
-               }
-#if 0 // (HCF_SLEEP) & HCF_DDS
-               if ( ifbp->IFB_TickCnt == 3 && ( ifbp->IFB_DSLinkStat & CFG_LINK_STAT_CONNECTED ) == 0 ) {
-                       CFG_DDS_TICK_TIME_STRCT ltv;
-                       // 2 second period (with 1 tick uncertanty) in not-connected mode -->go into DS_OOR
-                       hcf_action( ifbp, HCF_ACT_SLEEP );
-                       ifbp->IFB_DSLinkStat |= CFG_LINK_STAT_DS_OOR; //set OutOfRange
-                       ltv.len = 2;
-                       ltv.typ = CFG_DDS_TICK_TIME;
-                       ltv.tick_time = ( ( ifbp->IFB_DSLinkStat & CFG_LINK_STAT_TIMER ) + 0x10 ) *64; //78 is more right
-                       hcf_put_info( ifbp, (LTVP)&ltv );
-                       printk(KERN_NOTICE "Preparing for sleep, link_status: %04X, timer : %d\n",
-                               ifbp->IFB_DSLinkStat, ltv.tick_time );//;?remove me 1 day
-                       ifbp->IFB_TickCnt++; //;?just to make sure we do not keep on printing above message
-                       if ( ltv.tick_time < 300 * 125 ) ifbp->IFB_DSLinkStat += 0x0010;
-
-               }
-#endif // HCF_DDS
-#endif // HCF_EXT_INT_TICK
-               if ( stat & HREG_EV_INFO ) {
-                       isr_info( ifbp );
-               }
-#if (HCF_EXT) & HCF_EXT_INT_TX_EX
-               if ( stat & HREG_EV_TX_EXT && ( i = IPW( HREG_TX_COMPL_FID ) ) != 0 /*DAWA*/ ) {
-                       DAWA_ZERO_FID( HREG_TX_COMPL_FID );
-                       (void)setup_bap( ifbp, i, 0, IO_IN );
-                       get_frag( ifbp, &ifbp->IFB_TxFsStat, HFS_SWSUP BE_PAR(1) );
-               }
-#endif // HCF_EXT_INT_TX_EX
-//!rlav DMA engine will handle the rx event, not the driver
-#if HCF_DMA
-               if ( !( ifbp->IFB_CntlOpt & USE_DMA ) ) //!! be aware of the logical indentations
-#endif // HCF_DMA
-               /*16*/  if ( stat & HREG_EV_RX && ( ifbp->IFB_RxFID = IPW( HREG_RX_FID ) ) != 0 ) { //if 0 then DAWA_ACK
-                               HCFASSERT( bufp, len );
-                               HCFASSERT( len >= HFS_DAT + 2, len );
-                               DAWA_ZERO_FID( HREG_RX_FID );
-                               HCFASSERT( ifbp->IFB_RxFID < CFG_PROD_DATA, ifbp->IFB_RxFID);
-                               (void)setup_bap( ifbp, ifbp->IFB_RxFID, 0, IO_IN );
-                               get_frag( ifbp, bufp, HFS_ADDR_DEST BE_PAR(1) );
-                               ifbp->IFB_lap = buf_addr = bufp + HFS_ADDR_DEST;
-                               ifbp->IFB_RxLen = (hcf_16)(bufp[HFS_DAT_LEN] + (bufp[HFS_DAT_LEN+1]<<8) + 2*6 + 2);
-                       /*26*/  if ( ifbp->IFB_RxLen >= 22 ) {  // convenient for MIC calculation (5 DWs + 1 "skipped" W)
-                                                               //.  get DA,SA,Len/Type and (SNAP,Type or 8 data bytes)
-                               /*30*/  get_frag( ifbp, buf_addr, 22 BE_PAR(0) );
-                               /*32*/  CALC_RX_MIC( bufp, -1 );        //.  initialize MIC
-                                       CALC_RX_MIC( buf_addr, HCF_DASA_SIZE ); //.  MIC over DA, SA
-                                       CALC_RX_MIC( null_addr, 4 );    //.  MIC over (virtual) priority field
-                                       CALC_RX_MIC( buf_addr+14, 8 );  //.  skip Len, MIC over SNAP,Type or 8 data bytes)
-                                       buf_addr += 22;
-#if (HCF_ENCAP) == HCF_ENC
-                                       HCFASSERT( len >= HFS_DAT + 2 + sizeof(snap_header), len );
-                               /*34*/  i = *(wci_recordp)&bufp[HFS_STAT] & ( HFS_STAT_MSG_TYPE | HFS_STAT_ERR );
-                                       if ( i == HFS_STAT_TUNNEL ||
-                                            ( i == HFS_STAT_1042 && hcf_encap( (wci_bufp)&bufp[HFS_TYPE] ) != ENC_TUNNEL ) ) {
-                                                                       //.  copy E-II Type to 802.3 LEN field
-                               /*36*/  bufp[HFS_LEN  ] = bufp[HFS_TYPE  ];
-                                               bufp[HFS_LEN+1] = bufp[HFS_TYPE+1];
-                                                                       //.  discard Snap by overwriting with data
-                                               ifbp->IFB_RxLen -= (HFS_TYPE - HFS_LEN);
-                                               buf_addr -= ( HFS_TYPE - HFS_LEN ); // this happens to bring us at a DW boundary of 36
-                                       }
-#endif // HCF_ENC
-                               }
-                       /*40*/  ifbp->IFB_lal = min( (hcf_16)(len - HFS_ADDR_DEST), ifbp->IFB_RxLen );
-                               i = ifbp->IFB_lal - ( buf_addr - ( bufp + HFS_ADDR_DEST ) );
-                               get_frag( ifbp, buf_addr, i BE_PAR(0) );
-                               CALC_RX_MIC( buf_addr, i );
-#if (HCF_TYPE) & HCF_TYPE_WPA
-                               if ( ifbp->IFB_lal == ifbp->IFB_RxLen ) {
-                                       rc = check_mic( ifbp );
-                               }
-#endif // HCF_TYPE_WPA
-                       /*44*/  if ( len - HFS_ADDR_DEST >= ifbp->IFB_RxLen ) {
-                                       ifbp->IFB_RxFID = 0;
-                               } else { /* IFB_RxFID is cleared, so  you do not get another Rx_Ack at next entry of hcf_service_nic */
-                                       stat &= (hcf_16)~HREG_EV_RX;    //don't ack Rx if processing not yet completed
-                               }
-                       }
-               // in case of DMA: signal availability of rx and/or tx packets to MSF
-               IF_USE_DMA( ifbp->IFB_DmaPackets |= stat & ( HREG_EV_RDMAD | HREG_EV_TDMAD ) );
-               // rlav : pending HREG_EV_RDMAD or HREG_EV_TDMAD events get acknowledged here.
-       /*54*/  stat &= (hcf_16)~( HREG_EV_SLEEP_REQ | HREG_EV_CMD | HREG_EV_ACK_REG_READY | HREG_EV_ALLOC | HREG_EV_FW_DMA );
-//a positive mask would be easier to understand /*54*/  stat &= (hcf_16)~( HREG_EV_SLEEP_REQ | HREG_EV_CMD | HREG_EV_ACK_REG_READY | HREG_EV_ALLOC | HREG_EV_FW_DMA );
-               IF_USE_DMA( stat &= (hcf_16)~HREG_EV_RX );
-               if ( stat ) {
-                       DAWA_ACK( stat );   /*DAWA*/
-               }
-       }
-       HCFLOGEXIT( HCF_TRACE_SERVICE_NIC );
-       return rc;
-} // hcf_service_nic
-
-
-/************************************************************************************************************
- ************************** H C F   S U P P O R T   R O U T I N E S ******************************************
- ************************************************************************************************************/
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     void calc_mic( hcf_32* p, hcf_32 m )
- *.PURPOSE       calculate MIC on a quad byte.
- *
- *.ARGUMENTS
- *   p           address of the MIC
- *   m           32 bit value to be processed by the MIC calculation engine
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * calc_mic is the implementation of the MIC algorithm. It is a monkey-see monkey-do copy of
- * Michael::appendByte()
- * of Appendix C of ..........
- *
- *
- *.DIAGRAM
- *
- *.NOTICE
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-
-#define ROL32( A, n ) ( ((A) << (n)) | ( ((A)>>(32-(n)))  & ( (1UL << (n)) - 1 ) ) )
-#define ROR32( A, n ) ROL32( (A), 32-(n) )
-
-#define L   *p
-#define R   *(p+1)
-
-static void
-calc_mic( hcf_32* p, hcf_32 m )
-{
-#if HCF_BIG_ENDIAN
-       m = (m >> 16) | (m << 16);
-#endif // HCF_BIG_ENDIAN
-       L ^= m;
-       R ^= ROL32( L, 17 );
-       L += R;
-       R ^= ((L & 0xff00ff00) >> 8) | ((L & 0x00ff00ff) << 8);
-       L += R;
-       R ^= ROL32( L, 3 );
-       L += R;
-       R ^= ROR32( L, 2 );
-       L += R;
-} // calc_mic
-#undef R
-#undef L
-#endif // HCF_TYPE_WPA
-
-
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-/************************************************************************************************************
- *
- *.SUBMODULE     void calc_mic_rx_frag( IFBP ifbp, wci_bufp p, int len )
- *.PURPOSE       calculate MIC on a single fragment.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   bufp        (byte) address of buffer
- *   len         length in bytes of buffer specified by bufp
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * calc_mic_rx_frag ........
- *
- * The MIC is located in the IFB.
- * The MIC is separate for Tx and Rx, thus allowing hcf_send_msg to occur between hcf_service_nic and
- * hcf_rcv_msg.
- *
- *
- *.DIAGRAM
- *
- *.NOTICE
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-void
-calc_mic_rx_frag( IFBP ifbp, wci_bufp p, int len )
-{
-       static union { hcf_32 x32; hcf_16 x16[2]; hcf_8 x8[4]; } x; //* area to accumulate 4 bytes input for MIC engine
-       int i;
-
-       if ( len == -1 ) {                              //initialize MIC housekeeping
-               i = *(wci_recordp)&p[HFS_STAT];
-               /* i = CNV_SHORTP_TO_LITTLE(&p[HFS_STAT]); should not be neede to prevent alignment poroblems
-                * since len == -1 if and only if p is lookahaead buffer which MUST be word aligned
-                * to be re-investigated by NvR
-                */
-
-               if ( ( i & HFS_STAT_MIC ) == 0 ) {
-                       ifbp->IFB_MICRxCarry = 0xFFFF;          //suppress MIC calculation
-               } else {
-                       ifbp->IFB_MICRxCarry = 0;
-//* Note that "coincidentally" the bit positions used in HFS_STAT
-//* correspond with the offset of the key in IFB_MICKey
-                       i = ( i & HFS_STAT_MIC_KEY_ID ) >> 10;  /* coincidentally no shift needed for i itself */
-                       ifbp->IFB_MICRx[0] = CNV_LONG_TO_LITTLE(ifbp->IFB_MICRxKey[i  ]);
-                       ifbp->IFB_MICRx[1] = CNV_LONG_TO_LITTLE(ifbp->IFB_MICRxKey[i+1]);
-               }
-       } else {
-               if ( ifbp->IFB_MICRxCarry == 0 ) {
-                       x.x32 = CNV_LONGP_TO_LITTLE(p);
-                       p += 4;
-                       if ( len < 4 ) {
-                               ifbp->IFB_MICRxCarry = (hcf_16)len;
-                       } else {
-                               ifbp->IFB_MICRxCarry = 4;
-                               len -= 4;
-                       }
-               } else while ( ifbp->IFB_MICRxCarry < 4 && len ) {      //note for hcf_16 applies: 0xFFFF > 4
-                               x.x8[ifbp->IFB_MICRxCarry++] = *p++;
-                               len--;
-                       }
-               while ( ifbp->IFB_MICRxCarry == 4 ) {   //contrived so we have only 1 call to calc_mic so we could bring it in-line
-                       calc_mic( ifbp->IFB_MICRx, x.x32 );
-                       x.x32 = CNV_LONGP_TO_LITTLE(p);
-                       p += 4;
-                       if ( len < 4 ) {
-                               ifbp->IFB_MICRxCarry = (hcf_16)len;
-                       }
-                       len -= 4;
-               }
-       }
-} // calc_mic_rx_frag
-#endif // HCF_TYPE_WPA
-
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-/************************************************************************************************************
- *
- *.SUBMODULE     void calc_mic_tx_frag( IFBP ifbp, wci_bufp p, int len )
- *.PURPOSE       calculate MIC on a single fragment.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   bufp        (byte) address of buffer
- *   len         length in bytes of buffer specified by bufp
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * calc_mic_tx_frag ........
- *
- * The MIC is located in the IFB.
- * The MIC is separate for Tx and Rx, thus allowing hcf_send_msg to occur between hcf_service_nic and
- * hcf_rcv_msg.
- *
- *
- *.DIAGRAM
- *
- *.NOTICE
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-void
-calc_mic_tx_frag( IFBP ifbp, wci_bufp p, int len )
-{
-       static union { hcf_32 x32; hcf_16 x16[2]; hcf_8 x8[4]; } x; //* area to accumulate 4 bytes input for MIC engine
-
-                                               //if initialization request
-       if ( len == -1 ) {
-                                               //.  presume MIC calculation disabled
-               ifbp->IFB_MICTxCarry = 0xFFFF;
-                                               //.  if MIC calculation enabled
-               if ( ifbp->IFB_MICTxCntl ) {
-                                               //.  .  clear MIC carry
-                       ifbp->IFB_MICTxCarry = 0;
-                                               //.  .  initialize MIC-engine
-                       ifbp->IFB_MICTx[0] = CNV_LONG_TO_LITTLE(ifbp->IFB_MICTxKey[0]); /*Tx always uses Key 0 */
-                       ifbp->IFB_MICTx[1] = CNV_LONG_TO_LITTLE(ifbp->IFB_MICTxKey[1]);
-               }
-                                               //else
-       } else {
-                                               //.  if MIC enabled (Tx) / if MIC present (Rx)
-                                               //.  and no carry from previous calc_mic_frag
-               if ( ifbp->IFB_MICTxCarry == 0 ) {
-                                               //.  .  preset accu with 4 bytes from buffer
-                       x.x32 = CNV_LONGP_TO_LITTLE(p);
-                                               //.  .  adjust pointer accordingly
-                       p += 4;
-                                               //.  .  if buffer contained less then 4 bytes
-                       if ( len < 4 ) {
-                                               //.  .  .  promote valid bytes in accu to carry
-                                               //.  .  .  flag accu to contain incomplete double word
-                               ifbp->IFB_MICTxCarry = (hcf_16)len;
-                                               //.  .  else
-                       } else {
-                                               //.  .  .  flag accu to contain complete double word
-                               ifbp->IFB_MICTxCarry = 4;
-                                               //.  .  adjust remaining buffer length
-                               len -= 4;
-                       }
-                                               //.  else if MIC enabled
-                                               //.  and if carry bytes from previous calc_mic_tx_frag
-                                               //.  .  move (1-3) bytes from carry into accu
-               } else while ( ifbp->IFB_MICTxCarry < 4 && len ) {      /* note for hcf_16 applies: 0xFFFF > 4 */
-                               x.x8[ifbp->IFB_MICTxCarry++] = *p++;
-                               len--;
-                       }
-                                               //.  while accu contains complete double word
-                                               //.  and MIC enabled
-               while ( ifbp->IFB_MICTxCarry == 4 ) {
-                                               //.  .  pass accu to MIC engine
-                       calc_mic( ifbp->IFB_MICTx, x.x32 );
-                                               //.  .  copy next 4 bytes from buffer to accu
-                       x.x32 = CNV_LONGP_TO_LITTLE(p);
-                                               //.  .  adjust buffer pointer
-                       p += 4;
-                                               //.  .  if buffer contained less then 4 bytes
-                                               //.  .  .  promote valid bytes in accu to carry
-                                               //.  .  .  flag accu to contain incomplete double word
-                       if ( len < 4 ) {
-                               ifbp->IFB_MICTxCarry = (hcf_16)len;
-                       }
-                                               //.  .  adjust remaining buffer length
-                       len -= 4;
-               }
-       }
-} // calc_mic_tx_frag
-#endif // HCF_TYPE_WPA
-
-
-#if HCF_PROT_TIME
-/************************************************************************************************************
- *
- *.SUBMODULE     void calibrate( IFBP ifbp )
- *.PURPOSE       calibrates the S/W protection counter against the Hermes Timer tick.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * calibrates the S/W protection counter against the Hermes Timer tick
- * IFB_TickIni is the value used to initialize the S/W protection counter such that the expiration period
- * more or less independent of the processor speed. If IFB_TickIni is not yet calibrated, it is done now.
- * This calibration is "reasonably" accurate because the Hermes is in a quiet state as a result of the
- * Initialize command.
- *
- *
- *.DIAGRAM
- *
- *1: IFB_TickIni is initialized at INI_TICK_INI by hcf_connect. If calibrate succeeds, IFB_TickIni is
- *   guaranteed to be changed. As a consequence there will be only 1 shot at calibration (regardless of the
- *   number of init calls) under normal circumstances.
- *2: Calibration is done HCF_PROT_TIME_CNT times. This diminish the effects of jitter and interference,
- *   especially in a pre-emptive environment. HCF_PROT_TIME_CNT is in the range of 16 through 32 and derived
- *   from the HCF_PROT_TIME specified by the MSF programmer. The divisor needed to scale HCF_PROT_TIME into the
- *   16-32 range, is used as a multiplicator after the calibration, to scale the found value back to the
- *   requested range. This way a compromise is achieved between accuracy and duration of the calibration
- *   process.
- *3: Acknowledge the Timer Tick Event.
- *   Each cycle is limited to at most INI_TICK_INI samples of the TimerTick status of the Hermes.
- *   Since the start of calibrate is unrelated to the Hermes Internal Timer, the first interval may last from 0
- *   to the normal interval, all subsequent intervals should be the full length of the Hermes Tick interval.
- *   The Hermes Timer Tick is not reprogrammed by the HCF, hence it is running at the default of 10 k
- *   microseconds.
- *4: If the Timer Tick Event is continuously up (prot_cnt still has the value INI_TICK_INI) or no Timer Tick
- *   Event occurred before the protection counter expired, reset IFB_TickIni to INI_TICK_INI,
- *   set the defunct bit of IFB_CardStat (thus rendering the Hermes inoperable) and exit the calibrate routine.
- *8: ifbp->IFB_TickIni is multiplied to scale the found value back to the requested range as explained under 2.
- *
- *.NOTICE
- * o Although there are a number of viewpoints possible, calibrate() uses as error strategy that a single
- *   failure of the Hermes TimerTick is considered fatal.
- * o There is no hard and concrete time-out value defined for Hermes activities. The default 1 seconds is
- *   believed to be sufficiently "relaxed" for real life and to be sufficiently short to be still useful in an
- *   environment with humans.
- * o Note that via IFB_DefunctStat time outs in cmd_wait and in hcfio_string block all Hermes access till the
- *   next init so functions which call a mix of cmd_wait and hcfio_string only need to check the return status
- *   of the last call
- * o The return code is preset at Time out.
- *   The additional complication that no calibrated value for the protection count can be assumed since
- *   calibrate() does not yet have determined a calibrated value (a catch 22), is handled by setting the
- *   initial value at INI_TICK_INI (by hcf_connect). This approach is considered safe, because:
- *     - the HCF does not use the pipeline mechanism of Hermes commands.
- *     - the likelihood of failure (the only time when protection count is relevant) is small.
- *     - the time will be sufficiently large on a fast machine (busy bit drops on good NIC before counter
- *       expires)
- *     - the time will be sufficiently small on a slow machine (counter expires on bad NIC before the end user
- *       switches the power off in despair
- *   The time needed to wrap a 32 bit counter around is longer than many humans want to wait, hence the more or
- *   less arbitrary value of 0x40000L is chosen, assuming it does not take too long on an XT and is not too
- *   short on a scream-machine.
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC void
-calibrate( IFBP ifbp )
-{
-       int     cnt = HCF_PROT_TIME_CNT;
-       hcf_32  prot_cnt;
-
-       HCFTRACE( ifbp, HCF_TRACE_CALIBRATE );
-       if ( ifbp->IFB_TickIni == INI_TICK_INI ) {                                                  /*1*/
-               ifbp->IFB_TickIni = 0;                                                                  /*2*/
-               while ( cnt-- ) {
-                       prot_cnt = INI_TICK_INI;
-                       OPW( HREG_EV_ACK, HREG_EV_TICK );                                               /*3*/
-                       while ( (IPW( HREG_EV_STAT ) & HREG_EV_TICK) == 0 && --prot_cnt ) {
-                               ifbp->IFB_TickIni++;
-                       }
-                       if ( prot_cnt == 0 || prot_cnt == INI_TICK_INI ) {                              /*4*/
-                               ifbp->IFB_TickIni = INI_TICK_INI;
-                               ifbp->IFB_DefunctStat = HCF_ERR_DEFUNCT_TIMER;
-                               ifbp->IFB_CardStat |= CARD_STAT_DEFUNCT;
-                               HCFASSERT( DO_ASSERT, prot_cnt );
-                       }
-               }
-               ifbp->IFB_TickIni <<= HCF_PROT_TIME_SHFT;                                               /*8*/
-       }
-       HCFTRACE( ifbp, HCF_TRACE_CALIBRATE | HCF_TRACE_EXIT );
-} // calibrate
-#endif // HCF_PROT_TIME
-
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-/************************************************************************************************************
- *
- *.SUBMODULE     int check_mic( IFBP ifbp )
- *.PURPOSE       verifies the MIC of a received non-USB frame.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS
- *   HCF_SUCCESS
- *   HCF_ERR_MIC
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *
- *4: test whether or not a MIC is reported by the Hermes
- *14: the calculated MIC and the received MIC are compared, the return status is set when there is a mismatch
- *
- *.NOTICE
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-static int
-check_mic( IFBP ifbp )
-{
-       int     rc = HCF_SUCCESS;
-       hcf_32 x32[2];              //* area to save rcvd 8 bytes MIC
-
-                                                           //if MIC present in RxFS
-       if ( *(wci_recordp)&ifbp->IFB_lap[-HFS_ADDR_DEST] & HFS_STAT_MIC ) {
-               //or if ( ifbp->IFB_MICRxCarry != 0xFFFF )
-               CALC_RX_MIC( mic_pad, 8 );                  //.  process up to 3 remaining bytes of data and append 5 to 8 bytes of padding to MIC calculation
-               get_frag( ifbp, (wci_bufp)x32, 8 BE_PAR(0));//.  get 8 byte MIC from NIC
-                                                           //.  if calculated and received MIC do not match
-                                                           //.  .  set status at HCF_ERR_MIC
-       /*14*/  if ( x32[0] != CNV_LITTLE_TO_LONG(ifbp->IFB_MICRx[0]) ||
-                    x32[1] != CNV_LITTLE_TO_LONG(ifbp->IFB_MICRx[1])     ) {
-                       rc = HCF_ERR_MIC;
-               }
-       }
-                                                           //return status
-       return rc;
-} // check_mic
-#endif // HCF_TYPE_WPA
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int cmd_cmpl( IFBP ifbp )
- *.PURPOSE       waits for Hermes Command Completion.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS
- *   IFB_DefunctStat
- *   HCF_ERR_TIME_OUT
- *   HCF_ERR_DEFUNCT_CMD_SEQ
- *   HCF_SUCCESS
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *
- *2: Once cmd_cmpl is called, the Busy option bit in IFB_Cmd must be cleared
- *4: If Status register and command code don't match either:
- *    - the Hermes and Host are out of sync ( a fatal error)
- *    - error bits are reported via the Status Register.
- *   Out of sync is considered fatal and brings the HCF in Defunct mode
- *   Errors reported via the Status Register should be caused by sequence violations in Hermes command
- *   sequences and hence these bugs should have been found during engineering testing. Since there is no
- *   strategy to cope with this problem, it might as well be ignored at run time. Note that for any particular
- *   situation where a strategy is formulated to handle the consequences of a particular bug causing a
- *   particular Error situation reported via the Status Register, the bug should be removed rather than adding
- *   logic to cope with the consequences of the bug.
- *   There have been HCF versions where an error report via the Status Register even brought the HCF in defunct
- *   mode (although it was not yet named like that at that time). This is particular undesirable behavior for a
- *   general library.
- *   Simply reporting the error (as "interesting") is debatable. There also have been HCF versions with this
- *   strategy using the "vague" HCF_FAILURE code.
- *   The error is reported via:
- *    - MiscErr tally of the HCF Tally set
- *    - the (informative) fields IFB_ErrCmd and IFB_ErrQualifier
- *    - the assert mechanism
- *8: Here the Defunct case and the Status error are separately treated
- *
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC int
-cmd_cmpl( IFBP ifbp )
-{
-
-       PROT_CNT_INI;
-       int     rc = HCF_SUCCESS;
-       hcf_16  stat;
-
-       HCFLOGENTRY( HCF_TRACE_CMD_CPL, ifbp->IFB_Cmd );
-       ifbp->IFB_Cmd &= ~HCMD_BUSY;                                                /* 2 */
-       HCF_WAIT_WHILE( (IPW( HREG_EV_STAT) & HREG_EV_CMD) == 0 );                  /* 4 */
-       stat = IPW( HREG_STAT );
-#if HCF_PROT_TIME
-       if ( prot_cnt == 0 ) {
-               IF_TALLY( ifbp->IFB_HCF_Tallies.MiscErr++ );
-               rc = HCF_ERR_TIME_OUT;
-               HCFASSERT( DO_ASSERT, ifbp->IFB_Cmd );
-       } else
-#endif // HCF_PROT_TIME
-       {
-               DAWA_ACK( HREG_EV_CMD );
-       /*4*/   if ( stat != (ifbp->IFB_Cmd & HCMD_CMD_CODE) ) {
-               /*8*/   if ( ( (stat ^ ifbp->IFB_Cmd ) & HCMD_CMD_CODE) != 0 ) {
-                               rc = ifbp->IFB_DefunctStat = HCF_ERR_DEFUNCT_CMD_SEQ;
-                               ifbp->IFB_CardStat |= CARD_STAT_DEFUNCT;
-                       }
-                       IF_TALLY( ifbp->IFB_HCF_Tallies.MiscErr++ );
-                       ifbp->IFB_ErrCmd = stat;
-                       ifbp->IFB_ErrQualifier = IPW( HREG_RESP_0 );
-                       HCFASSERT( DO_ASSERT, MERGE_2( IPW( HREG_PARAM_0 ), ifbp->IFB_Cmd ) );
-                       HCFASSERT( DO_ASSERT, MERGE_2( ifbp->IFB_ErrQualifier, ifbp->IFB_ErrCmd ) );
-               }
-       }
-       HCFASSERT( rc == HCF_SUCCESS, rc);
-       HCFLOGEXIT( HCF_TRACE_CMD_CPL );
-       return rc;
-} // cmd_cmpl
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int cmd_exe( IFBP ifbp, int cmd_code, int par_0 )
- *.PURPOSE       Executes synchronous part of Hermes Command and - optionally - waits for Command Completion.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   cmd_code
- *   par_0
- *
- *.RETURNS
- *   IFB_DefunctStat
- *   HCF_ERR_DEFUNCT_CMD_SEQ
- *   HCF_SUCCESS
- *   HCF_ERR_TO_BE_ADDED <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
- *
- *.DESCRIPTION
- * Executes synchronous Hermes Command and waits for Command Completion
- *
- * The general HCF strategy is to wait for command completion. As a consequence:
- * - the read of the busy bit before writing the command register is superfluous
- * - the Hermes requirement that no Inquiry command may be executed if there is still an unacknowledged
- *   Inquiry command outstanding, is automatically met.
- * The Tx command uses the "Busy" bit in the cmd_code parameter to deviate from this general HCF strategy.
- * The idea is that by not busy-waiting on completion of this frequently used command the processor
- * utilization is diminished while using the busy-wait on all other seldom used commands the flow is kept
- * simple.
- *
- *
- *
- *.DIAGRAM
- *
- *1: skip the body of cmd_exe when in defunct mode or when - based on the S/W Support register write and
- *   read back test - there is apparently no NIC.
- *   Note: we gave up on the "old" strategy to write the S/W Support register at magic only when needed. Due to
- *   the intricateness of Hermes F/W varieties ( which behave differently as far as corruption of the S/W
- *   Support register is involved), the increasing number of Hermes commands which do an implicit initialize
- *   (thus modifying the S/W Support register) and the workarounds of some OS/Support S/W induced aspects (e.g.
- *   the System Soft library at WinNT which postpones the actual mapping of I/O space up to 30 seconds after
- *   giving the go-ahead), the "magic" strategy is now reduced to a simple write and read back. This means that
- *   problems like a bug tramping over the memory mapped Hermes registers will no longer be noticed as side
- *   effect of the S/W Support register check.
- *2: check whether the preceding command skipped the busy wait and if so, check for command completion
- *
- *.NOTICE
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-
-HCF_STATIC int
-cmd_exe( IFBP ifbp, hcf_16 cmd_code, hcf_16 par_0 ) //if HCMD_BUSY of cmd_code set, then do NOT wait for completion
-{
-       int rc;
-
-       HCFLOGENTRY( HCF_TRACE_CMD_EXE, cmd_code );
-       HCFASSERT( (cmd_code & HCMD_CMD_CODE) != HCMD_TX || cmd_code & HCMD_BUSY, cmd_code ); //Tx must have Busy bit set
-       OPW( HREG_SW_0, HCF_MAGIC );
-       if ( IPW( HREG_SW_0 ) == HCF_MAGIC ) {                                                      /* 1 */
-               rc = ifbp->IFB_DefunctStat;
-       }
-       else rc = HCF_ERR_NO_NIC;
-       if ( rc == HCF_SUCCESS ) {
-               //;?is this a hot idea, better MEASURE performance impact
-       /*2*/   if ( ifbp->IFB_Cmd & HCMD_BUSY ) {
-                       rc = cmd_cmpl( ifbp );
-               }
-               OPW( HREG_PARAM_0, par_0 );
-               OPW( HREG_CMD, cmd_code &~HCMD_BUSY );
-               ifbp->IFB_Cmd = cmd_code;
-               if ( (cmd_code & HCMD_BUSY) == 0 ) {    //;?is this a hot idea, better MEASURE performance impact
-                       rc = cmd_cmpl( ifbp );
-               }
-       }
-       HCFASSERT( rc == HCF_SUCCESS, MERGE_2( rc, cmd_code ) );
-       HCFLOGEXIT( HCF_TRACE_CMD_EXE );
-       return rc;
-} // cmd_exe
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int download( IFBP ifbp, CFG_PROG_STRCT FAR *ltvp )
- *.PURPOSE       downloads F/W image into NIC and initiates execution of the downloaded F/W.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   ltvp        specifies the pseudo-RID (as defined by WCI)
- *
- *.RETURNS
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *1: First, Ack everything to unblock a (possibly) blocked cmd pipe line
- *   Note 1: it is very likely that an Alloc event is pending and very well possible that a (Send) Cmd event is
- *   pending
- *   Note 2: it is assumed that this strategy takes away the need to ack every conceivable event after an
- *   Hermes Initialize
- *
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC int
-download( IFBP ifbp, CFG_PROG_STRCT FAR *ltvp )                     //Hermes-II download (volatile only)
-{
-       hcf_16              i;
-       int                 rc = HCF_SUCCESS;
-       wci_bufp            cp;
-       hcf_io              io_port = ifbp->IFB_IOBase + HREG_AUX_DATA;
-
-       HCFLOGENTRY( HCF_TRACE_DL, ltvp->typ );
-#if (HCF_TYPE) & HCF_TYPE_PRELOADED
-       HCFASSERT( DO_ASSERT, ltvp->mode );
-#else
-                                               //if initial "program" LTV
-       if ( ifbp->IFB_DLMode == CFG_PROG_STOP && ltvp->mode == CFG_PROG_VOLATILE) {
-                                               //.  switch Hermes to initial mode
-       /*1*/   OPW( HREG_EV_ACK, ~HREG_EV_SLEEP_REQ );
-               rc = cmd_exe( ifbp, HCMD_INI, 0 );  /* HCMD_INI can not be part of init() because that is called on
-                                                    * other occasions as well */
-               rc = init( ifbp );
-       }
-                                               //if final "program" LTV
-       if ( ltvp->mode == CFG_PROG_STOP && ifbp->IFB_DLMode == CFG_PROG_VOLATILE) {
-                                               //.  start tertiary (or secondary)
-               OPW( HREG_PARAM_1, (hcf_16)(ltvp->nic_addr >> 16) );
-               rc = cmd_exe( ifbp, HCMD_EXECUTE, (hcf_16) ltvp->nic_addr );
-               if (rc == HCF_SUCCESS) {
-                       rc = init( ifbp );  /*;? do we really want to skip init if cmd_exe failed, i.e.
-                                            *   IFB_FW_Comp_Id is than possibly incorrect */
-               }
-                                               //else (non-final)
-       } else {
-                                               //.  if mode == Readback SEEPROM
-#if 0   //;? as long as the next if contains a hard coded 0, might as well leave it out even more obvious
-               if ( 0 /*len is definitely not want we want;?*/ && ltvp->mode == CFG_PROG_SEEPROM_READBACK ) {
-                       OPW( HREG_PARAM_1, (hcf_16)(ltvp->nic_addr >> 16) );
-                       OPW( HREG_PARAM_2, (hcf_16)((ltvp->len - 4) << 1) );
-                                               //.  .  perform Hermes prog cmd with appropriate mode bits
-                       rc = cmd_exe( ifbp, HCMD_PROGRAM | ltvp->mode, (hcf_16)ltvp->nic_addr );
-                                               //.  .  set up NIC RAM addressability according Resp0-1
-                       OPW( HREG_AUX_PAGE,   IPW( HREG_RESP_1) );
-                       OPW( HREG_AUX_OFFSET, IPW( HREG_RESP_0) );
-                                               //.  .  set up L-field of LTV according Resp2
-                       i = ( IPW( HREG_RESP_2 ) + 1 ) / 2;  // i contains max buffer size in words, a probably not very useful piece of information ;?
-/*Nico's code based on i is the "real amount of data available"
-                       if ( ltvp->len - 4 < i ) rc = HCF_ERR_LEN;
-                       else ltvp->len = i + 4;
-*/
-/* Rolands code based on the idea that a MSF should not ask for more than is available
-                       // check if number of bytes requested exceeds max buffer size
-                       if ( ltvp->len - 4 > i ) {
-                               rc = HCF_ERR_LEN;
-                               ltvp->len = i + 4;
-                       }
-*/
-                                               //.  .  copy data from NIC via AUX port to LTV
-                       cp = (wci_bufp)ltvp->host_addr;                     /*IN_PORT_STRING_8_16 macro may modify its parameters*/
-                       i = ltvp->len - 4;
-                       IN_PORT_STRING_8_16( io_port, cp, i );      //!!!WORD length, cp MUST be a char pointer // $$ char
-                                               //.  else (non-final programming)
-               } else
-#endif //;? as long as the above if contains a hard coded 0, might as well leave it out even more obvious
-               {                               //.  .  get number of words to program
-                       HCFASSERT( ltvp->segment_size, *ltvp->host_addr );
-                       i = ltvp->segment_size/2;
-                                               //.  .  copy data (words) from LTV via AUX port to NIC
-                       cp = (wci_bufp)ltvp->host_addr;                     //OUT_PORT_STRING_8_16 macro may modify its parameters
-                                               //.  .  if mode == volatile programming
-                       if ( ltvp->mode == CFG_PROG_VOLATILE ) {
-                                               //.  .  .  set up NIC RAM addressability via AUX port
-                               OPW( HREG_AUX_PAGE, (hcf_16)(ltvp->nic_addr >> 16 << 9 | (ltvp->nic_addr & 0xFFFF) >> 7 ) );
-                               OPW( HREG_AUX_OFFSET, (hcf_16)(ltvp->nic_addr & 0x007E) );
-                               OUT_PORT_STRING_8_16( io_port, cp, i );     //!!!WORD length, cp MUST be a char pointer
-                       }
-               }
-       }
-       ifbp->IFB_DLMode = ltvp->mode;                  //save state in IFB_DLMode
-#endif // HCF_TYPE_PRELOADED
-       HCFASSERT( rc == HCF_SUCCESS, rc );
-       HCFLOGEXIT( HCF_TRACE_DL );
-       return rc;
-} // download
-
-
-#if (HCF_ASSERT) & HCF_ASSERT_PRINTF
-/**************************************************
- * Certain Hermes-II firmware versions can generate
- * debug information. This debug information is
- * contained in a buffer in nic-RAM, and can be read
- * via the aux port.
- **************************************************/
-HCF_STATIC int
-fw_printf(IFBP ifbp, CFG_FW_PRINTF_STRCT FAR *ltvp)
-{
-       int rc = HCF_SUCCESS;
-       hcf_16 fw_cnt;
-//     hcf_32 DbMsgBuffer = 0x29D2, DbMsgCount= 0x000029D0;
-//     hcf_16 DbMsgSize=0x00000080;
-       hcf_32 DbMsgBuffer;
-       CFG_FW_PRINTF_BUFFER_LOCATION_STRCT *p = &ifbp->IFB_FwPfBuff;
-       ltvp->len = 1;
-       if ( p->DbMsgSize != 0 ) {
-               // first, check the counter in nic-RAM and compare it to the latest counter value of the HCF
-               OPW( HREG_AUX_PAGE, (hcf_16)(p->DbMsgCount >> 7) );
-               OPW( HREG_AUX_OFFSET, (hcf_16)(p->DbMsgCount & 0x7E) );
-               fw_cnt = ((IPW( HREG_AUX_DATA) >>1 ) & ((hcf_16)p->DbMsgSize - 1));
-               if ( fw_cnt != ifbp->IFB_DbgPrintF_Cnt ) {
-//                     DbgPrint("fw_cnt=%d IFB_DbgPrintF_Cnt=%d\n", fw_cnt, ifbp->IFB_DbgPrintF_Cnt);
-                       DbMsgBuffer = p->DbMsgBuffer + ifbp->IFB_DbgPrintF_Cnt * 6; // each entry is 3 words
-                       OPW( HREG_AUX_PAGE, (hcf_16)(DbMsgBuffer >> 7) );
-                       OPW( HREG_AUX_OFFSET, (hcf_16)(DbMsgBuffer & 0x7E) );
-                       ltvp->msg_id     = IPW(HREG_AUX_DATA);
-                       ltvp->msg_par    = IPW(HREG_AUX_DATA);
-                       ltvp->msg_tstamp = IPW(HREG_AUX_DATA);
-                       ltvp->len = 4;
-                       ifbp->IFB_DbgPrintF_Cnt++;
-                       ifbp->IFB_DbgPrintF_Cnt &= (p->DbMsgSize - 1);
-               }
-       }
-       return rc;
-};
-#endif // HCF_ASSERT_PRINTF
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     hcf_16 get_fid( IFBP ifbp )
- *.PURPOSE       get allocated FID for either transmit or notify.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS
- *   0   no FID available
- *   <>0 FID number
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *   The preference is to use a "pending" alloc. If no alloc is pending, then - if available - the "spare" FID
- *   is used.
- *   If the spare FID is used, IFB_RscInd (representing the spare FID) must be cleared
- *   If the pending alloc is used, the alloc event must be acknowledged to the Hermes.
- *   In case the spare FID was depleted and the IFB_RscInd has been "faked" as pseudo resource with a 0x0001
- *   value by hcf_service_nic, IFB_RscInd has to be "corrected" again to its 0x0000 value.
- *
- *   Note that due to the Hermes-II H/W problems which are intended to be worked around by DAWA, the Alloc bit
- *   in the Event register is no longer a reliable indication of the presence/absence of a FID. The "Clear FID"
- *   part of the DAWA logic, together with the choice of the definition of the return information from get_fid,
- *   handle this automatically, i.e. without additional code in get_fid.
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC hcf_16
-get_fid( IFBP ifbp )
-{
-
-       hcf_16 fid = 0;
-#if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
-       PROT_CNT_INI;
-#endif // HCF_TYPE_HII5
-
-       IF_DMA( HCFASSERT(!(ifbp->IFB_CntlOpt & USE_DMA), ifbp->IFB_CntlOpt) );
-
-       if ( IPW( HREG_EV_STAT) & HREG_EV_ALLOC) {
-               fid = IPW( HREG_ALLOC_FID );
-               HCFASSERT( fid, ifbp->IFB_RscInd );
-               DAWA_ZERO_FID( HREG_ALLOC_FID );
-#if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
-               HCF_WAIT_WHILE( ( IPW( HREG_EV_STAT ) & HREG_EV_ACK_REG_READY ) == 0 );
-               HCFASSERT( prot_cnt, IPW( HREG_EV_STAT ) );
-#endif // HCF_TYPE_HII5
-               DAWA_ACK( HREG_EV_ALLOC );          //!!note that HREG_EV_ALLOC is written only once
-// 180 degree error in logic ;? #if ALLOC_15
-               if ( ifbp->IFB_RscInd == 1 ) {
-                       ifbp->IFB_RscInd = 0;
-               }
-//#endif // ALLOC_15
-       } else {
-// 180 degree error in logic ;? #if ALLOC_15
-               fid = ifbp->IFB_RscInd;
-//#endif // ALLOC_15
-               ifbp->IFB_RscInd = 0;
-       }
-       return fid;
-} // get_fid
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     void get_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) )
- *.PURPOSE       reads with 16/32 bit I/O via BAP1 port from NIC RAM to Host memory.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   bufp        (byte) address of buffer
- *   len         length in bytes of buffer specified by bufp
- *   word_len    Big Endian only: number of leading bytes to swap in pairs
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * process the single byte (if applicable) read by the previous get_frag and copy len (or len-1) bytes from
- * NIC to bufp.
- * On a Big Endian platform, the parameter word_len controls the number of leading bytes whose endianness is
- * converted (i.e. byte swapped)
- *
- *
- *.DIAGRAM
- *10: The PCMCIA card can be removed in the middle of the transfer. By depositing a "magic number" in the
- *   HREG_SW_0 register of the Hermes at initialization time and by verifying this register, it can be
- *   determined whether the card is still present. The return status is set accordingly.
- *   Clearing the buffer is a (relative) cheap way to prevent that failing I/O results in run-away behavior
- *   because the garbage in the buffer is interpreted by the caller irrespective of the return status (e.g.
- *   hcf_service_nic has this behavior).
- *
- *.NOTICE
- *   It turns out DOS ODI uses zero length fragments. The HCF code can cope with it, but as a consequence, no
- *   Assert on len is possible
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC void
-get_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) )
-{
-       hcf_io      io_port = ifbp->IFB_IOBase + HREG_DATA_1;   //BAP data register
-       wci_bufp    p = bufp;                                   //working pointer
-       int         i;                                          //prevent side effects from macro
-       int         j;
-
-       HCFASSERT( ((hcf_32)bufp & (HCF_ALIGN-1) ) == 0, (hcf_32)bufp );
-
-/*1:    here recovery logic for intervening BAP access between hcf_service_nic and hcf_rcv_msg COULD be added
- *  if current access is RxInitial
- *  .  persistent_offset += len
- */
-
-       i = len;
-                                               //if buffer length > 0 and carry from previous get_frag
-       if ( i && ifbp->IFB_CarryIn ) {
-                                               //.  move carry to buffer
-                                               //.  adjust buffer length and pointer accordingly
-               *p++ = (hcf_8)(ifbp->IFB_CarryIn>>8);
-               i--;
-                                               //.  clear carry flag
-               ifbp->IFB_CarryIn = 0;
-       }
-#if (HCF_IO) & HCF_IO_32BITS
-       //skip zero-length I/O, single byte I/O and I/O not worthwhile (i.e. less than 6 bytes)for DW logic
-                                               //if buffer length >= 6 and 32 bits I/O support
-       if ( !(ifbp->IFB_CntlOpt & USE_16BIT) && i >= 6 ) {
-               hcf_32 FAR  *p4; //prevent side effects from macro
-               if ( ( (hcf_32)p & 0x1 ) == 0 ) {           //.  if buffer at least word aligned
-                       if ( (hcf_32)p & 0x2 ) {            //.  .  if buffer not double word aligned
-                                                           //.  .  .  read single word to get double word aligned
-                               *(wci_recordp)p = IN_PORT_WORD( io_port );
-                                                           //.  .  .  adjust buffer length and pointer accordingly
-                               p += 2;
-                               i -= 2;
-                       }
-                                                           //.  .  read as many double word as possible
-                       p4 = (hcf_32 FAR *)p;
-                       j = i/4;
-                       IN_PORT_STRING_32( io_port, p4, j );
-                                                           //.  .  adjust buffer length and pointer accordingly
-                       p += i & ~0x0003;
-                       i &= 0x0003;
-               }
-       }
-#endif // HCF_IO_32BITS
-                                               //if no 32-bit support OR byte aligned OR 1-3 bytes left
-       if ( i ) {
-                                               //.  read as many word as possible in "alignment safe" way
-               j = i/2;
-               IN_PORT_STRING_8_16( io_port, p, j );
-                                               //.  if 1 byte left
-               if ( i & 0x0001 ) {
-                                               //.  .  read 1 word
-                       ifbp->IFB_CarryIn = IN_PORT_WORD( io_port );
-                                               //.  .  store LSB in last char of buffer
-                       bufp[len-1] = (hcf_8)ifbp->IFB_CarryIn;
-                                               //.  .  save MSB in carry, set carry flag
-                       ifbp->IFB_CarryIn |= 0x1;
-               }
-       }
-#if HCF_BIG_ENDIAN
-       HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len );
-       HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp );
-       HCFASSERT( word_len <= len, MERGE2( word_len, len ) );
-       //see put_frag for an alternative implementation, but be careful about what are int's and what are
-       //hcf_16's
-       if ( word_len ) {                               //.  if there is anything to convert
-               hcf_8 c;
-               c = bufp[1];                                //.  .  convert the 1st hcf_16
-               bufp[1] = bufp[0];
-               bufp[0] = c;
-               if ( word_len > 1 ) {                       //.  .  if there is to convert more than 1 word ( i.e 2 )
-                       c = bufp[3];                            //.  .  .  convert the 2nd hcf_16
-                       bufp[3] = bufp[2];
-                       bufp[2] = c;
-               }
-       }
-#endif // HCF_BIG_ENDIAN
-} // get_frag
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int init( IFBP ifbp )
- *.PURPOSE       Handles common initialization aspects (H-I init, calibration, config.mngmt, allocation).
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS
- *   HCF_ERR_INCOMP_PRI
- *   HCF_ERR_INCOMP_FW
- *   HCF_ERR_TIME_OUT
- *   >>hcf_get_info
- *       HCF_ERR_NO_NIC
- *       HCF_ERR_LEN
- *
- *.DESCRIPTION
- * init will successively:
- * - in case of a (non-preloaded) H-I, initialize the NIC
- * - calibrate the S/W protection timer against the Hermes Timer
- * - collect HSI, "active" F/W Configuration Management Information
- * - in case active F/W is Primary F/W: collect Primary F/W Configuration Management Information
- * - check HSI and Primary F/W compatibility with the HCF
- * - in case active F/W is Station or AP F/W: check Station or AP F/W compatibility with the HCF
- * - in case active F/W is not Primary F/W: allocate FIDs to be used in transmit/notify process
- *
- *
- *.DIAGRAM
- *2: drop all error status bits in IFB_CardStat since they are expected to be re-evaluated.
- *4: Ack everything except HREG_EV_SLEEP_REQ. It is very likely that an Alloc event is pending and
- *   very well possible that a Send Cmd event is pending. Acking HREG_EV_SLEEP_REQ is handled by hcf_action(
- *   HCF_ACT_INT_ON ) !!!
- *10: Calibrate the S/W time-out protection mechanism by calling calibrate(). Note that possible errors
- *   in the calibration process are nor reported by init but will show up via the defunct mechanism in
- *   subsequent hcf-calls.
- *14: usb_check_comp() is called to have the minimal visual clutter for the legacy H-I USB dongle
- *   compatibility check.
- *16: The following configuration management related information is retrieved from the NIC:
- *    - HSI supplier
- *    - F/W Identity
- *    - F/W supplier
- *    if appropriate:
- *    - PRI Identity
- *    - PRI supplier
- *    appropriate means on H-I: always
- *    and on H-II if F/W supplier reflects a primary (i.e. only after an Hermes Reset or Init
- *    command).
- *    QUESTION ;? !!!!!! should, For each of the above RIDs the Endianness is converted to native Endianness.
- *    Only the return code of the first hcf_get_info is used. All hcf_get_info calls are made, regardless of
- *    the success or failure of the 1st hcf_get_info. The assumptions are:
- *     - if any call fails, they all fail, so remembering the result of the 1st call is adequate
- *     - a failing call will overwrite the L-field with a 0x0000 value, which services both as an
- *       error indication for the values cached in the IFB as making mmd_check_comp fail.
- *    In case of H-I, when getting the F/W identity fails, the F/W is assumed to be H-I AP F/W pre-dating
- *    version 9.0 and the F/W Identity and Supplier are faked accordingly.
- *    In case of H-II, the Primary, Station and AP Identity are merged into a single F/W Identity.
- *    The same applies to the Supplier information. As a consequence the PRI information can no longer be
- *    retrieved when a Tertiary runs. To accommodate MSFs and Utilities who depend on PRI information being
- *    available at any time, this information is cached in the IFB. In this cache the generic "F/W" value of
- *    the typ-fields is overwritten with the specific (legacy) "PRI" values. To actually re-route the (legacy)
- *    PRI request via hcf_get_info, the xxxx-table must be set.  In case of H-I, this caching, modifying and
- *    re-routing is not needed because PRI information is always available directly from the NIC. For
- *    consistency the caching fields in the IFB are filled with the PRI information anyway.
- *18: mdd_check_comp() is called to check the Supplier Variant and Range of the Host-S/W I/F (HSI) and the
- *   Primary Firmware Variant and Range against the Top and Bottom level supported by this HCF.  If either of
- *   these tests fails, the CARD_STAT_INCOMP_PRI bit of IFB_CardStat is set
- *   Note: There should always be a primary except during production, so this makes the HCF in its current form
- *   unsuitable for manufacturing test systems like the FTS. This can be remedied by an adding a test like
- *   ifbp->IFB_PRISup.id == COMP_ID_PRI
- *20: In case there is Tertiary F/W and this F/W is Station F/W, the Supplier Variant and Range of the Station
- *   Firmware function as retrieved from the Hermes is checked against the Top and Bottom level supported by
- *   this HCF.
- *   Note: ;? the tertiary F/W compatibility checks could be moved to the DHF, which already has checked the
- *   CFI and MFI compatibility of the image with the NIC before the image was downloaded.
- *28: In case of non-Primary F/W: allocates and acknowledge a (TX or Notify) FID and allocates without
- *   acknowledge another (TX or Notify) FID (the so-called 1.5 alloc scheme) with the following steps:
- *   - execute the allocate command by calling cmd_exe
- *   - wait till either the alloc event or a time-out occurs
- *   - regardless whether the alloc event occurs, call get_fid to
- *     - read the FID and save it in IFB_RscInd to be used as "spare FID"
- *     - acknowledge the alloc event
- *     - do another "half" allocate to complete the "1.5 Alloc scheme"
- *     Note that above 3 steps do not harm and thus give the "cheapest" acceptable strategy.
- *     If a time-out occurred, then report time out status (after all)
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC int
-init( IFBP ifbp )
-{
-
-       int rc = HCF_SUCCESS;
-
-       HCFLOGENTRY( HCF_TRACE_INIT, 0 );
-
-       ifbp->IFB_CardStat = 0;                                                                         /* 2*/
-       OPW( HREG_EV_ACK, ~HREG_EV_SLEEP_REQ );                                             /* 4*/
-       IF_PROT_TIME( calibrate( ifbp ) );                                                  /*10*/
-#if 0 // OOR
-       ifbp->IFB_FWIdentity.len = 2;                           //misuse the IFB space for a put
-       ifbp->IFB_FWIdentity.typ = CFG_TICK_TIME;
-       ifbp->IFB_FWIdentity.comp_id = (1000*1000)/1024 + 1;    //roughly 1 second
-       hcf_put_info( ifbp, (LTVP)&ifbp->IFB_FWIdentity.len );
-#endif // OOR
-       ifbp->IFB_FWIdentity.len = sizeof(CFG_FW_IDENTITY_STRCT)/sizeof(hcf_16) - 1;
-       ifbp->IFB_FWIdentity.typ = CFG_FW_IDENTITY;
-       rc = hcf_get_info( ifbp, (LTVP)&ifbp->IFB_FWIdentity.len );
-/* ;? conversion should not be needed for mmd_check_comp */
-#if HCF_BIG_ENDIAN
-       ifbp->IFB_FWIdentity.comp_id       = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWIdentity.comp_id );
-       ifbp->IFB_FWIdentity.variant       = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWIdentity.variant );
-       ifbp->IFB_FWIdentity.version_major = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWIdentity.version_major );
-       ifbp->IFB_FWIdentity.version_minor = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWIdentity.version_minor );
-#endif // HCF_BIG_ENDIAN
-#if defined MSF_COMPONENT_ID                                                                        /*14*/
-       if ( rc == HCF_SUCCESS ) {                                                                      /*16*/
-               ifbp->IFB_HSISup.len = sizeof(CFG_SUP_RANGE_STRCT)/sizeof(hcf_16) - 1;
-               ifbp->IFB_HSISup.typ = CFG_NIC_HSI_SUP_RANGE;
-               rc = hcf_get_info( ifbp, (LTVP)&ifbp->IFB_HSISup.len );
-/* ;? conversion should not be needed for mmd_check_comp , BUT according to a report of a BE-user it is
- * should be resolved in the WARP release
- * since some compilers make ugly but unnecessary code of these instructions even for LE,
- * it is conditionally compiled */
-#if HCF_BIG_ENDIAN
-               ifbp->IFB_HSISup.role    = CNV_LITTLE_TO_SHORT( ifbp->IFB_HSISup.role );
-               ifbp->IFB_HSISup.id      = CNV_LITTLE_TO_SHORT( ifbp->IFB_HSISup.id );
-               ifbp->IFB_HSISup.variant = CNV_LITTLE_TO_SHORT( ifbp->IFB_HSISup.variant );
-               ifbp->IFB_HSISup.bottom  = CNV_LITTLE_TO_SHORT( ifbp->IFB_HSISup.bottom );
-               ifbp->IFB_HSISup.top     = CNV_LITTLE_TO_SHORT( ifbp->IFB_HSISup.top );
-#endif // HCF_BIG_ENDIAN
-               ifbp->IFB_FWSup.len = sizeof(CFG_SUP_RANGE_STRCT)/sizeof(hcf_16) - 1;
-               ifbp->IFB_FWSup.typ = CFG_FW_SUP_RANGE;
-               (void)hcf_get_info( ifbp, (LTVP)&ifbp->IFB_FWSup.len );
-/* ;? conversion should not be needed for mmd_check_comp */
-#if HCF_BIG_ENDIAN
-               ifbp->IFB_FWSup.role    = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWSup.role );
-               ifbp->IFB_FWSup.id      = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWSup.id );
-               ifbp->IFB_FWSup.variant = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWSup.variant );
-               ifbp->IFB_FWSup.bottom  = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWSup.bottom );
-               ifbp->IFB_FWSup.top     = CNV_LITTLE_TO_SHORT( ifbp->IFB_FWSup.top );
-#endif // HCF_BIG_ENDIAN
-
-               if ( ifbp->IFB_FWSup.id == COMP_ID_PRI ) {                                              /* 20*/
-                       int i = sizeof( CFG_FW_IDENTITY_STRCT) + sizeof(CFG_SUP_RANGE_STRCT );
-                       while ( i-- ) ((hcf_8*)(&ifbp->IFB_PRIIdentity))[i] = ((hcf_8*)(&ifbp->IFB_FWIdentity))[i];
-                       ifbp->IFB_PRIIdentity.typ = CFG_PRI_IDENTITY;
-                       ifbp->IFB_PRISup.typ = CFG_PRI_SUP_RANGE;
-                       xxxx[xxxx_PRI_IDENTITY_OFFSET] = &ifbp->IFB_PRIIdentity.len;
-                       xxxx[xxxx_PRI_IDENTITY_OFFSET+1] = &ifbp->IFB_PRISup.len;
-               }
-               if ( !mmd_check_comp( (void*)&cfg_drv_act_ranges_hsi, &ifbp->IFB_HSISup)                 /* 22*/
-#if ( (HCF_TYPE) & HCF_TYPE_PRELOADED ) == 0
-//;? the PRI compatibility check is only relevant for DHF
-                    || !mmd_check_comp( (void*)&cfg_drv_act_ranges_pri, &ifbp->IFB_PRISup)
-#endif // HCF_TYPE_PRELOADED
-                       ) {
-                       ifbp->IFB_CardStat = CARD_STAT_INCOMP_PRI;
-                       rc = HCF_ERR_INCOMP_PRI;
-               }
-               if ( ( ifbp->IFB_FWSup.id == COMP_ID_STA && !mmd_check_comp( (void*)&cfg_drv_act_ranges_sta, &ifbp->IFB_FWSup) ) ||
-                    ( ifbp->IFB_FWSup.id == COMP_ID_APF && !mmd_check_comp( (void*)&cfg_drv_act_ranges_apf, &ifbp->IFB_FWSup) )
-                       ) {                                                                                  /* 24 */
-                       ifbp->IFB_CardStat |= CARD_STAT_INCOMP_FW;
-                       rc = HCF_ERR_INCOMP_FW;
-               }
-       }
-#endif // MSF_COMPONENT_ID
-
-       if ( rc == HCF_SUCCESS && ifbp->IFB_FWIdentity.comp_id >= COMP_ID_FW_STA ) {
-               PROT_CNT_INI;
-               /**************************************************************************************
-                * rlav: the DMA engine needs the host to cause a 'hanging alloc event' for it to consume.
-                * not sure if this is the right spot in the HCF, thinking about hcf_enable...
-                **************************************************************************************/
-               rc = cmd_exe( ifbp, HCMD_ALLOC, 0 );
-// 180 degree error in logic ;? #if ALLOC_15
-//             ifbp->IFB_RscInd = 1;   //let's hope that by the time hcf_send_msg isa called, there will be a FID
-//#else
-               if ( rc == HCF_SUCCESS ) {
-                       HCF_WAIT_WHILE( (IPW( HREG_EV_STAT ) & HREG_EV_ALLOC) == 0 );
-                       IF_PROT_TIME( HCFASSERT(prot_cnt, IPW( HREG_EV_STAT )) );
-#if HCF_DMA
-                       if ( ! ( ifbp->IFB_CntlOpt & USE_DMA ) )
-#endif // HCF_DMA
-                       {
-                               ifbp->IFB_RscInd = get_fid( ifbp );
-                               HCFASSERT( ifbp->IFB_RscInd, 0 );
-                               cmd_exe( ifbp, HCMD_ALLOC, 0 );
-                               IF_PROT_TIME( if ( prot_cnt == 0 ) rc = HCF_ERR_TIME_OUT );
-                       }
-               }
-//#endif // ALLOC_15
-       }
-
-       HCFASSERT( rc == HCF_SUCCESS, rc );
-       HCFLOGEXIT( HCF_TRACE_INIT );
-       return rc;
-} // init
-
-/************************************************************************************************************
- *
- *.SUBMODULE     void isr_info( IFBP ifbp )
- *.PURPOSE       handles link events.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *1: First the FID number corresponding with the InfoEvent is determined.
- *   Note the complication of the zero-FID protection sub-scheme in DAWA.
- *   Next the L-field and the T-field are fetched into scratch buffer info.
- *2: In case of tallies, the 16 bits Hermes values are accumulated in the IFB into 32 bits values. Info[0]
- *   is (expected to be) HCF_NIC_TAL_CNT + 1. The contraption "while ( info[0]-- >1 )" rather than
- *   "while ( --info[0] )" is used because it is dangerous to determine the length of the Value field by
- *   decrementing info[0]. As a result of a bug in some version of the F/W, info[0] may be 0, resulting
- *   in a very long loop in the pre-decrement logic.
- *4: In case of a link status frame, the information is copied to the IFB field IFB_linkStat
- *6: All other than Tallies (including "unknown" ones) are checked against the selection set by the MSF
- *   via CFG_RID_LOG. If a match is found or the selection set has the wild-card type (i.e non-NULL buffer
- *   pointer at the terminating zero-type), the frame is copied to the (type-specific) log buffer.
- *   Note that to accumulate tallies into IFB AND to log them or to log a frame when a specific match occures
- *   AND based on the wild-card selection, you have to call setup_bap again after the 1st copy.
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC void
-isr_info( IFBP ifbp )
-{
-       hcf_16  info[2], fid;
-#if (HCF_EXT) & HCF_EXT_INFO_LOG
-       RID_LOGP    ridp = ifbp->IFB_RIDLogp;   //NULL or pointer to array of RID_LOG structures (terminated by zero typ)
-#endif // HCF_EXT_INFO_LOG
-
-       HCFTRACE( ifbp, HCF_TRACE_ISR_INFO );                                                               /* 1 */
-       fid = IPW( HREG_INFO_FID );
-       DAWA_ZERO_FID( HREG_INFO_FID );
-       if ( fid ) {
-               (void)setup_bap( ifbp, fid, 0, IO_IN );
-               get_frag( ifbp, (wci_bufp)info, 4 BE_PAR(2) );
-               HCFASSERT( info[0] <= HCF_MAX_LTV + 1, MERGE_2( info[1], info[0] ) );  //;? a smaller value makes more sense
-#if (HCF_TALLIES) & HCF_TALLIES_NIC     //Hermes tally support
-               if ( info[1] == CFG_TALLIES ) {
-                       hcf_32  *p;
-               /*2*/   if ( info[0] > HCF_NIC_TAL_CNT ) {
-                               info[0] = HCF_NIC_TAL_CNT + 1;
-                       }
-                       p = (hcf_32*)&ifbp->IFB_NIC_Tallies;
-                       while ( info[0]-- >1 ) *p++ += IPW( HREG_DATA_1 );  //request may return zero length
-               }
-               else
-#endif // HCF_TALLIES_NIC
-               {
-               /*4*/   if ( info[1] == CFG_LINK_STAT ) {
-                               ifbp->IFB_LinkStat = IPW( HREG_DATA_1 );
-                       }
-#if (HCF_EXT) & HCF_EXT_INFO_LOG
-               /*6*/   while ( 1 ) {
-                               if ( ridp->typ == 0 || ridp->typ == info[1] ) {
-                                       if ( ridp->bufp ) {
-                                               HCFASSERT( ridp->len >= 2, ridp->typ );
-                                               ridp->bufp[0] = min((hcf_16)(ridp->len - 1), info[0] );     //save L
-                                               ridp->bufp[1] = info[1];                        //save T
-                                               get_frag( ifbp, (wci_bufp)&ridp->bufp[2], (ridp->bufp[0] - 1)*2 BE_PAR(0) );
-                                       }
-                                       break;
-                               }
-                               ridp++;
-                       }
-#endif // HCF_EXT_INFO_LOG
-               }
-               HCFTRACE( ifbp, HCF_TRACE_ISR_INFO | HCF_TRACE_EXIT );
-       }
-       return;
-} // isr_info
-
-//
-//
-// #endif // HCF_TALLIES_NIC
-// /*4*/    if ( info[1] == CFG_LINK_STAT ) {
-//          ifbp->IFB_DSLinkStat = IPW( HREG_DATA_1 ) | CFG_LINK_STAT_CHANGE;   //corrupts BAP !! ;?
-//          ifbp->IFB_LinkStat = ifbp->IFB_DSLinkStat & CFG_LINK_STAT_FW; //;? to be obsoleted
-//          printk(KERN_ERR "linkstatus: %04x\n", ifbp->IFB_DSLinkStat );        //;?remove me 1 day
-// #if (HCF_SLEEP) & HCF_DDS
-//          if ( ( ifbp->IFB_DSLinkStat & CFG_LINK_STAT_CONNECTED ) == 0 ) {    //even values are disconnected etc.
-//              ifbp->IFB_TickCnt = 0;              //start 2 second period (with 1 tick uncertanty)
-//              printk(KERN_NOTICE "isr_info: AwaitConnection phase started, IFB_TickCnt = 0\n" );      //;?remove me 1 day
-//          }
-// #endif // HCF_DDS
-//      }
-// #if (HCF_EXT) & HCF_EXT_INFO_LOG
-// /*6*/    while ( 1 ) {
-//          if ( ridp->typ == 0 || ridp->typ == info[1] ) {
-//              if ( ridp->bufp ) {
-//                  HCFASSERT( ridp->len >= 2, ridp->typ );
-//                  (void)setup_bap( ifbp, fid, 2, IO_IN );         //restore BAP for tallies, linkstat and specific type followed by wild card
-//                  ridp->bufp[0] = min( ridp->len - 1, info[0] );  //save L
-//                  get_frag( ifbp, (wci_bufp)&ridp->bufp[1], ridp->bufp[0]*2 BE_PAR(0) );
-//              }
-//              break; //;?this break is no longer needed due to setup_bap but lets concentrate on DDS first
-//          }
-//          ridp++;
-//      }
-// #endif // HCF_EXT_INFO_LOG
-//  }
-//  HCFTRACE( ifbp, HCF_TRACE_ISR_INFO | HCF_TRACE_EXIT );
-//
-//
-//
-//
-//  return;
-//} // isr_info
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     void mdd_assert( IFBP ifbp, unsigned int line_number, hcf_32 q )
- *.PURPOSE       filters assert on level and interfaces to the MSF supplied msf_assert routine.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   line_number line number of the line which caused the assert
- *   q           qualifier, additional information which may give a clue about the problem
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *
- *.NOTICE
- * mdd_assert has been through a turmoil, renaming hcf_assert to assert and hcf_assert again and supporting off
- * and on being called from the MSF level and other ( immature ) ModularDriverDevelopment modules like DHF and
- * MMD.
- * !!!! The assert routine is not an hcf_..... routine in the sense that it may be called by the MSF,
- *      however it is called from mmd.c and dhf.c, so it must be external.
- *      To prevent namespace pollution it needs a prefix, to prevent that MSF programmers think that
- *      they are allowed to call the assert logic, the prefix HCF can't be used, so MDD is selected!!!!
- *
- * When called from the DHF module the line number is incremented by DHF_FILE_NAME_OFFSET and when called from
- * the MMD module by MMD_FILE_NAME_OFFSET.
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-#if HCF_ASSERT
-void
-mdd_assert( IFBP ifbp, unsigned int line_number, hcf_32 q )
-{
-       hcf_16  run_time_flag = ifbp->IFB_AssertLvl;
-
-       if ( run_time_flag /* > ;?????? */ ) { //prevent recursive behavior, later to be extended to level filtering
-               ifbp->IFB_AssertQualifier = q;
-               ifbp->IFB_AssertLine = (hcf_16)line_number;
-#if (HCF_ASSERT) & ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN )
-               if ( ifbp->IFB_AssertRtn ) {
-                       ifbp->IFB_AssertRtn( line_number, ifbp->IFB_AssertTrace, q );
-               }
-#endif // HCF_ASSERT_LNK_MSF_RTN / HCF_ASSERT_RT_MSF_RTN
-#if (HCF_ASSERT) & HCF_ASSERT_SW_SUP
-               OPW( HREG_SW_2, line_number );
-               OPW( HREG_SW_2, ifbp->IFB_AssertTrace );
-               OPW( HREG_SW_2, (hcf_16)q );
-               OPW( HREG_SW_2, (hcf_16)(q >> 16 ) );
-#endif // HCF_ASSERT_SW_SUP
-
-#if (HCF_ASSERT) & HCF_ASSERT_MB
-               ifbp->IFB_AssertLvl = 0;                                    // prevent recursive behavior
-               hcf_put_info( ifbp, (LTVP)&ifbp->IFB_AssertStrct );
-               ifbp->IFB_AssertLvl = run_time_flag;                        // restore appropriate filter level
-#endif // HCF_ASSERT_MB
-       }
-} // mdd_assert
-#endif // HCF_ASSERT
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     void put_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) )
- *.PURPOSE       writes with 16/32 bit I/O via BAP1 port from Host memory to NIC RAM.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   bufp        (byte) address of buffer
- *   len         length in bytes of buffer specified by bufp
- *   word_len    Big Endian only: number of leading bytes to swap in pairs
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * process the single byte (if applicable) not yet written by the previous put_frag and copy len
- * (or len-1) bytes from bufp to NIC.
- *
- *
- *.DIAGRAM
- *
- *.NOTICE
- *   It turns out DOS ODI uses zero length fragments. The HCF code can cope with it, but as a consequence, no
- *   Assert on len is possible
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC void
-put_frag( IFBP ifbp, wci_bufp bufp, int len BE_PAR( int word_len ) )
-{
-       hcf_io      io_port = ifbp->IFB_IOBase + HREG_DATA_1;   //BAP data register
-       int         i;                                          //prevent side effects from macro
-       hcf_16      j;
-       HCFASSERT( ((hcf_32)bufp & (HCF_ALIGN-1) ) == 0, (hcf_32)bufp );
-#if HCF_BIG_ENDIAN
-       HCFASSERT( word_len == 0 || word_len == 2 || word_len == 4, word_len );
-       HCFASSERT( word_len == 0 || ((hcf_32)bufp & 1 ) == 0, (hcf_32)bufp );
-       HCFASSERT( word_len <= len, MERGE_2( word_len, len ) );
-
-       if ( word_len ) {                                   //if there is anything to convert
-                                               //.  convert and write the 1st hcf_16
-               j = bufp[1] | bufp[0]<<8;
-               OUT_PORT_WORD( io_port, j );
-                                               //.  update pointer and counter accordingly
-               len -= 2;
-               bufp += 2;
-               if ( word_len > 1 ) {           //.  if there is to convert more than 1 word ( i.e 2 )
-                                               //.  .  convert and write the 2nd hcf_16
-                       j = bufp[1] | bufp[0]<<8;   /*bufp is already incremented by 2*/
-                       OUT_PORT_WORD( io_port, j );
-                                               //.  .  update pointer and counter accordingly
-                       len -= 2;
-                       bufp += 2;
-               }
-       }
-#endif // HCF_BIG_ENDIAN
-       i = len;
-       if ( i && ifbp->IFB_CarryOut ) {                    //skip zero-length
-               j = ((*bufp)<<8) + ( ifbp->IFB_CarryOut & 0xFF );
-               OUT_PORT_WORD( io_port, j );
-               bufp++; i--;
-               ifbp->IFB_CarryOut = 0;
-       }
-#if (HCF_IO) & HCF_IO_32BITS
-       //skip zero-length I/O, single byte I/O and I/O not worthwhile (i.e. less than 6 bytes)for DW logic
-                                                               //if buffer length >= 6 and 32 bits I/O support
-       if ( !(ifbp->IFB_CntlOpt & USE_16BIT) && i >= 6 ) {
-               hcf_32 FAR  *p4; //prevent side effects from macro
-               if ( ( (hcf_32)bufp & 0x1 ) == 0 ) {            //.  if buffer at least word aligned
-                       if ( (hcf_32)bufp & 0x2 ) {             //.  .  if buffer not double word aligned
-                                                               //.  .  .  write a single word to get double word aligned
-                               j = *(wci_recordp)bufp;     //just to help ease writing macros with embedded assembly
-                               OUT_PORT_WORD( io_port, j );
-                                                               //.  .  .  adjust buffer length and pointer accordingly
-                               bufp += 2; i -= 2;
-                       }
-                                                               //.  .  write as many double word as possible
-                       p4 = (hcf_32 FAR *)bufp;
-                       j = (hcf_16)i/4;
-                       OUT_PORT_STRING_32( io_port, p4, j );
-                                                               //.  .  adjust buffer length and pointer accordingly
-                       bufp += i & ~0x0003;
-                       i &= 0x0003;
-               }
-       }
-#endif // HCF_IO_32BITS
-                                               //if no 32-bit support OR byte aligned OR 1 word left
-       if ( i ) {
-                                               //.  if odd number of bytes left
-               if ( i & 0x0001 ) {
-                                               //.  .  save left over byte (before bufp is corrupted) in carry, set carry flag
-                       ifbp->IFB_CarryOut = (hcf_16)bufp[i-1] | 0x0100;    //note that i and bufp are always simultaneously modified, &bufp[i-1] is invariant
-               }
-                                               //.  write as many word as possible in "alignment safe" way
-               j = (hcf_16)i/2;
-               OUT_PORT_STRING_8_16( io_port, bufp, j );
-       }
-} // put_frag
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     void put_frag_finalize( IFBP ifbp )
- *.PURPOSE       cleanup after put_frag for trailing odd byte and MIC transfer to NIC.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *
- *.RETURNS       N.A.
- *
- *.DESCRIPTION
- * finalize the MIC calculation with the padding pattern, output the last byte (if applicable)
- * of the message and the MIC to the TxFS
- *
- *
- *.DIAGRAM
- *2: 1 byte of the last put_frag may be still in IFB_CarryOut ( the put_frag carry holder ), so ........
- *   1 - 3 bytes of the last put_frag may be still in IFB_tx_32 ( the MIC engine carry holder ), so ........
- *   The call to the MIC calculation routine feeds these remaining bytes (if any) of put_frag and the
- *   just as many bytes of the padding as needed to the MIC calculation engine. Note that the "unneeded" pad
- *   bytes simply end up in the MIC engine carry holder and are never used.
- *8: write the remainder of the MIC and possible some garbage to NIC RAM
- *   Note: i is always 4 (a loop-invariant of the while in point 2)
- *
- *.NOTICE
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC void
-put_frag_finalize( IFBP ifbp )
-{
-#if (HCF_TYPE) & HCF_TYPE_WPA
-       if ( ifbp->IFB_MICTxCarry != 0xFFFF) {      //if MIC calculation active
-               CALC_TX_MIC( mic_pad, 8);               //.  feed (up to 8 bytes of) virtual padding to MIC engine
-                                                       //.  write (possibly) trailing byte + (most of) MIC
-               put_frag( ifbp, (wci_bufp)ifbp->IFB_MICTx, 8 BE_PAR(0) );
-       }
-#endif // HCF_TYPE_WPA
-       put_frag( ifbp, null_addr, 1 BE_PAR(0) );   //write (possibly) trailing data or MIC byte
-} // put_frag_finalize
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int put_info( IFBP ifbp, LTVP ltvp )
- *.PURPOSE       support routine to handle the "basic" task of hcf_put_info to pass RIDs to the NIC.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   ltvp        address in NIC RAM where LVT-records are located
- *
- *.RETURNS
- *   HCF_SUCCESS
- *   >>put_frag
- *   >>cmd_wait
- *
- *.DESCRIPTION
- *
- *
- *.DIAGRAM
- *20: do not write RIDs to NICs which have incompatible Firmware
- *24: If the RID does not exist, the L-field is set to zero.
- *   Note that some RIDs can not be read, e.g. the pseudo RIDs for direct Hermes commands and CFG_DEFAULT_KEYS
- *28: If the RID is written successful, pass it to the NIC by means of an Access Write command
- *
- *.NOTICE
- *   The mechanism to HCF_ASSERT on invalid typ-codes in the LTV record is based on the following strategy:
- *     - some codes (e.g. CFG_REG_MB) are explicitly handled by the HCF which implies that these codes
- *       are valid. These codes are already consumed by hcf_put_info.
- *     - all other codes are passed to the Hermes. Before the put action is executed, hcf_get_info is called
- *       with an LTV record with a value of 1 in the L-field and the intended put action type in the Typ-code
- *       field. If the put action type is valid, it is also valid as a get action type code - except
- *       for CFG_DEFAULT_KEYS and CFG_ADD_TKIP_DEFAULT_KEY - so the HCF_ASSERT logic of hcf_get_info should
- *       not catch.
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC int
-put_info( IFBP ifbp, LTVP ltvp  )
-{
-
-       int rc = HCF_SUCCESS;
-
-       HCFASSERT( ifbp->IFB_CardStat == 0, MERGE_2( ltvp->typ, ifbp->IFB_CardStat ) );
-       HCFASSERT( CFG_RID_CFG_MIN <= ltvp->typ && ltvp->typ <= CFG_RID_CFG_MAX, ltvp->typ );
-
-       if ( ifbp->IFB_CardStat == 0 &&                                                             /* 20*/
-            ( ( CFG_RID_CFG_MIN <= ltvp->typ    && ltvp->typ <= CFG_RID_CFG_MAX ) ||
-              ( CFG_RID_ENG_MIN <= ltvp->typ /* && ltvp->typ <= 0xFFFF */       )     ) ) {
-#if HCF_ASSERT //FCC8, FCB0, FCB4, FCB6, FCB7, FCB8, FCC0, FCC4, FCBC, FCBD, FCBE, FCBF
-               {
-                       hcf_16     t = ltvp->typ;
-                       LTV_STRCT  x = { 2, t, {0} };                                                          /*24*/
-                       hcf_get_info( ifbp, (LTVP)&x );
-                       if ( x.len == 0 &&
-                            ( t != CFG_DEFAULT_KEYS && t != CFG_ADD_TKIP_DEFAULT_KEY && t != CFG_REMOVE_TKIP_DEFAULT_KEY &&
-                              t != CFG_ADD_TKIP_MAPPED_KEY && t != CFG_REMOVE_TKIP_MAPPED_KEY &&
-                              t != CFG_HANDOVER_ADDR && t != CFG_DISASSOCIATE_ADDR &&
-                              t != CFG_FCBC && t != CFG_FCBD && t != CFG_FCBE && t != CFG_FCBF &&
-                              t != CFG_DEAUTHENTICATE_ADDR
-                                    )
-                               ) {
-                               HCFASSERT( DO_ASSERT, ltvp->typ );
-                       }
-               }
-#endif // HCF_ASSERT
-
-               rc = setup_bap( ifbp, ltvp->typ, 0, IO_OUT );
-               put_frag( ifbp, (wci_bufp)ltvp, 2*ltvp->len + 2 BE_PAR(2) );
-       /*28*/  if ( rc == HCF_SUCCESS ) {
-                       rc = cmd_exe( ifbp, HCMD_ACCESS + HCMD_ACCESS_WRITE, ltvp->typ );
-               }
-       }
-       return rc;
-} // put_info
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int put_info_mb( IFBP ifbp, CFG_MB_INFO_STRCT FAR * ltvp )
- *.PURPOSE       accumulates a ( series of) buffers into a single Info block into the MailBox.
- *
- *.ARGUMENTS
- *   ifbp        address of the Interface Block
- *   ltvp        address of structure specifying the "type" and the fragments of the information to be synthesized
- *               as an LTV into the MailBox
- *
- *.RETURNS
- *
- *.DESCRIPTION
- * If the data does not fit (including no MailBox is available), the IFB_MBTally is incremented and an
- * error status is returned.
- * HCF_ASSERT does not catch.
- * Calling put_info_mb when their is no MailBox available, is considered a design error in the MSF.
- *
- * Note that there is always at least 1 word of unused space in the mail box.
- * As a consequence:
- * - no problem in pointer arithmetic (MB_RP == MB_WP means unambiguously mail box is completely empty
- * - There is always free space to write an L field with a value of zero after each MB_Info block.  This
- *   allows for an easy scan mechanism in the "get MB_Info block" logic.
- *
- *
- *.DIAGRAM
- *1: Calculate L field of the MBIB, i.e. 1 for the T-field + the cumulative length of the fragments.
- *2: The free space in the MailBox is calculated (2a: free part from Write Ptr to Read Ptr, 2b: free part
- *   turns out to wrap around) . If this space suffices to store the number of words reflected by len (T-field
- *   + Value-field) plus the additional MailBox Info L-field + a trailing 0 to act as the L-field of a trailing
- *   dummy or empty LTV record, then a MailBox Info block is build in the MailBox consisting of
- *     - the value len in the first word
- *     - type in the second word
- *     - a copy of the contents of the fragments in the second and higher word
- *
- *4: Since put_info_mb() can more or less directly be called from the MSF level, the I/F must be robust
- *   against out-of-range variables. As failsafe coding, the MB update is skipped by changing tlen to 0 if
- *   len == 0; This will indirectly cause an assert as result of the violation of the next if clause.
- *6: Check whether the free space in MailBox suffices (this covers the complete absence of the MailBox).
- *   Note that len is unsigned, so even MSF I/F violation works out O.K.
- *   The '2' in the expression "len+2" is used because 1 word is needed for L itself and 1 word is needed
- *   for the zero-sentinel
- *8: update MailBox Info length report to MSF with "oldest" MB Info Block size. Be careful here, if you get
- *   here before the MailBox is registered, you can't read from the buffer addressed by IFB_MBp (it is the
- *   Null buffer) so don't move this code till the end of this routine but keep it where there is garuanteed
- *   a buffer.
- *
- *.NOTICE
- *   boundary testing depends on the fact that IFB_MBSize is guaranteed to be zero if no MailBox is present,
- *   and to a lesser degree, that IFB_MBWp = IFB_MBRp = 0
- *
- *.ENDDOC                END DOCUMENTATION
- *
- ************************************************************************************************************/
-
-HCF_STATIC int
-put_info_mb( IFBP ifbp, CFG_MB_INFO_STRCT FAR * ltvp )
-{
-
-       int         rc = HCF_SUCCESS;
-       hcf_16      i;                      //work counter
-       hcf_16      *dp;                    //destination pointer (in MailBox)
-       wci_recordp sp;                     //source pointer
-       hcf_16      len;                    //total length to copy to MailBox
-       hcf_16      tlen;                   //free length/working length/offset in WMP frame
-
-       if ( ifbp->IFB_MBp == NULL ) return rc;  //;?not sufficient
-       HCFASSERT( ifbp->IFB_MBp != NULL, 0 );                   //!!!be careful, don't get into an endless recursion
-       HCFASSERT( ifbp->IFB_MBSize, 0 );
-
-       len = 1;                                                                                            /* 1 */
-       for ( i = 0; i < ltvp->frag_cnt; i++ ) {
-               len += ltvp->frag_buf[i].frag_len;
-       }
-       if ( ifbp->IFB_MBRp > ifbp->IFB_MBWp ) {
-               tlen = ifbp->IFB_MBRp - ifbp->IFB_MBWp;                                                         /* 2a*/
-       } else {
-               if ( ifbp->IFB_MBRp == ifbp->IFB_MBWp ) {
-                       ifbp->IFB_MBRp = ifbp->IFB_MBWp = 0;    // optimize Wrapping
-               }
-               tlen = ifbp->IFB_MBSize - ifbp->IFB_MBWp;                                                       /* 2b*/
-               if ( ( tlen <= len + 2 ) && ( len + 2 < ifbp->IFB_MBRp ) ) {    //if trailing space is too small but
-                                                                               //   leading space is sufficiently large
-                       ifbp->IFB_MBp[ifbp->IFB_MBWp] = 0xFFFF;                 //flag dummy LTV to fill the trailing space
-                       ifbp->IFB_MBWp = 0;                                     //reset WritePointer to begin of MailBox
-                       tlen = ifbp->IFB_MBRp;                                  //get new available space size
-               }
-       }
-       dp = &ifbp->IFB_MBp[ifbp->IFB_MBWp];
-       if ( len == 0 ) {
-               tlen = 0; //;? what is this good for
-       }
-       if ( len + 2 >= tlen ){                                                                             /* 6 */
-               //Do Not ASSERT, this is a normal condition
-               IF_TALLY( ifbp->IFB_HCF_Tallies.NoBufMB++ );
-               rc = HCF_ERR_LEN;
-       } else {
-               *dp++ = len;                                    //write Len (= size of T+V in words to MB_Info block
-               *dp++ = ltvp->base_typ;                         //write Type to MB_Info block
-               ifbp->IFB_MBWp += len + 1;                      //update WritePointer of MailBox
-               for ( i = 0; i < ltvp->frag_cnt; i++ ) {                // process each of the fragments
-                       sp = ltvp->frag_buf[i].frag_addr;
-                       len = ltvp->frag_buf[i].frag_len;
-                       while ( len-- ) *dp++ = *sp++;
-               }
-               ifbp->IFB_MBp[ifbp->IFB_MBWp] = 0;              //to assure get_info for CFG_MB_INFO stops
-               ifbp->IFB_MBInfoLen = ifbp->IFB_MBp[ifbp->IFB_MBRp];                                            /* 8 */
-       }
-       return rc;
-} // put_info_mb
-
-
-/************************************************************************************************************
- *
- *.SUBMODULE     int setup_bap( IFBP ifbp, hcf_16 fid, int offset, int type )
- *.PURPOSE       set up data access to NIC RAM via BAP_1.
- *
- *.ARGUMENTS
- *   ifbp            address of I/F Block
- *   fid             FID/RID
- *   offset          !!even!! offset in FID/RID
- *   type            IO_IN, IO_OUT
- *
- *.RETURNS
- *   HCF_SUCCESS                 O.K
- *   HCF_ERR_NO_NIC              card is removed
- *   HCF_ERR_DEFUNCT_TIME_OUT    Fatal malfunction detected
- *   HCF_ERR_DEFUNCT_.....       if and only if IFB_DefunctStat <> 0
- *
- *.DESCRIPTION
- *
- * A non-zero return status indicates:
- * - the NIC is considered nonoperational, e.g. due to a time-out of some Hermes activity in the past
- * - BAP_1 could not properly be initialized
- * - the card is removed before completion of the data transfer
- * In all other cases, a zero is returned.
- * BAP Initialization failure indicates an H/W error which is very likely to signal complete H/W failure.
- * Once a BAP Initialization failure has occurred all subsequent interactions with the Hermes will return a
- * "defunct" status till the Hermes is re-initialized by means of an hcf_connect.
- *
- * A BAP is a set of registers (Offset, Select and Data) offering read/write access to a particular FID or
- * RID. This access is based on a auto-increment feature.
- * There are two BAPs but these days the HCF uses only BAP_1 and leaves BAP_0 to the PCI Busmastering H/W.
- *
- * The BAP-mechanism is based on the Busy bit in the Offset register (see the Hermes definition). The waiting
- * for Busy must occur between writing the Offset register and accessing the Data register. The
- * implementation to wait for the Busy bit drop after each write to the Offset register, implies that the
- * requirement that the Busy bit is low  before the Select register is written, is automatically met.
- * BAP-setup may be time consuming (e.g. 380 usec for large offsets occurs frequently). The wait for Busy bit
- * drop is protected by a loop counter, which is initialized with IFB_TickIni, which is calibrated in init.
- *
- * The NIC I/F is optimized for word transfer and can only handle word transfer at a word boundary in NIC
- * RAM. The intended solution for transfer of a single byte has multiple H/W flaws. There have been different
- * S/W Workaround strategies. RID access is hcf_16 based by "nature", so no byte access problems.  For Tx/Rx
- * FID access,  the byte logic became obsolete by absorbing it in the double word oriented nature of the MIC
- * feature.
- *
- *
- *.DIAGRAM
- *
- *2: the test on rc checks whether the HCF went into "defunct" mode ( e.g. BAP initialization or a call to
- *   cmd_wait did ever fail).
- *4: the select register and offset register are set
- *   the offset register is monitored till a successful condition (no busy bit) is detected or till the
- *   (calibrated) protection counter expires
- *   If the counter expires, this is reflected in IFB_DefunctStat, so all subsequent calls to setup_bap fail
- *   immediately ( see 2)
- *6: initialization of the carry as used by pet/get_frag
- *8: HREG_OFFSET_ERR is ignored as error because:
- *    a: the Hermes is robust against it
- *    b: it is not known what causes it (probably a bug), hence no strategy can be specified which level is
- *       to handle this error in which way. In the past, it could be induced by the MSF level, e.g. by calling
- *       hcf_rcv_msg while there was no Rx-FID available. Since this is an MSF-error which is caught by ASSERT,
- *       there is no run-time action required by the HCF.
- *   Lumping the Offset error in with the Busy bit error, as has been done in the past turns out to be a
- *   disaster or a life saver, just depending on what the cause of the error is. Since no prediction can be
- *   done about the future, it is "felt" to be the best strategy to ignore this error. One day the code was
- *   accompanied by the following comment:
- *   //  ignore HREG_OFFSET_ERR, someone, supposedly the MSF programmer ;) made a bug. Since we don't know
- *   //  what is going on, we might as well go on - under management pressure - by ignoring it
- *
- *.ENDDOC                          END DOCUMENTATION
- *
- ************************************************************************************************************/
-HCF_STATIC int
-setup_bap( IFBP ifbp, hcf_16 fid, int offset, int type )
-{
-       PROT_CNT_INI;
-       int rc;
-
-       HCFTRACE( ifbp, HCF_TRACE_STRIO );
-       rc = ifbp->IFB_DefunctStat;
-       if (rc == HCF_SUCCESS) {                                        /*2*/
-               OPW( HREG_SELECT_1, fid );                                                              /*4*/
-               OPW( HREG_OFFSET_1, offset );
-               if ( type == IO_IN ) {
-                       ifbp->IFB_CarryIn = 0;
-               }
-               else ifbp->IFB_CarryOut = 0;
-               HCF_WAIT_WHILE( IPW( HREG_OFFSET_1) & HCMD_BUSY );
-               HCFASSERT( !( IPW( HREG_OFFSET_1) & HREG_OFFSET_ERR ), MERGE_2( fid, offset ) );         /*8*/
-               if ( prot_cnt == 0 ) {
-                       HCFASSERT( DO_ASSERT, MERGE_2( fid, offset ) );
-                       rc = ifbp->IFB_DefunctStat = HCF_ERR_DEFUNCT_TIME_OUT;
-                       ifbp->IFB_CardStat |= CARD_STAT_DEFUNCT;
-               }
-       }
-       HCFTRACE( ifbp, HCF_TRACE_STRIO | HCF_TRACE_EXIT );
-       return rc;
-} // setup_bap
-
diff --git a/drivers/staging/wlags49_h2/hcf.h b/drivers/staging/wlags49_h2/hcf.h
deleted file mode 100644 (file)
index 71b4465..0000000
+++ /dev/null
@@ -1,394 +0,0 @@
-
-#ifndef HCF_H
-#define HCF_H 1
-
-/************************************************************************************************************
-*
-* FILE  : hcf.h
-*
-* DATE   : $Date: 2004/08/05 11:47:10 $   $Revision: 1.7 $
-* Original: 2004/05/19 07:26:01    Revision: 1.56      Tag: hcf7_t20040602_01
-* Original: 2004/05/12 08:47:23    Revision: 1.53      Tag: hcf7_t7_20040513_01
-* Original: 2004/04/15 09:24:42    Revision: 1.46      Tag: hcf7_t7_20040415_01
-* Original: 2004/04/08 15:18:16    Revision: 1.45      Tag: t7_20040413_01
-* Original: 2004/04/01 15:32:55    Revision: 1.43      Tag: t7_20040401_01
-* Original: 2004/03/10 15:39:28    Revision: 1.39      Tag: t20040310_01
-* Original: 2004/03/04 11:03:38    Revision: 1.37      Tag: t20040304_01
-* Original: 2004/03/02 14:51:21    Revision: 1.35      Tag: t20040302_03
-* Original: 2004/02/24 13:00:28    Revision: 1.28      Tag: t20040224_01
-* Original: 2004/02/09 14:50:14    Revision: 1.26      Tag: t20040219_01
-*
-* AUTHOR : Nico Valster
-*
-* SPECIFICATION: ..........
-*
-* DESC   : Definitions and Prototypes for MSF as well as HCF sources
-*
-*                 Customizable via HCFCFG.H
-*
-*
-**************************************************************************************************************
-
-**************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT © 1994 - 1995     by AT&T.                                All Rights Reserved
-* COPYRIGHT © 1996 - 2000 by Lucent Technologies.     All Rights Reserved
-* COPYRIGHT © 2001 - 2004     by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-*************************************************************************************************************/
-
-
-#include "hcfcfg.h"    // System Constants to be defined by the MSF-programmer to tailor the HCF
-#include "mdd.h"       // Include file common for HCF, MSF
-
-
-/************************************************************************************************/
-/**************************************  MACROS  ************************************************/
-/************************************************************************************************/
-
-#define LOF(x)                         (sizeof(x)/sizeof(hcf_16)-1)
-
-/*     Endianness
- *     Little Endian (a.k.a. Intel), least significant byte first
- *     Big Endian (a.k.a. Motorola), most significant byte first
- *
- * The following macros are supplied
- *  o CNV_LITTLE_TO_SHORT(w)                   interprets the 16-bits input value as Little Endian, returns an hcf_16
- *     o CNV_BIG_TO_SHORT(w)                           interprets the 16-bits input value as Big Endian, returns an hcf_16
- *
- */
-
-/* To increase portability, use unsigned char and unsigned char * when accessing parts of larger
- * types to convert their Endianness
- */
-
-#define CNV_END_SHORT(w)  (hcf_16)( ((hcf_16)(w) & 0x00FF) << 8 | ((hcf_16)(w) & 0xFF00) >> 8 )
-#define CNV_END_LONG(dw)  (hcf_32)( (dw >> 24) | ((dw >> 8) & 0xff00) | ((dw << 8) & 0xff0000) | (dw << 24) )
-
-#if HCF_BIG_ENDIAN
-//******************************************** B I G   E N D I A N *******************************************
-#define CNV_LITTLE_TO_SHORT(w) CNV_END_SHORT(w)        //    endianness conversion needed
-#define CNV_BIG_TO_SHORT(w)            (w)                             // no endianness conversion needed
-#define CNV_LITTLE_TO_LONG(dw) CNV_END_LONG(dw)
-#define CNV_LONG_TO_LITTLE(dw) CNV_END_LONG(dw)
-#else
-//****************************************** L I T T L E   E N D I A N ****************************************
-#define CNV_LITTLE_TO_SHORT(w)         (w)                             // no endianness conversion needed
-#define CNV_BIG_TO_SHORT(w)            CNV_END_SHORT(w)        //    endianness conversion needed
-#define CNV_LITTLE_TO_LONG(dw) (dw)
-#define CNV_LONG_TO_LITTLE(dw) (dw)
-
-#if defined HCF_ALIGN && HCF_ALIGN > 1
-#define CNV_SHORTP_TO_LITTLE(pw)       ((hcf_16)(*(hcf_8 *)pw))                        | ((hcf_16)(*((hcf_8 *)pw+1)) << 8)
-#define CNV_LONGP_TO_LITTLE(pdw)       ((hcf_32)(*(hcf_8 *)pdw))                       | ((hcf_32)(*((hcf_8 *)pdw+1)) << 8)    | \
-                                                                       ((hcf_32)(*((hcf_8 *)pdw+2)) << 16) | ((hcf_32)(*((hcf_8 *)pdw+3)) << 24)
-#else
-#define CNV_LONGP_TO_LITTLE(pdw)       (*(hcf_32 *)pdw)
-#define CNV_SHORTP_TO_LITTLE(pw)       (*(hcf_16 *)pw)
-#endif
-
-#endif // HCF_BIG_ENDIAN
-
-// conversion macros which can be expressed in other macros
-#define CNV_SHORT_TO_LITTLE(w) CNV_LITTLE_TO_SHORT(w)
-#define CNV_SHORT_TO_BIG(w)            CNV_BIG_TO_SHORT(w)
-
-/************************************************************************************************/
-/**************************************  END OF MACROS  *****************************************/
-/************************************************************************************************/
-
-/***********************************************************************************************************/
-/*****************                                                  ****************************************/
-/***********************************************************************************************************/
-
-// offsets Transmit/Receive Frame Structure
-#define HFS_STAT                               0x0000
-#define HFS_SWSUP                              0x0006                                  //SW Support
-#define HFS_Q_INFO                             0x0006                                  //Signal/Silence level
-#define HFS_RATE                               0x0008                                  //RxFlow/Rate
-#define        HFS_STAT_ERR            RX_STAT_ERR                             //link "natural" HCF name to "natural" MSF name
-#define HFS_TX_CNTL                            0x0036
-                                                                                                               // H-I     H-II
-#define HFS_DAT_LEN                            (HFS_ADDR_DEST - 2)             // 0x002C  0x0038
-#define HFS_ADDR_DEST                  0x003A                                  // 0x002E  0x003A
-#define HFS_ADDR_SRC                   (HFS_ADDR_DEST + 6)             // 0x0034  0x0040
-#define HFS_LEN                                        (HFS_ADDR_SRC  + 6)             // 0x003A  0x0046
-#define HFS_DAT                                        (HFS_LEN       + 2)             // 0x003C  0x0048
-#define HFS_TYPE                               (HFS_DAT       + 6)             // 0x0042  0x004E
-
-
-//=============================  D E S C R I P T O R   S T R U C T U R E  ==============================
-//;?MDD.H stuff ;?
-
-#if HCF_BIG_ENDIAN
-#define DESC_STRCT_CNT         0
-#define DESC_STRCT_SIZE                1
-#else
-#define DESC_STRCT_CNT         1
-#define DESC_STRCT_SIZE                0
-#endif // HCF_BIG_ENDIAN
-
-#define        BUF_CNT                         buf_dim[DESC_STRCT_CNT]
-#define        BUF_SIZE                        buf_dim[DESC_STRCT_SIZE]
-
-typedef struct DESC_STRCT {
-       hcf_16                                  buf_dim[2];
-       hcf_32                                  buf_phys_addr;
-       hcf_32                                  next_desc_phys_addr;    // physical address of next descriptor
-       hcf_32                                  desc_phys_addr;                 // physical address of this descriptor
-       struct DESC_STRCT               *next_desc_addr;
-       hcf_8   FAR                             *buf_addr;
-#if (HCF_EXT) & HCF_EXT_DESC_STRCT
-       void FAR                           *DESC_MSFSup;                        // pointer for arbitrary use by the MSF
-#endif // HCF_DESC_STRCT_EXT
-} DESC_STRCT;
-
-#define HCF_DASA_SIZE                  12                                                      //size in bytes for DA/SA
-
-#define DESC_CNT_MASK                  0x0FFF
-
-#define GET_BUF_SIZE(descp)       ((descp)->BUF_SIZE)
-#define GET_BUF_CNT(descp)        ((descp)->BUF_CNT)
-#define SET_BUF_SIZE(descp, size) (descp)->BUF_SIZE = size;
-#define SET_BUF_CNT(descp, count) (descp)->BUF_CNT = count;
-
-//=========================================  T A L L I E S  ===================================================
-
-typedef struct  {  //Hermes Tallies (IFB substructure)
-  hcf_32       TxUnicastFrames;
-  hcf_32       TxMulticastFrames;
-  hcf_32       TxFragments;
-  hcf_32       TxUnicastOctets;
-  hcf_32       TxMulticastOctets;
-  hcf_32       TxDeferredTransmissions;
-  hcf_32       TxSingleRetryFrames;
-  hcf_32       TxMultipleRetryFrames;
-  hcf_32       TxRetryLimitExceeded;
-  hcf_32       TxDiscards;
-  hcf_32       RxUnicastFrames;
-  hcf_32       RxMulticastFrames;
-  hcf_32       RxFragments;
-  hcf_32       RxUnicastOctets;
-  hcf_32       RxMulticastOctets;
-  hcf_32       RxFCSErrors;
-  hcf_32       RxDiscardsNoBuffer;
-  hcf_32       TxDiscardsWrongSA;
-  hcf_32       RxWEPUndecryptable;
-  hcf_32       RxMsgInMsgFragments;
-  hcf_32       RxMsgInBadMsgFragments;
-  hcf_32       RxDiscardsWEPICVError;
-  hcf_32       RxDiscardsWEPExcluded;
-#if (HCF_EXT) & HCF_EXT_TALLIES_FW
-  hcf_32       TalliesExtra[32];
-#endif // HCF_EXT_TALLIES_FW
-} CFG_HERMES_TALLIES_STRCT;
-
-typedef struct  {  //HCF Tallies (IFB substructure)
-  hcf_32       NoBufInfo;                              //No buffer available for unsolicited Notify frame
-  hcf_32       NoBufMB;                                        //No space available in MailBox
-  hcf_32       MiscErr;                                        /* Command errors
-                                                                                *  - time out on completion synchronous part Hermes Command
-                                                                                *  - completed Hermes Command doesn't match original command
-                                                                                *  - status of completed Hermes Command contains error bits
-                                                                                */
-#if (HCF_EXT) & HCF_EXT_TALLIES_FW
-  hcf_32       EngCnt[8];
-#endif // HCF_EXT_TALLIES_FW
-} CFG_HCF_TALLIES_STRCT;
-
-//Note this way to define ..._TAL_CNT implies that all tallies must keep the same (hcf_32) size
-#if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
-#if (HCF_TALLIES) & HCF_TALLIES_NIC    //Hermes tally support
-#define                HCF_NIC_TAL_CNT (sizeof(CFG_HERMES_TALLIES_STRCT)/ sizeof(hcf_32))
-#else
-#define                HCF_NIC_TAL_CNT 0
-#endif // HCF_TALLIES
-#if (HCF_TALLIES) & HCF_TALLIES_HCF    //HCF tally support
-#define                HCF_HCF_TAL_CNT (sizeof(CFG_HCF_TALLIES_STRCT)   / sizeof(hcf_32))
-#else
-#define                HCF_HCF_TAL_CNT 0
-#endif // HCF_TALLIES
-#define HCF_TOT_TAL_CNT ( HCF_NIC_TAL_CNT + HCF_NIC_TAL_CNT )
-#endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
-
-
-/***********************************************************************************************************/
-/********************************** I N T E R F A C E   B L O C K ******************************************/
-/***********************************************************************************************************/
-
-#define IFB_VERSION 0x0E                               // initially 0, to be incremented by every IFB layout change
-
-typedef struct  {
-  hcf_io               IFB_IOBase;                             // I/O address of Hermes chip as passed by MSF at hcf_connect call
-  hcf_16               IFB_IORange;                    // I/O Range used by Hermes chip
-  hcf_16               IFB_DLMode;                             // Download Mode state
-  hcf_16               IFB_Cmd;                                // cmd in progress flag, to be ack-ed before next cmd can be issued
-  hcf_16               IFB_RxFID;                              // FID of "current" RxFS (non-DMA mode)
-//;?#if tx_delay option
-  hcf_16               IFB_TxFID;                              // fid storage during "delayed" send
-//;?#endif tx_delay option
-  hcf_16               IFB_RxLen;                              //
-  hcf_16               IFB_DefunctStat;                // BAP initialization or Cmd Completion failed
-  hcf_16               IFB_ErrCmd;                             // contents Status reg when error bits and/or mismatch in cmd_wait
-  hcf_16               IFB_ErrQualifier;               // contents Resp0  reg when error bits and/or mismatch in cmd_wait
-  hcf_16               IFB_lal;                                // LookAhead Length
-  wci_bufp             IFB_lap;                                // LookAhead Buffer pointer
-  hcf_16               IFB_LinkStat;                   // Link Status
-  hcf_16               IFB_DSLinkStat;                 // Link Status, new strategy introduced for DeepSleep
-  hcf_16               IFB_CarryIn;                    // carry and carry-flag to move 1 byte from one get_frag to the next
-  hcf_16               IFB_CarryOut;                   // carry and carry-flag to move 1 byte from one put_frag to the next
-  hcf_16               IFB_Version;                    // IFB_VERSION, incremented by every SIGNIFICANT IFB layout change
-  hcf_16               IFB_CardStat;                   // NIC error / F/W incompatibility status
-  hcf_16               IFB_RscInd;                             // non-DMA: TxFID available, DMA: always 1
-  hcf_16               IFB_CntlOpt;                    // flags: 32 bits I/O, DMA available, DMA enabled
-  hcf_16               IFB_BusType;                    // BusType, derived via CFG_NIC_BUS_TYPE
-  CFG_FW_IDENTITY_STRCT         IFB_FWIdentity; /* keep FWIdentity/Sup and PRIIdentity/Sup in sequence
-                                                                                 * because of the (dumb) copy in init() */
-#if defined MSF_COMPONENT_ID
-  CFG_SUP_RANGE_STRCT   IFB_FWSup;
-  CFG_PRI_IDENTITY_STRCT IFB_PRIIdentity;
-  CFG_SUP_RANGE_STRCT   IFB_PRISup;
-  CFG_SUP_RANGE_STRCT   IFB_HSISup;
-#endif // MSF_COMPONENT_ID
-#if (HCF_EXT) & HCF_EXT_INFO_LOG
-  RID_LOGP             IFB_RIDLogp;                    // pointer to RID_LOG structure
-#endif // HCF_EXT_INFO_LOG
-#if HCF_PROT_TIME
-  hcf_32               IFB_TickIni;                    // initialization of S/W counter based protection loop
-#endif // HCF_PROT_TIME
-#if (HCF_EXT) & HCF_EXT_INT_TICK
-  int                  IFB_TickCnt;                    // Hermes Timer Tick Counter
-#endif // HCF_EXT_INT_TICK
-  hcf_16          *IFB_MBp;                            // pointer to the MailBox
-  hcf_16               IFB_MBSize;                             // size of the MailBox
-  hcf_16               IFB_MBWp;                               // zero-based write index into the MailBox
-  hcf_16               IFB_MBRp;                               // zero-based read  index into the MailBox
-  hcf_16               IFB_MBInfoLen;                  // contents of L-field of the oldest available MailBoxInfoBlock
-#if (HCF_TYPE) & HCF_TYPE_WPA
-  hcf_16               IFB_MICTxCntl;                  // MIC bit and Key index in TxControl field of TxFS
-  hcf_32               IFB_MICTxKey[2];                // calculating key
-  hcf_32               IFB_MICTx[2];                   // Tx MIC calculation Engine state
-  hcf_16               IFB_MICTxCarry;                 // temp length, carries over from one Tx fragment to another
-  hcf_16               IFB_MICRxCarry;                 // temp length, carries over from one Rx fragment to another
-  hcf_32               IFB_MICRxKey[4*2];              // 4 checking keys
-  hcf_32               IFB_MICRx[2];                   // Rx MIC calculation Engine state
-#endif // HCF_TYPE_WPA
-#if HCF_ASSERT
-#if (HCF_ASSERT) & HCF_ASSERT_MB
-  CFG_MB_INFO_RANGE1_STRCT     IFB_AssertStrct; // Add some complication to the HCF as prize for the new MSF I/F
-#endif // HCF_ASSERT_MB
-                                                                               // target of above IFB_AssertStrct
-  hcf_16               IFB_AssertLine;                 //  - line number ( + encoded module name )
-  hcf_16               IFB_AssertTrace;                //  - bit based trace of all hcf_.... invocations
-  hcf_32               IFB_AssertQualifier;    //  - qualifier
-  hcf_16               IFB_AssertLvl;                  // Assert Filtering, Not yet implemented
-  hcf_16               IFB_AssertWhere;                // Where parameter of the Assert macro
-#if (HCF_ASSERT) & ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN )
-  MSF_ASSERT_RTNP      IFB_AssertRtn;          // MSF Assert Call back routine (inspired by GEF, DrDobbs Nov 1998 )
-#endif // HCF_ASSERT_LNK_MSF_RTN
-#if (HCF_ASSERT) & HCF_ASSERT_PRINTF   // engineering facilty intended as F/W debugging aid
-   hcf_16       IFB_DbgPrintF_Cnt;
-   CFG_FW_PRINTF_BUFFER_LOCATION_STRCT IFB_FwPfBuff;
-#endif // HCF_ASSERT_PRINTF
-#endif // HCF_ASSERT
-  hcf_16 volatile IFB_IntOffCnt;               // 0xFFFF based HCF_ACT_INT_OFF nesting counter, DeepSleep flag
-#if (HCF_TALLIES) & ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )      //Hermes and/or HCF tally support
-  hcf_32               IFB_Silly_you_should_align;     //;?
-  hcf_16               IFB_TallyLen;                   // Tally length (to build an LTV)
-  hcf_16               IFB_TallyTyp;                   // Tally Type (to build an LTV)
-#endif // HCF_TALLIES_NIC / HCF_TALLIES_HCF
-#if (HCF_TALLIES) & HCF_TALLIES_NIC            //Hermes tally support
-  CFG_HERMES_TALLIES_STRCT     IFB_NIC_Tallies;
-#endif // HCF_TALLIES_NIC
-#if (HCF_TALLIES) & HCF_TALLIES_HCF            //HCF tally support
-  CFG_HCF_TALLIES_STRCT                IFB_HCF_Tallies;
-#endif // HCF_TALLIES_HCF
-#if HCF_DMA
-  //used for a pool of destination_address descriptor/buffers, used during tx encapsulation points to the
-  //first/last descriptor in the descriptor chain, so we can easily remove and append a packet.
-  DESC_STRCT   *IFB_FirstDesc[2];
-  DESC_STRCT   *IFB_LastDesc[2];
-  DESC_STRCT   *IFB_ConfinedDesc[2];   // pointers to descriptor used for host reclaim purposes.
-  hcf_16               IFB_DmaPackets;                 // HREG_EV_[TX/RX]DMA_DONE flags, reports DMA Frame availability to MSF
-#endif // HCF_DMA
-#if (HCF_EXT) & HCF_EXT_INT_TX_EX
-  hcf_16               IFB_TxFsStat;                   // Tx message monitoring
-  hcf_16               IFB_TxFsGap[2];                 //;?make this robust
-  hcf_16               IFB_TxFsSwSup;
-#endif // HCF_EXT_INT_TX_EX
-  hcf_16               IFB_Magic;                              /* "Magic" signature, to help the debugger interpret a memory dump
-                                                                                * also the last field cleared at hcf_connect
-                                                                                */
-#if (HCF_EXT) & HCF_EXT_IFB_STRCT              // for usage by the MSF
-  void FAR        *IFB_MSFSup;                         // pointer for arbitrary use by the MSF
-#endif // HCF_EXT_IFB_STRCT_EXT
-} IFB_STRCT;
-
-typedef IFB_STRCT*     IFBP;
-
-
-/***********************************************************************************************************/
-/**********************   W C I    F U N C T I O N S    P R O T O T Y P E S   ******************************/
-/***********************************************************************************************************/
-
-EXTERN_C int hcf_action(IFBP ifbp, hcf_16 cmd);
-EXTERN_C int hcf_connect(IFBP ifbp, hcf_io io_base);
-EXTERN_C int hcf_get_info(IFBP ifbp, LTVP ltvp);
-EXTERN_C int hcf_service_nic(IFBP ifbp, wci_bufp bufp, unsigned int len);
-EXTERN_C int hcf_cntl(IFBP ifbp, hcf_16 cmd);
-EXTERN_C int hcf_put_info(IFBP ifbp, LTVP ltvp);
-EXTERN_C int hcf_rcv_msg(IFBP ifbp, DESC_STRCT *descp, unsigned int offset);
-EXTERN_C int hcf_send_msg(IFBP ifbp, DESC_STRCT *dp, hcf_16 tx_cntl);
-#if HCF_DMA
-EXTERN_C void hcf_dma_tx_put(IFBP ifbp, DESC_STRCT *d, hcf_16 tx_cntl);
-EXTERN_C DESC_STRCT* hcf_dma_tx_get            (IFBP ifbp );
-EXTERN_C DESC_STRCT* hcf_dma_rx_get            (IFBP ifbp );
-EXTERN_C void hcf_dma_rx_put(IFBP ifbp, DESC_STRCT *d);
-#endif // HCF_DMA
-#if (HCF_ASSERT) & HCF_ASSERT_LNK_MSF_RTN
-EXTERN_C void msf_assert(unsigned int line_number, hcf_16 trace, hcf_32 qual);
-#endif // HCF_ASSERT_LNK_MSF_RTN
-
-#endif  // HCF_H
-
diff --git a/drivers/staging/wlags49_h2/hcfcfg.h b/drivers/staging/wlags49_h2/hcfcfg.h
deleted file mode 100644 (file)
index 869b5c3..0000000
+++ /dev/null
@@ -1,785 +0,0 @@
-
-#ifndef HCFCFG_H
-#define HCFCFG_H 1
-
-/*************************************************************************************************************
-*
-* FILE  : hcfcfg.tpl // hcfcfg.h
-*
-* DATE   : $Date: 2004/08/05 11:47:10 $   $Revision: 1.6 $
-* Original: 2004/04/08 15:18:16    Revision: 1.40      Tag: t20040408_01
-* Original: 2004/04/01 15:32:55    Revision: 1.38      Tag: t7_20040401_01
-* Original: 2004/03/10 15:39:28    Revision: 1.34      Tag: t20040310_01
-* Original: 2004/03/03 14:10:12    Revision: 1.32      Tag: t20040304_01
-* Original: 2004/03/02 09:27:12    Revision: 1.30      Tag: t20040302_03
-* Original: 2004/02/24 13:00:28    Revision: 1.25      Tag: t20040224_01
-* Original: 2004/02/18 17:13:57    Revision: 1.23      Tag: t20040219_01
-*
-* AUTHOR : Nico Valster
-*
-* DESC   : HCF Customization Macros
-* hcfcfg.tpl list all #defines which must be specified to:
-*   adjust the HCF functions defined in HCF.C to the characteristics of a specific environment
-*              o maximum sizes for messages
-*              o Endianness
-*      Compiler specific macros
-*              o port I/O macros
-*              o type definitions
-*
-* By copying HCFCFG.TPL to HCFCFG.H and -if needed- modifying the #defines the WCI functionality can be
-* tailored
-*
-* Supported environments:
-* WVLAN_41     Miniport                                                                NDIS 3.1
-* WVLAN_42     Packet                                                                  Microsoft Visual C 1.5
-* WVLAN_43     16 bits DOS ODI                                                 Microsoft Visual C 1.5
-* WVLAN_44     32 bits ODI (__NETWARE_386__)                   WATCOM
-* WVLAN_45     MAC_OS                                                                  MPW?, Symantec?
-* WVLAN_46     Windows CE (_WIN32_WCE)                                 Microsoft ?
-* WVLAN_47     LINUX  (__LINUX__)                                              GCC, discarded, based on GPL'ed HCF-light
-* WVLAN_48     Miniport                                                                NDIS 5
-* WVLAN_49     LINUX  (__LINUX__)                                              GCC, originally based on pre-compiled HCF_library
-*                                                                                                      migrated to use the HCF sources when Lucent Technologies
-*                                                                                                      brought the HCF module under GPL
-* WVLAN_51     Miniport USB                                                    NDIS 5
-* WVLAN_52     Miniport                                                                NDIS 4
-* WVLAN_53     VxWorks END Station driver
-* WVLAN_54     VxWorks END Access Point driver
-* WVLAN_81     WavePoint                                                               BORLAND C
-* WCITST       Inhouse test tool                                               Microsoft Visual C 1.5
-* WSU          WaveLAN Station Update                                  Microsoft Visual C ??
-* SCO UNIX     not yet actually used ?                                 ?
-* __ppc                OEM supplied                                                    ?
-* _AM29K       OEM supplied                                                    ?
-* ?                    OEM supplied                                                    Microtec Research 80X86 Compiler
-*
-**************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT © 1994 - 1995     by AT&T.                                All Rights Reserved
-* COPYRIGHT © 1996 - 2000 by Lucent Technologies.     All Rights Reserved
-* COPYRIGHT © 2001 - 2004     by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-*************************************************************************************************************/
-
-/*     Alignment
-*      Some platforms can access words on odd boundaries (with possibly an performance impact), at other
-*      platforms such an access may result in a memory access violation.
-*      It is assumed that everywhere where the HCF casts a char pointer into a word pointer, the alignment
-*      criteria are met. This put some restrictions on the MSF, which are assumed to be "automatically" fulfilled
-*      at the applicable platforms
-*      To assert this assumption, the macro HCF_ALIGN can be defined. The default value is 1, meaning byte
-*      alignment (or no alignment), a value of 2 means word alignment, a value of 4 means double word alignment
-*/
-
-/*****************************    IN_PORT_STRING_8_16  S a m p l e s *****************************************
-
-               // C implementation which let the processor handle the word-at-byte-boundary problem
-#define IN_PORT_STRING_8_16( port, addr, n) while ( n-- )      \
-       { *(hcf_16 FAR*)addr = IN_PORT_WORD( port ); ((hcf_8 FAR*)addr)+=2; }
-
-               // C implementation which handles the word-at-byte-boundary problem
-#define IN_PORT_STRING_8_16( port, addr, n)    while ( n-- )    \
-       { hcf_16 i = IN_PORT_WORD(port); *((hcf_8 FAR*)addr)++ = (hcf_8)i; *((hcf_8 FAR*)addr)++ = (hcf_8)(i>>8);}
-
-               // Assembler implementation
-#define IN_PORT_STRING_8_16( port, addr, len) __asm            \
-{                                                                                                              \
-       __asm push di                                                                           \
-       __asm push es                                                                           \
-       __asm mov cx,len                                                                        \
-       __asm les di,addr                                                                       \
-       __asm mov dx,port                                                                       \
-       __asm rep insw                                                                          \
-       __asm pop es                                                                            \
-       __asm pop di                                                                            \
-}
-
-
-*****************************   OUT_PORT_STRING_8_16  S a m p l e s ******************************************
-
-               // C implementation which let the processor handle the word-at-byte-boundary problem
-#define OUT_PORT_STRING_8_16( port, addr, n)   while ( n-- ) \
-       { OUT_PORT_WORD( port, *(hcf_16 FAR*)addr ) ; ((hcf_8 FAR*)addr)+=2; }
-
-               // C implementation which handles the word-at-byte-boundary problem
-#define OUT_PORT_STRING_8_16( port, addr, n)   while ( n-- ) \
-       { OUT_PORT_WORD( port, *((hcf_8 FAR*)addr) | *(((hcf_8 FAR*)addr)+1)<<8  ); (hcf_8 FAR*)addr+=2; }
-
-               // Assembler implementation
-#define OUT_PORT_STRING_8_16( port, addr, len) __asm   \
-{                                                                                                              \
-       __asm push si                                                                           \
-       __asm push ds                                                                           \
-       __asm mov cx,len                                                                        \
-       __asm lds si,addr                                                                       \
-       __asm mov dx,port                                                                       \
-       __asm rep outsw                                                                         \
-       __asm pop ds                                                                            \
-       __asm pop si                                                                            \
-}
-
-*************************************************************************************************************/
-
-
-/************************************************************************************************/
-/******************  C O M P I L E R   S P E C I F I C   M A C R O S  ***************************/
-/************************************************************************************************/
-/*************************************************************************************************
-*
-*                      !!!!!!!!!!!!!!!!!!!!!!!!! Note to the HCF-implementor !!!!!!!!!!!!!!!!!!!!!!!!!
-*                      !!!! Do not call these macros with parameters which introduce side effects !!!!
-*                      !!!!!!!!!!!!!!!!!!!!!!!!! Note to the HCF-implementor !!!!!!!!!!!!!!!!!!!!!!!!!
-*
-*
-* By selecting the appropriate Macro definitions by means of modifying the "#ifdef 0/1" lines, the HCF can be
-* adjusted for the I/O characteristics of a specific compiler
-*
-* If needed the macros can be modified or replaced with definitions appropriate for your personal platform.
-* If you need to make such changes it is appreciated if you inform Agere Systems
-* That way the changes can become part of the next release of the WCI
-*
-* For convenience of the MSF-programmer, all macros are allowed to modify their parameters (although some
-* might argue that this would constitute bad coding practice). This has its implications on the HCF, e.g. as a
-* consequence these macros should not be called with parameters which have side effects, e.g auto-increment.
-*
-* in the Microsoft implementation of inline assembly it is O.K. to corrupt all flags except the direction flag
-* and to corrupt all registers except the segment registers and EDI, ESI, ESP and EBP (or their 16 bits
-* equivalents).  Other environments may have other constraints
-*
-* in the Intel environment it is O.K to have a word (as a 16 bits quantity) at a byte boundary, hence
-* IN_/OUT_PORT_STRING_8_16 can move words between PC-memory and NIC-memory with as only constraint that the
-* words are on a word boundary in NIC-memory. This does not hold true for all conceivable environments, e.g.
-* an Motorola 68xxx does not allow this. Probably/hopefully the boundary conditions imposed by these type of
-* platforms prevent this case from materializing.  If this is not the case, OUT_PORT_STRING_8_16 must be coded
-* by combining two Host memory hcf_8 values at a time to a single hcf_16 value to be passed to the NIC and
-* IN_PORT_STRING_8_16 the single hcf_16 retrieved from the NIC must be split in two hcf_8 values to be stored
-* in Host memory (see the sample code above)
-*
-*      The prototypes and functional description of the macros are:
-*
-*      hcf_16  IN_PORT_WORD( hcf_16 port )
-*                      Reads a word (16 bits) from the specified port
-*
-*      void    OUT_PORT_WORD( hcf_16 port, hcf_16 value)
-*                      Writes a word (16 bits) to the specified port
-*
-*      hcf_16  IN_PORT_DWORD( hcf_16 port )
-*                      Reads a dword (32 bits) from the specified port
-*
-*      void    OUT_PORT_DWORD( hcf_16 port, hcf_32 value)
-*                      Writes a dword (32 bits) to the specified port
-*
-*      void    IN_PORT_STRING_8_16( port, addr, len)
-*                      Reads len number of words (16 bits) from NIC memory via the specified port to the (FAR)
-*                      byte-pointer addr in PC-RAM
-*                      Note that len specifies the number of words, NOT the number of bytes
-*                      !!!NOTE, although len specifies the number of words, addr MUST be a char pointer NOTE!!!
-*                      See also the common notes for IN_PORT_STRING_8_16 and OUT_PORT_STRING_8_16
-*
-*      void    OUT_PORT_STRING_8_16( port, addr, len)
-*                      Writes len number of words (16 bits) from the (FAR) byte-pointer addr in PC-RAM via the specified
-*                      port to NIC memory
-*                      Note that len specifies the number of words, NOT the number of bytes.
-*                      !!!NOTE, although len specifies the number of words, addr MUST be a char pointer NOTE!!!
-*
-*                      The peculiar combination of word-length and char pointers for IN_PORT_STRING_8_16 as well as
-*                      OUT_PORT_STRING_8_16 is justified by the assumption that it offers a more optimal algorithm
-*
-*      void    IN_PORT_STRING_32( port, addr, len)
-*                      Reads len number of double-words (32 bits) from NIC memory via the specified port to the (FAR)
-*                      double-word address addr in PC-RAM
-*
-*      void    OUT_PORT_STRING_32( port, addr, len)
-*                      Writes len number of double-words (32 bits) from the (FAR) double-word address addr in PC-RAM via
-*                      the specified port to NIC memory
-*
-*                      !!!!!!!!!!!!!!!!!!!!!!!!! Note to the HCF-implementor !!!!!!!!!!!!!!!!!!!!!!!!!
-*                      !!!! Do not call these macros with parameters which introduce side effects !!!!
-*                      !!!!!!!!!!!!!!!!!!!!!!!!! Note to the HCF-implementor !!!!!!!!!!!!!!!!!!!!!!!!!
-*
-*************************************************************************************************/
-
-/****************************  define INT Types  ******************************/
-typedef unsigned char                  hcf_8;
-typedef unsigned short                 hcf_16;
-typedef unsigned long                  hcf_32;
-
-/****************************  define I/O Types  ******************************/
-#define HCF_IO_MEM                             0x0001  // memory mapped I/O    ( 0: Port I/O )
-#define HCF_IO_32BITS                  0x0002  // 32Bits support               ( 0: only 16 Bits I/O)
-
-/****************************** #define HCF_TYPE ********************************/
-#define HCF_TYPE_NONE                  0x0000  // No type
-#define HCF_TYPE_WPA                   0x0001  // WPA support
-#define HCF_TYPE_USB                   0x0002  // reserved (USB Dongle driver support)
-//#define HCF_TYPE_HII                 0x0004  // Hermes-II, to discriminate H-I and H-II CFG_HCF_OPT_STRCT
-#define HCF_TYPE_WARP                  0x0008  // WARP F/W
-#define HCF_TYPE_PRELOADED             0x0040  // pre-loaded F/W
-#define HCF_TYPE_HII5                  0x0080  // Hermes-2.5 H/W
-#define HCF_TYPE_CCX                   0x0100  // CKIP
-#define HCF_TYPE_BEAGLE_HII5   0x0200  // Beagle Hermes-2.5 H/W
-#define HCF_TYPE_TX_DELAY              0x4000  // Delayed transmission ( non-DMA only)
-
-/****************************** #define HCF_ASSERT ******************************/
-#define HCF_ASSERT_NONE                        0x0000  // No assert support
-#define HCF_ASSERT_PRINTF              0x0001  // Hermes generated debug info
-#define HCF_ASSERT_SW_SUP              0x0002  // logging via Hermes support register
-#define HCF_ASSERT_MB                  0x0004  // logging via Mailbox
-#define HCF_ASSERT_RT_MSF_RTN  0x4000  // dynamically binding of msf_assert routine
-#define HCF_ASSERT_LNK_MSF_RTN 0x8000  // statically binding of msf_assert routine
-
-/****************************** #define HCF_ENCAP *******************************/
-#define HCF_ENC_NONE                   0x0000  // No encapsulation support
-#define HCF_ENC                                        0x0001  // HCF handles En-/Decapsulation
-#define HCF_ENC_SUP                            0x0002  // HCF supports MSF to handle En-/Decapsulation
-
-/****************************** #define HCF_EXT *********************************/
-#define HCF_EXT_NONE                   0x0000  // No expanded features
-#define HCF_EXT_INFO_LOG               0x0001  // logging of Hermes Info frames
-//#define HCF_EXT_INT_TX_OK            0x0002  // RESERVED!!! monitoring successful Tx message
-#define HCF_EXT_INT_TX_EX              0x0004  // monitoring unsuccessful Tx message
-//#define HCF_EXT_MON_MODE             0x0008  // LEGACY
-#define HCF_EXT_TALLIES_FW             0x0010  // support for up to 32 Hermes Engineering tallies
-#define HCF_EXT_TALLIES_HCF            0x0020  // support for up to 8 HCF Engineering tallies
-#define HCF_EXT_NIC_ACCESS             0x0040  // direct access via Aux-ports and to Hermes registers and commands
-#define HCF_EXT_MB                             0x0080  // MailBox code expanded
-#define HCF_EXT_IFB_STRCT              0x0100  // MSF custom pointer in IFB
-#define HCF_EXT_DESC_STRCT             0x0200  // MSF custom pointer in Descriptor
-#define HCF_EXT_TX_CONT                        0x4000  // Continuous transmit test
-#define HCF_EXT_INT_TICK               0x8000  // enables TimerTick interrupt generation
-
-/****************************** #define HCF_SLEEP *******************************/
-#define HCF_DDS                                        0x0001  // Disconnected Deep Sleep
-#define HCF_CDS                                        0x0002  // Connected Deep Sleep
-
-/****************************** #define HCF_TALLIES ******************************/
-#define HCF_TALLIES_NONE               0x0000  // No tally support
-#define HCF_TALLIES_NIC                        0x0001  // Hermes Tallies accumulated in IFB
-#define HCF_TALLIES_HCF                        0x0002  // HCF Tallies accumulated in IFB
-#define HCF_TALLIES_RESET              0x8000  // Tallies in IFB are reset when reported via hcf_get_info
-
-/************************************************************************************************/
-/******************************************  L I N U X  *****************************************/
-/************************************************************************************************/
-
-#ifdef WVLAN_49
-#include <asm/io.h>
-//#include <linux/module.h>
-#include <wl_version.h>
-
-/* The following macro ensures that no symbols are exported, minimizing the chance of a symbol
-   collision in the kernel */
-//EXPORT_NO_SYMBOLS;  //;?this place seems not appropriately to me
-
-//#define HCF_SLEEP (HCF_CDS | HCF_DDS )
-#define HCF_SLEEP (HCF_CDS)
-
-/* Note: Non-WARP firmware all support WPA. However the original Agere
- * linux driver does not enable WPA. Enabling WPA here causes whatever
- * preliminary WPA logic to be included, some of which may be specific
- * to HERMESI.
- *
- * Various comment are clear that WARP and WPA are not compatible
- * (which may just mean WARP does WPA in a different fashion).
- */
-
-/* #define HCF_TYPE    (HCF_TYPE_HII5|HCF_TYPE_STA|HCF_TYPE_AP) */
-#ifdef HERMES25
-#ifdef WARP
-#define HCF_TYPE    ( HCF_TYPE_WARP | HCF_TYPE_HII5 )
-#else
-#define HCF_TYPE    (HCF_TYPE_HII5 | HCF_TYPE_WPA)
-#endif /* WARP */
-#else
-#define HCF_TYPE    HCF_TYPE_WPA
-#endif /* HERMES25 */
-
-#ifdef ENABLE_DMA
-#define HCF_DMA                1
-#endif // ENABLE_DMA
-
-/* We now need a switch to include support for the Mailbox and other necessary extensions */
-#define HCF_EXT ( HCF_EXT_MB | HCF_EXT_INFO_LOG | HCF_EXT_INT_TICK )//get deepsleep exercise going
-
-/* ;? The Linux MSF still uses these definitions; define it here until it's removed */
-#ifndef HCF_TYPE_HII
-#define HCF_TYPE_HII 0x0004
-#endif
-
-#ifndef HCF_TYPE_AP
-#define HCF_TYPE_AP  0x0010
-#endif
-
-#ifndef HCF_TYPE_STA
-#define HCF_TYPE_STA 0x0020
-#endif  // HCF_TYPE_STA
-
-/* Guarantees word alignment */
-#define HCF_ALIGN              2
-
-/* Endian macros CNV_INT_TO_LITTLE() and CNV_LITTLE_TO_INT() were renamed to
-   CNV_SHORT_TO_LITTLE() and CNV_LITTLE_TO_SHORT() */
-#ifndef CNV_INT_TO_LITTLE
-#define CNV_INT_TO_LITTLE   CNV_SHORT_TO_LITTLE
-#endif
-
-#ifndef CNV_LITTLE_TO_INT
-#define CNV_LITTLE_TO_INT   CNV_LITTLE_TO_SHORT
-#endif
-
-#define        HCF_ERR_BUSY                    0x06
-
-/* UIL defines were removed from the HCF */
-#define UIL_SUCCESS                                    HCF_SUCCESS
-#define UIL_ERR_TIME_OUT                       HCF_ERR_TIME_OUT
-#define UIL_ERR_NO_NIC                         HCF_ERR_NO_NIC
-#define UIL_ERR_LEN                                    HCF_ERR_LEN
-#define UIL_ERR_MIN                                    HCF_ERR_MAX     /*end of HCF errors which are passed through to UIL
-                                                                                                 *** ** *** ****** ***** *** ****** ******* ** ***  */
-#define UIL_ERR_IN_USE                         0x44
-#define UIL_ERR_WRONG_IFB                      0x46
-#define UIL_ERR_MAX                                    0x7F            /*upper boundary of UIL errors without HCF-pendant
-                                                  ***** ******** ** *** ****** ******* *** *******  */
-#define UIL_ERR_BUSY                       HCF_ERR_BUSY
-#define UIL_ERR_DIAG_1                     HCF_ERR_DIAG_1
-#define UIL_FAILURE                                    0xFF    /* 20010705 nv this relick should be eridicated */
-#define UIL_ERR_PIF_CONFLICT           0x40    //obsolete
-#define UIL_ERR_INCOMP_DRV                     0x41    //obsolete
-#define UIL_ERR_DOS_CALL                       0x43    //obsolete
-#define UIL_ERR_NO_DRV                         0x42    //obsolete
-#define UIL_ERR_NSTL                           0x45    //obsolete
-
-
-
-#if 0  //;? #ifdef get this going LATER HERMES25
-#define HCF_IO              HCF_IO_32BITS
-#define HCF_DMA             1
-#define HCF_DESC_STRCT_EXT  4
-
-/* Switch for BusMaster DMA support. Note that the above define includes the DMA-specific HCF
-   code in the build. This define sets the MSF to use DMA; if ENABLE_DMA is not defined, then
-   port I/O will be used in the build */
-#ifndef BUS_PCMCIA
-#define ENABLE_DMA
-#endif  // USE_PCMCIA
-
-#endif  // HERMES25
-
-
-/* Overrule standard WaveLAN Packet Size when in DMA mode */
-#ifdef ENABLE_DMA
-#define HCF_MAX_PACKET_SIZE 2304
-#else
-#define HCF_MAX_PACKET_SIZE 1514
-#endif  // ENABLE_DMA
-
-/* The following sets the component ID, as well as the versioning. See also wl_version.h */
-#define        MSF_COMPONENT_ID        COMP_ID_LINUX
-
-#define        MSF_COMPONENT_VAR                       DRV_VARIANT
-#define MSF_COMPONENT_MAJOR_VER     DRV_MAJOR_VERSION
-#define MSF_COMPONENT_MINOR_VER     DRV_MINOR_VERSION
-
-/* Define the following to turn on assertions in the HCF */
-//#define HCF_ASSERT  0x8000
-#define HCF_ASSERT                     HCF_ASSERT_LNK_MSF_RTN  // statically binding of msf_assert routine
-
-#ifdef USE_BIG_ENDIAN
-#define HCF_BIG_ENDIAN  1
-#else
-#define HCF_BIG_ENDIAN  0
-#endif  /* USE_BIG_ENDIAN */
-
-/* Define the following if your system uses memory-mapped IO */
-//#define HCF_MEM_IO
-
-/* The following defines the standard macros required by the HCF to move data to/from the card */
-#define IN_PORT_BYTE(port)                     ((hcf_8)inb( (hcf_io)(port) ))
-#define IN_PORT_WORD(port)                     ((hcf_16)inw( (hcf_io)(port) ))
-#define OUT_PORT_BYTE(port, value)     (outb( (hcf_8) (value), (hcf_io)(port) ))
-#define OUT_PORT_WORD(port, value)     (outw((hcf_16) (value), (hcf_io)(port) ))
-
-#define IN_PORT_STRING_16(port, dst, n)    insw((hcf_io)(port), dst, n)
-#define OUT_PORT_STRING_16(port, src, n)   outsw((hcf_io)(port), src, n)
-//#define IN_PORT_STRINGL(port, dst, n)   insl((port), (dst), (n))
-//#define OUT_PORT_STRINGL(port, src, n)  outsl((port), (src), (n))
-#define IN_PORT_STRING_32(port, dst, n)   insl((port), (dst), (n))
-#define OUT_PORT_STRING_32(port, src, n)  outsl((port), (src), (n))
-#define IN_PORT_HCF32(port)          inl( (hcf_io)(port) )
-#define OUT_PORT_HCF32(port, value)  outl((hcf_32)(value), (hcf_io)(port) )
-
-#define IN_PORT_DWORD(port)          IN_PORT_HCF32(port)
-#define OUT_PORT_DWORD(port, value)  OUT_PORT_HCF32(port, value)
-
-#define  IN_PORT_STRING_8_16(port, addr, len)  IN_PORT_STRING_16(port, addr, len)
-#define  OUT_PORT_STRING_8_16(port, addr, len) OUT_PORT_STRING_16(port, addr, len)
-
-#ifndef CFG_SCAN_CHANNELS_2GHZ
-#define CFG_SCAN_CHANNELS_2GHZ 0xFCC2
-#endif /* CFG_SCAN_CHANNELS_2GHZ */
-
-#define HCF_MAX_MSG 1600 //get going ;?
-#endif // WVLAN_49
-
-/************************************************************************************************************/
-/***********************************                                   **************************************/
-/************************************************************************************************************/
-#if ! defined  HCF_ALIGN
-#define                HCF_ALIGN                       1               //default to no alignment
-#endif //              HCF_ALIGN
-
-#if ! defined  HCF_ASSERT
-#define                HCF_ASSERT                      0
-#endif //              HCF_ASSERT
-
-#if ! defined  HCF_BIG_ENDIAN
-#define                HCF_BIG_ENDIAN          0
-#endif //              HCF_BIG_ENDIAN
-
-#if ! defined  HCF_DMA
-#define                HCF_DMA                         0
-#endif //              HCF_DMA
-
-#if ! defined  HCF_ENCAP
-#define                        HCF_ENCAP                       HCF_ENC
-#endif //              HCF_ENCAP
-
-#if ! defined  HCF_EXT
-#define                        HCF_EXT                         0
-#endif //              HCF_EXT
-
-#if ! defined  HCF_INT_ON
-#define                        HCF_INT_ON                      1
-#endif //              HCF_INT_ON
-
-#if ! defined  HCF_IO
-#define                        HCF_IO                          0               //default 16 bits support only, port I/O
-#endif //              HCF_IO
-
-#if ! defined  HCF_LEGACY
-#define                        HCF_LEGACY                      0
-#endif //              HCF_LEGACY
-
-#if ! defined  HCF_MAX_LTV
-#define                HCF_MAX_LTV                     1200    // sufficient for all known purposes
-#endif //              HCF_MAX_LTV
-
-#if ! defined  HCF_PROT_TIME
-#define                HCF_PROT_TIME           100             // number of 10K microsec protection timer against H/W malfunction
-#endif //              HCF_PROT_TIME
-
-#if ! defined  HCF_SLEEP
-#define                        HCF_SLEEP                       0
-#endif //              HCF_SLEEP
-
-#if ! defined  HCF_TALLIES
-#define                        HCF_TALLIES                     ( HCF_TALLIES_NIC | HCF_TALLIES_HCF )
-#endif //              HCF_TALLIES
-
-#if ! defined  HCF_TYPE
-#define                HCF_TYPE                        0
-#endif //              HCF_TYPE
-
-#if                            HCF_BIG_ENDIAN
-#undef                 HCF_BIG_ENDIAN
-#define                        HCF_BIG_ENDIAN          1               //just for convenience of generating cfg_hcf_opt
-#endif //              HCF_BIG_ENDIAN
-
-#if                            HCF_DMA
-#undef                 HCF_DMA
-#define                        HCF_DMA                         1               //just for convenience of generating cfg_hcf_opt
-#endif //              HCF_DMA
-
-#if                            HCF_INT_ON
-#undef                 HCF_INT_ON
-#define                        HCF_INT_ON                      1               //just for convenience of generating cfg_hcf_opt
-#endif //              HCF_INT_ON
-
-
-#if ! defined IN_PORT_STRING_8_16
-#define  IN_PORT_STRING_8_16(port, addr, len)  IN_PORT_STRING_16(port, addr, len)
-#define  OUT_PORT_STRING_8_16(port, addr, len) OUT_PORT_STRING_16(port, addr, len)
-#endif // IN_PORT_STRING_8_16
-
-/************************************************************************************************/
-/**********                                                                         *************/
-/************************************************************************************************/
-
-#if ! defined  FAR
-#define                FAR                                             // default to flat 32-bits code
-#endif //              FAR
-
-typedef hcf_8  FAR *wci_bufp;                  // segmented 16-bits or flat 32-bits pointer to 8 bits unit
-typedef hcf_16 FAR *wci_recordp;               // segmented 16-bits or flat 32-bits pointer to 16 bits unit
-
-/*     I/O Address size
-*      Platforms which use port mapped I/O will (in general) have a 64k I/O space, conveniently expressed in a
-*      16-bits quantity
-*      Platforms which use memory mapped I/O will (in general) have an I/O space much larger than 64k, and need a
-*      32-bits quantity to express the I/O base
-*/
-
-#if HCF_IO & HCF_IO_MEM
-typedef hcf_32 hcf_io;
-#else
-typedef hcf_16 hcf_io;
-#endif //HCF_IO
-
-#if    HCF_PROT_TIME > 128
-#define HCF_PROT_TIME_SHFT     3
-#define HCF_PROT_TIME_DIV      8
-#elif  HCF_PROT_TIME > 64
-#define HCF_PROT_TIME_SHFT     2
-#define HCF_PROT_TIME_DIV      4
-#elif  HCF_PROT_TIME > 32
-#define HCF_PROT_TIME_SHFT     1
-#define HCF_PROT_TIME_DIV      2
-#else //HCF_PROT_TIME >= 19
-#define HCF_PROT_TIME_SHFT     0
-#define HCF_PROT_TIME_DIV      1
-#endif
-
-#define HCF_PROT_TIME_CNT (HCF_PROT_TIME / HCF_PROT_TIME_DIV)
-
-
-/************************************************************************************************************/
-/******************************************* . . . . . . . . .  *********************************************/
-/************************************************************************************************************/
-
-/* MSF_COMPONENT_ID is used to define the CFG_IDENTITY_STRCT in HCF.C
-* CFG_IDENTITY_STRCT is defined in HCF.C purely based on convenience arguments.
-* The HCF can not have the knowledge to determine the ComponentId field of the Identity record (aka as
-* Version Record), therefore the MSF part of the Drivers must supply this value via the System Constant
-* MSF_COMPONENT_ID.
-* There is a set of values predefined in MDD.H (format COMP_ID_.....)
-*
-* Note that taking MSF_COMPONENT_ID as a default value for DUI_COMPAT_VAR is purely an implementation
-* convenience, the numerical values of these two quantities have none functional relationship whatsoever.
-*/
-
-#if defined    MSF_COMPONENT_ID
-
-#if ! defined  DUI_COMPAT_VAR
-#define                        DUI_COMPAT_VAR          MSF_COMPONENT_ID
-#endif //              DUI_COMPAT_VAR
-
-#if ! defined  DUI_COMPAT_BOT          //;?this way utilities can lower as well raise the bottom
-#define                        DUI_COMPAT_BOT          8
-#endif //              DUI_COMPAT_BOT
-
-#if ! defined  DUI_COMPAT_TOP          //;?this way utilities can lower as well raise the top
-#define                        DUI_COMPAT_TOP       8
-#endif //              DUI_COMPAT_TOP
-
-#endif // MSF_COMPONENT_ID
-
-#if (HCF_TYPE) & HCF_TYPE_HII5
-
-#if ! defined  HCF_HSI_VAR_5
-#define                        HCF_HSI_VAR_5
-#endif //              HCF_HSI_VAR_5
-
-#if ! defined  HCF_APF_VAR_4
-#define                        HCF_APF_VAR_4
-#endif //              HCF_APF_VAR_4
-
-#if (HCF_TYPE) & HCF_TYPE_WARP
-#if ! defined  HCF_STA_VAR_4
-#define                        HCF_STA_VAR_4
-#endif //              HCF_STA_VAR_4
-#else
-#if ! defined  HCF_STA_VAR_2
-#define                        HCF_STA_VAR_2
-#endif //              HCF_STA_VAR_2
-#endif
-
-#if defined HCF_HSI_VAR_4
-err: HSI variants 4 correspond with HII;
-#endif // HCF_HSI_VAR_4
-
-#else
-
-#if ! defined  HCF_HSI_VAR_4
-#define                        HCF_HSI_VAR_4           //Hermes-II all types (for the time being!)
-#endif //              HCF_HSI_VAR_4
-
-#if ! defined  HCF_APF_VAR_2
-#define                HCF_APF_VAR_2
-#endif //              HCF_APF_VAR_2
-
-#if ! defined  HCF_STA_VAR_2
-#define                        HCF_STA_VAR_2
-#endif //              HCF_STA_VAR_2
-
-#endif // HCF_TYPE_HII5
-
-#if ! defined  HCF_PRI_VAR_3
-#define                HCF_PRI_VAR_3
-#endif //              HCF_PRI_VAR_3
-
-#if defined HCF_HSI_VAR_1 || defined HCF_HSI_VAR_2 || defined HCF_HSI_VAR_3
-err: HSI variants 1, 2 and 3 correspond with H-I only;
-#endif // HCF_HSI_VAR_1, HCF_HSI_VAR_2, HCF_HSI_VAR_3
-
-#if defined HCF_PRI_VAR_1 || defined HCF_PRI_VAR_2
-err: primary variants 1 and 2 correspond with H-I only;
-#endif // HCF_PRI_VAR_1 / HCF_PRI_VAR_2
-
-
-/************************************************************************************************************/
-/******************************************* . . . . . . . . .  *********************************************/
-/************************************************************************************************************/
-
-
-/* The BASED customization macro is used to resolves the SS!=DS conflict for the Interrupt Service logic in
- * DOS Drivers. Due to the cumbersomeness of mixing C and assembler local BASED variables still end up in the
- * wrong segment. The workaround is that the HCF uses only global BASED variables or IFB-based variables.
- * The "BASED" construction (supposedly) only amounts to something in the small memory model.
- *
- * Note that the whole BASED rigmarole is needlessly complicated because both the Microsoft Compiler and
- * Linker are unnecessary restrictive in what far pointer manipulation they allow
- */
-
-#if ! defined  BASED
-#define                BASED
-#endif //              BASED
-
-#if ! defined  EXTERN_C
-#ifdef __cplusplus
-#define                        EXTERN_C extern "C"
-#else
-#define                        EXTERN_C
-#endif // __cplusplus
-#endif //              EXTERN_C
-
-#if ! defined  NULL
-#define                        NULL    ((void *) 0)
-#endif //              NULL
-
-#if ! defined  TEXT
-#define                        TEXT(x) x
-#endif //              TEXT
-
-/************************************************************************************************************/
-/*********************** C O N F L I C T   D E T E C T I O N  &  R E S O L U T I O N ************************/
-/************************************************************************************************************/
-#if HCF_ALIGN != 1 && HCF_ALIGN != 2 && HCF_ALIGN != 4 && HCF_ALIGN != 8
-err: invalid value for HCF_ALIGN;
-#endif // HCF_ALIGN
-
-#if (HCF_ASSERT) & ~( HCF_ASSERT_PRINTF | HCF_ASSERT_SW_SUP | HCF_ASSERT_MB | HCF_ASSERT_RT_MSF_RTN | \
-                                         HCF_ASSERT_LNK_MSF_RTN )
-err: invalid value for HCF_ASSERT;
-#endif // HCF_ASSERT
-
-#if (HCF_ASSERT) & HCF_ASSERT_MB && ! ( (HCF_EXT) & HCF_EXT_MB )               //detect potential conflict
-err: these macros are not used consistently;
-#endif // HCF_ASSERT_MB / HCF_EXT_MB
-
-#if HCF_BIG_ENDIAN != 0 && HCF_BIG_ENDIAN != 1
-err: invalid value for HCF_BIG_ENDIAN;
-#endif // HCF_BIG_ENDIAN
-
-#if HCF_DMA != 0 && HCF_DMA != 1
-err: invalid value for HCF_DMA;
-#endif // HCF_DMA
-
-#if (HCF_ENCAP) & ~( HCF_ENC | HCF_ENC_SUP )
-err: invalid value for HCF_ENCAP;
-#endif // HCF_ENCAP
-
-#if (HCF_EXT) & ~( HCF_EXT_INFO_LOG | HCF_EXT_INT_TX_EX | HCF_EXT_TALLIES_FW | HCF_EXT_TALLIES_HCF     | \
-                                  HCF_EXT_NIC_ACCESS | HCF_EXT_MB | HCF_EXT_INT_TICK | \
-                                  HCF_EXT_IFB_STRCT | HCF_EXT_DESC_STRCT | HCF_EXT_TX_CONT )
-err: invalid value for HCF_EXT;
-#endif // HCF_EXT
-
-#if HCF_INT_ON != 0 && HCF_INT_ON != 1
-err: invalid value for HCF_INT_ON;
-#endif // HCF_INT_ON
-
-#if (HCF_IO) & ~( HCF_IO_MEM | HCF_IO_32BITS )
-err: invalid value for HCF_IO;
-#endif // HCF_IO
-
-#if HCF_LEGACY != 0 && HCF_LEGACY != 1
-err: invalid value for HCF_LEGACY;
-#endif // HCF_LEGACY
-
-#if HCF_MAX_LTV < 16 || HCF_MAX_LTV > 2304
-err: invalid value for HCF_MAX_LTV;
-#endif // HCF_MAX_LTV
-
-#if HCF_PROT_TIME != 0 && ( HCF_PROT_TIME < 19 || 256 < HCF_PROT_TIME )
-err: below minimum .08 second required by Hermes or possibly above hcf_32 capacity;
-#endif // HCF_PROT_TIME
-
-#if (HCF_SLEEP) & ~( HCF_CDS | HCF_DDS )
-err: invalid value for HCF_SLEEP;
-#endif // HCF_SLEEP
-
-#if (HCF_SLEEP) && ! (HCF_INT_ON)
-err: these macros are not used consistently;
-#endif // HCF_SLEEP / HCF_INT_ON
-
-#if (HCF_SLEEP) && ! ( (HCF_EXT) & HCF_EXT_INT_TICK )
-//;? err: these macros are not used consistently;
-#endif // HCF_SLEEP / HCF_EXT_INT_TICK
-
-#if (HCF_TALLIES) & ~( HCF_TALLIES_HCF | HCF_TALLIES_NIC | HCF_TALLIES_RESET ) || \
-       (HCF_TALLIES) == HCF_TALLIES_RESET
-err: invalid value for HCF_TALLIES;
-#endif // HCF_TALLIES
-
-#if (HCF_TYPE) & ~(HCF_TYPE_WPA | HCF_TYPE_USB | HCF_TYPE_PRELOADED | HCF_TYPE_HII5 | HCF_TYPE_WARP | \
-               HCF_TYPE_CCX /* | HCF_TYPE_TX_DELAY */ )
-err: invalid value for HCF_TYPE;
-#endif //HCF_TYPE
-
-#if (HCF_TYPE) & HCF_TYPE_WARP && (HCF_TYPE) & HCF_TYPE_WPA
-err: at most 1 of these macros should be defined;
-#endif //HCF_TYPE_WARP / HCF_TYPE_WPA
-
-#endif //HCFCFG_H
-
diff --git a/drivers/staging/wlags49_h2/hcfdef.h b/drivers/staging/wlags49_h2/hcfdef.h
deleted file mode 100644 (file)
index 74c0f71..0000000
+++ /dev/null
@@ -1,752 +0,0 @@
-#ifndef HCFDEFC_H
-#define HCFDEFC_H 1
-
-/*************************************************************************************************
- *
- * FILE   : HCFDEF.H
- *
- * DATE   : $Date: 2004/08/05 11:47:10 $   $Revision: 1.8 $
- * Original: 2004/05/28 14:05:35    Revision: 1.59      Tag: hcf7_t20040602_01
- * Original: 2004/05/13 15:31:45    Revision: 1.53      Tag: hcf7_t7_20040513_01
- * Original: 2004/04/15 09:24:42    Revision: 1.44      Tag: hcf7_t7_20040415_01
- * Original: 2004/04/13 14:22:45    Revision: 1.43      Tag: t7_20040413_01
- * Original: 2004/04/01 15:32:55    Revision: 1.40      Tag: t7_20040401_01
- * Original: 2004/03/10 15:39:28    Revision: 1.36      Tag: t20040310_01
- * Original: 2004/03/03 14:10:12    Revision: 1.34      Tag: t20040304_01
- * Original: 2004/03/02 09:27:12    Revision: 1.32      Tag: t20040302_03
- * Original: 2004/02/24 13:00:29    Revision: 1.29      Tag: t20040224_01
- * Original: 2004/02/18 17:13:57    Revision: 1.26      Tag: t20040219_01
- *
- * AUTHOR : Nico Valster
- *
- * SPECIFICATION: ...........
- *
- * DESC   : Definitions and Prototypes for HCF only
- *
- **************************************************************************************************
- *
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * COPYRIGHT © 1994 - 1995   by AT&T.                All Rights Reserved
- * COPYRIGHT © 1996 - 2000 by Lucent Technologies.   All Rights Reserved
- * COPYRIGHT © 2001 - 2004   by Agere Systems Inc.   All Rights Reserved
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- *
- *************************************************************************************************/
-
-
-/************************************************************************************************/
-/*********************************  P R E F I X E S  ********************************************/
-/************************************************************************************************/
-//IFB_      Interface Block
-//HCMD_     Hermes Command
-//HFS_      Hermes (Transmit/Receive) Frame Structure
-//HREG_     Hermes Register
-
-/*************************************************************************************************/
-
-/************************************************************************************************/
-/********************************* GENERAL EQUATES **********************************************/
-/************************************************************************************************/
-
-
-#define HCF_MAGIC               0x7D37  // "}7" Handle validation
-
-#define PLUG_DATA_OFFSET        0x00000800  //needed by some test tool on top of H-II NDIS driver
-
-#define INI_TICK_INI            0x00040000L
-
-#define IO_IN                   0       //hcfio_in_string
-#define IO_OUT                  1       //hcfio_out_string
-
-//DO_ASSERT, create an artificial FALSE to force an ASSERT without the nasty compiler warning
-#define DO_ASSERT               ( assert_ifbp->IFB_Magic != HCF_MAGIC && assert_ifbp->IFB_Magic == HCF_MAGIC )
-#define NT_ASSERT               0x0000      //, NEVER_TESTED
-#define NEVER_TESTED            MERGE_2( 0xEFFE, 0xFEEF )
-#define SE_ASSERT               0x5EFF      /* Side Effect, HCFASSERT invokation which are only called for the
-                                             * side effect and which should never trigger */
-#define DHF_FILE_NAME_OFFSET    10000       //to distinguish DHF from HCF asserts by means of line number
-#define MMD_FILE_NAME_OFFSET    20000       //to distinguish MMD from HCF asserts by means of line number
-
-// trace codes used to
-// 1: profile execution times via HCF_TRACE and HCF_TRACE_VALUE
-// 2: hierarchical flow information via HCFLOGENTRY / HCFLOGEXIT
-
-//#define HCF_TRACE_CONNECT     useless
-//#define HCF_TRACE_DISCONNECT  useless
-#define HCF_TRACE_ACTION        0x0000  // 0x0001
-#define HCF_TRACE_CNTL          0x0001  // 0x0002
-#define HCF_TRACE_DMA_RX_GET    0x0002  // 0x0004
-#define HCF_TRACE_DMA_RX_PUT    0x0003  // 0x0008
-#define HCF_TRACE_DMA_TX_GET    0x0004  // 0x0010
-#define HCF_TRACE_DMA_TX_PUT    0x0005  // 0x0020
-#define HCF_TRACE_GET_INFO      0x0006  // 0x0040
-#define HCF_TRACE_PUT_INFO      0x0007  // 0x0080
-#define HCF_TRACE_RCV_MSG       0x0008  // 0x0100
-#define HCF_TRACE_SEND_MSG      0x0009  // 0x0200
-#define HCF_TRACE_SERVICE_NIC   0x000A  // 0x0400
-// #define HCF_TRACE_           0x000C  // 0x1000
-// #define HCF_TRACE_           0x000D  // 0x2000
-// #define HCF_TRACE_           0x000E  // 0x4000
-// #define HCF_TRACE_           0x000F  // 0x8000
-//  ============================================ HCF_TRACE_... codes below 0x0010 are asserted on re-entry
-#define HCF_TRACE_ACTION_KLUDGE 0x0010  /* once you start introducing kludges there is no end to it
-                                         * this is an escape to do not assert on re-entrancy problem caused
-                                         * by HCF_ACT_INT_FORCE_ON used to get Microsofts NDIS drivers going
-                                         */
-#define HCF_TRACE_STRIO         0x0020
-#define HCF_TRACE_ALLOC         0X0021
-#define HCF_TRACE_DL            0X0023
-#define HCF_TRACE_ISR_INFO      0X0024
-#define HCF_TRACE_CALIBRATE     0x0026
-
-#define HCF_TRACE_CMD_CPL       0x0040
-#define HCF_TRACE_CMD_EXE       0x0041
-#define HCF_TRACE_GET_FID       0x0042
-#define HCF_TRACE_GET_FRAG      0x0043
-#define HCF_TRACE_INIT          0x0044
-#define HCF_TRACE_PUT_FRAG      0x0045
-#define HCF_TRACE_SETUP_BAP     0x0046
-
-#define HCF_TRACE_EXIT          0x8000  // Keil C warns "long constant truncated to int"
-
-//#define BAP_0                 HREG_DATA_0     //Used by DMA controller to access NIC RAM
-#define BAP_1                   HREG_DATA_1     //Used by HCF to access NIC RAM
-
-
-//************************* Hermes Receive/Transmit Frame Structures
-//HFS_STAT
-//see MMD.H for HFS_STAT_ERR
-#define     HFS_STAT_MSG_TYPE   0xE000  //Hermes reported Message Type
-#define     HFS_STAT_MIC_KEY_ID 0x1800  //MIC key used (if any)
-#define     HFS_STAT_1042       0x2000  //RFC1042 Encoded
-#define     HFS_STAT_TUNNEL     0x4000  //Bridge-Tunnel Encoded
-#define     HFS_STAT_WMP_MSG    0x6000  //WaveLAN-II Management Protocol Frame
-#if (HCF_TYPE) & HCF_TYPE_WPA
-#define     HFS_STAT_MIC        0x0010  //Frame contains MIC  //;? re-instate when F/W ready
-#endif
-
-//************************* Hermes Register Offsets and Command bits
-#define HREG_IO_RANGE           0x80        //I/O Range used by Hermes
-
-
-//************************* Command/Status
-#define HREG_CMD                0x00        //
-#define     HCMD_CMD_CODE           0x3F
-#define HREG_PARAM_0            0x02        //
-#define HREG_PARAM_1            0x04        //
-#define HREG_PARAM_2            0x06        //
-#define HREG_STAT               0x08        //
-#define     HREG_STAT_CMD_CODE      0x003F  //
-#define     HREG_STAT_DIAG_ERR      0x0100
-#define     HREG_STAT_INQUIRE_ERR   0x0500
-#define     HREG_STAT_CMD_RESULT    0x7F00  //
-#define HREG_RESP_0             0x0A        //
-#define HREG_RESP_1             0x0C        //
-#define HREG_RESP_2             0x0E        //
-
-
-//************************* FID Management
-#define HREG_INFO_FID           0x10        //
-#define HREG_RX_FID             0x20        //
-#define HREG_ALLOC_FID          0x22        //
-#define HREG_TX_COMPL_FID       0x24        //
-
-
-//************************* BAP
-//20031030 HWi Inserted this again because the dongle code uses this (GPIF.C)
-//#define HREG_SELECT_0         0x18        //
-//#define HREG_OFFSET_0         0x1C        //
-//#define HREG_DATA_0           0x36        //
-
-//#define   HREG_OFFSET_BUSY        0x8000  // use HCMD_BUSY
-#define     HREG_OFFSET_ERR         0x4000  //
-//rsrvd #define     HREG_OFFSET_DATA_OFFSET 0x0FFF  //
-
-#define HREG_SELECT_1           0x1A        //
-#define HREG_OFFSET_1           0x1E        //
-#define HREG_DATA_1             0x38        //
-
-
-//************************* Event
-#define HREG_EV_STAT            0x30        //
-#define HREG_INT_EN             0x32        //
-#define HREG_EV_ACK             0x34        //
-
-#define    HREG_EV_TICK             0x8000  //Auxiliary Timer Tick
-//#define  HREG_EV_RES              0x4000  //H-I only: H/W error (Wait Time-out)
-#define    HREG_EV_INFO_DROP        0x2000  //WMAC did not have sufficient RAM to build Unsollicited Frame
-#if (HCF_TYPE) & HCF_TYPE_HII5
-#define    HREG_EV_ACK_REG_READY    0x0000
-#else
-#define    HREG_EV_ACK_REG_READY    0x1000  //Workaround Kludge bit for H-II (not H-II.5)
-#endif // HCF_TYPE_HII5
-#if (HCF_SLEEP) & ( HCF_CDS | HCF_DDS )
-#define    HREG_EV_SLEEP_REQ        0x0800
-#else
-#define    HREG_EV_SLEEP_REQ        0x0000
-#endif // HCF_CDS / HCF_DDS
-#if HCF_DMA
-//#define    HREG_EV_LPESC          0x0400 // firmware sets this bit and clears it, not for host usage.
-#define    HREG_EV_RDMAD            0x0200 // rx frame in host memory
-#define    HREG_EV_TDMAD            0x0100 // tx frame in host memory processed
-//#define    HREG_EV_RXDMA          0x0040 // firmware kicks off DMA engine (bit is not for host usage)
-//#define    HREG_EV_TXDMA          0x0020 // firmware kicks off DMA engine (bit is not for host usage)
-#define    HREG_EV_FW_DMA           0x0460 // firmware / DMA engine I/F (bits are not for host usage)
-#else
-#define    HREG_EV_FW_DMA           0x0000
-#endif // HCF_DMA
-#define    HREG_EV_INFO             0x0080  // Asynchronous Information Frame
-#define    HREG_EV_CMD              0x0010  // Command completed, Status and Response available
-#define    HREG_EV_ALLOC            0x0008  // Asynchronous part of Allocation/Reclaim completed
-#define    HREG_EV_TX_EXC           0x0004  // Asynchronous Transmission unsuccessful completed
-#define    HREG_EV_TX               0x0002  // Asynchronous Transmission successful completed
-#define    HREG_EV_RX               0x0001  // Asynchronous Receive Frame
-
-#define    HREG_EV_TX_EXT           ( (HCF_EXT) & (HCF_EXT_INT_TX_EX | HCF_EXT_INT_TICK ) )
-/* HREG_EV_TX_EXT := 0x0000 or HREG_EV_TX_EXC and/or HREG_EV_TICK
- * could be extended with HREG_EV_TX */
-#if HCF_EXT_INT_TX_EX != HREG_EV_TX_EXC
-err: these values should match;
-#endif // HCF_EXT_INT_TX_EX / HREG_EV_TX_EXC
-
-#if HCF_EXT_INT_TICK != HREG_EV_TICK
-err: these values should match;
-#endif // HCF_EXT_INT_TICK / HREG_EV_TICK
-
-//************************* Host Software
-#define HREG_SW_0               0x28        //
-#define HREG_SW_1               0x2A        //
-#define HREG_SW_2               0x2C        //
-//rsrvd #define HREG_SW_3       0x2E        //
-//************************* Control and Auxiliary Port
-
-#define HREG_IO                 0x12
-#define     HREG_IO_SRESET          0x0001
-#define     HREG_IO_WAKEUP_ASYNC    0x0002
-#define     HREG_IO_WOKEN_UP        0x0004
-#define HREG_CNTL               0x14        //
-//#define       HREG_CNTL_WAKEUP_SYNC   0x0001
-#define     HREG_CNTL_AUX_ENA_STAT  0xC000
-#define     HREG_CNTL_AUX_DIS_STAT  0x0000
-#define     HREG_CNTL_AUX_ENA_CNTL  0x8000
-#define     HREG_CNTL_AUX_DIS_CNTL  0x4000
-#define     HREG_CNTL_AUX_DSD       0x2000
-#define     HREG_CNTL_AUX_ENA       (HREG_CNTL_AUX_ENA_CNTL | HREG_CNTL_AUX_DIS_CNTL )
-#define HREG_SPARE              0x16        //
-#define HREG_AUX_PAGE           0x3A        //
-#define HREG_AUX_OFFSET         0x3C        //
-#define HREG_AUX_DATA           0x3E        //
-
-#if HCF_DMA
-//************************* DMA (bus mastering)
-// Be careful to use these registers only at a genuine 32 bits NIC
-// On 16 bits NICs, these addresses are mapped into the range 0x00 through 0x3F with all consequences
-// thereof, e.g.  HREG_DMA_CTRL register maps to HREG_CMD.
-#define HREG_DMA_CTRL                       0x0040
-#define HREG_TXDMA_PTR32                    0x0044
-#define HREG_TXDMA_PRIO_PTR32               0x0048
-#define HREG_TXDMA_HIPRIO_PTR32             0x004C
-#define HREG_RXDMA_PTR32                    0x0050
-#define HREG_CARDDETECT_1                   0x007C // contains 7D37
-#define HREG_CARDDETECT_2                   0x007E // contains 7DE7
-#define HREG_FREETIMER                      0x0058
-#define HREG_DMA_RX_CNT                     0x0026
-
-/******************************************************************************
- * Defines for the bits in the DmaControl register (@40h)
- ******************************************************************************/
-#define HREG_DMA_CTRL_RXHWEN                0x80000000 // high word enable bit
-#define HREG_DMA_CTRL_RXRESET               0x40000000 // tx dma init bit
-#define HREG_DMA_CTRL_RXBAP1                BIT29
-#define HREG_DMA_CTRL_RX_STALLED            BIT28
-#define HREG_DMA_CTRL_RXAUTOACK_DMADONE     BIT27 // no host involvement req. for TDMADONE event
-#define HREG_DMA_CTRL_RXAUTOACK_INFO        BIT26 // no host involvement req. for alloc event
-#define HREG_DMA_CTRL_RXAUTOACK_DMAEN       0x02000000 // no host involvement req. for TxDMAen event
-#define HREG_DMA_CTRL_RXAUTOACK_RX          0x01000000 // no host involvement req. for tx event
-#define HREG_DMA_CTRL_RX_BUSY               BIT23 // read only bit
-//#define HREG_DMA_CTRL_RX_RBUFCONT_PLAIN       0     // bits 21..20
-//#define HREG_DMA_CTRL_RX_MODE_PLAIN_DMA       0     // mode 0
-#define HREG_DMA_CTRL_RX_MODE_SINGLE_PACKET 0x00010000 // mode 1
-#define HREG_DMA_CTRL_RX_MODE_MULTI_PACKET  0x00020000 // mode 2
-//#define HREG_DMA_CTRL_RX_MODE_DISABLE     (0x00020000|0x00010000) // disable tx dma engine
-#define HREG_DMA_CTRL_TXHWEN                0x8000 // low word enable bit
-#define HREG_DMA_CTRL_TXRESET               0x4000 // rx dma init bit
-#define HREG_DMA_CTRL_TXBAP1                BIT13
-#define HREG_DMA_CTRL_TXAUTOACK_DMADONE     BIT11 // no host involvement req. for RxDMADONE event
-#define HREG_DMA_CTRL_TXAUTOACK_DMAEN       0x00000400 // no host involvement req. for RxDMAen event
-#define HREG_DMA_CTRL_TXAUTOACK_DMAALLOC    0x00000200  // no host involvement req. for info event
-#define HREG_DMA_CTRL_TXAUTOACK_TX          0x00000100  // no host involvement req. for rx event
-#define HREG_DMA_CTRL_TX_BUSY               BIT7  // read only bit
-//#define HREG_DMA_CTRL_TX_TBUFCONT_PLAIN       0     // bits 6..5
-//#define HREG_DMA_CTRL_TX_MODE_PLAIN_DMA       0     // mode 0
-#define HREG_DMA_CTRL_TX_MODE_SINGLE_PACKET BIT0 // mode 1
-#define HREG_DMA_CTRL_TX_MODE_MULTI_PACKET  0x00000002 // mode 2
-//#define HREG_DMA_CTRL_TX_MODE_DISABLE     (0x00000001|0x00000002) // disable tx dma engine
-
-//configuration DWORD to configure DMA for mode2 operation, using BAP0 as the DMA BAP.
-#define DMA_CTRLSTAT_GO (HREG_DMA_CTRL_RXHWEN | HREG_DMA_CTRL_RX_MODE_MULTI_PACKET | \
-                         HREG_DMA_CTRL_RXAUTOACK_DMAEN | HREG_DMA_CTRL_RXAUTOACK_RX | \
-                         HREG_DMA_CTRL_TXHWEN | /*;?HREG_DMA_CTRL_TX_TBUFCONT_PLAIN |*/ \
-                         HREG_DMA_CTRL_TX_MODE_MULTI_PACKET | HREG_DMA_CTRL_TXAUTOACK_DMAEN | \
-                         HREG_DMA_CTRL_TXAUTOACK_DMAALLOC)
-
-//configuration DWORD to reset both the Tx and Rx DMA engines
-#define DMA_CTRLSTAT_RESET (HREG_DMA_CTRL_RXHWEN | HREG_DMA_CTRL_RXRESET | HREG_DMA_CTRL_TXHWEN | HREG_DMA_CTRL_TXRESET)
-
-//#define DESC_DMA_OWNED            0x80000000                  // BIT31
-#define DESC_DMA_OWNED          0x8000                      // BIT31
-#define DESC_SOP                0x8000                      // BIT15
-#define DESC_EOP                0x4000                      // BIT14
-
-#define DMA_RX              0
-#define DMA_TX              1
-
-// #define IFB_RxFirstDesc      IFB_FirstDesc[DMA_RX]
-// #define IFB_TxFirstDesc      IFB_FirstDesc[DMA_TX]
-// #define IFB_RxLastDesc       IFB_LastDesc[DMA_RX]
-// #define IFB_TxLastDesc       IFB_LastDesc[DMA_TX]
-
-#endif // HCF_DMA
-//
-/************************************************************************************************/
-/**********************************  EQUATES  ***************************************************/
-/************************************************************************************************/
-
-
-// Hermes Command Codes and Qualifier bits
-#define     HCMD_BUSY           0x8000  // Busy bit, applicable for all commands
-#define HCMD_INI                0x0000  //
-#define HCMD_ENABLE             HCF_CNTL_ENABLE     // 0x0001
-#define HCMD_DISABLE            HCF_CNTL_DISABLE    // 0x0002
-#define HCMD_CONNECT            HCF_CNTL_CONNECT    // 0x0003
-#define HCMD_EXECUTE            0x0004  //
-#define HCMD_DISCONNECT         HCF_CNTL_DISCONNECT // 0x0005
-#define HCMD_SLEEP              0x0006  //
-#define HCMD_CONTINUE           HCF_CNTL_CONTINUE   // 0x0007
-#define     HCMD_RETRY          0x0100  // Retry bit
-#define HCMD_ALLOC              0x000A  //
-#define HCMD_TX                 0x000B  //
-#define     HCMD_RECL           0x0100  // Reclaim bit, applicable for Tx and Inquire
-#define HCMD_INQUIRE            0x0011  //
-#define HCMD_ACCESS             0x0021  //
-#define     HCMD_ACCESS_WRITE   0x0100  // Write bit
-#define HCMD_PROGRAM            0x0022  //
-#define HCMD_READ_MIF           0x0030
-#define HCMD_WRITE_MIF          0x0031
-#define HCMD_THESEUS            0x0038
-#define     HCMD_STARTPREAMBLE  0x0E00  // Start continuous preamble Tx
-#define     HCMD_STOP           0x0F00  // Stop Theseus test mode
-
-
-//Configuration Management
-//
-
-#define CFG_DRV_ACT_RANGES_PRI_3_BOTTOM 1   // Default Bottom Compatibility for Primary Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_PRI_3_TOP    1   // Default Top    Compatibility for Primary Firmware - driver I/F
-
-#define CFG_DRV_ACT_RANGES_HSI_4_BOTTOM 1   // Default Bottom Compatibility for H/W - driver I/F
-#define CFG_DRV_ACT_RANGES_HSI_4_TOP    1   // Default Top    Compatibility for H/W - driver I/F
-
-#define CFG_DRV_ACT_RANGES_HSI_5_BOTTOM 1   // Default Bottom Compatibility for H/W - driver I/F
-#define CFG_DRV_ACT_RANGES_HSI_5_TOP    1   // Default Top    Compatibility for H/W - driver I/F
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-#define CFG_DRV_ACT_RANGES_APF_1_BOTTOM 16  // Default Bottom Compatibility for AP Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_APF_1_TOP    16  // Default Top    Compatibility for AP Firmware - driver I/F
-#else  //;? is this REALLY O.K.
-#define CFG_DRV_ACT_RANGES_APF_1_BOTTOM 1   // Default Bottom Compatibility for AP Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_APF_1_TOP    1   // Default Top    Compatibility for AP Firmware - driver I/F
-#endif // HCF_TYPE_WPA
-
-#define CFG_DRV_ACT_RANGES_APF_2_BOTTOM 2   // Default Bottom Compatibility for AP Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_APF_2_TOP    2   // Default Top    Compatibility for AP Firmware - driver I/F
-
-#define CFG_DRV_ACT_RANGES_APF_3_BOTTOM 1   // Default Bottom Compatibility for AP Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_APF_3_TOP    1   // Default Top    Compatibility for AP Firmware - driver I/F
-
-#define CFG_DRV_ACT_RANGES_APF_4_BOTTOM 1   // Default Bottom Compatibility for AP Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_APF_4_TOP    1   // Default Top    Compatibility for AP Firmware - driver I/F
-
-#if (HCF_TYPE) & HCF_TYPE_HII5
-#define CFG_DRV_ACT_RANGES_STA_2_BOTTOM 6   // Default Bottom Compatibility for Station Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_STA_2_TOP    6   // Default Top    Compatibility for Station Firmware - driver I/F
-#else // (HCF_TYPE) & HCF_TYPE_HII5
-#define CFG_DRV_ACT_RANGES_STA_2_BOTTOM 1   // Default Bottom Compatibility for Station Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_STA_2_TOP    2   // Default Top    Compatibility for Station Firmware - driver I/F
-#endif // (HCF_TYPE) & HCF_TYPE_HII5
-
-#define CFG_DRV_ACT_RANGES_STA_3_BOTTOM 1   // Default Bottom Compatibility for Station Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_STA_3_TOP    1   // Default Top    Compatibility for Station Firmware - driver I/F
-
-#define CFG_DRV_ACT_RANGES_STA_4_BOTTOM 1   // Default Bottom Compatibility for Station Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_STA_4_TOP    1   // Default Top    Compatibility for Station Firmware - driver I/F
-
-//---------------------------------------------------------------------------------------------------------------------
-#if defined HCF_CFG_PRI_1_TOP || defined HCF_CFG_PRI_1_BOTTOM
-err: PRI_1 not supported for H-I;   // Compatibility for Primary Firmware - driver I/F
-#endif // HCF_CFG_PRI_1_TOP / HCF_CFG_PRI_1_BOTTOM
-
-#if defined HCF_CFG_PRI_2_TOP || defined HCF_CFG_PRI_2_BOTTOM
-err: PRI_2 not supported for H-I;   // Compatibility for Primary Firmware - driver I/F
-#endif // HCF_CFG_PRI_2_TOP / HCF_CFG_PRI_2_BOTTOM
-
-#ifdef HCF_CFG_PRI_3_TOP                                    // Top Compatibility for Primary Firmware - driver I/F
-#if HCF_CFG_PRI_3_TOP == 0 ||                                          \
-       CFG_DRV_ACT_RANGES_PRI_3_BOTTOM <= HCF_CFG_PRI_3_TOP && HCF_CFG_PRI_3_TOP <= CFG_DRV_ACT_RANGES_PRI_3_TOP
-#undef CFG_DRV_ACT_RANGES_PRI_3_TOP
-#define CFG_DRV_ACT_RANGES_PRI_3_TOP    HCF_CFG_PRI_3_TOP
-#else
-err: ;
-#endif
-#endif // HCF_CFG_PRI_3_TOP
-
-#ifdef HCF_CFG_PRI_3_BOTTOM                                 // Bottom Compatibility for Primary Firmware - driver I/F
-#if CFG_DRV_ACT_RANGES_PRI_3_BOTTOM <= HCF_CFG_PRI_3_BOTTOM && HCF_CFG_PRI_3_BOTTOM <= CFG_DRV_ACT_RANGES_PRI_3_TOP
-#undef CFG_DRV_ACT_RANGES_PRI_3_BOTTOM
-#define CFG_DRV_ACT_RANGES_PRI_3_BOTTOM HCF_CFG_PRI_3_BOTTOM
-#else
-err: ;
-#endif
-#endif // HCF_CFG_PRI_3_BOTTOM
-
-
-//---------------------------------------------------------------------------------------------------------------------
-#if defined HCF_CFG_HSI_0_TOP || defined HCF_CFG_HSI_0_BOTTOM
-err: HSI_0 not supported for H-I;   // Compatibility for HSI I/F
-#endif // HCF_CFG_HSI_0_TOP / HCF_CFG_HSI_0_BOTTOM
-
-#if defined HCF_CFG_HSI_1_TOP || defined HCF_CFG_HSI_1_BOTTOM
-err: HSI_1 not supported for H-I;   // Compatibility for HSI I/F
-#endif // HCF_CFG_HSI_1_TOP / HCF_CFG_HSI_1_BOTTOM
-
-#if defined HCF_CFG_HSI_2_TOP || defined HCF_CFG_HSI_2_BOTTOM
-err: HSI_2 not supported for H-I;   // Compatibility for HSI I/F
-#endif // HCF_CFG_HSI_2_TOP / HCF_CFG_HSI_2_BOTTOM
-
-#if defined HCF_CFG_HSI_3_TOP || defined HCF_CFG_HSI_3_BOTTOM
-err: HSI_3 not supported for H-I;   // Compatibility for HSI I/F
-#endif // HCF_CFG_HSI_3_TOP / HCF_CFG_HSI_3_BOTTOM
-
-#ifdef HCF_CFG_HSI_4_TOP                                    // Top Compatibility for HSI I/F
-#if HCF_CFG_HSI_4_TOP == 0 ||                                          \
-       CFG_DRV_ACT_RANGES_HSI_4_BOTTOM <= CF_CFG_HSI_4_TOP && HCF_CFG_HSI_4_TOP <= CFG_DRV_ACT_RANGES_HSI_4_TOP
-#undef CFG_DRV_ACT_RANGES_HSI_4_TOP
-#define CFG_DRV_ACT_RANGES_HSI_4_TOP    HCF_CFG_HSI_4_TOP
-#else
-err: ;
-#endif
-#endif // HCF_CFG_HSI_4_TOP
-
-#ifdef HCF_CFG_HSI_4_BOTTOM                             // Bottom Compatibility for HSI I/F
-#if CFG_DRV_ACT_RANGES_HSI_4_BOTTOM <= HCF_CFG_HSI_4_BOTTOM && HCF_CFG_HSI_4_BOTTOM <= CFG_DRV_ACT_RANGES_HSI_4_TOP
-#undef CFG_DRV_ACT_RANGES_HSI_4_BOTTOM
-#define CFG_DRV_ACT_RANGES_HSI_4_BOTTOM HCF_CFG_HSI_4_BOTTOM
-#else
-err: ;
-#endif
-#endif // HCF_CFG_HSI_4_BOTTOM
-
-#ifdef HCF_CFG_HSI_5_TOP                                    // Top Compatibility for HSI I/F
-#if HCF_CFG_HSI_5_TOP == 0 ||                                          \
-       CFG_DRV_ACT_RANGES_HSI_5_BOTTOM <= CF_CFG_HSI_5_TOP && HCF_CFG_HSI_5_TOP <= CFG_DRV_ACT_RANGES_HSI_5_TOP
-#undef CFG_DRV_ACT_RANGES_HSI_5_TOP
-#define CFG_DRV_ACT_RANGES_HSI_5_TOP    HCF_CFG_HSI_5_TOP
-#else
-err: ;
-#endif
-#endif // HCF_CFG_HSI_5_TOP
-
-#ifdef HCF_CFG_HSI_5_BOTTOM                             // Bottom Compatibility for HSI I/F
-#if CFG_DRV_ACT_RANGES_HSI_5_BOTTOM <= HCF_CFG_HSI_5_BOTTOM && HCF_CFG_HSI_5_BOTTOM <= CFG_DRV_ACT_RANGES_HSI_5_TOP
-#undef CFG_DRV_ACT_RANGES_HSI_5_BOTTOM
-#define CFG_DRV_ACT_RANGES_HSI_5_BOTTOM HCF_CFG_HSI_5_BOTTOM
-#else
-err: ;
-#endif
-#endif // HCF_CFG_HSI_5_BOTTOM
-//---------------------------------------------------------------------------------------------------------------------
-#if defined HCF_CFG_APF_1_TOP || defined HCF_CFG_APF_1_BOTTOM
-err: APF_1 not supported for H-I;   // Compatibility for AP Firmware - driver I/F
-#endif // HCF_CFG_APF_1_TOP / HCF_CFG_APF_1_BOTTOM
-
-#ifdef HCF_CFG_APF_2_TOP                                    // Top Compatibility for AP Firmware - driver I/F
-#if HCF_CFG_APF_2_TOP == 0 ||                                          \
-       CFG_DRV_ACT_RANGES_APF_2_BOTTOM <= HCF_CFG_APF_2_TOP && HCF_CFG_APF_2_TOP <= CFG_DRV_ACT_RANGES_APF_2_TOP
-#undef CFG_DRV_ACT_RANGES_APF_2_TOP
-#define CFG_DRV_ACT_RANGES_APF_2_TOP    HCF_CFG_APF_2_TOP
-#else
-err: ;
-#endif
-#endif // HCF_CFG_APF_TOP
-
-#ifdef HCF_CFG_APF_2_BOTTOM                                 // Bottom Compatibility for AP Firmware - driver I/F
-#if CFG_DRV_ACT_RANGES_APF_2_BOTTOM <= HCF_CFG_APF_2_BOTTOM && HCF_CFG_APF_2_BOTTOM <= CFG_DRV_ACT_RANGES_APF_2_TOP
-#undef CFG_DRV_ACT_RANGES_APF_2_BOTTOM
-#define CFG_DRV_ACT_RANGES_APF_2_BOTTOM HCF_CFG_APF_2_BOTTOM
-#else
-err: ;
-#endif
-#endif // HCF_CFG_APF_BOTTOM
-
-//---------------------------------------------------------------------------------------------------------------------
-#if defined HCF_CFG_STA_1_TOP || defined HCF_CFG_STA_1_BOTTOM
-err: STA_1 not supported for H-I;   // Compatibility for Station Firmware - driver I/F
-#endif // HCF_CFG_STA_1_TOP / HCF_CFG_STA_1_BOTTOM
-
-#ifdef HCF_CFG_STA_2_TOP                                    // Top Compatibility for Station Firmware - driver I/F
-#if HCF_CFG_STA_2_TOP == 0 ||                                          \
-       CFG_DRV_ACT_RANGES_STA_2_BOTTOM <= HCF_CFG_STA_2_TOP && HCF_CFG_STA_2_TOP <= CFG_DRV_ACT_RANGES_STA_2_TOP
-#undef CFG_DRV_ACT_RANGES_STA_2_TOP
-#define CFG_DRV_ACT_RANGES_STA_2_TOP    HCF_CFG_STA_2_TOP
-#else
-err: ;
-#endif
-#endif // HCF_CFG_STA_TOP
-
-#ifdef HCF_CFG_STA_2_BOTTOM                                 // Bottom Compatibility for Station Firmware - driver I/F
-#if CFG_DRV_ACT_RANGES_STA_2_BOTTOM <= HCF_CFG_STA_2_BOTTOM && HCF_CFG_STA_2_BOTTOM <= CFG_DRV_ACT_RANGES_STA_2_TOP
-#undef CFG_DRV_ACT_RANGES_STA_2_BOTTOM
-#define CFG_DRV_ACT_RANGES_STA_2_BOTTOM HCF_CFG_STA_2_BOTTOM
-#else
-err: ;
-#endif
-#endif // HCF_CFG_STA_BOTTOM
-
-
-/************************************************************************************************/
-/**************************************  MACROS  ************************************************/
-/************************************************************************************************/
-
-#ifdef HCF_SLEEP
-#define MSF_WAIT(x) do {                                               \
-               PROT_CNT_INI;                                           \
-               HCF_WAIT_WHILE((IPW(HREG_IO) & HREG_IO_WOKEN_UP) == 0); \
-               HCFASSERT( prot_cnt, IPW( HREG_IO ) );                  \
-       } while (0)
-#else
-#define MSF_WAIT(x) do { } while (0)
-#endif // HCF_SLEEP
-
-#define LOF(x)          (sizeof(x)/sizeof(hcf_16)-1)
-
-//resolve problems on for some 16 bits compilers to create 32 bit values
-#define MERGE_2( hw, lw )   ( ( ((hcf_32)(hw)) << 16 ) | ((hcf_16)(lw)) )
-
-#if ! defined HCF_STATIC
-#define       HCF_STATIC    static
-#endif //     HCF_STATIC
-
-#if ( (HCF_TYPE) & HCF_TYPE_HII5 ) == 0
-#define DAWA_ACK( mask) do {                                           \
-               OPW( HREG_EV_ACK, mask | HREG_EV_ACK_REG_READY );       \
-               OPW( HREG_EV_ACK, (mask & ~HREG_EV_ALLOC) | HREG_EV_ACK_REG_READY ); \
-       } while (0)
-#define DAWA_ZERO_FID(reg) OPW( reg, 0 )
-#else
-#define DAWA_ACK( mask)   OPW( HREG_EV_ACK, mask )
-#define DAWA_ZERO_FID(reg) do { } while (0)
-#endif // HCF_TYPE_HII5
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-#define CALC_RX_MIC( p, len ) calc_mic_rx_frag( ifbp, p, len )
-#define CALC_TX_MIC( p, len ) calc_mic_tx_frag( ifbp, p, len )
-#else
-#define CALC_RX_MIC( p, len )
-#define CALC_TX_MIC( p, len )
-#define MIC_RX_RTN( mic, dw )
-#define MIC_TX_RTN( mic, dw )
-#endif // HCF_TYPE_WPA
-
-#if HCF_TALLIES & HCF_TALLIES_HCF       //HCF tally support
-#define IF_TALLY(x) do { x; } while (0)
-#else
-#define IF_TALLY(x) do { } while (0)
-#endif // HCF_TALLIES_HCF
-
-
-#if HCF_DMA
-#define IF_DMA(x)           do { x; } while(0)
-#define IF_NOT_DMA(x)       do { } while(0)
-#define IF_USE_DMA(x)       if (   ifbp->IFB_CntlOpt & USE_DMA  ) { x; }
-#define IF_NOT_USE_DMA(x)   if ( !(ifbp->IFB_CntlOpt & USE_DMA) ) { x; }
-#else
-#define IF_DMA(x)           do { } while(0)
-#define IF_NOT_DMA(x)       do { x; } while(0)
-#define IF_USE_DMA(x)       do { } while(0)
-#define IF_NOT_USE_DMA(x)   do { x; } while(0)
-#endif // HCF_DMA
-
-
-#define IPW(x) ((hcf_16)IN_PORT_WORD( ifbp->IFB_IOBase + (x) ) )
-#define OPW(x, y) OUT_PORT_WORD( ifbp->IFB_IOBase + (x), y )
-/* make sure the implementation of HCF_WAIT_WHILE is such that there may be multiple HCF_WAIT_WHILE calls
- * in a row and that when one fails all subsequent fail immediately without reinitialization of prot_cnt
- */
-#if HCF_PROT_TIME == 0
-#define PROT_CNT_INI    do { } while(0)
-#define IF_PROT_TIME(x) do { } while(0)
-#if defined HCF_YIELD
-#define HCF_WAIT_WHILE( x ) do { } while( (x) && (HCF_YIELD) )
-#else
-#define HCF_WAIT_WHILE( x ) do { } while ( x )
-#endif // HCF_YIELD
-#else
-#define PROT_CNT_INI    hcf_32 prot_cnt = ifbp->IFB_TickIni
-#define IF_PROT_TIME(x) do { x; } while(0)
-#if defined HCF_YIELD
-#define HCF_WAIT_WHILE( x ) while ( prot_cnt && (x) && (HCF_YIELD) ) prot_cnt--;
-#else
-#include <linux/delay.h>
-#define HCF_WAIT_WHILE( x ) while ( prot_cnt && (x) ) { udelay(2); prot_cnt--; }
-#endif // HCF_YIELD
-#endif // HCF_PROT_TIME
-
-#if defined HCF_EX_INT
-//#if HCF_EX_INT & ~( HCF_EX_INT_TX_EX | HCF_EX_INT_TX_OK | HCF_EX_INT_TICK )
-;? out dated checking
-err: you used an invalid bitmask;
-// #endif // HCF_EX_INT validation
-// #else
-// #define HCF_EX_INT 0x000
-#endif // HCF_EX_INT
-
-#if 0 //get compiler going
-#if HCF_EX_INT_TICK != HREG_EV_TICK
-;? out dated checking
-err: someone redefined these macros while the implementation assumes they are equal;
-#endif
-#if HCF_EX_INT_TX_OK != HFS_TX_CNTL_TX_OK || HFS_TX_CNTL_TX_OK != HREG_EV_TX_OK
-;? out dated checking
-err: someone redefined these macros while the implementation assumes they are equal;
-#endif
-#if HCF_EX_INT_TX_EX != HFS_TX_CNTL_TX_EX || HFS_TX_CNTL_TX_EX != HREG_EV_TX_EX
-;? out dated checking
-err: someone redefined these macros while the implementation assumes they are equal;
-#endif
-#endif // 0 get compiler going
-
-
-/* The assert in HCFLOGENTRY checks against re-entrancy. Re-entrancy could be caused by MSF logic at
- * task-level calling hcf_functions without shielding with HCF_ACT_ON/_OFF. When an interrupt occurs,
- * the ISR could (either directly or indirectly) cause re-entering of the interrupted HCF-routine.
- *
- * The "(ifbp->IFB_AssertWhere = where)" test in HCFLOGENTRY services ALSO as a statement to get around:
- * #pragma warning: conditional expression is constant
- * on the if-statement
- */
-#if HCF_ASSERT
-#define HCFASSERT(x,q) do { if (!(x)) {mdd_assert(ifbp, __LINE__, q );} } while(0)
-#define MMDASSERT(x,q) {if (!(x)) {mdd_assert( assert_ifbp, __LINE__ + FILE_NAME_OFFSET, q );}}
-
-#define HCFLOGENTRY( where, what ) do {                                        \
-               if ( (ifbp->IFB_AssertWhere = where) <= 15 ) {          \
-                       HCFASSERT( (ifbp->IFB_AssertTrace & 1<<((where)&0xF)) == 0, ifbp->IFB_AssertTrace ); \
-                       ifbp->IFB_AssertTrace |= 1<<((where)&0xF);      \
-               }                                                       \
-               HCFTRACE(ifbp, where );                                 \
-               HCFTRACEVALUE(ifbp, what );                             \
-       } while (0)
-
-#define HCFLOGEXIT( where ) do {                                       \
-               if ( (ifbp->IFB_AssertWhere = where) <= 15 ) {          \
-                       ifbp->IFB_AssertTrace &= ~(1<<((where)&0xF));   \
-               }                                                       \
-               HCFTRACE(ifbp, (where)|HCF_TRACE_EXIT );                \
-       } while (0)
-
-#else // HCF_ASSERT
-#define HCFASSERT( x, q ) do { } while(0)
-#define MMDASSERT( x, q )
-#define HCFLOGENTRY( where, what ) do { } while(0)
-#define HCFLOGEXIT( where )        do { } while(0)
-#endif // HCF_ASSERT
-
-#if HCF_INT_ON
-/* ;? HCFASSERT_INT
- * #if (HCF_SLEEP) & HCF_DDS
- * #define HCFASSERT_INT HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFF && ifbp->IFB_IntOffCnt != 0xFFFE, \
- *                               ifbp->IFB_IntOffCnt )
- * #else
- */
-#define HCFASSERT_INT HCFASSERT( ifbp->IFB_IntOffCnt != 0xFFFF, ifbp->IFB_IntOffCnt )
-// #endif // HCF_DDS
-#else
-#define HCFASSERT_INT
-#endif // HCF_INT_ON
-
-
-#if defined HCF_TRACE
-#define HCFTRACE(ifbp, where )     do {OPW( HREG_SW_1, where );} while(0)
-//#define HCFTRACE(ifbp, where )       {HCFASSERT( DO_ASSERT, where );}
-#define HCFTRACEVALUE(ifbp, what ) do {OPW( HREG_SW_2, what  );} while (0)
-//#define HCFTRACEVALUE(ifbp, what ) {HCFASSERT( DO_ASSERT, what  );}
-#else
-#define HCFTRACE(ifbp, where )     do { } while(0)
-#define HCFTRACEVALUE(ifbp, what ) do { } while(0)
-#endif // HCF_TRACE
-
-
-#if HCF_BIG_ENDIAN
-#define BE_PAR(x)               ,x
-#else
-#define BE_PAR(x)
-#endif // HCF_BIG_ENDIAN
-
-/************************************************************************************************/
-/**************************************  END OF MACROS  *****************************************/
-/************************************************************************************************/
-
-/************************************************************************************************/
-/***************************************  PROTOTYPES  *******************************************/
-/************************************************************************************************/
-
-#if HCF_ASSERT
-extern IFBP BASED assert_ifbp;          //to make asserts easily work under MMD and DHF
-EXTERN_C void        mdd_assert         (IFBP ifbp, unsigned int line_number, hcf_32 q );
-#endif //HCF_ASSERT
-
-#if ! ( (HCF_IO) & HCF_IO_32BITS )              // defined 16 bits only
-#undef OUT_PORT_STRING_32
-#undef IN_PORT_STRING_32
-#endif // HCF_IO
-#endif  //HCFDEFC_H
-
diff --git a/drivers/staging/wlags49_h2/man/wlags49.4 b/drivers/staging/wlags49_h2/man/wlags49.4
deleted file mode 100644 (file)
index 37df998..0000000
+++ /dev/null
@@ -1,734 +0,0 @@
-.\" vim:tw=78:
-.\" Copyright (c) 1999-2003 Agere Systems Inc. -- http://www.agere.com
-.\" wlags49.4 7.20-abg 04/28/2004 13:30:00
-.\"
-.TH WLAGS49 4 "04/28/2004 13:30:00" "pcmcia-cs"
-.SH NAME
-wlags49 \- Agere Systems Wireless PC Card / PCI device drivers
-
-wlags49_h2_cs.o \- Hermes-II Card Services (PCMCIA/CF) driver
-.br
-wlags49_h2.o    \- Hermes-II MiniPCI driver
-.br
-wlags49_h25.o   \- Hermes-II.5 PCI/CardBus driver
-.br
-wlags49_h25_cs.o\- Hermes-II.5 Card Services (PCMCIA/CF) driver
-
-.SH SYNOPSIS
-.nh
-.fi
-.B insmod wlags49_[h1,h2]_[cs].o
-.br
-.RB [ Authentication=n ]
-.RB [ AuthKeyMngmtSuite=???? ]
-.RB [ BRSC2GHz=b ]\p
-.RB [ BRSC5GHz=b ]
-.RB [ Coexistence=n ]
-.RB [ Configured=???? ]\p
-.RB [ ConnectionControl=???? ]
-.RB [ CreateIBSS=s ]
-.RB [ DebugFlag=n ]\p
-.RB [ DesiredSSID=s ]
-.RB [ DownloadFirmware=n ]
-.RB [ DriverEnable=???? ]\p
-.RB [ EnableEncryption=s ]
-.RB [ Encryption=???? ]
-.RB [ ExcludeUnencrypted=s ]\p
-.RB [ IntraBSSRelay=s ]
-.RB [ IrqList=i,j,... ]
-.RB [ IrqMask=n ]\p
-.RB [ Key1=s ]
-.RB [ Key2=s ]
-.RB [ Key3=s ]
-.RB [ Key4=s ]\p
-.RB [ LoadBalancing=s ]
-.RB [ MaxSleepDuration=n ]
-.RB [ MediumDistribution=s ]\p
-.RB [ MicroWaveRobustness=s ]
-.RB [ MulticastPMBuffering=s ]
-.RB [ MulticastRate=n ]\p
-.RB [ MulticastReceive=s ]
-.RB [ NetworkAddress=n,n,n,n,n,n ]
-.RB [ NetworkType=???? ]\p
-.RB [ OwnATIMWindow=n ]
-.RB [ OwnBeaconInterval=n ]
-.RB [ OwnChannel=n ]\p
-.RB [ OwnDTIMPeriod=n ]
-.RB [ OwnName=s ]
-.RB [ OwnSSID=s ]\p
-.RB [ pc_debug=n ]
-.RB [ PMEnabled=b ]
-.RB [ PMHoldoverDuration=n ]\p
-.RB [ PortType=n ]
-.RB [ PowerMode=???? ]
-.RB [ PromiscuousMode=s ]\p
-.RB [ RejectANY=s ]
-.RB [ RTSThreshold=n ]\p
-.RB [ RTSThreshold1=n ]
-.RB [ RTSThreshold2=n ]
-.RB [ RTSThreshold3=n ]\p
-.RB [ RTSThreshold4=n ]
-.RB [ RTSThreshold5=n ]
-.RB [ RTSThreshold6=n ]\p
-.RB [ SRSC2GHz=b ]
-.RB [ SRSC5GHz=b ]
-.RB [ SystemScale=n ]\p
-.RB [ TxKey=n ]
-.RB [ TxRateControl=n ]\p
-.RB [ TxRateControl1=n ]
-.RB [ TxRateControl2=n ]
-.RB [ TxRateControl3=n ]\p
-.RB [ TxRateControl4=n ]
-.RB [ TxRateControl5=n ]
-.RB [ TxRateControl6=n ]\p
-.RB [ WDSAddress=n,n,n,n,n,n ]\p
-.RB [ WDSAddress1=n,n,n,n,n,n ]
-.RB [ WDSAddress2=n,n,n,n,n,n ]\p
-.RB [ WDSAddress3=n,n,n,n,n,n ]
-.RB [ WDSAddress4=n,n,n,n,n,n ]\p
-.RB [ WDSAddress5=n,n,n,n,n,n ]
-.RB [ WDSAddress6=n,n,n,n,n,n ]\p
-.fi
-
-
-
-.SH DESCRIPTION
-.I wlags49
-is the low-level Card Services / PCI driver for the
-.B Wireless PC Card, Wireless Integrated Card, Wireless Embedded Card
-and other wireless adapters based on the Agere Systems Hermes-II, and Hermes-II.5 wireless MAC. When this driver is attached to a card, it
-allocates the next available ethernet device (eth0..eth#). This
-device name will be passed on to
-.IR cardmgr (8),
-or the PCI subsystem, for the card configuration, and reported in the kernel log file
-with the I/O base address and MAC address used by the card.
-.SH FEATURES
- \- Hot plug/unplug
- \- Access Point and peer-to-peer communication
- \- Card power management
- \- Support for Hermes-II & Hermes-II.5 based PCMCIA, Mini PCI, and CardBus cards
- \- Wired Equivalent Privacy (WEP)
- \- WPA-PSK support
- \- Driver utility interface (UIL)
- \- Wireless Extensions
- \- Software AP mode
-.SH PARAMETERS
-.TP
-.B Authentication=n
-Algorithm used for Authentication.
-.BR
-    1 \- Open System
-.BR
-    2 \- Shared Key
-.BR
-    Default: 1
-.TP
-.B Auth_key_mgmt_suite
-???????????????
-.TP
-.B BRSC2GHz=b
-Sets the card\'s Basic Rate Set in the 2.4GHz band. See SRSC2GHz
-for the value\'s format.
-.BR
-    Default: 15 (or 0x000F, only 11b rates to accept legacy 11b stations)
-.TP
-.B BRSC5GHz-b
-Sets the card\'s Basic Rate Set in the 5.0GHz band. See SRSC2GHz for the
-value\'s format
-.BR
-    Default: 4080 (or 0x0FF0, all 11a rates)
-.TP
-.B Coexistence=n
-Used to make the 802.11a/b/g coexistence behavior more strict.
-.BR
-    Default \- 0 (Use standard behavior)
-.TP
-.B ConnectionControl=n
-Configures the card\'s connection control process in dealing with multiple
-bands (802.11b/g vs. 802.11a).
-.BR
-    0 \- Single Band operation in 2GHz
-.BR
-    1 \- Single Band operation in 5GHz
-.BR
-    2 \- Multiple Band operation starting with 2GHz
-.BR
-    3 \- Multiple Band operation starting with 5GHz
-.BR
-    Default \- 2
-.TP
-.B Configured
-???????????????
-.TP
-.B ConnectionControl
-???????????????
-.TP
-.B CreateIBSS=s
-Enable or disable IBSS Creation.
-For correct operation, specification of a OwnSSID is required.
-This mode requires firmware 6.04 or higher.
-.BR
-    N \- Disable
-.BR
-    Y \- Enable
-.BR
-    Default: N
-.TP
-.B DebugFlag=n
-Selects the driver debugging level. This parameter is only available
-if the module is compiled with debugging enabled. Refer to the
-file
-.B debug.h
-in the source directory for information on the flag values.
-.BR
-    0x00000001L \- DBG_ERROR_ON
-.BR
-    0x00000002L \- DBG_WARNING_ON
-.BR
-    0x00000004L \- DBG_NOTICE_ON
-.BR
-    0x00000008L \- DBG_TRACE_ON
-.BR
-    0x00000010L \- DBG_VERBOSE_ON
-.BR
-    0x00000020L \- DBG_PARAM_ON
-.BR
-    0x00000040L \- DBG_BREAK_ON
-.BR
-    0x00000100L \- DBG_RX_ON
-.BR
-    0x00000200L \- DBG_TX_ON
-.BR
-    0x00000400L \- DBG_DS_ON
-.BR
-If the module is compiled with debugging enabled, DebugFlag
-defaults to DBG_ERROR_ON, DBG_WARNING_ON and DBG_BREAK_ON.
-DebugFlag overrules pc_debug.
-.TP
-.B DesiredSSID=s
-Same as OwnSSID.
-.TP
-.B DownloadFirmware=n
-This release of the driver introduces the ability to perform downloads of the STA/AP
-firmware. In fact, this is required for Hermes-II based cards. This parameter tells
-the driver which version of the firmware to download to the card.
-.BR
-    0 \- No download performed (Hermes-I only)
-.BR
-    1 \- Download STA firmware
-.BR
-    2 \- Download AP firmware
-.BR
-    Default: 1, when STA mode functionality is
-                included in the build
-             2, when code is built exclusively for
-                AP mode
-.TP
-.B DriverEnable
-???????????????
-.TP
-.B EnableEncryption=n
-Set the method of Data encryption.
-.BR
-    0 \- Disable
-.BR
-    1 \- Enable WEP Encryption
-.BR
-    2 \- Enable WPA with TKIP encryption
-.BR
-    Default: 0
-.TP
-.B Encryption
-???????????????
-.TP
-.B ExcludeUnencrypted=s
-Controls how the stations must communicate with the AP.
-.BR
-    Y \- Stations must enable encryption and provide
-         the proper encryption key to communicate
-         with the AP.
-.BR
-    N \- Stations do not need to enable encryption
-         to communicate with the AP.
-.BR
-    Default: N
-.TP
-.B IntraBSSRelay=s
-Controls the automatic relay of received messages that are destined for other
-stations in the BSS.
-.BR
-    Y \- Messages are relayed to the appropriate
-         station(s).
-.BR
-    N \- Messages are passed up to the host.
-.BR
-    Default: Y
-.TP
-.B IrqList=i,j,...
-Specifies the set of interrupts (up to 4) that may be allocated by
-this driver. This overrides the values set in the
-.B IrqMask
-parameter. NOTE: This parameter is for PCMCIA only.
-.TP
-.B IrqMask=n
-Specifies a mask of valid interrupts that may be allocated by this driver.
-If
-.B IrqList
-is also specified, the values in
-.B IrqList
-are used instead. NOTE: This parameter is for PCMCIA only.
-.BR
-    Default: 0xdeb8 (IRQ 3,4,5,7,9,10,11,12,14,15)
-.TP
-.B Key1=s
-Specifies one of 4 possible keys for the Data encryption.
-One of these keys, identified by TxKey,
-is used for the enciphering of Data that is transmitted by this station.
-All keys specified can be used for the deciphering of Data that is received.
-.BR
-The key value can be an ASCII character string or a hexadecimal value.
-The length of the key value can be 5 characters or 10 hexadecimal digits for
-the standard encryption (Silver or Gold card), or 13 characters or 26
-hexadecimal digits for the encryption with extended keys (Gold card only).
-The keys defined in the station must match the keys defined in the access
-points; both on value and number (1 through 4).
-.BR
-In 2.0 series Linux kernel modules, values that begin with a number are
-considered integers. In this case a hexadecimal value string or a character
-string starting with a number, will need to be surrounded by escaped
-double quotes (ie. Key1=\\"0x1122334455\\" Key2=\\"12xyz\\").
-.BR
-    5 or 13, printable character string, or
-.BR
-    10 or 26 hex digits if preceded by "0x".
-.BR
-    If this parameter is omitted, the default of the MAC is used ( = 0-length).
-.TP
-.B Key2=s
-Same as Key1.
-.TP
-.B Key3=s
-Same as Key1.
-.TP
-.B Key4=s
-Same as Key1.
-.TP
-.B LoadBalancing=s
-Control for the Load Balancing algorithm for both STAs and APs. The AP
-includes a load balancing element in the Probe Response and Beacon frames.
-The STA uses this info to select an AP, not only based on comms quality, but
-also on the load of that AP.
-.BR
-    Default: Y
-.TP
-.B MaxDataLength
-???????????????
-.TP
-.B MaxSleepDuration=n
-Set the maximum Power Management sleep duration in milliseconds.
-Valid values are 0 to 65535 milliseconds.
-.BR
-    Default: 100
-.TP
-.B MediumDistribution=s
-Control for the distribution of medium parameters, like communication
-thresholds, microwave robustness, RTS/CTS thresholds, by APs. The associated
-stations replace their own values with the received values.
-.BR
-    Default=Y
-.TP
-.B MicroWaveRobustness=s
-Enable or disable Microwave Oven Robustness.
-.BR
-    N \- Disable
-.BR
-    Y \- Enable
-.BR
-    Default: N
-.TP
-.B MulticastPMBuffering=s
-Controls buffering of multicast MAC frames for transmission after DTIM. If no,
-multicast MAC frames are directly placed in the output queue.
-.BR
-    Default: Y
-.TP
-.B MulticastRate=n
-Sets the data rate for multicast message transmission.
-.BR
-    1 \- Fixed 1Mb/s
-    2 \- Fixed 2Mb/s
-    3 \- Fixed 5.5Mb/s
-    4 \- Fixed 11Mb/s
-.BR
-    Default: 2
-
-For Hermes-II.5, an INTEGER CONVERTED bit mask representing the
-rate to multicast, where the rates supported are as follows:
-
-Bit  : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
-.br
-------------------------------------------------------
-.br
-Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
-
-    Default: 4 (Translates to 0x0004 = 5.5 Mb/sec)
-
-.TP
-.B MulticastReceive=s
-Enable or disable receiving of all multicast packets when Card Power Management
-is enabled. When enabled, the station will wake up frequently
-to receive the multicast frames. This causes less optimal power savings.
-.BR
-    N \- Disable
-.BR
-    Y \- Enable
-.BR
-    Default: Y
-.TP
-.B NetworkAddress=n,n,n,n,n,n
-Sets the adapter hardware ethernet address (MAC address) to the value
-specified. Note that this is to be used to specify a Local MAC address. Do
-not specify this parameter if the card\'s universal address is to be used.
-Valid values are six hexadecimal digit-pairs (prefixed with 0x).
-.BR
-    Default: <factory assigned address>
-.TP
-.B NetworkType
-???????????????
-.TP
-.B OwnATIMWindow=n
-ATIM window time used for creating an IBSS.
-.BR
-    Range: 0..100
-.BR
-    Default: 0
-.TP
-.B OwnBeaconInterval=b
-Beacon Interval in TU
-.BR
-    Range 20..200
-.BR
-    Default \- 100
-.TP
-.B channel=n
-Same as OwnChannel.
-.TP
-.B OwnChannel=n
-Sets the channel the Ad-Hoc or IBSS mode will use.
-The default channel for Ad-Hoc mode is determined by the Wireless PC Card.
-The default channel for IBSS is set to 10 by the driver.
-This value has no effect when the adapter is used with an Access Point
-(BSS network) since the Access Point automatically determines the channel.
-Valid values are 0 to 14. However the channels allowed in
-your region are subject to local regulations and are limited at
-manufacturing time of the Wireless PC Card. When the provided value is
-not allowed, the value remains unchanged.
-.BR
-    0 \- Use default channel
-.BR
-    Default: 0
-.TP
-.B OwnDTIMPeriod=n
-The number of beacon intervals between successive Delivery Traffic Identification
-Maps (DTIMs).
-.BR
-    Range: 1..65535
-.BR
-    Default: 1
-.TP
-.B OwnName=s
-Sets the station name to the specified string value. This parameter
-is used for diagnostic purposes, as a user\-friendly identification
-of this system. This parameter accepts a maximum of 32 characters.
-.BR
-    Default: Linux
-.TP
-.B OwnSSID=s
-Sets the card network name to the specified string value. This parameter
-accepts a maximum of 32 characters. Whitespace in the network name
-will need to be escaped with a backslash (ie. OwnSSID=My\\ Network).
-.BR
-    Default: ANY
-.TP
-.B pc_debug=n
-Selects the PCMCIA debugging level. This parameter is only available
-if the module is compiled with debugging enabled. A non\-zero value
-enables debugging. Higher values yield more information, i.e. for any value all
-lower values are implied.
-.BR
-    8 \- DBG_DS_ON
-.BR
-    7 \- DBG_RX_ON | DBG_TX_ON
-.BR
-    6 \- DBG_PARAM_ON
-.BR
-    5 \- DBG_TRACE_ON
-.BR
-    4 \- DBG_VERBOSE_ON
-.BR
-If the module is compiled with debugging enabled, pc_debug defaults to 5.
-DebugFlag overrules pc_debug.
-.BR
-The name pc_debug rather than PcDebug, since pc_debug is used by many PCMCIA driver.
-.TP
-.B PMEnabled=b
-Sets the card\'s Power Management state.
-.BR
-    0 \- Disable
-.BR
-    1 \- Enable Enhanced Mode
-.BR
-    2 \- Enabled Standard Mode
-.BR
-    0x8000 \- Enhanced?????? Mode (to be combined with 0x0001 or 0x0002)
-
-    Default: 0 (Disabled)
-.TP
-.B PMHoldoverDuration=n
-Time that the station remains in an awake state after a MAC frame transfer if
-Enhanced Power Save is active.
-.BR
-    Range: 1..1000
-.BR
-    Default: 100
-.TP
-.B PowerMode
-???????????????
-.TP
-.B PortType=n
-Selects the type of network operation.
-.BR
-    1 \- Normal Operation (BSS or IBSS)
-.BR
-    3 \- Ad-Hoc Demo Mode
-.BR
-    Default: 1
-.TP
-.B PromiscuousMode=s
-Switch for promiscuous mode reception.
-.BR
-    Default: N
-.TP
-.B RejectANY=s
-Controls how stations associate to the device.
-.BR
-    Y \- Stations must provide the correct SSID to
-         associate to the AP.
-.BR
-    N \- Stations are not required to provide the
-         correct SSID to associate to the AP.
-         Known as an \'open\' network.
-.BR
-    Default - N
-.TP
-.B RTSThreshold=n
-Controls the RTS/CTS handshake threshold for transmissions in Station mode.
-Valid values are 0 to 2347.
-.BR
-    500  \- Hidden Stations
-.BR
-    2347 \- No RTS/CTS
-.BR
-    Default: 2347
-.TP
-.B RTSThreshold1=n
-Same as RTSThreshold, only for port 1 of in AccessPoint mode.
-.TP
-.B RTSThreshold2=n
-Same as RTSThreshold1, only for port 2.
-.TP
-.B RTSThreshold3=n
-Same as RTSThreshold1, only for port 3.
-.TP
-.B RTSThreshold4=n
-Same as RTSThreshold1, only for port 4.
-.TP
-.B RTSThreshold5=n
-Same as RTSThreshold1, only for port 5.
-.TP
-.B RTSThreshold6=n
-Same as RTSThreshold1, only for port 6.
-.TP
-.B SRSC2GHz=b
-Sets the card\'s Supported Rate Set in the 2.4GHz band. The value
-is an INTEGER CONVERTED bit mask representing the rates to support,
-where the rates supported are as follows:
-
-Bit  : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
-.br
-------------------------------------------------------
-.br
-Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
-.BR
-    Default: 4095 (or 0x0FFF, all 11b and 11g rates)
-.TP
-.B SRSC5GHz=b
-Sets the card\'s Supported Rate Set in the 5.0GHz band. See SRSC2GHz
-for the value\'s format.
-.BR
-    Default: 4080 (or 0x0FF0, all 11a rates)
-.TP
-.B SystemScale=n
-Sets the distance between Access Points in the network. This value
-influences the Modem Thresholds (EnergyDetectThreshold,
-CarrierDetectThreshold and DeferThreshold) and
-the Roaming Thresholds (CellSearchThreshold and OutOfRangeThreshold).
-.BR
-    1 \- Large
-.BR
-    2 \- Medium
-.BR
-    3 \- Small
-.BR
-    Default: 1
-.TP
-.B TxRateControl=n
-Sets the data rate to be used by the transmitter. For Hermes-II:
-.BR
-    1 \- Fixed Low (1 Mb/sec)
-.BR
-    2 \- Fixed Standard (2 Mb/sec)
-.BR
-    3 \- Auto Rate Select High (11, 5.5, 2, 1 Mb/sec)
-.BR
-    4 \- Fixed Medium (5.5 Mb/sec)
-.BR
-    5 \- Fixed High (11 Mb/sec)
-.BR
-    6 \- Auto Rate Select Standard (2, 1 Mb/sec)
-.BR
-    7 \- Auto Rate Select Medium (5.5, 2, 1 Mb/sec)
-.BR
-    Default: 3
-
-For Hermes-II.5, an INTEGER CONVERTED bit mask representing all of the
-rates to support, where the rates supported are as follows:
-
-Bit  : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
-.br
-------------------------------------------------------
-.br
-Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
-.BR
-    Default: 4095 (Translates to 0xFFF, which is all rates)
-.TP
-.B RTSThreshold=n
-Sets the number of octets in a message or fragment above which a
-RTS/CTS handshake is performed.
-Valid values are 0 to 2347.
-.BR
-    500  \- Hidden Stations
-.BR
-    2347 \- No RTS/CTS
-.BR
-    Default: 2347
-.TP
-.B TxKey=n
-Designates which of the keys is to be used for the enciphering of data that is
-transmitted by this station.
-.BR
-    Integer in the range 1..4.
-.BR
-    Default: 1
-.TP
-.B TxPowLevel
-???????????????
-.TP
-.B TxRateControl=n
-Sets the data rate to be used by the transmitter in Station mode.
-.BR
-    1 \- Fixed Low
-.BR
-    2 \- Fixed Standard
-.BR
-    3 \- Auto Rate Select (High)
-.BR
-    4 \- Fixed Medium
-.BR
-    5 \- Fixed High
-.BR
-    6 \- Auto Rate Select (Standard)
-.BR
-    7 \- Auto Rate Select (Medium)
-.BR
-    Default: 3
-
-For Hermes-II.5, an INTEGER CONVERTED bit mask representing all of the
-rates to support, where the rates supported are as follows:
-
-Bit  : 15|14|13|12|11|10|09|08|07|06|05|04|03|02|01|00
-.br
-------------------------------------------------------
-.br
-Rate : XX|XX|XX|XX|54|48|36|24|18|12| 9| 6|11|5.5|2| 1
-.BR
-    Default: 4095 (Translates to 0xFFF, which is all rates)
-
-.TP
-.B TxRateControl1=n
-Same as TxRateControl, only for port 1 in AccessPoint mode.
-.TP
-.B TxRateControl2=n
-Same as TxRateControl1, only for port 2.
-.TP
-.B TxRateControl3=n
-Same as TxRateControl1, only for port 3.
-.TP
-.B TxRateControl4=n
-Same as TxRateControl1, only for port 4.
-.TP
-.B TxRateControl5=n
-Same as TxRateControl1, only for port 5.
-.TP
-.B TxRateControl6=n
-Same as TxRateControl1, only for port 6.
-.TP
-.B VendorDescription
-???????????????
-.TP
-.B WDSAddress=n,n,n,n,n,n
-MAC address that identifies the corresponding node of the WDS port in Station mode.
-Note that for WDS to work properly, a bridge interface must be setup between the device and
-the wds network devices created by the driver. For more information on bridge
-interfaces, please refer to the man page for \'brctl\'.
-.BR
-    Default: 00:00:00:00:00:00
-.TP
-.B WDSAddress1=n,n,n,n,n,n
-Same as WDSAddress, only for port 1 in AccessPoint mode.
-.TP
-.B WDSAddress2=n,n,n,n,n,n
-Same as WDSAddress1, only for port 2.
-.TP
-.B WDSAddress3=n,n,n,n,n,n
-Same as WDSAddress1, only for port 3.
-.TP
-.B WDSAddress4=n,n,n,n,n,n
-Same as WDSAddress1, only for port 4.
-.TP
-.B WDSAddress5=n,n,n,n,n,n
-Same as WDSAddress1, only for port 5.
-.TP
-.B WDSAddress6=n,n,n,n,n,n
-Same as WDSAddress1, only for port 6.
-.SH SECURITY
-On a multi-user system only the system administrator needs access to the WEP
-encryption keys. In this case, consider removing the read permission for
-normal users of the PCMCIA config.opts file, the system log file, and any
-Agere proprietary iwconfig-eth<n> scripts.
-.SH CONTACT
-If you encounter problems when installing or using this product, or would like
-information about our other "Wireless" products, please contact your local
-Authorized "Wireless" Reseller or Agere Systems sales office.
-
-Addresses and telephone numbers of the Agere Systems sales offices are
-listed on our Agere Systems web site.
-.TP
-.B WWW
-http://www.agere.com
-.SH SEE ALSO
-.BR cardmgr (8),
-.BR pcmcia (5),
-.BR ifconfig (8),
-.BR insmod (8),
-.BR brctl (8).
diff --git a/drivers/staging/wlags49_h2/mdd.h b/drivers/staging/wlags49_h2/mdd.h
deleted file mode 100644 (file)
index 0c91497..0000000
+++ /dev/null
@@ -1,1155 +0,0 @@
-
-#ifndef MDD_H
-#define MDD_H 1
-
-/*************************************************************************************************************
-*
-* FILE         : mdd.h
-*
-* DATE         : $Date: 2004/08/05 11:47:10 $   $Revision: 1.6 $
-* Original             : 2004/05/25 05:59:37    Revision: 1.57      Tag: hcf7_t20040602_01
-* Original             : 2004/05/13 15:31:45    Revision: 1.54      Tag: hcf7_t7_20040513_01
-* Original             : 2004/04/15 09:24:41    Revision: 1.47      Tag: hcf7_t7_20040415_01
-* Original             : 2004/04/13 14:22:45    Revision: 1.46      Tag: t7_20040413_01
-* Original             : 2004/04/01 15:32:55    Revision: 1.42      Tag: t7_20040401_01
-* Original             : 2004/03/10 15:39:28    Revision: 1.38      Tag: t20040310_01
-* Original             : 2004/03/04 11:03:37    Revision: 1.36      Tag: t20040304_01
-* Original             : 2004/03/02 09:27:11    Revision: 1.34      Tag: t20040302_03
-* Original             : 2004/02/24 13:00:27    Revision: 1.29      Tag: t20040224_01
-* Original             : 2004/02/18 17:13:57    Revision: 1.26      Tag: t20040219_01
-*
-* AUTHOR       : Nico Valster
-*
-* DESC         : Definitions and Prototypes for HCF, DHF, MMD and MSF
-*
-***************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT © 1994 - 1995     by AT&T.                                All Rights Reserved
-* COPYRIGHT © 1996 - 2000 by Lucent Technologies.     All Rights Reserved
-* COPYRIGHT © 2001 - 2004     by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-************************************************************************************************************/
-
-
-/************************************************************************************************************
-*
-* The macros Xn(...) and XXn(...) are used to define the LTV's (short for Length Type Value[ ]) ,
-* aka RIDs, processed by the Hermes.
-* The n in Xn and XXn reflects the number of "Value" fields in these RIDs.
-*
-* Xn(...) : Macros used for RIDs which use only type hcf_16 for the "V" fields of the LTV.
-* Xn takes as parameters a RID name and "n" name(s), one for each of the "V" fields of the LTV.
-*
-* XXn(...) : Macros used for RIDs which use at least one other type then hcf_16 for a "V" field
-* of the LTV.
-* XXn(..) takes as parameters a RID name and "n" pair(s) of type and name, one for each "V" field
-* of the LTV
-
- ******************************************  e x a m p l e s  ***********************************************
-
-* X1(RID_NAME, parameters...) : expands to :
-*    typedef struct RID_NAME_STRCT {
-*         hcf_16  len;
-*         hcf_16  typ;
-*         hcf_16  par1;
-*    } RID_NAME_STRCT;
-
-* X2(RID_NAME, parameters...) : expands to :
-*    typedef struct RID_NAME_STRCT {
-*         hcf_16  len;
-*         hcf_16  typ;
-*         hcf_16  par1;
-*         hcf_16  par2;
-*    } RID_NAME_STRCT;
-
-
-* XX1(RID_NAME, par1type, par1name, ...) : expands to :
-*    typedef struct RID_NAME_STRCT {
-*       hcf_16    len;
-*       hcf_16    typ;
-*       par1type  par1name;
-*    } RID_NAME_STRCT;
-
-************************************************************************************************************/
-
-/******************************* XX Sub-macro definitions **************************************************/
-
-#define XX1( name, type1, par1 )       \
-typedef struct {                                       \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       type1   par1;                   \
-} name##_STRCT;
-
-#define XX2( name, type1, par1, type2, par2 )  \
-typedef struct {                                       \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       type1   par1;                   \
-       type2   par2;                   \
-} name##_STRCT;
-
-#define XX3( name, type1, par1, type2, par2, type3, par3 )     \
-typedef struct name##_STRCT {          \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       type1   par1;                   \
-       type2   par2;                   \
-       type3   par3;                   \
-} name##_STRCT;
-
-#define XX4( name, type1, par1, type2, par2, type3, par3, type4, par4 )        \
-typedef struct {                                       \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       type1   par1;                   \
-       type2   par2;                   \
-       type3   par3;                   \
-       type4   par4;                   \
-} name##_STRCT;
-
-#define X1( name, par1 )       \
-typedef struct name##_STRCT {          \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-} name##_STRCT;
-
-#define X2( name, par1, par2 )         \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-} name##_STRCT;
-
-#define X3( name, par1, par2, par3 )           \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-       hcf_16  par3;                   \
-} name##_STRCT;
-
-#define X4( name, par1, par2, par3, par4 )             \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-       hcf_16  par3;                   \
-       hcf_16  par4;                   \
-} name##_STRCT;
-
-#define X5( name, par1, par2, par3, par4, par5 )               \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-       hcf_16  par3;                   \
-       hcf_16  par4;                   \
-       hcf_16  par5;                   \
-} name##_STRCT;
-
-#define X6( name, par1, par2, par3, par4, par5, par6 )         \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-       hcf_16  par3;                   \
-       hcf_16  par4;                   \
-       hcf_16  par5;                   \
-       hcf_16  par6;                   \
-} name##_STRCT;
-
-#define X8( name, par1, par2, par3, par4, par5, par6, par7, par8 )             \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-       hcf_16  par3;                   \
-       hcf_16  par4;                   \
-       hcf_16  par5;                   \
-       hcf_16  par6;                   \
-       hcf_16  par7;                   \
-       hcf_16  par8;                   \
-} name##_STRCT;
-
-#define X11( name, par1, par2, par3, par4, par5, par6, par7, par8, par9, par10, par11 )                \
-typedef struct {                               \
-       hcf_16  len;                    \
-       hcf_16  typ;                    \
-       hcf_16  par1;                   \
-       hcf_16  par2;                   \
-       hcf_16  par3;                   \
-       hcf_16  par4;                   \
-       hcf_16  par5;                   \
-       hcf_16  par6;                   \
-       hcf_16  par7;                   \
-       hcf_16  par8;                   \
-       hcf_16  par9;                   \
-       hcf_16  par10;                  \
-       hcf_16  par11;                  \
-} name##_STRCT;
-
-/******************************* Substructure definitions **************************************************/
-
-//apparently not needed (CFG_CNF_COUNTRY)
-typedef struct CHANNEL_SET {                           //channel set structure used in the CFG_CNF_COUNTRY LTV
-       hcf_16  first_channel;
-       hcf_16  number_of_channels;
-       hcf_16  max_tx_output_level;
-} CHANNEL_SET;
-
-typedef struct KEY_STRCT {                                     // key structure used in the CFG_DEFAULT_KEYS LTV
-    hcf_16  len;                                               //length of key
-    hcf_8   key[14];                                                   //encryption key
-} KEY_STRCT;
-
-typedef struct SCAN_RS_STRCT {                         // Scan Result structure used in the CFG_SCAN LTV
-       hcf_16  channel_id;
-       hcf_16  noise_level;
-       hcf_16  signal_level;
-       hcf_8   bssid[6];
-       hcf_16  beacon_interval_time;
-       hcf_16  capability;
-       hcf_16  ssid_len;
-       hcf_8   ssid_val[32];
-} SCAN_RS_STRCT;
-
-typedef struct CFG_RANGE_SPEC_STRCT {          // range specification structure used in CFG_RANGES, CFG_RANGE1 etc
-       hcf_16  variant;
-       hcf_16  bottom;
-       hcf_16  top;
-} CFG_RANGE_SPEC_STRCT;
-
-typedef struct CFG_RANGE_SPEC_BYTE_STRCT {     // byte oriented range specification structure used in CFG_RANGE_B LTV
-       hcf_8   variant[2];
-       hcf_8   bottom[2];
-       hcf_8   top[2];
-} CFG_RANGE_SPEC_BYTE_STRCT;
-
-//used to set up "T" functionality for Info frames, i.e. log info frames in MSF supplied buffer and MailBox
-XX1( RID_LOG, unsigned short FAR*, bufp )
-typedef RID_LOG_STRCT  FAR *RID_LOGP;
-XX1( CFG_RID_LOG, RID_LOGP, recordp )
-
- X1( LTV,              val[1] )                                                                                                /*minimum LTV proto typ */
- X1( LTV_MAX,  val[HCF_MAX_LTV] )                                                                              /*maximum LTV proto typ */
-XX2( CFG_REG_MB, hcf_16* , mb_addr, hcf_16, mb_size )
-
-typedef struct CFG_MB_INFO_FRAG {      // specification of buffer fragment
-       unsigned short FAR*     frag_addr;
-       hcf_16                          frag_len;
-} CFG_MB_INFO_FRAG;
-
-/* Mail Box Info Block structures,
- * the base form: CFG_MB_INFO_STRCT
- * and the derived forms: CFG_MB_INFO_RANGE<n>_STRCT with n is 1, 2, 3 or 20
- * predefined for a payload of 1, and up to 2, 3 and 20 CFG_MB_INFO_FRAG elements */
-XX3( CFG_MB_INFO,                hcf_16, base_typ, hcf_16, frag_cnt, CFG_MB_INFO_FRAG, frag_buf[ 1] )
-XX3( CFG_MB_INFO_RANGE1,  hcf_16, base_typ, hcf_16, frag_cnt, CFG_MB_INFO_FRAG, frag_buf[ 1] )
-XX3( CFG_MB_INFO_RANGE2,  hcf_16, base_typ, hcf_16, frag_cnt, CFG_MB_INFO_FRAG, frag_buf[ 2] )
-XX3( CFG_MB_INFO_RANGE3,  hcf_16, base_typ, hcf_16, frag_cnt, CFG_MB_INFO_FRAG, frag_buf[ 3] )
-XX3( CFG_MB_INFO_RANGE20, hcf_16, base_typ, hcf_16, frag_cnt, CFG_MB_INFO_FRAG, frag_buf[20] )
-
-XX3( CFG_MB_ASSERT, hcf_16, line, hcf_16, trace, hcf_32, qualifier )   /*MBInfoBlock for asserts       */
-#if (HCF_ASSERT) & ( HCF_ASSERT_LNK_MSF_RTN | HCF_ASSERT_RT_MSF_RTN )
-typedef void (MSF_ASSERT_RTN)( unsigned int , hcf_16, hcf_32 );
-typedef MSF_ASSERT_RTN /*can't link FAR*/ * MSF_ASSERT_RTNP;
-/* CFG_REG_ASSERT_RTNP (0x0832)        (de-)register MSF Callback routines
- * lvl:  Assert level filtering (not yet implemented)
- * rtnp: address of MSF_ASSERT_RTN (native Endian format) */
-XX2( CFG_REG_ASSERT_RTNP, hcf_16, lvl, MSF_ASSERT_RTNP, rtnp )
-#endif // HCF_ASSERT_LNK_MSF_RTN / HCF_ASSERT_RT_MSF_RTN
-
- X1( CFG_HCF_OPT, val[20] )                                                                                            /*(Compile time) options        */
- X3( CFG_CMD_HCF, cmd, mode, add_info )                                                                        /*HCF Engineering command       */
-
-typedef struct {
-       hcf_16          len;
-       hcf_16          typ;
-       hcf_16          mode;                   // PROG_STOP/VOLATILE [FLASH/SEEPROM/SEEPROM_READBACK]
-       hcf_16          segment_size;   // size of the segment in bytes
-       hcf_32          nic_addr;               // destination address (in NIC memory)
-       hcf_16          flags;                  // 0x0001       : CRC Yes/No
-//     hcf_32          flags;                  // 0x0001       : CRC Yes/No
-       /* ;? still not the whole story
-        * flags is extended from 16 to 32 bits to force that compiling FW.C produces the same structures
-        * in memory as FUPU4 BIN files.
-        * Note that the problem arises from the violation of the constraint to use packing at byte boundaries
-        * as was stipulated in the WCI-specification
-        * The Pack pragma can't resolve this issue, because that impacts all members of the structure with
-        * disregard of their actual size, so aligning host_addr under MSVC 1.5 at 4 bytes, also aligns
-        * len, typ etc on 4 bytes
-        * */
-//     hcf_16          pad;                    //!! be careful alignment problems for Bin download versus C download
-       hcf_8 FAR   *host_addr;         // source address (in Host memory)
-} CFG_PROG_STRCT; // segment_descp;
-
-// a structure used for transporting debug-related information from firmware
-// via the HCF, into the MSF
-typedef struct {
-    hcf_16      len;
-    hcf_16      typ;
-    hcf_16      msg_id, msg_par, msg_tstamp;
-} CFG_FW_PRINTF_STRCT;
-
-// a structure used to define the location and size of a certain debug-related
-// buffer in nic-ram.
-typedef struct {
-    hcf_16      len;
-    hcf_16      typ;
-    hcf_32      DbMsgCount,    // ds (nicram) address of a counter
-                DbMsgBuffer,   // ds (nicram) address of the buffer
-                DbMsgSize,             // number of entries (each 3 word in size) in this buffer
-                DbMsgIntrvl;   // ds (nicram) address of interval for generating InfDrop event
-} CFG_FW_PRINTF_BUFFER_LOCATION_STRCT;
-
-XX3( CFG_RANGES,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 1] ) /*Actor/Supplier range (1 variant)*/
-XX3( CFG_RANGE1,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 1] ) /*Actor/Supplier range (1 variant)*/
-XX3( CFG_RANGE2,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 2] ) /*Actor range ( 2 variants)               */
-XX3( CFG_RANGE3,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 3] ) /*Actor range ( 3 variants)               */
-XX3( CFG_RANGE4,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 4] ) /*Actor range ( 4 variants)               */
-XX3( CFG_RANGE5,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 5] ) /*Actor range ( 5 variants)               */
-XX3( CFG_RANGE6,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 6] ) /*Actor range ( 6 variants)               */
-XX3( CFG_RANGE7,       hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[ 7] ) /*Actor range ( 7 variants)               */
-XX3( CFG_RANGE20,      hcf_16, role, hcf_16, id, CFG_RANGE_SPEC_STRCT, var_rec[20] ) /*Actor range (20 variants)               */
-
-/*Frames */
- X3( CFG_ASSOC_STAT,  assoc_stat, station_addr[3], val[46] )   /*Association status, basic                                     */
- X2( CFG_ASSOC_STAT3, assoc_stat, station_addr[3] )                                                            /*assoc_stat:3                  */
- X3( CFG_ASSOC_STAT1, assoc_stat, station_addr[3], frame_body[43] )                                    /*assoc_stat:1                  */
- X4( CFG_ASSOC_STAT2, assoc_stat, station_addr[3], old_ap_addr[3], frame_body[43] )    /*assoc_stat:2                  */
-
-/*Static Configurations */
- X1( CFG_CNF_PORT_TYPE,                                port_type                        ) /*[STA] Connection control characteristics                           */
- X1( CFG_MAC_ADDR,                                     mac_addr[3]              ) /*general: FC01,FC08,FC11,FC12,FC13,FC14,FC15,FC16           */
- X1( CFG_CNF_OWN_MAC_ADDR,                     mac_addr[3]                      )
- X1( CFG_ID,                                           ssid[17]                         ) /*0xFC02, 0xFC04, 0xFC0E                                                             */
-/*     X1( CFG_DESIRED_SSID,                   ssid[17]                         )      see Dynamic Configurations                                                              */
- X1( CFG_CNF_OWN_CHANNEL,                      channel                          ) /*Communication channel for BSS creation                                     */
- X1( CFG_CNF_OWN_SSID,                         ssid[17]                         )
- X1( CFG_CNF_OWN_ATIM_WINDOW,          atim_window                      )
- X1( CFG_CNF_SYSTEM_SCALE,                     system_scale             )
- X1( CFG_CNF_MAX_DATA_LEN,                     max_data_len             )
- X1( CFG_CNF_WDS_ADDR,                         mac_addr[3]                      ) /*[STA] MAC Address of corresponding WDS Link node           */
- X1( CFG_CNF_PM_ENABLED,                       pm_enabled                       ) /*[STA] Switch for ESS Power Management (PM) On/Off          */
- X1( CFG_CNF_PM_EPS,                           pm_eps                           ) /*[STA] Switch for ESS PM EPS/PS Mode                                        */
- X1( CFG_CNF_MCAST_RX,                         mcast_rx                         ) /*[STA] Switch for ESS PM Multicast reception On/Off         */
- X1( CFG_CNF_MAX_SLEEP_DURATION,       duration                         ) /*[STA] Maximum sleep time for ESS PM                                        */
- X1( CFG_CNF_PM_HOLDOVER_DURATION,     duration                         ) /*[STA] Holdover time for ESS PM                                                     */
- X1( CFG_CNF_OWN_NAME,                         ssid[17]                         ) /*Identification text for diagnostic purposes                        */
- X1( CFG_CNF_OWN_DTIM_PERIOD,          period                           ) /*[AP] Beacon intervals between successive DTIMs                     */
- X1( CFG_CNF_WDS_ADDR1,                                mac_addr[3]                      ) /*[AP] Port 1 MAC Adrs of corresponding WDS Link node        */
- X1( CFG_CNF_WDS_ADDR2,                                mac_addr[3]                      ) /*[AP] Port 2 MAC Adrs of corresponding WDS Link node        */
- X1( CFG_CNF_WDS_ADDR3,                                mac_addr[3]                      ) /*[AP] Port 3 MAC Adrs of corresponding WDS Link node        */
- X1( CFG_CNF_WDS_ADDR4,                                mac_addr[3]                      ) /*[AP] Port 4 MAC Adrs of corresponding WDS Link node        */
- X1( CFG_CNF_WDS_ADDR5,                                mac_addr[3]                      ) /*[AP] Port 5 MAC Adrs of corresponding WDS Link node        */
- X1( CFG_CNF_WDS_ADDR6,                                mac_addr[3]                      ) /*[AP] Port 6 MAC Adrs of corresponding WDS Link node        */
- X1( CFG_CNF_MCAST_PM_BUF,                     mcast_pm_buf             ) /*[AP] Switch for PM buffering of Multicast Messages */
- X1( CFG_CNF_REJECT_ANY,                       reject_any                       ) /*[AP] Switch for PM buffering of Multicast Messages */
-//X1( CFG_CNF_ENCRYPTION_ENABLED,      encryption                       ) /*specify encryption type of Tx/Rx messages                          */
- X1( CFG_CNF_ENCRYPTION,                       encryption                       ) /*specify encryption type of Tx/Rx messages                          */
- X1( CFG_CNF_AUTHENTICATION,           authentication           ) /*selects Authentication algorithm                                           */
- X1( CFG_CNF_EXCL_UNENCRYPTED,         exclude_unencrypted      ) /*[AP] Switch for 'clear-text' rx message acceptance         */
- X1( CFG_CNF_MCAST_RATE,                       mcast_rate                       ) /*Transmit Data rate for Multicast frames                            */
- X1( CFG_CNF_INTRA_BSS_RELAY,          intra_bss_relay          ) /*[AP] Switch for IntraBBS relay                                                     */
- X1( CFG_CNF_MICRO_WAVE,                       micro_wave                       ) /*MicroWave (Robustness)                                                                     */
- X1( CFG_CNF_LOAD_BALANCING,           load_balancing           ) /*Load Balancing       (Boolean, 0=OFF, 1=ON, default=1)             */
- X1( CFG_CNF_MEDIUM_DISTRIBUTION,      medium_distribution      ) /*Medium Distribution (Boolean, 0=OFF, 1=ON, default=1)      */
- X1( CFG_CNF_GROUP_ADDR_FILTER,                group_addr_filter        ) /*Group Address Filter                                                                       */
- X1( CFG_CNF_TX_POW_LVL,                       tx_pow_lvl                       ) /*Tx Power Level                                                                                     */
-XX4( CFG_CNF_COUNTRY_INFO,                                                              \
-               hcf_16, n_channel_sets, hcf_16, country_code[2], \
-               hcf_16, environment, CHANNEL_SET, channel_set[1] ) /*Current Country Info                                                                       */
-XX4( CFG_CNF_COUNTRY_INFO_MAX,                                                  \
-               hcf_16, n_channel_sets, hcf_16, country_code[2], \
-               hcf_16, environment, CHANNEL_SET, channel_set[14]) /*Current Country Info                                                                       */
-
-/*Dynamic Configurations */
- X1( CFG_DESIRED_SSID,                 ssid[17]                                         )      /*[STA] Service Set identification for connection       */
-#define GROUP_ADDR_SIZE                        (32 * 6)                                                //32 6-byte MAC-addresses
- X1( CFG_GROUP_ADDR,                   mac_addr[GROUP_ADDR_SIZE/2]      )      /*[STA] Multicast MAC Addresses for Rx-message          */
- X1( CFG_CREATE_IBSS,                  create_ibss                                      )      /*[STA] Switch for IBSS creation On/Off                         */
- X1( CFG_RTS_THRH,                             rts_thrh                                         )      /*[STA] Frame length used for RTS/CTS handshake         */
- X1( CFG_TX_RATE_CNTL,                 tx_rate_cntl                             )      /*[STA] Data rate control for message transmission      */
- X1( CFG_PROMISCUOUS_MODE,             promiscuous_mode                         )      /*[STA] Switch for Promiscuous mode reception On/Of     */
- X1( CFG_WOL,                                  wake_on_lan                                      )      /*[STA] Switch for Wake-On-LAN mode                                     */
- X1( CFG_RTS_THRH0,                            rts_thrh                                         )      /*[AP] Port 0 frame length for RTS/CTS handshake        */
- X1( CFG_RTS_THRH1,                            rts_thrh                                         )      /*[AP] Port 1 frame length for RTS/CTS handshake        */
- X1( CFG_RTS_THRH2,                            rts_thrh                                         )      /*[AP] Port 2 frame length for RTS/CTS handshake        */
- X1( CFG_RTS_THRH3,                            rts_thrh                                         )      /*[AP] Port 3 frame length for RTS/CTS handshake        */
- X1( CFG_RTS_THRH4,                            rts_thrh                                         )      /*[AP] Port 4 frame length for RTS/CTS handshake        */
- X1( CFG_RTS_THRH5,                            rts_thrh                                         )      /*[AP] Port 5 frame length for RTS/CTS handshake        */
- X1( CFG_RTS_THRH6,                            rts_thrh                                         )      /*[AP] Port 6 frame length for RTS/CTS handshake        */
- X1( CFG_TX_RATE_CNTL0,                        rate_cntl                                        )      /*[AP] Port 0 data rate control for transmission        */
- X1( CFG_TX_RATE_CNTL1,                        rate_cntl                                        )      /*[AP] Port 1 data rate control for transmission        */
- X1( CFG_TX_RATE_CNTL2,                        rate_cntl                                        )      /*[AP] Port 2 data rate control for transmission        */
- X1( CFG_TX_RATE_CNTL3,                        rate_cntl                                        )      /*[AP] Port 3 data rate control for transmission        */
- X1( CFG_TX_RATE_CNTL4,                        rate_cntl                                        )      /*[AP] Port 4 data rate control for transmission        */
- X1( CFG_TX_RATE_CNTL5,                        rate_cntl                                        )      /*[AP] Port 5 data rate control for transmission        */
- X1( CFG_TX_RATE_CNTL6,                        rate_cntl                                        )      /*[AP] Port 6 data rate control for transmission        */
-XX1( CFG_DEFAULT_KEYS,                 KEY_STRCT, key[4]                        )      /*defines set of encryption keys                                        */
- X1( CFG_TX_KEY_ID,                            tx_key_id                                        )      /*select key for encryption of Tx messages                      */
- X1( CFG_SCAN_SSID,                            ssid[17]                                         )      /*identification for connection                                         */
- X5( CFG_ADD_TKIP_DEFAULT_KEY,                                                          \
-                tkip_key_id_info, tkip_key_iv_info[4], tkip_key[8], \
-                tx_mic_key[4], rx_mic_key[4]                                            )      /*                                                                                              */
- X6( CFG_ADD_TKIP_MAPPED_KEY,  bssid[3], tkip_key[8],           \
-                tsc[4], rsc[4], tx_mic_key[4], rx_mic_key[4]            )      /*                                                                                              */
- X1( CFG_SET_WPA_AUTHENTICATION_SUITE,                                                  \
-                ssn_authentication_suite                                                        )      /*                                                                                                      */
- X1( CFG_REMOVE_TKIP_DEFAULT_KEY,tkip_key_id                            )      /*                                                                                                      */
- X1( CFG_TICK_TIME,                            tick_time                                        )      /*Auxiliary Timer tick interval                                         */
- X1( CFG_DDS_TICK_TIME,                        tick_time                                        )      /*Disconnected DeepSleep Timer tick interval            */
-
-/**********************************************************************
-* Added for Pattern-matching WakeOnLan. (See firmware design note WMDN281C)
-**********************************************************************/
-#define WOL_PATTERNS                           5               // maximum of 5 patterns in firmware
-#define WOL_PATTERN_LEN                                124             // maximum 124 bytes pattern length per pattern in firmware
-#define WOL_MASK_LEN                           30              // maximum 30 bytes mask length per pattern in firmware
-#define WOL_BUF_SIZE   (WOL_PATTERNS * (WOL_PATTERN_LEN + WOL_MASK_LEN + 6) / 2)
-X2( CFG_WOL_PATTERNS, nPatterns, buffer[WOL_BUF_SIZE]           )  /*[STA] WakeOnLan pattern match, room for 5 patterns*/
-
- X5( CFG_SUP_RANGE,            role, id, variant, bottom, top                             ) /*[PRI] Primary Supplier compatibility range               */
-/* NIC Information */
- X4( CFG_IDENTITY,                     comp_id, variant, version_major, version_minor ) /*identification Prototype                                                     */
-#define CFG_DRV_IDENTITY_STRCT CFG_IDENTITY_STRCT
-#define CFG_PRI_IDENTITY_STRCT CFG_IDENTITY_STRCT
-#define CFG_NIC_IDENTITY_STRCT CFG_IDENTITY_STRCT
-#define CFG_FW_IDENTITY_STRCT  CFG_IDENTITY_STRCT
- X1( CFG_RID_INF_MIN,          y                                                                                          ) /*lowest value representing an Information RID             */
- X1( CFG_MAX_LOAD_TIME,                max_load_time                                                              ) /*[PRI] Max response time of the Download command  */
- X3( CFG_DL_BUF,                       buf_page, buf_offset, buf_len                              ) /*[PRI] Download buffer location and size                  */
-// X5( CFG_PRI_SUP_RANGE,              role, id, variant, bottom, top                             ) /*[PRI] Primary Supplier compatibility range               */
- X5( CFG_CFI_ACT_RANGES_PRI,role, id, variant, bottom, top                                ) /*[PRI] Controller Actor compatibility ranges              */
-// X5( CFG_NIC_HSI_SUP_RANGE,  role, id, variant, bottom, top                             ) /*H/W - S/W I/F supplier range                                             */
- X1( CFG_NIC_SERIAL_NUMBER,    serial_number[17]                                                          ) /*[PRI] Network I/F Card serial number                             */
- X5( CFG_NIC_MFI_SUP_RANGE,    role, id, variant, bottom, top                             ) /*[PRI] Modem I/F Supplier compatibility range             */
- X5( CFG_NIC_CFI_SUP_RANGE,    role, id, variant, bottom, top                             ) /*[PRI] Controller I/F Supplier compatibility range*/
-//H-I X1( CFG_CHANNEL_LIST,            channel_list                                                               ) /*Allowed communication channels                                   */
-//H-I XX2( CFG_REG_DOMAINS,            hcf_16, num_domain, hcf_8, reg_domains[10]         ) /*List of intended regulatory domains                              */
- X1( CFG_NIC_TEMP_TYPE,                temp_type                                                                          ) /*Hardware temperature range code                                  */
-//H-I X1( CFG_CIS,                             cis[240]                                                                           ) /*PC Card Standard Card Information Structure              */
- X5( CFG_NIC_PROFILE,                                                                                                     \
-                profile_code, capability_options, allowed_data_rates, val4, val5  ) /*Card Profile                                                                             */
-// X5( CFG_FW_SUP_RANGE,               role, id, variant, bottom, top                             ) /*[STA] Station I/F Supplier compatibility range   */
- X5( CFG_MFI_ACT_RANGES,       role, id, variant, bottom, top                             ) /*[STA] Modem I/F Actor compatibility ranges               */
- X5( CFG_CFI_ACT_RANGES_STA,role, id, variant, bottom, top                                ) /*[STA] Controller I/F Actor compatibility ranges  */
- X5( CFG_MFI_ACT_RANGES_STA,role, id, variant, bottom, top                                ) /*[STA] Controller I/F Actor compatibility ranges  */
- X1( CFG_NIC_BUS_TYPE,         nic_bus_type                                                               ) /*NIC bustype derived from BUSSEL host I/F signals */
-
-/*     MAC INFORMATION */
- X1( CFG_PORT_STAT,                            port_stat                                                        ) /*[STA] Actual MAC Port connection control status            */
- X1( CFG_CUR_SSID,                             ssid[17]                                                         ) /*[STA] Identification of the actually connected SS          */
- X1( CFG_CUR_BSSID,                            mac_addr[3]                                                      ) /*[STA] Identification of the actually connected BSS         */
- X3( CFG_COMMS_QUALITY,                        coms_qual, signal_lvl, noise_lvl         ) /*[STA] Quality of the Basic Service Set connection          */
- X1( CFG_CUR_TX_RATE,                  rate                                                             ) /*[STA] Actual transmit data rate                                            */
- X1( CFG_CUR_BEACON_INTERVAL,  interval                                                         ) /*Beacon transmit interval time for BSS creation                     */
-#if (HCF_TYPE) & HCF_TYPE_WARP
- X11( CFG_CUR_SCALE_THRH,                                                                                       \
-        carrier_detect_thrh_cck, carrier_detect_thrh_ofdm, defer_thrh,  \
-        energy_detect_thrh, rssi_on_thrh_deviation,                                     \
-        rssi_off_thrh_deviation, cck_drop_thrh, ofdm_drop_thrh,                 \
-        cell_search_thrh, out_of_range_thrh, delta_snr                          )
-#else
- X6( CFG_CUR_SCALE_THRH,                                                                                        \
-        energy_detect_thrh, carrier_detect_thrh, defer_thrh,                    \
-        cell_search_thrh, out_of_range_thrh, delta_snr                                  ) /*Actual System Scale thresholds settings                            */
-#endif // HCF_TYPE_WARP
- X1( CFG_PROTOCOL_RSP_TIME,            time                                                             ) /*Max time to await a response to a request message          */
- X1( CFG_CUR_SHORT_RETRY_LIMIT,        limit                                                            ) /*Max number of transmit attempts for short frames           */
- X1( CFG_CUR_LONG_RETRY_LIMIT, limit                                                            ) /*Max number of transmit attempts for long frames            */
- X1( CFG_MAX_TX_LIFETIME,              time                                                             ) /*Max transmit frame handling duration                                       */
- X1( CFG_MAX_RX_LIFETIME,              time                                                             ) /*Max received frame handling duration                                       */
- X1( CFG_CF_POLLABLE,                  cf_pollable                                                      ) /*[STA] Contention Free pollable capability indication       */
- X2( CFG_AUTHENTICATION_ALGORITHMS,authentication_type, type_enabled ) /*Authentication Algorithm                                                              */
- X1( CFG_PRIVACY_OPT_IMPLEMENTED,privacy_opt_implemented                        ) /*WEP Option availability indication                                         */
- X1( CFG_CUR_REMOTE_RATES,             rates                                                            ) /*CurrentRemoteRates                                                                         */
- X1( CFG_CUR_USED_RATES,               rates                                                            ) /*CurrentUsedRates                                                                           */
- X1( CFG_CUR_SYSTEM_SCALE,             current_system_scale                             ) /*CurrentUsedRates                                                                           */
- X1( CFG_CUR_TX_RATE1,                 rate                                                             ) /*[AP] Actual Port 1 transmit data rate                                      */
- X1( CFG_CUR_TX_RATE2,                 rate                                                             ) /*[AP] Actual Port 2 transmit data rate                                      */
- X1( CFG_CUR_TX_RATE3,                 rate                                                             ) /*[AP] Actual Port 3 transmit data rate                                      */
- X1( CFG_CUR_TX_RATE4,                 rate                                                             ) /*[AP] Actual Port 4 transmit data rate                                      */
- X1( CFG_CUR_TX_RATE5,                 rate                                                             ) /*[AP] Actual Port 5 transmit data rate                                      */
- X1( CFG_CUR_TX_RATE6,                 rate                                                             ) /*[AP] Actual Port 6 transmit data rate                                      */
- X1( CFG_OWN_MAC_ADDR,                 mac_addr[3]                                                      ) /*[AP] Unique local node MAC Address                                         */
- X3( CFG_PCF_INFO,                             medium_occupancy_limit,                          \
-                                                               cfp_period, cfp_max_duration             ) /*[AP] Point Coordination Function capability info           */
- X1( CFG_CUR_WPA_INFO_ELEMENT, ssn_info_element[1]                                      ) /*                                                                                                           */
- X4( CFG_CUR_TKIP_IV_INFO,                                                                                      \
-                tkip_seq_cnt0[4], tkip_seq_cnt1[4],                                             \
-                tkip_seq_cnt2[4], tkip_seq_cnt3[4]                                              ) /*                                                                                                           */
- X2( CFG_CUR_ASSOC_REQ_INFO,   frame_type, frame_body[1]                        ) /*   0xFD8C                                                                                          */
- X2( CFG_CUR_ASSOC_RESP_INFO,  frame_type, frame_body[1]                        ) /*   0xFD8D                                                                                          */
-
-
-/*     Modem INFORMATION */
- X1( CFG_PHY_TYPE,                             phy_type                                                         ) /*Physical layer type indication                                                     */
- X1( CFG_CUR_CHANNEL,                  current_channel                                          ) /*Actual frequency channel used for transmission                     */
- X1( CFG_CUR_POWER_STATE,              current_power_state                                      ) /*Actual power consumption status                                            */
- X1( CFG_CCAMODE,                              cca_mode                                                         ) /*Clear channel assessment mode indication                           */
- X1( CFG_SUPPORTED_DATA_RATES, rates[5]                                                         ) /*Data rates capability information                                          */
-
-
-/* FRAMES */
-XX1( CFG_SCAN,                                 SCAN_RS_STRCT, scan_result[32]           ) /*Scan results                                                                                       */
-
-
-
-//--------------------------------------------------------------------------------------
-// UIL management function to be passed to WaveLAN/IEEE Drivers in DUI_STRCT field fun
-//--------------------------------------------------------------------------------------
-
-// HCF and UIL Common
-#define MDD_ACT_SCAN                   0x06                                    // Hermes Inquire Scan (F101) command
-#define MDD_ACT_PRS_SCAN               0x07                                    // Hermes Probe Response Scan (F102) command
-
-// UIL Specific
-#define UIL_FUN_CONNECT                        0x00                                    // Perform connect command
-#define UIL_FUN_DISCONNECT             0x01                                    // Perform disconnect command
-#define UIL_FUN_ACTION                 0x02                                    // Perform UIL Action command.
-#define UIL_FUN_SEND_DIAG_MSG  0x03                                    // Send a diagnostic message.
-#define UIL_FUN_GET_INFO               0x04                                    // Retrieve information from NIC.
-#define UIL_FUN_PUT_INFO               0x05                                    // Put information on NIC.
-
-/*     UIL_ACT_TALLIES                         0x05                                    * this should not be exported to the USF
-                                                                                                               * it is solely intended as a strategic choice for the MSF to either
-                                                                                                               * - use HCF_ACT_TALLIES and direct IFB access
-                                                                                                               * - use CFG_TALLIES
-                                                                                                               */
-#define UIL_ACT_SCAN                   MDD_ACT_SCAN
-#define UIL_ACT_PRS_SCAN               MDD_ACT_PRS_SCAN
-#define UIL_ACT_BLOCK                  0x0B
-#define UIL_ACT_UNBLOCK                        0x0C
-#define UIL_ACT_RESET                  0x80
-#define UIL_ACT_REBIND                 0x81
-#define UIL_ACT_APPLY                  0x82
-#define UIL_ACT_DISCONNECT             0x83    //;?040108 possibly obsolete    //Special for WINCE
-
-// HCF Specific
-/* Note that UIL_ACT-codes must match HCF_ACT-codes across a run-time bound I/F
- * The initial matching is achieved by "#define HCF_ACT_xxx HCF_UIL_ACT_xxx" where appropriate
- * In other words, these codes should never, ever change to minimize migration problems between
- * combinations of old drivers and new utilities and vice versa
- */
-#define HCF_DISCONNECT                 0x01                                    //disconnect request for hcf_connect (invalid as IO Address)
-#define HCF_ACT_TALLIES                0x05                                    // ! UIL_ACT_TALLIES does not exist ! Hermes Inquire Tallies (F100) cmd
-#if ( (HCF_TYPE) & HCF_TYPE_WARP ) == 0
-#define HCF_ACT_SCAN                   MDD_ACT_SCAN
-#endif // HCF_TYPE_WARP
-#define HCF_ACT_PRS_SCAN               MDD_ACT_PRS_SCAN
-#if HCF_INT_ON
-#define HCF_ACT_INT_OFF                0x0D                                    // Disable Interrupt generation
-#define HCF_ACT_INT_ON                 0x0E                                    // Enable Interrupt generation
-#define HCF_ACT_INT_FORCE_ON   0x0F                                    // Enforce Enable Interrupt generation
-#endif // HCF_INT_ON
-#define HCF_ACT_RX_ACK                 0x15                                    // Receiever ACK (optimization)
-#if (HCF_TYPE) & HCF_TYPE_CCX
-#define HCF_ACT_CCX_ON                 0x1A                                    // enable CKIP
-#define HCF_ACT_CCX_OFF                        0x1B                                    // disable CKIP
-#endif // HCF_TYPE_CCX
-#if (HCF_SLEEP) & HCF_DDS
-#define HCF_ACT_SLEEP                  0x1C                                    // DDS Sleep request
-//#define HCF_ACT_WAKEUP               0x1D                                    // DDS Wakeup request
-#endif // HCF_DDS
-
-/*     HCF_ACT_MAX                                                     // xxxx: start value for UIL-range, NOT to be passed to HCF
- *                                                                             Too bad, there was originally no spare room created to use
- *                                                                             HCF_ACT_MAX as an equivalent of HCF_ERR_MAX. Since creating
- *                                                                             this room in retrospect would create a backward incompatibility
- *                                                                             we will just have to live with the haphazard sequence of
- *                                                                             UIL- and HCF specific codes. Theoretically this could be
- *                                                                             corrected when and if there will ever be an overall
- *                                                                             incompatibility introduced for another reason
- */
-
-/*============================================================= HERMES RECORDS ============================*/
-#define CFG_RID_FW_MIN                                                 0xFA00  //lowest value representing a Hermes-II based RID
-// #define CFG_PDA_BEGIN                                               0xFA    //
-// #define CFG_PDA_END                                                 0xFA    //
-// #define CFG_PDA_NIC_TOP_LVL_ASSEMBLY_NUMBER 0xFA    //
-// #define CFG_PDA_PCB_TRACER_NUMBER                   0xFA    //
-// #define CFG_PDA_RMM_TRACER_NUMBER                   0xFA    //
-// #define CFG_PDA_RMM_COMP_ID                                 0xFA    //
-// #define CFG_PDA_                                                            0xFA    //
-
-/*============================================================= CONFIGURATION RECORDS  =====================*/
-/*============================================================= mask 0xFCxx                            =====================*/
-#define CFG_RID_CFG_MIN                                        0xFC00          //lowest value representing a Hermes configuration  RID
-
-//     NETWORK PARAMETERS, STATIC CONFIGURATION ENTITIES
-//FC05, FC0B, FC0C, FC0D: SEE W2DN149
-
-#define CFG_CNF_PORT_TYPE                              0xFC00          //[STA] Connection control characteristics
-#define CFG_CNF_OWN_MAC_ADDR                   0xFC01          //[STA] MAC Address of this node
-//                                                                             0xFC02          see DYNAMIC CONFIGURATION ENTITIES
-#define CFG_CNF_OWN_CHANNEL                            0xFC03          //Communication channel for BSS creation
-#define CFG_CNF_OWN_SSID                               0xFC04          //IBSS creation (STA) or ESS (AP) Service Set Ident
-#define CFG_CNF_OWN_ATIM_WINDOW                        0xFC05          //[STA] ATIM Window time for IBSS creation
-#define CFG_CNF_SYSTEM_SCALE                   0xFC06          //System Scale that specifies the AP density
-#define CFG_CNF_MAX_DATA_LEN                   0xFC07          //Maximum length of MAC Frame Body data
-#define CFG_CNF_PM_ENABLED                             0xFC09          //[STA] Switch for ESS Power Management (PM)
-#define CFG_CNF_MCAST_RX                               0xFC0B          //[STA] Switch for ESS PM Multicast reception On/Off
-#define CFG_CNF_MAX_SLEEP_DURATION             0xFC0C          //[STA] Maximum sleep time for ESS PM
-#define CFG_CNF_HOLDOVER_DURATION              0xFC0D          //[STA] Holdover time for ESS PM
-#define CFG_CNF_OWN_NAME                               0xFC0E          //Identification text for diagnostic purposes
-
-#define CFG_CNF_OWN_DTIM_PERIOD                        0xFC10          //[AP] Beacon intervals between successive DTIMs
-#define CFG_CNF_WDS_ADDR1                              0xFC11          //[AP] Port 1 MAC Adrs of corresponding WDS Link node
-#define CFG_CNF_WDS_ADDR2                              0xFC12          //[AP] Port 2 MAC Adrs of corresponding WDS Link node
-#define CFG_CNF_WDS_ADDR3                              0xFC13          //[AP] Port 3 MAC Adrs of corresponding WDS Link node
-#define CFG_CNF_WDS_ADDR4                              0xFC14          //[AP] Port 4 MAC Adrs of corresponding WDS Link node
-#define CFG_CNF_WDS_ADDR5                              0xFC15          //[AP] Port 5 MAC Adrs of corresponding WDS Link node
-#define CFG_CNF_WDS_ADDR6                              0xFC16          //[AP] Port 6 MAC Adrs of corresponding WDS Link node
-#define CFG_CNF_PM_MCAST_BUF                   0xFC17          //[AP] Switch for PM buffereing of Multicast Messages
-#define CFG_CNF_MCAST_PM_BUF                   CFG_CNF_PM_MCAST_BUF    //name does not match H-II spec
-#define CFG_CNF_REJECT_ANY                             0xFC18          //[AP] Switch for PM buffering of Multicast Messages
-
-#define CFG_CNF_ENCRYPTION                             0xFC20          //select en/de-cryption of Tx/Rx messages
-#define CFG_CNF_AUTHENTICATION                 0xFC21          //[STA] selects Authentication algorithm
-#define CFG_CNF_EXCL_UNENCRYPTED               0xFC22          //[AP] Switch for 'clear-text' rx message acceptance
-#define CFG_CNF_MCAST_RATE                             0xFC23          //Transmit Data rate for Multicast frames
-#define CFG_CNF_INTRA_BSS_RELAY                        0xFC24          //[AP] Switch for IntraBBS relay
-#define CFG_CNF_MICRO_WAVE                             0xFC25          //MicroWave (Robustness)
-#define CFG_CNF_LOAD_BALANCING                 0xFC26          //Load Balancing                 (Boolean, 0=OFF, 1=ON, default=1)
-#define CFG_CNF_MEDIUM_DISTRIBUTION            0xFC27          //Medium Distribution    (Boolean, 0=OFF, 1=ON, default=1)
-#define CFG_CNF_RX_ALL_GROUP_ADDR              0xFC28          //[STA] Group Address Filter
-#define CFG_CNF_COUNTRY_INFO                   0xFC29          //Country Info
-#if (HCF_TYPE) & HCF_TYPE_WARP
-#define CFG_CNF_TX_POW_LVL                             0xFC2A          //TxPower Level
-#define CFG_CNF_CONNECTION_CNTL                        0xFC30          //[STA] Connection Control
-#define CFG_CNF_OWN_BEACON_INTERVAL            0xFC31          //[AP]
-#define CFG_CNF_SHORT_RETRY_LIMIT              0xFC32          //
-#define CFG_CNF_LONG_RETRY_LIMIT               0xFC33          //
-#define CFG_CNF_TX_EVENT_MODE                  0xFC34          //
-#define CFG_CNF_WIFI_COMPATIBLE                        0xFC35          //[STA] Wifi compatible
-#endif // HCF_TYPE_WARP
-#if (HCF_TYPE) & HCF_TYPE_BEAGLE_HII5
-#define CFG_VOICE_RETRY_LIMIT                  0xFC36          /* Voice frame retry limit. Range: 1-15, default: 4 */
-#define CFG_VOICE_CONTENTION_WINDOW            0xFC37          /* Contention window for voice frames. */
-#endif // BEAGLE_HII5
-
-//     NETWORK PARAMETERS, DYNAMIC CONFIGURATION ENTITIES
-#define CFG_DESIRED_SSID                               0xFC02          //[STA] Service Set identification for connection and scan
-
-#define CFG_GROUP_ADDR                                 0xFC80          //[STA] Multicast MAC Addresses for Rx-message
-#define CFG_CREATE_IBSS                                        0xFC81          //[STA] Switch for IBSS creation On/Off
-#define CFG_RTS_THRH                                   0xFC83          //Frame length used for RTS/CTS handshake
-#define CFG_TX_RATE_CNTL                               0xFC84          //[STA] Data rate control for message transmission
-#define CFG_PROMISCUOUS_MODE                   0xFC85          //[STA] Switch for Promiscuous mode reception On/Off
-#define CFG_WOL                                                        0xFC86          //[STA] Switch for Wake-On-LAN mode
-#define CFG_WOL_PATTERNS                               0xFC87          //[STA] Patterns for Wake-On-LAN
-#define CFG_SUPPORTED_RATE_SET_CNTL            0xFC88          //
-#define CFG_BASIC_RATE_SET_CNTL                        0xFC89          //
-
-#define CFG_SOFTWARE_ACK_MODE                  0xFC90          //
-#define CFG_RTS_THRH0                                  0xFC97          //[AP] Port 0 frame length for RTS/CTS handshake
-#define CFG_RTS_THRH1                                  0xFC98          //[AP] Port 1 frame length for RTS/CTS handshake
-#define CFG_RTS_THRH2                                  0xFC99          //[AP] Port 2 frame length for RTS/CTS handshake
-#define CFG_RTS_THRH3                                  0xFC9A          //[AP] Port 3 frame length for RTS/CTS handshake
-#define CFG_RTS_THRH4                                  0xFC9B          //[AP] Port 4 frame length for RTS/CTS handshake
-#define CFG_RTS_THRH5                                  0xFC9C          //[AP] Port 5 frame length for RTS/CTS handshake
-#define CFG_RTS_THRH6                                  0xFC9D          //[AP] Port 6 frame length for RTS/CTS handshake
-
-#define CFG_TX_RATE_CNTL0                              0xFC9E          //[AP] Port 0 data rate control for transmission
-#define CFG_TX_RATE_CNTL1                              0xFC9F          //[AP] Port 1 data rate control for transmission
-#define CFG_TX_RATE_CNTL2                              0xFCA0          //[AP] Port 2 data rate control for transmission
-#define CFG_TX_RATE_CNTL3                              0xFCA1          //[AP] Port 3 data rate control for transmission
-#define CFG_TX_RATE_CNTL4                              0xFCA2          //[AP] Port 4 data rate control for transmission
-#define CFG_TX_RATE_CNTL5                              0xFCA3          //[AP] Port 5 data rate control for transmission
-#define CFG_TX_RATE_CNTL6                              0xFCA4          //[AP] Port 6 data rate control for transmission
-
-#define CFG_DEFAULT_KEYS                               0xFCB0          //defines set of encryption keys
-#define CFG_TX_KEY_ID                                  0xFCB1          //select key for encryption of Tx messages
-#define CFG_SCAN_SSID                                  0xFCB2          //Scan SSID
-#define CFG_ADD_TKIP_DEFAULT_KEY               0xFCB4          //set KeyID and TxKey indication
-#define        KEY_ID                                                  0x0003          //KeyID mask for tkip_key_id_info field
-#define        TX_KEY                                                  0x8000          //Default Tx Key flag of tkip_key_id_info field
-#define CFG_SET_WPA_AUTH_KEY_MGMT_SUITE        0xFCB5          //Authenticated Key Management Suite
-#define CFG_REMOVE_TKIP_DEFAULT_KEY            0xFCB6          //invalidate KeyID and TxKey indication
-#define CFG_ADD_TKIP_MAPPED_KEY                        0xFCB7          //set MAC address pairwise station
-#define CFG_REMOVE_TKIP_MAPPED_KEY             0xFCB8          //invalidate MAC address pairwise station
-#define CFG_SET_WPA_CAPABILITIES_INFO  0xFCB9          //WPA Capabilities
-#define CFG_CACHED_PMK_ADDR                            0xFCBA          //set MAC address of pre-authenticated AP
-#define CFG_REMOVE_CACHED_PMK_ADDR             0xFCBB          //invalidate MAC address of pre-authenticated AP
-#define CFG_FCBC       0xFCBC  //FW codes ahead of available documentation, so ???????
-#define CFG_FCBD       0xFCBD  //FW codes ahead of available documentation, so ???????
-#define CFG_FCBE       0xFCBE  //FW codes ahead of available documentation, so ???????
-#define CFG_FCBF       0xFCBF  //FW codes ahead of available documentation, so ???????
-
-#define CFG_HANDOVER_ADDR                              0xFCC0          //[AP] Station MAC Address re-associated with other AP
-#define CFG_SCAN_CHANNEL                               0xFCC2          //Channel set for host requested scan
-//;?#define CFG_SCAN_CHANNEL_MASK                      0xFCC2          // contains
-#define CFG_DISASSOCIATE_ADDR                  0xFCC4          //[AP] Station MAC Address to be disassociated
-#define CFG_PROBE_DATA_RATE                            0xFCC5          //WARP connection control
-#define CFG_FRAME_BURST_LIMIT                  0xFCC6          //
-#define CFG_COEXISTENSE_BEHAVIOUR              0xFCC7          //[AP]
-#define CFG_DEAUTHENTICATE_ADDR                        0xFCC8          //MAC address of Station to be deauthenticated
-
-//     BEHAVIOR PARAMETERS
-#define CFG_TICK_TIME                                  0xFCE0          //Auxiliary Timer tick interval
-#define CFG_DDS_TICK_TIME                              0xFCE1          //Disconnected DeepSleep Timer tick interval
-//#define CFG_CNF_COUNTRY                                      0xFCFE  apparently not needed ;?
-#define CFG_RID_CFG_MAX                                        0xFCFF          //highest value representing an Configuration RID
-
-
-/*============================================================= INFORMATION RECORDS    =====================*/
-/*============================================================= mask 0xFDxx                            =====================*/
-//     NIC INFORMATION
-#define CFG_RID_INF_MIN                                        0xFD00  //lowest value representing an Information RID
-#define CFG_MAX_LOAD_TIME                              0xFD00  //[INT] Maximum response time of the Download command.
-#define CFG_DL_BUF                                             0xFD01  //[INT] Download buffer location and size.
-#define CFG_PRI_IDENTITY                               0xFD02  //[PRI] Primary Functions firmware identification.
-#define CFG_PRI_SUP_RANGE                              0xFD03  //[PRI] Primary Functions I/F Supplier compatibility range.
-#define CFG_NIC_HSI_SUP_RANGE                  0xFD09  //H/W - S/W I/F supplier range
-#define CFG_NIC_SERIAL_NUMBER                  0xFD0A  //[PRI] Network Interface Card serial number.
-#define CFG_NIC_IDENTITY                               0xFD0B  //[PRI] Network Interface Card identification.
-#define CFG_NIC_MFI_SUP_RANGE                  0xFD0C  //[PRI] Modem I/F Supplier compatibility range.
-#define CFG_NIC_CFI_SUP_RANGE                  0xFD0D  //[PRI] Controller I/F Supplier compatibility range.
-#define CFG_CHANNEL_LIST                               0xFD10  //Allowed communication channels.
-#define CFG_NIC_TEMP_TYPE                              0xFD12  //Hardware temperature range code.
-#define CFG_CIS                                                        0xFD13  //PC Card Standard Card Information Structure
-#define CFG_NIC_PROFILE                                        0xFD14  //Card Profile
-#define CFG_FW_IDENTITY                                        0xFD20  //firmware identification.
-#define CFG_FW_SUP_RANGE                               0xFD21  //firmware Supplier compatibility range.
-#define CFG_MFI_ACT_RANGES_STA                 0xFD22  //[STA] Modem I/F Actor compatibility ranges.
-#define CFG_CFI_ACT_RANGES_STA                 0xFD23  //[STA] Controller I/F Actor compatibility ranges.
-#define CFG_NIC_BUS_TYPE                               0xFD24  //Card Bustype
-#define        CFG_NIC_BUS_TYPE_PCCARD_CF              0x0000  //16 bit PC Card or Compact Flash
-#define        CFG_NIC_BUS_TYPE_USB                    0x0001  //USB
-#define        CFG_NIC_BUS_TYPE_CARDBUS                0x0002  //CardBus
-#define        CFG_NIC_BUS_TYPE_PCI                    0x0003  //(mini)PCI
-#define CFG_DOMAIN_CODE                                                0xFD25
-
-//     MAC INFORMATION
-#define CFG_PORT_STAT                                  0xFD40  //Actual MAC Port connection control status
-#define CFG_CUR_SSID                                   0xFD41  //[STA] Identification of the actually connected SS
-#define CFG_CUR_BSSID                                  0xFD42  //[STA] Identification of the actually connected BSS
-#define CFG_COMMS_QUALITY                              0xFD43  //[STA] Quality of the Basic Service Set connection
-#define CFG_CUR_TX_RATE                                        0xFD44  //[STA] Actual transmit data rate
-#define CFG_CUR_BEACON_INTERVAL                        0xFD45  //Beacon transmit interval time for BSS creation
-#define CFG_CUR_SCALE_THRH                             0xFD46  //Actual System Scale thresholds settings
-#define CFG_PROTOCOL_RSP_TIME                  0xFD47  //Max time to await a response to a request message
-#define CFG_CUR_SHORT_RETRY_LIMIT              0xFD48  //Max number of transmit attempts for short frames
-#define CFG_CUR_LONG_RETRY_LIMIT               0xFD49  //Max number of transmit attempts for long frames
-#define CFG_MAX_TX_LIFETIME                            0xFD4A  //Max transmit frame handling duration
-#define CFG_MAX_RX_LIFETIME                            0xFD4B  //Max received frame handling duration
-#define CFG_CF_POLLABLE                                        0xFD4C  //[STA] Contention Free pollable capability indication
-#define CFG_AUTHENTICATION_ALGORITHMS  0xFD4D  //Available Authentication Algorithms indication
-#define CFG_PRIVACY_OPT_IMPLEMENTED            0xFD4F  //WEP Option availability indication
-
-#define CFG_CUR_REMOTE_RATES                   0xFD50  //[STA] CurrentRemoteRates
-#define CFG_CUR_USED_RATES                             0xFD51  //[STA] CurrentUsedRates
-#define CFG_CUR_SYSTEM_SCALE                   0xFD52  //[STA] CurrentSystemScale
-
-#define CFG_CUR_TX_RATE1                               0xFD80  //[AP] Actual Port 1 transmit data rate
-#define CFG_CUR_TX_RATE2                               0xFD81  //[AP] Actual Port 2 transmit data rate
-#define CFG_CUR_TX_RATE3                               0xFD82  //[AP] Actual Port 3 transmit data rate
-#define CFG_CUR_TX_RATE4                               0xFD83  //[AP] Actual Port 4 transmit data rate
-#define CFG_CUR_TX_RATE5                               0xFD84  //[AP] Actual Port 5 transmit data rate
-#define CFG_CUR_TX_RATE6                               0xFD85  //[AP] Actual Port 6 transmit data rate
-#define CFG_NIC_MAC_ADDR                               0xFD86  //Unique local node MAC Address
-#define CFG_PCF_INFO                                   0xFD87  //[AP] Point Coordination Function capability info
-//*RESERVED* #define CFG_HIGHEST_BASIC_RATE                    0xFD88  //
-#define CFG_CUR_COUNTRY_INFO                   0xFD89  //
-#define CFG_CUR_WPA_INFO_ELEMENT               0xFD8A  //
-#define CFG_CUR_TKIP_IV_INFO                   0xFD8B  //
-#define CFG_CUR_ASSOC_REQ_INFO                 0xFD8C  //
-#define CFG_CUR_ASSOC_RESP_INFO                        0xFD8D  //
-#define CFG_CUR_LOAD                                   0xFD8E  //[AP] current load on AP's channel
-
-#define CFG_SECURITY_CAPABILITIES              0xFD90  //Combined capabilities information
-
-//     MODEM INFORMATION
-#define CFG_PHY_TYPE                                   0xFDC0  //Physical layer type indication
-#define CFG_CUR_CHANNEL                                        0xFDC1  //Actual frequency channel used for transmission
-#define CFG_CUR_POWER_STATE                            0xFDC2  //Actual power consumption status
-#define CFG_CCA_MODE                                   0xFDC3  //Clear channel assessment mode indication
-#define CFG_SUPPORTED_DATA_RATES               0xFDC6  //Data rates capability information
-
-#define CFG_RID_INF_MAX                                        0xFDFF  //highest value representing an Information RID
-
-//     ENGINEERING INFORMATION
-#define CFG_RID_ENG_MIN                                        0xFFE0  //lowest value representing a Hermes engineering RID
-
-
-/****************************** General define *************************************************************/
-
-
-//IFB field related
-//             IFB_CardStat
-#define CARD_STAT_INCOMP_PRI                   0x2000U // no compatible HSI / primary F/W
-#define CARD_STAT_INCOMP_FW                            0x1000U // no compatible station / tertiary F/W
-#define CARD_STAT_DEFUNCT                              0x0100U // HCF is in Defunct mode
-//             IFB_RxStat
-#define RX_STAT_PRIO                                   0x00E0U //Priority subfield
-#define RX_STAT_ERR                                            0x000FU //Error mask
-#define        RX_STAT_UNDECR                          0x0002U //Non-decryptable encrypted message
-#define        RX_STAT_FCS_ERR                         0x0001U //FCS error
-
-// SNAP header for E-II Encapsulation
-#define ENC_NONE                                   0xFF
-#define ENC_1042                               0x00
-#define ENC_TUNNEL                             0xF8
-/****************************** Xxxxxxxx *******************************************************************/
-
-
-#define HCF_SUCCESS                                    0x00    // OK
-#define HCF_ERR_TIME_OUT                       0x04    // Expected Hermes event did not occur in expected time
-#define HCF_ERR_NO_NIC                         0x05    /* card not found (usually yanked away during hcfio_in_string
-                                                                                        * Also: card is either absent or disabled while it should be neither */
-#define HCF_ERR_LEN                                    0x08    /* buffer size insufficient
-                                                                                        *                -     IFB_ConfigTable too small
-                                                                                        *                -     hcf_get_info buffer has a size of 0 or 1 or less than needed
-                                                                                        *                      to accommodate all data
-                                                                                        *                -     hcf_put_info: CFG_DLNV_DATA exceeds intermediate
-                                                                                        *                buffer size */
-#define HCF_ERR_INCOMP_PRI                     0x09    // primary functions are not compatible
-#define HCF_ERR_INCOMP_FW                      0x0A    // station functions are compatible
-#define HCF_ERR_MIC                                    0x0D    // MIC check fails
-#define HCF_ERR_SLEEP                          0x0E    // NIC in sleep mode
-#define HCF_ERR_MAX                                    0x3F    /* end of HCF range
-                                                                                          *** ** *** ****** *** *************** */
-#define HCF_ERR_DEFUNCT                                0x80    // BIT, reflecting that the HCF is in defunct mode (bits 0x7F reflect cause)
-#define HCF_ERR_DEFUNCT_AUX                    0x82    // Timeout on acknowledgement on en/disabling AUX registers
-#define HCF_ERR_DEFUNCT_TIMER          0x83    // Timeout on timer calibration during initialization process
-#define HCF_ERR_DEFUNCT_TIME_OUT       0x84    // Timeout on Busy bit drop during BAP setup
-#define HCF_ERR_DEFUNCT_CMD_SEQ                0x86    // Hermes and HCF are out of sync in issuing/processing commands
-
-#define HCF_INT_PENDING                                0x01    // return status of hcf_act( HCF_ACT_INT_OFF )
-
-#define HCF_PORT_0                                     0x0000  // Station supports only single MAC Port
-#define HCF_PORT_1                                     0x0100  // HCF_PORT_1 through HCF_PORT_6 are only supported by AP F/W
-#define HCF_PORT_2                                     0x0200
-#define HCF_PORT_3                                     0x0300
-#define HCF_PORT_4                                     0x0400
-#define HCF_PORT_5                                     0x0500
-#define HCF_PORT_6                                     0x0600
-
-#define HCF_CNTL_ENABLE                                0x01
-#define HCF_CNTL_DISABLE                       0x02
-#define HCF_CNTL_CONNECT                       0x03
-#define HCF_CNTL_DISCONNECT                    0x05
-#define HCF_CNTL_CONTINUE                      0x07
-
-#define USE_DMA                                        0x0001
-#define USE_16BIT                                      0x0002
-#define DMA_ENABLED                                    0x8000  //weak name, it really means: F/W enabled and DMA selected
-
-//#define HCF_DMA_FD_CNT                       (2*29)                                          //size in bytes of one Tx/RxFS minus DA/SA
-//;?the MSF ( H2PCI.C uses the next 2 mnemonics )
-#define HCF_DMA_RX_BUF1_SIZE           (HFS_ADDR_DEST + 8)                     //extra bytes for LEN/SNAP if decapsulation
-#define HCF_DMA_TX_BUF1_SIZE           (HFS_ADDR_DEST + 2*6 + 8)       //extra bytes for DA/SA/LEN/SNAP if encapsulation
-
-//HFS_TX_CNTL
-/* Note that the HCF_.... System Constants influence the HFS_.... values below
- *                              H-I     H-I  |  H-II    H-II    H-II.5
- *                                      WPA  |          WPA
- * HFS_TX_CNTL_TX_OK            0002    0002 |  0002    0002     N/A    <<<<<<<<deprecated
- * HFS_TX_CNTL_TX_EX            0004    0004 |  0004    0004     N/A
- * HFS_TX_CNTL_MIC               N/A    0010 |   N/A    0010     N/A
- * HFS_TX_CNTL_TID               N/A     N/A |   N/A     N/A    000F
- * HFS_TX_CNTL_SERVICE_CLASS     N/A     N/A |   N/A     N/A    00C0
- * HFS_TX_CNTL_PORT             0700    0700 |  0700    0700    0700
- * HFS_TX_CNTL_MIC_KEY_ID       1800    1800 |  0000    1800     N/A
- * HFS_TX_CNTL_CKIP             0000    0000 |  0000    2000    2000
- * HFS_TX_CNTL_TX_DELAY         4000    4000 |  4000    4000     N/A
- * HFS_TX_CNTL_ACTION            N/A     N/A |   N/A     N/A    4000
- *                              ====    ==== |  ====    ====    ====
- *                              5F06    5F16 |  4706    7F06    67CF
- *
- * HCF_TX_CNTL_MASK specifies the bits allowed on the Host I/F
- * note: bit 0x4000 has different meaning for H-II and H-II.5
- * note: [] indicate bits which are possibly added by the HCF to TxControl at the Host I/F
- * note: () indicate bits which are supposedly never ever used in a WCI environment
- * note: ? denote bits which seem not to be documented in the documents I have available
- */
-//H-I:     HCF_TX_CNTL_MASK    0x47FE  //TX_DELAY, MACPort, Priority, (StrucType), TxEx, TxOK
-//H-I WPA: HCF_TX_CNTL_MASK    0x5FE6  //TX_DELAY, MICKey, MACPort, Priority, (StrucType), TxEx, TxOK
-#if (HCF_TYPE) & HCF_TYPE_WARP
-#define  HCF_TX_CNTL_MASK      0x27E7  //no TX_DELAY?, CCX, MACPort, Priority, (StrucType), TxEx, TxOK, Spectralink
-//#elif (HCF_TYPE) & HCF_TYPE_WPA
-//#define  HCF_TX_CNTL_MASK    0x7F06  //TX_DELAY, CKIP?, MICKeyID, MACPort, [MIC],TxEx, TxOK (TAR419D7)
-#else
-#define  HCF_TX_CNTL_MASK      0x67E7  //TX_DELAY?, CCX, MACPort, Priority, (StrucType), TxEx, TxOK, Spectralink
-#endif // HCF_TYPE_WARP
-
-#define HFS_TX_CNTL_TX_EX                      0x0004U
-
-#if (HCF_TYPE) & HCF_TYPE_WPA
-#define HFS_TX_CNTL_MIC                                0x0010U //802.3 format with TKIP                ;?changes to 0x0008 for H-II
-#define HFS_TX_CNTL_MIC_KEY_ID         0x1800U //MIC Key ID subfield
-#endif // HCF_TYPE_WPA
-
-#define HFS_TX_CNTL_PORT                       0x0700U //Port subfield of TxControl field of Transmit Frame Structure
-
-#if (HCF_TYPE) & HCF_TYPE_CCX
-#define HFS_TX_CNTL_CKIP                       0x2000U //CKIP encrypted flag
-#endif // HCF_TYPE_CCX
-
-#if (HCF_TYPE) & HCF_TYPE_TX_DELAY
-#define HFS_TX_CNTL_TX_DELAY           0x4000U //decouple "put data" and send
-#endif // HCF_TYPE_TX_DELAY
-#define HFS_TX_CNTL_TX_CONT                    0x4000u //engineering: continuous transmit
-
-/*============================================================= HCF Defined RECORDS    =========================*/
-#define CFG_PROD_DATA                                  0x0800          //Plug Data (Engineering Test purposes only)
-#define CFG_DL_EEPROM                                  0x0806          //Up/Download I2PROM for USB
-#define                CFG_PDA                                                 0x0002          //Download PDA
-#define                CFG_MEM_I2PROM                                  0x0004          //Up/Download EEPROM
-
-#define                CFG_MEM_READ                                    0x0000
-#define                CFG_MEM_WRITE                                   0x0001
-
-#define CFG_NULL                                               0x0820          //Empty Mail Box Info Block
-#define CFG_MB_INFO                                            0x0820          //Mail Box Info Block
-#define CFG_WMP                                                        0x0822          //WaveLAN Management Protocol
-
-#if defined MSF_COMPONENT_ID
-#define CFG_DRV_INFO                                   0x0825          //Driver Information structure (see CFG_DRV_INFO_STRCT for details)
-#define CFG_DRV_IDENTITY                               0x0826          //driver identity (see CFG_DRV_IDENTITY_STRCT for details)
-#define CFG_DRV_SUP_RANGE                              0x0827      //Supplier range of driver - utility I/F
-#define CFG_DRV_ACT_RANGES_PRI                 0x0828      //(Acceptable) Actor range for Primary Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_STA                 0x0829      //(Acceptable) Actor range for Station Firmware - driver I/F
-#define CFG_DRV_ACT_RANGES_HSI                         0x082A      //(Acceptable) Actor range for H/W - driver I/F
-#define CFG_DRV_ACT_RANGES_APF                 0x082B          //(Acceptable) Actor range for AP Firmware - driver I/F
-#define CFG_HCF_OPT                                            0x082C          //HCF (Compile time) options
-#endif // MSF_COMPONENT_ID
-
-#define CFG_REG_MB                                             0x0830          //Register Mail Box
-#define CFG_MB_ASSERT                                  0x0831          //Assert information
-#define CFG_REG_ASSERT_RTNP                            0x0832          //(de-)register MSF Assert Callback routine
-#if (HCF_EXT) & HCF_EXT_INFO_LOG
-#define CFG_REG_INFO_LOG                               0x0839          //(de-)register Info frames to Log
-#endif // HCF_INFO_LOG
-#define CFG_CNTL_OPT                                   0x083A          //Control options
-
-#define CFG_PROG                                               0x0857          //Program NIC memory
-#define        CFG_PROG_STOP                                   0x0000
-#define        CFG_PROG_VOLATILE                               0x0100
-//#define      CFG_PROG_FLASH                                  0x0300          //restore if H-II non-volatile is introduced
-//#define      CFG_PROG_SEEPROM                                0x1300          //restore if H-II non-volatile is introduced
-#define        CFG_PROG_SEEPROM_READBACK               0x0400
-
-#define CFG_FW_PRINTF                       0x0858      //Related to firmware debug printf functionality
-#define CFG_FW_PRINTF_BUFFER_LOCATION       0x0859      //Also related to firmware debug printf functionality
-
-#define CFG_CMD_NIC                                            0x0860          //Hermes Engineering command
-#define CFG_CMD_HCF                                            0x0863          //HCF Engineering command
-#define        CFG_CMD_HCF_REG_ACCESS                  0x0000  //Direct register access
-#define        CFG_CMD_HCF_RX_MON                              0x0001  //Rx-monitor
-
-
-/*============================================================= MSF Defined RECORDS    ========================*/
-#define CFG_ENCRYPT_STRING                             0x0900          //transfer encryption info from CPL to MSF
-#define CFG_AP_MODE                                            0x0901          //control mode of STAP driver from CPL
-#define CFG_DRIVER_ENABLE                              0x0902          //extend&export En-/Disable facility to Utility
-#define CFG_PCI_COMMAND                                        0x0903          //PCI adapter (Ooievaar) structure
-#define CFG_WOLAS_ENABLE                               0x0904          //extend&export En-/Disable WOLAS facility to Utility
-#define CFG_COUNTRY_STRING                             0x0905          //transfer CountryInfo info from CPL to MSF
-#define CFG_FW_DUMP                                            0x0906          //transfer nic memory to utility
-#define CFG_POWER_MODE                                 0x0907          //controls the PM mode of the card
-#define CFG_CONNECTION_MODE                            0x0908          //controls the mode of the FW (ESS/AP/IBSS/ADHOC)
-#define CFG_IFB                                                        0x0909          //byte wise copy of IFB
-#define CFG_MSF_TALLIES                                        0x090A          //MSF tallies (int's, rx and tx)
-#define CFG_CURRENT_LINK_STATUS                        0x090B          //Latest link status got through 0xF200 LinkEvent
-
-/*============================================================ INFORMATION FRAMES =========================*/
-#define CFG_INFO_FRAME_MIN                             0xF000          //lowest value representing an Information Frame
-
-#define CFG_TALLIES                                            0xF100          //Communications Tallies
-#define CFG_SCAN                                               0xF101          //Scan results
-#define CFG_PRS_SCAN                                   0xF102          //Probe Response Scan results
-
-#define CFG_LINK_STAT                                  0xF200          //Link Status
-       /* 1 through 5 are F/W defined values, produced by CFG_LINK_STAT frame
-        * 1 through 5 are shared by CFG_LINK_STAT, IFB_LinkStat and IFB_DSLinkStat
-        * 1 plays a double role as CFG_LINK_STAT_CONNECTED and as bit reflecting:
-        *       - connected: ON
-        *       - disconnected: OFF
-        */
-#define        CFG_LINK_STAT_CONNECTED                 0x0001
-#define        CFG_LINK_STAT_DISCONNECTED              0x0002
-#define        CFG_LINK_STAT_AP_CHANGE                 0x0003
-#define        CFG_LINK_STAT_AP_OOR                    0x0004
-#define        CFG_LINK_STAT_AP_IR                             0x0005
-#define        CFG_LINK_STAT_FW                                0x000F  //mask to isolate F/W defined bits
-//#define      CFG_LINK_STAT_TIMER                             0x0FF0  //mask to isolate OOR timer
-//#define      CFG_LINK_STAT_DS_OOR                    0x2000  //2000 and up are IFB_LinkStat specific
-//#define      CFG_LINK_STAT_DS_IR                             0x4000
-#define        CFG_LINK_STAT_CHANGE                    0x8000
-#define CFG_ASSOC_STAT                                 0xF201          //Association Status
-#define CFG_SECURITY_STAT                              0xF202          //Security Status
-#define CFG_UPDATED_INFO_RECORD                        0xF204          //Updated Info Record
-
-/*============================================================ CONFIGURATION RECORDS ======================*/
-/***********************************************************************************************************/
-
-/****************************** S T R U C T U R E   D E F I N I T I O N S **********************************/
-
-//Quick&Dirty to get download for DOS ODI Hermes-II running typedef LTV_STRCT FAR *    LTVP;
-typedef LTV_STRCT FAR *        LTVP;   // i.s.o #define LTVP LTV_STRCT FAR *
-
-#if defined WVLAN_42 || defined WVLAN_43 //;?keepup with legacy a little while longer (4aug2003)
-typedef struct DUI_STRCT {                     /* "legacy", still used by WVLAN42/43, NDIS drivers use WLAPI                   */
-       void  FAR       *ifbp;                          /* Pointer to IFB
-                                                                        *      returned from MSF to USF by uil_connect
-                                                                        *      passed from USF to MSF as a "magic cookie" by all other UIL function calls
-                                                                        */
-       hcf_16          stat;                           // status returned from MSF to USF
-       hcf_16          fun;                            // command code from USF to MSF
-       LTV_STRCT       ltv;                            /* LTV structure
-                                                                        *** during uil_put_info:
-                                                                        *        the L, T and V-fields carry information from USF to MSF
-                                                                        *** during uil_get_info:
-                                                                        *        the L and T fields carry information from USF to MSF
-                                                                        *        the L and V-fields carry information from MSF to USF
-                                                                        */
-} DUI_STRCT;
-typedef DUI_STRCT FAR *        DUIP;
-#endif //defined WVLAN_42 || defined WVLAN_43 //;?keepup with legacy a liitle while longer (4aug2003)
-
-
-typedef struct CFG_CMD_NIC_STRCT {     // CFG_CMD_NIC (0x0860)         Hermes Engineering command
-       hcf_16  len;                                    //default length of RID
-       hcf_16  typ;                                    //RID identification as defined by Hermes
-       hcf_16  cmd;                                    //Command code (0x003F) and control bits (0xFFC0)
-       hcf_16  parm0;                                  //parameters for Hermes Param0 register
-       hcf_16  parm1;                                  //parameters for Hermes Param1 register
-       hcf_16  parm2;                                  //parameters for Hermes Param2 register
-       hcf_16  stat;                                   //result code from Hermes Status register
-       hcf_16  resp0;                                  //responses from Hermes Resp0 register
-       hcf_16  resp1;                                  //responses from Hermes Resp1 register
-       hcf_16  resp2;                                  //responses from Hermes Resp2 register
-       hcf_16  hcf_stat;                               //result code from cmd_exe routine
-       hcf_16  ifb_err_cmd;                    //IFB_ErrCmd
-       hcf_16  ifb_err_qualifier;              //IFB_ErrQualifier
-} CFG_CMD_NIC_STRCT;
-
-
-typedef struct CFG_DRV_INFO_STRCT {            //CFG_DRV_INFO (0x0825) driver information
-       hcf_16  len;                                    //default length of RID
-       hcf_16  typ;                                    //RID identification as defined by Hermes
-       hcf_8   driver_name[8];                 //Driver name, 8 bytes, right zero padded
-       hcf_16  driver_version;                 //BCD 2 digit major and 2 digit minor driver version
-       hcf_16  HCF_version;                    //BCD 2 digit major and 2 digit minor HCF version
-       hcf_16  driver_stat;                    //
-       hcf_16  IO_address;                             //base IO address used by NIC
-       hcf_16  IO_range;                               //range of IO addresses used by NIC
-       hcf_16  IRQ_number;                             //Interrupt used by NIC
-       hcf_16  card_stat;                              /*NIC status
-                                                                       @*      0x8000  Card present
-                                                                       @*      0x4000  Card Enabled
-                                                                       @*      0x2000  Driver incompatible with NIC Primary Functions
-                                                                       @*      0x1000  Driver incompatible with NIC Station Functions                          */
-       hcf_16  frame_type;                             /*Frame type
-                                                                       @*      0x000   802.3
-                                                                       @*      0x008   802.11                                                                                                          */
-       hcf_32  drv_info;                               /*driver specific info
-                                                                        * CE: virtual I/O base                                                                                                 */
-}CFG_DRV_INFO_STRCT;
-
-#define COMP_ID_FW_PRI                                 21              //Primary Functions Firmware
-#define COMP_ID_FW_INTERMEDIATE                        22              //Intermediate Functions Firmware
-#define COMP_ID_FW_STA                                 31              //Station Functions Firmware
-#define COMP_ID_FW_AP                                  32              //AP Functions Firmware
-#define COMP_ID_FW_AP_FAKE                        331          //AP Functions Firmware
-
-#define COMP_ID_MINIPORT_NDIS_31               41              //Windows 9x/NT Miniport NDIS 3.1
-#define COMP_ID_PACKET                                 42              //Packet
-#define COMP_ID_ODI_16                                 43              //DOS ODI
-#define COMP_ID_ODI_32                                 44              //32-bits ODI
-#define COMP_ID_MAC_OS                                 45              //Macintosh OS
-#define COMP_ID_WIN_CE                                 46              //Windows CE Miniport
-//#define COMP_ID_LINUX_PD                             47              //Linux, HCF-light based, MSF source code in Public Domain
-#define COMP_ID_MINIPORT_NDIS_50               48              //Windows 9x/NT Miniport NDIS 5.0
-#define COMP_ID_LINUX                                  49              /*Linux, GPL'ed HCF based, full source code in Public Domain
-                                                                                                *thanks to Andreas Neuhaus                                                             */
-#define COMP_ID_QNX                                            50              //QNX
-#define COMP_ID_MINIPORT_NDIS_50_USB   51              //Windows 9x/NT Miniport NDIS 4.0
-#define COMP_ID_MINIPORT_NDIS_40               52              //Windows 9x/NT Miniport NDIS 4.0
-#define COMP_ID_VX_WORKS_ENDSTA                        53              // VxWorks END Station driver
-#define COMP_ID_VX_WORKS_ENDAP                 54              // VxWorks END Access Point driver
-//;?#define COMP_ID_MAC_OS_????                        55              //;?check with HM
-#define COMP_ID_VX_WORKS_END                   56              // VxWorks END Station/Access Point driver
-//                                                                             57              //NucleusOS@ARM Driver.
-#define COMP_ID_WSU                                            63              /* WaveLAN Station Firmware Update utility
-                                                                                                *      variant 1: Windows
-                                                                                                *      variant 2: DOS
-                                                                                                */
-#define COMP_ID_AP1                                            81              //WaveLAN/IEEE AP
-#define COMP_ID_EC                                             83              //WaveLAN/IEEE Ethernet Converter
-#define COMP_ID_UBL                                            87              //USB Boot Loader
-
-#define COMP_ROLE_SUPL                                 0x00    //supplier
-#define COMP_ROLE_ACT                                  0x01    //actor
-
-                                                                                               //Supplier                        - actor
-#define COMP_ID_MFI                                            0x01    //Modem                           - Firmware    I/F
-#define COMP_ID_CFI                                            0x02    //Controller              - Firmware    I/F
-#define COMP_ID_PRI                                            0x03    //Primary Firmware        - Driver              I/F
-#define COMP_ID_STA                                            0x04    //Station Firmware        - Driver              I/F
-#define COMP_ID_DUI                                            0x05    //Driver                          - Utility             I/F
-#define COMP_ID_HSI                                            0x06    //H/W                 - Driver          I/F
-#define COMP_ID_DAI                                            0x07    //API                 - Driver          I/F
-#define COMP_ID_APF                                            0x08    //H/W                 - Driver          I/F
-#define COMP_ID_INT                                            0x09    //Intermediate FW     - Driver          I/F
-
-#ifdef HCF_LEGACY
-#define HCF_ACT_ACS_SCAN                               HCF_ACT_PRS_SCAN
-#define UIL_ACT_ACS_SCAN                               UIL_ACT_PRS_SCAN
-#define MDD_ACT_ACS_SCAN                               MDD_ACT_PRS_SCAN
-#define CFG_ACS_SCAN                                   CFG_PRS_SCAN
-#endif // HCF_LEGACY
-
-#endif // MDD_H
-
diff --git a/drivers/staging/wlags49_h2/mmd.c b/drivers/staging/wlags49_h2/mmd.c
deleted file mode 100644 (file)
index 3312348..0000000
+++ /dev/null
@@ -1,250 +0,0 @@
-
-/************************************************************************************************************
-*
-* FILE   : mmd.c
-*
-* DATE    : $Date: 2004/07/23 11:57:45 $   $Revision: 1.4 $
-* Original: 2004/05/28 14:05:35    Revision: 1.32      Tag: hcf7_t20040602_01
-* Original: 2004/05/13 15:31:45    Revision: 1.30      Tag: hcf7_t7_20040513_01
-* Original: 2004/04/15 09:24:42    Revision: 1.25      Tag: hcf7_t7_20040415_01
-* Original: 2004/04/08 15:18:17    Revision: 1.24      Tag: t7_20040413_01
-* Original: 2004/04/01 15:32:55    Revision: 1.22      Tag: t7_20040401_01
-* Original: 2004/03/10 15:39:28    Revision: 1.18      Tag: t20040310_01
-* Original: 2004/03/03 14:10:12    Revision: 1.16      Tag: t20040304_01
-* Original: 2004/03/02 09:27:12    Revision: 1.14      Tag: t20040302_03
-* Original: 2004/02/24 13:00:29    Revision: 1.12      Tag: t20040224_01
-* Original: 2004/01/30 09:59:33    Revision: 1.11      Tag: t20040219_01
-*
-* AUTHOR  : Nico Valster
-*
-* DESC    : Common routines for HCF, MSF, UIL as well as USF sources
-*
-* Note: relative to Asserts, the following can be observed:
-*      Since the IFB is not known inside the routine, the macro HCFASSERT is replaced with MDDASSERT.
-*      Also the line number reported in the assert is raised by FILE_NAME_OFFSET (20000) to discriminate the
-*      MMD Asserts from HCF and DHF asserts.
-*
-***************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT © 2001 - 2004     by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-**************************************************************************************************************/
-
-#include "hcf.h"                               // Needed as long as we do not really sort out the mess
-#include "hcfdef.h"                            // get CNV_LITTLE_TO_SHORT
-#include "mmd.h"                               // MoreModularDriver common include file
-
-//to distinguish DHF from HCF asserts by means of line number
-#undef FILE_NAME_OFFSET
-#define FILE_NAME_OFFSET DHF_FILE_NAME_OFFSET
-
-
-/*************************************************************************************************************
-*
-*.MODULE               CFG_RANGE_SPEC_STRCT* mmd_check_comp( CFG_RANGES_STRCT *actp, CFG_SUP_RANGE_STRCT *supp )
-*.PURPOSE              Checks compatibility between an actor and a supplier.
-*
-*.ARGUMENTS
-*      actp
-*      supp
-*
-*.RETURNS
-*      NULL    incompatible
-*      <>NULL  pointer to matching CFG_RANGE_SPEC_STRCT substructure in actor-structure matching the supplier
-*
-*.NARRATIVE
-*
-*  Parameters:
-*      actp    address of the actor specification
-*      supp    address of the supplier specification
-*
-*      Description: mmd_check_comp is a support routine to check the compatibility between an actor and a
-*      supplier.  mmd_check_comp is independent of the endianness of the actp and supp structures. This is
-*      achieved by checking the "bottom" or "role" fields of these structures. Since these fields are restricted
-*      to a limited range, comparing the contents to a value with a known endian-ess gives a clue to their actual
-*      endianness.
-*
-*.DIAGRAM
-*1a: The role-field of the actor structure has a known non-zero, not "byte symmetric" value (namely
-*      COMP_ROLE_ACT or 0x0001), so if and only the contents of this field matches COMP_ROLE_ACT (in Native
-*      Endian format), the actor structure is Native Endian.
-*2a: Since the role-field of the supplier structure is 0x0000, the test as used for the actor does not work
-*      for a supplier. A supplier has always exactly 1 variant,top,bottom record with (officially, but see the
-*      note below) each of these 3 values in the range 1 through 99, so one byte of the word value of variant,
-*      top and bottom words is 0x00 and the other byte is non-zero. Whether the lowest address byte or the
-*      highest address byte is non-zero depends on the Endianness of the LTV. If and only if the word value of
-*      bottom is less than 0x0100, the supplier is Native Endian.
-*      NOTE: the variant field of the supplier structure can not be used for the Endian Detection Algorithm,
-*      because a a zero-valued variant has been used as Controlled Deployment indication in the past.
-*      Note: An actor may have multiple sets of variant,top,bottom records, including dummy sets with variant,
-*      top and bottom fields with a zero-value. As a consequence the endianness of the actor can not be determined
-*      based on its variant,top,bottom values.
-*
-*      Note: the L and T field of the structures are always in Native Endian format, so you can not draw
-*      conclusions concerning the Endianness of the structure based on these two fields.
-*
-*1b/2b
-*      The only purpose of the CFG_RANGE_SPEC_BYTE_STRCT is to give easy access to the non-zero byte of the word
-*      value of variant, top and bottom. The variables sup_endian and act_endian are used for the supplier and
-*      actor structure respectively. These variables must be 0 when the structure has LE format and 1 if the
-*      structure has BE format. This can be phrased as:
-*      the variable is false (i.e 0x0000) if either
-*              (the platform is LE and the LTV is the same as the platform)
-*      or
-*              (the platform is BE and the LTV differs from the platform).
-*      the variable is true (i.e 0x0001) if either
-*              (the platform is BE and the LTV is the same as the platform)
-*      or
-*              (the platform is LE and the LTV differs from the platform).
-*
-*      Alternatively this can be phrased as:
-*      if the platform is LE
-*              if the LTV is LE (i.e the same as the platform), then the variable = 0
-*              else (the LTV is BE (i.e. different from the platform) ), then the variable = 1
-*      if the platform is BE
-*              if the LTV is BE (i.e the same as the platform), then the variable = 1
-*              else (the LTV is LE (i.e. different from the platform) ), then the variable = 0
-*
-*      This is implemented as:
-*      #if HCF_BIG_ENDIAN == 0 //platform is LE
-*              sup/act_endian becomes reverse of structure-endianness as determined in 1a/1b
-*      #endif
-*6:    Each of the actor variant-bottom-top records is checked against the (single) supplier variant-bottom-top
-*      range till either an acceptable match is found or all actor records are tried. As explained above, due to
-*      the limited ranges of these values, checking a byte is acceptable and suitable.
-*8:    depending on whether a match was found or not (as reflected by the value of the control variable of the
-*      for loop), the NULL pointer or a pointer to the matching Number/Bottom/Top record of the Actor structure
-*      is returned.
-*      As an additional safety, checking the supplier length protects against invalid Supplier structures, which
-*      may be caused by failing hcf_get_info (in which case the len-field is zero). Note that the contraption
-*      "supp->len != sizeof(CFG_SUP_RANGE_STRCT)/sizeof(hcf_16) - 1"
-*      did turn out not to work for a compiler which padded the structure definition.
-*
-* Note: when consulting references like DesignNotes and Architecture specifications there is a confusing use
-*      of the notions number and variant. This resulted in an inconsistent use in the HCF nomenclature as well.
-*      This makes the logic hard to follow and one has to be very much aware of the context when walking through
-*      the code.
-* NOTE: The Endian Detection Algorithm places limitations on future extensions of the fields, i.e. they should
-*      stay within the currently defined boundaries of 1 through 99 (although 1 through 255) would work as well
-*      and there should never be used a zero value for the bottom of a valid supplier.
-* Note: relative to Asserts, the following can be observed:
-*      1: Supplier variant 0x0000 has been used for Controlled Deployment
-*      2: An actor may have one or more variant record specifications with a top of zero and a non-zero bottom
-*      to override the HCF default support of a particular variant by the MSF programmer via hcfcfg.h
-*      3:      An actor range can be specified as all zeros, e.g. as padding in the automatically generated firmware
-*      image files.
-*.ENDDOC                               END DOCUMENTATION
-*************************************************************************************************************/
-CFG_RANGE_SPEC_STRCT*
-mmd_check_comp( CFG_RANGES_STRCT *actp, CFG_SUP_RANGE_STRCT *supp )
-{
-
-CFG_RANGE_SPEC_BYTE_STRCT  *actq = (CFG_RANGE_SPEC_BYTE_STRCT*)actp->var_rec;
-CFG_RANGE_SPEC_BYTE_STRCT  *supq = (CFG_RANGE_SPEC_BYTE_STRCT*)&(supp->variant);
-hcf_16 i;
-int            act_endian;                                     //actor endian flag
-int            sup_endian;                                     //supplier endian flag
-
-       act_endian = actp->role == COMP_ROLE_ACT;       //true if native endian                         /* 1a */
-       sup_endian = supp->bottom < 0x0100;                     //true if native endian                         /* 2a */
-
-#if HCF_ASSERT
-       MMDASSERT( supp->len == 6,                                                                                                                              supp->len )
-       MMDASSERT( actp->len >= 6 && actp->len%3 == 0,                                                                                  actp->len )
-
-       if ( act_endian ) {                                                     //native endian
-               MMDASSERT( actp->role == COMP_ROLE_ACT,                                                                                         actp->role )
-               MMDASSERT( 1 <= actp->id && actp->id <= 99,                                                                             actp->id )
-       } else {                                                                        //non-native endian
-               MMDASSERT( actp->role == CNV_END_SHORT(COMP_ROLE_ACT),                                                          actp->role )
-               MMDASSERT( 1 <= CNV_END_SHORT(actp->id) && CNV_END_SHORT(actp->id) <= 99,                               actp->id )
-       }
-       if ( sup_endian ) {                                                     //native endian
-               MMDASSERT( supp->role == COMP_ROLE_SUPL,                                                                                        supp->role )
-               MMDASSERT( 1 <= supp->id      && supp->id <= 99,                                                                        supp->id )
-               MMDASSERT( 1 <= supp->variant && supp->variant <= 99,                                                           supp->variant )
-               MMDASSERT( 1 <= supp->bottom  && supp->bottom <= 99,                                                            supp->bottom )
-               MMDASSERT( 1 <= supp->top     && supp->top <= 99,                                                                       supp->top )
-               MMDASSERT( supp->bottom <= supp->top,                                                   supp->bottom << 8 | supp->top )
-       } else {                                                                        //non-native endian
-               MMDASSERT( supp->role == CNV_END_SHORT(COMP_ROLE_SUPL),                                                                 supp->role )
-               MMDASSERT( 1 <= CNV_END_SHORT(supp->id) && CNV_END_SHORT(supp->id) <= 99,                               supp->id )
-               MMDASSERT( 1 <= CNV_END_SHORT(supp->variant) && CNV_END_SHORT(supp->variant) <= 99,             supp->variant )
-               MMDASSERT( 1 <= CNV_END_SHORT(supp->bottom)  && CNV_END_SHORT(supp->bottom) <=99,               supp->bottom )
-               MMDASSERT( 1 <= CNV_END_SHORT(supp->top)     && CNV_END_SHORT(supp->top) <=99,                  supp->top )
-               MMDASSERT( CNV_END_SHORT(supp->bottom) <= CNV_END_SHORT(supp->top),     supp->bottom << 8 |     supp->top )
-       }
-#endif // HCF_ASSERT
-
-#if HCF_BIG_ENDIAN == 0
-       act_endian = !act_endian;                                                                                                                                               /* 1b*/
-       sup_endian = !sup_endian;                                                                                                                                               /* 2b*/
-#endif // HCF_BIG_ENDIAN
-
-       for ( i = actp->len ; i > 3; actq++, i -= 3 ) {                                                                                                 /* 6 */
-               MMDASSERT( actq->variant[act_endian] <= 99, i<<8 | actq->variant[act_endian] )
-               MMDASSERT( actq->bottom[act_endian] <= 99 , i<<8 | actq->bottom[act_endian] )
-               MMDASSERT( actq->top[act_endian] <= 99    , i<<8 | actq->top[act_endian] )
-               MMDASSERT( actq->bottom[act_endian] <= actq->top[act_endian], i<<8 | actq->bottom[act_endian] )
-               if ( actq->variant[act_endian] == supq->variant[sup_endian] &&
-                        actq->bottom[act_endian]  <= supq->top[sup_endian] &&
-                        actq->top[act_endian]     >= supq->bottom[sup_endian]
-                  ) break;
-       }
-       if ( i <= 3 || supp->len != 6 /*sizeof(CFG_SUP_RANGE_STRCT)/sizeof(hcf_16) - 1 */ ) {
-          actq = NULL;                                                                                                                                                                 /* 8 */
-       }
-#if HCF_ASSERT
-       if ( actq == NULL ) {
-               for ( i = 0; i <= supp->len; i += 2 ) {
-                       MMDASSERT( DO_ASSERT, MERGE_2( ((hcf_16*)supp)[i], ((hcf_16*)supp)[i+1] ) );
-               }
-               for ( i = 0; i <= actp->len; i += 2 ) {
-                       MMDASSERT( DO_ASSERT, MERGE_2( ((hcf_16*)actp)[i], ((hcf_16*)actp)[i+1] ) );
-               }
-       }
-#endif // HCF_ASSERT
-       return (CFG_RANGE_SPEC_STRCT*)actq;
-} // mmd_check_comp
-
diff --git a/drivers/staging/wlags49_h2/mmd.h b/drivers/staging/wlags49_h2/mmd.h
deleted file mode 100644 (file)
index 1445803..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-
-#ifndef MMD_H
-#define MMD_H 1
-
-/*************************************************************************************************************
-*
-* FILE   : mmd.h
-*
-* DATE    : $Date: 2004/07/19 08:16:14 $   $Revision: 1.2 $
-* Original: 2004/05/17 07:33:14    Revision: 1.18      Tag: hcf7_t20040602_01
-* Original: 2004/05/11 06:22:59    Revision: 1.17      Tag: hcf7_t7_20040513_01
-* Original: 2004/04/15 09:24:42    Revision: 1.13      Tag: hcf7_t7_20040415_01
-* Original: 2004/04/08 15:18:17    Revision: 1.12      Tag: t7_20040413_01
-* Original: 2004/04/01 15:32:55    Revision: 1.10      Tag: t7_20040401_01
-* Original: 2004/03/04 16:47:50    Revision: 1.7      Tag: t20040310_01
-* Original: 2004/03/03 12:47:05    Revision: 1.6      Tag: t20040304_01
-* Original: 2004/02/25 14:14:39    Revision: 1.5      Tag: t20040302_03
-* Original: 2004/02/24 13:00:29    Revision: 1.4      Tag: t20040224_01
-* Original: 2004/01/30 09:59:33    Revision: 1.3      Tag: t20040219_01
-*
-* AUTHOR  : Nico Valster
-*
-* DESC    : Definitions and Prototypes for HCF, MSF, UIL as well as USF sources
-*
-***************************************************************************************************************
-*
-*
-* SOFTWARE LICENSE
-*
-* This software is provided subject to the following terms and conditions,
-* which you should read carefully before using the software.  Using this
-* software indicates your acceptance of these terms and conditions.  If you do
-* not agree with these terms and conditions, do not use the software.
-*
-* COPYRIGHT © 2001 - 2004     by Agere Systems Inc.   All Rights Reserved
-* All rights reserved.
-*
-* Redistribution and use in source or binary forms, with or without
-* modifications, are permitted provided that the following conditions are met:
-*
-* . Redistributions of source code must retain the above copyright notice, this
-*    list of conditions and the following Disclaimer as comments in the code as
-*    well as in the documentation and/or other materials provided with the
-*    distribution.
-*
-* . Redistributions in binary form must reproduce the above copyright notice,
-*    this list of conditions and the following Disclaimer in the documentation
-*    and/or other materials provided with the distribution.
-*
-* . Neither the name of Agere Systems Inc. nor the names of the contributors
-*    may be used to endorse or promote products derived from this software
-*    without specific prior written permission.
-*
-* Disclaimer
-*
-* THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
-* INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
-* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
-* USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
-* RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
-* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-* ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
-* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
-* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
-* DAMAGE.
-*
-*
-**************************************************************************************************************/
-#ifndef HCF_H
-#include "hcf.h"       //just to get going with swig
-#endif
-
-EXTERN_C CFG_RANGE_SPEC_STRCT* mmd_check_comp( CFG_RANGES_STRCT *actp, CFG_SUP_RANGE_STRCT *supp );
-
-#endif // MMD_H
diff --git a/drivers/staging/wlags49_h2/sta_h2.c b/drivers/staging/wlags49_h2/sta_h2.c
deleted file mode 100644 (file)
index 0ba8def..0000000
+++ /dev/null
@@ -1,4480 +0,0 @@
-/*
- * File:       sta_h24.236
- *
- * Abstract:   This file contains memory image 'fw_image'.
- *
- * Contents:   Total size of the memory image: 69294 bytes.
- *             Total number of blocks: 4 blocks.
- *             Block  1 : load address 00000060, 390 bytes.
- *             Block  2 : load address 00000C16, 9496 bytes.
- *             Block  3 : load address 001E312E, 15786 bytes.
- *             Block  4 : load address 001F4000, 43622 bytes.
- *
- * Identity:   component id: 31 (variant 3) version 2.36
- *
- * Compatibility:
- *             supplying interface 4 (variant 2) : 2 - 5
- *             acting on interface 1 (variant 4) : 6 - 7
- *             acting on interface 1 (variant 5) : 6 - 7
- *             acting on interface 1 (variant 6) : 6 - 7
- *             acting on interface 2 (variant 2) : 1 - 2
- *
- * Generated:  by g:\fw\fupu3.exe version 4.26
- *
- * Commandline:        g:\fw\fupu3.exe /f=4 /n=fw_image /i=r3023600.hex
- */
-
-
-#include "hcfcfg.h"    /* to get hcf_16 etc defined as well as */
-                       /* possible settings which influence mdd.h or dhf.h */
-#include "mdd.h"       /* to get COMP_ID_STA etc defined */
-#include "dhf.h"       /* used to be fhfmem.h, to get memblock,plugrecord, */
-
-static const hcf_8 fw_image_1_data[] = {
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1C, 0x0D, 0x00, 0x00,
-        0x3A, 0x0C, 0x00, 0x00, 0x3A, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x86, 0x19, 0x86, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00,
-        0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0xEA, 0x00, 0x00, 0xFF, 0x07, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x10, 0x27, 0x10, 0x27,
-        0x14, 0x00, 0xD0, 0x07, 0xD0, 0x07, 0x10, 0x27, 0x2F, 0x00, 0x32, 0x00, 0x32, 0x00, 0x05, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x10, 0x27, 0x05, 0x00, 0x00, 0x02, 0x00, 0x02, 0x13, 0x00, 0x0A, 0x00,
-        0x07, 0x00, 0x03, 0x00, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x09, 0x2B, 0x09, 0x2B, 0x09,
-        0x03, 0x00, 0x00, 0x00, 0x00, 0x6E, 0x00, 0x14, 0x01, 0x00, 0x40, 0x00, 0x32, 0x00, 0x32, 0x00,
-        0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
-};  /* fw_image_1_data */
-
-static const hcf_8 fw_image_2_data[] = {
-        0x4B, 0xA3, 0x00, 0x0A, 0x10, 0x01, 0x68, 0xA4, 0xB0, 0x01, 0x84, 0x01, 0x30, 0x33, 0x31, 0x33,
-        0x44, 0x44, 0x30, 0x33, 0x31, 0x33, 0x30, 0x33, 0x31, 0x33, 0x32, 0x33, 0x32, 0x33, 0x90, 0x00,
-        0x78, 0x04, 0xAE, 0xE4, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
-        0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC6, 0x84, 0xF8, 0x99, 0xEE,
-        0x8D, 0xF6, 0x0D, 0xFF, 0xBD, 0xD6, 0xB1, 0xDE, 0x54, 0x91, 0x50, 0x60, 0x03, 0x02, 0xA9, 0xCE,
-        0x7D, 0x56, 0x19, 0xE7, 0x62, 0xB5, 0xE6, 0x4D, 0x9A, 0xEC, 0x45, 0x8F, 0x9D, 0x1F, 0x40, 0x89,
-        0x87, 0xFA, 0x15, 0xEF, 0xEB, 0xB2, 0xC9, 0x8E, 0x0B, 0xFB, 0xEC, 0x41, 0x67, 0xB3, 0xFD, 0x5F,
-        0xEA, 0x45, 0xBF, 0x23, 0xF7, 0x53, 0x96, 0xE4, 0x5B, 0x9B, 0xC2, 0x75, 0x1C, 0xE1, 0xAE, 0x3D,
-        0x6A, 0x4C, 0x5A, 0x6C, 0x41, 0x7E, 0x02, 0xF5, 0x4F, 0x83, 0x5C, 0x68, 0xF4, 0x51, 0x34, 0xD1,
-        0x08, 0xF9, 0x93, 0xE2, 0x73, 0xAB, 0x53, 0x62, 0x3F, 0x2A, 0x0C, 0x08, 0x52, 0x95, 0x65, 0x46,
-        0x5E, 0x9D, 0x28, 0x30, 0xA1, 0x37, 0x0F, 0x0A, 0xB5, 0x2F, 0x09, 0x0E, 0x36, 0x24, 0x9B, 0x1B,
-        0x3D, 0xDF, 0x26, 0xCD, 0x69, 0x4E, 0xCD, 0x7F, 0x9F, 0xEA, 0x1B, 0x12, 0x9E, 0x1D, 0x74, 0x58,
-        0x2E, 0x34, 0x2D, 0x36, 0xB2, 0xDC, 0xEE, 0xB4, 0xFB, 0x5B, 0xF6, 0xA4, 0x4D, 0x76, 0x61, 0xB7,
-        0xCE, 0x7D, 0x7B, 0x52, 0x3E, 0xDD, 0x71, 0x5E, 0x97, 0x13, 0xF5, 0xA6, 0x68, 0xB9, 0x00, 0x00,
-        0x2C, 0xC1, 0x60, 0x40, 0x1F, 0xE3, 0xC8, 0x79, 0xED, 0xB6, 0xBE, 0xD4, 0x46, 0x8D, 0xD9, 0x67,
-        0x4B, 0x72, 0xDE, 0x94, 0xD4, 0x98, 0xE8, 0xB0, 0x4A, 0x85, 0x6B, 0xBB, 0x2A, 0xC5, 0xE5, 0x4F,
-        0x16, 0xED, 0xC5, 0x86, 0xD7, 0x9A, 0x55, 0x66, 0x94, 0x11, 0xCF, 0x8A, 0x10, 0xE9, 0x06, 0x04,
-        0x81, 0xFE, 0xF0, 0xA0, 0x44, 0x78, 0xBA, 0x25, 0xE3, 0x4B, 0xF3, 0xA2, 0xFE, 0x5D, 0xC0, 0x80,
-        0x8A, 0x05, 0xAD, 0x3F, 0xBC, 0x21, 0x48, 0x70, 0x04, 0xF1, 0xDF, 0x63, 0xC1, 0x77, 0x75, 0xAF,
-        0x63, 0x42, 0x30, 0x20, 0x1A, 0xE5, 0x0E, 0xFD, 0x6D, 0xBF, 0x4C, 0x81, 0x14, 0x18, 0x35, 0x26,
-        0x2F, 0xC3, 0xE1, 0xBE, 0xA2, 0x35, 0xCC, 0x88, 0x39, 0x2E, 0x57, 0x93, 0xF2, 0x55, 0x82, 0xFC,
-        0x47, 0x7A, 0xAC, 0xC8, 0xE7, 0xBA, 0x2B, 0x32, 0x95, 0xE6, 0xA0, 0xC0, 0x98, 0x19, 0xD1, 0x9E,
-        0x7F, 0xA3, 0x66, 0x44, 0x7E, 0x54, 0xAB, 0x3B, 0x83, 0x0B, 0xCA, 0x8C, 0x29, 0xC7, 0xD3, 0x6B,
-        0x3C, 0x28, 0x79, 0xA7, 0xE2, 0xBC, 0x1D, 0x16, 0x76, 0xAD, 0x3B, 0xDB, 0x56, 0x64, 0x4E, 0x74,
-        0x1E, 0x14, 0xDB, 0x92, 0x0A, 0x0C, 0x6C, 0x48, 0xE4, 0xB8, 0x5D, 0x9F, 0x6E, 0xBD, 0xEF, 0x43,
-        0xA6, 0xC4, 0xA8, 0x39, 0xA4, 0x31, 0x37, 0xD3, 0x8B, 0xF2, 0x32, 0xD5, 0x43, 0x8B, 0x59, 0x6E,
-        0xB7, 0xDA, 0x8C, 0x01, 0x64, 0xB1, 0xD2, 0x9C, 0xE0, 0x49, 0xB4, 0xD8, 0xFA, 0xAC, 0x07, 0xF3,
-        0x25, 0xCF, 0xAF, 0xCA, 0x8E, 0xF4, 0xE9, 0x47, 0x18, 0x10, 0xD5, 0x6F, 0x88, 0xF0, 0x6F, 0x4A,
-        0x72, 0x5C, 0x24, 0x38, 0xF1, 0x57, 0xC7, 0x73, 0x51, 0x97, 0x23, 0xCB, 0x7C, 0xA1, 0x9C, 0xE8,
-        0x21, 0x3E, 0xDD, 0x96, 0xDC, 0x61, 0x86, 0x0D, 0x85, 0x0F, 0x90, 0xE0, 0x42, 0x7C, 0xC4, 0x71,
-        0xAA, 0xCC, 0xD8, 0x90, 0x05, 0x06, 0x01, 0xF7, 0x12, 0x1C, 0xA3, 0xC2, 0x5F, 0x6A, 0xF9, 0xAE,
-        0xD0, 0x69, 0x91, 0x17, 0x58, 0x99, 0x27, 0x3A, 0xB9, 0x27, 0x38, 0xD9, 0x13, 0xEB, 0xB3, 0x2B,
-        0x33, 0x22, 0xBB, 0xD2, 0x70, 0xA9, 0x89, 0x07, 0xA7, 0x33, 0xB6, 0x2D, 0x22, 0x3C, 0x92, 0x15,
-        0x20, 0xC9, 0x49, 0x87, 0xFF, 0xAA, 0x78, 0x50, 0x7A, 0xA5, 0x8F, 0x03, 0xF8, 0x59, 0x80, 0x09,
-        0x17, 0x1A, 0xDA, 0x65, 0x31, 0xD7, 0xC6, 0x84, 0xB8, 0xD0, 0xC3, 0x82, 0xB0, 0x29, 0x77, 0x5A,
-        0x11, 0x1E, 0xCB, 0x7B, 0xFC, 0xA8, 0xD6, 0x6D, 0x3A, 0x2C, 0x00, 0x30, 0x00, 0x31, 0x00, 0x33,
-        0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x38, 0x00, 0x3A, 0x00, 0x3B,
-        0x00, 0x3C, 0x00, 0x3D, 0x00, 0x3E, 0x00, 0x3F, 0x00, 0x3F, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x02, 0x14,
-        0x05, 0x32, 0x0B, 0x37, 0x08, 0x50, 0x0B, 0x6E, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, 0x3F, 0x00,
-        0x0C, 0x00, 0x30, 0x00, 0x03, 0x00, 0x0F, 0x00, 0x3E, 0x00, 0x3C, 0x00, 0x02, 0x00, 0x04, 0x00,
-        0x0A, 0x00, 0x0B, 0x00, 0x10, 0x00, 0x16, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x63, 0x00, 0x63, 0x00, 0x20, 0x00, 0x63, 0x00, 0x63, 0x00, 0x20, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA0, 0x10,
-        0xEE, 0x10, 0xA6, 0x10, 0xE8, 0x10, 0xAC, 0x10, 0xE2, 0x10, 0xB2, 0x10, 0xDC, 0x10, 0xB8, 0x10,
-        0xD6, 0x10, 0xBE, 0x10, 0xD0, 0x10, 0xC4, 0x10, 0xCA, 0x10, 0x07, 0x01, 0x00, 0x00, 0x0A, 0x22,
-        0x00, 0x04, 0x08, 0x01, 0x00, 0x00, 0x0A, 0x26, 0x00, 0x04, 0x09, 0x01, 0x00, 0x00, 0x0A, 0x2A,
-        0x00, 0x04, 0x0A, 0x01, 0x00, 0x00, 0x0A, 0x2E, 0x00, 0x04, 0x0B, 0x01, 0x00, 0x00, 0x10, 0x24,
-        0x04, 0x04, 0x0C, 0x01, 0x00, 0x00, 0x10, 0x28, 0x04, 0x04, 0x0D, 0x01, 0x00, 0x00, 0x10, 0x2C,
-        0x04, 0x04, 0x0E, 0x01, 0x00, 0x00, 0x10, 0x30, 0x04, 0x04, 0x0F, 0x01, 0x00, 0x00, 0x16, 0x34,
-        0x08, 0x04, 0x10, 0x01, 0x00, 0x00, 0x16, 0x38, 0x08, 0x04, 0x11, 0x01, 0x00, 0x00, 0x16, 0x3C,
-        0x08, 0x04, 0x12, 0x01, 0x00, 0x00, 0x16, 0x40, 0x08, 0x04, 0x13, 0x01, 0x00, 0x00, 0x17, 0x64,
-        0x0C, 0x0B, 0x14, 0x01, 0x00, 0x00, 0x17, 0x68, 0x0C, 0x0B, 0x15, 0x01, 0x00, 0x00, 0x17, 0x6C,
-        0x0C, 0x0B, 0x16, 0x01, 0x00, 0x00, 0x17, 0x70, 0x0C, 0x0B, 0x17, 0x01, 0x00, 0x00, 0x17, 0x74,
-        0x0C, 0x0B, 0x18, 0x01, 0x00, 0x00, 0x17, 0x78, 0x0C, 0x0B, 0x19, 0x01, 0x00, 0x00, 0x17, 0x7C,
-        0x0C, 0x0B, 0x1A, 0x01, 0x00, 0x00, 0x17, 0x80, 0x0C, 0x0B, 0x1B, 0x01, 0x00, 0x00, 0x17, 0x84,
-        0x0C, 0x0B, 0x1C, 0x01, 0x00, 0x00, 0x17, 0x88, 0x0C, 0x0B, 0x1D, 0x01, 0x00, 0x00, 0x17, 0x8C,
-        0x0C, 0x0B, 0x1E, 0x01, 0x00, 0x00, 0x1D, 0x95, 0x17, 0x04, 0x1F, 0x01, 0x00, 0x00, 0x1D, 0x99,
-        0x17, 0x04, 0x20, 0x01, 0x00, 0x00, 0x1D, 0x9D, 0x17, 0x04, 0x21, 0x01, 0x00, 0x00, 0x1D, 0xA1,
-        0x17, 0x04, 0x22, 0x01, 0x00, 0x00, 0x0E, 0xA5, 0x00, 0x00, 0x10, 0x11, 0x30, 0x11, 0x50, 0x11,
-        0x70, 0x11, 0xC8, 0x11, 0x18, 0x11, 0x38, 0x11, 0x58, 0x11, 0x78, 0x11, 0xD0, 0x11, 0x20, 0x11,
-        0x40, 0x11, 0x60, 0x11, 0x80, 0x11, 0xD8, 0x11, 0x28, 0x11, 0x48, 0x11, 0x68, 0x11, 0x88, 0x11,
-        0xE0, 0x11, 0x90, 0x11, 0x98, 0x11, 0xA0, 0x11, 0xA8, 0x11, 0xB0, 0x11, 0xB8, 0x11, 0xC0, 0x11,
-        0xE8, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xBE, 0x1E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x36, 0x25, 0x4F, 0x25, 0x72, 0x25, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xAC, 0x25,
-        0x02, 0x2B, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xF3, 0x2D, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24,
-        0xE1, 0x24, 0xE1, 0x24, 0x8B, 0x27, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24,
-        0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24,
-        0xE1, 0x24, 0xE1, 0x24, 0xE5, 0x27, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24,
-        0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24,
-        0xE1, 0x24, 0x59, 0x27, 0x73, 0x27, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24, 0xE1, 0x24,
-        0xE1, 0x24, 0x47, 0x23, 0xCE, 0x25, 0xE1, 0x25, 0x91, 0x26, 0x95, 0x26, 0xE1, 0x24, 0xE1, 0x24,
-        0x44, 0x27, 0x51, 0xEA, 0xFF, 0xE9, 0x00, 0x00, 0x48, 0xEA, 0x00, 0x00, 0x00, 0x00, 0xC9, 0xEA,
-        0x65, 0x25, 0x89, 0x25, 0x00, 0x00, 0xF8, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x13, 0x2B, 0xE0, 0xFC,
-        0x4C, 0x28, 0xC6, 0x2A, 0x5A, 0x00, 0x02, 0x00, 0xF9, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0x00, 0x01,
-        0x02, 0x00, 0xF7, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0x50, 0x28, 0x06, 0x00, 0xF0, 0xFF, 0x4C, 0x28,
-        0x29, 0x28, 0x00, 0x00, 0x00, 0x02, 0xF6, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0x6C, 0x00, 0x02, 0x00,
-        0xF4, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0xAA, 0x01, 0x02, 0x00, 0xF5, 0xFF, 0x4C, 0x28, 0xCF, 0x2A,
-        0x42, 0x28, 0x02, 0x00, 0xE0, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0xCE, 0x2D, 0x02, 0x00, 0xE1, 0xFF,
-        0x4C, 0x28, 0x62, 0x28, 0xD0, 0x2D, 0x02, 0x00, 0xE2, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0xD2, 0x2D,
-        0x02, 0x00, 0xE3, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0xCA, 0x2D, 0x02, 0x00, 0x03, 0xFC, 0x4C, 0x28,
-        0x17, 0x2A, 0x16, 0x2D, 0x02, 0x00, 0x04, 0xFC, 0x4C, 0x28, 0x5C, 0x28, 0x58, 0x28, 0x22, 0x00,
-        0x06, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0x40, 0x28, 0x02, 0x00, 0x07, 0xFC, 0x4C, 0x28, 0x62, 0x28,
-        0x9C, 0x28, 0x02, 0x00, 0x0E, 0xFC, 0x4C, 0x28, 0x29, 0x2A, 0xA6, 0x28, 0x22, 0x00, 0xB1, 0xFC,
-        0x4C, 0x28, 0x1D, 0x2B, 0xA2, 0x29, 0x02, 0x00, 0x20, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xCC, 0x28,
-        0x02, 0x00, 0x25, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xD6, 0x28, 0x02, 0x00, 0x26, 0xFC, 0x4C, 0x28,
-        0x62, 0x28, 0xD8, 0x28, 0x02, 0x00, 0x27, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xDA, 0x28, 0x02, 0x00,
-        0xB2, 0xFC, 0x4C, 0x28, 0x5C, 0x28, 0xC6, 0x29, 0x22, 0x00, 0xC1, 0xFC, 0x4C, 0x28, 0x62, 0x28,
-        0x5A, 0x2D, 0x20, 0x00, 0xB0, 0xFC, 0x1F, 0x28, 0x22, 0x2B, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xFC,
-        0x1F, 0x28, 0xE7, 0x2A, 0x00, 0x00, 0x08, 0x00, 0xC8, 0xFC, 0x1F, 0x28, 0xE2, 0x2A, 0x00, 0x00,
-        0x08, 0x00, 0xB4, 0xFC, 0x1F, 0x28, 0x60, 0x2B, 0x00, 0x00, 0x00, 0x00, 0xB6, 0xFC, 0x1F, 0x28,
-        0x11, 0x2C, 0x00, 0x00, 0x00, 0x00, 0xB7, 0xFC, 0x1F, 0x28, 0x3B, 0x2C, 0x00, 0x00, 0x00, 0x00,
-        0xB8, 0xFC, 0x1F, 0x28, 0x98, 0x2C, 0x00, 0x00, 0x00, 0x00, 0xB5, 0xFC, 0x4C, 0x28, 0x62, 0x28,
-        0xC6, 0x2D, 0x02, 0x00, 0xB9, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xC8, 0x2D, 0x02, 0x00, 0x90, 0xFD,
-        0x4C, 0x28, 0x29, 0x28, 0xCC, 0x2D, 0x02, 0x00, 0x23, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xD2, 0x28,
-        0x02, 0x00, 0x29, 0xFC, 0x44, 0x29, 0xF1, 0x28, 0x00, 0x00, 0x00, 0x00, 0xC2, 0xFC, 0x4C, 0x28,
-        0x62, 0x28, 0x0E, 0x2D, 0x02, 0x00, 0x32, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xA0, 0x01, 0x02, 0x00,
-        0x33, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xA2, 0x01, 0x02, 0x00, 0x00, 0xFC, 0x4C, 0x28, 0x62, 0x28,
-        0x56, 0x28, 0x02, 0x00, 0x01, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0x50, 0x28, 0x06, 0x00, 0x02, 0xFC,
-        0x4C, 0x28, 0xDC, 0x28, 0xA4, 0x29, 0x22, 0x00, 0x05, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0x46, 0x28,
-        0x02, 0x00, 0x08, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0x4A, 0x28, 0x06, 0x00, 0x09, 0xFC, 0x4C, 0x28,
-        0x62, 0x28, 0x9E, 0x28, 0x02, 0x00, 0x0B, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xA0, 0x28, 0x02, 0x00,
-        0x0C, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xA2, 0x28, 0x02, 0x00, 0x0D, 0xFC, 0x4C, 0x28, 0x62, 0x28,
-        0xA4, 0x28, 0x02, 0x00, 0x21, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xCE, 0x28, 0x02, 0x00, 0x80, 0xFC,
-        0xB8, 0x28, 0xC8, 0x28, 0xE2, 0x28, 0xC0, 0x00, 0x81, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xA8, 0x01,
-        0x02, 0x00, 0x83, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xAC, 0x01, 0x02, 0x00, 0x85, 0xFC, 0x4C, 0x28,
-        0x49, 0x2A, 0xA6, 0x01, 0x02, 0x00, 0x86, 0xFC, 0x4C, 0x28, 0x5B, 0x2A, 0xB2, 0x01, 0x02, 0x00,
-        0x28, 0xFC, 0x4C, 0x28, 0x62, 0x28, 0xDC, 0x28, 0x02, 0x00, 0x87, 0xFC, 0x4C, 0x28, 0x62, 0x28,
-        0xEC, 0x29, 0x22, 0x03, 0x84, 0xFC, 0x4C, 0x28, 0x70, 0x2A, 0xB0, 0x01, 0x02, 0x00, 0x2B, 0xFC,
-        0x4C, 0x28, 0x62, 0x28, 0x14, 0x31, 0x02, 0x00, 0xF8, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0x0E, 0x31,
-        0x02, 0x00, 0xF3, 0xFF, 0x4C, 0x28, 0x62, 0x28, 0x16, 0x31, 0x02, 0x00, 0x20, 0xFD, 0x7D, 0x28,
-        0x29, 0x28, 0x23, 0x34, 0x08, 0x00, 0x21, 0xFD, 0x7D, 0x28, 0x29, 0x28, 0x27, 0x34, 0x0A, 0x00,
-        0x22, 0xFD, 0x7D, 0x28, 0x29, 0x28, 0x2C, 0x34, 0x16, 0x00, 0x23, 0xFD, 0x7D, 0x28, 0x29, 0x28,
-        0x37, 0x34, 0x0A, 0x00, 0x10, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x74, 0x01, 0x02, 0x00, 0x45, 0xFD,
-        0x4C, 0x28, 0x29, 0x28, 0x00, 0x01, 0x02, 0x00, 0x47, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x78, 0x01,
-        0x02, 0x00, 0x48, 0xFD, 0x9A, 0x29, 0x29, 0x28, 0xA0, 0x01, 0x02, 0x00, 0x49, 0xFD, 0x9A, 0x29,
-        0x29, 0x28, 0xA2, 0x01, 0x02, 0x00, 0x4A, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x98, 0x01, 0x02, 0x00,
-        0x4B, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x9A, 0x01, 0x02, 0x00, 0x4D, 0xFD, 0x7D, 0x28, 0x29, 0x28,
-        0x3C, 0x34, 0x04, 0x00, 0x4F, 0xFD, 0xAE, 0x29, 0x29, 0x28, 0x1A, 0x2D, 0x02, 0x00, 0xC0, 0xFD,
-        0x7D, 0x28, 0x29, 0x28, 0x3E, 0x34, 0x02, 0x00, 0xC2, 0xFD, 0xA4, 0x29, 0x29, 0x28, 0x00, 0x00,
-        0x02, 0x00, 0xC3, 0xFD, 0x7D, 0x28, 0x29, 0x28, 0x3F, 0x34, 0x02, 0x00, 0x40, 0xFD, 0x75, 0x28,
-        0x29, 0x28, 0xB8, 0x01, 0x02, 0x00, 0x24, 0xFD, 0xCB, 0x29, 0x29, 0x28, 0x00, 0x00, 0x02, 0x00,
-        0x91, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x20, 0x24, 0x02, 0x00, 0x93, 0xFD, 0x4C, 0x28, 0x29, 0x28,
-        0x26, 0x24, 0x02, 0x00, 0xC1, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0xFE, 0x00, 0x02, 0x00, 0xC6, 0xFD,
-        0xAA, 0x28, 0x29, 0x28, 0x28, 0x2D, 0x0A, 0x00, 0x89, 0xFD, 0x5B, 0x29, 0x29, 0x28, 0x00, 0x00,
-        0x00, 0x00, 0x8A, 0xFD, 0x9A, 0x28, 0x29, 0x28, 0xA0, 0x2D, 0x24, 0x00, 0x41, 0xFD, 0x4C, 0x28,
-        0x29, 0x28, 0x7A, 0x2D, 0x22, 0x00, 0x42, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x02, 0x01, 0x06, 0x00,
-        0x43, 0xFD, 0xD8, 0x29, 0x29, 0x28, 0x00, 0x00, 0x06, 0x00, 0x44, 0xFD, 0xB8, 0x29, 0x29, 0x28,
-        0xB4, 0x01, 0x02, 0x00, 0x46, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0xBA, 0x01, 0x0C, 0x00, 0x4C, 0xFD,
-        0x4C, 0x28, 0x29, 0x28, 0xEA, 0x29, 0x02, 0x00, 0x50, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0xF4, 0x00,
-        0x02, 0x00, 0x51, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0xF6, 0x00, 0x02, 0x00, 0x52, 0xFD, 0x4C, 0x28,
-        0x29, 0x28, 0xC6, 0x01, 0x02, 0x00, 0x8F, 0xFD, 0xEB, 0x29, 0x29, 0x28, 0x00, 0x00, 0x08, 0x00,
-        0x92, 0xFD, 0x4C, 0x28, 0x29, 0x28, 0x54, 0x2D, 0x02, 0x00, 0x8C, 0xFD, 0x3F, 0x28, 0x29, 0x28,
-        0x08, 0x2E, 0x56, 0x00, 0x8D, 0xFD, 0x3F, 0x28, 0x29, 0x28, 0x62, 0x2E, 0x14, 0x00, 0x00, 0xF1,
-        0x46, 0x00, 0xE3, 0x27, 0x3A, 0x01, 0x01, 0xF1, 0x44, 0x07, 0xE1, 0x27, 0x3C, 0x01, 0x00, 0x03,
-        0x2A, 0x68, 0x1E, 0x00, 0x76, 0x01, 0xFE, 0x00, 0xD6, 0x01, 0x02, 0x01, 0x3E, 0x01, 0xB8, 0x01,
-        0x74, 0x27, 0x5A, 0x01, 0x20, 0x24, 0x20, 0x00, 0x00, 0x00, 0xBA, 0x1C, 0x00, 0x00, 0xBE, 0x1E,
-        0x54, 0x01, 0x0B, 0x00, 0xBA, 0x00, 0xE4, 0x00, 0x3C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0xAF, 0x37, 0xAF, 0x43, 0xB0,
-        0x4C, 0xB0, 0x48, 0xAF, 0xDE, 0xAF, 0xB6, 0xAF, 0x1C, 0x33, 0x7F, 0x32, 0x1C, 0x33, 0xF3, 0x32,
-        0x89, 0x32, 0x7D, 0x32, 0x3B, 0x33, 0x4C, 0x33, 0x4C, 0x33, 0x4C, 0x33, 0x55, 0x33, 0x70, 0x33,
-        0xCD, 0x33, 0xE9, 0x33, 0xF4, 0x32, 0x07, 0x33, 0xDB, 0x32, 0x10, 0x00, 0x12, 0x00, 0x13, 0x00,
-        0x20, 0x00, 0x21, 0x00, 0x22, 0x00, 0x30, 0x00, 0x31, 0x00, 0x32, 0x00, 0x33, 0x00, 0x34, 0x00,
-        0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x39, 0x00, 0x3A, 0x00, 0x00, 0x00, 0x14, 0x01,
-        0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0x14, 0x01, 0xF3, 0x02,
-        0xAD, 0x03, 0x60, 0x04, 0x04, 0x05, 0x07, 0x06, 0x08, 0x07, 0x0A, 0x08, 0x16, 0x09, 0x44, 0x0A,
-        0x04, 0x0B, 0x40, 0x0C, 0x80, 0x0D, 0x00, 0x0E, 0x84, 0x0F, 0x01, 0x10, 0x10, 0x11, 0x02, 0x14,
-        0x40, 0x20, 0x32, 0x21, 0x32, 0x22, 0x04, 0x23, 0x01, 0x24, 0x0F, 0x25, 0x00, 0x26, 0x00, 0x27,
-        0x00, 0x28, 0x00, 0x29, 0x00, 0x2A, 0x01, 0x2B, 0x06, 0x2C, 0x00, 0x38, 0x00, 0x39, 0xD6, 0x3A,
-        0x00, 0x3B, 0x00, 0x3C, 0x14, 0x3D, 0x7F, 0x3E, 0x00, 0x3F, 0x68, 0x40, 0x75, 0x41, 0x07, 0x42,
-        0x07, 0x43, 0x00, 0x45, 0x3B, 0x4A, 0x00, 0x4B, 0x00, 0x4C, 0x0F, 0x4D, 0x02, 0x75, 0x00, 0x76,
-        0x80, 0x00, 0x08, 0x01, 0x09, 0x01, 0x09, 0x01, 0x0A, 0x01, 0x0A, 0x01, 0x0B, 0x01, 0x0B, 0x01,
-        0x0C, 0x01, 0x0C, 0x01, 0x0D, 0x01, 0x0D, 0x01, 0x0E, 0x01, 0x0E, 0x01, 0x0F, 0x01, 0x0F, 0x01,
-        0x10, 0x01, 0x10, 0x01, 0x11, 0x01, 0x11, 0x01, 0x12, 0x01, 0x12, 0x01, 0x13, 0x01, 0x13, 0x01,
-        0x14, 0x01, 0x14, 0x01, 0x15, 0x01, 0x15, 0x01, 0x16, 0x01, 0x16, 0x01, 0x17, 0x01, 0x17, 0x01,
-        0x18, 0x01, 0x18, 0x01, 0x19, 0x01, 0x19, 0x01, 0x4D, 0x01, 0x4D, 0x01, 0x4E, 0x01, 0x4E, 0x01,
-        0x4F, 0x01, 0x4F, 0x01, 0x50, 0x01, 0x50, 0x01, 0x51, 0x01, 0x51, 0x01, 0x52, 0x01, 0x52, 0x01,
-        0x53, 0x01, 0x53, 0x01, 0x54, 0x01, 0x54, 0x01, 0x65, 0x01, 0x65, 0x01, 0x66, 0x01, 0x66, 0x01,
-        0x67, 0x01, 0x67, 0x01, 0x68, 0x01, 0x68, 0x01, 0x69, 0x01, 0x69, 0x01, 0x6A, 0x01, 0x6A, 0x01,
-        0x6B, 0x01, 0x6B, 0x01, 0x6C, 0x01, 0x6C, 0x01, 0x6D, 0x01, 0x6D, 0x01, 0x6E, 0x01, 0x6E, 0x01,
-        0x6F, 0x01, 0x6F, 0x01, 0x70, 0x01, 0x70, 0x01, 0x71, 0x01, 0x71, 0x01, 0x72, 0x01, 0x72, 0x01,
-        0x73, 0x01, 0x73, 0x01, 0x74, 0x01, 0x74, 0x01, 0x75, 0x01, 0x75, 0x01, 0x76, 0x01, 0x76, 0x01,
-        0x77, 0x01, 0x77, 0x01, 0x78, 0x01, 0x78, 0x01, 0x79, 0x01, 0x79, 0x01, 0x7A, 0x01, 0x7A, 0x01,
-        0x7B, 0x01, 0x7B, 0x01, 0x7C, 0x01, 0x7C, 0x01, 0x7D, 0x01, 0x7D, 0x01, 0x7E, 0x01, 0x7E, 0x01,
-        0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01,
-        0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01,
-        0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01, 0x7F, 0x01,
-        0x7F, 0x01, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12,
-        0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x12, 0x80, 0x13,
-        0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13,
-        0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x80, 0x13, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44,
-        0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x51, 0x44,
-        0x51, 0x44, 0x51, 0x44, 0x51, 0x44, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46,
-        0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x23, 0x46, 0x23, 0x46,
-        0x23, 0x46, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47,
-        0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1D, 0x47, 0x9A, 0x48,
-        0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48,
-        0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0x33, 0x48, 0x78, 0x49, 0x78, 0x49, 0x79, 0x49,
-        0x79, 0x49, 0x79, 0x49, 0x79, 0x49, 0x7A, 0x49, 0x7A, 0x49, 0x7A, 0x49, 0x7A, 0x49, 0x7B, 0x49,
-        0x7B, 0x49, 0x7B, 0x49, 0x7C, 0x49, 0x32, 0x00, 0x46, 0x00, 0x5A, 0x00, 0x6E, 0x00, 0x82, 0x00,
-        0x96, 0x00, 0xAA, 0x00, 0xBE, 0x00, 0xD2, 0x00, 0xE6, 0x00, 0xFA, 0x00, 0x0E, 0x01, 0x22, 0x01,
-        0x52, 0x01, 0x05, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x03, 0x00, 0x03, 0x00,
-        0x03, 0x00, 0x03, 0x00, 0x03, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x03, 0x00, 0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65,
-        0x64, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00,
-        0x00, 0x00, 0x48, 0x45, 0x52, 0x4D, 0x45, 0x53, 0x20, 0x32, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x03, 0x00, 0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65,
-        0x64, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00,
-        0x00, 0x00, 0x48, 0x45, 0x52, 0x4D, 0x45, 0x53, 0x20, 0x32, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x46, 0x69, 0x72, 0x73, 0x74, 0x20, 0x57, 0x61, 0x76, 0x65, 0x4C, 0x41, 0x4E, 0x20, 0x49, 0x49,
-        0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x00, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x19, 0x00, 0x02, 0x01, 0x82, 0x84, 0x8B, 0x96, 0x00, 0x00, 0x00, 0x00, 0x1E, 0x85, 0x00, 0x01,
-        0x7F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x20, 0x00, 0x10, 0x00, 0x08, 0x00, 0x00, 0x01, 0x00, 0x01,
-        0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6E, 0x74, 0x20, 0x53,
-        0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x53, 0x65, 0x74, 0x20, 0x49, 0x64, 0x65, 0x6E, 0x74,
-        0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x00, 0x00, 0x00, 0x00, 0x06, 0xDD, 0x00, 0x50, 0xF2, 0x01,
-        0x01, 0x00, 0x00, 0x50, 0xF2, 0x05, 0x02, 0x00, 0x00, 0x50, 0xF2, 0x02, 0x00, 0x50, 0xF2, 0x04,
-        0x02, 0x00, 0x00, 0x50, 0xF2, 0x00, 0x00, 0x50, 0xF2, 0x01, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x15, 0x00, 0x14, 0x00, 0x15, 0x00, 0x36, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00,
-        0x11, 0x00, 0x36, 0x00, 0x01, 0x00, 0x04, 0x00, 0x7A, 0x2D, 0x28, 0x2D, 0x0C, 0x2F, 0x10, 0x2F,
-        0x14, 0x2F, 0xA0, 0x2D, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0xC6, 0x29, 0x28, 0x2D,
-        0xFF, 0xFF, 0x00, 0x00, 0x7A, 0x2D, 0x28, 0x2D, 0x0C, 0x2F, 0x10, 0x2F, 0x14, 0x2F, 0xA0, 0x2D,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x7A, 0x2D, 0x28, 0x2D, 0xFF, 0xFF, 0xE6, 0x2D,
-        0x34, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x02, 0x06, 0x00, 0x00, 0x06, 0x07,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-
-};  /* fw_image_2_data */
-
-static const hcf_8 fw_image_3_data[] = {
-        0x00, 0xE1, 0x30, 0x40, 0x02, 0x36, 0xA1, 0xFF, 0x83, 0xFF, 0x8D, 0xFF, 0x5C, 0x44, 0x5C, 0x43,
-        0x5C, 0x42, 0x5C, 0x41, 0x5C, 0x40, 0xAC, 0xFF, 0xAD, 0xFF, 0xE7, 0xE1, 0xAD, 0x60, 0x08, 0x78,
-        0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x03, 0x02, 0x28, 0xE2, 0x40, 0xFF, 0xA1, 0xFF,
-        0x84, 0xFF, 0xBB, 0x60, 0x18, 0x64, 0x40, 0x42, 0xB0, 0x60, 0x97, 0x64, 0x40, 0x40, 0xBD, 0xF3,
-        0x80, 0xFB, 0x0F, 0x60, 0x9A, 0x63, 0xCA, 0xF3, 0xBD, 0xDB, 0x00, 0x60, 0x9A, 0x64, 0xBD, 0xDB,
-        0x02, 0x64, 0xBD, 0xDB, 0x04, 0x64, 0xA3, 0xDB, 0x5C, 0x49, 0x0A, 0x64, 0x40, 0x4B, 0x5C, 0x5C,
-        0x01, 0x60, 0x39, 0xE2, 0x04, 0x60, 0x00, 0x7A, 0x89, 0xFF, 0x03, 0x60, 0xFF, 0x73, 0x88, 0xFF,
-        0xB0, 0x60, 0x97, 0x78, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x06, 0x02, 0x40, 0xFF,
-        0x42, 0xFF, 0x43, 0xFF, 0x44, 0xFF, 0x45, 0xFF, 0xA1, 0xFF, 0x88, 0xFF, 0x85, 0xFF, 0x21, 0xE1,
-        0x5C, 0x40, 0xBB, 0x60, 0x20, 0x78, 0xFF, 0xFF, 0xA2, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1,
-        0x01, 0x02, 0xA1, 0xFF, 0x86, 0xFF, 0x88, 0xFF, 0x5C, 0x46, 0x5C, 0x49, 0x5C, 0x40, 0xE7, 0x60,
-        0x58, 0x4F, 0x31, 0x78, 0xFF, 0xFF, 0xC7, 0x60, 0x58, 0x4F, 0xF6, 0x78, 0xFF, 0xFF, 0xCA, 0x60,
-        0x58, 0x4F, 0x83, 0x78, 0xFF, 0xFF, 0xDD, 0x60, 0x58, 0x4F, 0x3D, 0x78, 0xFF, 0xFF, 0x1B, 0x60,
-        0x58, 0x4F, 0x37, 0x78, 0xFF, 0xFF, 0xEC, 0x60, 0x58, 0x4F, 0x75, 0x78, 0xFF, 0xFF, 0xE0, 0x60,
-        0x58, 0x4F, 0x1B, 0x78, 0xFF, 0xFF, 0xE4, 0x60, 0x58, 0x4F, 0xDC, 0x78, 0xFF, 0xFF, 0xF3, 0x60,
-        0x58, 0x4F, 0xEB, 0x78, 0xFF, 0xFF, 0x13, 0xE1, 0xA3, 0xFF, 0xBF, 0x60, 0xE7, 0x78, 0xFF, 0xFF,
-        0x03, 0xE1, 0xA3, 0xFF, 0xFE, 0xFC, 0xFF, 0xFC, 0x23, 0x60, 0xF4, 0x63, 0x17, 0xFD, 0xAE, 0xFF,
-        0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x26, 0x1A, 0x00,
-        0x80, 0x3A, 0x15, 0x00, 0x81, 0xF1, 0x32, 0xF2, 0x33, 0xF2, 0xD0, 0x80, 0x82, 0xF1, 0x0F, 0x02,
-        0xD0, 0x80, 0x34, 0xF2, 0x83, 0xF1, 0x0B, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x08, 0x02, 0xDF, 0x60,
-        0x58, 0x4F, 0x28, 0x78, 0xFF, 0xFF, 0x20, 0x60, 0x58, 0x4F, 0xBF, 0x78, 0xFF, 0xFF, 0x19, 0x60,
-        0xE8, 0x78, 0xFF, 0xFF, 0x00, 0xF4, 0xAA, 0x60, 0xAA, 0x65, 0x09, 0xF2, 0x5A, 0xD0, 0xD4, 0x80,
-        0x03, 0x64, 0x12, 0x02, 0xD0, 0x80, 0x1D, 0x60, 0x60, 0x65, 0x0E, 0x02, 0x5A, 0xD2, 0xFF, 0xFF,
-        0xD4, 0x80, 0x01, 0x60, 0x00, 0x65, 0x08, 0x02, 0x5A, 0xD2, 0xFF, 0xFF, 0xD4, 0x80, 0xFF, 0xFF,
-        0x03, 0x02, 0x19, 0x60, 0xE8, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0xD6, 0x65, 0xA5, 0xD1, 0x5A, 0xD1,
-        0x44, 0x48, 0x5A, 0xD1, 0x44, 0x4A, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x44, 0x4C, 0xD8, 0x83,
-        0x70, 0x61, 0x68, 0x65, 0xD7, 0x80, 0xFF, 0xFF, 0x07, 0x0E, 0x08, 0xF2, 0x08, 0x00, 0x68, 0x65,
-        0xD7, 0x80, 0xFF, 0xFF, 0x01, 0x0E, 0x03, 0x00, 0x19, 0x60, 0xFE, 0x78, 0xFF, 0xFF, 0x58, 0x4F,
-        0x79, 0x00, 0x9C, 0x80, 0x01, 0x65, 0x02, 0x02, 0x00, 0x65, 0x02, 0x00, 0xFF, 0x3B, 0xF7, 0x01,
-        0x58, 0x4F, 0x70, 0x00, 0x9C, 0x80, 0x45, 0x42, 0xEA, 0x02, 0x58, 0x4F, 0x6B, 0x00, 0x9C, 0x80,
-        0xFF, 0xFF, 0xE5, 0x02, 0x58, 0x4F, 0x66, 0x00, 0x9C, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0x00, 0x65,
-        0x45, 0x42, 0xF8, 0x01, 0xFF, 0x3A, 0x29, 0x00, 0x60, 0x47, 0xFF, 0xB5, 0x28, 0x44, 0xFF, 0xB4,
-        0x94, 0x80, 0xFF, 0xFF, 0xD4, 0x02, 0x60, 0x45, 0x28, 0x47, 0x2A, 0x5F, 0x40, 0x48, 0x2A, 0x47,
-        0x2C, 0x5F, 0x40, 0x4A, 0x2C, 0x47, 0x65, 0x5F, 0x40, 0x4C, 0x10, 0x64, 0x40, 0x42, 0x28, 0x45,
-        0x05, 0x00, 0x58, 0x4F, 0x47, 0x00, 0x94, 0x80, 0x28, 0x45, 0x26, 0x02, 0x58, 0x4F, 0x42, 0x00,
-        0x94, 0x80, 0x2A, 0x45, 0x21, 0x02, 0x58, 0x4F, 0x3D, 0x00, 0x94, 0x80, 0xFF, 0xFF, 0x1C, 0x02,
-        0x22, 0x44, 0x4C, 0x82, 0x2C, 0x45, 0x31, 0x03, 0xEC, 0x01, 0x10, 0x65, 0x45, 0x42, 0x28, 0x45,
-        0x94, 0x80, 0x2A, 0x45, 0x21, 0x02, 0x58, 0x4F, 0x2D, 0x00, 0x94, 0x80, 0x2C, 0x45, 0x1C, 0x02,
-        0x58, 0x4F, 0x28, 0x00, 0x94, 0x80, 0xFF, 0xFF, 0x17, 0x02, 0x22, 0x44, 0x4C, 0x82, 0x28, 0x45,
-        0x1C, 0x03, 0x58, 0x4F, 0x1F, 0x00, 0xEC, 0x01, 0x40, 0x4B, 0x28, 0x47, 0x40, 0x48, 0x2A, 0x47,
-        0x40, 0x4A, 0x2C, 0x47, 0x60, 0x45, 0x2A, 0x5E, 0x40, 0x4C, 0x2A, 0x44, 0x28, 0x5E, 0x40, 0x4A,
-        0x28, 0x44, 0x65, 0x5E, 0x40, 0x48, 0x2B, 0x44, 0x68, 0x65, 0xD7, 0x80, 0xFF, 0xFF, 0x17, 0x0E,
-        0x90, 0x01, 0x26, 0x46, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0xB9, 0xFF, 0x26, 0x46, 0xC5, 0x60,
-        0x5B, 0x78, 0xFF, 0xFF, 0xC9, 0x81, 0xCB, 0x83, 0x07, 0x1C, 0x01, 0x1D, 0x08, 0x00, 0x00, 0xF4,
-        0x01, 0xF2, 0xFF, 0xFF, 0xFF, 0xB4, 0xD8, 0x81, 0x5A, 0xD2, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46,
-        0xC5, 0x60, 0x58, 0x4F, 0x78, 0x78, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x63, 0x00, 0xF4, 0x84, 0x65,
-        0x78, 0x61, 0xA5, 0xD0, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x64, 0x44,
-        0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB,
-        0xF0, 0x02, 0x1C, 0x60, 0xAC, 0x63, 0x29, 0x60, 0xEC, 0x64, 0x08, 0x65, 0xC4, 0x81, 0x61, 0x44,
-        0xA3, 0xDB, 0x1C, 0x60, 0xAA, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x29, 0x60, 0xEC, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x60, 0x43, 0x1C, 0x60, 0xB0, 0x61, 0xA1, 0xDD, 0x1C, 0x60, 0xB0, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x60, 0x45, 0x1C, 0x60, 0xAA, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0xD4, 0x80, 0xFF, 0xFF,
-        0x01, 0x03, 0x03, 0x00, 0x1A, 0x60, 0xD6, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xA8, 0x61, 0x01, 0x64,
-        0xA1, 0xDB, 0x02, 0x60, 0x00, 0x61, 0x41, 0x4C, 0x03, 0x60, 0x00, 0x61, 0x41, 0x4A, 0x1C, 0x60,
-        0xAC, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x40, 0x48, 0x1C, 0x60, 0xB2, 0x63, 0x28, 0x41, 0x06, 0x65,
-        0xD5, 0x81, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x01, 0xA4, 0x60, 0x41, 0xA3, 0xDB,
-        0x2A, 0x43, 0x28, 0x45, 0xA5, 0xD1, 0xDA, 0x85, 0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB,
-        0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0xF4, 0x02, 0x28, 0x41, 0x1C, 0x60,
-        0xB2, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x45, 0x45, 0x8B, 0x1C, 0x60, 0xAE, 0x61, 0x2B, 0xD3,
-        0xA1, 0xDB, 0x2C, 0x41, 0x28, 0x42, 0x4A, 0xD3, 0xFF, 0xFF, 0x60, 0x45, 0x45, 0x8C, 0x00, 0x7F,
-        0x01, 0x7E, 0x40, 0x48, 0x1C, 0x60, 0xB2, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x45, 0x00, 0x64,
-        0xD4, 0x80, 0xFF, 0xFF, 0x43, 0x03, 0x65, 0x44, 0xFF, 0xA4, 0xA1, 0xDB, 0x1C, 0x60, 0xAE, 0x61,
-        0xA1, 0xD3, 0x28, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x2C, 0xD3, 0x2A, 0xD3, 0x60, 0x45,
-        0xD4, 0x80, 0xFF, 0xFF, 0x01, 0x03, 0x14, 0x00, 0x28, 0x44, 0xE0, 0x84, 0xFF, 0xFF, 0x02, 0x24,
-        0x01, 0x00, 0x08, 0x00, 0x2B, 0x44, 0x58, 0x8B, 0x1C, 0x60, 0xAE, 0x63, 0x2B, 0xD3, 0xA3, 0xDB,
-        0x00, 0x7F, 0x01, 0x7E, 0x40, 0x48, 0x2A, 0x44, 0x58, 0x8A, 0x2C, 0x44, 0x58, 0x8C, 0xD2, 0x01,
-        0x1C, 0x60, 0xA8, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x1C, 0x60, 0xAC, 0x61, 0xA1, 0xD3, 0xFF, 0xFF,
-        0x60, 0x45, 0xFA, 0xA4, 0x60, 0x41, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0xC5, 0x81, 0x06, 0xA1,
-        0x41, 0x48, 0x65, 0x41, 0xFC, 0xA1, 0xA1, 0xD3, 0x28, 0x41, 0x60, 0x40, 0x01, 0x26, 0x01, 0xA4,
-        0x60, 0x45, 0xC5, 0x81, 0x61, 0x43, 0x1C, 0x60, 0xAC, 0x61, 0xA1, 0xDD, 0x1C, 0x60, 0xA8, 0x61,
-        0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x0D, 0x00, 0x1C, 0x60, 0xAA, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x01, 0xA4, 0xA1, 0xDB, 0xFF, 0xFF, 0x1A, 0x60, 0x2C, 0x78, 0xFF, 0xFF, 0x19, 0x60,
-        0xE8, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0xEC, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x01, 0x60, 0xBA, 0x61,
-        0x1F, 0x60, 0x08, 0x63, 0xA1, 0xD3, 0x04, 0xA1, 0x20, 0x7F, 0xBD, 0xDB, 0x32, 0x7E, 0x21, 0x7F,
-        0xBD, 0xDB, 0xA1, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x10, 0x00, 0x01, 0x60, 0xBA, 0x61,
-        0x1F, 0x60, 0x08, 0x63, 0xA1, 0xD3, 0x00, 0x66, 0x20, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF,
-        0x21, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60, 0xD8, 0x62,
-        0xA2, 0xD1, 0x9F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60,
-        0xDA, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x1A, 0x60, 0xFD, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x9A, 0x62, 0x1F, 0x60, 0x06, 0x64, 0xA2, 0xDB, 0x20, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xDA, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0x1B, 0x60, 0x25, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62,
-        0xA2, 0xD1, 0x9F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62,
-        0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2E, 0x58, 0xFF, 0xFF,
-        0x10, 0x60, 0x1E, 0x62, 0x1E, 0x60, 0xF4, 0x64, 0xA2, 0xDB, 0x1A, 0x60, 0x8A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x06, 0xA2, 0x10, 0x60, 0x40, 0x64, 0xA2, 0xDB, 0x06, 0x64, 0x5A, 0xDB, 0x5A, 0xDB,
-        0x1A, 0x60, 0x96, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x06, 0xA2, 0x10, 0x60, 0x44, 0x64, 0xA2, 0xDB,
-        0x06, 0x64, 0x5A, 0xDB, 0x5A, 0xDB, 0x1A, 0x60, 0xA2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x06, 0xA2,
-        0x10, 0x60, 0x48, 0x64, 0xA2, 0xDB, 0x06, 0x64, 0x5A, 0xDB, 0x5A, 0xDB, 0xC0, 0xF1, 0x1A, 0x60,
-        0xA6, 0x62, 0xA2, 0xD9, 0x10, 0x60, 0x3E, 0x62, 0x20, 0x60, 0x99, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x42, 0x62, 0x20, 0x60, 0xA3, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x46, 0x62, 0x20, 0x60, 0xAD, 0x64,
-        0xA2, 0xDB, 0x00, 0x60, 0x70, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x63, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0xA9, 0xF3, 0x07, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA,
-        0x0F, 0x60, 0xDA, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0x1B, 0x60, 0x8A, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x03, 0x64,
-        0x6A, 0xFB, 0x0F, 0x4E, 0xE0, 0x60, 0x58, 0x4F, 0x8E, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x00, 0x64,
-        0x6C, 0xFB, 0x63, 0xF5, 0xEB, 0xF3, 0x2F, 0xFA, 0xEC, 0xF3, 0x30, 0xFA, 0xED, 0xF3, 0x31, 0xFA,
-        0x81, 0xF3, 0x2C, 0xFA, 0x32, 0xFA, 0x82, 0xF3, 0x2D, 0xFA, 0x33, 0xFA, 0x83, 0xF3, 0x2E, 0xFA,
-        0x34, 0xFA, 0xBC, 0xF3, 0x19, 0xFA, 0x06, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0x20, 0x60, 0x58, 0x4E,
-        0x71, 0x78, 0xFF, 0xFF, 0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62,
-        0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xD8, 0x62,
-        0xA2, 0xD1, 0xFF, 0x60, 0x8F, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xC1, 0xF1, 0x1A, 0x60, 0x9A, 0x62,
-        0xA2, 0xD9, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x6C, 0xFB, 0x0F, 0x60, 0xDA, 0x62, 0x00, 0x60, 0x74, 0x64,
-        0xA2, 0xDB, 0x1B, 0x60, 0xDE, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1E, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xE0, 0x01, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x11, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40, 0x50, 0x27, 0xD6, 0x01, 0xAF, 0xF3, 0xFF, 0xFF,
-        0xFE, 0xA0, 0xFF, 0xFF, 0xD1, 0x06, 0x6C, 0xF3, 0xFF, 0xFF, 0xF6, 0xA0, 0xDC, 0x84, 0x01, 0x05,
-        0xA2, 0xDB, 0xCA, 0x01, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xCE, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x00, 0x00, 0xE0, 0xF3, 0x29, 0x45, 0xD4, 0x80, 0x6C, 0xF3, 0x03, 0x04, 0x1C, 0x60,
-        0x55, 0x78, 0xFF, 0xFF, 0xF6, 0xA0, 0xFF, 0xFF, 0x03, 0x04, 0x1C, 0x60, 0x55, 0x78, 0xFF, 0xFF,
-        0x0F, 0x60, 0xDA, 0x62, 0x00, 0x60, 0x64, 0x64, 0xA2, 0xDB, 0x1C, 0x60, 0x2A, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1E, 0x60, 0xF4, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xD2, 0x01,
-        0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xE4, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40,
-        0x50, 0x27, 0xDF, 0x01, 0xAF, 0xF3, 0xFF, 0xFF, 0xFE, 0xA0, 0xFF, 0xFF, 0xC3, 0x06, 0x6C, 0xF3,
-        0xFF, 0xFF, 0xF6, 0xA0, 0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0xBC, 0x01, 0x0F, 0x60, 0xD8, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x20, 0x40, 0x40, 0x2B, 0x0B, 0x00, 0x0F, 0x60, 0xDA, 0x62, 0x80, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0x1C, 0x60, 0x55, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x1C, 0x60, 0x92, 0x65, 0x01, 0x64, 0xA5, 0xDB, 0xC2, 0xF1, 0x1A, 0x60, 0x9A, 0x62, 0xA2, 0xD9,
-        0x0C, 0x64, 0x53, 0xFB, 0x1C, 0x60, 0x77, 0x64, 0x6B, 0xFB, 0x1F, 0x60, 0x72, 0x78, 0xFF, 0xFF,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0xA2, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0xDF, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x88, 0xF1, 0x19, 0x60, 0x86, 0x63, 0xD3, 0x80, 0x68, 0xFD, 0x5F, 0x03, 0x68, 0xF3, 0xE2, 0xF1,
-        0x60, 0x43, 0x29, 0x44, 0xA3, 0xD3, 0xC0, 0x85, 0xD4, 0x80, 0x5B, 0xD3, 0x56, 0x06, 0x60, 0x43,
-        0x08, 0xA3, 0xBE, 0xD3, 0x83, 0xF1, 0xA3, 0xD3, 0xD0, 0x80, 0x82, 0xF1, 0x05, 0x02, 0xBF, 0xD3,
-        0xD0, 0x80, 0x81, 0xF1, 0x01, 0x02, 0xD0, 0x80, 0xF8, 0xA3, 0x2B, 0x02, 0x1C, 0x60, 0xAB, 0x64,
-        0x6B, 0xFB, 0x1F, 0x60, 0x29, 0x78, 0xFF, 0xFF, 0x01, 0xB0, 0x84, 0xF3, 0x3E, 0x03, 0x63, 0xF5,
-        0x48, 0x7E, 0x2A, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x0F, 0x60, 0xDA, 0x62,
-        0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB, 0x1C, 0x60, 0xC8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0xFE, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x1C, 0x00, 0x2D, 0x60, 0x7A, 0x65, 0xA5, 0xD3, 0x65, 0x41, 0x10, 0xA3, 0x01, 0xA4, 0xFE, 0xB4,
-        0xC4, 0x85, 0xFE, 0xA1, 0xBD, 0xD3, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0xD5, 0x80, 0x05, 0x02,
-        0x01, 0x03, 0xF8, 0x01, 0x1E, 0x60, 0xE8, 0x78, 0xFF, 0xFF, 0x68, 0xF3, 0x88, 0xF1, 0x04, 0xA4,
-        0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x68, 0xFB, 0xA1, 0x01, 0xE0, 0xF3, 0x29, 0x45, 0xD4, 0x80,
-        0xFF, 0xFF, 0x0C, 0x07, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1B, 0x60, 0xB1, 0x78, 0xFF, 0xFF, 0xE1, 0xF3, 0x29, 0x45,
-        0xD4, 0x80, 0xFF, 0xFF, 0x17, 0x06, 0x04, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF,
-        0x05, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0x01, 0xBC, 0xF2, 0xFB, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1D, 0x60,
-        0x6D, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xDA, 0x62, 0x00, 0x60, 0x74, 0x64, 0xA2, 0xDB, 0x1D, 0x60,
-        0x24, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1E, 0x60,
-        0xF4, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1C, 0x60, 0x87, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x17, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40, 0x50, 0x27, 0xA7, 0x01, 0xAF, 0xF3, 0x6C, 0xF3,
-        0xFE, 0xA0, 0xF6, 0xA0, 0x0A, 0x06, 0x03, 0x04, 0x00, 0x64, 0x55, 0xFB, 0x40, 0x49, 0x6C, 0xF3,
-        0xFF, 0xFF, 0xF6, 0xA0, 0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0x1C, 0x60, 0x87, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xC6, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60,
-        0xAA, 0x62, 0x1A, 0x60, 0xA2, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x1C, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xEC, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x20, 0x40, 0x40, 0x2B, 0x0B, 0x00, 0x0F, 0x60, 0xDA, 0x62, 0x80, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0x1D, 0x60, 0x6D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x1C, 0x60, 0x92, 0x65, 0x00, 0x64, 0xA5, 0xDB, 0xC3, 0xF1, 0x1A, 0x60, 0x9A, 0x62, 0xA2, 0xD9,
-        0x1F, 0x60, 0x80, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0x08, 0xB4, 0x01, 0xBC, 0x29, 0x02, 0xA2, 0xDB,
-        0x0F, 0x60, 0xD8, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x4E, 0xE4, 0x60, 0x58, 0x4F, 0xFB, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x60, 0xDA, 0x62, 0x10, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x1D, 0x60,
-        0xA4, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1F, 0x60, 0x80, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0x60, 0x40, 0x0C, 0x26, 0x0C, 0x00, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x96, 0x64,
-        0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1E, 0x60, 0x97, 0x78, 0xFF, 0xFF,
-        0x01, 0x64, 0x31, 0x60, 0x2A, 0x62, 0xA2, 0xDB, 0x0D, 0x64, 0x53, 0xFB, 0x1D, 0x60, 0xC3, 0x64,
-        0x6B, 0xFB, 0x1F, 0x60, 0x72, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0xA2, 0x64,
-        0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1,
-        0xFF, 0x60, 0xDF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x88, 0xF1, 0x19, 0x60, 0x86, 0x63, 0xD3, 0x80,
-        0x68, 0xFD, 0x01, 0x02, 0x43, 0x00, 0x68, 0xF3, 0x29, 0x41, 0xA0, 0xD1, 0x58, 0xD3, 0xD1, 0x80,
-        0x64, 0x45, 0x60, 0x43, 0x0F, 0x05, 0x08, 0xA3, 0xBE, 0xD3, 0x83, 0xF1, 0xA3, 0xD3, 0xD0, 0x80,
-        0x82, 0xF1, 0x05, 0x02, 0xBF, 0xD3, 0xD0, 0x80, 0x81, 0xF1, 0x01, 0x02, 0xD0, 0x80, 0xF8, 0xA3,
-        0x07, 0x02, 0x45, 0x49, 0x1E, 0x60, 0x2A, 0x64, 0x6B, 0xFB, 0x1F, 0x60, 0x29, 0x78, 0xFF, 0xFF,
-        0x2D, 0x60, 0x7A, 0x65, 0xA5, 0xD3, 0x65, 0x41, 0x10, 0xA3, 0x01, 0xA4, 0xFE, 0xB4, 0xC4, 0x85,
-        0xFE, 0xA1, 0xBD, 0xD3, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0xD5, 0x80, 0x0F, 0x02, 0xF9, 0x02,
-        0x05, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0x04, 0x64, 0xDC, 0xFB, 0xF2, 0xF3,
-        0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0x1E, 0x60, 0xE8, 0x78, 0xFF, 0xFF, 0x68, 0xF3, 0x88, 0xF1,
-        0x04, 0xA4, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x68, 0xFB, 0xBD, 0x01, 0xE1, 0xF3, 0x29, 0x45,
-        0xD4, 0x80, 0xFF, 0xFF, 0x75, 0x05, 0x1E, 0x60, 0x2A, 0x63, 0x6B, 0xFD, 0x1A, 0x60, 0x4C, 0x63,
-        0x1F, 0x60, 0x29, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x05, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78,
-        0xFF, 0xFF, 0x1F, 0x60, 0x52, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x04, 0x64, 0xDC, 0xFB, 0xF2, 0xF3,
-        0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0x84, 0xF3, 0x63, 0xF5, 0x48, 0x7E, 0x2A, 0xFA, 0x02, 0x60,
-        0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x0F, 0x60,
-        0xDA, 0x62, 0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB, 0x1E, 0x60, 0x61, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0xFE, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1A, 0x60, 0x9A, 0x62, 0x00, 0x60, 0x32, 0x64, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60,
-        0xDA, 0x62, 0x00, 0x60, 0x10, 0x64, 0xA2, 0xDB, 0x1E, 0x60, 0x81, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0xFD, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1,
-        0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x1B, 0x60, 0xB1, 0x78, 0xFF, 0xFF,
-        0x0F, 0x60, 0xDA, 0x62, 0x00, 0x60, 0x74, 0x64, 0xA2, 0xDB, 0x1E, 0x60, 0xA2, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1E, 0x60, 0xF4, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1D, 0x60,
-        0xD3, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x17, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x20, 0x40, 0x50, 0x27, 0xDD, 0x01, 0xAF, 0xF3, 0x6C, 0xF3, 0xFE, 0xA0, 0xF6, 0xA0,
-        0x0A, 0x06, 0x03, 0x04, 0x00, 0x64, 0x55, 0xFB, 0x40, 0x49, 0x6C, 0xF3, 0xFF, 0xFF, 0xF6, 0xA0,
-        0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0x1D, 0x60, 0xD3, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0xC6, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0xA2, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1D, 0x60, 0x6D, 0x78,
-        0xFF, 0xFF, 0x08, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0x8A, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x24, 0x60,
-        0xAA, 0x62, 0x1A, 0x60, 0xA2, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x0F, 0x60, 0xD8, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x00, 0x64, 0x6A, 0xFB, 0x0F, 0x60,
-        0xD0, 0x62, 0xA2, 0xD1, 0x02, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60,
-        0xDA, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0x1B, 0x60, 0x8A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xA3, 0xD3, 0x7F, 0xF1, 0x7E, 0xFB, 0xD0, 0x80, 0x00, 0x64, 0x40, 0x03,
-        0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xBF, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xDE, 0xFE,
-        0x0B, 0x04, 0x0F, 0x60, 0xDA, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x1F, 0x60, 0x2F, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xDF, 0x60,
-        0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x7E, 0xF1, 0x7F, 0xF9, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9,
-        0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xDA, 0x62, 0x20, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0x1F, 0x60, 0x5E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE,
-        0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xDF, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x0F, 0x60,
-        0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x64,
-        0x6B, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x0F, 0x60,
-        0xD8, 0x62, 0xA2, 0xD1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40, 0x51, 0x23,
-        0x0B, 0x00, 0x0F, 0x60, 0xDA, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x1F, 0x60, 0x76, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x7F, 0x60,
-        0xFF, 0x61, 0xA1, 0x84, 0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x40, 0x60, 0x00, 0x65,
-        0x20, 0x44, 0x34, 0x80, 0x02, 0x64, 0x8C, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x8C, 0xF3, 0x00, 0x65,
-        0xD4, 0x80, 0xFF, 0xFF, 0x12, 0x03, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x7F, 0x60, 0xFF, 0x64,
-        0xA0, 0x84, 0xA2, 0xDB, 0x0F, 0x60, 0xDA, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x1F, 0x60,
-        0x99, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2D, 0x60, 0x7A, 0x64, 0x54, 0xFB,
-        0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xEF, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x1A, 0x60,
-        0x58, 0x4E, 0xDC, 0x78, 0xFF, 0xFF, 0x0F, 0x4E, 0xEC, 0x60, 0x58, 0x4F, 0xB9, 0x78, 0xFF, 0xFF,
-        0x0E, 0x4F, 0x0F, 0x60, 0xDA, 0x62, 0x10, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0x1F, 0x60, 0xD3, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1A, 0x60, 0x58, 0x4E, 0xED, 0x78, 0xFF, 0xFF,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0xEF, 0x60, 0xEF, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x01, 0x64, 0x8C, 0xFB, 0xBF, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x01, 0x60, 0x14, 0x62,
-        0xA2, 0xD1, 0x12, 0x60, 0x46, 0x63, 0xC3, 0x85, 0xC6, 0xA3, 0x3A, 0xA3, 0xD7, 0x80, 0xAF, 0xF3,
-        0x09, 0x04, 0xFE, 0xA0, 0x6C, 0xF3, 0x3A, 0x06, 0xF6, 0xA0, 0x00, 0x64, 0x37, 0x04, 0x55, 0xFB,
-        0x40, 0x49, 0x34, 0x00, 0x08, 0xA3, 0xBE, 0xD3, 0x83, 0xF1, 0xA3, 0xD3, 0xD0, 0x80, 0x82, 0xF1,
-        0x05, 0x02, 0xBF, 0xD3, 0xD0, 0x80, 0x81, 0xF1, 0x01, 0x02, 0xD0, 0x80, 0xF8, 0xA3, 0xE5, 0x02,
-        0xBE, 0xD3, 0x5A, 0xD1, 0x60, 0x47, 0x40, 0x4A, 0x64, 0x47, 0x40, 0x48, 0x20, 0x60, 0x58, 0x4E,
-        0x45, 0x78, 0xFF, 0xFF, 0x0A, 0x48, 0x20, 0x60, 0x58, 0x4E, 0x55, 0x78, 0xFF, 0xFF, 0x20, 0x60,
-        0x58, 0x4E, 0x71, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0x2E, 0x65, 0x6C, 0xF3, 0xA5, 0xD3, 0xF6, 0xA0,
-        0x40, 0xBC, 0x06, 0x04, 0xA5, 0xDB, 0x6A, 0xF1, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0x6A, 0xFB,
-        0x6C, 0xF3, 0xFF, 0xFF, 0x00, 0xB8, 0xCC, 0x84, 0x01, 0x03, 0xA2, 0xDB, 0xFD, 0x60, 0xFF, 0x65,
-        0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x6B, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xF1, 0x28, 0x44,
-        0xD0, 0x84, 0x03, 0xA4, 0x03, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0x04, 0x00, 0xFA, 0xA4, 0xE8, 0x84,
-        0xE8, 0x87, 0xC0, 0xBF, 0xC0, 0x84, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0x56, 0xF1, 0x28, 0x44,
-        0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF,
-        0xC0, 0x84, 0x5C, 0xF1, 0x56, 0xFB, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x05, 0x64, 0x44, 0x52, 0xFB,
-        0x2E, 0x58, 0xFF, 0xFF, 0x52, 0xF1, 0x00, 0x65, 0x20, 0x40, 0x20, 0x2A, 0x06, 0x00, 0x5C, 0xF3,
-        0xFF, 0xFF, 0xD0, 0x80, 0x64, 0x45, 0x01, 0x06, 0x60, 0x45, 0x2F, 0x67, 0xD4, 0x80, 0xFF, 0xFF,
-        0x01, 0x06, 0x60, 0x45, 0x55, 0xF1, 0x8B, 0x67, 0xD0, 0x80, 0x60, 0x41, 0x02, 0x24, 0x64, 0x41,
-        0xD5, 0x84, 0x80, 0x65, 0xC4, 0x87, 0x01, 0x05, 0x00, 0x64, 0xFF, 0xB4, 0x40, 0x49, 0x20, 0x40,
-        0x20, 0x2A, 0x06, 0x00, 0x2E, 0x43, 0xF3, 0x60, 0x58, 0x4E, 0xA8, 0x78, 0xFF, 0xFF, 0x43, 0x4E,
-        0x2E, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xD8, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xF6, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x40, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x26, 0x46, 0x27, 0xF2, 0x70, 0x63, 0x60, 0x40, 0x0A, 0x36, 0x06, 0x00, 0x14, 0x36, 0x0A, 0x00,
-        0x37, 0x36, 0x04, 0x00, 0x6E, 0x36, 0x04, 0x00, 0xD0, 0x63, 0x04, 0x00, 0x33, 0x63, 0x02, 0x00,
-        0x21, 0x63, 0x00, 0x00, 0x1F, 0x60, 0x5A, 0x61, 0xA1, 0xDD, 0x26, 0x46, 0xBF, 0xF2, 0x01, 0x60,
-        0x00, 0x65, 0xF4, 0xA1, 0xD5, 0x80, 0x00, 0xF4, 0x02, 0x24, 0x65, 0x41, 0x41, 0x48, 0x1E, 0x65,
-        0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65,
-        0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81,
-        0xBD, 0xDB, 0xF0, 0x02, 0x02, 0x60, 0x00, 0x63, 0x28, 0x41, 0xBD, 0xD3, 0xBD, 0xD1, 0xFD, 0xA0,
-        0xFF, 0xFF, 0x07, 0x03, 0x64, 0x44, 0xE0, 0x85, 0xD1, 0x81, 0xFE, 0xA1, 0xC7, 0x83, 0xF5, 0x0D,
-        0x04, 0x00, 0x1A, 0x60, 0x4C, 0x61, 0xA3, 0xD3, 0xA1, 0xDB, 0x31, 0x40, 0x06, 0x26, 0x58, 0x00,
-        0x00, 0x64, 0x70, 0xFB, 0x02, 0x60, 0x00, 0x63, 0x28, 0x41, 0xBD, 0xD3, 0xBD, 0xD1, 0xFC, 0xA0,
-        0xFB, 0xA0, 0x08, 0x03, 0x28, 0x03, 0x64, 0x44, 0xE0, 0x85, 0xD1, 0x81, 0xFE, 0xA1, 0xC7, 0x83,
-        0xF4, 0x0D, 0x46, 0x00, 0xBD, 0xD3, 0xBD, 0xD3, 0x00, 0xB8, 0x70, 0xFB, 0x6F, 0xFB, 0xBD, 0xD3,
-        0x3F, 0x02, 0xA3, 0xD3, 0x60, 0x45, 0x60, 0x47, 0xB4, 0x84, 0x60, 0x41, 0x3F, 0xB5, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x72, 0xFB, 0x65, 0x47, 0xE0, 0x84,
-        0xE0, 0x84, 0x71, 0xFB, 0x64, 0x44, 0xE0, 0x85, 0xFA, 0xA3, 0xC7, 0x83, 0x1A, 0x60, 0x44, 0x62,
-        0x61, 0x44, 0xA2, 0xDB, 0xD2, 0x01, 0xBD, 0xD3, 0xA3, 0xD3, 0x00, 0xB8, 0x6E, 0xFB, 0x74, 0xFB,
-        0x1F, 0x02, 0x87, 0xF1, 0x70, 0xF3, 0x6D, 0xF9, 0x04, 0x65, 0x60, 0x40, 0x00, 0x3A, 0x06, 0x65,
-        0x31, 0x44, 0xB4, 0x84, 0x40, 0x51, 0x02, 0x2A, 0x0B, 0x00, 0x08, 0xBC, 0x40, 0x51, 0x72, 0xF3,
-        0x71, 0xF1, 0x00, 0xB8, 0x64, 0x45, 0x01, 0x03, 0x67, 0x45, 0x65, 0x50, 0xCC, 0x84, 0x73, 0xFB,
-        0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x0F, 0x60, 0xEC, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2A, 0x84, 0x00, 0x1F, 0x60,
-        0x52, 0x61, 0x01, 0x64, 0xA1, 0xDB, 0x22, 0x60, 0x58, 0x4E, 0x3E, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x00, 0xF4, 0x0D, 0xF2, 0x80, 0xFB, 0x00, 0x64, 0x86, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x80, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4,
-        0x1E, 0x65, 0xF4, 0xA4, 0xD4, 0xA0, 0x60, 0x41, 0x01, 0x06, 0x2C, 0x61, 0x41, 0x48, 0x02, 0x60,
-        0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x64, 0x44,
-        0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB,
-        0xF0, 0x02, 0x02, 0x60, 0x00, 0x63, 0x28, 0x41, 0xBD, 0xD3, 0xBD, 0xD1, 0x01, 0xA8, 0xC9, 0x81,
-        0x06, 0x03, 0x64, 0x44, 0xD1, 0x81, 0xE0, 0x85, 0x42, 0x06, 0xC7, 0x83, 0xF5, 0x01, 0x43, 0x48,
-        0x2D, 0x60, 0x2A, 0x63, 0x43, 0x4A, 0x64, 0x41, 0x28, 0x43, 0x00, 0x65, 0x45, 0x4C, 0x65, 0x5C,
-        0xBD, 0xD3, 0x61, 0x40, 0x00, 0x36, 0x27, 0x00, 0xCD, 0x81, 0x60, 0x40, 0x02, 0x36, 0x60, 0x45,
-        0x04, 0x36, 0x60, 0x45, 0x82, 0x36, 0x60, 0x45, 0x84, 0x36, 0x60, 0x45, 0x0B, 0x36, 0x60, 0x45,
-        0x8B, 0x36, 0x60, 0x45, 0x16, 0x36, 0x60, 0x45, 0x96, 0x36, 0x60, 0x45, 0x65, 0x40, 0x00, 0x36,
-        0xE7, 0x01, 0x64, 0x44, 0xDC, 0x9C, 0x2C, 0x44, 0x00, 0x3A, 0x02, 0x00, 0x45, 0x4C, 0xE0, 0x01,
-        0x2C, 0x5E, 0x65, 0x5F, 0x00, 0x65, 0x45, 0x4C, 0x43, 0x48, 0x2A, 0x43, 0xBD, 0xDB, 0xFF, 0xFF,
-        0x43, 0x4A, 0x28, 0x43, 0xD5, 0x01, 0x2D, 0x60, 0x28, 0x64, 0x60, 0xFE, 0xA0, 0xD9, 0xFF, 0xFF,
-        0x20, 0xFE, 0x64, 0x40, 0x01, 0x3A, 0x39, 0x00, 0x2A, 0x43, 0x65, 0x44, 0xA3, 0xDB, 0x35, 0x00,
-        0x23, 0x60, 0x34, 0x78, 0xFF, 0xFF, 0xDC, 0xF3, 0xFF, 0xFF, 0x03, 0xA8, 0x02, 0xA8, 0x02, 0x03,
-        0x41, 0x02, 0xF6, 0x01, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x26, 0x46, 0x1F, 0x60, 0x5A, 0x61, 0xA1, 0xD3, 0x25, 0xF2, 0x60, 0x45,
-        0x24, 0xF0, 0x00, 0xF4, 0x64, 0x43, 0xC7, 0x83, 0x60, 0x41, 0x02, 0x24, 0x01, 0xA1, 0x0A, 0xF0,
-        0x09, 0xF2, 0xD1, 0x80, 0xFF, 0xFF, 0x09, 0x07, 0x04, 0x04, 0x63, 0x45, 0xD4, 0x80, 0xFF, 0xFF,
-        0x04, 0x06, 0x22, 0x60, 0x58, 0x4E, 0x3E, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x26, 0xF0, 0xFF, 0x67,
-        0x20, 0x88, 0x64, 0x5F, 0x40, 0x4A, 0x20, 0x60, 0x58, 0x4E, 0x45, 0x78, 0xFF, 0xFF, 0x0A, 0x48,
-        0x20, 0x60, 0x58, 0x4E, 0x55, 0x78, 0xFF, 0xFF, 0x20, 0x60, 0x58, 0x4E, 0x71, 0x78, 0xFF, 0xFF,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xDA, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x22,
-        0xAF, 0x01, 0x01, 0x60, 0x2E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xBF, 0xB4, 0xA2, 0xDB, 0x1F, 0x60,
-        0x5A, 0x61, 0xA1, 0xD3, 0x26, 0x46, 0x60, 0x45, 0x1E, 0x60, 0xFE, 0x63, 0x00, 0xF4, 0x09, 0xF2,
-        0xBD, 0xDB, 0xFF, 0xFF, 0x0A, 0xF2, 0xBD, 0xDB, 0x0B, 0xF2, 0xFF, 0xFF, 0xBD, 0xDB, 0x0C, 0xF2,
-        0xA3, 0xDB, 0xFA, 0xA3, 0x26, 0x46, 0xA3, 0xD3, 0x24, 0xF0, 0x00, 0x61, 0xD0, 0x84, 0xF1, 0x81,
-        0xD4, 0x84, 0xF1, 0x81, 0xBD, 0xDB, 0xA3, 0xD3, 0x03, 0xB1, 0x03, 0xA9, 0x25, 0xF0, 0x42, 0xFE,
-        0x05, 0x03, 0xFD, 0xA1, 0xCC, 0x84, 0x01, 0x02, 0xCC, 0x84, 0x00, 0x61, 0xF1, 0x81, 0xD0, 0x84,
-        0xF1, 0x81, 0xBD, 0xDB, 0xA3, 0xD3, 0x03, 0xB1, 0x03, 0xA9, 0x28, 0xF0, 0x42, 0xFE, 0x01, 0x03,
-        0xCC, 0x84, 0xF1, 0x81, 0xD0, 0x84, 0xF1, 0x81, 0xBD, 0xDB, 0xA3, 0xD3, 0x03, 0xB1, 0x03, 0xA9,
-        0x29, 0xF0, 0x01, 0x03, 0xCC, 0x84, 0xD0, 0x84, 0xA3, 0xDB, 0x1F, 0x60, 0x52, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x02, 0xA8, 0xFF, 0xFF, 0x02, 0x02, 0x2E, 0x58, 0xFF, 0xFF, 0xF5, 0xFE, 0x1E, 0x60,
-        0xFE, 0x64, 0xA0, 0xD1, 0x06, 0xA4, 0xA0, 0xD3, 0x64, 0x45, 0x60, 0x40, 0x80, 0x2B, 0x03, 0x00,
-        0xFF, 0x60, 0xFF, 0x64, 0x94, 0x85, 0x00, 0x60, 0x96, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x0B, 0x06,
-        0x1F, 0x60, 0x52, 0x61, 0xA1, 0xD3, 0x6A, 0xF3, 0x00, 0xA8, 0x04, 0xB0, 0x04, 0x02, 0x03, 0x03,
-        0x23, 0x60, 0x10, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x09, 0xF2, 0x5A, 0xD2, 0x40, 0x48,
-        0x40, 0x4A, 0x5A, 0xD2, 0x5A, 0xD2, 0x40, 0x4C, 0x60, 0x41, 0x5A, 0xD0, 0x80, 0xF9, 0x40, 0x63,
-        0xAD, 0x80, 0xF0, 0xA3, 0x09, 0x02, 0x3C, 0x03, 0x2C, 0x41, 0x2A, 0x44, 0x40, 0x4C, 0x28, 0x44,
-        0x40, 0x4A, 0x00, 0x64, 0x40, 0x48, 0xF4, 0x01, 0xD1, 0x80, 0x01, 0x02, 0x31, 0x04, 0x10, 0xA3,
-        0x80, 0x60, 0x00, 0x65, 0xA5, 0x80, 0xCF, 0x83, 0x08, 0x02, 0x28, 0x44, 0x60, 0x88, 0x2A, 0x44,
-        0x70, 0x8A, 0x2C, 0x44, 0x70, 0x8C, 0xF1, 0x81, 0xF5, 0x01, 0xE7, 0xA3, 0x64, 0x44, 0x00, 0xA8,
-        0x00, 0x62, 0x02, 0x02, 0x00, 0x61, 0x1C, 0x00, 0xE0, 0x84, 0xDE, 0x82, 0xFD, 0x04, 0x42, 0xFE,
-        0xF8, 0x84, 0x62, 0x45, 0xC7, 0x83, 0x60, 0x45, 0x02, 0xFE, 0xD5, 0x84, 0x02, 0x05, 0x01, 0x05,
-        0x61, 0x44, 0xCF, 0x83, 0x60, 0x41, 0x08, 0x03, 0x28, 0x44, 0x60, 0x88, 0x2A, 0x44, 0x70, 0x8A,
-        0x2C, 0x44, 0x70, 0x8C, 0xF1, 0x81, 0xF1, 0x01, 0xCE, 0x82, 0xE9, 0x81, 0xFD, 0x02, 0xF1, 0x81,
-        0x09, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0xE8, 0x84, 0xE8, 0x84, 0x5A, 0xD2, 0x3F, 0xB5, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x84, 0x61, 0x45, 0xD4, 0x84,
-        0xC0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x93, 0x1F, 0x60, 0x52, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x00, 0xA8, 0xFF, 0xFF, 0x02, 0x03, 0x2E, 0x58, 0xFF, 0xFF, 0x10, 0x65, 0x73, 0x44,
-        0xD4, 0x93, 0x6A, 0xF3, 0x26, 0x46, 0x04, 0xBC, 0xA2, 0xDB, 0x26, 0xF0, 0xFF, 0x67, 0x20, 0x88,
-        0x64, 0x5F, 0x40, 0x4A, 0x20, 0x60, 0x58, 0x4E, 0x45, 0x78, 0xFF, 0xFF, 0x0A, 0x48, 0x20, 0x60,
-        0x58, 0x4E, 0x55, 0x78, 0xFF, 0xFF, 0x20, 0x60, 0x58, 0x4E, 0x71, 0x78, 0xFF, 0xFF, 0x6C, 0xF3,
-        0xFF, 0xFF, 0x00, 0xB8, 0xCC, 0x84, 0x01, 0x03, 0xA2, 0xDB, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x40, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0xA2, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xD8, 0x62,
-        0xA2, 0xD1, 0xFF, 0x60, 0xDF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0x28, 0xF3, 0xFF, 0xFF, 0x60, 0x47, 0x0F, 0xB4, 0x59, 0x00, 0xFF, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x24, 0x60, 0x9E, 0x65, 0x04, 0x64, 0xA5, 0xDB, 0x12, 0x00, 0x24, 0x60, 0x9E, 0x65, 0x0C, 0x64,
-        0xA5, 0xDB, 0x0D, 0x00, 0x24, 0x60, 0x9E, 0x65, 0x06, 0x64, 0xA5, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x9E, 0x65, 0x08, 0x64, 0xA5, 0xDB, 0x23, 0x60,
-        0xA1, 0x64, 0xA1, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0x29, 0xF3,
-        0x7F, 0xFB, 0xA4, 0xFB, 0x02, 0x60, 0xEE, 0x64, 0xA3, 0xFB, 0x07, 0x64, 0xA5, 0xFB, 0x23, 0x60,
-        0xA1, 0x64, 0xA1, 0xFB, 0xFF, 0xFF, 0xDF, 0xFE, 0x00, 0x64, 0x19, 0xFF, 0x25, 0x60, 0x11, 0x78,
-        0xFF, 0xFF, 0x24, 0x60, 0x0D, 0x63, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0x23, 0x60,
-        0x8E, 0x63, 0xA1, 0xFD, 0xFF, 0xFF, 0x1A, 0xFF, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0xA3, 0x60,
-        0x4B, 0x63, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0x29, 0xF5, 0x24, 0x60, 0x7A, 0x63,
-        0x24, 0x60, 0x4C, 0x64, 0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0x02, 0x64, 0xA3, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xF9, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xA7, 0x01, 0x00, 0x36, 0xA8, 0x01,
-        0x01, 0x36, 0xAB, 0x01, 0x02, 0x36, 0xAE, 0x01, 0x03, 0x36, 0xB5, 0x01, 0x04, 0x36, 0xD1, 0x01,
-        0x05, 0x36, 0xCF, 0x01, 0x06, 0x36, 0xF1, 0x01, 0x07, 0x36, 0xCB, 0x01, 0x08, 0x36, 0xB7, 0x01,
-        0x09, 0x36, 0x0C, 0x00, 0x0A, 0x36, 0x0D, 0x00, 0x0B, 0x36, 0x0E, 0x00, 0x0C, 0x36, 0x17, 0x00,
-        0x0D, 0x36, 0x0D, 0x00, 0x0E, 0x36, 0x1E, 0x00, 0x0F, 0x36, 0x32, 0x00, 0x02, 0x60, 0x00, 0x64,
-        0x08, 0x00, 0x04, 0x60, 0x00, 0x64, 0x05, 0x00, 0x00, 0x60, 0x01, 0x64, 0x02, 0x00, 0x20, 0x60,
-        0x00, 0x64, 0x32, 0x45, 0xB4, 0x85, 0x45, 0x52, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x24, 0x60,
-        0xD1, 0x63, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x3F, 0x40, 0x02, 0x2B, 0x05, 0x00, 0x90, 0x60, 0x00, 0xE8, 0x24, 0x60,
-        0x0D, 0x63, 0x04, 0x00, 0x91, 0x60, 0x00, 0xE8, 0x24, 0x60, 0xBB, 0x63, 0x28, 0xE8, 0x0C, 0x60,
-        0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x91, 0x60, 0x00, 0xE8, 0x28, 0xE8, 0xD9, 0x60, 0xFE, 0x64, 0x32, 0x45, 0xA4, 0x85, 0x45, 0x52,
-        0x99, 0xFF, 0xA5, 0x4F, 0xFF, 0xB4, 0x07, 0xFB, 0x98, 0xFF, 0xA3, 0x60, 0x4B, 0x63, 0x0C, 0x60,
-        0x16, 0x64, 0xA0, 0xDD, 0x62, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x08, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x43, 0xFF, 0x01, 0x60, 0x00, 0xE1, 0x28, 0xF3, 0x47, 0xFF, 0x60, 0x40, 0x07, 0x37,
-        0x4B, 0x00, 0x05, 0x3B, 0x04, 0x00, 0xFF, 0x0A, 0x80, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x29, 0xF5,
-        0x2A, 0xF3, 0x47, 0xFF, 0x3F, 0xF0, 0x01, 0x1B, 0x01, 0x64, 0x60, 0x56, 0xAD, 0xE2, 0xB5, 0xFF,
-        0x6C, 0x40, 0x40, 0xE1, 0xA1, 0xFF, 0x00, 0xF4, 0x6E, 0x61, 0x12, 0x62, 0x64, 0x43, 0x01, 0xE1,
-        0x03, 0x64, 0xE2, 0xD0, 0xC9, 0x81, 0x64, 0x4C, 0xCC, 0x84, 0xDA, 0x82, 0xFA, 0x02, 0x01, 0x60,
-        0x00, 0x6B, 0x9A, 0xFF, 0xCA, 0x82, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xFF, 0x7A, 0xD0,
-        0xA1, 0xFF, 0x64, 0x4C, 0xFC, 0x1C, 0xF8, 0x1D, 0x00, 0xB9, 0x06, 0x1E, 0x02, 0x02, 0x00, 0xF4,
-        0xDA, 0x82, 0x5A, 0xD2, 0xA1, 0xFF, 0x60, 0x4D, 0x3F, 0x40, 0x02, 0x2B, 0x08, 0x00, 0x28, 0xF3,
-        0xA5, 0x60, 0xC4, 0x65, 0x60, 0x40, 0x0E, 0x3B, 0x02, 0x00, 0x80, 0x4C, 0xFE, 0x01, 0xA1, 0xFF,
-        0x87, 0x4E, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x67, 0x4C, 0xFF, 0xFF, 0xBC, 0xFF,
-        0x00, 0xE1, 0xD5, 0xFE, 0xA1, 0xFF, 0xFF, 0xFF, 0x00, 0x64, 0x40, 0x46, 0x60, 0x41, 0xB5, 0xFF,
-        0xB7, 0xFF, 0xB4, 0xFF, 0x29, 0xF5, 0x3F, 0xF0, 0x24, 0xF2, 0x44, 0x43, 0x40, 0x44, 0x00, 0xF4,
-        0xF3, 0x60, 0xA0, 0x65, 0x10, 0x62, 0x5A, 0xD2, 0xD9, 0x81, 0xD4, 0x80, 0xFF, 0xFF, 0xFB, 0x02,
-        0x61, 0x45, 0x24, 0x44, 0xD4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xFD, 0xA5, 0x48, 0x60,
-        0x00, 0x64, 0xC4, 0x9D, 0x0D, 0x60, 0x00, 0x6B, 0x24, 0x44, 0xC0, 0x83, 0xBB, 0xFF, 0x29, 0xF5,
-        0x01, 0xE1, 0x00, 0xF4, 0x6C, 0x61, 0x10, 0x62, 0x05, 0x00, 0x00, 0xF4, 0x01, 0xF2, 0xFF, 0xFF,
-        0x60, 0x41, 0x04, 0x62, 0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x10, 0x1A, 0x00, 0x26, 0x44, 0x01, 0x26,
-        0x0C, 0x00, 0x24, 0x44, 0xC8, 0x84, 0x40, 0x44, 0x02, 0x03, 0x6C, 0x45, 0xF3, 0x01, 0x03, 0x15,
-        0x01, 0x64, 0x05, 0xFA, 0x15, 0x00, 0x6C, 0x45, 0xED, 0x01, 0x23, 0x44, 0xC8, 0x84, 0x40, 0x43,
-        0x02, 0x03, 0x6C, 0x45, 0xE7, 0x01, 0x00, 0x64, 0x01, 0x15, 0x01, 0x64, 0x6C, 0x45, 0x05, 0xFB,
-        0xE2, 0xD2, 0xDA, 0x82, 0xC9, 0x81, 0x60, 0x4C, 0xDD, 0x1C, 0xD7, 0x03, 0xBC, 0xFF, 0xDA, 0x01,
-        0x00, 0xE1, 0xD5, 0xFE, 0xA1, 0xFF, 0xFF, 0xFF, 0x08, 0xE1, 0xA1, 0xFF, 0x67, 0x4C, 0x43, 0xFF,
-        0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x01, 0xE1, 0x01, 0x60, 0x69, 0x6B, 0xA5, 0x60,
-        0xC4, 0x64, 0x60, 0x4C, 0xBB, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x60, 0x4C, 0xFC, 0x01, 0x29, 0xF3, 0x2A, 0xF1, 0x07, 0xB5, 0x04, 0xE1, 0x65, 0x41, 0x64, 0x54,
-        0xCD, 0xE2, 0x95, 0x81, 0xA1, 0x5D, 0xA1, 0xFF, 0xFF, 0xFF, 0xF9, 0x01, 0x61, 0x44, 0xFE, 0xFB,
-        0xFF, 0xFD, 0xFF, 0x01, 0x7F, 0x67, 0x01, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0xB1, 0xFE, 0x08, 0x05,
-        0xB0, 0xFE, 0x09, 0x05, 0xB2, 0xFE, 0xB3, 0xFE, 0x78, 0x43, 0x01, 0x61, 0x24, 0x60, 0xDD, 0x78,
-        0x2D, 0x60, 0x5D, 0x78, 0xFF, 0xFF, 0x28, 0xF3, 0x29, 0xF1, 0x40, 0x44, 0x44, 0x45, 0x2A, 0xF1,
-        0x2B, 0xF1, 0x44, 0x46, 0x44, 0x47, 0x3F, 0xB4, 0xE0, 0x85, 0x1F, 0x60, 0x88, 0x64, 0x44, 0xD7,
-        0x58, 0x43, 0xFF, 0xFF, 0x60, 0x45, 0x1C, 0x60, 0xB4, 0x7C, 0xA4, 0xD3, 0x61, 0x43, 0x04, 0xB4,
-        0x24, 0x44, 0x02, 0x03, 0x13, 0xFF, 0x06, 0x00, 0x3F, 0xB4, 0xB4, 0x84, 0xFF, 0x27, 0x05, 0xFD,
-        0x04, 0xFB, 0x10, 0x75, 0xA1, 0xFF, 0xFF, 0xFF, 0x86, 0x3E, 0xB4, 0xFE, 0x0B, 0x05, 0xB5, 0xFE,
-        0x02, 0x24, 0xA1, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xFE, 0x07, 0x05, 0x78, 0x43, 0x01, 0x61,
-        0x24, 0x60, 0xDD, 0x78, 0x2D, 0x60, 0x98, 0x78, 0xFF, 0xFF, 0x36, 0x44, 0x00, 0x7F, 0xF2, 0xA0,
-        0x60, 0x45, 0x05, 0x05, 0x20, 0x60, 0x16, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x78, 0x43,
-        0x01, 0x61, 0x24, 0x60, 0xDD, 0x78, 0x78, 0x43, 0x01, 0x61, 0x24, 0x60, 0xDD, 0x78, 0x7F, 0x60,
-        0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x10, 0x02, 0x10, 0x64, 0x40, 0x40,
-        0x02, 0x64, 0x40, 0x50, 0x61, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x04, 0x00, 0x10, 0xE0, 0x46, 0x60,
-        0x09, 0xE0, 0x00, 0x00, 0x27, 0xF1, 0x00, 0x66, 0x20, 0x78, 0x42, 0xFE, 0x23, 0x58, 0xFF, 0xFF,
-        0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x1A, 0x02, 0x1C, 0x60,
-        0xB4, 0x63, 0xA3, 0xD3, 0x07, 0x7C, 0x20, 0xB5, 0x0C, 0xB5, 0x04, 0x03, 0x03, 0x02, 0xDC, 0xF9,
-        0x00, 0x67, 0x0F, 0x00, 0x00, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0xAC, 0x01, 0x36, 0x47, 0xFF, 0x23,
-        0x04, 0x00, 0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x04, 0x00, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67,
-        0x02, 0x61, 0x31, 0x02, 0x1C, 0x60, 0xB4, 0x63, 0xA3, 0xD3, 0x01, 0x7C, 0x20, 0xB5, 0x0C, 0xB5,
-        0x03, 0x03, 0x02, 0x02, 0xDC, 0xF9, 0xFF, 0xFF, 0x02, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0x25, 0x60,
-        0x11, 0x78, 0xFF, 0xFF, 0x9F, 0xF1, 0x20, 0x44, 0x64, 0x40, 0xFF, 0x26, 0x1B, 0x00, 0x7F, 0xB4,
-        0x40, 0x40, 0x5C, 0x5E, 0x82, 0xFF, 0x26, 0x44, 0xFD, 0xB4, 0x40, 0x46, 0x5C, 0x41, 0x87, 0xFF,
-        0x62, 0xFF, 0x00, 0x63, 0x24, 0x60, 0x5E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x04, 0x03, 0x09, 0xF2, 0x0F, 0xFC, 0xAC, 0x86, 0xFB, 0x01, 0x24, 0x60, 0x9E, 0x62, 0x06, 0x64,
-        0xA2, 0xDB, 0x2D, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x00, 0x67, 0x20, 0x40, 0x80, 0x2A,
-        0x02, 0x00, 0x7F, 0x67, 0x06, 0x61, 0x60, 0x45, 0x1C, 0x60, 0xB4, 0x7C, 0xA4, 0xD3, 0x61, 0x43,
-        0x04, 0xB4, 0x24, 0x44, 0x02, 0x03, 0x13, 0xFF, 0x55, 0x01, 0x3F, 0xB4, 0xB4, 0x84, 0xFF, 0x27,
-        0x05, 0xFD, 0x04, 0xFB, 0x20, 0x40, 0x80, 0x2A, 0x02, 0x00, 0x10, 0x75, 0x07, 0x00, 0x2D, 0x60,
-        0x9C, 0x62, 0x01, 0x64, 0xA2, 0xDB, 0xFF, 0xFF, 0x08, 0x60, 0x10, 0x75, 0x43, 0x01, 0x25, 0x46,
-        0x01, 0xF2, 0x08, 0xF0, 0x60, 0x47, 0x03, 0xB4, 0x03, 0xAC, 0x7F, 0x67, 0x03, 0x61, 0x08, 0x02,
-        0x24, 0x60, 0x7A, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x2B, 0x49, 0x00, 0x25, 0x44, 0x1F, 0xB4, 0xE0, 0x85,
-        0x25, 0x60, 0xEB, 0x64, 0xC4, 0x98, 0xFF, 0xFF, 0xC0, 0xFE, 0x3D, 0x00, 0xC1, 0xFE, 0x3B, 0x00,
-        0xC2, 0xFE, 0x39, 0x00, 0xC3, 0xFE, 0x37, 0x00, 0xC4, 0xFE, 0x35, 0x00, 0xC5, 0xFE, 0x33, 0x00,
-        0xC6, 0xFE, 0x31, 0x00, 0xC7, 0xFE, 0x2F, 0x00, 0xC8, 0xFE, 0x2D, 0x00, 0xC9, 0xFE, 0x2B, 0x00,
-        0xCA, 0xFE, 0x29, 0x00, 0xCB, 0xFE, 0x27, 0x00, 0xCC, 0xFE, 0x25, 0x00, 0xCD, 0xFE, 0x23, 0x00,
-        0xCE, 0xFE, 0x21, 0x00, 0xCF, 0xFE, 0x1F, 0x00, 0xD0, 0xFE, 0x1D, 0x00, 0xD1, 0xFE, 0x1B, 0x00,
-        0xD2, 0xFE, 0x19, 0x00, 0xD3, 0xFE, 0x17, 0x00, 0xD4, 0xFE, 0x15, 0x00, 0xD5, 0xFE, 0x13, 0x00,
-        0xD6, 0xFE, 0x11, 0x00, 0xD7, 0xFE, 0x0F, 0x00, 0xD8, 0xFE, 0x0D, 0x00, 0xD9, 0xFE, 0x0B, 0x00,
-        0xDA, 0xFE, 0x09, 0x00, 0xDB, 0xFE, 0x07, 0x00, 0xDC, 0xFE, 0x05, 0x00, 0xDD, 0xFE, 0x03, 0x00,
-        0xDE, 0xFE, 0x01, 0x00, 0xDF, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x9F, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x9E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9D, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x9C, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9A, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x99, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x98, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x97, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x96, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x95, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x94, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x93, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x92, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x91, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x90, 0xFE, 0xF0, 0x84, 0x06, 0xFB, 0x8F, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x8E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8D, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x8C, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8A, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x89, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x88, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x87, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x86, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x85, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x84, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x83, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x82, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x81, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x80, 0xFE, 0xF0, 0x84, 0x05, 0xFB, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x5C, 0x5C, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x27,
-        0x55, 0x00, 0x05, 0x60, 0x00, 0x63, 0x05, 0xFD, 0x30, 0x44, 0xBD, 0xDB, 0x31, 0x44, 0xBD, 0xDB,
-        0x32, 0x44, 0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB, 0x35, 0x44, 0xBD, 0xDB,
-        0x36, 0x44, 0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB, 0x39, 0x44, 0xBD, 0xDB,
-        0x3A, 0x44, 0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB, 0x3D, 0x44, 0xBD, 0xDB,
-        0x3E, 0x44, 0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0x02, 0x61, 0x61, 0x44, 0x02, 0x36, 0x82, 0xFF,
-        0x03, 0x36, 0x83, 0xFF, 0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF, 0x06, 0x36, 0x86, 0xFF,
-        0x07, 0x36, 0x87, 0xFF, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB,
-        0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB,
-        0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB,
-        0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB,
-        0x2F, 0x44, 0xBD, 0xDB, 0xDD, 0x81, 0x08, 0x3A, 0xD0, 0x01, 0x54, 0x00, 0x27, 0x40, 0x10, 0x26,
-        0x30, 0x00, 0x26, 0x44, 0x01, 0x36, 0x2D, 0x00, 0x02, 0x36, 0x82, 0xFF, 0x03, 0x36, 0x83, 0xFF,
-        0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF, 0x06, 0x36, 0x86, 0xFF, 0x25, 0x44, 0x00, 0x36,
-        0x44, 0x40, 0x01, 0x36, 0x44, 0x41, 0x02, 0x36, 0x44, 0x42, 0x03, 0x36, 0x44, 0x43, 0x04, 0x36,
-        0x44, 0x44, 0x05, 0x36, 0x44, 0x45, 0x06, 0x36, 0x44, 0x46, 0x07, 0x36, 0x44, 0x47, 0x08, 0x36,
-        0x44, 0x48, 0x09, 0x36, 0x44, 0x49, 0x0A, 0x36, 0x44, 0x4A, 0x0B, 0x36, 0x44, 0x4B, 0x0C, 0x36,
-        0x44, 0x4C, 0x0D, 0x36, 0x44, 0x4D, 0x0E, 0x36, 0x44, 0x4E, 0x0F, 0x36, 0x44, 0x4F, 0x87, 0xFF,
-        0x21, 0x00, 0x25, 0x44, 0x10, 0x36, 0x44, 0x50, 0x11, 0x36, 0x44, 0x51, 0x12, 0x36, 0x44, 0x52,
-        0x13, 0x36, 0x44, 0x53, 0x14, 0x36, 0x44, 0x54, 0x15, 0x36, 0x44, 0x55, 0x16, 0x36, 0x44, 0x56,
-        0x17, 0x36, 0x44, 0x57, 0x18, 0x36, 0x44, 0x58, 0x19, 0x36, 0x44, 0x59, 0x1A, 0x36, 0x44, 0x5A,
-        0x1B, 0x36, 0x44, 0x5B, 0x1C, 0x36, 0x44, 0x5C, 0x1D, 0x36, 0x44, 0x5D, 0x1E, 0x36, 0x44, 0x5E,
-        0x1F, 0x36, 0x44, 0x5F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0x46, 0xAE, 0x60, 0x58, 0x4F,
-        0x6F, 0x78, 0xFF, 0xFF, 0x03, 0x61, 0x7F, 0x67, 0x0B, 0x02, 0x00, 0xF0, 0x24, 0x60, 0x7A, 0x62,
-        0x04, 0x64, 0xA2, 0xDB, 0x5A, 0xD9, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61,
-        0x11, 0x02, 0x24, 0x60, 0x9E, 0x62, 0x1A, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x50, 0x63, 0x5A, 0xDD,
-        0x27, 0x60, 0x6E, 0x64, 0xA1, 0xFB, 0x2D, 0xFF, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0x2A, 0xF3,
-        0x05, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x7F, 0x67, 0x02, 0x61, 0x0F, 0x02, 0x24, 0x60, 0x9E, 0x62, 0x1C, 0x64, 0xA2, 0xDB, 0x00, 0x60,
-        0x50, 0x63, 0x5A, 0xDD, 0x27, 0x60, 0x88, 0x64, 0xA1, 0xFB, 0x2D, 0xFF, 0x25, 0x60, 0x11, 0x78,
-        0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x02, 0x61, 0x3E, 0x02, 0x25, 0x45, 0x20, 0x44, 0x80, 0x2A, 0x3A, 0x00, 0xF1, 0x60, 0x00, 0x64,
-        0xD4, 0x80, 0xFF, 0xFF, 0x0B, 0x03, 0xF1, 0x60, 0x01, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x06, 0x03,
-        0xF1, 0x60, 0x02, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x30, 0x03, 0x29, 0x00, 0x2D, 0x60, 0x0E, 0x62,
-        0xA2, 0xD1, 0xBA, 0xF3, 0x1F, 0x60, 0x82, 0x61, 0xA0, 0x84, 0xA1, 0xDB, 0x25, 0x45, 0x23, 0x60,
-        0xE4, 0x63, 0x02, 0x61, 0xBD, 0xD3, 0xBD, 0xD1, 0xD4, 0x80, 0xBD, 0xD3, 0xBD, 0xD5, 0xCD, 0x81,
-        0x02, 0x03, 0x15, 0x03, 0xF7, 0x01, 0xA2, 0xFF, 0xA6, 0xD3, 0x40, 0x4C, 0x00, 0xA8, 0x67, 0x43,
-        0x0C, 0x02, 0xA2, 0xDD, 0x42, 0x48, 0x64, 0x41, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0x28, 0xDB, 0x02, 0x03, 0x2C, 0x58, 0xA3, 0xFF, 0x0C, 0x61, 0x03, 0x00, 0x04, 0x61,
-        0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x2D, 0x60, 0x0E, 0x62, 0xA2, 0xD1,
-        0xBA, 0xF3, 0x1F, 0x60, 0x82, 0x61, 0xA0, 0x84, 0xA1, 0xDB, 0x1F, 0x60, 0x86, 0x61, 0x01, 0x64,
-        0xA1, 0xDB, 0xFF, 0xFF, 0xC4, 0xFE, 0xEE, 0x01, 0xC6, 0xFE, 0xEC, 0x01, 0x7E, 0x60, 0xC0, 0x64,
-        0x24, 0x45, 0xA4, 0x80, 0x02, 0x61, 0x3F, 0x02, 0x25, 0x45, 0xF8, 0x2B, 0x3B, 0x00, 0x2E, 0xF5,
-        0x67, 0x44, 0xD4, 0x80, 0x20, 0x60, 0x24, 0x63, 0x39, 0x03, 0x60, 0x61, 0x24, 0x44, 0x01, 0x27,
-        0x29, 0x00, 0xA3, 0xFC, 0xA4, 0xF8, 0xBD, 0xD3, 0xA3, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24,
-        0x64, 0x58, 0x08, 0xA3, 0xF8, 0x02, 0x08, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xA3, 0xD1, 0xFE, 0xA0,
-        0xFA, 0x60, 0x00, 0x64, 0xD0, 0x80, 0x14, 0x02, 0x13, 0x02, 0x04, 0xA3, 0xBE, 0xD3, 0xBD, 0xD1,
-        0x0F, 0x18, 0xD4, 0x80, 0x0D, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x64, 0x41,
-        0xDD, 0x81, 0xE1, 0x81, 0xCB, 0x83, 0x46, 0x65, 0x2F, 0x60, 0x58, 0x4F, 0x01, 0x78, 0xFF, 0xFF,
-        0x00, 0x67, 0x0A, 0x00, 0xBD, 0xD3, 0xBE, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24, 0x64, 0x58,
-        0x08, 0xA3, 0xF8, 0x02, 0x04, 0x61, 0x7F, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x0F, 0x64, 0x23, 0xFA,
-        0x67, 0x44, 0x24, 0xFA, 0x62, 0x41, 0x3C, 0x60, 0x00, 0x65, 0x1A, 0x63, 0x68, 0x60, 0x28, 0x64,
-        0x65, 0x46, 0x58, 0xD0, 0x2E, 0xF5, 0x59, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0xCB, 0x83, 0xBF, 0xD1, 0x4A, 0x65, 0x64, 0x43, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0x01, 0x26,
-        0xDC, 0x81, 0xE9, 0x84, 0xDC, 0x84, 0x23, 0xFA, 0x09, 0x00, 0x4B, 0xD3, 0xFF, 0xFF, 0x60, 0x41,
-        0xE8, 0x84, 0xDC, 0x84, 0x23, 0xFA, 0xBF, 0xD1, 0x4A, 0x65, 0x64, 0x43, 0x2F, 0x60, 0x58, 0x4F,
-        0x01, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xE0, 0xA0,
-        0x20, 0x64, 0x01, 0x06, 0x25, 0xFA, 0x23, 0xF2, 0xDF, 0xD1, 0xCC, 0x84, 0xE0, 0x85, 0x0B, 0x06,
-        0xBF, 0xD1, 0x64, 0x41, 0xD5, 0x80, 0x64, 0x43, 0x01, 0x06, 0x65, 0x41, 0x4A, 0x65, 0x29, 0x60,
-        0x58, 0x4F, 0x83, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xDC, 0xF3, 0x02, 0x63,
-        0x23, 0xFC, 0x07, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x4B, 0xD3, 0xBF, 0xD3,
-        0x60, 0x41, 0xC9, 0x83, 0xE9, 0x81, 0xDD, 0x81, 0xA3, 0xFA, 0xE0, 0x81, 0x3C, 0x60, 0x00, 0x67,
-        0x02, 0x24, 0x02, 0xA4, 0x60, 0x47, 0x40, 0x4B, 0xC9, 0x81, 0x4A, 0x65, 0xAB, 0x46, 0x59, 0xD0,
-        0xAB, 0x46, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF6, 0x1F,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1, 0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83,
-        0x60, 0x47, 0x25, 0xFA, 0x00, 0x7E, 0x60, 0x47, 0x01, 0x26, 0xDC, 0x84, 0x60, 0x41, 0xE8, 0x84,
-        0xD8, 0x84, 0x23, 0xFA, 0xAB, 0x01, 0xFC, 0xA3, 0xA3, 0xD1, 0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83,
-        0x00, 0x7F, 0x25, 0xFA, 0x60, 0x41, 0x01, 0x26, 0xDD, 0x81, 0xE9, 0x84, 0xD8, 0x84, 0x23, 0xFA,
-        0x9D, 0x01, 0x28, 0x60, 0xE2, 0x63, 0xBF, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0xE8, 0x84, 0xDC, 0x84,
-        0x23, 0xFA, 0x4A, 0x65, 0x2F, 0x60, 0x58, 0x4F, 0x01, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x28, 0x60, 0xE2, 0x63, 0x23, 0xF2, 0xC0, 0x65, 0xCC, 0x84, 0xE0, 0x81, 0x0A, 0x04,
-        0xBF, 0xDB, 0xD5, 0x80, 0x07, 0x03, 0x01, 0x06, 0x65, 0x41, 0x61, 0x44, 0xBF, 0xDB, 0x4A, 0x65,
-        0x58, 0x4F, 0xAA, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x03, 0x4E, 0x28, 0x60, 0x58, 0x43,
-        0x5C, 0x78, 0xFF, 0xFF, 0x29, 0x60, 0xC6, 0x61, 0x29, 0x60, 0xA4, 0x62, 0xA2, 0xD3, 0xA1, 0xDB,
-        0xCC, 0x84, 0xA8, 0x83, 0x05, 0x04, 0x29, 0x60, 0xA4, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F,
-        0x0E, 0x43, 0x81, 0x01, 0x23, 0xF2, 0x1C, 0x60, 0x8E, 0x65, 0x60, 0x41, 0x1C, 0x60, 0x2A, 0x63,
-        0xA3, 0xDB, 0xFF, 0xA1, 0x48, 0x64, 0x58, 0xD0, 0x7E, 0xA8, 0x5B, 0xD9, 0x02, 0x02, 0x00, 0xF4,
-        0x02, 0x64, 0xFF, 0xA1, 0xD7, 0x80, 0x02, 0x03, 0x01, 0x03, 0xF5, 0x01, 0x2E, 0xF5, 0x00, 0x60,
-        0x2F, 0x65, 0x25, 0xF2, 0x00, 0x63, 0xCC, 0x84, 0x03, 0xA3, 0xFD, 0x05, 0x4A, 0x64, 0xD7, 0x80,
-        0x1B, 0x60, 0xC6, 0x61, 0x2F, 0x05, 0xA1, 0xDD, 0xE3, 0x83, 0xFE, 0xA3, 0x58, 0xD0, 0x7E, 0xA8,
-        0x59, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x00, 0x63, 0x59, 0xDD, 0x2E, 0xF5,
-        0x1B, 0x60, 0xC6, 0x64, 0x25, 0xF0, 0xA0, 0xD3, 0xD3, 0x80, 0x01, 0xB0, 0x04, 0x03, 0x01, 0xA4,
-        0x03, 0x03, 0xA2, 0xDB, 0x01, 0x00, 0xA2, 0xDD, 0x1B, 0x60, 0xCE, 0x63, 0x10, 0x60, 0x5A, 0x65,
-        0xBD, 0xD3, 0xBD, 0xD1, 0xE0, 0x84, 0xC4, 0x82, 0x10, 0x60, 0x7A, 0x65, 0x07, 0x64, 0x64, 0x41,
-        0x5A, 0xDB, 0xD6, 0x80, 0xCD, 0x81, 0x06, 0x03, 0xFB, 0x02, 0x25, 0xF2, 0x02, 0xA3, 0xCC, 0x84,
-        0xA2, 0xDA, 0xEC, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x2A, 0x61, 0xA1, 0xD3,
-        0x23, 0xFA, 0xE0, 0x83, 0x4A, 0x65, 0x04, 0x02, 0x02, 0x63, 0x23, 0xFC, 0xA5, 0xFC, 0x09, 0x00,
-        0xDB, 0x83, 0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65,
-        0xF8, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x1B, 0x60, 0xC6, 0x62, 0xA2, 0xD3, 0x00, 0x61,
-        0x02, 0xA4, 0xFE, 0xA0, 0x23, 0xFA, 0x1B, 0x03, 0xFA, 0xA4, 0xFD, 0xA4, 0x01, 0xA1, 0xFD, 0x07,
-        0x61, 0x43, 0x23, 0xF2, 0x25, 0xFC, 0xE0, 0x83, 0x02, 0xA3, 0x1B, 0x60, 0xC6, 0x61, 0x00, 0x60,
-        0x4A, 0x64, 0x59, 0xD1, 0x58, 0xD8, 0x7E, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F,
-        0x25, 0xF2, 0x23, 0xF2, 0x01, 0xB0, 0xCC, 0x84, 0x04, 0x02, 0x23, 0xFA, 0x02, 0x00, 0x00, 0x64,
-        0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x41, 0x4B, 0x65, 0x42, 0x80, 0x64, 0xD4, 0x85,
-        0x2B, 0x41, 0x00, 0xA1, 0x55, 0x8B, 0x0D, 0x03, 0x02, 0x04, 0x65, 0x41, 0x02, 0x00, 0x00, 0x64,
-        0x40, 0x4B, 0xCA, 0x84, 0x58, 0xD0, 0xC9, 0x81, 0xBD, 0xD9, 0xFC, 0x02, 0x00, 0xF4, 0x04, 0x65,
-        0xEC, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD3, 0x02, 0x7C, 0xA0, 0xD3, 0x23, 0xF8,
-        0xDC, 0x84, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x02, 0x64, 0x23, 0xFA, 0x01, 0x64,
-        0x9D, 0xFE, 0x02, 0x28, 0x02, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x2D, 0x60,
-        0x1A, 0x62, 0xA2, 0xD3, 0x02, 0x7C, 0x23, 0xF8, 0x01, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1, 0x02, 0x64, 0x23, 0xFA, 0xA4, 0xD3, 0x00, 0x63, 0x60, 0x40,
-        0x0A, 0x37, 0x01, 0x63, 0x14, 0x37, 0x02, 0x63, 0x37, 0x37, 0x06, 0x63, 0x6E, 0x37, 0x0B, 0x63,
-        0x25, 0xFC, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x02, 0x64, 0x23, 0xFA, 0x88, 0xFF, 0x75, 0x44,
-        0x8D, 0xFF, 0xE8, 0x87, 0xE8, 0x84, 0xE8, 0x84, 0x03, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x04, 0x64, 0x23, 0xFA, 0x86, 0xFF, 0x29, 0x44, 0x87, 0xFF, 0x25, 0xFA, 0x55, 0xF3,
-        0x52, 0xF1, 0x80, 0x65, 0xC4, 0x87, 0x00, 0x7F, 0x26, 0xFA, 0x64, 0x44, 0xC4, 0x87, 0x00, 0x7F,
-        0x27, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x05, 0x64, 0x23, 0xFA, 0x52, 0x63, 0xB7, 0xF3,
-        0x4B, 0xDA, 0xB6, 0xF3, 0x4B, 0xDA, 0xB5, 0xF3, 0x4B, 0xDA, 0x60, 0x41, 0x88, 0xFF, 0x72, 0x5C,
-        0x89, 0xFF, 0x4A, 0xD8, 0xA2, 0x48, 0x20, 0x23, 0x0E, 0x00, 0x64, 0x40, 0x80, 0x27, 0x15, 0x00,
-        0xDC, 0x84, 0xBD, 0xDA, 0xBD, 0xD2, 0x11, 0x04, 0xDC, 0x84, 0xA2, 0xDA, 0xA3, 0xD2, 0x0D, 0x04,
-        0xDC, 0x84, 0xA3, 0xDA, 0x0A, 0x00, 0x52, 0x63, 0xB7, 0xF3, 0x4B, 0xDA, 0xB6, 0xF3, 0x4B, 0xDA,
-        0xB5, 0xF3, 0x4B, 0xDA, 0x54, 0x90, 0x4C, 0x63, 0xE0, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x25, 0xF0, 0x2D, 0x60, 0x16, 0x65, 0x23, 0xF2, 0xA5, 0xD9, 0x02, 0xA8, 0x64, 0x44, 0x07, 0x02,
-        0x00, 0xBC, 0xF2, 0xA4, 0x04, 0x03, 0x03, 0x07, 0x28, 0x60, 0x44, 0x62, 0xA2, 0xD9, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x20, 0x63, 0x28, 0x60, 0xA4, 0x61, 0x48, 0x64, 0x58, 0xD0, 0x59, 0xD9,
-        0xFD, 0x1F, 0x25, 0xF0, 0x20, 0x64, 0xD0, 0x81, 0xFF, 0xFF, 0x02, 0x07, 0x25, 0xFA, 0x0F, 0x00,
-        0x28, 0x60, 0xA8, 0x63, 0xC3, 0x83, 0x01, 0x2A, 0x06, 0x00, 0xCF, 0x83, 0xA3, 0xD3, 0xCD, 0x81,
-        0x00, 0x7F, 0xBD, 0xDB, 0x04, 0x03, 0x00, 0x64, 0xC9, 0x81, 0xBD, 0xDB, 0xFD, 0x02, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x01, 0x60, 0xA6, 0x62, 0x09, 0x02,
-        0xA2, 0xD9, 0x64, 0x41, 0x32, 0x44, 0x02, 0xB5, 0x00, 0xB9, 0xD4, 0x84, 0x08, 0x28, 0x02, 0xBC,
-        0x40, 0x52, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x01, 0x60,
-        0xB2, 0x62, 0x0C, 0x02, 0xA2, 0xD9, 0x64, 0x41, 0x32, 0x44, 0x40, 0xB5, 0x00, 0xB9, 0xD4, 0x84,
-        0x08, 0x24, 0x03, 0x00, 0x40, 0xBC, 0x02, 0xB5, 0xD4, 0x84, 0x40, 0x52, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x01, 0x60, 0xB0, 0x63, 0xA3, 0xD9, 0xA9, 0xF1, 0x20, 0x61,
-        0x41, 0x4B, 0x64, 0x43, 0xD8, 0xF3, 0x63, 0x45, 0x66, 0x41, 0x65, 0x46, 0x8C, 0xFA, 0x60, 0x40,
-        0x01, 0x36, 0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00, 0x05, 0x3A, 0x02, 0x00,
-        0x00, 0x64, 0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x79, 0xF3, 0x7A, 0xF1, 0xFF, 0xFF, 0xA0, 0x84,
-        0x65, 0x43, 0x02, 0x02, 0x79, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60, 0xAE, 0x65, 0xD8, 0xF3,
-        0xFF, 0xFF, 0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x04, 0x02, 0xE8, 0x84,
-        0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x7B, 0xFB, 0x6F, 0xF0, 0x60, 0x47, 0x90, 0x84,
-        0x6F, 0xFA, 0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03,
-        0xA4, 0x84, 0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x05, 0xDD, 0x81,
-        0xFB, 0x01, 0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x66, 0x43, 0x0C, 0xF4,
-        0x2B, 0x41, 0x4D, 0x8B, 0x02, 0xA3, 0xB6, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2,
-        0x25, 0xF0, 0x02, 0xA8, 0x00, 0x67, 0x02, 0x02, 0x2D, 0xF9, 0x2C, 0xF9, 0x23, 0x58, 0xFF, 0xFF,
-        0x28, 0x60, 0x42, 0x61, 0x23, 0xF2, 0x25, 0xF2, 0x02, 0xA8, 0x00, 0xA8, 0x09, 0x02, 0x07, 0x03,
-        0xD0, 0xA0, 0x30, 0x65, 0x03, 0x04, 0xA7, 0xA0, 0x59, 0x65, 0x01, 0x06, 0x65, 0x44, 0xA1, 0xDB,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x31, 0x60, 0x2C, 0x61, 0x01, 0x64, 0xA1, 0xDB, 0x04, 0x00,
-        0x31, 0x60, 0x2C, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x7E, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x7F, 0x67, 0x02, 0x61, 0x0E, 0x02, 0x06, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0x25, 0x60, 0x11, 0x78,
-        0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00, 0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x01, 0x00,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7E, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67,
-        0x02, 0x61, 0x12, 0x02, 0x2D, 0x60, 0x58, 0x61, 0x65, 0x43, 0xA1, 0xDD, 0x0C, 0x61, 0x41, 0x56,
-        0xC7, 0xFE, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00, 0x00, 0x7F,
-        0x60, 0x41, 0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF0, 0x29, 0x60,
-        0xA2, 0x62, 0xA2, 0xD9, 0x19, 0x00, 0x2D, 0x60, 0x1A, 0x64, 0xA0, 0xD1, 0xA0, 0xF9, 0x0C, 0x60,
-        0x38, 0x62, 0x40, 0x63, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x64, 0x40, 0x01, 0x2A, 0x0C, 0x00,
-        0x04, 0x65, 0x0C, 0x60, 0x38, 0x61, 0x48, 0x64, 0x3E, 0x63, 0x7C, 0xA8, 0x58, 0xD0, 0x59, 0xD9,
-        0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x29, 0x60, 0xA2, 0x62, 0xA2, 0xD1, 0x0D, 0x60,
-        0x1C, 0x65, 0x02, 0xFE, 0x64, 0x44, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x87, 0x60, 0x41, 0x64, 0x44,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x84, 0x3E, 0xFB, 0x60, 0x42, 0x61, 0x44, 0x03, 0xA2, 0x60, 0xFE,
-        0xA2, 0xDB, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x44, 0x0C, 0x60, 0x3A, 0x65, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x84, 0x40, 0xFB, 0xFF, 0xFF, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0x2D, 0x60, 0x1A, 0x64, 0xA0, 0xD1, 0xA0, 0xF9, 0x00, 0x64, 0x40, 0x41, 0x64, 0x40,
-        0x01, 0x2A, 0xA4, 0x00, 0x4A, 0x64, 0xA0, 0xD2, 0xFF, 0xFF, 0x40, 0x42, 0x80, 0x2B, 0x04, 0x00,
-        0xFF, 0xB4, 0x40, 0x42, 0x01, 0x64, 0x40, 0x41, 0xA9, 0xF3, 0x46, 0x4B, 0x60, 0x46, 0x20, 0x63,
-        0xE3, 0x83, 0xAB, 0x46, 0x26, 0xF0, 0xAB, 0x46, 0x55, 0xF8, 0xAB, 0x46, 0x27, 0xF0, 0xAB, 0x46,
-        0x56, 0xF8, 0xAB, 0x46, 0x28, 0xF0, 0xAB, 0x46, 0x57, 0xF8, 0x66, 0x44, 0x02, 0xA6, 0xF1, 0x1F,
-        0xA9, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xAB, 0x46, 0x0C, 0x60, 0x7A, 0x65, 0x22, 0x44, 0xFF, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81, 0xC9, 0x81, 0x52, 0x64, 0x0E, 0x63,
-        0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF0, 0xA1,
-        0x6E, 0x64, 0x0E, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46, 0x22, 0x44, 0xFF, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x0C, 0x60, 0xDC, 0x65, 0xC4, 0x81, 0x60, 0x45, 0xC9, 0x81,
-        0x62, 0x64, 0x06, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00,
-        0xAB, 0x46, 0xF8, 0xA1, 0xAE, 0x64, 0x06, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46,
-        0x65, 0x44, 0x0C, 0x60, 0xFC, 0x65, 0xC4, 0x81, 0xC9, 0x81, 0x6A, 0x64, 0x06, 0x63, 0x58, 0xD0,
-        0x59, 0xD9, 0xFD, 0x1F, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x84, 0x0C, 0x60,
-        0xC2, 0x65, 0xC4, 0x81, 0x72, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0xAB, 0x46,
-        0x21, 0x44, 0x01, 0x2A, 0x06, 0x00, 0xFA, 0xA1, 0x88, 0x64, 0x04, 0x63, 0x59, 0xD1, 0x58, 0xD8,
-        0xFD, 0x1F, 0x37, 0xF0, 0x21, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x22, 0x44, 0x3D, 0xFB, 0x60, 0x41,
-        0x02, 0xFE, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x84, 0x3C, 0xFB, 0x0C, 0x60, 0xBE, 0x63, 0x88, 0xFF,
-        0xCD, 0x81, 0x06, 0xA3, 0xFD, 0x0D, 0x8D, 0xFF, 0x3B, 0xFD, 0x64, 0x47, 0x80, 0xBF, 0x60, 0x5C,
-        0x22, 0x43, 0x80, 0x61, 0x88, 0xFF, 0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47,
-        0x31, 0x91, 0xB1, 0x84, 0x37, 0xFA, 0x1F, 0x63, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0x37, 0xF0,
-        0x66, 0x44, 0xB1, 0x9C, 0x37, 0xF8, 0x02, 0xA6, 0xFA, 0x1F, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61,
-        0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x00, 0x67, 0x22, 0x02, 0x3D, 0xF1,
-        0x64, 0x44, 0x03, 0xB4, 0x40, 0x42, 0xD0, 0x80, 0xA9, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xB7, 0xF4,
-        0x80, 0x61, 0x02, 0x02, 0xE3, 0x83, 0xEB, 0x83, 0x22, 0x44, 0x88, 0xFF, 0xCC, 0x84, 0xE1, 0x81,
-        0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0x9D, 0x85, 0xA7, 0x83, 0x37, 0xFC, 0x1F, 0x63,
-        0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0xB7, 0xF2, 0x66, 0x44, 0xA5, 0x81, 0xB7, 0xFA, 0x02, 0xA6,
-        0xFA, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x2D, 0x60, 0x1A, 0x64, 0xA0, 0xD1, 0xA0, 0xF9,
-        0x64, 0x40, 0x01, 0x2A, 0x4E, 0x00, 0x27, 0xF2, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46,
-        0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF,
-        0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3, 0x08, 0xFE, 0x60, 0x43,
-        0x61, 0x46, 0x01, 0x03, 0x2A, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x37, 0xF2, 0x80, 0x60, 0x30, 0x7C,
-        0xB0, 0x84, 0xA2, 0xDA, 0x4E, 0x61, 0x6E, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46,
-        0x58, 0xD8, 0xFB, 0x1F, 0x88, 0x64, 0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8,
-        0xFB, 0x1F, 0xD9, 0x81, 0x98, 0x64, 0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8,
-        0xFB, 0x1F, 0xD9, 0x81, 0xAE, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8,
-        0xFB, 0x1F, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0x2D, 0x60, 0x1A, 0x64, 0xA0, 0xD1, 0xA0, 0xF9, 0x64, 0x40, 0x01, 0x2A, 0x31, 0x00,
-        0x27, 0xF2, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41,
-        0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02,
-        0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF,
-        0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x0D, 0x00,
-        0x43, 0x4B, 0xAB, 0x46, 0x37, 0xF2, 0x80, 0x60, 0x30, 0x61, 0x9D, 0x85, 0xA4, 0x84, 0xA2, 0xDA,
-        0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0xA2, 0xFF, 0x46, 0x45, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0x00, 0xF4,
-        0x01, 0xF2, 0x66, 0x5C, 0x25, 0x46, 0x56, 0x02, 0x70, 0x27, 0x54, 0x00, 0x12, 0x64, 0x03, 0xFA,
-        0x04, 0xF8, 0x0E, 0xF2, 0x87, 0xFC, 0x8D, 0xFC, 0x8E, 0xFC, 0xDA, 0x82, 0x16, 0x61, 0x00, 0x63,
-        0xC9, 0x81, 0x5A, 0xDC, 0xFD, 0x02, 0x60, 0x40, 0xF0, 0x3B, 0x16, 0x00, 0x32, 0x44, 0xAF, 0xF3,
-        0x01, 0xB0, 0xFA, 0xA0, 0x08, 0x24, 0x2C, 0x05, 0xDC, 0x83, 0xF0, 0x67, 0x0E, 0xFA, 0x24, 0x60,
-        0x5E, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xAF, 0xFD, 0x2B, 0xFF,
-        0xFE, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x4F, 0x00, 0xB0, 0xF3, 0x06, 0x65, 0xD4, 0x80, 0xDC, 0x83,
-        0x17, 0x05, 0xB0, 0xFD, 0x98, 0xFE, 0x04, 0x04, 0x00, 0x7F, 0x08, 0x7E, 0x0E, 0xFA, 0x3B, 0xFF,
-        0x24, 0x60, 0x52, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0x0E, 0xF2,
-        0x2B, 0xFF, 0x60, 0x40, 0x08, 0x26, 0xF7, 0xFE, 0xFD, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x32, 0x00,
-        0xAC, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0, 0xFF, 0xFF, 0x0D, 0x04, 0x24, 0x60, 0x6A, 0x64, 0x2B, 0xDB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFC, 0x64, 0x3B, 0x42,
-        0x4A, 0xDB, 0x21, 0x00, 0x46, 0x45, 0x00, 0x64, 0x2B, 0xDB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18, 0x70, 0x67,
-        0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03, 0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46, 0x25, 0x44, 0x80, 0xFC,
-        0x05, 0xFA, 0xAF, 0x60, 0x58, 0x4E, 0x95, 0x78, 0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF, 0xFF, 0x64,
-        0x3B, 0x42, 0x4A, 0xDB, 0xD4, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x58, 0x64,
-        0x40, 0x47, 0x58, 0x4F, 0x0D, 0x00, 0x24, 0x60, 0x4C, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x18, 0x00,
-        0x24, 0x60, 0x64, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x03, 0x00, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF,
-        0x27, 0xD5, 0x0E, 0xF2, 0x0B, 0x18, 0x60, 0x40, 0x01, 0x2A, 0x08, 0x00, 0x24, 0x60, 0x7A, 0x64,
-        0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0xF2, 0x01, 0x2F, 0x58, 0xFF, 0xFF,
-        0x27, 0xD5, 0x0E, 0xF2, 0x14, 0x18, 0x60, 0x40, 0x01, 0x2A, 0x11, 0x00, 0x02, 0xF0, 0x09, 0x60,
-        0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF, 0xB0, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0xB0, 0xFB, 0x24, 0x60,
-        0x7A, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0xE9, 0x01, 0x2F, 0x58,
-        0xFF, 0xFF, 0xFB, 0x64, 0x3A, 0x42, 0x4A, 0xDB, 0xA2, 0xFF, 0xB3, 0xF3, 0xAF, 0xF3, 0xCC, 0x80,
-        0xFD, 0xA0, 0x01, 0x14, 0x1E, 0x05, 0xAE, 0x60, 0x58, 0x4D, 0x9B, 0x78, 0xFF, 0xFF, 0xA2, 0xFF,
-        0x18, 0x03, 0xF0, 0x67, 0x0E, 0xFA, 0x24, 0x60, 0x7A, 0x62, 0x24, 0x60, 0x5E, 0x64, 0xA2, 0xDB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF6, 0x64, 0x3A, 0x42,
-        0x4A, 0xDB, 0xB3, 0xF3, 0xAF, 0xF3, 0xCC, 0x83, 0xDC, 0x84, 0x01, 0x15, 0xB3, 0xFD, 0xAF, 0xFB,
-        0xD4, 0xFE, 0xB2, 0xF3, 0xB0, 0xF3, 0x00, 0xA8, 0xB1, 0xF1, 0x03, 0x02, 0xD0, 0x80, 0xFF, 0xFF,
-        0x27, 0x05, 0xAE, 0x60, 0x58, 0x4D, 0x9B, 0x78, 0xFF, 0xFF, 0xA2, 0xFF, 0x21, 0x03, 0x00, 0x63,
-        0xB2, 0xF3, 0x0E, 0xFC, 0xCC, 0x84, 0xFF, 0x3A, 0xB2, 0xFB, 0x98, 0xFE, 0x03, 0x04, 0x08, 0xBB,
-        0x0E, 0xFC, 0x3B, 0xFF, 0x24, 0x60, 0x7A, 0x62, 0x24, 0x60, 0x52, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF7, 0x64, 0x3A, 0x42, 0x4A, 0xDB,
-        0xB0, 0xF3, 0x0E, 0xF2, 0xDC, 0x83, 0x08, 0xB0, 0xB0, 0xFD, 0x08, 0x28, 0xF7, 0xFE, 0xD4, 0xFE,
-        0xA3, 0xFF, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0xB9, 0xFE, 0x13, 0xFF, 0x24, 0x40, 0x80, 0x2B,
-        0x0B, 0x00, 0xA2, 0xFF, 0x25, 0x46, 0x09, 0xF4, 0x0E, 0xF2, 0x05, 0x18, 0x08, 0xBC, 0x0E, 0xFA,
-        0xFF, 0xFF, 0xF7, 0xFE, 0x01, 0x00, 0xD8, 0xFE, 0xA3, 0xFF, 0x25, 0x46, 0x3E, 0xF2, 0x00, 0xF4,
-        0x08, 0xF0, 0x25, 0x46, 0x06, 0xB4, 0xFF, 0x7F, 0x10, 0xBC, 0x06, 0x26, 0xFD, 0x7F, 0x0E, 0xFA,
-        0x3E, 0xF2, 0x3F, 0xF2, 0x60, 0x41, 0x08, 0x2A, 0x64, 0x47, 0x3F, 0xFA, 0x60, 0x45, 0x27, 0x60,
-        0xFC, 0x62, 0xA2, 0xD3, 0xA3, 0xFC, 0xAB, 0xFC, 0x91, 0xFC, 0xD4, 0x80, 0xC0, 0x60, 0xE1, 0x65,
-        0xA5, 0x80, 0x01, 0x04, 0x07, 0x03, 0x23, 0xF0, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x2E, 0x60,
-        0xC5, 0x78, 0xFF, 0xFF, 0x2F, 0x60, 0x58, 0x4F, 0x0F, 0x78, 0xFF, 0xFF, 0x14, 0x04, 0x23, 0xF0,
-        0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xB8, 0xF1, 0x27, 0x60, 0x96, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x02, 0x00,
-        0x20, 0x60, 0x00, 0x75, 0x83, 0x00, 0xDC, 0xF3, 0xA9, 0xF1, 0x07, 0xB4, 0x64, 0x43, 0xFD, 0xA0,
-        0x2C, 0xF2, 0x71, 0x02, 0x01, 0xB0, 0x64, 0x43, 0x78, 0x02, 0x2E, 0xF2, 0x1C, 0x60, 0xBA, 0x65,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2,
-        0x16, 0x18, 0x61, 0x46, 0x2E, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46,
-        0x2D, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2C, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3,
-        0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x51, 0x03, 0x63, 0x46, 0x80, 0xF6, 0x25, 0x46, 0x43, 0x18,
-        0x2E, 0xF2, 0x66, 0x41, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xA9, 0xF1, 0xE0, 0x84,
-        0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44,
-        0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA,
-        0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB,
-        0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46,
-        0x43, 0x4B, 0x2C, 0xF0, 0xAD, 0xF0, 0x2E, 0xF2, 0xAB, 0x46, 0x03, 0xF8, 0x84, 0xF8, 0x05, 0xFA,
-        0x03, 0x64, 0x06, 0xFA, 0xAB, 0x46, 0x1E, 0x60, 0xBC, 0x61, 0xA1, 0xD3, 0x1E, 0x60, 0xFE, 0x7C,
-        0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0x49, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xA1, 0xDB, 0x0A, 0x00, 0xDC, 0xF3, 0x02, 0xA3, 0xFE, 0xA0, 0xF9, 0xA0, 0x01, 0x06,
-        0x04, 0x02, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x07, 0xFC, 0x23, 0xF2, 0xFF, 0xFF,
-        0x27, 0x1B, 0x27, 0x60, 0xFE, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x00, 0x3A, 0x10, 0x00,
-        0x24, 0x60, 0x7A, 0x62, 0x24, 0x60, 0x22, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xC1, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x1F, 0x00,
-        0x24, 0x60, 0x7A, 0x62, 0x24, 0x60, 0x34, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xC8, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x0F, 0x00,
-        0x24, 0x60, 0x7A, 0x62, 0x24, 0x60, 0x46, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xCE, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x25, 0x60,
-        0x11, 0x78, 0xFF, 0xFF, 0xCB, 0x84, 0xC9, 0x83, 0xFF, 0xFF, 0x08, 0x04, 0x58, 0xD1, 0xA5, 0xD8,
-        0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x2F, 0x58, 0xFF, 0xFF,
-        0x3E, 0xF2, 0xCC, 0xF1, 0x08, 0xB0, 0x19, 0xF8, 0x3B, 0x02, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF3,
-        0x30, 0xFA, 0x60, 0x45, 0xED, 0xF3, 0x31, 0xFA, 0x46, 0x4A, 0x00, 0xF4, 0x60, 0x43, 0x05, 0xF2,
-        0x06, 0xF2, 0xD0, 0x80, 0x07, 0xF0, 0x05, 0x02, 0xD4, 0x80, 0xD3, 0x80, 0x02, 0x02, 0xDC, 0xF3,
-        0x03, 0x03, 0xAA, 0x46, 0x42, 0xFE, 0x25, 0x00, 0x60, 0x40, 0x03, 0x2A, 0x10, 0x00, 0x02, 0xF2,
-        0x03, 0xF0, 0x04, 0xF2, 0x60, 0x43, 0xAA, 0x46, 0x2C, 0xFC, 0x2D, 0xF8, 0x2E, 0xFA, 0x81, 0xF1,
-        0x32, 0xF8, 0x82, 0xF1, 0x33, 0xF8, 0x83, 0xF1, 0x34, 0xF8, 0x08, 0x64, 0x10, 0x00, 0x02, 0xF2,
-        0x03, 0xF0, 0x04, 0xF2, 0x60, 0x43, 0xAA, 0x46, 0x32, 0xFC, 0x33, 0xF8, 0x34, 0xFA, 0x81, 0xF1,
-        0x2C, 0xF8, 0x82, 0xF1, 0x2D, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x01, 0x60, 0x08, 0x64, 0x2A, 0xFA,
-        0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x03, 0x02, 0x42, 0xFF,
-        0x47, 0xFF, 0xA1, 0xFF, 0x80, 0xFF, 0x90, 0xFF, 0x98, 0xFF, 0x88, 0xFF, 0x84, 0xE1, 0xFF, 0xFF,
-        0x00, 0x00, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E, 0x2D, 0x60, 0x9C, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0x01, 0x1B, 0xF7, 0x01, 0x87, 0xFF, 0x20, 0x44, 0x80, 0xFF, 0x60, 0x40, 0x80, 0x26, 0xF1, 0x01,
-        0xC0, 0x60, 0x40, 0xEC, 0xC0, 0x60, 0x00, 0xED, 0xC0, 0x60, 0x80, 0xEE, 0xAC, 0x4F, 0xBF, 0xB4,
-        0xA0, 0x5C, 0x2D, 0x60, 0x1A, 0x62, 0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x02, 0x27, 0x06, 0x00,
-        0x28, 0xE2, 0x24, 0xE2, 0xBF, 0xFF, 0xFF, 0xFF, 0x75, 0x40, 0x10, 0x00, 0x28, 0xE2, 0x24, 0xE2,
-        0x00, 0x60, 0x00, 0x61, 0x00, 0x60, 0x94, 0xE0, 0xBF, 0xFF, 0xFF, 0xFF, 0xA1, 0x50, 0x75, 0x40,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0xE0, 0x2D, 0x60, 0x9C, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60, 0x39, 0xE2, 0x04, 0x60, 0x00, 0x7A, 0xAC, 0x4F, 0x40, 0xBC,
-        0x00, 0x7F, 0xA0, 0x5C, 0xC0, 0x60, 0xD9, 0xEC, 0xC0, 0x60, 0x0F, 0xED, 0xC0, 0x60, 0x8F, 0xEE,
-        0xAE, 0x4F, 0x04, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x26, 0x61, 0xCD, 0x81, 0xFF, 0xFF, 0xFD, 0x02,
-        0xAE, 0x4F, 0xFB, 0xB4, 0xA0, 0x5E, 0xAD, 0x01, 0x80, 0xFF, 0x90, 0xFF, 0x98, 0xFF, 0x2F, 0x60,
-        0x54, 0x63, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44,
-        0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44,
-        0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44,
-        0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44,
-        0xBD, 0xDB, 0x2F, 0x60, 0x48, 0x64, 0xA0, 0xDD, 0x30, 0x60, 0x74, 0x63, 0x2F, 0x60, 0x4A, 0x64,
-        0xA0, 0xDD, 0x2F, 0x60, 0x4C, 0x63, 0x30, 0x44, 0xA3, 0xDB, 0x2F, 0x60, 0x4E, 0x63, 0x31, 0x44,
-        0xA3, 0xDB, 0x2F, 0x60, 0x50, 0x63, 0x32, 0x44, 0xA3, 0xDB, 0x2F, 0x60, 0x52, 0x63, 0x33, 0x44,
-        0xA3, 0xDB, 0x81, 0xFF, 0x91, 0xFF, 0x58, 0x51, 0x4B, 0x00, 0x82, 0xFF, 0x92, 0xFF, 0x58, 0x51,
-        0x47, 0x00, 0x83, 0xFF, 0x93, 0xFF, 0x58, 0x51, 0x43, 0x00, 0x84, 0xFF, 0x94, 0xFF, 0x58, 0x51,
-        0x3F, 0x00, 0x85, 0xFF, 0x95, 0xFF, 0x58, 0x51, 0x3B, 0x00, 0x86, 0xFF, 0x96, 0xFF, 0x58, 0x51,
-        0x37, 0x00, 0x87, 0xFF, 0x97, 0xFF, 0x58, 0x51, 0x33, 0x00, 0x80, 0xFF, 0x90, 0xFF, 0x99, 0xFF,
-        0x2F, 0x60, 0x48, 0x64, 0xA0, 0xD1, 0x30, 0x44, 0x64, 0x43, 0xBD, 0xDB, 0x31, 0x44, 0xBD, 0xDB,
-        0x32, 0x44, 0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB, 0x35, 0x44, 0xBD, 0xDB,
-        0x36, 0x44, 0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB, 0x39, 0x44, 0xBD, 0xDB,
-        0x3A, 0x44, 0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB, 0x3D, 0x44, 0xBD, 0xDB,
-        0x3E, 0x44, 0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0xEF, 0x60, 0x48, 0x64, 0x0A, 0xFB, 0x40, 0x21,
-        0xFE, 0x01, 0x80, 0xFF, 0x90, 0xFF, 0x98, 0xFF, 0x88, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E,
-        0x42, 0x50, 0x40, 0x53, 0x2F, 0x60, 0x4A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x52, 0x33, 0x44,
-        0x32, 0x42, 0xA2, 0xDB, 0xDA, 0x82, 0xA2, 0xDD, 0xDA, 0x83, 0x65, 0x44, 0xBD, 0xDB, 0x61, 0x44,
-        0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0xBD, 0xD9, 0x30, 0x44, 0xBD, 0xDB, 0x99, 0xFF, 0xA4, 0x4C,
-        0xBD, 0xDB, 0xA5, 0x4C, 0xBD, 0xDB, 0xA0, 0x4C, 0xBD, 0xDB, 0xA1, 0x4C, 0xBD, 0xDB, 0x98, 0xFF,
-        0x2F, 0x60, 0x4A, 0x64, 0xA0, 0xDD, 0x2F, 0x60, 0x4C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x50,
-        0x2F, 0x60, 0x50, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x52, 0x2F, 0x60, 0x52, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0x40, 0x53, 0x31, 0x41, 0x2F, 0x60, 0x4E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x40, 0x51,
-        0x2F, 0x60, 0x48, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x43, 0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44,
-        0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44,
-        0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44,
-        0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44,
-        0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB, 0x2F, 0x60, 0x48, 0x64, 0xA0, 0xDD,
-        0x61, 0x58, 0xFF, 0xFF, 0x24, 0xE2, 0x2D, 0xF3, 0x2C, 0xF3, 0x00, 0xBD, 0xCC, 0x84, 0x08, 0x03,
-        0x2C, 0xFB, 0x06, 0x02, 0x65, 0x44, 0x2C, 0xFB, 0x8A, 0xFF, 0x80, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0xF2, 0xF3, 0x31, 0x40, 0x01, 0x2A, 0x44, 0x00, 0x60, 0x43, 0x04, 0xB0, 0x02, 0xB0, 0x08, 0x24,
-        0x16, 0x02, 0x29, 0x44, 0xFF, 0xFF, 0x00, 0xA8, 0xCC, 0x81, 0x0E, 0x03, 0x41, 0x49, 0x37, 0x02,
-        0x63, 0x40, 0x08, 0x2A, 0x09, 0x00, 0xF7, 0xB3, 0x31, 0x60, 0x1E, 0x7C, 0xA4, 0xD1, 0xAD, 0x4F,
-        0xFD, 0xB4, 0xA0, 0x5D, 0x44, 0x49, 0x2B, 0x00, 0x63, 0x40, 0x02, 0x2A, 0x14, 0x00, 0x31, 0x60,
-        0x20, 0x64, 0xA0, 0xD3, 0x31, 0x60, 0x1C, 0x7C, 0xA4, 0xDB, 0x40, 0x49, 0x31, 0x60, 0x22, 0x64,
-        0xA0, 0xD3, 0x31, 0x60, 0x1E, 0x7C, 0xA4, 0xDB, 0x0C, 0xBB, 0xFD, 0xB3, 0xAD, 0x4F, 0x02, 0xBC,
-        0x00, 0x7F, 0xA0, 0x5D, 0x14, 0x00, 0x31, 0x60, 0x24, 0x64, 0xA0, 0xD3, 0x31, 0x60, 0x1C, 0x7C,
-        0x0E, 0x18, 0xA4, 0xDB, 0x40, 0x49, 0x31, 0x60, 0x26, 0x64, 0xA0, 0xD3, 0x31, 0x60, 0x1E, 0x7C,
-        0xA4, 0xDB, 0x08, 0xBB, 0xFB, 0xB3, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0xF2, 0xFD,
-        0x01, 0x60, 0x4E, 0x61, 0xA1, 0xD3, 0x61, 0x43, 0x17, 0x18, 0x58, 0xD3, 0x62, 0x41, 0x03, 0x18,
-        0xCC, 0x84, 0xA1, 0xDB, 0x11, 0x00, 0x49, 0xD3, 0xA3, 0xDB, 0x06, 0xA1, 0xA1, 0xD3, 0x59, 0xD1,
-        0x60, 0x45, 0xA5, 0xD3, 0x59, 0xD1, 0xB0, 0x84, 0xA5, 0xDB, 0x64, 0x44, 0x06, 0x36, 0xCD, 0xFE,
-        0x07, 0x36, 0xD6, 0xFE, 0xE5, 0x01, 0x23, 0x46, 0xB0, 0x60, 0xA4, 0x78, 0xFF, 0xFF, 0x46, 0x43,
-        0x24, 0x60, 0xA4, 0x61, 0xA1, 0xD3, 0x59, 0xD1, 0x06, 0x1B, 0x59, 0xD3, 0x59, 0xD1, 0x03, 0x1B,
-        0x59, 0xD3, 0x59, 0xD1, 0xF0, 0x18, 0x00, 0x63, 0x49, 0xDD, 0x60, 0x40, 0x02, 0x36, 0x11, 0x00,
-        0x03, 0x36, 0x32, 0x00, 0x01, 0x36, 0x08, 0x00, 0x05, 0x3A, 0xEA, 0x01, 0xA4, 0xD3, 0x5A, 0xD3,
-        0x9C, 0x85, 0xA4, 0x84, 0xA2, 0xDB, 0xE4, 0x01, 0x01, 0x60, 0x4E, 0x61, 0x00, 0x64, 0xA1, 0xDB,
-        0xDF, 0x01, 0x31, 0x60, 0x3C, 0x64, 0x40, 0x45, 0x22, 0x00, 0x01, 0x60, 0x4E, 0x66, 0xA6, 0xD3,
-        0x04, 0xA1, 0x60, 0x43, 0xA1, 0xD3, 0xC9, 0x81, 0x60, 0x45, 0x00, 0xBB, 0xA1, 0xDB, 0xBE, 0xD3,
-        0x09, 0x03, 0xD4, 0x84, 0x9C, 0x84, 0xDC, 0x84, 0xFF, 0xFF, 0x04, 0x0E, 0xA3, 0xD1, 0x63, 0x46,
-        0x64, 0x43, 0xF2, 0x01, 0x9C, 0x84, 0xDC, 0x85, 0x49, 0xDD, 0x61, 0x44, 0x00, 0xBB, 0xA6, 0xDB,
-        0x02, 0x03, 0x65, 0x44, 0xBE, 0xDB, 0xBC, 0x01, 0x31, 0x60, 0x17, 0x64, 0x40, 0x45, 0x01, 0x60,
-        0x4E, 0x66, 0xA6, 0xD3, 0xFF, 0xFF, 0xD0, 0x80, 0x0F, 0x18, 0x02, 0x03, 0x60, 0x46, 0xF9, 0x01,
-        0x58, 0xD3, 0xA4, 0xD3, 0x60, 0x45, 0x00, 0x63, 0xA4, 0xDD, 0x05, 0x18, 0x58, 0xD3, 0xFF, 0xFF,
-        0xC4, 0x83, 0xA2, 0xDD, 0xCA, 0x84, 0xA6, 0xDB, 0x25, 0x58, 0x64, 0x41, 0x00, 0x60, 0x46, 0x74,
-        0xCD, 0xE2, 0x04, 0xE1, 0x02, 0x60, 0x00, 0xE1, 0x3F, 0x44, 0x40, 0x26, 0x0B, 0x00, 0x01, 0x2A,
-        0x05, 0x00, 0x42, 0x60, 0x09, 0xE0, 0x60, 0x60, 0x1C, 0xE0, 0x04, 0x00, 0x42, 0x60, 0x09, 0xE0,
-        0x80, 0x60, 0x1C, 0xE0, 0x04, 0x29, 0xFE, 0x01, 0xC4, 0xE2, 0x43, 0x64, 0x3A, 0xDB, 0xA4, 0xF3,
-        0xFF, 0xFF, 0x60, 0x41, 0x3F, 0x44, 0x02, 0x27, 0x84, 0x00, 0x20, 0x2B, 0xFF, 0x01, 0x80, 0xE1,
-        0x95, 0x60, 0x80, 0xE7, 0x61, 0x40, 0x40, 0x2B, 0x0D, 0x00, 0x05, 0x63, 0x32, 0x60, 0x58, 0x4F,
-        0x6A, 0x78, 0xFF, 0xFF, 0x28, 0x63, 0xFF, 0xFF, 0xFE, 0x1F, 0x01, 0x63, 0x32, 0x60, 0x58, 0x4F,
-        0x6A, 0x78, 0xFF, 0xFF, 0xFF, 0xB1, 0xCD, 0x81, 0xE1, 0x85, 0x27, 0x60, 0x3C, 0x64, 0x44, 0xD1,
-        0xFF, 0xFF, 0x64, 0x43, 0x32, 0x60, 0x58, 0x4F, 0x6A, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x00, 0x63,
-        0x32, 0x60, 0x58, 0x4F, 0x6A, 0x78, 0xFF, 0xFF, 0x27, 0x60, 0x58, 0x61, 0x29, 0x60, 0xE8, 0x62,
-        0xA2, 0xD3, 0x45, 0xD1, 0x47, 0xBC, 0xE0, 0x84, 0x62, 0x45, 0x64, 0x5F, 0xE8, 0x83, 0x32, 0x60,
-        0x58, 0x4F, 0x6A, 0x78, 0xFF, 0xFF, 0xA3, 0xF3, 0xCD, 0xE2, 0x60, 0x54, 0x04, 0xE1, 0x04, 0x29,
-        0xFE, 0x01, 0xC4, 0xE2, 0x15, 0x60, 0xA2, 0xE7, 0x38, 0x69, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x16,
-        0xFD, 0x01, 0x01, 0x2A, 0x36, 0x00, 0x03, 0x60, 0x80, 0x7C, 0xA3, 0x83, 0x29, 0x60, 0xE8, 0x62,
-        0xA2, 0xD1, 0x43, 0xBB, 0xB3, 0x83, 0x95, 0x60, 0x80, 0xE7, 0x32, 0x60, 0x58, 0x4F, 0x6A, 0x78,
-        0xFF, 0xFF, 0xE3, 0x83, 0x15, 0x60, 0xA2, 0xE7, 0x38, 0x69, 0xFF, 0xFF, 0x68, 0x41, 0x01, 0x16,
-        0xFD, 0x01, 0x63, 0x47, 0x61, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x00, 0x3A, 0xCC, 0x84, 0x02, 0x00,
-        0x07, 0x3A, 0xDC, 0x84, 0xFF, 0xB4, 0xA5, 0xDB, 0x60, 0x47, 0xE8, 0x84, 0x47, 0x65, 0x29, 0x60,
-        0xE8, 0x62, 0xA2, 0xD3, 0xB4, 0x85, 0xB4, 0x83, 0x80, 0xE1, 0x95, 0x60, 0x80, 0xE7, 0x32, 0x60,
-        0x58, 0x4F, 0x6A, 0x78, 0xFF, 0xFF, 0xA3, 0xF3, 0xCD, 0xE2, 0x60, 0x54, 0x04, 0x29, 0xFE, 0x01,
-        0xC4, 0xE2, 0xA4, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0x2B, 0x04, 0x00, 0x32, 0x60, 0x43, 0x78,
-        0xFF, 0xFF, 0xFF, 0x01, 0xA4, 0xF3, 0x80, 0xE1, 0xCC, 0x84, 0xE0, 0x85, 0x15, 0x60, 0xA2, 0xE7,
-        0x26, 0x60, 0x78, 0x64, 0x58, 0x4F, 0x4F, 0x00, 0x26, 0x60, 0x94, 0x64, 0x58, 0x4F, 0x4B, 0x00,
-        0x26, 0x60, 0xB0, 0x64, 0x58, 0x4F, 0x47, 0x00, 0x26, 0x60, 0xCC, 0x64, 0x58, 0x4F, 0x43, 0x00,
-        0x26, 0x60, 0xE8, 0x64, 0x58, 0x4F, 0x3F, 0x00, 0x27, 0x60, 0x04, 0x64, 0x58, 0x4F, 0x3B, 0x00,
-        0x27, 0x60, 0x20, 0x64, 0x58, 0x4F, 0x37, 0x00, 0x01, 0x68, 0xFF, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x3F, 0x44, 0x20, 0x27, 0x00, 0x00, 0x3F, 0x40, 0x40, 0x26, 0x08, 0x00, 0x00, 0x60,
-        0x18, 0x64, 0x00, 0x60, 0x00, 0x65, 0x94, 0x84, 0xA0, 0x50, 0x1D, 0x60, 0x19, 0xE2, 0xC4, 0xE2,
-        0x00, 0x63, 0xA3, 0xFD, 0x32, 0x7B, 0x4D, 0xE2, 0xBF, 0xFE, 0xC4, 0xE2, 0x41, 0xFF, 0xE0, 0xFE,
-        0xE1, 0xFE, 0xE2, 0xFE, 0x43, 0xFF, 0x44, 0xFF, 0x46, 0xFF, 0xA5, 0xF3, 0x62, 0xFF, 0x60, 0x40,
-        0x05, 0x36, 0x2D, 0xFF, 0x07, 0x36, 0xD5, 0xFE, 0x08, 0xE1, 0x88, 0x60, 0x85, 0x71, 0x8D, 0xE2,
-        0xA2, 0x60, 0x16, 0x78, 0xFF, 0xFF, 0x50, 0xEC, 0x63, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x40, 0xEC, 0x2F, 0x58, 0xFF, 0xFF, 0x44, 0xD3, 0x80, 0x7C, 0x60, 0x48, 0x60, 0x47, 0x00, 0x7F,
-        0xB0, 0x8A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0x42, 0xFF, 0x40, 0xFF,
-        0xDD, 0xFE, 0xAD, 0x4F, 0x00, 0x7F, 0x01, 0xBC, 0xA0, 0x5D, 0x00, 0xEE, 0x19, 0x61, 0xCD, 0x81,
-        0xFF, 0xFF, 0xFD, 0x02, 0x43, 0x45, 0x20, 0x44, 0x60, 0xBC, 0x40, 0x40, 0x02, 0x60, 0xEE, 0x63,
-        0x7F, 0xF3, 0xA3, 0xFD, 0x40, 0x7F, 0xA4, 0xFB, 0x05, 0x64, 0xA5, 0xFB, 0xDF, 0xFE, 0x19, 0xFF,
-        0x24, 0x60, 0xDD, 0x64, 0x3F, 0x40, 0x01, 0x2B, 0x02, 0x00, 0x32, 0x60, 0xA2, 0x64, 0xA6, 0xFB,
-        0xBB, 0x60, 0x20, 0x78, 0xFF, 0xFF, 0x04, 0xEE, 0xAD, 0x4F, 0x00, 0x7F, 0x01, 0xBC, 0xA0, 0x5D,
-        0x19, 0x61, 0xCD, 0x81, 0xFF, 0xFF, 0xFD, 0x02, 0xAD, 0x4F, 0x00, 0x7F, 0x01, 0xBC, 0xA0, 0x5D,
-        0x00, 0xEE, 0x15, 0x60, 0xA2, 0xE7, 0x25, 0x60, 0x02, 0x63, 0x25, 0x60, 0x76, 0x65, 0xDF, 0xFE,
-        0x80, 0xE1, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47, 0x80, 0xBC, 0x00, 0x7F, 0x60, 0x4A,
-        0xD7, 0x80, 0xA1, 0xFF, 0xFF, 0xFF, 0xF5, 0x02, 0x25, 0x60, 0x76, 0x63, 0x26, 0x60, 0x78, 0x65,
-        0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47, 0x80, 0xBC, 0x00, 0x7F, 0x60, 0x4A, 0xD7, 0x80,
-        0xA1, 0xFF, 0xFF, 0xFF, 0xF5, 0x02, 0x3F, 0x40, 0x20, 0x2B, 0x00, 0x00, 0x01, 0x68, 0xFF, 0x6A,
-        0xBF, 0xFE, 0x33, 0x60, 0x8A, 0x78, 0xFF, 0xFF, 0x3F, 0x40, 0x20, 0x2B, 0xAD, 0x00, 0x01, 0x16,
-        0xFE, 0x01, 0x38, 0x69, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x2A, 0xA5, 0x00, 0x27, 0x60,
-        0xB4, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x7F, 0xF1,
-        0x80, 0x60, 0x00, 0x64, 0xB0, 0x9C, 0x01, 0x00, 0x7F, 0xF1, 0xDD, 0xFE, 0xAD, 0x4F, 0x00, 0x7F,
-        0x01, 0xBC, 0xA0, 0x5D, 0x00, 0xEE, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x02, 0x60,
-        0xEE, 0x64, 0xA3, 0xFB, 0xA4, 0xF9, 0x05, 0x64, 0xA5, 0xFB, 0xDF, 0xFE, 0x19, 0xFF, 0x83, 0x00,
-        0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x43, 0x45, 0xA4, 0xD1, 0xDA, 0x83, 0xC3, 0x85, 0x80, 0xE1,
-        0xDF, 0xFE, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47, 0x80, 0xBC, 0x00, 0x7F, 0x60, 0x4A,
-        0xD7, 0x80, 0xA1, 0xFF, 0xF6, 0x02, 0xBF, 0xFE, 0x6E, 0x00, 0x3F, 0x40, 0x40, 0x26, 0x13, 0x00,
-        0x0B, 0x60, 0xF8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x10, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xF8, 0xA2,
-        0xA2, 0xD1, 0x0A, 0x60, 0x19, 0x64, 0x90, 0x84, 0xA0, 0x52, 0x06, 0xA2, 0xA2, 0xD1, 0x46, 0x60,
-        0x09, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xAD, 0x4F, 0xFE, 0xB4, 0xA0, 0x5D, 0xAD, 0x4F, 0xFD, 0xB4,
-        0xA0, 0x5D, 0x02, 0xEE, 0xBD, 0xFE, 0x50, 0x00, 0x80, 0xE1, 0x01, 0x16, 0xFE, 0x01, 0x64, 0x48,
-        0x92, 0x6A, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x40, 0x27, 0x60, 0xA2, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x3F, 0x00, 0x80, 0xE1, 0x01, 0x16, 0xFE, 0x01,
-        0x01, 0x68, 0xA7, 0x6A, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x40, 0x36, 0x00, 0x20, 0x44, 0x20, 0xBC,
-        0x40, 0x40, 0x80, 0xE1, 0x64, 0x46, 0x01, 0x16, 0xFE, 0x01, 0x21, 0x69, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x68, 0x5E, 0x01, 0x16, 0xFE, 0x01, 0x22, 0x69, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x5F, 0x26, 0xFA,
-        0x1C, 0xF2, 0x01, 0x16, 0xFE, 0x01, 0x3A, 0x69, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x5F, 0x27, 0xFA,
-        0x1B, 0x00, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x43, 0x45, 0xBE, 0xD5, 0xA4, 0xD2, 0x5A, 0x86,
-        0xEF, 0xA0, 0x11, 0x61, 0x01, 0x06, 0x60, 0x41, 0x24, 0x60, 0xE0, 0x63, 0x80, 0xE1, 0xBD, 0xD3,
-        0x26, 0x42, 0x01, 0x16, 0xFE, 0x01, 0x60, 0x49, 0xA1, 0xFF, 0xFF, 0xFF, 0x68, 0x44, 0xCD, 0x81,
-        0xA2, 0xDA, 0x5A, 0x86, 0xF4, 0x02, 0x25, 0x43, 0x21, 0xE1, 0x00, 0x64, 0xBF, 0xDB, 0x20, 0x44,
-        0x20, 0x2A, 0x07, 0x00, 0x07, 0xB4, 0x04, 0x36, 0xC3, 0xFE, 0x06, 0x36, 0xCC, 0xFE, 0x07, 0x36,
-        0xD5, 0xFE, 0x20, 0x44, 0xD8, 0xB4, 0x40, 0x40, 0x20, 0x44, 0x40, 0x2A, 0x07, 0x00, 0x9F, 0xFE,
-        0x1E, 0x05, 0xBF, 0xB4, 0x40, 0x40, 0xA6, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0x60, 0x80, 0x63,
-        0xBD, 0xD3, 0x02, 0x61, 0x17, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x02, 0x61, 0x13, 0x1B, 0x04, 0xA3,
-        0xBD, 0xD3, 0x02, 0x61, 0x0F, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x04, 0x61, 0x0B, 0x1B, 0x04, 0xA3,
-        0xBD, 0xD3, 0x06, 0x61, 0x07, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x07, 0x61, 0x03, 0x1B, 0xBB, 0x60,
-        0x20, 0x78, 0xFF, 0xFF, 0xA3, 0xD1, 0x40, 0x44, 0x20, 0x44, 0x07, 0xB5, 0xD4, 0x85, 0x35, 0x80,
-        0x24, 0x45, 0x24, 0x60, 0xBC, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x80, 0xE1, 0x43, 0x45,
-        0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x64, 0x43, 0xBD, 0xD3, 0xBD, 0xD1, 0x40, 0x44, 0x10, 0x27,
-        0x10, 0x00, 0xFF, 0x60, 0x7F, 0x65, 0x15, 0x60, 0xA2, 0x64, 0x24, 0x40, 0x08, 0x2B, 0xA4, 0x84,
-        0xA0, 0x57, 0xFF, 0xFF, 0x64, 0x49, 0xFF, 0xFF, 0x68, 0x44, 0x01, 0x16, 0xFD, 0x01, 0x00, 0x7F,
-        0xA3, 0xDB, 0xA1, 0x01, 0x80, 0xE1, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x64, 0x43,
-        0xBD, 0xD3, 0xBD, 0xD1, 0x40, 0x44, 0x10, 0x2B, 0x11, 0x00, 0xA3, 0xD3, 0xFF, 0xFF, 0x15, 0x60,
-        0x80, 0xE7, 0x24, 0x40, 0x07, 0x27, 0x02, 0x00, 0x50, 0xEC, 0x00, 0x00, 0x60, 0x4A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x24, 0x40, 0x20, 0x2B, 0x40, 0xEC, 0x0F, 0x00, 0x15, 0x60, 0x22, 0x64,
-        0x24, 0x40, 0x08, 0x27, 0x80, 0xBC, 0xA3, 0xD3, 0xA0, 0x57, 0x60, 0x48, 0x64, 0x44, 0x80, 0xBC,
-        0xFF, 0xB4, 0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x75, 0x01, 0x42, 0x6F, 0x6F, 0x74,
-        0x63, 0x6F, 0x64, 0x65, 0x20, 0x21, 0x21, 0x20, 0x20, 0x00, 0x53, 0x54, 0x41, 0x2F, 0x41, 0x50,
-        0x20, 0x46, 0x75, 0x6E, 0x63, 0x27, 0x73, 0x00, 0x1F, 0x00, 0x03, 0x00, 0x02, 0x00, 0x24, 0x00,
-        0x00, 0x00, 0x04, 0x00, 0x02, 0x00, 0x02, 0x00, 0x05, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00,
-        0x06, 0x00, 0x07, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x07, 0x00,
-        0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00,
-        0x02, 0x00, 0x40, 0x00, 0x32, 0x00, 0x32, 0x00, 0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x40, 0x00,
-        0x32, 0x00, 0x36, 0x00, 0x0A, 0x00, 0x02, 0x00, 0x06, 0x00, 0x40, 0x00, 0x3B, 0x00, 0x40, 0x00,
-        0x17, 0x00, 0x07, 0x00, 0x07, 0x00, 0x4A, 0x00, 0x40, 0x00, 0x4A, 0x00, 0x1E, 0x00, 0x0C, 0x00,
-        0x08, 0x00, 0x57, 0x00, 0x4D, 0x00, 0x57, 0x00, 0x2B, 0x00, 0x19, 0x00, 0x08, 0x00, 0x5D, 0x00,
-        0x53, 0x00, 0x5D, 0x00, 0x31, 0x00, 0x1F, 0x00, 0x08, 0x00, 0xA9, 0xF3, 0x21, 0x61, 0x00, 0x7C,
-        0x01, 0x00, 0x00, 0xFA, 0x60, 0x46, 0xFE, 0x63, 0xA3, 0xD8, 0xFE, 0x1F, 0xCD, 0x81, 0xD8, 0x84,
-        0xF8, 0x02, 0x21, 0x61, 0x80, 0x67, 0x40, 0x4A, 0xA9, 0xF5, 0x14, 0x60, 0x02, 0x65, 0x01, 0x7C,
-        0x07, 0x18, 0x2A, 0x43, 0x02, 0xFC, 0x5F, 0x8A, 0x8E, 0xF8, 0x70, 0xF8, 0x00, 0xF4, 0xF8, 0x01,
-        0x2E, 0x58, 0xFF, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x0A, 0x00, 0x42, 0x60, 0x09, 0xE0, 0x3F, 0x40,
-        0x01, 0x2A, 0x03, 0x00, 0x60, 0x60, 0x1C, 0xE0, 0x02, 0x00, 0x80, 0x60, 0x1C, 0xE0, 0x40, 0xEC,
-        0x00, 0xED, 0x02, 0xEE, 0x80, 0x60, 0x58, 0xEC, 0x80, 0x60, 0x00, 0xED, 0x80, 0x60, 0x82, 0xEE,
-        0xC0, 0x60, 0x59, 0xEC, 0xC0, 0x60, 0x07, 0xED, 0xAD, 0x4F, 0xFE, 0xB4, 0xA0, 0x5D, 0x00, 0xF3,
-        0x28, 0xFB, 0x40, 0x44, 0x2F, 0x60, 0x52, 0x7C, 0x20, 0xF9, 0xA2, 0x60, 0x00, 0x7C, 0x21, 0xF9,
-        0xA2, 0x60, 0xE0, 0x7C, 0x22, 0xF9, 0x18, 0x60, 0x97, 0x7C, 0x23, 0xF9, 0x18, 0x60, 0xA8, 0x7C,
-        0x24, 0xF9, 0x18, 0x60, 0xD2, 0x7C, 0x25, 0xF9, 0x18, 0x60, 0xE3, 0x7C, 0x26, 0xF9, 0x91, 0x60,
-        0x00, 0xE8, 0x28, 0xE8, 0x44, 0x60, 0x02, 0xE6, 0x10, 0x67, 0x40, 0x52, 0x10, 0x60, 0x04, 0xE6,
-        0x08, 0x60, 0x00, 0x63, 0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3, 0xBD, 0xD3, 0x02, 0xA8, 0xD4, 0x80,
-        0x4A, 0x02, 0x49, 0x02, 0xDB, 0x83, 0xFA, 0x60, 0x27, 0x65, 0x5B, 0xD3, 0xBF, 0xD1, 0x1A, 0x18,
-        0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xDB, 0x83, 0xD3, 0x83, 0xD3, 0x86, 0x64, 0x41,
-        0xCD, 0x81, 0xA6, 0xD1, 0xDA, 0x86, 0x25, 0x60, 0x02, 0x65, 0x00, 0x60, 0x72, 0x63, 0xA5, 0xD3,
-        0xDA, 0x85, 0x90, 0x84, 0xFF, 0x27, 0x02, 0x00, 0xA2, 0xD9, 0x01, 0x00, 0xF8, 0x1F, 0xCD, 0x81,
-        0xFF, 0xFF, 0xEF, 0x02, 0x08, 0x60, 0x06, 0x63, 0xFA, 0x60, 0x28, 0x65, 0x5B, 0xD3, 0xBF, 0xD1,
-        0x0B, 0x18, 0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xBF, 0xD3, 0x29, 0x60, 0xE8, 0x62,
-        0x0E, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0xA2, 0xDB, 0x08, 0x60, 0x06, 0x63, 0xFD, 0x60, 0x0C, 0x65,
-        0x5B, 0xD3, 0xBF, 0xD1, 0x10, 0x18, 0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xFA, 0xA3,
-        0xA3, 0xD3, 0x02, 0x60, 0x00, 0x65, 0xF7, 0xA0, 0xFC, 0xA0, 0x0D, 0x05, 0x04, 0x05, 0x78, 0x43,
-        0x02, 0x61, 0x24, 0x60, 0xDD, 0x78, 0x21, 0x60, 0x00, 0x65, 0x3F, 0x43, 0x3F, 0x43, 0x21, 0x60,
-        0x00, 0x65, 0xC0, 0x60, 0x8F, 0xEE, 0xB7, 0x84, 0x40, 0x5F, 0x00, 0x60, 0x30, 0xE2, 0x00, 0x60,
-        0x50, 0xE2, 0x00, 0x60, 0x79, 0xE2, 0x00, 0x60, 0x90, 0xE2, 0x01, 0x60, 0xD0, 0xE2, 0x01, 0x60,
-        0xF0, 0xE2, 0x01, 0x60, 0xB0, 0xE2, 0x26, 0x64, 0x35, 0xFB, 0x01, 0x60, 0x30, 0x64, 0x0A, 0xA4,
-        0x38, 0xFB, 0x60, 0x45, 0x00, 0x60, 0xF8, 0x64, 0x0A, 0xA4, 0x39, 0xFB, 0x35, 0xF1, 0x0A, 0x64,
-        0xC4, 0x84, 0x36, 0xFB, 0xC0, 0x84, 0x0A, 0xA4, 0x37, 0xFB, 0x09, 0x60, 0x2A, 0x64, 0xB9, 0xFB,
-        0x82, 0xFF, 0x92, 0xFF, 0x5C, 0x41, 0x5C, 0x46, 0x5C, 0x47, 0x00, 0xE1, 0xA3, 0x60, 0x4B, 0x63,
-        0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x87, 0xFF, 0x97, 0xFF, 0x0C, 0x60, 0x02, 0x64, 0x40, 0x5A,
-        0x06, 0xA4, 0x40, 0x5B, 0x5C, 0x5E, 0x5C, 0x51, 0x28, 0x60, 0x44, 0x62, 0xA2, 0xD3, 0x7F, 0xFB,
-        0x2D, 0x60, 0xCC, 0x61, 0x27, 0x7C, 0xA1, 0xD9, 0x6D, 0x60, 0x1C, 0x63, 0x7F, 0xA3, 0xE3, 0x87,
-        0x00, 0x7F, 0xAA, 0xFB, 0x02, 0x60, 0x7F, 0x64, 0x00, 0x60, 0x42, 0x65, 0xD4, 0x84, 0xAB, 0xFB,
-        0xDC, 0x84, 0xA9, 0xFB, 0x24, 0x60, 0x0E, 0x62, 0xA2, 0xDB, 0x34, 0x60, 0x58, 0x4E, 0x64, 0x78,
-        0xFF, 0xFF, 0xAB, 0xF1, 0xAA, 0xF3, 0x7C, 0x63, 0xAD, 0xFB, 0x60, 0x46, 0x01, 0xFC, 0xDC, 0x84,
-        0xD0, 0x80, 0x00, 0xFA, 0xFA, 0x04, 0xAE, 0xFB, 0x60, 0x46, 0x00, 0x64, 0x00, 0xFA, 0x63, 0x44,
-        0x80, 0x7F, 0x01, 0xFA, 0xAB, 0xF3, 0xAA, 0xF1, 0xDC, 0x84, 0xD0, 0x84, 0xAC, 0xFB, 0x03, 0x60,
-        0x26, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xB1, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x2E, 0xFB, 0x82, 0xFF,
-        0x40, 0x42, 0x87, 0xFF, 0xAC, 0xF3, 0xB4, 0xFB, 0x08, 0x60, 0x00, 0x63, 0xFA, 0x60, 0x00, 0x65,
-        0xBD, 0xD3, 0xA3, 0xD3, 0x02, 0xA8, 0xD4, 0x80, 0x24, 0x02, 0x23, 0x02, 0x2D, 0x60, 0x1A, 0x62,
-        0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x80, 0x26, 0x1C, 0x00, 0x04, 0xA3, 0xFD, 0x60, 0x0D, 0x65,
-        0x5B, 0xD3, 0xBF, 0xD1, 0x16, 0x18, 0xC3, 0x83, 0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xBF, 0xD3,
-        0xAD, 0x49, 0xFE, 0xA0, 0x00, 0x64, 0x0E, 0x04, 0x08, 0xB1, 0x20, 0xBC, 0x08, 0x28, 0x18, 0xBC,
-        0x1C, 0x60, 0xB8, 0x63, 0x07, 0x7C, 0xA3, 0xD9, 0x1C, 0x60, 0xB6, 0x63, 0x05, 0x7C, 0xA3, 0xD9,
-        0x01, 0x00, 0x00, 0x64, 0x1C, 0x60, 0xB4, 0x63, 0xA3, 0xDB, 0x00, 0x64, 0x40, 0x50, 0x63, 0xFF,
-        0x60, 0xFF, 0x66, 0xFF, 0x65, 0xFF, 0x64, 0xFF, 0x61, 0xFF, 0x62, 0xFF, 0x49, 0x60, 0x02, 0xE1,
-        0x52, 0x60, 0x02, 0xE1, 0x5B, 0x60, 0x02, 0xE1, 0x65, 0x60, 0x02, 0xE1, 0x6C, 0x60, 0x02, 0xE1,
-        0x76, 0x60, 0x02, 0xE1, 0x41, 0x60, 0x02, 0xE1, 0x04, 0x65, 0x2D, 0x60, 0x18, 0x64, 0x44, 0xD3,
-        0xEF, 0x60, 0x58, 0x4E, 0xBD, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x9E, 0x65, 0x0C, 0x64, 0xA5, 0xDB,
-        0x36, 0x60, 0x1E, 0x64, 0xA1, 0xFB, 0x2D, 0xFF, 0x06, 0x61, 0x41, 0x4B, 0x09, 0x60, 0x08, 0x61,
-        0xAE, 0x60, 0x58, 0x4D, 0xB1, 0x78, 0xFF, 0xFF, 0xF0, 0x67, 0x0E, 0xFA, 0x24, 0x60, 0x7A, 0x62,
-        0x24, 0x60, 0x5E, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x2B, 0x41, 0x4D, 0x8B, 0xFF, 0xFF, 0xE9, 0x02, 0x06, 0x61, 0x41, 0x4B, 0x09, 0x60,
-        0x08, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xB1, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x7A, 0x62, 0x24, 0x60,
-        0x52, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x2B, 0x41, 0x4D, 0x8B, 0xFF, 0xFF, 0xEB, 0x02, 0x19, 0x60, 0x17, 0x78, 0xFF, 0xFF, 0x00, 0xEA,
-        0x00, 0xEB, 0x50, 0x60, 0x03, 0xEA, 0x51, 0x60, 0x13, 0xEA, 0x52, 0x60, 0x30, 0xEA, 0x53, 0x60,
-        0x40, 0xEA, 0x54, 0x60, 0x52, 0xEA, 0x55, 0x60, 0x6D, 0xEA, 0x56, 0x60, 0x71, 0xEA, 0x57, 0x60,
-        0x8B, 0xEA, 0x58, 0x60, 0x47, 0xEA, 0x59, 0x60, 0xA0, 0xEA, 0x5A, 0x60, 0xB2, 0xEA, 0x5B, 0x60,
-        0xC1, 0xEA, 0x5C, 0x60, 0xD7, 0xEA, 0x5D, 0x60, 0xEB, 0xEA, 0x5E, 0x60, 0xA0, 0xEA, 0x50, 0x60,
-        0x36, 0xEB, 0x51, 0x60, 0x37, 0xEB, 0x52, 0x60, 0x20, 0xEB, 0x53, 0x60, 0xE4, 0xEB, 0x54, 0x60,
-        0x34, 0xEB, 0x55, 0x60, 0x58, 0xEB, 0x56, 0x60, 0x48, 0xEB, 0x57, 0x60, 0xD0, 0xEB, 0x58, 0x60,
-        0xC3, 0xEB, 0x59, 0x60, 0xFC, 0xEB, 0x5A, 0x60, 0x34, 0xEB, 0x5B, 0x60, 0x58, 0xEB, 0x5C, 0x60,
-        0xC0, 0xEB, 0x5D, 0x60, 0xD0, 0xEB, 0x5E, 0x60, 0x91, 0xEB, 0x00, 0xEA, 0x00, 0xEB, 0xE0, 0x60,
-        0x02, 0xEA, 0xE0, 0x60, 0x03, 0xEB, 0xA0, 0x60, 0x00, 0xEB, 0xB0, 0x60, 0x00, 0xEB, 0xAB, 0x48,
-        0x40, 0x3B, 0x01, 0x00, 0xFC, 0x01, 0x00, 0xEB, 0x03, 0x60, 0x02, 0x62, 0x62, 0x44, 0xA2, 0xDB,
-        0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60,
-        0x00, 0xEA, 0x3F, 0x40, 0x40, 0x26, 0x08, 0x00, 0x00, 0x60, 0x18, 0x64, 0x00, 0x60, 0x00, 0x65,
-        0x94, 0x84, 0xA0, 0x50, 0x1D, 0x60, 0x19, 0xE2, 0x24, 0x44, 0xFF, 0xB4, 0x04, 0xFB, 0x50, 0x60,
-        0x00, 0x64, 0x05, 0xFB, 0x10, 0x60, 0x10, 0x75, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0x3F, 0x41,
-        0xA5, 0x4C, 0x50, 0x37, 0x04, 0x00, 0x01, 0xB9, 0x41, 0x5F, 0xB5, 0x60, 0x55, 0xE0, 0x0C, 0x60,
-        0x10, 0x62, 0xA2, 0xD3, 0x01, 0x60, 0x01, 0x65, 0xD4, 0x80, 0x5A, 0xD1, 0x0F, 0x02, 0x5A, 0xD3,
-        0x3C, 0x60, 0x00, 0x66, 0xE0, 0x87, 0x40, 0x4A, 0x68, 0x60, 0x28, 0x61, 0x64, 0x44, 0xC8, 0x84,
-        0x0C, 0x63, 0xAA, 0x46, 0x58, 0xD0, 0xAA, 0x46, 0x59, 0xD8, 0xFB, 0x1F, 0x08, 0x60, 0x00, 0x63,
-        0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3, 0xA3, 0xD3, 0x02, 0xA8, 0xD4, 0x80, 0x61, 0x02, 0x60, 0x02,
-        0x6E, 0x60, 0x58, 0x61, 0x3C, 0x60, 0x00, 0x66, 0x41, 0x4B, 0x2B, 0x41, 0x6E, 0x60, 0xA0, 0x7C,
-        0xD1, 0x80, 0xA1, 0xD2, 0x25, 0x05, 0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47, 0xE0, 0x87,
-        0x40, 0x4A, 0x59, 0xD2, 0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3, 0xBD, 0xD1,
-        0xEC, 0x18, 0xD4, 0x80, 0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x67, 0x44,
-        0xC0, 0x84, 0xE0, 0x85, 0x2C, 0x44, 0xD4, 0x80, 0x63, 0x41, 0x01, 0x06, 0x65, 0x44, 0xC8, 0x83,
-        0xAA, 0x46, 0x59, 0xD1, 0x27, 0xD8, 0x5A, 0x87, 0xFC, 0x1F, 0xAA, 0x46, 0x2B, 0x41, 0xD5, 0x01,
-        0x6E, 0x60, 0xA0, 0x61, 0x41, 0x4B, 0x2B, 0x41, 0x6E, 0x60, 0xD8, 0x7C, 0xD1, 0x80, 0xA1, 0xD2,
-        0x27, 0x05, 0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47, 0xE0, 0x87, 0x40, 0x4A, 0x59, 0xD2,
-        0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3, 0xBD, 0xD1, 0xEC, 0x18, 0xD4, 0x80,
-        0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x04, 0xA3, 0xA3, 0xD1, 0x5A, 0x88,
-        0x2C, 0x43, 0xD3, 0x80, 0xFF, 0xFF, 0x01, 0x06, 0x64, 0x43, 0xCF, 0x83, 0xAA, 0x46, 0x60, 0xFE,
-        0x28, 0xD1, 0x5E, 0x88, 0x27, 0xD8, 0x5A, 0x87, 0xFB, 0x1F, 0x20, 0xFE, 0xAA, 0x46, 0xD3, 0x01,
-        0xB8, 0xFE, 0xB9, 0xFE, 0xBA, 0xFE, 0xBB, 0xFE, 0xBD, 0xFE, 0xBF, 0xFE, 0x2D, 0x60, 0x1A, 0x62,
-        0xA2, 0xD3, 0x12, 0x63, 0x60, 0x40, 0x01, 0x27, 0x05, 0x00, 0x0B, 0x60, 0xEA, 0x62, 0x00, 0x64,
-        0x5A, 0xDB, 0xFE, 0x1F, 0x34, 0x60, 0x81, 0x78, 0xFF, 0xFF, 0xF1, 0xFF, 0xF6, 0x6C, 0x1E, 0x00,
-        0x04, 0x00, 0xF2, 0xFF, 0xFA, 0x6C, 0x1E, 0x00, 0x04, 0x00, 0xFB, 0xFF, 0x02, 0x6D, 0x1E, 0x00,
-        0x04, 0x00, 0xF1, 0xFF, 0x8C, 0x64, 0x1E, 0x00, 0x04, 0x00, 0xF2, 0xFF, 0x90, 0x64, 0x1E, 0x00,
-        0x04, 0x00, 0xFB, 0xFF, 0x98, 0x64, 0x1E, 0x00, 0x04, 0x00, 0x86, 0xFD, 0x50, 0x28, 0x00, 0x00,
-        0x06, 0x00, 0x10, 0xFD, 0x74, 0x01, 0x00, 0x00, 0x02, 0x00, 0x14, 0xFD, 0x18, 0x2D, 0x00, 0x00,
-        0x0A, 0x00, 0x20, 0xFA, 0x94, 0x26, 0x00, 0x00, 0x0E, 0x00, 0x21, 0xFA, 0x78, 0x26, 0x00, 0x00,
-        0x0E, 0x00, 0x22, 0xFA, 0xB0, 0x26, 0x00, 0x00, 0x0E, 0x00, 0x23, 0xFA, 0x64, 0x25, 0x00, 0x00,
-        0x01, 0x00, 0x24, 0xFA, 0x58, 0x27, 0x00, 0x00, 0x0E, 0x00, 0x25, 0xFA, 0x78, 0x25, 0x00, 0x00,
-        0x80, 0x00, 0x26, 0xFA, 0x5E, 0x25, 0x00, 0x00, 0x01, 0x00,
-
-};  /* fw_image_3_data */
-
-static const hcf_8 fw_image_4_data[] = {
-        0xA2, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA2, 0x60, 0xC3, 0x78, 0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA2, 0x60, 0xC9, 0x78, 0xC4, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA2, 0x60, 0x19, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x44, 0xFF, 0x20, 0x54, 0xCD, 0xE2, 0xA2, 0x60, 0xDB, 0x78, 0x08, 0xE1, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA2, 0x60, 0xDD, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA2, 0x60, 0xDD, 0x78, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA2, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA8, 0x60, 0x73, 0x78, 0x4C, 0x4E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA7, 0x60, 0xFB, 0x78, 0x4C, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC4, 0xE2, 0x84, 0xFF, 0x22, 0x58, 0x82, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA3, 0x60, 0x7E, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE4, 0xE2, 0xA8, 0x60, 0x14, 0x78, 0xB5, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBA, 0x60, 0xCE, 0x78, 0x64, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA8, 0x60, 0x87, 0x78, 0xA4, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA8, 0x60, 0x55, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAE, 0x60, 0x1E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAE, 0x60, 0x4B, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAC, 0x60, 0xD8, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAD, 0x60, 0x08, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAD, 0x60, 0x08, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAF, 0x60, 0xC0, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAD, 0x60, 0x0B, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x83, 0x64, 0x80, 0x29, 0x09, 0xFB, 0xAD, 0x60, 0xE6, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x31, 0x60, 0x16, 0x78, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x30, 0x60, 0xA1, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB9, 0x60, 0x4B, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB8, 0x60, 0xBB, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB0, 0x60, 0x89, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x83, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBB, 0x60, 0x25, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xB0, 0xFF, 0xB1, 0xFF, 0x40, 0xFF, 0x43, 0xFF, 0xBB, 0x60, 0x20, 0x78, 0x44, 0xFF, 0xFF, 0x01,
-        0xBB, 0x60, 0x25, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x33, 0x60, 0x9B, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xBB, 0x60, 0x20, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xBB, 0x60, 0x1F, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xBF, 0x60, 0xDB, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xEB, 0x60, 0x1F, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xE3, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xE3, 0x78, 0x24, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xE9, 0x60, 0xE3, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xE3, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xE3, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xE3, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x24, 0x60, 0xE5, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x25, 0x60, 0x14, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x25, 0x60, 0x32, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x25, 0x60, 0x11, 0x78, 0x28, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x25, 0x60, 0x11, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x25, 0x60, 0x11, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x25, 0x60, 0x11, 0x78, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x87, 0x64, 0x80, 0x29, 0x09, 0xFB, 0x47, 0xFF, 0x25, 0x60, 0x11, 0x78, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x2F, 0x60, 0x63, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x2F, 0x60, 0xB3, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x07, 0x02, 0x62, 0xFF, 0x63, 0xFF, 0x64, 0xFF, 0x65, 0xFF,
-        0x66, 0xFF, 0xBF, 0xFE, 0xA1, 0xFF, 0x82, 0xFF, 0x88, 0xFF, 0x6C, 0x40, 0x41, 0xFF, 0xC4, 0xE2,
-        0x43, 0xFF, 0x5C, 0x49, 0x08, 0xE1, 0xA2, 0x60, 0x16, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0x98, 0xFF,
-        0x80, 0x3E, 0x9F, 0xFE, 0x03, 0x04, 0x31, 0x60, 0x75, 0x78, 0xFF, 0xFF, 0xE2, 0xFE, 0x40, 0x05,
-        0xE0, 0xFE, 0x5B, 0x05, 0xE1, 0xFE, 0xF2, 0x04, 0x29, 0x40, 0x08, 0x26, 0xEF, 0x01, 0x72, 0x44,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xB5, 0xF3, 0xE8, 0x85, 0xFF, 0xB7,
-        0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x85, 0x73, 0x44, 0xD4, 0x84, 0x10, 0x65, 0xD4, 0x80, 0xFF, 0xFF,
-        0x26, 0x04, 0x3F, 0x40, 0x40, 0x26, 0x13, 0x00, 0x0B, 0x60, 0xF8, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x10, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xF8, 0xA2, 0xA2, 0xD1, 0x0A, 0x60, 0x19, 0x64, 0x90, 0x84,
-        0xA0, 0x52, 0x06, 0xA2, 0xA2, 0xD1, 0x46, 0x60, 0x09, 0x64, 0x90, 0x84, 0xA0, 0x50, 0xF2, 0xF4,
-        0x31, 0x60, 0x18, 0x7C, 0x63, 0x40, 0x01, 0x26, 0x08, 0x00, 0xA4, 0xD3, 0xFF, 0xFF, 0x01, 0xB4,
-        0xFF, 0xFF, 0x03, 0x02, 0xAD, 0x4F, 0xFE, 0xB4, 0xA0, 0x5D, 0x02, 0xEE, 0xBD, 0xFE, 0xBE, 0x01,
-        0x21, 0x46, 0x5E, 0x62, 0x9A, 0xFF, 0x07, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x06, 0x25, 0x10, 0x00,
-        0xA2, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x62, 0x62, 0x01, 0x5D, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC,
-        0x7A, 0xDC, 0x44, 0xFF, 0x06, 0x25, 0x04, 0x00, 0x0E, 0xE1, 0x02, 0x60, 0x01, 0xE1, 0x9E, 0x01,
-        0x62, 0xFF, 0xC4, 0xE2, 0x41, 0xFF, 0x0A, 0xE1, 0x99, 0x01, 0xC8, 0x74, 0xCD, 0xE2, 0x29, 0x44,
-        0x08, 0xBC, 0x40, 0x49, 0x05, 0xE1, 0x31, 0x60, 0x1A, 0x63, 0xA3, 0xD3, 0xF2, 0xF3, 0x06, 0x18,
-        0x28, 0x40, 0x08, 0x2A, 0x05, 0x00, 0x28, 0x40, 0x48, 0x36, 0x02, 0x00, 0x02, 0xBC, 0xF2, 0xFB,
-        0x3F, 0x40, 0x01, 0x2B, 0xFF, 0xFF, 0xA1, 0xFF, 0x67, 0x4C, 0x06, 0x61, 0xCD, 0x81, 0x04, 0x25,
-        0x30, 0x00, 0x87, 0x4C, 0xFB, 0x02, 0x28, 0x40, 0x40, 0x2B, 0x02, 0x00, 0x15, 0x60, 0x6F, 0x6B,
-        0xF3, 0x60, 0xA0, 0x64, 0x04, 0x25, 0x25, 0x00, 0x80, 0x4C, 0x30, 0x64, 0x3A, 0xDB, 0x44, 0xFF,
-        0x04, 0x25, 0x1F, 0x00, 0x04, 0x60, 0x00, 0x65, 0x25, 0x44, 0x37, 0x36, 0xB4, 0x84, 0x6E, 0x36,
-        0xB4, 0x84, 0x80, 0x4E, 0x24, 0x41, 0x04, 0x25, 0x14, 0x00, 0x61, 0x4C, 0x64, 0xA1, 0x61, 0x54,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x04, 0x25, 0x0D, 0x00, 0x67, 0x4E, 0x07, 0x64, 0x1C, 0xFB, 0x00, 0xE1,
-        0x02, 0x60, 0x01, 0xE1, 0x53, 0x01, 0x33, 0xF3, 0xFD, 0x11, 0xFC, 0x18, 0x40, 0x64, 0x3A, 0xDB,
-        0x0A, 0x00, 0xC4, 0xE2, 0x27, 0x44, 0x20, 0x2A, 0x04, 0x00, 0x42, 0x64, 0x3A, 0xDB, 0x67, 0x4C,
-        0x02, 0x00, 0x41, 0x64, 0x3A, 0xDB, 0x62, 0xFF, 0x08, 0xE1, 0xE2, 0xFE, 0x72, 0x52, 0x5C, 0x49,
-        0x32, 0x7B, 0x4D, 0xE2, 0x3B, 0x01, 0x08, 0xE1, 0x39, 0x01, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E,
-        0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x02, 0x02, 0xA1, 0xFF, 0xFF, 0xFF, 0x82, 0xFF, 0x88, 0xFF,
-        0x48, 0xE2, 0x01, 0x70, 0xCE, 0xF1, 0x00, 0x6B, 0x89, 0xFF, 0x64, 0x54, 0x88, 0xFF, 0x9F, 0xFE,
-        0x02, 0x05, 0x64, 0x44, 0x60, 0x54, 0xCD, 0xE2, 0xC2, 0x64, 0x3A, 0xDB, 0xBC, 0xFF, 0xB5, 0xFF,
-        0x1D, 0xFF, 0x26, 0x44, 0x02, 0xB4, 0x40, 0x46, 0x3C, 0x44, 0x00, 0xBC, 0xFF, 0xFF, 0x06, 0x03,
-        0x27, 0x40, 0x26, 0x22, 0x03, 0x00, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x27, 0x44, 0x20, 0x2A,
-        0x04, 0x00, 0xA0, 0x60, 0x00, 0xEA, 0xB0, 0x60, 0x00, 0xEA, 0x5C, 0x4D, 0x27, 0x44, 0x18, 0xB4,
-        0x40, 0x47, 0x00, 0xE1, 0x6C, 0x40, 0x44, 0xE2, 0xC4, 0xE2, 0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF,
-        0x32, 0xF1, 0x08, 0x29, 0x09, 0x00, 0x64, 0x40, 0x07, 0x22, 0x06, 0x00, 0x43, 0xFF, 0x27, 0x44,
-        0x10, 0xBC, 0x40, 0x47, 0x00, 0x64, 0x32, 0xFB, 0x31, 0x41, 0x3C, 0x44, 0x01, 0xB1, 0x00, 0xBC,
-        0x0A, 0x02, 0x09, 0x03, 0x32, 0xF3, 0x00, 0x7C, 0x01, 0xB4, 0xFF, 0xFF, 0x04, 0x03, 0x32, 0xF9,
-        0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x00, 0x64,
-        0x33, 0xFB, 0x0C, 0x60, 0x16, 0x64, 0xA0, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x32, 0xF3, 0x08, 0x29,
-        0x0A, 0x00, 0x60, 0x40, 0x07, 0x22, 0x07, 0x00, 0xFE, 0xB4, 0x32, 0xFB, 0x27, 0x44, 0x10, 0xBC,
-        0xF7, 0xB4, 0x40, 0x47, 0x43, 0xFF, 0x00, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x08, 0xE1, 0x31, 0x40,
-        0x01, 0x2A, 0x04, 0x00, 0x00, 0x64, 0x33, 0xFB, 0x01, 0x60, 0x0A, 0xE1, 0xE5, 0xFE, 0x1D, 0x05,
-        0x27, 0x44, 0x10, 0x26, 0x1D, 0x00, 0x9F, 0xFE, 0x02, 0x04, 0x02, 0xE1, 0x10, 0x00, 0x3E, 0xE1,
-        0x31, 0x44, 0x01, 0x2A, 0x0C, 0x00, 0x0E, 0x0A, 0x28, 0x44, 0x04, 0x27, 0x07, 0x00, 0xD4, 0x36,
-        0x05, 0x00, 0xC4, 0x36, 0x03, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0xBF, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x81, 0x3E, 0xAB, 0x60, 0x2C, 0x78, 0xFF, 0xFF, 0xA3, 0x60, 0xEC, 0x78, 0xFF, 0xFF,
-        0x27, 0x44, 0x08, 0x26, 0xFF, 0xFF, 0xBA, 0x60, 0x70, 0x78, 0xFF, 0xFF, 0x48, 0xF3, 0x32, 0xF1,
-        0x00, 0x63, 0x64, 0x40, 0x03, 0x22, 0x66, 0x00, 0x31, 0x40, 0x08, 0x26, 0xF4, 0x01, 0xCD, 0xE2,
-        0x84, 0xE1, 0x70, 0x41, 0xAD, 0x80, 0x71, 0x40, 0x80, 0x27, 0xED, 0x12, 0x03, 0x03, 0xBA, 0x60,
-        0xE7, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0xC4, 0xE2, 0x32, 0xFD, 0x60, 0x40, 0x01, 0x2A,
-        0xDF, 0x01, 0x00, 0x63, 0x32, 0xFD, 0x6C, 0x40, 0x3C, 0x46, 0x3E, 0xF2, 0x2A, 0xF0, 0x27, 0x41,
-        0x44, 0x48, 0x20, 0xB9, 0x01, 0xB4, 0xF7, 0xB1, 0x0A, 0x03, 0x64, 0x40, 0x08, 0x27, 0x07, 0x00,
-        0x0F, 0x60, 0x92, 0x63, 0x00, 0x64, 0x45, 0xFB, 0x46, 0xFB, 0xBD, 0xDB, 0xA3, 0xDB, 0xCB, 0x0A,
-        0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0x17, 0x18, 0x28, 0x40, 0xD4, 0x36, 0x14, 0x00,
-        0xAC, 0x4C, 0x80, 0x2A, 0x11, 0x00, 0x31, 0x60, 0x14, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0x0C, 0x18,
-        0x31, 0x60, 0x16, 0x7C, 0xA4, 0xD3, 0x31, 0x60, 0x10, 0x7C, 0xA4, 0xD3, 0x60, 0x45, 0xD4, 0x80,
-        0xDC, 0x84, 0x02, 0x03, 0xA4, 0xDB, 0xAF, 0x01, 0x31, 0x60, 0x10, 0x7C, 0x00, 0x64, 0xA4, 0xDB,
-        0x41, 0x47, 0x3F, 0x40, 0x01, 0x2B, 0x0D, 0x00, 0xF6, 0xFE, 0x67, 0x4C, 0x05, 0x60, 0x69, 0x6B,
-        0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0x04, 0x18, 0xAE, 0x4F, 0x08, 0xBC, 0x00, 0x7F,
-        0xA0, 0x5E, 0x02, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0xF0, 0xFE, 0x84, 0xFF, 0xBB, 0x60, 0x18, 0x64,
-        0x40, 0x42, 0x82, 0xFF, 0xE5, 0xFE, 0x03, 0x04, 0xA8, 0x60, 0x24, 0x78, 0xFF, 0xFF, 0xE4, 0xFE,
-        0x0A, 0x04, 0x1D, 0xFF, 0x00, 0xEB, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60,
-        0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x43, 0xFF, 0xE6, 0xFE, 0x03, 0x05, 0xA3, 0x60, 0x4B, 0x78,
-        0xFF, 0xFF, 0x3C, 0x44, 0x60, 0x46, 0x0F, 0xF0, 0x40, 0x42, 0x64, 0x40, 0x01, 0x2A, 0x03, 0x00,
-        0xA6, 0x60, 0xB1, 0x78, 0xFF, 0xFF, 0x0B, 0x64, 0x3A, 0xDB, 0x1C, 0x42, 0x22, 0x46, 0x13, 0xF2,
-        0xFF, 0x65, 0x60, 0x47, 0x2A, 0xF2, 0x40, 0x45, 0x40, 0x48, 0x04, 0x2B, 0x17, 0x00, 0x16, 0xF2,
-        0x1D, 0xF2, 0x40, 0x43, 0x0F, 0xF2, 0x40, 0x44, 0x25, 0x5E, 0x3F, 0x40, 0x01, 0x27, 0x40, 0x45,
-        0x0F, 0x64, 0x14, 0xF0, 0x35, 0xF2, 0xA0, 0x82, 0x0F, 0xB4, 0xCA, 0x85, 0xD4, 0x80, 0x10, 0xF2,
-        0x01, 0x02, 0x2B, 0xFA, 0x27, 0x44, 0x40, 0xBC, 0x40, 0x47, 0x13, 0x00, 0x17, 0xF2, 0x2C, 0xF0,
-        0x40, 0x43, 0x1B, 0xF2, 0x1D, 0xFA, 0x40, 0x44, 0x64, 0x40, 0x01, 0x2A, 0x02, 0x00, 0xAB, 0xFC,
-        0x05, 0x00, 0x28, 0x40, 0xA4, 0x36, 0x02, 0x00, 0x11, 0xF2, 0x2B, 0xFA, 0x27, 0x44, 0xBF, 0xB4,
-        0x40, 0x47, 0x28, 0x40, 0x40, 0x2B, 0xFF, 0xFF, 0xAB, 0x60, 0x4A, 0x78, 0xFF, 0xFF, 0x22, 0x46,
-        0x2C, 0xF0, 0x27, 0x44, 0xDF, 0xB4, 0x40, 0x47, 0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB7, 0xFF,
-        0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x64, 0x40, 0x01, 0x2A, 0x09, 0x00,
-        0x28, 0x44, 0x04, 0x27, 0x05, 0x00, 0xD4, 0x3A, 0x03, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E,
-        0x1B, 0x00, 0x2A, 0xF0, 0x01, 0x65, 0x64, 0x40, 0xA4, 0x3A, 0x04, 0x65, 0x27, 0x44, 0x34, 0x87,
-        0x36, 0xF3, 0xB4, 0xFF, 0x60, 0x5B, 0x4D, 0xE2, 0x04, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x0A, 0xE1,
-        0x28, 0x44, 0x04, 0x27, 0x05, 0x00, 0xD4, 0x3A, 0x03, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E,
-        0x2B, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x06, 0x64, 0x3A, 0xDB, 0x22, 0x46, 0x01, 0x64,
-        0x31, 0xFB, 0xC0, 0xFE, 0xBA, 0x60, 0xF0, 0x78, 0xFF, 0xFF, 0xB5, 0xFF, 0xA1, 0xFF, 0x6C, 0x40,
-        0x3F, 0x40, 0x01, 0x2B, 0x03, 0x00, 0x67, 0x4C, 0x05, 0x60, 0x69, 0x6B, 0x02, 0xE1, 0x01, 0x60,
-        0x08, 0xE1, 0xC4, 0xE2, 0x08, 0x64, 0x3A, 0xDB, 0xF0, 0xFE, 0x25, 0x46, 0x01, 0xF2, 0x61, 0x45,
-        0xD4, 0x9E, 0x21, 0x46, 0x16, 0xFA, 0x2A, 0x44, 0x72, 0x45, 0x24, 0xFA, 0xB5, 0xF3, 0x06, 0x04,
-        0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40, 0x01, 0x26, 0x64, 0x44, 0xB5, 0xF9, 0x25, 0xFA, 0xB6, 0xF3,
-        0x02, 0x04, 0xDC, 0x84, 0xB6, 0xFB, 0x28, 0xFA, 0xB7, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB7, 0xFB,
-        0x29, 0xFA, 0x2D, 0x44, 0x04, 0x2A, 0x06, 0x00, 0x28, 0x40, 0xA4, 0x36, 0x03, 0x00, 0xA5, 0x60,
-        0x77, 0x78, 0xFF, 0xFF, 0x26, 0x43, 0x84, 0xBB, 0xFC, 0xB3, 0x21, 0x46, 0x01, 0x5D, 0x0F, 0xFC,
-        0x5C, 0x46, 0x25, 0x44, 0x06, 0xFA, 0x05, 0xFF, 0x27, 0x44, 0x01, 0x2A, 0x13, 0x00, 0x50, 0xFE,
-        0x28, 0x40, 0x08, 0x3A, 0x12, 0x00, 0x2F, 0xF2, 0x30, 0xF0, 0x60, 0x43, 0x31, 0xF2, 0x22, 0x46,
-        0x64, 0x41, 0x2C, 0xF0, 0x2D, 0xF0, 0xD3, 0x80, 0x2E, 0xF0, 0xD1, 0x80, 0xD0, 0x80, 0x27, 0x44,
-        0x09, 0x0C, 0x03, 0x00, 0x27, 0x44, 0x06, 0x22, 0x05, 0x00, 0xB8, 0xB4, 0x40, 0x47, 0x02, 0x64,
-        0x31, 0xFB, 0xC0, 0xFE, 0xD4, 0x64, 0x40, 0x48, 0x0D, 0x64, 0x3A, 0xDB, 0x31, 0x60, 0x12, 0x7C,
-        0x7C, 0x44, 0xA4, 0xDB, 0x21, 0x46, 0x1C, 0xF2, 0x7C, 0xF1, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF,
-        0x01, 0x06, 0x64, 0x44, 0x40, 0x45, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x3A,
-        0x03, 0x00, 0x04, 0x7F, 0x40, 0x45, 0x15, 0x64, 0x6E, 0x3A, 0x03, 0x00, 0x84, 0x7F, 0x40, 0x45,
-        0x0B, 0x64, 0x40, 0x44, 0x00, 0x63, 0x28, 0x44, 0xA4, 0x36, 0x0B, 0x00, 0x04, 0x2B, 0x09, 0x00,
-        0x30, 0xF3, 0x24, 0x45, 0xD4, 0x84, 0xCA, 0x65, 0xD4, 0x83, 0x31, 0x60, 0x12, 0x7C, 0x01, 0x64,
-        0xA4, 0xDB, 0xD4, 0x64, 0x1A, 0x00, 0x0F, 0x64, 0x3A, 0xDB, 0x21, 0x46, 0x70, 0x63, 0x1C, 0xF2,
-        0xCA, 0x65, 0x40, 0x45, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x3A, 0x03, 0x00,
-        0x04, 0x7F, 0x40, 0x45, 0x15, 0x64, 0x6E, 0x3A, 0x03, 0x00, 0x84, 0x7F, 0x40, 0x45, 0x0B, 0x64,
-        0x40, 0x44, 0x2B, 0xF2, 0xC4, 0x85, 0xD4, 0x83, 0xC4, 0x64, 0x40, 0x48, 0x2F, 0xF0, 0xB0, 0xF0,
-        0xB1, 0xF2, 0x00, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x80, 0x4E, 0x83, 0x4C, 0x9A, 0xFF, 0x84, 0x4C,
-        0x85, 0x4C, 0x81, 0x4C, 0xA1, 0xFF, 0x98, 0xFF, 0x87, 0x4F, 0x87, 0x4C, 0x87, 0x4F, 0x87, 0x4D,
-        0x87, 0x4C, 0x01, 0x08, 0x01, 0x00, 0xFF, 0xFF, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0x44, 0xBC, 0xFF, 0xC4, 0xE2, 0x0C, 0x74, 0x04, 0xE1, 0xA1, 0xFF,
-        0x35, 0xF3, 0xC4, 0xE2, 0x60, 0x54, 0x89, 0xFF, 0x13, 0x74, 0x88, 0xFF, 0xB5, 0xFF, 0x47, 0xFF,
-        0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60,
-        0x00, 0x6B, 0x28, 0x40, 0xC4, 0x36, 0x08, 0x00, 0x31, 0x60, 0x12, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF,
-        0x03, 0x1B, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0x27, 0x44, 0x01, 0x2A, 0x05, 0x00, 0xFE, 0xB4,
-        0x40, 0x47, 0xA4, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0xA3, 0x60, 0x3E, 0x78, 0xFF, 0xFF, 0x28, 0x40,
-        0xB4, 0x3A, 0x09, 0x00, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x02, 0x64,
-        0x31, 0xFB, 0xC0, 0xFE, 0x90, 0x01, 0x28, 0x44, 0xD4, 0x36, 0x03, 0x00, 0xA6, 0x60, 0x98, 0x78,
-        0xFF, 0xFF, 0x48, 0xE2, 0x27, 0x44, 0xFB, 0xB4, 0x40, 0x47, 0x2D, 0x60, 0x5A, 0x63, 0xA3, 0xD3,
-        0xB0, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x34, 0xFB, 0x1C, 0x42, 0x22, 0x46, 0x2A, 0xF0,
-        0xF7, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDA, 0x60, 0x40, 0x40, 0x2B, 0xCC, 0x00, 0x22, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x22, 0x26, 0x42, 0x00, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x07, 0x00,
-        0xC2, 0x00, 0x04, 0x2B, 0xC0, 0x00, 0xA9, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x01, 0x00, 0x07, 0xF4,
-        0x47, 0xF2, 0xFF, 0xFF, 0xDC, 0x84, 0x47, 0xFA, 0x0D, 0x60, 0x3E, 0x62, 0x80, 0xFF, 0xBE, 0x60,
-        0x78, 0x44, 0x02, 0xA4, 0xA2, 0xDB, 0xDE, 0x78, 0xFF, 0xFF, 0x82, 0xFF, 0xA9, 0xF3, 0x66, 0x5C,
-        0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43, 0x22, 0x46, 0x22, 0xF2, 0x63, 0x46, 0x60, 0x40,
-        0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x47, 0xF0, 0x64, 0x41, 0x64, 0x47, 0xFF, 0xB4, 0x60, 0x5F,
-        0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47, 0x22, 0x46, 0x3A, 0xFA, 0x64, 0x44, 0x20, 0x7F,
-        0x34, 0x94, 0x3B, 0xFA, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60,
-        0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x85, 0x00, 0x2A, 0xF2, 0x00, 0x60,
-        0x7C, 0x62, 0x60, 0x40, 0x40, 0x2B, 0x27, 0x00, 0xA2, 0xD3, 0x00, 0x61, 0x60, 0xFE, 0xA0, 0xD3,
-        0xDE, 0x82, 0xA2, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81, 0xC0, 0x2B,
-        0x04, 0x00, 0x80, 0x2A, 0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00, 0x60, 0x47,
-        0xDC, 0x87, 0x01, 0x61, 0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE, 0xDA, 0x82,
-        0xA2, 0xD1, 0xFF, 0xFF, 0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64,
-        0xA2, 0xDB, 0xFF, 0xFF, 0x20, 0xFE, 0x00, 0x60, 0x7C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD3,
-        0x5A, 0xD1, 0x3A, 0xFA, 0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A,
-        0x00, 0x60, 0x80, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1, 0x64, 0x45, 0x64, 0x44,
-        0xE3, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE5, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5A,
-        0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xE9, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEB, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5A, 0x08, 0x60,
-        0x00, 0xEA, 0x65, 0x44, 0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60,
-        0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x0B, 0xF2, 0xFF, 0xFF, 0x7F, 0xB4, 0x0C, 0xF0, 0x04, 0x02,
-        0x64, 0x46, 0x00, 0xF0, 0x04, 0x64, 0x22, 0x46, 0x03, 0xFA, 0x60, 0x41, 0x64, 0x46, 0x01, 0xF2,
-        0xFC, 0xA1, 0x61, 0x45, 0xD4, 0x84, 0xFF, 0xFF, 0x08, 0x02, 0x00, 0xF0, 0x04, 0x63, 0x64, 0x46,
-        0x01, 0xF2, 0x22, 0x46, 0x1A, 0xFA, 0x03, 0xFC, 0x02, 0x00, 0x22, 0x46, 0x1A, 0xFA, 0x35, 0xF2,
-        0x04, 0xF8, 0xDC, 0x84, 0x35, 0xFA, 0x14, 0xF2, 0x0F, 0xB5, 0x0F, 0xB4, 0xCC, 0x84, 0x94, 0x80,
-        0x04, 0x60, 0x00, 0x65, 0x2A, 0xF2, 0x01, 0x02, 0x94, 0x84, 0x2A, 0xFA, 0x95, 0xFC, 0x06, 0x00,
-        0xC4, 0x3A, 0x07, 0x00, 0x27, 0x44, 0xFD, 0xB4, 0x40, 0x47, 0x48, 0xE2, 0xA4, 0x60, 0x0B, 0x78,
-        0xFF, 0xFF, 0x28, 0x44, 0x04, 0x26, 0x05, 0x00, 0x68, 0x3A, 0x03, 0x00, 0x32, 0x44, 0x00, 0x27,
-        0x03, 0x00, 0xA3, 0x60, 0x4B, 0x78, 0xFF, 0xFF, 0x0A, 0x64, 0x3A, 0xDB, 0xA3, 0x60, 0x4B, 0x78,
-        0xFF, 0xFF, 0x0E, 0x64, 0x3A, 0xDB, 0x10, 0x60, 0x00, 0x65, 0x3C, 0x46, 0x2A, 0xF2, 0x13, 0xF0,
-        0xA4, 0x84, 0xB4, 0xBC, 0x40, 0x48, 0x7C, 0xF1, 0x64, 0x47, 0xFF, 0xB4, 0x60, 0x45, 0xD0, 0x80,
-        0x70, 0x61, 0x01, 0x06, 0x64, 0x44, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x36,
-        0x15, 0x64, 0x6E, 0x36, 0x0B, 0x64, 0x40, 0x4E, 0xA0, 0x63, 0x0A, 0x64, 0x65, 0x40, 0x0A, 0x36,
-        0x03, 0x00, 0x38, 0x61, 0x14, 0x64, 0xEB, 0x83, 0x40, 0x45, 0x43, 0x44, 0x02, 0x60, 0x5E, 0x65,
-        0x2A, 0xF2, 0x2B, 0xF2, 0x60, 0x40, 0x04, 0x2B, 0x04, 0x00, 0x2E, 0x45, 0xD4, 0x85, 0xC5, 0x84,
-        0x05, 0x00, 0x1B, 0xF0, 0xC5, 0x84, 0xC0, 0x84, 0x2E, 0x45, 0xC4, 0x84, 0x60, 0x43, 0x28, 0x44,
-        0x00, 0xE1, 0xA1, 0xFF, 0x80, 0x4E, 0x83, 0x4C, 0x9A, 0xFF, 0x56, 0x62, 0x7A, 0xD4, 0x7A, 0xD4,
-        0x7A, 0xD4, 0x5C, 0x62, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0xA1, 0xFF, 0x98, 0xFF, 0x87, 0x4F,
-        0x87, 0x4C, 0x87, 0x4F, 0x87, 0x4D, 0x87, 0x4C, 0x01, 0x08, 0x01, 0x00, 0xFF, 0xFF, 0x87, 0x4C,
-        0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0x44, 0xBC, 0xFF, 0xB5, 0xFF,
-        0x47, 0xFF, 0x27, 0x44, 0x02, 0xBC, 0x40, 0x47, 0x36, 0xF3, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60,
-        0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x60, 0x5B, 0x4D, 0xE2, 0xA4, 0x60, 0x6C, 0x78, 0xFF, 0xFF,
-        0x21, 0x46, 0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D,
-        0x08, 0x60, 0x00, 0x6B, 0x28, 0x44, 0x04, 0x27, 0x09, 0x00, 0xD4, 0x36, 0x04, 0x00, 0x0C, 0x22,
-        0x02, 0x00, 0x0C, 0x3A, 0x03, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0x26, 0x43, 0x25, 0x44,
-        0x06, 0xFA, 0x2A, 0x44, 0x72, 0x45, 0x24, 0xFA, 0xB5, 0xF3, 0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C,
-        0x29, 0x40, 0x01, 0x26, 0x64, 0x44, 0xB5, 0xF9, 0x25, 0xFA, 0xB6, 0xF3, 0x02, 0x04, 0xDC, 0x84,
-        0xB6, 0xFB, 0x28, 0xFA, 0xB7, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB7, 0xFB, 0x29, 0xFA, 0x2D, 0x40,
-        0x01, 0x2A, 0x0E, 0x00, 0x1D, 0xFF, 0x26, 0x44, 0x02, 0xBC, 0x40, 0x46, 0x27, 0x44, 0x07, 0x22,
-        0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x30, 0xF1, 0x76, 0x00,
-        0xFC, 0xB3, 0x32, 0x40, 0x01, 0x2A, 0x06, 0x00, 0x0A, 0xBB, 0x0F, 0xFC, 0xCB, 0xFE, 0xA3, 0x60,
-        0x4B, 0x78, 0xFF, 0xFF, 0x2D, 0x44, 0x04, 0x26, 0x28, 0x00, 0x0F, 0xFC, 0x05, 0xFF, 0xDC, 0xF3,
-        0x28, 0x40, 0x80, 0x3A, 0x22, 0x00, 0x60, 0x40, 0x03, 0x3A, 0x1F, 0x00, 0x32, 0xF2, 0x81, 0xF1,
-        0x33, 0xF2, 0xD0, 0x80, 0x82, 0xF1, 0x19, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x83, 0xF1, 0x15, 0x02,
-        0xD0, 0x80, 0x3C, 0x44, 0x12, 0x02, 0xAC, 0x86, 0xBB, 0xFE, 0x0F, 0x03, 0x2A, 0xF2, 0x21, 0x46,
-        0x60, 0x40, 0x80, 0x3A, 0x0A, 0x00, 0x01, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x00, 0x64, 0x32, 0xFB,
-        0x84, 0xFF, 0xBB, 0x60, 0x18, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x30, 0xF1, 0x27, 0x44, 0x05, 0x22,
-        0x2D, 0x00, 0xFA, 0xB4, 0x40, 0x47, 0x2D, 0x44, 0x10, 0x2A, 0x24, 0x00, 0x28, 0x40, 0xD4, 0x3A,
-        0x21, 0x00, 0x31, 0x40, 0x08, 0x26, 0x00, 0x7C, 0x2B, 0x44, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28,
-        0x64, 0x44, 0xC4, 0x84, 0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00,
-        0x20, 0x29, 0x6D, 0xE2, 0x1C, 0x60, 0x9A, 0x63, 0x1D, 0xF0, 0xC0, 0x64, 0xC0, 0x84, 0xA3, 0xD1,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA3, 0xDB, 0xA4, 0x60,
-        0x7C, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x07, 0x00, 0x02, 0x2A, 0x05, 0x00,
-        0xFD, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x05, 0x64, 0x3A, 0xDB, 0x28, 0x44,
-        0xA4, 0x3A, 0x04, 0x00, 0x39, 0xF1, 0x25, 0x44, 0x0A, 0x36, 0x38, 0xF1, 0x31, 0x40, 0x08, 0x26,
-        0x00, 0x7C, 0x2B, 0x44, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28, 0x64, 0x44, 0xC4, 0x84, 0xFF, 0xFF,
-        0x04, 0x24, 0x00, 0xB4, 0x28, 0x40, 0xE4, 0x36, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00,
-        0x20, 0x29, 0x6D, 0xE2, 0xA3, 0x60, 0x3E, 0x78, 0xFF, 0xFF, 0x21, 0x46, 0xB5, 0xFF, 0xBC, 0xFF,
-        0x47, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0xAE, 0x4F,
-        0xF7, 0xB4, 0xA0, 0x5E, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x06, 0x64,
-        0x31, 0xFB, 0xC0, 0xFE, 0xE7, 0x01, 0x27, 0x44, 0x05, 0x22, 0x09, 0x00, 0xBA, 0xB4, 0x40, 0x47,
-        0x3C, 0x46, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xA3, 0x60, 0x4B, 0x78, 0xFF, 0xFF, 0x27, 0x44,
-        0x02, 0x2A, 0x06, 0x00, 0xFD, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xF4, 0x01,
-        0xF3, 0x0A, 0x7C, 0x50, 0x6D, 0xE2, 0xF0, 0x01, 0x72, 0x45, 0xDC, 0x84, 0xB5, 0xFB, 0x11, 0x64,
-        0x3A, 0xDB, 0xB6, 0xF3, 0x06, 0x04, 0xDC, 0x84, 0xB6, 0xFB, 0xB7, 0xF3, 0x02, 0x04, 0xDC, 0x84,
-        0xB7, 0xFB, 0xA3, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0x00, 0x61, 0x12, 0x64, 0x3A, 0xDB, 0x1E, 0x60,
-        0xFE, 0x63, 0xBD, 0xD3, 0x72, 0x45, 0x44, 0x8A, 0x02, 0x28, 0x02, 0x00, 0xE4, 0xE2, 0xDD, 0x81,
-        0x02, 0x28, 0x02, 0x00, 0xE4, 0xE2, 0xDD, 0x81, 0xBD, 0xD3, 0xB5, 0xF1, 0x61, 0x45, 0xC0, 0x84,
-        0x00, 0x61, 0x02, 0x24, 0x01, 0xB9, 0xC4, 0x84, 0x60, 0x55, 0x2A, 0x52, 0xB5, 0xFB, 0x02, 0x24,
-        0x01, 0xB9, 0xBD, 0xD3, 0xB6, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9,
-        0xC4, 0x84, 0xB6, 0xFB, 0x02, 0x24, 0x01, 0xB9, 0xBD, 0xD3, 0xB7, 0xF1, 0x61, 0x45, 0xC0, 0x84,
-        0xC4, 0x84, 0xB7, 0xFB, 0xA3, 0x60, 0xEF, 0x78, 0xFF, 0xFF, 0x31, 0x40, 0x04, 0x0A, 0xAE, 0x4F,
-        0xF7, 0xB4, 0xA0, 0x5E, 0x09, 0x00, 0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0x04, 0x18,
-        0xAE, 0x4F, 0x08, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x9F, 0x01, 0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x25,
-        0x09, 0x00, 0x04, 0x25, 0x03, 0x00, 0x47, 0xFF, 0x32, 0x74, 0x96, 0x01, 0xC4, 0xE2, 0xAB, 0x60,
-        0x2C, 0x78, 0xFF, 0xFF, 0x4C, 0x4E, 0x47, 0xFF, 0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF,
-        0x04, 0x18, 0xAE, 0x4F, 0x08, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x32, 0x74, 0xCD, 0xE2, 0xA8, 0x60,
-        0x8A, 0x78, 0x00, 0x61, 0x10, 0x64, 0x3A, 0xDB, 0xA3, 0x60, 0x4B, 0x78, 0xFF, 0xFF, 0xA3, 0x60,
-        0x4B, 0x78, 0xFF, 0xFF, 0x5C, 0x4D, 0x26, 0x44, 0x02, 0x26, 0x0C, 0x00, 0x3E, 0x46, 0x09, 0xF2,
-        0x1E, 0x41, 0x03, 0x1B, 0xAA, 0x60, 0xDB, 0x78, 0xFF, 0xFF, 0x40, 0x5E, 0xFD, 0xFB, 0x21, 0x44,
-        0x02, 0x64, 0x40, 0x46, 0x41, 0x5D, 0x21, 0x46, 0x00, 0xF2, 0x46, 0x45, 0x87, 0xFC, 0x4C, 0xE2,
-        0x01, 0x64, 0x33, 0xFB, 0x01, 0x60, 0x0E, 0xE1, 0x03, 0xE1, 0x3F, 0x40, 0x01, 0x27, 0x00, 0x00,
-        0x21, 0x69, 0xB6, 0xFF, 0xA1, 0xFF, 0x6C, 0x5E, 0xB6, 0xFF, 0xB7, 0xFF, 0x60, 0x5C, 0x20, 0x64,
-        0x3A, 0xDB, 0x68, 0x43, 0x26, 0xFC, 0x22, 0x69, 0x64, 0x44, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x5F,
-        0x60, 0x43, 0x26, 0xF2, 0xFF, 0xFF, 0x68, 0x5F, 0x26, 0xFA, 0x3A, 0x69, 0x1D, 0xFC, 0x2E, 0x44,
-        0x36, 0xF1, 0x1C, 0xFA, 0xC3, 0x94, 0xCD, 0xE2, 0x2E, 0x44, 0x14, 0x36, 0x12, 0x00, 0x0A, 0x36,
-        0x0F, 0x00, 0x63, 0x45, 0xE3, 0x83, 0xE3, 0x83, 0xC7, 0x83, 0xE3, 0x83, 0xC7, 0x83, 0xFF, 0xFF,
-        0x37, 0x36, 0x05, 0x00, 0x6E, 0x36, 0x04, 0x00, 0xAA, 0x60, 0xF3, 0x78, 0xFF, 0xFF, 0xEB, 0x83,
-        0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xFF, 0xFF, 0x80, 0x27, 0xCF, 0x83, 0x1B, 0xFC, 0x01, 0x64,
-        0x51, 0xFB, 0xA1, 0xFF, 0x1C, 0xF2, 0x29, 0x41, 0xF9, 0x81, 0x52, 0x4A, 0x71, 0x89, 0x68, 0x5F,
-        0x27, 0xFA, 0x6C, 0x40, 0x03, 0x15, 0xAB, 0x60, 0x04, 0x78, 0xFF, 0xFF, 0x88, 0x60, 0x85, 0x71,
-        0x8D, 0xE2, 0xB9, 0xF1, 0xFC, 0xA3, 0xD3, 0x80, 0x43, 0x43, 0x03, 0x04, 0xAA, 0x60, 0xFB, 0x78,
-        0xFF, 0xFF, 0x32, 0x40, 0x01, 0x2A, 0x4C, 0x00, 0x9A, 0xFF, 0x23, 0x43, 0x18, 0x61, 0xA1, 0xFF,
-        0x8C, 0x44, 0xCB, 0x83, 0x2A, 0xFA, 0x40, 0x48, 0x40, 0x27, 0x04, 0xA1, 0x60, 0x40, 0x03, 0x2B,
-        0x01, 0x00, 0x06, 0xA1, 0x88, 0xB0, 0x88, 0x36, 0xD9, 0x81, 0x62, 0x45, 0x23, 0x44, 0x54, 0x94,
-        0x28, 0x40, 0x04, 0x26, 0x00, 0x64, 0x3F, 0xFA, 0xC9, 0x81, 0x65, 0x42, 0x7A, 0xDC, 0x00, 0xB9,
-        0xFD, 0x1C, 0x00, 0xF4, 0x6E, 0x61, 0x10, 0x62, 0x14, 0x02, 0x05, 0x1D, 0x12, 0x1E, 0x0C, 0x00,
-        0x00, 0xF4, 0x7C, 0x61, 0x02, 0x62, 0x7A, 0xDC, 0x63, 0x40, 0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1,
-        0x08, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0x6C, 0x44,
-        0x5A, 0xDA, 0x98, 0xFF, 0x01, 0x60, 0x08, 0xE1, 0x81, 0xE1, 0xA1, 0xFF, 0x6C, 0x40, 0xA1, 0xFF,
-        0x47, 0xFF, 0x26, 0x44, 0xFD, 0xB4, 0x84, 0xBC, 0x01, 0x15, 0x7F, 0xB4, 0x40, 0x46, 0xA1, 0xFF,
-        0x6C, 0x40, 0x14, 0x63, 0x01, 0x11, 0x01, 0x00, 0xFD, 0x1F, 0xAA, 0x60, 0x6E, 0x78, 0xFF, 0xFF,
-        0x9A, 0xFF, 0x54, 0x63, 0x12, 0x64, 0x40, 0x46, 0x00, 0x64, 0x0F, 0xFA, 0xA1, 0xFF, 0xEB, 0xF1,
-        0x12, 0x61, 0x50, 0xFE, 0x2D, 0x60, 0x52, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A,
-        0x0B, 0x00, 0x8C, 0x45, 0x98, 0xF8, 0x00, 0x64, 0x3A, 0xFA, 0x3B, 0xFA, 0x3C, 0xFA, 0x3D, 0xFA,
-        0xBF, 0x60, 0xFF, 0x64, 0xA4, 0x84, 0x01, 0x00, 0x8C, 0x44, 0xEC, 0xF0, 0xBD, 0xDA, 0x40, 0x48,
-        0x04, 0x26, 0x40, 0x00, 0xA1, 0xFF, 0x8C, 0x44, 0xBD, 0xDA, 0x30, 0xFB, 0x6C, 0x44, 0xBD, 0xDA,
-        0xFF, 0xFF, 0x01, 0x26, 0x24, 0x00, 0xD0, 0x80, 0xA1, 0xFF, 0x8C, 0x44, 0x6C, 0x5C, 0xF2, 0xFE,
-        0xBD, 0xDA, 0xED, 0xF3, 0xD4, 0x80, 0xD0, 0x80, 0xBD, 0xD8, 0x2D, 0x44, 0x15, 0x0C, 0x32, 0x40,
-        0x02, 0x2A, 0x07, 0x00, 0x28, 0x42, 0x0C, 0xB2, 0x08, 0x3A, 0x03, 0x00, 0x10, 0xBC, 0x40, 0x4D,
-        0x4D, 0x00, 0x03, 0x0A, 0xAB, 0x60, 0x09, 0x78, 0xFF, 0xFF, 0x11, 0xBC, 0x40, 0x4D, 0x28, 0x45,
-        0xBF, 0x60, 0xFF, 0x64, 0x24, 0x88, 0x42, 0x00, 0x30, 0xBC, 0x40, 0x4D, 0x3F, 0x00, 0x20, 0xB9,
-        0x5C, 0x8E, 0xA1, 0xFF, 0x8C, 0x44, 0xBD, 0xDA, 0xDC, 0x9C, 0x6C, 0x44, 0xF2, 0xFE, 0xBD, 0xDA,
-        0x08, 0x28, 0x44, 0x4E, 0xDC, 0x84, 0x2E, 0x5C, 0xB0, 0x84, 0xEF, 0xB1, 0x08, 0x24, 0x40, 0xB9,
-        0x41, 0x46, 0x2C, 0x00, 0x8C, 0x44, 0x04, 0x61, 0xBD, 0xDA, 0x50, 0xFE, 0x80, 0x27, 0x00, 0x64,
-        0x30, 0xFB, 0x8C, 0x44, 0xBD, 0xDA, 0xD0, 0x80, 0x8C, 0x44, 0xBD, 0xDA, 0xD4, 0x80, 0x00, 0x65,
-        0x8C, 0x44, 0xED, 0xF1, 0xBD, 0xDA, 0xD0, 0x80, 0x28, 0x44, 0x03, 0x0C, 0xA0, 0x2A, 0x0A, 0x00,
-        0x11, 0x00, 0x10, 0x65, 0x60, 0x40, 0xC4, 0x36, 0x04, 0x00, 0xD4, 0x3A, 0x08, 0x00, 0x27, 0x40,
-        0x40, 0x26, 0x30, 0x65, 0x00, 0x64, 0x3F, 0xFA, 0x46, 0x4E, 0x35, 0x8D, 0x5F, 0x00, 0x40, 0x26,
-        0xF9, 0x01, 0x30, 0x65, 0x9D, 0xDC, 0x9D, 0xDC, 0x9D, 0xDC, 0xF4, 0x01, 0x00, 0xE1, 0x23, 0x43,
-        0xE8, 0xA3, 0x6A, 0x62, 0x9A, 0xFF, 0xA1, 0xFF, 0x28, 0x44, 0x03, 0x2B, 0x04, 0x00, 0x7A, 0xDC,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x28, 0x44, 0x88, 0xB0, 0x88, 0x2A, 0x03, 0x00, 0x70, 0x62, 0x7A, 0xDC,
-        0x28, 0x44, 0x40, 0x2B, 0x13, 0x00, 0x72, 0x62, 0x7A, 0xDC, 0x04, 0xE6, 0x7A, 0xDC, 0x3B, 0xF2,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x20, 0x2B, 0x02, 0x00, 0x7A, 0xDC, 0x7A, 0xDC, 0x08, 0x60, 0x00, 0xEB,
-        0xFC, 0xA3, 0x25, 0xFF, 0x3F, 0xFC, 0x04, 0xA3, 0xB0, 0xFF, 0x01, 0x00, 0x3F, 0xFC, 0xCF, 0x83,
-        0xDF, 0x83, 0x04, 0x02, 0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61, 0x1F, 0x00, 0x27, 0x03, 0xCB, 0x83,
-        0xFF, 0x60, 0xFE, 0x65, 0x0E, 0xA3, 0xA7, 0x84, 0xF2, 0xA3, 0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61,
-        0x7A, 0xDC, 0xFE, 0x1C, 0x03, 0x1D, 0x7C, 0xA8, 0xD9, 0x81, 0x0A, 0x02, 0x00, 0xF4, 0x02, 0x62,
-        0xA7, 0x84, 0x7A, 0x61, 0x7A, 0xDC, 0xFE, 0x1C, 0xF9, 0x1D, 0x7C, 0xA8, 0xD9, 0x81, 0xF6, 0x03,
-        0xFF, 0xB1, 0x0C, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xA1, 0xFF, 0x01, 0x60, 0x0C, 0xE1,
-        0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0xCD, 0x81, 0x6C, 0x44, 0x5A, 0xDA, 0x98, 0xFF, 0x00, 0xE6,
-        0x7C, 0x44, 0x33, 0xFB, 0x01, 0x60, 0x0C, 0xE1, 0x83, 0xE1, 0xA1, 0xFF, 0x8C, 0x44, 0x46, 0x45,
-        0xA1, 0xFF, 0x14, 0x63, 0x01, 0x10, 0xFE, 0x1F, 0x01, 0x60, 0x08, 0xE1, 0x0A, 0x64, 0x60, 0x54,
-        0x47, 0xFF, 0x50, 0x4B, 0x67, 0x50, 0x69, 0xE2, 0x6A, 0x40, 0x40, 0x2B, 0x01, 0x15, 0x29, 0x00,
-        0x6C, 0x40, 0x28, 0x40, 0x03, 0x26, 0x15, 0x00, 0x31, 0x40, 0x20, 0x2A, 0x03, 0x00, 0x28, 0x40,
-        0x50, 0x3A, 0x0F, 0x00, 0x2D, 0x44, 0x20, 0x2A, 0x0C, 0x00, 0x2B, 0x44, 0xAC, 0x80, 0x28, 0x40,
-        0xB4, 0x3A, 0x03, 0x00, 0x02, 0x03, 0x30, 0xFB, 0x04, 0x00, 0x2B, 0x50, 0xA4, 0x60, 0x85, 0x78,
-        0x04, 0xE1, 0x04, 0xE1, 0xA1, 0xFF, 0x35, 0xF1, 0x26, 0x44, 0x64, 0x54, 0xCD, 0xE2, 0x84, 0xBC,
-        0x2D, 0x40, 0x0C, 0x22, 0xFD, 0xB4, 0x40, 0x46, 0x23, 0x64, 0x3A, 0xDB, 0xA7, 0x60, 0x18, 0x78,
-        0xFF, 0xFF, 0x27, 0x40, 0x26, 0x22, 0x04, 0x00, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xFF, 0xFF,
-        0x6C, 0x40, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60, 0x00, 0x6B, 0x37, 0xF3,
-        0x2B, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x28, 0x65, 0x44, 0x60, 0x50, 0xA0, 0x4C, 0x20, 0xBC,
-        0xFF, 0xB4, 0xA0, 0x51, 0x35, 0xF1, 0x74, 0x44, 0xC0, 0x94, 0x32, 0x40, 0x02, 0x2A, 0x18, 0x00,
-        0x28, 0x44, 0xA4, 0x36, 0x04, 0x00, 0x0C, 0xB4, 0xFF, 0xFF, 0x04, 0x36, 0x11, 0x00, 0x26, 0x43,
-        0xFD, 0xB3, 0x04, 0xBB, 0x43, 0x46, 0x01, 0x2A, 0x03, 0x00, 0x28, 0x47, 0x40, 0xBF, 0x40, 0x48,
-        0x0A, 0xBB, 0x0F, 0xFC, 0x50, 0x4B, 0x67, 0x50, 0x00, 0x64, 0x30, 0xFB, 0x05, 0xFF, 0xC6, 0x01,
-        0x24, 0x64, 0x3A, 0xDB, 0x28, 0x44, 0x04, 0x2A, 0x06, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E,
-        0xA3, 0x60, 0x3E, 0x78, 0xFF, 0xFF, 0x1D, 0xFF, 0x48, 0xE2, 0x27, 0x44, 0x06, 0x22, 0x05, 0x00,
-        0xF9, 0xB4, 0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x26, 0x40, 0x10, 0x2A, 0x18, 0x00,
-        0x26, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0xFF, 0xB4, 0xC0, 0xA0, 0xFF, 0xFF, 0x11, 0x0E, 0xB8, 0xF1,
-        0x27, 0x60, 0x92, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0xA7, 0x60, 0xE5, 0x78, 0xFF, 0xFF, 0xB8, 0xF1, 0x27, 0x60, 0x94, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x2A, 0x64, 0x3A, 0xDB, 0x5C, 0x41, 0x87, 0xE1,
-        0xA1, 0xFF, 0x6C, 0x40, 0x02, 0x00, 0x29, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x08, 0xE1, 0x87, 0xE1,
-        0xA1, 0xFF, 0x6C, 0x40, 0x11, 0x00, 0x27, 0x60, 0xA6, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84,
-        0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0xF1, 0x01, 0x01, 0x60, 0x08, 0xE1, 0x21, 0x64, 0x3A, 0xDB,
-        0x03, 0x00, 0x01, 0x60, 0x08, 0xE1, 0x6C, 0x40, 0x00, 0x64, 0x33, 0xFB, 0x32, 0x74, 0x40, 0x63,
-        0x01, 0x16, 0xFE, 0x01, 0x01, 0x68, 0x01, 0x11, 0x09, 0x00, 0xA7, 0x6A, 0x22, 0x64, 0x3A, 0xDB,
-        0x03, 0x60, 0xC9, 0x63, 0x01, 0x11, 0x02, 0x00, 0x6C, 0x40, 0xFC, 0x1F, 0x6C, 0x40, 0xB5, 0xFF,
-        0x6C, 0x40, 0xBC, 0xFF, 0x6C, 0x40, 0xB7, 0xFF, 0xB4, 0xFF, 0x48, 0x60, 0x2D, 0x7D, 0x08, 0x60,
-        0x00, 0x6B, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0x03, 0x0A, 0xA3, 0x60, 0x4B, 0x78, 0xFF, 0xFF,
-        0x01, 0x64, 0x51, 0xFB, 0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0x04, 0x18, 0xAE, 0x4F,
-        0x08, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x27, 0x44, 0x06, 0x22, 0x06, 0x00, 0xF9, 0xB4, 0x40, 0x47,
-        0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x48, 0xE2, 0x27, 0x64, 0x3A, 0xDB, 0xB3, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x81, 0x3E, 0x54, 0x62, 0x22, 0x46, 0xA2, 0xD0, 0x16, 0x63, 0x7C, 0x41, 0x44, 0x48,
-        0x80, 0x36, 0x04, 0x61, 0x28, 0x40, 0x50, 0x36, 0x04, 0x61, 0x41, 0x4E, 0x28, 0x44, 0xA4, 0x36,
-        0x0E, 0x63, 0x1C, 0x60, 0x9C, 0x62, 0xA2, 0xD1, 0x24, 0x44, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84, 0xA2, 0xDB, 0x9A, 0xFF, 0xA1, 0xFF, 0x2D, 0x60, 0x52, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x06, 0x00, 0x18, 0xF2, 0xAA, 0xF0, 0xFF, 0xFF,
-        0xB4, 0x84, 0x08, 0x36, 0x2A, 0xFA, 0x54, 0x62, 0xA2, 0xD2, 0xFF, 0xFF, 0x6A, 0x40, 0x80, 0x4E,
-        0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0xFF, 0xFF,
-        0x01, 0x1D, 0x78, 0x00, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x28, 0x40, 0x03, 0x2B,
-        0x04, 0x00, 0x7A, 0xD4, 0x7A, 0xD4, 0x7A, 0xD4, 0x6A, 0x40, 0x70, 0x62, 0x28, 0x44, 0x88, 0xB0,
-        0x88, 0x36, 0x7A, 0xD4, 0x28, 0x40, 0x40, 0x2B, 0x0B, 0x00, 0x72, 0x62, 0x7A, 0xD4, 0x7A, 0xD4,
-        0xA2, 0xD2, 0xFF, 0xFF, 0x60, 0x40, 0x20, 0x2B, 0x02, 0x00, 0x7A, 0xD4, 0x7A, 0xD4, 0x46, 0x00,
-        0x23, 0x43, 0xCF, 0x83, 0xDF, 0x83, 0x02, 0x03, 0x55, 0x03, 0x04, 0x00, 0x03, 0xF0, 0x04, 0xF4,
-        0x64, 0x42, 0x37, 0x00, 0x2E, 0x40, 0x04, 0x2A, 0x21, 0x00, 0xA1, 0xFF, 0x02, 0xFE, 0x10, 0x25,
-        0x42, 0xFE, 0x72, 0x45, 0x65, 0x4C, 0xB5, 0xF3, 0x03, 0x04, 0xE4, 0xE2, 0xDC, 0x84, 0xB5, 0xFB,
-        0xA1, 0xFF, 0x80, 0x4C, 0xB6, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB6, 0xFB, 0x80, 0x4C, 0xB7, 0xF3,
-        0x02, 0x04, 0xDC, 0x84, 0xB7, 0xFB, 0x80, 0x4C, 0x5C, 0x4E, 0xF8, 0xA3, 0x03, 0xF2, 0x9A, 0xF2,
-        0x04, 0xF4, 0xFF, 0xB1, 0xF8, 0xA1, 0x06, 0xA4, 0x60, 0x42, 0x09, 0x00, 0x03, 0xF2, 0x9A, 0xF2,
-        0x04, 0xF4, 0xC8, 0x82, 0xFF, 0xB1, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xB1, 0x7A, 0xD4,
-        0xFF, 0xFF, 0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1, 0x17, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82,
-        0xDA, 0x82, 0xA2, 0xD2, 0xA1, 0xFF, 0x09, 0x74, 0x80, 0x4D, 0x0E, 0x00, 0x03, 0xF2, 0x9A, 0xF2,
-        0x04, 0xF4, 0x23, 0x43, 0xA1, 0xFF, 0xA0, 0xD2, 0xFE, 0xA1, 0xCB, 0x83, 0x80, 0x4E, 0xAF, 0x83,
-        0x02, 0x1D, 0x02, 0x03, 0xED, 0x01, 0xE3, 0x01, 0xA1, 0xFF, 0x28, 0x40, 0x40, 0x2B, 0x02, 0x00,
-        0x9C, 0x4E, 0x9C, 0x4C, 0xA1, 0xFF, 0xDA, 0x83, 0x66, 0x44, 0x22, 0x46, 0x0C, 0xFA, 0x0B, 0xFC,
-        0x87, 0x4F, 0x87, 0x4C, 0x87, 0x4F, 0x87, 0x4D, 0x87, 0x4C, 0x01, 0x08, 0x01, 0x00, 0xFF, 0xFF,
-        0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0xFF, 0xFF, 0xFF, 0xFF, 0x6A, 0x44, 0xBC, 0xFF,
-        0x01, 0x60, 0x08, 0xE1, 0x0C, 0x74, 0x04, 0xE1, 0xA1, 0xFF, 0x35, 0xF3, 0xC4, 0xE2, 0x60, 0x54,
-        0x89, 0xFF, 0x13, 0x74, 0x88, 0xFF, 0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49, 0x34, 0x64, 0x3A, 0xDB,
-        0x06, 0xE1, 0x47, 0xFF, 0xA4, 0x60, 0x47, 0x78, 0xFF, 0xFF, 0xFF, 0x01, 0x10, 0x61, 0x7F, 0x60,
-        0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67, 0x02, 0x63, 0x26, 0x02, 0x98, 0xFE, 0x1A, 0x05, 0x24, 0x60,
-        0x52, 0x62, 0xA2, 0xD5, 0x0E, 0xF2, 0x15, 0x18, 0x02, 0x18, 0x09, 0xF4, 0xFB, 0x01, 0x23, 0x44,
-        0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02, 0x66, 0x44, 0x11, 0xFB, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF,
-        0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x08, 0xB9, 0x10, 0x7E, 0x00, 0x7F, 0x0E, 0xFA, 0x00, 0x67,
-        0x0A, 0x00, 0x20, 0x44, 0xDC, 0x85, 0x0F, 0xB4, 0xFA, 0xA0, 0x7F, 0x67, 0x07, 0x63, 0x03, 0x05,
-        0x45, 0x40, 0x00, 0x67, 0xD8, 0xFE, 0xFF, 0x27, 0x05, 0xFD, 0x0A, 0x7E, 0x04, 0xFB, 0x61, 0x55,
-        0x4A, 0x00, 0x28, 0xFB, 0x01, 0xF3, 0x29, 0xFB, 0x44, 0x46, 0x40, 0x45, 0x10, 0x61, 0x7E, 0x60,
-        0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67, 0x02, 0x63, 0x31, 0x02, 0xAE, 0x60, 0x58, 0x4F, 0x6F, 0x78,
-        0xFF, 0xFF, 0x7F, 0x67, 0x03, 0x63, 0x2A, 0x02, 0x26, 0x40, 0x01, 0x2B, 0x24, 0x00, 0x98, 0xFE,
-        0x19, 0x05, 0x24, 0x60, 0x52, 0x62, 0xA2, 0xD5, 0x0E, 0xF2, 0x14, 0x18, 0x02, 0x18, 0x09, 0xF4,
-        0xFB, 0x01, 0x23, 0x44, 0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02, 0x66, 0x44, 0x11, 0xFB, 0x46, 0x43,
-        0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x08, 0xB9, 0x10, 0x7E, 0x00, 0x7F,
-        0x0E, 0xFA, 0x09, 0x00, 0x20, 0x44, 0xDC, 0x85, 0x0F, 0xB4, 0xFA, 0xA0, 0x7F, 0x67, 0x07, 0x63,
-        0x05, 0x05, 0x45, 0x40, 0xD8, 0xFE, 0x00, 0x67, 0xD0, 0xFE, 0xD9, 0xFE, 0xFF, 0x27, 0x05, 0xFD,
-        0x0B, 0x7E, 0x04, 0xFB, 0x1C, 0x60, 0xB4, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB0, 0x80, 0xBC,
-        0x08, 0x28, 0xA3, 0xDB, 0x61, 0x55, 0x63, 0x00, 0x04, 0xB5, 0x82, 0xB5, 0x25, 0x02, 0x04, 0x03,
-        0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40, 0xA3, 0xD3, 0x99, 0xFE, 0x04, 0x04, 0x02, 0xBC, 0xFE, 0xB4,
-        0xA3, 0xDB, 0x56, 0x00, 0xDC, 0xF3, 0x20, 0x40, 0x80, 0x26, 0x52, 0x00, 0xA3, 0xD3, 0xFF, 0xA0,
-        0xF8, 0xB4, 0x02, 0x02, 0xA3, 0xDB, 0x1C, 0x00, 0x04, 0xBC, 0xBF, 0xB4, 0xA3, 0xDB, 0x08, 0xB0,
-        0x01, 0x64, 0x08, 0x24, 0x02, 0x64, 0x28, 0xFB, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40, 0xD0, 0xFE,
-        0x3F, 0x00, 0xBF, 0xB4, 0xA3, 0xDB, 0x3C, 0x00, 0x40, 0xB0, 0xFF, 0xFF, 0xFA, 0x02, 0xF8, 0xB4,
-        0xA3, 0xDB, 0x08, 0xB5, 0x07, 0x7C, 0x01, 0x02, 0xDC, 0xF9, 0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40,
-        0x1C, 0x60, 0xB4, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB5, 0x07, 0xB5, 0x08, 0x28, 0xC4, 0x02,
-        0x99, 0xFE, 0x26, 0x05, 0x20, 0x44, 0x80, 0x26, 0x23, 0x00, 0x20, 0x2A, 0x00, 0x00, 0x40, 0x2A,
-        0x1F, 0x00, 0xBF, 0xB4, 0x40, 0x40, 0x09, 0x00, 0xA8, 0xFF, 0x20, 0x44, 0x99, 0xFE, 0x02, 0x05,
-        0x80, 0x2A, 0x03, 0x00, 0x40, 0xBC, 0x40, 0x40, 0x13, 0x00, 0x00, 0xF1, 0x80, 0xBC, 0x40, 0x40,
-        0x64, 0x44, 0xE0, 0x84, 0xE8, 0x84, 0x0A, 0x36, 0x29, 0x01, 0x0B, 0x36, 0x5A, 0x01, 0x28, 0xFB,
-        0x01, 0xF1, 0x29, 0xF9, 0x02, 0xF1, 0x2A, 0xF9, 0x03, 0xF1, 0x2B, 0xF9, 0xD0, 0xFE, 0xAE, 0xFF,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x82, 0x3E, 0x75, 0x44, 0x02, 0xB0, 0x01, 0xB0, 0x29, 0x02, 0xDC, 0x02,
-        0x04, 0xB0, 0x08, 0xB0, 0x0B, 0x02, 0x20, 0x02, 0x40, 0x26, 0xA7, 0xFF, 0x8C, 0xFF, 0x75, 0x40,
-        0x80, 0x2B, 0x01, 0x00, 0xAB, 0xFF, 0x75, 0x44, 0x8D, 0xFF, 0xEA, 0x01, 0x0A, 0xF3, 0xAA, 0xFF,
-        0x60, 0x40, 0x20, 0x2B, 0x02, 0x00, 0x60, 0xFF, 0x0D, 0x00, 0x01, 0x26, 0x0C, 0x00, 0xC0, 0x60,
-        0x00, 0x7C, 0xA0, 0x84, 0x80, 0x3B, 0x02, 0x00, 0xC0, 0x67, 0x03, 0x00, 0x40, 0x3B, 0x02, 0x00,
-        0x00, 0x67, 0x0A, 0xFB, 0xD5, 0x01, 0xD4, 0x01, 0xAB, 0xFF, 0x38, 0xFF, 0x00, 0x00, 0xD0, 0x01,
-        0x79, 0x63, 0xFF, 0xFF, 0xFF, 0x1F, 0xA9, 0xFF, 0x77, 0x44, 0x60, 0x57, 0x10, 0x60, 0x00, 0x75,
-        0x40, 0x4A, 0x01, 0x2A, 0x1C, 0x00, 0x24, 0x44, 0xAC, 0x86, 0x08, 0xF2, 0x18, 0x03, 0x24, 0x60,
-        0x58, 0x65, 0xD4, 0x80, 0x0E, 0xF2, 0x02, 0x03, 0xA5, 0xD5, 0x04, 0x00, 0x01, 0xBC, 0x0E, 0xFA,
-        0x09, 0xF4, 0xD1, 0xFE, 0x46, 0x44, 0x0B, 0x18, 0x66, 0x44, 0x10, 0xFB, 0x66, 0x47, 0x20, 0xBF,
-        0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x0E, 0xF2, 0x01, 0x75, 0x10, 0xBC, 0x0E, 0xFA, 0x2A, 0x44,
-        0x08, 0x2A, 0x18, 0x00, 0x23, 0x44, 0x00, 0xA8, 0x5C, 0x43, 0x14, 0x03, 0x24, 0x60, 0x52, 0x62,
-        0xA2, 0xD5, 0x01, 0x00, 0x09, 0xF4, 0x0E, 0xF2, 0x0D, 0x18, 0x08, 0xB0, 0x18, 0xAC, 0xFA, 0x03,
-        0x0E, 0xFA, 0x66, 0x43, 0x11, 0xFD, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2,
-        0xA2, 0xDB, 0x08, 0x75, 0x2A, 0x44, 0x06, 0x22, 0x2D, 0x00, 0x22, 0x44, 0x00, 0xA8, 0x60, 0x46,
-        0x0E, 0xF2, 0x28, 0x03, 0x10, 0xB0, 0x01, 0xBC, 0x03, 0x02, 0x00, 0x64, 0x40, 0x42, 0x22, 0x00,
-        0x0E, 0xFA, 0xD1, 0xFE, 0x24, 0x60, 0x4C, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x84, 0x00, 0x46, 0x42,
-        0x19, 0x02, 0x22, 0x47, 0x40, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x23, 0xF2, 0x66, 0x43,
-        0x00, 0xA8, 0x0E, 0xF2, 0x08, 0x02, 0x60, 0x40, 0x02, 0x2A, 0xE4, 0x01, 0x12, 0xFD, 0x10, 0x64,
-        0x0E, 0xFA, 0x02, 0x75, 0x07, 0x00, 0x60, 0x40, 0x04, 0x2A, 0xDC, 0x01, 0x12, 0xFD, 0x10, 0x64,
-        0x0E, 0xFA, 0x04, 0x75, 0x2A, 0x44, 0x80, 0x2A, 0x19, 0x00, 0x21, 0x44, 0xAC, 0x86, 0x0E, 0xF2,
-        0x15, 0x03, 0x01, 0xBC, 0x0E, 0xFA, 0xD1, 0xFE, 0x24, 0x60, 0x64, 0x64, 0x40, 0x47, 0x58, 0x4F,
-        0x5A, 0x00, 0x46, 0x41, 0x0B, 0x02, 0x21, 0x47, 0x10, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB,
-        0x0E, 0xF2, 0x66, 0x43, 0x08, 0xFD, 0x10, 0xBC, 0x0E, 0xFA, 0x80, 0x75, 0x2A, 0x44, 0x10, 0xB0,
-        0x20, 0x44, 0x15, 0x03, 0x7F, 0xB4, 0x40, 0x40, 0x1C, 0x60, 0xB4, 0x63, 0xA3, 0xD3, 0xFF, 0xFF,
-        0x20, 0xB0, 0x80, 0xB0, 0x09, 0x03, 0x08, 0x03, 0x40, 0xBC, 0x7F, 0xB4, 0x04, 0xB0, 0xA3, 0xDB,
-        0x03, 0x03, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40, 0xAC, 0x60, 0xD8, 0x78, 0xFF, 0xFF, 0x2A, 0x40,
-        0x08, 0x2B, 0x01, 0x00, 0x10, 0xFF, 0xAD, 0x60, 0x08, 0x78, 0xFF, 0xFF, 0xE8, 0xFE, 0x14, 0x05,
-        0xEA, 0xFE, 0x24, 0x05, 0xE9, 0xFE, 0x1C, 0x05, 0xE7, 0xFE, 0x09, 0x05, 0x47, 0xFF, 0x20, 0x44,
-        0x0F, 0x22, 0x03, 0x00, 0xCC, 0x84, 0x40, 0x40, 0x0F, 0x22, 0xB8, 0xFE, 0xEC, 0x01, 0x23, 0x41,
-        0x00, 0xB9, 0x5C, 0x4A, 0xE8, 0x02, 0x6A, 0x01, 0x24, 0x41, 0x00, 0xB9, 0x24, 0x60, 0x58, 0x65,
-        0x45, 0x47, 0xE1, 0x02, 0x58, 0x4F, 0x0F, 0x00, 0xDE, 0x02, 0x5C, 0x4A, 0x46, 0x44, 0x4C, 0x01,
-        0x22, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0x08, 0x24, 0x7D, 0x01, 0xD5, 0x01, 0x21, 0x41, 0x00, 0xB9,
-        0x5C, 0x4A, 0xA2, 0x03, 0xD0, 0x01, 0x27, 0xD3, 0x03, 0x00, 0x10, 0xB0, 0x09, 0xF2, 0x04, 0x03,
-        0xAC, 0x86, 0x0E, 0xF2, 0xFA, 0x02, 0x08, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0E, 0xF3, 0x0F, 0x60,
-        0xFE, 0x65, 0x0C, 0xF3, 0x24, 0x86, 0x24, 0x46, 0x60, 0x40, 0xFB, 0x3B, 0x07, 0x00, 0x80, 0x26,
-        0x02, 0x00, 0x23, 0x46, 0x03, 0x4C, 0x46, 0x61, 0x3A, 0x65, 0x0C, 0x00, 0x2E, 0xF3, 0x40, 0x45,
-        0xF8, 0x2B, 0x02, 0x00, 0x40, 0x45, 0x03, 0x00, 0x58, 0x4F, 0x39, 0x00, 0x07, 0x02, 0x58, 0x4F,
-        0x45, 0x00, 0x04, 0x05, 0x66, 0x50, 0x65, 0x52, 0x61, 0x51, 0x09, 0x00, 0x26, 0x47, 0x00, 0xBF,
-        0x0E, 0xFB, 0x2E, 0xF5, 0x05, 0xF0, 0x80, 0x60, 0x64, 0x50, 0x00, 0x72, 0x7E, 0x71, 0xAC, 0xFF,
-        0xAD, 0x60, 0x08, 0x78, 0xFF, 0xFF, 0x8E, 0xFF, 0x0F, 0xF3, 0x0F, 0x60, 0xFE, 0x65, 0x24, 0x86,
-        0x0D, 0xF3, 0x2E, 0xF3, 0x40, 0x45, 0xF8, 0x2B, 0x02, 0x00, 0x40, 0x45, 0x03, 0x00, 0x58, 0x4F,
-        0x16, 0x00, 0x07, 0x02, 0x58, 0x4F, 0x22, 0x00, 0x04, 0x05, 0x66, 0x50, 0x65, 0x52, 0x61, 0x51,
-        0x09, 0x00, 0x26, 0x47, 0x00, 0xBF, 0x0F, 0xFB, 0x2E, 0xF5, 0x05, 0xF0, 0x80, 0x60, 0x64, 0x50,
-        0x00, 0x72, 0x7E, 0x71, 0x8D, 0xFF, 0xAD, 0xFF, 0xAD, 0x60, 0x08, 0x78, 0xFF, 0xFF, 0x25, 0x44,
-        0xAA, 0xF1, 0xAB, 0xF1, 0xD0, 0x80, 0xD0, 0x80, 0x07, 0x04, 0x01, 0x06, 0x05, 0x00, 0x25, 0x46,
-        0x01, 0xF0, 0x03, 0x67, 0xA0, 0x85, 0x94, 0x80, 0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x46, 0x26, 0x41,
-        0x46, 0x63, 0x01, 0xF2, 0xFF, 0xFF, 0xFF, 0xB5, 0xD5, 0x81, 0x00, 0xF2, 0x05, 0x04, 0x04, 0x63,
-        0x60, 0x46, 0xF7, 0x1B, 0x42, 0xFE, 0x0D, 0x00, 0x61, 0x44, 0xC5, 0x81, 0x63, 0x45, 0xC5, 0x81,
-        0x9C, 0x84, 0xDC, 0x84, 0x01, 0xF2, 0xF0, 0x85, 0xF0, 0x80, 0x65, 0x44, 0xF8, 0x85, 0xFF, 0xFF,
-        0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x24, 0x60, 0x6A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0xAC, 0x86, 0x0E, 0xF2, 0x07, 0x03, 0x00, 0xA8, 0x09, 0xF2, 0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA,
-        0x08, 0xFE, 0x17, 0x00, 0xAC, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0, 0x00, 0xB4, 0x12, 0x06, 0x09, 0x60,
-        0x08, 0x61, 0x41, 0x4A, 0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF, 0xAE, 0x60, 0x58, 0x4E, 0xE4, 0x78,
-        0xFF, 0xFF, 0xA3, 0xFF, 0x06, 0x03, 0x2A, 0x43, 0xAF, 0x60, 0x58, 0x4E, 0x05, 0x78, 0xFF, 0xFF,
-        0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0x41, 0x4A, 0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF,
-        0xAE, 0x60, 0x58, 0x4E, 0xE4, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x2A, 0x43, 0xAF, 0x60, 0x58, 0x4E,
-        0x05, 0x78, 0xFF, 0xFF, 0x08, 0xFE, 0x0D, 0x00, 0x24, 0x60, 0x6A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0xAC, 0x86, 0x0E, 0xF2, 0x06, 0x03, 0x00, 0xA8, 0x09, 0xF2, 0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA,
-        0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0xAD, 0xF3, 0x7C, 0x63, 0x00, 0xBE, 0x40, 0x45,
-        0x1A, 0x03, 0x00, 0x65, 0x65, 0x44, 0xDC, 0x85, 0x84, 0xA1, 0x00, 0xF2, 0x06, 0x06, 0x01, 0xFC,
-        0x00, 0xA8, 0x60, 0x46, 0xF7, 0x02, 0x40, 0x45, 0x0E, 0x00, 0xAC, 0xF3, 0x00, 0x63, 0xD4, 0x84,
-        0xAC, 0xFB, 0x80, 0x60, 0x7C, 0x64, 0x01, 0xFA, 0x00, 0xF0, 0x00, 0xFC, 0xD3, 0x80, 0xAD, 0xF9,
-        0x02, 0x02, 0xAE, 0xF9, 0x08, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x66, 0x44, 0x25, 0x46, 0x05, 0xFA,
-        0x06, 0xFA, 0x01, 0xF0, 0x03, 0x67, 0x02, 0xFC, 0xB0, 0x84, 0x3A, 0x7E, 0x01, 0xFA, 0x12, 0x64,
-        0x03, 0xFA, 0x00, 0xF0, 0x04, 0xF8, 0x00, 0x64, 0x0C, 0x61, 0x10, 0x63, 0x59, 0xDA, 0xFE, 0x1F,
-        0x2E, 0x58, 0xFF, 0xFF, 0x27, 0x43, 0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05, 0x16, 0x03, 0x00, 0x61,
-        0x01, 0x00, 0xE4, 0x63, 0x61, 0x46, 0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84, 0xA2, 0xDA, 0xBE, 0xD2,
-        0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B, 0x25, 0x44, 0x61, 0x46, 0xA3, 0xDA, 0x04, 0x00, 0x0A, 0xFA,
-        0x60, 0x46, 0x25, 0x44, 0x09, 0xFA, 0x61, 0x46, 0xBE, 0xDA, 0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x44,
-        0x00, 0xA8, 0x07, 0x4B, 0x0C, 0x03, 0x58, 0x4F, 0x33, 0x00, 0x0B, 0x47, 0x24, 0x60, 0x5E, 0x65,
-        0x27, 0x44, 0xD4, 0x80, 0x00, 0x64, 0x01, 0x02, 0x0F, 0xFA, 0x58, 0x4F, 0xD3, 0x01, 0x70, 0x00,
-        0x25, 0x43, 0xE3, 0x84, 0x7C, 0x41, 0x02, 0x04, 0xE8, 0x81, 0xE4, 0x63, 0x61, 0x46, 0xA3, 0xD2,
-        0x00, 0x7C, 0x40, 0x45, 0xBF, 0xD8, 0xA3, 0xD8, 0xBE, 0xD8, 0x27, 0x42, 0x5A, 0xD3, 0x25, 0x5C,
-        0x60, 0x41, 0x02, 0x1B, 0x27, 0xD9, 0x05, 0x00, 0x25, 0x46, 0x0A, 0xFA, 0x61, 0x46, 0x25, 0x44,
-        0x09, 0xFA, 0x25, 0x44, 0x27, 0x43, 0x00, 0x61, 0x60, 0x46, 0x09, 0xF2, 0x08, 0xFC, 0x00, 0xA8,
-        0xDD, 0x81, 0xFA, 0x02, 0xBF, 0xD1, 0x66, 0x44, 0xBE, 0xDB, 0xC1, 0x84, 0xBF, 0xDB, 0x48, 0x00,
-        0x25, 0x46, 0xE4, 0x63, 0x08, 0xF2, 0x89, 0xF2, 0x1E, 0x18, 0x40, 0x47, 0xE0, 0x84, 0xE8, 0x85,
-        0x02, 0x05, 0xE8, 0x83, 0x00, 0x65, 0x65, 0x46, 0xBF, 0xD2, 0x61, 0x5C, 0xCC, 0x84, 0xA2, 0xDA,
-        0x25, 0x46, 0x0A, 0xF2, 0x00, 0xB9, 0x65, 0x46, 0x08, 0x24, 0xBE, 0xDA, 0x02, 0x1B, 0xA3, 0xD8,
-        0x02, 0x00, 0x60, 0x46, 0x89, 0xFA, 0x00, 0xB9, 0x61, 0x46, 0x08, 0x28, 0x0A, 0xFA, 0x25, 0x46,
-        0x89, 0xFC, 0x8A, 0xFC, 0x88, 0xFC, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x61, 0x28, 0x65, 0x25, 0x43,
-        0xAE, 0xF3, 0xAF, 0x83, 0x00, 0xBE, 0x18, 0x03, 0x02, 0x03, 0x00, 0xFC, 0x01, 0x00, 0xAD, 0xFD,
-        0x63, 0x46, 0x65, 0x44, 0xCC, 0x85, 0x00, 0xF2, 0x07, 0x02, 0xAE, 0xF5, 0x00, 0x64, 0x00, 0xFA,
-        0xDE, 0x60, 0xAF, 0x64, 0x09, 0xFB, 0x08, 0x00, 0x66, 0x43, 0x00, 0xBE, 0xDD, 0x81, 0xF1, 0x02,
-        0xAC, 0xF1, 0xAE, 0xFD, 0xC1, 0x84, 0xAC, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x45,
-        0x29, 0x43, 0xFC, 0xA3, 0x66, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x00, 0x64, 0xBD, 0xDB,
-        0x03, 0x61, 0x0E, 0x65, 0x24, 0x60, 0x72, 0x63, 0x43, 0x49, 0xA3, 0xD3, 0x06, 0xA3, 0x00, 0xA8,
-        0xCD, 0x81, 0x04, 0x02, 0xF9, 0x02, 0xAD, 0x60, 0x08, 0x78, 0xFF, 0xFF, 0x01, 0x26, 0xE6, 0x01,
-        0xD4, 0x80, 0x60, 0x45, 0xE3, 0x05, 0xF6, 0xA3, 0xBD, 0xD1, 0xBD, 0xD1, 0x44, 0x47, 0x44, 0x48,
-        0x44, 0x45, 0x24, 0x60, 0xB0, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x24, 0x60, 0x22, 0x63,
-        0x0D, 0x65, 0x00, 0x61, 0x41, 0x48, 0xA3, 0xD3, 0x06, 0xA3, 0xAC, 0x86, 0x00, 0x61, 0x09, 0x03,
-        0x00, 0xF2, 0x09, 0xF0, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x64, 0x44, 0xAC, 0x86,
-        0xF6, 0x01, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x65, 0x44, 0x28, 0x45, 0x45, 0x88, 0xCC, 0x85,
-        0x5A, 0x87, 0xE9, 0x02, 0x00, 0x64, 0x27, 0xDA, 0x5A, 0xDA, 0x5A, 0x87, 0xA9, 0xF3, 0xA8, 0xF1,
-        0x02, 0xA4, 0x60, 0x46, 0x60, 0x45, 0x00, 0x61, 0x1E, 0xF2, 0xFF, 0xFF, 0xAC, 0x86, 0x00, 0xF2,
-        0x04, 0x03, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x65, 0x44, 0x02, 0xA5, 0x65, 0x46,
-        0x64, 0x44, 0xCC, 0x9C, 0xFF, 0xFF, 0xF0, 0x02, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x5A, 0x87,
-        0x28, 0x45, 0x45, 0x88, 0x00, 0x64, 0x27, 0xDA, 0x5A, 0x87, 0x06, 0x60, 0x40, 0x65, 0xAD, 0xF3,
-        0x01, 0x61, 0xAC, 0x86, 0x00, 0xF2, 0x03, 0x03, 0xD5, 0x80, 0xDD, 0x81, 0xFA, 0x04, 0xCD, 0x84,
-        0x25, 0x46, 0x27, 0xDA, 0x28, 0x45, 0xC4, 0x84, 0x5A, 0xDA, 0xDA, 0x81, 0xAC, 0xF1, 0x59, 0xD8,
-        0x24, 0x60, 0x20, 0x64, 0x18, 0x63, 0xA0, 0xD1, 0x06, 0xA4, 0x59, 0xD8, 0xFC, 0x1F, 0x00, 0x64,
-        0x59, 0xDA, 0x59, 0xDA, 0x01, 0x60, 0x5C, 0x64, 0x0A, 0x63, 0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F,
-        0xDC, 0xF1, 0x59, 0xD8, 0x75, 0x01, 0x07, 0x4B, 0xAF, 0x60, 0x58, 0x4F, 0x70, 0x78, 0xFF, 0xFF,
-        0x0B, 0x47, 0x58, 0x4F, 0x21, 0x00, 0x6C, 0x01, 0x07, 0x4B, 0xAF, 0x60, 0x58, 0x4F, 0x70, 0x78,
-        0xFF, 0xFF, 0x0B, 0x47, 0x27, 0x44, 0x00, 0xBE, 0x08, 0xF0, 0x15, 0x03, 0x64, 0x42, 0x4A, 0xD3,
-        0x09, 0xF2, 0xDC, 0x83, 0xA2, 0xDD, 0x25, 0x43, 0x09, 0xFC, 0x63, 0x46, 0x27, 0x43, 0x0A, 0xFC,
-        0x09, 0xFA, 0x08, 0xF8, 0x00, 0xA8, 0x66, 0x43, 0x03, 0x02, 0x64, 0x44, 0x58, 0xDD, 0x03, 0x00,
-        0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA, 0x4C, 0x01, 0x27, 0x43, 0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05,
-        0x16, 0x03, 0x00, 0x61, 0x01, 0x00, 0xE4, 0x63, 0x61, 0x46, 0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84,
-        0xA2, 0xDA, 0xA3, 0xD2, 0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B, 0x25, 0x44, 0x61, 0x46, 0xBE, 0xDA,
-        0x04, 0x00, 0x09, 0xFA, 0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA, 0x61, 0x46, 0xA3, 0xDA, 0x2F, 0x58,
-        0xFF, 0xFF, 0xA0, 0xFE, 0x07, 0x05, 0xA3, 0xFE, 0x07, 0x05, 0xA1, 0xFE, 0x52, 0x05, 0x60, 0x64,
-        0x3B, 0xDB, 0x12, 0x00, 0x20, 0x58, 0xFF, 0xFF, 0x4F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x1C, 0x60,
-        0xB8, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0xFB, 0xB4, 0xA3, 0xDB, 0xA0, 0x4C, 0x59, 0xBC, 0xFF, 0xB4,
-        0xA0, 0x51, 0xA0, 0x4C, 0x7D, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x83, 0x3E, 0x40, 0x60,
-        0x0B, 0x65, 0x2B, 0x44, 0x00, 0x63, 0xE8, 0x80, 0xF8, 0x84, 0x02, 0x24, 0x94, 0x84, 0xF3, 0x83,
-        0xCD, 0x81, 0xFF, 0xFF, 0xF8, 0x02, 0xDF, 0x83, 0x2F, 0x58, 0x40, 0x4B, 0x00, 0x62, 0x01, 0x64,
-        0xD4, 0x80, 0xE0, 0x84, 0x1A, 0x03, 0xD4, 0x80, 0xE0, 0x84, 0x15, 0x03, 0x61, 0x44, 0x11, 0x61,
-        0xE0, 0x84, 0xCD, 0x81, 0xFD, 0x04, 0x01, 0x00, 0xE0, 0x84, 0xF2, 0x82, 0xFF, 0xFF, 0x02, 0x24,
-        0xC6, 0x82, 0x02, 0x28, 0xD6, 0x82, 0xE2, 0x80, 0xCD, 0x81, 0x02, 0x28, 0x01, 0xBC, 0xF4, 0x02,
-        0x01, 0x2A, 0xC6, 0x82, 0x03, 0x00, 0xE9, 0x81, 0xF2, 0x82, 0x61, 0x44, 0x2D, 0x58, 0xFF, 0xFF,
-        0x00, 0xA8, 0x10, 0x61, 0x04, 0x03, 0xF0, 0x84, 0xCD, 0x81, 0xFD, 0x04, 0x61, 0x44, 0x2D, 0x58,
-        0xFF, 0xFF, 0x00, 0x64, 0x3B, 0xDB, 0x3C, 0x44, 0xAC, 0x80, 0xFF, 0xFF, 0xBD, 0x02, 0x8B, 0xF3,
-        0x8C, 0xF3, 0x02, 0xA8, 0x02, 0xA8, 0x08, 0x02, 0x00, 0x64, 0x8D, 0xFB, 0x8B, 0xFB, 0x8C, 0xFB,
-        0x00, 0x64, 0x8E, 0xFB, 0xCA, 0xFE, 0x2D, 0x00, 0x03, 0x02, 0x00, 0x64, 0x8C, 0xFB, 0xCA, 0xFE,
-        0x01, 0x64, 0x3B, 0xDB, 0x24, 0x60, 0x28, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x14, 0x03, 0xDC, 0xF3, 0x2A, 0xF2, 0xFD, 0xA0, 0x60, 0x40, 0x80, 0x3A, 0x29, 0x00, 0x28, 0x02,
-        0x9B, 0xFE, 0x26, 0x05, 0x24, 0x60, 0x6E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xE5, 0x01, 0x8C, 0xF3, 0xFF, 0xFF, 0x01, 0xA8,
-        0xFF, 0xFF, 0x07, 0x02, 0x24, 0x60, 0x22, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x0F, 0x02, 0x86, 0xFF, 0x20, 0x40, 0x52, 0x27, 0x07, 0x00, 0x9A, 0xFE, 0x05, 0x04, 0x9D, 0xFE,
-        0x03, 0x04, 0xF1, 0xFE, 0x12, 0x64, 0x3B, 0xDB, 0x84, 0xFF, 0xB0, 0x60, 0x97, 0x78, 0xFF, 0xFF,
-        0x66, 0x44, 0xFC, 0xFB, 0x46, 0x5C, 0x2D, 0x60, 0x5A, 0x63, 0xA3, 0xD3, 0xB0, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x0D, 0xF2, 0x60, 0x5C, 0x64, 0x5F, 0x0D, 0xFA, 0x11, 0x64, 0x3B, 0xDB,
-        0x9D, 0xFE, 0x0B, 0x05, 0x24, 0x60, 0x92, 0x65, 0x08, 0x64, 0xA5, 0xDB, 0xB1, 0x60, 0x4D, 0x64,
-        0x4F, 0xFB, 0x2D, 0xFF, 0xB0, 0x60, 0xA4, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x00, 0x64, 0xD0, 0x80,
-        0xA9, 0xF3, 0x07, 0x02, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xB8, 0x60, 0x36, 0x78,
-        0xFF, 0xFF, 0xD0, 0x80, 0xD8, 0xF3, 0x40, 0x03, 0x60, 0x40, 0x03, 0x3A, 0x3D, 0x00, 0x66, 0x41,
-        0x64, 0x46, 0x6F, 0xF2, 0x61, 0x46, 0x64, 0x41, 0x4D, 0xF1, 0x60, 0x40, 0x03, 0x3A, 0x34, 0x00,
-        0x64, 0x40, 0xFF, 0x22, 0x31, 0x00, 0x05, 0x7E, 0x66, 0x45, 0x61, 0x46, 0x6F, 0xFA, 0x65, 0x46,
-        0x07, 0xF0, 0x00, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8,
-        0x6F, 0xF2, 0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03,
-        0x0E, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81,
-        0xE8, 0x84, 0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4,
-        0xFF, 0xFF, 0x00, 0x64, 0x4D, 0xFB, 0x4C, 0xFB, 0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2,
-        0x61, 0x46, 0xFF, 0xFF, 0xF0, 0x7E, 0x4E, 0xFB, 0x2A, 0xF2, 0x00, 0x63, 0x40, 0x47, 0x50, 0x36,
-        0x05, 0x00, 0xA4, 0x36, 0x03, 0x00, 0x80, 0x36, 0x01, 0x00, 0x01, 0x63, 0x48, 0xFD, 0x40, 0x47,
-        0x08, 0x2A, 0x0A, 0x00, 0x03, 0x2F, 0x08, 0x00, 0x81, 0xF1, 0x2C, 0xF8, 0x82, 0xF1, 0xFF, 0xFF,
-        0x2D, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0xFF, 0xFF, 0x4A, 0xF3, 0x35, 0xFA, 0x10, 0xA4, 0x4A, 0xFB,
-        0x00, 0x64, 0x15, 0xFA, 0x16, 0xFA, 0x0F, 0xFA, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46,
-        0x0E, 0xF0, 0x63, 0x46, 0x00, 0x7F, 0x64, 0x5E, 0x4B, 0xFB, 0x64, 0x44, 0x00, 0x7E, 0xDB, 0xFB,
-        0x07, 0xF0, 0xA9, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0xDB, 0xF3, 0xDA, 0xFB,
-        0x60, 0x41, 0x03, 0xF2, 0x00, 0xF4, 0x01, 0xF2, 0xFC, 0xA5, 0x00, 0x7F, 0xD4, 0x84, 0x27, 0x45,
-        0x3C, 0x46, 0x1A, 0xFA, 0x22, 0x63, 0x7B, 0x60, 0xFF, 0x64, 0xA4, 0x84, 0x03, 0x2B, 0x1C, 0x63,
-        0x2A, 0xFA, 0x60, 0x40, 0xA4, 0x36, 0x14, 0x63, 0x43, 0x4C, 0x00, 0x7C, 0x22, 0xF8, 0x64, 0x41,
-        0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x36, 0xF2, 0x63, 0x46, 0xFF, 0xB4, 0x22, 0xFA, 0x60, 0x40,
-        0x00, 0x36, 0x76, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x3A, 0xA5, 0x00, 0x03, 0xF2,
-        0x00, 0xF4, 0xA0, 0xD2, 0xAA, 0x60, 0xAA, 0x65, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64, 0x0A, 0x02,
-        0xD0, 0x80, 0x00, 0x64, 0x5A, 0xD0, 0x06, 0x02, 0xD0, 0x80, 0xF8, 0x7F, 0xD0, 0x80, 0x01, 0x03,
-        0x01, 0x02, 0x01, 0x61, 0x62, 0x43, 0x46, 0x43, 0x3C, 0x46, 0x07, 0xF4, 0x36, 0xF2, 0xFF, 0xFF,
-        0xA3, 0x46, 0x60, 0x40, 0x22, 0x26, 0x5C, 0x00, 0x60, 0x45, 0x63, 0x42, 0x5A, 0xD0, 0xCD, 0x81,
-        0x3C, 0x46, 0x14, 0x02, 0x64, 0x44, 0x88, 0x3A, 0x11, 0x00, 0x8E, 0x3B, 0x0F, 0x00, 0x65, 0x44,
-        0x01, 0x26, 0x7A, 0x00, 0x04, 0x26, 0x03, 0x00, 0x10, 0x26, 0x01, 0x00, 0x2D, 0x00, 0xA3, 0x46,
-        0x37, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B, 0x6F, 0x00, 0x56, 0x00, 0xA3, 0x46, 0x65, 0x44,
-        0x01, 0x26, 0x0B, 0x00, 0x04, 0x26, 0x03, 0x00, 0x10, 0x26, 0x01, 0x00, 0x1D, 0x00, 0x37, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x80, 0x27, 0x48, 0x00, 0x17, 0x00, 0xA9, 0xF3, 0xFF, 0xFF, 0x60, 0x46,
-        0x36, 0xF2, 0x66, 0x43, 0xFF, 0xB4, 0x3C, 0x46, 0x22, 0xF0, 0x60, 0x47, 0xB0, 0x84, 0x22, 0xFA,
-        0x63, 0x46, 0x37, 0xF0, 0x60, 0x40, 0x04, 0x27, 0x03, 0x00, 0x10, 0x27, 0x01, 0x00, 0x04, 0x00,
-        0x64, 0x40, 0x80, 0x27, 0x31, 0x00, 0x00, 0x00, 0x3C, 0x46, 0x02, 0x65, 0xB7, 0x60, 0x66, 0x78,
-        0xFF, 0xFF, 0xCD, 0x81, 0x63, 0x42, 0x5A, 0xD0, 0x3C, 0x46, 0x26, 0x02, 0x64, 0x44, 0x88, 0x3A,
-        0x23, 0x00, 0x77, 0x37, 0x39, 0x00, 0x78, 0x37, 0x37, 0x00, 0x8E, 0x37, 0x35, 0x00, 0xF1, 0x01,
-        0x2D, 0x60, 0x52, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x2D, 0x00, 0x07, 0x00,
-        0x2D, 0x60, 0x52, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0xE2, 0x01, 0x3C, 0x46,
-        0x3E, 0xF2, 0x40, 0x60, 0x00, 0x65, 0xF0, 0x84, 0xA4, 0x84, 0x18, 0xFA, 0x2A, 0xF2, 0xBF, 0x60,
-        0xFF, 0x65, 0xA4, 0x84, 0x2A, 0xFA, 0x18, 0x00, 0x3C, 0x46, 0x22, 0xF0, 0x80, 0x67, 0xB0, 0x84,
-        0xA2, 0xDA, 0xFF, 0xFF, 0x3F, 0xF2, 0x3E, 0xF0, 0x08, 0xA4, 0x60, 0x41, 0x22, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x03, 0x00, 0x06, 0x00, 0x04, 0x2B, 0x04, 0x00,
-        0x61, 0x44, 0x64, 0x40, 0x10, 0x26, 0x3F, 0xFA, 0x3C, 0x46, 0x2C, 0xF2, 0x27, 0x40, 0x01, 0x27,
-        0x32, 0xF2, 0xD5, 0xF1, 0x60, 0x40, 0x01, 0x26, 0x53, 0x00, 0x09, 0x60, 0x00, 0x64, 0xD0, 0x80,
-        0x3F, 0xF2, 0x09, 0x06, 0x2C, 0x45, 0xC4, 0x84, 0xD0, 0x80, 0x40, 0x4A, 0x40, 0x06, 0x60, 0x43,
-        0x64, 0x44, 0x54, 0x88, 0x18, 0x00, 0x60, 0x45, 0x28, 0x60, 0x36, 0x64, 0xA0, 0xD3, 0xDB, 0xF3,
-        0x00, 0xBC, 0x60, 0x47, 0xEC, 0xA0, 0x33, 0x03, 0x32, 0x07, 0x2C, 0x44, 0xC4, 0x81, 0x02, 0x60,
-        0x1C, 0x65, 0x45, 0x4A, 0xD5, 0x80, 0x2C, 0x45, 0x2A, 0x06, 0x27, 0x40, 0x04, 0x27, 0x30, 0x00,
-        0x2A, 0x43, 0xD7, 0x85, 0x45, 0x48, 0xD6, 0xF1, 0x0F, 0xF2, 0xD3, 0x80, 0x01, 0x65, 0x01, 0x07,
-        0x00, 0x65, 0xB4, 0x84, 0x0F, 0xFA, 0x00, 0x63, 0x3F, 0xF2, 0x28, 0x45, 0x60, 0x41, 0xD4, 0x84,
-        0xDF, 0x83, 0xFC, 0x07, 0x14, 0xFC, 0x61, 0x44, 0x01, 0x36, 0x02, 0x00, 0x09, 0x3A, 0x06, 0x00,
-        0x28, 0x44, 0x48, 0x88, 0x2A, 0x44, 0xC8, 0x83, 0x43, 0x4A, 0xE5, 0x01, 0x17, 0xFA, 0x04, 0x60,
-        0x00, 0x64, 0x27, 0x45, 0xB4, 0x84, 0x2A, 0xFA, 0x28, 0x43, 0x16, 0xFC, 0x0D, 0x00, 0x3F, 0xF2,
-        0x2C, 0x45, 0xD6, 0xF1, 0xC4, 0x81, 0xD1, 0x80, 0x0F, 0xF2, 0x01, 0x06, 0x01, 0xBC, 0x0F, 0xFA,
-        0x3F, 0xF2, 0x17, 0xFA, 0x01, 0x64, 0x14, 0xFA, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x0E, 0xF0,
-        0x63, 0x46, 0x00, 0x7F, 0x64, 0x5E, 0x4B, 0xFB, 0x64, 0x44, 0x00, 0x7E, 0xDB, 0xFB, 0x7C, 0xF1,
-        0x60, 0x43, 0x60, 0x47, 0xD0, 0x80, 0xC0, 0x65, 0x01, 0x06, 0x64, 0x44, 0x0A, 0x36, 0x70, 0x64,
-        0x14, 0x36, 0x38, 0x64, 0x37, 0x36, 0x15, 0x64, 0x6E, 0x36, 0x0B, 0x64, 0x44, 0x86, 0x2A, 0xF2,
-        0x07, 0xF0, 0x60, 0x40, 0xB0, 0x3A, 0x03, 0x00, 0x40, 0x3B, 0x01, 0x00, 0x12, 0x00, 0x0C, 0xB4,
-        0x08, 0x3A, 0x55, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B, 0x50, 0x00, 0x17, 0xF2,
-        0x22, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x22, 0x22, 0x04, 0x00, 0x00, 0xA8, 0x01, 0xA8, 0x47, 0x03,
-        0x46, 0x03, 0x3C, 0x46, 0x2A, 0xF0, 0x40, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x60, 0x45, 0x22, 0xF2,
-        0xFF, 0xFF, 0x60, 0x43, 0x60, 0x40, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x0A, 0x00, 0x02, 0x00,
-        0x04, 0x27, 0x07, 0x00, 0x65, 0x44, 0x2A, 0x65, 0x60, 0x40, 0x03, 0x2B, 0x24, 0x65, 0x45, 0x4C,
-        0x2E, 0x00, 0x65, 0x44, 0x2E, 0x65, 0x60, 0x40, 0x03, 0x2B, 0x28, 0x65, 0x45, 0x4C, 0x07, 0xF0,
-        0xA9, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0x00, 0x7C, 0x03, 0x03, 0x63, 0x40, 0x01, 0x2A, 0x01, 0x00,
-        0x3D, 0xF1, 0x2A, 0xF2, 0xFF, 0xFF, 0x08, 0xB0, 0x3E, 0xF2, 0x19, 0x03, 0x60, 0x47, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0x03, 0xB4, 0xD0, 0x80, 0xFF, 0xFF, 0x11, 0x03, 0x24, 0x60, 0x6E, 0x62,
-        0x24, 0x60, 0x46, 0x64, 0xA2, 0xDB, 0x3C, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x5C, 0x5C, 0xFC, 0xFC, 0xCE, 0xFE, 0xB0, 0x60, 0xE1, 0x78, 0xFF, 0xFF, 0xDB, 0xF1,
-        0x2C, 0x45, 0x64, 0x43, 0x17, 0xF2, 0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81,
-        0x63, 0x40, 0x37, 0x37, 0xE1, 0x81, 0x64, 0x45, 0xB0, 0x60, 0x58, 0x4D, 0xB6, 0x78, 0xFF, 0xFF,
-        0xAE, 0x82, 0xFC, 0xA2, 0x0A, 0x03, 0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41, 0x04, 0x0D,
-        0x63, 0x44, 0x80, 0x7E, 0xDB, 0xFB, 0x61, 0x44, 0xDC, 0x84, 0x2B, 0xF0, 0x1B, 0xFA, 0x64, 0x44,
-        0x80, 0x27, 0x34, 0x00, 0x16, 0xF2, 0x0F, 0xF0, 0xAC, 0x84, 0x2C, 0x45, 0x29, 0x03, 0x4B, 0xF1,
-        0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x63, 0x40, 0x37, 0x37, 0xE1, 0x81, 0x64, 0x45,
-        0x0F, 0xF0, 0xB0, 0x60, 0x58, 0x4D, 0xB6, 0x78, 0xFF, 0xFF, 0xAE, 0x82, 0xFC, 0xA2, 0x0A, 0x03,
-        0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41, 0x04, 0x0D, 0x80, 0x67, 0xB0, 0x84, 0x0F, 0xFA,
-        0x61, 0x44, 0xDC, 0x84, 0x1D, 0xFA, 0xDE, 0x65, 0xC4, 0x85, 0x26, 0x41, 0xE1, 0x81, 0xC5, 0x84,
-        0x2B, 0xFA, 0x1B, 0xF0, 0xDE, 0x64, 0xC0, 0x85, 0x26, 0x44, 0xE0, 0x84, 0xC4, 0x84, 0x10, 0xFA,
-        0x26, 0x44, 0x2C, 0xF0, 0x0A, 0xA4, 0x64, 0x40, 0x01, 0x26, 0x00, 0x64, 0x11, 0xFA, 0xDB, 0xF3,
-        0x13, 0xFA, 0xFF, 0xFF, 0x0D, 0xF2, 0x3E, 0xF0, 0x60, 0x47, 0xFF, 0xB4, 0x64, 0x41, 0x01, 0xB1,
-        0x01, 0x63, 0x1D, 0x02, 0x60, 0x41, 0xFF, 0x22, 0x04, 0x00, 0xB0, 0x60, 0x58, 0x4F, 0xA7, 0x78,
-        0xFF, 0xFF, 0x0F, 0x60, 0x92, 0x64, 0xA0, 0xDD, 0x2D, 0x60, 0x5A, 0x62, 0xA2, 0xD3, 0xB0, 0x60,
-        0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x60, 0x41, 0x01, 0x63, 0x61, 0x40, 0xFF, 0x22, 0x04, 0x00,
-        0xB0, 0x60, 0x58, 0x4F, 0xA7, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0x94, 0x64, 0xA0, 0xDD, 0x2A, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27, 0x03, 0x00, 0xB5, 0x60, 0x19, 0x78, 0xFF, 0xFF, 0x22, 0xF2,
-        0x46, 0x43, 0x60, 0x40, 0x22, 0x26, 0x8B, 0x00, 0x01, 0x26, 0x05, 0x00, 0x04, 0x26, 0x0C, 0x00,
-        0xB5, 0x60, 0x19, 0x78, 0xFF, 0xFF, 0x04, 0x27, 0x03, 0x00, 0xB5, 0x60, 0x19, 0x78, 0xFF, 0xFF,
-        0xA9, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x02, 0x00, 0x07, 0xF4, 0xFF, 0xFF, 0xA3, 0x46, 0x2A, 0xF2,
-        0xA3, 0x46, 0x60, 0x40, 0x08, 0x27, 0x3B, 0x00, 0xA9, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x37, 0xF0,
-        0x08, 0x03, 0x64, 0x40, 0x10, 0x2A, 0x12, 0x00, 0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84, 0x37, 0xFA,
-        0x24, 0x00, 0x3D, 0xF3, 0x01, 0x61, 0x60, 0x43, 0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D, 0xE9, 0x81,
-        0xA1, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0x91, 0x84, 0x37, 0xFA, 0x17, 0x00, 0x47, 0xF2, 0xFF, 0xFF,
-        0x10, 0xA0, 0xFF, 0xFF, 0x02, 0x04, 0xFF, 0x60, 0xFF, 0x64, 0xDC, 0x84, 0x47, 0xFA, 0x46, 0xF2,
-        0x16, 0x04, 0xDC, 0x84, 0x46, 0xFA, 0x45, 0xF2, 0x08, 0x04, 0xDC, 0x84, 0x45, 0xFA, 0x05, 0x04,
-        0x37, 0xF2, 0xFF, 0xFF, 0xE0, 0x84, 0xE8, 0x84, 0x37, 0xFA, 0x0D, 0x60, 0x3E, 0x62, 0x80, 0xFF,
-        0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xBE, 0x60, 0x66, 0x78, 0xFF, 0xFF, 0x84, 0xFF, 0x0D, 0x60,
-        0x3E, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xBE, 0x60, 0xDE, 0x78, 0xFF, 0xFF,
-        0x84, 0xFF, 0xA9, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43, 0x3C, 0x46,
-        0x22, 0xF2, 0x63, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x47, 0xF0, 0x64, 0x41,
-        0x64, 0x47, 0xFF, 0xB4, 0x60, 0x5F, 0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47, 0xA3, 0x46,
-        0x3A, 0xFA, 0x64, 0x44, 0x20, 0x7F, 0x34, 0x94, 0x3B, 0xFA, 0xA3, 0x46, 0x46, 0xF2, 0x45, 0xF0,
-        0xA3, 0x46, 0x3C, 0xFA, 0x3D, 0xF8, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A,
-        0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x8A, 0x00, 0x2A, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x08, 0x27, 0x35, 0x00, 0x2A, 0xF2, 0x00, 0x60, 0x7C, 0x62, 0x60, 0x40,
-        0x40, 0x2B, 0x27, 0x00, 0xA2, 0xD3, 0x00, 0x61, 0x60, 0xFE, 0xA0, 0xD3, 0xDE, 0x82, 0xA2, 0xD1,
-        0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81, 0xC0, 0x2B, 0x04, 0x00, 0x80, 0x2A,
-        0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00, 0x60, 0x47, 0xDC, 0x87, 0x01, 0x61,
-        0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE, 0xDA, 0x82, 0xA2, 0xD1, 0xFF, 0xFF,
-        0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64, 0xA2, 0xDB, 0xFF, 0xFF,
-        0x20, 0xFE, 0x00, 0x60, 0x7C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD3, 0x5A, 0xD1, 0x3A, 0xFA,
-        0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x80, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1, 0x64, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5A, 0x65, 0x40, 0x0D, 0x3A,
-        0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5A, 0x64, 0x47,
-        0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEE, 0x7F,
-        0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5A, 0x08, 0x60, 0x00, 0xEA, 0x65, 0x44,
-        0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60,
-        0x00, 0xEA, 0x02, 0x64, 0x3B, 0xDB, 0xB8, 0x60, 0xBE, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0xFC, 0xFB,
-        0x07, 0xF0, 0x00, 0x64, 0xD0, 0x80, 0xA9, 0xF3, 0x17, 0x03, 0xD0, 0x80, 0x66, 0x41, 0x64, 0x46,
-        0x6F, 0xF2, 0x61, 0x46, 0x7B, 0x03, 0x60, 0x40, 0x00, 0x36, 0x78, 0x00, 0x47, 0xF1, 0x07, 0xF0,
-        0x64, 0x40, 0x02, 0x26, 0x01, 0x00, 0x0B, 0x00, 0x03, 0x12, 0xB6, 0x60, 0x38, 0x78, 0xFF, 0xFF,
-        0xFC, 0x0A, 0xB7, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0xB7, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0x66, 0x41,
-        0x64, 0x46, 0x0E, 0xF2, 0x60, 0x45, 0x61, 0x46, 0x10, 0x7E, 0x4E, 0xFB, 0x65, 0x44, 0x60, 0x40,
-        0x01, 0x36, 0x5C, 0x00, 0x02, 0x36, 0x5D, 0x00, 0x03, 0x36, 0x34, 0x00, 0x04, 0x36, 0x45, 0x00,
-        0x67, 0x00, 0x00, 0x64, 0x4C, 0xFB, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x05, 0x7E,
-        0x6F, 0xFA, 0x61, 0x46, 0x00, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA,
-        0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0,
-        0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00,
-        0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA,
-        0x0C, 0xF4, 0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xFF, 0xFF, 0xA0, 0x7E,
-        0x4E, 0xFB, 0x24, 0x00, 0x4C, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x4C, 0xFB, 0xCB, 0xF3, 0x60, 0x45,
-        0xD4, 0x80, 0xFF, 0xFF, 0x1B, 0x02, 0x24, 0x60, 0xA6, 0x62, 0x0F, 0x60, 0x96, 0x64, 0xA2, 0xDB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xBC, 0x01, 0x4C, 0xF3, 0x66, 0x41, 0xDC, 0x84,
-        0x4C, 0xFB, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x03, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x66, 0x41,
-        0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xFF, 0xFF, 0xA4, 0x7E, 0x4E, 0xFB, 0xB7, 0x60, 0x56, 0x78,
-        0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x6F, 0xFA, 0x61, 0x46,
-        0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xFF, 0xFF, 0xA8, 0x7E, 0x4E, 0xFB, 0xEE, 0x01,
-        0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0x8C, 0xFA, 0x60, 0x47, 0x70, 0xF2, 0xFF, 0xB5, 0x08, 0x18,
-        0xE4, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0xFB, 0x04, 0x01, 0x64, 0x01, 0x00, 0x00, 0x64,
-        0x0C, 0xF4, 0x00, 0xA8, 0xFF, 0xFF, 0xDD, 0x02, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF,
-        0x60, 0x47, 0x70, 0xF2, 0xFF, 0xB5, 0x61, 0x46, 0x00, 0xA8, 0xFF, 0xFF, 0x29, 0x03, 0xE0, 0x84,
-        0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0x66, 0x41, 0x64, 0x46, 0x70, 0xFA, 0x61, 0x46, 0x01, 0x65,
-        0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03,
-        0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84,
-        0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81,
-        0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF, 0x95, 0x01,
-        0x94, 0x01, 0x65, 0x44, 0x60, 0x40, 0x01, 0x36, 0xA1, 0x01, 0x02, 0x36, 0x01, 0x00, 0x9E, 0x01,
-        0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x00, 0x65,
-        0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03,
-        0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84,
-        0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81,
-        0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF, 0x66, 0x41,
-        0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xD0, 0x7E, 0x4E, 0xFB, 0xB7, 0x60, 0x56, 0x78, 0xFF, 0xFF,
-        0x60, 0x45, 0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0x20, 0x7E, 0x4E, 0xFB, 0x65, 0x44,
-        0x60, 0x40, 0x01, 0x36, 0x0B, 0x00, 0x02, 0x36, 0x1A, 0x00, 0x03, 0x36, 0x53, 0x00, 0x04, 0x36,
-        0x70, 0x00, 0x05, 0x36, 0x14, 0x00, 0xB7, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x41,
-        0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x02, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x66, 0x41, 0x64, 0x46,
-        0x0E, 0xF2, 0x61, 0x46, 0xB0, 0x7E, 0x4E, 0xFB, 0xB7, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0x07, 0xF0,
-        0x01, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2,
-        0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84,
-        0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF,
-        0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0x00, 0x63, 0x03, 0x7E, 0x6F, 0xFA, 0x61, 0x46, 0x4C, 0xFD,
-        0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xB4, 0x7E, 0x4E, 0xFB, 0x24, 0x60, 0xA6, 0x62,
-        0x0F, 0x60, 0x96, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xB7, 0x60,
-        0x56, 0x78, 0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x4C, 0xF3, 0x02, 0xB0, 0x61, 0x46,
-        0xCC, 0x84, 0x05, 0x03, 0x04, 0x28, 0x4C, 0xFB, 0xB7, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0x04, 0x28,
-        0x4C, 0xFB, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x04, 0x7E, 0x6F, 0xFA, 0x61, 0x46,
-        0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xB8, 0x7E, 0x4E, 0xFB, 0xB7, 0x60, 0x56, 0x78,
-        0xFF, 0xFF, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2,
-        0x61, 0x46, 0xFF, 0xA0, 0xFF, 0xFF, 0x35, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02,
-        0xFB, 0x04, 0x2F, 0x00, 0x64, 0x46, 0x70, 0xFA, 0x01, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46,
-        0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2, 0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2,
-        0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02,
-        0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84, 0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65,
-        0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF, 0x6F, 0xF2, 0x00, 0x63, 0x03, 0x7E, 0x6F, 0xFA,
-        0x3C, 0x46, 0x4C, 0xFD, 0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xC0, 0x7E, 0x4E, 0xFB,
-        0x5D, 0x00, 0x5C, 0x00, 0x65, 0x44, 0x60, 0x40, 0x01, 0x36, 0x03, 0x00, 0x02, 0x36, 0x18, 0x00,
-        0x55, 0x00, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x61, 0x46, 0x01, 0xB0, 0xFF, 0xFF, 0x4E, 0x02,
-        0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x02, 0x7E, 0x6F, 0xFA, 0x61, 0x46,
-        0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xE0, 0x7E, 0x4E, 0xFB, 0x3F, 0x00, 0x3E, 0x00,
-        0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x6F, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x6F, 0xFA, 0x60, 0x47,
-        0xFF, 0xB5, 0x70, 0xF2, 0x61, 0x46, 0xFF, 0xA0, 0xFF, 0xFF, 0xF1, 0x06, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0xEB, 0x01, 0x66, 0x41, 0x64, 0x46, 0x70, 0xFA, 0x61, 0x46,
-        0x00, 0x65, 0x65, 0x43, 0x66, 0x41, 0x64, 0x46, 0x70, 0xF2, 0x8C, 0xFA, 0x00, 0xA8, 0x6F, 0xF2,
-        0x15, 0x03, 0x60, 0x47, 0xFF, 0xB5, 0x70, 0xF2, 0x00, 0xBB, 0xFF, 0xA0, 0x07, 0x03, 0x0E, 0x06,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0x02, 0x02, 0xFB, 0x04, 0x08, 0x00, 0xB9, 0x81, 0xE8, 0x84,
-        0xD9, 0x81, 0xFD, 0x04, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x0C, 0xF4, 0xFF, 0xFF,
-        0x66, 0x41, 0x64, 0x46, 0x0E, 0xF2, 0x61, 0x46, 0xE4, 0x7E, 0x4E, 0xFB, 0x03, 0x64, 0x3B, 0xDB,
-        0xCA, 0xFE, 0x47, 0xF1, 0x01, 0x65, 0x32, 0x40, 0x04, 0x27, 0x08, 0x00, 0x2C, 0xF2, 0x64, 0x45,
-        0x02, 0x22, 0x04, 0x00, 0x60, 0x40, 0x01, 0x26, 0x01, 0x00, 0xE3, 0x00, 0x14, 0xF2, 0x65, 0x40,
-        0x01, 0x26, 0x1D, 0x00, 0x60, 0x45, 0x05, 0x64, 0x3B, 0xDB, 0x65, 0x44, 0xCC, 0x85, 0xB8, 0xF1,
-        0x27, 0x60, 0x78, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05,
-        0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64,
-        0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xAF, 0x00, 0x60, 0x41,
-        0x2A, 0xF0, 0x00, 0x60, 0x0C, 0x64, 0xA0, 0x84, 0x04, 0x36, 0x02, 0x00, 0x0C, 0x3A, 0x01, 0x00,
-        0xA5, 0x00, 0x61, 0x45, 0x60, 0x41, 0xB8, 0xF1, 0x27, 0x60, 0x78, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x61, 0x40, 0x08, 0x36, 0x01, 0x00, 0x88, 0x00, 0x14, 0xF2, 0x1C, 0x65,
-        0x60, 0x41, 0x00, 0x63, 0xCD, 0x81, 0xC7, 0x83, 0xFD, 0x02, 0x3F, 0xF0, 0x2C, 0xF2, 0xC3, 0x83,
-        0x60, 0x40, 0x01, 0x2A, 0x29, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x76, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xB8, 0xF1, 0x27, 0x60, 0x7C, 0x64, 0xA0, 0xD3,
-        0x63, 0x45, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF,
-        0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x52, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x74, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE,
-        0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xB8, 0xF1, 0x27, 0x60, 0x7A, 0x64,
-        0xA0, 0xD3, 0x63, 0x45, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80,
-        0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x15, 0xF2, 0xFF, 0xFF, 0x0F, 0xB4, 0x00, 0xA8,
-        0x01, 0xA8, 0x24, 0x03, 0x12, 0x03, 0xB8, 0xF1, 0x27, 0x60, 0x82, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x11, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x80, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x04, 0x64, 0x3B, 0xDB,
-        0x24, 0x60, 0x6E, 0x62, 0x24, 0x60, 0x46, 0x64, 0xA2, 0xDB, 0x3C, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x5C, 0x5C, 0xFC, 0xFC, 0xCE, 0xFE, 0xB0, 0x60, 0xE1, 0x78,
-        0xFF, 0xFF, 0x0F, 0xF0, 0x15, 0xF2, 0x64, 0x41, 0x01, 0x2A, 0x02, 0x00, 0xD1, 0xF1, 0x02, 0x00,
-        0xD0, 0xF1, 0xFF, 0xFF, 0x64, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x15, 0xFA, 0x30, 0x07, 0x61, 0x40,
-        0x01, 0x2A, 0x09, 0x00, 0x27, 0x60, 0xA8, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF,
-        0x08, 0x28, 0xA2, 0xDB, 0x08, 0x00, 0x27, 0x60, 0xAA, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84,
-        0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x2A, 0xF0, 0x08, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x00, 0x64,
-        0x48, 0xFB, 0x2D, 0x60, 0x52, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0C, 0x00,
-        0x3C, 0x46, 0x3E, 0xF2, 0x40, 0x60, 0x00, 0x65, 0xF0, 0x84, 0xA4, 0x84, 0x18, 0xFA, 0x2A, 0xF2,
-        0xBF, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x2A, 0xFA, 0xB2, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0x00, 0x64,
-        0x49, 0xFB, 0xB8, 0xF1, 0x27, 0x60, 0x82, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0xB8, 0xF1, 0x27, 0x60, 0x84, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84,
-        0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF,
-        0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x2D, 0x60, 0x5A, 0x63, 0xA3, 0xD3, 0xB0, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x0D, 0xF2, 0x60, 0x5C, 0x64, 0x5F, 0x0D, 0xFA, 0x23, 0xF0, 0x01, 0x64,
-        0xB0, 0x84, 0xA2, 0xDA, 0x7B, 0x01, 0xB9, 0x60, 0x43, 0x78, 0xFF, 0xFF, 0x21, 0x64, 0x3B, 0xDB,
-        0x31, 0xF3, 0x01, 0x63, 0xC4, 0xB4, 0x31, 0xFB, 0x32, 0xFD, 0xB8, 0x60, 0xEF, 0x62, 0x42, 0x40,
-        0xA0, 0x4C, 0x40, 0xBC, 0x7D, 0xB4, 0xA0, 0x51, 0xA0, 0xFE, 0x1A, 0xFF, 0x24, 0x60, 0x3A, 0x64,
-        0x08, 0xF0, 0x07, 0xF0, 0xD0, 0x80, 0x24, 0x60, 0x40, 0x62, 0x14, 0x02, 0xA2, 0xD3, 0x01, 0x63,
-        0xAC, 0x86, 0x07, 0xF2, 0x0F, 0x03, 0xD0, 0x80, 0x09, 0xF2, 0xFA, 0x02, 0x23, 0xFC, 0x24, 0x60,
-        0x6E, 0x62, 0x24, 0x60, 0x46, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0x3C, 0x46, 0x06, 0x64, 0xA1, 0xFF, 0x49, 0xFB, 0x83, 0x3E, 0x31, 0xF3,
-        0x87, 0x60, 0x80, 0x61, 0x1D, 0xF0, 0x60, 0x40, 0x01, 0x2A, 0x15, 0x00, 0xFE, 0xB4, 0x31, 0xFB,
-        0x00, 0x64, 0x49, 0xFB, 0x01, 0x64, 0x47, 0xFB, 0x2D, 0x60, 0x5A, 0x63, 0xA3, 0xD3, 0xB0, 0x60,
-        0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x71, 0x64, 0x5F, 0x0D, 0xFA, 0x40, 0x64, 0x3B, 0xDB,
-        0xB9, 0x60, 0x43, 0x78, 0xFF, 0xFF, 0x02, 0x2A, 0x1B, 0x00, 0xD1, 0x91, 0x8D, 0xE2, 0x41, 0x64,
-        0x3B, 0xDB, 0x31, 0xF3, 0x2D, 0x60, 0x62, 0x63, 0xFD, 0xB4, 0x31, 0xFB, 0xA3, 0xD3, 0xB0, 0x60,
-        0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x02, 0x63, 0x60, 0x5C, 0x0D, 0xF2, 0x47, 0xFD, 0xFF, 0xB5,
-        0x60, 0x47, 0xD0, 0x80, 0xDC, 0x84, 0x1F, 0x03, 0x60, 0x47, 0xB4, 0x84, 0x0D, 0xFA, 0x1B, 0x00,
-        0x08, 0x2A, 0x07, 0x00, 0x42, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xF7, 0xB4, 0x31, 0xFB,
-        0x12, 0x00, 0x10, 0x2A, 0x09, 0x00, 0x43, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xEF, 0xB4,
-        0x31, 0xFB, 0xB8, 0x60, 0xBE, 0x78, 0xFF, 0xFF, 0x44, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF,
-        0xDF, 0xB4, 0x31, 0xFB, 0x00, 0x00, 0x2A, 0x64, 0x3B, 0xDB, 0xB0, 0x60, 0x97, 0x64, 0x40, 0x40,
-        0xB5, 0x60, 0x1E, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xB8, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x02, 0xB5,
-        0x04, 0xB5, 0x04, 0x03, 0x03, 0x03, 0xBA, 0x60, 0x3C, 0x78, 0xFF, 0xFF, 0x86, 0xFF, 0x20, 0x44,
-        0x84, 0xFF, 0x20, 0x2A, 0x04, 0x00, 0xF3, 0x60, 0x58, 0x4E, 0x14, 0x78, 0xFF, 0xFF, 0x31, 0x40,
-        0x01, 0x26, 0x17, 0x00, 0xA0, 0x4C, 0x49, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0x1C, 0x60, 0xB8, 0x63,
-        0xA3, 0xD3, 0xFF, 0xFF, 0x02, 0xB5, 0x04, 0xBC, 0x09, 0x03, 0x60, 0x40, 0x01, 0x26, 0xED, 0xE2,
-        0xFE, 0xB4, 0xA3, 0xDB, 0xA0, 0x4C, 0x7D, 0xB4, 0xA0, 0x51, 0x03, 0x00, 0xA0, 0x4C, 0x6D, 0xB4,
-        0xA0, 0x51, 0xDC, 0xF3, 0xFF, 0xFF, 0xFD, 0xA0, 0xFF, 0xFF, 0x48, 0x03, 0x31, 0x40, 0x04, 0x2A,
-        0x3E, 0x00, 0x6D, 0xF3, 0x74, 0xF3, 0xCC, 0x83, 0x6D, 0xFD, 0xCC, 0x84, 0x74, 0xFB, 0x1F, 0x02,
-        0x31, 0x40, 0x02, 0x2A, 0x12, 0x00, 0x6F, 0xF3, 0x70, 0xF1, 0xCC, 0x84, 0x6F, 0xFB, 0x0D, 0x02,
-        0x6F, 0xF9, 0x31, 0x44, 0x08, 0xBC, 0x40, 0x51, 0x72, 0xF3, 0x71, 0xF1, 0x00, 0xB8, 0x64, 0x45,
-        0x01, 0x03, 0x67, 0x45, 0x65, 0x50, 0xCC, 0x84, 0x73, 0xFB, 0x28, 0x60, 0x00, 0x64, 0xA0, 0xD3,
-        0x6E, 0xF1, 0x00, 0xB8, 0x74, 0xF9, 0x03, 0x03, 0x87, 0xF3, 0x6D, 0xFB, 0x04, 0x00, 0x6D, 0xF3,
-        0x87, 0xF1, 0x15, 0x1B, 0x6D, 0xF9, 0x31, 0x40, 0x01, 0x2A, 0x11, 0x00, 0xDD, 0xFE, 0x0F, 0x05,
-        0xBA, 0xFE, 0xAD, 0x4F, 0x00, 0x7F, 0x01, 0xBC, 0xA0, 0x5D, 0x00, 0xEE, 0x7F, 0xF1, 0x02, 0x60,
-        0xEE, 0x64, 0xA3, 0xFB, 0xA4, 0xF9, 0x04, 0x64, 0xA5, 0xFB, 0xDF, 0xFE, 0x19, 0xFF, 0x1A, 0x60,
-        0x42, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xFF, 0x2B, 0xA2, 0xDB, 0x31, 0x40, 0x01, 0x2A,
-        0x29, 0x00, 0x9D, 0xFE, 0x27, 0x04, 0x26, 0x0A, 0x9F, 0xFE, 0x24, 0x05, 0x85, 0xFF, 0x20, 0x44,
-        0x84, 0xFF, 0x40, 0x26, 0x1F, 0x00, 0x3F, 0x40, 0x20, 0x2B, 0x1C, 0x00, 0x38, 0x69, 0xFF, 0xFF,
-        0x68, 0x44, 0x01, 0x16, 0xFD, 0x01, 0x01, 0x2A, 0x15, 0x00, 0x27, 0x60, 0xB4, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x7F, 0xF1, 0x02, 0x60, 0xEE, 0x64,
-        0xA3, 0xFB, 0xFF, 0xFF, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA4, 0xFB, 0x04, 0x64, 0xA5, 0xFB,
-        0xDF, 0xFE, 0x19, 0xFF, 0x10, 0x64, 0x3B, 0xDB, 0x80, 0xF3, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0xC9, 0xFE, 0x49, 0xF3, 0x3C, 0x46, 0x27, 0x18, 0xCC, 0x84,
-        0x49, 0xFB, 0x24, 0x02, 0xBB, 0x60, 0x18, 0x64, 0x40, 0x42, 0xFC, 0xFC, 0x00, 0x64, 0x5C, 0x5C,
-        0x32, 0xFB, 0x82, 0xFF, 0x5C, 0x47, 0x84, 0xFF, 0x62, 0xFF, 0x27, 0x60, 0xA4, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0x23, 0xF0, 0x01, 0x64, 0xB0, 0x84,
-        0xA2, 0xDA, 0x24, 0x60, 0x6E, 0x62, 0x24, 0x60, 0x46, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0xCE, 0xFE, 0x6A, 0xF3, 0xFF, 0xFF,
-        0x60, 0x41, 0xFD, 0xB4, 0xA2, 0xDB, 0x61, 0x44, 0x01, 0xB0, 0x02, 0xB0, 0x0C, 0x03, 0x0B, 0x02,
-        0x9D, 0xFE, 0x09, 0x04, 0x24, 0x60, 0xA6, 0x62, 0x1A, 0x60, 0xA2, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x07, 0x00, 0x80, 0xF3, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0x1C, 0x60, 0xB4, 0x63, 0xA3, 0xD3, 0xAD, 0x49, 0x20, 0xB5,
-        0x08, 0xB1, 0x23, 0x03, 0xE1, 0x81, 0x10, 0xB5, 0x95, 0x81, 0x60, 0x41, 0x18, 0x02, 0x1C, 0x60,
-        0xB6, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0xCC, 0x84, 0xA4, 0xDB, 0x17, 0x02, 0x05, 0x64, 0xA4, 0xDB,
-        0x61, 0x44, 0x07, 0xB4, 0xFF, 0xFF, 0x11, 0x02, 0x08, 0xB1, 0xE1, 0x81, 0x95, 0x81, 0xA3, 0xD3,
-        0x0C, 0x03, 0x08, 0xAC, 0x01, 0xBC, 0xA3, 0xDB, 0xFF, 0xFF, 0x13, 0xFF, 0x06, 0x00, 0x10, 0xAC,
-        0xA3, 0xDB, 0x1C, 0x60, 0xB6, 0x63, 0x05, 0x7C, 0xA3, 0xD9, 0xB0, 0x60, 0xA4, 0x78, 0xFF, 0xFF,
-        0x46, 0xF3, 0x45, 0xF1, 0x05, 0x1B, 0x64, 0x44, 0x03, 0x1B, 0x0F, 0x60, 0x92, 0x62, 0xA2, 0xD3,
-        0x45, 0xFB, 0x00, 0x63, 0x46, 0xFD, 0x60, 0x41, 0x25, 0x64, 0x3B, 0xDB, 0x27, 0x44, 0xEF, 0xB4,
-        0x40, 0x47, 0x00, 0xB9, 0x71, 0x40, 0x80, 0x27, 0x01, 0x12, 0x2B, 0x03, 0xBA, 0x60, 0x93, 0x62,
-        0x84, 0xFF, 0x42, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0x31, 0x0A,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x2B, 0x0A, 0x71, 0x40, 0x80, 0x27,
-        0xF7, 0x12, 0x45, 0xF3, 0x4C, 0x02, 0x15, 0x18, 0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF,
-        0x0B, 0x18, 0x31, 0x60, 0x10, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0x06, 0x18, 0xAC, 0x4C, 0x80, 0x26,
-        0x03, 0x00, 0x00, 0x64, 0x45, 0xFB, 0x05, 0x00, 0x45, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0x45, 0xFB,
-        0xDF, 0x02, 0x06, 0x0A, 0xA0, 0x4C, 0xFB, 0xB4, 0xA0, 0x51, 0xA3, 0x60, 0x99, 0x78, 0xFF, 0xFF,
-        0x84, 0xFF, 0xBA, 0x60, 0x70, 0x64, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4,
-        0xA0, 0x51, 0xAB, 0x60, 0x2C, 0x78, 0xFF, 0xFF, 0x3C, 0x44, 0xAC, 0x80, 0x32, 0xF1, 0x25, 0x03,
-        0x64, 0x40, 0x07, 0x22, 0x22, 0x00, 0xA3, 0x60, 0x7B, 0x78, 0xFF, 0xFF, 0xA0, 0x4C, 0x1C, 0xBC,
-        0xDF, 0xB4, 0xA0, 0x51, 0x31, 0x40, 0x08, 0x2A, 0xEF, 0x01, 0x73, 0xF3, 0x71, 0xF1, 0x00, 0xA0,
-        0xDC, 0x80, 0x05, 0x03, 0x08, 0x03, 0xCC, 0x84, 0x73, 0xFB, 0x67, 0x50, 0x08, 0x00, 0xCC, 0x84,
-        0x73, 0xFB, 0x64, 0x50, 0x04, 0x00, 0x31, 0x44, 0xF7, 0xB4, 0x40, 0x51, 0x06, 0x00, 0x28, 0x64,
-        0x3A, 0xDB, 0xA0, 0x4C, 0x30, 0xBC, 0xF3, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E,
-        0x28, 0x64, 0x3B, 0xDB, 0x0F, 0x60, 0x94, 0x62, 0xA2, 0xD3, 0x32, 0x40, 0x02, 0x27, 0x16, 0x00,
-        0x46, 0xFB, 0x14, 0x18, 0xBB, 0x60, 0x06, 0x64, 0x84, 0xFF, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C,
-        0x14, 0xBC, 0xF7, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80,
-        0x46, 0xF3, 0xB7, 0x0A, 0xDC, 0x02, 0xCC, 0x84, 0x46, 0xFB, 0xF5, 0x02, 0x84, 0xFF, 0xBB, 0x60,
-        0x18, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x27, 0x44, 0x08, 0xBC, 0x40, 0x47, 0xBB, 0xE1, 0x04, 0x00,
-        0x3A, 0xE1, 0x31, 0x40, 0x01, 0x26, 0xBB, 0xE1, 0xA3, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x43, 0xFF,
-        0x39, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x84, 0x3E, 0xFB, 0x01, 0xA0, 0x4C, 0x3D, 0x46, 0x2A, 0xF2,
-        0x46, 0x4D, 0x10, 0x25, 0x0E, 0x00, 0x09, 0xE1, 0xA1, 0xFF, 0x66, 0x40, 0x0F, 0xF2, 0x01, 0x29,
-        0x02, 0x00, 0x40, 0xFF, 0x0A, 0xBC, 0xA2, 0xDA, 0x08, 0x25, 0xE9, 0x01, 0xCB, 0xFE, 0x5C, 0x5D,
-        0xE7, 0x01, 0x44, 0xFF, 0x31, 0xF2, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03,
-        0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46,
-        0x07, 0xFC, 0x3F, 0xF2, 0x09, 0x60, 0xB0, 0x65, 0xD4, 0x80, 0x2A, 0xF2, 0xC4, 0x05, 0x08, 0x25,
-        0xB6, 0x01, 0x00, 0x64, 0x0D, 0x60, 0x2C, 0x61, 0x40, 0x4B, 0xA1, 0xDB, 0x2D, 0x46, 0x3B, 0xF2,
-        0xA9, 0xF1, 0x87, 0xF4, 0x60, 0x40, 0x20, 0x2B, 0x12, 0x00, 0xD3, 0x80, 0x2C, 0xF0, 0xB3, 0x03,
-        0x07, 0xF4, 0x64, 0x40, 0x01, 0x26, 0xA9, 0xF5, 0xB6, 0xF4, 0x2D, 0x46, 0x04, 0x64, 0x04, 0xB3,
-        0x22, 0xFA, 0x04, 0x03, 0xBC, 0x60, 0x72, 0x78, 0xFF, 0xFF, 0x01, 0x00, 0xDE, 0x00, 0x74, 0x62,
-        0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0,
-        0xA0, 0x5B, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0x7C, 0x5F, 0xE8, 0x84, 0xE8, 0x85,
-        0x0C, 0x60, 0x3A, 0x64, 0x44, 0xD3, 0x5A, 0xD1, 0x03, 0x1B, 0xBC, 0x60, 0x65, 0x78, 0xFF, 0xFF,
-        0x60, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B,
-        0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44,
-        0xE7, 0x7F, 0xA0, 0x5B, 0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5B, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B,
-        0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44,
-        0xED, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xEF, 0x7F,
-        0xA0, 0x5B, 0x65, 0x44, 0xD8, 0x84, 0x08, 0x25, 0x76, 0x00, 0x60, 0x7F, 0xA0, 0x5B, 0x80, 0x60,
-        0x00, 0xEB, 0xA0, 0x60, 0x00, 0xEB, 0xD1, 0x60, 0x00, 0xEB, 0x3F, 0xF2, 0x04, 0x65, 0xC4, 0x83,
-        0x0A, 0xE1, 0xB3, 0xFF, 0x9A, 0xFF, 0xCB, 0x83, 0x00, 0xF4, 0x10, 0x62, 0x6C, 0x61, 0x0E, 0xA3,
-        0xAB, 0x84, 0xF2, 0xA3, 0xA1, 0xFF, 0x08, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0x02, 0x62, 0xC9, 0x81,
-        0xAB, 0x84, 0xA1, 0xFF, 0x01, 0x00, 0xA2, 0xDC, 0x7A, 0xD4, 0xFD, 0x1C, 0xA2, 0xDC, 0x08, 0x25,
-        0x52, 0x00, 0xF2, 0x1D, 0x7C, 0xA8, 0xD9, 0x81, 0xEF, 0x03, 0xFF, 0xB1, 0x09, 0x1E, 0x02, 0x02,
-        0x00, 0xF4, 0x02, 0x62, 0x5A, 0xD2, 0x89, 0xFF, 0x80, 0x4F, 0x6F, 0x44, 0xA2, 0xDA, 0x88, 0xFF,
-        0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF, 0x3D, 0x46, 0x08, 0x25, 0x3D, 0x00, 0x40, 0xFF, 0x0F, 0xF0,
-        0x0A, 0x64, 0xB0, 0x84, 0x16, 0x14, 0xF7, 0xB4, 0xA2, 0xDA, 0x0D, 0x60, 0x2C, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0C, 0x00, 0xF1, 0xF5, 0xF0, 0xF4, 0x0D, 0x60, 0x2C, 0x61,
-        0x59, 0xD1, 0x37, 0xF8, 0x05, 0x64, 0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8, 0xFC, 0x02, 0x2D, 0x46,
-        0x0D, 0x01, 0xA2, 0xDA, 0x2D, 0x46, 0x3B, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x20, 0x2B, 0x18, 0x00,
-        0xF1, 0xF5, 0xB7, 0xF0, 0x2A, 0x44, 0xA4, 0x84, 0xFF, 0xFF, 0x2F, 0x26, 0x10, 0x00, 0x2D, 0x46,
-        0x64, 0x44, 0x3A, 0xF0, 0xBC, 0xF0, 0x64, 0x5F, 0x3D, 0xF0, 0x07, 0xF4, 0xF0, 0xF4, 0xFF, 0xFF,
-        0x08, 0xA3, 0x5B, 0xD8, 0x65, 0x5C, 0x5B, 0xD8, 0x5B, 0xDA, 0x2D, 0x46, 0x01, 0x00, 0x2D, 0x46,
-        0xBB, 0x60, 0x36, 0x78, 0xFF, 0xFF, 0x98, 0xFF, 0x43, 0xFF, 0x40, 0xFF, 0xB0, 0xFF, 0xB1, 0xFF,
-        0x2D, 0x46, 0x0D, 0x60, 0x2C, 0x61, 0xA1, 0xD3, 0x2D, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x0A, 0x00,
-        0xF1, 0xF5, 0xF0, 0xF4, 0x59, 0xD1, 0x37, 0xF8, 0x05, 0x64, 0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8,
-        0xFC, 0x02, 0x2D, 0x46, 0xBB, 0x60, 0x20, 0x78, 0xFF, 0xFF, 0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF,
-        0x3D, 0x46, 0x08, 0x25, 0xE0, 0x01, 0x0F, 0xF2, 0x40, 0xFF, 0x02, 0xBC, 0xA2, 0xDA, 0xBB, 0x60,
-        0x36, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x0D, 0x60, 0x2C, 0x62, 0xA2, 0xDB, 0x04, 0x64, 0x22, 0xFA,
-        0x87, 0xF4, 0xA9, 0xF1, 0xFF, 0xFF, 0xD3, 0x80, 0x3B, 0xF2, 0xE7, 0x03, 0x60, 0x47, 0xC0, 0xB7,
-        0x02, 0xFE, 0xF0, 0x84, 0xF0, 0x84, 0xF0, 0x84, 0x00, 0xA8, 0x40, 0x4A, 0x16, 0x03, 0xE0, 0x81,
-        0x61, 0x43, 0x42, 0xFE, 0x00, 0x64, 0xF0, 0x84, 0xFE, 0x1F, 0x40, 0x4A, 0xE1, 0x84, 0xE0, 0x84,
-        0x2D, 0x46, 0x07, 0xF4, 0xE0, 0x81, 0x37, 0xF0, 0x2A, 0x47, 0x0C, 0x60, 0x7A, 0x63, 0xA0, 0x84,
-        0x47, 0x9C, 0x10, 0x03, 0x7C, 0x44, 0xA0, 0x63, 0x11, 0x00, 0x20, 0x64, 0x40, 0x4A, 0x63, 0x46,
-        0x37, 0xF0, 0x66, 0x44, 0x64, 0x40, 0x80, 0x2B, 0x05, 0x00, 0x00, 0x60, 0x70, 0x7C, 0x00, 0x60,
-        0x90, 0x63, 0x04, 0x00, 0x2D, 0x46, 0xBC, 0x60, 0x65, 0x78, 0xFF, 0xFF, 0x2D, 0x46, 0xEE, 0xFB,
-        0xEF, 0xF9, 0xF0, 0xFD, 0x07, 0xF2, 0xF1, 0xFB, 0x60, 0x46, 0x37, 0xF0, 0x2A, 0x44, 0x0D, 0x60,
-        0x2C, 0x62, 0x5A, 0xD9, 0x00, 0x65, 0x45, 0x4B, 0xA0, 0x84, 0xFF, 0xFF, 0x3F, 0x22, 0x05, 0x00,
-        0x90, 0x84, 0x37, 0xFA, 0x01, 0x64, 0x40, 0x4B, 0x21, 0x00, 0xAD, 0x46, 0x0A, 0xA3, 0x3D, 0xF2,
-        0xAD, 0x46, 0xA3, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3C, 0xF2, 0xAD, 0x46, 0x02, 0x03, 0x16, 0x07,
-        0x14, 0x04, 0x5B, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3B, 0xF2, 0x03, 0x03, 0xAD, 0x46, 0x0E, 0x07,
-        0x0C, 0x04, 0x3A, 0xF0, 0xAD, 0x46, 0x5B, 0xD0, 0x64, 0x5F, 0xD0, 0x80, 0x2B, 0x44, 0x18, 0x07,
-        0x04, 0x03, 0xD0, 0x84, 0x10, 0xA4, 0xFF, 0xFF, 0x13, 0x07, 0x7F, 0x01, 0x01, 0x64, 0x0D, 0x60,
-        0x2C, 0x62, 0xA2, 0xDB, 0x2D, 0x46, 0x0D, 0x60, 0x3C, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4,
-        0xA2, 0xDB, 0xBD, 0x60, 0x0B, 0x78, 0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x53, 0x01,
-        0x2D, 0x46, 0x0D, 0x60, 0x3C, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xBD, 0x60,
-        0x94, 0x78, 0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x45, 0x01, 0x00, 0x60, 0x0F, 0x64,
-        0xBB, 0x60, 0xD3, 0x78, 0xFF, 0xFF, 0x07, 0xF4, 0x66, 0x41, 0x03, 0xF2, 0x04, 0xF2, 0x40, 0x42,
-        0x05, 0xF2, 0x40, 0x43, 0x40, 0x44, 0x61, 0x46, 0x3C, 0xF2, 0x3D, 0xF2, 0x40, 0x40, 0x40, 0x41,
-        0x0D, 0x60, 0x70, 0x65, 0x00, 0x61, 0xEF, 0xF1, 0xEE, 0xF5, 0x44, 0x4C, 0x2C, 0x5C, 0xE9, 0x80,
-        0x00, 0x64, 0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x24, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x20, 0x44, 0x40, 0x80, 0xDB, 0x83, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x21, 0x44, 0x40, 0x81, 0xDB, 0x83, 0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x22, 0x44, 0x40, 0x82, 0xDB, 0x83, 0xBD, 0xD2, 0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x23, 0x44, 0x40, 0x83, 0xF2, 0xA3, 0xBD, 0xD2, 0x23, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x24, 0x44, 0xC0, 0x9C, 0x41, 0x84, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01, 0x0D, 0x60,
-        0x2E, 0x61, 0x05, 0x64, 0xF0, 0xF4, 0xF1, 0xF5, 0xFE, 0xA3, 0x5B, 0xD0, 0xCC, 0x84, 0x59, 0xD9,
-        0xFC, 0x02, 0xF0, 0xF3, 0xF1, 0xF5, 0x60, 0x42, 0x20, 0x44, 0xA2, 0xDA, 0x21, 0x44, 0x5A, 0xDA,
-        0x22, 0x44, 0x5A, 0xDA, 0x23, 0x44, 0x5A, 0xDA, 0x24, 0x44, 0x5A, 0xDA, 0x61, 0x46, 0x0D, 0x60,
-        0x3C, 0x62, 0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, 0x41, 0xF0, 0xF3, 0xF1, 0xF5, 0xA0, 0xD2,
-        0x5A, 0xD0, 0x40, 0x40, 0x44, 0x41, 0x5A, 0xD2, 0x5A, 0xD0, 0x40, 0x42, 0x5A, 0xD0, 0x44, 0x43,
-        0x61, 0x46, 0xBA, 0xF0, 0x3B, 0xF2, 0x44, 0x44, 0x65, 0x5F, 0x40, 0x85, 0xEF, 0xF4, 0xEE, 0xF5,
-        0x43, 0x4C, 0x0D, 0x60, 0x70, 0x65, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x20, 0x44, 0x40, 0x80, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x21, 0x44,
-        0x40, 0x81, 0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x22, 0x44, 0x40, 0x82,
-        0xBD, 0xD2, 0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x23, 0x44, 0x40, 0x83, 0xBD, 0xD2,
-        0x23, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x24, 0x44, 0x40, 0x84, 0xBD, 0xD2, 0x24, 0x5C,
-        0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x25, 0x44, 0x40, 0x85, 0x61, 0x46, 0x3A, 0xF0, 0xFF, 0xFF,
-        0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5B, 0x64, 0x44,
-        0xE2, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xEE, 0xF5, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x84, 0xE8, 0x80,
-        0xF8, 0x84, 0x20, 0x5C, 0x40, 0x80, 0x20, 0x44, 0xE4, 0x7F, 0xA0, 0x5B, 0x20, 0x47, 0xE5, 0x7F,
-        0xA0, 0x5B, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x21, 0x5C, 0x40, 0x81,
-        0x21, 0x44, 0xE6, 0x7F, 0xA0, 0x5B, 0x21, 0x47, 0xE7, 0x7F, 0xA0, 0x5B, 0x21, 0x44, 0xE8, 0x80,
-        0xF8, 0x84, 0x22, 0x5C, 0x40, 0x82, 0x22, 0x44, 0xE8, 0x7F, 0xA0, 0x5B, 0x22, 0x47, 0xE9, 0x7F,
-        0xA0, 0x5B, 0x22, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x23, 0x5C, 0x40, 0x83, 0x23, 0x44, 0xEA, 0x7F,
-        0xA0, 0x5B, 0x23, 0x47, 0xEB, 0x7F, 0xA0, 0x5B, 0x23, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x24, 0x5C,
-        0x40, 0x84, 0x24, 0x44, 0xEC, 0x7F, 0xA0, 0x5B, 0x24, 0x47, 0xED, 0x7F, 0xA0, 0x5B, 0x24, 0x44,
-        0xE8, 0x80, 0xF8, 0x84, 0x25, 0x5C, 0x40, 0x85, 0x25, 0x44, 0xEE, 0x7F, 0xA0, 0x5B, 0x25, 0x47,
-        0xEF, 0x7F, 0xA0, 0x5B, 0x2C, 0x43, 0xA3, 0xD2, 0x25, 0x5C, 0x90, 0x81, 0xE9, 0x84, 0xE3, 0x7F,
-        0xA0, 0x5B, 0x0D, 0x60, 0x3C, 0x62, 0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0xEB, 0xF3, 0x5A, 0xD3,
-        0x40, 0x48, 0x5A, 0xD3, 0x40, 0x49, 0x40, 0x4A, 0x00, 0x60, 0x70, 0x7C, 0x44, 0x4D, 0x45, 0xF2,
-        0x46, 0xF2, 0x40, 0x47, 0x40, 0x46, 0x0D, 0x60, 0x70, 0x65, 0x00, 0x61, 0x2D, 0x5C, 0xE9, 0x80,
-        0x00, 0x64, 0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x26, 0x44, 0x40, 0x86, 0xDB, 0x83, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x27, 0x44, 0x40, 0x87, 0xDB, 0x83, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x28, 0x44, 0x40, 0x88, 0xDB, 0x83, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x29, 0x44, 0x40, 0x89, 0xF2, 0xA3, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x2A, 0x44, 0xC0, 0x9C, 0x41, 0x8A, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01, 0x26, 0x44,
-        0x40, 0xFA, 0x27, 0x44, 0x41, 0xFA, 0x28, 0x44, 0x42, 0xFA, 0x29, 0x44, 0x43, 0xFA, 0x2A, 0x44,
-        0x44, 0xFA, 0x0D, 0x60, 0x3E, 0x62, 0xA2, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x80, 0x7C,
-        0x44, 0x4D, 0x2D, 0x42, 0xA2, 0xD2, 0x5A, 0xD0, 0x40, 0x46, 0x44, 0x47, 0x5A, 0xD2, 0x5A, 0xD0,
-        0x40, 0x48, 0x5A, 0xD0, 0x44, 0x49, 0x47, 0xF2, 0x44, 0x4A, 0x40, 0x8B, 0x60, 0x5C, 0x64, 0x47,
-        0xE0, 0x7F, 0xA0, 0x5A, 0xFF, 0xB4, 0x20, 0xBC, 0x7F, 0xB4, 0xE1, 0x7F, 0xA0, 0x5A, 0x64, 0x44,
-        0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x70, 0x63, 0x0D, 0x60, 0x70, 0x65, 0xBD, 0xD2, 0x2B, 0x5C,
-        0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x26, 0x44, 0x40, 0x86, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x27, 0x44, 0x40, 0x87, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x28, 0x44, 0x40, 0x88, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x29, 0x44, 0x40, 0x89, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2A, 0x44,
-        0x40, 0x8A, 0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2B, 0x44, 0x40, 0x8B,
-        0xBD, 0xD2, 0x2B, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x26, 0x5C, 0x40, 0x86, 0x26, 0x44,
-        0xE4, 0x7F, 0xA0, 0x5A, 0x26, 0x47, 0xE5, 0x7F, 0xA0, 0x5A, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x84,
-        0xE8, 0x80, 0xF8, 0x84, 0x27, 0x5C, 0x40, 0x87, 0x27, 0x44, 0xE6, 0x7F, 0xA0, 0x5A, 0x27, 0x47,
-        0xE7, 0x7F, 0xA0, 0x5A, 0x27, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x28, 0x5C, 0x40, 0x88, 0x28, 0x44,
-        0xE8, 0x7F, 0xA0, 0x5A, 0x28, 0x47, 0xE9, 0x7F, 0xA0, 0x5A, 0x28, 0x44, 0xE8, 0x80, 0xF8, 0x84,
-        0x29, 0x5C, 0x40, 0x89, 0x29, 0x44, 0xEA, 0x7F, 0xA0, 0x5A, 0x29, 0x47, 0xEB, 0x7F, 0xA0, 0x5A,
-        0x29, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x2A, 0x5C, 0x40, 0x8A, 0x2A, 0x44, 0xEC, 0x7F, 0xA0, 0x5A,
-        0x2A, 0x47, 0xED, 0x7F, 0xA0, 0x5A, 0x2A, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x2B, 0x5C, 0x40, 0x8B,
-        0x2B, 0x44, 0xEE, 0x7F, 0xA0, 0x5A, 0x2B, 0x47, 0xEF, 0x7F, 0xA0, 0x5A, 0x38, 0xF0, 0x2B, 0x44,
-        0x90, 0x84, 0xE8, 0x84, 0xE3, 0x7F, 0xA0, 0x5A, 0x0D, 0x60, 0x3E, 0x62, 0xA2, 0xD7, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xE4, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x32, 0x00, 0xDC, 0xF3, 0x31, 0x41, 0x01, 0xB1,
-        0x03, 0xA8, 0x2D, 0x03, 0x17, 0x02, 0x20, 0x40, 0x04, 0x2B, 0x0C, 0x00, 0xBB, 0xFE, 0xCA, 0xFE,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x08, 0x00, 0x0F, 0x60, 0xD2, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x80, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x0C, 0x00, 0xA9, 0xFE, 0xD8, 0x05, 0xAB, 0xFE, 0x0C, 0x05, 0xA8, 0xFE,
-        0xC8, 0x05, 0xAA, 0xFE, 0xC9, 0x05, 0x78, 0x43, 0x01, 0x61, 0x24, 0x60, 0xDD, 0x78, 0xA1, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x3E, 0x24, 0x60, 0x5E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8,
-        0x60, 0x46, 0x03, 0x02, 0xBF, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0x26, 0x45, 0xD4, 0x80, 0x0F, 0xF0,
-        0xF9, 0x03, 0x64, 0x44, 0x70, 0xB0, 0x70, 0x2A, 0x14, 0x00, 0x27, 0x60, 0xB2, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xFF, 0xFF, 0x08, 0x28, 0xA2, 0xDB, 0xA2, 0xFF, 0xAF, 0xF3, 0xFF, 0xFF,
-        0xCC, 0x84, 0xFE, 0xA0, 0xAF, 0xFB, 0x01, 0x07, 0xD4, 0xFE, 0xA3, 0xFF, 0xC5, 0x60, 0x5B, 0x78,
-        0xFF, 0xFF, 0x64, 0x40, 0x02, 0x26, 0x09, 0x00, 0x66, 0x45, 0x09, 0xF4, 0x0F, 0xF2, 0x02, 0x18,
-        0x65, 0x46, 0xE3, 0x1B, 0x00, 0x64, 0x40, 0x46, 0xCA, 0x01, 0xA2, 0xFF, 0xAF, 0xF3, 0x46, 0x46,
-        0xCC, 0x84, 0xFE, 0xA0, 0xAF, 0xFB, 0x01, 0x07, 0xD4, 0xFE, 0xA3, 0xFF, 0x0F, 0xF0, 0xA3, 0xFC,
-        0x64, 0x44, 0x80, 0x26, 0x22, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x92, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00, 0x07, 0x60,
-        0x01, 0x64, 0x04, 0x00, 0x02, 0x2A, 0x06, 0x00, 0x00, 0x60, 0x01, 0x64, 0x23, 0xFA, 0xC5, 0x60,
-        0x67, 0x78, 0xFF, 0xFF, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0x08, 0x26, 0x3F, 0x00, 0x2A, 0xF2,
-        0x60, 0x63, 0x60, 0x40, 0x02, 0x2B, 0x66, 0x63, 0xBE, 0xD2, 0x83, 0xF1, 0xA3, 0xD2, 0xD0, 0x80,
-        0x82, 0xF1, 0x18, 0x02, 0xBF, 0xD2, 0xD0, 0x80, 0x81, 0xF1, 0x14, 0x02, 0xD0, 0x80, 0xFF, 0xFF,
-        0x11, 0x02, 0xB8, 0xF1, 0x27, 0x60, 0x9E, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00, 0x07, 0x60, 0x02, 0x64, 0x04, 0x00,
-        0x02, 0x2A, 0x06, 0x00, 0x00, 0x60, 0x02, 0x64, 0x23, 0xFA, 0xC5, 0x60, 0x67, 0x78, 0xFF, 0xFF,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xB0, 0x3A, 0x06, 0x00, 0x00, 0x60, 0x02, 0x64, 0x23, 0xFA,
-        0xC1, 0x60, 0x11, 0x78, 0xFF, 0xFF, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0x32, 0x44, 0x01, 0x2A,
-        0x4A, 0x00, 0x28, 0x60, 0xE2, 0x63, 0xBF, 0xD3, 0x00, 0x65, 0xB4, 0x81, 0xDB, 0x83, 0x3D, 0x03,
-        0xBF, 0xD3, 0xA3, 0xD3, 0x40, 0x48, 0xBE, 0xD3, 0x40, 0x4A, 0x2E, 0xF0, 0x40, 0x4C, 0xD0, 0x80,
-        0x2D, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x2C, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80,
-        0xFF, 0xFF, 0x2B, 0x03, 0x31, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x30, 0xF0, 0x08, 0x02, 0x2A, 0x44,
-        0xD0, 0x80, 0x2F, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x1E, 0x03, 0x34, 0xF0,
-        0x2C, 0x44, 0xD0, 0x80, 0x33, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x32, 0xF0, 0x04, 0x02,
-        0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x11, 0x03, 0x38, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x37, 0xF0,
-        0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x36, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF,
-        0x04, 0x03, 0xFA, 0xA1, 0x06, 0xA3, 0xB7, 0x03, 0xC3, 0x01, 0x07, 0x60, 0x00, 0x64, 0x23, 0xFA,
-        0xC5, 0x60, 0x67, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x0F, 0xF0, 0x60, 0x45, 0xA4, 0x36, 0x08, 0x00,
-        0x0C, 0xB4, 0x04, 0x36, 0x02, 0x00, 0x0C, 0x3A, 0x06, 0x00, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF,
-        0xC2, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x0F, 0xF0, 0x65, 0x40, 0x40, 0x2B, 0x22, 0x00, 0x32, 0x40,
-        0x08, 0x26, 0x1F, 0x00, 0x07, 0xF4, 0x36, 0xF2, 0xFF, 0xFF, 0x37, 0xB4, 0x26, 0x46, 0x19, 0x02,
-        0x2C, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x11, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x98, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xC5, 0x60, 0x5B, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0x64, 0x40, 0x60, 0x26, 0x03, 0x00, 0xC2, 0x60, 0xAF, 0x78, 0xFF, 0xFF,
-        0x60, 0x41, 0xA9, 0xF3, 0x07, 0xFA, 0x61, 0x44, 0x80, 0x3A, 0x06, 0x00, 0xE5, 0x60, 0x58, 0x4F,
-        0xE7, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x10, 0x00, 0x60, 0x40, 0x40, 0x3A, 0x0D, 0x00, 0xDC, 0xF3,
-        0xFF, 0xFF, 0x07, 0xB4, 0x03, 0x3A, 0xE2, 0x01, 0xC6, 0x60, 0x58, 0x4D, 0x4F, 0x78, 0xFF, 0xFF,
-        0xDD, 0x02, 0xA9, 0xF3, 0x07, 0xFA, 0xD1, 0x00, 0x5E, 0x63, 0x60, 0x40, 0x02, 0x2B, 0x64, 0x63,
-        0x50, 0xFE, 0xBD, 0xD2, 0x81, 0xF1, 0xBD, 0xD2, 0xD0, 0x80, 0x82, 0xF1, 0xBD, 0xD2, 0xD0, 0x80,
-        0x83, 0xF1, 0x2A, 0xF2, 0xD0, 0x80, 0x60, 0x40, 0x08, 0x3A, 0x07, 0x00, 0x01, 0x0C, 0xC6, 0x01,
-        0xDE, 0x60, 0x58, 0x4F, 0xFE, 0x78, 0xFF, 0xFF, 0xB8, 0x00, 0x26, 0x0C, 0xC6, 0x60, 0x58, 0x4D,
-        0x4F, 0x78, 0xFF, 0xFF, 0xBB, 0x02, 0x1F, 0x60, 0x52, 0x61, 0x02, 0x64, 0xA1, 0xDB, 0x1F, 0x60,
-        0x5A, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x22, 0x60, 0x58, 0x4E, 0x3E, 0x78, 0xFF, 0xFF, 0x1F, 0x60,
-        0x04, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x27, 0x08, 0x00, 0x0F, 0x60, 0xEA, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x1F, 0x60, 0x52, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x9B, 0x01, 0x91, 0x00, 0xC6, 0x60, 0x58, 0x4D, 0x4F, 0x78, 0xFF, 0xFF,
-        0xFA, 0x02, 0x0F, 0x60, 0xCE, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x36, 0x07, 0x00,
-        0x01, 0x64, 0xA1, 0xDB, 0x01, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x31, 0xF2, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41,
-        0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02,
-        0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF,
-        0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0xA9, 0xF1, 0x43, 0x43,
-        0xD3, 0x80, 0xFF, 0xFF, 0x04, 0x02, 0xC5, 0x60, 0x58, 0x4F, 0xA5, 0x78, 0xFF, 0xFF, 0x32, 0x40,
-        0x08, 0x2A, 0x05, 0x00, 0x63, 0x46, 0x80, 0x60, 0x02, 0x64, 0x06, 0xFA, 0x26, 0x46, 0xD8, 0xF3,
-        0x63, 0x45, 0x66, 0x41, 0x65, 0x46, 0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36, 0x06, 0x00, 0x02, 0x36,
-        0x04, 0x00, 0x04, 0x36, 0x02, 0x00, 0x05, 0x3A, 0x02, 0x00, 0x00, 0x64, 0x01, 0x00, 0x01, 0x64,
-        0x6F, 0xFA, 0x79, 0xF3, 0x7A, 0xF1, 0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43, 0x02, 0x02, 0x79, 0xF3,
-        0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60, 0xAE, 0x65, 0xD8, 0xF3, 0xFF, 0xFF, 0xE0, 0x84, 0x44, 0xD3,
-        0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03,
-        0xA4, 0x84, 0x7B, 0xFB, 0x6F, 0xF0, 0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA, 0x60, 0x47, 0x60, 0x45,
-        0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x70, 0xF0, 0x70, 0xFA,
-        0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01, 0xE1, 0x81, 0x0F, 0x60,
-        0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x66, 0x43, 0x0C, 0xF4, 0xB8, 0xF1, 0x27, 0x60, 0x8C, 0x64,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24,
-        0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x27, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x3B, 0x12, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x9A, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x13, 0x00, 0x02, 0x3B, 0x11, 0x00, 0xB8, 0xF1,
-        0x27, 0x60, 0x9C, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0x1B, 0xF2, 0xFF, 0xFF, 0xE4, 0xA4, 0x3E, 0xFA, 0x2A, 0xF2, 0x28, 0x41, 0x40, 0xA8, 0x01, 0xB1,
-        0x02, 0x02, 0x62, 0x02, 0x92, 0x00, 0x60, 0x40, 0x08, 0x2A, 0x2B, 0x00, 0xB8, 0xF1, 0x27, 0x60,
-        0x8A, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x1B, 0xF2,
-        0xFF, 0xFF, 0x60, 0x45, 0xB8, 0xF1, 0x27, 0x60, 0x90, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80,
-        0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04,
-        0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75,
-        0x88, 0xFF, 0x0F, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x26, 0x28, 0x00, 0x32, 0x44, 0x02, 0x26,
-        0x25, 0x00, 0x10, 0x2B, 0x29, 0x00, 0x28, 0x60, 0xE2, 0x63, 0xBF, 0xD3, 0x2C, 0xF0, 0x00, 0xA8,
-        0x60, 0x41, 0x0D, 0x03, 0x50, 0xFE, 0xBD, 0xD3, 0x2D, 0xF0, 0xD0, 0x80, 0xBD, 0xD3, 0x2E, 0xF0,
-        0xD0, 0x80, 0xBD, 0xD3, 0x2C, 0xF0, 0xD0, 0x80, 0xFA, 0xA1, 0x10, 0x0C, 0xF3, 0x02, 0x50, 0xFE,
-        0x60, 0x60, 0x01, 0x64, 0xD0, 0x80, 0x2D, 0xF0, 0x1D, 0x64, 0xD0, 0x80, 0x2E, 0xF0, 0x01, 0x64,
-        0xD0, 0x80, 0xFF, 0xFF, 0x03, 0x0C, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x40, 0x2A,
-        0x03, 0x00, 0x19, 0x60, 0x22, 0x78, 0xFF, 0xFF, 0xC5, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x32, 0x40,
-        0x40, 0x26, 0xF7, 0x01, 0x2A, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x08, 0x2A, 0x2A, 0x00, 0xDC, 0xF3,
-        0xFF, 0xFF, 0x07, 0xB4, 0x03, 0xA8, 0xFF, 0xFF, 0x03, 0x03, 0x32, 0x40, 0x02, 0x2A, 0x1D, 0x00,
-        0x03, 0x67, 0xA0, 0x84, 0x00, 0x37, 0x64, 0x63, 0x60, 0x40, 0x02, 0x37, 0x5E, 0x63, 0x60, 0x40,
-        0x01, 0x37, 0x58, 0x63, 0x60, 0x40, 0x03, 0x37, 0x0D, 0x00, 0xBD, 0xD2, 0x81, 0xF1, 0xBD, 0xD2,
-        0xD0, 0x80, 0x82, 0xF1, 0x07, 0x02, 0xD0, 0x80, 0xBD, 0xD2, 0x83, 0xF1, 0x03, 0x02, 0xD0, 0x80,
-        0xFF, 0xFF, 0x03, 0x03, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0xDE, 0x60, 0x58, 0x4F, 0xFE, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x26, 0x06, 0x00, 0x20, 0x40, 0x10, 0x2B,
-        0x03, 0x00, 0xC5, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x87, 0xF4, 0xA9, 0xF1, 0x27, 0x1B, 0x31, 0xF2,
-        0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0xA9, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x03, 0x00, 0xD3, 0x80, 0xFF, 0xFF,
-        0xD6, 0x03, 0x43, 0x43, 0xDC, 0xF3, 0x32, 0x40, 0x02, 0x26, 0x04, 0x00, 0x07, 0xB4, 0x03, 0xA8,
-        0x2A, 0xF2, 0x5F, 0x02, 0xA9, 0xF1, 0x23, 0x43, 0xD3, 0x80, 0xFF, 0xFF, 0x5A, 0x02, 0xC5, 0x60,
-        0x58, 0x4F, 0xA5, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x02, 0x2A, 0x05, 0x00, 0x63, 0x46, 0x02, 0x64,
-        0x06, 0xFA, 0x26, 0x46, 0x4E, 0x00, 0x32, 0x40, 0x08, 0x2A, 0x05, 0x00, 0x63, 0x46, 0x80, 0x60,
-        0x02, 0x64, 0x06, 0xFA, 0x26, 0x46, 0xD8, 0xF3, 0x63, 0x45, 0x66, 0x41, 0x65, 0x46, 0x8C, 0xFA,
-        0x60, 0x40, 0x01, 0x36, 0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00, 0x05, 0x3A,
-        0x02, 0x00, 0x00, 0x64, 0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x79, 0xF3, 0x7A, 0xF1, 0xFF, 0xFF,
-        0xA0, 0x84, 0x65, 0x43, 0x02, 0x02, 0x79, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60, 0xAE, 0x65,
-        0xD8, 0xF3, 0xFF, 0xFF, 0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x04, 0x02,
-        0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x7B, 0xFB, 0x6F, 0xF0, 0x60, 0x47,
-        0x90, 0x84, 0x6F, 0xFA, 0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF,
-        0xFC, 0x03, 0xA4, 0x84, 0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x05,
-        0xDD, 0x81, 0xFB, 0x01, 0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x66, 0x43,
-        0x0C, 0xF4, 0x07, 0xFC, 0x43, 0x43, 0x02, 0xFE, 0x1D, 0xF0, 0x1C, 0x60, 0x9A, 0x62, 0xC0, 0x64,
-        0xC0, 0x84, 0xA2, 0xD1, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xC0, 0x84,
-        0xA2, 0xDB, 0x2A, 0xF2, 0x63, 0x45, 0x0C, 0xB4, 0x08, 0x3A, 0x0A, 0x00, 0xDC, 0xF3, 0x23, 0x46,
-        0x07, 0xB4, 0xFD, 0xA0, 0x06, 0xF2, 0x26, 0x46, 0x03, 0x03, 0x60, 0x40, 0x02, 0x2A, 0x0D, 0x00,
-        0x2A, 0xF2, 0x35, 0xF0, 0x60, 0x40, 0xA4, 0x36, 0x0B, 0x00, 0x08, 0x2B, 0x0C, 0x00, 0x23, 0x46,
-        0x22, 0xF2, 0x26, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x06, 0x02, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF,
-        0xC5, 0x60, 0x55, 0x78, 0xFF, 0xFF, 0x23, 0x46, 0x1E, 0xF2, 0x26, 0x46, 0x44, 0x4C, 0x0F, 0x26,
-        0x1D, 0x00, 0x00, 0xBC, 0x40, 0x45, 0x0B, 0x03, 0x00, 0x64, 0x23, 0x46, 0x1E, 0xFA, 0x26, 0x46,
-        0xA2, 0xFF, 0xAF, 0x60, 0x58, 0x4E, 0x95, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46, 0x2A, 0xF0,
-        0x2C, 0x44, 0x64, 0x40, 0x04, 0x27, 0x0A, 0x00, 0x23, 0x46, 0x22, 0xFA, 0x26, 0x46, 0x1B, 0xF2,
-        0xFF, 0xFF, 0xE4, 0xA4, 0x3E, 0xFA, 0xC4, 0x60, 0xAD, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x02, 0xFA,
-        0xA2, 0xFF, 0x16, 0xF0, 0xFF, 0xFF, 0x64, 0x44, 0x01, 0x26, 0xDC, 0x9C, 0xB3, 0xF3, 0x2A, 0xF2,
-        0xDC, 0x83, 0xB3, 0xFD, 0x06, 0xF4, 0x01, 0xF8, 0x26, 0x46, 0x60, 0x40, 0x40, 0x2B, 0x18, 0x00,
-        0x64, 0x44, 0x00, 0x65, 0xFF, 0xB4, 0xFC, 0xA4, 0x06, 0xF0, 0x03, 0x03, 0x64, 0x46, 0x0C, 0x0D,
-        0x02, 0x65, 0x26, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x60, 0x46,
-        0xF9, 0x01, 0x01, 0xF2, 0xFF, 0xFF, 0xD4, 0x84, 0x01, 0xFA, 0x66, 0x44, 0x26, 0x46, 0x06, 0xFA,
-        0x06, 0xF4, 0x00, 0xF2, 0x80, 0xFC, 0x40, 0x45, 0xAF, 0x60, 0x58, 0x4E, 0x95, 0x78, 0xFF, 0xFF,
-        0xA3, 0xFF, 0x26, 0x46, 0x2C, 0x44, 0x0F, 0x26, 0x14, 0x00, 0x23, 0x46, 0x22, 0xFA, 0x26, 0x44,
-        0x1E, 0xFA, 0x26, 0x46, 0x1B, 0xF2, 0xFF, 0xFF, 0xE4, 0xA4, 0x3E, 0xFA, 0x24, 0x60, 0x74, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x6F, 0x00, 0xA3, 0x46, 0x22, 0xF2, 0x60, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x22, 0xFA, 0xA3, 0x46,
-        0x6C, 0x02, 0x2A, 0xF0, 0xA3, 0x46, 0x1E, 0xF2, 0xA3, 0x46, 0x00, 0xBC, 0x00, 0xF2, 0x01, 0x02,
-        0x64, 0x00, 0x44, 0x4C, 0x3F, 0xF0, 0x60, 0x43, 0x23, 0x46, 0x1E, 0xF4, 0x09, 0x60, 0x00, 0x65,
-        0x3F, 0xF2, 0x26, 0x46, 0xC0, 0x84, 0xD4, 0x80, 0x60, 0x45, 0x57, 0x07, 0x80, 0xFC, 0x1B, 0xF2,
-        0x06, 0xF2, 0x60, 0x41, 0x23, 0x46, 0x1E, 0xF4, 0x1B, 0xF0, 0x06, 0xF0, 0xC1, 0x81, 0x06, 0xFA,
-        0x05, 0xFA, 0x9B, 0xFA, 0x65, 0x44, 0x3F, 0xFA, 0x64, 0x46, 0x00, 0xFC, 0x63, 0x46, 0x01, 0xF2,
-        0x10, 0x61, 0xF2, 0xA4, 0x01, 0xFA, 0xC8, 0x83, 0x02, 0x64, 0x59, 0xD0, 0x58, 0xD8, 0xFD, 0x1F,
-        0x06, 0x45, 0x24, 0x60, 0x74, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18, 0x70, 0x67,
-        0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03, 0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46, 0x25, 0x44, 0x80, 0xFC,
-        0x05, 0xFA, 0xAF, 0x60, 0x58, 0x4E, 0x95, 0x78, 0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF, 0x2C, 0x44,
-        0x04, 0x27, 0x16, 0x00, 0x23, 0x46, 0x1E, 0xF2, 0x9E, 0xFC, 0x60, 0x46, 0x46, 0x46, 0x3F, 0xF2,
-        0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA, 0x26, 0x46, 0x2C, 0x43, 0x2A, 0xFC, 0x06, 0xF4, 0x00, 0x64,
-        0x00, 0xFA, 0x01, 0xF0, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0x01, 0xFA, 0x26, 0x46, 0x1D, 0x00,
-        0x00, 0x66, 0x46, 0x46, 0xBF, 0x60, 0xEB, 0x78, 0xFF, 0xFF, 0xA3, 0x46, 0x1E, 0xF0, 0x9E, 0xFC,
-        0x00, 0x63, 0x33, 0x85, 0xA3, 0x46, 0x0D, 0x03, 0xA3, 0x46, 0x22, 0xF2, 0x0F, 0x65, 0xA4, 0x85,
-        0xD4, 0x84, 0x22, 0xFA, 0xA3, 0x46, 0xA2, 0xFF, 0xAF, 0x60, 0x58, 0x4E, 0x95, 0x78, 0xFF, 0xFF,
-        0xA3, 0xFF, 0x26, 0x46, 0xC5, 0x60, 0x5B, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x32, 0xF0, 0x60, 0x40,
-        0x08, 0x2A, 0x5C, 0x00, 0x01, 0x2B, 0x2F, 0x00, 0x64, 0x40, 0x01, 0x2A, 0x2C, 0x00, 0xB8, 0xF1,
-        0x27, 0x60, 0x8A, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF,
-        0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0xB8, 0xF1, 0x27, 0x60, 0x90, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x2B, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x88, 0x64, 0xA0, 0xD3, 0xFF, 0xFF,
-        0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00,
-        0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0xB8, 0xF1,
-        0x27, 0x60, 0x8E, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05,
-        0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64,
-        0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x07, 0xF4, 0xFF, 0xFF,
-        0x22, 0xF2, 0x26, 0x46, 0x0F, 0xB4, 0xDC, 0x85, 0xB8, 0xF1, 0x27, 0x60, 0x8C, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0B, 0x03, 0x07, 0x05, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03,
-        0xA2, 0xDB, 0x09, 0x04, 0xC6, 0xFE, 0x07, 0x00, 0x00, 0x64, 0xB8, 0x84, 0xA2, 0xDB, 0x8A, 0xFF,
-        0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3B, 0x12, 0x00,
-        0xB8, 0xF1, 0x27, 0x60, 0x9A, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80,
-        0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75,
-        0x88, 0xFF, 0x13, 0x00, 0x02, 0x3B, 0x11, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0x9C, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE,
-        0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xC6, 0x60, 0x85, 0x78, 0xFF, 0xFF,
-        0xBF, 0x60, 0xEB, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xBF, 0x60, 0xEB, 0x78, 0xFF, 0xFF, 0x24, 0x60,
-        0x74, 0x62, 0x24, 0x60, 0x58, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0x00, 0x66, 0x46, 0x46, 0xBF, 0x60, 0xEB, 0x78, 0xFF, 0xFF,
-        0x2A, 0xF2, 0x58, 0x63, 0x60, 0x47, 0x01, 0x27, 0x64, 0x63, 0x31, 0x60, 0x28, 0x62, 0x61, 0x5C,
-        0xA2, 0xD9, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41, 0xBD, 0xD0, 0x00, 0xF4, 0x04, 0xF8,
-        0x83, 0xFA, 0x82, 0xF8, 0xA6, 0x46, 0x02, 0xB0, 0x5E, 0x63, 0x04, 0x03, 0x64, 0x63, 0x03, 0xB0,
-        0x02, 0x3A, 0x6C, 0x63, 0x3F, 0xF2, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41, 0xBD, 0xD0,
-        0xA6, 0x46, 0x07, 0xF8, 0x86, 0xFA, 0x85, 0xF8, 0x60, 0x47, 0x08, 0xFA, 0x31, 0x60, 0x28, 0x62,
-        0xA2, 0xD1, 0x26, 0x46, 0x64, 0x41, 0x2F, 0x58, 0xFF, 0xFF, 0xA9, 0xF5, 0x00, 0xF2, 0x26, 0x46,
-        0x31, 0xF0, 0x39, 0x18, 0x66, 0x41, 0x1C, 0x60, 0xBA, 0x65, 0x64, 0x47, 0x00, 0x7F, 0xA9, 0xF1,
-        0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B,
-        0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0,
-        0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2,
-        0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43,
-        0x61, 0x46, 0x1E, 0x60, 0xBC, 0x61, 0xA1, 0xD3, 0x1E, 0x60, 0xFE, 0x7C, 0xD0, 0x80, 0xFF, 0xFF,
-        0x07, 0x03, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0x49, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xA1, 0xDB,
-        0xC6, 0x60, 0x40, 0x78, 0xFF, 0xFF, 0x20, 0x7C, 0x72, 0x44, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF,
-        0x02, 0x04, 0xD0, 0x84, 0xFB, 0x01, 0xE0, 0x83, 0xA9, 0xF3, 0x02, 0xA3, 0x43, 0x93, 0xA9, 0xF3,
-        0xFF, 0xFF, 0x02, 0xA5, 0xD7, 0x80, 0x04, 0xA5, 0x08, 0x24, 0x65, 0x43, 0x66, 0x41, 0x63, 0x46,
-        0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x1C, 0x60,
-        0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8,
-        0xA9, 0xF3, 0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04,
-        0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46,
-        0x31, 0xF0, 0x66, 0x41, 0x1C, 0x60, 0xBA, 0x65, 0x64, 0x47, 0x00, 0x7F, 0xA9, 0xF1, 0xE0, 0x84,
-        0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44,
-        0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA,
-        0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB,
-        0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46,
-        0x2F, 0xF2, 0x30, 0xF0, 0x31, 0xF0, 0x64, 0x45, 0x46, 0x43, 0x63, 0x46, 0x03, 0xFA, 0x06, 0xF2,
-        0x84, 0xF8, 0x00, 0x7E, 0x06, 0xFA, 0x05, 0xF8, 0xA3, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0xDC, 0xF3,
-        0x2A, 0xF2, 0x07, 0xB0, 0x03, 0x3A, 0x2A, 0x00, 0x00, 0xF4, 0x09, 0xF2, 0x60, 0x45, 0x80, 0x3A,
-        0x05, 0x00, 0x0E, 0xF2, 0xFF, 0xFF, 0x02, 0xB0, 0x0F, 0xF2, 0x20, 0x03, 0x60, 0x47, 0x00, 0x3A,
-        0x1D, 0x00, 0x60, 0x41, 0x00, 0x36, 0x13, 0x00, 0xDA, 0x85, 0x2D, 0x60, 0x7A, 0x63, 0xBD, 0xD1,
-        0xFF, 0xFF, 0xD1, 0x80, 0xFF, 0xFF, 0x12, 0x02, 0x60, 0xFE, 0xBD, 0xD3, 0xA5, 0xD0, 0xDE, 0x85,
-        0xD0, 0x80, 0xCD, 0x81, 0x0B, 0x02, 0xF9, 0x02, 0x20, 0xFE, 0x00, 0x64, 0x0A, 0x00, 0x26, 0x46,
-        0x48, 0xFE, 0x65, 0x40, 0x40, 0x3A, 0x02, 0x00, 0x01, 0x64, 0x03, 0x00, 0x08, 0xFE, 0x20, 0xFE,
-        0x00, 0x64, 0x40, 0x48, 0x26, 0x46, 0x2D, 0x58, 0xFF, 0xFF, 0x2D, 0x60, 0x52, 0x62, 0xA2, 0xD3,
-        0x18, 0xF2, 0x60, 0x40, 0x01, 0x26, 0x2A, 0xFA, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x26,
-        0x03, 0x00, 0xC7, 0x60, 0x6D, 0x78, 0xFF, 0xFF, 0x3F, 0xF0, 0x32, 0x40, 0x10, 0x2A, 0x20, 0x00,
-        0x2C, 0xF0, 0x64, 0x41, 0x60, 0x40, 0x40, 0x27, 0x1B, 0x00, 0xCD, 0x81, 0xDD, 0x81, 0x18, 0x03,
-        0x17, 0x03, 0x64, 0x40, 0x01, 0x26, 0x14, 0x00, 0x01, 0x61, 0x13, 0x00, 0xB8, 0xF1, 0x27, 0x60,
-        0xA0, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80, 0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB,
-        0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x23, 0x00,
-        0x00, 0x61, 0x60, 0x40, 0x18, 0x36, 0x1F, 0x00, 0xC5, 0x60, 0x58, 0x4F, 0x78, 0x78, 0xFF, 0xFF,
-        0x0F, 0xF0, 0xEB, 0xF1, 0x64, 0x44, 0x60, 0x22, 0x19, 0x00, 0xDC, 0xF3, 0xFF, 0xFF, 0x07, 0xB4,
-        0xFD, 0xA0, 0x2A, 0xF2, 0x03, 0x02, 0x08, 0xB0, 0xFF, 0xFF, 0x10, 0x02, 0x32, 0xF2, 0x33, 0xF2,
-        0xD0, 0x80, 0xEC, 0xF1, 0x0B, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x08, 0x02, 0xED, 0xF1, 0xFF, 0xFF,
-        0xD0, 0x80, 0x0F, 0xF0, 0x03, 0x02, 0xC7, 0x60, 0xB9, 0x78, 0xFF, 0xFF, 0x00, 0xF4, 0xAA, 0x60,
-        0xAA, 0x65, 0x09, 0xF2, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64, 0x4F, 0x02, 0xD0, 0x80, 0x00, 0x64,
-        0x5A, 0xD0, 0x4B, 0x02, 0x64, 0x45, 0xD4, 0x80, 0xF8, 0x7F, 0x08, 0x02, 0x5A, 0xD0, 0x26, 0x46,
-        0x64, 0x45, 0x23, 0xF0, 0x20, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x0B, 0x00, 0xD4, 0x80, 0x1D, 0x60,
-        0x60, 0x64, 0x16, 0x02, 0x5A, 0xD0, 0x26, 0x46, 0x64, 0x45, 0x23, 0xF0, 0x40, 0x67, 0xB0, 0x84,
-        0xA2, 0xDA, 0x65, 0x44, 0x88, 0x3A, 0x07, 0x00, 0x77, 0x37, 0x08, 0x00, 0x78, 0x37, 0x06, 0x00,
-        0x8E, 0x37, 0x04, 0x00, 0x2A, 0x00, 0x81, 0x3A, 0x28, 0x00, 0x80, 0x37, 0x00, 0x61, 0x25, 0x00,
-        0xD4, 0x80, 0x01, 0x60, 0x00, 0x64, 0x5A, 0xD0, 0x20, 0x02, 0xD0, 0x80, 0x5A, 0xD0, 0x1D, 0x02,
-        0x26, 0x46, 0x64, 0x47, 0x7F, 0xB4, 0xFD, 0xA0, 0x09, 0x03, 0x17, 0x07, 0x32, 0x40, 0x02, 0x26,
-        0x47, 0x00, 0x23, 0xF0, 0x60, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x42, 0x00, 0x0F, 0xF2, 0x32, 0x40,
-        0x02, 0x26, 0x3E, 0x00, 0xF2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xF2, 0xFB, 0xEB, 0x60, 0x58, 0x4F,
-        0xA5, 0x78, 0xFF, 0xFF, 0xC7, 0x60, 0xC3, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x61, 0x40, 0x01, 0x2A,
-        0x12, 0x00, 0xB8, 0xF1, 0x27, 0x60, 0xA0, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x04, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0x04, 0x00, 0x8A, 0xFF, 0x20, 0x60,
-        0x00, 0x75, 0x88, 0xFF, 0x6E, 0x00, 0x0F, 0xF2, 0x81, 0xF1, 0x2A, 0xF2, 0x60, 0x40, 0x20, 0x2A,
-        0x12, 0x00, 0x5E, 0x63, 0x60, 0x40, 0x02, 0x2B, 0x64, 0x63, 0xBD, 0xD2, 0xBD, 0xD2, 0xD0, 0x80,
-        0x82, 0xF1, 0x08, 0x02, 0xD0, 0x80, 0xA3, 0xD2, 0x83, 0xF1, 0x04, 0x02, 0xD0, 0x80, 0xFF, 0xFF,
-        0x01, 0x02, 0x06, 0x00, 0x56, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0x36, 0x51, 0x00,
-        0xF2, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xF2, 0xFB, 0x59, 0x00, 0x26, 0x46, 0x2A, 0xF2, 0xFF, 0xFF,
-        0xFF, 0xFF, 0x0C, 0x26, 0x46, 0x00, 0xB0, 0x36, 0x15, 0x00, 0x10, 0x36, 0x13, 0x00, 0x30, 0x36,
-        0x11, 0x00, 0xC0, 0x36, 0x02, 0x00, 0xA0, 0x3A, 0x12, 0x00, 0x81, 0xF1, 0x32, 0xF2, 0x33, 0xF2,
-        0xD0, 0x80, 0x82, 0xF1, 0x36, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x83, 0xF1, 0x32, 0x02, 0xD0, 0x80,
-        0xFF, 0xFF, 0x2F, 0x02, 0xDB, 0x60, 0x58, 0x4F, 0xD2, 0x78, 0xFF, 0xFF, 0x26, 0x00, 0x50, 0x3A,
-        0x05, 0x00, 0xEF, 0x60, 0x58, 0x4F, 0xE3, 0x78, 0xFF, 0xFF, 0x1F, 0x00, 0x40, 0x3A, 0x05, 0x00,
-        0xE8, 0x60, 0x58, 0x4F, 0x60, 0x78, 0xFF, 0xFF, 0x18, 0x00, 0x80, 0x3A, 0x15, 0x00, 0x81, 0xF1,
-        0x32, 0xF2, 0x33, 0xF2, 0xD0, 0x80, 0x82, 0xF1, 0x14, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x83, 0xF1,
-        0x10, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x0D, 0x02, 0xDF, 0x60, 0x58, 0x4F, 0x28, 0x78, 0xFF, 0xFF,
-        0x20, 0x60, 0x58, 0x4F, 0xBF, 0x78, 0xFF, 0xFF, 0x04, 0x00, 0x66, 0x44, 0x00, 0xA8, 0xFF, 0xFF,
-        0x0A, 0x03, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78,
-        0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xC5, 0x60, 0x58, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x3B, 0xF0,
-        0x60, 0x40, 0x40, 0x2B, 0x1E, 0x00, 0xC0, 0x60, 0x00, 0x64, 0x64, 0x40, 0x20, 0x2B, 0x19, 0x00,
-        0x22, 0xF2, 0xFF, 0xFF, 0x04, 0xB4, 0xFF, 0xFF, 0x14, 0x03, 0xC0, 0x60, 0x00, 0x64, 0x26, 0x46,
-        0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x23, 0xF2, 0x10, 0xBD, 0xB4, 0x9C, 0x3F, 0xF2,
-        0x23, 0xF8, 0x3F, 0xF2, 0xFF, 0xFF, 0xF8, 0xA4, 0x3F, 0xFA, 0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA,
-        0x26, 0x46, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x58, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0xCB, 0x01, 0x00, 0x60, 0x30, 0x61,
-        0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x60, 0xFB, 0x00, 0x60, 0x30, 0x61,
-        0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x5F, 0xFB, 0x00, 0x60, 0x02, 0x61,
-        0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x66, 0xFB, 0x10, 0x60, 0x26, 0x62,
-        0xC9, 0x60, 0xC7, 0x64, 0xA2, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x01, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0x0F, 0x60, 0xF0, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x14, 0x63, 0x01, 0x60, 0xC4, 0x61, 0x28, 0x60, 0x3E, 0x64,
-        0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x00, 0x60, 0x88, 0x63, 0x27, 0x60, 0xB4, 0x61, 0x28, 0x60,
-        0x54, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD1, 0xFF, 0xFF,
-        0x64, 0x45, 0xA9, 0xF1, 0x66, 0x41, 0x64, 0x46, 0x36, 0xF2, 0xFF, 0xFF, 0x65, 0x40, 0x01, 0x36,
-        0x22, 0x64, 0x36, 0xFA, 0x61, 0x46, 0x32, 0x45, 0x28, 0x60, 0x3C, 0x62, 0xA2, 0xD1, 0x10, 0x67,
-        0xB4, 0x85, 0x64, 0x40, 0x01, 0x2A, 0x94, 0x85, 0x45, 0x52, 0xFF, 0x60, 0xE7, 0x65, 0x32, 0x41,
-        0xA5, 0x81, 0x2D, 0x60, 0x1A, 0x62, 0xA2, 0xD1, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0x64, 0x40,
-        0x01, 0x2A, 0x0D, 0x00, 0x08, 0x65, 0xFF, 0xA0, 0xFF, 0xFF, 0x01, 0x03, 0x08, 0x00, 0x28, 0x60,
-        0x30, 0x62, 0xA2, 0xD3, 0xB5, 0x81, 0x10, 0x65, 0x60, 0x40, 0x01, 0x26, 0xB5, 0x81, 0x41, 0x52,
-        0x2D, 0x60, 0x1A, 0x62, 0xA2, 0xD3, 0x31, 0x60, 0x18, 0x63, 0xF0, 0x84, 0xF0, 0x84, 0xF0, 0x84,
-        0x01, 0xB5, 0xF0, 0x84, 0xF0, 0x84, 0x03, 0xB4, 0x65, 0x5C, 0xA3, 0xD9, 0x31, 0x60, 0x1A, 0x63,
-        0x02, 0xA8, 0xA3, 0xDB, 0x1B, 0x02, 0x07, 0x60, 0xD0, 0x64, 0x31, 0x60, 0x1C, 0x63, 0xA3, 0xDB,
-        0x31, 0x60, 0x24, 0x63, 0xA3, 0xDB, 0x00, 0x60, 0xC8, 0x64, 0x31, 0x60, 0x1E, 0x63, 0xA3, 0xDB,
-        0x31, 0x60, 0x26, 0x63, 0xA3, 0xDB, 0x00, 0x60, 0x64, 0x64, 0x31, 0x60, 0x20, 0x63, 0xA3, 0xDB,
-        0x01, 0x60, 0x90, 0x64, 0x31, 0x60, 0x22, 0x63, 0xA3, 0xDB, 0x08, 0x00, 0x0A, 0x64, 0x31, 0x60,
-        0x20, 0x63, 0xA3, 0xDB, 0x01, 0x64, 0x31, 0x60, 0x22, 0x63, 0xA3, 0xDB, 0x2D, 0x60, 0x1A, 0x62,
-        0xA2, 0xD1, 0x01, 0x64, 0x64, 0x40, 0x40, 0x2A, 0x03, 0x00, 0x31, 0x60, 0x0E, 0x7C, 0xA4, 0xDB,
-        0x12, 0x60, 0x28, 0x63, 0xBA, 0xF3, 0x0E, 0x61, 0x60, 0x45, 0x65, 0x44, 0xE8, 0x85, 0x05, 0x64,
-        0xCD, 0x81, 0x02, 0x28, 0x00, 0x64, 0xBD, 0xDB, 0xF8, 0x02, 0x2D, 0x60, 0x78, 0x61, 0x27, 0x60,
-        0xB6, 0x64, 0x20, 0x63, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0xBD, 0xF1, 0x80, 0xF9, 0x1A, 0x63,
-        0x01, 0x60, 0x00, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F, 0x40, 0x40, 0x01, 0x64, 0x87, 0xFB,
-        0x28, 0x60, 0xCC, 0x61, 0xA1, 0xD3, 0x2E, 0x60, 0x96, 0x61, 0xFE, 0xA4, 0xE0, 0x84, 0x04, 0x24,
-        0x0F, 0x00, 0xE0, 0x84, 0x41, 0x91, 0x2D, 0x60, 0xCC, 0x62, 0xA2, 0xD3, 0xA1, 0xD1, 0x2D, 0x60,
-        0xC4, 0x62, 0xA0, 0x83, 0xA2, 0xDD, 0x59, 0xD1, 0x2D, 0x60, 0xC2, 0x62, 0xA0, 0x83, 0xA2, 0xDD,
-        0xE5, 0xF3, 0x7F, 0xFB, 0x1B, 0x60, 0xC6, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x00, 0xB8, 0x10, 0x60,
-        0x5C, 0x65, 0x0D, 0x03, 0x1B, 0x60, 0xCE, 0x63, 0xE5, 0xF3, 0xA3, 0xD1, 0xE0, 0x84, 0xC4, 0x84,
-        0xA0, 0xD3, 0xFF, 0xFF, 0x01, 0xB0, 0xFF, 0xFF, 0x02, 0x02, 0xE5, 0xF9, 0x7F, 0xF9, 0xE5, 0xF3,
-        0x01, 0x61, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0xE1, 0x81, 0xFB, 0x01, 0xBA, 0xF3, 0x61, 0x45,
-        0xA4, 0x80, 0xFF, 0xFF, 0x0B, 0x02, 0x00, 0xB8, 0x01, 0x63, 0x08, 0x03, 0xE8, 0x84, 0xFF, 0xFF,
-        0x02, 0x24, 0x02, 0x00, 0xDF, 0x83, 0xFA, 0x01, 0xE5, 0xFD, 0x7F, 0xFD, 0x0F, 0x60, 0xF0, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xF2, 0x62, 0x40, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xC8, 0x60, 0xF7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7F, 0xF1,
-        0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x0C, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x07, 0x64,
-        0xD0, 0xFB, 0x0F, 0x60, 0xF2, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xC9, 0x60, 0x34, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xF0, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x01, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xE3, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x05, 0x3A,
-        0x03, 0x00, 0x68, 0x60, 0xBA, 0x61, 0x11, 0x00, 0x04, 0x3A, 0x03, 0x00, 0x68, 0x60, 0xAE, 0x61,
-        0x0C, 0x00, 0x03, 0x3A, 0x03, 0x00, 0x68, 0x60, 0xA2, 0x61, 0x07, 0x00, 0x02, 0x3A, 0x03, 0x00,
-        0x68, 0x60, 0x96, 0x61, 0x02, 0x00, 0x68, 0x60, 0x8A, 0x61, 0x3C, 0x60, 0x00, 0x66, 0x01, 0x60,
-        0xB8, 0x64, 0x0A, 0x63, 0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F, 0x01, 0x60, 0xBE, 0x61, 0xE4, 0xF3,
-        0x00, 0x66, 0x00, 0xA8, 0x04, 0x65, 0x01, 0x03, 0xA1, 0xDB, 0x1F, 0x60, 0x08, 0x63, 0x55, 0xD3,
-        0xFF, 0xFF, 0x20, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF, 0x21, 0x7F, 0xBD, 0xDB, 0x59, 0xD3,
-        0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60, 0xF0, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE,
-        0x0B, 0x04, 0x0F, 0x60, 0xF2, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xC9, 0x60, 0x7B, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x9A, 0x62, 0x1F, 0x60, 0x06, 0x64,
-        0xA2, 0xDB, 0x20, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xF2, 0x62, 0x20, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xC9, 0x60, 0xA0, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0xC5, 0xFE, 0x20, 0x40, 0x20, 0x2A, 0x08, 0x00, 0x10, 0x60, 0x02, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xF0, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x5A, 0xDB, 0x0E, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xF0, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x8B, 0xFB,
-        0xFF, 0xFF, 0xC1, 0xFE, 0x10, 0x60, 0x1A, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0xDF, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x24, 0x60, 0xA8, 0x63, 0x01, 0x64, 0xBD, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x0F, 0x60, 0xF0, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x0F, 0x60, 0xF2, 0x62, 0x00, 0x60, 0x08, 0x64, 0xA2, 0xDB, 0xC9, 0x60, 0xF3, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xF0, 0x62,
-        0xA2, 0xD1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x8B, 0xF3, 0x00, 0x65, 0xD4, 0x80,
-        0xFF, 0xFF, 0x0B, 0x03, 0x0F, 0x60, 0xF2, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xC9, 0x60,
-        0xF3, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xDE, 0xFE, 0x0E, 0x04, 0x09, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xF2, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCA, 0x60,
-        0x1D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0A, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x24, 0x60, 0x9A, 0x62, 0x06, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xF0, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0xBE, 0xFE, 0xDA, 0xFE, 0x24, 0x60, 0x34, 0x61, 0xCA, 0x60,
-        0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x22, 0x61, 0xCA, 0x60, 0x58, 0x4E, 0x57, 0x78,
-        0xFF, 0xFF, 0x24, 0x60, 0x28, 0x61, 0xCA, 0x60, 0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x24, 0x60,
-        0x46, 0x61, 0xCA, 0x60, 0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x4C, 0x61, 0xCA, 0x60,
-        0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x58, 0x61, 0xCA, 0x60, 0x58, 0x4E, 0x57, 0x78,
-        0xFF, 0xFF, 0xC5, 0xFE, 0x0E, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0xA1, 0xD3,
-        0x0E, 0x57, 0x24, 0x00, 0x0E, 0xF2, 0x44, 0x4C, 0x80, 0xB0, 0x10, 0xB0, 0x0B, 0x03, 0x24, 0x60,
-        0x74, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x13, 0x00, 0x12, 0x02, 0xF0, 0x37, 0x09, 0x00, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64,
-        0xD0, 0x80, 0xA2, 0xFF, 0xB0, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0xB0, 0xFB, 0x24, 0x60, 0x74, 0x64,
-        0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x2C, 0x44, 0xAC, 0x86, 0x09, 0xF0,
-        0xD9, 0x02, 0x37, 0x58, 0xFF, 0xFF, 0x1A, 0x60, 0x66, 0x63, 0x00, 0x64, 0xA3, 0xDB, 0x06, 0xA3,
-        0x10, 0x60, 0x4C, 0x64, 0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB, 0x00, 0x63, 0x10, 0x60,
-        0x9E, 0x62, 0xA2, 0xDD, 0x10, 0x60, 0x4A, 0x62, 0xCF, 0x60, 0x16, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x24, 0x62, 0xCE, 0x60, 0xE2, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x02, 0x64,
-        0xA2, 0xDB, 0xCA, 0x60, 0xFB, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x68, 0x60,
-        0x7E, 0x61, 0x3C, 0x60, 0x00, 0x66, 0x01, 0x60, 0xB8, 0x64, 0x0A, 0x63, 0x59, 0xD0, 0x58, 0xD9,
-        0xFD, 0x1F, 0x01, 0x60, 0xBE, 0x61, 0xE4, 0xF3, 0x00, 0x66, 0x00, 0xA8, 0x04, 0x65, 0x01, 0x03,
-        0xA1, 0xDB, 0x1F, 0x60, 0x08, 0x63, 0x55, 0xD3, 0xFF, 0xFF, 0x20, 0x7F, 0xBD, 0xDB, 0x59, 0xD3,
-        0xFF, 0xFF, 0x21, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xCA, 0x60, 0xC7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x24, 0x60, 0x9A, 0x62, 0x1F, 0x60, 0x06, 0x64, 0xA2, 0xDB, 0x20, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCA, 0x60, 0xEC, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x10, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xBA, 0xFE, 0x27, 0x60, 0xB6, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x03, 0xA8,
-        0x02, 0xA8, 0x04, 0x03, 0x0F, 0x02, 0xCE, 0x60, 0xB3, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0xEF, 0x78,
-        0xFF, 0xFF, 0x1F, 0x60, 0x80, 0x65, 0xA5, 0xD3, 0xFF, 0xFF, 0xF3, 0xB4, 0xA5, 0xDB, 0xCB, 0x60,
-        0x22, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0x1A, 0x60, 0x40, 0x64, 0xA0, 0xDD, 0x1F, 0x60, 0x80, 0x64,
-        0x00, 0x63, 0xA0, 0xDD, 0x11, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xBA, 0xFE, 0x02, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0x01, 0xBC, 0xF2, 0xFB,
-        0x44, 0x60, 0x44, 0x64, 0x81, 0xFB, 0x82, 0xFB, 0x83, 0xFB, 0xFF, 0xFF, 0x20, 0x40, 0x04, 0x2B,
-        0x19, 0x00, 0x9B, 0xFE, 0x09, 0x04, 0xBB, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x12, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60,
-        0xEC, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCB, 0x60, 0x36, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x0D, 0x64, 0x53, 0xFB,
-        0x29, 0x60, 0xA4, 0x64, 0x54, 0xFB, 0x13, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xCE, 0x61,
-        0xA1, 0xD1, 0x02, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x64, 0x40, 0x01, 0x2A, 0x07, 0x00,
-        0x00, 0x64, 0xA1, 0xDB, 0x02, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0xCA, 0x60,
-        0x58, 0x4E, 0xA7, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0x80, 0x62, 0x1A, 0x60, 0x40, 0x65, 0xA2, 0xD3,
-        0xA5, 0xD1, 0x60, 0x40, 0x0C, 0x22, 0x04, 0x00, 0x04, 0x61, 0xD1, 0x80, 0xFF, 0xFF, 0x2D, 0x05,
-        0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x4E, 0xE4, 0x60, 0x58, 0x4F, 0xFB, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x60, 0xEC, 0x62, 0x10, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCB, 0x60,
-        0x95, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1F, 0x60, 0x80, 0x64, 0xA0, 0xD3,
-        0xFF, 0xFF, 0x60, 0x40, 0x0C, 0x26, 0x11, 0x00, 0xFD, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80,
-        0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x38, 0x00, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x0F, 0x4E, 0xEC, 0x60, 0x58, 0x4F, 0xB9, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x60,
-        0xEC, 0x62, 0x10, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCB, 0x60, 0xC2, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x14, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xFD, 0x60, 0xFF, 0x65, 0x20, 0x44,
-        0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x88, 0xF1, 0x19, 0x60, 0x86, 0x63,
-        0xD3, 0x80, 0x20, 0x44, 0x05, 0x03, 0x10, 0xBC, 0x40, 0x40, 0xCD, 0x60, 0xE8, 0x78, 0xFF, 0xFF,
-        0x89, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0x20, 0x44, 0x06, 0x02, 0xD4, 0xF3, 0xFF, 0xFF, 0x00, 0xA8,
-        0xFF, 0xFF, 0x1E, 0x02, 0x72, 0x00, 0x10, 0xBC, 0x40, 0x40, 0x64, 0x42, 0x5A, 0xD1, 0x06, 0x63,
-        0xA4, 0xD1, 0xC3, 0x83, 0x7F, 0xF9, 0xBD, 0xD1, 0x81, 0xF9, 0xBD, 0xD1, 0xFF, 0xFF, 0x82, 0xF9,
-        0xBD, 0xD1, 0x83, 0xF9, 0x04, 0xA3, 0xBD, 0xD1, 0x2D, 0x60, 0x7A, 0x64, 0x64, 0x41, 0xDD, 0x81,
-        0xFE, 0xB1, 0xA0, 0xD9, 0x04, 0x03, 0xBD, 0xD1, 0xC9, 0x81, 0x58, 0xD9, 0xFC, 0x02, 0x1E, 0x00,
-        0xE5, 0xF3, 0x7F, 0xFB, 0x29, 0x60, 0xA4, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x2D, 0x60,
-        0x7A, 0x63, 0x02, 0x02, 0x27, 0x60, 0xB8, 0x61, 0xA1, 0xD3, 0xBD, 0xDB, 0xDC, 0x84, 0xFE, 0xB4,
-        0x59, 0xD1, 0xC8, 0x84, 0xBD, 0xD9, 0xFC, 0x02, 0xED, 0xF3, 0x72, 0x45, 0xEC, 0xF3, 0x94, 0x83,
-        0x83, 0xFD, 0x94, 0x83, 0x82, 0xFD, 0x65, 0x5F, 0x02, 0x64, 0x81, 0xFB, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xCC, 0x60, 0x26, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x18, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x7F, 0xF1, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCC, 0x60,
-        0x4D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0xCC, 0x60, 0xAD, 0x78, 0xFF, 0xFF, 0x16, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0xFF, 0x60, 0xEF, 0x65, 0x20, 0x44, 0x24, 0x80, 0xCA, 0x60, 0x58, 0x4E, 0xA7, 0x78, 0xFF, 0xFF,
-        0x17, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x02, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0x01, 0xBC,
-        0xF2, 0xFB, 0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1,
-        0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xDA, 0xFE, 0xC1, 0xFE, 0x1A, 0x60, 0x40, 0x62, 0xA2, 0xD1, 0x1A, 0x60, 0x6A, 0x62,
-        0xA2, 0xD9, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x06, 0x64, 0xA2, 0xDB, 0xCB, 0x60,
-        0x22, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x1A, 0x60, 0x40, 0x61, 0x75, 0x60, 0x30, 0x65, 0xA1, 0xD3,
-        0xFF, 0xFF, 0xFF, 0xA0, 0xE0, 0x84, 0x02, 0x02, 0x03, 0x60, 0xE8, 0x64, 0xD4, 0x80, 0xFF, 0xFF,
-        0x01, 0x04, 0x65, 0x44, 0xA1, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x79, 0xF3, 0x7A, 0xFB, 0x1F, 0x60,
-        0x52, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xFF, 0x60, 0xDF, 0x65, 0x20, 0x44, 0x24, 0x80, 0xBF, 0xF1,
-        0x1A, 0x60, 0x6A, 0x62, 0xA2, 0xD9, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB,
-        0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80,
-        0x10, 0x26, 0x67, 0x00, 0x00, 0x64, 0xB5, 0xFB, 0xB6, 0xFB, 0xB7, 0xFB, 0x00, 0x75, 0x00, 0x72,
-        0xBD, 0xF1, 0x80, 0xF9, 0x64, 0x44, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x93, 0xE6, 0xF1,
-        0x86, 0xF9, 0x28, 0x60, 0xD2, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x08, 0x02,
-        0x01, 0x60, 0xB0, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x01, 0x03, 0x02, 0x64,
-        0x60, 0x41, 0x2D, 0x60, 0x28, 0x63, 0xBD, 0xD3, 0xA3, 0xD3, 0xFF, 0xB5, 0x65, 0x5C, 0xCD, 0x81,
-        0x80, 0xBF, 0x0E, 0x03, 0x80, 0xBF, 0xBD, 0xDB, 0x65, 0x44, 0xC8, 0x84, 0xFF, 0xFF, 0x0B, 0x03,
-        0x60, 0x45, 0xCD, 0x81, 0xA3, 0xD3, 0x07, 0x03, 0xCD, 0x81, 0x80, 0xBF, 0x01, 0x03, 0x80, 0xBC,
-        0x60, 0x47, 0xBD, 0xDB, 0x00, 0x65, 0x64, 0x41, 0x2D, 0x60, 0x2A, 0x63, 0xBD, 0xD3, 0xFF, 0xFF,
-        0x80, 0xB0, 0xFF, 0xFF, 0x01, 0x03, 0x60, 0x45, 0x60, 0x47, 0x80, 0xB0, 0xFF, 0xFF, 0x01, 0x03,
-        0x60, 0x45, 0xC9, 0x81, 0xFF, 0xFF, 0xF2, 0x02, 0x65, 0x44, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00,
-        0x0A, 0x64, 0x15, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x14, 0x64, 0x11, 0x00, 0x0A, 0x3A, 0x02, 0x00,
-        0x32, 0x64, 0x0D, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x37, 0x64, 0x09, 0x00, 0x10, 0x3A, 0x02, 0x00,
-        0x50, 0x64, 0x05, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x6E, 0x64, 0x01, 0x00, 0x14, 0x64, 0x7C, 0xFB,
-        0x28, 0x00, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60,
-        0x84, 0x64, 0xA2, 0xDB, 0xCD, 0x60, 0x40, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x80, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0D, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0x7F, 0x61, 0xA1, 0x84,
-        0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x04, 0x00, 0xBB, 0xFE, 0xCB, 0x60, 0x22, 0x78,
-        0xFF, 0xFF, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD1, 0x00, 0x65, 0x64, 0x40, 0x01, 0x36, 0x22, 0x65,
-        0x64, 0x40, 0x07, 0x36, 0x01, 0x65, 0xA9, 0xF3, 0x66, 0x5C, 0x60, 0x46, 0x1F, 0x63, 0xE3, 0x83,
-        0xB6, 0xF8, 0x02, 0xA6, 0x66, 0x44, 0xFC, 0x1F, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x60, 0x40, 0x07, 0x3A, 0x04, 0x00, 0xA9, 0xF3, 0x04, 0x65, 0x60, 0x46, 0xB6, 0xF8, 0x64, 0x46,
-        0xA9, 0xF3, 0x32, 0x41, 0x60, 0x45, 0x08, 0xB1, 0x66, 0x41, 0x17, 0x03, 0x65, 0x46, 0x29, 0x60,
-        0xA2, 0x62, 0xA2, 0xD3, 0x06, 0xF0, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF,
-        0xB0, 0x84, 0x06, 0xFA, 0x66, 0x43, 0x02, 0xA3, 0x63, 0x46, 0x06, 0xF0, 0xFF, 0xFF, 0xB0, 0x84,
-        0x06, 0xFA, 0x61, 0x46, 0x32, 0x44, 0x10, 0xBC, 0x40, 0x52, 0x1F, 0x60, 0x52, 0x62, 0x01, 0x64,
-        0xA2, 0xDB, 0x0F, 0x4E, 0xE7, 0x60, 0x58, 0x4F, 0x51, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x0F, 0x60,
-        0xEA, 0x62, 0xA2, 0xD1, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x0F, 0x60, 0xEC, 0x62,
-        0x00, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0xCB, 0x60, 0x11, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x24, 0x60,
-        0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0xBB, 0xFE, 0x20, 0x44, 0x04, 0x27, 0x12, 0x00, 0x10, 0x26, 0x02, 0x00, 0xDB, 0xFE, 0x16, 0x00,
-        0x0F, 0x60, 0xCE, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x36, 0x07, 0x00, 0x01, 0x64,
-        0xA1, 0xDB, 0x01, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xD0, 0x62,
-        0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x64, 0x8C, 0xFB,
-        0xFF, 0x60, 0xEF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x03, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF,
-        0xFE, 0xB4, 0xF2, 0xFB, 0xC1, 0xFE, 0x1E, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF,
-        0x15, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xBB, 0xFE, 0xCF, 0x60, 0xD6, 0x78, 0xFF, 0xFF, 0x28, 0x60,
-        0x2C, 0x62, 0xA2, 0xD1, 0x00, 0x65, 0x64, 0x40, 0x01, 0x36, 0x22, 0x65, 0xA9, 0xF3, 0x66, 0x5C,
-        0x60, 0x46, 0x1F, 0x63, 0xE3, 0x83, 0xB6, 0xF8, 0x02, 0xA6, 0x66, 0x44, 0xFC, 0x1F, 0x64, 0x46,
-        0x79, 0xF1, 0xA9, 0xF3, 0x7A, 0xF9, 0x02, 0xA4, 0xD8, 0xF3, 0x60, 0x45, 0x66, 0x41, 0x65, 0x46,
-        0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36, 0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00,
-        0x05, 0x3A, 0x02, 0x00, 0x00, 0x64, 0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x79, 0xF3, 0x7A, 0xF1,
-        0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43, 0x02, 0x02, 0x79, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60,
-        0xAE, 0x65, 0xD8, 0xF3, 0xFF, 0xFF, 0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF,
-        0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x7B, 0xFB, 0x6F, 0xF0,
-        0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA, 0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF,
-        0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01, 0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA,
-        0x66, 0x43, 0x0C, 0xF4, 0xA9, 0xF1, 0x02, 0x64, 0xC0, 0x85, 0x0C, 0x61, 0x32, 0x40, 0x08, 0x2A,
-        0x15, 0x00, 0x29, 0x60, 0xA2, 0x62, 0xA2, 0xD3, 0x66, 0x41, 0x65, 0x46, 0x06, 0xF0, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF, 0xB0, 0x83, 0x06, 0xFC, 0x66, 0x42, 0xFE, 0xA2,
-        0x62, 0x46, 0x06, 0xF0, 0xFF, 0xFF, 0xB0, 0x84, 0x06, 0xFA, 0x61, 0x46, 0x1D, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x0B, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0x01, 0x65,
-        0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0xE5, 0xF1, 0x7F, 0xF9, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xCE, 0x60, 0x76, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7F, 0xF1,
-        0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60,
-        0xEC, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCE, 0x60, 0x9A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0xBE, 0xFE,
-        0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x01, 0x64, 0x8C, 0xFB, 0xFF, 0x60, 0xDF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x1E, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x06, 0x64, 0xDC, 0xFB,
-        0xF2, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0xE5, 0xF1, 0x7F, 0xF9, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x01, 0x64, 0x8C, 0xFB, 0xFF, 0x60, 0xDF, 0x65, 0x20, 0x44, 0x24, 0x80,
-        0xA9, 0xF1, 0x66, 0x45, 0x64, 0x46, 0x66, 0x43, 0x02, 0xA3, 0x63, 0x46, 0x02, 0x64, 0x06, 0xFA,
-        0x04, 0x63, 0x04, 0x61, 0x01, 0x60, 0xCE, 0x64, 0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F, 0x65, 0x46,
-        0x01, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0x1E, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x1F, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x00, 0x64, 0x68, 0xFB, 0x69, 0xFB,
-        0xA9, 0xF1, 0x0E, 0x64, 0x66, 0x41, 0x64, 0x42, 0x02, 0xA2, 0x62, 0x46, 0x06, 0xF0, 0xFF, 0x60,
-        0xFC, 0x64, 0xA0, 0x84, 0x06, 0xFA, 0x61, 0x46, 0xDC, 0xF3, 0xFF, 0xFF, 0x04, 0xA8, 0x0F, 0x60,
-        0xCE, 0x64, 0x07, 0x03, 0xA0, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2A, 0x02, 0x00, 0x00, 0x63,
-        0xA0, 0xDD, 0x01, 0x64, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB,
-        0xCA, 0x60, 0xFB, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x28, 0x60, 0x3A, 0x64, 0xA0, 0xD3, 0x00, 0xF4, 0x60, 0x40, 0x01, 0x3A, 0x42, 0x00, 0x18, 0x65,
-        0x22, 0x61, 0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4,
-        0x04, 0x65, 0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F,
-        0xCD, 0x81, 0xBD, 0xDB, 0xF0, 0x02, 0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x01, 0xA8,
-        0xE0, 0x85, 0x27, 0x02, 0xC7, 0x83, 0xBD, 0xD3, 0xBD, 0xD3, 0x81, 0xA8, 0x0D, 0xA8, 0x21, 0x02,
-        0x20, 0x02, 0xBD, 0xD3, 0xBD, 0xD3, 0x00, 0xA8, 0x60, 0xA8, 0x1B, 0x02, 0xBD, 0xD3, 0x19, 0x02,
-        0x1D, 0xA8, 0xA3, 0xD1, 0x16, 0x02, 0xE3, 0xF9, 0x01, 0x60, 0xB8, 0x64, 0x63, 0x41, 0x0A, 0x63,
-        0x59, 0xD1, 0x58, 0xD9, 0xFD, 0x1F, 0x59, 0xD1, 0x59, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x64, 0x5E,
-        0xD6, 0xFB, 0x59, 0xD1, 0x28, 0x60, 0x36, 0x64, 0xA0, 0xD9, 0x28, 0x60, 0xD6, 0x64, 0xA0, 0xD9,
-        0x23, 0x00, 0x28, 0x60, 0x40, 0x64, 0xA0, 0xD3, 0xE3, 0xFB, 0x60, 0x40, 0x05, 0x3A, 0x03, 0x00,
-        0x68, 0x60, 0xBA, 0x61, 0x11, 0x00, 0x04, 0x3A, 0x03, 0x00, 0x68, 0x60, 0xAE, 0x61, 0x0C, 0x00,
-        0x03, 0x3A, 0x03, 0x00, 0x68, 0x60, 0xA2, 0x61, 0x07, 0x00, 0x02, 0x3A, 0x03, 0x00, 0x68, 0x60,
-        0x96, 0x61, 0x02, 0x00, 0x68, 0x60, 0x8A, 0x61, 0x3C, 0x60, 0x00, 0x66, 0x01, 0x60, 0xB8, 0x64,
-        0x0A, 0x63, 0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F, 0x01, 0x60, 0xBE, 0x61, 0xE4, 0xF3, 0x00, 0x66,
-        0x00, 0xA8, 0x04, 0x65, 0x01, 0x03, 0xA1, 0xDB, 0x1F, 0x60, 0x08, 0x63, 0x55, 0xD3, 0xFF, 0xFF,
-        0x20, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF, 0x21, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF,
-        0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04,
-        0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xCF, 0x60, 0xA2, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x9A, 0x62, 0x1F, 0x60, 0x06, 0x64, 0xA2, 0xDB,
-        0x20, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xCF, 0x60, 0xC7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x40, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0xBC, 0xF1, 0x1A, 0x60, 0x6A, 0x62, 0xA2, 0xD9, 0x60, 0xF5, 0xEB, 0xF1, 0x2F, 0xF8,
-        0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0xBC, 0xF1, 0x19, 0xF8, 0xF8, 0x60, 0x80, 0x64,
-        0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0xA9, 0xF1, 0x07, 0xF8, 0x00, 0x60, 0xD0, 0x63, 0x19, 0x60,
-        0x84, 0x64, 0xA3, 0xDB, 0x44, 0x60, 0x44, 0x64, 0x81, 0xFB, 0x82, 0xFB, 0x83, 0xFB, 0x31, 0x44,
-        0xF9, 0xB4, 0x40, 0x51, 0x00, 0x60, 0xD0, 0x63, 0x01, 0x60, 0x10, 0x65, 0xA3, 0xD3, 0xA5, 0xD1,
-        0x04, 0xA4, 0xA3, 0xDB, 0xD0, 0x80, 0xA0, 0xD1, 0x0A, 0x06, 0x41, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xCC, 0x60, 0x5D, 0x78, 0xFF, 0xFF, 0x44, 0x47,
-        0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xFF, 0xA4, 0xFF, 0xFF, 0x08, 0x07, 0x0E, 0x61,
-        0x41, 0xD3, 0x32, 0x40, 0x08, 0x26, 0x03, 0x00, 0x10, 0xB0, 0xFF, 0xFF, 0xD3, 0x02, 0x42, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04,
-        0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD0, 0x60, 0x22, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD1, 0x7F, 0xF9, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9,
-        0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xD0, 0x60, 0x47, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x1A, 0x60, 0x6A, 0x62, 0x07, 0x60, 0xD0, 0x64,
-        0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD3, 0x81, 0xFB, 0xBD, 0xD3, 0x82, 0xFB,
-        0xA3, 0xD3, 0x83, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xEC, 0x62,
-        0x01, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0xD0, 0x60, 0x79, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xBC, 0xF1, 0x1A, 0x60, 0x6A, 0x62, 0xA2, 0xD9, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1,
-        0xFE, 0x60, 0xFF, 0x61, 0xA1, 0x84, 0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x0F, 0x60,
-        0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0xCF, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x08, 0x65, 0x20, 0x44, 0x34, 0x80,
-        0x5F, 0xF5, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0xBC, 0xF1,
-        0x19, 0xF8, 0x80, 0x7E, 0xF8, 0x7F, 0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0xA9, 0xF1, 0x07, 0xF8,
-        0x2B, 0xFA, 0xB0, 0x64, 0x2A, 0xFA, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD1, 0x2C, 0xF8, 0x32, 0xF8,
-        0xBD, 0xD1, 0x2D, 0xF8, 0x33, 0xF8, 0xA3, 0xD1, 0x2E, 0xF8, 0x34, 0xF8, 0x06, 0x63, 0x3F, 0xFC,
-        0x1F, 0x60, 0x54, 0x61, 0xDC, 0xF3, 0xA1, 0xD3, 0x03, 0xA8, 0xAC, 0x83, 0x0F, 0x02, 0x0E, 0x03,
-        0x1F, 0x60, 0x56, 0x61, 0xA1, 0xD1, 0x66, 0x45, 0x00, 0xF4, 0x09, 0xFC, 0x01, 0x64, 0x0A, 0xFA,
-        0x0B, 0xF8, 0x1F, 0x60, 0x54, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x28, 0x00, 0x28, 0x60, 0x2E, 0x64,
-        0xA0, 0xD3, 0x66, 0x45, 0x00, 0xF4, 0x60, 0x40, 0x01, 0x36, 0x16, 0x00, 0x02, 0x36, 0xC7, 0x00,
-        0x03, 0x36, 0x07, 0x00, 0x04, 0x36, 0x10, 0x00, 0x05, 0x36, 0xC1, 0x00, 0x06, 0x36, 0x01, 0x00,
-        0x0B, 0x00, 0x80, 0x64, 0x09, 0xFA, 0x01, 0x63, 0x0A, 0xFC, 0x00, 0x64, 0x0B, 0xFA, 0x2D, 0x60,
-        0x54, 0x62, 0x03, 0x64, 0xA2, 0xDB, 0x0A, 0x00, 0x00, 0x64, 0x09, 0xFA, 0x01, 0x63, 0x0A, 0xFC,
-        0x00, 0x64, 0x0B, 0xFA, 0x2D, 0x60, 0x54, 0x62, 0x01, 0x64, 0xA2, 0xDB, 0x24, 0x60, 0x74, 0x62,
-        0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x65, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x00, 0x66, 0xDC, 0xF3, 0x46, 0x46, 0xFD, 0xA0, 0xC1, 0xFE, 0x02, 0x02, 0x2F, 0x58,
-        0xFF, 0xFF, 0x01, 0x64, 0x69, 0xFB, 0x43, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x1A, 0x60, 0x44, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x64, 0xA4, 0xA2, 0xDB, 0x1A, 0x60, 0x44, 0x62, 0xA2, 0xD1, 0x1A, 0x60,
-        0x6A, 0x62, 0xA2, 0xD9, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x0C, 0x64, 0xA2, 0xDB,
-        0xD1, 0x60, 0x2E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x56, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x26, 0x46,
-        0x00, 0xF4, 0x09, 0xF2, 0x0A, 0xF2, 0x00, 0xA8, 0x0B, 0xF2, 0x02, 0xA8, 0x16, 0x02, 0x00, 0xA8,
-        0x1A, 0x02, 0x19, 0x02, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x20, 0x40, 0x08, 0x2A, 0x03, 0x00, 0xD3, 0x60,
-        0x48, 0x78, 0xFF, 0xFF, 0xD9, 0x60, 0x68, 0x78, 0xFF, 0xFF, 0x09, 0xF2, 0x0A, 0xF2, 0x80, 0xA8,
-        0x0B, 0xF2, 0x02, 0xA8, 0xE4, 0x03, 0x44, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0B, 0xF2, 0x26, 0x46,
-        0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB,
-        0x31, 0xF2, 0x59, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x03, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x4C, 0x78,
-        0xFF, 0xFF, 0xDC, 0x60, 0xAA, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x20, 0x40, 0x08, 0x2A,
-        0x03, 0x00, 0xCF, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0xD7, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x01, 0x63,
-        0x09, 0xFC, 0x32, 0x40, 0x08, 0x26, 0x1A, 0x00, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x60, 0x40, 0x0B, 0x36, 0x03, 0x00, 0xD0, 0x60, 0xEC, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0xA2, 0xDB,
-        0x2D, 0x60, 0x56, 0x62, 0x0B, 0x64, 0xA2, 0xDB, 0x2D, 0x60, 0x54, 0x62, 0x02, 0x64, 0xA2, 0xDB,
-        0xA9, 0xF1, 0x66, 0x41, 0x64, 0x46, 0x22, 0x64, 0x36, 0xFA, 0x61, 0x46, 0x01, 0x64, 0x0A, 0xFA,
-        0x00, 0x64, 0x0B, 0xFA, 0x01, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x65, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66, 0xDC, 0xF3, 0x46, 0x46, 0xFD, 0xA0, 0xC1, 0xFE,
-        0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB,
-        0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x0C, 0x64,
-        0xA2, 0xDB, 0xD1, 0x60, 0xEF, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x3B, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x69, 0xFB, 0x26, 0x46, 0x00, 0xF4, 0x09, 0xF2, 0x0A, 0xF2,
-        0x01, 0xA8, 0x0B, 0xF2, 0x02, 0xA8, 0x04, 0x02, 0x00, 0xA8, 0x02, 0x02, 0x01, 0x02, 0x31, 0x00,
-        0xD2, 0x60, 0x58, 0x4D, 0xF6, 0x78, 0xFF, 0xFF, 0x0B, 0xF2, 0x26, 0x46, 0x40, 0x59, 0x02, 0x60,
-        0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x31, 0xF2, 0x59, 0xDB,
-        0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0x03, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x4C, 0x78, 0xFF, 0xFF, 0xDC, 0x60,
-        0xAA, 0x78, 0xFF, 0xFF, 0xD2, 0x60, 0x58, 0x4D, 0xF6, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x69, 0xFB,
-        0x20, 0x40, 0x08, 0x2A, 0x03, 0x00, 0xCF, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0xD7, 0x60, 0xDD, 0x78,
-        0xFF, 0xFF, 0x26, 0x46, 0x40, 0x60, 0x00, 0x65, 0x2A, 0xF2, 0x2F, 0xF0, 0xB4, 0x84, 0x2A, 0xFA,
-        0x2C, 0xF8, 0x32, 0xF8, 0x30, 0xF2, 0x2D, 0xFA, 0x33, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x34, 0xFA,
-        0xEB, 0xF3, 0x2F, 0xFA, 0xEC, 0xF3, 0x30, 0xFA, 0xED, 0xF3, 0x31, 0xFA, 0xCC, 0xF1, 0x19, 0xF8,
-        0x1C, 0xF0, 0x13, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x00, 0xF4, 0x03, 0x64, 0x0A, 0xFA, 0x00, 0x64,
-        0x0B, 0xFA, 0x01, 0x63, 0x69, 0xFD, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x24, 0x60,
-        0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66, 0xDC, 0xF3, 0x46, 0x46, 0xFD, 0xA0, 0xC1, 0xFE, 0x02, 0x02,
-        0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x0C, 0x64, 0xA2, 0xDB,
-        0xD2, 0x60, 0x8E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x51, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x00, 0x64, 0x69, 0xFB, 0x26, 0x46, 0x00, 0xF4, 0x09, 0xF2, 0x0A, 0xF2, 0x01, 0xA8,
-        0x0B, 0xF2, 0x04, 0xA8, 0x1A, 0x02, 0x00, 0xA8, 0x18, 0x02, 0x17, 0x02, 0xD2, 0x60, 0x58, 0x4D,
-        0xF6, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x20, 0x40, 0x08, 0x2A, 0x03, 0x00, 0xD3, 0x60,
-        0x48, 0x78, 0xFF, 0xFF, 0xD9, 0x60, 0x68, 0x78, 0xFF, 0xFF, 0xD2, 0x60, 0x58, 0x4D, 0xF6, 0x78,
-        0xFF, 0xFF, 0x0B, 0xF2, 0x26, 0x46, 0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB,
-        0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x31, 0xF2, 0x59, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64,
-        0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x03, 0x65,
-        0xE9, 0x60, 0x58, 0x4E, 0x4C, 0x78, 0xFF, 0xFF, 0xDC, 0x60, 0xAA, 0x78, 0xFF, 0xFF, 0xD2, 0x60,
-        0x58, 0x4D, 0xF6, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x69, 0xFB, 0x20, 0x40, 0x08, 0x2A, 0x03, 0x00,
-        0xCF, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0xD7, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x2D, 0x60, 0x56, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x0B, 0x3A, 0x07, 0x00, 0x28, 0x60, 0x2C, 0x62, 0x0B, 0x64,
-        0xA2, 0xDB, 0x2D, 0x60, 0x56, 0x62, 0xA2, 0xDF, 0x2D, 0x58, 0xFF, 0xFF, 0x28, 0x60, 0x2C, 0x62,
-        0xA2, 0xD3, 0x61, 0x43, 0xA5, 0xD2, 0x60, 0x40, 0x0B, 0x2A, 0x30, 0x00, 0x85, 0x3A, 0x30, 0x00,
-        0x60, 0x41, 0x65, 0x44, 0x0A, 0xA4, 0xA0, 0xD0, 0x2D, 0x60, 0x52, 0x62, 0x64, 0x40, 0x18, 0x26,
-        0x06, 0x00, 0xA2, 0xDF, 0x28, 0x60, 0x2C, 0x62, 0x01, 0x64, 0xA2, 0xDB, 0x02, 0x00, 0x01, 0x64,
-        0xA2, 0xDB, 0x61, 0x44, 0x60, 0x47, 0xFF, 0xB4, 0x02, 0xA4, 0x2E, 0x60, 0x62, 0x61, 0xA1, 0xD1,
-        0xDF, 0x83, 0xC0, 0x84, 0xA1, 0xDB, 0xD0, 0x81, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE,
-        0xA5, 0xD2, 0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB,
-        0x5D, 0x93, 0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x2D, 0x58, 0xFF, 0xFF,
-        0x2D, 0x60, 0x52, 0x62, 0xA2, 0xDF, 0x28, 0x60, 0x2C, 0x62, 0x01, 0x64, 0xA2, 0xDB, 0xF6, 0x01,
-        0x45, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x2E, 0x60, 0xEA, 0x7C, 0x2E, 0x60, 0xDE, 0x63, 0xA3, 0xD9,
-        0x64, 0x41, 0x29, 0x60, 0xA4, 0x63, 0xBD, 0xD3, 0x00, 0x7C, 0x03, 0x1B, 0x27, 0x43, 0x10, 0xA3,
-        0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x45, 0x64, 0x5F, 0xA1, 0xDB, 0x65, 0x44, 0xBD, 0xD1, 0xC8, 0x84,
-        0x59, 0xD8, 0xFC, 0x05, 0x27, 0x41, 0x10, 0xA1, 0xA1, 0xD1, 0xFF, 0xFF, 0xC1, 0x81, 0x01, 0x26,
-        0xDD, 0x81, 0x41, 0x4C, 0x59, 0xD1, 0x7C, 0x44, 0xB0, 0x84, 0x59, 0xD1, 0x59, 0xD1, 0xB0, 0x84,
-        0xB0, 0x84, 0xFF, 0xFF, 0x02, 0x02, 0x67, 0x44, 0x5D, 0x00, 0x2D, 0x60, 0xE6, 0x63, 0xDD, 0x60,
-        0x18, 0x64, 0xBD, 0xDA, 0x50, 0x60, 0x00, 0x64, 0xBD, 0xDA, 0x01, 0x60, 0xF2, 0x64, 0xBD, 0xDA,
-        0x00, 0x60, 0x01, 0x64, 0xBD, 0xDA, 0x2C, 0x41, 0x59, 0xD3, 0x50, 0x60, 0x00, 0x7C, 0x60, 0x40,
-        0x02, 0x2A, 0x03, 0x00, 0x01, 0x60, 0xF2, 0x64, 0x0E, 0x00, 0x04, 0x2A, 0x03, 0x00, 0x02, 0x60,
-        0xF2, 0x64, 0x09, 0x00, 0x10, 0x2A, 0x03, 0x00, 0x04, 0x60, 0xF2, 0x64, 0x04, 0x00, 0x20, 0x2A,
-        0x04, 0x00, 0x05, 0x60, 0xF2, 0x64, 0xBD, 0xD9, 0xBD, 0xDB, 0x01, 0x64, 0xBD, 0xDB, 0x59, 0xD3,
-        0x50, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60, 0xF2, 0x64, 0x0E, 0x00,
-        0x04, 0x2A, 0x03, 0x00, 0x02, 0x60, 0xF2, 0x64, 0x09, 0x00, 0x10, 0x2A, 0x03, 0x00, 0x04, 0x60,
-        0xF2, 0x64, 0x04, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60, 0xF2, 0x64, 0xBD, 0xD9, 0xBD, 0xDB,
-        0x01, 0x64, 0xBD, 0xDB, 0x59, 0xD3, 0x50, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x01, 0x2A, 0x03, 0x00,
-        0x00, 0x60, 0xF2, 0x64, 0x09, 0x00, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60, 0xF2, 0x64, 0x04, 0x00,
-        0x04, 0x2A, 0x02, 0x00, 0x02, 0x60, 0xF2, 0x64, 0xBD, 0xD9, 0xBD, 0xDB, 0x59, 0xD3, 0xBD, 0xDA,
-        0x2D, 0x60, 0xE6, 0x64, 0x2E, 0x60, 0xE4, 0x62, 0xA2, 0xDB, 0x60, 0xF5, 0x00, 0x64, 0x2B, 0xFA,
-        0x00, 0x64, 0x2A, 0xFA, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD1, 0x2C, 0xF8, 0x32, 0xF8, 0xBD, 0xD1,
-        0x2D, 0xF8, 0x33, 0xF8, 0xA3, 0xD1, 0x2E, 0xF8, 0x34, 0xF8, 0x00, 0xF4, 0x01, 0x63, 0x32, 0x40,
-        0x08, 0x26, 0x10, 0xBB, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0xFE, 0x26,
-        0x10, 0xBB, 0x09, 0xFC, 0x27, 0x42, 0x0C, 0xA2, 0x28, 0x60, 0x02, 0x63, 0xA2, 0xD3, 0xA3, 0xD3,
-        0x00, 0xBD, 0x01, 0x63, 0xAC, 0x81, 0x09, 0x03, 0x08, 0x03, 0xB0, 0x60, 0x58, 0x4D, 0xB6, 0x78,
-        0xFF, 0xFF, 0x00, 0xB8, 0x01, 0x63, 0x01, 0x03, 0x60, 0x43, 0x1A, 0x60, 0x3E, 0x64, 0xA0, 0xDD,
-        0x12, 0x61, 0x59, 0xDC, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0xFF, 0x60, 0xFF, 0x7C, 0x60, 0x40,
-        0x0B, 0x2A, 0x02, 0x00, 0x2D, 0x60, 0x32, 0x7C, 0x2E, 0x60, 0xE6, 0x62, 0xA2, 0xD9, 0x2E, 0x60,
-        0xDE, 0x64, 0x40, 0x48, 0xD9, 0x81, 0xFF, 0x60, 0xF2, 0x64, 0xE8, 0x60, 0x58, 0x4D, 0xE8, 0x78,
-        0xFF, 0xFF, 0x60, 0xF5, 0x3F, 0xFC, 0xDB, 0x83, 0x2E, 0x60, 0x08, 0x62, 0xA2, 0xDD, 0x00, 0x7C,
-        0x5A, 0xD9, 0x63, 0x41, 0x2E, 0x60, 0x0C, 0x63, 0x12, 0x65, 0x00, 0xF4, 0xCD, 0x84, 0x4C, 0x91,
-        0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65,
-        0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83,
-        0x60, 0xF5, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xC1, 0xFE, 0x06, 0x64,
-        0x69, 0xFB, 0x46, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64,
-        0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60,
-        0x1C, 0x64, 0xA2, 0xDB, 0xD4, 0x60, 0x68, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x3A, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x26, 0x46,
-        0x00, 0xF4, 0x0A, 0xF2, 0x00, 0x63, 0x00, 0xA8, 0x69, 0xFD, 0x5A, 0x03, 0x0A, 0xF2, 0x26, 0x46,
-        0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB,
-        0x31, 0xF2, 0x59, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x05, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x4C, 0x78,
-        0xFF, 0xFF, 0xDC, 0x60, 0xAA, 0x78, 0xFF, 0xFF, 0x47, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xCF, 0x60,
-        0xF2, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x21, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x49, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xD0, 0x60, 0x94, 0x78, 0xFF, 0xFF,
-        0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x4A, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xCF, 0x60, 0xF2, 0x78, 0xFF, 0xFF,
-        0x48, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x09, 0xF0, 0x2E, 0x60, 0x64, 0x63, 0x10, 0x64, 0xBD, 0xDB,
-        0xBD, 0xD9, 0x0A, 0xF0, 0xBD, 0xD9, 0x0B, 0xF0, 0xBD, 0xD9, 0x0C, 0xF2, 0xBD, 0xDB, 0x60, 0x47,
-        0xFF, 0xB4, 0x0A, 0xA5, 0x2E, 0x60, 0x62, 0x61, 0x65, 0x5C, 0xA1, 0xD9, 0x60, 0x41, 0x1A, 0x65,
-        0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00,
-        0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93,
-        0x20, 0xFE, 0xDF, 0x83, 0xD3, 0x60, 0x58, 0x4D, 0x06, 0x78, 0xFF, 0xFF, 0x0B, 0xF2, 0xFF, 0xFF,
-        0x07, 0xB4, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x61, 0x44, 0x96, 0xFB,
-        0x27, 0x45, 0x02, 0x62, 0x46, 0xD3, 0x5A, 0xD1, 0x60, 0x47, 0x56, 0xFB, 0x64, 0x47, 0x55, 0xFB,
-        0x00, 0x64, 0x5C, 0xFB, 0x0C, 0x62, 0x46, 0xD3, 0x80, 0xFB, 0x0B, 0xF0, 0x0F, 0x60, 0xFF, 0x64,
-        0xA0, 0x84, 0x85, 0xFB, 0x26, 0x46, 0x32, 0xF0, 0x81, 0xF9, 0x33, 0xF0, 0x0E, 0x63, 0xC7, 0x81,
-        0x82, 0xF9, 0x34, 0xF0, 0x83, 0xF9, 0x59, 0xD1, 0xFF, 0xFF, 0x64, 0x44, 0x01, 0x2A, 0xC8, 0x84,
-        0x60, 0x43, 0x2D, 0x60, 0x78, 0x64, 0x58, 0xD9, 0x59, 0xD1, 0x58, 0xD9, 0xFD, 0x1F, 0x28, 0x60,
-        0x2C, 0x62, 0xA2, 0xD1, 0x59, 0xD3, 0x64, 0x40, 0x01, 0x36, 0x22, 0x64, 0x64, 0x40, 0x00, 0x36,
-        0x50, 0x94, 0xA9, 0xF1, 0xFF, 0xFF, 0x44, 0x47, 0xA7, 0x46, 0x36, 0xFA, 0xB7, 0xFC, 0xA7, 0x46,
-        0x1A, 0x60, 0x3E, 0x62, 0xA2, 0xD3, 0x87, 0xFB, 0x31, 0xF2, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18,
-        0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3, 0x08, 0xFE,
-        0x60, 0x43, 0x61, 0x46, 0xA9, 0xF1, 0xFF, 0xFF, 0xD3, 0x80, 0x31, 0xF2, 0x27, 0x02, 0x66, 0x41,
-        0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xA9, 0xF1, 0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43,
-        0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46, 0x80, 0xF0,
-        0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46,
-        0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0,
-        0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46, 0x43, 0x47, 0x00, 0xF4,
-        0x18, 0x65, 0x0C, 0x61, 0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x64, 0x44, 0x00, 0x7F,
-        0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0xF4, 0x02,
-        0x02, 0x60, 0x02, 0x61, 0xA1, 0xD3, 0x00, 0x65, 0x60, 0x43, 0x59, 0xD3, 0xFF, 0xFF, 0x7F, 0xB4,
-        0x02, 0x3A, 0x02, 0x00, 0x01, 0x64, 0x15, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64, 0x11, 0x00,
-        0x0A, 0x3A, 0x02, 0x00, 0x04, 0x64, 0x0D, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x09, 0x00,
-        0x10, 0x3A, 0x02, 0x00, 0x10, 0x64, 0x05, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x20, 0x64, 0x01, 0x00,
-        0x00, 0x64, 0xCF, 0x83, 0xB4, 0x85, 0xE1, 0x02, 0x65, 0x44, 0x7A, 0xFB, 0x02, 0x60, 0x02, 0x61,
-        0xA1, 0xD3, 0x00, 0x65, 0x60, 0x43, 0x59, 0xD3, 0xFF, 0xFF, 0x80, 0xB0, 0xFF, 0xFF, 0x01, 0x03,
-        0x60, 0x45, 0xCF, 0x83, 0x65, 0x44, 0xF7, 0x02, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x0A, 0x64,
-        0x15, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x14, 0x64, 0x11, 0x00, 0x0A, 0x3A, 0x02, 0x00, 0x32, 0x64,
-        0x0D, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x37, 0x64, 0x09, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x50, 0x64,
-        0x05, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x6E, 0x64, 0x01, 0x00, 0x14, 0x64, 0x7C, 0xFB, 0x27, 0x44,
-        0xD8, 0xF3, 0x60, 0x45, 0x66, 0x41, 0x65, 0x46, 0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36, 0x06, 0x00,
-        0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00, 0x05, 0x3A, 0x02, 0x00, 0x00, 0x64, 0x01, 0x00,
-        0x01, 0x64, 0x6F, 0xFA, 0x79, 0xF3, 0x7A, 0xF1, 0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43, 0x02, 0x02,
-        0x79, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60, 0xAE, 0x65, 0xD8, 0xF3, 0xFF, 0xFF, 0xE0, 0x84,
-        0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF,
-        0xFC, 0x03, 0xA4, 0x84, 0x7B, 0xFB, 0x6F, 0xF0, 0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA, 0x60, 0x47,
-        0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x70, 0xF0,
-        0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01, 0xE1, 0x81,
-        0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x66, 0x43, 0x0C, 0xF4, 0x2D, 0x60, 0xD2, 0x62,
-        0xA2, 0xD3, 0x2D, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x60, 0x47, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD1,
-        0xB0, 0x84, 0x64, 0x40, 0x01, 0x36, 0x22, 0x64, 0x64, 0x40, 0x00, 0x36, 0x50, 0x94, 0xA7, 0x46,
-        0x36, 0xFA, 0xB7, 0xFC, 0xA7, 0x46, 0x80, 0x60, 0x03, 0x65, 0x32, 0x40, 0x08, 0x2A, 0x03, 0x65,
-        0xA7, 0x46, 0x06, 0xF0, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xB4, 0x84, 0x06, 0xFA, 0xB7, 0xFC,
-        0xA7, 0x46, 0x26, 0x46, 0x2F, 0xF0, 0x30, 0xF0, 0x64, 0x43, 0x31, 0xF2, 0x27, 0x46, 0x03, 0xFC,
-        0x04, 0xF8, 0x05, 0xFA, 0x26, 0x46, 0xCF, 0x60, 0x58, 0x4E, 0x20, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66,
-        0x46, 0x46, 0x01, 0x64, 0x8C, 0xFB, 0x28, 0x60, 0x38, 0x62, 0xA2, 0xD3, 0x20, 0x41, 0x00, 0xBC,
-        0x20, 0xB9, 0x01, 0x03, 0x41, 0x40, 0x1F, 0x60, 0x52, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x04, 0x64,
-        0xC1, 0xFE, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF2, 0xFB, 0xF7, 0x60, 0xFF, 0x65,
-        0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0x0F, 0x60,
-        0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0C, 0x64,
-        0x69, 0xFB, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x31, 0x64, 0xA2, 0xDB, 0xD6, 0x60, 0xC4, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x0E, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x01, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x10, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x31, 0x60, 0x2C, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x03, 0x1B,
-        0xDC, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0xDC, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0xD7, 0x60, 0x67, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xF8, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0xA9, 0xF3, 0xFF, 0xFF, 0x02, 0xA4, 0x60, 0x43, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0,
-        0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x1C, 0x60, 0xBA, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0xA9, 0xF3, 0x63, 0x45,
-        0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46,
-        0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x4B, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60, 0x2E, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0x10, 0xB0, 0xFF, 0xFF, 0x13, 0x03, 0x0F, 0x60, 0xEC, 0x62, 0x04, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xD7, 0x60, 0x2F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1,
-        0x01, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x6A, 0xF3,
-        0xFF, 0xFF, 0x01, 0xB0, 0xFF, 0xFF, 0x13, 0x03, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xEC, 0x62, 0x02, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xD7, 0x60, 0x47, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x69, 0xFB, 0xD7, 0x60, 0x58, 0x4E, 0x77, 0x78,
-        0xFF, 0xFF, 0x02, 0x64, 0x8C, 0xFB, 0x02, 0x64, 0xC1, 0xFE, 0xDC, 0xFB, 0xF2, 0xF3, 0xFF, 0xFF,
-        0x01, 0xBC, 0xF2, 0xFB, 0x02, 0x65, 0xE9, 0x60, 0x58, 0x4E, 0x7B, 0x78, 0xFF, 0xFF, 0x03, 0x60,
-        0xE8, 0x63, 0x1A, 0x60, 0x40, 0x64, 0xA0, 0xDD, 0xCB, 0x60, 0x1A, 0x78, 0xFF, 0xFF, 0x00, 0x60,
-        0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xFF, 0xFF, 0x08, 0x24, 0x54, 0x01, 0xA0, 0x84, 0xA2, 0xDB,
-        0x00, 0x63, 0x69, 0xFD, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x15, 0x00, 0x24, 0x60,
-        0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x64, 0x8C, 0xFB,
-        0xFF, 0xFF, 0xC1, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x50, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60, 0x2E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x10, 0xB0,
-        0xFF, 0xFF, 0x13, 0x03, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xEC, 0x62, 0x04, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD7, 0x60,
-        0x8F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBC, 0xF1, 0x1A, 0x60, 0x6A, 0x62,
-        0xA2, 0xD9, 0x7F, 0xF1, 0x7E, 0xF9, 0x02, 0x64, 0x8C, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x8C, 0xF3,
-        0x00, 0x65, 0xD4, 0x80, 0xFF, 0xFF, 0x0F, 0x03, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x0F, 0x60, 0xEC, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD7, 0x60, 0xB3, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x51, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x19, 0x60, 0x84, 0x64, 0x68, 0xFB, 0x1A, 0x60, 0x46, 0x63, 0x81, 0xF3,
-        0xBD, 0xDB, 0x82, 0xF3, 0xBD, 0xDB, 0x83, 0xF3, 0xA3, 0xDB, 0x01, 0x60, 0x10, 0x65, 0x68, 0xF3,
-        0xA5, 0xD1, 0x04, 0xA4, 0x68, 0xFB, 0xD0, 0x80, 0xA0, 0xD3, 0x20, 0x07, 0x40, 0x47, 0x60, 0x41,
-        0x0E, 0x65, 0x45, 0xD3, 0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD1, 0xFF, 0xFF, 0x03, 0x1B, 0x10, 0xB0,
-        0xFF, 0xFF, 0xEB, 0x02, 0x27, 0x44, 0x06, 0xA4, 0x60, 0x41, 0xA1, 0xD1, 0x81, 0xF3, 0x82, 0xF1,
-        0xD0, 0x80, 0x59, 0xD3, 0x08, 0x02, 0xD0, 0x80, 0x83, 0xF3, 0x59, 0xD1, 0x04, 0x02, 0xD0, 0x80,
-        0xFF, 0xFF, 0x01, 0x02, 0x03, 0x00, 0xD8, 0x60, 0x99, 0x78, 0xFF, 0xFF, 0x1A, 0x60, 0x46, 0x63,
-        0xBD, 0xD3, 0x81, 0xFB, 0xBD, 0xD3, 0x82, 0xFB, 0xA3, 0xD3, 0x83, 0xFB, 0x53, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60,
-        0xEC, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD8, 0x60, 0x06, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x7E, 0xF1, 0x7F, 0xF9, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0xD8, 0x60, 0x36, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x63, 0x8C, 0xFD, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x54, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x31, 0x44, 0xF9, 0xB4, 0x40, 0x51, 0x01, 0x60, 0xBA, 0x61, 0x1F, 0x60, 0x08, 0x63,
-        0xA1, 0xD3, 0xFF, 0xFF, 0x20, 0x7F, 0xBD, 0xDB, 0x59, 0xD3, 0xFF, 0xFF, 0x21, 0x7F, 0xBD, 0xDB,
-        0x59, 0xD3, 0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD8, 0x60,
-        0x64, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x9A, 0x62, 0x1F, 0x60,
-        0x06, 0x64, 0xA2, 0xDB, 0x20, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62,
-        0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD8, 0x60, 0x89, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62,
-        0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xD6, 0x60, 0xB7, 0x78,
-        0xFF, 0xFF, 0x27, 0x43, 0x2D, 0x60, 0x7A, 0x65, 0xA5, 0xD3, 0x65, 0x41, 0x10, 0xA3, 0x01, 0xA4,
-        0xFE, 0xB4, 0xC4, 0x85, 0xFE, 0xA1, 0xBD, 0xD3, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0xD5, 0x80,
-        0x02, 0x02, 0x04, 0x03, 0xF8, 0x01, 0xD7, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x55, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60,
-        0xEC, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD8, 0x60, 0xB1, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD1, 0x7F, 0xF9, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0xD8, 0x60, 0xD6, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x60, 0xBA, 0x61, 0x1F, 0x60, 0x08, 0x63, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x20, 0x7F, 0xBD, 0xDB, 0x21, 0x60, 0x32, 0x64, 0xBD, 0xDB, 0x04, 0xA1, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x22, 0x7F, 0xA3, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE,
-        0x0B, 0x04, 0x0F, 0x60, 0xEC, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xD8, 0x60, 0xF3, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0x9A, 0x62, 0x1F, 0x60, 0x06, 0x64,
-        0xA2, 0xDB, 0x20, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x20, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xD9, 0x60, 0x18, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1,
-        0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x1A, 0x60, 0x6A, 0x62, 0x07, 0x60,
-        0xD0, 0x64, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD3, 0x81, 0xFB, 0xBD, 0xD3,
-        0x82, 0xFB, 0xA3, 0xD3, 0x83, 0xFB, 0x31, 0x44, 0xF9, 0xB4, 0x40, 0x51, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xEC, 0x62, 0x01, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0xD9, 0x60,
-        0x4D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBC, 0xF1, 0x1A, 0x60, 0x6A, 0x62,
-        0xA2, 0xD9, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0xFE, 0x60, 0xFF, 0x61, 0xA1, 0x84, 0x5A, 0xD1,
-        0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xD7, 0x60, 0xDD, 0x78, 0xFF, 0xFF,
-        0x27, 0x42, 0x0C, 0xA2, 0x28, 0x60, 0x02, 0x63, 0xA2, 0xD3, 0xA3, 0xD3, 0x00, 0xBD, 0x01, 0x63,
-        0xAC, 0x81, 0x09, 0x03, 0x08, 0x03, 0xB0, 0x60, 0x58, 0x4D, 0xB6, 0x78, 0xFF, 0xFF, 0x00, 0xB8,
-        0x01, 0x63, 0x01, 0x03, 0x60, 0x43, 0x1A, 0x60, 0x3E, 0x64, 0xA0, 0xDD, 0x60, 0xF5, 0x00, 0x64,
-        0x2B, 0xFA, 0x20, 0x64, 0x2A, 0xFA, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD1, 0x2C, 0xF8, 0x32, 0xF8,
-        0xBD, 0xD1, 0x2D, 0xF8, 0x33, 0xF8, 0xA3, 0xD1, 0x2E, 0xF8, 0x34, 0xF8, 0xEB, 0xF1, 0x2F, 0xF8,
-        0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0xBC, 0xF1, 0x19, 0xF8, 0xF8, 0x60, 0x80, 0x64,
-        0x0E, 0xFA, 0x00, 0xF4, 0x01, 0x63, 0x32, 0x40, 0x08, 0x26, 0x10, 0xBB, 0x28, 0x60, 0x2C, 0x62,
-        0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0xFE, 0x26, 0x10, 0xBB, 0x09, 0xFC, 0x1A, 0x60, 0x3E, 0x64,
-        0xA0, 0xD3, 0x12, 0x61, 0x59, 0xDA, 0x1A, 0x60, 0x46, 0x63, 0xBD, 0xD1, 0x59, 0xD8, 0xBD, 0xD1,
-        0x59, 0xD8, 0xA3, 0xD1, 0x59, 0xD8, 0x2E, 0x60, 0xDE, 0x64, 0x40, 0x48, 0xD9, 0x81, 0xFF, 0x60,
-        0xF2, 0x64, 0xE8, 0x60, 0x58, 0x4D, 0xE8, 0x78, 0xFF, 0xFF, 0x60, 0xF5, 0x3F, 0xFC, 0xDB, 0x83,
-        0x2E, 0x60, 0x08, 0x62, 0xA2, 0xDD, 0x20, 0x7C, 0x5A, 0xD9, 0x63, 0x41, 0x2E, 0x60, 0x0C, 0x63,
-        0x12, 0x65, 0x00, 0xF4, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85,
-        0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2,
-        0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x60, 0xF5, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0xC1, 0xFE, 0x14, 0x64, 0x69, 0xFB, 0x56, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x1A, 0x60, 0x44, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x64, 0xA4, 0xA2, 0xDB, 0x1A, 0x60, 0x44, 0x62,
-        0xA2, 0xD1, 0x1A, 0x60, 0x6A, 0x62, 0xA2, 0xD9, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64,
-        0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60,
-        0x1C, 0x64, 0xA2, 0xDB, 0xDA, 0x60, 0x10, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0E, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x57, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60,
-        0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xD7, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x17, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x58, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDB, 0x60,
-        0xCB, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x3A, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x66, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x69, 0xFB, 0x0F, 0x60, 0xEA, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x26, 0x46, 0x00, 0xF4, 0x0A, 0xF2, 0xFF, 0xFF, 0x2C, 0x18, 0x59, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x0A, 0xF2, 0x26, 0x46, 0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2,
-        0x41, 0x58, 0x59, 0xDB, 0x31, 0xF2, 0x59, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B,
-        0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x05, 0x65, 0xE9, 0x60,
-        0x58, 0x4E, 0x4C, 0x78, 0xFF, 0xFF, 0xDC, 0x60, 0xAA, 0x78, 0xFF, 0xFF, 0xD7, 0x60, 0xDD, 0x78,
-        0xFF, 0xFF, 0x5A, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x78, 0x43, 0x02, 0x61, 0x24, 0x60, 0xDD, 0x78,
-        0xFF, 0xFF, 0x5B, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x09, 0xF0, 0x2E, 0x60, 0x64, 0x63, 0x30, 0x64,
-        0xBD, 0xDB, 0xBD, 0xD9, 0x0A, 0xF0, 0xBD, 0xD9, 0x0B, 0xF0, 0xBD, 0xD9, 0x0C, 0xF2, 0xBD, 0xDB,
-        0x60, 0x47, 0xFF, 0xB4, 0x0A, 0xA5, 0x2E, 0x60, 0x62, 0x62, 0x65, 0x5C, 0xA2, 0xD9, 0x60, 0x41,
-        0x1A, 0x65, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85, 0x7F, 0x26,
-        0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2, 0xF6, 0x1F,
-        0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0xD3, 0x60, 0x58, 0x4D, 0x06, 0x78, 0xFF, 0xFF, 0x0B, 0xF2,
-        0xFF, 0xFF, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x61, 0x44,
-        0x96, 0xFB, 0x27, 0x45, 0x02, 0x62, 0x46, 0xD3, 0x5A, 0xD1, 0x60, 0x47, 0x56, 0xFB, 0x64, 0x47,
-        0x55, 0xFB, 0x00, 0x64, 0x5C, 0xFB, 0x0C, 0x62, 0x46, 0xD3, 0x80, 0xFB, 0x0B, 0xF0, 0x0F, 0x60,
-        0xFF, 0x64, 0xA0, 0x84, 0x85, 0xFB, 0x1A, 0x60, 0x3E, 0x62, 0xA2, 0xD3, 0x87, 0xFB, 0x26, 0x46,
-        0x32, 0xF0, 0x81, 0xF9, 0x33, 0xF0, 0x82, 0xF9, 0x34, 0xF0, 0x83, 0xF9, 0x00, 0xF4, 0x18, 0x65,
-        0x0C, 0x61, 0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81,
-        0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0xF4, 0x02, 0x02, 0x60,
-        0x02, 0x61, 0xA1, 0xD3, 0x00, 0x65, 0x60, 0x43, 0x59, 0xD3, 0xFF, 0xFF, 0x7F, 0xB4, 0x02, 0x3A,
-        0x02, 0x00, 0x01, 0x64, 0x15, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64, 0x11, 0x00, 0x0A, 0x3A,
-        0x02, 0x00, 0x04, 0x64, 0x0D, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x09, 0x00, 0x10, 0x3A,
-        0x02, 0x00, 0x10, 0x64, 0x05, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x20, 0x64, 0x01, 0x00, 0x00, 0x64,
-        0xCF, 0x83, 0xB4, 0x85, 0xE1, 0x02, 0x65, 0x44, 0x7A, 0xFB, 0x02, 0x60, 0x02, 0x61, 0xA1, 0xD3,
-        0x00, 0x65, 0x60, 0x43, 0x59, 0xD3, 0xFF, 0xFF, 0x80, 0xB0, 0xFF, 0xFF, 0x01, 0x03, 0x60, 0x45,
-        0xCF, 0x83, 0x65, 0x44, 0xF7, 0x02, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x0A, 0x64, 0x15, 0x00,
-        0x04, 0x3A, 0x02, 0x00, 0x14, 0x64, 0x11, 0x00, 0x0A, 0x3A, 0x02, 0x00, 0x32, 0x64, 0x0D, 0x00,
-        0x0B, 0x3A, 0x02, 0x00, 0x37, 0x64, 0x09, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x50, 0x64, 0x05, 0x00,
-        0x16, 0x3A, 0x02, 0x00, 0x6E, 0x64, 0x01, 0x00, 0x14, 0x64, 0x7C, 0xFB, 0xA9, 0xF3, 0xFF, 0xFF,
-        0x02, 0xA4, 0xD8, 0xF3, 0x60, 0x45, 0x66, 0x41, 0x65, 0x46, 0x8C, 0xFA, 0x60, 0x40, 0x01, 0x36,
-        0x06, 0x00, 0x02, 0x36, 0x04, 0x00, 0x04, 0x36, 0x02, 0x00, 0x05, 0x3A, 0x02, 0x00, 0x00, 0x64,
-        0x01, 0x00, 0x01, 0x64, 0x6F, 0xFA, 0x79, 0xF3, 0x7A, 0xF1, 0xFF, 0xFF, 0xA0, 0x84, 0x65, 0x43,
-        0x02, 0x02, 0x79, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x0F, 0x60, 0xAE, 0x65, 0xD8, 0xF3, 0xFF, 0xFF,
-        0xE0, 0x84, 0x44, 0xD3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x04, 0x02, 0xE8, 0x84, 0xA4, 0x80,
-        0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84, 0x7B, 0xFB, 0x6F, 0xF0, 0x60, 0x47, 0x90, 0x84, 0x6F, 0xFA,
-        0x60, 0x47, 0x60, 0x45, 0x80, 0x64, 0xE8, 0x84, 0xA4, 0x80, 0xFF, 0xFF, 0xFC, 0x03, 0xA4, 0x84,
-        0x70, 0xF0, 0x70, 0xFA, 0x00, 0x61, 0xE8, 0x84, 0xFF, 0xFF, 0x02, 0x05, 0xDD, 0x81, 0xFB, 0x01,
-        0xE1, 0x81, 0x0F, 0x60, 0xA2, 0x65, 0x45, 0xD3, 0x0E, 0xFA, 0x66, 0x43, 0x0C, 0xF4, 0xA9, 0xF3,
-        0x1C, 0x60, 0xBA, 0x65, 0x02, 0xA4, 0x60, 0x46, 0x05, 0xF0, 0x60, 0x41, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x00, 0x7C, 0x44, 0xD9, 0x26, 0x46, 0x31, 0xF2, 0x61, 0x5C, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD9, 0x26, 0x46, 0x2F, 0xF0, 0x61, 0x46, 0x03, 0xF8, 0x26, 0x46, 0x30, 0xF0,
-        0x61, 0x46, 0x04, 0xF8, 0x26, 0x46, 0x31, 0xF0, 0x61, 0x46, 0x05, 0xF8, 0x26, 0x46, 0xCF, 0x60,
-        0x58, 0x4E, 0x20, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60,
-        0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x03, 0x65, 0xE9, 0x60, 0x58, 0x4E,
-        0x7B, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0x8C, 0xFD, 0x0F, 0x60, 0xD8, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x5C, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0xD6, 0x60, 0xB7, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xF7, 0x65, 0x20, 0x44, 0x24, 0x80, 0xD0, 0x60,
-        0x98, 0x78, 0xFF, 0xFF, 0xDC, 0xF3, 0xFF, 0xFF, 0xFD, 0xA0, 0x2A, 0xF2, 0x03, 0x03, 0xDC, 0x60,
-        0x7B, 0x78, 0xFF, 0xFF, 0x60, 0x40, 0xB0, 0x36, 0x11, 0x00, 0xC0, 0x36, 0x02, 0x00, 0x2F, 0x58,
-        0xFF, 0xFF, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78,
-        0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xD0, 0x60, 0x98, 0x78, 0xFF, 0xFF, 0x66, 0x45, 0x00, 0xF4,
-        0x0A, 0xF2, 0x0B, 0xF2, 0xFE, 0xA0, 0xF3, 0xA0, 0x6F, 0x02, 0x60, 0x41, 0x09, 0xF2, 0x20, 0x03,
-        0x00, 0xA0, 0xFF, 0xA0, 0x53, 0x03, 0x65, 0x03, 0x00, 0xA0, 0xFF, 0xFF, 0x4F, 0x03, 0x1F, 0x60,
-        0x54, 0x61, 0x01, 0x64, 0xA1, 0xDB, 0x1F, 0x60, 0x56, 0x61, 0x0D, 0x64, 0xA1, 0xDB, 0x1F, 0x60,
-        0x58, 0x61, 0x03, 0x64, 0xA1, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60,
-        0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xD0, 0x60, 0x98, 0x78, 0xFF, 0xFF,
-        0x28, 0x60, 0x2E, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0xFE, 0xA0, 0x1F, 0x60, 0x54, 0x61, 0x17, 0x02,
-        0x01, 0x64, 0xA1, 0xDB, 0x1F, 0x60, 0x56, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x1F, 0x60, 0x58, 0x61,
-        0x01, 0x64, 0xA1, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D,
-        0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xD0, 0x60, 0x98, 0x78, 0xFF, 0xFF, 0x02, 0x64,
-        0xA1, 0xDB, 0x1F, 0x60, 0x56, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0x1F, 0x60, 0x58, 0x61, 0x01, 0x64,
-        0xA1, 0xDB, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78,
-        0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xD0, 0x60, 0x98, 0x78, 0xFF, 0xFF, 0x65, 0x46, 0x07, 0xF4,
-        0x06, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x65, 0x46, 0x26, 0x46, 0x24, 0x60, 0x74, 0x64,
-        0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58,
-        0xFF, 0xFF, 0xD2, 0x60, 0x41, 0x78, 0xFF, 0xFF, 0x0A, 0xF2, 0x09, 0xF2, 0xFC, 0xA0, 0xFF, 0xA0,
-        0x11, 0x02, 0x0A, 0x02, 0x0B, 0xF2, 0x65, 0x46, 0x0A, 0x1B, 0x66, 0x41, 0x07, 0xF4, 0x06, 0xF2,
-        0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0xD0, 0x60, 0x98, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0x65, 0x46, 0x69, 0xF1, 0x2A, 0xF2, 0x64, 0x41, 0x60, 0x40, 0xA0, 0x3A,
-        0x02, 0x00, 0x08, 0xB1, 0x04, 0x00, 0xC0, 0x3A, 0x0C, 0x00, 0x04, 0xB1, 0xFF, 0xFF, 0x20, 0x03,
-        0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x17, 0x00, 0xB0, 0x3A, 0x02, 0x00, 0x01, 0x65, 0x07, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x02, 0x65,
-        0x03, 0x00, 0x30, 0x3A, 0x0D, 0x00, 0x10, 0x65, 0xA5, 0x80, 0xFF, 0xFF, 0x09, 0x03, 0x0F, 0x60,
-        0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x66,
-        0x2F, 0x58, 0xFF, 0xFF, 0x28, 0x60, 0x2E, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xFC, 0xA0, 0xFF, 0xFF,
-        0x16, 0x04, 0x0F, 0x60, 0xEC, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0xDC, 0x60, 0xBC, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2D, 0x60, 0x58, 0x65, 0xA5, 0xD1, 0x01, 0x60,
-        0x00, 0x64, 0xA0, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0xD0, 0x60, 0x98, 0x78, 0xFF, 0xFF, 0x20, 0x40,
-        0x08, 0x2A, 0x03, 0x00, 0xCF, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0xD7, 0x60, 0xDD, 0x78, 0xFF, 0xFF,
-        0x4E, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x2E, 0xF5, 0xFF, 0xFF, 0x27, 0xF2, 0x1C, 0x60, 0xBA, 0x65,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2,
-        0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46,
-        0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA9, 0xF3,
-        0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x25, 0xF2, 0x26, 0xF0, 0xA7, 0xF2, 0xA8, 0xF0, 0x66, 0xF5,
-        0xFF, 0xFF, 0x00, 0xF4, 0xFF, 0xFF, 0x89, 0xF8, 0x66, 0xF5, 0xFF, 0xFF, 0x07, 0xFC, 0x2C, 0xFA,
-        0x2D, 0xF8, 0xAE, 0xFA, 0xEB, 0xF3, 0x2F, 0xFA, 0xEC, 0xF3, 0x30, 0xFA, 0xED, 0xF3, 0x31, 0xFA,
-        0x81, 0xF3, 0x32, 0xFA, 0x82, 0xF3, 0x33, 0xFA, 0x83, 0xF3, 0x34, 0xFA, 0x31, 0x60, 0x2C, 0x61,
-        0xA1, 0xD3, 0xFF, 0xFF, 0x03, 0x1B, 0x00, 0x60, 0xA0, 0x64, 0x02, 0x00, 0x00, 0x60, 0xC0, 0x64,
-        0x2A, 0xFA, 0x02, 0x63, 0x3F, 0xFC, 0xAB, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0xCC, 0xF1, 0x19, 0xF8,
-        0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xC1, 0xFE, 0x0F, 0x60, 0xEA, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xD6, 0x60, 0xC2, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x3A, 0x61, 0xAE, 0x60,
-        0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x62, 0xFB, 0xA9, 0xF3, 0x07, 0xFA, 0x0C, 0x60,
-        0x80, 0x64, 0xBC, 0xF1, 0x19, 0xF8, 0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x00, 0x60,
-        0x3A, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x61, 0xFB, 0xA9, 0xF3,
-        0x07, 0xFA, 0x0C, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0xBC, 0xF1, 0x19, 0xF8, 0x00, 0x64, 0x3E, 0xFA,
-        0x3F, 0xFA, 0x10, 0x60, 0x20, 0x62, 0xDE, 0x60, 0xDC, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xE0, 0x62,
-        0x00, 0x60, 0x80, 0x64, 0xA2, 0xDB, 0xDD, 0x60, 0x71, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x20, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x27, 0x60, 0xB6, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x01, 0xA8, 0x03, 0xA8, 0x04, 0x03, 0x03, 0x03, 0xDE, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0x04, 0x60,
-        0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x0F, 0x60, 0xDE, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x9B, 0xFE,
-        0x03, 0x05, 0x20, 0x40, 0x4B, 0x23, 0x0E, 0x00, 0x0F, 0x60, 0xE0, 0x62, 0x80, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xDD, 0x60, 0x83, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x21, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x1F, 0x60, 0x86, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A,
-        0x07, 0x00, 0x90, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x00, 0x64, 0xA1, 0xDB, 0x04, 0x00,
-        0x10, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x8C, 0xF3, 0x58, 0xFB, 0x84, 0xF1, 0xBA, 0xFE,
-        0x01, 0xA8, 0x59, 0xF9, 0x04, 0x02, 0x02, 0x64, 0x8C, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x64, 0x47,
-        0xDC, 0xF3, 0x10, 0xB0, 0x04, 0xA8, 0x33, 0x02, 0x32, 0x02, 0x62, 0xF5, 0xEB, 0xF1, 0x2F, 0xF8,
-        0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0x81, 0xF1, 0x2C, 0xF8, 0x32, 0xF8, 0x82, 0xF1,
-        0x2D, 0xF8, 0x33, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x34, 0xF8, 0x10, 0x60, 0x48, 0x64, 0x2A, 0xFA,
-        0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x22, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60,
-        0xE0, 0x62, 0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB, 0xDD, 0x60, 0xEA, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x23, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x10, 0x67, 0x84, 0xFB, 0x8C, 0xF3,
-        0xFF, 0xFF, 0x00, 0xA8, 0xFF, 0xFF, 0x0B, 0x03, 0x0F, 0x60, 0xE0, 0x62, 0x80, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xDD, 0x60, 0xEF, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xDE, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x1B, 0x60, 0xC6, 0x65, 0x1F, 0x60, 0x80, 0x64, 0xA0, 0xD3,
-        0x05, 0x7C, 0x08, 0xB0, 0xA5, 0xD3, 0x05, 0x02, 0x00, 0xB8, 0xFF, 0xFF, 0x02, 0x03, 0x15, 0x7C,
-        0x0B, 0x00, 0xDC, 0xF3, 0x12, 0x60, 0x26, 0x63, 0x03, 0xA8, 0x7F, 0xF3, 0x05, 0x02, 0xE0, 0x85,
-        0x47, 0xD3, 0xFF, 0xFF, 0x07, 0xBC, 0xA2, 0xDB, 0x53, 0xF9, 0x29, 0x60, 0xC6, 0x64, 0x54, 0xFB,
-        0x24, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x4E, 0xEC, 0x60, 0x58, 0x4F, 0xB9, 0x78, 0xFF, 0xFF,
-        0x0E, 0x4F, 0x0F, 0x60, 0xE0, 0x62, 0x10, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0x60, 0x34, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x59, 0xF3, 0x84, 0xFB, 0x60, 0x40, 0x10, 0x27, 0xDA, 0xFE, 0xDC, 0xF3, 0x00, 0xA8, 0x04, 0xA8,
-        0x27, 0x02, 0x26, 0x02, 0x61, 0xF5, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1,
-        0x31, 0xF8, 0x81, 0xF1, 0x2C, 0xF8, 0x82, 0xF1, 0x2D, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0xA4, 0x64,
-        0x2A, 0xFA, 0x85, 0xF1, 0xC0, 0x67, 0xB0, 0x84, 0x2B, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x20, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x26, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x9E, 0xF5, 0xFF, 0xFF, 0x07, 0x1B, 0x20, 0x40, 0x80, 0x2B, 0x5C, 0x00, 0x7F, 0x60, 0xFF, 0x65,
-        0x20, 0x44, 0x24, 0x80, 0x00, 0x64, 0x41, 0xFB, 0xF1, 0x60, 0x01, 0x64, 0x24, 0xFA, 0xDA, 0x85,
-        0x19, 0x60, 0x86, 0x63, 0x89, 0xF1, 0x43, 0x4C, 0xD3, 0x80, 0xBE, 0xD1, 0x14, 0x05, 0x65, 0x40,
-        0x80, 0x2A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x64, 0x43, 0x32, 0x61, 0x0F, 0x4E, 0x2F, 0x60,
-        0x58, 0x4F, 0x01, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x2C, 0x43, 0x04, 0xA3, 0x41, 0xF3, 0xFF, 0xFF,
-        0x32, 0xA4, 0x41, 0xFB, 0xE7, 0x01, 0x20, 0x47, 0x20, 0xB0, 0x20, 0xAF, 0x0F, 0x03, 0x40, 0x40,
-        0x0F, 0x60, 0xE0, 0x62, 0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB, 0xDE, 0x60, 0xA3, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x27, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x9E, 0xF1, 0x41, 0xF3,
-        0xFF, 0xFF, 0x02, 0xA4, 0xE8, 0x84, 0x64, 0x46, 0x23, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x64, 0x64, 0xA2, 0xDB, 0x5A, 0xD9, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x64,
-        0x9E, 0xFB, 0xFA, 0xFE, 0xEB, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62,
-        0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x58, 0xF3, 0x8C, 0xFB,
-        0xFF, 0xFF, 0xC1, 0xFE, 0x0F, 0x60, 0xDE, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xE0, 0x62,
-        0x00, 0x60, 0x80, 0x64, 0xA2, 0xDB, 0xDD, 0x60, 0x71, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2E, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x9E, 0xF1,
-        0x00, 0x64, 0xB0, 0x86, 0x9E, 0xFB, 0x07, 0x03, 0x24, 0x60, 0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60,
-        0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0xEB, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x0F, 0x60,
-        0xDE, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xE0, 0x62, 0x00, 0x60, 0x80, 0x64, 0xA2, 0xDB,
-        0xDD, 0x60, 0x71, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x97, 0xF3, 0x26, 0x46,
-        0x60, 0x43, 0x01, 0x2A, 0x22, 0x00, 0x0F, 0xF2, 0x2A, 0xF0, 0x60, 0x40, 0x10, 0x2A, 0x10, 0x00,
-        0x64, 0x40, 0x04, 0x27, 0x1A, 0x00, 0xFD, 0xB3, 0x64, 0x40, 0x20, 0x27, 0x02, 0xBB, 0x0F, 0x60,
-        0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0C, 0x00,
-        0xFB, 0xB3, 0x64, 0x40, 0x20, 0x27, 0x04, 0xBB, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x97, 0xFD, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0xDC, 0xF3, 0x3F, 0xF2, 0x04, 0xA8, 0x57, 0xFB, 0x02, 0x03, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0xF4,
-        0x1E, 0x63, 0x08, 0x64, 0x40, 0x48, 0xBD, 0xD2, 0xFF, 0xFF, 0x60, 0x47, 0x05, 0x36, 0x0B, 0x00,
-        0xFF, 0xB5, 0xC7, 0x83, 0x01, 0x2A, 0xF7, 0x01, 0x4F, 0xD2, 0x5B, 0xD2, 0x60, 0x40, 0x05, 0x37,
-        0x08, 0x00, 0xDF, 0x83, 0xF5, 0x01, 0xFF, 0xB5, 0x65, 0x41, 0x47, 0x8A, 0x5B, 0xD2, 0xDF, 0x83,
-        0x07, 0x00, 0x00, 0x7F, 0xDC, 0x85, 0x47, 0x8A, 0x60, 0x41, 0x5B, 0xD2, 0xDB, 0x83, 0x60, 0x47,
-        0x01, 0xB0, 0xFE, 0xB5, 0x02, 0x03, 0x02, 0x64, 0x40, 0x48, 0x85, 0xF1, 0x65, 0x44, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xFD, 0xA1, 0xE1, 0x81, 0xE1, 0x81, 0xE1, 0x85, 0xC4, 0x81, 0xD0, 0x84,
-        0xD1, 0x80, 0x2A, 0x07, 0x29, 0x06, 0x9C, 0x84, 0xDC, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x85,
-        0x96, 0xF3, 0xC7, 0x83, 0x01, 0x26, 0x60, 0x47, 0xAB, 0x83, 0xFC, 0xA3, 0x02, 0x00, 0x03, 0x04,
-        0x00, 0xF4, 0x84, 0xA3, 0xFC, 0x01, 0x80, 0x65, 0x47, 0xD0, 0x28, 0x41, 0xA0, 0x80, 0xFE, 0xA1,
-        0x16, 0x03, 0x09, 0x02, 0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x1E, 0x00, 0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x15, 0x00, 0x28, 0x41, 0xFE, 0xA1, 0xFF, 0xFF, 0x09, 0x03,
-        0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x08, 0x00, 0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x20, 0x40, 0x20, 0x2A, 0x58, 0x00, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43,
-        0xF4, 0xA3, 0x00, 0x60, 0x1D, 0x61, 0x00, 0x60, 0x80, 0x65, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1,
-        0x02, 0x06, 0x00, 0xF4, 0x03, 0x61, 0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0xD4, 0x80, 0x2D, 0x03,
-        0x17, 0x03, 0xCF, 0x83, 0x61, 0x44, 0x80, 0xA0, 0x28, 0x03, 0x02, 0x02, 0x00, 0xF4, 0x03, 0x61,
-        0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0x81, 0xA1, 0x20, 0x03, 0x05, 0x07, 0x7F, 0xA1, 0xCC, 0x84,
-        0xDD, 0x81, 0xE4, 0x03, 0xF7, 0x01, 0x00, 0xF4, 0x00, 0xB8, 0x04, 0x61, 0xE4, 0x03, 0xF2, 0x01,
-        0x01, 0x60, 0xFF, 0x63, 0x46, 0x48, 0x41, 0x4A, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9,
-        0x64, 0x44, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9, 0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03,
-        0x7F, 0xA1, 0xF7, 0x04, 0x00, 0xF4, 0x03, 0x61, 0xF4, 0x01, 0x20, 0xFE, 0x00, 0xBB, 0x02, 0x60,
-        0x00, 0x63, 0x08, 0x24, 0x11, 0x00, 0xBD, 0xD3, 0x06, 0x65, 0xD4, 0x80, 0xBD, 0xD3, 0x0C, 0x02,
-        0x60, 0x40, 0x60, 0x3A, 0x09, 0x00, 0x1D, 0x3B, 0x07, 0x00, 0xBD, 0xD3, 0xFF, 0xFF, 0xFF, 0xB5,
-        0x00, 0x7E, 0x5C, 0xFB, 0x65, 0x44, 0x5B, 0xFB, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x02, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x63, 0x97, 0xFD, 0x1A, 0x60, 0x72, 0x63, 0x00, 0x64,
-        0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x50, 0x64, 0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB,
-        0x10, 0x60, 0x4E, 0x62, 0xE0, 0x60, 0x07, 0x64, 0xA2, 0xDB, 0xD2, 0xF1, 0x1A, 0x60, 0x76, 0x62,
-        0xA2, 0xD9, 0x1A, 0x60, 0x7E, 0x63, 0x00, 0x64, 0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x54, 0x64,
-        0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB, 0x10, 0x60, 0x52, 0x62, 0xE0, 0x60, 0x11, 0x64,
-        0xA2, 0xDB, 0x28, 0x60, 0x04, 0x62, 0xA2, 0xD1, 0x1A, 0x60, 0x82, 0x62, 0xA2, 0xD9, 0x00, 0x60,
-        0x3A, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x64, 0xFB, 0xA9, 0xF3,
-        0x07, 0xFA, 0xBC, 0xF3, 0x19, 0xFA, 0xF8, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA,
-        0x3F, 0xFA, 0x00, 0x60, 0x3A, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x65, 0xFB, 0xA9, 0xF3, 0x07, 0xFA, 0xBC, 0xF3, 0x19, 0xFA, 0x24, 0x60, 0x80, 0x64, 0x0E, 0xFA,
-        0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x10, 0x60, 0x14, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB,
-        0x10, 0x60, 0x28, 0x62, 0xE0, 0x60, 0x77, 0x64, 0xA2, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x63,
-        0x97, 0xFD, 0xBA, 0xFE, 0xFE, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x84, 0xFD, 0x0F, 0x60,
-        0xEA, 0x62, 0xA2, 0xD1, 0x04, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60,
-        0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x28, 0x60, 0x04, 0x62,
-        0xA2, 0xD1, 0x1A, 0x60, 0x82, 0x62, 0xA2, 0xD9, 0x27, 0x60, 0xFE, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x0A, 0x1B, 0x00, 0x64, 0x84, 0xFB, 0xBA, 0xFE, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0xBA, 0xFE, 0x97, 0xF3, 0x00, 0x63, 0x84, 0xFD, 0x10, 0xBC,
-        0x97, 0xFB, 0xFE, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1,
-        0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x60, 0x64, 0x63, 0x1A, 0x60,
-        0x42, 0x64, 0xA0, 0xDD, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62,
-        0x01, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0xE0, 0x60, 0xC9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xA3, 0x01, 0x31, 0x40, 0x04, 0x2A, 0xE3, 0x01, 0x20, 0x40,
-        0x52, 0x23, 0x12, 0x00, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x14, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62, 0x81, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xE0, 0x60,
-        0xC9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0xDB, 0x01, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x01, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x65, 0xF5, 0xBC, 0xF1, 0x19, 0xF8, 0x81, 0xF1,
-        0x2C, 0xF8, 0x32, 0xF8, 0x82, 0xF1, 0x2D, 0xF8, 0x33, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x34, 0xF8,
-        0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0x11, 0x60, 0x48, 0x64,
-        0x2A, 0xFA, 0x00, 0x64, 0x2B, 0xFA, 0x23, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64,
-        0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0x0F, 0x60, 0xF8, 0x62, 0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB, 0xE1, 0x60, 0x23, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x65, 0xF5, 0x23, 0xF2, 0xFF, 0xFF, 0x01, 0x18, 0x7B, 0x01,
-        0x10, 0x67, 0x84, 0xFB, 0x03, 0x64, 0x98, 0xFB, 0xFE, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80,
-        0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62, 0x81, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xE1, 0x60, 0x46, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x0D, 0x00, 0x0F, 0x60, 0xF6, 0x62,
-        0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0xE0, 0x60, 0x77, 0x78, 0xFF, 0xFF, 0x46, 0x60, 0x00, 0x65, 0x20, 0x41, 0x8E, 0xF3, 0xA5, 0x80,
-        0x01, 0xB0, 0x01, 0x02, 0x06, 0x00, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x2F, 0x58,
-        0xFF, 0xFF, 0x1A, 0x60, 0x42, 0x65, 0xA5, 0xD3, 0x01, 0x63, 0x8C, 0xFD, 0x27, 0x1B, 0x00, 0x60,
-        0x64, 0x64, 0xA5, 0xDB, 0x65, 0xF5, 0xBC, 0xF1, 0x19, 0xF8, 0x81, 0xF1, 0x2C, 0xF8, 0x32, 0xF8,
-        0x82, 0xF1, 0x2D, 0xF8, 0x33, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x34, 0xF8, 0xEB, 0xF1, 0x2F, 0xF8,
-        0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0x11, 0x60, 0x48, 0x64, 0x2A, 0xFA, 0x00, 0x64,
-        0x2B, 0xFA, 0x23, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x06, 0x00, 0x97, 0xF3, 0x32, 0x40,
-        0x02, 0x26, 0x02, 0x00, 0x40, 0x2A, 0xDA, 0xFE, 0xC1, 0xFE, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62, 0x01, 0x60, 0x82, 0x64, 0xA2, 0xDB, 0xE1, 0x60, 0xA4, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x01, 0x60,
-        0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xE0, 0x60, 0x77, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x06, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0xBA, 0xFE, 0xE3, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x8C, 0xFB, 0x01, 0x60, 0x00, 0x65,
-        0x20, 0x44, 0x34, 0x80, 0xBA, 0xFE, 0xC1, 0xFE, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x10, 0x60, 0x14, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62, 0x01, 0x60, 0x46, 0x64,
-        0xA2, 0xDB, 0xE1, 0x60, 0xD7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xF6, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0xE0, 0x60, 0x77, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x3C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x34, 0x01, 0x00, 0x60, 0x02, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x0C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x28, 0x60, 0x00, 0x62, 0xA2, 0xD1,
-        0x97, 0xF3, 0x00, 0x61, 0xD1, 0x80, 0xF7, 0xB4, 0xF0, 0x03, 0x97, 0xFB, 0x35, 0x00, 0x00, 0x60,
-        0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0F, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x28, 0x60, 0x00, 0x62,
-        0xA2, 0xD1, 0x97, 0xF3, 0x00, 0x61, 0xD1, 0x80, 0x08, 0xBC, 0x03, 0x02, 0xE2, 0x60, 0xE8, 0x78,
-        0xFF, 0xFF, 0x97, 0xFB, 0x21, 0x00, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0xE2, 0x60, 0xE8, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1,
-        0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xC5, 0x01,
-        0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xE3, 0x60,
-        0xC8, 0x78, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x02, 0x63, 0x97, 0xF3, 0x8C, 0xFD, 0x01, 0xBC,
-        0xC1, 0xFE, 0x97, 0xFB, 0xD2, 0xF1, 0x1A, 0x60, 0x76, 0x62, 0xA2, 0xD9, 0x0F, 0x60, 0xF6, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x14, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62,
-        0x01, 0x60, 0x34, 0x64, 0xA2, 0xDB, 0xE2, 0x60, 0x62, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x24, 0x60,
-        0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x0E, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64,
-        0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xE0, 0x60, 0x77, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x17, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x97, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x04, 0x2A, 0x01, 0x00, 0xD2, 0x01, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0x72, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x97, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x08, 0x2A, 0x4D, 0x00, 0x54, 0x00, 0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x08, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x97, 0xF3, 0xFF, 0xFF,
-        0x08, 0xBC, 0x97, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xAB, 0x01, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x0C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64, 0xA2, 0xDB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x2B, 0x00, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x0C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64,
-        0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x13, 0x00, 0x0F, 0x60, 0xF6, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x08, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x97, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x2A, 0x04, 0x00, 0x0A, 0x00, 0x2F, 0x58, 0xFF, 0xFF,
-        0x00, 0x00, 0x97, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0x97, 0xFB, 0xE1, 0x60, 0x2A, 0x78, 0xFF, 0xFF,
-        0x27, 0x60, 0xFE, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x03, 0x02, 0xE3, 0x60,
-        0xD1, 0x78, 0xFF, 0xFF, 0x97, 0xF3, 0x01, 0x63, 0x8C, 0xFD, 0x21, 0xBC, 0x97, 0xFB, 0x64, 0xF5,
-        0x81, 0xF1, 0x2C, 0xF8, 0x82, 0xF1, 0x2D, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x85, 0xF1, 0xC0, 0x67,
-        0xB0, 0x84, 0x2B, 0xFA, 0xBC, 0xF1, 0x19, 0xF8, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8,
-        0xED, 0xF1, 0x31, 0xF8, 0x10, 0x60, 0xA4, 0x64, 0x2A, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xC1, 0xFE, 0x1A, 0x60, 0x76, 0x62, 0x00, 0x60, 0x50, 0x64, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0x72, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60,
-        0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x14, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60,
-        0xF8, 0x62, 0x01, 0x60, 0x2C, 0x64, 0xA2, 0xDB, 0xE3, 0x60, 0x3A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x0E, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64,
-        0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xE0, 0x60, 0x77, 0x78, 0xFF, 0xFF,
-        0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x8D, 0x01, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x08, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x97, 0xF3, 0xFF, 0xFF, 0x02, 0xB0,
-        0xFF, 0xFF, 0x4E, 0x03, 0x7D, 0x01, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x45, 0x00, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x16, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64, 0xA2, 0xDB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x28, 0x60, 0x00, 0x62, 0xA2, 0xD3, 0x97, 0xF3, 0x00, 0xA8,
-        0xF7, 0xB4, 0x2E, 0x03, 0x97, 0xFB, 0xE2, 0x60, 0x3C, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x17, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0x72, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x28, 0x60, 0x00, 0x62,
-        0xA2, 0xD3, 0x97, 0xF3, 0x00, 0xA8, 0x08, 0xBC, 0x01, 0x02, 0x42, 0x01, 0x97, 0xFB, 0xE2, 0x60,
-        0x3C, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x02, 0x00, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x00,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x72, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x97, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0x97, 0xFB, 0xE1, 0x60, 0x2A, 0x78, 0xFF, 0xFF,
-        0x97, 0xF3, 0x01, 0x63, 0x8C, 0xFD, 0x01, 0xBC, 0x97, 0xFB, 0x00, 0x64, 0x84, 0xFB, 0xC1, 0xFE,
-        0x29, 0x00, 0x97, 0xF3, 0x01, 0x63, 0x8C, 0xFD, 0x01, 0xBC, 0x97, 0xFB, 0x00, 0x64, 0x84, 0xFB,
-        0x64, 0xF5, 0x81, 0xF1, 0x2C, 0xF8, 0x82, 0xF1, 0x2D, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x85, 0xF1,
-        0xC0, 0x67, 0xB0, 0x84, 0x2B, 0xFA, 0xBC, 0xF1, 0x19, 0xF8, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1,
-        0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0x00, 0x60, 0xA4, 0x64, 0x2A, 0xFA, 0x24, 0x60, 0x74, 0x62,
-        0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xC1, 0xFE, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x7E, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x14, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x0F, 0x60, 0xF8, 0x62, 0x03, 0x60, 0x0E, 0x64, 0xA2, 0xDB,
-        0xE4, 0x60, 0x16, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62,
-        0xA2, 0xD1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0E, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x7E, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0xE0, 0x60, 0x77, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x0A, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xC6, 0x01, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x15, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x10, 0x60, 0x14, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x8B, 0x01, 0x00, 0x60, 0x12, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xAC, 0x01, 0x0F, 0x60, 0xF6, 0x62,
-        0xA2, 0xD1, 0x02, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xAD, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x10, 0x67, 0x84, 0xFB, 0x0F, 0x60, 0xF6, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x14, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x65, 0xF5, 0xBC, 0xF1, 0x19, 0xF8, 0x81, 0xF1, 0x2C, 0xF8, 0x32, 0xF8,
-        0x82, 0xF1, 0x2D, 0xF8, 0x33, 0xF8, 0x83, 0xF1, 0x2E, 0xF8, 0x34, 0xF8, 0xEB, 0xF1, 0x2F, 0xF8,
-        0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0x11, 0x60, 0x48, 0x64, 0x2A, 0xFA, 0x00, 0x64,
-        0x2B, 0xFA, 0x23, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x97, 0xF3, 0xC1, 0xFE, 0xFE, 0xB4,
-        0x97, 0xFB, 0x0F, 0x60, 0xF8, 0x62, 0x00, 0x60, 0x03, 0x64, 0xA2, 0xDB, 0xE4, 0x60, 0x94, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x29, 0x01, 0x65, 0xF5,
-        0x23, 0xF2, 0x98, 0xF3, 0x04, 0x18, 0xCC, 0x84, 0x98, 0xFB, 0x01, 0x03, 0x21, 0x01, 0xE1, 0x60,
-        0x2A, 0x78, 0xFF, 0xFF, 0x27, 0x60, 0xFE, 0x62, 0xA2, 0xD3, 0x84, 0xF1, 0x02, 0xA8, 0x2A, 0xF2,
-        0x03, 0x02, 0xB0, 0x84, 0x2A, 0xFA, 0x08, 0x00, 0x0F, 0x60, 0xF6, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x22, 0x64,
-        0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0x24, 0x60, 0x34, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0xDB, 0x02, 0xBF, 0x60,
-        0xE7, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xFC, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1A, 0x60, 0xAE, 0x63, 0x00, 0x64, 0xA3, 0xDB,
-        0x06, 0xA3, 0x10, 0x60, 0x5C, 0x64, 0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB, 0x10, 0x60,
-        0x5A, 0x62, 0xE4, 0x60, 0xD2, 0x64, 0xA2, 0xDB, 0x1F, 0x60, 0x5C, 0x62, 0xA2, 0xD1, 0x1A, 0x60,
-        0xB2, 0x62, 0xA2, 0xD9, 0x10, 0x60, 0x2A, 0x62, 0xE4, 0x60, 0xF9, 0x64, 0xA2, 0xDB, 0x2F, 0x58,
-        0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x1F, 0x60, 0x80, 0x65, 0xA5, 0xD3, 0xFF, 0xFF, 0x02, 0xBC,
-        0xF3, 0xB4, 0x01, 0xB0, 0xA5, 0xDB, 0x0C, 0x02, 0x12, 0x60, 0x26, 0x61, 0x00, 0x64, 0x1A, 0x63,
-        0x59, 0xDB, 0xFE, 0x1F, 0x1F, 0x60, 0x5C, 0x61, 0x0A, 0x64, 0x1A, 0x63, 0x59, 0xDB, 0xFE, 0x1F,
-        0x7F, 0xF3, 0x7E, 0xFB, 0x01, 0x64, 0x7F, 0xFB, 0x01, 0x61, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03,
-        0xE1, 0x81, 0xFB, 0x01, 0xBA, 0xF3, 0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x69, 0x03, 0x0F, 0x60,
-        0xFC, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xFE, 0x62, 0x40, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xE5, 0x60, 0x1F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x7F, 0xF1, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x0F, 0x60, 0xFE, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xE5, 0x60, 0x43, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xFC, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x0F, 0x60, 0xFE, 0x62, 0x00, 0x60, 0x1A, 0x64, 0xA2, 0xDB, 0xE5, 0x60, 0x64, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0xAE, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xFC, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0xAE, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x26, 0x00,
-        0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0B, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60,
-        0xAA, 0x62, 0x1A, 0x60, 0xAE, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x12, 0x60, 0x26, 0x65, 0x7F, 0xF3, 0xFF, 0xFF, 0x04, 0xA4, 0xF2, 0xA0, 0xFF, 0xFF, 0x01, 0x06,
-        0xF1, 0xA4, 0x01, 0x36, 0x0B, 0x00, 0x00, 0x36, 0x04, 0xA4, 0x60, 0x41, 0xE0, 0x84, 0xC4, 0x84,
-        0xA0, 0xD3, 0xFF, 0xFF, 0x00, 0xB8, 0x61, 0x44, 0xEF, 0x02, 0x75, 0x01, 0x1F, 0x60, 0x80, 0x65,
-        0xA5, 0xD3, 0x7E, 0xF1, 0xFC, 0xB4, 0xA5, 0xDB, 0x7F, 0xF9, 0x0F, 0x60, 0xFC, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xFE, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB,
-        0xE5, 0x60, 0xA5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7F, 0xF1, 0x24, 0x60,
-        0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xFE, 0x62,
-        0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xE5, 0x60, 0xC9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xFC, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x0F, 0x60,
-        0xD0, 0x62, 0xA2, 0xD1, 0x10, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xE6, 0x60, 0xE9, 0x78, 0xFF, 0xFF, 0xE6, 0x60, 0xED, 0x78, 0xFF, 0xFF, 0x1F, 0x60,
-        0x80, 0x63, 0xA3, 0xD3, 0x26, 0x46, 0x02, 0xB0, 0x3F, 0xF2, 0xF6, 0x03, 0x02, 0x60, 0x00, 0x63,
-        0x01, 0x60, 0x00, 0x65, 0xD4, 0x80, 0x00, 0xF4, 0x02, 0x24, 0x65, 0x44, 0x12, 0x65, 0x60, 0x41,
-        0xA5, 0xD0, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x64, 0x44, 0x00, 0x7F,
-        0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0xF0, 0x02,
-        0x02, 0x60, 0x14, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x01, 0xB4, 0xFF, 0xFF, 0x37, 0x02, 0x29, 0x60,
-        0xA4, 0x64, 0xA0, 0xD1, 0x1F, 0x60, 0x0E, 0x63, 0x31, 0x18, 0x64, 0x41, 0x44, 0x4B, 0x29, 0x60,
-        0xA6, 0x65, 0xA5, 0xD1, 0xDA, 0x85, 0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03,
-        0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0xF4, 0x02, 0x02, 0x60, 0x1A, 0x61, 0xA1, 0xD3,
-        0x2B, 0x45, 0x60, 0x40, 0x00, 0x36, 0x1A, 0x00, 0x01, 0x36, 0x18, 0x00, 0xD4, 0x80, 0x65, 0x43,
-        0xB0, 0x02, 0x1F, 0x60, 0x0C, 0x64, 0xE3, 0x83, 0xFE, 0xA3, 0x59, 0xD1, 0x58, 0xD3, 0x40, 0x4B,
-        0xD0, 0x80, 0x2B, 0x44, 0x02, 0x02, 0xF9, 0x1F, 0x09, 0x00, 0x02, 0x60, 0x1A, 0x61, 0x65, 0x43,
-        0xE3, 0x83, 0xFE, 0xA3, 0x59, 0xD3, 0xFF, 0xFF, 0x9C, 0x1B, 0xFC, 0x1F, 0x26, 0x46, 0x3F, 0xF0,
-        0x01, 0x60, 0x00, 0x64, 0xD0, 0x80, 0x64, 0x41, 0x01, 0x05, 0x60, 0x41, 0xF4, 0xA1, 0x02, 0x60,
-        0x18, 0x63, 0xBD, 0xD3, 0xBD, 0xD1, 0xFD, 0xA0, 0xF9, 0xA0, 0x08, 0x03, 0x35, 0x03, 0xFE, 0xA1,
-        0x64, 0x42, 0xE2, 0x85, 0xD1, 0x81, 0xC7, 0x83, 0x84, 0x06, 0xF3, 0x01, 0x12, 0x60, 0x26, 0x65,
-        0xBD, 0xD3, 0xFD, 0xA1, 0xE0, 0x84, 0xC4, 0x85, 0x05, 0x64, 0xA5, 0xDB, 0x1F, 0x60, 0x80, 0x65,
-        0xA5, 0xD3, 0x41, 0x48, 0x04, 0xBC, 0xA5, 0xDB, 0x12, 0x60, 0x28, 0x65, 0x12, 0x60, 0x44, 0x61,
-        0x49, 0xD3, 0xD6, 0x80, 0x00, 0xB8, 0x0E, 0x03, 0xFB, 0x03, 0x62, 0x45, 0x12, 0x60, 0x26, 0x61,
-        0x59, 0xD3, 0xD6, 0x80, 0x00, 0xB8, 0x06, 0x03, 0xFB, 0x03, 0x05, 0x64, 0xA2, 0xDB, 0xD6, 0x80,
-        0x02, 0xA2, 0xFC, 0x02, 0x0F, 0x60, 0xFC, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x28, 0x41, 0xC5, 0x01, 0x63, 0x45, 0x04, 0x60, 0x00, 0x63, 0xD7, 0x83,
-        0xEB, 0x83, 0xD3, 0x80, 0x65, 0x43, 0x01, 0x05, 0x54, 0x00, 0xFE, 0xA3, 0x43, 0x4B, 0xA3, 0xD3,
-        0x63, 0x41, 0x60, 0x43, 0x1B, 0x60, 0xC6, 0x64, 0xA0, 0xDD, 0xE3, 0x83, 0xFE, 0xA3, 0x59, 0xD1,
-        0x58, 0xD9, 0xFD, 0x1F, 0x00, 0x63, 0x58, 0xDD, 0x2B, 0x43, 0xBD, 0xD1, 0x1F, 0x60, 0x78, 0x64,
-        0x64, 0x41, 0xBD, 0xD1, 0x58, 0xD9, 0xBD, 0xD1, 0xFC, 0xA1, 0x41, 0x4B, 0x58, 0xD9, 0xBD, 0xD1,
-        0xA0, 0xD9, 0x12, 0x60, 0x26, 0x61, 0x12, 0x60, 0x42, 0x65, 0x00, 0x64, 0xD5, 0x80, 0x59, 0xDB,
-        0xFD, 0x02, 0x12, 0x60, 0x24, 0x65, 0xBD, 0xD3, 0xA3, 0xD1, 0xE0, 0x84, 0xC4, 0x82, 0x12, 0x60,
-        0x44, 0x65, 0x05, 0x64, 0x64, 0x41, 0x5A, 0xDB, 0xD6, 0x80, 0xCD, 0x81, 0x22, 0x03, 0xFB, 0x02,
-        0x1F, 0x60, 0x5A, 0x61, 0x4B, 0xD1, 0x04, 0xA3, 0xBD, 0xD3, 0xFF, 0xFF, 0xF6, 0xA0, 0xC1, 0x82,
-        0x05, 0x05, 0x64, 0x41, 0x5A, 0xDB, 0xCD, 0x81, 0xFF, 0xFF, 0xFC, 0x02, 0x2B, 0x41, 0xFD, 0xA1,
-        0x41, 0x4B, 0xDF, 0x07, 0x0F, 0x60, 0xFC, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x1F, 0x60, 0x80, 0x65, 0xA5, 0xD3, 0xFF, 0xFF, 0x08, 0xBC, 0xA5, 0xDB,
-        0xFF, 0xFF, 0x20, 0xFE, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x20, 0xFE, 0x9A, 0xFF, 0x5C, 0x61,
-        0x3F, 0xF2, 0xFF, 0xFF, 0x83, 0xA0, 0xFF, 0xFF, 0x04, 0x28, 0x39, 0x00, 0xF4, 0xA4, 0x60, 0x43,
-        0x00, 0xF4, 0x1E, 0x62, 0x60, 0xFE, 0xA2, 0xD2, 0xFF, 0xFF, 0x60, 0x40, 0x85, 0x36, 0x10, 0x00,
-        0xDE, 0x82, 0xA2, 0xD2, 0xFF, 0xFF, 0x20, 0xFE, 0xFF, 0xB4, 0x02, 0xA4, 0x53, 0x93, 0x51, 0x91,
-        0x05, 0x0E, 0xFF, 0xA4, 0x42, 0x92, 0x63, 0x40, 0x61, 0x40, 0xEC, 0x1C, 0x98, 0xFF, 0xD9, 0x01,
-        0x20, 0xFE, 0x05, 0x64, 0x00, 0x7C, 0x42, 0x92, 0x60, 0xFE, 0xDE, 0x82, 0xA2, 0xD2, 0xDE, 0x82,
-        0xA2, 0xD0, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0x60, 0x43, 0x60, 0xFE, 0xDE, 0x82, 0xA2, 0xD2,
-        0xDE, 0x82, 0xA2, 0xD0, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0x98, 0xFF, 0x01, 0xA3, 0x01, 0xA4,
-        0x2D, 0x60, 0x5A, 0x62, 0xA2, 0xDD, 0x2D, 0x60, 0x5E, 0x62, 0xA2, 0xDB, 0xBA, 0x01, 0x98, 0xFF,
-        0xB8, 0x01, 0x00, 0x60, 0xA0, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x5D, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x80, 0x64, 0x2A, 0xFA, 0xCC, 0xF1, 0x19, 0xF8, 0x00, 0x64,
-        0x3E, 0xFA, 0x00, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0xA9, 0xF1, 0x07, 0xF8, 0x67, 0x44, 0x2C, 0xFA,
-        0x2D, 0xFA, 0x2E, 0xFA, 0x10, 0x60, 0x1C, 0x62, 0xE8, 0x60, 0xDF, 0x64, 0xA2, 0xDB, 0x2F, 0x58,
-        0xFF, 0xFF, 0x5D, 0xF5, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8,
-        0x81, 0xF1, 0x32, 0xF8, 0x82, 0xF1, 0x33, 0xF8, 0x83, 0xF1, 0x34, 0xF8, 0x28, 0x60, 0x2C, 0x62,
-        0xA2, 0xD1, 0x02, 0x64, 0x64, 0x40, 0xFE, 0x26, 0x10, 0xBC, 0x32, 0x40, 0x08, 0x26, 0x10, 0xBC,
-        0x2F, 0x60, 0x44, 0x62, 0xA2, 0xDB, 0x28, 0x60, 0x2A, 0x62, 0xA2, 0xD1, 0x2D, 0x60, 0x7A, 0x64,
-        0x02, 0x18, 0x27, 0x60, 0xDA, 0x64, 0x2E, 0x60, 0xAE, 0x62, 0xA2, 0xDB, 0x2E, 0x60, 0xCA, 0x62,
-        0xA2, 0xDB, 0x2D, 0x60, 0xA6, 0x61, 0x28, 0x60, 0xCC, 0x62, 0xA2, 0xD3, 0x2E, 0x60, 0x96, 0x65,
-        0xFE, 0xA4, 0xE0, 0x84, 0x02, 0x05, 0x67, 0x44, 0x99, 0x00, 0xE0, 0x84, 0xC4, 0x85, 0x2D, 0x60,
-        0xCC, 0x62, 0xA2, 0xD3, 0xA5, 0xD1, 0xDA, 0x85, 0x2D, 0x60, 0xC4, 0x62, 0xA0, 0x83, 0xA2, 0xDD,
-        0xA5, 0xD1, 0x2D, 0x60, 0xC2, 0x62, 0xA0, 0x83, 0xA2, 0xDD, 0x2D, 0x60, 0xA0, 0x61, 0xDD, 0x60,
-        0x06, 0x64, 0xA1, 0xDB, 0x06, 0xA1, 0x2D, 0x60, 0xCA, 0x62, 0xA2, 0xD3, 0x2D, 0x60, 0xC2, 0x62,
-        0x60, 0x40, 0xFD, 0xA0, 0xA2, 0xD3, 0x74, 0x03, 0x50, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x02, 0x2A,
-        0x03, 0x00, 0x01, 0x60, 0xF2, 0x63, 0x0E, 0x00, 0x04, 0x2A, 0x03, 0x00, 0x02, 0x60, 0xF2, 0x63,
-        0x09, 0x00, 0x10, 0x2A, 0x03, 0x00, 0x04, 0x60, 0xF2, 0x63, 0x04, 0x00, 0x20, 0x2A, 0x04, 0x00,
-        0x05, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x2D, 0x60, 0xCA, 0x62, 0xA2, 0xD3, 0x2D, 0x60,
-        0xC4, 0x62, 0xFE, 0xA0, 0xA2, 0xD3, 0x54, 0x03, 0x00, 0x60, 0x00, 0x63, 0x59, 0xDD, 0x61, 0x45,
-        0x60, 0x40, 0x01, 0x2A, 0x04, 0x00, 0x00, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40,
-        0x02, 0x2A, 0x04, 0x00, 0x01, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x04, 0x2A,
-        0x04, 0x00, 0x02, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x10, 0x2A, 0x04, 0x00,
-        0x04, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60,
-        0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0xD5, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xA5, 0xDD, 0x2D, 0x60,
-        0xCA, 0x62, 0xA2, 0xD3, 0x2D, 0x60, 0xC6, 0x62, 0xFF, 0xA0, 0xA2, 0xD3, 0x21, 0x03, 0x00, 0x60,
-        0x00, 0x63, 0x59, 0xDD, 0x61, 0x45, 0x60, 0x40, 0x01, 0x2A, 0x04, 0x00, 0x00, 0x60, 0xF2, 0x63,
-        0x59, 0xD9, 0x59, 0xDD, 0x60, 0x40, 0x02, 0x2A, 0x04, 0x00, 0x01, 0x60, 0xF2, 0x63, 0x59, 0xD9,
-        0x59, 0xDD, 0x60, 0x40, 0x04, 0x2A, 0x04, 0x00, 0x02, 0x60, 0xF2, 0x63, 0x59, 0xD9, 0x59, 0xDD,
-        0xD5, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xA5, 0xDD, 0x2D, 0x60, 0xC8, 0x62, 0xA2, 0xD1, 0x59, 0xD9,
-        0x2D, 0x60, 0xA0, 0x65, 0xD5, 0x84, 0xDD, 0x7F, 0xA5, 0xDB, 0x65, 0x44, 0x2E, 0x60, 0xB8, 0x62,
-        0xA2, 0xDB, 0x2E, 0x60, 0xD4, 0x62, 0xA2, 0xDB, 0x0F, 0x60, 0xD4, 0x62, 0x00, 0x60, 0x04, 0x64,
-        0xA2, 0xDB, 0xE8, 0x60, 0x2F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xD2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x7F, 0xF1, 0x2F, 0x60, 0x0E, 0x62, 0xA2, 0xD9, 0x2E, 0x60,
-        0xB6, 0x65, 0xE9, 0x60, 0x58, 0x4D, 0x32, 0x78, 0xFF, 0xFF, 0x5D, 0xF5, 0x00, 0xF4, 0x80, 0xF1,
-        0x06, 0xF8, 0x2F, 0x60, 0x44, 0x62, 0xA2, 0xD3, 0x07, 0xFA, 0x2E, 0x60, 0xAE, 0x64, 0x40, 0x48,
-        0x10, 0x61, 0x00, 0x60, 0x00, 0x64, 0xE8, 0x60, 0x58, 0x4D, 0xE8, 0x78, 0xFF, 0xFF, 0x5D, 0xF5,
-        0x3F, 0xFC, 0xDB, 0xFE, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x04, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0xDC, 0xF3, 0x9B, 0xFE, 0xFD, 0xA0, 0x25, 0x04, 0x24, 0x02, 0x04, 0x64, 0x03, 0xFA, 0x00, 0xF4,
-        0x09, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x3A, 0x1C, 0x00, 0x60, 0x43, 0x00, 0x36, 0x1C, 0x00,
-        0xE0, 0xA0, 0xDA, 0x85, 0x16, 0x07, 0x2D, 0x60, 0x7A, 0x61, 0xA1, 0xD1, 0xFF, 0xFF, 0xD3, 0x80,
-        0xCB, 0x83, 0x0F, 0x02, 0x07, 0x0E, 0x59, 0xD3, 0xA5, 0xD0, 0xDA, 0x85, 0xD0, 0x80, 0xFF, 0xFF,
-        0x08, 0x02, 0xF9, 0x1F, 0x13, 0x1E, 0xA5, 0xD0, 0x59, 0xD3, 0xFF, 0xFF, 0x90, 0x80, 0xFF, 0x22,
-        0x0D, 0x00, 0xE8, 0x60, 0xDD, 0x78, 0xFF, 0xFF, 0x28, 0x60, 0x2A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x27, 0x60, 0xDA, 0x64, 0x02, 0x00, 0x2D, 0x60, 0x7A, 0x64,
-        0x2E, 0x60, 0xCA, 0x62, 0xA2, 0xDB, 0x26, 0x46, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA,
-        0x31, 0xF2, 0x2E, 0xFA, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8,
-        0x81, 0xF1, 0x32, 0xF8, 0x82, 0xF1, 0x33, 0xF8, 0x83, 0xF1, 0x34, 0xF8, 0x50, 0x63, 0x2A, 0xFC,
-        0xCC, 0xF3, 0x19, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0xA9, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x80, 0xF1,
-        0x06, 0xF8, 0x2F, 0x60, 0x44, 0x62, 0xA2, 0xD3, 0x07, 0xFA, 0x2E, 0x60, 0xD2, 0x65, 0xE9, 0x60,
-        0x58, 0x4D, 0x32, 0x78, 0xFF, 0xFF, 0x2E, 0x60, 0xCA, 0x64, 0x40, 0x48, 0x10, 0x61, 0x00, 0x60,
-        0x00, 0x64, 0xE8, 0x60, 0x58, 0x4D, 0xE8, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xFC, 0x24, 0x60,
-        0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60,
-        0xD2, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x00, 0x64, 0x94, 0xFB, 0x2F, 0x58, 0xFF, 0xFF,
-        0x2F, 0x60, 0x46, 0x62, 0xA2, 0xDB, 0xCD, 0x81, 0x28, 0xD3, 0x5A, 0x88, 0xDC, 0x83, 0x39, 0x18,
-        0xFB, 0x03, 0x61, 0x40, 0x7F, 0x3A, 0x07, 0x00, 0x2F, 0x60, 0x46, 0x62, 0xA2, 0xD3, 0x03, 0x61,
-        0x7C, 0xA4, 0xA2, 0xDB, 0x00, 0xF4, 0x60, 0xFE, 0xA3, 0xD1, 0xDD, 0x81, 0xA1, 0xD8, 0x61, 0x40,
-        0x7F, 0x3A, 0x09, 0x00, 0x20, 0xFE, 0x2F, 0x60, 0x46, 0x62, 0xA2, 0xD3, 0x03, 0x61, 0x7C, 0xA4,
-        0xA2, 0xDB, 0x00, 0xF4, 0x60, 0xFE, 0xCF, 0x83, 0xA3, 0xD3, 0xDD, 0x81, 0xA1, 0xDA, 0xFF, 0xB4,
-        0x00, 0x7F, 0x15, 0x03, 0xDB, 0x83, 0x61, 0x40, 0x7F, 0x3A, 0x0B, 0x00, 0x20, 0xFE, 0x60, 0x45,
-        0x2F, 0x60, 0x46, 0x62, 0xA2, 0xD3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x65, 0x44, 0x00, 0xF4,
-        0x60, 0xFE, 0xA3, 0xD1, 0xDF, 0x83, 0xDD, 0x81, 0xCC, 0x84, 0xA1, 0xD8, 0xEC, 0x02, 0x20, 0xFE,
-        0xC3, 0x01, 0x2F, 0x60, 0x46, 0x62, 0xA2, 0xD1, 0xFD, 0xA1, 0xFF, 0xB1, 0xC1, 0x83, 0xA2, 0xDD,
-        0x2D, 0x58, 0xFF, 0xFF, 0x67, 0x5C, 0x1B, 0x60, 0xC6, 0x61, 0xA1, 0xD3, 0xA5, 0xD9, 0x12, 0x18,
-        0x60, 0x43, 0x2F, 0x60, 0x14, 0x64, 0xA5, 0xDB, 0x60, 0xFE, 0xA0, 0xDD, 0xFF, 0xFF, 0x20, 0xFE,
-        0xDC, 0x84, 0xCF, 0x83, 0xE3, 0x83, 0x59, 0xD1, 0xDC, 0x84, 0x60, 0xFE, 0xA0, 0xD9, 0xFF, 0xFF,
-        0x20, 0xFE, 0xF9, 0x1F, 0x2D, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26, 0x29, 0x00,
-        0x45, 0x48, 0x00, 0x60, 0x10, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x21, 0x03,
-        0xF2, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x00, 0x60, 0x48, 0x61, 0x28, 0x44, 0x59, 0xDA, 0x03, 0x64,
-        0x38, 0x43, 0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02, 0x39, 0x44, 0x59, 0xDA, 0x28, 0x60,
-        0x2E, 0x64, 0xA0, 0xD3, 0x59, 0xDA, 0x07, 0x64, 0x23, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x64, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26, 0x1C, 0x00, 0x45, 0x48,
-        0x00, 0x60, 0x06, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x14, 0x03, 0x02, 0x64,
-        0x23, 0xFA, 0xF2, 0x60, 0x00, 0x64, 0x5A, 0xDA, 0x28, 0x44, 0x5A, 0xDA, 0xFF, 0xFF, 0x24, 0x60,
-        0x74, 0x62, 0x24, 0x60, 0x64, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x32, 0x40, 0x40, 0x26,
-        0x3E, 0x00, 0x9D, 0xF3, 0x67, 0x43, 0xDC, 0x84, 0xCC, 0x84, 0x39, 0x03, 0x60, 0x46, 0x0A, 0x02,
-        0x9D, 0xFD, 0x00, 0x60, 0x46, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x9D, 0xFB, 0x2E, 0x03, 0x46, 0x4B, 0x27, 0x60, 0x72, 0x61, 0x18, 0x64, 0x23, 0xFA, 0xF1, 0x60,
-        0x00, 0x64, 0x24, 0xFA, 0x4A, 0x65, 0xA2, 0xFF, 0x2C, 0x63, 0x00, 0x64, 0x59, 0xD1, 0xA2, 0xDB,
-        0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF7, 0x1F, 0x12, 0x63,
-        0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F,
-        0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x64, 0x64, 0xA2, 0xDB, 0x2B, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0xA6, 0xFE, 0x00, 0x64, 0x9D, 0xFB, 0xA3, 0xFF,
-        0xBF, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0xA6, 0xFE, 0xB8, 0x05, 0xA7, 0xFE, 0x12, 0x05, 0xA5, 0xFE,
-        0x03, 0x04, 0xEA, 0x60, 0xC5, 0x78, 0xFF, 0xFF, 0xA4, 0xFE, 0xF2, 0x04, 0x0F, 0x60, 0xDE, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x80, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xBF, 0x60, 0xE7, 0x78,
-        0xFF, 0xFF, 0x36, 0x45, 0x20, 0x60, 0x08, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x9F, 0xF3,
-        0xFF, 0xFF, 0x01, 0xB0, 0x00, 0x64, 0x41, 0x03, 0x9F, 0xFB, 0x31, 0x44, 0xE8, 0xB4, 0x40, 0x51,
-        0x6A, 0x44, 0xFF, 0xFF, 0x80, 0x26, 0xFC, 0x01, 0x61, 0xFF, 0x62, 0xFF, 0x10, 0x60, 0x1A, 0x62,
-        0xA2, 0xD1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x34, 0x60, 0x58, 0x4E,
-        0x64, 0x78, 0xFF, 0xFF, 0x1E, 0x60, 0xBC, 0x62, 0x1E, 0x60, 0xBE, 0x64, 0xA2, 0xDB, 0x00, 0x64,
-        0x4A, 0xDB, 0x01, 0x60, 0xFE, 0x63, 0x1C, 0x60, 0xB8, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F,
-        0x1C, 0x63, 0x10, 0x60, 0x5C, 0x64, 0x58, 0xD1, 0xFF, 0xFF, 0x08, 0x1B, 0xFC, 0x1F, 0x00, 0x60,
-        0x62, 0x63, 0x1B, 0x60, 0xC4, 0x64, 0x00, 0x7C, 0x58, 0xD9, 0xFE, 0x1F, 0x1C, 0x60, 0xB4, 0x63,
-        0xA3, 0xD3, 0xFF, 0xFF, 0x04, 0xB0, 0xFF, 0xFF, 0x05, 0x03, 0x02, 0x65, 0xE9, 0x60, 0x58, 0x4E,
-        0x7B, 0x78, 0xFF, 0xFF, 0xBF, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0xEA, 0x60, 0xC5, 0x78, 0xFF, 0xFF,
-        0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x74, 0x00, 0x28, 0x60, 0x50, 0x63, 0xBD, 0xD3, 0xBD, 0xD1, 0xBD, 0xD1, 0xB0, 0x84, 0xB0, 0x84,
-        0xFF, 0xFF, 0x07, 0x02, 0x8C, 0xFB, 0x31, 0x44, 0xFE, 0xB4, 0x40, 0x51, 0x0D, 0x64, 0x05, 0xFB,
-        0x64, 0x00, 0x28, 0xF3, 0x9F, 0xF1, 0x60, 0x47, 0x64, 0x41, 0x07, 0xB1, 0x07, 0xB4, 0x08, 0x24,
-        0x67, 0x4C, 0x50, 0xFB, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0xA1, 0x80,
-        0xB1, 0x83, 0x53, 0x02, 0x9F, 0xFD, 0x28, 0x60, 0x44, 0x62, 0xA2, 0xD3, 0xE5, 0xFB, 0x7F, 0xFB,
-        0x24, 0x60, 0x5E, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x46, 0x5E, 0x31, 0x44,
-        0x01, 0xBC, 0x40, 0x51, 0xD8, 0xF3, 0x01, 0x63, 0x03, 0xA8, 0x4E, 0xFD, 0x05, 0x02, 0x02, 0x63,
-        0x14, 0x60, 0x00, 0x64, 0xDB, 0xFB, 0x0C, 0x00, 0x02, 0xA8, 0x01, 0x63, 0x03, 0x03, 0x0A, 0x60,
-        0x00, 0x64, 0x03, 0x00, 0x02, 0x63, 0x14, 0x60, 0x00, 0x64, 0xDB, 0xFB, 0x00, 0x64, 0x4E, 0xFB,
-        0x4B, 0xFD, 0xA9, 0xF5, 0xFF, 0xFF, 0x0E, 0xF0, 0x0F, 0x60, 0xA2, 0x65, 0x28, 0x60, 0xD2, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0xFE, 0xA0, 0x03, 0xA8, 0x11, 0x06, 0x79, 0xF1, 0x06, 0x02, 0x64, 0x44,
-        0x08, 0x2A, 0x09, 0x00, 0x06, 0x64, 0x44, 0xD3, 0x0D, 0x00, 0x64, 0x44, 0x20, 0x2A, 0x03, 0x00,
-        0x0A, 0x64, 0x44, 0xD3, 0x07, 0x00, 0x01, 0x64, 0x44, 0xD3, 0x04, 0x00, 0xE8, 0x84, 0xE0, 0x84,
-        0x44, 0xD3, 0x00, 0x00, 0x0E, 0xFA, 0xED, 0xE2, 0x0F, 0x4E, 0xC8, 0x60, 0x58, 0x4F, 0x15, 0x78,
-        0xFF, 0xFF, 0x0E, 0x4F, 0xBF, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0xD7, 0xFE, 0xBF, 0x60, 0xE7, 0x78,
-        0xFF, 0xFF, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0xF3, 0x01, 0x24, 0x60, 0x46, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x0E, 0xF2, 0x4D, 0x03, 0x60, 0x40, 0xF0, 0x37, 0x3A, 0x00, 0xFF, 0x37, 0x2F, 0x00, 0xFD, 0x37,
-        0x27, 0x00, 0xF8, 0x37, 0x0A, 0x00, 0x60, 0x47, 0xFF, 0xB5, 0x0F, 0x60, 0xD2, 0x62, 0x46, 0xD1,
-        0x00, 0x60, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x24, 0x60, 0x74, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xDA, 0x01,
-        0x06, 0xB4, 0xFD, 0x7F, 0x0E, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x4C, 0x64, 0xA2, 0xDB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF9, 0xFE, 0xCA, 0x01,
-        0x23, 0xF0, 0x60, 0x40, 0x04, 0x26, 0xEC, 0x1B, 0x02, 0x26, 0xEA, 0x18, 0xA2, 0xFF, 0x02, 0xF0,
-        0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xB0, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0xB0, 0xFB, 0x24, 0x60,
-        0x74, 0x64, 0x40, 0x4B, 0x2C, 0x60, 0x58, 0x4D, 0xD8, 0x78, 0xFF, 0xFF, 0xB3, 0x01, 0xAC, 0xFE,
-        0x09, 0x05, 0xAD, 0xFE, 0x10, 0x05, 0xAE, 0xFE, 0xAD, 0x05, 0xAF, 0xFE, 0x3A, 0x05, 0xBF, 0x60,
-        0xE7, 0x78, 0xFF, 0xFF, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x20, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0xF4, 0x01, 0x10, 0x60, 0x32, 0x65, 0x0B, 0x61, 0x07, 0x00, 0xA2, 0xDD,
-        0x58, 0x4F, 0x64, 0x58, 0xFF, 0xFF, 0x00, 0xB9, 0xFF, 0xFF, 0x08, 0x03, 0x00, 0x63, 0xA5, 0xD1,
-        0x5A, 0xD3, 0xDA, 0x85, 0x00, 0xA8, 0xCD, 0x81, 0xF2, 0x02, 0xF8, 0x02, 0xE0, 0x01, 0x0F, 0x60,
-        0xCE, 0x62, 0x10, 0x60, 0x12, 0x65, 0xEB, 0x60, 0x5F, 0x63, 0x00, 0x64, 0x5A, 0xDB, 0xD6, 0x80,
-        0xFF, 0xFF, 0x04, 0x03, 0x5A, 0xDB, 0x5A, 0xDB, 0x5A, 0xDD, 0xF9, 0x01, 0x10, 0x60, 0x30, 0x65,
-        0x00, 0x64, 0x5A, 0xDB, 0xD6, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x5A, 0xDD, 0xFB, 0x01, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xD2, 0x64, 0x40, 0x41, 0x0F, 0x60, 0xD0, 0x63, 0xA3, 0xD1, 0x00, 0x64,
-        0xD0, 0x80, 0x0B, 0x61, 0x08, 0x03, 0xBD, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0xB0, 0x84, 0xCD, 0x81,
-        0xA3, 0xDB, 0x06, 0xA3, 0xF9, 0x02, 0x10, 0x60, 0x1A, 0x63, 0xA3, 0xD1, 0x00, 0x64, 0xD0, 0x80,
-        0x0C, 0x61, 0x19, 0x03, 0xBD, 0xDB, 0x64, 0x44, 0xFE, 0xA3, 0x02, 0xA3, 0xCD, 0x81, 0xE8, 0x84,
-        0xE3, 0x03, 0x02, 0x05, 0xE1, 0x03, 0xF9, 0x01, 0x99, 0xFB, 0x9B, 0xFD, 0x61, 0x5C, 0xA3, 0xD3,
-        0x9A, 0xF9, 0x03, 0x18, 0x58, 0x4F, 0x60, 0x58, 0xFF, 0xFF, 0x9B, 0xF3, 0x9A, 0xF1, 0x60, 0x43,
-        0x99, 0xF3, 0x64, 0x41, 0xEA, 0x01, 0x21, 0x43, 0x10, 0x60, 0x14, 0x65, 0xD7, 0x80, 0xBD, 0xD1,
-        0xBD, 0xD3, 0x03, 0x02, 0xBF, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0xA0, 0x84, 0xBD, 0xD1, 0x43, 0x41,
-        0xF5, 0x03, 0xEB, 0x60, 0x64, 0x64, 0x64, 0x58, 0x40, 0x4F, 0x2A, 0xF0, 0x83, 0x60, 0xFF, 0x65,
-        0x64, 0x47, 0x03, 0x2B, 0x01, 0x00, 0x14, 0x00, 0x03, 0x26, 0x03, 0xAC, 0x60, 0x47, 0xA4, 0x84,
-        0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x64, 0x41,
-        0xEB, 0xF3, 0x2F, 0xFA, 0x60, 0x43, 0xEC, 0xF3, 0x30, 0xFA, 0xED, 0xF1, 0x31, 0xF8, 0x19, 0x00,
-        0x60, 0x47, 0xA4, 0x84, 0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2,
-        0x2E, 0xFA, 0x36, 0xF2, 0x32, 0xFA, 0x37, 0xF2, 0x33, 0xFA, 0x38, 0xF2, 0x34, 0xFA, 0xEB, 0xF3,
-        0x2F, 0xFA, 0x36, 0xFA, 0xEC, 0xF3, 0x30, 0xFA, 0x37, 0xFA, 0xED, 0xF3, 0x31, 0xFA, 0x38, 0xFA,
-        0x64, 0x41, 0x1C, 0xF2, 0x13, 0xFA, 0x00, 0xF4, 0x0D, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B,
-        0x18, 0x00, 0x81, 0x67, 0xA2, 0xDA, 0xEC, 0x60, 0x58, 0x4E, 0x5A, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x3F, 0xFC, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58,
-        0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xF0, 0x42, 0x64, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x04, 0x3F, 0xFA,
-        0x07, 0xF2, 0xA9, 0xF1, 0x01, 0x1B, 0x07, 0xF8, 0x1C, 0xF2, 0x13, 0xFA, 0x26, 0xF2, 0x27, 0xF0,
-        0x60, 0x47, 0x00, 0xF4, 0x1F, 0xFA, 0x64, 0x47, 0x20, 0xFA, 0x61, 0x44, 0x21, 0xFA, 0x01, 0x67,
-        0x0D, 0xFA, 0x10, 0x61, 0x28, 0x60, 0x06, 0x64, 0x1E, 0x63, 0x58, 0xD1, 0xCD, 0x81, 0xBD, 0xD8,
-        0xFC, 0x02, 0xBB, 0xF1, 0xD8, 0xF1, 0x64, 0x5E, 0x64, 0x5F, 0x44, 0x63, 0xBD, 0xDA, 0x28, 0x60,
-        0x00, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x4A, 0xD3, 0x60, 0x45,
-        0x60, 0x40, 0x01, 0x36, 0x03, 0x64, 0x02, 0x36, 0x01, 0x64, 0xB4, 0x84, 0x06, 0xA2, 0xA2, 0xD1,
-        0xBD, 0xDA, 0x64, 0x47, 0xBD, 0xDA, 0xD5, 0xF3, 0xD6, 0xF1, 0x60, 0x47, 0xBD, 0xDA, 0x64, 0x47,
-        0xE3, 0xF1, 0xBD, 0xDA, 0x64, 0x44, 0xBD, 0xDA, 0x26, 0x46, 0x00, 0x64, 0x23, 0xF0, 0x3B, 0xF0,
-        0x64, 0x40, 0x10, 0x2A, 0x06, 0x00, 0xC0, 0x67, 0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0x10, 0xBC, 0x3E, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x34, 0x64, 0xA2, 0xDB, 0x26, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0x00, 0x66, 0x46, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0xB4, 0xF3, 0x1F, 0xFA, 0x32, 0x47, 0x07, 0xFA, 0x24, 0x7E, 0x02, 0x7F,
-        0x08, 0xFA, 0xD8, 0xF1, 0x09, 0xF8, 0x01, 0x60, 0x01, 0x64, 0x0A, 0xFA, 0x01, 0x64, 0x0B, 0xFA,
-        0x24, 0x60, 0x74, 0x62, 0x18, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x0A, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0x52, 0x63, 0x2E, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0x2A, 0x61, 0xAE, 0x60,
-        0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x5E, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x67, 0x44,
-        0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0x32, 0xFA, 0x33, 0xFA, 0x34, 0xFA, 0x12, 0x60, 0x80, 0x64,
-        0xA9, 0xF1, 0x0E, 0xFA, 0x07, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x1A, 0x60, 0x4E, 0x63, 0xA3, 0xDB,
-        0x06, 0xA3, 0x10, 0x60, 0x38, 0x64, 0xBD, 0xDB, 0x04, 0x64, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB,
-        0x10, 0x60, 0x36, 0x62, 0xEF, 0x60, 0xA9, 0x64, 0xA2, 0xDB, 0x1A, 0x60, 0x5A, 0x63, 0x00, 0x64,
-        0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x3C, 0x64, 0xBD, 0xDB, 0x08, 0x64, 0xBD, 0xDB, 0x06, 0x64,
-        0xA3, 0xDB, 0x10, 0x60, 0x3A, 0x62, 0xEF, 0x60, 0xB3, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x22, 0x62,
-        0xEF, 0x60, 0x93, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x31, 0x60, 0x2A, 0x62, 0xA2, 0xDB, 0x2F, 0x58,
-        0xFF, 0xFF, 0x5E, 0xF5, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8,
-        0xCC, 0xF1, 0x19, 0xF8, 0x30, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x00, 0x63, 0x8A, 0xFD, 0x1C, 0x60, 0x96, 0x65, 0xA5, 0xDD, 0x19, 0x60, 0x86, 0x63,
-        0x88, 0xFD, 0x89, 0xFD, 0x20, 0x40, 0x10, 0x2B, 0x05, 0x00, 0x1F, 0x60, 0x82, 0x61, 0xA1, 0xD3,
-        0xFF, 0xFF, 0x59, 0x18, 0x5E, 0xF5, 0x40, 0x64, 0x2A, 0xFA, 0x54, 0xF3, 0x00, 0xF4, 0x60, 0x43,
-        0xBD, 0xD1, 0x04, 0x65, 0x64, 0x47, 0xA5, 0xDA, 0x64, 0x41, 0xDD, 0x81, 0xE9, 0x81, 0x62, 0x44,
-        0x04, 0x03, 0xBD, 0xD1, 0xCD, 0x81, 0x58, 0xD8, 0xFC, 0x02, 0x58, 0x8B, 0x2D, 0x60, 0x28, 0x63,
-        0xA3, 0xD1, 0x2B, 0x44, 0xC8, 0x84, 0x64, 0x41, 0xFF, 0xB1, 0x61, 0x45, 0x03, 0xA1, 0xE9, 0x81,
-        0x41, 0x4C, 0xBD, 0xD1, 0xCD, 0x81, 0x58, 0xD8, 0xFC, 0x02, 0x2B, 0xD2, 0x2B, 0x43, 0x60, 0x47,
-        0x01, 0x7E, 0x54, 0xF1, 0xA3, 0xDA, 0xA4, 0xD3, 0xCB, 0x83, 0x44, 0x8B, 0xF8, 0x84, 0x2C, 0x41,
-        0x0C, 0x04, 0xBE, 0xD2, 0xFF, 0xFF, 0x60, 0x47, 0xBE, 0xDA, 0x00, 0x7E, 0xA3, 0xD2, 0x60, 0x45,
-        0x00, 0x7F, 0xB4, 0x84, 0xCD, 0x81, 0xBD, 0xDA, 0xF4, 0x02, 0x5E, 0xF5, 0x2B, 0x44, 0x04, 0xA4,
-        0x3F, 0xFA, 0x7F, 0xF3, 0x7E, 0xFB, 0x1F, 0x60, 0x84, 0x61, 0x01, 0x64, 0x54, 0xF1, 0xA1, 0xDB,
-        0x7F, 0xFB, 0xA4, 0xD3, 0x04, 0x65, 0x53, 0xF3, 0x01, 0x18, 0x0C, 0x65, 0xF3, 0xB4, 0xB4, 0x84,
-        0x53, 0xFB, 0x02, 0xB0, 0xFF, 0xFF, 0x16, 0x03, 0x7F, 0xF3, 0xFF, 0xFF, 0x60, 0x47, 0x0F, 0xB4,
-        0x7F, 0xFB, 0x01, 0x03, 0x0F, 0x00, 0xEE, 0x60, 0x4F, 0x78, 0xFF, 0xFF, 0x53, 0xF1, 0x7F, 0xF3,
-        0x64, 0x40, 0x02, 0x26, 0xF8, 0x01, 0xF3, 0xA0, 0x04, 0xA4, 0x01, 0x04, 0xF1, 0xA4, 0x10, 0x36,
-        0xF2, 0x01, 0x7F, 0xFB, 0x20, 0x40, 0x10, 0x2B, 0x12, 0x00, 0x7F, 0xF3, 0x1F, 0x60, 0x82, 0x61,
-        0xA1, 0xD1, 0xCC, 0x84, 0x01, 0x61, 0x08, 0x24, 0x03, 0x00, 0xE1, 0x81, 0xCC, 0x84, 0xFB, 0x01,
-        0xA1, 0x84, 0x53, 0xF1, 0xE4, 0x03, 0x1F, 0x60, 0x84, 0x61, 0xA1, 0xDB, 0x19, 0x00, 0x53, 0xF3,
-        0xFF, 0xFF, 0x10, 0xB0, 0x12, 0x60, 0x26, 0x63, 0x02, 0x03, 0x10, 0x60, 0x5C, 0x63, 0x31, 0x60,
-        0x2A, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0x0C, 0x1B, 0x7F, 0xF3, 0xFF, 0xFF, 0xE0, 0x85, 0x47, 0xD3,
-        0x53, 0xF1, 0x01, 0xB0, 0x06, 0xB0, 0xCB, 0x03, 0x64, 0x40, 0x03, 0x26, 0x01, 0x00, 0xC7, 0x03,
-        0x7F, 0xF3, 0x01, 0x61, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0xE1, 0x81, 0xFB, 0x01, 0xBA, 0xF3,
-        0x61, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0xBB, 0x03, 0x31, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60,
-        0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0B, 0x04, 0x0F, 0x60, 0xE6, 0x62, 0x40, 0x60,
-        0x00, 0x64, 0xA2, 0xDB, 0xED, 0x60, 0x70, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x7F, 0xF1, 0x24, 0x60, 0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x0F, 0x60, 0xE6, 0x62, 0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xED, 0x60, 0xA3, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x5E, 0xF5, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x28, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x64, 0x51, 0xFB, 0x0F, 0x60, 0xE6, 0x62,
-        0x00, 0x60, 0x01, 0x64, 0xA2, 0xDB, 0xED, 0x60, 0xCD, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE,
-        0x33, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x34, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x0F, 0x60, 0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xC6, 0xF1, 0x1A, 0x60, 0x52, 0x62, 0xA2, 0xD9,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x4E, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0xC7, 0xF1, 0x1A, 0x60, 0x5E, 0x62, 0xA2, 0xD9, 0x24, 0x60, 0xA8, 0x62, 0xA2, 0xD3,
-        0xFF, 0xFF, 0xFD, 0x1B, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x5A, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x0F, 0x60, 0xE6, 0x62, 0x00, 0x60, 0x08, 0x64, 0xA2, 0xDB,
-        0xED, 0x60, 0xFE, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x51, 0xF1, 0x0F, 0x60,
-        0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x64, 0x40, 0xFF, 0x26, 0x03, 0x00, 0xED, 0x60, 0x36, 0x78,
-        0xFF, 0xFF, 0x02, 0x0A, 0x00, 0x64, 0x51, 0xFB, 0xC8, 0xF1, 0x1A, 0x60, 0x5E, 0x62, 0xA2, 0xD9,
-        0x0F, 0x60, 0xE6, 0x62, 0x00, 0x60, 0x0C, 0x64, 0xA2, 0xDB, 0xEE, 0x60, 0x24, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x5A, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xE4, 0x62, 0xA2, 0xD1, 0x00, 0x60,
-        0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0C, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0x5A, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x14, 0x00,
-        0xFF, 0x60, 0xF7, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x51, 0xF3, 0xDB, 0x0A, 0x00, 0xA0, 0x00, 0x64,
-        0x02, 0x03, 0x51, 0xFB, 0xD6, 0x01, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x4E, 0x64, 0xA2, 0xDB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xED, 0x60, 0x36, 0x78, 0xFF, 0xFF, 0x35, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0x4E, 0x64, 0xA2, 0xDB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x53, 0xF3, 0xFF, 0xFF, 0xE3, 0xB4, 0x53, 0xFB, 0x1F, 0x60,
-        0x80, 0x64, 0xA0, 0xD3, 0xFF, 0xFF, 0xFE, 0xB4, 0xA2, 0xDB, 0x00, 0x64, 0x31, 0x60, 0x2A, 0x62,
-        0xA2, 0xDB, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0E, 0x04, 0x32, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x0F, 0x60, 0xE6, 0x62, 0x40, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xEE, 0x60,
-        0x69, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7E, 0xF1, 0x7F, 0xF9, 0x24, 0x60,
-        0x9A, 0x62, 0xA2, 0xD9, 0x1E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x0F, 0x60, 0xE6, 0x62,
-        0x20, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xEE, 0x60, 0x91, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xBE, 0xFE, 0x0F, 0x60, 0xD0, 0x62, 0xA2, 0xD1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x1A, 0x60, 0x06, 0x63, 0x1C, 0x61, 0x00, 0x64, 0xCD, 0x81, 0xBD, 0xDB,
-        0xFD, 0x02, 0x12, 0x60, 0x46, 0x61, 0x8A, 0xF3, 0x61, 0x43, 0xC6, 0xA5, 0x47, 0xD1, 0x0F, 0x04,
-        0xBE, 0xD5, 0x1A, 0x60, 0x02, 0x63, 0xC3, 0x83, 0xC3, 0x83, 0xC3, 0x83, 0x43, 0xD3, 0xBE, 0xD1,
-        0xDC, 0x84, 0xA3, 0xDB, 0x66, 0x44, 0xC0, 0x84, 0xBE, 0xDB, 0x65, 0x44, 0xED, 0x01, 0x1A, 0x60,
-        0x06, 0x63, 0x0E, 0x61, 0x41, 0x4B, 0xBD, 0xD3, 0xBD, 0xD1, 0x00, 0xBD, 0x64, 0x41, 0x19, 0x03,
-        0x01, 0xA8, 0x61, 0x44, 0x02, 0xA8, 0x15, 0x03, 0x02, 0x02, 0xE9, 0x84, 0x12, 0x00, 0x65, 0x47,
-        0x60, 0x45, 0x61, 0x44, 0x09, 0x61, 0xCD, 0x81, 0xE0, 0x84, 0xFF, 0x23, 0xFC, 0x01, 0x02, 0x24,
-        0xC4, 0x84, 0x02, 0x28, 0xD4, 0x84, 0xCD, 0x81, 0x01, 0x0E, 0x01, 0xBC, 0x02, 0x03, 0xE0, 0x84,
-        0xF6, 0x01, 0x00, 0x7F, 0x2B, 0x41, 0x4D, 0x8B, 0xBF, 0xDB, 0xDD, 0x02, 0x12, 0x60, 0x46, 0x61,
-        0x8A, 0xF3, 0x61, 0x43, 0xC6, 0xA5, 0x47, 0xD1, 0x0A, 0x04, 0xDA, 0x86, 0x1A, 0x60, 0x04, 0x63,
-        0xC3, 0x83, 0xC3, 0x83, 0xC3, 0x83, 0x43, 0xD1, 0xA6, 0xD9, 0x65, 0x44, 0xF2, 0x01, 0x36, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x53, 0xF3, 0x8A, 0xF1, 0xF3, 0xB4, 0x53, 0xFB, 0x12, 0x60, 0x46, 0x63,
-        0xC3, 0x85, 0x45, 0x4A, 0x19, 0x60, 0x86, 0x65, 0x89, 0xF3, 0x45, 0x4C, 0x40, 0x48, 0x20, 0x40,
-        0x20, 0x2A, 0x02, 0x00, 0x00, 0x65, 0x45, 0x4B, 0x2A, 0x45, 0xD7, 0x80, 0x02, 0x65, 0x23, 0x05,
-        0x47, 0xD1, 0x02, 0x65, 0x47, 0xD3, 0x0A, 0x65, 0xD0, 0x81, 0x47, 0xD3, 0x01, 0x05, 0x00, 0x61,
-        0xF2, 0xA3, 0x01, 0xB0, 0x61, 0x44, 0x11, 0x03, 0x20, 0x40, 0x20, 0x2A, 0x08, 0x00, 0xF3, 0x60,
-        0x58, 0x4E, 0x3E, 0x78, 0xFF, 0xFF, 0x2B, 0x44, 0x02, 0xA4, 0x40, 0x4B, 0x61, 0x44, 0x2C, 0x42,
-        0xA2, 0xDB, 0x5A, 0xDD, 0x5A, 0x8C, 0x3A, 0xA3, 0xDF, 0x01, 0x28, 0x42, 0x4A, 0xDD, 0x4A, 0xDB,
-        0x42, 0x48, 0x3A, 0xA3, 0xD9, 0x01, 0x28, 0x44, 0x88, 0xFB, 0x88, 0xF1, 0x19, 0x60, 0x86, 0x63,
-        0x44, 0x48, 0x28, 0x45, 0xD7, 0x80, 0xA3, 0xD1, 0x15, 0x05, 0x04, 0x65, 0x46, 0xD3, 0x28, 0x45,
-        0xD6, 0x80, 0xD0, 0x80, 0x02, 0x04, 0x04, 0xA3, 0xF5, 0x01, 0xF7, 0x06, 0x62, 0x46, 0xA2, 0xD9,
-        0xA3, 0xDB, 0x5B, 0xD3, 0x66, 0x42, 0x5A, 0xD1, 0xA2, 0xDB, 0xA3, 0xD9, 0xFE, 0xA3, 0xA3, 0xD1,
-        0x66, 0x42, 0xEB, 0x01, 0x88, 0xF3, 0x89, 0xF1, 0x60, 0x43, 0x44, 0x48, 0x28, 0x45, 0xD7, 0x80,
-        0xA3, 0xD1, 0x15, 0x05, 0x04, 0x65, 0x46, 0xD3, 0x28, 0x45, 0xD6, 0x80, 0xD0, 0x80, 0x02, 0x04,
-        0x04, 0xA3, 0xF5, 0x01, 0xF7, 0x06, 0x62, 0x46, 0xA2, 0xD9, 0xA3, 0xDB, 0x5B, 0xD3, 0x66, 0x42,
-        0x5A, 0xD1, 0xA2, 0xDB, 0xA3, 0xD9, 0xFE, 0xA3, 0xA3, 0xD1, 0x66, 0x42, 0xEB, 0x01, 0x0F, 0x60,
-        0xD0, 0x62, 0xA2, 0xD1, 0x10, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x20, 0x40,
-        0x80, 0x2B, 0x17, 0x00, 0x00, 0x60, 0x04, 0x61, 0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF,
-        0x01, 0x64, 0x23, 0xFA, 0xF1, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x64, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xFA, 0xFE, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0x3E, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x3F, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x24, 0x60, 0xAA, 0x62,
-        0x1A, 0x60, 0x4E, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64,
-        0x53, 0xFB, 0x0F, 0x60, 0xE4, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0xBE, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x0F, 0x60, 0xE4, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0F, 0x60, 0xE4, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x08, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x79, 0xFB, 0xAC, 0x85, 0x60, 0x41,
-        0x20, 0x03, 0x01, 0x60, 0x00, 0x63, 0x08, 0x64, 0xE9, 0x81, 0xCC, 0x84, 0x02, 0x24, 0xDF, 0x83,
-        0xFB, 0x02, 0x2D, 0x60, 0x28, 0x64, 0xA0, 0xDD, 0x65, 0x41, 0x2D, 0x60, 0x2A, 0x63, 0x0F, 0x60,
-        0xC0, 0x64, 0xE9, 0x81, 0x58, 0xD1, 0xFD, 0x04, 0xA3, 0xD9, 0x0B, 0x03, 0x58, 0xD1, 0xE9, 0x81,
-        0x60, 0x45, 0xFC, 0x04, 0xA3, 0xD1, 0x64, 0x47, 0xB0, 0x84, 0xBD, 0xDB, 0x00, 0xB9, 0x65, 0x44,
-        0xF0, 0x02, 0x2E, 0x58, 0xFF, 0xFF, 0x3C, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x20, 0x40, 0x90, 0x2B,
-        0x03, 0x00, 0xF2, 0x60, 0xE5, 0x78, 0xFF, 0xFF, 0x53, 0xF3, 0x8A, 0xF1, 0x04, 0xB0, 0x07, 0x60,
-        0x40, 0x64, 0xD0, 0x80, 0x21, 0x03, 0x20, 0x06, 0x26, 0x46, 0x8A, 0xF1, 0x12, 0x60, 0x46, 0x63,
-        0xC3, 0x83, 0x7F, 0xF3, 0x26, 0xF0, 0xBD, 0xDB, 0x64, 0x44, 0x00, 0x7F, 0xBD, 0xDB, 0x64, 0x47,
-        0x00, 0x7F, 0xBD, 0xDB, 0x32, 0xF0, 0xBD, 0xD9, 0x33, 0xF0, 0xBD, 0xD9, 0x34, 0xF0, 0xBD, 0xD9,
-        0x00, 0xF4, 0x0D, 0xF0, 0xBD, 0xD9, 0x0E, 0xF0, 0xBD, 0xD9, 0x00, 0x64, 0x0F, 0xF0, 0xA3, 0xDB,
-        0x64, 0x47, 0x60, 0x45, 0x00, 0x37, 0x03, 0x00, 0xF2, 0x60, 0xDF, 0x78, 0xFF, 0xFF, 0xBD, 0xDB,
-        0xE0, 0xA0, 0x1F, 0x61, 0x00, 0xB8, 0xF8, 0x07, 0xF7, 0x03, 0x60, 0xFE, 0xDD, 0x81, 0xA1, 0xD0,
-        0xCC, 0x84, 0xBD, 0xD9, 0xFB, 0x02, 0x65, 0x40, 0x01, 0x26, 0xDF, 0x83, 0x20, 0xFE, 0x2D, 0x60,
-        0xE4, 0x62, 0xA2, 0xDD, 0x60, 0xFE, 0xDD, 0x81, 0xA1, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x3A,
-        0x04, 0x00, 0xDD, 0x81, 0xA1, 0xD0, 0xFF, 0xFF, 0xC1, 0x81, 0xDD, 0x81, 0xA1, 0xD0, 0xFF, 0xFF,
-        0x64, 0x40, 0x03, 0x36, 0x03, 0x00, 0xF2, 0x60, 0xDF, 0x78, 0xFF, 0xFF, 0xD9, 0x81, 0xA1, 0xD0,
-        0x7F, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0x20, 0xFE, 0x08, 0x24, 0x03, 0x00, 0xF2, 0x60, 0xDF, 0x78,
-        0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF4, 0xA3, 0x00, 0x60, 0x1D, 0x61,
-        0x00, 0x60, 0x80, 0x65, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1, 0x02, 0x06, 0x00, 0xF4, 0x03, 0x61,
-        0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0xD4, 0x80, 0x2D, 0x03, 0x17, 0x03, 0xCF, 0x83, 0x61, 0x44,
-        0x80, 0xA0, 0x28, 0x03, 0x02, 0x02, 0x00, 0xF4, 0x03, 0x61, 0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83,
-        0x81, 0xA1, 0x20, 0x03, 0x05, 0x07, 0x7F, 0xA1, 0xCC, 0x84, 0xDD, 0x81, 0xE4, 0x03, 0xF7, 0x01,
-        0x00, 0xF4, 0x00, 0xB8, 0x04, 0x61, 0xE4, 0x03, 0xF2, 0x01, 0x01, 0x60, 0xFF, 0x63, 0x46, 0x48,
-        0x41, 0x4A, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9, 0x64, 0x44, 0xDD, 0x81, 0xA1, 0xD0,
-        0xDF, 0x83, 0xA3, 0xD9, 0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03, 0x7F, 0xA1, 0xF7, 0x04, 0x00, 0xF4,
-        0x03, 0x61, 0xF4, 0x01, 0x20, 0xFE, 0x00, 0xBB, 0x02, 0x60, 0x00, 0x61, 0x45, 0x03, 0x60, 0xFE,
-        0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x3A, 0x3E, 0x00, 0xDD, 0x81, 0xA1, 0xD1,
-        0xFF, 0xFF, 0x64, 0x40, 0x60, 0x3A, 0x38, 0x00, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40,
-        0x1D, 0x3A, 0x32, 0x00, 0xDD, 0x81, 0xA1, 0xD3, 0xFF, 0xFF, 0x20, 0xFE, 0xFF, 0xB4, 0x1C, 0x60,
-        0x96, 0x65, 0xA5, 0xD3, 0x60, 0x5C, 0x02, 0xA4, 0xA5, 0xDB, 0xFE, 0xA5, 0x1A, 0x60, 0xC6, 0x64,
-        0x44, 0xD9, 0x00, 0x7C, 0x60, 0xFE, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x1B, 0x60,
-        0x06, 0x64, 0xC4, 0x82, 0x64, 0x44, 0xFF, 0xB4, 0xA2, 0xDB, 0x12, 0x60, 0x48, 0x65, 0x8A, 0xF3,
-        0xFF, 0xFF, 0xC4, 0x82, 0x64, 0x44, 0xA2, 0xD3, 0xFF, 0xB5, 0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x05,
-        0x65, 0x44, 0xA2, 0xDB, 0x09, 0x00, 0x20, 0xFE, 0x28, 0x46, 0x2A, 0x41, 0xFF, 0xB1, 0x60, 0xFE,
-        0x82, 0x64, 0xA1, 0xDA, 0xFF, 0xFF, 0x20, 0xFE, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43,
-        0xF4, 0xA3, 0x00, 0x60, 0x1D, 0x61, 0x00, 0x60, 0xDD, 0x65, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1,
-        0x02, 0x06, 0x00, 0xF4, 0x03, 0x61, 0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0xD4, 0x80, 0x2D, 0x03,
-        0x17, 0x03, 0xCF, 0x83, 0x61, 0x44, 0x80, 0xA0, 0x28, 0x03, 0x02, 0x02, 0x00, 0xF4, 0x03, 0x61,
-        0xDD, 0x81, 0xA1, 0xD2, 0xCF, 0x83, 0x81, 0xA1, 0x20, 0x03, 0x05, 0x07, 0x7F, 0xA1, 0xCC, 0x84,
-        0xDD, 0x81, 0xE4, 0x03, 0xF7, 0x01, 0x00, 0xF4, 0x00, 0xB8, 0x04, 0x61, 0xE4, 0x03, 0xF2, 0x01,
-        0x02, 0x60, 0x00, 0x63, 0x46, 0x48, 0x41, 0x4A, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9,
-        0x64, 0x44, 0xDD, 0x81, 0xA1, 0xD0, 0xDF, 0x83, 0xA3, 0xD9, 0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03,
-        0x7F, 0xA1, 0xF7, 0x04, 0x00, 0xF4, 0x03, 0x61, 0xF4, 0x01, 0x20, 0xFE, 0x00, 0xBB, 0x02, 0x60,
-        0x00, 0x61, 0x08, 0x24, 0xA6, 0x00, 0x2D, 0x60, 0xD6, 0x62, 0xA2, 0xDF, 0x2D, 0x60, 0xD8, 0x62,
-        0xA2, 0xDF, 0x2D, 0x60, 0xDA, 0x62, 0xA2, 0xDF, 0x2D, 0x60, 0xDC, 0x62, 0xA2, 0xDF, 0x60, 0xFE,
-        0xDD, 0x64, 0xA1, 0xDB, 0xDD, 0x81, 0xA1, 0xD3, 0xFF, 0xFF, 0xFA, 0xA4, 0xFF, 0xFF, 0x04, 0x34,
-        0x9A, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x3A, 0x94, 0x01, 0xDD, 0x81,
-        0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x50, 0x3A, 0x8E, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF,
-        0x64, 0x40, 0xF2, 0x3A, 0x88, 0x01, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x3A,
-        0xDC, 0x00, 0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x3A, 0xD6, 0x00, 0xDD, 0x81,
-        0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x3A, 0xD0, 0x00, 0x60, 0x5C, 0x00, 0x36, 0x39, 0x00,
-        0x00, 0x64, 0xF2, 0x60, 0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x08, 0x26, 0xF7, 0x01,
-        0x2D, 0x60, 0xD6, 0x62, 0xA2, 0xDB, 0x64, 0x40, 0x00, 0x36, 0x31, 0x00, 0xDD, 0x81, 0xA1, 0xD3,
-        0xDD, 0x81, 0xF2, 0x60, 0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x08, 0x26, 0xF5, 0x01,
-        0x2D, 0x60, 0xD8, 0x62, 0xA2, 0xDB, 0x64, 0x40, 0x00, 0x36, 0x27, 0x00, 0xDD, 0x81, 0xA1, 0xD3,
-        0xDD, 0x81, 0xF2, 0x60, 0x58, 0x4E, 0x57, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x08, 0x26, 0xF5, 0x01,
-        0x2D, 0x60, 0xDA, 0x62, 0xA2, 0xDB, 0x64, 0x40, 0x00, 0x36, 0x1D, 0x00, 0xDD, 0x81, 0xA1, 0xD1,
-        0x2D, 0x60, 0xDC, 0x62, 0xA2, 0xD9, 0xDD, 0x81, 0xA1, 0xD1, 0x2D, 0x60, 0xDD, 0x62, 0xA2, 0xD9,
-        0x18, 0x00, 0x20, 0xFE, 0x2D, 0x60, 0xD6, 0x62, 0x00, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0x20, 0xFE,
-        0x2D, 0x60, 0xD8, 0x62, 0x00, 0x60, 0x04, 0x64, 0xA2, 0xDB, 0x20, 0xFE, 0x2D, 0x60, 0xDA, 0x62,
-        0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0x20, 0xFE, 0x2D, 0x60, 0xDC, 0x62, 0x00, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0x20, 0xFE, 0x02, 0x60, 0x00, 0x65, 0x2D, 0x60, 0x9E, 0x63, 0xD5, 0x84, 0xDC, 0x84,
-        0xBD, 0xDB, 0x60, 0x41, 0x66, 0x44, 0x63, 0x46, 0xCD, 0x83, 0xC7, 0x81, 0x60, 0x45, 0x60, 0xFE,
-        0x5D, 0x93, 0xA3, 0xD3, 0x5D, 0x93, 0xA6, 0xDB, 0xDE, 0x86, 0xFA, 0x1F, 0x66, 0x43, 0x65, 0x46,
-        0x20, 0xFE, 0x20, 0xFE, 0x2D, 0x60, 0xE4, 0x62, 0xA2, 0xD1, 0xFF, 0xFF, 0x64, 0x43, 0x00, 0x64,
-        0x2D, 0x60, 0xCE, 0x61, 0xA1, 0xDB, 0x2D, 0x60, 0xC2, 0x62, 0xA2, 0xD1, 0x2D, 0x60, 0xD6, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0xA0, 0x84, 0xFF, 0xFF, 0x10, 0x26, 0x07, 0x00, 0x04, 0x26, 0x07, 0x00,
-        0x20, 0x26, 0x07, 0x00, 0x02, 0x26, 0x07, 0x00, 0x48, 0x00, 0x10, 0x7C, 0x05, 0x00, 0x04, 0x7C,
-        0x03, 0x00, 0x20, 0x7C, 0x01, 0x00, 0x02, 0x7C, 0x2D, 0x60, 0xCE, 0x61, 0xA1, 0xD9, 0x50, 0x94,
-        0x2D, 0x60, 0xD0, 0x61, 0xA1, 0xDB, 0x2D, 0x60, 0xC4, 0x61, 0xA1, 0xD1, 0x2D, 0x60, 0xD8, 0x61,
-        0xA1, 0xD3, 0x2D, 0x60, 0xCE, 0x61, 0xA0, 0x84, 0xA1, 0xD1, 0xFF, 0xFF, 0x10, 0x26, 0x05, 0x00,
-        0x04, 0x26, 0x05, 0x00, 0x01, 0x26, 0x08, 0x00, 0x28, 0x00, 0x10, 0x7C, 0x06, 0x00, 0x64, 0x40,
-        0x10, 0x26, 0x23, 0x00, 0x04, 0x7C, 0x01, 0x00, 0x01, 0x7C, 0x2D, 0x60, 0xD0, 0x61, 0xA1, 0xD9,
-        0x50, 0x94, 0x2D, 0x60, 0xD2, 0x61, 0xA1, 0xDB, 0x2D, 0x60, 0xC6, 0x61, 0xA1, 0xD1, 0x2D, 0x60,
-        0xDA, 0x61, 0xA1, 0xD3, 0xFF, 0xFF, 0xA0, 0x84, 0x60, 0x40, 0x02, 0x26, 0x05, 0x00, 0x04, 0x26,
-        0x05, 0x00, 0x01, 0x26, 0x05, 0x00, 0x09, 0x00, 0x02, 0x7C, 0x03, 0x00, 0x04, 0x7C, 0x01, 0x00,
-        0x20, 0x7C, 0x2D, 0x60, 0xD2, 0x61, 0xA1, 0xD9, 0x0D, 0x00, 0x50, 0x94, 0x2D, 0x60, 0xCE, 0x62,
-        0xA2, 0xDB, 0x2D, 0x60, 0xD0, 0x62, 0xA2, 0xDB, 0x2D, 0x60, 0xD2, 0x62, 0xA2, 0xDB, 0x2D, 0x60,
-        0xD4, 0x62, 0xA2, 0xDB, 0x7C, 0x44, 0x2D, 0x60, 0xCE, 0x61, 0xA1, 0xD1, 0xBD, 0xD9, 0x2D, 0x60,
-        0xD0, 0x61, 0xA1, 0xD1, 0xB0, 0x84, 0xBD, 0xD9, 0x2D, 0x60, 0xD2, 0x61, 0xA1, 0xD1, 0xB0, 0x84,
-        0xBD, 0xD9, 0x2D, 0x60, 0xC8, 0x61, 0xA1, 0xD1, 0xB0, 0x84, 0xBD, 0xD9, 0x08, 0x28, 0x68, 0x00,
-        0x28, 0x60, 0x2C, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xFF, 0xA0, 0xFF, 0xFF, 0x0C, 0x24, 0x60, 0x00,
-        0x60, 0x40, 0x0B, 0x36, 0x5D, 0x00, 0x20, 0x40, 0x10, 0x27, 0x5A, 0x00, 0x88, 0x00, 0x20, 0xFE,
-        0x00, 0x65, 0x60, 0xFE, 0x2D, 0x60, 0xDE, 0x62, 0xA2, 0xDB, 0xE0, 0x84, 0xE0, 0x84, 0x08, 0x20,
-        0x03, 0x00, 0x01, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x02, 0xA5, 0x64, 0x44, 0xD4, 0x9C, 0xD4, 0x80,
-        0x2D, 0x60, 0xE0, 0x62, 0x02, 0x05, 0x08, 0x65, 0x41, 0x00, 0xA2, 0xD9, 0x7C, 0x44, 0x2D, 0x60,
-        0xE2, 0x62, 0xA2, 0xDB, 0xDD, 0x81, 0xA1, 0xD1, 0x00, 0x65, 0x64, 0x40, 0x00, 0x3A, 0x01, 0x65,
-        0xDD, 0x81, 0xA1, 0xD1, 0xFF, 0xFF, 0x64, 0x40, 0x50, 0x3A, 0x01, 0x65, 0xDD, 0x81, 0xA1, 0xD1,
-        0xFF, 0xFF, 0x64, 0x40, 0xF2, 0x3A, 0x01, 0x65, 0xDD, 0x81, 0xA1, 0xD1, 0x65, 0x40, 0x00, 0x3A,
-        0x18, 0x00, 0x00, 0x60, 0x00, 0x65, 0x64, 0x40, 0x00, 0x36, 0x01, 0x65, 0x64, 0x40, 0x01, 0x36,
-        0x02, 0x65, 0x64, 0x40, 0x02, 0x36, 0x04, 0x65, 0x64, 0x40, 0x04, 0x36, 0x10, 0x65, 0x64, 0x40,
-        0x05, 0x36, 0x20, 0x65, 0x65, 0x5C, 0x2D, 0x60, 0xE2, 0x62, 0xA2, 0xD3, 0xFF, 0xFF, 0xB0, 0x84,
-        0xA2, 0xDB, 0x2D, 0x60, 0xDE, 0x62, 0xA2, 0xD3, 0x00, 0x65, 0xFF, 0xA4, 0xA2, 0xDB, 0xCA, 0x02,
-        0x2D, 0x60, 0xE2, 0x62, 0xA2, 0xD3, 0x2D, 0x60, 0xE0, 0x62, 0xA2, 0xD1, 0x2E, 0x58, 0xFF, 0xFF,
-        0x20, 0xFE, 0x8A, 0xF3, 0xFF, 0xFF, 0x3A, 0xA4, 0x8A, 0xFB, 0x3D, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x89, 0xF3, 0x7F, 0xF1, 0x04, 0xA4, 0x89, 0xFB, 0x12, 0x60, 0x22, 0x63, 0x53, 0xF3, 0x64, 0x41,
-        0x08, 0xB0, 0xE1, 0x85, 0x1C, 0x03, 0xFE, 0xA1, 0x47, 0xD3, 0x02, 0x06, 0xFB, 0xB4, 0xA3, 0xDB,
-        0xDD, 0x81, 0x5B, 0xD3, 0x0C, 0x24, 0x02, 0x00, 0xFB, 0xB4, 0xA3, 0xDB, 0x5B, 0xD3, 0xDD, 0x81,
-        0x02, 0xBC, 0xA3, 0xDB, 0x0E, 0x65, 0xDD, 0x81, 0xD5, 0x80, 0x5B, 0xD3, 0x08, 0x05, 0xFB, 0xB4,
-        0xA3, 0xDB, 0xDD, 0x81, 0xD5, 0x80, 0x5B, 0xD3, 0x02, 0x03, 0xFB, 0xB4, 0xA3, 0xDB, 0xFF, 0xFF,
-        0x20, 0xFE, 0x26, 0x46, 0x31, 0x40, 0x20, 0x2A, 0x18, 0x00, 0x3F, 0xF2, 0x47, 0x65, 0xC4, 0x84,
-        0xE8, 0x84, 0x23, 0xFA, 0xF1, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60,
-        0x64, 0x64, 0xA2, 0xDB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xFA, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0x16, 0x63, 0x1C, 0x60, 0x8C, 0x62, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x5B, 0xFB, 0x5C, 0xFB,
-        0x1C, 0x60, 0x92, 0x63, 0x02, 0x64, 0xA3, 0xDB, 0x1A, 0x60, 0xC6, 0x62, 0x3E, 0x63, 0x00, 0x64,
-        0x5A, 0xDB, 0xFE, 0x1F, 0x2E, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x98, 0x62, 0xA2, 0xD3, 0x00, 0x63,
-        0xF8, 0xA0, 0x01, 0xA4, 0x03, 0x03, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0xA2, 0xDD, 0x1C, 0x60,
-        0x9A, 0x62, 0xA2, 0xD1, 0xA2, 0xDD, 0x5A, 0xD3, 0xA2, 0xDD, 0xC0, 0x81, 0x61, 0x44, 0x02, 0x24,
-        0xFF, 0xFF, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0x5A, 0xD3, 0xE9, 0x81, 0xE8, 0x83,
-        0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x85, 0xD4, 0x85, 0xC5, 0x83, 0xA2, 0xDD, 0x1C, 0x60,
-        0x8E, 0x62, 0x63, 0x47, 0x00, 0x7F, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0xA0, 0x65,
-        0xA5, 0xDD, 0x1B, 0x60, 0x46, 0x65, 0x61, 0x44, 0x2B, 0x41, 0x45, 0xDB, 0x60, 0x41, 0x1B, 0x60,
-        0x86, 0x65, 0x0A, 0xA3, 0xA3, 0xD1, 0x2B, 0x44, 0x44, 0xD9, 0x1C, 0x60, 0xA0, 0x65, 0xA5, 0xD3,
-        0xFF, 0xFF, 0x60, 0x43, 0x00, 0xB9, 0xFF, 0xFF, 0x4C, 0x03, 0x06, 0xA3, 0xBD, 0xD1, 0x81, 0xF3,
-        0x82, 0xF1, 0xD0, 0x80, 0xBD, 0xD3, 0x22, 0x02, 0x83, 0xF3, 0xD0, 0x80, 0xA3, 0xD1, 0x1E, 0x02,
-        0xD0, 0x80, 0xFF, 0xFF, 0x1B, 0x02, 0x8A, 0xF3, 0x12, 0x60, 0x46, 0x63, 0xC6, 0xA5, 0x47, 0xD1,
-        0x7F, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x08, 0x28, 0xFF, 0x61, 0x61, 0x43, 0x1A, 0x60,
-        0xC6, 0x65, 0x2B, 0x44, 0x44, 0xD1, 0x1C, 0x60, 0x8E, 0x65, 0xA5, 0xD1, 0x64, 0x44, 0xD0, 0x81,
-        0x1C, 0x60, 0x92, 0x65, 0x01, 0x05, 0x00, 0x61, 0xA5, 0xD3, 0x15, 0x00, 0x1A, 0x60, 0xC6, 0x65,
-        0x2B, 0x44, 0x44, 0xD1, 0x1C, 0x60, 0x8E, 0x65, 0x64, 0x43, 0xA5, 0xD1, 0x64, 0x65, 0x63, 0x44,
-        0xC0, 0x84, 0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x06, 0x00, 0x61, 0x13, 0x00, 0x61, 0x43, 0xD0, 0x81,
-        0x1C, 0x60, 0x92, 0x65, 0xA5, 0xD3, 0xE9, 0x81, 0xE9, 0x81, 0xCC, 0x84, 0xCC, 0x84, 0x02, 0x03,
-        0x02, 0x03, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x85, 0xD7, 0x84, 0x60, 0x41, 0x01, 0x05,
-        0x00, 0x61, 0x1C, 0x60, 0xA0, 0x65, 0xA5, 0xD3, 0xFF, 0xFF, 0x60, 0x43, 0x2E, 0x58, 0xFF, 0xFF,
-        0x1C, 0x60, 0x94, 0x65, 0xA5, 0xD1, 0x5B, 0xF3, 0x64, 0x41, 0xCD, 0x81, 0xCD, 0x81, 0x02, 0x03,
-        0x02, 0x03, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x85, 0x29, 0x44, 0x54, 0x89, 0x2E, 0x58,
-        0xFF, 0xFF, 0xED, 0xF3, 0x1A, 0x60, 0xBE, 0x63, 0x0F, 0xB4, 0x01, 0xA4, 0xE0, 0x87, 0xE0, 0x84,
-        0xE0, 0x84, 0xBD, 0xDB, 0x10, 0x60, 0x58, 0x64, 0xBD, 0xDB, 0x02, 0x64, 0xBD, 0xDB, 0x06, 0x64,
-        0xA3, 0xDB, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0xBA, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x2E, 0x58, 0xFF, 0xFF, 0x1A, 0x60, 0xBE, 0x63, 0xEA, 0x60, 0x60, 0x64,
-        0xBD, 0xDB, 0x10, 0x60, 0x58, 0x64, 0xBD, 0xDB, 0x02, 0x64, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB,
-        0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60, 0xBA, 0x64, 0xA2, 0xDB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x2E, 0x58, 0xFF, 0xFF, 0x16, 0x63, 0x1C, 0x60, 0x8C, 0x62, 0x00, 0x64, 0x5A, 0xDB,
-        0xFE, 0x1F, 0x5B, 0xFB, 0x5C, 0xFB, 0x1C, 0x60, 0x92, 0x63, 0x02, 0x64, 0xA3, 0xDB, 0x1A, 0x60,
-        0xC6, 0x62, 0x3E, 0x63, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x10, 0x60, 0x56, 0x62, 0xF5, 0x60,
-        0x29, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x2C, 0x62, 0xF5, 0x60, 0x15, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x02, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x04, 0x62, 0x00, 0x60, 0x04, 0x64, 0xA2, 0xDB,
-        0xF4, 0x60, 0x16, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x20, 0x44, 0x40, 0x26,
-        0x03, 0x00, 0xF4, 0x60, 0xEA, 0x78, 0xFF, 0xFF, 0x20, 0x40, 0x52, 0x23, 0x07, 0x00, 0x5A, 0xF3,
-        0xFF, 0xFF, 0x01, 0xA4, 0x5A, 0xFB, 0xF4, 0x60, 0xD7, 0x78, 0xFF, 0xFF, 0x40, 0x60, 0x00, 0x65,
-        0x20, 0x44, 0x34, 0x80, 0x1C, 0x60, 0x92, 0x65, 0x02, 0x64, 0xA5, 0xDB, 0x1A, 0x60, 0xC4, 0x62,
-        0x7E, 0x63, 0x00, 0x64, 0x5A, 0xDB, 0xFE, 0x1F, 0x1C, 0x60, 0x96, 0x62, 0xA2, 0xDD, 0x8C, 0xF3,
-        0x58, 0xFB, 0x02, 0x64, 0x8C, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x8C, 0xF3, 0xFF, 0xFF, 0x00, 0xA8,
-        0xFF, 0xFF, 0x0B, 0x03, 0x10, 0x60, 0x04, 0x62, 0x80, 0x60, 0x00, 0x64, 0xA2, 0xDB, 0xF4, 0x60,
-        0x3D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x04, 0x64, 0x53, 0xFB, 0x29, 0x60,
-        0xA4, 0x64, 0x54, 0xFB, 0x0F, 0x4E, 0xEC, 0x60, 0x58, 0x4F, 0xB9, 0x78, 0xFF, 0xFF, 0x0E, 0x4F,
-        0x10, 0x60, 0x02, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x04, 0x62, 0x10, 0x60, 0x00, 0x64,
-        0xA2, 0xDB, 0xF4, 0x60, 0x67, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x58, 0xF3,
-        0x8C, 0xFB, 0xCA, 0xFE, 0xC1, 0xFE, 0x1C, 0x60, 0xA2, 0x62, 0x66, 0x44, 0xA2, 0xDB, 0x5A, 0xDD,
-        0x61, 0x44, 0x5A, 0xDB, 0x67, 0xF5, 0xCC, 0xF1, 0x19, 0xF8, 0xF8, 0x60, 0x80, 0x64, 0x0E, 0xFA,
-        0xA9, 0xF1, 0x07, 0xF8, 0x01, 0x60, 0x60, 0x67, 0x2C, 0xFA, 0x1D, 0x64, 0x2D, 0xFA, 0x01, 0x64,
-        0x2E, 0xFA, 0xEB, 0xF1, 0x2F, 0xF8, 0xEC, 0xF1, 0x30, 0xF8, 0xED, 0xF1, 0x31, 0xF8, 0x81, 0xF1,
-        0x32, 0xF8, 0x82, 0xF1, 0x33, 0xF8, 0x83, 0xF1, 0x34, 0xF8, 0x08, 0x64, 0x2A, 0xFA, 0x40, 0x63,
-        0x3F, 0xFC, 0x00, 0xF4, 0x02, 0x62, 0xCB, 0x83, 0x00, 0x64, 0x5A, 0xDA, 0xFE, 0x1F, 0x1C, 0x60,
-        0x8E, 0x65, 0xA5, 0xD3, 0x02, 0xFA, 0x19, 0x60, 0x88, 0x64, 0xA0, 0xD1, 0x0A, 0x61, 0x41, 0xD3,
-        0x03, 0xFA, 0x06, 0x61, 0x06, 0x63, 0x00, 0x65, 0x1B, 0x60, 0x86, 0x64, 0x44, 0xD1, 0x59, 0xD8,
-        0x1B, 0x60, 0x46, 0x64, 0x44, 0xD1, 0x59, 0xD8, 0x1A, 0x60, 0xC6, 0x64, 0x44, 0xD1, 0x59, 0xD8,
-        0x1B, 0x60, 0x06, 0x64, 0x44, 0xD1, 0x59, 0xD8, 0x65, 0x44, 0x02, 0xA4, 0x60, 0x45, 0xEC, 0x1F,
-        0x67, 0xF5, 0x24, 0x60, 0x74, 0x62, 0x24, 0x60, 0x22, 0x64, 0xA2, 0xDB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x1C, 0x60, 0xA2, 0x62, 0xA2, 0xD5, 0x5A, 0xD3,
-        0x5A, 0xD3, 0x60, 0x43, 0x60, 0x41, 0x0F, 0x60, 0xEA, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x20, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xBF, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0xF3, 0x60,
-        0x58, 0x4E, 0xD4, 0x78, 0xFF, 0xFF, 0x10, 0x60, 0x02, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x04, 0x62, 0x10, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0xF4, 0x60, 0x16, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0xA4, 0x63, 0x66, 0x44, 0xA3, 0xDB, 0x00, 0x60, 0x40, 0x61,
-        0xAE, 0x60, 0x58, 0x4D, 0xC4, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x67, 0xFB, 0x04, 0x64, 0x03, 0xFA,
-        0x1C, 0x60, 0xA4, 0x63, 0xA3, 0xD1, 0x00, 0x64, 0x64, 0x46, 0xA3, 0xDB, 0x00, 0x60, 0x40, 0x65,
-        0x20, 0x44, 0x34, 0x80, 0xF3, 0x60, 0x58, 0x4E, 0xB9, 0x78, 0xFF, 0xFF, 0x10, 0x60, 0x02, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x04, 0x62, 0x00, 0x60, 0x02, 0x64, 0xA2, 0xDB, 0xF4, 0x60,
-        0x16, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x60, 0xAA, 0x62, 0x1A, 0x60,
-        0xBA, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x10, 0x60, 0x02, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x5A, 0xDB, 0xFF, 0x60, 0x9F, 0x65, 0x20, 0x44, 0x24, 0x80, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x02, 0x62, 0xA2, 0xD1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-
-};  /* fw_image_4_data */
-
-static const CFG_IDENTITY_STRCT fw_image_infoidentity[] = {
-       {
-               sizeof(CFG_IDENTITY_STRCT) / sizeof(hcf_16) - 1,
-               CFG_FW_IDENTITY,
-               COMP_ID_FW_STA,
-               3,                      /* Variant */
-               2,                      /* Major */
-               36                      /* Minor */
-       },
-       { 0000, 0000, 0000, 0000, 0000, 0000 }  /* endsentinel */
-};
-
-static const CFG_PROG_STRCT fw_image_code[] = {
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode */
-               0x0186,                 /* sizeof(fw_image_1_data), */
-               0x00000060,             /* Target address in NIC Memory */
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_1_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode */
-               0x2518,                 /* sizeof(fw_image_2_data), */
-               0x00000C16,             /* Target address in NIC Memory */
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_2_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode */
-               0x3daa,                 /* sizeof(fw_image_3_data), */
-               0x001E312E,             /* Target address in NIC Memory */
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_3_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,      /* mode */
-               0xaa66,                 /* sizeof(fw_image_4_data), */
-               0x001F4000,             /* Target address in NIC Memory */
-               0x0000,                 /* CRC: yes/no  TYPE: primary/station/tertiary */
-               (hcf_8 *)fw_image_4_data
-       },
-       {
-               5,
-               CFG_PROG,
-               CFG_PROG_STOP,          /* mode */
-               0000,
-       0x000F368E,     /* Start execution address */
-       },
-       { 0000, 0000, 0000, 0000, 00000000, 0000, NULL}
-};
-
-static const CFG_RANGE20_STRCT fw_image_infocompat[] = {
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_FW_SUP_RANGE,
-               COMP_ROLE_SUPL,
-               COMP_ID_STA,
-               {
-                       { 2, 2, 5 }     /* variant, bottom, top */
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_MFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_MFI,
-               {
-                       { 4, 6, 7 },    /* variant, bottom, top */
-                       { 5, 6, 7 },    /* variant, bottom, top */
-                       { 6, 6, 7 }     /* variant, bottom, top */
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_CFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_CFI,
-               {
-                       { 2, 1, 2 }     /* variant, bottom, top */
-               }
-       },
-       { 0000, 0000, 0000, 0000, { { 0000, 0000, 0000 } } }    /* endsentinel */
-};
-
-memimage fw_image = {
-       "FUPU7D37dhfwci\001C",                  /* signature, <format number>, C/Bin type */
-       (CFG_PROG_STRCT *) fw_image_code,
-       0x000F368E,
-       NULL,                                   /* (dummy) pdaplug */
-       NULL,                                   /* (dummy) priplug */
-       (CFG_RANGE20_STRCT *) fw_image_infocompat,
-       (CFG_IDENTITY_STRCT *) fw_image_infoidentity,
-};
-
diff --git a/drivers/staging/wlags49_h2/sta_h25.c b/drivers/staging/wlags49_h2/sta_h25.c
deleted file mode 100644 (file)
index eccd780..0000000
+++ /dev/null
@@ -1,5255 +0,0 @@
-/*
- * File:       sta_h54.136
- *
- * Abstract:   This file contains memory image 'fw_image'.
- *
- * Contents:   Total size of the memory image: 81742 bytes.
- *             Total number of blocks: 4 blocks.
- *             Block  1 : load address 00000060, 388 bytes.
- *             Block  2 : load address 00000C16, 11278 bytes.
- *             Block  3 : load address 001E3824, 21726 bytes.
- *             Block  4 : load address 001F4000, 48350 bytes.
- *
- * Identity:   component id: 31 (variant 4) version 1.36
- *
- * Compatibility:
- *             supplying interface 4 (variant 4) : 1 - 2
- *             acting on interface 1 (variant 7) : 3 - 3
- *             acting on interface 1 (variant 8) : 1 - 1
- *             acting on interface 2 (variant 4) : 1 - 2
- *
- * Generated:  by g:\fw\fupu3.exe version 4.26
- *
- * Commandline:        g:\fw\fupu3.exe /f=4 /n=fw_image /i=r4013600.hex
- */
-
-
-#include "hcfcfg.h"                            // to get hcf_16 etc defined as well as
-                                // possible settings which influence mdd.h or dhf.h
-#include "mdd.h"                               //to get COMP_ID_STA etc defined
-#include "dhf.h"                               //used to be "fhfmem.h", to get memblock,plugrecord,
-
-static const hcf_8 fw_image_1_data[] = {
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDA, 0x0C, 0x00, 0x00,
-        0x00, 0x0D, 0x00, 0x00, 0x00, 0x0D, 0x65, 0x37, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1B, 0x00, 0x1B, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x1B, 0xB2, 0x1B,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00,
-        0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x05, 0x00, 0x02, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xEA, 0x00, 0x00, 0xFF, 0x07,
-        0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x10, 0x27, 0x10, 0x27, 0x14, 0x00, 0xD0, 0x07, 0xD0, 0x07,
-        0x10, 0x27, 0x2F, 0x00, 0x32, 0x00, 0x32, 0x00, 0x05, 0x00, 0x02, 0x00, 0x02, 0x00, 0x10, 0x27,
-        0x05, 0x00, 0x00, 0x02, 0x00, 0x02, 0x13, 0x00, 0x07, 0x00, 0x03, 0x00, 0x32, 0x00, 0x02, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2A, 0x09, 0x2B, 0x09, 0x2B, 0x09, 0xFF, 0x0F, 0xF0, 0x0F,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x40, 0x00, 0x32, 0x00, 0x32, 0x00, 0x0A, 0x00,
-        0x02, 0x00, 0x06, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00,
-
-};  /* fw_image_1_data */
-
-static const hcf_8 fw_image_2_data[] = {
-        0xF4, 0xA3, 0x00, 0x16, 0x08, 0x40, 0x0F, 0xD2, 0xE1, 0x28, 0xA5, 0x7C, 0x50, 0x30, 0xF1, 0x84,
-        0x44, 0x08, 0xAB, 0xAE, 0xA5, 0xB8, 0xFC, 0xBA, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05,
-        0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0x0C, 0x0D, 0x0E, 0x0F, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xA5, 0xC6, 0x84, 0xF8, 0x99, 0xEE,
-        0x8D, 0xF6, 0x0D, 0xFF, 0xBD, 0xD6, 0xB1, 0xDE, 0x54, 0x91, 0x50, 0x60, 0x03, 0x02, 0xA9, 0xCE,
-        0x7D, 0x56, 0x19, 0xE7, 0x62, 0xB5, 0xE6, 0x4D, 0x9A, 0xEC, 0x45, 0x8F, 0x9D, 0x1F, 0x40, 0x89,
-        0x87, 0xFA, 0x15, 0xEF, 0xEB, 0xB2, 0xC9, 0x8E, 0x0B, 0xFB, 0xEC, 0x41, 0x67, 0xB3, 0xFD, 0x5F,
-        0xEA, 0x45, 0xBF, 0x23, 0xF7, 0x53, 0x96, 0xE4, 0x5B, 0x9B, 0xC2, 0x75, 0x1C, 0xE1, 0xAE, 0x3D,
-        0x6A, 0x4C, 0x5A, 0x6C, 0x41, 0x7E, 0x02, 0xF5, 0x4F, 0x83, 0x5C, 0x68, 0xF4, 0x51, 0x34, 0xD1,
-        0x08, 0xF9, 0x93, 0xE2, 0x73, 0xAB, 0x53, 0x62, 0x3F, 0x2A, 0x0C, 0x08, 0x52, 0x95, 0x65, 0x46,
-        0x5E, 0x9D, 0x28, 0x30, 0xA1, 0x37, 0x0F, 0x0A, 0xB5, 0x2F, 0x09, 0x0E, 0x36, 0x24, 0x9B, 0x1B,
-        0x3D, 0xDF, 0x26, 0xCD, 0x69, 0x4E, 0xCD, 0x7F, 0x9F, 0xEA, 0x1B, 0x12, 0x9E, 0x1D, 0x74, 0x58,
-        0x2E, 0x34, 0x2D, 0x36, 0xB2, 0xDC, 0xEE, 0xB4, 0xFB, 0x5B, 0xF6, 0xA4, 0x4D, 0x76, 0x61, 0xB7,
-        0xCE, 0x7D, 0x7B, 0x52, 0x3E, 0xDD, 0x71, 0x5E, 0x97, 0x13, 0xF5, 0xA6, 0x68, 0xB9, 0x00, 0x00,
-        0x2C, 0xC1, 0x60, 0x40, 0x1F, 0xE3, 0xC8, 0x79, 0xED, 0xB6, 0xBE, 0xD4, 0x46, 0x8D, 0xD9, 0x67,
-        0x4B, 0x72, 0xDE, 0x94, 0xD4, 0x98, 0xE8, 0xB0, 0x4A, 0x85, 0x6B, 0xBB, 0x2A, 0xC5, 0xE5, 0x4F,
-        0x16, 0xED, 0xC5, 0x86, 0xD7, 0x9A, 0x55, 0x66, 0x94, 0x11, 0xCF, 0x8A, 0x10, 0xE9, 0x06, 0x04,
-        0x81, 0xFE, 0xF0, 0xA0, 0x44, 0x78, 0xBA, 0x25, 0xE3, 0x4B, 0xF3, 0xA2, 0xFE, 0x5D, 0xC0, 0x80,
-        0x8A, 0x05, 0xAD, 0x3F, 0xBC, 0x21, 0x48, 0x70, 0x04, 0xF1, 0xDF, 0x63, 0xC1, 0x77, 0x75, 0xAF,
-        0x63, 0x42, 0x30, 0x20, 0x1A, 0xE5, 0x0E, 0xFD, 0x6D, 0xBF, 0x4C, 0x81, 0x14, 0x18, 0x35, 0x26,
-        0x2F, 0xC3, 0xE1, 0xBE, 0xA2, 0x35, 0xCC, 0x88, 0x39, 0x2E, 0x57, 0x93, 0xF2, 0x55, 0x82, 0xFC,
-        0x47, 0x7A, 0xAC, 0xC8, 0xE7, 0xBA, 0x2B, 0x32, 0x95, 0xE6, 0xA0, 0xC0, 0x98, 0x19, 0xD1, 0x9E,
-        0x7F, 0xA3, 0x66, 0x44, 0x7E, 0x54, 0xAB, 0x3B, 0x83, 0x0B, 0xCA, 0x8C, 0x29, 0xC7, 0xD3, 0x6B,
-        0x3C, 0x28, 0x79, 0xA7, 0xE2, 0xBC, 0x1D, 0x16, 0x76, 0xAD, 0x3B, 0xDB, 0x56, 0x64, 0x4E, 0x74,
-        0x1E, 0x14, 0xDB, 0x92, 0x0A, 0x0C, 0x6C, 0x48, 0xE4, 0xB8, 0x5D, 0x9F, 0x6E, 0xBD, 0xEF, 0x43,
-        0xA6, 0xC4, 0xA8, 0x39, 0xA4, 0x31, 0x37, 0xD3, 0x8B, 0xF2, 0x32, 0xD5, 0x43, 0x8B, 0x59, 0x6E,
-        0xB7, 0xDA, 0x8C, 0x01, 0x64, 0xB1, 0xD2, 0x9C, 0xE0, 0x49, 0xB4, 0xD8, 0xFA, 0xAC, 0x07, 0xF3,
-        0x25, 0xCF, 0xAF, 0xCA, 0x8E, 0xF4, 0xE9, 0x47, 0x18, 0x10, 0xD5, 0x6F, 0x88, 0xF0, 0x6F, 0x4A,
-        0x72, 0x5C, 0x24, 0x38, 0xF1, 0x57, 0xC7, 0x73, 0x51, 0x97, 0x23, 0xCB, 0x7C, 0xA1, 0x9C, 0xE8,
-        0x21, 0x3E, 0xDD, 0x96, 0xDC, 0x61, 0x86, 0x0D, 0x85, 0x0F, 0x90, 0xE0, 0x42, 0x7C, 0xC4, 0x71,
-        0xAA, 0xCC, 0xD8, 0x90, 0x05, 0x06, 0x01, 0xF7, 0x12, 0x1C, 0xA3, 0xC2, 0x5F, 0x6A, 0xF9, 0xAE,
-        0xD0, 0x69, 0x91, 0x17, 0x58, 0x99, 0x27, 0x3A, 0xB9, 0x27, 0x38, 0xD9, 0x13, 0xEB, 0xB3, 0x2B,
-        0x33, 0x22, 0xBB, 0xD2, 0x70, 0xA9, 0x89, 0x07, 0xA7, 0x33, 0xB6, 0x2D, 0x22, 0x3C, 0x92, 0x15,
-        0x20, 0xC9, 0x49, 0x87, 0xFF, 0xAA, 0x78, 0x50, 0x7A, 0xA5, 0x8F, 0x03, 0xF8, 0x59, 0x80, 0x09,
-        0x17, 0x1A, 0xDA, 0x65, 0x31, 0xD7, 0xC6, 0x84, 0xB8, 0xD0, 0xC3, 0x82, 0xB0, 0x29, 0x77, 0x5A,
-        0x11, 0x1E, 0xCB, 0x7B, 0xFC, 0xA8, 0xD6, 0x6D, 0x3A, 0x2C, 0x00, 0x30, 0x00, 0x31, 0x00, 0x33,
-        0x00, 0x34, 0x00, 0x35, 0x00, 0x36, 0x00, 0x37, 0x00, 0x38, 0x00, 0x38, 0x00, 0x3A, 0x00, 0x3B,
-        0x00, 0x3C, 0x00, 0x3D, 0x00, 0x3E, 0x00, 0x3F, 0x00, 0x3F, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6, 0x28, 0x10, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x01, 0x0A, 0x02, 0x14, 0x05, 0x32, 0x0B, 0x37, 0x08, 0x50, 0x0B, 0x6E,
-        0x02, 0x00, 0x04, 0x00, 0x0B, 0x00, 0x16, 0x00, 0x0C, 0x00, 0x12, 0x00, 0x18, 0x00, 0x24, 0x00,
-        0x30, 0x00, 0x48, 0x00, 0x60, 0x00, 0x6C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x39, 0x00, 0x39, 0x00, 0x20, 0x00, 0x39, 0x00, 0x39, 0x00, 0x20, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x0A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x0D, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0E, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, 0x10,
-        0x3E, 0x11, 0xF6, 0x10, 0x38, 0x11, 0xFC, 0x10, 0x32, 0x11, 0x02, 0x11, 0x2C, 0x11, 0x08, 0x11,
-        0x26, 0x11, 0x0E, 0x11, 0x20, 0x11, 0x14, 0x11, 0x1A, 0x11, 0x07, 0x01, 0x00, 0x00, 0x16, 0x22,
-        0x00, 0x04, 0x08, 0x01, 0x00, 0x00, 0x16, 0x26, 0x00, 0x04, 0x09, 0x01, 0x00, 0x00, 0x16, 0x2A,
-        0x00, 0x04, 0x0A, 0x01, 0x00, 0x00, 0x16, 0x2E, 0x00, 0x04, 0x0B, 0x01, 0x00, 0x00, 0x10, 0x24,
-        0x04, 0x04, 0x0C, 0x01, 0x00, 0x00, 0x10, 0x28, 0x04, 0x04, 0x0D, 0x01, 0x00, 0x00, 0x10, 0x2C,
-        0x04, 0x04, 0x0E, 0x01, 0x00, 0x00, 0x10, 0x30, 0x04, 0x04, 0x0F, 0x01, 0x00, 0x00, 0x14, 0x34,
-        0x08, 0x84, 0x10, 0x01, 0x00, 0x00, 0x14, 0x38, 0x08, 0x84, 0x11, 0x01, 0x00, 0x00, 0x14, 0x3C,
-        0x08, 0x84, 0x12, 0x01, 0x00, 0x00, 0x14, 0x40, 0x08, 0x84, 0x13, 0x01, 0x00, 0x00, 0x17, 0x64,
-        0x0C, 0x8B, 0x14, 0x01, 0x00, 0x00, 0x17, 0x68, 0x0C, 0x8B, 0x15, 0x01, 0x00, 0x00, 0x17, 0x6C,
-        0x0C, 0x8B, 0x16, 0x01, 0x00, 0x00, 0x17, 0x70, 0x0C, 0x8B, 0x17, 0x01, 0x00, 0x00, 0x17, 0x74,
-        0x0C, 0x8B, 0x18, 0x01, 0x00, 0x00, 0x17, 0x78, 0x0C, 0x8B, 0x19, 0x01, 0x00, 0x00, 0x17, 0x7C,
-        0x0C, 0x8B, 0x1A, 0x01, 0x00, 0x00, 0x17, 0x80, 0x0C, 0x8B, 0x1B, 0x01, 0x00, 0x00, 0x17, 0x84,
-        0x0C, 0x8B, 0x1C, 0x01, 0x00, 0x00, 0x17, 0x88, 0x0C, 0x8B, 0x1D, 0x01, 0x00, 0x00, 0x17, 0x8C,
-        0x0C, 0x8B, 0x1E, 0x01, 0x00, 0x00, 0x0E, 0x95, 0x17, 0x04, 0x1F, 0x01, 0x00, 0x00, 0x0E, 0x99,
-        0x17, 0x04, 0x20, 0x01, 0x00, 0x00, 0x0E, 0x9D, 0x17, 0x04, 0x21, 0x01, 0x00, 0x00, 0x0E, 0xA1,
-        0x17, 0x04, 0x22, 0x01, 0x00, 0x00, 0x0E, 0xA5, 0x00, 0x00, 0x60, 0x11, 0x80, 0x11, 0xA0, 0x11,
-        0xC0, 0x11, 0x18, 0x12, 0x68, 0x11, 0x88, 0x11, 0xA8, 0x11, 0xC8, 0x11, 0x20, 0x12, 0x70, 0x11,
-        0x90, 0x11, 0xB0, 0x11, 0xD0, 0x11, 0x28, 0x12, 0x78, 0x11, 0x98, 0x11, 0xB8, 0x11, 0xD8, 0x11,
-        0x30, 0x12, 0xE0, 0x11, 0xE8, 0x11, 0xF0, 0x11, 0xF8, 0x11, 0x00, 0x12, 0x08, 0x12, 0x10, 0x12,
-        0x38, 0x12, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0A, 0x0A, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x1E, 0x1E, 0x1E, 0x1E,
-        0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x1E, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x10, 0x10,
-        0x10, 0x10, 0x17, 0x17, 0x17, 0x17, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x11, 0x11, 0x11, 0x11, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x0E, 0x0E, 0x0E, 0x0E, 0x0E,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x16, 0x16,
-        0x16, 0x16, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A,
-        0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x0A,
-        0x0A, 0x0A, 0x0A, 0x7F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x10, 0x10, 0x10, 0x10, 0x7F, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x0A, 0x0A, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F,
-        0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x9D, 0x9D, 0xA1, 0xB4,
-        0x10, 0x10, 0x00, 0x9D, 0x08, 0x02, 0x06, 0x00, 0xA5, 0xA5, 0xAA, 0xB4, 0x10, 0x10, 0x00, 0xA2,
-        0x15, 0x05, 0x07, 0x00, 0xAA, 0xAA, 0xB4, 0xB4, 0x10, 0x10, 0x00, 0xA7, 0x1C, 0x0A, 0x08, 0x00,
-        0xB7, 0xB7, 0xC1, 0xC1, 0x10, 0x10, 0x00, 0xB4, 0x29, 0x17, 0x08, 0x00, 0xBD, 0xBD, 0xC7, 0xC7,
-        0x10, 0x10, 0x00, 0xBA, 0x2F, 0x1D, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC4, 0x1F, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x42, 0x2A, 0x5B, 0x2A, 0x7E, 0x2A, 0x71, 0x30, 0xEE, 0x29, 0x88, 0x30, 0xB8, 0x2A,
-        0x9F, 0x30, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0x21, 0x35, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29,
-        0xEE, 0x29, 0xEE, 0x29, 0x93, 0x2C, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29,
-        0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29,
-        0xEE, 0x29, 0xEE, 0x29, 0xDE, 0x2C, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29,
-        0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29,
-        0xEE, 0x29, 0x61, 0x2C, 0x7C, 0x2C, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29, 0xEE, 0x29,
-        0xEE, 0x29, 0xE1, 0x27, 0xD7, 0x2A, 0xEA, 0x2A, 0x9A, 0x2B, 0x9E, 0x2B, 0xEE, 0x29, 0xEE, 0x29,
-        0x4D, 0x2C, 0xA1, 0xF2, 0x62, 0xF2, 0x00, 0x00, 0x99, 0xF2, 0xEE, 0xF2, 0x12, 0xF3, 0x48, 0xF3,
-        0x00, 0x00, 0x00, 0x00, 0x70, 0x2A, 0x94, 0x2A, 0x00, 0x00, 0x67, 0x30, 0x7E, 0x30, 0x95, 0x30,
-        0xAF, 0x30, 0x00, 0x00, 0x00, 0x00, 0xE0, 0xFC, 0x45, 0x2D, 0xF7, 0x2F, 0x5A, 0x00, 0x02, 0x00,
-        0xF9, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0xFC, 0x00, 0x02, 0x00, 0xF7, 0xFF, 0x45, 0x2D, 0x5B, 0x2D,
-        0xAA, 0x2D, 0x06, 0x00, 0xF0, 0xFF, 0x45, 0x2D, 0x22, 0x2D, 0x00, 0x00, 0x00, 0x02, 0xF6, 0xFF,
-        0x45, 0x2D, 0x5B, 0x2D, 0x6C, 0x00, 0x02, 0x00, 0xF4, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0xA6, 0x01,
-        0x02, 0x00, 0xF5, 0xFF, 0x45, 0x2D, 0x00, 0x30, 0x9C, 0x2D, 0x02, 0x00, 0xED, 0xFF, 0x45, 0x2D,
-        0x12, 0x30, 0x98, 0x32, 0x02, 0x00, 0xEC, 0xFF, 0x45, 0x2D, 0x40, 0x30, 0x9A, 0x32, 0x02, 0x00,
-        0xEB, 0xFF, 0x45, 0x2D, 0x46, 0x30, 0x9C, 0x32, 0x02, 0x00, 0xEE, 0xFF, 0x45, 0x2D, 0x4C, 0x30,
-        0x12, 0x33, 0x02, 0x00, 0xDA, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0xF2, 0x13, 0x0C, 0x00, 0xEA, 0xFF,
-        0x45, 0x2D, 0x22, 0x2D, 0x4C, 0x33, 0x06, 0x00, 0xE9, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x52, 0x33,
-        0x02, 0x00, 0xE8, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x54, 0x33, 0x02, 0x00, 0xE7, 0xFF, 0x45, 0x2D,
-        0x5B, 0x2D, 0x56, 0x33, 0x02, 0x00, 0xE6, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x58, 0x33, 0x02, 0x00,
-        0xE5, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x5A, 0x33, 0x10, 0x00, 0xE4, 0xFF, 0x45, 0x2D, 0x5B, 0x2D,
-        0x6A, 0x33, 0x18, 0x00, 0xDB, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x82, 0x33, 0x02, 0x00, 0xDC, 0xFF,
-        0x45, 0x2D, 0x5B, 0x2D, 0x84, 0x33, 0x02, 0x00, 0xE1, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x5A, 0x34,
-        0x02, 0x00, 0xE0, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0x58, 0x34, 0x02, 0x00, 0xE3, 0xFF, 0x45, 0x2D,
-        0x5B, 0x2D, 0x3C, 0x34, 0x02, 0x00, 0xE2, 0xFF, 0x93, 0x2D, 0x22, 0x2D, 0xF2, 0x33, 0x24, 0x00,
-        0x03, 0xFC, 0x45, 0x2D, 0x01, 0x2F, 0x8C, 0x32, 0x02, 0x00, 0x04, 0xFC, 0x45, 0x2D, 0x55, 0x2D,
-        0xB4, 0x2D, 0x22, 0x00, 0x06, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x9A, 0x2D, 0x02, 0x00, 0x07, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0xF8, 0x2D, 0x02, 0x00, 0x0E, 0xFC, 0x45, 0x2D, 0x2A, 0x2F, 0x02, 0x2E,
-        0x22, 0x00, 0xB1, 0xFC, 0x45, 0x2D, 0x39, 0x31, 0x00, 0x2F, 0x02, 0x00, 0x20, 0xFC, 0x45, 0x2D,
-        0x5B, 0x2D, 0x28, 0x2E, 0x02, 0x00, 0x25, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x34, 0x2E, 0x02, 0x00,
-        0x26, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x36, 0x2E, 0x02, 0x00, 0x27, 0xFC, 0x45, 0x2D, 0x5B, 0x2D,
-        0x38, 0x2E, 0x02, 0x00, 0xB2, 0xFC, 0x45, 0x2D, 0x55, 0x2D, 0x24, 0x2F, 0x22, 0x00, 0xC1, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0x9E, 0x33, 0x20, 0x00, 0xB0, 0xFC, 0x18, 0x2D, 0x3D, 0x31, 0x00, 0x00,
-        0x00, 0x00, 0xC4, 0xFC, 0x18, 0x2D, 0x57, 0x30, 0x00, 0x00, 0x08, 0x00, 0xC8, 0xFC, 0x18, 0x2D,
-        0x55, 0x30, 0x00, 0x00, 0x08, 0x00, 0xB4, 0xFC, 0x18, 0x2D, 0x71, 0x31, 0x00, 0x00, 0x00, 0x00,
-        0xB6, 0xFC, 0x18, 0x2D, 0x19, 0x32, 0x00, 0x00, 0x00, 0x00, 0xB7, 0xFC, 0x18, 0x2D, 0x43, 0x32,
-        0x00, 0x00, 0x00, 0x00, 0xB8, 0xFC, 0x18, 0x2D, 0x99, 0x32, 0x00, 0x00, 0x00, 0x00, 0xBC, 0xFC,
-        0x18, 0x2D, 0xD2, 0x32, 0x00, 0x00, 0x00, 0x00, 0xBD, 0xFC, 0x18, 0x2D, 0x58, 0x33, 0x00, 0x00,
-        0x00, 0x00, 0xBE, 0xFC, 0x18, 0x2D, 0x82, 0x33, 0x00, 0x00, 0x00, 0x00, 0xBF, 0xFC, 0x18, 0x2D,
-        0xCF, 0x33, 0x00, 0x00, 0x00, 0x00, 0xB3, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xA0, 0x0F, 0x10, 0x00,
-        0xB5, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x38, 0x34, 0x02, 0x00, 0xB9, 0xFC, 0x45, 0x2D, 0x5B, 0x2D,
-        0x3A, 0x34, 0x02, 0x00, 0x90, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0x3E, 0x34, 0x02, 0x00, 0x88, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0x72, 0x32, 0x04, 0x00, 0x89, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x76, 0x32,
-        0x04, 0x00, 0xC5, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x7A, 0x32, 0x04, 0x00, 0x23, 0xFC, 0x45, 0x2D,
-        0x5B, 0x2D, 0x2E, 0x2E, 0x04, 0x00, 0x2A, 0xFC, 0x45, 0x2D, 0xE9, 0x2D, 0xB0, 0x2D, 0x02, 0x00,
-        0xC7, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0xA0, 0x32, 0x0A, 0x00, 0x29, 0xFC, 0x3C, 0x2E, 0x00, 0x2E,
-        0x00, 0x00, 0x00, 0x00, 0xC2, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x80, 0x32, 0x08, 0x00, 0x32, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0x98, 0x01, 0x02, 0x00, 0x33, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x9A, 0x01,
-        0x02, 0x00, 0x35, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x88, 0x32, 0x02, 0x00, 0xC7, 0xFC, 0x45, 0x2D,
-        0xD3, 0x2F, 0x8A, 0x32, 0x02, 0x00, 0x00, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xB2, 0x2D, 0x02, 0x00,
-        0x01, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xAA, 0x2D, 0x06, 0x00, 0x02, 0xFC, 0x45, 0x2D, 0xD5, 0x2D,
-        0x02, 0x2F, 0x22, 0x00, 0x05, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xA0, 0x2D, 0x02, 0x00, 0x08, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0xA4, 0x2D, 0x06, 0x00, 0x09, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xFA, 0x2D,
-        0x02, 0x00, 0x0B, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xFC, 0x2D, 0x02, 0x00, 0x0C, 0xFC, 0x45, 0x2D,
-        0x5B, 0x2D, 0xFE, 0x2D, 0x02, 0x00, 0x0D, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x00, 0x2E, 0x02, 0x00,
-        0x21, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0x2A, 0x2E, 0x02, 0x00, 0x80, 0xFC, 0xB1, 0x2D, 0xC1, 0x2D,
-        0x40, 0x2E, 0xC0, 0x00, 0x81, 0xFC, 0x45, 0x2D, 0x5B, 0x2D, 0xA4, 0x01, 0x02, 0x00, 0x83, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0xA8, 0x01, 0x02, 0x00, 0x85, 0xFC, 0x45, 0x2D, 0x4A, 0x2F, 0xA0, 0x01,
-        0x02, 0x00, 0x86, 0xFC, 0x45, 0x2D, 0x6E, 0x2F, 0xB0, 0x01, 0x02, 0x00, 0x28, 0xFC, 0x45, 0x2D,
-        0x5B, 0x2D, 0x3A, 0x2E, 0x02, 0x00, 0x90, 0xFC, 0x45, 0x2D, 0x5C, 0x2F, 0xA2, 0x01, 0x02, 0x00,
-        0x87, 0xFC, 0x45, 0x2D, 0x8C, 0x2F, 0x50, 0x2F, 0x22, 0x03, 0x30, 0xFC, 0x45, 0x2D, 0x5B, 0x2D,
-        0x3C, 0x2E, 0x02, 0x00, 0x84, 0xFC, 0x45, 0x2D, 0x92, 0x2F, 0xAC, 0x01, 0x04, 0x00, 0x2B, 0xFC,
-        0x45, 0x2D, 0x5B, 0x2D, 0xE2, 0x37, 0x02, 0x00, 0xF8, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0xDC, 0x37,
-        0x02, 0x00, 0xF3, 0xFF, 0x45, 0x2D, 0x5B, 0x2D, 0xE4, 0x37, 0x02, 0x00, 0x20, 0xFD, 0x76, 0x2D,
-        0x22, 0x2D, 0x5E, 0x40, 0x08, 0x00, 0x21, 0xFD, 0x76, 0x2D, 0x22, 0x2D, 0x62, 0x40, 0x0A, 0x00,
-        0x22, 0xFD, 0x76, 0x2D, 0x22, 0x2D, 0x67, 0x40, 0x16, 0x00, 0x23, 0xFD, 0x76, 0x2D, 0x22, 0x2D,
-        0x72, 0x40, 0x0A, 0x00, 0x45, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0xFC, 0x00, 0x02, 0x00, 0x47, 0xFD,
-        0x45, 0x2D, 0x22, 0x2D, 0x72, 0x01, 0x02, 0x00, 0x48, 0xFD, 0x91, 0x2E, 0x22, 0x2D, 0x98, 0x01,
-        0x02, 0x00, 0x49, 0xFD, 0x91, 0x2E, 0x22, 0x2D, 0x9A, 0x01, 0x02, 0x00, 0x4A, 0xFD, 0x45, 0x2D,
-        0x22, 0x2D, 0x92, 0x01, 0x02, 0x00, 0x4B, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0x94, 0x01, 0x02, 0x00,
-        0x4D, 0xFD, 0x76, 0x2D, 0x22, 0x2D, 0x77, 0x40, 0x0C, 0x00, 0x4F, 0xFD, 0xA5, 0x2E, 0x22, 0x2D,
-        0x90, 0x32, 0x02, 0x00, 0xC2, 0xFD, 0x9B, 0x2E, 0x22, 0x2D, 0x00, 0x00, 0x02, 0x00, 0x40, 0xFD,
-        0x6E, 0x2D, 0x22, 0x2D, 0xB6, 0x01, 0x02, 0x00, 0x24, 0xFD, 0xB5, 0x2E, 0x22, 0x2D, 0x00, 0x00,
-        0x02, 0x00, 0x91, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0xC6, 0x25, 0x02, 0x00, 0x93, 0xFD, 0x45, 0x2D,
-        0x22, 0x2D, 0xCC, 0x25, 0x02, 0x00, 0x8F, 0xFD, 0xD5, 0x2E, 0x22, 0x2D, 0x00, 0x00, 0x08, 0x00,
-        0xC1, 0xFD, 0x00, 0x31, 0x22, 0x2D, 0xFA, 0x00, 0x02, 0x00, 0xC6, 0xFD, 0x45, 0x2D, 0x22, 0x2D,
-        0xF8, 0x37, 0x04, 0x00, 0x25, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0x9E, 0x01, 0x02, 0x00, 0x89, 0xFD,
-        0xB9, 0x30, 0x22, 0x2D, 0x00, 0x00, 0x00, 0x00, 0x8A, 0xFD, 0x93, 0x2D, 0x22, 0x2D, 0x12, 0x34,
-        0x24, 0x00, 0x41, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0xBE, 0x33, 0x22, 0x00, 0x42, 0xFD, 0x45, 0x2D,
-        0x22, 0x2D, 0xFE, 0x00, 0x06, 0x00, 0x43, 0xFD, 0xC2, 0x2E, 0x22, 0x2D, 0x00, 0x00, 0x06, 0x00,
-        0x44, 0xFD, 0xAC, 0x2E, 0x22, 0x2D, 0xB2, 0x01, 0x02, 0x00, 0x46, 0xFD, 0x21, 0x31, 0x22, 0x2D,
-        0x00, 0x00, 0x00, 0x00, 0x4C, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0x46, 0x2F, 0x02, 0x00, 0x50, 0xFD,
-        0x45, 0x2D, 0x22, 0x2D, 0xF2, 0x00, 0x02, 0x00, 0x51, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0xF4, 0x00,
-        0x02, 0x00, 0x52, 0xFD, 0x45, 0x2D, 0x22, 0x2D, 0xC4, 0x01, 0x02, 0x00, 0x8C, 0xFD, 0x38, 0x2D,
-        0x22, 0x2D, 0x98, 0x34, 0x56, 0x00, 0x8D, 0xFD, 0x38, 0x2D, 0x22, 0x2D, 0xF2, 0x34, 0x14, 0x00,
-        0x00, 0xF1, 0x46, 0x00, 0xDC, 0x2C, 0x36, 0x01, 0x01, 0xF1, 0x84, 0x07, 0xDA, 0x2C, 0x38, 0x01,
-        0x00, 0x03, 0xA0, 0x80, 0x1E, 0x00, 0x70, 0x01, 0xFA, 0x00, 0xD4, 0x01, 0xFE, 0x00, 0x3A, 0x01,
-        0xB6, 0x01, 0xCC, 0x2C, 0x54, 0x01, 0xC6, 0x25, 0x20, 0x00, 0x00, 0x00, 0xC0, 0x1D, 0x00, 0x00,
-        0xC4, 0x1F, 0x4E, 0x01, 0x0B, 0x00, 0xB8, 0x00, 0xEC, 0x00, 0x44, 0x00, 0x46, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x1C, 0x09, 0x08, 0x24, 0x28, 0x06, 0x0C, 0x18, 0x08, 0x30, 0x14, 0x0C,
-        0x08, 0x36, 0x10, 0x12, 0x24, 0xB7, 0x97, 0xB6, 0xA3, 0xB7, 0xAC, 0xB7, 0xA8, 0xB6, 0x3E, 0xB7,
-        0x16, 0xB7, 0x79, 0x3E, 0x57, 0x3D, 0x79, 0x3E, 0xF9, 0x3D, 0x5F, 0x3D, 0x52, 0x3D, 0x33, 0x3E,
-        0x55, 0x3E, 0x6A, 0x3E, 0xAC, 0x3E, 0xD8, 0x3E, 0xF8, 0x3D, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46,
-        0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46, 0x22, 0x46,
-        0x23, 0x46, 0x23, 0x46, 0x23, 0x46, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47,
-        0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47, 0x1C, 0x47,
-        0x1D, 0x47, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48,
-        0x5A, 0x48, 0x9A, 0x48, 0xDA, 0x48, 0x1A, 0x48, 0x5A, 0x48, 0x9A, 0x48, 0x33, 0x48, 0x78, 0x49,
-        0x78, 0x49, 0x79, 0x49, 0x79, 0x49, 0x79, 0x49, 0x79, 0x49, 0x7A, 0x49, 0x7A, 0x49, 0x7A, 0x49,
-        0x7A, 0x49, 0x7B, 0x49, 0x7B, 0x49, 0x7B, 0x49, 0x7C, 0x49, 0xD8, 0x03, 0xDC, 0x03, 0xE0, 0x03,
-        0xE4, 0x03, 0xF0, 0x03, 0xF4, 0x03, 0xF8, 0x03, 0x0A, 0x04, 0x0E, 0x04, 0x12, 0x04, 0x16, 0x04,
-        0x0C, 0x04, 0x10, 0x04, 0x14, 0x04, 0x18, 0x04, 0x1C, 0x04, 0x20, 0x04, 0x24, 0x04, 0x28, 0x04,
-        0x4C, 0x04, 0x50, 0x04, 0x54, 0x04, 0x58, 0x04, 0x5C, 0x04, 0x60, 0x04, 0x64, 0x04, 0x68, 0x04,
-        0x6C, 0x04, 0x70, 0x04, 0x74, 0x04, 0x7D, 0x04, 0x81, 0x04, 0x85, 0x04, 0x89, 0x04, 0x8D, 0x04,
-        0x10, 0x00, 0x8E, 0x19, 0xAC, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3C, 0x0C, 0x00, 0x00,
-        0xFF, 0x3F, 0x44, 0x04, 0x00, 0x00, 0xD3, 0x22, 0x44, 0x04, 0x9C, 0x02, 0xCB, 0x54, 0x44, 0x04,
-        0x00, 0x00, 0x01, 0x00, 0x44, 0x04, 0x00, 0x00, 0x00, 0x03, 0x00, 0x0C, 0x71, 0x00, 0x30, 0x50,
-        0x20, 0x00, 0x80, 0xBF, 0x1F, 0xA6, 0x28, 0x00, 0x0B, 0x02, 0x60, 0x84, 0x4C, 0x00, 0x02, 0x00,
-        0x4B, 0x1C, 0x98, 0x00, 0x00, 0x00, 0x20, 0x0B, 0x34, 0x04, 0xFD, 0x34, 0x34, 0x00, 0x38, 0x04,
-        0xFD, 0x34, 0x34, 0x00, 0x3C, 0x04, 0x01, 0x00, 0x10, 0x00, 0x00, 0x08, 0x00, 0x52, 0x14, 0x00,
-        0x04, 0x08, 0x0E, 0x32, 0x00, 0xA6, 0x10, 0x08, 0xC4, 0x03, 0x50, 0x60, 0x18, 0x08, 0xF0, 0x3F,
-        0xFC, 0x01, 0x10, 0x0C, 0x00, 0x00, 0x80, 0x04, 0x14, 0x0C, 0x00, 0x00, 0x00, 0x41, 0x20, 0x0C,
-        0xB0, 0x00, 0xB0, 0xB8, 0x24, 0x0C, 0x00, 0x00, 0xAB, 0x05, 0x2C, 0x0C, 0x80, 0x05, 0x00, 0xFF,
-        0x30, 0x0C, 0x00, 0x00, 0xB0, 0x04, 0x34, 0x0C, 0x03, 0x00, 0x00, 0xE8, 0x44, 0x0C, 0x04, 0x00,
-        0xFF, 0x0F, 0x00, 0x10, 0x2E, 0x00, 0x0C, 0xE3, 0x44, 0x04, 0x00, 0x00, 0x01, 0x04, 0x44, 0x04,
-        0x00, 0x00, 0x01, 0x01, 0x44, 0x04, 0x00, 0x00, 0x01, 0x00, 0x44, 0x04, 0x00, 0x00, 0x01, 0x04,
-        0x44, 0x04, 0x00, 0x00, 0x80, 0x03, 0x48, 0x0C, 0x00, 0x00, 0x7F, 0x00, 0x04, 0x04, 0x08, 0x48,
-        0x00, 0x00, 0x04, 0x04, 0x08, 0x40, 0x00, 0x00, 0x00, 0x0C, 0x71, 0x00, 0x30, 0x30, 0x00, 0x00,
-        0x5E, 0x40, 0x01, 0x00, 0x18, 0x00, 0x36, 0xC0, 0xE8, 0x0E, 0x1C, 0x00, 0x78, 0xC8, 0xA5, 0x40,
-        0x24, 0x00, 0x9E, 0xB0, 0xB9, 0x95, 0x08, 0x08, 0x00, 0xEA, 0x40, 0x01, 0x0C, 0x08, 0x00, 0xEA,
-        0x00, 0x00, 0x1C, 0x08, 0x00, 0x00, 0x42, 0x07, 0x20, 0x08, 0x7B, 0x00, 0xD4, 0x09, 0x2C, 0x04,
-        0x14, 0x00, 0x50, 0x14, 0x30, 0x04, 0x28, 0x0F, 0x28, 0x7F, 0x18, 0x08, 0x20, 0x00, 0xFC, 0x01,
-        0x04, 0x10, 0x69, 0x00, 0xFD, 0xC3, 0x08, 0x10, 0x69, 0x00, 0xFD, 0xC3, 0x08, 0x0C, 0x00, 0x00,
-        0x00, 0x00, 0x48, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0C, 0x00, 0x00, 0x7F, 0x00, 0x04, 0x04,
-        0x08, 0x48, 0x02, 0x00, 0x00, 0x00, 0x5E, 0x48, 0x00, 0x00, 0x04, 0x04, 0x08, 0x40, 0x02, 0x00,
-        0x00, 0x0C, 0x71, 0x00, 0x30, 0x50, 0x00, 0x00, 0x5E, 0x48, 0x01, 0x00, 0x18, 0x00, 0x3A, 0xC0,
-        0xE8, 0x04, 0x1C, 0x00, 0x78, 0xD0, 0xA5, 0x40, 0x24, 0x00, 0x9E, 0xB0, 0xB9, 0x85, 0x2C, 0x04,
-        0x14, 0x00, 0x50, 0x14, 0x30, 0x04, 0x28, 0x0F, 0x28, 0x7F, 0x08, 0x08, 0x00, 0xEA, 0x40, 0x01,
-        0x0C, 0x08, 0x00, 0xEA, 0x00, 0x00, 0x1C, 0x08, 0x00, 0x00, 0x42, 0x07, 0x20, 0x08, 0x7B, 0x00,
-        0xD4, 0x09, 0x18, 0x08, 0xF0, 0x3F, 0xFC, 0x01, 0x04, 0x10, 0x69, 0x00, 0xDD, 0xCD, 0x08, 0x10,
-        0x69, 0x00, 0xDD, 0xCD, 0x08, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x48, 0x0C, 0x00, 0x00, 0x00, 0x00,
-        0x08, 0x04, 0x40, 0x01, 0x41, 0x01, 0x0C, 0x04, 0x40, 0x04, 0x41, 0x04, 0x10, 0x04, 0xD6, 0x08,
-        0x56, 0x0A, 0x14, 0x04, 0x42, 0x02, 0x56, 0x0A, 0x18, 0x04, 0x56, 0x0A, 0x40, 0x02, 0x1C, 0x04,
-        0x42, 0x0A, 0x42, 0x2A, 0x20, 0x04, 0xC2, 0x00, 0xD6, 0x08, 0x24, 0x04, 0xD6, 0x08, 0xC0, 0x00,
-        0x28, 0x04, 0xC2, 0x08, 0xC2, 0x28, 0x08, 0x04, 0x40, 0x01, 0x41, 0x01, 0x0C, 0x04, 0x00, 0x01,
-        0x01, 0x01, 0x10, 0x04, 0x56, 0x0A, 0x56, 0x0A, 0x14, 0x04, 0x42, 0x02, 0x56, 0x0A, 0x18, 0x04,
-        0x56, 0x0A, 0x40, 0x02, 0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x20, 0x04, 0x42, 0x02, 0x56, 0x0A,
-        0x24, 0x04, 0x56, 0x0A, 0x40, 0x02, 0x28, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x08, 0x04, 0x40, 0x01,
-        0x41, 0x01, 0x0C, 0x04, 0x40, 0x04, 0x41, 0x04, 0x10, 0x04, 0xCE, 0x08, 0x4E, 0x0A, 0x14, 0x04,
-        0x42, 0x02, 0x4E, 0x0A, 0x18, 0x04, 0x4E, 0x0A, 0x40, 0x02, 0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A,
-        0x20, 0x04, 0xC2, 0x00, 0xCE, 0x08, 0x24, 0x04, 0xCE, 0x08, 0xC0, 0x00, 0x28, 0x04, 0xC2, 0x08,
-        0xC2, 0x28, 0x08, 0x04, 0x40, 0x01, 0x41, 0x01, 0x0C, 0x04, 0x00, 0x01, 0x01, 0x01, 0x10, 0x04,
-        0x4E, 0x0A, 0x4E, 0x0A, 0x14, 0x04, 0x42, 0x02, 0x4E, 0x0A, 0x18, 0x04, 0x4E, 0x0A, 0x40, 0x02,
-        0x1C, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x20, 0x04, 0x42, 0x02, 0x4E, 0x0A, 0x24, 0x04, 0x4E, 0x0A,
-        0x40, 0x02, 0x28, 0x04, 0x42, 0x0A, 0x42, 0x2A, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
-        0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x03, 0x00, 0x05, 0x00, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x16,
-        0xA0, 0x16, 0xA0, 0x16, 0xA0, 0x17, 0xA0, 0x17, 0xA0, 0x17, 0xA0, 0x18, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06,
-        0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0xFF, 0x06, 0x00, 0x00, 0x65, 0x00,
-        0x65, 0x00, 0x65, 0x00, 0x65, 0x00, 0x5D, 0x00, 0x52, 0x00, 0x48, 0x00, 0x40, 0x00, 0x38, 0x00,
-        0x31, 0x00, 0x2C, 0x00, 0x27, 0x00, 0x23, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x65, 0x00, 0x65, 0x00,
-        0x65, 0x00, 0x65, 0x00, 0x5D, 0x00, 0x52, 0x00, 0x48, 0x00, 0x40, 0x00, 0x38, 0x00, 0x31, 0x00,
-        0x2C, 0x00, 0x27, 0x00, 0x23, 0x00, 0x1F, 0x00, 0x00, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00,
-        0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x19, 0x00,
-        0x19, 0x00, 0x19, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x00,
-        0x0C, 0x00, 0x0C, 0x00, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x15, 0x00, 0x6E, 0x6F, 0x6E, 0x2D,
-        0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x53, 0x53, 0x49, 0x44, 0x20, 0x21,
-        0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x09,
-        0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x48, 0x45, 0x52, 0x4D, 0x45, 0x53,
-        0x20, 0x32, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00,
-        0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x01, 0x00, 0x15, 0x00,
-        0x6E, 0x6F, 0x6E, 0x2D, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x53, 0x53,
-        0x49, 0x44, 0x20, 0x21, 0x21, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x01, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x00, 0x09, 0x00, 0x00, 0x01, 0x00, 0x64, 0x00, 0x64, 0x00, 0x00, 0x00, 0x48, 0x45,
-        0x52, 0x4D, 0x45, 0x53, 0x20, 0x32, 0x00, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00,
-        0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x69,
-        0x72, 0x73, 0x74, 0x20, 0x57, 0x61, 0x76, 0x65, 0x4C, 0x41, 0x4E, 0x20, 0x49, 0x49, 0x20, 0x53,
-        0x53, 0x49, 0x44, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x00, 0x00,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20,
-        0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x0F, 0xF0, 0x0F,
-        0x0F, 0x00, 0x50, 0x01, 0x02, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x2B, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14,
-        0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x14, 0x00,
-        0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x24, 0x00, 0xFF, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x09, 0x00, 0x0A, 0x00, 0x0A, 0x00,
-        0x0B, 0x00, 0x0B, 0x00, 0x14, 0x00, 0x14, 0x00, 0x14, 0x00, 0x0A, 0x00, 0x00, 0x00, 0x02, 0x01,
-        0x02, 0x04, 0x0B, 0x16, 0x00, 0x00, 0x00, 0x00, 0x02, 0x01, 0x82, 0x84, 0x8B, 0x96, 0x00, 0x00,
-        0x00, 0x00, 0x1C, 0x85, 0x00, 0x00, 0x66, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x03, 0x00, 0x20, 0x00, 0x1B, 0x00, 0x17, 0x00, 0x11, 0x00, 0x10, 0x00, 0x0B, 0x00,
-        0x0B, 0x00, 0x09, 0x00, 0x17, 0x00, 0x14, 0x00, 0x10, 0x00, 0x0D, 0x00, 0x0B, 0x00, 0x09, 0x00,
-        0x08, 0x00, 0x07, 0x00, 0x0D, 0x00, 0x0A, 0x00, 0x09, 0x00, 0x08, 0x00, 0x05, 0x00, 0x05, 0x00,
-        0xD8, 0x0C, 0xC0, 0x08, 0x90, 0x0D, 0x60, 0x09, 0x48, 0x0E, 0x30, 0x0A, 0x24, 0x0F, 0x18, 0x0B,
-        0x0B, 0x6E, 0x0B, 0x37, 0x02, 0x14, 0x01, 0x0A, 0x04, 0x00, 0x04, 0x00, 0x04, 0x00, 0x03, 0x00,
-        0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x43, 0x75, 0x72, 0x72, 0x65,
-        0x6E, 0x74, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x53, 0x65, 0x74, 0x20, 0x49,
-        0x64, 0x65, 0x6E, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x05, 0x00, 0x00, 0x00, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x30, 0x01, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0xDD, 0x00, 0x50,
-        0xF2, 0x01, 0x01, 0x00, 0x00, 0x50, 0xF2, 0x05, 0x02, 0x00, 0x00, 0x50, 0xF2, 0x02, 0x00, 0x50,
-        0xF2, 0x04, 0x02, 0x00, 0x00, 0x50, 0xF2, 0x00, 0x00, 0x50, 0xF2, 0x01, 0x06, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x15, 0x00, 0x14, 0x00, 0x15, 0x00, 0x36, 0x00, 0x10, 0x00, 0x10, 0x00, 0x10, 0x00, 0x14, 0x00,
-        0x11, 0x00, 0x36, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x01, 0x00, 0x10, 0x00, 0xBE, 0x33, 0x1E, 0x33, 0xCC, 0x35, 0xD0, 0x35, 0xD4, 0x35, 0x12, 0x34,
-        0x04, 0x36, 0x08, 0x36, 0xF2, 0x33, 0x00, 0x00, 0x00, 0x00, 0x24, 0x2F, 0x14, 0x33, 0x08, 0x36,
-        0xFF, 0xFF, 0x00, 0x00, 0xBE, 0x33, 0x1E, 0x33, 0xCC, 0x35, 0xD0, 0x35, 0xD4, 0x35, 0x12, 0x34,
-        0x04, 0x36, 0x08, 0x36, 0xF2, 0x33, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x00, 0xBE, 0x33, 0x14, 0x33, 0x08, 0x36, 0x5C, 0x34, 0x2A, 0x33, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x03, 0x00, 0x02, 0x06, 0x00, 0x00, 0x06, 0x07,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2A,
-        0x00, 0x00, 0x08, 0x32, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x05, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xDD, 0x00, 0x30, 0x00, 0xFF, 0xFF, 0x1D, 0xFA,
-        0xF9, 0xF9, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x19, 0x0A,
-        0x09, 0x46, 0x1C, 0x60, 0x18, 0x00, 0x19, 0x1D, 0x09, 0x42, 0x1C, 0x60, 0x00, 0x00,
-
-};  /* fw_image_2_data */
-
-static const hcf_8 fw_image_3_data[] = {
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x26, 0x1A, 0x00, 0x80, 0x3A, 0x15, 0x00, 0x7F, 0xF1,
-        0x32, 0xF2, 0x33, 0xF2, 0xD0, 0x80, 0x80, 0xF1, 0x0F, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x81, 0xF1,
-        0x0B, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x08, 0x02, 0xE9, 0x60, 0x58, 0x4F, 0x30, 0x78, 0xFF, 0xFF,
-        0x24, 0x60, 0x58, 0x4F, 0xE3, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xD7, 0x78, 0xFF, 0xFF, 0x00, 0xF4,
-        0xAA, 0x60, 0xAA, 0x65, 0x09, 0xF2, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64, 0x12, 0x02, 0xD0, 0x80,
-        0x1D, 0x60, 0x60, 0x65, 0x0E, 0x02, 0x5A, 0xD2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x60, 0x00, 0x65,
-        0x08, 0x02, 0x5A, 0xD2, 0xFF, 0xFF, 0xD4, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0x1C, 0x60, 0xD7, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0xEA, 0xF1, 0x5A, 0xD1, 0x44, 0x48, 0x5A, 0xD1, 0x44, 0x4A, 0x26, 0x46,
-        0x3F, 0xF2, 0x00, 0xF4, 0x44, 0x4C, 0xD8, 0x83, 0x70, 0x61, 0x68, 0x65, 0xD7, 0x80, 0xFF, 0xFF,
-        0x07, 0x0E, 0x08, 0xF2, 0x08, 0x00, 0x68, 0x65, 0xD7, 0x80, 0xFF, 0xFF, 0x01, 0x0E, 0x03, 0x00,
-        0x1C, 0x60, 0xED, 0x78, 0xFF, 0xFF, 0x58, 0x4F, 0x79, 0x00, 0x9C, 0x80, 0x01, 0x65, 0x02, 0x02,
-        0x00, 0x65, 0x02, 0x00, 0xFF, 0x3B, 0xF7, 0x01, 0x58, 0x4F, 0x70, 0x00, 0x9C, 0x80, 0x45, 0x42,
-        0xEA, 0x02, 0x58, 0x4F, 0x6B, 0x00, 0x9C, 0x80, 0xFF, 0xFF, 0xE5, 0x02, 0x58, 0x4F, 0x66, 0x00,
-        0x9C, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0x00, 0x65, 0x45, 0x42, 0xF8, 0x01, 0xFF, 0x3A, 0x29, 0x00,
-        0x60, 0x47, 0xFF, 0xB5, 0x28, 0x44, 0xFF, 0xB4, 0x94, 0x80, 0xFF, 0xFF, 0xD4, 0x02, 0x60, 0x45,
-        0x28, 0x47, 0x2A, 0x5F, 0x40, 0x48, 0x2A, 0x47, 0x2C, 0x5F, 0x40, 0x4A, 0x2C, 0x47, 0x65, 0x5F,
-        0x40, 0x4C, 0x10, 0x64, 0x40, 0x42, 0x28, 0x45, 0x05, 0x00, 0x58, 0x4F, 0x47, 0x00, 0x94, 0x80,
-        0x28, 0x45, 0x26, 0x02, 0x58, 0x4F, 0x42, 0x00, 0x94, 0x80, 0x2A, 0x45, 0x21, 0x02, 0x58, 0x4F,
-        0x3D, 0x00, 0x94, 0x80, 0xFF, 0xFF, 0x1C, 0x02, 0x22, 0x44, 0x4C, 0x82, 0x2C, 0x45, 0x31, 0x03,
-        0xEC, 0x01, 0x10, 0x65, 0x45, 0x42, 0x28, 0x45, 0x94, 0x80, 0x2A, 0x45, 0x21, 0x02, 0x58, 0x4F,
-        0x2D, 0x00, 0x94, 0x80, 0x2C, 0x45, 0x1C, 0x02, 0x58, 0x4F, 0x28, 0x00, 0x94, 0x80, 0xFF, 0xFF,
-        0x17, 0x02, 0x22, 0x44, 0x4C, 0x82, 0x28, 0x45, 0x1C, 0x03, 0x58, 0x4F, 0x1F, 0x00, 0xEC, 0x01,
-        0x40, 0x4B, 0x28, 0x47, 0x40, 0x48, 0x2A, 0x47, 0x40, 0x4A, 0x2C, 0x47, 0x60, 0x45, 0x2A, 0x5E,
-        0x40, 0x4C, 0x2A, 0x44, 0x28, 0x5E, 0x40, 0x4A, 0x28, 0x44, 0x65, 0x5E, 0x40, 0x48, 0x2B, 0x44,
-        0x68, 0x65, 0xD7, 0x80, 0xFF, 0xFF, 0x17, 0x0E, 0x90, 0x01, 0x26, 0x46, 0xD0, 0x60, 0xB5, 0x78,
-        0xFF, 0xFF, 0xB9, 0xFF, 0x26, 0x46, 0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0xC9, 0x81, 0xCB, 0x83,
-        0x07, 0x1C, 0x01, 0x1D, 0x08, 0x00, 0x00, 0xF4, 0x01, 0xF2, 0xFF, 0xFF, 0xFF, 0xB4, 0xD8, 0x81,
-        0x5A, 0xD2, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0xD0, 0x60, 0x58, 0x4F, 0xD1, 0x78, 0xFF, 0xFF,
-        0x01, 0x60, 0xFE, 0x61, 0x00, 0xF4, 0x12, 0x63, 0x6A, 0x64, 0x01, 0x65, 0xBD, 0xD0, 0xC8, 0x84,
-        0x59, 0xD9, 0xFC, 0x02, 0x65, 0x40, 0x01, 0x3A, 0x05, 0x00, 0x00, 0xF4, 0x00, 0x65, 0x0E, 0x64,
-        0x04, 0x63, 0xF4, 0x01, 0x2F, 0x60, 0x58, 0x64, 0x0E, 0x60, 0xD9, 0xFB, 0x1D, 0x60, 0xB0, 0x64,
-        0xA0, 0xDF, 0x17, 0x60, 0xA8, 0xF3, 0x0E, 0x60, 0xDB, 0xFB, 0x0E, 0x60, 0xDB, 0xF3, 0x0E, 0x60,
-        0xD8, 0xF3, 0x60, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x03, 0x02, 0x1D, 0x60, 0x7B, 0x78, 0xFF, 0xFF,
-        0x01, 0x64, 0x0E, 0x60, 0xD7, 0xFB, 0x0E, 0x60, 0xD9, 0xF3, 0x02, 0x60, 0x00, 0x61, 0x40, 0x48,
-        0x40, 0x4A, 0xFA, 0xA4, 0xA0, 0xD3, 0x41, 0x4C, 0xDC, 0x84, 0xA8, 0x84, 0x0E, 0x60, 0xDC, 0xFB,
-        0x28, 0x45, 0x44, 0x8B, 0x2B, 0xD3, 0x0E, 0x60, 0xDA, 0xFB, 0x28, 0x42, 0x4A, 0xD3, 0x2C, 0x45,
-        0x44, 0x8C, 0x01, 0x64, 0x40, 0x48, 0x0E, 0x60, 0xDC, 0xF3, 0xFF, 0xFF, 0x36, 0x18, 0xCC, 0x84,
-        0xA2, 0xDB, 0x0E, 0x60, 0xDA, 0xF3, 0x28, 0x45, 0xA4, 0x80, 0xFF, 0xFF, 0x08, 0x03, 0x60, 0xFE,
-        0x2C, 0xD3, 0x2A, 0xD3, 0x60, 0x45, 0xD4, 0x80, 0x20, 0xFE, 0x01, 0x03, 0x12, 0x00, 0x28, 0x44,
-        0xE0, 0x84, 0xFF, 0xFF, 0x02, 0x24, 0x01, 0x00, 0x06, 0x00, 0x2B, 0x44, 0x58, 0x8B, 0x2B, 0xD3,
-        0x0E, 0x60, 0xDA, 0xFB, 0x01, 0x64, 0x40, 0x48, 0x2A, 0x44, 0x5C, 0x8A, 0x2C, 0x44, 0x5C, 0x8C,
-        0xDA, 0x01, 0x00, 0x64, 0x0E, 0x60, 0xD7, 0xFB, 0x0E, 0x60, 0xD9, 0xF3, 0xFF, 0xFF, 0x60, 0x45,
-        0xFA, 0xA4, 0xA0, 0xD3, 0xFF, 0xFF, 0xC4, 0x81, 0x65, 0x44, 0xFC, 0xA4, 0xA0, 0xD3, 0x06, 0xA1,
-        0xDC, 0x84, 0xA8, 0x84, 0x44, 0x94, 0x0E, 0x60, 0xD9, 0xFB, 0x0E, 0x60, 0xD7, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x26, 0x09, 0x00, 0x0E, 0x60, 0xD8, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0xA2, 0xDB,
-        0x94, 0x01, 0x1C, 0x60, 0xD7, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xDB, 0x78, 0xFF, 0xFF, 0x00, 0x60,
-        0x2E, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x25, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x5F, 0xFB, 0x01, 0x60,
-        0x05, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x25, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x5E, 0xFB, 0x00, 0x60,
-        0x02, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x25, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x65, 0xFB, 0x1F, 0x60,
-        0x6D, 0x64, 0x08, 0x60, 0x36, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x01, 0x64, 0xDB, 0xFB, 0xF1, 0xF3,
-        0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB, 0x10, 0x60, 0x30, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60,
-        0x14, 0x63, 0x01, 0x60, 0xC2, 0x61, 0x2D, 0x60, 0x98, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F,
-        0x00, 0x60, 0x8A, 0x63, 0x2D, 0x60, 0x0C, 0x61, 0x2D, 0x60, 0xB0, 0x64, 0x58, 0xD1, 0x59, 0xD9,
-        0xFD, 0x1F, 0x16, 0x60, 0xAB, 0xF3, 0x19, 0x60, 0x48, 0xF1, 0xFF, 0xB5, 0x64, 0x40, 0x02, 0x2B,
-        0x0B, 0x00, 0x60, 0x40, 0x03, 0x2E, 0x08, 0x00, 0x80, 0x2B, 0x06, 0x00, 0x32, 0x44, 0x00, 0x60,
-        0x80, 0x63, 0x3C, 0x94, 0x40, 0x52, 0x05, 0x00, 0x32, 0x44, 0xFF, 0x60, 0x7F, 0x63, 0x2C, 0x94,
-        0x40, 0x52, 0x65, 0x43, 0x16, 0x60, 0xAB, 0xFD, 0x16, 0x60, 0xC2, 0xF1, 0x66, 0x41, 0xA6, 0xF5,
-        0x3A, 0xF2, 0x64, 0x40, 0x01, 0x36, 0x22, 0x64, 0x3A, 0xFA, 0x61, 0x46, 0x32, 0x45, 0x16, 0x60,
-        0xCB, 0xF1, 0x10, 0x67, 0xB4, 0x85, 0x64, 0x40, 0x01, 0x2A, 0x94, 0x85, 0x45, 0x52, 0xFF, 0x60,
-        0xE7, 0x65, 0x32, 0x41, 0xA5, 0x81, 0x16, 0x60, 0xC2, 0xF3, 0x08, 0x65, 0xFF, 0xA0, 0xFF, 0xFF,
-        0x01, 0x03, 0x07, 0x00, 0x16, 0x60, 0xC4, 0xF3, 0xB5, 0x81, 0x10, 0x65, 0x60, 0x40, 0x01, 0x26,
-        0xB5, 0x81, 0x41, 0x52, 0x19, 0x60, 0x48, 0xF3, 0x37, 0x60, 0xE6, 0x63, 0xF0, 0x84, 0xF0, 0x84,
-        0xF0, 0x84, 0x03, 0xB5, 0xF0, 0x84, 0xF0, 0x84, 0x03, 0xB4, 0x65, 0x5C, 0xA3, 0xD9, 0x37, 0x60,
-        0xE8, 0x63, 0x02, 0xA8, 0xA3, 0xDB, 0x15, 0x02, 0x00, 0x60, 0xC8, 0x64, 0x1B, 0x60, 0xF5, 0xFB,
-        0x1B, 0x60, 0xF9, 0xFB, 0x07, 0x60, 0xD0, 0x64, 0x1B, 0x60, 0xF6, 0xFB, 0x1B, 0x60, 0xFA, 0xFB,
-        0x01, 0x60, 0x90, 0x64, 0x1B, 0x60, 0xF7, 0xFB, 0x00, 0x60, 0x64, 0x64, 0x1B, 0x60, 0xF8, 0xFB,
-        0x06, 0x00, 0x64, 0x64, 0x1B, 0x60, 0xF7, 0xFB, 0x64, 0x64, 0x1B, 0x60, 0xF8, 0xFB, 0x19, 0x60,
-        0x48, 0xF1, 0x01, 0x64, 0x64, 0x40, 0x40, 0x2A, 0x02, 0x00, 0x1B, 0x60, 0xEE, 0xFB, 0x33, 0x60,
-        0xBC, 0x61, 0x2D, 0x60, 0x0E, 0x64, 0x20, 0x63, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0xBA, 0xF1,
-        0x7E, 0xF9, 0x1A, 0x63, 0x00, 0x60, 0xFC, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F, 0x40, 0x40,
-        0x01, 0x64, 0x85, 0xFB, 0x17, 0x60, 0x14, 0xF3, 0x35, 0x60, 0x36, 0x61, 0xFE, 0xA4, 0xE0, 0x84,
-        0x04, 0x24, 0x0C, 0x00, 0xE0, 0x84, 0x41, 0x91, 0x1A, 0x60, 0x1F, 0xF3, 0xA1, 0xD1, 0x59, 0xD1,
-        0xA0, 0x83, 0x1A, 0x60, 0x1B, 0xFD, 0xA0, 0x83, 0x1A, 0x60, 0x1A, 0xFD, 0xE4, 0xF3, 0x7D, 0xFB,
-        0xCF, 0xF1, 0x10, 0x60, 0xEC, 0x63, 0x2F, 0x18, 0x60, 0x40, 0x01, 0x27, 0x12, 0x00, 0xCC, 0x84,
-        0x06, 0xA3, 0xFD, 0x02, 0xA3, 0xD3, 0x10, 0x60, 0xF2, 0x63, 0x25, 0x1B, 0x11, 0x60, 0x44, 0x65,
-        0xA3, 0xD3, 0x06, 0xA3, 0xD7, 0x80, 0x02, 0x1B, 0xFB, 0x04, 0x1D, 0x00, 0xF8, 0xA3, 0xA3, 0xD3,
-        0x18, 0x00, 0x11, 0x60, 0x60, 0x63, 0x12, 0x60, 0x40, 0x65, 0xA3, 0xD1, 0x08, 0xA3, 0xD0, 0x80,
-        0xD7, 0x80, 0x02, 0x03, 0xFA, 0x04, 0x0F, 0x00, 0xFA, 0xA3, 0xA3, 0xD3, 0x11, 0x60, 0x62, 0x63,
-        0x0A, 0x1B, 0xA3, 0xD3, 0x08, 0xA3, 0xD7, 0x80, 0x02, 0x1B, 0xFB, 0x04, 0x04, 0x00, 0xF6, 0xA3,
-        0xA3, 0xD3, 0xE4, 0xFB, 0x7D, 0xFB, 0x2E, 0x60, 0x2E, 0x64, 0x2D, 0x60, 0x8A, 0x63, 0xA0, 0xD1,
-        0xA3, 0xD9, 0x64, 0x41, 0x58, 0xD1, 0x5B, 0xD9, 0x7D, 0xF3, 0x66, 0x45, 0xA6, 0xF5, 0x60, 0x40,
-        0x01, 0x27, 0x08, 0x00, 0x91, 0xFA, 0x61, 0x44, 0xFD, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF,
-        0x12, 0xFA, 0x07, 0x00, 0x11, 0xF8, 0x64, 0x44, 0xFD, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF,
-        0x12, 0xFA, 0x65, 0x46, 0x46, 0x48, 0xE2, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x05, 0x3A, 0x03, 0x00,
-        0x14, 0x60, 0x22, 0x66, 0x11, 0x00, 0x04, 0x3A, 0x03, 0x00, 0x14, 0x60, 0x16, 0x66, 0x0C, 0x00,
-        0x03, 0x3A, 0x03, 0x00, 0x14, 0x60, 0x0A, 0x66, 0x07, 0x00, 0x02, 0x3A, 0x03, 0x00, 0x13, 0x60,
-        0xFE, 0x66, 0x02, 0x00, 0x13, 0x60, 0xF2, 0x66, 0x60, 0xFE, 0xA6, 0xD3, 0xDE, 0x86, 0x13, 0x60,
-        0xDC, 0xFB, 0xA6, 0xD3, 0xDE, 0x86, 0x28, 0x60, 0x29, 0x63, 0xA3, 0xDB, 0x28, 0x60, 0xA1, 0x63,
-        0xA3, 0xDB, 0xA6, 0xD3, 0xDE, 0x86, 0x13, 0x60, 0xDB, 0xFB, 0xA6, 0xD3, 0xDE, 0x86, 0x27, 0x60,
-        0xB9, 0x63, 0xA3, 0xDB, 0x20, 0xFE, 0xA6, 0xD3, 0xDA, 0x86, 0x60, 0x43, 0x1F, 0xB3, 0x63, 0x5C,
-        0x1F, 0x60, 0x00, 0xB4, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xB0, 0x85, 0x14, 0x60, 0x12, 0xF3,
-        0xFF, 0xFF, 0xFC, 0x60, 0x00, 0xB4, 0xB4, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0x4E, 0xFB, 0x28, 0x60,
-        0xC4, 0x63, 0xA3, 0xD3, 0xA6, 0xD1, 0xDE, 0x86, 0x80, 0x60, 0x7F, 0xB5, 0x64, 0x44, 0x60, 0x47,
-        0xE8, 0x84, 0x7F, 0x60, 0x80, 0xB4, 0xB4, 0x84, 0xA3, 0xDB, 0x60, 0xFE, 0xA6, 0xD3, 0xDE, 0x86,
-        0x13, 0x60, 0xDF, 0xFB, 0xA6, 0xD3, 0xDE, 0x86, 0x00, 0x60, 0xDF, 0xFB, 0xA6, 0xD3, 0xDE, 0x86,
-        0x00, 0x60, 0xE0, 0xFB, 0xA6, 0xD3, 0x00, 0x60, 0xE1, 0xFB, 0x20, 0xFE, 0x28, 0x46, 0x19, 0x60,
-        0x4D, 0xF1, 0x00, 0x60, 0xCF, 0xF3, 0x64, 0x40, 0x00, 0x3A, 0x0F, 0x00, 0x60, 0x40, 0x01, 0x36,
-        0x05, 0x00, 0x02, 0x36, 0x03, 0x00, 0x07, 0x36, 0x01, 0x00, 0x07, 0x00, 0x10, 0x60, 0xF0, 0x64,
-        0x00, 0x7C, 0x44, 0xA4, 0xA0, 0xD9, 0x06, 0xA4, 0xA0, 0xD9, 0x36, 0x40, 0x08, 0x3A, 0x03, 0x00,
-        0xF3, 0x60, 0x0A, 0x78, 0xFF, 0xFF, 0x00, 0x63, 0x10, 0x60, 0x10, 0xFD, 0x10, 0x60, 0x30, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x19, 0xFB,
-        0x1E, 0x60, 0x8D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7D, 0xF1, 0x13, 0x60,
-        0x1A, 0xF9, 0x0C, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x07, 0x64, 0xCC, 0xFB, 0x20, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x19, 0xFB, 0x1F, 0x60, 0x53, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x30, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1,
-        0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xC5, 0xFE, 0x08, 0x60, 0x15, 0xF1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x64, 0x08, 0x60, 0x18, 0xFB,
-        0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x30, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x02, 0x64,
-        0x89, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x08, 0x60, 0x30, 0xF1, 0x00, 0x60, 0xDF, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x64, 0x13, 0x60, 0x21, 0xFB, 0xFF, 0xFF, 0x04, 0xFF, 0x08, 0x60,
-        0x18, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x60, 0x08, 0x64,
-        0x08, 0x60, 0x19, 0xFB, 0x1F, 0x60, 0x92, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x18, 0xF1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x89, 0xF3, 0x00, 0x65,
-        0xD4, 0x80, 0xFF, 0xFF, 0x0A, 0x03, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x19, 0xFB, 0x1F, 0x60,
-        0x92, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x95, 0xF3, 0xFF, 0xFF, 0x7F, 0xB4,
-        0x95, 0xFB, 0xDE, 0xFE, 0x0A, 0x04, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x19, 0xFB, 0x1F, 0x60,
-        0xB7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x60, 0x34, 0x62, 0x06, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x18, 0xFB, 0x5A, 0xDB, 0xBE, 0xFE,
-        0xDA, 0xFE, 0x25, 0x60, 0xDA, 0x61, 0x1F, 0x60, 0x58, 0x4E, 0xEA, 0x78, 0xFF, 0xFF, 0x25, 0x60,
-        0xC8, 0x61, 0x1F, 0x60, 0x58, 0x4E, 0xEA, 0x78, 0xFF, 0xFF, 0x25, 0x60, 0xCE, 0x61, 0x1F, 0x60,
-        0x58, 0x4E, 0xEA, 0x78, 0xFF, 0xFF, 0x25, 0x60, 0xEC, 0x61, 0x1F, 0x60, 0x58, 0x4E, 0xEA, 0x78,
-        0xFF, 0xFF, 0x25, 0x60, 0xF2, 0x61, 0x1F, 0x60, 0x58, 0x4E, 0xEA, 0x78, 0xFF, 0xFF, 0x25, 0x60,
-        0xFE, 0x61, 0x1F, 0x60, 0x58, 0x4E, 0xEA, 0x78, 0xFF, 0xFF, 0xC5, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0xA1, 0xD3, 0x0E, 0x57, 0x23, 0x00, 0x0E, 0xF2, 0x44, 0x4C, 0x80, 0xB0, 0x10, 0xB0, 0x0A, 0x03,
-        0x00, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x13, 0x00, 0x12, 0x02, 0xF0, 0x37, 0x09, 0x00, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64,
-        0xD0, 0x80, 0xA2, 0xFF, 0xAD, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0xAD, 0xFB, 0x26, 0x60, 0x1A, 0x64,
-        0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x2C, 0x44, 0xAC, 0x86, 0x09, 0xF0,
-        0xDA, 0x02, 0x37, 0x58, 0xFF, 0xFF, 0x2E, 0x58, 0xFF, 0xFF, 0x2E, 0x58, 0xFF, 0xFF, 0x23, 0x60,
-        0x85, 0x64, 0x08, 0x60, 0x32, 0xFB, 0x1C, 0x60, 0xB6, 0x62, 0xA2, 0xDF, 0x06, 0xA2, 0x10, 0x60,
-        0x88, 0x64, 0xA2, 0xDB, 0x06, 0x64, 0x5A, 0xDB, 0x5A, 0xDB, 0x1C, 0x60, 0xC2, 0x62, 0xA2, 0xDF,
-        0x06, 0xA2, 0x10, 0x60, 0x8C, 0x64, 0xA2, 0xDB, 0x06, 0x64, 0x5A, 0xDB, 0x5A, 0xDB, 0x1C, 0x60,
-        0xCE, 0x62, 0xA2, 0xDF, 0x06, 0xA2, 0x10, 0x60, 0x90, 0x64, 0xA2, 0xDB, 0x06, 0x64, 0x5A, 0xDB,
-        0x5A, 0xDB, 0xBD, 0xF1, 0x0E, 0x60, 0x69, 0xF9, 0x24, 0x60, 0xC1, 0x64, 0x08, 0x60, 0x43, 0xFB,
-        0x24, 0x60, 0xCA, 0x64, 0x08, 0x60, 0x45, 0xFB, 0x24, 0x60, 0xD3, 0x64, 0x08, 0x60, 0x47, 0xFB,
-        0x00, 0x60, 0x3A, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x62, 0xFB,
-        0x04, 0x64, 0x03, 0xFA, 0xA6, 0xF3, 0x07, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x00, 0x60,
-        0x02, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x20, 0x60, 0x63, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x18, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x03, 0x64, 0x69, 0xFB, 0x0F, 0x4E,
-        0xEA, 0x60, 0x58, 0x4F, 0x34, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0x00, 0x64, 0x6B, 0xFB, 0x62, 0xF5,
-        0xEA, 0xF3, 0x2F, 0xFA, 0xEB, 0xF3, 0x30, 0xFA, 0xEC, 0xF3, 0x31, 0xFA, 0x7F, 0xF3, 0x2C, 0xFA,
-        0x32, 0xFA, 0x80, 0xF3, 0x2D, 0xFA, 0x33, 0xFA, 0x81, 0xF3, 0x2E, 0xFA, 0x34, 0xFA, 0xB9, 0xF3,
-        0x19, 0xFA, 0x06, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80,
-        0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x08, 0x60,
-        0x0C, 0xF1, 0xFF, 0x60, 0x8F, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xBE, 0xF1, 0x0E, 0x60, 0x63, 0xF9,
-        0x1C, 0x60, 0xC2, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x00, 0x64, 0x6B, 0xFB, 0x00, 0x60, 0x74, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x20, 0x60, 0xAE, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x04, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x23, 0x60, 0x85, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xE2, 0x01,
-        0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x11, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40,
-        0x50, 0x27, 0xD8, 0x01, 0xAC, 0xF3, 0xFF, 0xFF, 0xFE, 0xA0, 0xFF, 0xFF, 0x0F, 0x06, 0x6B, 0xF3,
-        0xFF, 0xFF, 0xEC, 0xA0, 0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0xCC, 0x01, 0x00, 0x60, 0x10, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0xCF, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x01, 0x00, 0xC3, 0x01, 0x01, 0x64,
-        0x19, 0x60, 0xF3, 0xFB, 0xDF, 0xF3, 0x29, 0x45, 0xD4, 0x80, 0x6B, 0xF3, 0x03, 0x04, 0x21, 0x60,
-        0x28, 0x78, 0xFF, 0xFF, 0xEC, 0xA0, 0x00, 0x64, 0x04, 0x04, 0x40, 0x49, 0x21, 0x60, 0x28, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0x64, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x20, 0x60, 0xFD, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x23, 0x60, 0x85, 0x78, 0xFF, 0xFF, 0x00, 0x60,
-        0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xD0, 0x01, 0x00, 0x60,
-        0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xE5, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40, 0x50, 0x27,
-        0xE0, 0x01, 0xAC, 0xF3, 0xFF, 0xFF, 0xFE, 0xA0, 0xFF, 0xFF, 0x07, 0x06, 0x6B, 0xF3, 0xFF, 0xFF,
-        0xEC, 0xA0, 0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0xBA, 0x01, 0xB9, 0x01, 0x33, 0x60, 0xE6, 0x65,
-        0xA5, 0xDF, 0xBF, 0xF1, 0x0E, 0x60, 0x63, 0xF9, 0xE0, 0xF3, 0x29, 0x45, 0x03, 0xA4, 0xD4, 0x80,
-        0x01, 0x63, 0x01, 0x05, 0x00, 0x63, 0x53, 0xFD, 0x7D, 0xF3, 0x01, 0x60, 0x00, 0x65, 0xA4, 0x80,
-        0x24, 0x44, 0xFE, 0xB4, 0x01, 0x03, 0x01, 0xBC, 0x40, 0x44, 0x21, 0x60, 0x45, 0x64, 0x6A, 0xFB,
-        0x23, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0xFF, 0x60, 0xDF, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x86, 0xF1, 0x1B, 0x60, 0xB2, 0x63, 0xD3, 0x80, 0x67, 0xFD, 0x43, 0x03, 0x67, 0xF3,
-        0xE1, 0xF1, 0x60, 0x43, 0x29, 0x44, 0xA3, 0xD3, 0xC0, 0x85, 0xD4, 0x80, 0x5B, 0xD3, 0x3A, 0x06,
-        0x60, 0x43, 0x08, 0xA3, 0xBE, 0xD3, 0x81, 0xF1, 0xA3, 0xD3, 0xD0, 0x80, 0x80, 0xF1, 0x05, 0x02,
-        0xBF, 0xD3, 0xD0, 0x80, 0x7F, 0xF1, 0x01, 0x02, 0xD0, 0x80, 0xF8, 0xA3, 0x28, 0x02, 0x21, 0x60,
-        0x77, 0x64, 0x6A, 0xFB, 0x23, 0x60, 0xB4, 0x78, 0xFF, 0xFF, 0x01, 0xB0, 0x82, 0xF3, 0x22, 0x03,
-        0x62, 0xF5, 0x48, 0x7E, 0x2A, 0xFA, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x60, 0x01, 0x64,
-        0x08, 0x60, 0x0D, 0xFB, 0x21, 0x60, 0x92, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x0C, 0xF1, 0xFF, 0x60, 0xFE, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x03, 0x00, 0x23, 0x60,
-        0x7A, 0x78, 0xFF, 0xFF, 0x6B, 0xF3, 0xFF, 0xFF, 0xEC, 0xA0, 0x00, 0x64, 0x02, 0x04, 0x40, 0x49,
-        0x15, 0x00, 0xDF, 0xF3, 0x29, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x0B, 0x07, 0x1C, 0x60, 0xC2, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x20, 0x60, 0x86, 0x78,
-        0xFF, 0xFF, 0xE0, 0xF3, 0x29, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x16, 0x06, 0x04, 0x65, 0xF1, 0x60,
-        0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF, 0x05, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0x01, 0xBC,
-        0xF1, 0xFB, 0x1C, 0x60, 0xC2, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x22, 0x60, 0x1B, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x74, 0x64, 0x08, 0x60, 0x0D, 0xFB,
-        0x21, 0x60, 0xD8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1,
-        0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x23, 0x60,
-        0x85, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0xB0, 0x01, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x15, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x20, 0x40, 0x50, 0x27, 0xA6, 0x01, 0xAC, 0xF3, 0x6B, 0xF3, 0xFE, 0xA0, 0xEC, 0xA0,
-        0x0A, 0x06, 0x03, 0x04, 0x00, 0x64, 0x55, 0xFB, 0x40, 0x49, 0x6B, 0xF3, 0xFF, 0xFF, 0xEC, 0xA0,
-        0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0x96, 0x01, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x0D, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x21, 0x60, 0x28, 0x78, 0xFF, 0xFF, 0x21, 0x60, 0x9C, 0x78,
-        0xFF, 0xFF, 0x7D, 0xF3, 0x01, 0x60, 0x00, 0x65, 0xA4, 0x80, 0x24, 0x44, 0xFE, 0xB4, 0x01, 0x03,
-        0x01, 0xBC, 0x02, 0xB0, 0xFB, 0xB4, 0x01, 0x03, 0x04, 0xBC, 0x40, 0x44, 0xC0, 0xF1, 0x0E, 0x60,
-        0x63, 0xF9, 0xCF, 0xF3, 0x20, 0x60, 0x20, 0x65, 0x30, 0x1B, 0xA5, 0xD3, 0x24, 0x40, 0x01, 0x26,
-        0x16, 0x00, 0x60, 0x40, 0x20, 0x26, 0x29, 0x00, 0x01, 0xBC, 0xA5, 0xDB, 0x08, 0x60, 0x1E, 0xF1,
-        0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x0D, 0xFB, 0x22, 0x60, 0x5F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x60, 0x40,
-        0x10, 0x26, 0x13, 0x00, 0x01, 0xBC, 0xA5, 0xDB, 0x08, 0x60, 0x1E, 0xF1, 0x00, 0x60, 0x40, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x22, 0x60,
-        0x5F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0D, 0x64, 0x53, 0xFB, 0x22, 0x60,
-        0x67, 0x64, 0x6A, 0xFB, 0x23, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0xFF, 0x60,
-        0xDF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x86, 0xF1, 0x1B, 0x60, 0xB2, 0x63, 0xD3, 0x80, 0x67, 0xFD,
-        0x07, 0x02, 0x24, 0x44, 0x04, 0xB0, 0xFF, 0xFF, 0x36, 0x03, 0x05, 0xAC, 0x40, 0x44, 0xA6, 0x01,
-        0x67, 0xF3, 0x29, 0x41, 0xA0, 0xD1, 0x58, 0xD3, 0xD1, 0x80, 0x64, 0x45, 0x60, 0x43, 0x2B, 0x05,
-        0x08, 0xA3, 0xBE, 0xD3, 0x81, 0xF1, 0xA3, 0xD3, 0xD0, 0x80, 0x80, 0xF1, 0x05, 0x02, 0xBF, 0xD3,
-        0xD0, 0x80, 0x7F, 0xF1, 0x01, 0x02, 0xD0, 0x80, 0xF8, 0xA3, 0x07, 0x02, 0x45, 0x49, 0x22, 0x60,
-        0xCD, 0x64, 0x6A, 0xFB, 0x23, 0x60, 0xB4, 0x78, 0xFF, 0xFF, 0x05, 0x65, 0xF1, 0x60, 0x58, 0x4E,
-        0xC3, 0x78, 0xFF, 0xFF, 0x04, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB,
-        0x23, 0x60, 0x7A, 0x78, 0xFF, 0xFF, 0x67, 0xF3, 0x86, 0xF1, 0x04, 0xA4, 0xD0, 0x80, 0xFF, 0xFF,
-        0x02, 0x03, 0x67, 0xFB, 0xCD, 0x01, 0x6B, 0xF3, 0xFF, 0xFF, 0xEC, 0xA0, 0xFF, 0xFF, 0x01, 0x04,
-        0x75, 0x00, 0xE0, 0xF3, 0x29, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x70, 0x05, 0x7D, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x27, 0x08, 0x00, 0x22, 0x60, 0xCD, 0x63, 0x6A, 0xFD, 0x1C, 0x60, 0x78, 0x63,
-        0x23, 0x60, 0xB4, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0xC2, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x05, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF,
-        0x20, 0x60, 0x14, 0x61, 0xA1, 0xDF, 0x04, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4,
-        0xF1, 0xFB, 0x82, 0xF3, 0x62, 0xF5, 0x48, 0x7E, 0x2A, 0xFA, 0x02, 0x60, 0x00, 0x65, 0x20, 0x44,
-        0x34, 0x80, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x60, 0x01, 0x64, 0x08, 0x60, 0x0D, 0xFB,
-        0x23, 0x60, 0x00, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1,
-        0xFF, 0x60, 0xFE, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x00, 0x60, 0x32, 0x64, 0x0E, 0x60, 0x63, 0xFB,
-        0x1C, 0x60, 0xC2, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x00, 0x60, 0x10, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x23, 0x60, 0x1C, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0xFD, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x20, 0x60, 0x86, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x74, 0x64,
-        0x08, 0x60, 0x0D, 0xFB, 0x23, 0x60, 0x3A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x23, 0x60, 0x85, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x40, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x67, 0x01, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x15, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40, 0x50, 0x27, 0xE0, 0x01, 0xAC, 0xF3, 0x6B, 0xF3,
-        0xFE, 0xA0, 0xEC, 0xA0, 0x0A, 0x06, 0x03, 0x04, 0x00, 0x64, 0x55, 0xFB, 0x40, 0x49, 0x6B, 0xF3,
-        0xFF, 0xFF, 0xEC, 0xA0, 0xDC, 0x84, 0x01, 0x05, 0xA2, 0xDB, 0x4D, 0x01, 0x00, 0x60, 0x10, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0xCB, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x22, 0x60, 0x1B, 0x78, 0xFF, 0xFF,
-        0x08, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x20, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x1C, 0x60, 0xB6, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1C, 0x60, 0xC2, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1C, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x0C, 0xFB, 0x5A, 0xDB, 0x00, 0x64,
-        0x69, 0xFB, 0x08, 0x60, 0x08, 0xF1, 0x02, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x00, 0x60, 0x02, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x20, 0x60, 0x63, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xA3, 0xD3, 0x7D, 0xF1, 0x7C, 0xFB, 0xD0, 0x80, 0x00, 0x64, 0x39, 0x03,
-        0x08, 0x60, 0x0C, 0xF1, 0xBF, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04,
-        0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x23, 0x60, 0xBA, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0xDF, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x7C, 0xF1, 0x7D, 0xF9, 0x13, 0x60, 0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x23, 0x60, 0xE4, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x08, 0x60, 0x0C, 0xF1, 0xDF, 0x60, 0xFF, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x01, 0x64, 0x6A, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80,
-        0x08, 0x60, 0x0C, 0xF1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x20, 0x40, 0x51, 0x23,
-        0x0A, 0x00, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x23, 0x60, 0xFA, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0x7F, 0x60, 0xFF, 0x61, 0xA1, 0x84,
-        0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x02, 0x64, 0x8A, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE,
-        0x8A, 0xF3, 0x00, 0x65, 0xD4, 0x80, 0xFF, 0xFF, 0x10, 0x03, 0x08, 0x60, 0x0C, 0xF1, 0x7F, 0x60,
-        0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x24, 0x60,
-        0x16, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x33, 0x60, 0xBE, 0x64, 0x54, 0xFB,
-        0x08, 0x60, 0x0C, 0xF1, 0xEF, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x24, 0x44, 0x01, 0xB0,
-        0xFF, 0xFF, 0x08, 0x02, 0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x07, 0x00, 0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x0D, 0xFB, 0x24, 0x60, 0x55, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0xC2, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0xEF, 0x60, 0xEF, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x01, 0x64, 0x8A, 0xFB, 0x6B, 0xF3, 0x00, 0x60, 0x95, 0xF3, 0xEC, 0xA0, 0x40, 0xBC,
-        0x06, 0x04, 0xA2, 0xDB, 0x69, 0xF1, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0x69, 0xFB, 0xFD, 0x60,
-        0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x6A, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x55, 0xF1, 0x28, 0x44,
-        0xD0, 0x84, 0x03, 0xA4, 0x03, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0x04, 0x00, 0xFA, 0xA4, 0xE8, 0x84,
-        0xE8, 0x87, 0xC0, 0xBF, 0xC0, 0x84, 0xA2, 0xDB, 0x2E, 0x58, 0xFF, 0xFF, 0x56, 0xF1, 0x28, 0x44,
-        0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF,
-        0xC0, 0x84, 0x5B, 0xF1, 0x56, 0xFB, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x05, 0x64, 0x44, 0x52, 0xFB,
-        0x2E, 0x58, 0xFF, 0xFF, 0x52, 0xF1, 0x2F, 0x67, 0xD0, 0x80, 0x60, 0x45, 0x02, 0x28, 0x64, 0x45,
-        0x55, 0xF1, 0x8B, 0x67, 0xD0, 0x80, 0x60, 0x41, 0x02, 0x24, 0x64, 0x41, 0xD5, 0x84, 0x80, 0x65,
-        0xC4, 0x87, 0x01, 0x05, 0x00, 0x64, 0xFF, 0xB4, 0x40, 0x49, 0x2E, 0x58, 0xFF, 0xFF, 0x08, 0x60,
-        0x0C, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x40, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x26, 0x46, 0x27, 0xF2, 0x70, 0x63, 0x60, 0x40, 0x0A, 0x36, 0x10, 0x00, 0x14, 0x36,
-        0x14, 0x00, 0x37, 0x36, 0x0E, 0x00, 0x6E, 0x36, 0x0E, 0x00, 0x06, 0x36, 0x04, 0x00, 0x09, 0x36,
-        0x04, 0x00, 0x18, 0x63, 0x0A, 0x00, 0x30, 0x63, 0x08, 0x00, 0x26, 0x63, 0x06, 0x00, 0xD0, 0x63,
-        0x04, 0x00, 0x33, 0x63, 0x02, 0x00, 0x21, 0x63, 0x00, 0x00, 0x10, 0x60, 0x0E, 0xFD, 0x26, 0x46,
-        0x3F, 0xF2, 0x87, 0xF0, 0x00, 0xF4, 0x45, 0x43, 0x03, 0x4B, 0x60, 0x43, 0xF4, 0xA3, 0x00, 0x60,
-        0x1D, 0x61, 0x00, 0x60, 0x01, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E,
-        0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x00, 0x02, 0x00, 0x64, 0x40, 0x4A, 0x60, 0xFE,
-        0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60, 0x58, 0x4E, 0x2C, 0x78,
-        0xFF, 0xFF, 0x20, 0xFE, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF4, 0xA3, 0x00, 0x60,
-        0x1D, 0x61, 0x00, 0x60, 0x32, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E,
-        0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x0B, 0x03, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63,
-        0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60, 0x58, 0x4E, 0x2C, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x2A, 0x44, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xF2, 0x01, 0x60,
-        0x00, 0x65, 0xF4, 0xA4, 0xD4, 0x80, 0x60, 0x41, 0x02, 0x24, 0x65, 0x41, 0x41, 0x48, 0x00, 0xF4,
-        0x1E, 0x65, 0x02, 0x60, 0x00, 0x63, 0xA5, 0xD0, 0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4,
-        0x04, 0x65, 0x64, 0x44, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F,
-        0xCD, 0x81, 0xBD, 0xDB, 0xF0, 0x02, 0x02, 0x60, 0x00, 0x63, 0x28, 0x41, 0xBD, 0xD3, 0xBD, 0xD1,
-        0xFD, 0xA0, 0xFE, 0xA1, 0x07, 0x03, 0x09, 0x06, 0x64, 0x44, 0xE0, 0x85, 0xD1, 0x81, 0xC7, 0x83,
-        0xF5, 0x07, 0x03, 0x00, 0xA3, 0xD3, 0x0E, 0x60, 0x3C, 0xFB, 0x31, 0x40, 0x06, 0x26, 0x57, 0x00,
-        0x00, 0x64, 0x6F, 0xFB, 0x02, 0x60, 0x00, 0x63, 0x28, 0x41, 0xBD, 0xD3, 0xBD, 0xD1, 0xFC, 0xA0,
-        0xFB, 0xA0, 0x09, 0x03, 0x28, 0x03, 0x64, 0x44, 0xE0, 0x85, 0xC7, 0x83, 0xD1, 0x81, 0xFE, 0xA1,
-        0x46, 0x06, 0xF3, 0x07, 0x44, 0x00, 0xBD, 0xD3, 0xBD, 0xD3, 0x00, 0xB8, 0x6F, 0xFB, 0x6E, 0xFB,
-        0xBD, 0xD3, 0x3D, 0x02, 0xA3, 0xD3, 0x60, 0x45, 0x60, 0x47, 0xB4, 0x84, 0x60, 0x41, 0x3F, 0xB5,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x71, 0xFB, 0x65, 0x47,
-        0xE0, 0x84, 0xE0, 0x84, 0x70, 0xFB, 0x64, 0x44, 0xE0, 0x85, 0xFA, 0xA3, 0xC7, 0x83, 0x61, 0x44,
-        0x0E, 0x60, 0x38, 0xFB, 0xD2, 0x01, 0xBD, 0xD3, 0xA3, 0xD3, 0x00, 0xB8, 0x6D, 0xFB, 0x73, 0xFB,
-        0x1E, 0x02, 0x85, 0xF1, 0x6F, 0xF3, 0x6C, 0xF9, 0x04, 0x65, 0x60, 0x40, 0x00, 0x3A, 0x06, 0x65,
-        0x31, 0x44, 0xB4, 0x84, 0x40, 0x51, 0x02, 0x2A, 0x0B, 0x00, 0x08, 0xBC, 0x40, 0x51, 0x71, 0xF3,
-        0x70, 0xF1, 0x00, 0xB8, 0x64, 0x45, 0x01, 0x03, 0x67, 0x45, 0x65, 0x50, 0xCC, 0x84, 0x72, 0xFB,
-        0x08, 0x60, 0x15, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x08, 0x60,
-        0x16, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2A, 0x3F, 0x00, 0x01, 0x64, 0x10, 0x60, 0x0A, 0xFB,
-        0x26, 0x60, 0x58, 0x4E, 0x65, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x0D, 0xF2, 0x7E, 0xFB,
-        0x00, 0x64, 0x84, 0xFB, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF4, 0xA3, 0x00, 0x60,
-        0x1D, 0x61, 0x00, 0x60, 0x07, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E,
-        0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x14, 0x03, 0x02, 0x60, 0x00, 0x65, 0xA5, 0xD3,
-        0x1C, 0x60, 0xE6, 0x63, 0xFF, 0xB4, 0x01, 0xA4, 0x60, 0x41, 0xA5, 0xD1, 0xDA, 0x85, 0x64, 0x44,
-        0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB, 0x05, 0x03, 0x64, 0x47, 0x00, 0x7F, 0xCD, 0x81, 0xBD, 0xDB,
-        0xF4, 0x02, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x80, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x32, 0x00, 0x27, 0x60, 0x57, 0x78, 0xFF, 0xFF, 0xDB, 0xF3, 0xFF, 0xFF, 0x03, 0xA8, 0x02, 0xA8,
-        0x02, 0x03, 0x3E, 0x02, 0xF6, 0x01, 0x08, 0x60, 0x15, 0xF1, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x26, 0x46, 0x10, 0x60, 0x0E, 0xF3, 0x25, 0xF2, 0x60, 0x45, 0x24, 0xF0, 0x00, 0xF4,
-        0x64, 0x43, 0xC7, 0x83, 0x60, 0x41, 0x02, 0x24, 0x01, 0xA1, 0x0A, 0xF0, 0x09, 0xF2, 0xD1, 0x80,
-        0xFF, 0xFF, 0x09, 0x07, 0x04, 0x04, 0x63, 0x45, 0xD4, 0x80, 0xFF, 0xFF, 0x04, 0x06, 0x26, 0x60,
-        0x58, 0x4E, 0x65, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x26, 0xF0, 0xFF, 0x67, 0x20, 0x88, 0x64, 0x5F,
-        0x40, 0x4A, 0x24, 0x60, 0x58, 0x4E, 0x80, 0x78, 0xFF, 0xFF, 0x0A, 0x48, 0x24, 0x60, 0x58, 0x4E,
-        0x90, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x0D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x22, 0xB3, 0x01, 0x00, 0x60, 0x95, 0xF3,
-        0xFF, 0xFF, 0xBF, 0xB4, 0xA2, 0xDB, 0x10, 0x60, 0x0E, 0xF3, 0x26, 0x46, 0x60, 0x45, 0x20, 0x60,
-        0x04, 0x63, 0x00, 0xF4, 0x09, 0xF2, 0xBD, 0xDB, 0xFF, 0xFF, 0x0A, 0xF2, 0xBD, 0xDB, 0x0B, 0xF2,
-        0xFF, 0xFF, 0xBD, 0xDB, 0x0C, 0xF2, 0xA3, 0xDB, 0xFA, 0xA3, 0x26, 0x46, 0xA3, 0xD3, 0x24, 0xF0,
-        0x00, 0x61, 0xD0, 0x84, 0xF1, 0x81, 0xD4, 0x84, 0xF1, 0x81, 0xBD, 0xDB, 0xA3, 0xD3, 0x03, 0xB1,
-        0x03, 0xA9, 0x25, 0xF0, 0x42, 0xFE, 0x05, 0x03, 0xFD, 0xA1, 0xCC, 0x84, 0x01, 0x02, 0xCC, 0x84,
-        0x00, 0x61, 0xF1, 0x81, 0xD0, 0x84, 0xF1, 0x81, 0xBD, 0xDB, 0xA3, 0xD3, 0x03, 0xB1, 0x03, 0xA9,
-        0x28, 0xF0, 0x42, 0xFE, 0x01, 0x03, 0xCC, 0x84, 0xF1, 0x81, 0xD0, 0x84, 0xF1, 0x81, 0xBD, 0xDB,
-        0xA3, 0xD3, 0x03, 0xB1, 0x03, 0xA9, 0x29, 0xF0, 0x01, 0x03, 0xCC, 0x84, 0xD0, 0x84, 0xA3, 0xDB,
-        0x10, 0x60, 0x0A, 0xF3, 0xFF, 0xFF, 0x02, 0xA8, 0xFF, 0xFF, 0x02, 0x02, 0x2E, 0x58, 0xFF, 0xFF,
-        0xF5, 0xFE, 0x10, 0x60, 0x02, 0xF1, 0x06, 0xA2, 0xA2, 0xD3, 0x64, 0x45, 0x60, 0x40, 0x80, 0x2B,
-        0x03, 0x00, 0xFF, 0x60, 0xFF, 0x64, 0x94, 0x85, 0x00, 0x60, 0x96, 0x64, 0xD4, 0x80, 0xFF, 0xFF,
-        0x0A, 0x06, 0x10, 0x60, 0x0A, 0xF3, 0x69, 0xF3, 0x00, 0xA8, 0x04, 0xB0, 0x04, 0x02, 0x03, 0x03,
-        0x27, 0x60, 0x33, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0x09, 0xF2, 0x5A, 0xD2, 0x40, 0x48,
-        0x40, 0x4A, 0x5A, 0xD2, 0x5A, 0xD2, 0x40, 0x4C, 0x60, 0x41, 0x5A, 0xD0, 0x7E, 0xF9, 0x40, 0x63,
-        0xAD, 0x80, 0xF0, 0xA3, 0x09, 0x02, 0x3C, 0x03, 0x2C, 0x41, 0x2A, 0x44, 0x40, 0x4C, 0x28, 0x44,
-        0x40, 0x4A, 0x00, 0x64, 0x40, 0x48, 0xF4, 0x01, 0xD1, 0x80, 0x01, 0x02, 0x31, 0x04, 0x10, 0xA3,
-        0x80, 0x60, 0x00, 0x65, 0xA5, 0x80, 0xCF, 0x83, 0x08, 0x02, 0x28, 0x44, 0x60, 0x88, 0x2A, 0x44,
-        0x70, 0x8A, 0x2C, 0x44, 0x70, 0x8C, 0xF1, 0x81, 0xF5, 0x01, 0xE7, 0xA3, 0x64, 0x44, 0x00, 0xA8,
-        0x00, 0x62, 0x02, 0x02, 0x00, 0x61, 0x1C, 0x00, 0xE0, 0x84, 0xDE, 0x82, 0xFD, 0x04, 0x42, 0xFE,
-        0xF8, 0x84, 0x62, 0x45, 0xC7, 0x83, 0x60, 0x45, 0x02, 0xFE, 0xD5, 0x84, 0x02, 0x05, 0x01, 0x05,
-        0x61, 0x44, 0xCF, 0x83, 0x60, 0x41, 0x08, 0x03, 0x28, 0x44, 0x60, 0x88, 0x2A, 0x44, 0x70, 0x8A,
-        0x2C, 0x44, 0x70, 0x8C, 0xF1, 0x81, 0xF1, 0x01, 0xCE, 0x82, 0xE9, 0x81, 0xFD, 0x02, 0xF1, 0x81,
-        0x09, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0xE8, 0x84, 0xE8, 0x84, 0x5A, 0xD2, 0x3F, 0xB5, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x84, 0x61, 0x45, 0xD4, 0x84,
-        0xC0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x93, 0x10, 0x60, 0x0A, 0xF3, 0xFF, 0xFF,
-        0x02, 0x18, 0x2E, 0x58, 0xFF, 0xFF, 0x16, 0x65, 0x32, 0x40, 0x80, 0x26, 0x16, 0x65, 0x73, 0x44,
-        0xD4, 0x93, 0x69, 0xF3, 0x26, 0x46, 0x04, 0xBC, 0xA2, 0xDB, 0x26, 0xF0, 0xFF, 0x67, 0x20, 0x88,
-        0x64, 0x5F, 0x40, 0x4A, 0x24, 0x60, 0x58, 0x4E, 0x80, 0x78, 0xFF, 0xFF, 0x0A, 0x48, 0x24, 0x60,
-        0x58, 0x4E, 0x90, 0x78, 0xFF, 0xFF, 0x24, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x6B, 0xF3,
-        0xFF, 0xFF, 0xC8, 0x84, 0xFF, 0xFF, 0x01, 0x05, 0x00, 0x64, 0x6B, 0xFB, 0x08, 0x60, 0x0C, 0xF1,
-        0x00, 0x60, 0x40, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x1C, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x08, 0x60, 0x0C, 0xF1, 0xFF, 0x60,
-        0xDF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1E, 0xF1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60,
-        0xDA, 0x63, 0xA3, 0xDF, 0x06, 0xA3, 0x10, 0x60, 0xA4, 0x64, 0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64,
-        0xA3, 0xDB, 0x27, 0x60, 0x68, 0x64, 0x08, 0x60, 0x51, 0xFB, 0x10, 0x60, 0x0F, 0xF1, 0x0E, 0x60,
-        0x6F, 0xF9, 0x27, 0x60, 0xCF, 0x64, 0x08, 0x60, 0x38, 0xFB, 0x11, 0x60, 0x44, 0x63, 0x08, 0x60,
-        0x66, 0xFD, 0x12, 0x60, 0x40, 0x63, 0x08, 0x60, 0x67, 0xFD, 0xCF, 0xF3, 0x02, 0x63, 0x01, 0x1B,
-        0xCF, 0xFD, 0xCF, 0xF3, 0xFF, 0xFF, 0xF7, 0xA0, 0x01, 0x64, 0x01, 0x06, 0xCF, 0xFB, 0xCF, 0xF3,
-        0xCF, 0xFB, 0xCF, 0xF3, 0x12, 0x60, 0x78, 0x63, 0x26, 0x18, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03,
-        0x2A, 0xA3, 0xFB, 0x01, 0x63, 0x46, 0x10, 0x60, 0xF2, 0x63, 0x0E, 0x61, 0x60, 0xFE, 0xA6, 0xD1,
-        0xDE, 0x86, 0x01, 0x64, 0x64, 0x40, 0x7F, 0x36, 0x00, 0x64, 0xA3, 0xDB, 0xDB, 0x83, 0xA3, 0xD9,
-        0xCD, 0x81, 0x04, 0xA3, 0xF4, 0x02, 0x11, 0x60, 0x62, 0x63, 0x1C, 0x61, 0xA6, 0xD1, 0xDE, 0x86,
-        0x01, 0x64, 0x64, 0x40, 0x7F, 0x36, 0x00, 0x64, 0xA3, 0xDB, 0xDB, 0x83, 0xA3, 0xD9, 0xCD, 0x81,
-        0x06, 0xA3, 0xF4, 0x02, 0x20, 0xFE, 0x00, 0x60, 0x60, 0x64, 0x08, 0x60, 0x1F, 0xFB, 0x27, 0x60,
-        0xE1, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x11, 0x60, 0x44, 0x63, 0x08, 0x60,
-        0x66, 0xFD, 0x12, 0x60, 0x40, 0x63, 0x08, 0x60, 0x67, 0xFD, 0x00, 0x60, 0x60, 0x64, 0x08, 0x60,
-        0x1F, 0xFB, 0x27, 0x60, 0xE1, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x28, 0xF3,
-        0xFF, 0xFF, 0x60, 0x47, 0x0F, 0xB4, 0x98, 0x00, 0xFF, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x04, 0x64,
-        0x13, 0x60, 0x1C, 0xFB, 0x27, 0x00, 0x0C, 0x64, 0x3F, 0x40, 0x02, 0x2B, 0x23, 0x00, 0x29, 0xF1,
-        0x13, 0x60, 0x1C, 0xFB, 0x5A, 0xD9, 0x27, 0x60, 0xFD, 0x64, 0x9F, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x29, 0x60, 0x1C, 0x63, 0x09, 0x61, 0x3D, 0x60, 0x58, 0x4D,
-        0x23, 0x78, 0xFF, 0xFF, 0x75, 0x00, 0x95, 0xF3, 0xFF, 0xFF, 0x7F, 0xB4, 0x95, 0xFB, 0x06, 0x64,
-        0x13, 0x60, 0x1C, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x08, 0x64,
-        0x13, 0x60, 0x1C, 0xFB, 0x28, 0x60, 0x7A, 0x64, 0x9F, 0xFB, 0xFF, 0xFF, 0x2D, 0xFF, 0x2A, 0x60,
-        0x1D, 0x78, 0xFF, 0xFF, 0x29, 0xF3, 0x12, 0x60, 0x45, 0x65, 0x60, 0x5C, 0x3F, 0x40, 0x02, 0x2B,
-        0x13, 0x00, 0x00, 0x37, 0x11, 0x00, 0x01, 0x3B, 0x53, 0x00, 0x11, 0x60, 0x65, 0x63, 0xFF, 0xB7,
-        0x60, 0x5C, 0xA3, 0xD3, 0x08, 0xA3, 0x00, 0x7E, 0xD0, 0x80, 0xD7, 0x80, 0x02, 0x03, 0xF9, 0x02,
-        0x47, 0x00, 0xF4, 0xA3, 0xA3, 0xD3, 0x05, 0x00, 0x00, 0xBC, 0xF2, 0xA4, 0x41, 0x03, 0x40, 0x07,
-        0x64, 0x44, 0x7D, 0xFB, 0xA1, 0xFB, 0x07, 0x64, 0xA2, 0xFB, 0x28, 0x60, 0x7A, 0x64, 0x9F, 0xFB,
-        0xFF, 0xFF, 0xDF, 0xFE, 0x00, 0x64, 0x19, 0xFF, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x88, 0xFF,
-        0xBA, 0x60, 0x98, 0x71, 0x8D, 0xE2, 0x01, 0x11, 0x09, 0x00, 0x71, 0x40, 0x80, 0x27, 0xFB, 0x01,
-        0x88, 0xE2, 0xBA, 0x60, 0xD0, 0x64, 0x03, 0xFB, 0x8D, 0xFF, 0x15, 0x00, 0x8D, 0xFF, 0x28, 0x60,
-        0xFB, 0x63, 0x06, 0x60, 0x0B, 0xFD, 0xFF, 0xFF, 0x62, 0xFF, 0x28, 0x60, 0x67, 0x63, 0x9F, 0xFD,
-        0xFF, 0xFF, 0x1A, 0xFF, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0xA3, 0x60, 0xF4, 0x63, 0x06, 0x60,
-        0x0B, 0xFD, 0xFF, 0xFF, 0x62, 0xFF, 0x29, 0xF5, 0x26, 0x60, 0x20, 0x63, 0x25, 0x60, 0xF2, 0x64,
-        0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0x02, 0x64, 0xA3, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF9, 0xFE,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x68, 0x01, 0x00, 0x36, 0x69, 0x01, 0x01, 0x36, 0x6B, 0x01,
-        0x02, 0x36, 0x81, 0x01, 0x03, 0x36, 0x8B, 0x01, 0x04, 0x36, 0xC1, 0x01, 0x05, 0x36, 0xBF, 0x01,
-        0x06, 0x36, 0xF1, 0x01, 0x07, 0x36, 0xBB, 0x01, 0x08, 0x36, 0x8C, 0x01, 0x09, 0x36, 0x0C, 0x00,
-        0x0A, 0x36, 0x0D, 0x00, 0x0B, 0x36, 0x0E, 0x00, 0x0C, 0x36, 0x17, 0x00, 0x0D, 0x36, 0x0D, 0x00,
-        0x0E, 0x36, 0x1D, 0x00, 0x0F, 0x36, 0x41, 0x00, 0x02, 0x60, 0x00, 0x64, 0x08, 0x00, 0x04, 0x60,
-        0x00, 0x64, 0x05, 0x00, 0x00, 0x60, 0x01, 0x64, 0x02, 0x00, 0x20, 0x60, 0x00, 0x64, 0x32, 0x45,
-        0xB4, 0x85, 0x45, 0x52, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x29, 0x60, 0xDE, 0x63, 0x06, 0x60,
-        0x0B, 0xFD, 0x62, 0xFF, 0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x3F, 0x40,
-        0x02, 0x2B, 0x15, 0x00, 0x88, 0xFF, 0xBA, 0x60, 0x98, 0x71, 0x8D, 0xE2, 0x01, 0x11, 0x09, 0x00,
-        0x71, 0x40, 0x80, 0x27, 0xFB, 0x01, 0x88, 0xE2, 0xBA, 0x60, 0xD0, 0x64, 0x03, 0xFB, 0x8D, 0xFF,
-        0x11, 0x00, 0x8D, 0xFF, 0x90, 0x60, 0x00, 0xE8, 0x28, 0x60, 0xFB, 0x63, 0x04, 0x00, 0x91, 0x60,
-        0x00, 0xE8, 0x29, 0x60, 0xC4, 0x63, 0x2A, 0xE8, 0x06, 0x60, 0x0B, 0xFD, 0xFF, 0xFF, 0x62, 0xFF,
-        0xFF, 0xFF, 0x1A, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xF1, 0xF3, 0xFF, 0xFF, 0xEF, 0xB4,
-        0xF1, 0xFB, 0xAD, 0x4F, 0xFD, 0xB4, 0xA0, 0x5D, 0xD0, 0x60, 0x00, 0xE8, 0x2A, 0xE8, 0xD9, 0x60,
-        0xFE, 0x64, 0x32, 0x45, 0xA4, 0x85, 0x45, 0x52, 0x99, 0xFF, 0xA5, 0x4F, 0xFF, 0xB4, 0x07, 0xFB,
-        0x98, 0xFF, 0xA3, 0x60, 0xF4, 0x63, 0x06, 0x60, 0x0B, 0xFD, 0x62, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x08, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x43, 0xFF, 0x01, 0x60, 0x00, 0xE1, 0x28, 0xF3,
-        0x47, 0xFF, 0x60, 0x40, 0x07, 0x37, 0x66, 0x00, 0x05, 0x3B, 0x04, 0x00, 0xFF, 0x0A, 0x80, 0xE1,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x1B, 0x60, 0xF3, 0xF1, 0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41,
-        0x7D, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02, 0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84,
-        0xA0, 0x5D, 0x29, 0xF5, 0x2A, 0xF3, 0x47, 0xFF, 0x3F, 0xF0, 0x01, 0x1B, 0x01, 0x64, 0x60, 0x56,
-        0xAD, 0xE2, 0xB5, 0xFF, 0x6C, 0x40, 0x40, 0xE1, 0xA1, 0xFF, 0x00, 0xF4, 0x6E, 0x61, 0x12, 0x62,
-        0x64, 0x43, 0x01, 0xE1, 0x03, 0x64, 0xE2, 0xD0, 0xC9, 0x81, 0x64, 0x4C, 0xCC, 0x84, 0xDA, 0x82,
-        0xFA, 0x02, 0x01, 0x60, 0x00, 0x6B, 0x9A, 0xFF, 0xCA, 0x82, 0x03, 0x00, 0x00, 0xF4, 0x81, 0xF2,
-        0xFF, 0xFF, 0x7A, 0xD0, 0xA1, 0xFF, 0x64, 0x4C, 0xFC, 0x1C, 0xF8, 0x1D, 0x00, 0xB9, 0x06, 0x1E,
-        0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82, 0x5A, 0xD2, 0xA1, 0xFF, 0x60, 0x4D, 0x3F, 0x40, 0x02, 0x2B,
-        0x10, 0x00, 0x28, 0xF3, 0xA5, 0x60, 0xC4, 0x65, 0x60, 0x40, 0x0E, 0x3B, 0x0A, 0x00, 0xF1, 0xF3,
-        0xFF, 0xFF, 0x10, 0xBC, 0xF1, 0xFB, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x85, 0x4C,
-        0xFE, 0x01, 0xF1, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xF1, 0xFB, 0xA1, 0xFF, 0x87, 0x4E, 0x87, 0x4C,
-        0x87, 0x4C, 0x87, 0x4C, 0x87, 0x4C, 0x67, 0x4C, 0xFF, 0xFF, 0xBC, 0xFF, 0x00, 0xE1, 0xD5, 0xFE,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x00, 0x64, 0x40, 0x46, 0x60, 0x41, 0xB5, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF,
-        0x29, 0xF5, 0x3F, 0xF0, 0x24, 0xF2, 0x44, 0x43, 0x40, 0x4D, 0x00, 0xF4, 0xF3, 0x60, 0xA0, 0x65,
-        0x10, 0x62, 0x5A, 0xD2, 0xD9, 0x81, 0xD4, 0x80, 0xFF, 0xFF, 0xFB, 0x02, 0x61, 0x45, 0x2D, 0x44,
-        0xD4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xFD, 0xA5, 0x48, 0x60, 0x00, 0x64, 0xC4, 0x9D,
-        0x0D, 0x60, 0x00, 0x6B, 0x2D, 0x44, 0xC0, 0x83, 0xBB, 0xFF, 0x29, 0xF5, 0x01, 0xE1, 0x00, 0xF4,
-        0x6C, 0x61, 0x10, 0x62, 0x05, 0x00, 0x00, 0xF4, 0x01, 0xF2, 0xFF, 0xFF, 0x60, 0x41, 0x04, 0x62,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x10, 0x1A, 0x00, 0x26, 0x44, 0x01, 0x26, 0x0C, 0x00, 0x2D, 0x44,
-        0xC8, 0x84, 0x40, 0x4D, 0x02, 0x03, 0x6C, 0x45, 0xF3, 0x01, 0x03, 0x15, 0x01, 0x64, 0x05, 0xFA,
-        0x15, 0x00, 0x6C, 0x45, 0xED, 0x01, 0x23, 0x44, 0xC8, 0x84, 0x40, 0x43, 0x02, 0x03, 0x6C, 0x45,
-        0xE7, 0x01, 0x00, 0x64, 0x01, 0x15, 0x01, 0x64, 0x6C, 0x45, 0x05, 0xFB, 0xE2, 0xD2, 0xDA, 0x82,
-        0xC9, 0x81, 0x60, 0x4C, 0xDD, 0x1C, 0xD7, 0x03, 0xBC, 0xFF, 0xDA, 0x01, 0x00, 0xE1, 0xD5, 0xFE,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x08, 0xE1, 0xA1, 0xFF, 0x67, 0x4C, 0x43, 0xFF, 0xF1, 0xF3, 0xFF, 0xFF,
-        0x10, 0xBC, 0xF1, 0xFB, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x01, 0xE1, 0x01, 0x60,
-        0x69, 0x6B, 0xA5, 0x60, 0xC4, 0x64, 0x60, 0x4C, 0xBB, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x60, 0x4C, 0xFC, 0x01, 0x29, 0xF3, 0x2A, 0xF1, 0x07, 0xB5, 0x04, 0xE1,
-        0x65, 0x41, 0x64, 0x54, 0xCD, 0xE2, 0x95, 0x81, 0xA1, 0x5D, 0xA1, 0xFF, 0xFF, 0xFF, 0xF9, 0x01,
-        0x61, 0x44, 0xFE, 0xFB, 0xFF, 0xFD, 0xFF, 0x01, 0x7F, 0x67, 0x01, 0x61, 0x23, 0x58, 0xFF, 0xFF,
-        0xB1, 0xFE, 0x08, 0x05, 0xB0, 0xFE, 0x09, 0x05, 0xB2, 0xFE, 0xB3, 0xFE, 0x78, 0x43, 0x01, 0x61,
-        0x29, 0x60, 0xEA, 0x78, 0x34, 0x60, 0x8D, 0x78, 0xFF, 0xFF, 0x28, 0xF3, 0x29, 0xF1, 0x40, 0x44,
-        0x44, 0x45, 0x2A, 0xF1, 0x2B, 0xF1, 0x44, 0x46, 0x44, 0x47, 0x3F, 0xB4, 0xE0, 0x85, 0x20, 0x60,
-        0x28, 0x64, 0x44, 0xD7, 0x58, 0x43, 0xFF, 0xFF, 0x60, 0x45, 0x0E, 0x60, 0xDD, 0xF3, 0x61, 0x43,
-        0x04, 0xB4, 0x24, 0x44, 0x02, 0x03, 0x13, 0xFF, 0x06, 0x00, 0x3F, 0xB4, 0xB4, 0x84, 0xFF, 0x27,
-        0x05, 0xFD, 0x04, 0xFB, 0x10, 0x75, 0xA1, 0xFF, 0xFF, 0xFF, 0x86, 0x3E, 0xB4, 0xFE, 0x0B, 0x05,
-        0xB5, 0xFE, 0x02, 0x24, 0x9F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xB7, 0xFE, 0x07, 0x05, 0x78, 0x43,
-        0x01, 0x61, 0x29, 0x60, 0xEA, 0x78, 0x34, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x36, 0x44, 0x00, 0x7F,
-        0xEE, 0xA0, 0x60, 0x45, 0x05, 0x05, 0x20, 0x60, 0xBA, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x78, 0x43, 0x01, 0x61, 0x29, 0x60, 0xEA, 0x78, 0x78, 0x43, 0x01, 0x61, 0x29, 0x60, 0xEA, 0x78,
-        0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x10, 0x02, 0x10, 0x64,
-        0x40, 0x40, 0x02, 0x64, 0x40, 0x50, 0x61, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x04, 0x00, 0x10, 0xE0,
-        0x46, 0x60, 0x09, 0xE0, 0x00, 0x00, 0x27, 0xF1, 0x00, 0x66, 0x20, 0x78, 0x42, 0xFE, 0x23, 0x58,
-        0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x1A, 0x02,
-        0x0E, 0x60, 0xDD, 0xF3, 0x07, 0x7C, 0x20, 0xB5, 0x0C, 0xB5, 0x04, 0x03, 0x03, 0x02, 0xDB, 0xF9,
-        0x00, 0x67, 0x10, 0x00, 0x00, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0xAD, 0x01, 0x36, 0x47, 0xFF, 0x23,
-        0x04, 0x00, 0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x05, 0x00, 0x62, 0xFF, 0x20, 0x44, 0x80, 0xBC,
-        0x40, 0x40, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x7F, 0x67, 0x02, 0x61, 0x31, 0x02, 0x0E, 0x60, 0xDD, 0xF3, 0x01, 0x7C, 0x20, 0xB5, 0x0C, 0xB5,
-        0x03, 0x03, 0x02, 0x02, 0xDB, 0xF9, 0xFF, 0xFF, 0x02, 0x61, 0x41, 0x56, 0xC7, 0xFE, 0x2A, 0x60,
-        0x1D, 0x78, 0xFF, 0xFF, 0x9D, 0xF1, 0x20, 0x44, 0x64, 0x40, 0xFF, 0x26, 0x1C, 0x00, 0x7F, 0xB4,
-        0x40, 0x40, 0x5C, 0x5E, 0x82, 0xFF, 0x26, 0x44, 0xFD, 0xB4, 0x40, 0x46, 0x5C, 0x41, 0x87, 0xFF,
-        0x62, 0xFF, 0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x04, 0x03, 0x09, 0xF2,
-        0x8F, 0xFC, 0xAC, 0x86, 0xFB, 0x01, 0x95, 0xF3, 0xFF, 0xFF, 0x7F, 0xB4, 0x95, 0xFB, 0x06, 0x64,
-        0x13, 0x60, 0x1C, 0xFB, 0x2D, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x00, 0x67, 0x20, 0x40,
-        0x80, 0x2A, 0x02, 0x00, 0x7F, 0x67, 0x06, 0x61, 0x60, 0x45, 0x0E, 0x60, 0xDD, 0xF3, 0x61, 0x43,
-        0x04, 0xB4, 0x24, 0x44, 0x02, 0x03, 0x13, 0xFF, 0x56, 0x01, 0x3F, 0xB4, 0xB4, 0x84, 0xFF, 0x27,
-        0x05, 0xFD, 0x04, 0xFB, 0x20, 0x40, 0x80, 0x2A, 0x02, 0x00, 0x10, 0x75, 0x05, 0x00, 0x01, 0x64,
-        0x19, 0x60, 0xF7, 0xFB, 0x08, 0x60, 0x10, 0x75, 0x46, 0x01, 0x25, 0x46, 0x01, 0xF2, 0x08, 0xF0,
-        0x60, 0x47, 0x03, 0xB4, 0x03, 0xAC, 0x7F, 0x67, 0x03, 0x61, 0x08, 0x02, 0x26, 0x60, 0x20, 0x64,
-        0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x24, 0x40, 0x01, 0x2B, 0x49, 0x00, 0x25, 0x44, 0x1F, 0xB4, 0xE0, 0x85, 0x2A, 0x60, 0xF4, 0x64,
-        0xC4, 0x98, 0xFF, 0xFF, 0xC0, 0xFE, 0x3D, 0x00, 0xC1, 0xFE, 0x3B, 0x00, 0xC2, 0xFE, 0x39, 0x00,
-        0xC3, 0xFE, 0x37, 0x00, 0xC4, 0xFE, 0x35, 0x00, 0xC5, 0xFE, 0x33, 0x00, 0xC6, 0xFE, 0x31, 0x00,
-        0xC7, 0xFE, 0x2F, 0x00, 0xC8, 0xFE, 0x2D, 0x00, 0xC9, 0xFE, 0x2B, 0x00, 0xCA, 0xFE, 0x29, 0x00,
-        0xCB, 0xFE, 0x27, 0x00, 0xCC, 0xFE, 0x25, 0x00, 0xCD, 0xFE, 0x23, 0x00, 0xCE, 0xFE, 0x21, 0x00,
-        0xCF, 0xFE, 0x1F, 0x00, 0xD0, 0xFE, 0x1D, 0x00, 0xD1, 0xFE, 0x1B, 0x00, 0xD2, 0xFE, 0x19, 0x00,
-        0xD3, 0xFE, 0x17, 0x00, 0xD4, 0xFE, 0x15, 0x00, 0xD5, 0xFE, 0x13, 0x00, 0xD6, 0xFE, 0x11, 0x00,
-        0xD7, 0xFE, 0x0F, 0x00, 0xD8, 0xFE, 0x0D, 0x00, 0xD9, 0xFE, 0x0B, 0x00, 0xDA, 0xFE, 0x09, 0x00,
-        0xDB, 0xFE, 0x07, 0x00, 0xDC, 0xFE, 0x05, 0x00, 0xDD, 0xFE, 0x03, 0x00, 0xDE, 0xFE, 0x01, 0x00,
-        0xDF, 0xFE, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x9F, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x9E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9D, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9C, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x9B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x9A, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x99, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x98, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x97, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x96, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x95, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x94, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x93, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x92, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x91, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x90, 0xFE, 0xF0, 0x84, 0x06, 0xFB, 0x8F, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x8E, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8D, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8C, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x8B, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x8A, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x89, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x88, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x87, 0xFE, 0xF0, 0x84, 0xFF, 0xFF,
-        0x86, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x85, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x84, 0xFE, 0xF0, 0x84,
-        0xFF, 0xFF, 0x83, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x82, 0xFE, 0xF0, 0x84, 0xFF, 0xFF, 0x81, 0xFE,
-        0xF0, 0x84, 0xFF, 0xFF, 0x80, 0xFE, 0xF0, 0x84, 0x05, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x5C, 0x5C, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x27, 0x55, 0x00, 0x05, 0x60,
-        0x00, 0x63, 0x05, 0xFD, 0x30, 0x44, 0xBD, 0xDB, 0x31, 0x44, 0xBD, 0xDB, 0x32, 0x44, 0xBD, 0xDB,
-        0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB, 0x35, 0x44, 0xBD, 0xDB, 0x36, 0x44, 0xBD, 0xDB,
-        0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB, 0x39, 0x44, 0xBD, 0xDB, 0x3A, 0x44, 0xBD, 0xDB,
-        0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB, 0x3D, 0x44, 0xBD, 0xDB, 0x3E, 0x44, 0xBD, 0xDB,
-        0x3F, 0x44, 0xBD, 0xDB, 0x02, 0x61, 0x61, 0x44, 0x02, 0x36, 0x82, 0xFF, 0x03, 0x36, 0x83, 0xFF,
-        0x04, 0x36, 0x84, 0xFF, 0x05, 0x36, 0x85, 0xFF, 0x06, 0x36, 0x86, 0xFF, 0x07, 0x36, 0x87, 0xFF,
-        0x20, 0x44, 0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB,
-        0x24, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB,
-        0x28, 0x44, 0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB,
-        0x2C, 0x44, 0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB,
-        0xDD, 0x81, 0x08, 0x3A, 0xD0, 0x01, 0x54, 0x00, 0x27, 0x40, 0x10, 0x26, 0x30, 0x00, 0x26, 0x44,
-        0x01, 0x36, 0x2D, 0x00, 0x02, 0x36, 0x82, 0xFF, 0x03, 0x36, 0x83, 0xFF, 0x04, 0x36, 0x84, 0xFF,
-        0x05, 0x36, 0x85, 0xFF, 0x06, 0x36, 0x86, 0xFF, 0x25, 0x44, 0x00, 0x36, 0x44, 0x40, 0x01, 0x36,
-        0x44, 0x41, 0x02, 0x36, 0x44, 0x42, 0x03, 0x36, 0x44, 0x43, 0x04, 0x36, 0x44, 0x44, 0x05, 0x36,
-        0x44, 0x45, 0x06, 0x36, 0x44, 0x46, 0x07, 0x36, 0x44, 0x47, 0x08, 0x36, 0x44, 0x48, 0x09, 0x36,
-        0x44, 0x49, 0x0A, 0x36, 0x44, 0x4A, 0x0B, 0x36, 0x44, 0x4B, 0x0C, 0x36, 0x44, 0x4C, 0x0D, 0x36,
-        0x44, 0x4D, 0x0E, 0x36, 0x44, 0x4E, 0x0F, 0x36, 0x44, 0x4F, 0x87, 0xFF, 0x21, 0x00, 0x25, 0x44,
-        0x10, 0x36, 0x44, 0x50, 0x11, 0x36, 0x44, 0x51, 0x12, 0x36, 0x44, 0x52, 0x13, 0x36, 0x44, 0x53,
-        0x14, 0x36, 0x44, 0x54, 0x15, 0x36, 0x44, 0x55, 0x16, 0x36, 0x44, 0x56, 0x17, 0x36, 0x44, 0x57,
-        0x18, 0x36, 0x44, 0x58, 0x19, 0x36, 0x44, 0x59, 0x1A, 0x36, 0x44, 0x5A, 0x1B, 0x36, 0x44, 0x5B,
-        0x1C, 0x36, 0x44, 0x5C, 0x1D, 0x36, 0x44, 0x5D, 0x1E, 0x36, 0x44, 0x5E, 0x1F, 0x36, 0x44, 0x5F,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0x46, 0xB5, 0x60, 0x58, 0x4F, 0xCE, 0x78, 0xFF, 0xFF,
-        0x03, 0x61, 0x7F, 0x67, 0x0A, 0x02, 0x00, 0xF0, 0x04, 0x64, 0x13, 0x60, 0x10, 0xFB, 0x5A, 0xD9,
-        0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60,
-        0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x12, 0x02, 0x14, 0x64, 0x13, 0x60,
-        0x1C, 0xFB, 0x00, 0x60, 0x50, 0x63, 0x5A, 0xDD, 0x2C, 0x60, 0x75, 0x64, 0x9F, 0xFB, 0x2D, 0xFF,
-        0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x2A, 0xF3, 0x05, 0xFB, 0x2B, 0xF3, 0x06, 0xFB, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x40, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61,
-        0x0E, 0x02, 0x16, 0x64, 0x13, 0x60, 0x1C, 0xFB, 0x00, 0x60, 0x50, 0x63, 0x5A, 0xDD, 0x2C, 0x60,
-        0x90, 0x64, 0x9F, 0xFB, 0x2D, 0xFF, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x02, 0x61, 0x38, 0x02, 0x25, 0x45,
-        0x20, 0x44, 0x80, 0x2A, 0x34, 0x00, 0xF1, 0x60, 0x00, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x06, 0x03,
-        0xF1, 0x60, 0x02, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x2F, 0x03, 0x28, 0x00, 0x19, 0x60, 0x40, 0xF1,
-        0xB7, 0xF3, 0x20, 0x60, 0x22, 0x61, 0xA0, 0x84, 0xA1, 0xDB, 0x25, 0x45, 0x25, 0x60, 0x86, 0x63,
-        0x02, 0x61, 0xBD, 0xD3, 0xBD, 0xD1, 0xD4, 0x80, 0xBD, 0xD3, 0xBD, 0xD5, 0xCD, 0x81, 0x02, 0x03,
-        0x15, 0x03, 0xF7, 0x01, 0xA2, 0xFF, 0xA6, 0xD3, 0x40, 0x4C, 0x00, 0xA8, 0x67, 0x43, 0x0C, 0x02,
-        0xA2, 0xDD, 0x42, 0x48, 0x64, 0x41, 0xB6, 0x60, 0x58, 0x4D, 0x25, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x28, 0xDB, 0x02, 0x03, 0x2C, 0x58, 0xA3, 0xFF, 0x0C, 0x61, 0x03, 0x00, 0x04, 0x61, 0x7F, 0x67,
-        0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x64, 0x10, 0x60, 0x13, 0xFB, 0xFF, 0xFF,
-        0xC4, 0xFE, 0xF7, 0x01, 0xC6, 0xFE, 0xF5, 0x01, 0x7E, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80,
-        0x02, 0x61, 0x3F, 0x02, 0x25, 0x45, 0xF8, 0x2B, 0x3B, 0x00, 0x2E, 0xF5, 0x67, 0x44, 0xD4, 0x80,
-        0x20, 0x60, 0xCC, 0x63, 0x39, 0x03, 0x79, 0x61, 0x24, 0x44, 0x01, 0x27, 0x29, 0x00, 0xA3, 0xFC,
-        0xA4, 0xF8, 0xBD, 0xD3, 0xA3, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24, 0x64, 0x58, 0x08, 0xA3,
-        0xF8, 0x02, 0x08, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xA3, 0xD1, 0xFE, 0xA0, 0xFA, 0x60, 0x00, 0x64,
-        0xD0, 0x80, 0x14, 0x02, 0x13, 0x02, 0x04, 0xA3, 0xBE, 0xD3, 0xBD, 0xD1, 0x0F, 0x18, 0xD4, 0x80,
-        0x0D, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x64, 0x41, 0xDD, 0x81, 0xE1, 0x81,
-        0xCB, 0x83, 0x46, 0x65, 0x36, 0x60, 0x58, 0x4F, 0x22, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x0A, 0x00,
-        0xBD, 0xD3, 0xBE, 0xD1, 0xD4, 0x80, 0xCD, 0x81, 0x08, 0x24, 0x64, 0x58, 0x08, 0xA3, 0xF8, 0x02,
-        0x04, 0x61, 0x7F, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x0F, 0x64, 0x23, 0xFA, 0x67, 0x44, 0x24, 0xFA,
-        0x62, 0x41, 0x3C, 0x60, 0x00, 0x65, 0x1A, 0x63, 0x80, 0x60, 0x9E, 0x64, 0x65, 0x46, 0x58, 0xD0,
-        0x2E, 0xF5, 0x59, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xCB, 0x83, 0xBF, 0xD1,
-        0x4A, 0x65, 0x64, 0x43, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0x01, 0x26, 0xDC, 0x81, 0xE9, 0x84,
-        0xDC, 0x84, 0x23, 0xFA, 0x09, 0x00, 0x4B, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0xE8, 0x84, 0xDC, 0x84,
-        0x23, 0xFA, 0xBF, 0xD1, 0x4A, 0x65, 0x64, 0x43, 0x36, 0x60, 0x58, 0x4F, 0x22, 0x78, 0xFF, 0xFF,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0xFF, 0xFF, 0xE0, 0xA0, 0x20, 0x64, 0x01, 0x06,
-        0x25, 0xFA, 0x23, 0xF2, 0xDF, 0xD1, 0xCC, 0x84, 0xE0, 0x85, 0x0B, 0x06, 0xBF, 0xD1, 0x64, 0x41,
-        0xD5, 0x80, 0x64, 0x43, 0x01, 0x06, 0x65, 0x41, 0x4A, 0x65, 0x2E, 0x60, 0x58, 0x4F, 0x7A, 0x78,
-        0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0xDB, 0xF3, 0x02, 0x63, 0x23, 0xFC, 0x07, 0xB4,
-        0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x4B, 0xD3, 0xBF, 0xD3, 0x60, 0x41, 0xC9, 0x83,
-        0xE9, 0x81, 0xDD, 0x81, 0xA3, 0xFA, 0xE0, 0x81, 0x3C, 0x60, 0x00, 0x67, 0x02, 0x24, 0x02, 0xA4,
-        0x60, 0x47, 0x40, 0x4B, 0xC9, 0x81, 0x4A, 0x65, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0xA5, 0xD8,
-        0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF6, 0x1F, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1, 0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83, 0x60, 0x47, 0x25, 0xFA,
-        0x00, 0x7E, 0x60, 0x47, 0x01, 0x26, 0xDC, 0x84, 0x60, 0x41, 0xE8, 0x84, 0xD8, 0x84, 0x23, 0xFA,
-        0xAB, 0x01, 0xFC, 0xA3, 0xA3, 0xD1, 0x4C, 0x65, 0xA4, 0xD3, 0xDA, 0x83, 0x00, 0x7F, 0x25, 0xFA,
-        0x60, 0x41, 0x01, 0x26, 0xDD, 0x81, 0xE9, 0x84, 0xD8, 0x84, 0x23, 0xFA, 0x9D, 0x01, 0x2E, 0x60,
-        0x40, 0x63, 0xBF, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0xE8, 0x84, 0xDC, 0x84, 0x23, 0xFA, 0x4A, 0x65,
-        0x36, 0x60, 0x58, 0x4F, 0x22, 0x78, 0xFF, 0xFF, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x2E, 0x60,
-        0x40, 0x63, 0x23, 0xF2, 0xC0, 0x65, 0xCC, 0x84, 0xE0, 0x81, 0x0A, 0x04, 0xBF, 0xDB, 0xD5, 0x80,
-        0x07, 0x03, 0x01, 0x06, 0x65, 0x41, 0x61, 0x44, 0xBF, 0xDB, 0x4A, 0x65, 0x58, 0x4F, 0xA8, 0x00,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x03, 0x4E, 0x2D, 0x60, 0x58, 0x43, 0x55, 0x78, 0xFF, 0xFF,
-        0x2F, 0x60, 0x24, 0x61, 0x17, 0x60, 0x81, 0xF3, 0xA1, 0xDB, 0xCC, 0x84, 0xA8, 0x83, 0x05, 0x04,
-        0x2F, 0x60, 0x02, 0x64, 0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x0E, 0x43, 0x82, 0x01, 0x23, 0xF2,
-        0x25, 0xF2, 0x02, 0xA8, 0xF8, 0xA0, 0x0F, 0x02, 0xEC, 0xA0, 0x0D, 0x04, 0x0C, 0x07, 0x19, 0x60,
-        0x4F, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x07, 0x19, 0x60, 0x4F, 0xFB, 0x19, 0x60,
-        0x53, 0xFB, 0x16, 0x60, 0xD8, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x1D, 0x60,
-        0xAE, 0x65, 0x60, 0x41, 0x1D, 0x60, 0x4A, 0x63, 0xA3, 0xDB, 0xFF, 0xA1, 0x48, 0x64, 0x58, 0xD0,
-        0x7E, 0xA8, 0x5B, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xFF, 0xA1, 0xD7, 0x80, 0x02, 0x03,
-        0x01, 0x03, 0xF5, 0x01, 0x2E, 0xF5, 0x00, 0x60, 0x2F, 0x65, 0x25, 0xF2, 0x00, 0x63, 0xCC, 0x84,
-        0x03, 0xA3, 0xFD, 0x05, 0x4A, 0x64, 0xD7, 0x80, 0x1C, 0x60, 0xE6, 0x61, 0x18, 0x05, 0xA1, 0xDD,
-        0xE3, 0x83, 0xFE, 0xA3, 0x58, 0xD0, 0x7E, 0xA8, 0x59, 0xD9, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x64,
-        0xF9, 0x1F, 0x00, 0x63, 0x59, 0xDD, 0x2E, 0xF5, 0x25, 0xF0, 0x0E, 0x60, 0x73, 0xF3, 0xD3, 0x80,
-        0x01, 0xB0, 0x04, 0x03, 0x01, 0xA4, 0x03, 0x03, 0xA2, 0xDB, 0x01, 0x00, 0xA2, 0xDD, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x1D, 0x60, 0x4A, 0x61, 0xA1, 0xD3, 0x23, 0xFA, 0xE0, 0x83, 0x4A, 0x65,
-        0x04, 0x02, 0x02, 0x63, 0x23, 0xFC, 0xA5, 0xFC, 0x09, 0x00, 0xDB, 0x83, 0x59, 0xD1, 0xA5, 0xD8,
-        0xDA, 0x85, 0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x0E, 0x60, 0x73, 0xF3, 0x00, 0x61, 0x02, 0xA4, 0xFE, 0xA0, 0x23, 0xFA, 0x1B, 0x03,
-        0xFA, 0xA4, 0xFD, 0xA4, 0x01, 0xA1, 0xFD, 0x07, 0x61, 0x43, 0x23, 0xF2, 0x25, 0xFC, 0xE0, 0x83,
-        0x02, 0xA3, 0x1C, 0x60, 0xE6, 0x61, 0x00, 0x60, 0x4A, 0x64, 0x59, 0xD1, 0x58, 0xD8, 0x7E, 0x3A,
-        0x02, 0x00, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x25, 0xF2, 0x23, 0xF2, 0x01, 0xB0, 0xCC, 0x84,
-        0x04, 0x02, 0x23, 0xFA, 0x02, 0x00, 0x00, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x41, 0x4B, 0x65, 0x42, 0x80, 0x64, 0xD4, 0x85, 0x2B, 0x41, 0x00, 0xA1, 0x55, 0x8B, 0x0D, 0x03,
-        0x02, 0x04, 0x65, 0x41, 0x02, 0x00, 0x00, 0x64, 0x40, 0x4B, 0xCA, 0x84, 0x58, 0xD0, 0xC9, 0x81,
-        0xBD, 0xD9, 0xFC, 0x02, 0x00, 0xF4, 0x04, 0x65, 0xEC, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFC, 0xA3,
-        0xA3, 0xD3, 0x02, 0x7C, 0xA0, 0xD3, 0x23, 0xF8, 0xDC, 0x84, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x02, 0x64, 0x23, 0xFA, 0x01, 0x64, 0x9D, 0xFE, 0x02, 0x28, 0x02, 0x64, 0x25, 0xFA,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x02, 0x7C, 0x23, 0xF8, 0x01, 0x64, 0x25, 0xFA, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0xFC, 0xA3, 0xA3, 0xD1, 0x02, 0x64, 0x23, 0xFA, 0xA4, 0xD3, 0x25, 0xFA,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x02, 0x64, 0x23, 0xFA, 0x88, 0xFF, 0x75, 0x44, 0x8D, 0xFF,
-        0xE8, 0x87, 0xE8, 0x84, 0xE8, 0x84, 0x03, 0xB4, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x04, 0x64, 0x23, 0xFA, 0x86, 0xFF, 0x29, 0x44, 0x87, 0xFF, 0x25, 0xFA, 0x55, 0xF3, 0x52, 0xF1,
-        0x80, 0x65, 0xC4, 0x87, 0x00, 0x7F, 0x26, 0xFA, 0x64, 0x44, 0xC4, 0x87, 0x00, 0x7F, 0x27, 0xFA,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x05, 0x64, 0x23, 0xFA, 0x52, 0x63, 0xB4, 0xF3, 0x4B, 0xDA,
-        0xB3, 0xF3, 0x4B, 0xDA, 0xB2, 0xF3, 0x4B, 0xDA, 0x60, 0x41, 0x88, 0xFF, 0x72, 0x5C, 0x89, 0xFF,
-        0x4A, 0xD8, 0xA2, 0x48, 0x20, 0x23, 0x0E, 0x00, 0x64, 0x40, 0x80, 0x27, 0x15, 0x00, 0xDC, 0x84,
-        0xBD, 0xDA, 0xBD, 0xD2, 0x11, 0x04, 0xDC, 0x84, 0xA2, 0xDA, 0xA3, 0xD2, 0x0D, 0x04, 0xDC, 0x84,
-        0xA3, 0xDA, 0x0A, 0x00, 0x52, 0x63, 0xB4, 0xF3, 0x4B, 0xDA, 0xB3, 0xF3, 0x4B, 0xDA, 0xB2, 0xF3,
-        0x4B, 0xDA, 0x54, 0x90, 0x4C, 0x63, 0xE0, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF0,
-        0x23, 0xF2, 0x19, 0x60, 0x46, 0xF9, 0x02, 0xA8, 0x64, 0x44, 0x1F, 0x02, 0x3F, 0x40, 0x02, 0x2B,
-        0x16, 0x00, 0x00, 0x37, 0x14, 0x00, 0x01, 0x3B, 0x18, 0x00, 0x12, 0x60, 0x45, 0x65, 0x11, 0x60,
-        0x65, 0x63, 0xFF, 0xB7, 0x60, 0x5C, 0xA3, 0xD3, 0x08, 0xA3, 0x00, 0x7E, 0xD0, 0x80, 0xD7, 0x80,
-        0x03, 0x03, 0xF9, 0x02, 0x7F, 0x67, 0x0A, 0x00, 0xF4, 0xA3, 0xA3, 0xD1, 0x04, 0x00, 0x00, 0xBC,
-        0xF2, 0xA4, 0x03, 0x03, 0x02, 0x07, 0x16, 0x60, 0xCF, 0xF9, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x20, 0x63, 0x2E, 0x60, 0x00, 0x61, 0x48, 0x64, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x25, 0xF0,
-        0x20, 0x64, 0xD0, 0x81, 0xFF, 0xFF, 0x02, 0x07, 0x25, 0xFA, 0x0F, 0x00, 0x2E, 0x60, 0x04, 0x63,
-        0xC3, 0x83, 0x01, 0x2A, 0x06, 0x00, 0xCF, 0x83, 0xA3, 0xD3, 0xCD, 0x81, 0x00, 0x7F, 0xBD, 0xDB,
-        0x04, 0x03, 0x00, 0x64, 0xC9, 0x81, 0xBD, 0xDB, 0xFD, 0x02, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x01, 0x60, 0xA0, 0x62, 0x09, 0x02, 0xA2, 0xD9, 0x64, 0x41,
-        0x32, 0x44, 0x02, 0xB5, 0x00, 0xB9, 0xD4, 0x84, 0x08, 0x28, 0x02, 0xBC, 0x40, 0x52, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x01, 0x60, 0xA2, 0x62, 0x09, 0x02,
-        0xA2, 0xD9, 0x64, 0x41, 0x32, 0x44, 0x04, 0xB5, 0x00, 0xB9, 0xD4, 0x84, 0x08, 0x28, 0x04, 0xBC,
-        0x40, 0x52, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8, 0x01, 0x60,
-        0xB0, 0x62, 0x15, 0x02, 0xA2, 0xD9, 0x64, 0x41, 0x32, 0x44, 0x40, 0xB5, 0x00, 0xB9, 0xD4, 0x84,
-        0x08, 0x24, 0x0C, 0x00, 0x40, 0xBC, 0x02, 0xB5, 0xD4, 0x84, 0x43, 0xF9, 0x37, 0x60, 0x76, 0x63,
-        0xD3, 0x80, 0x2F, 0x60, 0x50, 0x7C, 0x02, 0x03, 0x43, 0xFD, 0xA4, 0xDF, 0x40, 0x52, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x37, 0x60, 0x76, 0x64, 0x43, 0xFB, 0x2D, 0x60, 0x5B, 0x78, 0xFF, 0xFF,
-        0x23, 0xF2, 0x25, 0xF0, 0x01, 0x60, 0xAC, 0x63, 0x7F, 0x67, 0x39, 0x18, 0xA3, 0xD9, 0x26, 0xF0,
-        0x7F, 0x67, 0x35, 0x18, 0x5B, 0xD9, 0x16, 0x60, 0x87, 0xF3, 0x25, 0xF0, 0x60, 0x40, 0x03, 0x3A,
-        0x2D, 0x00, 0xA6, 0xF3, 0x20, 0x63, 0xE3, 0x83, 0x60, 0x46, 0x0F, 0xF8, 0x30, 0x61, 0x94, 0xFA,
-        0x01, 0x61, 0x91, 0xFA, 0x16, 0x64, 0x12, 0xFA, 0x60, 0x40, 0x10, 0x36, 0x05, 0x00, 0x12, 0x36,
-        0x08, 0x00, 0x0C, 0x36, 0x0B, 0x00, 0x0F, 0x00, 0x40, 0x61, 0xA1, 0x80, 0x0A, 0x64, 0x11, 0x02,
-        0xF3, 0x01, 0x10, 0x61, 0xA1, 0x80, 0x0E, 0x64, 0x0C, 0x02, 0xEE, 0x01, 0x08, 0x61, 0xA1, 0x80,
-        0x10, 0x64, 0x07, 0x02, 0xE9, 0x01, 0xE1, 0x81, 0xA1, 0x80, 0x05, 0x05, 0xC8, 0x84, 0x01, 0x02,
-        0xE3, 0x01, 0x12, 0xFA, 0x91, 0xFA, 0x66, 0x44, 0x02, 0xA6, 0xD7, 0x1F, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x25, 0xF2, 0x19, 0x60, 0x45, 0xFB, 0x19, 0x60, 0x4C, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x08, 0x26, 0x18, 0x00, 0x19, 0x60, 0x45, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0A, 0x00,
-        0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0x60, 0x44, 0xA2, 0xDB, 0x19, 0x60, 0x45, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x02, 0x2A, 0x06, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x04, 0xBC,
-        0x60, 0x44, 0xA2, 0xDB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0, 0x02, 0xA8,
-        0x00, 0x67, 0x02, 0x02, 0x2D, 0xF9, 0x2C, 0xF9, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF2,
-        0x02, 0xA8, 0x00, 0xA8, 0x0A, 0x02, 0x07, 0x03, 0xD0, 0xA0, 0x30, 0x65, 0x03, 0x04, 0xA7, 0xA0,
-        0x59, 0x65, 0x01, 0x06, 0x65, 0x44, 0x16, 0x60, 0xCE, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x25, 0xF2, 0x19, 0x60, 0x4C, 0xFB, 0xFF, 0xFF, 0x08, 0x2A, 0x25, 0x00, 0x19, 0x60, 0x7B, 0xF3,
-        0xFF, 0xFF, 0xE9, 0xB4, 0x60, 0x44, 0x19, 0x60, 0x4C, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x26,
-        0x02, 0xBC, 0x64, 0x40, 0x02, 0x2A, 0x04, 0xBC, 0x64, 0x40, 0x04, 0x26, 0x08, 0x00, 0x19, 0x60,
-        0x7B, 0xFB, 0x13, 0x64, 0xCB, 0xFB, 0x01, 0x60, 0x67, 0x64, 0x37, 0xFB, 0x0C, 0x00, 0x10, 0xBC,
-        0x19, 0x60, 0x7B, 0xFB, 0x08, 0x64, 0xCB, 0xFB, 0xA1, 0xF3, 0x01, 0x60, 0x67, 0x7C, 0x60, 0x40,
-        0x01, 0x27, 0x5B, 0x7C, 0x37, 0xF9, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0x19, 0x60,
-        0x4D, 0xFB, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0x19, 0x60, 0x4E, 0xFB, 0x00, 0x67,
-        0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF2, 0x19, 0x60, 0x89, 0xFB, 0xFF, 0xFF, 0x0F, 0x22, 0x41, 0x75,
-        0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x64, 0x01, 0x00, 0x00, 0x64, 0x1B, 0x60, 0xFE, 0xFB,
-        0x7E, 0x60, 0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x0E, 0x02, 0x06, 0x61,
-        0x41, 0x56, 0xC7, 0xFE, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00,
-        0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60,
-        0xC0, 0x64, 0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x0E, 0x02, 0x08, 0x61, 0x41, 0x56,
-        0xC7, 0xFE, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00, 0x00, 0x7F,
-        0x60, 0x41, 0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7F, 0x60, 0xC0, 0x64,
-        0x24, 0x45, 0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x0E, 0x02, 0x0A, 0x61, 0x41, 0x56, 0xC7, 0xFE,
-        0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00, 0x00, 0x7F, 0x60, 0x41,
-        0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x7E, 0x60, 0xC0, 0x64, 0x24, 0x45,
-        0xA4, 0x80, 0x7F, 0x67, 0x02, 0x61, 0x11, 0x02, 0x65, 0x43, 0x19, 0x60, 0xA5, 0xFD, 0x0C, 0x61,
-        0x41, 0x56, 0xC7, 0xFE, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x36, 0x47, 0xFF, 0x23, 0x04, 0x00,
-        0x00, 0x7F, 0x60, 0x41, 0x7F, 0x67, 0x01, 0x00, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x20, 0x64,
-        0x23, 0xFA, 0x4A, 0x61, 0x10, 0x60, 0xDA, 0x64, 0xA0, 0xD1, 0xA1, 0xD8, 0x58, 0xD1, 0x59, 0xD8,
-        0x58, 0xD1, 0x59, 0xD8, 0x01, 0xA1, 0x10, 0x60, 0xF2, 0x63, 0x5D, 0x65, 0xA3, 0xD3, 0x02, 0xA3,
-        0x02, 0x1B, 0x7F, 0x64, 0x01, 0x00, 0xA3, 0xD3, 0x60, 0xFE, 0x5D, 0xDA, 0x20, 0xFE, 0xD5, 0x80,
-        0x04, 0xA3, 0xF4, 0x02, 0x01, 0xA1, 0x10, 0x60, 0xE0, 0x64, 0xA0, 0xD1, 0xA1, 0xD8, 0x58, 0xD1,
-        0x59, 0xD8, 0x58, 0xD1, 0x59, 0xD8, 0x01, 0xA1, 0x60, 0xFE, 0x07, 0x63, 0x7F, 0x64, 0xCF, 0x83,
-        0x5D, 0xDA, 0xFD, 0x02, 0x20, 0xFE, 0x12, 0x60, 0x40, 0x7C, 0x11, 0x60, 0x62, 0x63, 0x7F, 0x65,
-        0xA3, 0xD3, 0x02, 0xA3, 0x02, 0x1B, 0x7F, 0x64, 0x01, 0x00, 0xA3, 0xD3, 0x60, 0xFE, 0x5D, 0xDA,
-        0x20, 0xFE, 0xD5, 0x80, 0x06, 0xA3, 0x03, 0x02, 0x46, 0x45, 0x00, 0xF4, 0x03, 0x61, 0xD3, 0x80,
-        0xFF, 0xFF, 0xEE, 0x04, 0x25, 0x46, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x02, 0x63, 0x7D, 0xF3,
-        0x23, 0xFC, 0x60, 0x40, 0x01, 0x23, 0x17, 0x00, 0x01, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x11, 0x60,
-        0x60, 0x61, 0x12, 0x60, 0x40, 0x65, 0xA1, 0xD1, 0xD5, 0x80, 0xD0, 0x80, 0x0B, 0x03, 0x02, 0x03,
-        0x08, 0xA1, 0xF9, 0x01, 0x04, 0xA1, 0xA1, 0xD3, 0x01, 0x60, 0x00, 0x65, 0x60, 0x47, 0xFF, 0xB4,
-        0xB4, 0x84, 0x01, 0x00, 0xFF, 0x64, 0x25, 0xFA, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x0C, 0x63,
-        0x23, 0xFC, 0xE2, 0xF3, 0x13, 0x60, 0xF2, 0x63, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x06, 0x0C, 0xA3,
-        0xFB, 0x01, 0x48, 0x61, 0x61, 0x44, 0x18, 0xA5, 0x60, 0xFE, 0xBD, 0xD3, 0x20, 0xFE, 0x00, 0x7F,
-        0x59, 0xDA, 0xD5, 0x80, 0xFF, 0xFF, 0xF8, 0x04, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF, 0x25, 0xF0,
-        0x17, 0x60, 0x80, 0xF9, 0x11, 0x00, 0x0C, 0x60, 0xFE, 0x62, 0x40, 0x63, 0x5A, 0xDF, 0xFE, 0x1F,
-        0x04, 0x65, 0x0C, 0x60, 0xFE, 0x61, 0x48, 0x64, 0x3E, 0x63, 0x7C, 0xA8, 0x58, 0xD0, 0x59, 0xD9,
-        0x02, 0x02, 0x00, 0xF4, 0x02, 0x64, 0xF9, 0x1F, 0x17, 0x60, 0x80, 0xF1, 0x0C, 0x60, 0xDA, 0x65,
-        0x02, 0xFE, 0x64, 0x44, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x87, 0x60, 0x41, 0x64, 0x44, 0xE0, 0x84,
-        0xE0, 0x84, 0xC4, 0x84, 0x3E, 0xFB, 0x60, 0x42, 0x61, 0x44, 0x03, 0xA2, 0x60, 0xFE, 0xA2, 0xDB,
-        0x20, 0xFE, 0x64, 0x44, 0x0D, 0x60, 0x00, 0x65, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xC4, 0x84, 0x40, 0xFB, 0xFF, 0xFF, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x5C, 0x41,
-        0x25, 0xF2, 0xFF, 0xFF, 0x40, 0x42, 0x80, 0x2B, 0x04, 0x00, 0xFF, 0xB4, 0x40, 0x42, 0x01, 0x64,
-        0x40, 0x41, 0xA6, 0xF3, 0x46, 0x4B, 0x60, 0x46, 0x20, 0x63, 0xE3, 0x83, 0xAB, 0x46, 0x26, 0xF0,
-        0xAB, 0x46, 0x59, 0xF8, 0xAB, 0x46, 0x27, 0xF0, 0xAB, 0x46, 0x5A, 0xF8, 0xAB, 0x46, 0x28, 0xF0,
-        0xAB, 0x46, 0x5B, 0xF8, 0x66, 0x44, 0x02, 0xA6, 0xF1, 0x1F, 0xA6, 0xF3, 0xFF, 0xFF, 0x60, 0x46,
-        0xAB, 0x46, 0x0C, 0x60, 0x38, 0x65, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xC4, 0x81, 0xC9, 0x81, 0x52, 0x64, 0x0E, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F,
-        0x21, 0x44, 0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF0, 0xA1, 0x76, 0x64, 0x0E, 0x63, 0x59, 0xD1,
-        0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46, 0x22, 0x44, 0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0x0C, 0x60, 0x9A, 0x65, 0xC4, 0x81, 0x60, 0x45, 0xC9, 0x81, 0x62, 0x64, 0x06, 0x63, 0x58, 0xD0,
-        0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF8, 0xA1, 0xB6, 0x64,
-        0x06, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46, 0x65, 0x44, 0x0C, 0x60, 0xBA, 0x65,
-        0xC4, 0x81, 0xC9, 0x81, 0x6A, 0x64, 0x06, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x22, 0x44,
-        0xFF, 0xB4, 0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x84, 0x0C, 0x60, 0x80, 0x65, 0xC4, 0x81, 0x72, 0x64,
-        0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0xAB, 0x46, 0x21, 0x44, 0x01, 0x2A, 0x06, 0x00,
-        0xFA, 0xA1, 0x90, 0x64, 0x04, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0x3B, 0xF0, 0x21, 0x44,
-        0x01, 0x2A, 0x13, 0x00, 0x22, 0x44, 0x3D, 0xFB, 0x60, 0x41, 0x02, 0xFE, 0xF8, 0x84, 0xF8, 0x84,
-        0xF8, 0x84, 0x3C, 0xFB, 0x0C, 0x60, 0x7C, 0x63, 0x88, 0xFF, 0xCD, 0x81, 0x06, 0xA3, 0xFD, 0x0D,
-        0x8D, 0xFF, 0x3B, 0xFD, 0x64, 0x47, 0x80, 0xBF, 0x60, 0x5C, 0x22, 0x43, 0x80, 0x61, 0x88, 0xFF,
-        0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0xB1, 0x84, 0x3B, 0xFA,
-        0x1F, 0x63, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0x3B, 0xF0, 0x66, 0x44, 0xB1, 0x9C, 0x3B, 0xF8,
-        0x02, 0xA6, 0xFA, 0x1F, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2,
-        0x25, 0xF0, 0x02, 0xA8, 0x00, 0x67, 0x22, 0x02, 0x3D, 0xF1, 0x64, 0x44, 0x03, 0xB4, 0x40, 0x42,
-        0xD0, 0x80, 0xA6, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xBB, 0xF4, 0x80, 0x61, 0x02, 0x02, 0xE3, 0x83,
-        0xEB, 0x83, 0x22, 0x44, 0x88, 0xFF, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47,
-        0x31, 0x91, 0x9D, 0x85, 0xA7, 0x83, 0x3B, 0xFC, 0x1F, 0x63, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6,
-        0xBB, 0xF2, 0x66, 0x44, 0xA5, 0x81, 0xBB, 0xFA, 0x02, 0xA6, 0xFA, 0x1F, 0x00, 0x67, 0x23, 0x58,
-        0xFF, 0xFF, 0x27, 0xF2, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3,
-        0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2,
-        0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4,
-        0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03,
-        0x2A, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60, 0x30, 0x7C, 0xB0, 0x84, 0xA2, 0xDA,
-        0x4E, 0x61, 0x76, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F,
-        0x90, 0x64, 0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0xD9, 0x81,
-        0xA0, 0x64, 0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0xD9, 0x81,
-        0xB6, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x00, 0x67,
-        0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x27, 0xF2,
-        0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x0D, 0x00, 0x43, 0x4B,
-        0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60, 0x30, 0x61, 0x9D, 0x85, 0xA4, 0x84, 0xA2, 0xDA, 0xAB, 0x46,
-        0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF,
-        0x00, 0x64, 0x40, 0x41, 0x4A, 0x64, 0xA0, 0xD2, 0xFF, 0xFF, 0x40, 0x42, 0x80, 0x2B, 0x04, 0x00,
-        0xFF, 0xB4, 0x40, 0x42, 0x01, 0x64, 0x40, 0x41, 0xA6, 0xF3, 0x46, 0x4B, 0x60, 0x46, 0x20, 0x63,
-        0xE3, 0x83, 0xAB, 0x46, 0x32, 0xF0, 0xAB, 0x46, 0x59, 0xF8, 0xAB, 0x46, 0x33, 0xF0, 0xAB, 0x46,
-        0x5A, 0xF8, 0xAB, 0x46, 0x34, 0xF0, 0xAB, 0x46, 0x5B, 0xF8, 0x66, 0x44, 0x02, 0xA6, 0xF1, 0x1F,
-        0xA6, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xAB, 0x46, 0x0C, 0x60, 0x38, 0x65, 0x22, 0x44, 0xFF, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81, 0xC9, 0x81, 0x4A, 0x64, 0x0E, 0x63,
-        0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x21, 0x44, 0x01, 0x2A, 0x08, 0x00, 0xAB, 0x46, 0xF0, 0xA1,
-        0x76, 0x64, 0x0E, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0xAB, 0x46, 0x22, 0x44, 0xFF, 0xB4,
-        0xE0, 0x84, 0xE0, 0x85, 0xC4, 0x84, 0x0C, 0x60, 0x80, 0x65, 0xC4, 0x81, 0x5A, 0x64, 0x04, 0x63,
-        0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0xAB, 0x46, 0x21, 0x44, 0x01, 0x2A, 0x06, 0x00, 0xFA, 0xA1,
-        0x90, 0x64, 0x04, 0x63, 0x59, 0xD1, 0x58, 0xD8, 0xFD, 0x1F, 0x3B, 0xF0, 0x21, 0x44, 0x01, 0x2A,
-        0x13, 0x00, 0x22, 0x44, 0x3D, 0xFB, 0x60, 0x41, 0x02, 0xFE, 0xF8, 0x84, 0xF8, 0x84, 0xF8, 0x84,
-        0x3C, 0xFB, 0x0C, 0x60, 0x7C, 0x63, 0x88, 0xFF, 0xCD, 0x81, 0x06, 0xA3, 0xFD, 0x0D, 0x8D, 0xFF,
-        0x3B, 0xFD, 0x64, 0x47, 0x80, 0xBF, 0x60, 0x5C, 0x22, 0x43, 0x80, 0x61, 0x88, 0xFF, 0xCF, 0x83,
-        0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91, 0xB1, 0x84, 0x3B, 0xFA, 0x1F, 0x63,
-        0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0x3B, 0xF0, 0x66, 0x44, 0xB1, 0x9C, 0x3B, 0xF8, 0x02, 0xA6,
-        0xFA, 0x1F, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x23, 0xF2, 0x25, 0xF0,
-        0x02, 0xA8, 0x00, 0x67, 0x22, 0x02, 0x3D, 0xF1, 0x64, 0x44, 0x03, 0xB4, 0x40, 0x42, 0xD0, 0x80,
-        0xA6, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0xBB, 0xF4, 0x80, 0x61, 0x02, 0x02, 0xE3, 0x83, 0xEB, 0x83,
-        0x22, 0x44, 0x88, 0xFF, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x0D, 0x8D, 0xFF, 0x61, 0x47, 0x31, 0x91,
-        0x9D, 0x85, 0xA7, 0x83, 0x3B, 0xFC, 0x1F, 0x63, 0xE3, 0x83, 0x66, 0x44, 0x02, 0xA6, 0xBB, 0xF2,
-        0x66, 0x44, 0xA5, 0x81, 0xBB, 0xFA, 0x02, 0xA6, 0xFA, 0x1F, 0x00, 0x67, 0x23, 0x58, 0xFF, 0xFF,
-        0x27, 0xF2, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41,
-        0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02,
-        0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF,
-        0x63, 0x46, 0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x21, 0x00,
-        0x43, 0x4B, 0xAB, 0x46, 0x3B, 0xF2, 0x80, 0x60, 0x30, 0x7C, 0xB0, 0x84, 0xA2, 0xDA, 0x4E, 0x61,
-        0x76, 0x64, 0x0E, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x90, 0x64,
-        0x04, 0x63, 0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0xA0, 0x64, 0x04, 0x63,
-        0xAB, 0x46, 0x59, 0xD0, 0xAB, 0x46, 0x58, 0xD8, 0xFB, 0x1F, 0x00, 0x67, 0x00, 0x61, 0x23, 0x58,
-        0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0x27, 0xF2, 0x1D, 0x60, 0xC0, 0x65,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2,
-        0x16, 0x18, 0x61, 0x46, 0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46,
-        0x26, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA6, 0xF3,
-        0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x01, 0x03, 0x0D, 0x00, 0x43, 0x4B, 0xAB, 0x46, 0x3B, 0xF2,
-        0x80, 0x60, 0x30, 0x61, 0x9D, 0x85, 0xA4, 0x84, 0xA2, 0xDA, 0xAB, 0x46, 0x00, 0x67, 0x00, 0x61,
-        0x23, 0x58, 0xFF, 0xFF, 0x01, 0x67, 0x20, 0x61, 0x23, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x46, 0x45,
-        0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0x00, 0xF4, 0x01, 0xF2, 0x66, 0x5C, 0x25, 0x46,
-        0x56, 0x02, 0x70, 0x27, 0x54, 0x00, 0x12, 0x64, 0x03, 0xFA, 0x04, 0xF8, 0x0E, 0xF2, 0x87, 0xFC,
-        0x8D, 0xFC, 0x8E, 0xFC, 0xDA, 0x82, 0x16, 0x61, 0x00, 0x63, 0xC9, 0x81, 0x5A, 0xDC, 0xFD, 0x02,
-        0x60, 0x40, 0xF0, 0x3B, 0x16, 0x00, 0x32, 0x44, 0xAC, 0xF3, 0x01, 0xB0, 0xFA, 0xA0, 0x08, 0x24,
-        0x2C, 0x05, 0xDC, 0x83, 0xF0, 0x67, 0x0E, 0xFA, 0x26, 0x60, 0x04, 0x64, 0x2B, 0xDB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xAC, 0xFD, 0x2B, 0xFF, 0xFE, 0x64, 0x3B, 0x42, 0x4A, 0xDB,
-        0x4F, 0x00, 0xAD, 0xF3, 0x05, 0x65, 0xD4, 0x80, 0xDC, 0x83, 0x17, 0x05, 0xAD, 0xFD, 0x98, 0xFE,
-        0x04, 0x04, 0x00, 0x7F, 0x08, 0x7E, 0x0E, 0xFA, 0x3B, 0xFF, 0x25, 0x60, 0xF8, 0x64, 0x2B, 0xDB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0x0E, 0xF2, 0x2B, 0xFF, 0x60, 0x40, 0x08, 0x26,
-        0xF7, 0xFE, 0xFD, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x32, 0x00, 0xA9, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0,
-        0xFF, 0xFF, 0x0D, 0x04, 0x26, 0x60, 0x10, 0x64, 0x2B, 0xDB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFC, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0x21, 0x00, 0x46, 0x45,
-        0x00, 0x64, 0x2B, 0xDB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18, 0x70, 0x67, 0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03,
-        0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46, 0x25, 0x44, 0x80, 0xFC, 0x05, 0xFA, 0xB6, 0x60, 0x58, 0x4E,
-        0xF5, 0x78, 0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF, 0xFF, 0x64, 0x3B, 0x42, 0x4A, 0xDB, 0xD4, 0xFE,
-        0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0x25, 0x60, 0xFE, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x0D, 0x00,
-        0x25, 0x60, 0xF2, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x18, 0x00, 0x26, 0x60, 0x0A, 0x64, 0x40, 0x47,
-        0x58, 0x4F, 0x03, 0x00, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x27, 0xD5, 0x0E, 0xF2, 0x0B, 0x18,
-        0x60, 0x40, 0x01, 0x2A, 0x08, 0x00, 0x26, 0x60, 0x20, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D,
-        0x08, 0x78, 0xFF, 0xFF, 0xF2, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD5, 0x0E, 0xF2, 0x14, 0x18,
-        0x60, 0x40, 0x01, 0x2A, 0x11, 0x00, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xA2, 0xFF,
-        0xAD, 0xF3, 0x02, 0x02, 0xCC, 0x84, 0xAD, 0xFB, 0x26, 0x60, 0x20, 0x64, 0x40, 0x4B, 0x34, 0x60,
-        0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0xE9, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xFB, 0x64, 0x3A, 0x42,
-        0x4A, 0xDB, 0xA2, 0xFF, 0xB0, 0xF3, 0xAC, 0xF3, 0xCC, 0x80, 0xFD, 0xA0, 0x01, 0x14, 0x1D, 0x05,
-        0xB5, 0x60, 0x58, 0x4D, 0xFA, 0x78, 0xFF, 0xFF, 0xA2, 0xFF, 0x17, 0x03, 0xF0, 0x67, 0x0E, 0xFA,
-        0x26, 0x60, 0x04, 0x64, 0x13, 0x60, 0x10, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xF6, 0x64, 0x3A, 0x42, 0x4A, 0xDB, 0xB0, 0xF3, 0xAC, 0xF3, 0xCC, 0x83,
-        0xDC, 0x84, 0x01, 0x15, 0xB0, 0xFD, 0xAC, 0xFB, 0xD4, 0xFE, 0xAF, 0xF3, 0xAD, 0xF3, 0x00, 0xA8,
-        0xAE, 0xF1, 0x03, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x26, 0x05, 0xB5, 0x60, 0x58, 0x4D, 0xFA, 0x78,
-        0xFF, 0xFF, 0xA2, 0xFF, 0x20, 0x03, 0x00, 0x63, 0xAF, 0xF3, 0x0E, 0xFC, 0xCC, 0x84, 0xFF, 0x3A,
-        0xAF, 0xFB, 0x98, 0xFE, 0x03, 0x04, 0x08, 0xBB, 0x0E, 0xFC, 0x3B, 0xFF, 0x25, 0x60, 0xF8, 0x64,
-        0x13, 0x60, 0x10, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xF7, 0x64, 0x3A, 0x42, 0x4A, 0xDB, 0xAD, 0xF3, 0x0E, 0xF2, 0xDC, 0x83, 0x08, 0xB0, 0xAD, 0xFD,
-        0x08, 0x28, 0xF7, 0xFE, 0xD4, 0xFE, 0xA3, 0xFF, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0xB9, 0xFE,
-        0x13, 0xFF, 0x24, 0x40, 0x80, 0x2B, 0x0B, 0x00, 0xA2, 0xFF, 0x25, 0x46, 0x09, 0xF4, 0x0E, 0xF2,
-        0x05, 0x18, 0x08, 0xBC, 0x0E, 0xFA, 0xFF, 0xFF, 0xF7, 0xFE, 0x01, 0x00, 0xD8, 0xFE, 0xA3, 0xFF,
-        0x25, 0x46, 0x3E, 0xF2, 0x00, 0xF4, 0x08, 0xF0, 0x25, 0x46, 0x06, 0xB4, 0xFF, 0x7F, 0x10, 0xBC,
-        0x06, 0x26, 0xFD, 0x7F, 0x0E, 0xFA, 0x3E, 0xF2, 0x3F, 0xF2, 0x60, 0x41, 0x08, 0x2A, 0x64, 0x47,
-        0x3F, 0xFA, 0x60, 0x45, 0xB9, 0xFC, 0x16, 0x60, 0xAA, 0xF3, 0xA3, 0xFC, 0xAB, 0xFC, 0x91, 0xFC,
-        0xD4, 0x80, 0x18, 0x60, 0x21, 0x65, 0xA5, 0x80, 0x01, 0x04, 0x07, 0x03, 0x23, 0xF0, 0x08, 0x64,
-        0xB0, 0x84, 0xA2, 0xDA, 0x35, 0x60, 0xEA, 0x78, 0xFF, 0xFF, 0x36, 0x60, 0x58, 0x4F, 0x30, 0x78,
-        0xFF, 0xFF, 0x0B, 0x04, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x2C, 0x60, 0xEE, 0x64,
-        0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x83, 0x00, 0xDB, 0xF3, 0xA6, 0xF1, 0x07, 0xB4,
-        0x64, 0x43, 0xFD, 0xA0, 0x2C, 0xF2, 0x71, 0x02, 0x01, 0xB0, 0x64, 0x43, 0x78, 0x02, 0x2E, 0xF2,
-        0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46,
-        0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x2E, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2,
-        0x0C, 0x02, 0x61, 0x46, 0x2D, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46,
-        0x2C, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46,
-        0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x51, 0x03, 0x63, 0x46, 0x80, 0xF6,
-        0x25, 0x46, 0x43, 0x18, 0x2E, 0xF2, 0x66, 0x41, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xA6, 0xF1, 0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF,
-        0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43,
-        0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43,
-        0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8,
-        0x60, 0x43, 0x61, 0x46, 0x43, 0x4B, 0x2C, 0xF0, 0xAD, 0xF0, 0x2E, 0xF2, 0xAB, 0x46, 0x03, 0xF8,
-        0x84, 0xF8, 0x05, 0xFA, 0x03, 0x64, 0x06, 0xFA, 0xAB, 0x46, 0x1F, 0x60, 0xC2, 0x61, 0xA1, 0xD3,
-        0x20, 0x60, 0x04, 0x7C, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9,
-        0x49, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xA1, 0xDB, 0x0A, 0x00, 0xDB, 0xF3, 0x02, 0xA3, 0xFE, 0xA0,
-        0xF9, 0xA0, 0x01, 0x06, 0x04, 0x02, 0x23, 0xF0, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x07, 0xFC,
-        0x23, 0xF2, 0xFF, 0xFF, 0x24, 0x1B, 0x16, 0x60, 0xAB, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x00, 0x3A,
-        0x0F, 0x00, 0x25, 0x60, 0xC8, 0x64, 0x13, 0x60, 0x10, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xC1, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x1D, 0x00,
-        0x25, 0x60, 0xDA, 0x64, 0x13, 0x60, 0x10, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0x0E, 0xF2, 0xC8, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x0E, 0x00, 0x25, 0x60,
-        0xEC, 0x64, 0x13, 0x60, 0x10, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x0E, 0xF2, 0xCE, 0xFE, 0x10, 0xAC, 0x0E, 0xFA, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF,
-        0xCB, 0x84, 0xC9, 0x83, 0xFF, 0xFF, 0x08, 0x04, 0x58, 0xD1, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A,
-        0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x2F, 0x58, 0xFF, 0xFF, 0x3E, 0xF2, 0xC9, 0xF1,
-        0x08, 0xB0, 0x19, 0xF8, 0x57, 0x02, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF3, 0x30, 0xFA, 0x60, 0x45,
-        0xEC, 0xF3, 0x31, 0xFA, 0x46, 0x4A, 0x00, 0xF4, 0x60, 0x43, 0x05, 0xF2, 0x06, 0xF2, 0xD0, 0x80,
-        0x07, 0xF0, 0x05, 0x02, 0xD4, 0x80, 0xD3, 0x80, 0x02, 0x02, 0xDB, 0xF3, 0x03, 0x03, 0xAA, 0x46,
-        0x42, 0xFE, 0x41, 0x00, 0x60, 0x40, 0x03, 0x2A, 0x20, 0x00, 0x02, 0xF2, 0x03, 0xF0, 0x04, 0xF2,
-        0x60, 0x43, 0xAA, 0x46, 0x2C, 0xFC, 0x2D, 0xF8, 0x2E, 0xFA, 0x7F, 0xF1, 0x32, 0xF8, 0x80, 0xF1,
-        0x33, 0xF8, 0x81, 0xF1, 0x34, 0xF8, 0x08, 0x64, 0x32, 0x40, 0x04, 0x2A, 0x0D, 0x00, 0x2C, 0xF0,
-        0x39, 0xF0, 0x64, 0x40, 0x01, 0x26, 0x08, 0x00, 0x3E, 0xF2, 0xFF, 0xFF, 0x00, 0x60, 0xC0, 0xB4,
-        0xE8, 0x84, 0xB0, 0x9C, 0x39, 0xF8, 0x88, 0x64, 0x1C, 0x00, 0x02, 0xF2, 0x03, 0xF0, 0x04, 0xF2,
-        0x60, 0x43, 0xAA, 0x46, 0x32, 0xFC, 0x33, 0xF8, 0x34, 0xFA, 0x7F, 0xF1, 0x2C, 0xF8, 0x80, 0xF1,
-        0x2D, 0xF8, 0x81, 0xF1, 0x2E, 0xF8, 0x01, 0x60, 0x08, 0x64, 0x32, 0x40, 0x04, 0x2A, 0x09, 0x00,
-        0x3E, 0xF2, 0x39, 0xF0, 0x00, 0x60, 0xC0, 0xB4, 0xE8, 0x84, 0xB0, 0x9C, 0x39, 0xF8, 0x01, 0x60,
-        0x88, 0x64, 0x2A, 0xFA, 0x02, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x36, 0x60, 0x22, 0x63, 0x20, 0x44,
-        0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44,
-        0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44,
-        0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44,
-        0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB, 0x1B, 0x60,
-        0x0B, 0xFD, 0x37, 0x60, 0x42, 0x63, 0x1B, 0x60, 0x0C, 0xFD, 0x30, 0x44, 0x1B, 0x60, 0x0D, 0xFB,
-        0x31, 0x44, 0x1B, 0x60, 0x0E, 0xFB, 0x32, 0x44, 0x1B, 0x60, 0x0F, 0xFB, 0x33, 0x44, 0x1B, 0x60,
-        0x10, 0xFB, 0x81, 0xFF, 0x91, 0xFF, 0x58, 0x51, 0x44, 0x00, 0x82, 0xFF, 0x92, 0xFF, 0x58, 0x51,
-        0x40, 0x00, 0x83, 0xFF, 0x93, 0xFF, 0x58, 0x51, 0x3C, 0x00, 0x84, 0xFF, 0x94, 0xFF, 0x58, 0x51,
-        0x38, 0x00, 0x85, 0xFF, 0x95, 0xFF, 0x58, 0x51, 0x34, 0x00, 0x86, 0xFF, 0x96, 0xFF, 0x58, 0x51,
-        0x30, 0x00, 0x87, 0xFF, 0x97, 0xFF, 0x58, 0x51, 0x2C, 0x00, 0x80, 0xFF, 0x90, 0xFF, 0x99, 0xFF,
-        0x1B, 0x60, 0x0B, 0xF1, 0x30, 0x44, 0x64, 0x43, 0xBD, 0xDB, 0x31, 0x44, 0xBD, 0xDB, 0x32, 0x44,
-        0xBD, 0xDB, 0x33, 0x44, 0xBD, 0xDB, 0x34, 0x44, 0xBD, 0xDB, 0x35, 0x44, 0xBD, 0xDB, 0x36, 0x44,
-        0xBD, 0xDB, 0x37, 0x44, 0xBD, 0xDB, 0x38, 0x44, 0xBD, 0xDB, 0x39, 0x44, 0xBD, 0xDB, 0x3A, 0x44,
-        0xBD, 0xDB, 0x3B, 0x44, 0xBD, 0xDB, 0x3C, 0x44, 0xBD, 0xDB, 0x3D, 0x44, 0xBD, 0xDB, 0x3E, 0x44,
-        0xBD, 0xDB, 0x3F, 0x44, 0xBD, 0xDB, 0xF6, 0x60, 0x16, 0x64, 0x0A, 0xFB, 0x40, 0x21, 0xFE, 0x01,
-        0x74, 0x00, 0x42, 0x50, 0x40, 0x53, 0x1B, 0x60, 0x0C, 0xF3, 0xFF, 0xFF, 0x40, 0x52, 0x33, 0x44,
-        0x32, 0x42, 0xA2, 0xDB, 0xDA, 0x82, 0xA2, 0xDD, 0xDA, 0x83, 0x65, 0x44, 0xBD, 0xDB, 0x61, 0x44,
-        0xBD, 0xDB, 0x66, 0x44, 0xBD, 0xDB, 0xBD, 0xD9, 0x30, 0x44, 0xBD, 0xDB, 0x99, 0xFF, 0xA4, 0x4C,
-        0xBD, 0xDB, 0xA5, 0x4C, 0xBD, 0xDB, 0xA0, 0x4C, 0xBD, 0xDB, 0xA1, 0x4C, 0xBD, 0xDB, 0x98, 0xFF,
-        0x1B, 0x60, 0x0C, 0xFD, 0x1B, 0x60, 0x0D, 0xF3, 0xFF, 0xFF, 0x40, 0x50, 0x1B, 0x60, 0x0F, 0xF3,
-        0xFF, 0xFF, 0x40, 0x52, 0x1B, 0x60, 0x10, 0xF3, 0xFF, 0xFF, 0x40, 0x53, 0x31, 0x41, 0x1B, 0x60,
-        0x0E, 0xF3, 0xFF, 0xFF, 0x40, 0x51, 0x1B, 0x60, 0x0B, 0xF3, 0xFF, 0xFF, 0x60, 0x43, 0x20, 0x44,
-        0xBD, 0xDB, 0x21, 0x44, 0xBD, 0xDB, 0x22, 0x44, 0xBD, 0xDB, 0x23, 0x44, 0xBD, 0xDB, 0x24, 0x44,
-        0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x26, 0x44, 0xBD, 0xDB, 0x27, 0x44, 0xBD, 0xDB, 0x28, 0x44,
-        0xBD, 0xDB, 0x29, 0x44, 0xBD, 0xDB, 0x2A, 0x44, 0xBD, 0xDB, 0x2B, 0x44, 0xBD, 0xDB, 0x2C, 0x44,
-        0xBD, 0xDB, 0x2D, 0x44, 0xBD, 0xDB, 0x2E, 0x44, 0xBD, 0xDB, 0x2F, 0x44, 0xBD, 0xDB, 0x1B, 0x60,
-        0x0B, 0xFD, 0x61, 0x58, 0xFF, 0xFF, 0x2F, 0x60, 0x4E, 0x63, 0xA3, 0xD3, 0x33, 0x5C, 0x02, 0xA4,
-        0xBD, 0xDB, 0xFE, 0xB4, 0xE0, 0x85, 0xC4, 0x85, 0x47, 0xD9, 0x34, 0x44, 0x5B, 0xDB, 0x44, 0xF3,
-        0x5B, 0xDB, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E, 0x84, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E,
-        0xFF, 0x01, 0x86, 0xE1, 0x80, 0xFF, 0x90, 0xFF, 0x88, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x87, 0x3E,
-        0x19, 0x60, 0xF7, 0xF3, 0xFF, 0xFF, 0x10, 0x1B, 0x32, 0x40, 0x80, 0x2A, 0xF6, 0x01, 0x9D, 0xFE,
-        0xF4, 0x05, 0xDB, 0xF3, 0xFF, 0xFF, 0x04, 0xA8, 0x33, 0x60, 0xE2, 0x62, 0x01, 0x02, 0xBD, 0x00,
-        0xA2, 0xD3, 0xFF, 0xFF, 0x4A, 0x1B, 0xE9, 0x01, 0x87, 0xFF, 0x20, 0x44, 0x80, 0xFF, 0x60, 0x40,
-        0x80, 0x26, 0xE3, 0x01, 0xF1, 0xFC, 0xAD, 0x4F, 0xFD, 0xB4, 0xA0, 0x5D, 0xC0, 0x60, 0x40, 0xEC,
-        0xC0, 0x60, 0x00, 0xED, 0xC0, 0x60, 0x80, 0xEE, 0xAC, 0x4F, 0xBF, 0xB4, 0xA0, 0x5C, 0x19, 0x60,
-        0x48, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x02, 0x27, 0x06, 0x00, 0x28, 0xE2, 0x24, 0xE2, 0x40, 0x21,
-        0xFE, 0x01, 0x75, 0x40, 0x0D, 0x00, 0x28, 0xE2, 0x24, 0xE2, 0x75, 0x40, 0x80, 0x2B, 0xAB, 0xFF,
-        0x14, 0xE0, 0x94, 0xE0, 0x40, 0x21, 0xFE, 0x01, 0x10, 0xE0, 0x75, 0x40, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x33, 0x60, 0xEE, 0x62, 0xA2, 0xDF, 0x01, 0x60, 0x39, 0xE2, 0x04, 0x60, 0x00, 0x7A, 0xAC, 0x4F,
-        0x40, 0xBC, 0x00, 0x7F, 0xA0, 0x5C, 0xC0, 0x60, 0x59, 0xEC, 0xC0, 0x60, 0x07, 0xED, 0xC0, 0x60,
-        0x8F, 0xEE, 0xAE, 0x4F, 0x04, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x26, 0x61, 0xCD, 0x81, 0xFF, 0xFF,
-        0xFD, 0x02, 0xAE, 0x4F, 0xFB, 0xB4, 0xA0, 0x5E, 0xA0, 0x01, 0xF1, 0xFC, 0xAD, 0x4F, 0xFD, 0xB4,
-        0xA0, 0x5D, 0x15, 0x60, 0x80, 0xE7, 0xC0, 0x60, 0x40, 0xEC, 0xC0, 0x60, 0x00, 0xED, 0xAC, 0x4F,
-        0xBF, 0xB4, 0xA0, 0x5C, 0xC0, 0x60, 0x84, 0xEE, 0xAE, 0x4F, 0x04, 0xBC, 0x00, 0x7F, 0xA0, 0x5E,
-        0x00, 0x7A, 0x0F, 0x60, 0x19, 0xE2, 0x0E, 0x60, 0x36, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0x75, 0x44,
-        0x80, 0x2B, 0xAB, 0xFF, 0x80, 0x27, 0x08, 0x00, 0x14, 0xE0, 0x94, 0xE0, 0x34, 0xE2, 0x61, 0x5A,
-        0x48, 0x21, 0xFE, 0x01, 0x00, 0xE0, 0x75, 0x40, 0x0A, 0x60, 0x19, 0xE2, 0x00, 0x64, 0x19, 0x60,
-        0xF1, 0xFB, 0x08, 0x60, 0x15, 0xF1, 0x08, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x01, 0x64, 0x19, 0x60, 0xF2, 0xFB, 0xFF, 0xFF, 0x10, 0xE0, 0x01, 0x60, 0x34, 0xE2, 0xFF, 0xFF,
-        0x05, 0x7A, 0xAC, 0x4F, 0x40, 0xBC, 0x00, 0x7F, 0xA0, 0x5C, 0xC0, 0x60, 0x59, 0xEC, 0xC0, 0x60,
-        0x07, 0xED, 0xC0, 0x60, 0x8F, 0xEE, 0xAE, 0x4F, 0x04, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x1B, 0x60,
-        0xF3, 0xF1, 0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x7D, 0xF1, 0x02, 0xB1, 0x04, 0x65,
-        0x02, 0x02, 0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x26, 0x61, 0xCD, 0x81,
-        0xFF, 0xFF, 0xFD, 0x02, 0xAE, 0x4F, 0xFB, 0xB4, 0xA0, 0x5E, 0x1B, 0x60, 0xF3, 0xF1, 0xAD, 0x4F,
-        0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x7D, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02, 0x64, 0x40,
-        0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x30, 0x01, 0x19, 0x60, 0xF3, 0xF3, 0xFF, 0xFF,
-        0x01, 0x1B, 0x2B, 0x01, 0x31, 0x44, 0x04, 0x2A, 0x28, 0x01, 0x08, 0x26, 0x26, 0x01, 0x19, 0x60,
-        0xF4, 0xF3, 0xFF, 0xFF, 0x01, 0x18, 0x21, 0x01, 0x7E, 0xF5, 0xF1, 0xFC, 0xAD, 0x4F, 0xFD, 0xB4,
-        0xA0, 0x5D, 0x15, 0x60, 0x80, 0xE7, 0xC0, 0x60, 0x40, 0xEC, 0xC0, 0x60, 0x00, 0xED, 0xAC, 0x4F,
-        0xBF, 0xB4, 0xA0, 0x5C, 0xC0, 0x60, 0x84, 0xEE, 0xAE, 0x4F, 0x04, 0xBC, 0x00, 0x7F, 0xA0, 0x5E,
-        0x00, 0x7A, 0x2D, 0x60, 0x5A, 0x63, 0xA3, 0xD1, 0x05, 0x60, 0xDC, 0x64, 0xD0, 0x80, 0x00, 0x64,
-        0x01, 0x06, 0x01, 0x64, 0x40, 0x4E, 0xB2, 0xF1, 0x66, 0x41, 0xE1, 0x81, 0xE1, 0x81, 0xE1, 0x81,
-        0xE1, 0x81, 0x61, 0x46, 0x73, 0x42, 0x5A, 0x92, 0x3F, 0x64, 0xA0, 0x84, 0x60, 0x47, 0xE0, 0x84,
-        0xE0, 0x85, 0x62, 0x47, 0xE8, 0x84, 0xE8, 0x84, 0x3F, 0xB4, 0x60, 0x41, 0x64, 0x44, 0x14, 0x90,
-        0x3F, 0x26, 0xCC, 0x84, 0x14, 0x90, 0x3F, 0x26, 0xCC, 0x84, 0x62, 0x41, 0x60, 0x55, 0xB2, 0xFB,
-        0x72, 0x5C, 0x67, 0x42, 0xD2, 0x80, 0xA2, 0x48, 0x20, 0x2B, 0x05, 0x00, 0x01, 0x02, 0x7C, 0x5C,
-        0x04, 0x60, 0x00, 0x64, 0xC4, 0x85, 0xE8, 0xE2, 0xE4, 0xE2, 0x61, 0x42, 0x49, 0x91, 0x64, 0x44,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xB4, 0x84, 0x60, 0x45,
-        0x51, 0x94, 0x04, 0x60, 0x00, 0x61, 0x01, 0x0D, 0x44, 0x94, 0x62, 0x41, 0x19, 0x60, 0xF5, 0xF1,
-        0x61, 0x42, 0x64, 0x43, 0xCF, 0x83, 0xCF, 0x83, 0x03, 0x03, 0xE3, 0x83, 0x48, 0x94, 0xFE, 0x1F,
-        0x2E, 0x40, 0x01, 0x26, 0xE0, 0x84, 0x60, 0x41, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81,
-        0x44, 0x94, 0xE9, 0x81, 0xE9, 0x81, 0x54, 0x94, 0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0x44, 0x94,
-        0xE9, 0x81, 0xE9, 0x81, 0xE9, 0x81, 0x54, 0x94, 0x19, 0xE2, 0x2E, 0x40, 0x01, 0x26, 0xE8, 0x84,
-        0x29, 0x61, 0x54, 0x91, 0x61, 0x43, 0x11, 0x06, 0x75, 0x44, 0x80, 0x2B, 0xAB, 0xFF, 0x80, 0x27,
-        0x0C, 0x00, 0x14, 0xE0, 0x94, 0xE0, 0x34, 0xE2, 0x61, 0x5A, 0x48, 0x21, 0xFE, 0x01, 0x00, 0xE0,
-        0x7A, 0x43, 0x15, 0xA1, 0x75, 0x40, 0x80, 0x2B, 0x06, 0xA1, 0x5D, 0x91, 0x61, 0x44, 0x2E, 0x40,
-        0x01, 0x26, 0xE0, 0x84, 0x60, 0x43, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0x89, 0xFF, 0x10, 0xE0,
-        0x80, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xEB, 0x83, 0xEB, 0x83, 0x5C, 0x94, 0xEB, 0x83, 0x5C, 0x94,
-        0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0x4C, 0x94, 0x2E, 0x40, 0x01, 0x26,
-        0xE8, 0x84, 0x60, 0x43, 0x65, 0x41, 0x62, 0x45, 0xD5, 0x85, 0x04, 0x60, 0x00, 0x61, 0x01, 0x0D,
-        0xC5, 0x85, 0xC4, 0x84, 0x60, 0x43, 0x62, 0x41, 0xE1, 0x81, 0xE1, 0x81, 0xE1, 0x81, 0xE1, 0x81,
-        0xE1, 0x81, 0xE1, 0x9C, 0x00, 0x61, 0xDD, 0x81, 0x58, 0x94, 0x4A, 0x92, 0xFC, 0x05, 0x41, 0x4F,
-        0x00, 0x61, 0x62, 0x45, 0x1C, 0x60, 0x0A, 0xF3, 0xE3, 0x83, 0xF1, 0x81, 0xE3, 0x83, 0xF1, 0x81,
-        0xE3, 0x83, 0xF1, 0x81, 0xE3, 0x83, 0xF1, 0x81, 0xE3, 0x83, 0xF1, 0x81, 0xE3, 0x83, 0xF1, 0x81,
-        0xA0, 0x52, 0xB2, 0xF3, 0xC3, 0x9C, 0x44, 0x94, 0x01, 0x04, 0xDC, 0x84, 0x60, 0x55, 0xB2, 0xFB,
-        0x64, 0x52, 0xE9, 0xE2, 0x65, 0x53, 0xB3, 0xF3, 0x06, 0x04, 0xDC, 0x84, 0xB3, 0xFB, 0xB4, 0xF3,
-        0x02, 0x04, 0xDC, 0x84, 0xB4, 0xFB, 0x2F, 0x43, 0xCF, 0x83, 0x6C, 0xF3, 0xFF, 0xFF, 0x5C, 0x94,
-        0xFF, 0xFF, 0x0C, 0x24, 0x01, 0x64, 0x6C, 0xFB, 0x16, 0x60, 0xAC, 0xF1, 0xFF, 0xFF, 0x03, 0x1B,
-        0x31, 0x40, 0x02, 0x2A, 0x07, 0x00, 0x73, 0xF3, 0xFF, 0xFF, 0x5C, 0x94, 0xFF, 0xFF, 0x0C, 0x24,
-        0x00, 0x64, 0x73, 0xFB, 0x19, 0x60, 0xF5, 0xF3, 0x01, 0x7C, 0x5C, 0x94, 0x00, 0x36, 0x01, 0x64,
-        0xA2, 0xDB, 0x19, 0x60, 0xF2, 0xF9, 0x01, 0x60, 0x34, 0xE2, 0x32, 0x7A, 0xAC, 0x4F, 0x40, 0xBC,
-        0x00, 0x7F, 0xA0, 0x5C, 0xC0, 0x60, 0x59, 0xEC, 0xC0, 0x60, 0x07, 0xED, 0xC0, 0x60, 0x8F, 0xEE,
-        0xAE, 0x4F, 0x04, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x0A, 0x61, 0xCD, 0x81, 0xFF, 0xFF, 0xFD, 0x02,
-        0xAE, 0x4F, 0xFB, 0xB4, 0xA0, 0x5E, 0x1B, 0x60, 0xF3, 0xF1, 0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4,
-        0x64, 0x41, 0x7D, 0xF1, 0x02, 0xB1, 0x04, 0x65, 0x02, 0x02, 0x64, 0x40, 0x01, 0x2B, 0x01, 0x65,
-        0xB4, 0x84, 0xA0, 0x5D, 0x37, 0x60, 0x7F, 0x78, 0xFF, 0xFF, 0x24, 0xE2, 0x2D, 0xF3, 0x2C, 0xF3,
-        0x00, 0xBD, 0xCC, 0x84, 0x08, 0x03, 0x2C, 0xFB, 0x06, 0x02, 0x65, 0x44, 0x2C, 0xFB, 0x8A, 0xFF,
-        0x80, 0x60, 0x00, 0x75, 0x88, 0xFF, 0x44, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x44, 0xFB, 0x2F, 0x60,
-        0x4A, 0x65, 0x2F, 0x60, 0x48, 0x61, 0xA5, 0xD3, 0xA1, 0xD3, 0x11, 0x18, 0xCC, 0x84, 0xA1, 0xDB,
-        0x0E, 0x02, 0xA5, 0xD3, 0xA1, 0xDB, 0x17, 0x60, 0xA7, 0xF3, 0x17, 0x60, 0xA6, 0xF1, 0xA2, 0xDB,
-        0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x03, 0x8A, 0xFF, 0x20, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xF1, 0xF3,
-        0x31, 0x40, 0x01, 0x2A, 0x3D, 0x00, 0x60, 0x43, 0x04, 0xB0, 0x02, 0xB0, 0x08, 0x24, 0x16, 0x02,
-        0x10, 0xB0, 0x29, 0x44, 0x34, 0x02, 0x00, 0xA8, 0xCC, 0x81, 0x0D, 0x03, 0x41, 0x49, 0x2F, 0x02,
-        0x63, 0x40, 0x08, 0x2A, 0x08, 0x00, 0xF7, 0xB3, 0x1B, 0x60, 0xF6, 0xF1, 0xAD, 0x4F, 0xFD, 0xB4,
-        0xA0, 0x5D, 0x44, 0x49, 0x24, 0x00, 0x63, 0x40, 0x02, 0x2A, 0x10, 0x00, 0x1B, 0x60, 0xF7, 0xF3,
-        0x1B, 0x60, 0xF5, 0xFB, 0x40, 0x49, 0x1B, 0x60, 0xF8, 0xF3, 0x1B, 0x60, 0xF6, 0xFB, 0x0C, 0xBB,
-        0xFD, 0xB3, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0x11, 0x00, 0x1B, 0x60, 0xF9, 0xF3,
-        0x37, 0x60, 0xEA, 0x7C, 0x0C, 0x18, 0xA4, 0xDB, 0x40, 0x49, 0x1B, 0x60, 0xFA, 0xF3, 0x1B, 0x60,
-        0xF6, 0xFB, 0x08, 0xBB, 0xFB, 0xB3, 0xAD, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5D, 0xF1, 0xFD,
-        0x00, 0x60, 0xA4, 0xF3, 0x62, 0x43, 0x17, 0x18, 0x58, 0xD3, 0x62, 0x41, 0x03, 0x18, 0xCC, 0x84,
-        0xA1, 0xDB, 0x11, 0x00, 0x49, 0xD3, 0xA3, 0xDB, 0x06, 0xA1, 0xA1, 0xD3, 0x59, 0xD1, 0x60, 0x45,
-        0xA5, 0xD3, 0x59, 0xD1, 0xB0, 0x84, 0xA5, 0xDB, 0x64, 0x44, 0x06, 0x36, 0xCD, 0xFE, 0x07, 0x36,
-        0xD6, 0xFE, 0xE6, 0x01, 0x23, 0x46, 0xB8, 0x60, 0x03, 0x78, 0xFF, 0xFF, 0x46, 0x43, 0x26, 0x60,
-        0x3E, 0x61, 0xA1, 0xD3, 0x59, 0xD1, 0x06, 0x1B, 0x59, 0xD3, 0x59, 0xD1, 0x03, 0x1B, 0x59, 0xD3,
-        0x59, 0xD1, 0xF0, 0x18, 0x00, 0x63, 0x49, 0xDD, 0x60, 0x40, 0x02, 0x36, 0x11, 0x00, 0x03, 0x36,
-        0x32, 0x00, 0x01, 0x36, 0x08, 0x00, 0x05, 0x3A, 0xEA, 0x01, 0xA4, 0xD3, 0x5A, 0xD3, 0x9C, 0x85,
-        0xA4, 0x84, 0xA2, 0xDB, 0xE4, 0x01, 0x01, 0x60, 0x48, 0x61, 0x00, 0x64, 0xA1, 0xDB, 0xDF, 0x01,
-        0x3A, 0x60, 0x3E, 0x64, 0x40, 0x45, 0x22, 0x00, 0x01, 0x60, 0x48, 0x66, 0xA6, 0xD3, 0x04, 0xA1,
-        0x60, 0x43, 0xA1, 0xD3, 0xC9, 0x81, 0x60, 0x45, 0x00, 0xBB, 0xA1, 0xDB, 0xBE, 0xD3, 0x09, 0x03,
-        0xD4, 0x84, 0x9C, 0x84, 0xDC, 0x84, 0xFF, 0xFF, 0x04, 0x0E, 0xA3, 0xD1, 0x63, 0x46, 0x64, 0x43,
-        0xF2, 0x01, 0x9C, 0x84, 0xDC, 0x85, 0x49, 0xDD, 0x61, 0x44, 0x00, 0xBB, 0xA6, 0xDB, 0x02, 0x03,
-        0x65, 0x44, 0xBE, 0xDB, 0xBC, 0x01, 0x3A, 0x60, 0x19, 0x64, 0x40, 0x45, 0x01, 0x60, 0x48, 0x66,
-        0xA6, 0xD3, 0xFF, 0xFF, 0xD0, 0x80, 0x0F, 0x18, 0x02, 0x03, 0x60, 0x46, 0xF9, 0x01, 0x58, 0xD3,
-        0xA4, 0xD3, 0x60, 0x45, 0x00, 0x63, 0xA4, 0xDD, 0x05, 0x18, 0x58, 0xD3, 0xFF, 0xFF, 0xC4, 0x83,
-        0xA2, 0xDD, 0xCA, 0x84, 0xA6, 0xDB, 0x25, 0x58, 0x64, 0x41, 0x00, 0x60, 0x46, 0x74, 0xCD, 0xE2,
-        0x04, 0xE1, 0x02, 0x60, 0x00, 0xE1, 0x3F, 0x44, 0x40, 0x26, 0x05, 0x00, 0x1C, 0x60, 0x0F, 0xF3,
-        0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x50, 0x3F, 0x40, 0x02, 0x2B, 0x03, 0x00, 0x3A, 0x60, 0xB7, 0x78,
-        0xFF, 0xFF, 0x04, 0x29, 0xFE, 0x01, 0xC4, 0xE2, 0x43, 0x64, 0x3A, 0xDB, 0xA1, 0xF3, 0xFF, 0xFF,
-        0x60, 0x41, 0x3F, 0x44, 0xFF, 0x01, 0x3F, 0x40, 0x40, 0x26, 0x05, 0x00, 0x1C, 0x60, 0x0D, 0xF3,
-        0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x52, 0xC4, 0xE2, 0x32, 0x7B, 0x4D, 0xE2, 0xBF, 0xFE, 0xC4, 0xE2,
-        0x41, 0xFF, 0xE0, 0xFE, 0xE1, 0xFE, 0xE2, 0xFE, 0x43, 0xFF, 0x44, 0xFF, 0x46, 0xFF, 0xA2, 0xF3,
-        0x62, 0xFF, 0x60, 0x40, 0x05, 0x36, 0x2D, 0xFF, 0x07, 0x36, 0xD5, 0xFE, 0x08, 0xE1, 0x88, 0x60,
-        0x85, 0x71, 0x8D, 0xE2, 0xA2, 0x60, 0x41, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x62, 0x3D, 0x60,
-        0x58, 0x4D, 0x3B, 0x78, 0xFF, 0xFF, 0x64, 0x41, 0xA9, 0x9C, 0x60, 0x45, 0x3D, 0x60, 0x58, 0x4D,
-        0x0F, 0x78, 0xFF, 0xFF, 0xA1, 0xF1, 0x09, 0x60, 0xB4, 0x61, 0x64, 0x44, 0x01, 0x27, 0x24, 0x00,
-        0x60, 0x40, 0x0E, 0x3A, 0x0D, 0x00, 0x01, 0x7C, 0x14, 0x60, 0x6F, 0xF9, 0x44, 0x60, 0x08, 0x7C,
-        0x14, 0x60, 0x41, 0xF9, 0x16, 0x60, 0x62, 0xF1, 0x02, 0x60, 0xB0, 0x61, 0xB1, 0x9C, 0x26, 0x00,
-        0x00, 0x7C, 0x14, 0x60, 0x6F, 0xF9, 0x40, 0x60, 0x08, 0x7C, 0x14, 0x60, 0x41, 0xF9, 0x16, 0x60,
-        0x62, 0xF1, 0x02, 0x60, 0x90, 0x61, 0xB1, 0x9C, 0x09, 0x60, 0x67, 0x65, 0xFF, 0xB4, 0xC4, 0x85,
-        0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x81, 0x12, 0x00, 0xFF, 0xB4, 0xED, 0xA0, 0x2C, 0x60, 0xC6, 0x61,
-        0x04, 0x04, 0xE2, 0xA0, 0xD9, 0x81, 0x01, 0x04, 0xD9, 0x81, 0xA1, 0xD1, 0x02, 0x60, 0x50, 0x61,
-        0x26, 0x60, 0xF0, 0x65, 0xE0, 0x84, 0x44, 0xD3, 0xB1, 0x9C, 0xC8, 0x81, 0x61, 0x47, 0x00, 0x7E,
-        0xE9, 0x81, 0x07, 0x60, 0xF0, 0x65, 0xA5, 0x81, 0x0B, 0xB9, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x85,
-        0xB5, 0x85, 0x04, 0x60, 0x44, 0x62, 0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0xA1, 0xF3,
-        0xC8, 0x61, 0x61, 0x54, 0xCD, 0xE2, 0x60, 0x40, 0x01, 0x27, 0x2E, 0x00, 0xCC, 0x84, 0xE0, 0x85,
-        0x15, 0x60, 0xA2, 0xE7, 0x26, 0x60, 0x80, 0x64, 0x3D, 0x60, 0x58, 0x4F, 0x04, 0x78, 0xFF, 0xFF,
-        0x26, 0x60, 0x9C, 0x64, 0x3D, 0x60, 0x58, 0x4F, 0x04, 0x78, 0xFF, 0xFF, 0x26, 0x60, 0xB8, 0x64,
-        0x3D, 0x60, 0x58, 0x4F, 0x04, 0x78, 0xFF, 0xFF, 0x26, 0x60, 0xD4, 0x64, 0x3D, 0x60, 0x58, 0x4F,
-        0x04, 0x78, 0xFF, 0xFF, 0x75, 0x64, 0x06, 0x61, 0x61, 0x48, 0x60, 0x44, 0x80, 0xBC, 0xFF, 0xB4,
-        0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x28, 0x60, 0xE6, 0x7C, 0x07, 0x60, 0xE8, 0xF9,
-        0x28, 0x60, 0x6E, 0x63, 0x14, 0x61, 0x21, 0x00, 0x14, 0x60, 0xDF, 0xF1, 0xFF, 0xB4, 0xED, 0xA0,
-        0x64, 0x41, 0x04, 0x04, 0xE2, 0xA0, 0xD9, 0x81, 0x01, 0x04, 0xD9, 0x81, 0xA1, 0xD1, 0x14, 0x60,
-        0x0E, 0xF3, 0x64, 0x41, 0xFF, 0xB1, 0xFF, 0x60, 0x00, 0x65, 0xA4, 0x84, 0x34, 0x94, 0xA2, 0xDB,
-        0x5A, 0xD3, 0x64, 0x41, 0xA5, 0x81, 0xFF, 0xB4, 0x34, 0x94, 0xA2, 0xDB, 0x29, 0x60, 0x52, 0x7C,
-        0x07, 0x60, 0xE8, 0xF9, 0x27, 0x60, 0xFC, 0x63, 0x13, 0x61, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78,
-        0xFF, 0xFF, 0x07, 0x60, 0xE8, 0xF3, 0x31, 0x40, 0x80, 0x26, 0x36, 0xA4, 0x07, 0x60, 0xE8, 0xFB,
-        0x60, 0x43, 0x09, 0x61, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0xA1, 0xF3, 0x29, 0x60,
-        0xBE, 0x61, 0x00, 0x7C, 0x7E, 0x63, 0x59, 0xD9, 0xFE, 0x1F, 0x60, 0x40, 0x01, 0x27, 0x03, 0x00,
-        0x2A, 0x60, 0x40, 0x65, 0x15, 0x00, 0xFF, 0xB4, 0xF9, 0xA0, 0x2A, 0x60, 0x62, 0x65, 0x01, 0x7C,
-        0x0D, 0x04, 0xED, 0xA0, 0x2A, 0x60, 0x84, 0x65, 0x11, 0x7C, 0x08, 0x04, 0xE2, 0xA0, 0x2A, 0x60,
-        0xA6, 0x65, 0x21, 0x7C, 0x03, 0x04, 0x2A, 0x60, 0xC8, 0x65, 0x31, 0x7C, 0x64, 0x5F, 0x7D, 0xFB,
-        0xA5, 0xD3, 0xDA, 0x85, 0xF0, 0xA0, 0x29, 0x60, 0xBE, 0x61, 0x08, 0x06, 0x40, 0x54, 0x58, 0x53,
-        0x08, 0xFF, 0x37, 0x60, 0x7A, 0x64, 0x43, 0xFB, 0x08, 0xFF, 0xFF, 0x01, 0x60, 0x43, 0x60, 0x46,
-        0xA5, 0xD1, 0xDA, 0x85, 0xA5, 0xD3, 0xDA, 0x85, 0x59, 0xD9, 0x59, 0xDB, 0x59, 0xD9, 0x59, 0xDB,
-        0xFB, 0x1F, 0x0C, 0x63, 0xA5, 0xD1, 0xDA, 0x85, 0xA5, 0xD3, 0xDA, 0x85, 0x59, 0xD9, 0x59, 0xDB,
-        0x59, 0xD9, 0x59, 0xDB, 0xF7, 0x1F, 0x66, 0x44, 0x0E, 0x63, 0x53, 0x93, 0x60, 0x40, 0x10, 0x36,
-        0x07, 0x00, 0x65, 0x44, 0x48, 0xD3, 0x59, 0xD9, 0x59, 0xDB, 0x59, 0xD9, 0x59, 0xDB, 0xFB, 0x1F,
-        0x16, 0x60, 0x39, 0xF1, 0x7D, 0xF3, 0x64, 0x43, 0xDB, 0x81, 0x2C, 0x60, 0x54, 0x65, 0x60, 0x40,
-        0x01, 0x37, 0x12, 0x00, 0x11, 0x37, 0x17, 0x00, 0x21, 0x37, 0x1D, 0x00, 0x31, 0x37, 0x22, 0x00,
-        0xA3, 0xD1, 0x16, 0x60, 0x34, 0xF5, 0x64, 0x44, 0xFF, 0xB4, 0x16, 0x60, 0x33, 0xFB, 0x64, 0x47,
-        0xFF, 0xB4, 0x16, 0x60, 0x2A, 0xF1, 0x1D, 0x00, 0xA1, 0xD3, 0x16, 0x60, 0x35, 0xF5, 0xFF, 0xB4,
-        0x16, 0x60, 0x2B, 0xF1, 0x16, 0x00, 0xA1, 0xD3, 0x16, 0x60, 0x36, 0xF5, 0x60, 0x47, 0xFF, 0xB4,
-        0x16, 0x60, 0x2C, 0xF1, 0x0E, 0x00, 0x59, 0xD3, 0x16, 0x60, 0x37, 0xF5, 0xFF, 0xB4, 0x16, 0x60,
-        0x2D, 0xF1, 0x07, 0x00, 0x59, 0xD3, 0x16, 0x60, 0x38, 0xF5, 0x60, 0x47, 0xFF, 0xB4, 0x16, 0x60,
-        0x2E, 0xF1, 0x16, 0x60, 0x32, 0xFB, 0x16, 0x60, 0x2F, 0xF9, 0x66, 0x42, 0xFC, 0xA2, 0xA2, 0xD3,
-        0x2B, 0x60, 0x42, 0x63, 0xCC, 0x84, 0xE8, 0x84, 0xCC, 0x81, 0x63, 0x45, 0xA6, 0xD3, 0xDA, 0x82,
-        0xFF, 0xB4, 0xFF, 0xFF, 0x03, 0x03, 0x60, 0x40, 0x80, 0x2B, 0x03, 0x00, 0xDA, 0x86, 0xCD, 0x81,
-        0xF5, 0x01, 0x00, 0xB9, 0xA6, 0xD3, 0x0B, 0x03, 0x5A, 0xD1, 0xDA, 0x86, 0xFF, 0xB4, 0xE0, 0x84,
-        0xC4, 0x84, 0x5C, 0x90, 0xBD, 0xD9, 0xFD, 0x02, 0xCD, 0x81, 0x66, 0x42, 0xF2, 0x02, 0x5A, 0xD3,
-        0x2B, 0x60, 0x80, 0x65, 0xD7, 0x80, 0xBD, 0xDB, 0xFD, 0x02, 0x7D, 0xF3, 0x19, 0x60, 0x7B, 0xF1,
-        0x60, 0x40, 0x01, 0x27, 0x09, 0x00, 0x64, 0x40, 0x10, 0x26, 0x06, 0x00, 0x13, 0x64, 0xCB, 0xFB,
-        0x01, 0x60, 0x67, 0x64, 0x37, 0xFB, 0x09, 0x00, 0x08, 0x64, 0xCB, 0xFB, 0xA1, 0xF3, 0x01, 0x60,
-        0x67, 0x7C, 0x60, 0x40, 0x01, 0x27, 0x5B, 0x7C, 0x37, 0xF9, 0x19, 0x60, 0x4D, 0xF1, 0x7D, 0xF3,
-        0x64, 0x40, 0x00, 0x3A, 0x1B, 0x00, 0x60, 0x40, 0x01, 0x27, 0x0D, 0x00, 0x32, 0x60, 0xAB, 0x63,
-        0x4C, 0x94, 0x0E, 0xA5, 0x60, 0xFE, 0xA0, 0xD1, 0xA5, 0xD3, 0x19, 0x60, 0x72, 0xF9, 0x19, 0x60,
-        0x73, 0xFB, 0x20, 0xFE, 0x0B, 0x00, 0xFF, 0xB4, 0xF8, 0xA4, 0x32, 0x60, 0xC8, 0x63, 0x4C, 0x94,
-        0x60, 0xFE, 0xA0, 0xD1, 0xFF, 0xFF, 0x19, 0x60, 0x73, 0xF9, 0x20, 0xFE, 0x19, 0x60, 0x75, 0xF3,
-        0x16, 0x60, 0xD8, 0xF1, 0x60, 0x43, 0xD3, 0x80, 0x19, 0x60, 0x76, 0xF3, 0x01, 0x07, 0x63, 0x5C,
-        0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x07, 0x60, 0x5C, 0x19, 0x60, 0x4F, 0xF9, 0x19, 0x60, 0x53, 0xF9,
-        0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x0A, 0x00, 0xFF, 0xB5, 0x10, 0x60, 0xF4, 0x63,
-        0x65, 0x41, 0xCD, 0x81, 0x06, 0xA3, 0xFD, 0x02, 0xFA, 0xA3, 0xA3, 0xD3, 0x0F, 0x00, 0x01, 0x60,
-        0xFF, 0x65, 0xA4, 0x84, 0x11, 0x60, 0x60, 0x61, 0xA1, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0x08, 0xA1,
-        0xFB, 0x02, 0xFC, 0xA1, 0xA1, 0xD3, 0x19, 0x60, 0x4F, 0xF1, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF,
-        0x04, 0x07, 0x19, 0x60, 0x4F, 0xFB, 0x19, 0x60, 0x53, 0xFB, 0x19, 0x60, 0x4F, 0xF3, 0x19, 0x60,
-        0x72, 0xF1, 0x19, 0x60, 0x74, 0xFB, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x04, 0x19, 0x60, 0x74, 0xF9,
-        0x2C, 0x60, 0x74, 0x63, 0x2B, 0x60, 0x02, 0x65, 0x16, 0x60, 0x33, 0xF1, 0x2A, 0x60, 0xEA, 0x61,
-        0x2C, 0x60, 0x62, 0x64, 0x40, 0x4F, 0x04, 0x64, 0xC3, 0x60, 0x58, 0x4D, 0x1A, 0x78, 0xFF, 0xFF,
-        0x19, 0x60, 0x4F, 0xF3, 0x19, 0x60, 0x73, 0xF1, 0x19, 0x60, 0x74, 0xFB, 0xD0, 0x80, 0xFF, 0xFF,
-        0x02, 0x04, 0x19, 0x60, 0x74, 0xF9, 0x2C, 0x60, 0x7C, 0x63, 0x16, 0x60, 0x32, 0xF1, 0x2B, 0x60,
-        0x42, 0x65, 0x2C, 0x60, 0x60, 0x64, 0x40, 0x4F, 0x08, 0x64, 0xC3, 0x60, 0x58, 0x4D, 0x1A, 0x78,
-        0xFF, 0xFF, 0x7D, 0xF3, 0x08, 0x7C, 0x38, 0xF9, 0x2B, 0x60, 0xDA, 0x61, 0x60, 0x40, 0x01, 0x2B,
-        0x0E, 0x00, 0x01, 0x37, 0x06, 0x00, 0x11, 0x37, 0x03, 0x00, 0x21, 0x3B, 0x1E, 0xA1, 0x1E, 0xA1,
-        0x1E, 0xA1, 0x1C, 0x63, 0x2B, 0x60, 0xBC, 0x64, 0x59, 0xD1, 0x58, 0xD9, 0xFD, 0x1F, 0x16, 0x60,
-        0x2F, 0xF3, 0x00, 0x7C, 0x60, 0x45, 0x70, 0x62, 0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF,
-        0x04, 0x29, 0xFE, 0x01, 0x00, 0x60, 0x10, 0x62, 0x3D, 0x60, 0x58, 0x4D, 0x3B, 0x78, 0xFF, 0xFF,
-        0x01, 0x61, 0xB1, 0x9C, 0x60, 0x45, 0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0x3A, 0x60,
-        0x95, 0x78, 0xFF, 0xFF, 0x44, 0xD3, 0x80, 0x7C, 0x60, 0x48, 0x60, 0x47, 0x00, 0x7F, 0xB0, 0x8A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x2F, 0x58, 0xFF, 0xFF, 0xD5, 0x60, 0x84, 0xE7, 0x62, 0x47,
-        0x80, 0xBF, 0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x64, 0x4A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x2D, 0x58,
-        0xFF, 0xFF, 0x00, 0x7C, 0xBD, 0xD3, 0xD5, 0x60, 0x84, 0xE7, 0x60, 0x47, 0x80, 0xBF, 0x60, 0x4A,
-        0xBD, 0xD3, 0x01, 0x16, 0xFE, 0x01, 0x90, 0x8A, 0xBD, 0xD3, 0x01, 0x16, 0xFE, 0x01, 0x90, 0x8A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0xCD, 0x81, 0x95, 0x60, 0x84, 0xE7, 0xEB, 0x02, 0x2D, 0x58,
-        0xFF, 0xFF, 0xD5, 0x60, 0x84, 0xE7, 0x62, 0x4A, 0x02, 0x64, 0x01, 0x16, 0xFE, 0x01, 0xCC, 0x84,
-        0xFF, 0xFF, 0xFD, 0x02, 0x7C, 0x49, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x68, 0x5C, 0x7C, 0x49,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x68, 0x44, 0x95, 0x60, 0x84, 0xE7, 0x2D, 0x58, 0xFF, 0xFF,
-        0x40, 0xFF, 0x20, 0x44, 0xBF, 0xB4, 0x40, 0x40, 0x03, 0x00, 0x20, 0x44, 0x40, 0xBC, 0x40, 0x40,
-        0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x02, 0x00, 0x43, 0x45, 0xF6, 0x01, 0x00, 0x64,
-        0x19, 0x60, 0xF2, 0xFB, 0x3F, 0x44, 0x40, 0x26, 0x05, 0x00, 0x1C, 0x60, 0x0F, 0xF3, 0x5A, 0xD1,
-        0xA0, 0x50, 0xA4, 0x50, 0xAE, 0x4F, 0xFD, 0xB4, 0x04, 0xBC, 0xA0, 0x5E, 0x00, 0x60, 0x02, 0x71,
-        0x8D, 0xE2, 0x40, 0xE1, 0x40, 0x29, 0xFE, 0x01, 0x04, 0xAC, 0xA0, 0x5E, 0xFF, 0xFF, 0x00, 0x60,
-        0x10, 0x62, 0x19, 0x60, 0x8E, 0x7C, 0x00, 0x60, 0xAC, 0x65, 0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x62, 0x3D, 0x60, 0x58, 0x4D, 0x3B, 0x78, 0xFF, 0xFF,
-        0x60, 0x40, 0x19, 0x60, 0x8E, 0x64, 0x64, 0x40, 0xD0, 0x80, 0x14, 0x71, 0x05, 0x03, 0x8D, 0xE2,
-        0x40, 0xE1, 0x40, 0x29, 0xFE, 0x01, 0xE2, 0x01, 0x3F, 0x44, 0x40, 0x26, 0x05, 0x00, 0x1C, 0x60,
-        0x0D, 0xF3, 0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x52, 0x27, 0x60, 0x36, 0x63, 0x1E, 0x61, 0x3D, 0x60,
-        0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x14, 0x71, 0x8D, 0xE2, 0x40, 0xE1, 0x40, 0x29,
-        0xFE, 0x01, 0x31, 0x44, 0x40, 0x26, 0x02, 0x00, 0x80, 0x26, 0x17, 0x00, 0x28, 0x60, 0xE6, 0x63,
-        0x07, 0x60, 0xE8, 0xFD, 0x09, 0x61, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0x31, 0x44,
-        0x40, 0x2A, 0x14, 0x00, 0x31, 0x44, 0x7F, 0xB4, 0x40, 0x51, 0xAE, 0x4C, 0x10, 0x26, 0x0E, 0x00,
-        0x07, 0x60, 0xE9, 0xFB, 0x31, 0x44, 0x80, 0xBC, 0x40, 0x51, 0x29, 0x60, 0x1C, 0x63, 0x07, 0x60,
-        0xE8, 0xFD, 0x09, 0x61, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0x27, 0x60, 0xEA, 0x63,
-        0x03, 0x61, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x62, 0x19, 0x60,
-        0x8F, 0x7C, 0x00, 0x60, 0xAC, 0x65, 0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0x80, 0xE1,
-        0xBF, 0xFE, 0xA1, 0x4F, 0x70, 0xB4, 0x50, 0x36, 0x0C, 0x00, 0x20, 0x36, 0x03, 0x00, 0x3A, 0x60,
-        0x77, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0x1A, 0xE1, 0xDF, 0xFE, 0x19, 0xFF, 0x00, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x20, 0x44, 0x40, 0x2A, 0x85, 0x00, 0x7D, 0xF1, 0x3B, 0x00, 0x83, 0x00, 0x19, 0x60,
-        0xF2, 0xF3, 0xFF, 0xFF, 0x01, 0x18, 0x59, 0x01, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40,
-        0x1C, 0x60, 0x0F, 0xF3, 0x3F, 0x40, 0x40, 0x26, 0x01, 0x00, 0xA0, 0x50, 0xAE, 0x4F, 0xFD, 0xB4,
-        0xA0, 0x5E, 0xAC, 0x4F, 0x10, 0xBC, 0xA0, 0x5C, 0xFF, 0xFF, 0x10, 0xAC, 0xA0, 0x5C, 0x00, 0x60,
-        0xC8, 0x71, 0x8D, 0xE2, 0x40, 0xE1, 0x40, 0x29, 0xFE, 0x01, 0x7D, 0xF1, 0x30, 0x61, 0x64, 0x44,
-        0x01, 0x2B, 0x20, 0xA1, 0x30, 0x64, 0x61, 0x5F, 0x60, 0x45, 0x0C, 0x60, 0x00, 0x62, 0x00, 0x60,
-        0x71, 0x7C, 0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0xC8, 0x71, 0x8D, 0xE2,
-        0x40, 0xE1, 0x40, 0x29, 0xFE, 0x01, 0x01, 0x60, 0x08, 0xE1, 0x7D, 0xF1, 0x20, 0x44, 0x40, 0xBC,
-        0x40, 0x40, 0x19, 0x60, 0xF2, 0xF3, 0xFF, 0xFF, 0x03, 0x18, 0x3D, 0x60, 0x57, 0x78, 0xFF, 0xFF,
-        0x1B, 0x60, 0xF3, 0xF1, 0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x7D, 0xF1, 0x02, 0xB1,
-        0x04, 0x65, 0x02, 0x02, 0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x20, 0x44,
-        0x40, 0x2A, 0x43, 0x45, 0x20, 0xBC, 0x40, 0x40, 0xA1, 0xF9, 0x05, 0x64, 0xA2, 0xFB, 0xDF, 0xFE,
-        0x19, 0xFF, 0xDD, 0xFE, 0x26, 0x00, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x43, 0x45, 0xA4, 0xD1,
-        0xDA, 0x83, 0xC3, 0x85, 0x80, 0xE1, 0xDF, 0xFE, 0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x48, 0x60, 0x47,
-        0x80, 0xBC, 0x00, 0x7F, 0x60, 0x4A, 0xD7, 0x80, 0xA1, 0xFF, 0xF6, 0x02, 0xBF, 0xFE, 0x11, 0x00,
-        0x43, 0x45, 0xA4, 0xD1, 0xDA, 0x83, 0x0D, 0x18, 0x64, 0x44, 0x00, 0x61, 0xFA, 0xA4, 0xDD, 0x81,
-        0xFD, 0x02, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0xBF, 0xFE, 0x02, 0x00, 0xF1, 0xFE,
-        0x01, 0x00, 0x25, 0x43, 0x21, 0xE1, 0x00, 0x64, 0xBF, 0xDB, 0x20, 0x44, 0x20, 0x2A, 0x07, 0x00,
-        0x07, 0xB4, 0x04, 0x36, 0xC3, 0xFE, 0x06, 0x36, 0xCC, 0xFE, 0x07, 0x36, 0xD5, 0xFE, 0x20, 0x44,
-        0x98, 0xB4, 0x40, 0x40, 0x26, 0x60, 0x26, 0x63, 0xBD, 0xD3, 0x03, 0x61, 0x0F, 0x1B, 0x04, 0xA3,
-        0xBD, 0xD3, 0x04, 0x61, 0x0B, 0x1B, 0x04, 0xA3, 0xBD, 0xD3, 0x06, 0x61, 0x07, 0x1B, 0x04, 0xA3,
-        0xBD, 0xD3, 0x07, 0x61, 0x03, 0x1B, 0xC3, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0xA3, 0xD1, 0x40, 0x44,
-        0x20, 0x44, 0x07, 0xB5, 0xD4, 0x85, 0x35, 0x80, 0x24, 0x45, 0x26, 0x60, 0x66, 0x64, 0x44, 0xD7,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x43, 0x45, 0x20, 0x44, 0x20, 0xBC, 0x40, 0x40, 0x64, 0x43, 0xBD, 0xD3,
-        0xBD, 0xD1, 0x40, 0x44, 0x10, 0x27, 0x19, 0x00, 0x3F, 0x40, 0x02, 0x2B, 0x06, 0x00, 0x24, 0x47,
-        0x08, 0x2B, 0x13, 0x00, 0x07, 0xB4, 0x01, 0x36, 0x11, 0x00, 0xFF, 0x60, 0x7F, 0x65, 0x15, 0x60,
-        0xA2, 0x64, 0x24, 0x40, 0x08, 0x2B, 0xA4, 0x84, 0xA0, 0x57, 0xFF, 0xFF, 0x64, 0x49, 0xFF, 0xFF,
-        0x68, 0x44, 0x01, 0x16, 0xFD, 0x01, 0x00, 0x7F, 0xA3, 0xDB, 0xAB, 0x01, 0x64, 0x42, 0x3D, 0x60,
-        0x58, 0x4D, 0x3B, 0x78, 0xFF, 0xFF, 0xBD, 0xD9, 0xA3, 0xDB, 0xA3, 0x01, 0x43, 0x45, 0x20, 0x44,
-        0x20, 0xBC, 0x40, 0x40, 0x64, 0x43, 0xBD, 0xD3, 0xA3, 0xD1, 0x40, 0x44, 0x10, 0x2B, 0x16, 0x00,
-        0xBE, 0xD1, 0xFF, 0xFF, 0x15, 0x60, 0x80, 0xE7, 0x24, 0x40, 0x07, 0x27, 0x04, 0x00, 0xAC, 0x4F,
-        0x10, 0xBC, 0x00, 0x7F, 0xA0, 0x5C, 0x64, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x24, 0x40,
-        0x20, 0x27, 0x1D, 0x00, 0xAC, 0x4F, 0xEF, 0xB4, 0xA0, 0x5C, 0x19, 0x00, 0x3F, 0x40, 0x02, 0x2B,
-        0x06, 0x00, 0x24, 0x47, 0x08, 0x2B, 0x13, 0x00, 0x07, 0xB4, 0x01, 0x36, 0x11, 0x00, 0x15, 0x60,
-        0x22, 0x64, 0x24, 0x40, 0x08, 0x27, 0x80, 0xBC, 0x7C, 0x48, 0xBE, 0xD3, 0xA0, 0x57, 0x60, 0x48,
-        0x64, 0x44, 0x80, 0xBC, 0xFF, 0xB4, 0x60, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x69, 0x01,
-        0x01, 0x61, 0x3D, 0x60, 0x58, 0x4D, 0x23, 0x78, 0xFF, 0xFF, 0x63, 0x01, 0x30, 0x44, 0x02, 0xA8,
-        0x00, 0xE1, 0x07, 0x02, 0x62, 0xFF, 0x63, 0xFF, 0x64, 0xFF, 0x65, 0xFF, 0x66, 0xFF, 0xBF, 0xFE,
-        0xA1, 0xFF, 0x82, 0xFF, 0x88, 0xFF, 0x6C, 0x40, 0x41, 0xFF, 0xC4, 0xE2, 0x43, 0xFF, 0x5C, 0x49,
-        0x08, 0xE1, 0xA2, 0x60, 0x41, 0x78, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x02, 0x02,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x82, 0xFF, 0x88, 0xFF, 0xA8, 0xE2, 0xCB, 0xF1, 0x00, 0x6B, 0x89, 0xFF,
-        0x64, 0x54, 0x88, 0xFF, 0x9F, 0xFE, 0x02, 0x05, 0x64, 0x44, 0x60, 0x54, 0xCD, 0xE2, 0xC2, 0x64,
-        0x3A, 0xDB, 0xBC, 0xFF, 0xB5, 0xFF, 0x1D, 0xFF, 0x26, 0x44, 0x02, 0xB4, 0x40, 0x46, 0x3C, 0x44,
-        0x00, 0xBC, 0xFF, 0xFF, 0x06, 0x03, 0x27, 0x40, 0x26, 0x22, 0x03, 0x00, 0x02, 0x64, 0x31, 0xFB,
-        0xC0, 0xFE, 0x27, 0x44, 0x20, 0x2A, 0x04, 0x00, 0xA0, 0x60, 0x00, 0xEA, 0xB0, 0x60, 0x00, 0xEA,
-        0x5C, 0x44, 0x27, 0x44, 0x18, 0xB4, 0x40, 0x47, 0x00, 0xE1, 0x29, 0x40, 0x50, 0x2B, 0x37, 0x00,
-        0xEF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x31, 0x40, 0x08, 0x26, 0x0B, 0x00, 0x21, 0x46,
-        0xA7, 0xF4, 0x1D, 0xF2, 0xFF, 0xB3, 0x00, 0x7C, 0x05, 0x03, 0x06, 0x61, 0x5D, 0x91, 0x09, 0x60,
-        0x02, 0x65, 0x02, 0x03, 0x00, 0x61, 0x15, 0x00, 0xD4, 0x80, 0x63, 0x45, 0xFB, 0x07, 0x65, 0x43,
-        0x80, 0x60, 0x00, 0x62, 0xF6, 0x82, 0x53, 0x90, 0xE3, 0x83, 0xFC, 0x04, 0xEB, 0x83, 0xEB, 0x83,
-        0xEA, 0x82, 0x5C, 0x94, 0xB2, 0x9C, 0xF3, 0x07, 0x64, 0x41, 0xDD, 0x81, 0xE1, 0x81, 0xE1, 0x81,
-        0xE1, 0x81, 0x2B, 0x44, 0x54, 0x90, 0x70, 0x45, 0x02, 0x28, 0x61, 0x44, 0xC4, 0x84, 0xFF, 0xFF,
-        0x04, 0x24, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00, 0x20, 0x29, 0x6D, 0xE2, 0xA4, 0xE2,
-        0xC4, 0xE2, 0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0x32, 0xF1, 0x08, 0x29, 0x09, 0x00,
-        0x64, 0x40, 0x07, 0x22, 0x06, 0x00, 0x43, 0xFF, 0x27, 0x44, 0x10, 0xBC, 0x40, 0x47, 0x00, 0x64,
-        0x32, 0xFB, 0x31, 0x41, 0x3C, 0x44, 0x01, 0xB1, 0x00, 0xBC, 0x0A, 0x02, 0x09, 0x03, 0x32, 0xF3,
-        0x00, 0x7C, 0x01, 0xB4, 0xFF, 0xFF, 0x04, 0x03, 0x32, 0xF9, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0xC8, 0x60, 0x09, 0x7D, 0x00, 0x60, 0x00, 0x6B, 0x00, 0x64, 0x33, 0xFB, 0x0C, 0x60, 0x16, 0x64,
-        0xA0, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0xE1, 0x30, 0x40, 0x02, 0x36, 0xA1, 0xFF, 0x83, 0xFF,
-        0x8D, 0xFF, 0x5C, 0x44, 0x5C, 0x43, 0x5C, 0x42, 0x5C, 0x41, 0x5C, 0x40, 0xAC, 0xFF, 0xAD, 0xFF,
-        0xE7, 0xE1, 0xB3, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x03, 0x02,
-        0x28, 0xE2, 0x40, 0xFF, 0xA1, 0xFF, 0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0xB7, 0x60,
-        0xF7, 0x64, 0x40, 0x40, 0xBA, 0xF3, 0x7E, 0xFB, 0x0F, 0x60, 0xE2, 0x63, 0xC7, 0xF3, 0xBD, 0xDB,
-        0x00, 0x60, 0x9A, 0x64, 0xBD, 0xDB, 0x02, 0x64, 0xBD, 0xDB, 0x04, 0x64, 0xA3, 0xDB, 0x5C, 0x49,
-        0x0A, 0x64, 0x40, 0x4B, 0x5C, 0x5C, 0x01, 0x60, 0x39, 0xE2, 0x04, 0x60, 0x00, 0x7A, 0x89, 0xFF,
-        0x03, 0x60, 0xFF, 0x73, 0x88, 0xFF, 0xB7, 0x60, 0xF7, 0x78, 0xFF, 0xFF, 0x30, 0x44, 0x02, 0xA8,
-        0x00, 0xE1, 0x06, 0x02, 0x40, 0xFF, 0x42, 0xFF, 0x43, 0xFF, 0x44, 0xFF, 0x45, 0xFF, 0xA1, 0xFF,
-        0x88, 0xFF, 0x85, 0xFF, 0x21, 0xE1, 0x5C, 0x40, 0xC3, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0xA2, 0xFF,
-        0x30, 0x44, 0x02, 0xA8, 0x00, 0xE1, 0x01, 0x02, 0xA1, 0xFF, 0x86, 0xFF, 0x88, 0xFF, 0x5C, 0x46,
-        0x5C, 0x49, 0x5C, 0x40, 0xEF, 0x60, 0x58, 0x4F, 0x1B, 0x78, 0xFF, 0xFF, 0x1D, 0x60, 0x58, 0x4F,
-        0x81, 0x78, 0xFF, 0xFF, 0xD3, 0x60, 0x58, 0x4F, 0x58, 0x78, 0xFF, 0xFF, 0xE7, 0x60, 0x58, 0x4F,
-        0x99, 0x78, 0xFF, 0xFF, 0x20, 0x60, 0x58, 0x4F, 0x19, 0x78, 0xFF, 0xFF, 0xF4, 0x60, 0x58, 0x4F,
-        0xE9, 0x78, 0xFF, 0xFF, 0xE9, 0x60, 0x58, 0x4F, 0xCA, 0x78, 0xFF, 0xFF, 0x27, 0x60, 0x58, 0x4F,
-        0x71, 0x78, 0xFF, 0xFF, 0xEE, 0x60, 0x58, 0x4F, 0x69, 0x78, 0xFF, 0xFF, 0x1F, 0xE1, 0xA3, 0xFF,
-        0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0x03, 0xE1, 0xA3, 0xFF, 0xFE, 0xFC, 0xFF, 0xFC, 0x25, 0x60,
-        0x96, 0x63, 0x17, 0xFD, 0xAE, 0xFF, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF, 0x42, 0x6F, 0x6F, 0x74,
-        0x63, 0x6F, 0x64, 0x65, 0x20, 0x21, 0x21, 0x20, 0x20, 0x00, 0x53, 0x54, 0x41, 0x2F, 0x41, 0x50,
-        0x20, 0x46, 0x75, 0x6E, 0x63, 0x27, 0x73, 0x00, 0x1F, 0x00, 0x04, 0x00, 0x01, 0x00, 0x24, 0x00,
-        0x00, 0x00, 0x04, 0x00, 0x04, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00,
-        0x06, 0x00, 0x07, 0x00, 0x05, 0x00, 0x06, 0x00, 0x07, 0x00, 0x06, 0x00, 0x06, 0x00, 0x07, 0x00,
-        0x01, 0x00, 0x02, 0x00, 0x02, 0x00, 0x01, 0x00, 0x02, 0x00, 0x01, 0x00, 0x01, 0x00, 0x02, 0x00,
-        0x00, 0x00, 0x03, 0x00, 0x01, 0x00, 0xA6, 0xF3, 0x21, 0x61, 0x00, 0x7C, 0x01, 0x00, 0x00, 0xFA,
-        0x60, 0x46, 0xFE, 0x63, 0xA3, 0xD8, 0xFE, 0x1F, 0xCD, 0x81, 0xD8, 0x84, 0xF8, 0x02, 0x21, 0x61,
-        0x80, 0x67, 0x40, 0x4A, 0xA6, 0xF5, 0x05, 0x18, 0x2A, 0x43, 0x02, 0xFC, 0x5F, 0x8A, 0x00, 0xF4,
-        0xFA, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0xA8, 0xF1, 0xA7, 0xF3, 0x7C, 0x63, 0xAA, 0xFB, 0x60, 0x46,
-        0x01, 0xFC, 0xDC, 0x84, 0xD0, 0x80, 0x00, 0xFA, 0xFA, 0x04, 0xAB, 0xFB, 0x60, 0x46, 0x00, 0x64,
-        0x00, 0xFA, 0x63, 0x44, 0x80, 0x7F, 0x01, 0xFA, 0xA8, 0xF3, 0xA7, 0xF1, 0xDC, 0x84, 0xD0, 0x84,
-        0xA9, 0xFB, 0x03, 0x60, 0x26, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x2E, 0xFB, 0x82, 0xFF, 0x40, 0x42, 0x87, 0xFF, 0xA9, 0xF3, 0xB1, 0xFB, 0x00, 0x64, 0x40, 0x50,
-        0x63, 0xFF, 0x60, 0xFF, 0x66, 0xFF, 0x65, 0xFF, 0x64, 0xFF, 0x61, 0xFF, 0x62, 0xFF, 0x49, 0x60,
-        0x02, 0xE1, 0x52, 0x60, 0x02, 0xE1, 0x5C, 0x60, 0x02, 0xE1, 0x65, 0x60, 0x02, 0xE1, 0x6B, 0x60,
-        0x02, 0xE1, 0x76, 0x60, 0x02, 0xE1, 0x41, 0x60, 0x02, 0xE1, 0x0C, 0x64, 0x13, 0x60, 0x1C, 0xFB,
-        0x41, 0x60, 0x07, 0x64, 0x9F, 0xFB, 0x2D, 0xFF, 0x06, 0x61, 0x41, 0x4B, 0x09, 0x60, 0x08, 0x61,
-        0xB6, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0xF0, 0x67, 0x0E, 0xFA, 0x26, 0x60, 0x04, 0x64,
-        0x13, 0x60, 0x10, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x2B, 0x41, 0x4D, 0x8B, 0xFF, 0xFF, 0xEA, 0x02, 0x05, 0x61, 0x41, 0x4B, 0x09, 0x60, 0x08, 0x61,
-        0xB6, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0x25, 0x60, 0xF8, 0x64, 0x13, 0x60, 0x10, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x2B, 0x41, 0x4D, 0x8B,
-        0xFF, 0xFF, 0xEC, 0x02, 0x40, 0x60, 0x45, 0x78, 0xFF, 0xFF, 0x00, 0xEA, 0x00, 0xEB, 0x50, 0x60,
-        0x03, 0xEA, 0x51, 0x60, 0x13, 0xEA, 0x52, 0x60, 0x30, 0xEA, 0x53, 0x60, 0x40, 0xEA, 0x54, 0x60,
-        0x52, 0xEA, 0x55, 0x60, 0x6D, 0xEA, 0x56, 0x60, 0x71, 0xEA, 0x57, 0x60, 0x8B, 0xEA, 0x58, 0x60,
-        0x47, 0xEA, 0x59, 0x60, 0xA0, 0xEA, 0x5A, 0x60, 0xB2, 0xEA, 0x5B, 0x60, 0xC1, 0xEA, 0x5C, 0x60,
-        0xD7, 0xEA, 0x5D, 0x60, 0xEB, 0xEA, 0x5E, 0x60, 0xA0, 0xEA, 0x50, 0x60, 0x36, 0xEB, 0x51, 0x60,
-        0x37, 0xEB, 0x52, 0x60, 0x20, 0xEB, 0x53, 0x60, 0xE4, 0xEB, 0x54, 0x60, 0x34, 0xEB, 0x55, 0x60,
-        0x58, 0xEB, 0x56, 0x60, 0x48, 0xEB, 0x57, 0x60, 0xD0, 0xEB, 0x58, 0x60, 0xC3, 0xEB, 0x59, 0x60,
-        0xFC, 0xEB, 0x5A, 0x60, 0x34, 0xEB, 0x5B, 0x60, 0x58, 0xEB, 0x5C, 0x60, 0xC0, 0xEB, 0x5D, 0x60,
-        0xD0, 0xEB, 0x5E, 0x60, 0x91, 0xEB, 0x00, 0xEA, 0x00, 0xEB, 0xE0, 0x60, 0x02, 0xEA, 0xE0, 0x60,
-        0x03, 0xEB, 0xA0, 0x60, 0x00, 0xEB, 0xB0, 0x60, 0x00, 0xEB, 0xAB, 0x48, 0x40, 0x3B, 0x01, 0x00,
-        0xFC, 0x01, 0x00, 0xEB, 0x03, 0x60, 0x02, 0x64, 0xA0, 0xDB, 0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A,
-        0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x24, 0x44, 0xFF, 0xB4,
-        0x04, 0xFB, 0x50, 0x60, 0x00, 0x64, 0x05, 0xFB, 0x10, 0x60, 0x10, 0x75, 0x2A, 0x60, 0x1D, 0x78,
-        0xFF, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x40, 0x00, 0x05, 0x60, 0xF9, 0xF1, 0x42, 0x60, 0x08, 0x64,
-        0x09, 0x60, 0x19, 0x63, 0x64, 0x40, 0x01, 0x2B, 0x04, 0x00, 0x42, 0x60, 0x09, 0x64, 0x0A, 0x60,
-        0x19, 0x63, 0x1C, 0x60, 0x0F, 0xFB, 0x04, 0x60, 0x00, 0xBC, 0x1C, 0x60, 0x0B, 0xFB, 0x1C, 0x60,
-        0x0A, 0xFD, 0x1D, 0x60, 0x19, 0x63, 0x1C, 0x60, 0x0E, 0xFD, 0x80, 0x60, 0x1C, 0x64, 0x3F, 0x40,
-        0x01, 0x2A, 0x02, 0x00, 0x60, 0x60, 0x1C, 0x64, 0x1C, 0x60, 0x10, 0xFB, 0x1C, 0x60, 0x0C, 0xFB,
-        0x1C, 0x60, 0x0F, 0xF3, 0xA0, 0x50, 0xA0, 0x50, 0x0B, 0x60, 0xF8, 0x63, 0xA3, 0xD1, 0x38, 0x60,
-        0x12, 0x61, 0xA1, 0xD3, 0xF8, 0xA3, 0x90, 0x84, 0xA2, 0xDB, 0xA3, 0xD1, 0x59, 0xD3, 0x06, 0xA3,
-        0x90, 0x84, 0xA2, 0xDB, 0xA3, 0xD1, 0x59, 0xD3, 0xFE, 0xA3, 0x90, 0x84, 0xA2, 0xDB, 0xA3, 0xD1,
-        0x59, 0xD3, 0xFF, 0xFF, 0x90, 0x84, 0xA2, 0xDB, 0x80, 0x60, 0x58, 0xEC, 0x80, 0x60, 0x00, 0xED,
-        0x80, 0x60, 0x80, 0xEE, 0x40, 0xEC, 0x00, 0xED, 0x00, 0xEE, 0xC0, 0x60, 0x59, 0xEC, 0xC0, 0x60,
-        0x07, 0xED, 0xC0, 0x60, 0x8F, 0xEE, 0xAD, 0x4F, 0xFA, 0xB4, 0xA0, 0x5D, 0x00, 0xF3, 0x28, 0xFB,
-        0x40, 0x44, 0x37, 0x60, 0x7B, 0x7C, 0x20, 0xF9, 0x3F, 0x60, 0x18, 0x7C, 0x21, 0xF9, 0x3F, 0x60,
-        0x2E, 0x7C, 0x22, 0xF9, 0x3F, 0x60, 0xC5, 0x7C, 0x23, 0xF9, 0x3F, 0x60, 0xD6, 0x7C, 0x24, 0xF9,
-        0x40, 0x60, 0x00, 0x7C, 0x25, 0xF9, 0x40, 0x60, 0x11, 0x7C, 0x26, 0xF9, 0xD0, 0x60, 0x00, 0xE8,
-        0x28, 0xE8, 0x44, 0x60, 0x01, 0xE6, 0x10, 0x67, 0x40, 0x52, 0x10, 0x60, 0x04, 0xE6, 0x08, 0x60,
-        0x06, 0x63, 0xFD, 0x60, 0x0C, 0x65, 0x5B, 0xD3, 0xBF, 0xD1, 0x10, 0x18, 0xC3, 0x83, 0xD4, 0x80,
-        0xC3, 0x83, 0xF9, 0x02, 0xFA, 0xA3, 0xA3, 0xD3, 0x02, 0x60, 0x00, 0x65, 0xF9, 0xA0, 0xFC, 0xA0,
-        0x0D, 0x05, 0x04, 0x05, 0x78, 0x43, 0x02, 0x61, 0x29, 0x60, 0xEA, 0x78, 0x21, 0x60, 0x00, 0x65,
-        0x3F, 0x43, 0x21, 0x60, 0x00, 0x65, 0xC0, 0x60, 0x8F, 0xEE, 0x08, 0x00, 0x02, 0x60, 0x00, 0x65,
-        0x00, 0x60, 0x00, 0x64, 0x18, 0xFB, 0x3F, 0x43, 0x11, 0x60, 0x10, 0xE6, 0xB7, 0x84, 0x40, 0x5F,
-        0x37, 0x60, 0xF8, 0x63, 0x3F, 0x40, 0x20, 0x27, 0x06, 0x00, 0x0F, 0x60, 0xFF, 0x64, 0xBD, 0xDB,
-        0x0F, 0x60, 0xF0, 0x64, 0x03, 0x00, 0x0F, 0x64, 0xBD, 0xDB, 0x00, 0x64, 0xA3, 0xDB, 0x00, 0x60,
-        0x30, 0xE2, 0x00, 0x60, 0x50, 0xE2, 0x00, 0x60, 0x79, 0xE2, 0x00, 0x60, 0x90, 0xE2, 0x01, 0x60,
-        0xD0, 0xE2, 0x01, 0x60, 0xF0, 0xE2, 0x01, 0x60, 0xB0, 0xE2, 0x13, 0x64, 0xCB, 0xFB, 0x01, 0x60,
-        0x67, 0x64, 0x37, 0xFB, 0x00, 0x60, 0x28, 0x64, 0x36, 0xFB, 0x09, 0x60, 0x2A, 0x64, 0xB6, 0xFB,
-        0x82, 0xFF, 0x92, 0xFF, 0x5C, 0x41, 0x5C, 0x46, 0x5C, 0x47, 0x00, 0xE1, 0xA3, 0x60, 0xF4, 0x63,
-        0x0C, 0x60, 0x16, 0x64, 0xA0, 0xDD, 0x87, 0xFF, 0x97, 0xFF, 0x0C, 0x60, 0x02, 0x64, 0x40, 0x5A,
-        0x06, 0xA4, 0x40, 0x5B, 0x5C, 0x5E, 0x16, 0x60, 0xCF, 0xF3, 0x7D, 0xFB, 0x3F, 0x40, 0x01, 0x22,
-        0x03, 0x00, 0x80, 0x60, 0x37, 0x7C, 0x02, 0x00, 0x80, 0x60, 0x27, 0x7C, 0x1A, 0x60, 0x1F, 0xF9,
-        0x01, 0x60, 0x06, 0x64, 0xA7, 0xFB, 0x02, 0x60, 0x7F, 0x64, 0x00, 0x60, 0x42, 0x65, 0xD4, 0x84,
-        0xA8, 0xFB, 0xDC, 0x84, 0xA6, 0xFB, 0x12, 0x60, 0xD8, 0xFB, 0x40, 0x60, 0x58, 0x4E, 0x7D, 0x78,
-        0xFF, 0xFF, 0x3F, 0x40, 0x40, 0x26, 0x05, 0x00, 0x1C, 0x60, 0x0D, 0xF3, 0x5A, 0xD1, 0xA0, 0x50,
-        0xA4, 0x52, 0x08, 0x60, 0x00, 0x63, 0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3, 0xA3, 0xD3, 0x02, 0xA8,
-        0xD4, 0x80, 0x21, 0x02, 0x20, 0x02, 0x19, 0x60, 0x48, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x80, 0x26,
-        0x1A, 0x00, 0x04, 0xA3, 0xFD, 0x60, 0x0D, 0x65, 0x5B, 0xD3, 0xBF, 0xD1, 0x14, 0x18, 0xC3, 0x83,
-        0xD4, 0x80, 0xC3, 0x83, 0xF9, 0x02, 0xBF, 0xD3, 0xAD, 0x49, 0xFE, 0xA0, 0x00, 0x64, 0x0C, 0x04,
-        0x08, 0xB1, 0x20, 0xBC, 0x08, 0x28, 0x18, 0xBC, 0x07, 0x7C, 0x0E, 0x60, 0xDF, 0xF9, 0x05, 0x7C,
-        0x0E, 0x60, 0xDE, 0xF9, 0x01, 0x00, 0x00, 0x64, 0x0E, 0x60, 0xDD, 0xFB, 0x40, 0x60, 0x95, 0x78,
-        0xFF, 0xFF, 0x5C, 0x51, 0x3F, 0x41, 0xA5, 0x4C, 0x50, 0x37, 0x0B, 0x00, 0x01, 0xB9, 0x41, 0x5F,
-        0xB5, 0x60, 0x55, 0xE0, 0x05, 0x60, 0xF9, 0xF1, 0xC0, 0x67, 0x90, 0x84, 0x3F, 0x40, 0x01, 0x26,
-        0xA0, 0x50, 0x06, 0x60, 0x08, 0xF3, 0x01, 0x60, 0x01, 0x65, 0x01, 0x60, 0x02, 0x7C, 0xD4, 0x80,
-        0xD0, 0x80, 0x01, 0x03, 0x10, 0x02, 0x5A, 0xD1, 0x5A, 0xD3, 0x3C, 0x60, 0x00, 0x66, 0xE0, 0x87,
-        0x40, 0x4A, 0x80, 0x60, 0x9E, 0x61, 0x64, 0x44, 0xC8, 0x84, 0x0C, 0x63, 0xAA, 0x46, 0x58, 0xD0,
-        0xAA, 0x46, 0x59, 0xD8, 0xFB, 0x1F, 0x08, 0x60, 0x00, 0x63, 0xFA, 0x60, 0x00, 0x65, 0xBD, 0xD3,
-        0xA3, 0xD3, 0x02, 0xA8, 0xD4, 0x80, 0x07, 0x02, 0x06, 0x02, 0x8C, 0x60, 0xBA, 0x61, 0x3C, 0x60,
-        0x00, 0x66, 0x41, 0x4B, 0x03, 0x00, 0x46, 0x60, 0x3B, 0x78, 0xFF, 0xFF, 0x2B, 0x41, 0x8D, 0x60,
-        0x02, 0x7C, 0xD1, 0x80, 0xA1, 0xD2, 0x25, 0x05, 0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47,
-        0xE0, 0x87, 0x40, 0x4A, 0x59, 0xD2, 0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3,
-        0xBD, 0xD1, 0xEC, 0x18, 0xD4, 0x80, 0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01,
-        0x67, 0x44, 0xC0, 0x84, 0xE0, 0x85, 0x2C, 0x44, 0xD4, 0x80, 0x63, 0x41, 0x01, 0x06, 0x65, 0x44,
-        0xC8, 0x83, 0xAA, 0x46, 0x59, 0xD1, 0x27, 0xD8, 0x5A, 0x87, 0xFC, 0x1F, 0xAA, 0x46, 0x2B, 0x41,
-        0xD5, 0x01, 0x8D, 0x60, 0x02, 0x61, 0x41, 0x4B, 0x2B, 0x41, 0x8D, 0x60, 0x02, 0x7C, 0xD1, 0x80,
-        0xA1, 0xD2, 0x27, 0x05, 0x59, 0xD0, 0x60, 0x45, 0x59, 0xD2, 0x44, 0x47, 0xE0, 0x87, 0x40, 0x4A,
-        0x59, 0xD2, 0x59, 0x8B, 0x40, 0x4C, 0x08, 0x60, 0x00, 0x63, 0xBE, 0xD3, 0xBD, 0xD1, 0xEC, 0x18,
-        0xD4, 0x80, 0xEA, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0x04, 0xA3, 0xA3, 0xD1,
-        0x5A, 0x88, 0x2C, 0x43, 0xD3, 0x80, 0xFF, 0xFF, 0x01, 0x06, 0x64, 0x43, 0xCF, 0x83, 0xAA, 0x46,
-        0x60, 0xFE, 0x28, 0xD1, 0x5E, 0x88, 0x27, 0xD8, 0x5A, 0x87, 0xFB, 0x1F, 0x20, 0xFE, 0xAA, 0x46,
-        0xD3, 0x01, 0x07, 0x60, 0xEC, 0xF3, 0x20, 0x60, 0x00, 0x7C, 0x08, 0xB0, 0x10, 0xB0, 0x05, 0x02,
-        0x04, 0x03, 0x07, 0x60, 0xEB, 0xF9, 0x07, 0x60, 0xEA, 0xF9, 0x02, 0xB0, 0x04, 0xB0, 0x0F, 0x02,
-        0x13, 0x60, 0xD2, 0xF3, 0x0C, 0x03, 0x02, 0xBC, 0xA2, 0xDB, 0x14, 0x60, 0x65, 0xF3, 0x14, 0x60,
-        0x29, 0xF3, 0x02, 0xBD, 0x02, 0xBC, 0xA2, 0xDB, 0x65, 0x44, 0x14, 0x60, 0x65, 0xFB, 0x07, 0x60,
-        0xEC, 0xF3, 0x31, 0x41, 0x60, 0x40, 0x20, 0x2A, 0x40, 0xB9, 0x40, 0x26, 0x03, 0x00, 0x60, 0x40,
-        0x01, 0x26, 0x80, 0xB9, 0x41, 0x51, 0xFA, 0x60, 0x3A, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78,
-        0xFF, 0xFF, 0x03, 0x02, 0x44, 0x60, 0xAD, 0x78, 0xFF, 0xFF, 0x5B, 0xD3, 0xF8, 0x60, 0x3F, 0x65,
-        0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x14, 0x60, 0x74, 0xF3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0xBD, 0xD3, 0xFF, 0xFF,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x14, 0x60, 0x77, 0xF3, 0xE0, 0x9C, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x28, 0x60,
-        0xF4, 0x61, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0xA1, 0xD3,
-        0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0x00, 0x7F, 0xE0, 0x84,
-        0xE0, 0x84, 0x59, 0xD3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB, 0x14, 0x60, 0x7D, 0xF3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x14, 0x60, 0x80, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0x83, 0xF3, 0xFF, 0xFF, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x14, 0x60, 0x86, 0xF3, 0xE0, 0x9C,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0x14, 0x60, 0x89, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0x8C, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x02, 0xA3, 0xA3, 0xD3,
-        0xF8, 0x60, 0x3F, 0x65, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x14, 0x60, 0x8F, 0xF3, 0xE0, 0x9C,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0xBD, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x14, 0x60, 0x92, 0xF3,
-        0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x29, 0x60, 0x2A, 0x61, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0xE0, 0x84, 0xA1, 0xD3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF,
-        0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x59, 0xD3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA1, 0xDB,
-        0x14, 0x60, 0x98, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0x9B, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0x9E, 0xF3,
-        0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84,
-        0xA2, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0xE0, 0x84, 0x14, 0x60,
-        0xA1, 0xF3, 0xE0, 0x9C, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84,
-        0xB0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0xA4, 0xF3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x14, 0x60, 0xA7, 0xF3, 0xFF, 0xFF,
-        0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0xA4, 0x84, 0xB0, 0x84, 0xA2, 0xDB,
-        0x00, 0x60, 0x6A, 0x63, 0x29, 0x60, 0x50, 0x61, 0x28, 0x60, 0xE4, 0x64, 0x58, 0xD1, 0x59, 0xD9,
-        0xFD, 0x1F, 0x14, 0x60, 0xB0, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF,
-        0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60, 0xB4, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60,
-        0xB6, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60, 0xBD, 0xF3, 0xFF, 0xFF, 0x18, 0xAC,
-        0xA2, 0xDB, 0x14, 0x60, 0xBF, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60, 0xCB, 0xF3,
-        0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x5A, 0xD3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60,
-        0xCF, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60, 0xD1, 0xF3, 0xFF, 0xFF, 0x18, 0xAC,
-        0xA2, 0xDB, 0x14, 0x60, 0xD8, 0xF3, 0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0x14, 0x60, 0xDA, 0xF3,
-        0xFF, 0xFF, 0x18, 0xAC, 0xA2, 0xDB, 0xFA, 0x60, 0x2C, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78,
-        0xFF, 0xFF, 0x0E, 0x03, 0x63, 0x45, 0x2A, 0x60, 0xEA, 0x63, 0x06, 0x61, 0xA5, 0xD1, 0xDA, 0x85,
-        0x64, 0x44, 0x0F, 0xB4, 0xBD, 0xDB, 0x64, 0x47, 0x0F, 0xB4, 0xCD, 0x81, 0xBD, 0xDB, 0xF6, 0x02,
-        0xFA, 0x60, 0x30, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x14, 0x03, 0xBD, 0xD3,
-        0x63, 0x46, 0x2B, 0x60, 0x82, 0x63, 0x15, 0x60, 0xD0, 0xFB, 0xDA, 0x85, 0xBD, 0xDB, 0x0E, 0x61,
-        0xA6, 0xD1, 0xDA, 0x86, 0x64, 0x44, 0xFF, 0xB4, 0xA5, 0xDB, 0xDA, 0x85, 0x64, 0x47, 0xFF, 0xB4,
-        0xCD, 0x81, 0xBD, 0xDB, 0xF5, 0x02, 0xFA, 0x60, 0x31, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78,
-        0xFF, 0xFF, 0x22, 0x03, 0xBD, 0xD3, 0x15, 0x60, 0xEE, 0xFB, 0x5A, 0x81, 0x15, 0x60, 0xFD, 0xFB,
-        0x5A, 0x82, 0x16, 0x60, 0x0C, 0xFB, 0x5A, 0x83, 0x16, 0x60, 0x1B, 0xFB, 0x5A, 0x84, 0x0E, 0x61,
-        0xBD, 0xD1, 0xBD, 0xD5, 0x64, 0x44, 0xFF, 0xB4, 0x21, 0xDB, 0x5A, 0x81, 0x64, 0x47, 0xFF, 0xB4,
-        0x22, 0xDB, 0x5A, 0x82, 0x66, 0x44, 0xFF, 0xB4, 0x23, 0xDB, 0x5A, 0x83, 0x66, 0x47, 0xFF, 0xB4,
-        0x24, 0xDB, 0xCD, 0x81, 0x5A, 0x84, 0xEC, 0x02, 0xFA, 0x60, 0x47, 0x65, 0x46, 0x60, 0x58, 0x4D,
-        0x4E, 0x78, 0xFF, 0xFF, 0x11, 0x03, 0x63, 0x45, 0x2C, 0x60, 0x54, 0x63, 0xA5, 0xD1, 0xDA, 0x85,
-        0xBD, 0xD9, 0x02, 0x61, 0xA5, 0xD1, 0xDA, 0x85, 0x64, 0x47, 0x00, 0x7E, 0xBD, 0xDB, 0x64, 0x44,
-        0x00, 0x7E, 0xCD, 0x81, 0xBD, 0xDB, 0xF6, 0x02, 0xFA, 0x60, 0x2E, 0x65, 0x46, 0x60, 0x58, 0x4D,
-        0x4E, 0x78, 0xFF, 0xFF, 0x1F, 0x03, 0x63, 0x46, 0xFC, 0xA3, 0xA3, 0xD3, 0x2B, 0x60, 0x02, 0x63,
-        0xCC, 0x84, 0xE8, 0x84, 0xCC, 0x81, 0x00, 0x36, 0x0D, 0x00, 0x63, 0x45, 0xA6, 0xD3, 0x5A, 0xD1,
-        0xDA, 0x86, 0xFF, 0xB4, 0xE0, 0x84, 0xC4, 0x84, 0x5C, 0x90, 0xBD, 0xD9, 0xFD, 0x02, 0xCD, 0x81,
-        0x66, 0x42, 0xF4, 0x02, 0x66, 0x42, 0x5A, 0xD3, 0x2B, 0x60, 0x42, 0x65, 0xBD, 0xDB, 0xD7, 0x80,
-        0xFF, 0xFF, 0xFC, 0x02, 0x2C, 0x60, 0x68, 0x61, 0xFA, 0x60, 0x46, 0x65, 0x46, 0x60, 0x58, 0x4D,
-        0x4E, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60, 0x2F, 0x65, 0x46, 0x60,
-        0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60, 0x3E, 0x65,
-        0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81, 0xFA, 0x60,
-        0x3F, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD, 0xD9, 0x81,
-        0xFA, 0x60, 0x40, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x01, 0x03, 0xA1, 0xDD,
-        0xD9, 0x81, 0xFA, 0x60, 0x3B, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x01, 0x03,
-        0xA1, 0xDD, 0xFA, 0x60, 0x48, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x10, 0x03,
-        0xBD, 0xD3, 0x2C, 0x60, 0xC4, 0x61, 0x0E, 0xB4, 0xBD, 0xD1, 0xA1, 0xDB, 0x64, 0x47, 0x0E, 0xB4,
-        0xA3, 0xD1, 0x59, 0xDB, 0x64, 0x44, 0x0E, 0xB4, 0x59, 0xDB, 0x64, 0x47, 0x0E, 0xB4, 0x59, 0xDB,
-        0xFA, 0x60, 0x29, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x04, 0xA3,
-        0xA3, 0xD3, 0x20, 0x60, 0x00, 0x65, 0xB4, 0x84, 0x13, 0x60, 0xA6, 0xFB, 0xFA, 0x60, 0x2A, 0x65,
-        0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x30, 0x03, 0x04, 0xA3, 0xBD, 0xD1, 0x14, 0x60,
-        0x4A, 0xF3, 0x64, 0x41, 0x64, 0x5E, 0xA2, 0xDB, 0x64, 0x47, 0x5A, 0xD3, 0x60, 0x5C, 0x64, 0x5F,
-        0xA2, 0xDB, 0x14, 0x60, 0x60, 0xF3, 0xFF, 0x60, 0xC0, 0xB5, 0x61, 0x40, 0x80, 0x27, 0x05, 0x00,
-        0xE9, 0x87, 0x3F, 0xB4, 0xB4, 0x84, 0xA2, 0xDB, 0x15, 0x00, 0x65, 0x44, 0xA2, 0xDB, 0xE1, 0x80,
-        0xF9, 0x87, 0x01, 0x7F, 0x14, 0x60, 0x63, 0xF3, 0x60, 0x41, 0xE0, 0x84, 0xE0, 0x84, 0xE9, 0x81,
-        0xF8, 0x84, 0xE9, 0x81, 0xF8, 0x84, 0xA2, 0xDB, 0x4A, 0xD3, 0xFF, 0x60, 0x80, 0x65, 0xA4, 0x84,
-        0x34, 0x94, 0xA2, 0xDB, 0xDB, 0x83, 0x14, 0x60, 0xDF, 0xFD, 0xFA, 0x60, 0x2B, 0x65, 0x46, 0x60,
-        0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x04, 0xA3, 0xBD, 0xD3, 0x14, 0x60, 0x4D, 0xFB,
-        0xA3, 0xD3, 0x14, 0x60, 0x11, 0xFB, 0xFA, 0x60, 0x3C, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78,
-        0xFF, 0xFF, 0x1F, 0x03, 0xA3, 0xD3, 0xFC, 0x60, 0xFC, 0x65, 0xA4, 0x84, 0x60, 0x5C, 0x00, 0x7E,
-        0xC0, 0x60, 0x00, 0xA0, 0x60, 0x43, 0x07, 0x04, 0x14, 0x60, 0x51, 0xF3, 0xFF, 0xFF, 0x03, 0x60,
-        0xFF, 0xB4, 0x3C, 0x94, 0xA2, 0xDB, 0x28, 0x60, 0x2A, 0x61, 0x64, 0x44, 0x00, 0x7F, 0xC0, 0xA0,
-        0x60, 0x47, 0x07, 0x04, 0x60, 0x43, 0xA1, 0xD3, 0xFF, 0xFF, 0x03, 0x60, 0xFF, 0xB4, 0x3C, 0x94,
-        0xA1, 0xDB, 0xFA, 0x60, 0x49, 0x65, 0x46, 0x60, 0x58, 0x4D, 0x4E, 0x78, 0xFF, 0xFF, 0x1B, 0x03,
-        0x32, 0x60, 0xAB, 0x61, 0x1C, 0x7C, 0x60, 0xFE, 0xA3, 0xD3, 0x5D, 0xD3, 0x0F, 0xB5, 0xD4, 0x84,
-        0xA1, 0xDB, 0xBD, 0xD3, 0xFF, 0xFF, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x5D, 0xD3,
-        0x0F, 0xB5, 0xD4, 0x84, 0xA1, 0xDB, 0x67, 0x44, 0xC0, 0x9C, 0x64, 0x40, 0x00, 0x36, 0x10, 0x00,
-        0x64, 0x40, 0x0E, 0x3A, 0xE9, 0x01, 0x20, 0xFE, 0xFA, 0x60, 0x4A, 0x65, 0x46, 0x60, 0x58, 0x4D,
-        0x4E, 0x78, 0xFF, 0xFF, 0x05, 0x03, 0x32, 0x60, 0xC7, 0x61, 0x0E, 0x7C, 0x60, 0xFE, 0xDC, 0x01,
-        0x20, 0xFE, 0xB8, 0xFE, 0xB9, 0xFE, 0xBA, 0xFE, 0xBB, 0xFE, 0xBD, 0xFE, 0xBF, 0xFE, 0x19, 0x60,
-        0x48, 0xF3, 0x12, 0x63, 0x60, 0x40, 0x01, 0x27, 0x04, 0x00, 0x0B, 0x60, 0xEA, 0x62, 0x5A, 0xDF,
-        0xFE, 0x1F, 0x41, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x06, 0x63, 0xBE, 0xD3, 0xBD, 0xD1,
-        0x07, 0x18, 0xD4, 0x80, 0x05, 0x18, 0x03, 0x03, 0xC3, 0x83, 0xC3, 0x83, 0xF7, 0x01, 0xDB, 0x83,
-        0x00, 0xBC, 0x2D, 0x58, 0xFF, 0xFF, 0x86, 0xFD, 0xAA, 0x2D, 0x00, 0x00, 0x06, 0x00, 0x10, 0xFD,
-        0x6E, 0x01, 0x00, 0x00, 0x02, 0x00, 0x14, 0xFD, 0x8E, 0x32, 0x00, 0x00, 0x0A, 0x00, 0x41, 0xFA,
-        0x40, 0x2A, 0x00, 0x00, 0x22, 0x00, 0x42, 0xFA, 0x62, 0x2A, 0x00, 0x00, 0x22, 0x00, 0x43, 0xFA,
-        0x84, 0x2A, 0x00, 0x00, 0x22, 0x00, 0x44, 0xFA, 0xA6, 0x2A, 0x00, 0x00, 0x22, 0x00, 0x45, 0xFA,
-        0xC8, 0x2A, 0x00, 0x00, 0x22, 0x00, 0x25, 0xFD, 0x9E, 0x01, 0x00, 0x00, 0x02, 0x00,
-
-};  /* fw_image_3_data */
-
-static const hcf_8 fw_image_4_data[] = {
-        0x6C, 0x40, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x41, 0xFF, 0x33, 0xF3, 0x02, 0x11, 0x31, 0x18, 0x1E, 0x00, 0x44, 0xFF, 0x2E, 0x00, 0xFF, 0xFF,
-        0xC4, 0xE2, 0x27, 0x44, 0x20, 0x2A, 0x01, 0x00, 0xFF, 0xFF, 0x42, 0x64, 0x3A, 0xDB, 0x23, 0x00,
-        0x41, 0xFF, 0xA2, 0x60, 0x45, 0x78, 0xE2, 0xFE, 0x40, 0x49, 0x02, 0x60, 0x01, 0xE1, 0x1D, 0x00,
-        0x44, 0xFF, 0x1B, 0x09, 0x29, 0x44, 0x10, 0x2A, 0x04, 0x74, 0xCD, 0xE2, 0x10, 0x65, 0x0B, 0x00,
-        0xA3, 0x60, 0xC1, 0x78, 0xA4, 0xE2, 0x29, 0x44, 0x20, 0x2A, 0x0D, 0x00, 0x20, 0xAC, 0xEC, 0x01,
-        0xA3, 0x60, 0xC1, 0x78, 0x46, 0xFF, 0xB4, 0x84, 0x40, 0x49, 0xA1, 0xFF, 0xFF, 0xFF, 0x80, 0x3E,
-        0xA3, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0x62, 0xFF, 0x08, 0xE1, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E,
-        0xAA, 0x60, 0xA5, 0x78, 0x4C, 0x4E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAA, 0x60, 0xB3, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC4, 0xE2, 0x84, 0xFF, 0x22, 0x58, 0x82, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA4, 0x60, 0x39, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0xE1, 0x01, 0xFF, 0xFF,
-        0x10, 0x29, 0xFA, 0x01, 0xE4, 0xE2, 0xAA, 0x60, 0x5F, 0x78, 0xB2, 0xF3, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC1, 0x60, 0xFC, 0x78, 0x64, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xAA, 0x60, 0x46, 0x78, 0xAC, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x80, 0x29, 0xE2, 0x01, 0xAA, 0x60, 0xA2, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB5, 0x60, 0x5C, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB5, 0x60, 0x94, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xC9, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xFC, 0x78, 0x43, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xFC, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB7, 0x60, 0x20, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB3, 0x60, 0xFF, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x83, 0x64, 0x80, 0x29, 0x09, 0xFB, 0xB5, 0x60, 0x25, 0x78, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x98, 0xFF, 0x3A, 0x60, 0x18, 0x78, 0x40, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x39, 0x60, 0x8F, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC0, 0x60, 0x67, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xBF, 0x60, 0xE1, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xB7, 0x60, 0xE9, 0x78, 0x98, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xA1, 0xFF, 0x98, 0xFF, 0x83, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xC3, 0x60, 0x4D, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xB0, 0xFF, 0xB1, 0xFF, 0x40, 0xFF, 0x43, 0xFF, 0xC3, 0x60, 0x48, 0x78, 0x44, 0xFF, 0xFF, 0x01,
-        0xC3, 0x60, 0x4D, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0x3E, 0x60, 0x8C, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC3, 0x60, 0x48, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xC3, 0x60, 0x47, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x01,
-        0xCA, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF3, 0x60, 0x9A, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x42, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x85, 0x3E, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0xD0, 0x78, 0x24, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xF2, 0x60, 0x47, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0xD0, 0x78, 0x44, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0xD0, 0x78, 0x84, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0xCA, 0x60, 0xD0, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x29, 0x60, 0xF2, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2A, 0x60, 0x20, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2A, 0x60, 0x3E, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2A, 0x60, 0x1D, 0x78, 0x28, 0xE2, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2A, 0x60, 0x1D, 0x78, 0x44, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2A, 0x60, 0x1D, 0x78, 0x45, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x2A, 0x60, 0x1D, 0x78, 0x46, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x60, 0x87, 0x64, 0x80, 0x29, 0x09, 0xFB, 0x47, 0xFF, 0x2A, 0x60, 0x1D, 0x78, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x43, 0xF7, 0xA7, 0xFF, 0x41, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x37, 0x60, 0x82, 0x78, 0x42, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
-        0x36, 0x60, 0x8F, 0x78, 0x47, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
-        0x41, 0xFF, 0x00, 0x60, 0x03, 0xE1, 0x21, 0x46, 0x66, 0x45, 0x00, 0xF4, 0x2E, 0x44, 0x09, 0xFA,
-        0x6A, 0x61, 0x7F, 0x60, 0xFE, 0x63, 0xA1, 0xFF, 0x9A, 0xFF, 0x05, 0x11, 0x0A, 0x00, 0x00, 0xF4,
-        0x01, 0xF2, 0x17, 0x18, 0x7A, 0x61, 0x02, 0x25, 0x04, 0x00, 0x6C, 0x44, 0x7A, 0xDA, 0xFB, 0x1C,
-        0xF6, 0x11, 0xD9, 0x81, 0x41, 0xFF, 0x02, 0x1C, 0x00, 0xF4, 0xDA, 0x82, 0x41, 0xFF, 0xC9, 0x81,
-        0xCB, 0x83, 0x6C, 0x44, 0x5A, 0xDA, 0x02, 0x1C, 0x00, 0xF4, 0x81, 0xF2, 0x6C, 0x44, 0x5A, 0xDA,
-        0xCB, 0x83, 0x02, 0x74, 0x02, 0x60, 0x04, 0xE1, 0x80, 0x60, 0x00, 0x61, 0x5D, 0x93, 0xB5, 0xFF,
-        0x98, 0xFF, 0x26, 0x44, 0xFD, 0xB4, 0x84, 0xBC, 0x40, 0x46, 0x65, 0x46, 0x00, 0x64, 0x23, 0xFA,
-        0x3F, 0xFC, 0x63, 0x47, 0x0A, 0x63, 0x0F, 0xFC, 0x00, 0xF4, 0x08, 0xFA, 0xCB, 0xFE, 0x18, 0xE1,
-        0x44, 0xFF, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0xE2, 0xFE, 0x03, 0x04, 0xA3, 0x60, 0x05, 0x78,
-        0xFF, 0xFF, 0xE0, 0xFE, 0x03, 0x04, 0xA3, 0x60, 0x1B, 0x78, 0xFF, 0xFF, 0xE1, 0xFE, 0x07, 0x05,
-        0x9F, 0xFE, 0x03, 0x04, 0x3A, 0x60, 0x77, 0x78, 0xFF, 0xFF, 0x43, 0xFF, 0xA9, 0x01, 0x95, 0xF3,
-        0xFF, 0xFF, 0x80, 0xB4, 0xFF, 0xFF, 0x08, 0x24, 0x16, 0x00, 0x29, 0x44, 0x08, 0x26, 0xE1, 0x01,
-        0x72, 0x44, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xB2, 0xF3, 0xE8, 0x85,
-        0xFF, 0xB7, 0xE0, 0x84, 0xE0, 0x84, 0xB4, 0x85, 0x73, 0x44, 0xD4, 0x84, 0x10, 0x65, 0xD4, 0x80,
-        0xFF, 0xFF, 0x01, 0x05, 0x8F, 0x00, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60, 0x84, 0xE7, 0xA1, 0xF3,
-        0x7C, 0x45, 0x60, 0x40, 0x01, 0x23, 0x02, 0x65, 0x8C, 0x60, 0x48, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x7F, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x48, 0x60, 0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x40, 0x60, 0x08, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60,
-        0x84, 0xE7, 0xBD, 0xFE, 0x0C, 0x60, 0x00, 0x62, 0x00, 0x60, 0x71, 0x7C, 0x00, 0x60, 0xB1, 0x65,
-        0x3D, 0x60, 0x58, 0x4D, 0x0F, 0x78, 0xFF, 0xFF, 0x08, 0xE1, 0x62, 0xFF, 0xA3, 0xFF, 0xFF, 0xFF,
-        0xA2, 0xFF, 0x02, 0x60, 0x08, 0xE1, 0xAE, 0x4F, 0x02, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x3F, 0x40,
-        0x40, 0x26, 0x09, 0x00, 0x1C, 0x60, 0x09, 0xF3, 0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x52, 0x5A, 0xD3,
-        0x5A, 0xD1, 0xA0, 0x50, 0xA4, 0x50, 0xDB, 0xF3, 0xF1, 0xF1, 0x01, 0xA8, 0x07, 0xA8, 0x0A, 0x03,
-        0x09, 0x03, 0x64, 0x40, 0x01, 0x26, 0x09, 0x00, 0x1B, 0x60, 0xF3, 0xF3, 0xFF, 0xFF, 0x01, 0xB4,
-        0xFF, 0xFF, 0x03, 0x02, 0xAD, 0x4F, 0xFA, 0xB4, 0xA0, 0x5D, 0x19, 0x60, 0xF6, 0xF1, 0x89, 0xFF,
-        0x32, 0x40, 0x80, 0x2A, 0x1E, 0x00, 0x31, 0x40, 0x01, 0x2A, 0x1B, 0x00, 0x12, 0x60, 0xFF, 0xF3,
-        0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x05, 0x03, 0x0E, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A,
-        0x10, 0x00, 0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x03, 0x03, 0x0F, 0xF2,
-        0xFF, 0xFF, 0x07, 0x1B, 0x64, 0x40, 0x01, 0x26, 0x03, 0x00, 0x08, 0x60, 0x00, 0x75, 0x01, 0x00,
-        0x10, 0xFF, 0x88, 0xFF, 0xA2, 0x60, 0x41, 0x78, 0xFF, 0xFF, 0x21, 0x46, 0x01, 0x5D, 0x5C, 0x62,
-        0x03, 0xE1, 0x44, 0xFF, 0xA1, 0xFF, 0x9A, 0xFF, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x62, 0x62,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0xA1, 0xFF, 0x5A, 0xDC, 0x12, 0xE1, 0x02, 0x60, 0x01, 0xE1,
-        0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x28, 0x40, 0x40, 0x2B, 0x03, 0x00, 0x29, 0x40, 0x20, 0x27,
-        0xA3, 0x00, 0xC8, 0x74, 0xCD, 0xE2, 0x29, 0x44, 0x08, 0xBC, 0x40, 0x49, 0x44, 0xFF, 0x05, 0xE1,
-        0xDB, 0xF3, 0x37, 0x60, 0xE8, 0x63, 0x03, 0xA8, 0x04, 0xA8, 0x06, 0x03, 0x05, 0x03, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x01, 0xA8, 0x07, 0x18, 0x0A, 0x03, 0x28, 0x40, 0x08, 0x2A, 0x07, 0x00, 0x28, 0x40,
-        0x48, 0x36, 0x04, 0x00, 0xF1, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xF1, 0xFB, 0x29, 0x44, 0xFF, 0x60,
-        0xEF, 0x65, 0x24, 0x89, 0x40, 0x27, 0x3F, 0x00, 0x00, 0x00, 0x29, 0x40, 0x80, 0x27, 0x0B, 0x00,
-        0x07, 0x61, 0xA1, 0xFF, 0xCD, 0x81, 0x04, 0x25, 0x61, 0x00, 0x87, 0x4C, 0xFB, 0x02, 0xF3, 0x60,
-        0xA0, 0x64, 0x80, 0x4C, 0x07, 0x00, 0xA1, 0xFF, 0x9C, 0x4C, 0x9C, 0x4C, 0x9C, 0x4D, 0x05, 0x60,
-        0xCF, 0x64, 0x80, 0x4C, 0x28, 0x40, 0x40, 0x2B, 0x05, 0x00, 0x29, 0x40, 0x20, 0x27, 0x02, 0x00,
-        0x15, 0x60, 0x6F, 0x6B, 0x04, 0x25, 0x4A, 0x00, 0x30, 0x64, 0x3A, 0xDB, 0x44, 0xFF, 0x04, 0x25,
-        0x45, 0x00, 0x04, 0x60, 0x00, 0x65, 0x25, 0x44, 0xB4, 0x84, 0x80, 0x4E, 0x2D, 0x41, 0x04, 0x25,
-        0x3D, 0x00, 0x61, 0x4C, 0x00, 0x60, 0x8A, 0x65, 0xC5, 0x81, 0x61, 0x54, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x04, 0x25, 0x34, 0x00, 0x67, 0x4E, 0x07, 0x64, 0x1C, 0xFB, 0x00, 0xE1, 0x02, 0x60, 0x05, 0xE1,
-        0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x28, 0x40, 0x40, 0x27, 0x0A, 0x00, 0x1C, 0x65, 0x28, 0x40,
-        0xA4, 0x36, 0x14, 0x65, 0x23, 0x44, 0xC4, 0x84, 0x28, 0x40, 0x08, 0x2A, 0x0C, 0x00, 0x07, 0x00,
-        0x23, 0x44, 0x1C, 0xA4, 0x29, 0x40, 0x20, 0x27, 0x02, 0x00, 0x11, 0x60, 0x0F, 0x6B, 0x3C, 0x46,
-        0x98, 0xF0, 0x23, 0x44, 0xC4, 0x84, 0x06, 0x74, 0x25, 0x5C, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xB0, 0x84, 0x80, 0x4C, 0x9C, 0x4C, 0x44, 0xFF, 0x18, 0xE1, 0x0A, 0x64, 0x1E, 0x74,
-        0x02, 0x60, 0x05, 0xE1, 0x40, 0x40, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0xC4, 0xE2, 0x27, 0x44,
-        0x20, 0x2A, 0x06, 0x00, 0x42, 0x64, 0x3A, 0xDB, 0x67, 0x4C, 0xB1, 0x60, 0xAD, 0x78, 0xFF, 0xFF,
-        0x41, 0x64, 0x3A, 0xDB, 0x62, 0xFF, 0x08, 0xE1, 0xE2, 0xFE, 0x72, 0x52, 0xA1, 0xFF, 0x98, 0xFF,
-        0x80, 0x3E, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x28, 0x40, 0x08, 0x27, 0x5A, 0x01, 0x3C, 0x46,
-        0x8B, 0xFF, 0x84, 0x60, 0x00, 0xE4, 0x0F, 0x60, 0x90, 0x64, 0xC9, 0x60, 0x58, 0x4F, 0x56, 0x78,
-        0xFF, 0xFF, 0x3F, 0xF2, 0x00, 0x60, 0x18, 0x70, 0x18, 0x71, 0x20, 0x72, 0x00, 0xF2, 0x60, 0x53,
-        0x20, 0xE1, 0xA1, 0xFF, 0x88, 0x75, 0x00, 0xE1, 0xFF, 0xFF, 0x60, 0x50, 0x75, 0x44, 0x12, 0x71,
-        0x6E, 0x72, 0x81, 0x75, 0xFF, 0xFF, 0x88, 0xFF, 0xA3, 0x60, 0x21, 0x78, 0xFF, 0xFF, 0x32, 0xF3,
-        0x08, 0x29, 0x0A, 0x00, 0x60, 0x40, 0x07, 0x22, 0x07, 0x00, 0xFE, 0xB4, 0x32, 0xFB, 0x27, 0x44,
-        0x10, 0xBC, 0xF7, 0xB4, 0x40, 0x47, 0x43, 0xFF, 0x00, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x08, 0xE1,
-        0x31, 0x40, 0x01, 0x2A, 0x06, 0x00, 0x00, 0x64, 0x33, 0xFB, 0x01, 0x60, 0x0A, 0xE1, 0x25, 0x11,
-        0x24, 0x0A, 0xE5, 0xFE, 0x2D, 0x05, 0x32, 0x40, 0x80, 0x2A, 0x05, 0x00, 0x19, 0x60, 0xF2, 0xF3,
-        0xFF, 0xFF, 0x01, 0x18, 0x16, 0x00, 0x9F, 0xFE, 0x14, 0x05, 0x9D, 0xFE, 0x12, 0x04, 0x31, 0x41,
-        0x40, 0x2A, 0x0F, 0x00, 0x07, 0x60, 0xE9, 0xF1, 0xAE, 0x4C, 0x90, 0x80, 0x10, 0x2A, 0x09, 0x00,
-        0x7F, 0xB1, 0x07, 0x60, 0xE9, 0xFB, 0x60, 0x40, 0x10, 0x2A, 0x80, 0xB9, 0x41, 0x51, 0xDF, 0xFE,
-        0x19, 0xFF, 0x9F, 0xFE, 0x02, 0x04, 0x40, 0xE1, 0x08, 0x00, 0x7C, 0xE1, 0x31, 0x44, 0x01, 0x2A,
-        0x04, 0x00, 0xFD, 0xE1, 0x27, 0x44, 0x10, 0x26, 0x06, 0x00, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E,
-        0xAA, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x08, 0x26, 0xFF, 0xFF, 0xC1, 0x60, 0xA3, 0x78,
-        0xFF, 0xFF, 0x48, 0xF3, 0x32, 0xF1, 0x00, 0x63, 0x64, 0x40, 0x07, 0x26, 0x03, 0x00, 0xA5, 0x60,
-        0x0F, 0x78, 0xFF, 0xFF, 0x43, 0xFF, 0x31, 0x40, 0x08, 0x26, 0xF0, 0x01, 0xCD, 0xE2, 0x85, 0xE1,
-        0x70, 0x41, 0xAD, 0x80, 0x71, 0x40, 0x80, 0x27, 0xE9, 0x12, 0x03, 0x03, 0xC2, 0x60, 0x15, 0x78,
-        0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0xC4, 0xE2, 0x32, 0xFD, 0x60, 0x40, 0x01, 0x2A, 0xDB, 0x01,
-        0x00, 0x63, 0x32, 0xFD, 0x3C, 0x46, 0x3E, 0xF2, 0x2A, 0xF0, 0x27, 0x41, 0x44, 0x48, 0x20, 0xB9,
-        0x01, 0xB4, 0xF7, 0xB1, 0x0A, 0x03, 0x64, 0x40, 0x08, 0x27, 0x07, 0x00, 0x0F, 0x60, 0xDA, 0x63,
-        0x00, 0x64, 0x45, 0xFB, 0x46, 0xFB, 0xBD, 0xDB, 0xA3, 0xDB, 0xC8, 0x0A, 0xC7, 0x11, 0x1B, 0x60,
-        0xEE, 0xF3, 0xFF, 0xFF, 0x14, 0x18, 0x28, 0x40, 0xD4, 0x36, 0x11, 0x00, 0xAC, 0x4C, 0x80, 0x2A,
-        0x0E, 0x00, 0x1B, 0x60, 0xF1, 0xF3, 0xFF, 0xFF, 0x0A, 0x18, 0x1B, 0x60, 0xF2, 0xF3, 0x1B, 0x60,
-        0xEF, 0xF3, 0x60, 0x45, 0xD4, 0x80, 0xDC, 0x84, 0x02, 0x03, 0xA2, 0xDB, 0xAF, 0x01, 0x00, 0x64,
-        0x1B, 0x60, 0xEF, 0xFB, 0x41, 0x47, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x10, 0x26, 0x04, 0x00,
-        0x01, 0x2A, 0x05, 0x00, 0x10, 0x2B, 0x03, 0x00, 0x29, 0x47, 0x20, 0xBF, 0x40, 0x49, 0x1B, 0x60,
-        0xEE, 0xF3, 0xFF, 0xFF, 0x04, 0x18, 0xAE, 0x4F, 0x08, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0x05, 0xE1,
-        0x01, 0x60, 0x08, 0xE1, 0x2A, 0xE8, 0x3C, 0x46, 0x0F, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2A,
-        0x03, 0x00, 0xA7, 0x60, 0xE1, 0x78, 0xFF, 0xFF, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27,
-        0x0E, 0x00, 0x1F, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x2B, 0x09, 0x00, 0x19, 0x60, 0x7B, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x02, 0x2A, 0x03, 0x00, 0xA8, 0x60, 0xEC, 0x78, 0xFF, 0xFF, 0x1F, 0xF2,
-        0xC0, 0x60, 0x00, 0x65, 0xA4, 0x9C, 0x3F, 0x60, 0xCF, 0x65, 0x29, 0x44, 0xA4, 0x84, 0x30, 0x89,
-        0x19, 0x60, 0x77, 0xF3, 0xFF, 0xFF, 0x19, 0x60, 0x55, 0xFB, 0x1F, 0xF2, 0x39, 0xF1, 0xE0, 0x60,
-        0xFF, 0xB5, 0x0A, 0x18, 0x60, 0x47, 0x1F, 0xB4, 0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64,
-        0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47, 0xB4, 0x81, 0x07, 0x60, 0xEA, 0xF1, 0xFF, 0xFF,
-        0xB1, 0x8C, 0x29, 0x40, 0x40, 0x2B, 0x10, 0x00, 0x29, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x1F, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x01, 0x60, 0x09, 0x6B,
-        0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x14, 0x00, 0x29, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x1F, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B,
-        0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B, 0x67, 0x44, 0x60, 0x4C,
-        0x00, 0xE1, 0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x0D, 0x00, 0xE5, 0xFE,
-        0x03, 0x04, 0xAA, 0x60, 0x6F, 0x78, 0xFF, 0xFF, 0x32, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x07, 0x22,
-        0x43, 0xFF, 0xA3, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0x0B, 0x64, 0x3A, 0xDB, 0x01, 0x60, 0x0A, 0xE1,
-        0x1C, 0x42, 0x22, 0x46, 0x13, 0xF2, 0xFF, 0x65, 0x60, 0x47, 0x2A, 0xF2, 0x40, 0x45, 0x40, 0x48,
-        0x04, 0x2B, 0x13, 0x00, 0x16, 0xF2, 0x1D, 0xF2, 0x40, 0x43, 0x0F, 0xF2, 0x40, 0x4D, 0x0F, 0x64,
-        0x14, 0xF0, 0x35, 0xF2, 0xA0, 0x82, 0x0F, 0xB4, 0xCA, 0x85, 0xD4, 0x80, 0x10, 0xF2, 0x01, 0x02,
-        0x2B, 0xFA, 0x27, 0x44, 0x40, 0xBC, 0x40, 0x47, 0x13, 0x00, 0x17, 0xF2, 0x2C, 0xF0, 0x40, 0x43,
-        0x1B, 0xF2, 0x1D, 0xFA, 0x40, 0x4D, 0x64, 0x40, 0x01, 0x2A, 0x02, 0x00, 0xAB, 0xFC, 0x05, 0x00,
-        0x28, 0x40, 0xA4, 0x36, 0x02, 0x00, 0x11, 0xF2, 0x2B, 0xFA, 0x27, 0x44, 0xBF, 0xB4, 0x40, 0x47,
-        0xF0, 0xFE, 0xB0, 0x60, 0xB0, 0x78, 0xFF, 0xFF, 0x22, 0x46, 0x2C, 0xF0, 0x27, 0x44, 0xDF, 0xB4,
-        0x40, 0x47, 0x64, 0x40, 0x01, 0x26, 0x09, 0x00, 0x2A, 0xF2, 0x39, 0xF0, 0x8F, 0xB0, 0x88, 0x3A,
-        0x0D, 0x00, 0x64, 0x44, 0x60, 0xB0, 0x20, 0x3A, 0x09, 0x00, 0x28, 0x44, 0x04, 0x27, 0x05, 0x00,
-        0xD4, 0x3A, 0x03, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0x11, 0x00, 0x2A, 0xF0, 0x01, 0x65,
-        0x64, 0x40, 0xA4, 0x3A, 0x04, 0x65, 0x27, 0x44, 0x34, 0x87, 0x36, 0xF3, 0xFF, 0xFF, 0x60, 0x56,
-        0xAD, 0xE2, 0x04, 0x64, 0x3A, 0xDB, 0x41, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x06, 0x64,
-        0x3A, 0xDB, 0x22, 0x46, 0x01, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xC2, 0x60, 0x1E, 0x78, 0xFF, 0xFF,
-        0x28, 0x40, 0xC4, 0x3A, 0x0C, 0x00, 0x27, 0x44, 0xFD, 0xB4, 0x40, 0x47, 0xA8, 0xE2, 0x05, 0xE1,
-        0x01, 0x60, 0x08, 0xE1, 0x2A, 0xE8, 0x3C, 0x46, 0xA4, 0x60, 0xBF, 0x78, 0xFF, 0xFF, 0x3F, 0x40,
-        0x01, 0x2B, 0x05, 0x00, 0x67, 0x4C, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B, 0x07, 0x60,
-        0xEB, 0xF1, 0x1F, 0xF2, 0x2A, 0xE8, 0xB0, 0x81, 0x29, 0x40, 0x40, 0x2B, 0x14, 0x00, 0x61, 0x4C,
-        0x29, 0x60, 0xC0, 0x65, 0x61, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1,
-        0x01, 0x60, 0x00, 0xE1, 0x01, 0x60, 0x09, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0xFF, 0x60, 0xF2, 0x64,
-        0x64, 0x4C, 0x40, 0x43, 0x18, 0x00, 0x29, 0x47, 0x80, 0xB7, 0x34, 0x94, 0x60, 0x4C, 0x29, 0x60,
-        0xC0, 0x65, 0x61, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60,
-        0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x7C, 0x44, 0x29, 0x40,
-        0x80, 0x2B, 0x67, 0x44, 0x60, 0x4C, 0x40, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0x28, 0x45, 0xBF, 0x60,
-        0xFF, 0x64, 0x24, 0x88, 0xC4, 0xE2, 0x08, 0x64, 0x3A, 0xDB, 0x21, 0x46, 0x2A, 0x44, 0x72, 0x45,
-        0x24, 0xFA, 0xB2, 0xF3, 0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40, 0x01, 0x26, 0x64, 0x44,
-        0xB2, 0xF9, 0x25, 0xFA, 0xB3, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB3, 0xFB, 0x28, 0xFA, 0xB4, 0xF3,
-        0x02, 0x04, 0xDC, 0x84, 0xB4, 0xFB, 0x29, 0xFA, 0x24, 0x44, 0x04, 0x2A, 0x06, 0x00, 0x28, 0x40,
-        0xA4, 0x36, 0x03, 0x00, 0xA6, 0x60, 0xB1, 0x78, 0xFF, 0xFF, 0x26, 0x43, 0x84, 0xBB, 0xFC, 0xB3,
-        0x21, 0x46, 0x01, 0x5D, 0x0F, 0xFC, 0x5C, 0x46, 0x05, 0xFF, 0x27, 0x44, 0x01, 0x2A, 0x13, 0x00,
-        0x50, 0xFE, 0x28, 0x40, 0x08, 0x3A, 0x12, 0x00, 0x2F, 0xF2, 0x30, 0xF0, 0x60, 0x43, 0x31, 0xF2,
-        0x22, 0x46, 0x64, 0x41, 0x2C, 0xF0, 0x2D, 0xF0, 0xD3, 0x80, 0x2E, 0xF0, 0xD1, 0x80, 0xD0, 0x80,
-        0x27, 0x44, 0x09, 0x0C, 0x03, 0x00, 0x27, 0x44, 0x06, 0x22, 0x05, 0x00, 0xB8, 0xB4, 0x40, 0x47,
-        0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xD4, 0x64, 0x40, 0x48, 0x0D, 0x64, 0x3A, 0xDB, 0x7C, 0x44,
-        0x1B, 0x60, 0xF0, 0xFB, 0x21, 0x46, 0x1C, 0xF2, 0x00, 0xE1, 0xF0, 0xFE, 0x00, 0x63, 0x28, 0x44,
-        0xA4, 0x36, 0x0A, 0x00, 0x04, 0x2B, 0x08, 0x00, 0x30, 0xF3, 0x2D, 0x45, 0xD4, 0x84, 0xCA, 0x65,
-        0xD4, 0x83, 0x01, 0x64, 0x1B, 0x60, 0xF0, 0xFB, 0xD4, 0x64, 0x35, 0x00, 0x0F, 0x64, 0x3A, 0xDB,
-        0x21, 0x46, 0x29, 0x40, 0x40, 0x27, 0x15, 0x00, 0x80, 0x27, 0x02, 0x00, 0xCA, 0x65, 0x01, 0x00,
-        0x6A, 0x65, 0x1C, 0xF2, 0xFF, 0xFF, 0x04, 0x7F, 0x40, 0x45, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36,
-        0x38, 0x64, 0x37, 0x36, 0x15, 0x64, 0x6E, 0x3A, 0x17, 0x00, 0x84, 0x7F, 0x40, 0x45, 0x0B, 0x64,
-        0x13, 0x00, 0x1C, 0xF2, 0x1E, 0x65, 0x40, 0x45, 0x0B, 0x36, 0x1E, 0x64, 0x0F, 0x36, 0x16, 0x64,
-        0x0A, 0x36, 0x12, 0x64, 0x0E, 0x36, 0x0E, 0x64, 0x09, 0x36, 0x0E, 0x64, 0x0D, 0x36, 0x0A, 0x64,
-        0x08, 0x36, 0x0A, 0x64, 0x0C, 0x36, 0x0A, 0x64, 0x40, 0x4D, 0x00, 0xE1, 0xF0, 0xFE, 0x2B, 0xF2,
-        0xC4, 0x85, 0xD4, 0x83, 0xC4, 0x64, 0x40, 0x48, 0x2F, 0xF0, 0xB0, 0xF0, 0xB1, 0xF2, 0xA1, 0xFF,
-        0x12, 0x74, 0xCD, 0xE2, 0x80, 0x4E, 0x12, 0x74, 0x83, 0x4C, 0x12, 0x74, 0x9A, 0xFF, 0x84, 0x4C,
-        0x12, 0x74, 0x85, 0x4C, 0x12, 0x74, 0x81, 0x4C, 0x12, 0x74, 0xA1, 0xFF, 0x98, 0xFF, 0xB2, 0x60,
-        0x58, 0x4F, 0x2D, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0x18, 0xE1, 0x78, 0x44, 0x03, 0xA4, 0x35, 0xFB,
-        0xB2, 0x60, 0x70, 0x78, 0xFF, 0xFF, 0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49, 0x28, 0x40, 0xC4, 0x36,
-        0x07, 0x00, 0x1B, 0x60, 0xF0, 0xF3, 0xFF, 0xFF, 0x03, 0x1B, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E,
-        0x27, 0x44, 0x01, 0x2A, 0x05, 0x00, 0xFE, 0xB4, 0x40, 0x47, 0xA5, 0x60, 0x7F, 0x78, 0xFF, 0xFF,
-        0x16, 0x60, 0xAB, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x02, 0x36, 0xC1, 0xFE, 0xA3, 0x60, 0xE7, 0x78,
-        0xFF, 0xFF, 0x28, 0x40, 0xB4, 0x3A, 0x0B, 0x00, 0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4,
-        0x40, 0x47, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xA6, 0x60, 0x3E, 0x78, 0xFF, 0xFF, 0x28, 0x44,
-        0xD4, 0x36, 0x03, 0x00, 0xA7, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0xA8, 0xE2, 0x27, 0x44, 0xFB, 0xB4,
-        0x40, 0x47, 0x1C, 0x42, 0x22, 0x46, 0x19, 0x60, 0xCF, 0xF3, 0xFF, 0xFF, 0x34, 0xFB, 0x2A, 0xF0,
-        0xF7, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDA, 0x60, 0x40, 0x40, 0x2B, 0xC4, 0x00, 0x22, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x22, 0x26, 0x3F, 0x00, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26, 0x05, 0x00,
-        0xBA, 0x00, 0x04, 0x2B, 0xB8, 0x00, 0xA6, 0xF5, 0x01, 0x00, 0x07, 0xF4, 0x4B, 0xF2, 0xFF, 0xFF,
-        0xDC, 0x84, 0x4B, 0xFA, 0x0C, 0x60, 0xFC, 0x62, 0x80, 0xFF, 0xC8, 0x60, 0x78, 0x44, 0x02, 0xA4,
-        0xA2, 0xDB, 0x8C, 0x78, 0xFF, 0xFF, 0x82, 0xFF, 0xA6, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x00, 0x7C,
-        0x07, 0x03, 0x66, 0x43, 0x22, 0x46, 0x22, 0xF2, 0x63, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x01, 0x00,
-        0x3C, 0xF1, 0x4B, 0xF0, 0x64, 0x41, 0x64, 0x47, 0x60, 0x5F, 0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC,
-        0x60, 0x47, 0x22, 0x46, 0x3A, 0xFA, 0x64, 0x44, 0x20, 0x7F, 0x34, 0x94, 0x3B, 0xFA, 0x08, 0x60,
-        0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA,
-        0xD1, 0x60, 0x00, 0xEA, 0x80, 0x00, 0x2A, 0xF2, 0x00, 0x60, 0x7C, 0x62, 0x60, 0x40, 0x40, 0x2B,
-        0x24, 0x00, 0xA2, 0xD3, 0x00, 0x61, 0x60, 0xFE, 0xA0, 0xD3, 0x5E, 0xD1, 0xFF, 0xFF, 0x20, 0xFE,
-        0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81, 0xC0, 0x2B, 0x04, 0x00, 0x80, 0x2A, 0x02, 0x00, 0x7F, 0xA4,
-        0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00, 0x60, 0x47, 0xDC, 0x87, 0x01, 0x61, 0xC0, 0x80, 0x00, 0x36,
-        0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE, 0x5A, 0xD1, 0xFF, 0xFF, 0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4,
-        0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64, 0xA2, 0xDB, 0x20, 0xFE, 0x00, 0x60, 0x3E, 0xF3, 0xFF, 0xFF,
-        0xA0, 0xD3, 0x5A, 0xD1, 0x3A, 0xFA, 0x3B, 0xF8, 0x74, 0x62, 0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44,
-        0xE0, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F,
-        0xA0, 0x5A, 0x00, 0x60, 0x40, 0xF3, 0xFF, 0xFF, 0xA0, 0xD1, 0x5A, 0xD1, 0x64, 0x45, 0x64, 0x44,
-        0xE3, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE5, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5A,
-        0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xE9, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEB, 0x7F,
-        0xA0, 0x5A, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5A,
-        0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5A, 0x08, 0x60,
-        0x00, 0xEA, 0x65, 0x44, 0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A, 0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60,
-        0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x0B, 0xF2, 0xFF, 0xFF, 0x7F, 0xB4, 0x0C, 0xF0, 0x04, 0x02,
-        0x64, 0x46, 0x00, 0xF0, 0x04, 0x64, 0x22, 0x46, 0x03, 0xFA, 0x60, 0x41, 0x64, 0x46, 0x01, 0xF2,
-        0xFC, 0xA1, 0x61, 0x45, 0xD4, 0x84, 0xFF, 0xFF, 0x08, 0x02, 0x00, 0xF0, 0x04, 0x63, 0x64, 0x46,
-        0x01, 0xF2, 0x22, 0x46, 0x1A, 0xFA, 0x03, 0xFC, 0x02, 0x00, 0x22, 0x46, 0x1A, 0xFA, 0x35, 0xF2,
-        0x04, 0xF8, 0xDC, 0x84, 0x35, 0xFA, 0x14, 0xF2, 0x0F, 0xB5, 0x0F, 0xB4, 0xCC, 0x84, 0x94, 0x80,
-        0x04, 0x60, 0x00, 0x65, 0x2A, 0xF2, 0x01, 0x02, 0x94, 0x84, 0x2A, 0xFA, 0x95, 0xFC, 0x06, 0x00,
-        0xC4, 0x3A, 0x07, 0x00, 0x27, 0x44, 0xFD, 0xB4, 0x40, 0x47, 0xA8, 0xE2, 0xA5, 0x60, 0x1C, 0x78,
-        0xFF, 0xFF, 0x28, 0x44, 0x04, 0x26, 0x05, 0x00, 0x68, 0x3A, 0x03, 0x00, 0x32, 0x44, 0x00, 0x27,
-        0x03, 0x00, 0xA3, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0x0A, 0x64, 0x3A, 0xDB, 0xA3, 0x60, 0xF4, 0x78,
-        0xFF, 0xFF, 0x0E, 0x64, 0x3A, 0xDB, 0x3C, 0x44, 0x60, 0x46, 0x1E, 0xF0, 0x40, 0x42, 0x64, 0x40,
-        0x40, 0x27, 0x48, 0x00, 0x1F, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27, 0x3C, 0x00, 0x80, 0x2B,
-        0x0B, 0x00, 0xBF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x80, 0x60, 0x00, 0x65, 0x29, 0x44,
-        0x34, 0x89, 0x80, 0x60, 0x00, 0x63, 0x05, 0x00, 0x3F, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89,
-        0x00, 0x63, 0x1E, 0xF2, 0x39, 0xF1, 0xC0, 0x60, 0xFF, 0xB5, 0x0A, 0x18, 0x60, 0x47, 0x1F, 0xB4,
-        0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47,
-        0xB4, 0x84, 0x07, 0x60, 0xEA, 0xF1, 0x3C, 0x94, 0xB0, 0x84, 0x60, 0x4C, 0x29, 0x60, 0xC0, 0x65,
-        0x60, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1,
-        0x05, 0x60, 0x69, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B,
-        0x67, 0x44, 0x60, 0x4C, 0x32, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x04, 0x26,
-        0xCB, 0x01, 0xBF, 0x01, 0x40, 0x60, 0x00, 0x65, 0x29, 0x44, 0x34, 0x89, 0x40, 0x60, 0x00, 0x63,
-        0x9F, 0xF2, 0x1E, 0xF2, 0x39, 0xF1, 0xC0, 0x60, 0xFF, 0xB5, 0x0A, 0x18, 0x60, 0x47, 0x1F, 0xB4,
-        0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47,
-        0xB4, 0x84, 0x07, 0x60, 0xEA, 0xF1, 0x3C, 0x94, 0xB0, 0x81, 0x61, 0x4C, 0x29, 0x60, 0xC0, 0x65,
-        0x61, 0x47, 0x1F, 0xB4, 0xE0, 0x84, 0xE0, 0x84, 0x44, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1,
-        0x01, 0x60, 0x09, 0x6B, 0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x40, 0xE1, 0x01, 0x60, 0x08, 0xE1,
-        0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0x82, 0xFF, 0x2A, 0xF2, 0x10, 0x60, 0x00, 0x65,
-        0xA4, 0x84, 0xB4, 0xBC, 0x1E, 0xF0, 0x40, 0x48, 0x64, 0x40, 0x40, 0x27, 0x17, 0x00, 0x1C, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x0A, 0x36, 0x06, 0x00, 0x14, 0x36, 0x07, 0x00, 0x37, 0x36, 0x08, 0x00,
-        0x6E, 0x36, 0x09, 0x00, 0x70, 0x7C, 0xA0, 0x63, 0x0F, 0x00, 0x38, 0x7C, 0x50, 0x63, 0x0C, 0x00,
-        0x15, 0x7C, 0x1E, 0x63, 0x09, 0x00, 0x0B, 0x7C, 0x0F, 0x63, 0x06, 0x00, 0x9C, 0xF4, 0xFF, 0x65,
-        0x63, 0x47, 0xA4, 0x9C, 0xA7, 0x84, 0x23, 0x00, 0x40, 0x45, 0x43, 0x4D, 0x00, 0xE1, 0xF0, 0xFE,
-        0x29, 0x40, 0x80, 0x2B, 0x03, 0x00, 0x00, 0x60, 0x6A, 0x65, 0x02, 0x00, 0x00, 0x60, 0xCA, 0x65,
-        0x1F, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27, 0x0E, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x04, 0x27, 0x03, 0x00, 0x65, 0x44, 0xE0, 0x85, 0x12, 0x00, 0x2B, 0xF2, 0x11, 0xF0, 0xC0, 0x84,
-        0xD0, 0x84, 0xC4, 0x83, 0x11, 0x00, 0x1E, 0x64, 0xC4, 0x84, 0x60, 0x45, 0x08, 0x00, 0x40, 0x45,
-        0xFF, 0x60, 0xF8, 0x64, 0x40, 0x43, 0x00, 0xE1, 0xF0, 0xFE, 0x00, 0x60, 0x3C, 0x65, 0x91, 0xF4,
-        0x1B, 0xF0, 0xC3, 0x84, 0xC4, 0x84, 0xC0, 0x83, 0x28, 0x44, 0xA1, 0xFF, 0x12, 0x74, 0x80, 0x4E,
-        0x12, 0x74, 0x83, 0x4C, 0x9A, 0xFF, 0x12, 0x74, 0x56, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x5C, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0xA1, 0xFF, 0x98, 0xFF, 0xB2, 0x60, 0x58, 0x4F, 0x2D, 0x78, 0xFF, 0xFF,
-        0xBC, 0xFF, 0xB5, 0xFF, 0x01, 0x60, 0x18, 0xE1, 0x47, 0xFF, 0x27, 0x44, 0x02, 0xBC, 0x40, 0x47,
-        0x36, 0xF3, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0x60, 0x56,
-        0xAD, 0xE2, 0xA5, 0x60, 0x79, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x7B, 0xF3, 0x19, 0x60, 0x3B, 0xF3,
-        0x60, 0x40, 0x04, 0x26, 0x0B, 0x00, 0x07, 0xB4, 0x60, 0x40, 0x01, 0x36, 0x07, 0x00, 0x29, 0x44,
-        0xBF, 0x60, 0xFF, 0xB7, 0x80, 0xBF, 0x40, 0x49, 0x80, 0x67, 0x05, 0x00, 0x3F, 0x60, 0xFF, 0x65,
-        0x29, 0x44, 0x24, 0x89, 0x00, 0x64, 0x16, 0x60, 0x50, 0xF1, 0xFF, 0xFF, 0x19, 0x60, 0x55, 0xF9,
-        0x39, 0xF1, 0x16, 0x60, 0x3C, 0xF1, 0x64, 0x41, 0x64, 0x5E, 0x60, 0x45, 0x64, 0x47, 0x1F, 0xB4,
-        0x54, 0x94, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00, 0x01, 0x04, 0x1F, 0x64, 0x60, 0x47,
-        0x07, 0x60, 0xEA, 0xF1, 0xB4, 0x84, 0xB0, 0x8C, 0x29, 0x60, 0xC0, 0x7C, 0x60, 0x47, 0x1F, 0xB4,
-        0xE0, 0x84, 0xE0, 0x84, 0x40, 0xD3, 0x5A, 0xD1, 0x01, 0x60, 0x00, 0xE1, 0x05, 0x60, 0x69, 0x6B,
-        0x60, 0x4C, 0xB5, 0xFF, 0x64, 0x4C, 0x7C, 0x44, 0x29, 0x40, 0x80, 0x2B, 0x67, 0x44, 0x60, 0x4C,
-        0x40, 0xE1, 0x01, 0x60, 0x08, 0xE1, 0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0x82, 0xFF,
-        0x3C, 0x44, 0x60, 0x46, 0x40, 0x42, 0x13, 0x64, 0x3A, 0xDB, 0x10, 0x60, 0x00, 0x65, 0x3C, 0x46,
-        0x2A, 0xF2, 0x19, 0x60, 0x3B, 0xF1, 0xA4, 0x84, 0xC4, 0xBC, 0x40, 0x48, 0x64, 0x44, 0x04, 0x26,
-        0x09, 0x00, 0x02, 0x26, 0x0A, 0x00, 0x01, 0x26, 0x0B, 0x00, 0x08, 0x2A, 0x03, 0x00, 0x0B, 0x63,
-        0x6E, 0x64, 0x08, 0x00, 0x15, 0x63, 0x37, 0x64, 0x05, 0x00, 0x38, 0x63, 0x14, 0x64, 0x02, 0x00,
-        0x70, 0x63, 0x0A, 0x64, 0x43, 0x4D, 0x40, 0x45, 0x00, 0xE1, 0xF0, 0xFE, 0x00, 0x60, 0x1E, 0x64,
-        0x1B, 0xF0, 0x11, 0xF0, 0xC0, 0x84, 0xC0, 0x84, 0x60, 0x43, 0x28, 0x44, 0xA1, 0xFF, 0x12, 0x74,
-        0x80, 0x4E, 0x12, 0x74, 0x83, 0x4C, 0x9A, 0xFF, 0x12, 0x74, 0x5C, 0x62, 0x7A, 0xD4, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0xA1, 0xFF, 0x98, 0xFF, 0xB2, 0x60, 0x58, 0x4F,
-        0x2D, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0x18, 0xE1, 0x78, 0x44, 0x03, 0xA4, 0x35, 0xFB, 0xB2, 0x60,
-        0x70, 0x78, 0xFF, 0xFF, 0xC4, 0xE2, 0x08, 0x64, 0x3A, 0xDB, 0xA4, 0x60, 0xBF, 0x78, 0xFF, 0xFF,
-        0x26, 0x43, 0x24, 0x40, 0x01, 0x2A, 0x0E, 0x00, 0x1D, 0xFF, 0x26, 0x44, 0x02, 0xBC, 0x40, 0x46,
-        0x27, 0x44, 0x07, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0x30, 0xF1, 0x81, 0x00, 0xFC, 0xB3, 0x32, 0x40, 0x01, 0x2A, 0x06, 0x00, 0x0A, 0xBB, 0x0F, 0xFC,
-        0xCB, 0xFE, 0xA3, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0x24, 0x44, 0x04, 0x26, 0x29, 0x00, 0x0F, 0xFC,
-        0x05, 0xFF, 0xDB, 0xF3, 0x28, 0x40, 0x80, 0x3A, 0x23, 0x00, 0x60, 0x40, 0x03, 0x3A, 0x20, 0x00,
-        0x32, 0xF2, 0x7F, 0xF1, 0x33, 0xF2, 0xD0, 0x80, 0x80, 0xF1, 0x1A, 0x02, 0xD0, 0x80, 0x34, 0xF2,
-        0x81, 0xF1, 0x16, 0x02, 0xD0, 0x80, 0x3C, 0x44, 0x13, 0x02, 0xAC, 0x86, 0xBB, 0xFE, 0x10, 0x03,
-        0x2A, 0xF2, 0x21, 0x46, 0x60, 0x40, 0x80, 0x3A, 0x0B, 0x00, 0x01, 0x64, 0x31, 0xFB, 0xC0, 0xFE,
-        0x00, 0x64, 0x32, 0xFB, 0x43, 0xFF, 0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0x82, 0xFF,
-        0x30, 0xF1, 0x27, 0x44, 0x05, 0x22, 0x34, 0x00, 0xFA, 0xB4, 0x40, 0x47, 0x24, 0x44, 0x10, 0x2A,
-        0x2B, 0x00, 0x28, 0x40, 0xD4, 0x3A, 0x28, 0x00, 0x31, 0x40, 0x08, 0x26, 0x00, 0x7C, 0x29, 0x40,
-        0x50, 0x2B, 0x0D, 0x00, 0xEF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x31, 0x40, 0x08, 0x2A,
-        0x06, 0x00, 0x1C, 0x60, 0x11, 0xF3, 0xFF, 0xFF, 0xE0, 0x85, 0x2B, 0x44, 0x05, 0x05, 0x2B, 0x44,
-        0xFF, 0xA4, 0x01, 0xA4, 0x04, 0x24, 0x00, 0x64, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28, 0x64, 0x44,
-        0xC4, 0x84, 0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00, 0x20, 0x29,
-        0x6D, 0xE2, 0xA5, 0x60, 0x7F, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x07, 0x00,
-        0x02, 0x2A, 0x05, 0x00, 0xFD, 0xB4, 0x40, 0x47, 0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x05, 0x64,
-        0x3A, 0xDB, 0x28, 0x44, 0xA4, 0x3A, 0x07, 0x00, 0x01, 0x60, 0x02, 0x7C, 0x25, 0x44, 0x0A, 0x3A,
-        0x02, 0x00, 0x01, 0x60, 0x3A, 0x7C, 0x31, 0x40, 0x08, 0x26, 0x00, 0x7C, 0x29, 0x40, 0x50, 0x2B,
-        0x0D, 0x00, 0xEF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x31, 0x40, 0x08, 0x2A, 0x06, 0x00,
-        0x1C, 0x60, 0x11, 0xF3, 0xFF, 0xFF, 0xE0, 0x85, 0x2B, 0x44, 0x05, 0x05, 0x2B, 0x44, 0xFF, 0xA4,
-        0x01, 0xA4, 0x04, 0x24, 0x00, 0x64, 0xD0, 0x80, 0x70, 0x45, 0x02, 0x28, 0x64, 0x44, 0xC4, 0x84,
-        0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x28, 0x40, 0xE4, 0x36, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28,
-        0x01, 0x00, 0x20, 0x29, 0x6D, 0xE2, 0xA3, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x05, 0x22,
-        0x09, 0x00, 0xBA, 0xB4, 0x40, 0x47, 0x3C, 0x46, 0x02, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0xA3, 0x60,
-        0xF4, 0x78, 0xFF, 0xFF, 0x27, 0x44, 0x02, 0x2A, 0x06, 0x00, 0xFD, 0xB4, 0x40, 0x47, 0x06, 0x64,
-        0x31, 0xFB, 0xC0, 0xFE, 0xF4, 0x01, 0xF3, 0x0A, 0x7C, 0x50, 0x6D, 0xE2, 0xF0, 0x01, 0x72, 0x45,
-        0xDC, 0x84, 0xB2, 0xFB, 0x11, 0x64, 0x3A, 0xDB, 0xB3, 0xF3, 0x06, 0x04, 0xDC, 0x84, 0xB3, 0xFB,
-        0xB4, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB4, 0xFB, 0xA4, 0x60, 0x01, 0x78, 0xFF, 0xFF, 0x00, 0x61,
-        0x12, 0x64, 0x3A, 0xDB, 0x20, 0x60, 0x04, 0x63, 0xBD, 0xD3, 0x72, 0x45, 0x44, 0x8A, 0x02, 0x28,
-        0x03, 0x00, 0xE4, 0xE2, 0xDD, 0x81, 0x04, 0x00, 0x02, 0x28, 0x02, 0x00, 0xE4, 0xE2, 0xDD, 0x81,
-        0xBD, 0xD3, 0xB2, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9, 0xC4, 0x84,
-        0x60, 0x55, 0x2A, 0x52, 0xE4, 0xE2, 0xB2, 0xFB, 0x02, 0x24, 0x01, 0xB9, 0xBD, 0xD3, 0xB3, 0xF1,
-        0x61, 0x45, 0xC0, 0x84, 0x00, 0x61, 0x02, 0x24, 0x01, 0xB9, 0xC4, 0x84, 0xB3, 0xFB, 0x02, 0x24,
-        0x01, 0xB9, 0xBD, 0xD3, 0xB4, 0xF1, 0x61, 0x45, 0xC0, 0x84, 0xC4, 0x84, 0xB4, 0xFB, 0xA5, 0x60,
-        0x14, 0x78, 0xFF, 0xFF, 0xB0, 0x60, 0x9E, 0x78, 0xFF, 0xFF, 0x47, 0xFF, 0x1B, 0x60, 0xEE, 0xF3,
-        0xFF, 0xFF, 0x04, 0x18, 0xAE, 0x4F, 0x08, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0xC8, 0x74, 0xCD, 0xE2,
-        0xAA, 0x60, 0xB9, 0x78, 0x00, 0x61, 0xA3, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0xAB, 0x60, 0xE8, 0x78,
-        0xFF, 0xFF, 0x21, 0x46, 0x5C, 0x44, 0x26, 0x44, 0x02, 0x26, 0x01, 0x00, 0x3E, 0x46, 0x09, 0xF2,
-        0x46, 0x41, 0x66, 0x40, 0xF3, 0x18, 0x40, 0x5E, 0xFD, 0xFB, 0x02, 0x64, 0x40, 0x46, 0x41, 0x5D,
-        0x00, 0x64, 0x31, 0xFA, 0x00, 0xF2, 0x46, 0x45, 0x87, 0xFC, 0xAC, 0xE2, 0x01, 0x64, 0x33, 0xFB,
-        0x32, 0x40, 0x01, 0x2A, 0x21, 0x00, 0x19, 0xF3, 0x01, 0x60, 0x1E, 0xE1, 0x1D, 0x18, 0x80, 0x64,
-        0x40, 0x49, 0x00, 0xE1, 0x19, 0xFF, 0x08, 0x64, 0x2A, 0xFA, 0x5A, 0xDA, 0x2C, 0xFA, 0x5A, 0xDA,
-        0x5A, 0xDA, 0xF1, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xF1, 0xFB, 0x72, 0x44, 0x24, 0xFA, 0xB2, 0xF3,
-        0x25, 0xFA, 0xA1, 0xFF, 0xFF, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D,
-        0x7C, 0x4B, 0xA3, 0x60, 0xF4, 0x78, 0xFF, 0xFF, 0x01, 0xE1, 0x01, 0x60, 0x1A, 0xE1, 0x3F, 0x60,
-        0xCF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x2E, 0x44, 0x00, 0x36, 0x48, 0x00, 0x01, 0x3A, 0xE5, 0x00,
-        0x88, 0xFF, 0x40, 0x67, 0x29, 0x45, 0x34, 0x89, 0x04, 0x64, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF,
-        0xA1, 0xFF, 0x6C, 0x45, 0x65, 0x44, 0x0F, 0xB4, 0x40, 0x45, 0x1C, 0xFA, 0x65, 0x44, 0x29, 0x41,
-        0xF9, 0x81, 0x52, 0x4A, 0x71, 0x89, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x83, 0x1D, 0xFC,
-        0x1B, 0xFC, 0x10, 0x60, 0x00, 0x65, 0x29, 0x44, 0x34, 0x89, 0x50, 0x4B, 0x67, 0x50, 0x69, 0xE2,
-        0xB6, 0xF1, 0xFC, 0xA3, 0xD3, 0x80, 0x43, 0x43, 0x03, 0x04, 0xAB, 0x60, 0xDE, 0x78, 0xFF, 0xFF,
-        0x09, 0x7C, 0xD3, 0x80, 0x9A, 0xFF, 0x03, 0x07, 0xAB, 0x60, 0xDE, 0x78, 0xFF, 0xFF, 0x25, 0x44,
-        0x01, 0x26, 0x0F, 0xAC, 0x26, 0x60, 0x4A, 0x65, 0x44, 0xD3, 0x12, 0x65, 0x45, 0x46, 0x60, 0x47,
-        0x40, 0x7F, 0x27, 0xFA, 0x8F, 0xFC, 0x18, 0x61, 0xEA, 0xF1, 0xA1, 0xFF, 0x6C, 0x44, 0xDC, 0x80,
-        0xFF, 0xFF, 0x21, 0x03, 0x50, 0xFE, 0xAC, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0xC8, 0x60, 0x0B, 0x7D,
-        0x08, 0x60, 0x00, 0x6B, 0xB5, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xAA, 0x74, 0xCD, 0xE2, 0x01, 0x64,
-        0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0x01, 0x60, 0x08, 0xE1, 0x05, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x04, 0x25, 0x8B, 0x00, 0x6C, 0x44, 0x0A, 0x36, 0x07, 0x00, 0x14, 0x36, 0x05, 0x00, 0x37, 0x36,
-        0x03, 0x00, 0x6E, 0x36, 0x01, 0x00, 0x81, 0x00, 0x40, 0x45, 0x32, 0x74, 0xA1, 0xFF, 0x1C, 0xFA,
-        0x40, 0x4E, 0x8C, 0x44, 0x60, 0x43, 0x1D, 0xFA, 0x01, 0xE1, 0x20, 0x64, 0x3A, 0xDB, 0x2E, 0x44,
-        0x14, 0x36, 0x12, 0x00, 0x0A, 0x36, 0x0F, 0x00, 0x63, 0x45, 0xE3, 0x83, 0xE3, 0x83, 0xC7, 0x83,
-        0xE3, 0x83, 0xC7, 0x83, 0xFF, 0xFF, 0x37, 0x36, 0x05, 0x00, 0x6E, 0x36, 0x04, 0x00, 0xAC, 0x60,
-        0xBF, 0x78, 0xFF, 0xFF, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xEB, 0x83, 0xFF, 0xFF, 0x80, 0x27,
-        0xCF, 0x83, 0x1B, 0xFC, 0x01, 0x64, 0x51, 0xFB, 0xA1, 0xFF, 0x29, 0x41, 0xF9, 0x81, 0x52, 0x4A,
-        0x71, 0x89, 0x2E, 0x44, 0x27, 0xFA, 0xB6, 0xF1, 0xFC, 0xA3, 0xD3, 0x80, 0x43, 0x43, 0x03, 0x04,
-        0xAB, 0x60, 0xDE, 0x78, 0xFF, 0xFF, 0x9A, 0xFF, 0x54, 0x63, 0x12, 0x64, 0x40, 0x46, 0x8F, 0xFC,
-        0x18, 0x61, 0xEA, 0xF1, 0x50, 0xFE, 0x6C, 0x40, 0x9E, 0x15, 0x01, 0x60, 0x08, 0xE1, 0x80, 0xE1,
-        0x00, 0x64, 0x33, 0xFB, 0x29, 0x40, 0x50, 0x2B, 0x0F, 0x00, 0x2B, 0x44, 0x70, 0x45, 0xC4, 0x84,
-        0xFF, 0xFF, 0x04, 0x24, 0x00, 0xB4, 0x60, 0x50, 0x08, 0x28, 0x01, 0x00, 0x20, 0x29, 0x6D, 0xE2,
-        0xEF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x01, 0x60, 0x18, 0xE1, 0x01, 0x11, 0x12, 0x00,
-        0x29, 0x44, 0x20, 0xBC, 0x40, 0x49, 0x01, 0x64, 0x33, 0xFB, 0xB6, 0xFF, 0x00, 0xE1, 0x01, 0x60,
-        0x1A, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x40, 0xFC, 0x11, 0x01, 0x60, 0x18, 0xE1, 0xAE, 0x4F,
-        0xF7, 0xB4, 0xA0, 0x5E, 0xB5, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D,
-        0x7C, 0x4B, 0x35, 0xE1, 0xAC, 0xE2, 0xAA, 0x60, 0x46, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0x7F, 0xF3,
-        0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB, 0x21, 0x64, 0x3A, 0xDB, 0xBD, 0x01,
-        0xAC, 0xE2, 0x01, 0x64, 0x33, 0xFB, 0x01, 0xE1, 0x3F, 0x60, 0xCF, 0x65, 0x29, 0x44, 0x24, 0x89,
-        0x2E, 0x44, 0x00, 0x36, 0x21, 0x00, 0x01, 0x3A, 0xF0, 0x01, 0x88, 0xFF, 0x40, 0x67, 0x29, 0x45,
-        0x34, 0x89, 0xA1, 0xFF, 0x6C, 0x45, 0x65, 0x44, 0x0F, 0xB4, 0x40, 0x45, 0x65, 0x44, 0x29, 0x41,
-        0xF9, 0x81, 0x52, 0x4A, 0x71, 0x89, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x83, 0x0E, 0x7C,
-        0xD3, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0xAB, 0x60, 0xDE, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0x6C, 0x44,
-        0xDC, 0x80, 0xFF, 0xFF, 0xD2, 0x03, 0x41, 0x00, 0xC8, 0x60, 0x0B, 0x7D, 0x08, 0x60, 0x00, 0x6B,
-        0xB5, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xAA, 0x74, 0xCD, 0xE2, 0x01, 0x60, 0x08, 0xE1, 0x05, 0xE1,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x04, 0x25, 0xC1, 0x01, 0x6C, 0x44, 0x0A, 0x36, 0x07, 0x00, 0x14, 0x36,
-        0x05, 0x00, 0x37, 0x36, 0x03, 0x00, 0x6E, 0x36, 0x01, 0x00, 0xB7, 0x01, 0x40, 0x45, 0x32, 0x74,
-        0xA1, 0xFF, 0x40, 0x4E, 0x8C, 0x44, 0x60, 0x43, 0x01, 0xE1, 0x20, 0x64, 0x3A, 0xDB, 0x2E, 0x44,
-        0x14, 0x36, 0x09, 0x00, 0x0A, 0x36, 0x07, 0x00, 0x37, 0x36, 0x05, 0x00, 0x6E, 0x36, 0x03, 0x00,
-        0xAC, 0x60, 0xBF, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x51, 0xFB, 0xA1, 0xFF, 0x29, 0x41, 0xF9, 0x81,
-        0x52, 0x4A, 0x71, 0x89, 0x0E, 0x7C, 0xD3, 0x80, 0x43, 0x43, 0x03, 0x03, 0xAB, 0x60, 0xDE, 0x78,
-        0xFF, 0xFF, 0x6C, 0x40, 0xFF, 0xFF, 0x01, 0x15, 0x90, 0x01, 0x12, 0x64, 0x40, 0x46, 0xEA, 0xF1,
-        0x50, 0xFE, 0xA1, 0xFF, 0x12, 0x61, 0x8C, 0x44, 0xEB, 0xF0, 0x40, 0x48, 0x8C, 0x44, 0x30, 0xFB,
-        0x04, 0x61, 0x50, 0xFE, 0x8C, 0x44, 0xD0, 0x80, 0x8C, 0x44, 0xD4, 0x80, 0x8C, 0x44, 0xEC, 0xF1,
-        0x00, 0x65, 0xD0, 0x80, 0x28, 0x44, 0x01, 0x0C, 0x13, 0x00, 0x10, 0x65, 0x60, 0x40, 0xC4, 0x36,
-        0x04, 0x00, 0xD4, 0x3A, 0x0D, 0x00, 0x27, 0x40, 0x40, 0x26, 0x30, 0x65, 0x35, 0x84, 0xA1, 0xFF,
-        0x8C, 0x44, 0x47, 0xFF, 0x50, 0x4B, 0x67, 0x50, 0x69, 0xE2, 0x6A, 0x44, 0x40, 0x2B, 0x09, 0x15,
-        0x2C, 0x60, 0xEC, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x2A, 0x64, 0x3A, 0xDB,
-        0x1C, 0x01, 0x29, 0x40, 0x10, 0x26, 0x02, 0x00, 0x04, 0x74, 0xCD, 0xE2, 0x8C, 0x44, 0xB6, 0xFF,
-        0xB7, 0xFF, 0x01, 0x60, 0x18, 0xE1, 0x05, 0xE1, 0x00, 0x64, 0x33, 0xFB, 0xA1, 0xFF, 0x6C, 0x44,
-        0xA1, 0xFF, 0x6C, 0x44, 0x29, 0x40, 0x40, 0x2B, 0x03, 0x00, 0xB6, 0xFF, 0xA1, 0xFF, 0x6C, 0x44,
-        0xA1, 0xFF, 0x02, 0x74, 0x29, 0x44, 0x40, 0x27, 0x05, 0x74, 0xCD, 0xE2, 0xA1, 0xFF, 0xCB, 0xF3,
-        0xC4, 0xE2, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0xDC, 0x84, 0xE0, 0x94, 0x26, 0x44, 0x84, 0xBC,
-        0x40, 0x46, 0x23, 0x64, 0x3A, 0xDB, 0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF,
-        0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0xA9, 0x60, 0x88, 0x78, 0xFF, 0xFF, 0x29, 0x64,
-        0x3A, 0xDB, 0xA2, 0xFC, 0x32, 0x40, 0x01, 0x2A, 0xB9, 0x00, 0x01, 0x60, 0x1A, 0xE1, 0x23, 0x43,
-        0xA1, 0xFF, 0xEC, 0x44, 0x2A, 0xFA, 0x40, 0x48, 0xA1, 0xFF, 0x7A, 0xDC, 0x7E, 0x36, 0x04, 0xA2,
-        0xFC, 0x1C, 0x03, 0x1D, 0x00, 0x64, 0x3F, 0xFA, 0x2E, 0x00, 0x03, 0x2B, 0x04, 0x00, 0xA1, 0xFF,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x8F, 0xB0, 0x88, 0x3A, 0x03, 0x00, 0x70, 0x62, 0xA1, 0xFF,
-        0x7A, 0xDC, 0x28, 0x40, 0x40, 0x2B, 0x06, 0x00, 0x72, 0x62, 0xA1, 0xFF, 0x7A, 0xDC, 0x7A, 0xDC,
-        0x7A, 0xDC, 0x7A, 0xDC, 0x3F, 0xFC, 0x00, 0xF4, 0x10, 0x62, 0x6E, 0x61, 0xA1, 0xFF, 0x05, 0x1D,
-        0x12, 0x1E, 0x0C, 0x00, 0x00, 0xF4, 0x7C, 0x61, 0x02, 0x62, 0x7A, 0xDC, 0x63, 0x40, 0xFD, 0x1C,
-        0xF9, 0x1D, 0xFF, 0xB1, 0x08, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xB6, 0xFF, 0xB7, 0xFF,
-        0xA1, 0xFF, 0x6C, 0x44, 0x5A, 0xDA, 0x98, 0xFF, 0xA1, 0xFF, 0x6C, 0x40, 0xA1, 0xFF, 0x47, 0xFF,
-        0x7C, 0x44, 0x33, 0xFB, 0x26, 0x44, 0xFD, 0xB4, 0x84, 0xBC, 0x01, 0x15, 0x7F, 0xB4, 0x40, 0x46,
-        0x6C, 0x40, 0xB6, 0xFF, 0xB7, 0xFF, 0xA1, 0xFF, 0x6C, 0x45, 0xA1, 0xFF, 0x7F, 0x60, 0x7F, 0x7C,
-        0x6C, 0x44, 0xA0, 0x84, 0x15, 0xA7, 0x15, 0xA4, 0x21, 0x46, 0x26, 0xFA, 0x29, 0x40, 0x40, 0x2B,
-        0x07, 0x00, 0xB6, 0xFF, 0x40, 0x60, 0x00, 0x65, 0xA1, 0xFF, 0x6C, 0x44, 0x1A, 0xFA, 0x09, 0x00,
-        0x65, 0x44, 0x0F, 0xB4, 0x06, 0xA8, 0x80, 0x60, 0x00, 0x65, 0x08, 0x28, 0x7C, 0x45, 0x29, 0x44,
-        0x34, 0x89, 0x27, 0xF0, 0x65, 0x44, 0x64, 0x5E, 0x27, 0xFA, 0x81, 0xE1, 0x01, 0x60, 0x18, 0xE1,
-        0x01, 0x11, 0x12, 0x00, 0x29, 0x44, 0x20, 0xBC, 0x40, 0x49, 0x01, 0x64, 0x33, 0xFB, 0xB6, 0xFF,
-        0x00, 0xE1, 0x01, 0x60, 0x1A, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x40, 0xFC, 0x11, 0x01, 0x60,
-        0x18, 0xE1, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0x00, 0x70, 0x00, 0x64, 0x40, 0x4B, 0x21, 0x46,
-        0xB5, 0xFF, 0xBC, 0xFF, 0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D,
-        0x7C, 0x4B, 0x28, 0x44, 0x04, 0x27, 0x09, 0x00, 0xD4, 0x36, 0x04, 0x00, 0x0C, 0x22, 0x02, 0x00,
-        0x0C, 0x3A, 0x03, 0x00, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E, 0x2A, 0x44, 0x72, 0x45, 0x24, 0xFA,
-        0xB2, 0xF3, 0x06, 0x04, 0xE4, 0xE2, 0xDC, 0x9C, 0x29, 0x40, 0x01, 0x26, 0x64, 0x44, 0xB2, 0xF9,
-        0x25, 0xFA, 0xB3, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB3, 0xFB, 0x28, 0xFA, 0xB4, 0xF3, 0x02, 0x04,
-        0xDC, 0x84, 0xB4, 0xFB, 0x29, 0xFA, 0xA9, 0x60, 0x88, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0x19, 0x60,
-        0xA3, 0xF3, 0x12, 0x61, 0x60, 0x40, 0x01, 0x2A, 0x08, 0x00, 0x00, 0x64, 0x3B, 0xFA, 0xBF, 0x60,
-        0xFF, 0x65, 0x8C, 0x44, 0x3D, 0xFA, 0xA4, 0x84, 0x01, 0x00, 0x8C, 0x44, 0xEB, 0xF0, 0x2A, 0xFA,
-        0x40, 0x48, 0x04, 0x26, 0x48, 0x00, 0xA1, 0xFF, 0x8C, 0x44, 0x5A, 0xDA, 0x30, 0xFB, 0x6C, 0x44,
-        0x2C, 0xFA, 0xFF, 0xFF, 0x01, 0x26, 0x2B, 0x00, 0xD0, 0x80, 0xA1, 0xFF, 0x8C, 0x44, 0x6C, 0x5C,
-        0x00, 0xE1, 0xF2, 0xFE, 0x2D, 0xFA, 0xEC, 0xF3, 0xD4, 0x80, 0xD0, 0x80, 0x2E, 0xF8, 0x24, 0x44,
-        0x16, 0x0C, 0x32, 0x40, 0x02, 0x2A, 0x07, 0x00, 0x28, 0x42, 0x0C, 0xB2, 0x08, 0x3A, 0x03, 0x00,
-        0x10, 0xBC, 0x40, 0x44, 0x61, 0x00, 0x04, 0x0A, 0xA1, 0xFF, 0xAB, 0x60, 0xE7, 0x78, 0xFF, 0xFF,
-        0x11, 0xBC, 0x40, 0x44, 0x28, 0x45, 0xBF, 0x60, 0xFF, 0x64, 0x24, 0x88, 0x55, 0x00, 0x30, 0xBC,
-        0x40, 0x44, 0x22, 0xF0, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x4D, 0x00, 0x20, 0xB9,
-        0x5C, 0x8E, 0xA1, 0xFF, 0x8C, 0x44, 0x2D, 0xFA, 0xDC, 0x9C, 0x6C, 0x44, 0x00, 0xE1, 0xF2, 0xFE,
-        0x2E, 0xFA, 0x08, 0x28, 0x44, 0x4E, 0xDC, 0x84, 0x2E, 0x5C, 0xB0, 0x84, 0xEF, 0xB1, 0x08, 0x24,
-        0x40, 0xB9, 0x41, 0x46, 0x39, 0x00, 0x23, 0x41, 0x13, 0x64, 0x51, 0x90, 0x56, 0x63, 0x03, 0x04,
-        0xAB, 0x60, 0xDE, 0x78, 0xFF, 0xFF, 0x8C, 0x44, 0x04, 0x61, 0x2B, 0xFA, 0x50, 0xFE, 0x80, 0x27,
-        0x00, 0x64, 0x30, 0xFB, 0x8C, 0x44, 0x2C, 0xFA, 0xD0, 0x80, 0x8C, 0x44, 0x2D, 0xFA, 0xD4, 0x80,
-        0x00, 0x65, 0x8C, 0x44, 0xEC, 0xF1, 0x2E, 0xFA, 0xD0, 0x80, 0x28, 0x44, 0x03, 0x0C, 0xA0, 0x2A,
-        0x0A, 0x00, 0x11, 0x00, 0x10, 0x65, 0x60, 0x40, 0xC4, 0x36, 0x04, 0x00, 0xD4, 0x3A, 0x08, 0x00,
-        0x27, 0x40, 0x40, 0x26, 0x30, 0x65, 0x00, 0x64, 0x3F, 0xFA, 0x46, 0x4E, 0x35, 0x84, 0x64, 0x00,
-        0x40, 0x26, 0xF9, 0x01, 0x30, 0x65, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x04, 0x61, 0xF3, 0x01,
-        0xA1, 0xFF, 0xAB, 0x60, 0xA5, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xFE, 0x65, 0x23, 0x43, 0xE8, 0xA3,
-        0x80, 0x27, 0xF6, 0x01, 0x20, 0xE6, 0x08, 0x60, 0x00, 0xEB, 0x28, 0x44, 0x03, 0x2B, 0x05, 0x00,
-        0x6A, 0x62, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x28, 0x44, 0x8F, 0xB0, 0x88, 0x3A, 0x03, 0x00,
-        0x70, 0x62, 0x7A, 0xDC, 0x28, 0x44, 0x40, 0x2B, 0x0D, 0x00, 0x72, 0x62, 0x7A, 0xDC, 0xA1, 0xFF,
-        0x6C, 0x5C, 0x5A, 0xD8, 0xE4, 0x40, 0x20, 0x2B, 0x03, 0x00, 0x7A, 0xDC, 0x7A, 0xDC, 0xF8, 0xA3,
-        0x25, 0xFF, 0xB0, 0xFF, 0x3F, 0xFC, 0x00, 0xF4, 0x10, 0x62, 0x10, 0x61, 0x57, 0x90, 0x6C, 0x61,
-        0xA1, 0xFF, 0x09, 0x07, 0x02, 0x1D, 0x28, 0x1E, 0x1F, 0x00, 0xCB, 0x83, 0x7A, 0xDC, 0xFE, 0x1C,
-        0xD9, 0x81, 0x22, 0x1E, 0x19, 0x00, 0xCB, 0x83, 0x0E, 0xA3, 0xA7, 0x84, 0xF2, 0xA3, 0x7A, 0xDC,
-        0xFE, 0x1C, 0x03, 0x1D, 0x7C, 0xA8, 0xD9, 0x81, 0x0A, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xA7, 0x84,
-        0x7A, 0x61, 0x7A, 0xDC, 0xFE, 0x1C, 0xF9, 0x1D, 0x7C, 0xA8, 0xD9, 0x81, 0xF6, 0x03, 0xFF, 0xB1,
-        0x0B, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0x02, 0x62, 0xA1, 0xFF, 0xFF, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF,
-        0x6C, 0x44, 0x5A, 0xDA, 0xCD, 0x81, 0x64, 0x40, 0x46, 0x45, 0x28, 0x44, 0x40, 0x2B, 0x0E, 0x00,
-        0x64, 0x40, 0x20, 0x2B, 0x0B, 0x00, 0x01, 0xA2, 0x62, 0x44, 0x46, 0x45, 0x21, 0x46, 0x00, 0xF4,
-        0x02, 0x62, 0x9A, 0xFF, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x7A, 0xDC, 0x01, 0x60, 0x18, 0xE1,
-        0x24, 0x76, 0xAD, 0xE2, 0x41, 0xE1, 0x98, 0xFF, 0x00, 0xE6, 0x01, 0xF2, 0x61, 0x45, 0xD4, 0x9E,
-        0x21, 0x46, 0x16, 0xFA, 0x25, 0x44, 0x06, 0xFA, 0xA1, 0xFF, 0x8C, 0x44, 0xA1, 0xFF, 0x47, 0xFF,
-        0x29, 0x40, 0x50, 0x2B, 0x06, 0x00, 0x2B, 0x44, 0x1C, 0x60, 0x11, 0xFB, 0x70, 0x45, 0x44, 0x8B,
-        0x01, 0x00, 0x50, 0x4B, 0x67, 0x50, 0x69, 0xE2, 0x25, 0x46, 0x01, 0xF2, 0x61, 0x45, 0xD4, 0x9E,
-        0x21, 0x46, 0x16, 0xFA, 0x25, 0x45, 0x86, 0xF8, 0xFF, 0xFF, 0x6A, 0x44, 0x40, 0x2B, 0x03, 0x15,
-        0xAF, 0x60, 0xF3, 0x78, 0xFF, 0xFF, 0x29, 0x40, 0x10, 0x26, 0x04, 0x00, 0x04, 0x74, 0xCD, 0xE2,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x6C, 0x44, 0xB6, 0xFF, 0xB7, 0xFF, 0xC4, 0xE2, 0x01, 0x60, 0x18, 0xE1,
-        0x05, 0x76, 0xAD, 0xE2, 0x41, 0xE1, 0xA1, 0xFF, 0x6C, 0x45, 0xA1, 0xFF, 0x65, 0x41, 0x7F, 0x60,
-        0x7F, 0x7C, 0x6C, 0x44, 0xA0, 0x84, 0x15, 0xA7, 0x15, 0xA4, 0x21, 0x46, 0x26, 0xFA, 0x22, 0x46,
-        0x10, 0xFA, 0x21, 0x46, 0x29, 0x40, 0x40, 0x2B, 0x07, 0x00, 0xB6, 0xFF, 0xA1, 0xFF, 0x40, 0x60,
-        0x00, 0x65, 0x6C, 0x44, 0x1A, 0xFA, 0x09, 0x00, 0x65, 0x44, 0x0F, 0xB4, 0x06, 0xA8, 0x80, 0x60,
-        0x00, 0x65, 0x08, 0x28, 0x7C, 0x45, 0x29, 0x44, 0x34, 0x89, 0x00, 0x64, 0x33, 0xFB, 0x40, 0x21,
-        0x00, 0x00, 0xAC, 0xE2, 0x05, 0xE1, 0x27, 0xF0, 0x65, 0x44, 0x64, 0x5E, 0x27, 0xFA, 0x28, 0x44,
-        0x8F, 0xB0, 0x88, 0x3A, 0x09, 0x00, 0x39, 0xF2, 0xFF, 0xFF, 0x60, 0xB0, 0x20, 0x3A, 0x04, 0x00,
-        0x24, 0x44, 0xFF, 0x60, 0xDF, 0xB4, 0x40, 0x44, 0x28, 0x40, 0x03, 0x26, 0xE2, 0x00, 0x31, 0x40,
-        0x20, 0x2A, 0x03, 0x00, 0x28, 0x40, 0x50, 0x3A, 0xDC, 0x00, 0x24, 0x44, 0x20, 0x2A, 0xD9, 0x00,
-        0x29, 0x40, 0x50, 0x2B, 0x0D, 0x00, 0xEF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x31, 0x40,
-        0x08, 0x2A, 0x06, 0x00, 0x1C, 0x60, 0x11, 0xF3, 0xFF, 0xFF, 0xE0, 0x85, 0x2B, 0x44, 0x06, 0x05,
-        0x2B, 0x44, 0xFF, 0xA4, 0x01, 0xA4, 0x04, 0x24, 0x00, 0x64, 0x40, 0x4B, 0xAC, 0x80, 0x28, 0x40,
-        0xB4, 0x3A, 0x03, 0x00, 0x02, 0x03, 0x30, 0xFB, 0xBC, 0x00, 0x28, 0x44, 0xBF, 0x60, 0xFF, 0x65,
-        0xA4, 0x84, 0x40, 0x48, 0x2B, 0x50, 0xA1, 0xFF, 0xFF, 0xFF, 0x01, 0x60, 0x08, 0xE1, 0x1C, 0xF2,
-        0xC4, 0xE2, 0x40, 0x45, 0x28, 0x40, 0xC4, 0x36, 0x9C, 0x00, 0x29, 0x40, 0x40, 0x2B, 0x48, 0x00,
-        0x32, 0x60, 0xFA, 0x63, 0x60, 0x40, 0x0B, 0x36, 0x20, 0x00, 0x0F, 0x36, 0x1B, 0x00, 0x0A, 0x36,
-        0x16, 0x00, 0x0E, 0x36, 0x11, 0x00, 0x09, 0x36, 0x0C, 0x00, 0x0D, 0x36, 0x07, 0x00, 0x08, 0x36,
-        0x02, 0x00, 0xA3, 0xD3, 0x15, 0x00, 0x02, 0xA3, 0xA3, 0xD3, 0x12, 0x00, 0x04, 0xA3, 0xA3, 0xD3,
-        0x0F, 0x00, 0x06, 0xA3, 0xA3, 0xD3, 0x0C, 0x00, 0x08, 0xA3, 0xA3, 0xD3, 0x09, 0x00, 0x0A, 0xA3,
-        0xA3, 0xD3, 0x06, 0x00, 0x0C, 0xA3, 0xA3, 0xD3, 0x03, 0x00, 0x0E, 0xA3, 0xA3, 0xD3, 0xFF, 0xFF,
-        0x2C, 0x60, 0x7C, 0x63, 0x60, 0x40, 0x0C, 0x36, 0x19, 0x00, 0x08, 0x36, 0x15, 0x00, 0x0D, 0x36,
-        0x11, 0x00, 0x09, 0x36, 0x0D, 0x00, 0x0E, 0x36, 0x09, 0x00, 0x0A, 0x36, 0x05, 0x00, 0x0F, 0x36,
-        0x01, 0x00, 0x39, 0x00, 0x02, 0xA3, 0x37, 0x00, 0x04, 0xA3, 0x35, 0x00, 0x06, 0xA3, 0x33, 0x00,
-        0x08, 0xA3, 0x31, 0x00, 0x0A, 0xA3, 0x2F, 0x00, 0x0C, 0xA3, 0x2D, 0x00, 0x0E, 0xA3, 0x2B, 0x00,
-        0x33, 0x60, 0x0A, 0x63, 0x25, 0x44, 0x0A, 0x36, 0x0C, 0x00, 0x14, 0x36, 0x07, 0x00, 0x37, 0x36,
-        0x02, 0x00, 0xA3, 0xD3, 0x09, 0x00, 0x02, 0xA3, 0xA3, 0xD3, 0x06, 0x00, 0x04, 0xA3, 0xA3, 0xD3,
-        0x03, 0x00, 0x06, 0xA3, 0xA3, 0xD3, 0xFF, 0xFF, 0x40, 0x45, 0x0A, 0x36, 0x0D, 0x00, 0x14, 0x36,
-        0x38, 0x64, 0x37, 0x3A, 0x03, 0x00, 0x04, 0x7F, 0x40, 0x45, 0x15, 0x64, 0x6E, 0x3A, 0x09, 0x00,
-        0x84, 0x7F, 0x40, 0x45, 0x0B, 0x64, 0x05, 0x00, 0x29, 0x44, 0x7F, 0x60, 0xFF, 0xB4, 0x40, 0x49,
-        0x70, 0x64, 0x40, 0x4D, 0x02, 0x00, 0x40, 0x45, 0x0A, 0x00, 0x2C, 0x60, 0x74, 0x63, 0x0A, 0x36,
-        0x06, 0x00, 0x14, 0x36, 0x02, 0xA3, 0x37, 0x36, 0x04, 0xA3, 0x6E, 0x36, 0x06, 0xA3, 0x28, 0xA3,
-        0xA3, 0xD1, 0xD8, 0xA3, 0x19, 0x60, 0x55, 0xF9, 0x39, 0xF1, 0xA3, 0xD1, 0x64, 0x41, 0x64, 0x5E,
-        0x60, 0x45, 0x64, 0x47, 0x1F, 0xB4, 0x54, 0x94, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00,
-        0x01, 0x04, 0x1F, 0x64, 0x60, 0x47, 0xB4, 0x85, 0x29, 0x44, 0xC0, 0x60, 0x00, 0xB4, 0xB4, 0x84,
-        0x1F, 0xFA, 0xB5, 0xFF, 0xA1, 0xFF, 0xCB, 0xF3, 0xC4, 0xE2, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF,
-        0xDC, 0x84, 0xE0, 0x94, 0xFF, 0x60, 0xCF, 0x65, 0x29, 0x44, 0x24, 0x89, 0xA5, 0x60, 0x88, 0x78,
-        0x04, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0xC4, 0xE2, 0xA1, 0xFF, 0xFF, 0x60, 0xCF, 0x65, 0x29, 0x44,
-        0x24, 0x89, 0xCB, 0xF3, 0xC4, 0xE2, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0xDC, 0x84, 0xE0, 0x94,
-        0x26, 0x44, 0x84, 0xBC, 0x24, 0x40, 0x0C, 0x22, 0xFD, 0xB4, 0x40, 0x46, 0x23, 0x64, 0x3A, 0xDB,
-        0xAD, 0x60, 0x4F, 0x78, 0xFF, 0xFF, 0x27, 0x40, 0x26, 0x22, 0x05, 0x00, 0xF8, 0xB4, 0x40, 0x47,
-        0x06, 0x64, 0x31, 0xFB, 0xC0, 0xFE, 0x29, 0x40, 0x10, 0x26, 0x02, 0x00, 0x04, 0x74, 0xCD, 0xE2,
-        0x01, 0x60, 0x18, 0xE1, 0x01, 0x60, 0x18, 0xE1, 0x01, 0x11, 0x12, 0x00, 0x29, 0x44, 0x20, 0xBC,
-        0x40, 0x49, 0x01, 0x64, 0x33, 0xFB, 0xB6, 0xFF, 0x00, 0xE1, 0x01, 0x60, 0x1A, 0xE1, 0xA1, 0xFF,
-        0xFF, 0xFF, 0x6C, 0x40, 0xFC, 0x11, 0x01, 0x60, 0x18, 0xE1, 0xAE, 0x4F, 0xF7, 0xB4, 0xA0, 0x5E,
-        0xB5, 0xFF, 0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B,
-        0x29, 0x40, 0x50, 0x2B, 0x1B, 0x00, 0x31, 0x40, 0x08, 0x2A, 0x0D, 0x00, 0x1C, 0x60, 0x11, 0xF3,
-        0xFF, 0xFF, 0xE0, 0x85, 0x2B, 0x44, 0x07, 0x04, 0x70, 0x45, 0xC4, 0x84, 0xEF, 0x60, 0xFF, 0x65,
-        0x29, 0x44, 0x24, 0x89, 0x11, 0x00, 0x2B, 0x44, 0x70, 0x45, 0xC4, 0x84, 0xFF, 0xFF, 0x04, 0x24,
-        0x00, 0xB4, 0x40, 0x4B, 0xEF, 0x60, 0xFF, 0x65, 0x29, 0x44, 0x24, 0x89, 0x37, 0xF3, 0x2B, 0x45,
-        0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x28, 0x65, 0x44, 0x60, 0x50, 0xA0, 0x4C, 0x20, 0xBC, 0xFF, 0xB4,
-        0xA0, 0x51, 0x00, 0x60, 0x2E, 0x7C, 0x74, 0x44, 0xC0, 0x94, 0x32, 0x40, 0x02, 0x2A, 0x19, 0x00,
-        0x28, 0x44, 0xA4, 0x36, 0x03, 0x00, 0x0C, 0xB4, 0x04, 0x36, 0x13, 0x00, 0x26, 0x43, 0xFD, 0xB3,
-        0x04, 0xBB, 0x43, 0x46, 0x01, 0x2A, 0x03, 0x00, 0x28, 0x47, 0x40, 0xBF, 0x40, 0x48, 0x0A, 0xBB,
-        0x0F, 0xFC, 0x50, 0x4B, 0x67, 0x50, 0x00, 0x64, 0x30, 0xFB, 0x05, 0xFF, 0xAD, 0x60, 0x4F, 0x78,
-        0xFF, 0xFF, 0x24, 0x64, 0x3A, 0xDB, 0x28, 0x44, 0x04, 0x2A, 0x03, 0x00, 0xA3, 0x60, 0xE7, 0x78,
-        0xFF, 0xFF, 0x32, 0x40, 0x04, 0x2A, 0x1C, 0x00, 0x28, 0x44, 0x0C, 0xB0, 0x08, 0x3A, 0x18, 0x00,
-        0x2C, 0xF0, 0x22, 0xF0, 0x64, 0x40, 0x01, 0x26, 0x0B, 0x00, 0x64, 0x40, 0x40, 0x2B, 0x10, 0x00,
-        0x8F, 0xB0, 0x88, 0x3A, 0x0D, 0x00, 0x39, 0xF2, 0xFF, 0xFF, 0x60, 0xB0, 0x20, 0x3A, 0x08, 0x00,
-        0x26, 0x44, 0xFD, 0xB4, 0x04, 0xBC, 0x40, 0x46, 0xFC, 0xB4, 0x0F, 0xFA, 0x05, 0xFF, 0x01, 0x00,
-        0x1D, 0xFF, 0x01, 0xE2, 0x26, 0x40, 0x10, 0x2A, 0x06, 0x00, 0x2C, 0x60, 0xEA, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0xA3, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0x03, 0x0A, 0xA3, 0x60,
-        0xF4, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x51, 0xFB, 0x1B, 0x60, 0xEE, 0xF3, 0xFF, 0xFF, 0x04, 0x18,
-        0xAE, 0x4F, 0x08, 0xBC, 0x00, 0x7F, 0xA0, 0x5E, 0xE1, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E,
-        0x54, 0x62, 0x22, 0x46, 0xA2, 0xD0, 0x16, 0x63, 0x7C, 0x41, 0x44, 0x48, 0x80, 0x36, 0x04, 0x61,
-        0x28, 0x40, 0x50, 0x36, 0x04, 0x61, 0x41, 0x4E, 0x28, 0x44, 0xA4, 0x36, 0x0E, 0x63, 0x9A, 0xFF,
-        0xA1, 0xFF, 0x19, 0x60, 0xA3, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x06, 0x00, 0x3D, 0xF2,
-        0xAA, 0xF0, 0xFF, 0xFF, 0xB4, 0x84, 0x08, 0x36, 0x2A, 0xFA, 0x12, 0x74, 0xCD, 0xE2, 0x54, 0x62,
-        0xA2, 0xD2, 0xFF, 0xFF, 0x6A, 0x40, 0x80, 0x4E, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4,
-        0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0xFF, 0xFF, 0x01, 0x1D, 0xB2, 0x00, 0x7A, 0xD4, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x28, 0x40, 0x03, 0x2B,
-        0x06, 0x00, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x70, 0x62,
-        0x28, 0x44, 0x8F, 0xB0, 0x88, 0x3A, 0x02, 0x00, 0x7A, 0xD4, 0x12, 0x74, 0x28, 0x40, 0x40, 0x2B,
-        0x16, 0x00, 0x72, 0x62, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD2, 0x12, 0x74, 0x80, 0x4C, 0x20, 0x2B,
-        0x05, 0x00, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x22, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x10, 0x26, 0x04, 0x00, 0x26, 0x26, 0x4D, 0x00, 0x26, 0x27, 0x4B, 0x00, 0x23, 0x43,
-        0xFF, 0xFF, 0x06, 0x1D, 0x2E, 0x1E, 0x00, 0x00, 0x03, 0xF0, 0x04, 0xF4, 0x64, 0x42, 0x3D, 0x00,
-        0x2E, 0x40, 0x04, 0x2A, 0x27, 0x00, 0xA1, 0xFF, 0x02, 0xFE, 0x10, 0x25, 0x42, 0xFE, 0x12, 0x74,
-        0x72, 0x45, 0x65, 0x4C, 0xB2, 0xF3, 0x03, 0x04, 0xE4, 0xE2, 0xDC, 0x84, 0xB2, 0xFB, 0xA1, 0xFF,
-        0x12, 0x74, 0x80, 0x4C, 0x12, 0x74, 0xB3, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB3, 0xFB, 0x80, 0x4C,
-        0x12, 0x74, 0xB4, 0xF3, 0x02, 0x04, 0xDC, 0x84, 0xB4, 0xFB, 0x80, 0x4C, 0x12, 0x74, 0x5C, 0x4E,
-        0xF8, 0xA3, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4, 0xFF, 0xB1, 0xF8, 0xA1, 0x06, 0xA4, 0x60, 0x42,
-        0x0A, 0x00, 0x4E, 0x00, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4, 0xC8, 0x82, 0xFF, 0xB1, 0x03, 0x00,
-        0x00, 0xF4, 0x81, 0xF2, 0xFF, 0xB1, 0x7A, 0xD4, 0x12, 0x74, 0xFD, 0x1C, 0xF9, 0x1D, 0xFF, 0xB1,
-        0x1B, 0x1E, 0x02, 0x02, 0x00, 0xF4, 0xDA, 0x82, 0xDA, 0x82, 0xA2, 0xD2, 0xA1, 0xFF, 0x09, 0x74,
-        0x60, 0x4D, 0x12, 0x00, 0x03, 0xF2, 0x9A, 0xF2, 0x04, 0xF4, 0x23, 0x43, 0xA1, 0xFF, 0x12, 0x74,
-        0xA0, 0xD2, 0xFE, 0xA1, 0xCB, 0x83, 0x60, 0x4E, 0xAF, 0x83, 0x03, 0x1D, 0x05, 0x03, 0x12, 0x74,
-        0xEB, 0x01, 0xA1, 0xFF, 0x12, 0x74, 0xDF, 0x01, 0x12, 0x74, 0xDA, 0x83, 0x66, 0x44, 0x22, 0x46,
-        0x0C, 0xFA, 0x22, 0xF2, 0x0B, 0xFC, 0x28, 0x40, 0x40, 0x2B, 0x1A, 0x00, 0x10, 0x26, 0x04, 0x00,
-        0x26, 0x26, 0x0F, 0x00, 0x26, 0x27, 0x0D, 0x00, 0x00, 0xF4, 0x02, 0x62, 0xA1, 0xFF, 0x12, 0x74,
-        0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74, 0x7A, 0xD4, 0x12, 0x74,
-        0x07, 0x00, 0xA1, 0xFF, 0x12, 0x74, 0x9C, 0x4E, 0x12, 0x74, 0x9C, 0x4C, 0x12, 0x74, 0x00, 0x00,
-        0x88, 0xFF, 0xA1, 0xFF, 0xB2, 0x60, 0x58, 0x4F, 0x2D, 0x78, 0xFF, 0xFF, 0x01, 0x60, 0x18, 0xE1,
-        0x78, 0x44, 0x02, 0xA4, 0x35, 0xFB, 0xCC, 0x00, 0x29, 0x44, 0xF7, 0xB4, 0x40, 0x49, 0x34, 0x64,
-        0x3A, 0xDB, 0x44, 0xE1, 0xA5, 0x60, 0x54, 0x78, 0xFF, 0xFF, 0x00, 0x6B, 0xBC, 0xFF, 0x15, 0xF3,
-        0xFF, 0xFF, 0xDC, 0x84, 0x15, 0xFB, 0x78, 0x5C, 0x07, 0x00, 0x78, 0x5C, 0x2F, 0x00, 0x62, 0xFF,
-        0xFF, 0xFF, 0xA1, 0xFF, 0x98, 0xFF, 0x80, 0x3E, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60, 0x84, 0xE7,
-        0xA1, 0xF3, 0x40, 0x60, 0x60, 0x40, 0x01, 0x23, 0x48, 0x60, 0x5E, 0x65, 0x80, 0x60, 0x00, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60,
-        0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x80, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x01, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x64, 0x58, 0xFF, 0xFF, 0x80, 0x60, 0x01, 0xE0,
-        0xD5, 0x60, 0x84, 0xE7, 0xA1, 0xF3, 0x7C, 0x45, 0x60, 0x40, 0x01, 0x23, 0x02, 0x65, 0x8C, 0x60,
-        0x48, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x00, 0x60, 0x7F, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x48, 0x60, 0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x40, 0x60, 0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x8C, 0x60, 0x48, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60,
-        0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x64, 0x58, 0xFF, 0xFF, 0x12, 0x74, 0x6A, 0x40, 0x87, 0x4F,
-        0x12, 0x74, 0x87, 0x4C, 0x12, 0x74, 0x29, 0x40, 0x40, 0x2B, 0x08, 0x00, 0x0A, 0x64, 0x89, 0xFF,
-        0x60, 0x54, 0x88, 0xFF, 0x87, 0x4D, 0x12, 0x74, 0x87, 0x4D, 0x09, 0x00, 0x03, 0x64, 0x89, 0xFF,
-        0x60, 0x54, 0x88, 0xFF, 0x87, 0x4F, 0x12, 0x74, 0x87, 0x4D, 0x12, 0x74, 0x87, 0x4D, 0x7C, 0x44,
-        0x01, 0x08, 0x01, 0x00, 0x67, 0x44, 0x12, 0x74, 0x87, 0x4C, 0x12, 0x74, 0x87, 0x4C, 0x12, 0x74,
-        0x87, 0x4C, 0x12, 0x74, 0x87, 0x4D, 0x12, 0x74, 0x87, 0x4D, 0x12, 0x74, 0x87, 0x4D, 0x12, 0x74,
-        0x04, 0x21, 0x04, 0x00, 0xFF, 0x2A, 0x01, 0x00, 0x04, 0x00, 0x03, 0x00, 0xFF, 0x2A, 0x0D, 0x00,
-        0x0C, 0x00, 0xBC, 0xFF, 0x61, 0xFF, 0x78, 0x5C, 0x57, 0x01, 0x78, 0x5C, 0x7F, 0x01, 0xB6, 0xFF,
-        0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0x6A, 0x44, 0x2F, 0x58, 0xFF, 0xFF,
-        0x04, 0x74, 0xC4, 0xE2, 0x04, 0xE1, 0x29, 0x40, 0x40, 0x2B, 0x05, 0x00, 0xA1, 0xFF, 0xFF, 0xFF,
-        0xBC, 0xFF, 0x14, 0x74, 0x01, 0x00, 0x04, 0x74, 0xC4, 0xE2, 0x04, 0xE1, 0xBC, 0xFF, 0xB5, 0xFF,
-        0x47, 0xFF, 0xB6, 0xFF, 0xB7, 0xFF, 0xB4, 0xFF, 0xC8, 0x60, 0x09, 0x7D, 0x7C, 0x4B, 0x29, 0x40,
-        0x40, 0x27, 0x04, 0x00, 0xC2, 0x60, 0x58, 0x4F, 0xBA, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0x29, 0x40,
-        0x10, 0x26, 0x6D, 0x00, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60, 0x84, 0xE7, 0xA1, 0xF3, 0x40, 0x60,
-        0x60, 0x40, 0x01, 0x23, 0x48, 0x60, 0x5E, 0x65, 0x80, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16,
-        0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x80, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x01, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x95, 0x60, 0x84, 0xE7, 0x80, 0x60, 0x01, 0xE0, 0xD5, 0x60, 0x84, 0xE7, 0xA1, 0xF3, 0x7C, 0x45,
-        0x60, 0x40, 0x01, 0x23, 0x02, 0x65, 0x8C, 0x60, 0x48, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x7F, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x48, 0x60,
-        0x08, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x84, 0x60, 0x04, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x40, 0x60, 0x08, 0x6A, 0xFF, 0xFF,
-        0x01, 0x16, 0xFE, 0x01, 0x65, 0x4A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x8C, 0x60, 0x48, 0x6A,
-        0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01,
-        0x00, 0x60, 0x00, 0x6A, 0xFF, 0xFF, 0x01, 0x16, 0xFE, 0x01, 0x95, 0x60, 0x84, 0xE7, 0x01, 0x60,
-        0x08, 0xE1, 0xFF, 0xFF, 0xC4, 0xE2, 0x29, 0x40, 0x40, 0x2B, 0x04, 0x00, 0xC2, 0x60, 0x58, 0x4F,
-        0xBA, 0x78, 0xFF, 0xFF, 0xC2, 0x60, 0x58, 0x4F, 0xC5, 0x78, 0xFF, 0xFF, 0xA1, 0xFF, 0xCB, 0xF3,
-        0xC4, 0xE2, 0x89, 0xFF, 0x60, 0x54, 0x88, 0xFF, 0xDC, 0x84, 0xE0, 0x94, 0x35, 0xF7, 0xFF, 0xFF,
-        0xFF, 0xFF, 0xFF, 0x01, 0x10, 0x61, 0x7F, 0x60, 0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67, 0x02, 0x63,
-        0x25, 0x02, 0x98, 0xFE, 0x19, 0x05, 0x12, 0x60, 0xFC, 0xF5, 0x0E, 0xF2, 0x15, 0x18, 0x02, 0x18,
-        0x09, 0xF4, 0xFB, 0x01, 0x23, 0x44, 0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02, 0x66, 0x44, 0x11, 0xFB,
-        0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x28, 0xB9, 0x10, 0x7E,
-        0x00, 0x7F, 0x0E, 0xFA, 0x00, 0x67, 0x0A, 0x00, 0x20, 0x44, 0xDC, 0x85, 0x0F, 0xB4, 0xFB, 0xA0,
-        0x7F, 0x67, 0x07, 0x63, 0x03, 0x05, 0x45, 0x40, 0x00, 0x67, 0xD8, 0xFE, 0xFF, 0x27, 0x05, 0xFD,
-        0x0A, 0x7E, 0x04, 0xFB, 0x61, 0x55, 0x48, 0x00, 0x28, 0xFB, 0x01, 0xF3, 0x29, 0xFB, 0x44, 0x46,
-        0x40, 0x45, 0x10, 0x61, 0x7E, 0x60, 0xC0, 0x64, 0xA0, 0x80, 0x7F, 0x67, 0x02, 0x63, 0x30, 0x02,
-        0xB5, 0x60, 0x58, 0x4F, 0xCE, 0x78, 0xFF, 0xFF, 0x7F, 0x67, 0x03, 0x63, 0x29, 0x02, 0x26, 0x40,
-        0x01, 0x2B, 0x23, 0x00, 0x98, 0xFE, 0x18, 0x05, 0x12, 0x60, 0xFC, 0xF5, 0x0E, 0xF2, 0x14, 0x18,
-        0x02, 0x18, 0x09, 0xF4, 0xFB, 0x01, 0x23, 0x44, 0x00, 0xA8, 0x08, 0x7E, 0x0A, 0x02, 0x66, 0x44,
-        0x11, 0xFB, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x08, 0xB9,
-        0x10, 0x7E, 0x00, 0x7F, 0x0E, 0xFA, 0x09, 0x00, 0x20, 0x44, 0xDC, 0x85, 0x0F, 0xB4, 0xFB, 0xA0,
-        0x7F, 0x67, 0x07, 0x63, 0x05, 0x05, 0x45, 0x40, 0xD8, 0xFE, 0x00, 0x67, 0xD0, 0xFE, 0xD9, 0xFE,
-        0xFF, 0x27, 0x05, 0xFD, 0x0B, 0x7E, 0x04, 0xFB, 0x0E, 0x60, 0xDD, 0xF3, 0xFF, 0xFF, 0x20, 0xB0,
-        0x80, 0xBC, 0x08, 0x28, 0xA2, 0xDB, 0x61, 0x55, 0x66, 0x00, 0x04, 0xB5, 0x82, 0xB5, 0x25, 0x02,
-        0x04, 0x03, 0x20, 0x44, 0x7F, 0xB4, 0x40, 0x40, 0xA3, 0xD3, 0x99, 0xFE, 0x04, 0x04, 0x02, 0xBC,
-        0xFE, 0xB4, 0xA3, 0xDB, 0x59, 0x00, 0xDB, 0xF3, 0x20, 0x40, 0x80, 0x26, 0x55, 0x00, 0xA3, 0xD3,
-        0xFF, 0xA0, 0xF8, 0xB4, 0x02, 0x02, 0xA3, 0xDB, 0x1C, 0x00, 0x04, 0xBC, 0xBF, 0xB4, 0xA3, 0xDB,
-        0x08, 0xB0, 0x01, 0x64, 0x08, 0x24, 0x02, 0x64, 0x28, 0xFB, 0x20, 0x44, 0x80, 0xBC, 0x40, 0x40,
-        0xD0, 0xFE, 0x42, 0x00, 0xBF, 0xB4, 0xA3, 0xDB, 0x3F, 0x00, 0x40, 0xB0, 0xFF, 0xFF, 0xFA, 0x02,
-        0xF8, 0xB4, 0xA3, 0xDB, 0x08, 0xB5, 0x07, 0x7C, 0x01, 0x02, 0xDB, 0xF9, 0x20, 0x44, 0x7F, 0xB4,
-        0x40, 0x40, 0x1D, 0x60, 0xBA, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB5, 0x07, 0xB5, 0x08, 0x28,
-        0xC4, 0x02, 0x99, 0xFE, 0x29, 0x05, 0x20, 0x44, 0x80, 0x26, 0x26, 0x00, 0x20, 0x2A, 0x03, 0x00,
-        0xDF, 0xB4, 0x40, 0x40, 0x74, 0x00, 0x40, 0x2A, 0x1F, 0x00, 0xBF, 0xB4, 0x40, 0x40, 0x09, 0x00,
-        0xA8, 0xFF, 0x20, 0x44, 0x99, 0xFE, 0x02, 0x05, 0x80, 0x2A, 0x03, 0x00, 0x40, 0xBC, 0x40, 0x40,
-        0x13, 0x00, 0x00, 0xF1, 0x80, 0xBC, 0x40, 0x40, 0x64, 0x44, 0xE0, 0x84, 0xE8, 0x84, 0x0A, 0x36,
-        0x29, 0x01, 0x0B, 0x36, 0x59, 0x01, 0x28, 0xFB, 0x01, 0xF1, 0x29, 0xF9, 0x02, 0xF1, 0x2A, 0xF9,
-        0x03, 0xF1, 0x2B, 0xF9, 0xD0, 0xFE, 0xAE, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x82, 0x3E, 0x75, 0x44,
-        0x02, 0xB0, 0x01, 0xB0, 0x54, 0x02, 0xDC, 0x02, 0x04, 0xB0, 0x08, 0xB0, 0x10, 0x02, 0x2A, 0x02,
-        0x40, 0x26, 0xA7, 0xFF, 0x8C, 0xFF, 0x75, 0x40, 0x80, 0x2B, 0x06, 0x00, 0xAB, 0xFF, 0x19, 0x60,
-        0xF6, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xA2, 0xDB, 0x75, 0x44, 0x8D, 0xFF, 0xE5, 0x01, 0x0A, 0xF3,
-        0xAA, 0xFF, 0x60, 0x40, 0x20, 0x2B, 0x02, 0x00, 0x38, 0xFF, 0x0D, 0x00, 0x01, 0x26, 0x0C, 0x00,
-        0xC0, 0x60, 0x00, 0x7C, 0xA0, 0x84, 0x80, 0x3B, 0x02, 0x00, 0xC0, 0x67, 0x03, 0x00, 0x40, 0x3B,
-        0x02, 0x00, 0x00, 0x67, 0x0A, 0xFB, 0xD0, 0x01, 0x19, 0x60, 0xF6, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4,
-        0xA2, 0xDB, 0xCA, 0x01, 0x0B, 0xF1, 0xAB, 0xFF, 0x64, 0x44, 0xFF, 0x27, 0x1F, 0x00, 0x20, 0x26,
-        0x03, 0x00, 0x02, 0x60, 0x00, 0x75, 0x1A, 0x00, 0x19, 0xF3, 0xFF, 0xFF, 0x03, 0x1B, 0x04, 0x60,
-        0x00, 0x75, 0x0A, 0x64, 0xCC, 0x84, 0x19, 0xFB, 0x01, 0x60, 0x00, 0x75, 0x64, 0x40, 0x03, 0x22,
-        0x0D, 0x00, 0x20, 0x44, 0x80, 0x2A, 0x03, 0x00, 0x20, 0xBC, 0x40, 0x40, 0x07, 0x00, 0xD9, 0xFE,
-        0x81, 0x60, 0x0B, 0x64, 0x28, 0xFB, 0x2C, 0x44, 0x29, 0xFB, 0xD0, 0xFE, 0xA5, 0x01, 0xA9, 0xFF,
-        0x77, 0x44, 0x60, 0x57, 0x40, 0x4A, 0x01, 0x2A, 0x31, 0x00, 0x24, 0x44, 0xAC, 0x86, 0x08, 0xF2,
-        0x2D, 0x03, 0x25, 0x60, 0xFE, 0x65, 0xD4, 0x80, 0x0E, 0xF2, 0x02, 0x03, 0xA5, 0xD5, 0x04, 0x00,
-        0x01, 0xBC, 0x0E, 0xFA, 0x09, 0xF4, 0xD1, 0xFE, 0x46, 0x44, 0x11, 0x1B, 0x32, 0x40, 0x80, 0x2A,
-        0x1D, 0x00, 0x9D, 0xFE, 0x1B, 0x05, 0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x03, 0x03, 0x0F, 0xF2, 0xFF, 0xFF, 0x12, 0x1B, 0x08, 0x60, 0x00, 0x75, 0x0F, 0x00, 0x3F, 0xF2,
-        0x48, 0x65, 0xC4, 0x84, 0x13, 0xFB, 0x66, 0x44, 0x10, 0xFB, 0x66, 0x47, 0x20, 0xBF, 0x3B, 0x42,
-        0x04, 0xA2, 0xA2, 0xDB, 0x0E, 0xF2, 0x41, 0x75, 0x10, 0xBC, 0x0E, 0xFA, 0x2A, 0x44, 0x08, 0x2A,
-        0x17, 0x00, 0x23, 0x44, 0x00, 0xA8, 0x5C, 0x43, 0x13, 0x03, 0x12, 0x60, 0xFC, 0xF5, 0x01, 0x00,
-        0x09, 0xF4, 0x0E, 0xF2, 0x0D, 0x18, 0x08, 0xB0, 0x18, 0xAC, 0xFA, 0x03, 0x0E, 0xFA, 0x66, 0x43,
-        0x11, 0xFD, 0x46, 0x43, 0x23, 0x47, 0x80, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x28, 0x75,
-        0x2A, 0x44, 0x06, 0x22, 0x2D, 0x00, 0x22, 0x44, 0x00, 0xA8, 0x60, 0x46, 0x0E, 0xF2, 0x28, 0x03,
-        0x10, 0xB0, 0x01, 0xBC, 0x03, 0x02, 0x00, 0x64, 0x40, 0x42, 0x22, 0x00, 0x0E, 0xFA, 0xD1, 0xFE,
-        0x25, 0x60, 0xF2, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x94, 0x00, 0x46, 0x42, 0x19, 0x02, 0x22, 0x47,
-        0x40, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x23, 0xF2, 0x66, 0x43, 0x00, 0xA8, 0x0E, 0xF2,
-        0x08, 0x02, 0x60, 0x40, 0x02, 0x2A, 0xE4, 0x01, 0x12, 0xFD, 0x10, 0x64, 0x0E, 0xFA, 0x02, 0x75,
-        0x07, 0x00, 0x60, 0x40, 0x04, 0x2A, 0xDC, 0x01, 0x12, 0xFD, 0x10, 0x64, 0x0E, 0xFA, 0x04, 0x75,
-        0x2A, 0x44, 0x80, 0x2A, 0x19, 0x00, 0x21, 0x44, 0xAC, 0x86, 0x0E, 0xF2, 0x15, 0x03, 0x01, 0xBC,
-        0x0E, 0xFA, 0xD1, 0xFE, 0x26, 0x60, 0x0A, 0x64, 0x40, 0x47, 0x58, 0x4F, 0x6A, 0x00, 0x46, 0x41,
-        0x0B, 0x02, 0x21, 0x47, 0x10, 0xBF, 0x3B, 0x42, 0x04, 0xA2, 0xA2, 0xDB, 0x0E, 0xF2, 0x66, 0x43,
-        0x08, 0xFD, 0x10, 0xBC, 0x0E, 0xFA, 0x80, 0x75, 0x2A, 0x44, 0x10, 0xB0, 0x20, 0x44, 0x18, 0x03,
-        0x7F, 0xB4, 0x40, 0x40, 0x1D, 0x60, 0xBA, 0x63, 0xA3, 0xD3, 0xFF, 0xFF, 0x20, 0xB0, 0x80, 0xB0,
-        0x09, 0x03, 0x08, 0x03, 0x40, 0xBC, 0x7F, 0xB4, 0x04, 0xB0, 0xA3, 0xDB, 0x03, 0x03, 0x20, 0x44,
-        0x80, 0xBC, 0x40, 0x40, 0x2A, 0x40, 0x08, 0x27, 0x03, 0x00, 0xB3, 0x60, 0xC9, 0x78, 0xFF, 0xFF,
-        0x2A, 0x40, 0x08, 0x2B, 0x0F, 0x00, 0x32, 0x40, 0x80, 0x26, 0x05, 0x00, 0x19, 0x60, 0xF7, 0xF3,
-        0xFF, 0xFF, 0x01, 0x1B, 0x07, 0x00, 0x19, 0x60, 0xF6, 0xF3, 0xFF, 0xFF, 0x01, 0xBC, 0xA2, 0xDB,
-        0xFF, 0xFF, 0x10, 0xFF, 0xB3, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0xE8, 0xFE, 0x14, 0x05, 0xEA, 0xFE,
-        0x23, 0x05, 0xE9, 0xFE, 0x1C, 0x05, 0xE7, 0xFE, 0x09, 0x05, 0x47, 0xFF, 0x20, 0x44, 0x0F, 0x22,
-        0x03, 0x00, 0xCC, 0x84, 0x40, 0x40, 0x0F, 0x22, 0xB8, 0xFE, 0xEC, 0x01, 0x23, 0x41, 0x00, 0xB9,
-        0x5C, 0x4A, 0xE8, 0x02, 0x5A, 0x01, 0x24, 0x41, 0x00, 0xB9, 0x25, 0x60, 0xFE, 0x65, 0x45, 0x47,
-        0xE1, 0x02, 0x58, 0x4F, 0x0E, 0x00, 0xDE, 0x02, 0x5C, 0x4A, 0x46, 0x44, 0x38, 0x01, 0x22, 0x41,
-        0x00, 0xB9, 0x5C, 0x4A, 0xD7, 0x02, 0x6C, 0x01, 0x21, 0x41, 0x00, 0xB9, 0x5C, 0x4A, 0x92, 0x03,
-        0xD1, 0x01, 0x27, 0xD3, 0x03, 0x00, 0x10, 0xB0, 0x09, 0xF2, 0x04, 0x03, 0xAC, 0x86, 0x0E, 0xF2,
-        0xFA, 0x02, 0x08, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x0E, 0xF3, 0x0F, 0x60, 0xFE, 0x65, 0x0C, 0xF3,
-        0x24, 0x86, 0x24, 0x46, 0x60, 0x40, 0xFB, 0x3B, 0x07, 0x00, 0x80, 0x26, 0x02, 0x00, 0x23, 0x46,
-        0x03, 0x4C, 0x46, 0x61, 0x3A, 0x65, 0x0C, 0x00, 0x2E, 0xF3, 0x40, 0x45, 0xF8, 0x2B, 0x02, 0x00,
-        0x40, 0x45, 0x03, 0x00, 0x58, 0x4F, 0x5A, 0x00, 0x07, 0x02, 0x58, 0x4F, 0x66, 0x00, 0x04, 0x05,
-        0x66, 0x50, 0x65, 0x52, 0x61, 0x51, 0x09, 0x00, 0x26, 0x47, 0x00, 0xBF, 0x0E, 0xFB, 0x2E, 0xF5,
-        0x05, 0xF0, 0x80, 0x60, 0x64, 0x50, 0x00, 0x72, 0x7E, 0x71, 0xAC, 0xFF, 0x31, 0x40, 0x01, 0x2A,
-        0x08, 0x00, 0x19, 0x60, 0xF2, 0xF3, 0xFF, 0xFF, 0x04, 0x18, 0x0C, 0x64, 0x13, 0x60, 0x13, 0xFB,
-        0x2D, 0xFF, 0xB3, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0x8E, 0xFF, 0x0F, 0xF3, 0x0F, 0x60, 0xFE, 0x65,
-        0x24, 0x86, 0x0D, 0xF3, 0x24, 0x46, 0x60, 0x40, 0xFB, 0x3B, 0x07, 0x00, 0x80, 0x26, 0x02, 0x00,
-        0x23, 0x46, 0x03, 0x4C, 0x46, 0x61, 0x3A, 0x65, 0x0C, 0x00, 0x2E, 0xF3, 0x40, 0x45, 0xF8, 0x2B,
-        0x02, 0x00, 0x40, 0x45, 0x03, 0x00, 0x58, 0x4F, 0x21, 0x00, 0x07, 0x02, 0x58, 0x4F, 0x2D, 0x00,
-        0x04, 0x05, 0x66, 0x50, 0x65, 0x52, 0x61, 0x51, 0x09, 0x00, 0x26, 0x47, 0x00, 0xBF, 0x0F, 0xFB,
-        0x2E, 0xF5, 0x05, 0xF0, 0x80, 0x60, 0x64, 0x50, 0x00, 0x72, 0x7E, 0x71, 0x8D, 0xFF, 0xAD, 0xFF,
-        0x31, 0x40, 0x01, 0x2A, 0xCE, 0x01, 0x19, 0x60, 0xF2, 0xF3, 0xFF, 0xFF, 0x04, 0x18, 0x0C, 0x64,
-        0x13, 0x60, 0x13, 0xFB, 0x2D, 0xFF, 0xB3, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0x25, 0x44, 0xA7, 0xF1,
-        0xA8, 0xF1, 0xD0, 0x80, 0xD0, 0x80, 0x07, 0x04, 0x01, 0x06, 0x05, 0x00, 0x25, 0x46, 0x01, 0xF0,
-        0x03, 0x67, 0xA0, 0x85, 0x94, 0x80, 0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x46, 0x26, 0x41, 0x46, 0x63,
-        0x01, 0xF2, 0xFF, 0xFF, 0xFF, 0xB5, 0xD5, 0x81, 0x00, 0xF2, 0x05, 0x04, 0x04, 0x63, 0x60, 0x46,
-        0xF7, 0x1B, 0x42, 0xFE, 0x0D, 0x00, 0x61, 0x44, 0xC5, 0x81, 0x63, 0x45, 0xC5, 0x81, 0x9C, 0x84,
-        0xDC, 0x84, 0x01, 0xF2, 0xF0, 0x85, 0xF0, 0x80, 0x65, 0x44, 0xF8, 0x85, 0xFF, 0xFF, 0x02, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xA2, 0xFF, 0x13, 0x60, 0x08, 0xF3, 0xFF, 0xFF, 0xAC, 0x86, 0x0E, 0xF2,
-        0x07, 0x03, 0x00, 0xA8, 0x09, 0xF2, 0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA, 0x08, 0xFE, 0x17, 0x00,
-        0xA9, 0xF3, 0xFF, 0xFF, 0xD8, 0xA0, 0x00, 0xB4, 0x12, 0x06, 0x09, 0x60, 0x08, 0x61, 0x41, 0x4A,
-        0x7C, 0xA1, 0x0E, 0xA1, 0xA2, 0xFF, 0xB6, 0x60, 0x58, 0x4E, 0x44, 0x78, 0xFF, 0xFF, 0xA3, 0xFF,
-        0x06, 0x03, 0x2A, 0x43, 0xB6, 0x60, 0x58, 0x4E, 0x65, 0x78, 0xFF, 0xFF, 0x08, 0xFE, 0xA3, 0xFF,
-        0x2D, 0x58, 0xFF, 0xFF, 0x41, 0x4A, 0x42, 0xA1, 0x03, 0x00, 0x41, 0x4A, 0x7C, 0xA1, 0x0E, 0xA1,
-        0xA2, 0xFF, 0xB6, 0x60, 0x58, 0x4E, 0x44, 0x78, 0xFF, 0xFF, 0x07, 0x03, 0x2A, 0x43, 0xB6, 0x60,
-        0x58, 0x4E, 0x65, 0x78, 0xFF, 0xFF, 0x08, 0xFE, 0x0C, 0x00, 0x13, 0x60, 0x08, 0xF3, 0xFF, 0xFF,
-        0xAC, 0x86, 0x0E, 0xF2, 0x06, 0x03, 0x00, 0xA8, 0x09, 0xF2, 0xFA, 0x02, 0x01, 0x67, 0x0E, 0xFA,
-        0x08, 0xFE, 0xA3, 0xFF, 0x2D, 0x58, 0xFF, 0xFF, 0xAA, 0xF3, 0x7C, 0x63, 0x00, 0xBE, 0x40, 0x45,
-        0x1A, 0x03, 0x00, 0x65, 0x65, 0x44, 0xDC, 0x85, 0x84, 0xA1, 0x00, 0xF2, 0x06, 0x06, 0x01, 0xFC,
-        0x00, 0xA8, 0x60, 0x46, 0xF7, 0x02, 0x40, 0x45, 0x0E, 0x00, 0xA9, 0xF3, 0x00, 0x63, 0xD4, 0x84,
-        0xA9, 0xFB, 0x80, 0x60, 0x7C, 0x64, 0x01, 0xFA, 0x00, 0xF0, 0x00, 0xFC, 0xD3, 0x80, 0xAA, 0xF9,
-        0x02, 0x02, 0xAB, 0xF9, 0x08, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x66, 0x44, 0x25, 0x46, 0x05, 0xFA,
-        0x06, 0xFA, 0x01, 0xF0, 0x03, 0x67, 0x02, 0xFC, 0xB0, 0x84, 0x3A, 0x7E, 0x01, 0xFA, 0x12, 0x64,
-        0x03, 0xFA, 0x00, 0xF0, 0x04, 0xF8, 0x00, 0x64, 0x0C, 0x61, 0x10, 0x63, 0x59, 0xDA, 0xFE, 0x1F,
-        0x2E, 0x58, 0xFF, 0xFF, 0x27, 0x43, 0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05, 0x16, 0x03, 0x00, 0x61,
-        0x01, 0x00, 0xEC, 0x63, 0x61, 0x46, 0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84, 0xA2, 0xDA, 0xBE, 0xD2,
-        0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B, 0x25, 0x44, 0x61, 0x46, 0xA3, 0xDA, 0x04, 0x00, 0x0A, 0xFA,
-        0x60, 0x46, 0x25, 0x44, 0x09, 0xFA, 0x61, 0x46, 0xBE, 0xDA, 0x2F, 0x58, 0xFF, 0xFF, 0x25, 0x44,
-        0x00, 0xA8, 0x07, 0x4B, 0x0C, 0x03, 0x58, 0x4F, 0x33, 0x00, 0x0B, 0x47, 0x26, 0x60, 0x04, 0x65,
-        0x27, 0x44, 0xD4, 0x80, 0x00, 0x64, 0x01, 0x02, 0x0F, 0xFA, 0x58, 0x4F, 0xD3, 0x01, 0x70, 0x00,
-        0x25, 0x43, 0xE3, 0x84, 0x7C, 0x41, 0x02, 0x04, 0xE8, 0x81, 0xEC, 0x63, 0x61, 0x46, 0xA3, 0xD2,
-        0x00, 0x7C, 0x40, 0x45, 0xBF, 0xD8, 0xA3, 0xD8, 0xBE, 0xD8, 0x27, 0x42, 0x5A, 0xD3, 0x25, 0x5C,
-        0x60, 0x41, 0x02, 0x1B, 0x27, 0xD9, 0x05, 0x00, 0x25, 0x46, 0x0A, 0xFA, 0x61, 0x46, 0x25, 0x44,
-        0x09, 0xFA, 0x25, 0x44, 0x27, 0x43, 0x00, 0x61, 0x60, 0x46, 0x09, 0xF2, 0x08, 0xFC, 0x00, 0xA8,
-        0xDD, 0x81, 0xFA, 0x02, 0xBF, 0xD1, 0x66, 0x44, 0xBE, 0xDB, 0xC1, 0x84, 0xBF, 0xDB, 0x48, 0x00,
-        0x25, 0x46, 0xEC, 0x63, 0x08, 0xF2, 0x89, 0xF2, 0x1E, 0x18, 0x40, 0x47, 0xE0, 0x84, 0xE8, 0x85,
-        0x02, 0x05, 0xE8, 0x83, 0x00, 0x65, 0x65, 0x46, 0xBF, 0xD2, 0x61, 0x5C, 0xCC, 0x84, 0xA2, 0xDA,
-        0x25, 0x46, 0x0A, 0xF2, 0x00, 0xB9, 0x65, 0x46, 0x08, 0x24, 0xBE, 0xDA, 0x02, 0x1B, 0xA3, 0xD8,
-        0x02, 0x00, 0x60, 0x46, 0x89, 0xFA, 0x00, 0xB9, 0x61, 0x46, 0x08, 0x28, 0x0A, 0xFA, 0x25, 0x46,
-        0x89, 0xFC, 0x8A, 0xFC, 0x88, 0xFC, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x61, 0x28, 0x65, 0x25, 0x43,
-        0xAB, 0xF3, 0xAF, 0x83, 0x00, 0xBE, 0x18, 0x03, 0x02, 0x03, 0x00, 0xFC, 0x01, 0x00, 0xAA, 0xFD,
-        0x63, 0x46, 0x65, 0x44, 0xCC, 0x85, 0x00, 0xF2, 0x07, 0x02, 0xAB, 0xF5, 0x00, 0x64, 0x00, 0xFA,
-        0xDE, 0x60, 0xAF, 0x64, 0x09, 0xFB, 0x08, 0x00, 0x66, 0x43, 0x00, 0xBE, 0xDD, 0x81, 0xF1, 0x02,
-        0xA9, 0xF1, 0xAB, 0xFD, 0xC1, 0x84, 0xA9, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x45,
-        0x29, 0x43, 0xFC, 0xA3, 0x66, 0x44, 0xBD, 0xDB, 0x25, 0x44, 0xBD, 0xDB, 0x00, 0x64, 0xBD, 0xDB,
-        0x03, 0x61, 0x0E, 0x65, 0x26, 0x60, 0x18, 0x63, 0x43, 0x49, 0xA3, 0xD3, 0x06, 0xA3, 0x00, 0xA8,
-        0xCD, 0x81, 0x04, 0x02, 0xF9, 0x02, 0xB3, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0x01, 0x26, 0xE6, 0x01,
-        0xD4, 0x80, 0x60, 0x45, 0xE3, 0x05, 0xF6, 0xA3, 0xBD, 0xD1, 0xBD, 0xD1, 0x44, 0x47, 0x44, 0x48,
-        0x44, 0x45, 0x26, 0x60, 0x5A, 0x64, 0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x25, 0x60, 0xC8, 0x63,
-        0x0D, 0x65, 0x00, 0x61, 0x41, 0x48, 0xA3, 0xD3, 0x06, 0xA3, 0xAC, 0x86, 0x00, 0x61, 0x09, 0x03,
-        0x00, 0xF2, 0x09, 0xF0, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x64, 0x44, 0xAC, 0x86,
-        0xF6, 0x01, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x65, 0x44, 0x28, 0x45, 0x45, 0x88, 0xCC, 0x85,
-        0x5A, 0x87, 0xE9, 0x02, 0x00, 0x64, 0x27, 0xDA, 0x5A, 0xDA, 0x5A, 0x87, 0xA6, 0xF3, 0xA5, 0xF1,
-        0x02, 0xA4, 0x60, 0x46, 0x60, 0x45, 0x00, 0x61, 0x22, 0xF2, 0xFF, 0xFF, 0xAC, 0x86, 0x00, 0xF2,
-        0x04, 0x03, 0xAC, 0x86, 0x00, 0xF2, 0xDD, 0x81, 0xFC, 0x02, 0x65, 0x44, 0x02, 0xA5, 0x65, 0x46,
-        0x64, 0x44, 0xCC, 0x9C, 0xFF, 0xFF, 0xF0, 0x02, 0x61, 0x44, 0x25, 0x46, 0x27, 0xDA, 0x5A, 0x87,
-        0x28, 0x45, 0x45, 0x88, 0x00, 0x64, 0x27, 0xDA, 0x5A, 0x87, 0x06, 0x60, 0x40, 0x65, 0xAA, 0xF3,
-        0x01, 0x61, 0xAC, 0x86, 0x00, 0xF2, 0x03, 0x03, 0xD5, 0x80, 0xDD, 0x81, 0xFA, 0x04, 0xCD, 0x84,
-        0x25, 0x46, 0x27, 0xDA, 0x28, 0x45, 0xC4, 0x84, 0x5A, 0xDA, 0xDA, 0x81, 0xA9, 0xF1, 0x59, 0xD8,
-        0x25, 0x60, 0xC6, 0x64, 0x18, 0x63, 0xA0, 0xD1, 0x06, 0xA4, 0x59, 0xD8, 0xFC, 0x1F, 0x00, 0x64,
-        0x59, 0xDA, 0x59, 0xDA, 0x01, 0x60, 0x56, 0x64, 0x0A, 0x63, 0x58, 0xD1, 0x59, 0xD8, 0xFD, 0x1F,
-        0xDB, 0xF1, 0x59, 0xD8, 0x75, 0x01, 0x07, 0x4B, 0xB6, 0x60, 0x58, 0x4F, 0xD0, 0x78, 0xFF, 0xFF,
-        0x0B, 0x47, 0x58, 0x4F, 0x21, 0x00, 0x6C, 0x01, 0x07, 0x4B, 0xB6, 0x60, 0x58, 0x4F, 0xD0, 0x78,
-        0xFF, 0xFF, 0x0B, 0x47, 0x27, 0x44, 0x00, 0xBE, 0x08, 0xF0, 0x15, 0x03, 0x64, 0x42, 0x4A, 0xD3,
-        0x09, 0xF2, 0xDC, 0x83, 0xA2, 0xDD, 0x25, 0x43, 0x09, 0xFC, 0x63, 0x46, 0x27, 0x43, 0x0A, 0xFC,
-        0x09, 0xFA, 0x08, 0xF8, 0x00, 0xA8, 0x66, 0x43, 0x03, 0x02, 0x64, 0x44, 0x58, 0xDD, 0x03, 0x00,
-        0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA, 0x4C, 0x01, 0x27, 0x43, 0xE3, 0x81, 0xE9, 0x81, 0x03, 0x05,
-        0x16, 0x03, 0x00, 0x61, 0x01, 0x00, 0xEC, 0x63, 0x61, 0x46, 0xBF, 0xD2, 0x27, 0x45, 0xDC, 0x84,
-        0xA2, 0xDA, 0xA3, 0xD2, 0x25, 0x46, 0x88, 0xF8, 0x04, 0x1B, 0x25, 0x44, 0x61, 0x46, 0xBE, 0xDA,
-        0x04, 0x00, 0x09, 0xFA, 0x60, 0x46, 0x25, 0x44, 0x0A, 0xFA, 0x61, 0x46, 0xA3, 0xDA, 0x2F, 0x58,
-        0xFF, 0xFF, 0xA0, 0xFE, 0x07, 0x05, 0xA3, 0xFE, 0x07, 0x05, 0xA1, 0xFE, 0x48, 0x05, 0x60, 0x64,
-        0x3B, 0xDB, 0x11, 0x00, 0x20, 0x58, 0xFF, 0xFF, 0x4F, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x0E, 0x60,
-        0xDF, 0xF3, 0xFF, 0xFF, 0xFB, 0xB4, 0xA2, 0xDB, 0xA0, 0x4C, 0x59, 0xBC, 0xFF, 0xB4, 0xA0, 0x51,
-        0xA0, 0x4C, 0x7D, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x83, 0x3E, 0x40, 0x60, 0x0B, 0x65,
-        0x2B, 0x44, 0x00, 0x63, 0xE8, 0x80, 0xF8, 0x84, 0x02, 0x24, 0x94, 0x84, 0xF3, 0x83, 0xCD, 0x81,
-        0xFF, 0xFF, 0xF8, 0x02, 0xDF, 0x83, 0x2F, 0x58, 0x40, 0x4B, 0x00, 0x62, 0x01, 0x64, 0xD4, 0x80,
-        0xE0, 0x84, 0x1A, 0x03, 0xD4, 0x80, 0xE0, 0x84, 0x15, 0x03, 0x61, 0x44, 0x11, 0x61, 0xE0, 0x84,
-        0xCD, 0x81, 0xFD, 0x04, 0x01, 0x00, 0xE0, 0x84, 0xF2, 0x82, 0xFF, 0xFF, 0x02, 0x24, 0xC6, 0x82,
-        0x02, 0x28, 0xD6, 0x82, 0xE2, 0x80, 0xCD, 0x81, 0x02, 0x28, 0x01, 0xBC, 0xF4, 0x02, 0x01, 0x2A,
-        0xC6, 0x82, 0x03, 0x00, 0xE9, 0x81, 0xF2, 0x82, 0x61, 0x44, 0x2D, 0x58, 0xFF, 0xFF, 0x00, 0x64,
-        0x3B, 0xDB, 0x3C, 0x44, 0xAC, 0x80, 0xFF, 0xFF, 0xC6, 0x02, 0x89, 0xF3, 0x8A, 0xF3, 0x02, 0xA8,
-        0x02, 0xA8, 0x08, 0x02, 0x00, 0x64, 0x8B, 0xFB, 0x89, 0xFB, 0x8A, 0xFB, 0x00, 0x64, 0x8C, 0xFB,
-        0xCA, 0xFE, 0x2A, 0x00, 0x03, 0x02, 0x00, 0x64, 0x8A, 0xFB, 0xCA, 0xFE, 0x01, 0x64, 0x3B, 0xDB,
-        0x12, 0x60, 0xE7, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x13, 0x03, 0xDB, 0xF3, 0x2A, 0xF2,
-        0xFD, 0xA0, 0x60, 0x40, 0x80, 0x3A, 0x33, 0x00, 0x32, 0x02, 0x9B, 0xFE, 0x30, 0x05, 0x00, 0x64,
-        0x13, 0x60, 0x0A, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xE7, 0x01, 0x8A, 0xF3, 0xFF, 0xFF, 0x01, 0xA8, 0xFF, 0xFF, 0x06, 0x02, 0x12, 0x60, 0xE4, 0xF3,
-        0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x1B, 0x02, 0x86, 0xFF, 0x20, 0x40, 0x12, 0x27, 0x13, 0x00,
-        0x9A, 0xFE, 0x11, 0x04, 0x9D, 0xFE, 0x0F, 0x04, 0x95, 0xF3, 0xFF, 0xFF, 0x80, 0xBC, 0x95, 0xFB,
-        0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0x06, 0x64, 0x13, 0x60, 0x16, 0xFB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0x12, 0x64, 0x3B, 0xDB, 0x84, 0xFF, 0xB7, 0x60, 0xF7, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0xFC, 0xFB, 0x46, 0x5C, 0x19, 0x60, 0xCF, 0xF3, 0x0D, 0xF2, 0x60, 0x5C, 0x64, 0x5F, 0x0D, 0xFA,
-        0x11, 0x64, 0x3B, 0xDB, 0x9D, 0xFE, 0x06, 0x05, 0x08, 0x64, 0x13, 0x60, 0x16, 0xFB, 0x2D, 0xFF,
-        0xFF, 0xFF, 0xA3, 0xFE, 0x07, 0xF0, 0x00, 0x64, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x02, 0x23, 0xF0,
-        0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0xBF, 0x60, 0x79, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x00, 0x63,
-        0x40, 0x47, 0x50, 0x36, 0x05, 0x00, 0xA4, 0x36, 0x03, 0x00, 0x80, 0x36, 0x01, 0x00, 0x01, 0x63,
-        0x48, 0xFD, 0x40, 0x47, 0x08, 0x2A, 0x08, 0x00, 0x03, 0x2F, 0x06, 0x00, 0x7F, 0xF1, 0x2C, 0xF8,
-        0x80, 0xF1, 0x2D, 0xF8, 0x81, 0xF1, 0x2E, 0xF8, 0x4A, 0xF3, 0x35, 0xFA, 0x10, 0xA4, 0x4A, 0xFB,
-        0x00, 0x64, 0x15, 0xFA, 0x16, 0xFA, 0x0F, 0xFA, 0x07, 0xF0, 0xA6, 0xF3, 0xFF, 0xFF, 0xD0, 0x80,
-        0xFF, 0xFF, 0x05, 0x03, 0x66, 0x43, 0x64, 0x46, 0x11, 0xF2, 0xD9, 0xFB, 0x63, 0x46, 0x03, 0xF2,
-        0x00, 0xF4, 0x01, 0xF2, 0xFC, 0xA5, 0x00, 0x7F, 0xD4, 0x84, 0x27, 0x45, 0x3C, 0x46, 0x1A, 0xFA,
-        0x22, 0x63, 0x7B, 0x60, 0xFF, 0x64, 0xA4, 0x84, 0x03, 0x2B, 0x1C, 0x63, 0x2A, 0xFA, 0x8F, 0xB0,
-        0x88, 0x36, 0x02, 0xA3, 0x60, 0x40, 0xA4, 0x36, 0x14, 0x63, 0x43, 0x4C, 0x18, 0xFC, 0x00, 0x7C,
-        0x22, 0xF8, 0x64, 0x41, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x3A, 0xF2, 0x63, 0x46, 0xFF, 0xB4,
-        0x22, 0xFA, 0x60, 0x40, 0x00, 0x36, 0x82, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x0C, 0xB0, 0x08, 0x3A,
-        0xAD, 0x00, 0x60, 0x40, 0x40, 0x26, 0xAA, 0x00, 0x03, 0xF2, 0x00, 0xF4, 0xA0, 0xD2, 0xAA, 0x60,
-        0xAA, 0x65, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64, 0x0A, 0x02, 0xD0, 0x80, 0x00, 0x64, 0x5A, 0xD0,
-        0x06, 0x02, 0xD0, 0x80, 0xF8, 0x7F, 0xD0, 0x80, 0x01, 0x03, 0x01, 0x02, 0x01, 0x61, 0x62, 0x43,
-        0x46, 0x43, 0x3C, 0x46, 0x07, 0xF4, 0x3A, 0xF2, 0xFF, 0xFF, 0xA3, 0x46, 0x60, 0x40, 0x22, 0x26,
-        0x64, 0x00, 0x60, 0x45, 0x63, 0x42, 0x5A, 0xD0, 0xCD, 0x81, 0x3C, 0x46, 0x1B, 0x02, 0x64, 0x44,
-        0x88, 0x3A, 0x18, 0x00, 0x8E, 0x37, 0x03, 0x00, 0xC7, 0x37, 0x01, 0x00, 0x13, 0x00, 0x65, 0x44,
-        0x01, 0x26, 0x7C, 0x00, 0x04, 0x26, 0x03, 0x00, 0x10, 0x26, 0x01, 0x00, 0x31, 0x00, 0xA3, 0x46,
-        0x3B, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x27, 0x5B, 0x00, 0xA3, 0x46, 0x00, 0x7C, 0x22, 0xF8,
-        0xA3, 0x46, 0x6C, 0x00, 0xA3, 0x46, 0x65, 0x44, 0x01, 0x26, 0x0B, 0x00, 0x04, 0x26, 0x03, 0x00,
-        0x10, 0x26, 0x01, 0x00, 0x1D, 0x00, 0x3B, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x27, 0x48, 0x00,
-        0x17, 0x00, 0xA6, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x3A, 0xF2, 0x66, 0x43, 0xFF, 0xB4, 0x3C, 0x46,
-        0x22, 0xF0, 0x60, 0x47, 0xB0, 0x84, 0x22, 0xFA, 0x63, 0x46, 0x3B, 0xF0, 0x60, 0x40, 0x04, 0x27,
-        0x03, 0x00, 0x10, 0x27, 0x01, 0x00, 0x04, 0x00, 0x64, 0x40, 0x80, 0x27, 0x31, 0x00, 0x00, 0x00,
-        0x3C, 0x46, 0x02, 0x65, 0xBF, 0x60, 0x19, 0x78, 0xFF, 0xFF, 0xCD, 0x81, 0x63, 0x42, 0x5A, 0xD0,
-        0x3C, 0x46, 0x26, 0x02, 0x64, 0x44, 0x88, 0x3A, 0x23, 0x00, 0x77, 0x37, 0x37, 0x00, 0x78, 0x37,
-        0x35, 0x00, 0x8E, 0x37, 0x33, 0x00, 0xC7, 0x37, 0x31, 0x00, 0x1A, 0x00, 0x19, 0x60, 0xA3, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x2A, 0x00, 0x06, 0x00, 0x19, 0x60, 0xA3, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x2A, 0xE2, 0x01, 0x3C, 0x46, 0x3E, 0xF2, 0x40, 0x60, 0x00, 0x65, 0xF0, 0x84,
-        0xA4, 0x84, 0x3D, 0xFA, 0x2A, 0xF2, 0xBF, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x2A, 0xFA, 0x16, 0x00,
-        0x3C, 0x46, 0x22, 0xF0, 0x80, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0xFF, 0xFF, 0x3F, 0xF2, 0x3E, 0xF0,
-        0x08, 0xA4, 0x60, 0x41, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x03, 0x00, 0x04, 0x26,
-        0x03, 0x00, 0x04, 0x00, 0x04, 0x2B, 0x02, 0x00, 0x61, 0x44, 0x3F, 0xFA, 0x3C, 0x46, 0x2C, 0xF2,
-        0x27, 0x40, 0x01, 0x27, 0x32, 0xF2, 0xD3, 0xF1, 0x60, 0x40, 0x01, 0x26, 0x47, 0x00, 0x09, 0x60,
-        0x00, 0x64, 0xD0, 0x80, 0x3F, 0xF2, 0x09, 0x06, 0x2C, 0x45, 0xC4, 0x84, 0xD0, 0x80, 0x40, 0x4A,
-        0x34, 0x06, 0x60, 0x43, 0x64, 0x44, 0x54, 0x88, 0x17, 0x00, 0x60, 0x45, 0x16, 0x60, 0xC8, 0xF3,
-        0xDA, 0xF3, 0x00, 0xBC, 0x60, 0x47, 0xEC, 0xA0, 0x28, 0x03, 0x27, 0x07, 0x2C, 0x44, 0xC4, 0x81,
-        0x02, 0x60, 0x1C, 0x65, 0x45, 0x4A, 0xD5, 0x80, 0x2C, 0x45, 0x1F, 0x06, 0x27, 0x40, 0x04, 0x27,
-        0x25, 0x00, 0x2A, 0x43, 0xD7, 0x85, 0x45, 0x48, 0xD4, 0xF1, 0x0F, 0xF2, 0xD3, 0x80, 0x01, 0x65,
-        0x01, 0x07, 0x00, 0x65, 0xB4, 0x84, 0x0F, 0xFA, 0x00, 0x63, 0x3F, 0xF2, 0x28, 0x45, 0x60, 0x41,
-        0xD4, 0x84, 0xDF, 0x83, 0xFC, 0x07, 0x14, 0xFC, 0x17, 0xFA, 0x04, 0x60, 0x00, 0x64, 0x27, 0x45,
-        0xB4, 0x84, 0x2A, 0xFA, 0x28, 0x43, 0x16, 0xFC, 0x0D, 0x00, 0x3F, 0xF2, 0x2C, 0x45, 0xD4, 0xF1,
-        0xC4, 0x81, 0xD1, 0x80, 0x0F, 0xF2, 0x01, 0x06, 0x01, 0xBC, 0x0F, 0xFA, 0x3F, 0xF2, 0x17, 0xFA,
-        0x01, 0x64, 0x14, 0xFA, 0xAA, 0xF2, 0x19, 0x60, 0x3F, 0xF3, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46,
-        0x44, 0x44, 0x61, 0x40, 0x08, 0x26, 0x02, 0x00, 0x61, 0x40, 0x80, 0x36, 0x12, 0xF2, 0x63, 0x46,
-        0x33, 0x60, 0x86, 0x61, 0x00, 0x7F, 0x60, 0x45, 0x45, 0xD3, 0xFF, 0xFF, 0x60, 0x45, 0x00, 0x7F,
-        0x4B, 0xFB, 0x65, 0x44, 0x00, 0x7E, 0xDA, 0xFB, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x12, 0xF0,
-        0x60, 0x47, 0x63, 0x46, 0x64, 0x40, 0x10, 0x2A, 0x1E, 0x00, 0x33, 0x60, 0x0A, 0x63, 0x60, 0x40,
-        0x0A, 0x36, 0x0C, 0x00, 0x14, 0x36, 0x07, 0x00, 0x37, 0x36, 0x02, 0x00, 0xA3, 0xD3, 0x09, 0x00,
-        0x02, 0xA3, 0xA3, 0xD3, 0x06, 0x00, 0x04, 0xA3, 0xA3, 0xD3, 0x03, 0x00, 0x06, 0xA3, 0xA3, 0xD3,
-        0xFF, 0xFF, 0x60, 0x40, 0x0A, 0x36, 0x70, 0x64, 0x14, 0x36, 0x38, 0x64, 0x37, 0x36, 0x15, 0x64,
-        0x6E, 0x36, 0x0B, 0x64, 0x39, 0x00, 0x32, 0x60, 0xFA, 0x63, 0x60, 0x40, 0x0B, 0x36, 0x20, 0x00,
-        0x0F, 0x36, 0x1B, 0x00, 0x0A, 0x36, 0x16, 0x00, 0x0E, 0x36, 0x11, 0x00, 0x09, 0x36, 0x0C, 0x00,
-        0x0D, 0x36, 0x07, 0x00, 0x08, 0x36, 0x02, 0x00, 0xA3, 0xD3, 0x15, 0x00, 0x02, 0xA3, 0xA3, 0xD3,
-        0x12, 0x00, 0x04, 0xA3, 0xA3, 0xD3, 0x0F, 0x00, 0x06, 0xA3, 0xA3, 0xD3, 0x0C, 0x00, 0x08, 0xA3,
-        0xA3, 0xD3, 0x09, 0x00, 0x0A, 0xA3, 0xA3, 0xD3, 0x06, 0x00, 0x0C, 0xA3, 0xA3, 0xD3, 0x03, 0x00,
-        0x0E, 0xA3, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x40, 0x0B, 0x36, 0x1E, 0x64, 0x0F, 0x36, 0x16, 0x64,
-        0x0A, 0x36, 0x12, 0x64, 0x0E, 0x36, 0x0E, 0x64, 0x09, 0x36, 0x0E, 0x64, 0x0D, 0x36, 0x0A, 0x64,
-        0x08, 0x36, 0x0A, 0x64, 0x0C, 0x36, 0x0A, 0x64, 0x40, 0x46, 0x2A, 0xF2, 0x07, 0xF0, 0x60, 0x40,
-        0xB0, 0x3A, 0x03, 0x00, 0x40, 0x3B, 0x01, 0x00, 0x12, 0x00, 0x0C, 0xB4, 0x08, 0x3A, 0x44, 0x00,
-        0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B, 0x3F, 0x00, 0x17, 0xF2, 0x22, 0xF0, 0xFF, 0xFF,
-        0x64, 0x40, 0x22, 0x22, 0x04, 0x00, 0x00, 0xA8, 0x01, 0xA8, 0x36, 0x03, 0x35, 0x03, 0x3C, 0x46,
-        0x2A, 0xF0, 0x40, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x60, 0x45, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x43,
-        0x60, 0x40, 0x01, 0x26, 0x05, 0x00, 0x04, 0x26, 0x1D, 0x00, 0x10, 0x26, 0x10, 0x00, 0x04, 0x00,
-        0x04, 0x27, 0x18, 0x00, 0x10, 0x27, 0x0B, 0x00, 0x65, 0x44, 0x2A, 0x61, 0x60, 0x40, 0x03, 0x2B,
-        0x24, 0x61, 0x8F, 0xB0, 0x88, 0x36, 0x02, 0xA1, 0x41, 0x4C, 0x98, 0xFA, 0x15, 0x00, 0x65, 0x44,
-        0x32, 0x61, 0x60, 0x40, 0x03, 0x2B, 0x2C, 0x61, 0x8F, 0xB0, 0x88, 0x36, 0x02, 0xA1, 0x41, 0x4C,
-        0x98, 0xFA, 0x0A, 0x00, 0x65, 0x44, 0x2E, 0x61, 0x60, 0x40, 0x03, 0x2B, 0x28, 0x61, 0x8F, 0xB0,
-        0x88, 0x36, 0x02, 0xA1, 0x41, 0x4C, 0x98, 0xFA, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x27,
-        0x03, 0x00, 0xBC, 0x60, 0x46, 0x78, 0xFF, 0xFF, 0x22, 0xF2, 0x46, 0x43, 0x60, 0x40, 0x22, 0x26,
-        0x09, 0x00, 0x01, 0x26, 0x0A, 0x00, 0x04, 0x26, 0x4B, 0x00, 0x10, 0x26, 0x10, 0x00, 0xBC, 0x60,
-        0x46, 0x78, 0xFF, 0xFF, 0xBB, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0x04, 0x27, 0x3D, 0x00, 0x10, 0x27,
-        0x03, 0x00, 0xBC, 0x60, 0x46, 0x78, 0xFF, 0xFF, 0xA6, 0xF3, 0x3C, 0xF1, 0x02, 0x00, 0x07, 0xF2,
-        0x00, 0x7C, 0x40, 0x43, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x27, 0x21, 0x00, 0xA3, 0x46,
-        0x4B, 0xF2, 0xFF, 0xFF, 0xDC, 0x84, 0x4B, 0xFA, 0x4A, 0xF2, 0x08, 0x04, 0xDC, 0x84, 0x4A, 0xFA,
-        0x49, 0xF2, 0x04, 0x04, 0xDC, 0x84, 0x49, 0xFA, 0x01, 0x04, 0xFF, 0xFF, 0xA6, 0xF3, 0x66, 0x5C,
-        0xD0, 0x80, 0x00, 0x7C, 0x01, 0x02, 0x3C, 0xF1, 0x4B, 0xF0, 0x64, 0x47, 0x20, 0xBF, 0xA3, 0x46,
-        0x3A, 0xF8, 0x3B, 0xFA, 0xA3, 0x46, 0x4A, 0xF2, 0x49, 0xF0, 0xA3, 0x46, 0x3C, 0xFA, 0x3D, 0xF8,
-        0x0F, 0x60, 0x9E, 0x64, 0xA3, 0x46, 0x76, 0x61, 0x0E, 0x63, 0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F,
-        0xA3, 0x46, 0xBC, 0x60, 0x46, 0x78, 0xFF, 0xFF, 0xA6, 0xF3, 0xFF, 0xFF, 0x60, 0x46, 0x02, 0x00,
-        0x07, 0xF4, 0xFF, 0xFF, 0xA3, 0x46, 0x2A, 0xF2, 0xA3, 0x46, 0x60, 0x40, 0x08, 0x27, 0x48, 0x00,
-        0xA6, 0xF3, 0x66, 0x5C, 0xD0, 0x80, 0x3B, 0xF0, 0x08, 0x03, 0x64, 0x40, 0x10, 0x2A, 0x12, 0x00,
-        0xFF, 0x60, 0xEF, 0x64, 0xA0, 0x84, 0x3B, 0xFA, 0x24, 0x00, 0x3D, 0xF3, 0x01, 0x61, 0x60, 0x43,
-        0xCF, 0x83, 0xE1, 0x81, 0xFD, 0x0D, 0xE9, 0x81, 0xA1, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0x91, 0x84,
-        0x3B, 0xFA, 0x17, 0x00, 0x4B, 0xF2, 0xFF, 0xFF, 0x10, 0xA0, 0xFF, 0xFF, 0x02, 0x04, 0xFF, 0x60,
-        0xFF, 0x64, 0xDC, 0x84, 0x4B, 0xFA, 0x4A, 0xF2, 0x16, 0x04, 0xDC, 0x84, 0x4A, 0xFA, 0x49, 0xF2,
-        0x08, 0x04, 0xDC, 0x84, 0x49, 0xFA, 0x05, 0x04, 0x3B, 0xF2, 0xFF, 0xFF, 0xE0, 0x84, 0xE8, 0x84,
-        0x3B, 0xFA, 0x0C, 0x60, 0xFC, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC8, 0x60,
-        0x15, 0x78, 0xFF, 0xFF, 0x84, 0xFF, 0x06, 0x60, 0x17, 0xE1, 0x77, 0x40, 0x8B, 0xFF, 0x02, 0x60,
-        0x00, 0x75, 0xC9, 0x60, 0x58, 0x4F, 0xAD, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x06, 0x60, 0x7F, 0xFB,
-        0x0C, 0x60, 0xFC, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC8, 0x60, 0x8C, 0x78,
-        0xFF, 0xFF, 0x84, 0xFF, 0x00, 0x7C, 0x06, 0x60, 0x7F, 0xF3, 0xA2, 0xD9, 0x60, 0x40, 0x01, 0x2A,
-        0x04, 0x00, 0xC9, 0x60, 0x58, 0x4F, 0xF6, 0x78, 0xFF, 0xFF, 0x3C, 0x46, 0x07, 0xF4, 0xA6, 0xF3,
-        0x66, 0x5C, 0xD0, 0x80, 0x00, 0x7C, 0x07, 0x03, 0x66, 0x43, 0x3C, 0x46, 0x22, 0xF2, 0x63, 0x46,
-        0x60, 0x40, 0x01, 0x2A, 0x01, 0x00, 0x3C, 0xF1, 0x4B, 0xF0, 0x64, 0x41, 0x64, 0x47, 0xFF, 0xB4,
-        0x60, 0x5F, 0x20, 0xBC, 0x80, 0x26, 0x80, 0xAC, 0x60, 0x47, 0xA3, 0x46, 0x3A, 0xFA, 0x64, 0x44,
-        0x20, 0x7F, 0x34, 0x94, 0x3B, 0xFA, 0xA3, 0x46, 0x4A, 0xF2, 0x49, 0xF0, 0xA3, 0x46, 0x3C, 0xFA,
-        0x3D, 0xF8, 0x80, 0x60, 0x10, 0xE0, 0x08, 0x60, 0x00, 0xEA, 0x0F, 0x64, 0x60, 0x7F, 0xA0, 0x5A,
-        0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0xBC, 0x60, 0x46, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x27, 0x31, 0x00, 0x2A, 0xF2, 0x00, 0x60,
-        0x7C, 0x62, 0x60, 0x40, 0x40, 0x2B, 0x24, 0x00, 0xA2, 0xD3, 0x00, 0x61, 0x60, 0xFE, 0xA0, 0xD3,
-        0x5E, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x64, 0x5F, 0xDC, 0x84, 0xF1, 0x81, 0xC0, 0x2B, 0x04, 0x00,
-        0x80, 0x2A, 0x02, 0x00, 0x7F, 0xA4, 0xDC, 0x84, 0xFF, 0x3B, 0x03, 0x00, 0x60, 0x47, 0xDC, 0x87,
-        0x01, 0x61, 0xC0, 0x80, 0x00, 0x36, 0xDC, 0x84, 0x4E, 0xDB, 0x60, 0xFE, 0x5A, 0xD1, 0xFF, 0xFF,
-        0xC1, 0x84, 0xF0, 0x22, 0x10, 0xA4, 0xF0, 0x2A, 0x01, 0x00, 0x00, 0x64, 0xA2, 0xDB, 0x20, 0xFE,
-        0x00, 0x60, 0x3E, 0xF3, 0xFF, 0xFF, 0xA0, 0xD3, 0x5A, 0xD1, 0x3A, 0xFA, 0x3B, 0xF8, 0x74, 0x62,
-        0xA2, 0xD0, 0xFF, 0xFF, 0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0,
-        0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A, 0x00, 0x60, 0x40, 0xF3, 0xFF, 0xFF, 0xA0, 0xD1,
-        0x5A, 0xD1, 0x64, 0x45, 0x64, 0x44, 0xE3, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5A, 0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A,
-        0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5A, 0x65, 0x40, 0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F,
-        0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44, 0xE9, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1,
-        0xA0, 0x5A, 0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A,
-        0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5A, 0x64, 0x47, 0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5A, 0x64, 0x44,
-        0xEF, 0x7F, 0xA0, 0x5A, 0x08, 0x60, 0x00, 0xEA, 0x65, 0x44, 0x02, 0xA4, 0x60, 0x7F, 0xA0, 0x5A,
-        0x80, 0x60, 0x00, 0xEA, 0xA0, 0x60, 0x00, 0xEA, 0xD1, 0x60, 0x00, 0xEA, 0x66, 0x45, 0xAA, 0xF2,
-        0x19, 0x60, 0x3F, 0xF3, 0x24, 0x46, 0x61, 0x40, 0x08, 0x26, 0x02, 0x00, 0x61, 0x40, 0x80, 0x36,
-        0x12, 0xF2, 0x65, 0x46, 0x60, 0x40, 0x10, 0x26, 0x34, 0x00, 0x2C, 0x45, 0x17, 0xF2, 0x4B, 0xF1,
-        0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x64, 0x45, 0x16, 0xA1, 0xB8, 0x60, 0x58, 0x4D,
-        0x15, 0x78, 0xFF, 0xFF, 0x7D, 0xF1, 0x01, 0xA4, 0xE0, 0x84, 0xE0, 0x84, 0x64, 0x40, 0x01, 0x2B,
-        0x06, 0xA4, 0x1B, 0xFA, 0xDA, 0xF3, 0x2C, 0x60, 0x7C, 0x65, 0x60, 0x40, 0x0B, 0x37, 0x00, 0x63,
-        0x0F, 0x37, 0x02, 0x63, 0x0A, 0x37, 0x04, 0x63, 0x0E, 0x37, 0x06, 0x63, 0x09, 0x37, 0x08, 0x63,
-        0x0D, 0x37, 0x0A, 0x63, 0x08, 0x37, 0x0C, 0x63, 0x0C, 0x37, 0x0E, 0x63, 0x28, 0xA3, 0x47, 0xD1,
-        0xD8, 0xA3, 0xD7, 0x83, 0x19, 0x60, 0x77, 0xF9, 0x47, 0xD1, 0x40, 0x67, 0xB0, 0x84, 0x1F, 0xFA,
-        0x58, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x36, 0x19, 0x00, 0x50, 0x36, 0x17, 0x00,
-        0x40, 0x36, 0x15, 0x00, 0x00, 0x36, 0x13, 0x00, 0x20, 0x36, 0x11, 0x00, 0xA0, 0x36, 0x0F, 0x00,
-        0xB0, 0x36, 0x0D, 0x00, 0xC0, 0x36, 0x0B, 0x00, 0xDA, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x0A, 0x37,
-        0x06, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0x80, 0x60, 0x00, 0x61, 0x60, 0x40, 0x04, 0x26, 0x00, 0x61,
-        0xDA, 0xF3, 0x2C, 0x60, 0x74, 0x65, 0x60, 0x40, 0x0A, 0x37, 0x00, 0x63, 0x14, 0x37, 0x02, 0x63,
-        0x37, 0x37, 0x04, 0x63, 0x6E, 0x37, 0x06, 0x63, 0x28, 0xA3, 0x47, 0xD1, 0xD8, 0xA3, 0xD7, 0x83,
-        0x19, 0x60, 0x77, 0xF9, 0x47, 0xD1, 0xFF, 0xFF, 0xB1, 0x84, 0x1F, 0xFA, 0xDA, 0xF1, 0x2C, 0x45,
-        0x64, 0x43, 0x17, 0xF2, 0x4B, 0xF1, 0xC4, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x63, 0x40,
-        0x37, 0x37, 0xE1, 0x81, 0x64, 0x45, 0xB8, 0x60, 0x58, 0x4D, 0x15, 0x78, 0xFF, 0xFF, 0xAE, 0x82,
-        0xFC, 0xA2, 0x0A, 0x03, 0x63, 0x40, 0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41, 0x04, 0x0D, 0x63, 0x44,
-        0x80, 0x7E, 0xDA, 0xFB, 0x61, 0x44, 0xDC, 0x84, 0x2B, 0xF0, 0x1B, 0xFA, 0x64, 0x44, 0x80, 0x27,
-        0x58, 0x00, 0x07, 0xF0, 0x66, 0x45, 0x64, 0x46, 0x12, 0xF2, 0x65, 0x46, 0x60, 0x40, 0x10, 0x2A,
-        0x31, 0x00, 0x16, 0xF2, 0x0F, 0xF0, 0xAC, 0x84, 0x2C, 0x45, 0x2C, 0x03, 0x4B, 0xF1, 0xC4, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x81, 0x63, 0x40, 0x37, 0x37, 0xE1, 0x81, 0x64, 0x45, 0x0F, 0xF0,
-        0xB8, 0x60, 0x58, 0x4D, 0x15, 0x78, 0xFF, 0xFF, 0xAE, 0x82, 0xFC, 0xA2, 0x0A, 0x03, 0x63, 0x40,
-        0x6E, 0x3B, 0x06, 0x00, 0x60, 0x41, 0x04, 0x0D, 0x80, 0x67, 0xB0, 0x84, 0x0F, 0xFA, 0x61, 0x44,
-        0xDC, 0x84, 0x1D, 0xFA, 0x1F, 0xF0, 0x01, 0x60, 0x3E, 0x65, 0x64, 0x40, 0x80, 0x27, 0x02, 0x00,
-        0x02, 0x60, 0x5E, 0x65, 0x1B, 0xF0, 0x26, 0x41, 0xE1, 0x81, 0xC5, 0x81, 0x44, 0x94, 0xC1, 0x81,
-        0x2B, 0xFA, 0x90, 0xFA, 0x26, 0x44, 0x2C, 0xF0, 0x0A, 0xA4, 0x66, 0x45, 0x24, 0x46, 0x92, 0xF2,
-        0x65, 0x46, 0x9F, 0xF0, 0x61, 0x40, 0x10, 0x2A, 0x05, 0x00, 0x60, 0xA4, 0x65, 0x40, 0x80, 0x2B,
-        0x60, 0xA4, 0x01, 0x00, 0x14, 0xA4, 0x64, 0x40, 0x01, 0x26, 0x00, 0x64, 0x60, 0x45, 0x2A, 0xF2,
-        0x39, 0xF0, 0x8F, 0xB0, 0x88, 0x3A, 0x04, 0x00, 0x64, 0x44, 0x60, 0xB0, 0x20, 0x36, 0x00, 0x65,
-        0x65, 0x44, 0x11, 0xFA, 0xDA, 0xF3, 0x13, 0xFA, 0x7C, 0x44, 0x1D, 0xFA, 0x0F, 0xF0, 0xFF, 0xFF,
-        0x64, 0x40, 0x01, 0x2A, 0x6F, 0x00, 0x7D, 0xF1, 0x19, 0x60, 0x7B, 0xF3, 0x64, 0x40, 0x01, 0x27,
-        0x03, 0x00, 0x60, 0x40, 0x02, 0x26, 0x14, 0x00, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x12, 0xF0,
-        0x19, 0x60, 0x7C, 0xF3, 0x63, 0x46, 0x64, 0x40, 0x10, 0x2A, 0x20, 0x00, 0x60, 0x40, 0x02, 0x26,
-        0x07, 0x00, 0x01, 0x26, 0x08, 0x00, 0x04, 0x26, 0x09, 0x00, 0x06, 0x61, 0x6E, 0x63, 0x08, 0x00,
-        0x02, 0x61, 0x14, 0x63, 0x05, 0x00, 0x00, 0x61, 0x0A, 0x63, 0x02, 0x00, 0x04, 0x61, 0x37, 0x63,
-        0x00, 0x64, 0x2C, 0x60, 0x9C, 0x65, 0x45, 0xD1, 0xD5, 0x81, 0x19, 0x60, 0x78, 0xF9, 0x2C, 0x60,
-        0x74, 0x65, 0x45, 0xD1, 0x1C, 0xFC, 0xB0, 0x84, 0x1E, 0xFA, 0x3C, 0x00, 0x60, 0x40, 0x10, 0x2A,
-        0x04, 0x00, 0x08, 0x61, 0x1E, 0x60, 0x0B, 0x63, 0x27, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x0A, 0x61,
-        0x16, 0x60, 0x0F, 0x63, 0x21, 0x00, 0x40, 0x2A, 0x04, 0x00, 0x0C, 0x61, 0x12, 0x60, 0x0A, 0x63,
-        0x1B, 0x00, 0x80, 0x2A, 0x04, 0x00, 0x0E, 0x61, 0x0E, 0x60, 0x0E, 0x63, 0x15, 0x00, 0x01, 0x2B,
-        0x04, 0x00, 0x10, 0x61, 0x0E, 0x60, 0x09, 0x63, 0x0F, 0x00, 0x02, 0x2B, 0x04, 0x00, 0x12, 0x61,
-        0x0A, 0x60, 0x0D, 0x63, 0x09, 0x00, 0x04, 0x2B, 0x04, 0x00, 0x14, 0x61, 0x0A, 0x60, 0x08, 0x63,
-        0x03, 0x00, 0x16, 0x61, 0x0A, 0x60, 0x0C, 0x63, 0x1E, 0xF0, 0x40, 0x67, 0x2C, 0x60, 0x9C, 0x65,
-        0x45, 0xD1, 0xD5, 0x81, 0x19, 0x60, 0x78, 0xF9, 0x2C, 0x60, 0x74, 0x65, 0x45, 0xD1, 0x1C, 0xFC,
-        0xB0, 0x84, 0x1E, 0xFA, 0xFF, 0xFF, 0x0D, 0xF2, 0x3E, 0xF0, 0x60, 0x47, 0xFF, 0xB4, 0x64, 0x41,
-        0x01, 0xB1, 0x01, 0x63, 0x17, 0x02, 0x60, 0x41, 0xFF, 0x22, 0x04, 0x00, 0xB8, 0x60, 0x58, 0x4F,
-        0x06, 0x78, 0xFF, 0xFF, 0x07, 0x60, 0xED, 0xFD, 0x19, 0x60, 0xCF, 0xF3, 0xFF, 0xFF, 0x60, 0x41,
-        0x01, 0x63, 0x61, 0x40, 0xFF, 0x22, 0x04, 0x00, 0xB8, 0x60, 0x58, 0x4F, 0x06, 0x78, 0xFF, 0xFF,
-        0x07, 0x60, 0xEE, 0xFD, 0x02, 0x64, 0x3B, 0xDB, 0xBF, 0x60, 0xE4, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0xFC, 0xFB, 0x07, 0xF0, 0x00, 0x64, 0xD0, 0x80, 0xA6, 0xF3, 0x0E, 0x03, 0xD0, 0x80, 0xFF, 0xFF,
-        0x0B, 0x03, 0x47, 0xF1, 0x07, 0xF0, 0x64, 0x40, 0x02, 0x26, 0x01, 0x00, 0x08, 0x00, 0x03, 0x12,
-        0xBE, 0x60, 0xA0, 0x78, 0xFF, 0xFF, 0xFC, 0x0A, 0xBF, 0x60, 0x00, 0x78, 0xFF, 0xFF, 0x87, 0xF0,
-        0xA6, 0xF3, 0x10, 0xF0, 0xD4, 0x80, 0xFF, 0xFF, 0x3D, 0x03, 0x66, 0x43, 0x65, 0x46, 0xFF, 0x67,
-        0x20, 0x85, 0x64, 0x5F, 0x40, 0x44, 0x15, 0xF0, 0x25, 0x44, 0xD0, 0x84, 0x03, 0xA4, 0x03, 0x0E,
-        0xE8, 0x84, 0xE8, 0x84, 0x04, 0x00, 0xFA, 0xA4, 0xE8, 0x84, 0xE8, 0x87, 0xC0, 0xBF, 0xC0, 0x84,
-        0x15, 0xFA, 0x40, 0x45, 0x14, 0xF0, 0x24, 0x44, 0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF, 0xC0, 0x84, 0x14, 0xFA, 0x60, 0x5C, 0x2F, 0x67,
-        0xD0, 0x80, 0x60, 0x45, 0x02, 0x28, 0x64, 0x45, 0x25, 0x5C, 0x8B, 0x67, 0xD0, 0x80, 0x60, 0x41,
-        0x02, 0x24, 0x64, 0x41, 0xD5, 0x84, 0x80, 0x65, 0xC4, 0x87, 0x01, 0x05, 0x00, 0x64, 0xFF, 0xB4,
-        0x0E, 0xFA, 0x63, 0x46, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x17, 0xF2, 0x63, 0x46, 0x60, 0x40,
-        0x00, 0x36, 0x2E, 0x00, 0x01, 0x36, 0x1E, 0x00, 0x03, 0x3A, 0x25, 0x00, 0x64, 0x46, 0x10, 0xF2,
-        0x11, 0xFA, 0x12, 0xF2, 0x00, 0x61, 0x60, 0x47, 0x00, 0x7F, 0x12, 0xFA, 0x97, 0xFA, 0x46, 0x44,
-        0x63, 0x46, 0xC2, 0x60, 0x58, 0x4E, 0x4C, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x00, 0x3A, 0x04, 0x00,
-        0xC2, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x96, 0xFC,
-        0x63, 0x46, 0x43, 0x00, 0x64, 0x46, 0x16, 0xF2, 0x00, 0x61, 0x20, 0x28, 0xFF, 0xA4, 0x97, 0xFA,
-        0x16, 0xFA, 0x63, 0x46, 0x3A, 0x00, 0x64, 0x46, 0x00, 0x61, 0x97, 0xFA, 0x63, 0x46, 0x35, 0x00,
-        0x07, 0xF0, 0x66, 0x41, 0x64, 0x46, 0x16, 0xF2, 0xFF, 0xFF, 0x20, 0x28, 0xFF, 0xA4, 0x16, 0xFA,
-        0x93, 0xF4, 0x12, 0xF2, 0x20, 0x28, 0xFF, 0xA3, 0x13, 0xFC, 0x61, 0x46, 0x63, 0x40, 0x00, 0x3A,
-        0x24, 0x00, 0xC2, 0x60, 0x58, 0x4E, 0x6D, 0x78, 0xFF, 0xFF, 0x61, 0x40, 0xFF, 0x36, 0x1D, 0x00,
-        0x66, 0x41, 0x64, 0x46, 0x12, 0xF2, 0x93, 0xF4, 0x61, 0x46, 0x20, 0x28, 0x16, 0x00, 0x44, 0x44,
-        0xC2, 0x60, 0x58, 0x4E, 0x4C, 0x78, 0xFF, 0xFF, 0x24, 0x5C, 0x65, 0x40, 0x00, 0x36, 0x06, 0x00,
-        0x66, 0x41, 0x64, 0x46, 0x01, 0x64, 0x17, 0xFA, 0x61, 0x46, 0x07, 0x00, 0x66, 0x43, 0x64, 0x46,
-        0xC2, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0x63, 0x46, 0xBF, 0x60, 0x00, 0x78, 0xFF, 0xFF,
-        0x07, 0xF0, 0x66, 0x43, 0x64, 0x46, 0x17, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xFF, 0x27, 0xFF, 0xFF,
-        0x00, 0x36, 0x07, 0x00, 0x01, 0x36, 0x1C, 0x00, 0x02, 0x36, 0x24, 0x00, 0x03, 0x36, 0x43, 0x00,
-        0xFF, 0xFF, 0x19, 0x60, 0xA9, 0xF1, 0x16, 0xF2, 0x43, 0x44, 0xD0, 0x80, 0x33, 0x60, 0x84, 0x61,
-        0x09, 0x03, 0xA1, 0xD1, 0x33, 0x60, 0x82, 0x63, 0xC0, 0x84, 0x16, 0xFA, 0xA3, 0xD3, 0xFF, 0xFF,
-        0x13, 0xFA, 0x39, 0x00, 0x96, 0xFC, 0xC2, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0x33, 0x00,
-        0x43, 0x44, 0xC2, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0xC1, 0xF3, 0x96, 0xFC,
-        0x13, 0xFA, 0x29, 0x00, 0x63, 0x46, 0x33, 0x60, 0x54, 0x63, 0xA3, 0xD3, 0x15, 0xF2, 0x60, 0x45,
-        0xD4, 0x80, 0x07, 0xF0, 0x0C, 0x03, 0x66, 0x41, 0x44, 0x44, 0x64, 0x46, 0x12, 0xF2, 0x61, 0x46,
-        0xC2, 0x60, 0x58, 0x4E, 0x4C, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x00, 0x3A, 0x19, 0x00, 0x66, 0x43,
-        0x24, 0x46, 0xC2, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0x12, 0xF2, 0x91, 0xF2, 0x90, 0xFA,
-        0x60, 0x5F, 0x12, 0xFA, 0x04, 0x00, 0xC2, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0x03, 0x64,
-        0x17, 0xFA, 0x63, 0x46, 0x05, 0x00, 0x24, 0x43, 0x02, 0x64, 0x17, 0xFA, 0x63, 0x46, 0x00, 0x00,
-        0x03, 0x64, 0x3B, 0xDB, 0xCA, 0xFE, 0x47, 0xF1, 0x01, 0x65, 0x32, 0x40, 0x04, 0x27, 0x11, 0x00,
-        0x2C, 0xF2, 0x64, 0x45, 0x02, 0x22, 0x0D, 0x00, 0x60, 0x40, 0x01, 0x26, 0x0A, 0x00, 0x2A, 0xF2,
-        0x39, 0xF0, 0x8F, 0xB0, 0x88, 0x3A, 0x77, 0x00, 0x64, 0x44, 0x60, 0xB0, 0x20, 0x36, 0x01, 0x00,
-        0x72, 0x00, 0x14, 0xF2, 0x65, 0x40, 0x01, 0x26, 0x0C, 0x00, 0x60, 0x45, 0x05, 0x64, 0x3B, 0xDB,
-        0x65, 0x44, 0xCC, 0x85, 0x2C, 0x60, 0xD0, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xF0, 0x78, 0xB5, 0xF1,
-        0x50, 0x00, 0x60, 0x41, 0x2A, 0xF0, 0x00, 0x60, 0x0C, 0x64, 0xA0, 0x84, 0x04, 0x36, 0x02, 0x00,
-        0x0C, 0x3A, 0x01, 0x00, 0x46, 0x00, 0x61, 0x45, 0x60, 0x43, 0x2C, 0x60, 0xD0, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xF0, 0x78, 0xB5, 0xF1, 0x63, 0x40, 0x08, 0x36, 0x01, 0x00, 0x3A, 0x00, 0x14, 0xF2,
-        0x1C, 0x65, 0x60, 0x41, 0x00, 0x63, 0xCD, 0x81, 0xC7, 0x83, 0xFD, 0x02, 0x3F, 0xF0, 0x2C, 0xF2,
-        0xC3, 0x83, 0x60, 0x40, 0x01, 0x2A, 0x0D, 0x00, 0x2C, 0x60, 0xCE, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x2C, 0x60, 0xD4, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xEF, 0x78, 0x63, 0x45,
-        0x20, 0x00, 0x2C, 0x60, 0xCC, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x2C, 0x60,
-        0xD2, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xEF, 0x78, 0x63, 0x45, 0x15, 0xF2, 0xFF, 0xFF, 0x0F, 0xB4,
-        0x00, 0xA8, 0x01, 0xA8, 0x0E, 0x03, 0x07, 0x03, 0x2C, 0x60, 0xDA, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x06, 0x00, 0x2C, 0x60, 0xD8, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78,
-        0xB5, 0xF1, 0x04, 0x64, 0x3B, 0xDB, 0x25, 0x60, 0xEC, 0x64, 0x13, 0x60, 0x0A, 0xFB, 0x3C, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x5C, 0x5C, 0xFC, 0xFC, 0xCE, 0xFE,
-        0xB8, 0x60, 0x37, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x50, 0xA8, 0x02, 0x7C, 0x09, 0x03,
-        0x0F, 0xF0, 0x15, 0xF2, 0x64, 0x41, 0x01, 0x2A, 0x02, 0x00, 0xCD, 0xF1, 0x02, 0x00, 0xCC, 0xF1,
-        0xFF, 0xFF, 0x64, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x15, 0xFA, 0x2D, 0x07, 0x61, 0x40, 0x01, 0x2A,
-        0x08, 0x00, 0x16, 0x60, 0x80, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB,
-        0x07, 0x00, 0x16, 0x60, 0x81, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB,
-        0x2A, 0xF0, 0x08, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x00, 0x64, 0x48, 0xFB, 0x19, 0x60, 0xA3, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0C, 0x00, 0x3C, 0x46, 0x3E, 0xF2, 0x40, 0x60, 0x00, 0x65,
-        0xF0, 0x84, 0xA4, 0x84, 0x3D, 0xFA, 0x2A, 0xF2, 0xBF, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x2A, 0xFA,
-        0xBA, 0x60, 0x02, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x49, 0xFB, 0x2C, 0x60, 0xDA, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x2C, 0x60, 0xDC, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78,
-        0xB5, 0xF1, 0x27, 0x44, 0xF7, 0xB4, 0x40, 0x47, 0x23, 0xF0, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDA,
-        0x98, 0x01, 0xC0, 0x60, 0x5F, 0x78, 0xFF, 0xFF, 0x21, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0x01, 0x63,
-        0xC4, 0xB4, 0x31, 0xFB, 0x32, 0xFD, 0xC0, 0x60, 0x14, 0x62, 0x42, 0x40, 0xA0, 0x4C, 0x40, 0xBC,
-        0x7D, 0xB4, 0xA0, 0x51, 0xA0, 0xFE, 0x1A, 0xFF, 0x25, 0x60, 0xE0, 0x64, 0x08, 0xF0, 0x07, 0xF0,
-        0xD0, 0x80, 0x25, 0x60, 0xE6, 0x62, 0x13, 0x02, 0xA2, 0xD3, 0x01, 0x63, 0xAC, 0x86, 0x07, 0xF2,
-        0x0E, 0x03, 0xD0, 0x80, 0x09, 0xF2, 0xFA, 0x02, 0x23, 0xFC, 0x25, 0x60, 0xEC, 0x64, 0x13, 0x60,
-        0x0A, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x3C, 0x46,
-        0x06, 0x64, 0xA1, 0xFF, 0x49, 0xFB, 0x83, 0x3E, 0x31, 0xF3, 0x87, 0x60, 0x80, 0x61, 0x1D, 0xF0,
-        0x60, 0x40, 0x01, 0x2A, 0x0F, 0x00, 0xFE, 0xB4, 0x31, 0xFB, 0x00, 0x64, 0x49, 0xFB, 0x01, 0x64,
-        0x47, 0xFB, 0x00, 0x71, 0x05, 0x64, 0x64, 0x5F, 0x0D, 0xFA, 0x40, 0x64, 0x3B, 0xDB, 0xC0, 0x60,
-        0x5F, 0x78, 0xFF, 0xFF, 0x02, 0x2A, 0x18, 0x00, 0xD1, 0x91, 0x8D, 0xE2, 0x41, 0x64, 0x3B, 0xDB,
-        0x31, 0xF3, 0x33, 0x60, 0xA6, 0x63, 0xFD, 0xB4, 0x31, 0xFB, 0xA3, 0xD3, 0x02, 0x63, 0x60, 0x5C,
-        0x0D, 0xF2, 0x47, 0xFD, 0xFF, 0xB5, 0x60, 0x47, 0xFF, 0xB4, 0xD0, 0x80, 0xDC, 0x84, 0x1F, 0x03,
-        0x60, 0x47, 0xB4, 0x84, 0x0D, 0xFA, 0x1B, 0x00, 0x08, 0x2A, 0x07, 0x00, 0x42, 0x64, 0x3B, 0xDB,
-        0x31, 0xF3, 0xFF, 0xFF, 0xF7, 0xB4, 0x31, 0xFB, 0x12, 0x00, 0x10, 0x2A, 0x09, 0x00, 0x43, 0x64,
-        0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xEF, 0xB4, 0x31, 0xFB, 0xBF, 0x60, 0xE4, 0x78, 0xFF, 0xFF,
-        0x44, 0x64, 0x3B, 0xDB, 0x31, 0xF3, 0xFF, 0xFF, 0xDF, 0xB4, 0x31, 0xFB, 0x00, 0x00, 0x2A, 0x64,
-        0x3B, 0xDB, 0xB7, 0x60, 0xF7, 0x64, 0x40, 0x40, 0xBD, 0x60, 0xD7, 0x78, 0xFF, 0xFF, 0x0E, 0x60,
-        0xDF, 0xF3, 0xFF, 0xFF, 0x02, 0xB5, 0x04, 0xB5, 0x04, 0x03, 0x03, 0x03, 0xC1, 0x60, 0x70, 0x78,
-        0xFF, 0xFF, 0x31, 0x40, 0x01, 0x26, 0x16, 0x00, 0xA0, 0x4C, 0x49, 0xBC, 0xFF, 0xB4, 0xA0, 0x51,
-        0x0E, 0x60, 0xDF, 0xF3, 0xFF, 0xFF, 0x02, 0xB5, 0x04, 0xBC, 0x09, 0x03, 0x60, 0x40, 0x01, 0x26,
-        0xED, 0xE2, 0xFE, 0xB4, 0xA2, 0xDB, 0xA0, 0x4C, 0x7D, 0xB4, 0xA0, 0x51, 0x03, 0x00, 0xA0, 0x4C,
-        0x6D, 0xB4, 0xA0, 0x51, 0xDB, 0xF3, 0xFF, 0xFF, 0xFD, 0xA0, 0xFF, 0xFF, 0x08, 0x24, 0x59, 0x00,
-        0x31, 0x40, 0x04, 0x2A, 0x38, 0x00, 0x01, 0x64, 0x19, 0x60, 0xF4, 0xFB, 0x6C, 0xF3, 0x73, 0xF3,
-        0xCC, 0x83, 0x6C, 0xFD, 0xCC, 0x84, 0x73, 0xFB, 0x1E, 0x02, 0x31, 0x40, 0x02, 0x2A, 0x12, 0x00,
-        0x6E, 0xF3, 0x6F, 0xF1, 0xCC, 0x84, 0x6E, 0xFB, 0x0D, 0x02, 0x6E, 0xF9, 0x31, 0x44, 0x08, 0xBC,
-        0x40, 0x51, 0x71, 0xF3, 0x70, 0xF1, 0x00, 0xB8, 0x64, 0x45, 0x01, 0x03, 0x67, 0x45, 0x65, 0x50,
-        0xCC, 0x84, 0x72, 0xFB, 0x16, 0x60, 0xAC, 0xF3, 0x6D, 0xF1, 0x00, 0xB8, 0x73, 0xF9, 0x03, 0x03,
-        0x85, 0xF3, 0x6C, 0xFB, 0x04, 0x00, 0x6C, 0xF3, 0x85, 0xF1, 0x0D, 0x1B, 0x6C, 0xF9, 0x31, 0x40,
-        0x01, 0x2A, 0x09, 0x00, 0x9D, 0xFE, 0x07, 0x05, 0xBA, 0xFE, 0x08, 0x64, 0x13, 0x60, 0x16, 0xFB,
-        0x2D, 0xFF, 0xFF, 0xFF, 0xA3, 0xFE, 0x32, 0x40, 0x80, 0x2A, 0x12, 0x00, 0x31, 0x40, 0x04, 0x2A,
-        0x0F, 0x00, 0x16, 0x60, 0xAC, 0xF3, 0x6C, 0xF1, 0x03, 0x1B, 0x31, 0x40, 0x02, 0x2A, 0x06, 0x00,
-        0x73, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x07, 0x60, 0x5C, 0x19, 0x60, 0xF5, 0xF9,
-        0x00, 0x64, 0x19, 0x60, 0xF4, 0xFB, 0x0E, 0x60, 0x37, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0xFF, 0x2B,
-        0xA2, 0xDB, 0xCF, 0xF1, 0x07, 0x60, 0xE9, 0xF3, 0x64, 0x40, 0x02, 0x3A, 0x3A, 0x00, 0x0A, 0x60,
-        0x18, 0xF1, 0x10, 0xB4, 0x90, 0x80, 0xFF, 0xFF, 0x34, 0x03, 0x0A, 0x60, 0x18, 0xFB, 0x01, 0x63,
-        0x60, 0x40, 0x10, 0x22, 0x00, 0x63, 0x08, 0x60, 0xC1, 0xFD, 0x08, 0x60, 0xC5, 0xFD, 0x08, 0x60,
-        0xC9, 0xFD, 0x08, 0x60, 0xCD, 0xFD, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x23, 0x21, 0x00,
-        0x0B, 0x36, 0x07, 0x00, 0x0C, 0x36, 0x05, 0x00, 0x0D, 0x36, 0x03, 0x00, 0x0E, 0x36, 0x01, 0x00,
-        0x18, 0x00, 0xDB, 0xF3, 0x01, 0x63, 0x0E, 0x60, 0x36, 0xFD, 0x60, 0x40, 0x03, 0x3A, 0x08, 0x00,
-        0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x09, 0x00,
-        0x04, 0x3A, 0x07, 0x00, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x10, 0x64, 0x3B, 0xDB, 0x7E, 0xF3, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xC4, 0x93, 0xC9, 0xFE, 0x49, 0xF3, 0x3C, 0x46, 0x25, 0x18, 0xCC, 0x84, 0x49, 0xFB,
-        0x22, 0x02, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0xFC, 0xFC, 0x00, 0x64, 0x5C, 0x5C, 0x32, 0xFB,
-        0x82, 0xFF, 0x5C, 0x47, 0x84, 0xFF, 0x62, 0xFF, 0x16, 0x60, 0x7E, 0xF3, 0xFF, 0xFF, 0xDC, 0x84,
-        0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB, 0x23, 0xF0, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDA, 0x25, 0x60,
-        0xEC, 0x64, 0x13, 0x60, 0x0A, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xC1, 0xFE, 0xCE, 0xFE, 0x69, 0xF3, 0xFF, 0xFF, 0x60, 0x41, 0xFD, 0xB4, 0xA2, 0xDB,
-        0x61, 0x44, 0x01, 0xB0, 0x02, 0xB0, 0x0B, 0x03, 0x0A, 0x02, 0x9D, 0xFE, 0x08, 0x04, 0x1C, 0x60,
-        0xCE, 0x64, 0x13, 0x60, 0x20, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x07, 0x00,
-        0x7E, 0xF3, 0x73, 0x45, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xC4, 0x93, 0x1D, 0x60,
-        0xBA, 0x63, 0xA3, 0xD3, 0xAD, 0x49, 0x20, 0xB5, 0x08, 0xB1, 0x22, 0x03, 0xE1, 0x81, 0x10, 0xB5,
-        0x95, 0x81, 0x60, 0x41, 0x18, 0x02, 0x1D, 0x60, 0xBC, 0x7C, 0xA4, 0xD3, 0xFF, 0xFF, 0xCC, 0x84,
-        0xA4, 0xDB, 0x16, 0x02, 0x05, 0x64, 0xA4, 0xDB, 0x61, 0x44, 0x07, 0xB4, 0xFF, 0xFF, 0x10, 0x02,
-        0x08, 0xB1, 0xE1, 0x81, 0x95, 0x81, 0xA3, 0xD3, 0x0B, 0x03, 0x08, 0xAC, 0x01, 0xBC, 0xA3, 0xDB,
-        0xFF, 0xFF, 0x13, 0xFF, 0x05, 0x00, 0x10, 0xAC, 0xA3, 0xDB, 0x05, 0x7C, 0x0E, 0x60, 0xDE, 0xF9,
-        0xB8, 0x60, 0x03, 0x78, 0xFF, 0xFF, 0x46, 0xF3, 0x45, 0xF1, 0x04, 0x1B, 0x64, 0x44, 0x02, 0x1B,
-        0x07, 0x60, 0xED, 0xF3, 0x45, 0xFB, 0x00, 0x63, 0x46, 0xFD, 0x60, 0x41, 0x25, 0x64, 0x3B, 0xDB,
-        0x27, 0x44, 0xEF, 0xB4, 0x40, 0x47, 0x00, 0xB9, 0x71, 0x40, 0x80, 0x27, 0x01, 0x12, 0x27, 0x03,
-        0xC1, 0x60, 0xC5, 0x62, 0x84, 0xFF, 0x42, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4,
-        0xA0, 0x51, 0x2D, 0x0A, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x27, 0x0A,
-        0x71, 0x40, 0x80, 0x27, 0xF7, 0x12, 0x45, 0xF3, 0x48, 0x02, 0x11, 0x18, 0x1B, 0x60, 0xEE, 0xF3,
-        0x1B, 0x60, 0xEF, 0xF3, 0x07, 0x18, 0x06, 0x18, 0xAC, 0x4C, 0x80, 0x26, 0x03, 0x00, 0x00, 0x64,
-        0x45, 0xFB, 0x05, 0x00, 0x45, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0x45, 0xFB, 0xE3, 0x02, 0x06, 0x0A,
-        0xA0, 0x4C, 0xFB, 0xB4, 0xA0, 0x51, 0xA4, 0x60, 0x58, 0x78, 0xFF, 0xFF, 0x84, 0xFF, 0xC1, 0x60,
-        0xA3, 0x64, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x14, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0xB0, 0x60,
-        0x9E, 0x78, 0xFF, 0xFF, 0x3C, 0x44, 0xAC, 0x80, 0x32, 0xF1, 0x25, 0x03, 0x64, 0x40, 0x07, 0x22,
-        0x22, 0x00, 0xA4, 0x60, 0x36, 0x78, 0xFF, 0xFF, 0xA0, 0x4C, 0x1C, 0xBC, 0xDF, 0xB4, 0xA0, 0x51,
-        0x31, 0x40, 0x08, 0x2A, 0xEF, 0x01, 0x72, 0xF3, 0x70, 0xF1, 0x00, 0xA0, 0xDC, 0x80, 0x05, 0x03,
-        0x08, 0x03, 0xCC, 0x84, 0x72, 0xFB, 0x67, 0x50, 0x08, 0x00, 0xCC, 0x84, 0x72, 0xFB, 0x64, 0x50,
-        0x04, 0x00, 0x31, 0x44, 0xF7, 0xB4, 0x40, 0x51, 0x06, 0x00, 0x28, 0x64, 0x3A, 0xDB, 0xA0, 0x4C,
-        0x30, 0xBC, 0xF3, 0xB4, 0xA0, 0x51, 0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x28, 0x64, 0x3B, 0xDB,
-        0x07, 0x60, 0xEE, 0xF3, 0x32, 0x40, 0x02, 0x27, 0x16, 0x00, 0x46, 0xFB, 0x14, 0x18, 0xC2, 0x60,
-        0x33, 0x64, 0x84, 0xFF, 0x40, 0x42, 0x82, 0xFF, 0xA0, 0x4C, 0x15, 0xBC, 0xF7, 0xB4, 0xA0, 0x51,
-        0xA1, 0xFF, 0xFF, 0xFF, 0x81, 0x3E, 0x70, 0x44, 0xAC, 0x80, 0x46, 0xF3, 0xB8, 0x0A, 0xDD, 0x02,
-        0xCC, 0x84, 0x46, 0xFB, 0xF5, 0x02, 0x84, 0xFF, 0xC2, 0x60, 0x45, 0x64, 0x40, 0x42, 0x82, 0xFF,
-        0x27, 0x44, 0x08, 0xBC, 0x40, 0x47, 0xF9, 0xE1, 0x04, 0x00, 0x78, 0xE1, 0x31, 0x40, 0x01, 0x26,
-        0xF9, 0xE1, 0xA4, 0x60, 0x2D, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0xAB, 0xF1, 0x60, 0x45, 0x33, 0x60,
-        0x6A, 0x61, 0xC5, 0x83, 0xA3, 0xD3, 0xFF, 0xFF, 0x60, 0x41, 0x66, 0x45, 0x24, 0x46, 0x0E, 0xF2,
-        0x65, 0x46, 0x64, 0x45, 0xD5, 0x81, 0x61, 0x45, 0x00, 0x7F, 0xD4, 0x80, 0x64, 0x43, 0x08, 0x04,
-        0xE3, 0x83, 0x63, 0x45, 0xC5, 0x81, 0x61, 0x45, 0xD4, 0x80, 0x02, 0x65, 0x03, 0x07, 0x03, 0x00,
-        0x00, 0x65, 0x01, 0x00, 0x01, 0x65, 0x2E, 0x58, 0xFF, 0xFF, 0x66, 0x43, 0x64, 0x46, 0x8F, 0xF0,
-        0x12, 0xF2, 0x91, 0xF2, 0x60, 0x40, 0x10, 0x36, 0x05, 0x00, 0x12, 0x36, 0x08, 0x00, 0x0C, 0x36,
-        0x0B, 0x00, 0x0F, 0x00, 0x40, 0x61, 0xA5, 0x80, 0x0A, 0x64, 0x13, 0x02, 0xF3, 0x01, 0x10, 0x61,
-        0xA5, 0x80, 0x0E, 0x64, 0x0E, 0x02, 0xEE, 0x01, 0x08, 0x61, 0xA5, 0x80, 0x10, 0x64, 0x09, 0x02,
-        0xE9, 0x01, 0xE1, 0x81, 0xA5, 0x80, 0x03, 0x05, 0xC8, 0x84, 0x03, 0x02, 0xE3, 0x01, 0xFF, 0x61,
-        0x02, 0x00, 0x12, 0xFA, 0x91, 0xFA, 0x63, 0x46, 0x2E, 0x58, 0xFF, 0xFF, 0x8F, 0xF0, 0x12, 0xF2,
-        0x91, 0xF2, 0x60, 0x40, 0x0A, 0x36, 0x05, 0x00, 0x0E, 0x36, 0x08, 0x00, 0x10, 0x36, 0x0B, 0x00,
-        0x0F, 0x00, 0x08, 0x61, 0xA5, 0x80, 0x10, 0x7E, 0x11, 0x02, 0xF3, 0x01, 0x04, 0x61, 0xA5, 0x80,
-        0x12, 0x7E, 0x0C, 0x02, 0xEE, 0x01, 0x20, 0x61, 0xA5, 0x80, 0x0C, 0x7E, 0x07, 0x02, 0xE9, 0x01,
-        0xE9, 0x81, 0xA5, 0x80, 0x05, 0x05, 0xD8, 0x84, 0x01, 0x02, 0xE3, 0x01, 0x12, 0xFA, 0x91, 0xFA,
-        0x2E, 0x58, 0xFF, 0xFF, 0x28, 0x40, 0x08, 0x3A, 0x06, 0x00, 0x04, 0x60, 0x40, 0x62, 0x3D, 0x60,
-        0x58, 0x4D, 0x3B, 0x78, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2B, 0x50, 0x00,
-        0x28, 0x40, 0x08, 0x3A, 0x4D, 0x00, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x19, 0x60,
-        0x52, 0xFB, 0x7D, 0xF1, 0x2B, 0x60, 0x82, 0x63, 0x64, 0x40, 0x01, 0x27, 0x3C, 0xA3, 0x29, 0x40,
-        0x40, 0x2B, 0x1E, 0xA3, 0xBD, 0xD1, 0x63, 0x45, 0x44, 0x4E, 0x0E, 0x61, 0xBD, 0xD1, 0xCD, 0x81,
-        0xD0, 0x80, 0x01, 0x03, 0xFB, 0x04, 0xCB, 0x83, 0x19, 0x60, 0x55, 0xF3, 0x39, 0xF1, 0xD7, 0x83,
-        0xEB, 0x83, 0x2E, 0x41, 0x5D, 0x93, 0xDF, 0x83, 0x19, 0x60, 0x51, 0xFD, 0x19, 0x60, 0x50, 0xFB,
-        0x53, 0x93, 0xDF, 0x80, 0x10, 0x03, 0x38, 0xF3, 0xCF, 0x83, 0x08, 0x03, 0xDF, 0x83, 0x0B, 0x02,
-        0xDF, 0x83, 0xDC, 0x84, 0xF0, 0xA0, 0x38, 0xFB, 0x06, 0x03, 0x03, 0x00, 0xCC, 0x84, 0x38, 0xFB,
-        0x02, 0x03, 0x00, 0x63, 0x02, 0x00, 0x08, 0x64, 0x38, 0xFB, 0xE3, 0x80, 0xFB, 0x83, 0xC3, 0x83,
-        0x63, 0x44, 0xFC, 0xA0, 0x02, 0x0E, 0x08, 0x07, 0x08, 0x00, 0x04, 0xA4, 0xFF, 0xFF, 0x05, 0x0D,
-        0xFC, 0x64, 0xFF, 0x7F, 0x60, 0x43, 0x01, 0x00, 0x04, 0x63, 0x39, 0xFD, 0x19, 0x60, 0x54, 0xFD,
-        0x2F, 0x58, 0xFF, 0xFF, 0x19, 0x60, 0x74, 0xF3, 0x40, 0x4E, 0x60, 0x46, 0x2F, 0xDB, 0x44, 0x44,
-        0xA1, 0xD3, 0xD9, 0x81, 0x48, 0x94, 0x24, 0x5C, 0xD0, 0x9C, 0x66, 0x42, 0x04, 0x06, 0xD2, 0x9C,
-        0x2F, 0xD9, 0x64, 0x46, 0x24, 0x44, 0xE0, 0x84, 0x44, 0xD3, 0xA3, 0xDB, 0xFF, 0xB4, 0x60, 0x5C,
-        0x66, 0x44, 0x22, 0xA4, 0xD0, 0x84, 0xE0, 0xA0, 0x02, 0x0D, 0x00, 0x64, 0x02, 0x00, 0x01, 0x04,
-        0x1F, 0x64, 0xA2, 0xD3, 0x60, 0x5C, 0x64, 0x5E, 0x60, 0x47, 0x2F, 0xD1, 0x28, 0xA3, 0xA3, 0xD9,
-        0xD8, 0xA3, 0x2E, 0x42, 0x4E, 0x8E, 0xBD, 0xDB, 0xDB, 0x02, 0x2D, 0x58, 0xFF, 0xFF, 0x43, 0xFF,
-        0x39, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x84, 0x3E, 0xFB, 0x01, 0x3D, 0x44, 0x00, 0xA8, 0xFF, 0xFF,
-        0x03, 0x02, 0x40, 0xFF, 0x44, 0xFF, 0xF4, 0x01, 0xA0, 0x4C, 0x3D, 0x46, 0x2A, 0xF2, 0x46, 0x4D,
-        0x92, 0xFC, 0x10, 0x25, 0x12, 0x00, 0x09, 0xE1, 0xA1, 0xFF, 0x2D, 0x46, 0x0F, 0xF2, 0x01, 0x29,
-        0x06, 0x00, 0x2A, 0xF0, 0x40, 0xFF, 0x64, 0x40, 0x40, 0x2B, 0x08, 0xBC, 0x02, 0xBC, 0x0F, 0xFA,
-        0x08, 0x25, 0xDD, 0x01, 0xCB, 0xFE, 0x5C, 0x5D, 0xDB, 0x01, 0x44, 0xFF, 0x31, 0xF2, 0x1D, 0x60,
-        0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43,
-        0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02,
-        0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B,
-        0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x07, 0xFC, 0x3F, 0xF2, 0x09, 0x60, 0xB0, 0x65,
-        0xD4, 0x80, 0x2A, 0xF2, 0xC0, 0x05, 0x08, 0x25, 0xAA, 0x01, 0x5C, 0x4B, 0x0C, 0x60, 0xEA, 0x61,
-        0xA1, 0xDF, 0x2D, 0x46, 0x3B, 0xF2, 0xA6, 0xF1, 0x87, 0xF4, 0x60, 0x40, 0x20, 0x2B, 0xC1, 0x00,
-        0xD3, 0x80, 0x2C, 0xF0, 0xB0, 0x03, 0x07, 0xF4, 0x64, 0x40, 0x01, 0x26, 0xA6, 0xF5, 0xBA, 0xF4,
-        0x2D, 0x46, 0x04, 0x64, 0x04, 0xB3, 0x22, 0xF0, 0x03, 0x03, 0xC5, 0x60, 0xE2, 0x78, 0xFF, 0xFF,
-        0x10, 0x64, 0xB0, 0x9C, 0x3B, 0xF2, 0x22, 0xF8, 0x60, 0x47, 0xC0, 0xB7, 0x02, 0xFE, 0xF0, 0x84,
-        0xF0, 0x84, 0xF0, 0x84, 0x00, 0xA8, 0x40, 0x4A, 0x17, 0x03, 0xE0, 0x81, 0x61, 0x43, 0x42, 0xFE,
-        0x00, 0x64, 0xF0, 0x84, 0xFE, 0x1F, 0x40, 0x4A, 0xE1, 0x84, 0xE0, 0x84, 0x2D, 0x46, 0x07, 0xF4,
-        0xE0, 0x81, 0x3B, 0xF0, 0x2A, 0x47, 0x0C, 0x60, 0x38, 0x63, 0xA0, 0x84, 0x47, 0x9C, 0x10, 0x03,
-        0x7C, 0x44, 0x00, 0x60, 0xB2, 0x63, 0x1C, 0x00, 0x07, 0xF4, 0x3B, 0xF0, 0x66, 0x44, 0x64, 0x40,
-        0x80, 0x2B, 0x06, 0x00, 0x00, 0x60, 0x78, 0x7C, 0x00, 0x60, 0xA2, 0x63, 0x43, 0x4C, 0x10, 0x00,
-        0x2D, 0x46, 0xC5, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0x2D, 0x46, 0x22, 0xF2, 0x10, 0x60, 0x00, 0x7C,
-        0xB0, 0x84, 0x22, 0xFA, 0x32, 0x40, 0x04, 0x26, 0x25, 0x00, 0xC5, 0x60, 0xD5, 0x78, 0xFF, 0xFF,
-        0xED, 0xFB, 0xEE, 0xF9, 0xEF, 0xFD, 0xAD, 0x46, 0x3D, 0xF2, 0xAD, 0x46, 0xA3, 0xD0, 0xAD, 0x46,
-        0xD0, 0x80, 0x3C, 0xF2, 0xAD, 0x46, 0x02, 0x03, 0x15, 0x07, 0xE6, 0x04, 0x5B, 0xD0, 0xAD, 0x46,
-        0xD0, 0x80, 0x3A, 0xF2, 0x03, 0x03, 0xAD, 0x46, 0x0D, 0x07, 0xDE, 0x04, 0x3A, 0xF0, 0xAD, 0x46,
-        0x5B, 0xD0, 0x64, 0x44, 0xD0, 0x80, 0x2B, 0x44, 0x05, 0x07, 0xD6, 0x03, 0xD0, 0x84, 0x10, 0xA4,
-        0xFF, 0xFF, 0x00, 0x07, 0xEE, 0xF3, 0xED, 0xF5, 0xFE, 0xA4, 0x0F, 0x60, 0xBE, 0x61, 0x0E, 0x63,
-        0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x2D, 0x46, 0x8B, 0xFF, 0x2D, 0x46, 0x22, 0xF2, 0x20, 0x60,
-        0x00, 0x7C, 0xB0, 0x84, 0x22, 0xFA, 0x0F, 0x60, 0xB0, 0x64, 0xC9, 0x60, 0x58, 0x4F, 0x56, 0x78,
-        0xFF, 0xFF, 0x3F, 0xF2, 0x00, 0x60, 0x18, 0x70, 0x18, 0x71, 0x20, 0x72, 0x60, 0x53, 0x88, 0x75,
-        0x00, 0xF2, 0x09, 0xE1, 0x60, 0x50, 0x12, 0x71, 0x6E, 0x72, 0x83, 0x75, 0xA1, 0xFF, 0xFF, 0xFF,
-        0x08, 0x25, 0x1D, 0x00, 0x40, 0xFF, 0x02, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x75, 0x40, 0x03, 0x2A,
-        0x03, 0x00, 0x80, 0x75, 0x0A, 0x64, 0x0B, 0x00, 0x80, 0x75, 0x1B, 0xF3, 0x8B, 0xFF, 0x02, 0x60,
-        0x00, 0x75, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x75, 0xDC, 0x84, 0xA2, 0xDB, 0x02, 0x64, 0x98, 0xFF,
-        0x2D, 0x46, 0x0F, 0xF0, 0xFF, 0xFF, 0xB0, 0x84, 0xA2, 0xDA, 0x88, 0xFF, 0x0B, 0x01, 0x8B, 0xFF,
-        0x02, 0x60, 0x00, 0x75, 0xFF, 0xFF, 0x02, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xC5, 0x60, 0xBB, 0x78,
-        0xFF, 0xFF, 0x22, 0xF0, 0x22, 0x64, 0xB0, 0x84, 0x22, 0xFA, 0x3A, 0xF0, 0xFF, 0xFF, 0x64, 0x44,
-        0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5B, 0x64, 0x44, 0xE2, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0x7C, 0x5F, 0xE8, 0x84, 0xE8, 0x85, 0x0D, 0x60, 0x00, 0x64, 0x44, 0xD3,
-        0x5A, 0xD1, 0x03, 0x1B, 0xC5, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0x60, 0x45, 0x64, 0x44, 0xE3, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0xE4, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xE5, 0x7F, 0xA0, 0x5B,
-        0x64, 0x47, 0xE6, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xE7, 0x7F, 0xA0, 0x5B, 0x65, 0x40,
-        0x0D, 0x3A, 0x1C, 0x00, 0x64, 0x47, 0xE8, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xE9, 0x7F,
-        0xA0, 0x5B, 0x64, 0x47, 0xEA, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xEB, 0x7F, 0xA0, 0x5B,
-        0x64, 0x47, 0xEC, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xED, 0x7F, 0xA0, 0x5B, 0x64, 0x47,
-        0xEE, 0x7F, 0x5A, 0xD1, 0xA0, 0x5B, 0x64, 0x44, 0xEF, 0x7F, 0xA0, 0x5B, 0x65, 0x44, 0xD8, 0x84,
-        0x08, 0x25, 0x25, 0x00, 0x60, 0x7F, 0xA0, 0x5B, 0x80, 0x60, 0x00, 0xEB, 0xA0, 0x60, 0x00, 0xEB,
-        0xD1, 0x60, 0x00, 0xEB, 0x22, 0xF2, 0x20, 0x60, 0x00, 0x7C, 0xB0, 0x84, 0x22, 0xFA, 0x3F, 0xF2,
-        0x3B, 0xF0, 0x60, 0x43, 0xFC, 0xA4, 0x64, 0x40, 0x20, 0x2B, 0x04, 0x00, 0x08, 0xA4, 0x3F, 0xFA,
-        0x08, 0xA3, 0xF8, 0xA3, 0x3F, 0xFA, 0x0A, 0xE1, 0xB3, 0xFF, 0x9A, 0xFF, 0xCB, 0x83, 0x00, 0xF4,
-        0x10, 0x62, 0x6C, 0x61, 0x0E, 0xA3, 0xAB, 0x84, 0xF2, 0xA3, 0xA1, 0xFF, 0x09, 0x00, 0xDA, 0x00,
-        0x00, 0xF4, 0x81, 0xF2, 0xFC, 0x18, 0x02, 0x62, 0xC9, 0x81, 0xAB, 0x84, 0x01, 0x00, 0xA2, 0xDC,
-        0x7A, 0xD4, 0xFD, 0x1C, 0xA2, 0xDC, 0x08, 0x25, 0xCE, 0x00, 0xF2, 0x1D, 0x41, 0x44, 0x7C, 0xA8,
-        0xD9, 0x81, 0xEE, 0x03, 0xFF, 0xB1, 0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF, 0xFF, 0xFF, 0x64, 0x40,
-        0x20, 0x27, 0x04, 0x00, 0x08, 0x25, 0xBF, 0x00, 0x7B, 0x1E, 0x6F, 0x00, 0x08, 0x25, 0xBB, 0x00,
-        0x40, 0xFF, 0x42, 0x42, 0x46, 0x43, 0x06, 0x1E, 0x04, 0x02, 0x00, 0xF4, 0x02, 0x62, 0x42, 0x42,
-        0x46, 0x43, 0x01, 0xA2, 0x63, 0x45, 0x01, 0xA2, 0x62, 0x43, 0x46, 0x4C, 0xC6, 0x60, 0x58, 0x4F,
-        0x87, 0x78, 0xFF, 0xFF, 0x0A, 0xE1, 0x9A, 0xFF, 0x2D, 0x46, 0x12, 0xF2, 0x3B, 0xF0, 0x33, 0x1B,
-        0x64, 0x40, 0x20, 0x2B, 0x38, 0x00, 0x2D, 0x5C, 0x24, 0x41, 0x02, 0xA1, 0x65, 0x43, 0x08, 0xA3,
-        0x23, 0x46, 0x22, 0x42, 0x7E, 0x3A, 0x0A, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0xB8, 0x18, 0x02, 0x62,
-        0xC9, 0x81, 0xAB, 0x84, 0x03, 0x00, 0xA2, 0xDC, 0x7E, 0x36, 0xF6, 0x01, 0x15, 0x11, 0x7A, 0xD4,
-        0xFF, 0xFF, 0xF9, 0x1C, 0xA2, 0xDC, 0xF0, 0x1D, 0xD9, 0x81, 0xFF, 0xB1, 0x41, 0x1E, 0x62, 0x40,
-        0x7E, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x02, 0x62, 0x07, 0x11, 0x5A, 0xD2, 0x89, 0xFF, 0x80, 0x4F,
-        0x6F, 0x44, 0xA2, 0xDA, 0x88, 0xFF, 0x34, 0x00, 0x62, 0x45, 0x33, 0xF3, 0xFF, 0xFF, 0x03, 0x1B,
-        0x65, 0x42, 0xE5, 0x1D, 0xF2, 0x01, 0x98, 0xFF, 0x2D, 0x46, 0x01, 0x64, 0x12, 0xFA, 0x0F, 0xF0,
-        0x0A, 0x64, 0xB0, 0x84, 0x41, 0x00, 0x24, 0x41, 0x02, 0xA1, 0x65, 0x43, 0x08, 0xA3, 0x23, 0x46,
-        0x22, 0x42, 0x7E, 0x3A, 0x0A, 0x00, 0x00, 0xF4, 0x81, 0xF2, 0x5C, 0x18, 0x02, 0x62, 0xC9, 0x81,
-        0xAB, 0x84, 0x03, 0x00, 0xA2, 0xDC, 0x7E, 0x36, 0xF6, 0x01, 0x7A, 0xD4, 0xFF, 0xFF, 0xFA, 0x1C,
-        0xA2, 0xDC, 0xF1, 0x1D, 0xD9, 0x81, 0xFF, 0xB1, 0x0B, 0x1E, 0x62, 0x40, 0x7E, 0x3A, 0x02, 0x00,
-        0x00, 0xF4, 0x02, 0x62, 0x5A, 0xD2, 0x89, 0xFF, 0x80, 0x4F, 0x6F, 0x44, 0xA2, 0xDA, 0x88, 0xFF,
-        0x98, 0xFF, 0x2D, 0x46, 0x0F, 0xF0, 0x0A, 0x64, 0xB0, 0x84, 0x16, 0x14, 0xF7, 0xB4, 0xA2, 0xDA,
-        0x06, 0x60, 0x75, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0B, 0x00, 0xF0, 0xF5, 0xEF, 0xF4,
-        0x0C, 0x60, 0xEA, 0x61, 0x59, 0xD1, 0x3B, 0xF8, 0x05, 0x64, 0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8,
-        0xFC, 0x02, 0xC3, 0x60, 0x6A, 0x78, 0xFF, 0xFF, 0xA2, 0xDA, 0x2D, 0x46, 0x3B, 0xF0, 0xFF, 0xFF,
-        0x64, 0x40, 0x20, 0x2B, 0x1C, 0x00, 0x07, 0xF4, 0xBB, 0xF0, 0x2A, 0x44, 0xA4, 0x84, 0xFF, 0xFF,
-        0x2F, 0x26, 0x15, 0x00, 0x2D, 0x46, 0x64, 0x44, 0x3A, 0xF0, 0xBC, 0xF0, 0x64, 0x5F, 0x3D, 0xF0,
-        0x07, 0xF4, 0xEF, 0xF4, 0xFF, 0xFF, 0x08, 0xA3, 0x5B, 0xD8, 0x65, 0x5C, 0x5B, 0xD8, 0x5B, 0xDA,
-        0x2D, 0x46, 0xED, 0xF3, 0x3C, 0xFA, 0xEE, 0xF3, 0x3D, 0xFA, 0x2A, 0x44, 0x23, 0xFA, 0xC3, 0x60,
-        0x6A, 0x78, 0xFF, 0xFF, 0xFF, 0xFF, 0x98, 0xFF, 0x43, 0xFF, 0x40, 0xFF, 0xB0, 0xFF, 0xB1, 0xFF,
-        0x2D, 0x46, 0x0C, 0x60, 0xEA, 0x61, 0xA1, 0xD3, 0x2D, 0x46, 0x60, 0x40, 0x01, 0x2A, 0x0A, 0x00,
-        0xF0, 0xF5, 0xEF, 0xF4, 0x59, 0xD1, 0x3B, 0xF8, 0x05, 0x64, 0x59, 0xD1, 0xCC, 0x84, 0xBD, 0xD8,
-        0xFC, 0x02, 0x2D, 0x46, 0xC3, 0x60, 0x48, 0x78, 0xFF, 0xFF, 0x98, 0xFF, 0x09, 0xE1, 0xA1, 0xFF,
-        0x2D, 0x46, 0x08, 0x25, 0xE0, 0x01, 0x0F, 0xF2, 0x40, 0xFF, 0x02, 0xBC, 0xA2, 0xDA, 0xC3, 0x60,
-        0x6A, 0x78, 0xFF, 0xFF, 0xB0, 0x84, 0x22, 0xFA, 0xA0, 0x60, 0x00, 0xEB, 0xB0, 0x60, 0x00, 0xEB,
-        0x00, 0x63, 0x3B, 0xF2, 0x06, 0x60, 0x75, 0xFD, 0x60, 0x47, 0xC0, 0xB7, 0x02, 0xFE, 0xF0, 0x84,
-        0xF0, 0x84, 0xF0, 0x84, 0x00, 0xA8, 0x40, 0x4A, 0x16, 0x03, 0xE0, 0x81, 0x61, 0x43, 0x42, 0xFE,
-        0x00, 0x64, 0xF0, 0x84, 0xFE, 0x1F, 0x40, 0x4A, 0xE1, 0x84, 0xE0, 0x84, 0x2D, 0x46, 0x07, 0xF4,
-        0xE0, 0x81, 0x3B, 0xF0, 0x2A, 0x47, 0x0C, 0x60, 0x38, 0x63, 0xA0, 0x84, 0x47, 0x9C, 0x10, 0x03,
-        0x7C, 0x44, 0xA8, 0x63, 0x0F, 0x00, 0x07, 0xF4, 0x20, 0x64, 0x40, 0x4A, 0x3B, 0xF0, 0x66, 0x44,
-        0x64, 0x40, 0x80, 0x2B, 0x05, 0x00, 0x00, 0x60, 0x78, 0x7C, 0x00, 0x60, 0x98, 0x63, 0x02, 0x00,
-        0x2D, 0x46, 0xBB, 0x01, 0x2D, 0x46, 0xED, 0xFB, 0xEE, 0xF9, 0xEF, 0xFD, 0x07, 0xF2, 0xF0, 0xFB,
-        0x60, 0x46, 0x3B, 0xF0, 0x2A, 0x44, 0x06, 0x60, 0x76, 0xF9, 0x5C, 0x4B, 0xA0, 0x84, 0xFF, 0xFF,
-        0x3F, 0x22, 0x05, 0x00, 0x90, 0x84, 0x3B, 0xFA, 0x01, 0x64, 0x40, 0x4B, 0x2C, 0x00, 0xAD, 0x46,
-        0x0A, 0xA3, 0x3D, 0xF2, 0xAD, 0x46, 0xA3, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3C, 0xF2, 0xAD, 0x46,
-        0x02, 0x03, 0x21, 0x07, 0x14, 0x04, 0x5B, 0xD0, 0xAD, 0x46, 0xD0, 0x80, 0x3B, 0xF2, 0x03, 0x03,
-        0xAD, 0x46, 0x19, 0x07, 0x0C, 0x04, 0x3A, 0xF0, 0xAD, 0x46, 0x5B, 0xD0, 0x64, 0x5F, 0xD0, 0x80,
-        0x2B, 0x44, 0x22, 0x07, 0x04, 0x03, 0xD0, 0x84, 0x10, 0xA4, 0xFF, 0xFF, 0x1D, 0x07, 0x2D, 0x46,
-        0x22, 0xF2, 0x10, 0x60, 0x00, 0x7C, 0xB0, 0x84, 0x22, 0xFA, 0x32, 0x40, 0x04, 0x26, 0x14, 0x00,
-        0xC5, 0x60, 0xD5, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x06, 0x60, 0x75, 0xFB, 0x2D, 0x46, 0x0C, 0x60,
-        0xFA, 0x62, 0x80, 0xFF, 0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC6, 0x60, 0xBC, 0x78, 0xFF, 0xFF,
-        0x85, 0xFF, 0x2D, 0x46, 0x08, 0x25, 0x4F, 0x01, 0x2D, 0x46, 0x0C, 0x60, 0xFA, 0x62, 0x80, 0xFF,
-        0x78, 0x44, 0x03, 0xA4, 0xA2, 0xDB, 0xC7, 0x60, 0x44, 0x78, 0xFF, 0xFF, 0x85, 0xFF, 0x2D, 0x46,
-        0x08, 0x25, 0x41, 0x01, 0x00, 0x60, 0x0F, 0x64, 0x08, 0x25, 0x3C, 0x01, 0x60, 0x7F, 0xA0, 0x5B,
-        0x80, 0x60, 0x00, 0xEB, 0xD3, 0x60, 0x00, 0xEB, 0xC4, 0x60, 0xC2, 0x78, 0xFF, 0xFF, 0x2D, 0x46,
-        0x3B, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x20, 0x2B, 0x23, 0x00, 0x08, 0x61, 0x23, 0x11, 0x2D, 0x46,
-        0x00, 0xF4, 0x0A, 0x62, 0x56, 0x92, 0x5A, 0xD0, 0x2C, 0x46, 0x64, 0x47, 0x63, 0x40, 0x7F, 0x2A,
-        0x03, 0x00, 0x00, 0xF4, 0x03, 0x63, 0x46, 0x4C, 0x60, 0xFE, 0xDE, 0xD8, 0x7F, 0x3A, 0x03, 0x00,
-        0x00, 0xF4, 0x03, 0x63, 0x46, 0x4C, 0xDE, 0xDA, 0xFE, 0xA1, 0x20, 0xFE, 0xE7, 0x02, 0x63, 0x41,
-        0xFD, 0xA1, 0x46, 0x4C, 0x01, 0xF2, 0x2D, 0x46, 0x61, 0x5E, 0x16, 0xFA, 0x2C, 0x44, 0x06, 0xFA,
-        0x2F, 0x58, 0xFF, 0xFF, 0x2D, 0x5C, 0x3D, 0x44, 0x00, 0xA8, 0xD0, 0x80, 0xD8, 0x03, 0xD7, 0x03,
-        0x2D, 0x46, 0x01, 0x64, 0x12, 0xFA, 0xF4, 0x01, 0x07, 0xF4, 0x66, 0x41, 0x03, 0xF2, 0x04, 0xF2,
-        0x40, 0x42, 0x05, 0xF2, 0x40, 0x43, 0x40, 0x44, 0x61, 0x46, 0x3C, 0xF2, 0x3D, 0xF2, 0x40, 0x40,
-        0x40, 0x41, 0x0D, 0x60, 0x70, 0x65, 0x00, 0x61, 0xEE, 0xF1, 0xED, 0xF5, 0x44, 0x4C, 0x2C, 0x5C,
-        0xE9, 0x80, 0x00, 0x64, 0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x24, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x20, 0x44, 0x40, 0x80, 0xDB, 0x83, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x21, 0x44, 0x40, 0x81, 0xDB, 0x83, 0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x22, 0x44, 0x40, 0x82, 0xDB, 0x83, 0xBD, 0xD2, 0x22, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x23, 0x44, 0x40, 0x83, 0xF2, 0xA3, 0xBD, 0xD2, 0x23, 0x5C, 0x90, 0x9C,
-        0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x47, 0x90, 0x9C, 0x24, 0x44, 0xC0, 0x9C, 0x41, 0x84, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01,
-        0x0C, 0x60, 0xEC, 0x61, 0x05, 0x64, 0xEF, 0xF4, 0xF0, 0xF5, 0xFE, 0xA3, 0x5B, 0xD0, 0xCC, 0x84,
-        0x59, 0xD9, 0xFC, 0x02, 0xEF, 0xF3, 0xF0, 0xF5, 0x60, 0x42, 0x20, 0x44, 0xA2, 0xDA, 0x21, 0x44,
-        0x5A, 0xDA, 0x22, 0x44, 0x5A, 0xDA, 0x23, 0x44, 0x5A, 0xDA, 0x24, 0x44, 0x5A, 0xDA, 0x61, 0x46,
-        0x06, 0x60, 0x7D, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x66, 0x41, 0xEF, 0xF3, 0xF0, 0xF5, 0xA0, 0xD2,
-        0x5A, 0xD0, 0x40, 0x40, 0x44, 0x41, 0x5A, 0xD2, 0x5A, 0xD0, 0x40, 0x42, 0x5A, 0xD0, 0x44, 0x43,
-        0x61, 0x46, 0xBA, 0xF0, 0x3B, 0xF2, 0x44, 0x44, 0x65, 0x5F, 0x40, 0x85, 0xEE, 0xF4, 0xED, 0xF5,
-        0x43, 0x4C, 0x0D, 0x60, 0x70, 0x65, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x20, 0x44, 0x40, 0x80, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x21, 0x44,
-        0x40, 0x81, 0xBD, 0xD2, 0x21, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x22, 0x44, 0x40, 0x82,
-        0xBD, 0xD2, 0x22, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x23, 0x44, 0x40, 0x83, 0xBD, 0xD2,
-        0x23, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x24, 0x44, 0x40, 0x84, 0xBD, 0xD2, 0x24, 0x5C,
-        0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x25, 0x44, 0x40, 0x85, 0x61, 0x46, 0x3A, 0xF0, 0xFF, 0xFF,
-        0x64, 0x44, 0xE0, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xE1, 0x7F, 0x5A, 0xD0, 0xA0, 0x5B, 0x64, 0x44,
-        0xE2, 0x7F, 0xA0, 0x5B, 0x64, 0x47, 0xED, 0xF5, 0xBD, 0xD2, 0x25, 0x5C, 0x90, 0x84, 0xE8, 0x80,
-        0xF8, 0x84, 0x20, 0x5C, 0x40, 0x80, 0x20, 0x44, 0xE4, 0x7F, 0xA0, 0x5B, 0x20, 0x47, 0xE5, 0x7F,
-        0xA0, 0x5B, 0xBD, 0xD2, 0x20, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x21, 0x5C, 0x40, 0x81,
-        0x21, 0x44, 0xE6, 0x7F, 0xA0, 0x5B, 0x21, 0x47, 0xE7, 0x7F, 0xA0, 0x5B, 0x21, 0x44, 0xE8, 0x80,
-        0xF8, 0x84, 0x22, 0x5C, 0x40, 0x82, 0x22, 0x44, 0xE8, 0x7F, 0xA0, 0x5B, 0x22, 0x47, 0xE9, 0x7F,
-        0xA0, 0x5B, 0x22, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x23, 0x5C, 0x40, 0x83, 0x23, 0x44, 0xEA, 0x7F,
-        0xA0, 0x5B, 0x23, 0x47, 0xEB, 0x7F, 0xA0, 0x5B, 0x23, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x24, 0x5C,
-        0x40, 0x84, 0x24, 0x44, 0xEC, 0x7F, 0xA0, 0x5B, 0x24, 0x47, 0xED, 0x7F, 0xA0, 0x5B, 0x24, 0x44,
-        0xE8, 0x80, 0xF8, 0x84, 0x25, 0x5C, 0x40, 0x85, 0x25, 0x44, 0xEE, 0x7F, 0xA0, 0x5B, 0x25, 0x47,
-        0xEF, 0x7F, 0xA0, 0x5B, 0x2C, 0x43, 0xA3, 0xD2, 0x25, 0x5C, 0x90, 0x81, 0xE9, 0x84, 0xE3, 0x7F,
-        0xA0, 0x5B, 0x06, 0x60, 0x7D, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0xEA, 0xF3, 0x5A, 0xD3, 0x40, 0x48,
-        0x5A, 0xD3, 0x40, 0x49, 0x40, 0x4A, 0x00, 0x60, 0x78, 0x7C, 0x44, 0x4D, 0x49, 0xF2, 0x4A, 0xF2,
-        0x40, 0x47, 0x40, 0x46, 0x0D, 0x60, 0x70, 0x65, 0x00, 0x61, 0x2D, 0x5C, 0xE9, 0x80, 0x00, 0x64,
-        0xF0, 0x84, 0xF0, 0x84, 0xC0, 0x83, 0xBD, 0xD2, 0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x26, 0x44, 0x40, 0x86, 0xDB, 0x83, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x27, 0x44, 0x40, 0x87, 0xDB, 0x83, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x28, 0x44, 0x40, 0x88, 0xDB, 0x83, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x29, 0x44, 0x40, 0x89, 0xF2, 0xA3, 0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x2A, 0x44, 0xC0, 0x9C, 0x41, 0x8A, 0xDD, 0x81, 0x08, 0x2A, 0xA7, 0x01, 0x26, 0x44, 0x44, 0xFA,
-        0x27, 0x44, 0x45, 0xFA, 0x28, 0x44, 0x46, 0xFA, 0x29, 0x44, 0x47, 0xFA, 0x2A, 0x44, 0x48, 0xFA,
-        0x06, 0x60, 0x7E, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x60, 0x88, 0x7C, 0x44, 0x4D, 0x2D, 0x42,
-        0xA2, 0xD2, 0x5A, 0xD0, 0x40, 0x46, 0x44, 0x47, 0x5A, 0xD2, 0x5A, 0xD0, 0x40, 0x48, 0x5A, 0xD0,
-        0x44, 0x49, 0x4B, 0xF2, 0x44, 0x4A, 0x40, 0x8B, 0x60, 0x5C, 0x64, 0x47, 0xE0, 0x7F, 0xA0, 0x5A,
-        0xFF, 0xB4, 0x20, 0xBC, 0x7F, 0xB4, 0xE1, 0x7F, 0xA0, 0x5A, 0x64, 0x44, 0xE2, 0x7F, 0xA0, 0x5A,
-        0x00, 0x60, 0x78, 0x63, 0x0D, 0x60, 0x70, 0x65, 0xBD, 0xD2, 0x2B, 0x5C, 0x90, 0x9C, 0x64, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47,
-        0x90, 0x9C, 0x26, 0x44, 0x40, 0x86, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C,
-        0x27, 0x44, 0x40, 0x87, 0xBD, 0xD2, 0x27, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84,
-        0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x28, 0x44,
-        0x40, 0x88, 0xBD, 0xD2, 0x28, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1,
-        0x64, 0x44, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x29, 0x44, 0x40, 0x89,
-        0xBD, 0xD2, 0x29, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2A, 0x44, 0x40, 0x8A, 0xBD, 0xD2,
-        0x2A, 0x5C, 0x90, 0x9C, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD1, 0x64, 0x44, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD1, 0x64, 0x47, 0x90, 0x9C, 0x2B, 0x44, 0x40, 0x8B, 0xBD, 0xD2, 0x2B, 0x5C,
-        0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84, 0x26, 0x5C, 0x40, 0x86, 0x26, 0x44, 0xE4, 0x7F, 0xA0, 0x5A,
-        0x26, 0x47, 0xE5, 0x7F, 0xA0, 0x5A, 0xBD, 0xD2, 0x26, 0x5C, 0x90, 0x84, 0xE8, 0x80, 0xF8, 0x84,
-        0x27, 0x5C, 0x40, 0x87, 0x27, 0x44, 0xE6, 0x7F, 0xA0, 0x5A, 0x27, 0x47, 0xE7, 0x7F, 0xA0, 0x5A,
-        0x27, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x28, 0x5C, 0x40, 0x88, 0x28, 0x44, 0xE8, 0x7F, 0xA0, 0x5A,
-        0x28, 0x47, 0xE9, 0x7F, 0xA0, 0x5A, 0x28, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x29, 0x5C, 0x40, 0x89,
-        0x29, 0x44, 0xEA, 0x7F, 0xA0, 0x5A, 0x29, 0x47, 0xEB, 0x7F, 0xA0, 0x5A, 0x29, 0x44, 0xE8, 0x80,
-        0xF8, 0x84, 0x2A, 0x5C, 0x40, 0x8A, 0x2A, 0x44, 0xEC, 0x7F, 0xA0, 0x5A, 0x2A, 0x47, 0xED, 0x7F,
-        0xA0, 0x5A, 0x2A, 0x44, 0xE8, 0x80, 0xF8, 0x84, 0x2B, 0x5C, 0x40, 0x8B, 0x2B, 0x44, 0xEE, 0x7F,
-        0xA0, 0x5A, 0x2B, 0x47, 0xEF, 0x7F, 0xA0, 0x5A, 0x3C, 0xF0, 0x2B, 0x44, 0x90, 0x84, 0xE8, 0x84,
-        0xE3, 0x7F, 0xA0, 0x5A, 0x06, 0x60, 0x7E, 0xF7, 0xFF, 0xFF, 0xFF, 0xFF, 0x60, 0x45, 0x00, 0xF0,
-        0x84, 0x60, 0x00, 0xE3, 0x04, 0x71, 0x64, 0x50, 0x01, 0x2A, 0x04, 0x71, 0x5C, 0x61, 0x04, 0x63,
-        0x59, 0xD0, 0x58, 0xD9, 0xFD, 0x1F, 0x3D, 0xF2, 0x60, 0x43, 0x60, 0x47, 0x5B, 0xDB, 0x3C, 0xF2,
-        0xFF, 0xFF, 0x60, 0x47, 0x5B, 0xDB, 0x3A, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x5B, 0xDB, 0x3F, 0xF2,
-        0xFF, 0xFF, 0x60, 0x47, 0x5B, 0xDB, 0x81, 0x60, 0x18, 0xE3, 0x65, 0x43, 0xE3, 0x84, 0x60, 0x47,
-        0x00, 0x7F, 0x60, 0x50, 0x7F, 0x64, 0x23, 0x94, 0x60, 0x51, 0x7C, 0x72, 0x04, 0x75, 0x0C, 0x60,
-        0x16, 0x61, 0x16, 0x60, 0x00, 0x63, 0x59, 0xDD, 0x2A, 0xF2, 0x87, 0x60, 0x8F, 0x65, 0xA4, 0x87,
-        0x40, 0xBF, 0x59, 0xDB, 0x56, 0x64, 0x0A, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x62, 0x64,
-        0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x35, 0xF2, 0x0F, 0x65, 0xA4, 0x9C, 0x59, 0xD9,
-        0x06, 0x63, 0x59, 0xDF, 0xFE, 0x1F, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0x03, 0x2B, 0x05, 0x00,
-        0x6A, 0x64, 0x04, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x65, 0x40, 0x8F, 0xB0, 0x88, 0x3A,
-        0x02, 0x00, 0x39, 0xF0, 0x59, 0xD9, 0x2F, 0x58, 0xFF, 0xFF, 0x0C, 0x60, 0x16, 0x61, 0xA3, 0x46,
-        0x00, 0xF4, 0x02, 0x64, 0x0A, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x59, 0xDF, 0x59, 0xDF,
-        0xA0, 0x4C, 0x04, 0xBC, 0xFF, 0xB4, 0xA0, 0x51, 0x23, 0x44, 0x01, 0xA7, 0x80, 0xBF, 0x60, 0x50,
-        0x80, 0x60, 0x38, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x01, 0x76, 0xFF, 0xFF, 0x76, 0x44, 0x01, 0x3A,
-        0xFD, 0x01, 0x40, 0x76, 0x40, 0x76, 0x42, 0xFF, 0xFF, 0xFF, 0x40, 0x76, 0x80, 0x60, 0x18, 0x70,
-        0x80, 0x60, 0x18, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x80, 0x60, 0x10, 0x73, 0x02, 0x76, 0x76, 0x44,
-        0xFF, 0xFF, 0x76, 0x44, 0x02, 0x3A, 0xFD, 0x01, 0x40, 0x76, 0x42, 0xFF, 0x3C, 0x46, 0x00, 0xF2,
-        0x80, 0x60, 0x00, 0xBC, 0x60, 0x50, 0x80, 0x60, 0x12, 0x71, 0x80, 0x60, 0x6E, 0x72, 0x3F, 0xF2,
-        0xFF, 0xFF, 0xF8, 0xA7, 0x80, 0xBF, 0x60, 0x53, 0x04, 0x76, 0xFF, 0xFF, 0x88, 0xFF, 0x3C, 0x46,
-        0x07, 0xF2, 0xFF, 0xFF, 0x40, 0x43, 0xA3, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x77, 0x40, 0x8B, 0xFF,
-        0xA0, 0x4B, 0x04, 0xE1, 0xFF, 0xFF, 0x76, 0x44, 0x04, 0x3A, 0xFD, 0x01, 0x40, 0x76, 0x42, 0xFF,
-        0xFF, 0xFF, 0x10, 0x76, 0xFF, 0xFF, 0x76, 0x44, 0x20, 0x3A, 0xFD, 0x01, 0x40, 0x76, 0x42, 0xFF,
-        0x63, 0x44, 0x00, 0x7F, 0xA0, 0x51, 0x02, 0x60, 0x00, 0x75, 0x88, 0xFF, 0xA0, 0x4C, 0xFB, 0xB4,
-        0xA0, 0x51, 0x06, 0x60, 0x1F, 0xE1, 0x16, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xF2,
-        0xFF, 0xFF, 0xF8, 0xA4, 0x3F, 0xFA, 0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA, 0xA0, 0x48, 0x08, 0x26,
-        0x07, 0x00, 0xA0, 0x4C, 0x04, 0xE1, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x00, 0x7F, 0xA0, 0x51,
-        0x42, 0xFF, 0x26, 0x46, 0x8B, 0xFF, 0x02, 0x60, 0x00, 0x75, 0x3C, 0xF2, 0x40, 0x76, 0x14, 0x1B,
-        0x26, 0x46, 0x3B, 0xF2, 0x0C, 0x60, 0xBA, 0x63, 0x60, 0x47, 0xC0, 0xB4, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0x43, 0x93, 0xE3, 0x9C, 0x64, 0x47, 0x80, 0x7C, 0x64, 0x5F, 0x60, 0x50, 0x7F, 0x64,
-        0x23, 0x97, 0x80, 0xBF, 0x60, 0x51, 0x07, 0x00, 0x01, 0xA7, 0x80, 0xBF, 0x60, 0x50, 0x80, 0x60,
-        0x40, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x01, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21,
-        0xFC, 0x01, 0x04, 0x25, 0xD5, 0x01, 0x40, 0x76, 0x43, 0xFF, 0x0C, 0x60, 0x22, 0x61, 0x26, 0x46,
-        0x00, 0xF4, 0x02, 0x64, 0x0A, 0x63, 0x58, 0xD0, 0x59, 0xD9, 0xFD, 0x1F, 0x59, 0xDF, 0x59, 0xDF,
-        0x80, 0x60, 0x18, 0x70, 0x80, 0x60, 0x24, 0x71, 0x80, 0x60, 0x7C, 0x72, 0x80, 0x60, 0x10, 0x73,
-        0x02, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21, 0xFC, 0x01, 0x04, 0x25, 0xB8, 0x01,
-        0x40, 0x76, 0x43, 0xFF, 0x26, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x80, 0xBF, 0x60, 0x50,
-        0x80, 0x60, 0x12, 0x71, 0x3F, 0xF2, 0x80, 0x60, 0x6E, 0x72, 0x60, 0x47, 0x80, 0xBF, 0x60, 0x53,
-        0x04, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21, 0xFC, 0x01, 0x04, 0x25, 0xA0, 0x01,
-        0x40, 0x76, 0x43, 0xFF, 0x08, 0x76, 0xFF, 0xFF, 0xA1, 0xFF, 0xFF, 0xFF, 0x0C, 0x21, 0xFC, 0x01,
-        0x04, 0x25, 0x96, 0x01, 0x76, 0x5C, 0xFF, 0xFF, 0x40, 0x76, 0x43, 0xFF, 0x88, 0xFF, 0x26, 0x46,
-        0x2F, 0x58, 0xFF, 0xFF, 0xEE, 0x60, 0x60, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x00, 0xDB, 0xF3, 0x31, 0x41, 0x01, 0xB1,
-        0x03, 0xA8, 0x2A, 0x03, 0x15, 0x02, 0x20, 0x40, 0x04, 0x2B, 0x0B, 0x00, 0xBB, 0xFE, 0xCA, 0xFE,
-        0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x07, 0x00, 0x08, 0x60, 0x09, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x80, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x0C, 0x00,
-        0xA9, 0xFE, 0xDB, 0x05, 0xAB, 0xFE, 0x0C, 0x05, 0xA8, 0xFE, 0xCC, 0x05, 0xAA, 0xFE, 0xCD, 0x05,
-        0x78, 0x43, 0x01, 0x61, 0x29, 0x60, 0xEA, 0x78, 0xA1, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x85, 0x3E,
-        0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x03, 0x02, 0xCA, 0x60, 0xD4, 0x78,
-        0xFF, 0xFF, 0x26, 0x45, 0xD4, 0x80, 0x0F, 0xF0, 0xF9, 0x03, 0x64, 0x44, 0x70, 0xB0, 0x70, 0x2A,
-        0x13, 0x00, 0x16, 0x60, 0x85, 0xF3, 0xFF, 0xFF, 0xDC, 0x84, 0x00, 0x36, 0x00, 0x3B, 0xA2, 0xDB,
-        0xA2, 0xFF, 0xAC, 0xF3, 0xFF, 0xFF, 0xCC, 0x84, 0xFE, 0xA0, 0xAC, 0xFB, 0x01, 0x07, 0xD4, 0xFE,
-        0xA3, 0xFF, 0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0x64, 0x40, 0x02, 0x26, 0x09, 0x00, 0x66, 0x45,
-        0x09, 0xF4, 0x0F, 0xF2, 0x02, 0x18, 0x65, 0x46, 0xE4, 0x1B, 0x00, 0x64, 0x40, 0x46, 0xCC, 0x01,
-        0xA2, 0xFF, 0xAC, 0xF3, 0x46, 0x46, 0xCC, 0x84, 0xFE, 0xA0, 0xAC, 0xFB, 0x01, 0x07, 0xD4, 0xFE,
-        0xA3, 0xFF, 0x0F, 0xF0, 0xA3, 0xFC, 0x64, 0x44, 0x80, 0x26, 0x35, 0x00, 0x2C, 0x60, 0xEA, 0x64,
-        0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00, 0x07, 0x60,
-        0x01, 0x64, 0x22, 0x00, 0x02, 0x2A, 0x03, 0x00, 0x00, 0x60, 0x01, 0x64, 0x1D, 0x00, 0x04, 0x2A,
-        0x1F, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x0C, 0xB0, 0x08, 0x3A, 0x1A, 0x00, 0x2C, 0xF0, 0x22, 0xF0,
-        0x64, 0x40, 0x01, 0x26, 0x0B, 0x00, 0x64, 0x40, 0x40, 0x2B, 0x12, 0x00, 0x8F, 0xB0, 0x88, 0x3A,
-        0x0F, 0x00, 0x39, 0xF2, 0xFF, 0xFF, 0x60, 0xB0, 0x20, 0x3A, 0x0A, 0x00, 0x23, 0xF2, 0x00, 0x60,
-        0x01, 0x7C, 0xB0, 0x84, 0x23, 0xFA, 0x0C, 0x00, 0x23, 0xFA, 0xD0, 0x60, 0xC1, 0x78, 0xFF, 0xFF,
-        0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x10, 0x27, 0xF8, 0x01,
-        0x0F, 0xF0, 0xFF, 0xFF, 0x64, 0x44, 0x08, 0x26, 0x64, 0x00, 0x2A, 0xF2, 0x60, 0x63, 0x60, 0x40,
-        0x02, 0x2B, 0x66, 0x63, 0xBE, 0xD2, 0x81, 0xF1, 0xA3, 0xD2, 0xD0, 0x80, 0x80, 0xF1, 0x0D, 0x02,
-        0xBF, 0xD2, 0xD0, 0x80, 0x7F, 0xF1, 0x09, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x06, 0x02, 0x2C, 0x60,
-        0xF6, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x32, 0x44, 0x01, 0x2A, 0x03, 0x00,
-        0x07, 0x60, 0x02, 0x64, 0x04, 0x00, 0x02, 0x2A, 0x06, 0x00, 0x00, 0x60, 0x02, 0x64, 0x23, 0xFA,
-        0xD0, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0xB0, 0x3A, 0x06, 0x00,
-        0x00, 0x60, 0x02, 0x64, 0x23, 0xFA, 0xCC, 0x60, 0x31, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x04, 0x2A,
-        0x2D, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x0C, 0xB0, 0x08, 0x3A, 0x28, 0x00, 0x2C, 0xF0, 0x22, 0xF0,
-        0x64, 0x40, 0x01, 0x26, 0x0B, 0x00, 0x64, 0x40, 0x40, 0x2B, 0x20, 0x00, 0x8F, 0xB0, 0x88, 0x3A,
-        0x1D, 0x00, 0x39, 0xF2, 0xFF, 0xFF, 0x60, 0xB0, 0x20, 0x3A, 0x18, 0x00, 0x2C, 0xF0, 0x66, 0x45,
-        0x07, 0xF4, 0x64, 0x40, 0x01, 0x26, 0xA6, 0xF5, 0x3A, 0xF2, 0x65, 0x46, 0x60, 0x40, 0x00, 0x36,
-        0x0D, 0x00, 0x22, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x10, 0x2A, 0x08, 0x00, 0x20, 0x2B, 0x06, 0x00,
-        0x23, 0xF2, 0x00, 0x60, 0x02, 0x7C, 0xB0, 0x84, 0x23, 0xFA, 0x03, 0x00, 0xD0, 0x60, 0xB5, 0x78,
-        0xFF, 0xFF, 0x32, 0x44, 0x01, 0x2A, 0x4A, 0x00, 0x2E, 0x60, 0x40, 0x63, 0xBF, 0xD3, 0x00, 0x65,
-        0xB4, 0x81, 0xDB, 0x83, 0x3D, 0x03, 0xBF, 0xD3, 0xA3, 0xD3, 0x40, 0x48, 0xBE, 0xD3, 0x40, 0x4A,
-        0x2E, 0xF0, 0x40, 0x4C, 0xD0, 0x80, 0x2D, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x2C, 0xF0,
-        0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x2B, 0x03, 0x31, 0xF0, 0x2C, 0x44, 0xD0, 0x80,
-        0x30, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x2F, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80,
-        0xFF, 0xFF, 0x1E, 0x03, 0x34, 0xF0, 0x2C, 0x44, 0xD0, 0x80, 0x33, 0xF0, 0x08, 0x02, 0x2A, 0x44,
-        0xD0, 0x80, 0x32, 0xF0, 0x04, 0x02, 0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x11, 0x03, 0x38, 0xF0,
-        0x2C, 0x44, 0xD0, 0x80, 0x37, 0xF0, 0x08, 0x02, 0x2A, 0x44, 0xD0, 0x80, 0x36, 0xF0, 0x04, 0x02,
-        0x28, 0x44, 0xD0, 0x80, 0xFF, 0xFF, 0x04, 0x03, 0xFA, 0xA1, 0x06, 0xA3, 0xB7, 0x03, 0xC3, 0x01,
-        0x07, 0x60, 0x00, 0x64, 0x23, 0xFA, 0xD0, 0x60, 0xC1, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x0F, 0xF0,
-        0x60, 0x45, 0xA4, 0x36, 0x08, 0x00, 0x0C, 0xB4, 0x04, 0x36, 0x02, 0x00, 0x0C, 0x3A, 0x06, 0x00,
-        0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0xCE, 0x60, 0x7C, 0x78, 0xFF, 0xFF, 0x0F, 0xF0, 0x65, 0x40,
-        0x40, 0x2B, 0x17, 0x00, 0x32, 0x40, 0x08, 0x26, 0x14, 0x00, 0x07, 0xF4, 0x3A, 0xF2, 0xFF, 0xFF,
-        0x37, 0xB4, 0x26, 0x46, 0x0E, 0x02, 0x2C, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x06, 0x00,
-        0x2C, 0x60, 0xF0, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0xD0, 0x60, 0xB5, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0x64, 0x40, 0x60, 0x26, 0x03, 0x00, 0xCE, 0x60, 0x4E, 0x78, 0xFF, 0xFF,
-        0x60, 0x41, 0xA6, 0xF3, 0x07, 0xFA, 0x61, 0x44, 0x80, 0x3A, 0x02, 0x00, 0x2A, 0xF2, 0x12, 0x00,
-        0x60, 0x40, 0x40, 0x3A, 0x0F, 0x00, 0xDB, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0x03, 0x3A, 0xE6, 0x01,
-        0xD1, 0x60, 0x58, 0x4D, 0xA6, 0x78, 0xFF, 0xFF, 0xE1, 0x02, 0xA6, 0xF3, 0x07, 0xFA, 0xCD, 0x60,
-        0xE1, 0x78, 0xFF, 0xFF, 0x5E, 0x63, 0x60, 0x40, 0x02, 0x2B, 0x64, 0x63, 0x50, 0xFE, 0xBD, 0xD2,
-        0x7F, 0xF1, 0xBD, 0xD2, 0xD0, 0x80, 0x80, 0xF1, 0xBD, 0xD2, 0xD0, 0x80, 0x81, 0xF1, 0x2A, 0xF2,
-        0xD0, 0x80, 0x60, 0x40, 0x08, 0x3A, 0x09, 0x00, 0x01, 0x0C, 0xC8, 0x01, 0xE9, 0x60, 0x58, 0x4F,
-        0x08, 0x78, 0xFF, 0xFF, 0xCD, 0x60, 0xE1, 0x78, 0xFF, 0xFF, 0x23, 0x0C, 0xD1, 0x60, 0x58, 0x4D,
-        0xA6, 0x78, 0xFF, 0xFF, 0xBB, 0x02, 0x02, 0x64, 0x10, 0x60, 0x0A, 0xFB, 0x00, 0x64, 0x10, 0x60,
-        0x0E, 0xFB, 0x26, 0x60, 0x58, 0x4E, 0x65, 0x78, 0xFF, 0xFF, 0x10, 0x60, 0x05, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x80, 0x27, 0x07, 0x00, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x64, 0x10, 0x60, 0x0A, 0xFB, 0xA0, 0x01, 0xCD, 0x60, 0xE1, 0x78,
-        0xFF, 0xFF, 0xDB, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0xFD, 0xA0, 0xFF, 0xFF, 0x03, 0x03, 0x20, 0x40,
-        0x10, 0x22, 0xF4, 0x01, 0x08, 0x60, 0x07, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x36, 0x07, 0x00,
-        0x01, 0x64, 0xA2, 0xDB, 0x01, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x31, 0xF2, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41,
-        0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02,
-        0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF,
-        0x63, 0x46, 0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0xA6, 0xF1, 0x43, 0x43,
-        0xD3, 0x80, 0xFF, 0xFF, 0x03, 0x03, 0xCD, 0x60, 0xD9, 0x78, 0xFF, 0xFF, 0xD0, 0x60, 0x58, 0x4F,
-        0xFC, 0x78, 0xFF, 0xFF, 0x03, 0x4B, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF4, 0xA3, 0x00, 0x60,
-        0x1D, 0x61, 0x00, 0x60, 0x01, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E,
-        0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x00, 0x02, 0x00, 0x64, 0x40, 0x4A, 0x60, 0xFE,
-        0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60, 0x58, 0x4E, 0x2C, 0x78,
-        0xFF, 0xFF, 0x20, 0xFE, 0x00, 0x65, 0x00, 0x64, 0x19, 0x60, 0x3B, 0xFB, 0x02, 0x00, 0x20, 0xFE,
-        0xFF, 0x65, 0x02, 0x60, 0x00, 0x63, 0x60, 0xFE, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0x20, 0xFE,
-        0xCD, 0x81, 0x60, 0x40, 0x80, 0x2A, 0x39, 0x00, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x01, 0x64,
-        0x2E, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64, 0x2A, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x04, 0x64,
-        0x26, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x22, 0x00, 0x0C, 0x3A, 0x02, 0x00, 0x10, 0x64,
-        0x1E, 0x00, 0x12, 0x3A, 0x02, 0x00, 0x20, 0x64, 0x1A, 0x00, 0x18, 0x3A, 0x02, 0x00, 0x40, 0x64,
-        0x16, 0x00, 0x24, 0x3A, 0x02, 0x00, 0x80, 0x64, 0x12, 0x00, 0x30, 0x3A, 0x02, 0x00, 0x01, 0x67,
-        0x0E, 0x00, 0x48, 0x3A, 0x02, 0x00, 0x02, 0x67, 0x0A, 0x00, 0x60, 0x3A, 0x02, 0x00, 0x04, 0x67,
-        0x06, 0x00, 0x6C, 0x3A, 0x02, 0x00, 0x08, 0x67, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x19, 0x60,
-        0x3B, 0xF1, 0xFF, 0xFF, 0xB0, 0x84, 0x19, 0x60, 0x3B, 0xFB, 0x61, 0x40, 0x00, 0x36, 0x05, 0x00,
-        0x60, 0xFE, 0xBD, 0xD3, 0xFF, 0xFF, 0x20, 0xFE, 0xBB, 0x01, 0x65, 0x40, 0x00, 0x3A, 0x1E, 0x00,
-        0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF4, 0xA3, 0x00, 0x60, 0x1D, 0x61, 0x00, 0x60,
-        0x32, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E, 0x7A, 0x78, 0xFF, 0xFF,
-        0x00, 0xBB, 0xFF, 0xFF, 0x0B, 0x03, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3,
-        0x60, 0x41, 0xFE, 0x60, 0x58, 0x4E, 0x2C, 0x78, 0xFF, 0xFF, 0x91, 0x01, 0x20, 0xFE, 0x00, 0x65,
-        0xFC, 0x60, 0x58, 0x4E, 0xC7, 0x78, 0xFF, 0xFF, 0xA1, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27,
-        0x04, 0x00, 0xFD, 0x60, 0x58, 0x4E, 0x11, 0x78, 0xFF, 0xFF, 0x20, 0xFE, 0x37, 0x60, 0xF8, 0x61,
-        0xA1, 0xD1, 0xA1, 0xF3, 0x01, 0x60, 0xAC, 0x63, 0x60, 0x45, 0x2A, 0x44, 0x79, 0xFB, 0xA3, 0xD5,
-        0x65, 0x40, 0x01, 0x27, 0x5B, 0xD5, 0x65, 0x40, 0x01, 0x27, 0x59, 0xD1, 0x66, 0x41, 0xA0, 0x84,
-        0x24, 0x94, 0x2B, 0x46, 0x0F, 0xFA, 0x7A, 0xFB, 0x16, 0x64, 0x12, 0xFA, 0x01, 0x64, 0x11, 0xFA,
-        0x66, 0x5C, 0xC2, 0x60, 0x58, 0x4E, 0x6D, 0x78, 0xFF, 0xFF, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x01, 0x27, 0x28, 0x00, 0x19, 0x60, 0x44, 0xF3, 0x32, 0x60, 0x88, 0x63, 0xA3, 0xD3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x2A, 0x0C, 0x00, 0x0F, 0x64, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF,
-        0xFF, 0x60, 0xFF, 0x63, 0x1A, 0x60, 0xB3, 0xFD, 0x1A, 0x60, 0xC3, 0xFD, 0x1C, 0x00, 0x19, 0x60,
-        0x39, 0xF3, 0x3F, 0x40, 0x01, 0x27, 0x08, 0x00, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xFC, 0x60,
-        0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0x0F, 0x00, 0x0F, 0xB4, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78,
-        0xFF, 0xFF, 0x09, 0x00, 0x19, 0x60, 0x3A, 0xF3, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xFC, 0x60,
-        0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0xD3, 0x60, 0x58, 0x4E, 0x78, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x23, 0x43, 0x32, 0x40, 0x08, 0x2A, 0x05, 0x00, 0x63, 0x46, 0x80, 0x60, 0x02, 0x64, 0x06, 0xFA,
-        0x26, 0x46, 0x2C, 0x60, 0xE4, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x27, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3B, 0x07, 0x00, 0x2C, 0x60, 0xF2, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x08, 0x00, 0x02, 0x3B, 0x06, 0x00, 0x2C, 0x60, 0xF4, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x1B, 0xF2, 0xFF, 0xFF, 0xE4, 0xA4, 0x3E, 0xFA, 0x2A, 0xF2,
-        0x28, 0x41, 0x40, 0xA8, 0x01, 0xB1, 0x02, 0x02, 0x46, 0x02, 0x76, 0x00, 0x60, 0x40, 0x08, 0x2A,
-        0x0F, 0x00, 0x2C, 0x60, 0xE2, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x1B, 0xF2,
-        0xFF, 0xFF, 0x60, 0x45, 0x2C, 0x60, 0xE8, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xF0, 0x78, 0xB5, 0xF1,
-        0x0F, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x40, 0x26, 0x28, 0x00, 0x32, 0x44, 0x02, 0x26, 0x25, 0x00,
-        0x10, 0x2B, 0x29, 0x00, 0x2E, 0x60, 0x40, 0x63, 0xBF, 0xD3, 0x2C, 0xF0, 0x00, 0xA8, 0x60, 0x41,
-        0x0D, 0x03, 0x50, 0xFE, 0xBD, 0xD3, 0x2D, 0xF0, 0xD0, 0x80, 0xBD, 0xD3, 0x2E, 0xF0, 0xD0, 0x80,
-        0xBD, 0xD3, 0x2C, 0xF0, 0xD0, 0x80, 0xFA, 0xA1, 0x10, 0x0C, 0xF3, 0x02, 0x50, 0xFE, 0x60, 0x60,
-        0x01, 0x64, 0xD0, 0x80, 0x2D, 0xF0, 0x1D, 0x64, 0xD0, 0x80, 0x2E, 0xF0, 0x01, 0x64, 0xD0, 0x80,
-        0xFF, 0xFF, 0x03, 0x0C, 0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x40, 0x2A, 0x03, 0x00,
-        0x1C, 0x60, 0x12, 0x78, 0xFF, 0xFF, 0xD0, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x40, 0x26,
-        0xF7, 0x01, 0x2A, 0xF0, 0xFF, 0xFF, 0x64, 0x40, 0x08, 0x2A, 0x2A, 0x00, 0xDB, 0xF3, 0xFF, 0xFF,
-        0x07, 0xB4, 0x03, 0xA8, 0xFF, 0xFF, 0x03, 0x03, 0x32, 0x40, 0x02, 0x2A, 0x1D, 0x00, 0x03, 0x67,
-        0xA0, 0x84, 0x00, 0x37, 0x64, 0x63, 0x60, 0x40, 0x02, 0x37, 0x5E, 0x63, 0x60, 0x40, 0x01, 0x37,
-        0x58, 0x63, 0x60, 0x40, 0x03, 0x37, 0x0D, 0x00, 0xBD, 0xD2, 0x7F, 0xF1, 0xBD, 0xD2, 0xD0, 0x80,
-        0x80, 0xF1, 0x07, 0x02, 0xD0, 0x80, 0xBD, 0xD2, 0x81, 0xF1, 0x03, 0x02, 0xD0, 0x80, 0xFF, 0xFF,
-        0x03, 0x03, 0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0xE9, 0x60, 0x58, 0x4F, 0x08, 0x78, 0xFF, 0xFF,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x26, 0x06, 0x00, 0x20, 0x40, 0x10, 0x2B, 0x03, 0x00,
-        0xD0, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x87, 0xF4, 0xA6, 0xF1, 0x27, 0x1B, 0x31, 0xF2, 0x1D, 0x60,
-        0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43,
-        0x05, 0xF2, 0x16, 0x18, 0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02,
-        0x61, 0x46, 0x30, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B,
-        0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43, 0x61, 0x46, 0x03, 0x00, 0xD3, 0x80, 0xFF, 0xFF, 0xD6, 0x03,
-        0x43, 0x43, 0xDB, 0xF3, 0x32, 0x40, 0x02, 0x26, 0x04, 0x00, 0x07, 0xB4, 0x03, 0xA8, 0x2A, 0xF2,
-        0x45, 0x02, 0xA6, 0xF1, 0x23, 0x43, 0xD3, 0x80, 0xFF, 0xFF, 0x40, 0x02, 0xD0, 0x60, 0x58, 0x4F,
-        0xFC, 0x78, 0xFF, 0xFF, 0x32, 0x40, 0x02, 0x2A, 0x05, 0x00, 0x63, 0x46, 0x02, 0x64, 0x06, 0xFA,
-        0x26, 0x46, 0x34, 0x00, 0x32, 0x40, 0x08, 0x2A, 0x05, 0x00, 0x63, 0x46, 0x80, 0x60, 0x02, 0x64,
-        0x06, 0xFA, 0x26, 0x46, 0x43, 0x43, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x09, 0x00,
-        0x19, 0x60, 0x44, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x23, 0x46, 0x0F, 0x64,
-        0x10, 0x00, 0x37, 0x60, 0xF8, 0x61, 0xA1, 0xD1, 0xA1, 0xF3, 0x01, 0x60, 0xAC, 0x63, 0x60, 0x45,
-        0xA3, 0xD3, 0x65, 0x40, 0x01, 0x27, 0x5B, 0xD3, 0x65, 0x40, 0x01, 0x27, 0x59, 0xD1, 0x23, 0x46,
-        0xA0, 0x84, 0x0F, 0xFA, 0x7A, 0xFB, 0x79, 0xFB, 0x16, 0x64, 0x12, 0xFA, 0x01, 0x64, 0x11, 0xFA,
-        0x66, 0x5C, 0xC2, 0x60, 0x58, 0x4E, 0x6D, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x07, 0xFC, 0x43, 0x43,
-        0x2A, 0xF2, 0x63, 0x45, 0x0C, 0xB4, 0x08, 0x3A, 0x0A, 0x00, 0xDB, 0xF3, 0x23, 0x46, 0x07, 0xB4,
-        0xFD, 0xA0, 0x06, 0xF2, 0x26, 0x46, 0x03, 0x03, 0x60, 0x40, 0x02, 0x2A, 0x0D, 0x00, 0x2A, 0xF2,
-        0x35, 0xF0, 0x60, 0x40, 0xA4, 0x36, 0x0B, 0x00, 0x08, 0x2B, 0x0C, 0x00, 0x23, 0x46, 0x26, 0xF2,
-        0x26, 0x46, 0xD0, 0x80, 0xFF, 0xFF, 0x06, 0x02, 0xD0, 0x60, 0xB5, 0x78, 0xFF, 0xFF, 0xD0, 0x60,
-        0x6B, 0x78, 0xFF, 0xFF, 0x23, 0x46, 0x22, 0xF2, 0x26, 0x46, 0x44, 0x4C, 0x0F, 0x26, 0x1D, 0x00,
-        0x00, 0xBC, 0x40, 0x45, 0x0B, 0x03, 0x00, 0x64, 0x23, 0x46, 0x22, 0xFA, 0x26, 0x46, 0xA2, 0xFF,
-        0xB6, 0x60, 0x58, 0x4E, 0xF5, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46, 0x2A, 0xF0, 0x2C, 0x44,
-        0x64, 0x40, 0x04, 0x27, 0x0A, 0x00, 0x23, 0x46, 0x26, 0xFA, 0x26, 0x46, 0x1B, 0xF2, 0xFF, 0xFF,
-        0xE4, 0xA4, 0x3E, 0xFA, 0xD0, 0x60, 0x22, 0x78, 0xFF, 0xFF, 0x3F, 0xF2, 0x02, 0xFA, 0xA2, 0xFF,
-        0x16, 0xF0, 0xFF, 0xFF, 0x64, 0x44, 0x01, 0x26, 0xDC, 0x9C, 0xB0, 0xF3, 0x2A, 0xF2, 0xDC, 0x83,
-        0xB0, 0xFD, 0x06, 0xF4, 0x01, 0xF8, 0x26, 0x46, 0x60, 0x40, 0x40, 0x2B, 0x18, 0x00, 0x64, 0x44,
-        0x00, 0x65, 0xFF, 0xB4, 0xFC, 0xA4, 0x06, 0xF0, 0x03, 0x03, 0x64, 0x46, 0x0C, 0x0D, 0x02, 0x65,
-        0x26, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x60, 0x46, 0xF9, 0x01,
-        0x01, 0xF2, 0xFF, 0xFF, 0xD4, 0x84, 0x01, 0xFA, 0x66, 0x44, 0x26, 0x46, 0x06, 0xFA, 0x06, 0xF4,
-        0x00, 0xF2, 0x80, 0xFC, 0x40, 0x45, 0xB6, 0x60, 0x58, 0x4E, 0xF5, 0x78, 0xFF, 0xFF, 0xA3, 0xFF,
-        0x26, 0x46, 0x2C, 0x44, 0x0F, 0x26, 0x13, 0x00, 0x23, 0x46, 0x26, 0xFA, 0x26, 0x44, 0x22, 0xFA,
-        0x26, 0x46, 0x1B, 0xF2, 0xFF, 0xFF, 0xE4, 0xA4, 0x3E, 0xFA, 0x00, 0x64, 0x13, 0x60, 0x0D, 0xFB,
-        0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x6E, 0x00, 0xA3, 0x46,
-        0x26, 0xF2, 0x60, 0x45, 0xDC, 0x84, 0xD4, 0x80, 0x26, 0xFA, 0xA3, 0x46, 0x6B, 0x02, 0x2A, 0xF0,
-        0xA3, 0x46, 0x22, 0xF2, 0xA3, 0x46, 0x00, 0xBC, 0x00, 0xF2, 0x01, 0x02, 0x63, 0x00, 0x44, 0x4C,
-        0x3F, 0xF0, 0x60, 0x43, 0x23, 0x46, 0x22, 0xF4, 0x09, 0x60, 0x00, 0x65, 0x3F, 0xF2, 0x26, 0x46,
-        0xC0, 0x84, 0xD4, 0x80, 0x60, 0x45, 0x56, 0x07, 0x80, 0xFC, 0x1B, 0xF2, 0x06, 0xF2, 0x60, 0x41,
-        0x23, 0x46, 0x22, 0xF4, 0x1B, 0xF0, 0x06, 0xF0, 0xC1, 0x81, 0x06, 0xFA, 0x05, 0xFA, 0x9B, 0xFA,
-        0x65, 0x44, 0x3F, 0xFA, 0x64, 0x46, 0x00, 0xFC, 0x63, 0x46, 0x01, 0xF2, 0x10, 0x61, 0xF2, 0xA4,
-        0x01, 0xFA, 0xC8, 0x83, 0x02, 0x64, 0x59, 0xD0, 0x58, 0xD8, 0xFD, 0x1F, 0x06, 0x45, 0x00, 0x64,
-        0x13, 0x60, 0x0D, 0xFB, 0x25, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xA2, 0xFF, 0x00, 0xF4, 0x01, 0xF0, 0x0A, 0x18, 0x70, 0x67, 0xA0, 0x80, 0xF0, 0x67, 0x06, 0x03,
-        0xC0, 0x84, 0x01, 0xFA, 0x25, 0x46, 0x25, 0x44, 0x80, 0xFC, 0x05, 0xFA, 0xB6, 0x60, 0x58, 0x4E,
-        0xF5, 0x78, 0xFF, 0xFF, 0xD4, 0xFE, 0xA3, 0xFF, 0x2C, 0x44, 0x04, 0x27, 0x16, 0x00, 0x23, 0x46,
-        0x22, 0xF2, 0xA2, 0xFC, 0x60, 0x46, 0x46, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x47, 0x08, 0xFA,
-        0x26, 0x46, 0x2C, 0x43, 0x2A, 0xFC, 0x06, 0xF4, 0x00, 0x64, 0x00, 0xFA, 0x01, 0xF0, 0x80, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0x01, 0xFA, 0x26, 0x46, 0x1D, 0x00, 0x00, 0x66, 0x46, 0x46, 0xCA, 0x60,
-        0xD8, 0x78, 0xFF, 0xFF, 0xA3, 0x46, 0x22, 0xF0, 0xA2, 0xFC, 0x00, 0x63, 0x33, 0x85, 0xA3, 0x46,
-        0x0D, 0x03, 0xA3, 0x46, 0x26, 0xF2, 0x0F, 0x65, 0xA4, 0x85, 0xD4, 0x84, 0x26, 0xFA, 0xA3, 0x46,
-        0xA2, 0xFF, 0xB6, 0x60, 0x58, 0x4E, 0xF5, 0x78, 0xFF, 0xFF, 0xA3, 0xFF, 0x26, 0x46, 0xD0, 0x60,
-        0xB5, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x32, 0xF0, 0x60, 0x40, 0x08, 0x2A, 0x24, 0x00, 0x01, 0x2B,
-        0x13, 0x00, 0x64, 0x40, 0x01, 0x2A, 0x10, 0x00, 0x2C, 0x60, 0xE2, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0x2C, 0x60, 0xE8, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xF0, 0x78, 0xB5, 0xF1, 0x0F, 0x00, 0x2C, 0x60, 0xE0, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x1B, 0xF2, 0xFF, 0xFF, 0x60, 0x45, 0x2C, 0x60, 0xE6, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xF0, 0x78, 0xB5, 0xF1, 0x07, 0xF4, 0xFF, 0xFF, 0x26, 0xF2, 0x26, 0x46, 0x0F, 0xB4,
-        0xDC, 0x85, 0x2C, 0x60, 0xE4, 0x64, 0xF1, 0x60, 0x78, 0x41, 0xF0, 0x78, 0xB5, 0xF1, 0x27, 0xF2,
-        0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3B, 0x07, 0x00, 0x2C, 0x60, 0xF2, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x08, 0x00, 0x02, 0x3B, 0x06, 0x00, 0x2C, 0x60, 0xF4, 0x64, 0xF1, 0x60,
-        0x78, 0x41, 0xE4, 0x78, 0xB5, 0xF1, 0x07, 0xF2, 0x26, 0xF0, 0x41, 0x18, 0x60, 0x46, 0xFF, 0x67,
-        0x20, 0x88, 0x64, 0x5F, 0x40, 0x4A, 0x15, 0xF0, 0x28, 0x44, 0xD0, 0x84, 0x03, 0xA4, 0x03, 0x0E,
-        0xE8, 0x84, 0xE8, 0x84, 0x04, 0x00, 0xFA, 0xA4, 0xE8, 0x84, 0xE8, 0x87, 0xC0, 0xBF, 0xC0, 0x84,
-        0x15, 0xFA, 0x40, 0x48, 0x14, 0xF0, 0x2A, 0x44, 0xD0, 0x84, 0x1F, 0xA4, 0x06, 0x0E, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x07, 0x00, 0xC2, 0xA4, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x87, 0xF8, 0xBF, 0xC0, 0x84, 0x14, 0xFA, 0x33, 0x60, 0x4C, 0x63,
-        0xBD, 0xDB, 0x60, 0x5C, 0x2F, 0x67, 0xD0, 0x80, 0x60, 0x45, 0x02, 0x28, 0x64, 0x45, 0x28, 0x5C,
-        0xBD, 0xD9, 0x8B, 0x67, 0xD0, 0x80, 0x60, 0x41, 0x02, 0x24, 0x64, 0x41, 0xD5, 0x84, 0x80, 0x65,
-        0xC4, 0x87, 0x01, 0x05, 0x00, 0x64, 0xFF, 0xB4, 0x0E, 0xFA, 0xA3, 0xDB, 0x26, 0x46, 0xD1, 0x60,
-        0xDB, 0x78, 0xFF, 0xFF, 0xCA, 0x60, 0xD8, 0x78, 0xFF, 0xFF, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B,
-        0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xCA, 0x60, 0xD8, 0x78,
-        0xFF, 0xFF, 0x25, 0x60, 0xFE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0x00, 0x66, 0x46, 0x46, 0xCA, 0x60, 0xD8, 0x78,
-        0xFF, 0xFF, 0x2A, 0xF2, 0x58, 0x63, 0x60, 0x47, 0x01, 0x27, 0x64, 0x63, 0x61, 0x5C, 0x1B, 0x60,
-        0xFB, 0xF9, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41, 0xBD, 0xD0, 0x00, 0xF4, 0x04, 0xF8,
-        0x83, 0xFA, 0x82, 0xF8, 0xA6, 0x46, 0x02, 0xB0, 0x5E, 0x63, 0x04, 0x03, 0x64, 0x63, 0x03, 0xB0,
-        0x02, 0x3A, 0x6C, 0x63, 0x3F, 0xF2, 0xBD, 0xD0, 0xBD, 0xD0, 0x64, 0x45, 0x64, 0x41, 0xBD, 0xD0,
-        0xA6, 0x46, 0x07, 0xF8, 0x86, 0xFA, 0x85, 0xF8, 0x60, 0x47, 0x08, 0xFA, 0x1B, 0x60, 0xFB, 0xF1,
-        0x26, 0x46, 0x64, 0x41, 0x2F, 0x58, 0xFF, 0xFF, 0xA6, 0xF5, 0x00, 0xF2, 0x26, 0x46, 0x31, 0xF0,
-        0x39, 0x18, 0x66, 0x41, 0x1D, 0x60, 0xC0, 0x65, 0x64, 0x47, 0x00, 0x7F, 0xA6, 0xF1, 0xE0, 0x84,
-        0x44, 0xD3, 0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44,
-        0x64, 0x46, 0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA,
-        0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB,
-        0x60, 0x46, 0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46,
-        0x1F, 0x60, 0xC2, 0x61, 0xA1, 0xD3, 0x20, 0x60, 0x04, 0x7C, 0xD0, 0x80, 0xFF, 0xFF, 0x07, 0x03,
-        0xA0, 0xDD, 0xDA, 0x9C, 0xA1, 0xD9, 0x49, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xA1, 0xDB, 0xD1, 0x60,
-        0x97, 0x78, 0xFF, 0xFF, 0x20, 0x7C, 0x72, 0x44, 0xFF, 0xB4, 0xD0, 0x80, 0xFF, 0xFF, 0x02, 0x04,
-        0xD0, 0x84, 0xFB, 0x01, 0xE0, 0x83, 0xA6, 0xF3, 0x02, 0xA3, 0x43, 0x93, 0xA6, 0xF3, 0xFF, 0xFF,
-        0x02, 0xA5, 0xD7, 0x80, 0x04, 0xA5, 0x08, 0x24, 0x65, 0x43, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2,
-        0x00, 0xF0, 0x81, 0xF0, 0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x1D, 0x60, 0xC0, 0x65,
-        0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0xA6, 0xF3,
-        0x63, 0x45, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8,
-        0x65, 0x46, 0x00, 0xFA, 0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x31, 0xF0,
-        0x66, 0x41, 0x1D, 0x60, 0xC0, 0x65, 0x64, 0x47, 0x00, 0x7F, 0xA6, 0xF1, 0xE0, 0x84, 0x44, 0xD3,
-        0x64, 0x43, 0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46,
-        0x80, 0xF0, 0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC,
-        0x64, 0x46, 0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46,
-        0x80, 0xF0, 0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46, 0x2F, 0xF2,
-        0x30, 0xF0, 0x31, 0xF0, 0x64, 0x45, 0x46, 0x43, 0x63, 0x46, 0x03, 0xFA, 0x06, 0xF2, 0x84, 0xF8,
-        0x00, 0x7E, 0x06, 0xFA, 0x05, 0xF8, 0xA3, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0xDB, 0xF3, 0x2A, 0xF2,
-        0x07, 0xB0, 0x03, 0x3A, 0x2A, 0x00, 0x00, 0xF4, 0x09, 0xF2, 0x60, 0x45, 0x80, 0x3A, 0x05, 0x00,
-        0x0E, 0xF2, 0xFF, 0xFF, 0x02, 0xB0, 0x0F, 0xF2, 0x20, 0x03, 0x60, 0x47, 0x00, 0x3A, 0x1D, 0x00,
-        0x60, 0x41, 0x00, 0x36, 0x13, 0x00, 0xDA, 0x85, 0x33, 0x60, 0xBE, 0x63, 0xBD, 0xD1, 0xFF, 0xFF,
-        0xD1, 0x80, 0xFF, 0xFF, 0x12, 0x02, 0x60, 0xFE, 0xBD, 0xD3, 0xA5, 0xD0, 0xDE, 0x85, 0xD0, 0x80,
-        0xCD, 0x81, 0x0B, 0x02, 0xF9, 0x02, 0x20, 0xFE, 0x00, 0x64, 0x09, 0x00, 0x26, 0x46, 0x48, 0xFE,
-        0x65, 0x40, 0x40, 0x3A, 0x02, 0x00, 0x01, 0x64, 0x02, 0x00, 0x28, 0xFE, 0x00, 0x64, 0x40, 0x48,
-        0x26, 0x46, 0x2D, 0x58, 0xFF, 0xFF, 0x19, 0x60, 0xA3, 0xF3, 0x3D, 0xF2, 0x60, 0x40, 0x01, 0x26,
-        0x2A, 0xFA, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x26, 0x03, 0x00, 0xD2, 0x60, 0xB5, 0x78,
-        0xFF, 0xFF, 0x3F, 0xF0, 0x32, 0x40, 0x10, 0x2A, 0x0E, 0x00, 0x2C, 0xF0, 0x64, 0x41, 0x60, 0x40,
-        0x40, 0x27, 0x09, 0x00, 0xCD, 0x81, 0xDD, 0x81, 0x06, 0x03, 0x05, 0x03, 0x64, 0x40, 0x01, 0x26,
-        0x02, 0x00, 0x01, 0x61, 0x01, 0x00, 0x00, 0x61, 0x60, 0x40, 0x18, 0x36, 0x1F, 0x00, 0xD0, 0x60,
-        0x58, 0x4F, 0xD1, 0x78, 0xFF, 0xFF, 0x0F, 0xF0, 0xEA, 0xF1, 0x64, 0x44, 0x60, 0x22, 0x19, 0x00,
-        0xDB, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0xFD, 0xA0, 0x2A, 0xF2, 0x03, 0x02, 0x08, 0xB0, 0xFF, 0xFF,
-        0x10, 0x02, 0x32, 0xF2, 0x33, 0xF2, 0xD0, 0x80, 0xEB, 0xF1, 0x0B, 0x02, 0xD0, 0x80, 0x34, 0xF2,
-        0x08, 0x02, 0xEC, 0xF1, 0xFF, 0xFF, 0xD0, 0x80, 0x0F, 0xF0, 0x03, 0x02, 0xD3, 0x60, 0x10, 0x78,
-        0xFF, 0xFF, 0x00, 0xF4, 0xAA, 0x60, 0xAA, 0x65, 0x09, 0xF2, 0x5A, 0xD0, 0xD4, 0x80, 0x03, 0x64,
-        0x57, 0x02, 0xD0, 0x80, 0x00, 0x64, 0x5A, 0xD0, 0x53, 0x02, 0x64, 0x45, 0xD4, 0x80, 0xF8, 0x7F,
-        0x08, 0x02, 0x5A, 0xD0, 0x26, 0x46, 0x64, 0x45, 0x23, 0xF0, 0x20, 0x67, 0xB0, 0x84, 0xA2, 0xDA,
-        0x0B, 0x00, 0xD4, 0x80, 0x1D, 0x60, 0x60, 0x64, 0x16, 0x02, 0x5A, 0xD0, 0x26, 0x46, 0x64, 0x45,
-        0x23, 0xF0, 0x40, 0x67, 0xB0, 0x84, 0xA2, 0xDA, 0x65, 0x44, 0x88, 0x3A, 0x07, 0x00, 0x77, 0x37,
-        0x08, 0x00, 0x78, 0x37, 0x06, 0x00, 0x8E, 0x37, 0x04, 0x00, 0x32, 0x00, 0x81, 0x3A, 0x30, 0x00,
-        0x80, 0x37, 0x00, 0x61, 0x2D, 0x00, 0xD4, 0x80, 0x01, 0x60, 0x00, 0x64, 0x5A, 0xD0, 0x28, 0x02,
-        0xD0, 0x80, 0x5A, 0xD0, 0x25, 0x02, 0x26, 0x46, 0x64, 0x47, 0x7F, 0xB4, 0xFD, 0xA0, 0x09, 0x03,
-        0x1F, 0x07, 0x32, 0x40, 0x02, 0x26, 0x44, 0x00, 0x23, 0xF0, 0x60, 0x67, 0xB0, 0x84, 0xA2, 0xDA,
-        0x3F, 0x00, 0x0F, 0xF2, 0x32, 0x40, 0x02, 0x26, 0x3B, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x08, 0x2A, 0x07, 0x00, 0x60, 0x40, 0x48, 0x36, 0x04, 0x00, 0xF1, 0xF3, 0xFF, 0xFF, 0x02, 0xBC,
-        0xF1, 0xFB, 0xF4, 0x60, 0x58, 0x4F, 0x1D, 0x78, 0xFF, 0xFF, 0xD3, 0x60, 0x1A, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0x61, 0x40, 0x01, 0x2A, 0x07, 0x00, 0x2C, 0x60, 0xF8, 0x64, 0xF1, 0x60, 0x78, 0x41,
-        0xE4, 0x78, 0xB5, 0xF1, 0x85, 0x00, 0x0F, 0xF2, 0x7F, 0xF1, 0x2A, 0xF2, 0x60, 0x40, 0x20, 0x2A,
-        0x12, 0x00, 0x5E, 0x63, 0x60, 0x40, 0x02, 0x2B, 0x64, 0x63, 0xBD, 0xD2, 0xBD, 0xD2, 0xD0, 0x80,
-        0x80, 0xF1, 0x08, 0x02, 0xD0, 0x80, 0xA3, 0xD2, 0x81, 0xF1, 0x04, 0x02, 0xD0, 0x80, 0xFF, 0xFF,
-        0x01, 0x02, 0x06, 0x00, 0x6D, 0x00, 0x2A, 0xF2, 0xFF, 0xFF, 0xFF, 0xFF, 0x48, 0x36, 0x68, 0x00,
-        0x2A, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x2A, 0x07, 0x00, 0x60, 0x40, 0x48, 0x36, 0x04, 0x00,
-        0xF1, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0xF1, 0xFB, 0x68, 0x00, 0x26, 0x46, 0x2A, 0xF2, 0xFF, 0xFF,
-        0xFF, 0xFF, 0x0C, 0x26, 0x55, 0x00, 0xB0, 0x36, 0x15, 0x00, 0x10, 0x36, 0x13, 0x00, 0x30, 0x36,
-        0x11, 0x00, 0xC0, 0x36, 0x02, 0x00, 0xA0, 0x3A, 0x12, 0x00, 0x7F, 0xF1, 0x32, 0xF2, 0x33, 0xF2,
-        0xD0, 0x80, 0x80, 0xF1, 0x45, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x81, 0xF1, 0x41, 0x02, 0xD0, 0x80,
-        0xFF, 0xFF, 0x3E, 0x02, 0xE6, 0x60, 0x58, 0x4F, 0x3D, 0x78, 0xFF, 0xFF, 0x35, 0x00, 0x50, 0x3A,
-        0x05, 0x00, 0xF8, 0x60, 0x58, 0x4F, 0xE1, 0x78, 0xFF, 0xFF, 0x2E, 0x00, 0x40, 0x3A, 0x05, 0x00,
-        0xF0, 0x60, 0x58, 0x4F, 0x99, 0x78, 0xFF, 0xFF, 0x27, 0x00, 0x80, 0x3A, 0x24, 0x00, 0x7F, 0xF1,
-        0x32, 0xF2, 0x33, 0xF2, 0xD0, 0x80, 0x80, 0xF1, 0x23, 0x02, 0xD0, 0x80, 0x34, 0xF2, 0x81, 0xF1,
-        0x1F, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x1C, 0x02, 0xE9, 0x60, 0x58, 0x4F, 0x30, 0x78, 0xFF, 0xFF,
-        0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x0A, 0x00, 0x19, 0x60, 0x4C, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x08, 0x26, 0x04, 0x00, 0xEE, 0x60, 0x58, 0x4F, 0x81, 0x78, 0xFF, 0xFF, 0x24, 0x60,
-        0x58, 0x4F, 0xE3, 0x78, 0xFF, 0xFF, 0x04, 0x00, 0x66, 0x44, 0x00, 0xA8, 0xFF, 0xFF, 0x0A, 0x03,
-        0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0xD0, 0x60, 0xB2, 0x78, 0xFF, 0xFF, 0x2A, 0xF2, 0x3B, 0xF0, 0x60, 0x40,
-        0x40, 0x2B, 0x06, 0x00, 0xC0, 0x60, 0x00, 0x64, 0x64, 0x40, 0x20, 0x2B, 0x01, 0x00, 0x03, 0x00,
-        0xD3, 0x60, 0x4C, 0x78, 0xFF, 0xFF, 0x22, 0xF2, 0xFF, 0xFF, 0x04, 0xB4, 0xFF, 0xFF, 0xF8, 0x03,
-        0x23, 0xF2, 0x07, 0xF4, 0xBB, 0xF0, 0x26, 0x46, 0xA4, 0x84, 0xFF, 0xFF, 0x60, 0x40, 0x2F, 0x26,
-        0xD7, 0x01, 0x12, 0xF0, 0xFF, 0xFF, 0x10, 0x1B, 0xCA, 0x60, 0x58, 0x4F, 0x16, 0x78, 0xFF, 0xFF,
-        0x64, 0x40, 0x18, 0x36, 0x09, 0x00, 0x04, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF,
-        0x26, 0x46, 0xD3, 0x60, 0x10, 0x78, 0xFF, 0xFF, 0x25, 0x60, 0xFE, 0x64, 0x13, 0x60, 0x0D, 0xFB,
-        0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xF8, 0xFE, 0xC0, 0x01,
-        0x1C, 0x60, 0x92, 0x63, 0x00, 0x64, 0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x94, 0x64, 0xBD, 0xDB,
-        0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB, 0x00, 0x63, 0x08, 0x60, 0x77, 0xFD, 0xD9, 0x60, 0xA5, 0x64,
-        0x08, 0x60, 0x49, 0xFB, 0xD9, 0x60, 0x6A, 0x64, 0x08, 0x60, 0x35, 0xFB, 0x00, 0x60, 0x02, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xD3, 0x60, 0x9C, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x7D, 0xF3, 0x33, 0x60, 0x20, 0x63, 0x60, 0x40, 0x01, 0x27, 0x03, 0x00, 0x19, 0x60, 0x3B, 0xF3,
-        0x02, 0x00, 0x19, 0x60, 0x3C, 0xF3, 0x08, 0x61, 0x60, 0xFE, 0xA3, 0xD1, 0xFF, 0xFF, 0x20, 0xFE,
-        0x00, 0xA8, 0xE8, 0x84, 0x0F, 0x03, 0x60, 0xFE, 0x02, 0x28, 0xF6, 0x01, 0x80, 0x62, 0xB2, 0x9C,
-        0xBD, 0xD9, 0x7B, 0xF9, 0xCD, 0x81, 0x00, 0x36, 0x01, 0x00, 0xEE, 0x01, 0x36, 0x60, 0x0A, 0x63,
-        0x08, 0x61, 0xEA, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xBA, 0xFE, 0x16, 0x60, 0x87, 0xF3, 0xFF, 0xFF, 0x03, 0xA8, 0x02, 0xA8, 0x04, 0x03, 0x28, 0x02,
-        0xD9, 0x60, 0x41, 0x78, 0xFF, 0xFF, 0xD8, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1,
-        0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x11, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xAC, 0xF3,
-        0xFF, 0xFF, 0xFE, 0xA0, 0xFF, 0xFF, 0x0A, 0x07, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB,
-        0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x20, 0x60, 0x20, 0x65,
-        0xA5, 0xDF, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB, 0xD4, 0x60, 0xF6, 0x78, 0xFF, 0xFF,
-        0x01, 0x63, 0x0E, 0x60, 0x36, 0xFD, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x64,
-        0x08, 0x60, 0x15, 0xFB, 0x5A, 0xDB, 0xBA, 0xFE, 0x02, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF,
-        0x01, 0xBC, 0xF1, 0xFB, 0x44, 0x60, 0x44, 0x64, 0x7F, 0xFB, 0x80, 0xFB, 0x81, 0xFB, 0x08, 0x60,
-        0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x08, 0x60, 0x77, 0xF3, 0xFF, 0xFF, 0x15, 0x18, 0xA2, 0xDF,
-        0x40, 0x60, 0x58, 0x4E, 0x7D, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0xC4, 0x64, 0x0F, 0x60, 0xE1, 0xFB,
-        0x4A, 0xDF, 0x01, 0x60, 0xFE, 0x63, 0x1D, 0x60, 0xBE, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F,
-        0x10, 0x60, 0x0E, 0x62, 0xA2, 0xDF, 0x5B, 0x00, 0xCF, 0xF3, 0xFF, 0xFF, 0x52, 0x1B, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x24, 0x40, 0x02, 0x22, 0x26, 0x00, 0x08, 0x60, 0x1E, 0xF1,
-        0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x16, 0xFB, 0xD4, 0x60, 0x1F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x08, 0x60, 0x1E, 0xF1, 0x00, 0x60, 0x40, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD4, 0x60, 0x59, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x24, 0x40, 0x01, 0x26, 0x11, 0x00, 0x08, 0x60,
-        0x1E, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xD4, 0x60, 0x59, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x1E, 0xF1, 0x00, 0x60, 0x40, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD4, 0x60, 0x59, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xFD, 0x60, 0x89, 0x65, 0xF3, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x08, 0x60, 0x15, 0xFB, 0x5A, 0xDB, 0x10, 0x60,
-        0x4E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60,
-        0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xBB, 0xFE, 0xFD, 0x60,
-        0x40, 0x65, 0xF3, 0x60, 0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x03, 0x64, 0x08, 0x60,
-        0x28, 0xFB, 0xD4, 0x60, 0x87, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60,
-        0x27, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x07, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x10, 0x60, 0x4E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xE2, 0x01, 0x10, 0x60, 0x4E, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB, 0x20, 0x40, 0x04, 0x2B, 0x14, 0x00,
-        0x9B, 0xFE, 0x08, 0x04, 0xBB, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD4, 0x60, 0x95, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80,
-        0x16, 0x60, 0xCC, 0xF3, 0x00, 0x61, 0x60, 0x40, 0x00, 0x36, 0x00, 0xB9, 0x60, 0x40, 0x01, 0x36,
-        0x01, 0xB9, 0x60, 0x40, 0x02, 0x36, 0x06, 0xB9, 0x60, 0x40, 0x03, 0x36, 0x07, 0xB9, 0x41, 0x44,
-        0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xD4, 0x60, 0xC8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x7D, 0xF1, 0x13, 0x60, 0x1A, 0xF9, 0x0C, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD4, 0x60, 0xE9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1,
-        0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x75, 0x00, 0x10, 0x60, 0x2A, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xBA, 0xFE, 0x02, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0x01, 0xBC,
-        0xF1, 0xFB, 0x44, 0x60, 0x44, 0x64, 0x7F, 0xFB, 0x80, 0xFB, 0x81, 0xFB, 0xFF, 0xFF, 0x20, 0x40,
-        0x04, 0x2B, 0x14, 0x00, 0x9B, 0xFE, 0x08, 0x04, 0xBB, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB,
-        0xD5, 0x60, 0x07, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x00, 0x65,
-        0x20, 0x44, 0x34, 0x80, 0x08, 0x60, 0x07, 0xF1, 0x02, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80,
-        0x64, 0x40, 0x01, 0x2A, 0x06, 0x00, 0xA2, 0xDF, 0x02, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78,
-        0xFF, 0xFF, 0xCF, 0xF3, 0x20, 0x60, 0x20, 0x65, 0x36, 0x1B, 0xA5, 0xD3, 0x24, 0x40, 0x01, 0x26,
-        0x16, 0x00, 0x60, 0x40, 0x20, 0x26, 0x2F, 0x00, 0x01, 0xBC, 0xA5, 0xDB, 0x08, 0x60, 0x1E, 0xF1,
-        0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x16, 0xFB, 0xD5, 0x60, 0x65, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x60, 0x40,
-        0x10, 0x26, 0x19, 0x00, 0x01, 0xBC, 0xA5, 0xDB, 0x08, 0x60, 0x1E, 0xF1, 0x00, 0x60, 0x40, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD5, 0x60,
-        0x65, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xFD, 0x60, 0x89, 0x65, 0xF3, 0x60,
-        0x58, 0x4E, 0x27, 0x78, 0xFF, 0xFF, 0xCF, 0xF1, 0x07, 0x60, 0xE9, 0xF3, 0x64, 0x40, 0x02, 0x3A,
-        0x0C, 0x00, 0x01, 0x63, 0x60, 0x40, 0x10, 0x22, 0x00, 0x63, 0x08, 0x60, 0xC1, 0xFD, 0x08, 0x60,
-        0xC5, 0xFD, 0x08, 0x60, 0xC9, 0xFD, 0x08, 0x60, 0xCD, 0xFD, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x01, 0x64, 0x53, 0xFB, 0x2F, 0x60, 0x02, 0x64, 0x54, 0xFB, 0x24, 0x40, 0x01, 0x26,
-        0x11, 0x00, 0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD5, 0x60, 0xAB, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD5, 0x60, 0xAB, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xFD, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60,
-        0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x2A, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x86, 0xF1, 0x1B, 0x60, 0xB2, 0x63, 0xD3, 0x80, 0x20, 0x44, 0x03, 0x03,
-        0xD8, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0x87, 0xF3, 0xFF, 0xFF, 0xD0, 0x80, 0xFF, 0xFF, 0x1B, 0x02,
-        0x24, 0x44, 0x04, 0x22, 0x12, 0x00, 0x24, 0x44, 0x01, 0xAC, 0xFB, 0xB4, 0x40, 0x44, 0xF7, 0x60,
-        0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0xD4, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0xD2, 0xF3, 0xFF, 0xFF, 0x00, 0xA8,
-        0xFF, 0xFF, 0x1F, 0x02, 0x87, 0x00, 0x20, 0x44, 0x10, 0xBC, 0x40, 0x40, 0x64, 0x42, 0x5A, 0xD1,
-        0x06, 0x63, 0xA4, 0xD1, 0xC3, 0x83, 0x7D, 0xF9, 0xBD, 0xD1, 0x7F, 0xF9, 0xBD, 0xD1, 0xFF, 0xFF,
-        0x80, 0xF9, 0xBD, 0xD1, 0x81, 0xF9, 0x04, 0xA3, 0xBD, 0xD1, 0x33, 0x60, 0xBE, 0x64, 0x64, 0x41,
-        0xDD, 0x81, 0xFE, 0xB1, 0xA0, 0xD9, 0x04, 0x03, 0xBD, 0xD1, 0xC9, 0x81, 0x58, 0xD9, 0xFC, 0x02,
-        0x39, 0x00, 0xE4, 0xF3, 0x7D, 0xFB, 0x66, 0x41, 0x60, 0x40, 0x01, 0x27, 0x06, 0x00, 0x10, 0x60,
-        0xF0, 0x63, 0x11, 0x60, 0x44, 0x65, 0x06, 0x66, 0x05, 0x00, 0x11, 0x60, 0x60, 0x63, 0x12, 0x60,
-        0x40, 0x65, 0x08, 0x66, 0xA3, 0xD1, 0x4B, 0x93, 0xD0, 0x80, 0xD7, 0x80, 0x02, 0x03, 0xFA, 0x04,
-        0x04, 0x00, 0x5B, 0x93, 0x02, 0xA3, 0x01, 0x64, 0xA3, 0xDB, 0x61, 0x46, 0x2F, 0x60, 0x02, 0x61,
-        0xA1, 0xD3, 0xFF, 0xFF, 0x00, 0xA8, 0x33, 0x60, 0xBE, 0x63, 0x02, 0x02, 0x2D, 0x60, 0x10, 0x61,
-        0xA1, 0xD3, 0xBD, 0xDB, 0xDC, 0x84, 0xFE, 0xB4, 0x59, 0xD1, 0xC8, 0x84, 0xBD, 0xD9, 0xFC, 0x02,
-        0xEC, 0xF3, 0x72, 0x45, 0xEB, 0xF3, 0x94, 0x83, 0x81, 0xFD, 0x94, 0x83, 0x80, 0xFD, 0x65, 0x5F,
-        0x02, 0x64, 0x7F, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04,
-        0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD6, 0x60, 0x3A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x7D, 0xF1, 0x13, 0x60, 0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD6, 0x60, 0x5B, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE,
-        0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xD7, 0x60,
-        0x7B, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xEF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x02, 0x64, 0xDB, 0xFB,
-        0xF1, 0xF3, 0xFF, 0xFF, 0x01, 0xBC, 0xF1, 0xFB, 0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80,
-        0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x24, 0x44, 0x02, 0x22, 0x03, 0x00, 0x01, 0xAC, 0x04, 0xBC,
-        0x40, 0x44, 0x32, 0x40, 0x80, 0x2A, 0x8C, 0x00, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD6, 0x60, 0x8C, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x95, 0xF3, 0xFF, 0xFF, 0x7F, 0xB4, 0x95, 0xFB, 0x26, 0x60, 0x34, 0x62, 0x06, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x2D, 0xFF, 0xFF, 0xFF, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xDA, 0xFE, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x12, 0x60, 0xFF, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x05, 0x03, 0x0E, 0xF2, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x2A, 0x22, 0x00, 0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46,
-        0x03, 0x03, 0x0F, 0xF2, 0xFF, 0xFF, 0x19, 0x1B, 0x08, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB,
-        0xD6, 0x60, 0xE5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x01, 0x64, 0x19, 0x60, 0xF1, 0xFB, 0x19, 0x60,
-        0xF6, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x26, 0x05, 0x00, 0x89, 0xFF, 0x08, 0x60, 0x00, 0x75,
-        0x88, 0xFF, 0x01, 0x00, 0x10, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD6, 0x60,
-        0xE5, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x7D, 0xF1, 0x13, 0x60, 0x1A, 0xF9, 0x08, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF,
-        0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD7, 0x60, 0x0A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0xBA, 0xFE, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x1E, 0x00,
-        0xDA, 0xFE, 0xC1, 0xFE, 0x0E, 0x60, 0x36, 0xF1, 0x0E, 0x60, 0x4B, 0xF9, 0x1C, 0x60, 0x92, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x60, 0x06, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xD7, 0x60, 0x4E, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x00, 0x60, 0x02, 0x64,
-        0x08, 0x60, 0x28, 0xFB, 0xD7, 0x60, 0x55, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x1C, 0x60, 0x6C, 0x61,
-        0x75, 0x60, 0x30, 0x65, 0xA1, 0xD3, 0xFF, 0xFF, 0xFF, 0xA0, 0xE0, 0x84, 0x02, 0x02, 0x03, 0x60,
-        0xE8, 0x64, 0xD4, 0x80, 0xFF, 0xFF, 0x01, 0x04, 0x65, 0x44, 0xA1, 0xDB, 0x32, 0x40, 0x80, 0x2A,
-        0x03, 0x00, 0xD4, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60,
-        0x27, 0xFB, 0x5A, 0xDB, 0xD4, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0x20, 0x40, 0x06, 0x23, 0x10, 0x00,
-        0x08, 0x60, 0x27, 0xF1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x80, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x28, 0xFB, 0xD7, 0x60, 0x55, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x10, 0x60, 0x4E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB,
-        0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0xD3, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0x78, 0xF3, 0x79, 0xFB, 0x20, 0x60, 0x14, 0x62, 0xA2, 0xDF,
-        0xFF, 0x60, 0xDF, 0x65, 0x20, 0x44, 0x24, 0x80, 0xBC, 0xF1, 0x0E, 0x60, 0x4B, 0xF9, 0x1C, 0x60,
-        0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xF7, 0x60,
-        0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x10, 0x26, 0x38, 0x00, 0x00, 0x64, 0xB2, 0xFB, 0xB3, 0xFB,
-        0xB4, 0xFB, 0x00, 0x75, 0x00, 0x72, 0xBA, 0xF1, 0x7E, 0xF9, 0x64, 0x44, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x93, 0xE5, 0xF1, 0x84, 0xF9, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27,
-        0x1E, 0x00, 0x19, 0x60, 0x44, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2A, 0x0A, 0x00, 0x0F, 0x64,
-        0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0x67, 0x43, 0x1A, 0x60, 0xB3, 0xFD, 0x1A, 0x60,
-        0xC3, 0xFD, 0xD3, 0x60, 0x58, 0x4E, 0x78, 0x78, 0xFF, 0xFF, 0x00, 0x65, 0xFC, 0x60, 0x58, 0x4E,
-        0xC7, 0x78, 0xFF, 0xFF, 0xFD, 0x60, 0x58, 0x4E, 0x11, 0x78, 0xFF, 0xFF, 0x05, 0x00, 0xFF, 0x65,
-        0xFC, 0x60, 0x58, 0x4E, 0xC7, 0x78, 0xFF, 0xFF, 0x44, 0x00, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x00, 0x60, 0x84, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD7, 0x60, 0xDB, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x80, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x2B, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x08, 0x60, 0x15, 0xF1, 0xFF, 0x60, 0x7F, 0x61,
-        0xA1, 0x84, 0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x2E, 0x60, 0x2E, 0x64, 0x2D, 0x60,
-        0x8A, 0x63, 0xA0, 0xD1, 0xA3, 0xD9, 0x64, 0x41, 0x58, 0xD1, 0x5B, 0xD9, 0x7D, 0xF3, 0x66, 0x45,
-        0xA6, 0xF5, 0x60, 0x40, 0x01, 0x27, 0x08, 0x00, 0x91, 0xFA, 0x61, 0x44, 0xFD, 0x60, 0x58, 0x4E,
-        0xAC, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x07, 0x00, 0x11, 0xF8, 0x64, 0x44, 0xFD, 0x60, 0x58, 0x4E,
-        0xAC, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x65, 0x46, 0x04, 0x00, 0xBB, 0xFE, 0xD4, 0x60, 0xF6, 0x78,
-        0xFF, 0xFF, 0x16, 0x60, 0xC2, 0xF1, 0x00, 0x65, 0x64, 0x40, 0x01, 0x36, 0x22, 0x65, 0x64, 0x40,
-        0x07, 0x36, 0x01, 0x65, 0x64, 0x40, 0x0A, 0x36, 0x01, 0x65, 0x64, 0x40, 0x0B, 0x36, 0x22, 0x65,
-        0xA6, 0xF3, 0x66, 0x5C, 0x60, 0x46, 0x1F, 0x63, 0xE3, 0x83, 0xBA, 0xF8, 0x02, 0xA6, 0x66, 0x44,
-        0xFC, 0x1F, 0x16, 0x60, 0xC2, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x07, 0x36, 0x03, 0x00, 0x0A, 0x36,
-        0x06, 0x00, 0x09, 0x00, 0xA6, 0xF3, 0x04, 0x65, 0x60, 0x46, 0xBA, 0xF8, 0x04, 0x00, 0xA6, 0xF3,
-        0x10, 0x65, 0x60, 0x46, 0xBA, 0xF8, 0x64, 0x46, 0xA6, 0xF3, 0x32, 0x41, 0x60, 0x45, 0x08, 0xB1,
-        0x66, 0x41, 0x16, 0x03, 0x65, 0x46, 0x17, 0x60, 0x80, 0xF3, 0x06, 0xF0, 0xE0, 0x84, 0xE0, 0x84,
-        0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF, 0xB0, 0x84, 0x06, 0xFA, 0x66, 0x43, 0x02, 0xA3, 0x63, 0x46,
-        0x06, 0xF0, 0xFF, 0xFF, 0xB0, 0x84, 0x06, 0xFA, 0x61, 0x46, 0x32, 0x44, 0x10, 0xBC, 0x40, 0x52,
-        0x01, 0x64, 0x10, 0x60, 0x0A, 0xFB, 0x0F, 0x4E, 0xEF, 0x60, 0x58, 0x4F, 0x3A, 0x78, 0xFF, 0xFF,
-        0x0E, 0x4F, 0x08, 0x60, 0x15, 0xF1, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x00, 0x60,
-        0x04, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD3, 0x60, 0xAE, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x1C, 0x60,
-        0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xBB, 0xFE,
-        0x20, 0x44, 0x04, 0x27, 0x11, 0x00, 0x10, 0x26, 0x02, 0x00, 0xDB, 0xFE, 0x14, 0x00, 0x08, 0x60,
-        0x07, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x36, 0x07, 0x00, 0x01, 0x64, 0xA2, 0xDB, 0x01, 0x65,
-        0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x64, 0x8A, 0xFB, 0xFF, 0x60, 0xEF, 0x65, 0x20, 0x44,
-        0x24, 0x80, 0x03, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB, 0xC1, 0xFE,
-        0x00, 0x60, 0x02, 0x64, 0x08, 0x60, 0x28, 0xFB, 0xD8, 0x60, 0xAA, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x20, 0x40, 0x06, 0x23, 0x10, 0x00, 0x08, 0x60, 0x27, 0xF1, 0x7F, 0x60,
-        0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x28, 0xFB, 0xD8, 0x60,
-        0xAA, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x4E, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xD3, 0x60, 0xD0, 0x78, 0xFF, 0xFF,
-        0xBB, 0xFE, 0xD9, 0x60, 0xB0, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0xC2, 0xF1, 0x00, 0x65, 0x64, 0x40,
-        0x01, 0x36, 0x22, 0x65, 0xA6, 0xF3, 0x66, 0x5C, 0x60, 0x46, 0x1F, 0x63, 0xE3, 0x83, 0xBA, 0xF8,
-        0x02, 0xA6, 0x66, 0x44, 0xFC, 0x1F, 0x64, 0x46, 0xA6, 0xF1, 0x02, 0x64, 0xC0, 0x85, 0x0C, 0x61,
-        0x32, 0x40, 0x08, 0x2A, 0x14, 0x00, 0x17, 0x60, 0x80, 0xF3, 0x66, 0x41, 0x65, 0x46, 0x06, 0xF0,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x80, 0xBF, 0xB0, 0x83, 0x06, 0xFC, 0x66, 0x42,
-        0xFE, 0xA2, 0x62, 0x46, 0x06, 0xF0, 0xFF, 0xFF, 0xB0, 0x84, 0x06, 0xFA, 0x61, 0x46, 0x0B, 0x64,
-        0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB, 0x01, 0x65, 0xF1, 0x60, 0x58, 0x4E,
-        0xC3, 0x78, 0xFF, 0xFF, 0xE4, 0xF1, 0x7D, 0xF9, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD9, 0x60, 0x0C, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7D, 0xF1, 0x13, 0x60, 0x1A, 0xF9, 0x0E, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD9, 0x60,
-        0x2D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x15, 0xFB,
-        0x5A, 0xDB, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x01, 0x64, 0x8A, 0xFB, 0xFF, 0x60, 0xDF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x2F, 0x58,
-        0xFF, 0xFF, 0x06, 0x64, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB, 0xE4, 0xF1,
-        0x7D, 0xF9, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x64, 0x8A, 0xFB, 0xFF, 0x60,
-        0xDF, 0x65, 0x20, 0x44, 0x24, 0x80, 0xA6, 0xF1, 0x66, 0x45, 0x64, 0x46, 0x66, 0x43, 0x02, 0xA3,
-        0x63, 0x46, 0x02, 0x64, 0x06, 0xFA, 0x04, 0x63, 0x04, 0x61, 0x01, 0x60, 0xCC, 0x64, 0x58, 0xD1,
-        0x59, 0xD8, 0xFD, 0x1F, 0x65, 0x46, 0x01, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x67, 0xFB, 0x68, 0xFB, 0xA6, 0xF1, 0x0E, 0x64, 0x66, 0x41,
-        0x64, 0x42, 0x02, 0xA2, 0x62, 0x46, 0x06, 0xF0, 0xFF, 0x60, 0xFC, 0x64, 0xA0, 0x84, 0x06, 0xFA,
-        0x61, 0x46, 0xDB, 0xF3, 0xFF, 0xFF, 0x04, 0xA8, 0x10, 0x60, 0x0E, 0x64, 0x07, 0x03, 0xA0, 0xD1,
-        0xFF, 0xFF, 0x64, 0x40, 0x01, 0x2A, 0x02, 0x00, 0x00, 0x63, 0xA0, 0xDD, 0x01, 0x64, 0xDB, 0xFB,
-        0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB, 0x00, 0x63, 0x08, 0x60, 0x77, 0xFD, 0x10, 0x60,
-        0x4E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x02, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD3, 0x60,
-        0x9C, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60,
-        0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2E, 0x58, 0xFF, 0xFF,
-        0x40, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xB9, 0xF1, 0x0E, 0x60, 0x4B, 0xF9, 0x5F, 0xF5, 0xEA, 0xF1,
-        0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0xB9, 0xF1, 0x19, 0xF8, 0xF8, 0x60,
-        0x80, 0x64, 0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0xA6, 0xF1, 0x07, 0xF8, 0x1B, 0x60, 0xB0, 0x64,
-        0x00, 0x60, 0x67, 0xFB, 0x44, 0x60, 0x44, 0x64, 0x7F, 0xFB, 0x80, 0xFB, 0x81, 0xFB, 0x31, 0x44,
-        0xF9, 0xB4, 0x40, 0x51, 0x00, 0x60, 0xCE, 0x63, 0x01, 0x60, 0x0C, 0x65, 0xA3, 0xD3, 0xA5, 0xD1,
-        0x04, 0xA4, 0xA3, 0xDB, 0xD0, 0x80, 0xA0, 0xD1, 0x0A, 0x06, 0x41, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xD6, 0x60, 0x6A, 0x78, 0xFF, 0xFF, 0x44, 0x47,
-        0x16, 0x60, 0xC2, 0xF3, 0xFF, 0xFF, 0xFF, 0xA4, 0xFF, 0xFF, 0x09, 0x07, 0x0E, 0x61, 0x41, 0xD3,
-        0x32, 0x40, 0x08, 0x26, 0x04, 0x00, 0x10, 0xB0, 0xFF, 0xFF, 0x01, 0x03, 0xD3, 0x01, 0x42, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04,
-        0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xD9, 0x60, 0xFA, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD1, 0x7D, 0xF9, 0x13, 0x60, 0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xDA, 0x60, 0x1C, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x07, 0x60, 0xD0, 0x64, 0x0E, 0x60, 0x4B, 0xFB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB,
-        0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD3, 0x7F, 0xFB,
-        0xBD, 0xD3, 0x80, 0xFB, 0xA3, 0xD3, 0x81, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x01, 0x60, 0x04, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xDA, 0x60, 0x4A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xB9, 0xF1, 0x0E, 0x60, 0x4B, 0xF9, 0x08, 0x60, 0x15, 0xF1, 0xFE, 0x60,
-        0xFF, 0x61, 0xA1, 0x84, 0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x08, 0x60, 0x15, 0xF1,
-        0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xD9, 0x60,
-        0xCA, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x08, 0x65, 0x20, 0x44, 0x34, 0x80, 0x7D, 0xF1, 0x32, 0x60,
-        0x7A, 0x61, 0xA1, 0xD3, 0x64, 0x40, 0x01, 0x27, 0x59, 0xD3, 0x32, 0x60, 0x7E, 0x61, 0xFD, 0x60,
-        0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0xA1, 0xDB, 0x5E, 0xF5, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1,
-        0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0xB9, 0xF1, 0x19, 0xF8, 0x80, 0x7E, 0xF8, 0x7F, 0x0E, 0xFA,
-        0x00, 0x64, 0x3E, 0xFA, 0xA6, 0xF1, 0x07, 0xF8, 0x2B, 0xFA, 0xB0, 0x64, 0x2A, 0xFA, 0x27, 0x43,
-        0x06, 0xA3, 0xBD, 0xD1, 0x2C, 0xF8, 0x32, 0xF8, 0xBD, 0xD1, 0x2D, 0xF8, 0x33, 0xF8, 0xA3, 0xD1,
-        0x2E, 0xF8, 0x34, 0xF8, 0x06, 0x63, 0x3F, 0xFC, 0x20, 0x60, 0x16, 0x61, 0xDB, 0xF3, 0xA1, 0xD3,
-        0x03, 0xA8, 0xAC, 0x83, 0x0E, 0x02, 0x0D, 0x03, 0x20, 0x60, 0x18, 0x61, 0xA1, 0xD1, 0x66, 0x45,
-        0x00, 0xF4, 0x09, 0xFC, 0x01, 0x64, 0x0A, 0xFA, 0x0B, 0xF8, 0x20, 0x60, 0x16, 0x61, 0xA1, 0xDF,
-        0x25, 0x00, 0x16, 0x60, 0xC3, 0xF3, 0x66, 0x45, 0x00, 0xF4, 0x60, 0x40, 0x01, 0x36, 0x15, 0x00,
-        0x02, 0x36, 0xBD, 0x00, 0x03, 0x36, 0x07, 0x00, 0x04, 0x36, 0x0F, 0x00, 0x05, 0x36, 0xB7, 0x00,
-        0x06, 0x36, 0x01, 0x00, 0x0A, 0x00, 0x80, 0x64, 0x09, 0xFA, 0x01, 0x63, 0x0A, 0xFC, 0x00, 0x64,
-        0x0B, 0xFA, 0x80, 0x60, 0xF4, 0x62, 0xA2, 0xDF, 0x09, 0x00, 0x00, 0x64, 0x09, 0xFA, 0x01, 0x63,
-        0x0A, 0xFC, 0x00, 0x64, 0x0B, 0xFA, 0x80, 0x60, 0xF4, 0x62, 0xA2, 0xDF, 0x25, 0x60, 0xCE, 0x64,
-        0x13, 0x60, 0x0D, 0xFB, 0x65, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x00, 0x66, 0xDB, 0xF3, 0x46, 0x46, 0xFD, 0xA0, 0xC1, 0xFE, 0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF,
-        0x01, 0x64, 0x68, 0xFB, 0x43, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0E, 0x60, 0x38, 0xF3, 0xFF, 0xFF,
-        0x64, 0xA4, 0xA2, 0xDB, 0x0E, 0x60, 0x38, 0xF1, 0x0E, 0x60, 0x4B, 0xF9, 0x1C, 0x60, 0x92, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x60, 0x0C, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xDB, 0x60, 0x00, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x55, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x26, 0x46,
-        0x00, 0xF4, 0x09, 0xF2, 0x0A, 0xF2, 0x00, 0xA8, 0x0B, 0xF2, 0x02, 0xA8, 0x16, 0x02, 0x00, 0xA8,
-        0x1A, 0x02, 0x19, 0x02, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D,
-        0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x20, 0x40, 0x08, 0x2A, 0x03, 0x00, 0xDC, 0x60,
-        0xF6, 0x78, 0xFF, 0xFF, 0xE3, 0x60, 0x69, 0x78, 0xFF, 0xFF, 0x09, 0xF2, 0x0A, 0xF2, 0x80, 0xA8,
-        0x0B, 0xF2, 0x02, 0xA8, 0xE4, 0x03, 0x44, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0B, 0xF2, 0x26, 0x46,
-        0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB,
-        0x31, 0xF2, 0x59, 0xDB, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D,
-        0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x03, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0x96, 0x78,
-        0xFF, 0xFF, 0xE7, 0x60, 0x0B, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xFB, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x20, 0x40, 0x08, 0x2A,
-        0x03, 0x00, 0xD9, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0xE2, 0x60, 0x73, 0x78, 0xFF, 0xFF, 0x01, 0x63,
-        0x09, 0xFC, 0x32, 0x40, 0x08, 0x26, 0x14, 0x00, 0x16, 0x60, 0xC2, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x0B, 0x36, 0x03, 0x00, 0xDA, 0x60, 0xC5, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0xA2, 0xDB, 0x0B, 0x64,
-        0x19, 0x60, 0xA4, 0xFB, 0xA6, 0xF1, 0x66, 0x41, 0x64, 0x46, 0x22, 0x64, 0x3A, 0xFA, 0x61, 0x46,
-        0x01, 0x64, 0x0A, 0xFA, 0x00, 0x64, 0x0B, 0xFA, 0x01, 0x64, 0x40, 0x60, 0x7A, 0xFB, 0x01, 0x64,
-        0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x65, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66,
-        0xDB, 0xF3, 0x46, 0x46, 0xFD, 0xA0, 0xC1, 0xFE, 0x02, 0x02, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60,
-        0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x60,
-        0x0C, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xDB, 0x60, 0xB9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x3A, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x68, 0xFB, 0x26, 0x46, 0x00, 0xF4, 0x09, 0xF2, 0x0A, 0xF2,
-        0x01, 0xA8, 0x0B, 0xF2, 0x02, 0xA8, 0x04, 0x02, 0x00, 0xA8, 0x02, 0x02, 0x01, 0x02, 0x31, 0x00,
-        0xDC, 0x60, 0x58, 0x4D, 0xB9, 0x78, 0xFF, 0xFF, 0x0B, 0xF2, 0x26, 0x46, 0x40, 0x59, 0x02, 0x60,
-        0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x31, 0xF2, 0x59, 0xDB,
-        0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0x03, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0xE7, 0x60,
-        0x0B, 0x78, 0xFF, 0xFF, 0xDC, 0x60, 0x58, 0x4D, 0xB9, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x68, 0xFB,
-        0x20, 0x40, 0x08, 0x2A, 0x03, 0x00, 0xD9, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0xE2, 0x60, 0x73, 0x78,
-        0xFF, 0xFF, 0x26, 0x46, 0x40, 0x60, 0x00, 0x65, 0x2A, 0xF2, 0x2F, 0xF0, 0xB4, 0x84, 0x2A, 0xFA,
-        0x2C, 0xF8, 0x32, 0xF8, 0x30, 0xF2, 0x2D, 0xFA, 0x33, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x34, 0xFA,
-        0xEA, 0xF3, 0x2F, 0xFA, 0xEB, 0xF3, 0x30, 0xFA, 0xEC, 0xF3, 0x31, 0xFA, 0xC9, 0xF1, 0x19, 0xF8,
-        0x1C, 0xF0, 0x13, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x00, 0xF4, 0x03, 0x64, 0x0A, 0xFA, 0x00, 0x64,
-        0x0B, 0xFA, 0x01, 0x63, 0x68, 0xFD, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x25, 0x60,
-        0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0x00, 0x66, 0xDB, 0xF3, 0x46, 0x46, 0xFD, 0xA0, 0xC1, 0xFE, 0x02, 0x02, 0x2F, 0x58,
-        0xFF, 0xFF, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x00, 0x60, 0x0C, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xDC, 0x60, 0x53, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x50, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x68, 0xFB, 0x26, 0x46, 0x00, 0xF4,
-        0x09, 0xF2, 0x0A, 0xF2, 0x01, 0xA8, 0x0B, 0xF2, 0x04, 0xA8, 0x1A, 0x02, 0x00, 0xA8, 0x18, 0x02,
-        0x17, 0x02, 0xDC, 0x60, 0x58, 0x4D, 0xB9, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64,
-        0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x20, 0x40,
-        0x08, 0x2A, 0x03, 0x00, 0xDC, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0xE3, 0x60, 0x69, 0x78, 0xFF, 0xFF,
-        0xDC, 0x60, 0x58, 0x4D, 0xB9, 0x78, 0xFF, 0xFF, 0x0B, 0xF2, 0x26, 0x46, 0x40, 0x59, 0x02, 0x60,
-        0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x31, 0xF2, 0x59, 0xDB,
-        0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0x03, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0xE7, 0x60,
-        0x0B, 0x78, 0xFF, 0xFF, 0xDC, 0x60, 0x58, 0x4D, 0xB9, 0x78, 0xFF, 0xFF, 0x00, 0x64, 0x68, 0xFB,
-        0x20, 0x40, 0x08, 0x2A, 0x03, 0x00, 0xD9, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0xE2, 0x60, 0x73, 0x78,
-        0xFF, 0xFF, 0x19, 0x60, 0xA4, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x0B, 0x3A, 0x06, 0x00, 0x0B, 0x64,
-        0x16, 0x60, 0xC2, 0xFB, 0x33, 0x60, 0x48, 0x62, 0xA2, 0xDF, 0x2D, 0x58, 0xFF, 0xFF, 0x16, 0x60,
-        0xC2, 0xF1, 0xA5, 0xD2, 0x64, 0x40, 0x0B, 0x2A, 0x20, 0x00, 0x85, 0x36, 0x0B, 0x00, 0x32, 0x3A,
-        0x1E, 0x00, 0x60, 0x47, 0xFF, 0xB4, 0x02, 0xA4, 0xC4, 0x85, 0xA5, 0xD2, 0xFF, 0xFF, 0x60, 0x40,
-        0x85, 0x3A, 0x15, 0x00, 0x65, 0x44, 0x0A, 0xA4, 0xA0, 0xD0, 0x33, 0x60, 0x46, 0x62, 0x64, 0x40,
-        0x18, 0x26, 0x09, 0x00, 0xA2, 0xDF, 0x01, 0x64, 0x16, 0x60, 0xC2, 0xFB, 0x32, 0x41, 0x08, 0x65,
-        0xB5, 0x81, 0x41, 0x52, 0x02, 0x00, 0x01, 0x64, 0xA2, 0xDB, 0x2D, 0x58, 0xFF, 0xFF, 0x33, 0x60,
-        0x46, 0x62, 0xA2, 0xDF, 0x01, 0x64, 0x16, 0x60, 0xC2, 0xFB, 0xF7, 0x01, 0x45, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x35, 0x60, 0xAA, 0x7C, 0x35, 0x60, 0x98, 0x63, 0xA3, 0xD9, 0x64, 0x41, 0x2F, 0x60,
-        0x02, 0x63, 0xBD, 0xD3, 0x00, 0x7C, 0x03, 0x1B, 0x27, 0x43, 0x10, 0xA3, 0xBD, 0xD3, 0xFF, 0xFF,
-        0x60, 0x45, 0x64, 0x5F, 0xA1, 0xDB, 0x65, 0x44, 0xBD, 0xD1, 0xC8, 0x84, 0x59, 0xD8, 0xFC, 0x05,
-        0x27, 0x41, 0x10, 0xA1, 0xA1, 0xD1, 0xFF, 0xFF, 0xC1, 0x81, 0x01, 0x26, 0xDD, 0x81, 0x41, 0x4C,
-        0x59, 0xD1, 0x7C, 0x44, 0xB0, 0x84, 0x59, 0xD1, 0x59, 0xD1, 0xB0, 0x84, 0xB0, 0x84, 0xFF, 0xFF,
-        0x02, 0x02, 0x67, 0x44, 0xC2, 0x00, 0x34, 0x60, 0x5C, 0x63, 0xD9, 0x81, 0x59, 0xD3, 0x38, 0x60,
-        0x10, 0x62, 0x00, 0xBC, 0xA2, 0xDF, 0x09, 0x03, 0x01, 0x7C, 0xA2, 0xD9, 0x30, 0x60, 0x14, 0x64,
-        0xBD, 0xDA, 0x00, 0x60, 0x01, 0x64, 0xBD, 0xDA, 0x58, 0x00, 0xDD, 0x60, 0x18, 0x64, 0xBD, 0xDA,
-        0x50, 0x60, 0x00, 0x64, 0xBD, 0xDA, 0x01, 0x60, 0xF2, 0x64, 0xBD, 0xDA, 0x00, 0x60, 0x01, 0x64,
-        0xBD, 0xDA, 0x2C, 0x41, 0x59, 0xD3, 0x50, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x02, 0x2A, 0x03, 0x00,
-        0x01, 0x60, 0xF2, 0x64, 0x0E, 0x00, 0x04, 0x2A, 0x03, 0x00, 0x02, 0x60, 0xF2, 0x64, 0x09, 0x00,
-        0x10, 0x2A, 0x03, 0x00, 0x04, 0x60, 0xF2, 0x64, 0x04, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60,
-        0xF2, 0x64, 0xBD, 0xD9, 0xBD, 0xDB, 0x01, 0x64, 0xBD, 0xDB, 0x59, 0xD3, 0x50, 0x60, 0x00, 0x7C,
-        0x60, 0x40, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60, 0xF2, 0x64, 0x0E, 0x00, 0x04, 0x2A, 0x03, 0x00,
-        0x02, 0x60, 0xF2, 0x64, 0x09, 0x00, 0x10, 0x2A, 0x03, 0x00, 0x04, 0x60, 0xF2, 0x64, 0x04, 0x00,
-        0x20, 0x2A, 0x04, 0x00, 0x05, 0x60, 0xF2, 0x64, 0xBD, 0xD9, 0xBD, 0xDB, 0x01, 0x64, 0xBD, 0xDB,
-        0x59, 0xD3, 0x50, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x00, 0x60, 0xF2, 0x64,
-        0x09, 0x00, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60, 0xF2, 0x64, 0x04, 0x00, 0x04, 0x2A, 0x02, 0x00,
-        0x02, 0x60, 0xF2, 0x64, 0xBD, 0xD9, 0xBD, 0xDB, 0x4B, 0x00, 0x2C, 0x41, 0x59, 0xD3, 0x0F, 0x60,
-        0x00, 0x7C, 0x60, 0x40, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60, 0xAC, 0x64, 0x0E, 0x00, 0x04, 0x2A,
-        0x03, 0x00, 0x02, 0x60, 0xAC, 0x64, 0x09, 0x00, 0x10, 0x2A, 0x03, 0x00, 0x04, 0x60, 0xAC, 0x64,
-        0x04, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60, 0xAC, 0x64, 0xBD, 0xD9, 0xBD, 0xDB, 0x01, 0x64,
-        0xBD, 0xDB, 0x59, 0xD3, 0x0F, 0x60, 0x00, 0x7C, 0x60, 0x40, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60,
-        0xAC, 0x64, 0x0E, 0x00, 0x04, 0x2A, 0x03, 0x00, 0x02, 0x60, 0xAC, 0x64, 0x09, 0x00, 0x10, 0x2A,
-        0x03, 0x00, 0x04, 0x60, 0xAC, 0x64, 0x04, 0x00, 0x20, 0x2A, 0x04, 0x00, 0x05, 0x60, 0xAC, 0x64,
-        0xBD, 0xD9, 0xBD, 0xDB, 0x01, 0x64, 0xBD, 0xDB, 0x59, 0xD3, 0x0F, 0x60, 0x00, 0x7C, 0x60, 0x40,
-        0x01, 0x2A, 0x03, 0x00, 0x00, 0x60, 0xAC, 0x64, 0x09, 0x00, 0x02, 0x2A, 0x03, 0x00, 0x01, 0x60,
-        0xAC, 0x64, 0x04, 0x00, 0x04, 0x2A, 0x02, 0x00, 0x02, 0x60, 0xAC, 0x64, 0xBD, 0xD9, 0xBD, 0xDB,
-        0x1C, 0x60, 0x08, 0xF3, 0xFF, 0xFF, 0x03, 0x18, 0x1A, 0x60, 0x2D, 0xF3, 0x03, 0x00, 0x1A, 0x60,
-        0x1D, 0xF3, 0xFF, 0xFF, 0xBD, 0xDA, 0x34, 0x60, 0x5C, 0x64, 0x1A, 0x60, 0xCF, 0xFB, 0x5F, 0xF5,
-        0x00, 0x64, 0x2B, 0xFA, 0x00, 0x64, 0x2A, 0xFA, 0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD1, 0x2C, 0xF8,
-        0x32, 0xF8, 0xBD, 0xD1, 0x2D, 0xF8, 0x33, 0xF8, 0xA3, 0xD1, 0x2E, 0xF8, 0x34, 0xF8, 0x00, 0xF4,
-        0x01, 0x63, 0x32, 0x40, 0x08, 0x26, 0x10, 0xBB, 0x16, 0x60, 0xC2, 0xF1, 0xFF, 0xFF, 0x64, 0x40,
-        0xFE, 0x26, 0x10, 0xBB, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x0A, 0x00, 0x19, 0x60,
-        0x45, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x02, 0x22, 0x20, 0xBB, 0x63, 0x44, 0xFF, 0xFF, 0x04, 0x7F,
-        0x60, 0x43, 0x09, 0xFC, 0x27, 0x42, 0x0C, 0xA2, 0x2D, 0x60, 0x5A, 0x63, 0xA2, 0xD3, 0xA3, 0xD3,
-        0x00, 0xBD, 0x01, 0x63, 0xAC, 0x81, 0x09, 0x03, 0x08, 0x03, 0xB8, 0x60, 0x58, 0x4D, 0x15, 0x78,
-        0xFF, 0xFF, 0x00, 0xB8, 0x01, 0x63, 0x01, 0x03, 0x60, 0x43, 0x0E, 0x60, 0x35, 0xFD, 0x12, 0x61,
-        0x59, 0xDC, 0x16, 0x60, 0xC2, 0xF3, 0xFF, 0x60, 0xFF, 0x7C, 0x60, 0x40, 0x0B, 0x2A, 0x02, 0x00,
-        0x33, 0x60, 0x28, 0x7C, 0x1A, 0x60, 0xD0, 0xF9, 0x35, 0x60, 0x98, 0x64, 0x40, 0x48, 0xD9, 0x81,
-        0xFF, 0x60, 0xF2, 0x64, 0xF1, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x5F, 0xF5, 0x3F, 0xFC,
-        0xDB, 0x83, 0x1A, 0x60, 0x4C, 0xFD, 0x00, 0x7C, 0x5A, 0xD9, 0x63, 0x41, 0x34, 0x60, 0x9C, 0x63,
-        0x12, 0x65, 0x00, 0xF4, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85,
-        0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2,
-        0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x5F, 0xF5, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66,
-        0x46, 0x46, 0xC1, 0xFE, 0x06, 0x64, 0x68, 0xFB, 0x46, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x1C, 0x60,
-        0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x60,
-        0x1C, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xDE, 0x60, 0x84, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xDE, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x08, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0xF6, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x26, 0x46, 0x00, 0xF4, 0x0A, 0xF2, 0x00, 0x63, 0x00, 0xA8, 0x68, 0xFD, 0x06, 0x02,
-        0x09, 0xF2, 0xFF, 0xFF, 0x01, 0xB0, 0x01, 0x7C, 0x5A, 0x02, 0x0A, 0xF8, 0x0A, 0xF2, 0x26, 0x46,
-        0x40, 0x59, 0x02, 0x60, 0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB,
-        0x31, 0xF2, 0x59, 0xDB, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D,
-        0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x05, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0x96, 0x78,
-        0xFF, 0xFF, 0xE7, 0x60, 0x0B, 0x78, 0xFF, 0xFF, 0x47, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xD9, 0x60,
-        0xCA, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x20, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78,
-        0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x49, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xDA, 0x60, 0x62, 0x78, 0xFF, 0xFF, 0xFF, 0x60,
-        0xFB, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x4A, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xD9, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0x48, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x0C, 0xF2, 0xFF, 0xFF, 0x60, 0x41, 0xFF, 0xB1, 0xFF, 0xA1, 0x60, 0x47,
-        0xFF, 0xB4, 0x9B, 0x02, 0x9A, 0x03, 0x34, 0x60, 0xF4, 0x63, 0x10, 0x64, 0xBD, 0xDB, 0x66, 0x45,
-        0x26, 0x46, 0x3F, 0xF2, 0x34, 0x60, 0xF2, 0x61, 0xC2, 0xA0, 0xFF, 0xFF, 0x01, 0x04, 0x3E, 0x64,
-        0x65, 0x46, 0x02, 0xA4, 0xA1, 0xDB, 0xC8, 0x81, 0x12, 0x65, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43,
-        0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93,
-        0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x0C, 0xF2,
-        0xFF, 0xFF, 0x1A, 0x65, 0x60, 0x47, 0xFF, 0xB4, 0xC4, 0x85, 0xDC, 0x60, 0x58, 0x4D, 0xC7, 0x78,
-        0xFF, 0xFF, 0x0B, 0xF2, 0xFF, 0xFF, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81,
-        0xFD, 0x02, 0x61, 0x44, 0x94, 0xFB, 0x27, 0x45, 0x02, 0x62, 0x46, 0xD3, 0x5A, 0xD1, 0x60, 0x47,
-        0x56, 0xFB, 0x64, 0x47, 0x55, 0xFB, 0x00, 0x64, 0x5B, 0xFB, 0x0C, 0x62, 0x46, 0xD3, 0x7E, 0xFB,
-        0x0B, 0xF0, 0x0F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0x83, 0xFB, 0x26, 0x46, 0x32, 0xF0, 0x7F, 0xF9,
-        0x33, 0xF0, 0x0E, 0x63, 0xC7, 0x81, 0x80, 0xF9, 0x34, 0xF0, 0x81, 0xF9, 0x59, 0xD1, 0xFF, 0xFF,
-        0x64, 0x44, 0x01, 0x2A, 0xC8, 0x84, 0x60, 0x43, 0x33, 0x60, 0xBC, 0x64, 0x58, 0xD9, 0x59, 0xD1,
-        0x58, 0xD9, 0xFD, 0x1F, 0x16, 0x60, 0xC2, 0xF1, 0x59, 0xD3, 0x64, 0x40, 0x01, 0x36, 0x22, 0x64,
-        0x64, 0x40, 0x00, 0x36, 0x50, 0x94, 0xA6, 0xF1, 0xFF, 0xFF, 0x44, 0x47, 0xA7, 0x46, 0x3A, 0xFA,
-        0xBB, 0xFC, 0xA7, 0x46, 0x0E, 0x60, 0x35, 0xF3, 0x85, 0xFB, 0x2E, 0x60, 0x2E, 0x64, 0x2D, 0x60,
-        0x8A, 0x63, 0xA0, 0xD1, 0xA3, 0xD9, 0x64, 0x41, 0x58, 0xD1, 0x5B, 0xD9, 0x7D, 0xF3, 0x66, 0x45,
-        0xA6, 0xF5, 0x60, 0x40, 0x01, 0x27, 0x08, 0x00, 0x91, 0xFA, 0x61, 0x44, 0xFD, 0x60, 0x58, 0x4E,
-        0xAC, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x07, 0x00, 0x11, 0xF8, 0x64, 0x44, 0xFD, 0x60, 0x58, 0x4E,
-        0xAC, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x65, 0x46, 0x31, 0xF2, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47,
-        0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18,
-        0x61, 0x46, 0x31, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x30, 0xF0,
-        0x63, 0x46, 0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x2F, 0xF0, 0x63, 0x46, 0xD0, 0x80,
-        0xFF, 0xFF, 0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE,
-        0x60, 0x43, 0x61, 0x46, 0xA6, 0xF1, 0xFF, 0xFF, 0xD3, 0x80, 0x31, 0xF2, 0x27, 0x02, 0x66, 0x41,
-        0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F, 0xA6, 0xF1, 0xE0, 0x84, 0x44, 0xD3, 0x64, 0x43,
-        0x11, 0x18, 0x60, 0x46, 0x00, 0xF2, 0xFF, 0xFF, 0xFC, 0x1B, 0x66, 0x44, 0x64, 0x46, 0x80, 0xF0,
-        0x60, 0x46, 0x80, 0xF8, 0x65, 0x46, 0x65, 0x43, 0x80, 0xF0, 0x01, 0xFA, 0x80, 0xFC, 0x64, 0x46,
-        0x80, 0xF8, 0x0B, 0x00, 0x64, 0x46, 0x62, 0x43, 0x00, 0xF2, 0xA3, 0xDB, 0x60, 0x46, 0x80, 0xF0,
-        0x81, 0xFC, 0x80, 0xFC, 0x64, 0x46, 0x80, 0xF8, 0x60, 0x43, 0x61, 0x46, 0x43, 0x4B, 0x01, 0x65,
-        0xFD, 0x60, 0x58, 0x4E, 0xDD, 0x78, 0xFF, 0xFF, 0x43, 0x47, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43,
-        0xFA, 0xA3, 0x00, 0x60, 0x17, 0x61, 0x00, 0x60, 0x01, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C,
-        0xFD, 0x60, 0x58, 0x4E, 0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x00, 0x02, 0x00, 0x64,
-        0x40, 0x4A, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60,
-        0x58, 0x4E, 0x2C, 0x78, 0xFF, 0xFF, 0x20, 0xFE, 0x00, 0x65, 0x00, 0x64, 0x19, 0x60, 0x3B, 0xFB,
-        0x02, 0x00, 0x20, 0xFE, 0xFF, 0x65, 0x02, 0x60, 0x00, 0x63, 0x60, 0xFE, 0xBD, 0xD3, 0xBD, 0xD3,
-        0x60, 0x41, 0x20, 0xFE, 0xCD, 0x81, 0x60, 0x40, 0x80, 0x2A, 0x39, 0x00, 0x7F, 0xB4, 0x02, 0x3A,
-        0x02, 0x00, 0x01, 0x64, 0x2E, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64, 0x2A, 0x00, 0x0B, 0x3A,
-        0x02, 0x00, 0x04, 0x64, 0x26, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x22, 0x00, 0x0C, 0x3A,
-        0x02, 0x00, 0x10, 0x64, 0x1E, 0x00, 0x12, 0x3A, 0x02, 0x00, 0x20, 0x64, 0x1A, 0x00, 0x18, 0x3A,
-        0x02, 0x00, 0x40, 0x64, 0x16, 0x00, 0x24, 0x3A, 0x02, 0x00, 0x80, 0x64, 0x12, 0x00, 0x30, 0x3A,
-        0x02, 0x00, 0x01, 0x67, 0x0E, 0x00, 0x48, 0x3A, 0x02, 0x00, 0x02, 0x67, 0x0A, 0x00, 0x60, 0x3A,
-        0x02, 0x00, 0x04, 0x67, 0x06, 0x00, 0x6C, 0x3A, 0x02, 0x00, 0x08, 0x67, 0x02, 0x00, 0x00, 0x64,
-        0x00, 0x00, 0x19, 0x60, 0x3B, 0xF1, 0xFF, 0xFF, 0xB0, 0x84, 0x19, 0x60, 0x3B, 0xFB, 0x61, 0x40,
-        0x00, 0x36, 0x05, 0x00, 0x60, 0xFE, 0xBD, 0xD3, 0xFF, 0xFF, 0x20, 0xFE, 0xBB, 0x01, 0x65, 0x40,
-        0x00, 0x3A, 0x1E, 0x00, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xFA, 0xA3, 0x00, 0x60,
-        0x17, 0x61, 0x00, 0x60, 0x32, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E,
-        0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x0B, 0x03, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63,
-        0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60, 0x58, 0x4E, 0x2C, 0x78, 0xFF, 0xFF, 0x91, 0x01,
-        0x20, 0xFE, 0x00, 0x65, 0xFC, 0x60, 0x58, 0x4E, 0xC7, 0x78, 0xFF, 0xFF, 0xA1, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x27, 0x04, 0x00, 0xFD, 0x60, 0x58, 0x4E, 0x11, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x37, 0x60, 0xF8, 0x61, 0xA1, 0xD1, 0xA1, 0xF3, 0x01, 0x60, 0xAC, 0x63, 0x60, 0x45, 0x2A, 0x44,
-        0x79, 0xFB, 0xA3, 0xD5, 0x65, 0x40, 0x01, 0x27, 0x5B, 0xD5, 0x65, 0x40, 0x01, 0x27, 0x59, 0xD1,
-        0x66, 0x41, 0xA0, 0x84, 0x24, 0x94, 0x2B, 0x46, 0x0F, 0xFA, 0x7A, 0xFB, 0x16, 0x64, 0x12, 0xFA,
-        0x01, 0x64, 0x11, 0xFA, 0x66, 0x5C, 0xC2, 0x60, 0x58, 0x4E, 0x6D, 0x78, 0xFF, 0xFF, 0x1A, 0x60,
-        0x22, 0xF3, 0x1A, 0x60, 0x21, 0xF1, 0x60, 0x47, 0xB0, 0x84, 0x1C, 0x60, 0x08, 0xF1, 0xFF, 0xFF,
-        0x01, 0x18, 0x80, 0xBC, 0x16, 0x60, 0xC2, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x22, 0x64,
-        0x64, 0x40, 0x00, 0x36, 0x50, 0x94, 0xA7, 0x46, 0x3A, 0xFA, 0xBB, 0xFC, 0xA7, 0x46, 0x80, 0x60,
-        0x03, 0x65, 0x32, 0x40, 0x08, 0x2A, 0x03, 0x65, 0xA7, 0x46, 0x06, 0xF0, 0x7F, 0x60, 0xFF, 0x64,
-        0xA0, 0x84, 0xB4, 0x84, 0x06, 0xFA, 0xBB, 0xFC, 0xA7, 0x46, 0x26, 0x46, 0x2F, 0xF0, 0x30, 0xF0,
-        0x64, 0x43, 0x31, 0xF2, 0x27, 0x46, 0x03, 0xFC, 0x04, 0xF8, 0x05, 0xFA, 0x26, 0x46, 0xD9, 0x60,
-        0x58, 0x4E, 0xAE, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60,
-        0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0x01, 0x64, 0x8A, 0xFB, 0x16, 0x60,
-        0xC9, 0xF3, 0x20, 0x41, 0x00, 0xBC, 0x20, 0xB9, 0x01, 0x03, 0x41, 0x40, 0x20, 0x60, 0x14, 0x61,
-        0xA1, 0xDF, 0x04, 0x64, 0xC1, 0xFE, 0xDB, 0xFB, 0xF1, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xF1, 0xFB,
-        0xF7, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF,
-        0x33, 0x60, 0xE6, 0x65, 0xA5, 0xDF, 0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x0C, 0x64, 0x68, 0xFB, 0x00, 0x60, 0x31, 0x64, 0x08, 0x60, 0x16, 0xFB,
-        0xE1, 0x60, 0x36, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x00, 0x60, 0x02, 0x64, 0x08, 0x60, 0x28, 0xFB,
-        0xE1, 0x60, 0xF7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60,
-        0x27, 0xFB, 0x5A, 0xDB, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x01, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x0F, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1B, 0x60, 0xFE, 0xF3, 0xFF, 0xFF, 0x03, 0x1B, 0xE7, 0x60,
-        0x2E, 0x78, 0xFF, 0xFF, 0xE7, 0x60, 0x2E, 0x78, 0xFF, 0xFF, 0xE1, 0x60, 0xE7, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xF8, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xA6, 0xF3,
-        0xFF, 0xFF, 0x02, 0xA4, 0x60, 0x43, 0x66, 0x41, 0x63, 0x46, 0x05, 0xF2, 0x00, 0xF0, 0x81, 0xF0,
-        0x02, 0x18, 0x64, 0x46, 0x81, 0xF8, 0x07, 0x1B, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD9, 0x02, 0x00, 0x65, 0x46, 0x00, 0xF8, 0xA6, 0xF3, 0x63, 0x45, 0x60, 0x46,
-        0x00, 0xF2, 0xFF, 0xFF, 0xD4, 0x80, 0x01, 0x18, 0xFA, 0x04, 0x80, 0xF8, 0x65, 0x46, 0x00, 0xFA,
-        0x06, 0xF2, 0xFF, 0xFF, 0x00, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0x4B, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x95, 0xF3, 0xFF, 0xFF, 0x10, 0xB0,
-        0xFF, 0xFF, 0x11, 0x03, 0x04, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE1, 0x60, 0x9B, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x69, 0xF3, 0xFF, 0xFF, 0x01, 0xB0, 0xFF, 0xFF, 0x11, 0x03,
-        0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x02, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE1, 0x60, 0xB1, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x64, 0x68, 0xFB, 0xE2, 0x60,
-        0x58, 0x4E, 0x13, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x8A, 0xFB, 0x02, 0x64, 0xC1, 0xFE, 0xDB, 0xFB,
-        0xF1, 0xF3, 0xFF, 0xFF, 0x01, 0xBC, 0xF1, 0xFB, 0x02, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78,
-        0xFF, 0xFF, 0x03, 0x60, 0xE8, 0x63, 0x0E, 0x60, 0x36, 0xFD, 0x08, 0x60, 0x77, 0xF3, 0xFF, 0xFF,
-        0x13, 0x1B, 0x16, 0x60, 0xCC, 0xF3, 0x00, 0x61, 0x60, 0x40, 0x00, 0x36, 0x00, 0xB9, 0x60, 0x40,
-        0x01, 0x36, 0x01, 0xB9, 0x60, 0x40, 0x02, 0x36, 0x06, 0xB9, 0x60, 0x40, 0x03, 0x36, 0x07, 0xB9,
-        0x41, 0x44, 0xD4, 0x60, 0xF6, 0x78, 0xFF, 0xFF, 0xD3, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0x00, 0x60,
-        0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xFF, 0xFF, 0x08, 0x24, 0x46, 0x01, 0xA0, 0x84, 0xA2, 0xDB,
-        0x00, 0x63, 0x68, 0xFD, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x30, 0x00, 0x20, 0x40,
-        0x06, 0x23, 0x10, 0x00, 0x08, 0x60, 0x27, 0xF1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB,
-        0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x28, 0xFB, 0xE1, 0x60, 0xF7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB, 0x10, 0x60, 0x4E, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x44, 0x01, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x01, 0x64, 0x8A, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x50, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x95, 0xF3,
-        0xFF, 0xFF, 0x10, 0xB0, 0xFF, 0xFF, 0x11, 0x03, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x04, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE2, 0x60,
-        0x2A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xB9, 0xF1, 0x0E, 0x60, 0x4B, 0xF9,
-        0x7D, 0xF1, 0x7C, 0xF9, 0x02, 0x64, 0x8A, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x8A, 0xF3, 0x00, 0x65,
-        0xD4, 0x80, 0xFF, 0xFF, 0x0E, 0x03, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x80, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE2, 0x60, 0x4A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x51, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x1B, 0x60, 0xB0, 0x64, 0x67, 0xFB, 0x1C, 0x60, 0x72, 0x63, 0x7F, 0xF3, 0xBD, 0xDB, 0x80, 0xF3,
-        0xBD, 0xDB, 0x81, 0xF3, 0xA3, 0xDB, 0x67, 0xF3, 0x00, 0x60, 0x86, 0xF1, 0x04, 0xA4, 0x67, 0xFB,
-        0xD0, 0x80, 0xA0, 0xD3, 0x1F, 0x07, 0x40, 0x47, 0x60, 0x41, 0x0E, 0x65, 0x45, 0xD3, 0x16, 0x60,
-        0xC2, 0xF1, 0xFF, 0xFF, 0x03, 0x1B, 0x10, 0xB0, 0xFF, 0xFF, 0xED, 0x02, 0x27, 0x44, 0x06, 0xA4,
-        0x60, 0x41, 0xA1, 0xD1, 0x7F, 0xF3, 0x80, 0xF1, 0xD0, 0x80, 0x59, 0xD3, 0x08, 0x02, 0xD0, 0x80,
-        0x81, 0xF3, 0x59, 0xD1, 0x04, 0x02, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x02, 0x03, 0x00, 0xE2, 0x60,
-        0xE6, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0x72, 0x63, 0xBD, 0xD3, 0x7F, 0xFB, 0xBD, 0xD3, 0x80, 0xFB,
-        0xA3, 0xD3, 0x81, 0xFB, 0x53, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE2, 0x60,
-        0x9A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7C, 0xF1, 0x7D, 0xF9, 0x13, 0x60,
-        0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x16, 0xFB, 0xE2, 0x60, 0xC7, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60,
-        0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x01, 0x63, 0x8A, 0xFD, 0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60,
-        0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE, 0x54, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x31, 0x44, 0xF9, 0xB4, 0x40, 0x51, 0xE1, 0x60, 0x22, 0x78, 0xFF, 0xFF, 0x27, 0x43, 0x33, 0x60,
-        0xBE, 0x65, 0xA5, 0xD3, 0x65, 0x41, 0x10, 0xA3, 0x01, 0xA4, 0xFE, 0xB4, 0xC4, 0x85, 0xFE, 0xA1,
-        0xBD, 0xD3, 0x59, 0xD1, 0xFF, 0xFF, 0xD0, 0x80, 0xD5, 0x80, 0x02, 0x02, 0x04, 0x03, 0xF8, 0x01,
-        0xE2, 0x60, 0x73, 0x78, 0xFF, 0xFF, 0x55, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x10, 0x60, 0x2A, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x16, 0xFB,
-        0xE2, 0x60, 0xFE, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x27, 0xD1, 0x7D, 0xF9,
-        0x13, 0x60, 0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x16, 0xFB, 0xE3, 0x60, 0x20, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x07, 0x60, 0xD0, 0x64, 0x0E, 0x60, 0x4B, 0xFB,
-        0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF,
-        0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD3, 0x7F, 0xFB, 0xBD, 0xD3, 0x80, 0xFB, 0xA3, 0xD3, 0x81, 0xFB,
-        0x31, 0x44, 0xF9, 0xB4, 0x40, 0x51, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60,
-        0x04, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE3, 0x60, 0x51, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xB9, 0xF1, 0x0E, 0x60, 0x4B, 0xF9, 0x08, 0x60, 0x15, 0xF1, 0xFE, 0x60, 0xFF, 0x61,
-        0xA1, 0x84, 0x5A, 0xD1, 0x4A, 0xDB, 0xA1, 0x84, 0x5A, 0xDB, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60,
-        0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xE2, 0x60, 0x73, 0x78,
-        0xFF, 0xFF, 0x7D, 0xF1, 0x32, 0x60, 0x7A, 0x61, 0xA1, 0xD3, 0x64, 0x40, 0x01, 0x27, 0x59, 0xD3,
-        0x32, 0x60, 0x7E, 0x61, 0xFD, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0xA1, 0xDB, 0x27, 0x42,
-        0x0C, 0xA2, 0xA2, 0xD3, 0x16, 0x60, 0xAD, 0xF3, 0x00, 0xBD, 0x01, 0x63, 0xAC, 0x81, 0x09, 0x03,
-        0x08, 0x03, 0xB8, 0x60, 0x58, 0x4D, 0x15, 0x78, 0xFF, 0xFF, 0x00, 0xB8, 0x01, 0x63, 0x01, 0x03,
-        0x60, 0x43, 0x0E, 0x60, 0x35, 0xFD, 0x5F, 0xF5, 0x00, 0x64, 0x2B, 0xFA, 0x20, 0x64, 0x2A, 0xFA,
-        0x27, 0x43, 0x06, 0xA3, 0xBD, 0xD1, 0x2C, 0xF8, 0x32, 0xF8, 0xBD, 0xD1, 0x2D, 0xF8, 0x33, 0xF8,
-        0xA3, 0xD1, 0x2E, 0xF8, 0x34, 0xF8, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1,
-        0x31, 0xF8, 0xB9, 0xF1, 0x19, 0xF8, 0xF8, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0x00, 0xF4, 0x01, 0x63,
-        0x32, 0x40, 0x08, 0x26, 0x10, 0xBB, 0x16, 0x60, 0xC2, 0xF1, 0xFF, 0xFF, 0x64, 0x40, 0xFE, 0x26,
-        0x10, 0xBB, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x0A, 0x00, 0x19, 0x60, 0x45, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x02, 0x22, 0x20, 0xBB, 0x63, 0x44, 0xFF, 0xFF, 0x04, 0x7F, 0x60, 0x43,
-        0x09, 0xFC, 0x0E, 0x60, 0x35, 0xF3, 0x12, 0x61, 0x59, 0xDA, 0x1C, 0x60, 0x72, 0x63, 0xBD, 0xD1,
-        0x59, 0xD8, 0xBD, 0xD1, 0x59, 0xD8, 0xA3, 0xD1, 0x59, 0xD8, 0x35, 0x60, 0x98, 0x64, 0x40, 0x48,
-        0xD9, 0x81, 0xFF, 0x60, 0xF2, 0x64, 0xF1, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x5F, 0xF5,
-        0x3F, 0xFC, 0xDB, 0x83, 0x1A, 0x60, 0x4C, 0xFD, 0x20, 0x7C, 0x5A, 0xD9, 0x63, 0x41, 0x34, 0x60,
-        0x9C, 0x63, 0x12, 0x65, 0x00, 0xF4, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2,
-        0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93,
-        0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x5F, 0xF5, 0x25, 0x60, 0xCE, 0x64,
-        0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0xC1, 0xFE, 0x16, 0x64, 0x68, 0xFB, 0x56, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x0E, 0x60, 0x38, 0xF3, 0xFF, 0xFF, 0x64, 0xA4, 0xA2, 0xDB, 0x0E, 0x60, 0x38, 0xF1, 0x0E, 0x60,
-        0x4B, 0xF9, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x00, 0x60, 0x1C, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE4, 0x60, 0x23, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x0E, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x57, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x00, 0x64,
-        0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xE2, 0x60, 0x73, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x16, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60,
-        0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x58, 0x64,
-        0x3B, 0x42, 0x5A, 0xDB, 0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xE6, 0x60, 0x36, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x3D, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x92, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x68, 0xFB, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x26, 0x46, 0x00, 0xF4, 0x0A, 0xF2, 0x09, 0xF2, 0x04, 0x1B, 0x01, 0xB0, 0x01, 0x7C, 0x2D, 0x02,
-        0x0A, 0xF8, 0x59, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0x0A, 0xF2, 0x26, 0x46, 0x40, 0x59, 0x02, 0x60,
-        0x00, 0x61, 0x2F, 0xF2, 0xA1, 0xDB, 0x30, 0xF2, 0x41, 0x58, 0x59, 0xDB, 0x31, 0xF2, 0x59, 0xDB,
-        0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0x05, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0x96, 0x78, 0xFF, 0xFF, 0xE7, 0x60,
-        0x0B, 0x78, 0xFF, 0xFF, 0xE2, 0x60, 0x73, 0x78, 0xFF, 0xFF, 0x5A, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x78, 0x43, 0x02, 0x61, 0x29, 0x60, 0xEA, 0x78, 0xFF, 0xFF, 0x5B, 0x64, 0x3B, 0x42, 0x5A, 0xDB,
-        0x0C, 0xF2, 0xFF, 0xFF, 0x60, 0x41, 0xFF, 0xB1, 0xFF, 0xA1, 0x60, 0x47, 0xFF, 0xB4, 0xC8, 0x02,
-        0xC7, 0x03, 0x34, 0x60, 0xF4, 0x63, 0x30, 0x64, 0xBD, 0xDB, 0x66, 0x45, 0x26, 0x46, 0x3F, 0xF2,
-        0x34, 0x60, 0xF2, 0x61, 0xC2, 0xA0, 0xFF, 0xFF, 0x01, 0x04, 0x3E, 0x64, 0x65, 0x46, 0x02, 0xA4,
-        0xA1, 0xDB, 0xC8, 0x81, 0x12, 0x65, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2,
-        0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93,
-        0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x0C, 0xF2, 0xFF, 0xFF, 0x1A, 0x65,
-        0x60, 0x47, 0xFF, 0xB4, 0xC4, 0x85, 0xDC, 0x60, 0x58, 0x4D, 0xC7, 0x78, 0xFF, 0xFF, 0x0B, 0xF2,
-        0xFF, 0xFF, 0x07, 0xB4, 0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0x61, 0x44,
-        0x94, 0xFB, 0x27, 0x45, 0x02, 0x62, 0x46, 0xD3, 0x5A, 0xD1, 0x60, 0x47, 0x56, 0xFB, 0x64, 0x47,
-        0x55, 0xFB, 0x00, 0x64, 0x5B, 0xFB, 0x0C, 0x62, 0x46, 0xD3, 0x7E, 0xFB, 0x0B, 0xF0, 0x0F, 0x60,
-        0xFF, 0x64, 0xA0, 0x84, 0x83, 0xFB, 0x1C, 0x60, 0x6A, 0x62, 0xA2, 0xD3, 0x85, 0xFB, 0x26, 0x46,
-        0x32, 0xF0, 0x7F, 0xF9, 0x33, 0xF0, 0x80, 0xF9, 0x34, 0xF0, 0x81, 0xF9, 0x2E, 0x60, 0x2E, 0x64,
-        0x2D, 0x60, 0x8A, 0x63, 0xA0, 0xD1, 0xA3, 0xD9, 0x64, 0x41, 0x58, 0xD1, 0x5B, 0xD9, 0x7D, 0xF3,
-        0x66, 0x45, 0xA6, 0xF5, 0x60, 0x40, 0x01, 0x27, 0x08, 0x00, 0x91, 0xFA, 0x61, 0x44, 0xFD, 0x60,
-        0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x07, 0x00, 0x11, 0xF8, 0x64, 0x44, 0xFD, 0x60,
-        0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x12, 0xFA, 0x65, 0x46, 0xA6, 0xF3, 0xFF, 0xFF, 0x02, 0xA4,
-        0x40, 0x4B, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xFA, 0xA3, 0x00, 0x60, 0x17, 0x61, 0x00, 0x60,
-        0x01, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E, 0x7A, 0x78, 0xFF, 0xFF,
-        0x00, 0xBB, 0xFF, 0xFF, 0x00, 0x02, 0x00, 0x64, 0x40, 0x4A, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63,
-        0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60, 0x58, 0x4E, 0x2C, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x00, 0x65, 0x00, 0x64, 0x19, 0x60, 0x3B, 0xFB, 0x02, 0x00, 0x20, 0xFE, 0xFF, 0x65, 0x02, 0x60,
-        0x00, 0x63, 0x60, 0xFE, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0x20, 0xFE, 0xCD, 0x81, 0x60, 0x40,
-        0x80, 0x2A, 0x39, 0x00, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00, 0x01, 0x64, 0x2E, 0x00, 0x04, 0x3A,
-        0x02, 0x00, 0x02, 0x64, 0x2A, 0x00, 0x0B, 0x3A, 0x02, 0x00, 0x04, 0x64, 0x26, 0x00, 0x16, 0x3A,
-        0x02, 0x00, 0x08, 0x64, 0x22, 0x00, 0x0C, 0x3A, 0x02, 0x00, 0x10, 0x64, 0x1E, 0x00, 0x12, 0x3A,
-        0x02, 0x00, 0x20, 0x64, 0x1A, 0x00, 0x18, 0x3A, 0x02, 0x00, 0x40, 0x64, 0x16, 0x00, 0x24, 0x3A,
-        0x02, 0x00, 0x80, 0x64, 0x12, 0x00, 0x30, 0x3A, 0x02, 0x00, 0x01, 0x67, 0x0E, 0x00, 0x48, 0x3A,
-        0x02, 0x00, 0x02, 0x67, 0x0A, 0x00, 0x60, 0x3A, 0x02, 0x00, 0x04, 0x67, 0x06, 0x00, 0x6C, 0x3A,
-        0x02, 0x00, 0x08, 0x67, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x19, 0x60, 0x3B, 0xF1, 0xFF, 0xFF,
-        0xB0, 0x84, 0x19, 0x60, 0x3B, 0xFB, 0x61, 0x40, 0x00, 0x36, 0x05, 0x00, 0x60, 0xFE, 0xBD, 0xD3,
-        0xFF, 0xFF, 0x20, 0xFE, 0xBB, 0x01, 0x65, 0x40, 0x00, 0x3A, 0x1E, 0x00, 0x26, 0x46, 0x3F, 0xF2,
-        0x00, 0xF4, 0x60, 0x43, 0xFA, 0xA3, 0x00, 0x60, 0x17, 0x61, 0x00, 0x60, 0x32, 0x65, 0x01, 0x60,
-        0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60, 0x58, 0x4E, 0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF,
-        0x0B, 0x03, 0x60, 0xFE, 0x02, 0x60, 0x00, 0x63, 0xBD, 0xD3, 0xBD, 0xD3, 0x60, 0x41, 0xFE, 0x60,
-        0x58, 0x4E, 0x2C, 0x78, 0xFF, 0xFF, 0x91, 0x01, 0x20, 0xFE, 0x00, 0x65, 0xFC, 0x60, 0x58, 0x4E,
-        0xC7, 0x78, 0xFF, 0xFF, 0xA1, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x27, 0x04, 0x00, 0xFD, 0x60,
-        0x58, 0x4E, 0x11, 0x78, 0xFF, 0xFF, 0x20, 0xFE, 0x37, 0x60, 0xF8, 0x61, 0xA1, 0xD1, 0xA1, 0xF3,
-        0x01, 0x60, 0xAC, 0x63, 0x60, 0x45, 0x2A, 0x44, 0x79, 0xFB, 0xA3, 0xD5, 0x65, 0x40, 0x01, 0x27,
-        0x5B, 0xD5, 0x65, 0x40, 0x01, 0x27, 0x59, 0xD1, 0x66, 0x41, 0xA0, 0x84, 0x24, 0x94, 0x2B, 0x46,
-        0x0F, 0xFA, 0x7A, 0xFB, 0x16, 0x64, 0x12, 0xFA, 0x01, 0x64, 0x11, 0xFA, 0x66, 0x5C, 0xC2, 0x60,
-        0x58, 0x4E, 0x6D, 0x78, 0xFF, 0xFF, 0xA6, 0xF3, 0xFF, 0xFF, 0x02, 0xA4, 0x40, 0x4B, 0x60, 0x46,
-        0x00, 0x64, 0x17, 0xFA, 0x00, 0x64, 0x16, 0xFA, 0x13, 0xFA, 0x00, 0x65, 0x26, 0x46, 0xFD, 0x60,
-        0x58, 0x4E, 0xDD, 0x78, 0xFF, 0xFF, 0xA6, 0xF3, 0x1D, 0x60, 0xC0, 0x65, 0x02, 0xA4, 0x60, 0x46,
-        0x05, 0xF0, 0x60, 0x41, 0x64, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x00, 0x7C, 0x44, 0xD9, 0x26, 0x46,
-        0x31, 0xF2, 0x61, 0x5C, 0x60, 0x47, 0x00, 0x7F, 0xE0, 0x84, 0x44, 0xD9, 0x26, 0x46, 0x2F, 0xF0,
-        0x61, 0x46, 0x03, 0xF8, 0x26, 0x46, 0x30, 0xF0, 0x61, 0x46, 0x04, 0xF8, 0x26, 0x46, 0x31, 0xF0,
-        0x61, 0x46, 0x05, 0xF8, 0x26, 0x46, 0xD9, 0x60, 0x58, 0x4E, 0xAE, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66,
-        0x46, 0x46, 0x03, 0x65, 0xF1, 0x60, 0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF, 0x01, 0x63, 0x8A, 0xFD,
-        0x08, 0x60, 0x0C, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xC1, 0xFE,
-        0x5C, 0x64, 0x3B, 0x42, 0x5A, 0xDB, 0xE1, 0x60, 0x22, 0x78, 0xFF, 0xFF, 0xFF, 0x60, 0xF7, 0x65,
-        0x20, 0x44, 0x24, 0x80, 0xDA, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0xDB, 0xF3, 0xFF, 0xFF, 0xFD, 0xA0,
-        0x2A, 0xF2, 0x03, 0x03, 0xE6, 0x60, 0xDE, 0x78, 0xFF, 0xFF, 0x60, 0x40, 0xB0, 0x36, 0x11, 0x00,
-        0xC0, 0x36, 0x02, 0x00, 0x2F, 0x58, 0xFF, 0xFF, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B,
-        0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xDA, 0x60, 0x74, 0x78,
-        0xFF, 0xFF, 0x66, 0x45, 0x00, 0xF4, 0x0A, 0xF2, 0x0B, 0xF2, 0xFE, 0xA0, 0xF3, 0xA0, 0x67, 0x02,
-        0x60, 0x41, 0x09, 0xF2, 0x1D, 0x03, 0x00, 0xA0, 0xFF, 0xA0, 0x4B, 0x03, 0x5D, 0x03, 0x00, 0xA0,
-        0xFF, 0xFF, 0x47, 0x03, 0x01, 0x64, 0x10, 0x60, 0x0B, 0xFB, 0x0D, 0x64, 0x10, 0x60, 0x0C, 0xFB,
-        0x03, 0x64, 0x10, 0x60, 0x0D, 0xFB, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60,
-        0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xDA, 0x60, 0x74, 0x78, 0xFF, 0xFF,
-        0x16, 0x60, 0xC3, 0xF3, 0xFF, 0xFF, 0xFE, 0xA0, 0x20, 0x60, 0x16, 0x61, 0x15, 0x02, 0x01, 0x64,
-        0xA1, 0xDB, 0x00, 0x64, 0x10, 0x60, 0x0C, 0xFB, 0x01, 0x64, 0x10, 0x60, 0x0D, 0xFB, 0x26, 0x46,
-        0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66,
-        0x46, 0x46, 0xDA, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0xA1, 0xDB, 0x00, 0x64, 0x10, 0x60,
-        0x0C, 0xFB, 0x01, 0x64, 0x10, 0x60, 0x0D, 0xFB, 0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B,
-        0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0x00, 0x66, 0x46, 0x46, 0xDA, 0x60, 0x74, 0x78,
-        0xFF, 0xFF, 0x65, 0x46, 0x07, 0xF4, 0x06, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x65, 0x46,
-        0x26, 0x46, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF,
-        0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0xDC, 0x60, 0x09, 0x78, 0xFF, 0xFF, 0x0A, 0xF2,
-        0x09, 0xF2, 0xFC, 0xA0, 0xFF, 0xA0, 0x11, 0x02, 0x0A, 0x02, 0x0B, 0xF2, 0x65, 0x46, 0x0A, 0x1B,
-        0x66, 0x41, 0x07, 0xF4, 0x06, 0xF2, 0xFF, 0xFF, 0x01, 0x7E, 0x06, 0xFA, 0x61, 0x46, 0xDA, 0x60,
-        0x74, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x65, 0x46, 0x68, 0xF1, 0x2A, 0xF2,
-        0x64, 0x41, 0x60, 0x40, 0xA0, 0x3A, 0x02, 0x00, 0x08, 0xB1, 0x04, 0x00, 0xC0, 0x3A, 0x0B, 0x00,
-        0x04, 0xB1, 0xFF, 0xFF, 0x1E, 0x03, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x16, 0x00, 0xB0, 0x3A, 0x02, 0x00, 0x01, 0x65, 0x07, 0x00, 0x10, 0x3A,
-        0x02, 0x00, 0x02, 0x65, 0x03, 0x00, 0x30, 0x3A, 0x0C, 0x00, 0x10, 0x65, 0xA5, 0x80, 0xFF, 0xFF,
-        0x08, 0x03, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x00, 0x66, 0x2F, 0x58, 0xFF, 0xFF, 0x16, 0x60, 0xC3, 0xF3, 0xFF, 0xFF, 0xFC, 0xA0, 0xFF, 0xFF,
-        0x14, 0x04, 0x00, 0x60, 0x02, 0x64, 0x08, 0x60, 0x16, 0xFB, 0xE7, 0x60, 0x1B, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x19, 0x60, 0xA5, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80,
-        0xFF, 0xFF, 0x03, 0x03, 0xDA, 0x60, 0x74, 0x78, 0xFF, 0xFF, 0x20, 0x40, 0x08, 0x2A, 0x03, 0x00,
-        0xD9, 0x60, 0xCA, 0x78, 0xFF, 0xFF, 0xE2, 0x60, 0x73, 0x78, 0xFF, 0xFF, 0x4E, 0x64, 0x3B, 0x42,
-        0x5A, 0xDB, 0x2E, 0xF5, 0xFF, 0xFF, 0x27, 0xF2, 0x1D, 0x60, 0xC0, 0x65, 0x60, 0x47, 0x00, 0x7F,
-        0xE0, 0x84, 0x44, 0xD3, 0x66, 0x41, 0x60, 0x46, 0x60, 0x43, 0x05, 0xF2, 0x16, 0x18, 0x61, 0x46,
-        0x27, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0x04, 0xF2, 0x0C, 0x02, 0x61, 0x46, 0x26, 0xF0, 0x63, 0x46,
-        0xD0, 0x80, 0x03, 0xF2, 0x06, 0x02, 0x61, 0x46, 0x25, 0xF0, 0x63, 0x46, 0xD0, 0x80, 0xFF, 0xFF,
-        0x07, 0x03, 0x80, 0xF4, 0xFF, 0xFF, 0x63, 0x46, 0xE8, 0x1B, 0xA6, 0xF3, 0x08, 0xFE, 0x60, 0x43,
-        0x61, 0x46, 0x25, 0xF2, 0x26, 0xF0, 0xA7, 0xF2, 0xA8, 0xF0, 0x65, 0xF5, 0xFF, 0xFF, 0x00, 0xF4,
-        0xFF, 0xFF, 0x89, 0xF8, 0x65, 0xF5, 0xFF, 0xFF, 0x07, 0xFC, 0x2C, 0xFA, 0x2D, 0xF8, 0xAE, 0xFA,
-        0xEA, 0xF3, 0x2F, 0xFA, 0xEB, 0xF3, 0x30, 0xFA, 0xEC, 0xF3, 0x31, 0xFA, 0x7F, 0xF3, 0x32, 0xFA,
-        0x80, 0xF3, 0x33, 0xFA, 0x81, 0xF3, 0x34, 0xFA, 0x1B, 0x60, 0xFE, 0xF3, 0xFF, 0xFF, 0x03, 0x1B,
-        0x00, 0x60, 0xA0, 0x64, 0x02, 0x00, 0x00, 0x60, 0xC0, 0x64, 0x2A, 0xFA, 0x02, 0x63, 0x3F, 0xFC,
-        0xAB, 0xFC, 0x00, 0x64, 0x3E, 0xFA, 0xC9, 0xF1, 0x19, 0xF8, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x66,
-        0x46, 0x46, 0xC1, 0xFE, 0x10, 0x60, 0x2A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xE1, 0x60, 0x34, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0x3A, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x61, 0xFB, 0xA6, 0xF3, 0x07, 0xFA, 0x0C, 0x60, 0x80, 0x64, 0xB9, 0xF1, 0x19, 0xF8, 0x0E, 0xFA,
-        0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x00, 0x60, 0x3A, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78,
-        0xFF, 0xFF, 0x66, 0x44, 0x60, 0xFB, 0xA6, 0xF3, 0x07, 0xFA, 0x0C, 0x60, 0x80, 0x64, 0x0E, 0xFA,
-        0xB9, 0xF1, 0x19, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0xE8, 0x60, 0xEA, 0x64, 0x08, 0x60,
-        0x33, 0xFB, 0x00, 0x60, 0x80, 0x64, 0x08, 0x60, 0x10, 0xFB, 0xE7, 0x60, 0xCB, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x16, 0x60, 0x87, 0xF3, 0xFF, 0xFF, 0x01, 0xA8, 0x03, 0xA8,
-        0x04, 0x03, 0x03, 0x03, 0xE8, 0x60, 0xDC, 0x78, 0xFF, 0xFF, 0x04, 0x60, 0x00, 0x65, 0x20, 0x44,
-        0x34, 0x80, 0x10, 0x60, 0x1E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x9B, 0xFE, 0x03, 0x05, 0x20, 0x40,
-        0x4B, 0x23, 0x0A, 0x00, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60, 0x10, 0xFB, 0xE7, 0x60, 0xD9, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x13, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x01, 0x2A, 0x07, 0x00, 0x90, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x00, 0x64, 0xA2, 0xDB,
-        0x04, 0x00, 0x10, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x8A, 0xF3, 0x58, 0xFB, 0x82, 0xF1,
-        0xBA, 0xFE, 0x01, 0xA8, 0x59, 0xF9, 0x04, 0x02, 0x02, 0x64, 0x8A, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE,
-        0x64, 0x47, 0xDB, 0xF3, 0x10, 0xB0, 0x04, 0xA8, 0x2B, 0x02, 0x2A, 0x02, 0x61, 0xF5, 0xEA, 0xF1,
-        0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0x7F, 0xF1, 0x2C, 0xF8, 0x32, 0xF8,
-        0x80, 0xF1, 0x2D, 0xF8, 0x33, 0xF8, 0x81, 0xF1, 0x2E, 0xF8, 0x34, 0xF8, 0x10, 0x60, 0x48, 0x64,
-        0x2A, 0xFA, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x60, 0x01, 0x64, 0x08, 0x60, 0x10, 0xFB,
-        0xE8, 0x60, 0x36, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x67, 0x82, 0xFB,
-        0x8A, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0xFF, 0xFF, 0x0A, 0x03, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x10, 0xFB, 0xE8, 0x60, 0x38, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60,
-        0x1E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x05, 0x7C, 0x53, 0xF9, 0x2F, 0x60, 0x24, 0x64, 0x54, 0xFB,
-        0x19, 0x60, 0x40, 0xF3, 0xFF, 0xFF, 0x15, 0x18, 0x10, 0x60, 0x1E, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60,
-        0x00, 0x64, 0x08, 0x60, 0x10, 0xFB, 0xE8, 0x60, 0x69, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x19, 0x60, 0x41, 0xF3, 0xFF, 0x60, 0x80, 0x65, 0xA4, 0x80, 0x5A, 0xD3, 0x05, 0x02,
-        0x04, 0x1B, 0x5A, 0xD3, 0xFF, 0xFF, 0x01, 0x1B, 0x15, 0x00, 0x10, 0x60, 0x1E, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x10, 0x60, 0x00, 0x64, 0x08, 0x60, 0x10, 0xFB, 0xE8, 0x60, 0x8A, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0xFF, 0xFF, 0x59, 0xF3, 0x82, 0xFB, 0x60, 0x40, 0x10, 0x27, 0xDA, 0xFE,
-        0xDB, 0xF3, 0x00, 0xA8, 0x04, 0xA8, 0x23, 0x02, 0x22, 0x02, 0x60, 0xF5, 0xEA, 0xF1, 0x2F, 0xF8,
-        0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0x7F, 0xF1, 0x2C, 0xF8, 0x80, 0xF1, 0x2D, 0xF8,
-        0x81, 0xF1, 0x2E, 0xF8, 0xA4, 0x64, 0x2A, 0xFA, 0x83, 0xF1, 0xC0, 0x67, 0xB0, 0x84, 0x2B, 0xFA,
-        0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x20, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x00, 0x60,
-        0x04, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78, 0xFF, 0xFF, 0x01, 0x64, 0x23, 0xFA, 0xF1, 0x60,
-        0x02, 0x64, 0x24, 0xFA, 0x26, 0x60, 0x0A, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0xEB, 0x60, 0xFF, 0x65, 0x20, 0x44,
-        0x24, 0x80, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x58, 0xF3, 0x8A, 0xFB, 0xFF, 0xFF, 0xC1, 0xFE, 0x10, 0x60, 0x1E, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x00, 0x60, 0x80, 0x64, 0x08, 0x60, 0x10, 0xFB, 0xE7, 0x60, 0xCB, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x9C, 0xF1, 0x00, 0x64, 0xB0, 0x86, 0x9C, 0xFB, 0x07, 0x03, 0x26, 0x60,
-        0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78, 0xFF, 0xFF, 0xEB, 0x60, 0xFF, 0x65,
-        0x20, 0x44, 0x24, 0x80, 0x10, 0x60, 0x1E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x80, 0x64,
-        0x08, 0x60, 0x10, 0xFB, 0xE7, 0x60, 0xCB, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x95, 0xF3, 0x26, 0x46, 0x60, 0x43, 0x01, 0x2A, 0x20, 0x00, 0x0F, 0xF2, 0x2A, 0xF0, 0x60, 0x40,
-        0x10, 0x2A, 0x0F, 0x00, 0x64, 0x40, 0x04, 0x27, 0x18, 0x00, 0xFD, 0xB3, 0x64, 0x40, 0x20, 0x27,
-        0x02, 0xBB, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x0B, 0x00, 0xFB, 0xB3, 0x64, 0x40, 0x20, 0x27, 0x04, 0xBB, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60,
-        0x10, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x95, 0xFD, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0xDB, 0xF3, 0x3F, 0xF2, 0x04, 0xA8, 0x57, 0xFB, 0x02, 0x03, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0xF4,
-        0x1E, 0x63, 0x08, 0x64, 0x40, 0x48, 0xBD, 0xD2, 0xFF, 0xFF, 0x60, 0x47, 0x05, 0x36, 0x0B, 0x00,
-        0xFF, 0xB5, 0xC7, 0x83, 0x01, 0x2A, 0xF7, 0x01, 0x4F, 0xD2, 0x5B, 0xD2, 0x60, 0x40, 0x05, 0x37,
-        0x0B, 0x00, 0xDF, 0x83, 0xF5, 0x01, 0xFF, 0xB5, 0x65, 0x41, 0xA3, 0xD2, 0x47, 0x8A, 0x60, 0x47,
-        0x40, 0x4C, 0x5B, 0xD2, 0xDF, 0x83, 0x08, 0x00, 0x40, 0x4C, 0x00, 0x7F, 0xDC, 0x85, 0x47, 0x8A,
-        0x60, 0x41, 0x5B, 0xD2, 0xDB, 0x83, 0x60, 0x47, 0x01, 0xB0, 0xFE, 0xB5, 0x02, 0x03, 0x02, 0x64,
-        0x40, 0x48, 0x2C, 0x47, 0xFF, 0xB4, 0x73, 0xF1, 0x08, 0x28, 0x73, 0xFB, 0x83, 0xF1, 0x65, 0x44,
-        0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0xFD, 0xA1, 0xE1, 0x81, 0xE1, 0x81, 0xE1, 0x85, 0xC4, 0x81,
-        0xD0, 0x84, 0xD1, 0x80, 0x28, 0x07, 0x27, 0x06, 0x9C, 0x84, 0xDC, 0x84, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x85, 0x94, 0xF3, 0xC7, 0x83, 0x01, 0x26, 0x60, 0x47, 0xAB, 0x83, 0xFC, 0xA3, 0x02, 0x00,
-        0x03, 0x04, 0x00, 0xF4, 0x84, 0xA3, 0xFC, 0x01, 0x80, 0x65, 0x47, 0xD0, 0x28, 0x41, 0xA0, 0x80,
-        0xFE, 0xA1, 0x14, 0x03, 0x08, 0x02, 0x08, 0x60, 0x2D, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x1B, 0x00, 0x08, 0x60, 0x2D, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x13, 0x00, 0x28, 0x41, 0xFE, 0xA1, 0xFF, 0xFF, 0x08, 0x03, 0x08, 0x60,
-        0x2D, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x07, 0x00, 0x08, 0x60,
-        0x2D, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x08, 0x60, 0x1B, 0xF1,
-        0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x02, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x63, 0x95, 0xFD, 0x1C, 0x60, 0x9E, 0x63, 0x00, 0x64, 0xA3, 0xDB,
-        0x06, 0xA3, 0x10, 0x60, 0x98, 0x64, 0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64, 0xA3, 0xDB, 0xE9, 0x60,
-        0xB8, 0x64, 0x08, 0x60, 0x4B, 0xFB, 0xCE, 0xF1, 0x0E, 0x60, 0x51, 0xF9, 0x1C, 0x60, 0xAA, 0x63,
-        0x00, 0x64, 0xA3, 0xDB, 0x06, 0xA3, 0x10, 0x60, 0x9C, 0x64, 0xBD, 0xDB, 0xBD, 0xDB, 0x06, 0x64,
-        0xA3, 0xDB, 0xE9, 0x60, 0xC1, 0x64, 0x08, 0x60, 0x4D, 0xFB, 0x16, 0x60, 0xAE, 0xF1, 0x0E, 0x60,
-        0x57, 0xF9, 0x00, 0x60, 0x3A, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x63, 0xFB, 0xA6, 0xF3, 0x07, 0xFA, 0xB9, 0xF3, 0x19, 0xFA, 0xF8, 0x60, 0x80, 0x64, 0x0E, 0xFA,
-        0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x00, 0x60, 0x3A, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78,
-        0xFF, 0xFF, 0x66, 0x44, 0x64, 0xFB, 0xA6, 0xF3, 0x07, 0xFA, 0xB9, 0xF3, 0x19, 0xFA, 0x24, 0x60,
-        0x80, 0x64, 0x0E, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0x3F, 0xFA, 0x00, 0x64, 0x08, 0x60, 0x2D, 0xFB,
-        0x5A, 0xDB, 0xEA, 0x60, 0x1F, 0x64, 0x08, 0x60, 0x37, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x63,
-        0x95, 0xFD, 0xBA, 0xFE, 0xFE, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x82, 0xFD, 0x08, 0x60,
-        0x15, 0xF1, 0x04, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x64, 0x08, 0x60,
-        0x1B, 0xFB, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x16, 0x60, 0xAB, 0xF3, 0xFF, 0xFF, 0x01, 0xA8,
-        0xFF, 0xFF, 0x05, 0x03, 0x19, 0x60, 0xF0, 0xF1, 0x0E, 0x60, 0x57, 0xF9, 0x04, 0x00, 0x16, 0x60,
-        0xAE, 0xF1, 0x0E, 0x60, 0x57, 0xF9, 0x16, 0x60, 0xAB, 0xF3, 0xFF, 0xFF, 0x09, 0x1B, 0x00, 0x64,
-        0x82, 0xFB, 0xBA, 0xFE, 0x00, 0x64, 0x08, 0x60, 0x1B, 0xFB, 0x5A, 0xDB, 0x2F, 0x58, 0xFF, 0xFF,
-        0xBA, 0xFE, 0x95, 0xF3, 0x00, 0x63, 0x82, 0xFD, 0x10, 0xBC, 0x95, 0xFB, 0xFE, 0x60, 0xFF, 0x65,
-        0x20, 0x44, 0x24, 0x80, 0x08, 0x60, 0x08, 0xF1, 0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0x00, 0x60, 0x64, 0x63, 0x0E, 0x60, 0x37, 0xFD, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x01, 0x60, 0x04, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEA, 0x60, 0x73, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xA2, 0x01, 0x31, 0x40, 0x04, 0x2A, 0xE5, 0x01,
-        0x20, 0x40, 0x12, 0x23, 0x11, 0x00, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x5A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x81, 0x60, 0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEA, 0x60,
-        0x73, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0xDD, 0x01, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x01, 0x60, 0x00, 0x65, 0x20, 0x44, 0x34, 0x80, 0x64, 0xF5, 0xB9, 0xF1, 0x19, 0xF8, 0x7F, 0xF1,
-        0x2C, 0xF8, 0x32, 0xF8, 0x80, 0xF1, 0x2D, 0xF8, 0x33, 0xF8, 0x81, 0xF1, 0x2E, 0xF8, 0x34, 0xF8,
-        0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0x11, 0x60, 0x48, 0x64,
-        0x2A, 0xFA, 0x00, 0x64, 0x2B, 0xFA, 0x23, 0xFA, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x60,
-        0x01, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEA, 0x60, 0xC9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x64, 0xF5, 0x23, 0xF2, 0xFF, 0xFF, 0x01, 0x18, 0x82, 0x01, 0x10, 0x67, 0x82, 0xFB,
-        0x03, 0x64, 0x96, 0xFB, 0xFE, 0x60, 0xFF, 0x65, 0x20, 0x44, 0x24, 0x80, 0x08, 0x60, 0x08, 0xF1,
-        0x80, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0x81, 0x60, 0x00, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEA, 0x60, 0xEA, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x0C, 0x00, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xEA, 0x60, 0x1F, 0x78, 0xFF, 0xFF, 0x06, 0x60, 0x00, 0x65,
-        0x20, 0x41, 0x8C, 0xF3, 0xA5, 0x80, 0x01, 0xB0, 0x01, 0x02, 0x06, 0x00, 0x10, 0x60, 0x36, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x6E, 0x65, 0xA5, 0xD3, 0x01, 0x63,
-        0x8A, 0xFD, 0x26, 0x1B, 0x00, 0x60, 0x64, 0x64, 0xA5, 0xDB, 0x64, 0xF5, 0xB9, 0xF1, 0x19, 0xF8,
-        0x7F, 0xF1, 0x2C, 0xF8, 0x32, 0xF8, 0x80, 0xF1, 0x2D, 0xF8, 0x33, 0xF8, 0x81, 0xF1, 0x2E, 0xF8,
-        0x34, 0xF8, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0x11, 0x60,
-        0x48, 0x64, 0x2A, 0xFA, 0x00, 0x64, 0x2B, 0xFA, 0x23, 0xFA, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x06, 0x00,
-        0x95, 0xF3, 0x32, 0x40, 0x02, 0x26, 0x02, 0x00, 0x40, 0x2A, 0xDA, 0xFE, 0xC1, 0xFE, 0x10, 0x60,
-        0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60, 0x82, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEB, 0x60,
-        0x45, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60,
-        0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xEA, 0x60, 0x1F, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x06, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0xBA, 0xFE, 0xED, 0x60, 0x6D, 0x78, 0xFF, 0xFF, 0x02, 0x64, 0x8A, 0xFB, 0x01, 0x60, 0x00, 0x65,
-        0x20, 0x44, 0x34, 0x80, 0xBA, 0xFE, 0xC1, 0xFE, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x10, 0x60, 0x5A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60, 0x46, 0x64, 0x08, 0x60, 0x1C, 0xFB,
-        0xEB, 0x60, 0x76, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1,
-        0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xEA, 0x60,
-        0x1F, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x45, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x08, 0x60, 0x2D, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0F, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xED, 0x60, 0x6D, 0x78, 0xFF, 0xFF, 0x31, 0x01, 0x00, 0x60,
-        0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0B, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x16, 0x60, 0xAC, 0xF1,
-        0x95, 0xF3, 0x00, 0x61, 0xD1, 0x80, 0xF7, 0xB4, 0xF1, 0x03, 0x95, 0xFB, 0x33, 0x00, 0x00, 0x60,
-        0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0E, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x16, 0x60, 0xAC, 0xF1,
-        0x95, 0xF3, 0x00, 0x61, 0xD1, 0x80, 0x08, 0xBC, 0x03, 0x02, 0xEC, 0x60, 0x9C, 0x78, 0xFF, 0xFF,
-        0x95, 0xFB, 0x20, 0x00, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0xEC, 0x60, 0x9C, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x40, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xC8, 0x01, 0x00, 0x60, 0x02, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x05, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xED, 0x60, 0x6D, 0x78, 0xFF, 0xFF,
-        0x2F, 0x58, 0xFF, 0xFF, 0x02, 0x63, 0x95, 0xF3, 0x8A, 0xFD, 0x01, 0xBC, 0xC1, 0xFE, 0x95, 0xFB,
-        0xCE, 0xF1, 0x0E, 0x60, 0x51, 0xF9, 0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60,
-        0x5A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60, 0x34, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEC, 0x60,
-        0x05, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x1C, 0x60, 0x9E, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60,
-        0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0D, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x9E, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xEA, 0x60, 0x1F, 0x78,
-        0xFF, 0xFF, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x22, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x95, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x04, 0x2A, 0x01, 0x00, 0xD5, 0x01, 0x1C, 0x60, 0x9E, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x95, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x08, 0x2A, 0x01, 0x00, 0x68, 0x00, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x02, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x59, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xED, 0x60, 0x6D, 0x78, 0xFF, 0xFF,
-        0x08, 0x60, 0x2D, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x08, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x95, 0xF3, 0xFF, 0xFF, 0x08, 0xBC, 0x95, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60,
-        0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xA4, 0x01, 0x00, 0x60,
-        0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0B, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x9E, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x35, 0x00, 0x00, 0x60,
-        0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0B, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x9E, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x1E, 0x00, 0x08, 0x60,
-        0x1B, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x14, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x95, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x08, 0x2A, 0x01, 0x00, 0x16, 0x00, 0x08, 0x60, 0x1B, 0xF1,
-        0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x08, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xED, 0x60,
-        0x6D, 0x78, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x00, 0x95, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4,
-        0x95, 0xFB, 0xEA, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0xAB, 0xF3, 0xFF, 0xFF, 0x01, 0xA8,
-        0xFF, 0xFF, 0x03, 0x02, 0xED, 0x60, 0x76, 0x78, 0xFF, 0xFF, 0x95, 0xF3, 0x01, 0x63, 0x8A, 0xFD,
-        0x21, 0xBC, 0x95, 0xFB, 0x63, 0xF5, 0x7F, 0xF1, 0x2C, 0xF8, 0x80, 0xF1, 0x2D, 0xF8, 0x81, 0xF1,
-        0x2E, 0xF8, 0x83, 0xF1, 0xC0, 0x67, 0xB0, 0x84, 0x2B, 0xFA, 0xB9, 0xF1, 0x19, 0xF8, 0xEA, 0xF1,
-        0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0x10, 0x60, 0xA4, 0x64, 0x2A, 0xFA,
-        0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x60, 0x50, 0x64, 0x0E, 0x60, 0x51, 0xFB, 0x1C, 0x60,
-        0x9E, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x10, 0x60,
-        0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x5A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x01, 0x60,
-        0x2C, 0x64, 0x08, 0x60, 0x1C, 0xFB, 0xEC, 0x60, 0xE9, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0D, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x9E, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB,
-        0xFF, 0xFF, 0x04, 0xFF, 0xEA, 0x60, 0x1F, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x2D, 0xF1, 0x00, 0x60,
-        0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x95, 0x01, 0x08, 0x60,
-        0x1B, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x08, 0x03, 0xA0, 0x84, 0xA2, 0xDB,
-        0x95, 0xF3, 0xFF, 0xFF, 0x02, 0xB0, 0xFF, 0xFF, 0x49, 0x03, 0x86, 0x01, 0x00, 0x60, 0x08, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x40, 0x00, 0x00, 0x60, 0x02, 0x64,
-        0xA0, 0x80, 0x9C, 0x84, 0x14, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x9E, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x16, 0x60, 0xAC, 0xF3, 0x95, 0xF3,
-        0x00, 0xA8, 0xF7, 0xB4, 0x2B, 0x03, 0x95, 0xFB, 0xEB, 0x60, 0xE2, 0x78, 0xFF, 0xFF, 0x00, 0x60,
-        0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x15, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x1C, 0x60, 0x9E, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x16, 0x60, 0xAC, 0xF3,
-        0x95, 0xF3, 0x00, 0xA8, 0x08, 0xBC, 0x01, 0x02, 0x4F, 0x01, 0x95, 0xFB, 0xEB, 0x60, 0xE2, 0x78,
-        0xFF, 0xFF, 0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03,
-        0xA0, 0x84, 0xA2, 0xDB, 0x02, 0x00, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x00, 0x1C, 0x60, 0x9E, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x95, 0xF3, 0xFF, 0xFF,
-        0xFE, 0xB4, 0x95, 0xFB, 0xEA, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0x95, 0xF3, 0x01, 0x63, 0x8A, 0xFD,
-        0x01, 0xBC, 0x95, 0xFB, 0x00, 0x64, 0x82, 0xFB, 0xC1, 0xFE, 0x28, 0x00, 0x95, 0xF3, 0x01, 0x63,
-        0x8A, 0xFD, 0x01, 0xBC, 0x95, 0xFB, 0x00, 0x64, 0x82, 0xFB, 0x63, 0xF5, 0x7F, 0xF1, 0x2C, 0xF8,
-        0x80, 0xF1, 0x2D, 0xF8, 0x81, 0xF1, 0x2E, 0xF8, 0x83, 0xF1, 0xC0, 0x67, 0xB0, 0x84, 0x2B, 0xFA,
-        0xB9, 0xF1, 0x19, 0xF8, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8,
-        0x00, 0x60, 0xA4, 0x64, 0x2A, 0xFA, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x1C, 0x60, 0xAA, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x10, 0x60, 0x36, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x5A, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x03, 0x60, 0x0E, 0x64,
-        0x08, 0x60, 0x1C, 0xFB, 0xED, 0x60, 0xB8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x1B, 0xF1, 0x01, 0x60, 0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0D, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1C, 0x60, 0xAA, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0xEA, 0x60, 0x1F, 0x78, 0xFF, 0xFF, 0x00, 0x60, 0x0A, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xCA, 0x01, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84,
-        0x14, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x08, 0x60, 0x2D, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x91, 0x01, 0x00, 0x60, 0x12, 0x64, 0xA0, 0x80,
-        0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0xB1, 0x01, 0x08, 0x60, 0x1B, 0xF1, 0x02, 0x60,
-        0x00, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0xB2, 0x03, 0xA0, 0x84, 0xA2, 0xDB, 0x10, 0x67, 0x82, 0xFB,
-        0x10, 0x60, 0x36, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x10, 0x60, 0x5A, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x64, 0xF5, 0xB9, 0xF1, 0x19, 0xF8, 0x7F, 0xF1, 0x2C, 0xF8, 0x32, 0xF8, 0x80, 0xF1, 0x2D, 0xF8,
-        0x33, 0xF8, 0x81, 0xF1, 0x2E, 0xF8, 0x34, 0xF8, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8,
-        0xEC, 0xF1, 0x31, 0xF8, 0x11, 0x60, 0x48, 0x64, 0x2A, 0xFA, 0x00, 0x64, 0x2B, 0xFA, 0x23, 0xFA,
-        0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0x95, 0xF3, 0xC1, 0xFE, 0xFE, 0xB4, 0x95, 0xFB, 0x00, 0x60, 0x03, 0x64,
-        0x08, 0x60, 0x1C, 0xFB, 0xEE, 0x60, 0x30, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x1B, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x33, 0x01, 0x64, 0xF5, 0x23, 0xF2, 0x96, 0xF3, 0x04, 0x18, 0xCC, 0x84, 0x96, 0xFB,
-        0x01, 0x03, 0x2B, 0x01, 0xEA, 0x60, 0xD0, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0xAB, 0xF3, 0x82, 0xF1,
-        0x02, 0xA8, 0x2A, 0xF2, 0x03, 0x02, 0xB0, 0x84, 0x2A, 0xFA, 0x07, 0x00, 0x08, 0x60, 0x1B, 0xF1,
-        0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x25, 0x60, 0xC8, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0x12, 0x60, 0xED, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0xDF, 0x02, 0xCA, 0x60, 0xD4, 0x78,
-        0xFF, 0xFF, 0x10, 0x60, 0x48, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x00, 0x60, 0x06, 0x64, 0x08, 0x60,
-        0x25, 0xFB, 0xEE, 0x60, 0x77, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60,
-        0x18, 0x64, 0x08, 0x60, 0x25, 0xFB, 0xEE, 0x60, 0x77, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x26, 0x46, 0x00, 0xF4, 0xDB, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0x03, 0x36, 0x1B, 0x00,
-        0x0E, 0xF0, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0xEF, 0xB4, 0x60, 0x44, 0x64, 0x40, 0x04, 0x27,
-        0x07, 0x00, 0xA2, 0xDB, 0x13, 0x64, 0xCB, 0xFB, 0x01, 0x60, 0x67, 0x64, 0x37, 0xFB, 0x0B, 0x00,
-        0x10, 0xBC, 0xA2, 0xDB, 0x08, 0x64, 0xCB, 0xFB, 0xA1, 0xF3, 0x01, 0x60, 0x67, 0x7C, 0x60, 0x40,
-        0x01, 0x27, 0x5B, 0x7C, 0x37, 0xF9, 0x26, 0x46, 0x3F, 0xF2, 0x00, 0xF4, 0x60, 0x43, 0xF4, 0xA3,
-        0x00, 0x60, 0x1D, 0x61, 0x00, 0x60, 0x2A, 0x65, 0x01, 0x60, 0xFF, 0x64, 0x40, 0x4C, 0xFD, 0x60,
-        0x58, 0x4E, 0x7A, 0x78, 0xFF, 0xFF, 0x00, 0xBB, 0xFF, 0xFF, 0x01, 0x02, 0x3B, 0x00, 0x02, 0x60,
-        0x01, 0x63, 0xA3, 0xD1, 0xDB, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0x03, 0x36, 0x1F, 0x00, 0x19, 0x60,
-        0x45, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x26, 0x09, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF,
-        0xFD, 0xB4, 0x60, 0x44, 0x64, 0x40, 0x02, 0x27, 0x02, 0xBC, 0xA2, 0xDB, 0x19, 0x60, 0x45, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x02, 0x26, 0x1C, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0xFB, 0xB4,
-        0x60, 0x44, 0x64, 0x40, 0x04, 0x27, 0x04, 0xBC, 0xA2, 0xDB, 0x12, 0x00, 0x64, 0x40, 0x02, 0x2B,
-        0x06, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0x60, 0x44, 0xA2, 0xDB, 0x64, 0x40,
-        0x04, 0x2B, 0x06, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x04, 0xBC, 0x60, 0x44, 0xA2, 0xDB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x0E, 0xF0, 0xDB, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0x03, 0x36, 0x18, 0x00,
-        0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x02, 0xBC, 0x60, 0x44, 0xFB, 0xB4, 0x60, 0x44, 0x64, 0x40,
-        0x20, 0x2A, 0x0A, 0x00, 0x60, 0x43, 0x19, 0x60, 0x45, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x02, 0x26,
-        0x02, 0x00, 0x63, 0x44, 0x02, 0x00, 0x63, 0x44, 0x04, 0xBC, 0x19, 0x60, 0x7B, 0xFB, 0x09, 0x00,
-        0x64, 0x40, 0x20, 0x26, 0x06, 0x00, 0x19, 0x60, 0x7B, 0xF3, 0xFF, 0xFF, 0x04, 0xBC, 0x60, 0x44,
-        0xA2, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0xB0, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x25, 0x78,
-        0xFF, 0xFF, 0x66, 0x44, 0x5C, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x80, 0x64, 0x2A, 0xFA, 0xC9, 0xF1,
-        0x19, 0xF8, 0x00, 0x64, 0x3E, 0xFA, 0x00, 0x60, 0x80, 0x64, 0x0E, 0xFA, 0xA6, 0xF1, 0x07, 0xF8,
-        0x67, 0x44, 0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0xF1, 0x60, 0x2C, 0x64, 0x08, 0x60, 0x31, 0xFB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x5C, 0xF5, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1,
-        0x31, 0xF8, 0x7F, 0xF1, 0x32, 0xF8, 0x80, 0xF1, 0x33, 0xF8, 0x81, 0xF1, 0x34, 0xF8, 0x16, 0x60,
-        0xC2, 0xF1, 0x02, 0x64, 0x64, 0x40, 0xFE, 0x26, 0x10, 0xBC, 0x32, 0x40, 0x08, 0x26, 0x10, 0xBC,
-        0x20, 0xBC, 0xFB, 0x60, 0xFF, 0x65, 0x60, 0x44, 0xA4, 0x84, 0x1B, 0x60, 0x09, 0xFB, 0x16, 0x60,
-        0xC1, 0xF1, 0x33, 0x60, 0xBE, 0x64, 0x02, 0x18, 0x2D, 0x60, 0x32, 0x64, 0x1A, 0x60, 0xAD, 0xFB,
-        0x1A, 0x60, 0xBD, 0xFB, 0x34, 0x60, 0x18, 0x61, 0x17, 0x60, 0x14, 0xF3, 0x35, 0x60, 0x36, 0x65,
-        0xFE, 0xA4, 0xE0, 0x84, 0x06, 0x05, 0x67, 0x44, 0x1A, 0x60, 0xB5, 0xFB, 0x1A, 0x60, 0xC5, 0xFB,
-        0x4B, 0x00, 0xE0, 0x84, 0xC4, 0x85, 0x1A, 0x60, 0x1F, 0xF3, 0xA5, 0xD1, 0xDA, 0x85, 0xA0, 0x83,
-        0x1A, 0x60, 0x1B, 0xFD, 0xA5, 0xD1, 0x34, 0x60, 0x34, 0x62, 0xA0, 0x83, 0xA2, 0xDD, 0x67, 0x44,
-        0x1A, 0x60, 0xB5, 0xFB, 0x1A, 0x60, 0xC5, 0xFB, 0x1A, 0x60, 0x2C, 0xF3, 0xFF, 0xFF, 0x21, 0x18,
-        0x33, 0x60, 0xF4, 0x61, 0x0F, 0x60, 0x00, 0x7C, 0x00, 0x60, 0xAC, 0x65, 0xEF, 0x60, 0x58, 0x4D,
-        0xC1, 0x78, 0xFF, 0xFF, 0x1A, 0x60, 0x2D, 0xF1, 0x59, 0xD9, 0x33, 0x60, 0xF2, 0x65, 0xD5, 0x84,
-        0x30, 0x7F, 0xA5, 0xDB, 0x65, 0x44, 0x1A, 0x60, 0xB5, 0xFB, 0x1A, 0x60, 0xC5, 0xFB, 0x1A, 0x60,
-        0x2C, 0xF3, 0xFF, 0xFF, 0xFE, 0xA4, 0xFF, 0xFF, 0x08, 0x24, 0x03, 0x00, 0xFF, 0x60, 0xFF, 0x64,
-        0x13, 0x00, 0x34, 0x60, 0x18, 0x61, 0x50, 0x60, 0x00, 0x7C, 0x00, 0x60, 0xF2, 0x65, 0xEF, 0x60,
-        0x58, 0x4D, 0xC1, 0x78, 0xFF, 0xFF, 0x1A, 0x60, 0x1D, 0xF1, 0x59, 0xD9, 0x34, 0x60, 0x12, 0x65,
-        0xD5, 0x84, 0xDD, 0x7F, 0xA5, 0xDB, 0x65, 0x44, 0x1A, 0x60, 0xB2, 0xFB, 0x1A, 0x60, 0xC2, 0xFB,
-        0x79, 0x00, 0x1A, 0x60, 0x1E, 0xF3, 0x34, 0x60, 0x34, 0x62, 0xFD, 0xA0, 0xA2, 0xD3, 0xEE, 0x03,
-        0x60, 0x40, 0x02, 0x2A, 0x02, 0x00, 0x01, 0x63, 0x0B, 0x00, 0x04, 0x2A, 0x02, 0x00, 0x02, 0x63,
-        0x07, 0x00, 0x10, 0x2A, 0x02, 0x00, 0x04, 0x63, 0x03, 0x00, 0x20, 0x2A, 0x01, 0x00, 0x05, 0x63,
-        0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x1A, 0x60, 0x1E, 0xF3, 0x1A, 0x60, 0x1B, 0xF3,
-        0xFE, 0xA0, 0x40, 0x4C, 0xD3, 0x03, 0x00, 0x60, 0x00, 0x63, 0x59, 0xDD, 0x41, 0x4A, 0x2C, 0x40,
-        0x01, 0x2A, 0x05, 0x00, 0x00, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40,
-        0x02, 0x2A, 0x03, 0x00, 0x01, 0x63, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x04, 0x2A, 0x05, 0x00,
-        0x02, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x10, 0x2A, 0x05, 0x00,
-        0x04, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x20, 0x2A, 0x05, 0x00,
-        0x05, 0x63, 0x63, 0x47, 0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2A, 0x44, 0x51, 0x93, 0xEB, 0x83,
-        0xEB, 0x83, 0xA0, 0xDD, 0x1A, 0x60, 0x1E, 0xF3, 0x1A, 0x60, 0x1C, 0xF3, 0xFF, 0xA0, 0x40, 0x4C,
-        0x9D, 0x03, 0x59, 0xDF, 0x41, 0x4A, 0x2C, 0x40, 0x01, 0x2A, 0x05, 0x00, 0x00, 0x63, 0x63, 0x47,
-        0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x02, 0x2A, 0x05, 0x00, 0x01, 0x63, 0x63, 0x47,
-        0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2C, 0x40, 0x04, 0x2A, 0x05, 0x00, 0x02, 0x63, 0x63, 0x47,
-        0xB4, 0x83, 0x59, 0xD9, 0x59, 0xDD, 0x2A, 0x44, 0x51, 0x93, 0xEB, 0x83, 0xEB, 0x83, 0xA0, 0xDD,
-        0x2D, 0x58, 0xFF, 0xFF, 0x00, 0x60, 0x04, 0x64, 0x08, 0x60, 0x0A, 0xFB, 0xF0, 0x60, 0x44, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x12, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0x7D, 0xF1, 0x35, 0x60, 0xCC, 0x64, 0x64, 0x40, 0x01, 0x2B, 0x01, 0x00, 0x67, 0x44, 0x1A, 0x60,
-        0xAF, 0xFB, 0x1A, 0x60, 0xBF, 0xFB, 0x1A, 0x60, 0xE7, 0xF9, 0x35, 0x60, 0x62, 0x65, 0xF1, 0x60,
-        0x58, 0x4D, 0x74, 0x78, 0xFF, 0xFF, 0x7D, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x2B, 0x05, 0x00,
-        0xFF, 0x60, 0xFF, 0x63, 0x1A, 0x60, 0xB3, 0xFD, 0x08, 0x00, 0x36, 0x60, 0x04, 0x63, 0x1A, 0x60,
-        0xB3, 0xFD, 0xF1, 0x60, 0x58, 0x4D, 0x8C, 0x78, 0xFF, 0xFF, 0x5C, 0xF5, 0x00, 0xF4, 0x7E, 0xF1,
-        0x06, 0xF8, 0x1B, 0x60, 0x09, 0xF3, 0x19, 0x60, 0x7B, 0xF1, 0xFB, 0x60, 0xFF, 0x65, 0x60, 0x44,
-        0xA4, 0x84, 0x60, 0x47, 0x64, 0x40, 0x10, 0x26, 0x04, 0xBC, 0x60, 0x47, 0x07, 0xFA, 0x35, 0x60,
-        0x5A, 0x64, 0x40, 0x48, 0x10, 0x61, 0x00, 0x60, 0x00, 0x64, 0xF1, 0x60, 0x58, 0x4D, 0x34, 0x78,
-        0xFF, 0xFF, 0x5C, 0xF5, 0x3F, 0xFC, 0xDB, 0xFE, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x04, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0xDB, 0xF3, 0x9B, 0xFE, 0xFD, 0xA0, 0x25, 0x04, 0x24, 0x02, 0x04, 0x64, 0x03, 0xFA,
-        0x00, 0xF4, 0x09, 0xF2, 0xFF, 0xFF, 0x60, 0x47, 0x00, 0x3A, 0x1C, 0x00, 0x60, 0x43, 0x00, 0x36,
-        0x1C, 0x00, 0xE0, 0xA0, 0xDA, 0x85, 0x16, 0x07, 0x33, 0x60, 0xBE, 0x61, 0xA1, 0xD1, 0xFF, 0xFF,
-        0xD3, 0x80, 0xCB, 0x83, 0x0F, 0x02, 0x07, 0x0E, 0x59, 0xD3, 0xA5, 0xD0, 0xDA, 0x85, 0xD0, 0x80,
-        0xFF, 0xFF, 0x08, 0x02, 0xF9, 0x1F, 0x12, 0x1E, 0xA5, 0xD0, 0x59, 0xD3, 0xFF, 0xFF, 0x90, 0x80,
-        0xFF, 0x22, 0x0C, 0x00, 0xF1, 0x60, 0x2A, 0x78, 0xFF, 0xFF, 0x16, 0x60, 0xC1, 0xF3, 0xFF, 0xFF,
-        0x60, 0x40, 0x01, 0x2A, 0x03, 0x00, 0x2D, 0x60, 0x32, 0x64, 0x02, 0x00, 0x33, 0x60, 0xBE, 0x64,
-        0x1A, 0x60, 0xBD, 0xFB, 0x26, 0x46, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2,
-        0x2E, 0xFA, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8, 0x7F, 0xF1,
-        0x32, 0xF8, 0x80, 0xF1, 0x33, 0xF8, 0x81, 0xF1, 0x34, 0xF8, 0x00, 0x65, 0xFD, 0x60, 0x58, 0x4E,
-        0xDD, 0x78, 0xFF, 0xFF, 0x61, 0x44, 0x19, 0x60, 0x3F, 0xFB, 0x50, 0x63, 0x2A, 0xFC, 0xC9, 0xF3,
-        0x19, 0xFA, 0x00, 0x64, 0x3E, 0xFA, 0xA6, 0xF3, 0x07, 0xFA, 0x00, 0xF4, 0x7E, 0xF1, 0x06, 0xF8,
-        0x1B, 0x60, 0x09, 0xF3, 0x19, 0x60, 0x7B, 0xF1, 0xFB, 0x60, 0xFF, 0xB7, 0x64, 0x40, 0x10, 0x26,
-        0x04, 0xBC, 0x60, 0x47, 0x07, 0xFA, 0x35, 0x60, 0x82, 0x65, 0xF1, 0x60, 0x58, 0x4D, 0x74, 0x78,
-        0xFF, 0xFF, 0x7D, 0xF3, 0x36, 0x60, 0x04, 0x63, 0x60, 0x40, 0x01, 0x27, 0x67, 0x43, 0x1A, 0x60,
-        0xC3, 0xFD, 0x35, 0x60, 0x7A, 0x64, 0x40, 0x48, 0x10, 0x61, 0x00, 0x60, 0x00, 0x64, 0xF1, 0x60,
-        0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x26, 0x46, 0x3F, 0xFC, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE,
-        0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x09, 0xFB, 0x5A, 0xDB,
-        0x00, 0x64, 0x92, 0xFB, 0x2F, 0x58, 0xFF, 0xFF, 0x1B, 0x60, 0x0A, 0xFB, 0xCD, 0x81, 0x28, 0xD3,
-        0x5A, 0x88, 0xDC, 0x83, 0x31, 0x18, 0xFB, 0x03, 0x61, 0x40, 0x7F, 0x3A, 0x06, 0x00, 0x1B, 0x60,
-        0x0A, 0xF3, 0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x00, 0xF4, 0x60, 0xFE, 0xA3, 0xD1, 0x5D, 0xD8,
-        0x61, 0x40, 0x7F, 0x3A, 0x08, 0x00, 0x20, 0xFE, 0x1B, 0x60, 0x0A, 0xF3, 0x03, 0x61, 0x7C, 0xA4,
-        0xA2, 0xDB, 0x00, 0xF4, 0x60, 0xFE, 0xBF, 0xD3, 0x5D, 0xDA, 0xFF, 0xB4, 0x00, 0x7F, 0x12, 0x03,
-        0xDF, 0x83, 0x61, 0x40, 0x7F, 0x3A, 0x0A, 0x00, 0x20, 0xFE, 0x60, 0x45, 0x1B, 0x60, 0x0A, 0xF3,
-        0x03, 0x61, 0x7C, 0xA4, 0xA2, 0xDB, 0x65, 0x44, 0x00, 0xF4, 0x60, 0xFE, 0xBD, 0xD1, 0xCC, 0x84,
-        0x5D, 0xD8, 0xEF, 0x02, 0x20, 0xFE, 0xCB, 0x01, 0x1B, 0x60, 0x0A, 0xF1, 0xFD, 0xA1, 0xFF, 0xB1,
-        0xC1, 0x83, 0xA2, 0xDD, 0x2D, 0x58, 0xFF, 0xFF, 0x67, 0x5C, 0x1C, 0x60, 0xE6, 0x61, 0xA1, 0xD3,
-        0xA5, 0xD9, 0x10, 0x18, 0x60, 0x43, 0x35, 0x60, 0xD4, 0x64, 0xA5, 0xDB, 0x60, 0xFE, 0xA0, 0xDD,
-        0x20, 0xFE, 0xDC, 0x84, 0xCF, 0x83, 0xE3, 0x83, 0x59, 0xD1, 0xDC, 0x84, 0x60, 0xFE, 0xA0, 0xD9,
-        0x20, 0xFE, 0xFA, 0x1F, 0x2D, 0x58, 0xFF, 0xFF, 0x19, 0x60, 0x7B, 0xF3, 0x36, 0x60, 0x06, 0x62,
-        0x07, 0xB4, 0x60, 0xFE, 0xA2, 0xDB, 0x20, 0xFE, 0x2D, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40,
-        0x40, 0x26, 0x27, 0x00, 0x45, 0x48, 0x00, 0x60, 0x10, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78,
-        0xFF, 0xFF, 0x1F, 0x03, 0xF2, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x00, 0x60, 0x48, 0x61, 0x28, 0x44,
-        0x59, 0xDA, 0x03, 0x64, 0x38, 0x43, 0xBD, 0xD1, 0xCC, 0x84, 0x59, 0xD8, 0xFC, 0x02, 0x39, 0x44,
-        0x59, 0xDA, 0x16, 0x60, 0xC3, 0xF3, 0x59, 0xDA, 0x07, 0x64, 0x23, 0xFA, 0x26, 0x60, 0x0A, 0x64,
-        0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF,
-        0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0x0E, 0x57, 0x32, 0x40, 0x40, 0x26, 0x1B, 0x00, 0x45, 0x48,
-        0x00, 0x60, 0x06, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78, 0xFF, 0xFF, 0x13, 0x03, 0x02, 0x64,
-        0x23, 0xFA, 0xF2, 0x60, 0x00, 0x64, 0x5A, 0xDA, 0x28, 0x44, 0x5A, 0xDA, 0xFF, 0xFF, 0x26, 0x60,
-        0x0A, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF, 0xA0, 0xD3, 0xFF, 0xFF, 0xDC, 0x84, 0xDC, 0x80,
-        0xD0, 0x80, 0x03, 0x03, 0xA2, 0xDB, 0x08, 0x24, 0xC6, 0xFE, 0xDD, 0x98, 0xFF, 0xFF, 0xB5, 0xF1,
-        0xA0, 0xD3, 0xFF, 0xFF, 0xD8, 0x80, 0xC4, 0x84, 0x0C, 0x03, 0x08, 0x05, 0xDC, 0x80, 0xD0, 0x80,
-        0x05, 0x03, 0xA2, 0xDB, 0x02, 0x24, 0xC6, 0xFE, 0xDD, 0x98, 0xFF, 0xFF, 0xFF, 0x60, 0xFE, 0x64,
-        0xA2, 0xDB, 0xDD, 0x98, 0xFF, 0xFF, 0xA2, 0xFF, 0x32, 0x40, 0x40, 0x26, 0x3C, 0x00, 0x9B, 0xF3,
-        0x67, 0x43, 0xDC, 0x84, 0xCC, 0x84, 0x37, 0x03, 0x60, 0x46, 0x0A, 0x02, 0x9B, 0xFD, 0x00, 0x60,
-        0x46, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x22, 0x78, 0xFF, 0xFF, 0x66, 0x44, 0x9B, 0xFB, 0x2C, 0x03,
-        0x46, 0x4B, 0x2C, 0x60, 0xCA, 0x61, 0x18, 0x64, 0x23, 0xFA, 0xF1, 0x60, 0x00, 0x64, 0x24, 0xFA,
-        0x4A, 0x65, 0xA2, 0xFF, 0x2C, 0x63, 0x59, 0xD1, 0xA2, 0xDF, 0xA5, 0xD8, 0xDA, 0x85, 0x80, 0x3A,
-        0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF7, 0x1F, 0x12, 0x63, 0x59, 0xD1, 0xA5, 0xD8, 0xDA, 0x85,
-        0x80, 0x3A, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0xF8, 0x1F, 0x26, 0x60, 0x0A, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x2B, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE,
-        0xA6, 0xFE, 0x00, 0x64, 0x9B, 0xFB, 0xA3, 0xFF, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0xA6, 0xFE,
-        0xBA, 0x05, 0xA7, 0xFE, 0x11, 0x05, 0xA5, 0xFE, 0x03, 0x04, 0xF2, 0x60, 0xD8, 0x78, 0xFF, 0xFF,
-        0xA4, 0xFE, 0xF2, 0x04, 0x08, 0x60, 0x0F, 0xF1, 0x00, 0x60, 0x80, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0x36, 0x45, 0x20, 0x60, 0xA8, 0x64, 0x44, 0xD7,
-        0xFF, 0xFF, 0xFF, 0xFF, 0x9D, 0xF3, 0xFF, 0xFF, 0x01, 0xB0, 0x00, 0x64, 0x2F, 0x03, 0x9D, 0xFB,
-        0x31, 0x44, 0xE8, 0xB4, 0x40, 0x51, 0x6A, 0x44, 0xFF, 0xFF, 0x80, 0x26, 0xFC, 0x01, 0x61, 0xFF,
-        0x62, 0xFF, 0x08, 0x60, 0x30, 0xF1, 0x00, 0x60, 0x20, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x40, 0x60, 0x58, 0x4E, 0x7D, 0x78, 0xFF, 0xFF, 0x1F, 0x60, 0xC4, 0x64, 0x0F, 0x60, 0xE1, 0xFB,
-        0x4A, 0xDF, 0x01, 0x60, 0xFE, 0x63, 0x1D, 0x60, 0xBE, 0x61, 0x00, 0x64, 0x59, 0xDB, 0xFE, 0x1F,
-        0x0E, 0x60, 0xDD, 0xF3, 0xFF, 0xFF, 0x04, 0xB0, 0xFF, 0xFF, 0x05, 0x03, 0x02, 0x65, 0xF1, 0x60,
-        0x58, 0x4E, 0xC3, 0x78, 0xFF, 0xFF, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0xF2, 0x60, 0xD8, 0x78,
-        0xFF, 0xFF, 0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x37, 0x00, 0x2D, 0x60, 0xAA, 0x63, 0xBD, 0xD3, 0xBD, 0xD1, 0xBD, 0xD1, 0xB0, 0x84, 0xB0, 0x84,
-        0xFF, 0xFF, 0x07, 0x02, 0x8A, 0xFB, 0x31, 0x44, 0xFE, 0xB4, 0x40, 0x51, 0x0D, 0x64, 0x05, 0xFB,
-        0x27, 0x00, 0x28, 0xF3, 0x9D, 0xF1, 0x60, 0x47, 0x64, 0x41, 0x07, 0xB1, 0x07, 0xB4, 0x50, 0xFB,
-        0x01, 0x61, 0x03, 0x03, 0xCC, 0x84, 0xE1, 0x81, 0xFD, 0x02, 0xA1, 0x80, 0xB1, 0x83, 0x18, 0x02,
-        0x9D, 0xFD, 0x16, 0x60, 0xCF, 0xF3, 0xE4, 0xFB, 0x7D, 0xFB, 0x13, 0x60, 0x02, 0xF3, 0xFF, 0xFF,
-        0x00, 0xA8, 0x60, 0x46, 0x46, 0x5E, 0x31, 0x44, 0x01, 0xBC, 0x40, 0x51, 0xED, 0xE2, 0x0F, 0x4E,
-        0x1D, 0x60, 0x58, 0x4F, 0x9F, 0x78, 0xFF, 0xFF, 0x0E, 0x4F, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF,
-        0xD7, 0xFE, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0xF2, 0x60, 0xE4, 0x64, 0x08, 0x60, 0x3B, 0xFB,
-        0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x00, 0x64, 0x08, 0x60, 0x27, 0xFB, 0x5A, 0xDB,
-        0x10, 0x60, 0x4E, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60, 0x28, 0xF3,
-        0xFF, 0xFF, 0x01, 0xB0, 0xFF, 0xFF, 0x1D, 0x03, 0x20, 0x40, 0x06, 0x23, 0x10, 0x00, 0x08, 0x60,
-        0x27, 0xF1, 0x7F, 0x60, 0xFF, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x80, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x28, 0xFB, 0xF2, 0x60, 0xF4, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x1D, 0x60,
-        0xA9, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x27, 0xF1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0xC6, 0x01, 0x08, 0x60, 0x27, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB,
-        0xCF, 0xFE, 0xDB, 0xF3, 0x01, 0x63, 0xFD, 0xA0, 0x08, 0x60, 0x77, 0xFD, 0x07, 0x02, 0x08, 0x60,
-        0x30, 0xF1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xB1, 0x01, 0x0E, 0x57,
-        0x32, 0x40, 0x40, 0x26, 0x1B, 0x00, 0x45, 0x48, 0x00, 0x60, 0x06, 0x61, 0xB6, 0x60, 0x58, 0x4D,
-        0x22, 0x78, 0xFF, 0xFF, 0x13, 0x03, 0x02, 0x64, 0x23, 0xFA, 0xF2, 0x60, 0x04, 0x64, 0x5A, 0xDA,
-        0x28, 0x44, 0x5A, 0xDA, 0xFF, 0xFF, 0x26, 0x60, 0x0A, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44,
-        0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x37, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x15, 0xF1, 0x00, 0x60, 0x02, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x88, 0x01,
-        0x12, 0x60, 0xF6, 0xF3, 0xFF, 0xFF, 0x00, 0xA8, 0x60, 0x46, 0x0E, 0xF2, 0x4B, 0x03, 0x60, 0x40,
-        0xF0, 0x37, 0x38, 0x00, 0xFF, 0x37, 0x2D, 0x00, 0xFD, 0x37, 0x25, 0x00, 0xF8, 0x37, 0x0A, 0x00,
-        0x60, 0x47, 0xFF, 0xB5, 0x10, 0x60, 0x12, 0x62, 0x46, 0xD1, 0x00, 0x60, 0x01, 0x64, 0xB0, 0x84,
-        0xA2, 0xDB, 0xCF, 0xFE, 0x00, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xDC, 0x01, 0x06, 0xB4, 0xFD, 0x7F, 0x0E, 0xFA, 0x25, 0x60,
-        0xF2, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF,
-        0x2B, 0xFF, 0xF9, 0xFE, 0xCD, 0x01, 0x23, 0xF0, 0x60, 0x40, 0x04, 0x26, 0xED, 0x1B, 0x02, 0x26,
-        0xEB, 0x18, 0xA2, 0xFF, 0x02, 0xF0, 0x09, 0x60, 0x08, 0x64, 0xD0, 0x80, 0xAD, 0xF3, 0x02, 0x02,
-        0xCC, 0x84, 0xAD, 0xFB, 0x26, 0x60, 0x1A, 0x64, 0x40, 0x4B, 0x34, 0x60, 0x58, 0x4D, 0x08, 0x78,
-        0xFF, 0xFF, 0xB6, 0x01, 0xAC, 0xFE, 0x09, 0x05, 0xAD, 0xFE, 0x0F, 0x05, 0xAE, 0xFE, 0xB0, 0x05,
-        0xAF, 0xFE, 0x37, 0x05, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0x08, 0x60, 0x08, 0xF1, 0x20, 0x60,
-        0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0xF5, 0x01, 0x10, 0x60, 0x7A, 0x65, 0x0D, 0x61,
-        0x07, 0x00, 0xA2, 0xDD, 0x58, 0x4F, 0x64, 0x58, 0xFF, 0xFF, 0x00, 0xB9, 0xFF, 0xFF, 0x08, 0x03,
-        0x00, 0x63, 0xA5, 0xD1, 0x5A, 0xD3, 0xDA, 0x85, 0x00, 0xA8, 0xCD, 0x81, 0xF2, 0x02, 0xF8, 0x02,
-        0xE1, 0x01, 0x10, 0x60, 0x0E, 0x62, 0x10, 0x60, 0x58, 0x65, 0xF3, 0x60, 0xD7, 0x63, 0x5A, 0xDF,
-        0xD6, 0x80, 0xFF, 0xFF, 0x04, 0x03, 0x5A, 0xDF, 0x5A, 0xDF, 0x5A, 0xDD, 0xF9, 0x01, 0x10, 0x60,
-        0x78, 0x65, 0x5A, 0xDF, 0xD6, 0x80, 0xFF, 0xFF, 0x02, 0x03, 0x5A, 0xDD, 0xFB, 0x01, 0x2F, 0x58,
-        0xFF, 0xFF, 0x10, 0x60, 0x12, 0x64, 0x40, 0x41, 0x10, 0x60, 0x10, 0x63, 0xA3, 0xD1, 0x00, 0x64,
-        0xD0, 0x80, 0x0C, 0x61, 0x08, 0x03, 0xBD, 0xDB, 0xA3, 0xD3, 0xFF, 0xFF, 0xB0, 0x84, 0xCD, 0x81,
-        0xA3, 0xDB, 0x06, 0xA3, 0xF9, 0x02, 0x10, 0x60, 0x60, 0x63, 0xA3, 0xD1, 0x00, 0x64, 0xD0, 0x80,
-        0x0D, 0x61, 0x19, 0x03, 0xBD, 0xDB, 0x64, 0x44, 0xFE, 0xA3, 0x02, 0xA3, 0xCD, 0x81, 0xE8, 0x84,
-        0xE3, 0x03, 0x02, 0x05, 0xE1, 0x03, 0xF9, 0x01, 0x97, 0xFB, 0x99, 0xFD, 0x61, 0x5C, 0xA3, 0xD3,
-        0x98, 0xF9, 0x03, 0x18, 0x58, 0x4F, 0x60, 0x58, 0xFF, 0xFF, 0x99, 0xF3, 0x98, 0xF1, 0x60, 0x43,
-        0x97, 0xF3, 0x64, 0x41, 0xEA, 0x01, 0x21, 0x43, 0x10, 0x60, 0x5A, 0x65, 0xD7, 0x80, 0xBD, 0xD1,
-        0xBD, 0xD3, 0x03, 0x02, 0xCA, 0x60, 0xD4, 0x78, 0xFF, 0xFF, 0xA0, 0x84, 0xBD, 0xD1, 0x43, 0x41,
-        0xF5, 0x03, 0xF3, 0x60, 0xDC, 0x64, 0x64, 0x58, 0x40, 0x4F, 0x2A, 0xF0, 0x83, 0x60, 0xFF, 0x65,
-        0x64, 0x47, 0x03, 0x2B, 0x01, 0x00, 0x14, 0x00, 0x03, 0x26, 0x03, 0xAC, 0x60, 0x47, 0xA4, 0x84,
-        0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2, 0x2E, 0xFA, 0x64, 0x41,
-        0xEA, 0xF3, 0x2F, 0xFA, 0x60, 0x43, 0xEB, 0xF3, 0x30, 0xFA, 0xEC, 0xF1, 0x31, 0xF8, 0x19, 0x00,
-        0x60, 0x47, 0xA4, 0x84, 0x2A, 0xFA, 0x2F, 0xF2, 0x2C, 0xFA, 0x30, 0xF2, 0x2D, 0xFA, 0x31, 0xF2,
-        0x2E, 0xFA, 0x36, 0xF2, 0x32, 0xFA, 0x37, 0xF2, 0x33, 0xFA, 0x38, 0xF2, 0x34, 0xFA, 0xEA, 0xF3,
-        0x2F, 0xFA, 0x36, 0xFA, 0xEB, 0xF3, 0x30, 0xFA, 0x37, 0xFA, 0xEC, 0xF3, 0x31, 0xFA, 0x38, 0xFA,
-        0x64, 0x41, 0x1C, 0xF2, 0x13, 0xFA, 0x00, 0xF4, 0x0D, 0xF2, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2B,
-        0x17, 0x00, 0x81, 0x67, 0xA2, 0xDA, 0xF4, 0x60, 0x58, 0x4E, 0xCF, 0x78, 0xFF, 0xFF, 0x26, 0x46,
-        0x3F, 0xFC, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64,
-        0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xC1, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF,
-        0x26, 0x46, 0x3F, 0xF0, 0x42, 0x64, 0xD0, 0x80, 0xFF, 0xFF, 0x01, 0x04, 0x3F, 0xFA, 0x07, 0xF2,
-        0xA6, 0xF1, 0x01, 0x1B, 0x07, 0xF8, 0x1C, 0xF2, 0x13, 0xFA, 0x26, 0xF2, 0x27, 0xF0, 0x60, 0x47,
-        0x00, 0xF4, 0x1F, 0xFA, 0x64, 0x47, 0x20, 0xFA, 0x61, 0x44, 0x21, 0xFA, 0x01, 0x67, 0x0D, 0xFA,
-        0x10, 0x61, 0x2D, 0x60, 0x5E, 0x64, 0x1E, 0x63, 0x58, 0xD1, 0xCD, 0x81, 0xBD, 0xD8, 0xFC, 0x02,
-        0xB8, 0xF1, 0xD6, 0xF1, 0x64, 0x5E, 0x64, 0x5F, 0x44, 0x63, 0xBD, 0xDA, 0x16, 0x60, 0xAC, 0xF3,
-        0xFF, 0xFF, 0xE0, 0x84, 0xE0, 0x84, 0xE0, 0x84, 0x4A, 0xD3, 0x60, 0x45, 0x60, 0x40, 0x01, 0x36,
-        0x03, 0x64, 0x02, 0x36, 0x01, 0x64, 0xB4, 0x84, 0x06, 0xA2, 0xA2, 0xD1, 0xBD, 0xDA, 0x64, 0x47,
-        0xBD, 0xDA, 0xD3, 0xF3, 0xD4, 0xF1, 0x60, 0x47, 0xBD, 0xDA, 0x64, 0x47, 0xE2, 0xF1, 0xBD, 0xDA,
-        0x64, 0x44, 0xBD, 0xDA, 0x26, 0x46, 0x00, 0x64, 0x23, 0xF0, 0x3B, 0xF0, 0x64, 0x40, 0x10, 0x2A,
-        0x06, 0x00, 0xC0, 0x67, 0xA0, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0xE8, 0x84, 0x10, 0xBC, 0x3E, 0xFA,
-        0x25, 0x60, 0xDA, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x26, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB,
-        0xFF, 0xFF, 0x2B, 0xFF, 0xC8, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0xB1, 0xF3,
-        0x1F, 0xFA, 0x32, 0x47, 0x07, 0xFA, 0x24, 0x7E, 0x01, 0x7F, 0x08, 0xFA, 0xD6, 0xF1, 0x09, 0xF8,
-        0x01, 0x60, 0x01, 0x64, 0x0A, 0xFA, 0x01, 0x64, 0x0B, 0xFA, 0x18, 0x64, 0x13, 0x60, 0x0D, 0xFB,
-        0x66, 0x44, 0x5A, 0xDB, 0x0A, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x52, 0x63, 0x2E, 0x58,
-        0xFF, 0xFF, 0x00, 0x60, 0x2A, 0x61, 0xB6, 0x60, 0x58, 0x4D, 0x25, 0x78, 0xFF, 0xFF, 0x66, 0x44,
-        0x5D, 0xFB, 0x04, 0x64, 0x03, 0xFA, 0x67, 0x44, 0x2C, 0xFA, 0x2D, 0xFA, 0x2E, 0xFA, 0x32, 0xFA,
-        0x33, 0xFA, 0x34, 0xFA, 0x12, 0x60, 0x80, 0x64, 0xA6, 0xF1, 0x0E, 0xFA, 0x07, 0xF8, 0x00, 0x64,
-        0x3E, 0xFA, 0x0E, 0x60, 0x3D, 0xFB, 0x06, 0xA2, 0x10, 0x60, 0x80, 0x64, 0xA2, 0xDB, 0x04, 0x64,
-        0x5A, 0xDB, 0x06, 0x64, 0x5A, 0xDB, 0xF8, 0x60, 0xCF, 0x64, 0x08, 0x60, 0x3F, 0xFB, 0x00, 0x64,
-        0x0E, 0x60, 0x43, 0xFB, 0x06, 0xA2, 0x10, 0x60, 0x84, 0x64, 0xA2, 0xDB, 0x08, 0x64, 0x5A, 0xDB,
-        0x06, 0x64, 0x5A, 0xDB, 0xF8, 0x60, 0xD8, 0x64, 0x08, 0x60, 0x41, 0xFB, 0xF8, 0x60, 0xB4, 0x64,
-        0x08, 0x60, 0x34, 0xFB, 0x00, 0x60, 0x30, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF5, 0x60, 0x31, 0x64,
-        0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0xF7, 0x60, 0x6C, 0x78,
-        0xFF, 0xFF, 0x5D, 0xF5, 0xEA, 0xF1, 0x2F, 0xF8, 0xEB, 0xF1, 0x30, 0xF8, 0xEC, 0xF1, 0x31, 0xF8,
-        0xC9, 0xF1, 0x19, 0xF8, 0x00, 0x63, 0x88, 0xFD, 0x1B, 0x60, 0xB2, 0x63, 0x86, 0xFD, 0x87, 0xFD,
-        0x20, 0x40, 0x10, 0x2B, 0x00, 0x00, 0x5D, 0xF5, 0x40, 0x64, 0x2A, 0xFA, 0x7D, 0xF3, 0x7C, 0xFB,
-        0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x10, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x03, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x03, 0x00, 0xF6, 0x60, 0xC6, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x3D, 0xF3, 0xFD, 0x60,
-        0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x3F, 0xFB, 0x19, 0x60, 0x39, 0xF3, 0x3F, 0x40,
-        0x01, 0x27, 0x08, 0x00, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78,
-        0xFF, 0xFF, 0x05, 0x00, 0x0F, 0xB4, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0x5D, 0xF5,
-        0x35, 0x60, 0x70, 0x64, 0x00, 0xF4, 0x40, 0x48, 0x2F, 0x60, 0x24, 0x64, 0x20, 0x40, 0x10, 0x27,
-        0x02, 0x00, 0x2F, 0x60, 0x02, 0x64, 0x28, 0xDB, 0x04, 0x61, 0x00, 0x60, 0x00, 0x64, 0xF1, 0x60,
-        0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x5D, 0xF5, 0x3F, 0xFC, 0x01, 0x64, 0x54, 0xF1, 0x10, 0x60,
-        0x12, 0xFB, 0x7D, 0xFB, 0xA4, 0xD3, 0x04, 0x65, 0x53, 0xF3, 0x01, 0x18, 0x0C, 0x65, 0xF3, 0xB4,
-        0xB4, 0x84, 0x53, 0xFB, 0x0D, 0x00, 0xF7, 0x60, 0x6C, 0x78, 0xFF, 0xFF, 0x53, 0xF1, 0x7D, 0xF3,
-        0xFF, 0xFF, 0xF3, 0xA0, 0x04, 0xA4, 0x01, 0x04, 0xF1, 0xA4, 0x10, 0x36, 0xF4, 0x01, 0x7D, 0xFB,
-        0x20, 0x40, 0x10, 0x2B, 0x10, 0x00, 0x7D, 0xF3, 0x32, 0x60, 0x80, 0x61, 0xA1, 0xD1, 0xCC, 0x84,
-        0x01, 0x61, 0x08, 0x24, 0x03, 0x00, 0xE1, 0x81, 0xCC, 0x84, 0xFB, 0x01, 0xA1, 0x84, 0x53, 0xF1,
-        0xE6, 0x03, 0x10, 0x60, 0x12, 0xFB, 0x7D, 0xF3, 0x10, 0x60, 0xF2, 0x61, 0xCC, 0x84, 0xFF, 0xFF,
-        0x02, 0x03, 0x06, 0xA1, 0xFB, 0x01, 0xA1, 0xD3, 0x53, 0xF1, 0x01, 0xB0, 0x02, 0xB0, 0xD7, 0x03,
-        0x64, 0x40, 0x01, 0x26, 0x05, 0x00, 0x20, 0x40, 0x10, 0x27, 0x02, 0x00, 0xD0, 0x03, 0x00, 0x00,
-        0x9D, 0xFE, 0x3D, 0x05, 0xBA, 0xFE, 0x10, 0x60, 0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE,
-        0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF5, 0x60, 0xCB, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x7D, 0xF1,
-        0x13, 0x60, 0x1A, 0xF9, 0x08, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x13, 0xFB, 0xF5, 0x60, 0xF0, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x1B, 0x60, 0xF3, 0xF1, 0xAD, 0x4F, 0x00, 0x7F, 0xFA, 0xB4, 0x64, 0x41, 0x7D, 0xF1, 0x02, 0xB1,
-        0x04, 0x65, 0x02, 0x02, 0x64, 0x40, 0x01, 0x2B, 0x01, 0x65, 0xB4, 0x84, 0xA0, 0x5D, 0x10, 0x60,
-        0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x13, 0xFB, 0xF5, 0x60, 0xC8, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7D, 0xF1,
-        0x13, 0x60, 0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64,
-        0x08, 0x60, 0x13, 0xFB, 0xF6, 0x60, 0x28, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0xBE, 0xFE, 0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE,
-        0x10, 0x60, 0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB, 0x5D, 0xF5, 0x25, 0x60, 0xCE, 0x64, 0x13, 0x60,
-        0x0D, 0xFB, 0x66, 0x44, 0x5A, 0xDB, 0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0x00, 0x64,
-        0x51, 0xFB, 0x00, 0x60, 0x01, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF6, 0x60, 0x4C, 0x64, 0x5A, 0xDB,
-        0xCF, 0xFE, 0xC1, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x10, 0x60, 0x24, 0x62, 0x00, 0x64, 0xA2, 0xDB,
-        0xC3, 0xF1, 0x0E, 0x60, 0x3F, 0xF9, 0x1C, 0x60, 0x7A, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xC4, 0xF1, 0x0E, 0x60, 0x45, 0xF9, 0x26, 0x60, 0x42, 0x62,
-        0xA2, 0xD3, 0xFF, 0xFF, 0xFD, 0x1B, 0x1C, 0x60, 0x86, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x02, 0x64,
-        0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x60, 0x08, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF6, 0x60,
-        0x75, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x51, 0xF1, 0x10, 0x60, 0x24, 0x62,
-        0x00, 0x64, 0xA2, 0xDB, 0x64, 0x40, 0xFF, 0x26, 0x0B, 0x00, 0x53, 0xF3, 0xFF, 0xFF, 0x80, 0xB0,
-        0xFF, 0xFF, 0x03, 0x03, 0xF7, 0x60, 0x65, 0x78, 0xFF, 0xFF, 0xF5, 0x60, 0x96, 0x78, 0xFF, 0xFF,
-        0x02, 0x0A, 0x00, 0x64, 0x51, 0xFB, 0xC5, 0xF1, 0x0E, 0x60, 0x45, 0xF9, 0x00, 0x60, 0x0C, 0x64,
-        0x08, 0x60, 0x13, 0xFB, 0xF6, 0x60, 0xA0, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x1C, 0x60, 0x86, 0x64,
-        0x13, 0x60, 0x22, 0xFB, 0x02, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xA0, 0x80, 0x9C, 0x84, 0x0B, 0x03, 0xA0, 0x84,
-        0xA2, 0xDB, 0x1C, 0x60, 0x86, 0x64, 0x13, 0x60, 0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF,
-        0x04, 0xFF, 0x13, 0x00, 0xFF, 0x60, 0xF7, 0x64, 0xA0, 0x84, 0xA2, 0xDB, 0x51, 0xF3, 0xDE, 0x0A,
-        0x00, 0xA0, 0x00, 0x64, 0x02, 0x03, 0x51, 0xFB, 0xD9, 0x01, 0x1C, 0x60, 0x7A, 0x64, 0x13, 0x60,
-        0x22, 0xFB, 0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0xB7, 0x01, 0x19, 0x60, 0x3E, 0xF3,
-        0xFD, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x3F, 0xFB, 0x19, 0x60, 0x3A, 0xF3,
-        0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0x5D, 0xF5,
-        0x35, 0x60, 0x70, 0x64, 0x00, 0xF4, 0x40, 0x48, 0x2F, 0x60, 0x24, 0x64, 0x20, 0x40, 0x10, 0x27,
-        0x02, 0x00, 0x2F, 0x60, 0x02, 0x64, 0x28, 0xDB, 0x04, 0x61, 0x00, 0x60, 0x00, 0x64, 0xF1, 0x60,
-        0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x5D, 0xF5, 0x3F, 0xFC, 0x53, 0xF3, 0x20, 0x40, 0x10, 0x23,
-        0x02, 0x00, 0x20, 0xBC, 0x04, 0x00, 0x60, 0x40, 0x01, 0x22, 0x40, 0xBC, 0x04, 0xBC, 0x80, 0xBC,
-        0x53, 0xFB, 0x11, 0x60, 0x62, 0x64, 0x08, 0x60, 0x6C, 0xFB, 0x06, 0x64, 0x08, 0x60, 0x73, 0xFB,
-        0x19, 0x60, 0x43, 0xF3, 0xFF, 0xFF, 0x07, 0xB4, 0xA2, 0xDB, 0x53, 0xF3, 0x08, 0x60, 0x6C, 0xF1,
-        0x60, 0x40, 0x20, 0x26, 0x03, 0x00, 0x01, 0x26, 0x32, 0x00, 0x45, 0x00, 0x08, 0x60, 0x73, 0xF3,
-        0xFF, 0xFF, 0xDD, 0xA0, 0x01, 0xA4, 0x58, 0x03, 0xA2, 0xDB, 0x32, 0x60, 0x82, 0x61, 0xE0, 0xA0,
-        0xF0, 0xA0, 0x05, 0x05, 0x01, 0x05, 0x05, 0x00, 0x02, 0xA1, 0xF0, 0xA4, 0x02, 0x00, 0x04, 0xA1,
-        0xE0, 0xA4, 0xA1, 0xD1, 0x01, 0x61, 0xDC, 0x84, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0xE1, 0x81,
-        0xFB, 0x01, 0xA1, 0x80, 0x10, 0x60, 0xE6, 0x64, 0x01, 0x02, 0xE0, 0x01, 0xA0, 0xD3, 0x11, 0x60,
-        0x5A, 0x63, 0xFA, 0xA4, 0xCC, 0x84, 0x08, 0xA3, 0xFD, 0x02, 0xCF, 0xF1, 0xA3, 0xD3, 0x01, 0x18,
-        0xD5, 0x18, 0xFE, 0xA3, 0xA3, 0xD3, 0x7D, 0xFB, 0xF5, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x12, 0x60,
-        0x40, 0x65, 0x64, 0x41, 0xA1, 0xD3, 0xD5, 0x80, 0x00, 0xB8, 0x26, 0x07, 0x02, 0x02, 0x08, 0xA1,
-        0xF9, 0x01, 0x61, 0x44, 0x08, 0x60, 0x6C, 0xFB, 0x01, 0x64, 0xA1, 0xDB, 0x49, 0xD3, 0x7D, 0xFB,
-        0xF5, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x12, 0x60, 0x40, 0x65, 0x64, 0x41, 0xA1, 0xD3, 0xD5, 0x80,
-        0x04, 0xB0, 0x12, 0x07, 0x02, 0x02, 0x08, 0xA1, 0xF9, 0x01, 0x61, 0x44, 0x08, 0x60, 0x6C, 0xFB,
-        0x49, 0xD3, 0x7D, 0xFB, 0xF5, 0x60, 0xC8, 0x78, 0xFF, 0xFF, 0x10, 0x60, 0xD8, 0x65, 0xA5, 0xD3,
-        0xFF, 0xFF, 0x08, 0xA4, 0xA5, 0xDB, 0x99, 0x01, 0x1C, 0x60, 0x7A, 0x64, 0x13, 0x60, 0x22, 0xFB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x53, 0xF3, 0xFF, 0xFF, 0xE3, 0xB4, 0x53, 0xFB,
-        0x10, 0x60, 0x10, 0xF3, 0xFF, 0xFF, 0xFE, 0xB4, 0xA2, 0xDB, 0x10, 0x60, 0x24, 0x62, 0x00, 0x64,
-        0xA2, 0xDB, 0xDE, 0xFE, 0x0A, 0x04, 0x40, 0x60, 0x00, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF7, 0x60,
-        0x7D, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x7C, 0xF1, 0x7D, 0xF9, 0x13, 0x60,
-        0x1A, 0xF9, 0x0E, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x2D, 0xFF, 0x20, 0x60, 0x00, 0x64, 0x08, 0x60,
-        0x13, 0xFB, 0xF7, 0x60, 0x9F, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0xBE, 0xFE,
-        0x08, 0x60, 0x08, 0xF1, 0x40, 0x60, 0x00, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x53, 0xF3,
-        0xFF, 0xFF, 0x80, 0xB0, 0xFF, 0xFF, 0x54, 0x02, 0x1C, 0x60, 0x32, 0x63, 0x1C, 0x61, 0xCD, 0x81,
-        0xBD, 0xDF, 0xFD, 0x02, 0x14, 0x60, 0x32, 0x61, 0x88, 0xF3, 0x61, 0x43, 0xC4, 0xA5, 0x47, 0xD1,
-        0x0F, 0x04, 0xBE, 0xD5, 0x1C, 0x60, 0x2E, 0x63, 0xC3, 0x83, 0xC3, 0x83, 0xC3, 0x83, 0x43, 0xD3,
-        0xBE, 0xD1, 0xDC, 0x84, 0xA3, 0xDB, 0x66, 0x44, 0xC0, 0x84, 0xBE, 0xDB, 0x65, 0x44, 0xED, 0x01,
-        0x1C, 0x60, 0x32, 0x63, 0x0E, 0x61, 0x41, 0x4B, 0xBD, 0xD3, 0xBD, 0xD1, 0x00, 0xBD, 0x64, 0x41,
-        0x19, 0x03, 0x01, 0xA8, 0x61, 0x44, 0x02, 0xA8, 0x15, 0x03, 0x02, 0x02, 0xE9, 0x84, 0x12, 0x00,
-        0x65, 0x47, 0x60, 0x45, 0x61, 0x44, 0x09, 0x61, 0xCD, 0x81, 0xE0, 0x84, 0xFF, 0x23, 0xFC, 0x01,
-        0x02, 0x24, 0xC4, 0x84, 0x02, 0x28, 0xD4, 0x84, 0xCD, 0x81, 0x01, 0x0E, 0x01, 0xBC, 0x02, 0x03,
-        0xE0, 0x84, 0xF6, 0x01, 0x00, 0x7F, 0x2B, 0x41, 0x4D, 0x8B, 0xBF, 0xDB, 0xDD, 0x02, 0x14, 0x60,
-        0x32, 0x61, 0x88, 0xF3, 0x61, 0x43, 0xC4, 0xA5, 0x47, 0xD1, 0x0A, 0x04, 0xDA, 0x86, 0x1C, 0x60,
-        0x30, 0x63, 0xC3, 0x83, 0xC3, 0x83, 0xC3, 0x83, 0x43, 0xD1, 0xA6, 0xD9, 0x65, 0x44, 0xF2, 0x01,
-        0x53, 0xF3, 0x88, 0xF1, 0xF3, 0xB4, 0x53, 0xFB, 0x14, 0x60, 0x32, 0x63, 0xC3, 0x85, 0x45, 0x4A,
-        0x1B, 0x60, 0xB2, 0x65, 0x87, 0xF3, 0x45, 0x4C, 0x40, 0x48, 0x2A, 0x45, 0xD7, 0x80, 0x02, 0x65,
-        0x17, 0x05, 0x47, 0xD1, 0x02, 0x65, 0x47, 0xD3, 0x0A, 0x65, 0xD0, 0x81, 0x47, 0xD3, 0x01, 0x05,
-        0x00, 0x61, 0xF2, 0xA3, 0x01, 0xB0, 0x61, 0x44, 0x05, 0x03, 0x2C, 0xDB, 0x5A, 0xDD, 0x5A, 0x8C,
-        0x3C, 0xA3, 0xEB, 0x01, 0x28, 0x42, 0x4A, 0xDD, 0x4A, 0xDB, 0x42, 0x48, 0x3C, 0xA3, 0xE5, 0x01,
-        0x28, 0x44, 0x86, 0xFB, 0x86, 0xF1, 0x1B, 0x60, 0xB2, 0x63, 0x44, 0x48, 0x28, 0x45, 0xD7, 0x80,
-        0xA3, 0xD1, 0x15, 0x05, 0x04, 0x65, 0x46, 0xD3, 0x28, 0x45, 0xD6, 0x80, 0xD0, 0x80, 0x02, 0x04,
-        0x04, 0xA3, 0xF5, 0x01, 0xF7, 0x06, 0x62, 0x46, 0xA2, 0xD9, 0xA3, 0xDB, 0x5B, 0xD3, 0x66, 0x42,
-        0x5A, 0xD1, 0xA2, 0xDB, 0xA3, 0xD9, 0xFE, 0xA3, 0xA3, 0xD1, 0x66, 0x42, 0xEB, 0x01, 0x86, 0xF3,
-        0x87, 0xF1, 0x60, 0x43, 0x44, 0x48, 0x28, 0x45, 0xD7, 0x80, 0xA3, 0xD1, 0x15, 0x05, 0x04, 0x65,
-        0x46, 0xD3, 0x28, 0x45, 0xD6, 0x80, 0xD0, 0x80, 0x02, 0x04, 0x04, 0xA3, 0xF5, 0x01, 0xF7, 0x06,
-        0x62, 0x46, 0xA2, 0xD9, 0xA3, 0xDB, 0x5B, 0xD3, 0x66, 0x42, 0x5A, 0xD1, 0xA2, 0xDB, 0xA3, 0xD9,
-        0xFE, 0xA3, 0xA3, 0xD1, 0x66, 0x42, 0xEB, 0x01, 0x08, 0x60, 0x08, 0xF1, 0x10, 0x60, 0x00, 0x64,
-        0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x7D, 0xF1, 0x19, 0x60, 0x3D, 0xF3, 0x64, 0x40, 0x01, 0x27,
-        0x27, 0x00, 0xFD, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x3F, 0xFB, 0x19, 0x60,
-        0x39, 0xF3, 0x3F, 0x40, 0x01, 0x27, 0x16, 0x00, 0x0F, 0x60, 0xFF, 0x65, 0x60, 0x41, 0xDB, 0xF3,
-        0xFF, 0xFF, 0x60, 0x40, 0x03, 0x36, 0x07, 0x00, 0x19, 0x60, 0x44, 0xF3, 0xFF, 0xFF, 0x60, 0x40,
-        0x01, 0x2A, 0x01, 0x00, 0x0F, 0x61, 0x61, 0x44, 0xA4, 0x84, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78,
-        0xFF, 0xFF, 0x16, 0x00, 0x0F, 0xB4, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF, 0x10, 0x00,
-        0x5A, 0xD3, 0xFD, 0x60, 0x58, 0x4E, 0xAC, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x3F, 0xFB, 0x19, 0x60,
-        0x3A, 0xF3, 0x0F, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0xFC, 0x60, 0x58, 0x4E, 0x34, 0x78, 0xFF, 0xFF,
-        0x00, 0x60, 0x30, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF5, 0x60, 0x31, 0x64, 0x5A, 0xDB, 0xCF, 0xFE,
-        0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x1C, 0x60, 0x7A, 0x64, 0x13, 0x60, 0x22, 0xFB,
-        0x03, 0x64, 0x4A, 0xDB, 0xFF, 0xFF, 0x04, 0xFF, 0x00, 0x64, 0x53, 0xFB, 0x00, 0x64, 0x08, 0x60,
-        0x12, 0xFB, 0x5A, 0xDB, 0xBE, 0xFE, 0x00, 0x60, 0x30, 0x64, 0x08, 0x60, 0x13, 0xFB, 0xF5, 0x60,
-        0x31, 0x64, 0x5A, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF, 0x2F, 0x58, 0xFF, 0xFF, 0x08, 0x60,
-        0x12, 0xF1, 0x00, 0x60, 0x04, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58, 0xFF, 0xFF,
-        0x08, 0x60, 0x12, 0xF1, 0x00, 0x60, 0x08, 0x64, 0xB0, 0x84, 0xA2, 0xDB, 0xCF, 0xFE, 0x2F, 0x58,
-        0xFF, 0xFF, 0x20, 0x40, 0x90, 0x2B, 0x03, 0x00, 0xFB, 0x60, 0xFC, 0x78, 0xFF, 0xFF, 0x53, 0xF3,
-        0x88, 0xF1, 0x04, 0xB0, 0x07, 0x60, 0x80, 0x64, 0xD0, 0x80, 0x20, 0x03, 0x1F, 0x06, 0x26, 0x46,
-        0x88, 0xF1, 0x14, 0x60, 0x32, 0x63, 0xC3, 0x83, 0x7D, 0xF3, 0x26, 0xF0, 0xBD, 0xDB, 0x64, 0x44,
-        0x00, 0x7F, 0xBD, 0xDB, 0x64, 0x47, 0x00, 0x7F, 0xBD, 0xDB, 0x32, 0xF0, 0xBD, 0xD9, 0x33, 0xF0,
-        0xBD, 0xD9, 0x34, 0xF0, 0xBD, 0xD9, 0x00, 0xF4, 0x0D, 0xF0, 0xBD, 0xD9, 0x0E, 0xF0, 0xBD, 0xD9,
-        0x0F, 0xF0, 0xA3, 0xDF, 0x64, 0x47, 0x60, 0x45, 0x00, 0x37, 0x03, 0x00, 0xFB, 0x60, 0xF7, 0x78,
-        0xFF, 0xFF, 0xBD, 0xDB, 0xE0, 0xA0, 0x1F, 0x61, 0x00, 0xB8, 0xF8, 0x07, 0xF7, 0x03, 0x60, 0xFE,
-        0x5D, 0xD0, 0xCC, 0x84, 0xBD, 0xD9, 0xFC, 0x02, 0x65, 0x40, 0x01, 0x26, 0xDF, 0x83, 0x5D, 0xD0,
-        0xFF, 0xFF, 0x64, 0x40, 0x01, 0x3A, 0x03, 0x00, 0x5D, 0xD0, 0xFF, 0xFF, 0xC1, 0x81, 0x5D, 0xD0,
-        0xFF, 0xFF, 0x64, 0x40, 0x03, 0x36, 0x07, 0x00, 0x53, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2A,
-        0xDD, 0x01, 0xCD, 0x81, 0x13, 0x00, 0x53, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x2A, 0x04, 0x00,
-        0x5D, 0xD0, 0xFF, 0xFF, 0xC1, 0x81, 0x0A, 0x00, 0x59, 0xD0, 0x7D, 0xF3, 0xFF, 0xFF, 0xD0, 0x80,
-        0x20, 0xFE, 0x08, 0x24, 0x03, 0x00, 0xFB, 0x60, 0xF7, 0x78, 0xFF, 0xFF, 0x7C, 0x44, 0x1A, 0x60,
-        0x24, 0xFB, 0x1A, 0x60, 0x25, 0xFB, 0x1A, 0x60, 0x26, 0xFB, 0x1A, 0x60, 0x27, 0xFB, 0x1C, 0x60,
-        0x08, 0xFB, 0x1C, 0x60, 0x04, 0xFB, 0x00, 0x64, 0x1C, 0x60, 0x04, 0xFB, 0x20, 0xFE, 0x37, 0x60,
-        0xFE, 0x64, 0x40, 0x4A, 0xF9, 0x60, 0x58, 0x4D, 0xC3, 0x78, 0xFF, 0xFF, 0x1C, 0x60, 0x04, 0xF3,
-        0xFF, 0xFF, 0x09, 0x18, 0xFF, 0xFF, 0x1C, 0x60, 0x06, 0xF3, 0x1C, 0x60, 0x07, 0xF5, 0x60, 0x41,
-        0x00, 0x64, 0x1C, 0x60, 0x04, 0xFB, 0x20, 0xFE, 0x2A, 0xD1, 0xDA, 0x85, 0x64, 0x44, 0x01, 0xA0,
-        0xFF, 0xFF, 0x01, 0x02, 0x79, 0x00, 0x45, 0x4A, 0x7C, 0x44, 0x60, 0xFE, 0xA1, 0xD2, 0xFF, 0xFF,
-        0xD0, 0x80, 0x20, 0xFE, 0x01, 0x03, 0xEF, 0x01, 0x1C, 0x60, 0x04, 0xF3, 0xFF, 0xFF, 0x02, 0x18,
-        0xDD, 0x81, 0x35, 0x00, 0x60, 0xFE, 0x5D, 0xD2, 0xFF, 0xFF, 0x60, 0x5C, 0x41, 0x94, 0x81, 0xA0,
-        0x20, 0xFE, 0x2D, 0x04, 0x01, 0x64, 0x1C, 0x60, 0x04, 0xFB, 0xC1, 0x84, 0x84, 0xA4, 0x1C, 0x60,
-        0x06, 0xFB, 0x00, 0xF2, 0x1C, 0x60, 0x07, 0xFB, 0x1C, 0x60, 0x05, 0xFD, 0x02, 0x60, 0x00, 0x63,
-        0xCD, 0x85, 0x64, 0x44, 0xD8, 0x81, 0xCD, 0x84, 0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2,
-        0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4, 0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93,
-        0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE, 0xDF, 0x83, 0x00, 0x60, 0x01, 0x61, 0x02, 0x60,
-        0x00, 0x64, 0xE0, 0x87, 0x60, 0x46, 0x1C, 0x60, 0x05, 0xF3, 0xFF, 0xFF, 0x60, 0x43, 0x60, 0xFE,
-        0xCD, 0x81, 0x20, 0xFE, 0x2A, 0x44, 0x38, 0x60, 0x00, 0x7C, 0xD0, 0x84, 0x38, 0x60, 0x04, 0x65,
-        0x44, 0xD7, 0xFF, 0xFF, 0xFF, 0xFF, 0x1C, 0x60, 0x04, 0xF3, 0xFF, 0xFF, 0x08, 0x18, 0x1C, 0x60,
-        0x06, 0xF3, 0x1C, 0x60, 0x07, 0xF5, 0x60, 0x41, 0x00, 0x64, 0x1C, 0x60, 0x04, 0xFB, 0x26, 0x44,
-        0x01, 0xA4, 0x58, 0x90, 0xFF, 0xFF, 0x03, 0x02, 0x61, 0x44, 0x0B, 0xA5, 0x04, 0x00, 0x61, 0x44,
-        0xFC, 0xA4, 0x8B, 0x7C, 0xC0, 0x85, 0xDD, 0x81, 0x66, 0x44, 0x1C, 0x60, 0x07, 0xFB, 0x26, 0x46,
-        0x1B, 0xF0, 0x1C, 0x60, 0x07, 0xF5, 0x64, 0x44, 0xD4, 0x80, 0xFF, 0xFF, 0x02, 0x06, 0x2D, 0x58,
-        0xFF, 0xFF, 0xFA, 0x60, 0xE7, 0x78, 0xFF, 0xFF, 0x60, 0xFE, 0x5D, 0xD2, 0xFF, 0xFF, 0x20, 0xFE,
-        0xFF, 0xB4, 0x41, 0x94, 0x81, 0xA0, 0xFF, 0xFF, 0x02, 0x04, 0x00, 0xF4, 0x84, 0xA4, 0x60, 0x41,
-        0x5D, 0x01, 0x1A, 0x60, 0x2C, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x01, 0x3A, 0x6C, 0x01, 0x61, 0x5C,
-        0x1A, 0x60, 0x2B, 0xF9, 0x60, 0xFE, 0x5D, 0xD2, 0xFF, 0xFF, 0xFE, 0xA4, 0xFF, 0xFF, 0x04, 0x20,
-        0x02, 0x00, 0xFF, 0xA1, 0x60, 0x01, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x02, 0x00,
-        0xFE, 0xA1, 0x59, 0x01, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x36, 0x02, 0x00, 0xFD, 0xA1,
-        0x52, 0x01, 0x01, 0x7C, 0x1C, 0x60, 0x08, 0xF9, 0x4C, 0x00, 0x1A, 0x60, 0x2C, 0xF3, 0xFF, 0xFF,
-        0x01, 0x18, 0x49, 0x01, 0x00, 0x7C, 0x1C, 0x60, 0x08, 0xF9, 0x61, 0x5C, 0x1A, 0x60, 0x2B, 0xF9,
-        0x60, 0xFE, 0x5D, 0xD2, 0xFF, 0xFF, 0xFA, 0xA4, 0xFF, 0xFF, 0x04, 0x20, 0x04, 0x00, 0xFF, 0xA1,
-        0xF9, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x36, 0x04, 0x00,
-        0xC9, 0x81, 0xF9, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x50, 0x36,
-        0x04, 0x00, 0xFD, 0xA1, 0xF9, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40,
-        0xF2, 0x36, 0x04, 0x00, 0xFC, 0xA1, 0xF9, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x5D, 0xD0, 0xFF, 0xFF,
-        0x64, 0x40, 0x01, 0x36, 0x04, 0x00, 0xFB, 0xA1, 0xF9, 0x60, 0x6B, 0x78, 0xFF, 0xFF, 0x5D, 0xD0,
-        0xFF, 0xFF, 0x64, 0x40, 0x01, 0x36, 0x04, 0x00, 0xFA, 0xA1, 0xF9, 0x60, 0x6B, 0x78, 0xFF, 0xFF,
-        0x5D, 0xD0, 0xFF, 0xFF, 0x64, 0x40, 0x00, 0x36, 0x04, 0x00, 0xF9, 0xA1, 0xF9, 0x60, 0x6B, 0x78,
-        0xFF, 0xFF, 0x60, 0x5C, 0x00, 0x36, 0x32, 0x00, 0x00, 0x64, 0xFB, 0x60, 0x58, 0x4E, 0x66, 0x78,
-        0xFF, 0xFF, 0x65, 0x40, 0x08, 0x26, 0xF7, 0x01, 0x1A, 0x60, 0x24, 0xFB, 0x64, 0x40, 0x00, 0x36,
-        0x2A, 0x00, 0x5D, 0xD2, 0xDD, 0x81, 0xFB, 0x60, 0x58, 0x4E, 0x66, 0x78, 0xFF, 0xFF, 0x65, 0x40,
-        0x08, 0x26, 0xF6, 0x01, 0x1A, 0x60, 0x25, 0xFB, 0x64, 0x40, 0x00, 0x36, 0x21, 0x00, 0x5D, 0xD2,
-        0xDD, 0x81, 0xFB, 0x60, 0x58, 0x4E, 0x66, 0x78, 0xFF, 0xFF, 0x65, 0x40, 0x08, 0x26, 0xF6, 0x01,
-        0x1A, 0x60, 0x26, 0xFB, 0x64, 0x40, 0x00, 0x36, 0x18, 0x00, 0x5D, 0xD0, 0x34, 0x60, 0x4E, 0x62,
-        0xA2, 0xD9, 0x5D, 0xD0, 0x34, 0x60, 0x4F, 0x62, 0xA2, 0xD9, 0x14, 0x00, 0x20, 0xFE, 0x00, 0x60,
-        0x04, 0x64, 0x1A, 0x60, 0x24, 0xFB, 0x20, 0xFE, 0x00, 0x60, 0x04, 0x64, 0x1A, 0x60, 0x25, 0xFB,
-        0x20, 0xFE, 0x00, 0x60, 0x02, 0x64, 0x1A, 0x60, 0x26, 0xFB, 0x20, 0xFE, 0x00, 0x60, 0x00, 0x64,
-        0x1A, 0x60, 0x27, 0xFB, 0x20, 0xFE, 0x1C, 0x60, 0x08, 0xF1, 0xFF, 0xFF, 0x03, 0x18, 0x01, 0x7C,
-        0x1C, 0x60, 0x08, 0xF9, 0x1A, 0x60, 0x2B, 0xF1, 0xA2, 0xDD, 0x61, 0x44, 0x1A, 0x60, 0x28, 0xFB,
-        0xD1, 0x84, 0xDC, 0x84, 0x64, 0x45, 0x34, 0x60, 0x10, 0x63, 0xBD, 0xDB, 0x60, 0x41, 0xCD, 0x84,
-        0x4C, 0x91, 0x60, 0x43, 0x60, 0xFE, 0xA5, 0xD2, 0xDE, 0x85, 0x7F, 0x26, 0x02, 0x00, 0x00, 0xF4,
-        0x04, 0x65, 0x5D, 0x93, 0xA3, 0xDB, 0x5D, 0x93, 0xA5, 0xD2, 0xF6, 0x1F, 0x5D, 0x93, 0x20, 0xFE,
-        0xDF, 0x83, 0x1A, 0x60, 0x09, 0xF3, 0xFF, 0xFF, 0x60, 0x47, 0xA2, 0xDB, 0x1A, 0x60, 0x28, 0xF3,
-        0x1A, 0x60, 0x2B, 0xF1, 0x60, 0x41, 0x64, 0x43, 0xF9, 0x60, 0x56, 0x78, 0xFF, 0xFF, 0x20, 0xFE,
-        0x7C, 0x44, 0x1A, 0x60, 0x20, 0xFB, 0x1A, 0x60, 0x1A, 0xF1, 0x1A, 0x60, 0x24, 0xF3, 0xFF, 0xFF,
-        0xA0, 0x84, 0xFF, 0xFF, 0x10, 0x26, 0x07, 0x00, 0x04, 0x26, 0x07, 0x00, 0x20, 0x26, 0x07, 0x00,
-        0x02, 0x26, 0x07, 0x00, 0x3F, 0x00, 0x10, 0x7C, 0x05, 0x00, 0x04, 0x7C, 0x03, 0x00, 0x20, 0x7C,
-        0x01, 0x00, 0x02, 0x7C, 0x1A, 0x60, 0x20, 0xF9, 0x7C, 0x44, 0x1A, 0x60, 0x21, 0xFB, 0x1A, 0x60,
-        0x1B, 0xF1, 0x1A, 0x60, 0x25, 0xF3, 0x34, 0x60, 0x40, 0x61, 0xA0, 0x84, 0xA1, 0xD1, 0xFF, 0xFF,
-        0x10, 0x26, 0x05, 0x00, 0x04, 0x26, 0x05, 0x00, 0x01, 0x26, 0x08, 0x00, 0x23, 0x00, 0x10, 0x7C,
-        0x06, 0x00, 0x64, 0x40, 0x10, 0x26, 0x1E, 0x00, 0x04, 0x7C, 0x01, 0x00, 0x01, 0x7C, 0x1A, 0x60,
-        0x21, 0xF9, 0x7C, 0x44, 0x1A, 0x60, 0x22, 0xFB, 0x1A, 0x60, 0x1C, 0xF1, 0x1A, 0x60, 0x26, 0xF3,
-        0xFF, 0xFF, 0xA0, 0x84, 0x60, 0x40, 0x02, 0x26, 0x05, 0x00, 0x04, 0x26, 0x05, 0x00, 0x01, 0x26,
-        0x05, 0x00, 0x08, 0x00, 0x02, 0x7C, 0x03, 0x00, 0x04, 0x7C, 0x01, 0x00, 0x20, 0x7C, 0x1A, 0x60,
-        0x22, 0xF9, 0x09, 0x00, 0x7C, 0x44, 0x1A, 0x60, 0x20, 0xFB, 0x1A, 0x60, 0x21, 0xFB, 0x1A, 0x60,
-        0x22, 0xFB, 0x1A, 0x60, 0x23, 0xFB, 0x7C, 0x44, 0x1A, 0x60, 0x20, 0xF1, 0xBD, 0xD9, 0x1A, 0x60,
-        0x21, 0xF1, 0xB0, 0x84, 0xBD, 0xD9, 0x1A, 0x60, 0x22, 0xF1, 0xB0, 0x84, 0xBD, 0xD9, 0x1A, 0x60,
-        0x1D, 0xF1, 0xB0, 0x84, 0xBD, 0xD9, 0x04, 0x03, 0x1C, 0x60, 0x08, 0xF1, 0xBD, 0xD9, 0x72, 0x00,
-        0x16, 0x60, 0xC2, 0xF3, 0xFF, 0xFF, 0xFF, 0xA0, 0xFF, 0xFF, 0x0C, 0x24, 0x6B, 0x00, 0x60, 0x40,
-        0x0B, 0x36, 0x68, 0x00, 0x20, 0x40, 0x10, 0x27, 0x65, 0x00, 0x91, 0x00, 0x20, 0xFE, 0x00, 0x65,
-        0x60, 0xFE, 0x1A, 0x60, 0x28, 0xFB, 0xE0, 0x84, 0xE0, 0x84, 0x08, 0x20, 0x03, 0x00, 0x01, 0x64,
-        0xA2, 0xDB, 0x02, 0x64, 0x02, 0xA5, 0x64, 0x44, 0xD4, 0x9C, 0xD4, 0x80, 0x34, 0x60, 0x52, 0x62,
-        0x02, 0x05, 0x08, 0x65, 0x4D, 0x00, 0xA2, 0xD9, 0x7C, 0x44, 0x34, 0x60, 0x54, 0x62, 0xA2, 0xDB,
-        0x20, 0xFE, 0x00, 0x64, 0x60, 0xFE, 0x1C, 0x60, 0x08, 0xF3, 0xFF, 0xFF, 0x00, 0xA0, 0x5D, 0xD0,
-        0x00, 0x65, 0x04, 0x03, 0x64, 0x40, 0x00, 0x3A, 0x01, 0x65, 0x03, 0x00, 0x64, 0x40, 0x00, 0x3A,
-        0x01, 0x65, 0x5D, 0xD0, 0x04, 0x03, 0x64, 0x40, 0x0F, 0x3A, 0x01, 0x65, 0x03, 0x00, 0x64, 0x40,
-        0x50, 0x3A, 0x01, 0x65, 0x5D, 0xD0, 0x04, 0x03, 0x64, 0x40, 0xAC, 0x3A, 0x01, 0x65, 0x03, 0x00,
-        0x64, 0x40, 0xF2, 0x3A, 0x01, 0x65, 0x5D, 0xD0, 0x65, 0x40, 0x00, 0x3A, 0x17, 0x00, 0x00, 0x60,
-        0x00, 0x65, 0x64, 0x40, 0x00, 0x36, 0x01, 0x65, 0x64, 0x40, 0x01, 0x36, 0x02, 0x65, 0x64, 0x40,
-        0x02, 0x36, 0x04, 0x65, 0x64, 0x40, 0x04, 0x36, 0x10, 0x65, 0x64, 0x40, 0x05, 0x36, 0x20, 0x65,
-        0x65, 0x5C, 0x1A, 0x60, 0x2A, 0xF3, 0xFF, 0xFF, 0xB0, 0x84, 0xA2, 0xDB, 0x1A, 0x60, 0x28, 0xF3,
-        0x00, 0x65, 0xFF, 0xA4, 0xA2, 0xDB, 0xBC, 0x02, 0x1A, 0x60, 0x2A, 0xF3, 0x1A, 0x60, 0x29, 0xF1,
-        0x2E, 0x58, 0xFF, 0xFF, 0x20, 0xFE, 0x88, 0xF3, 0xFF, 0xFF, 0x3C, 0xA4, 0x88, 0xFB, 0x87, 0xF3,
-        0x7D, 0xF1, 0x04, 0xA4, 0x87, 0xFB, 0x53, 0xF3, 0xFF, 0xFF, 0x60, 0x40, 0x80, 0x26, 0x0D, 0x00,
-        0x7D, 0xF3, 0x10, 0x60, 0xF2, 0x61, 0xCC, 0x84, 0xFF, 0xFF, 0x02, 0x03, 0x06, 0xA1, 0xFB, 0x01,
-        0xA1, 0xD3, 0xFF, 0xFF, 0x02, 0xBC, 0xA1, 0xDB, 0x12, 0x00, 0x7D, 0xF3, 0x11, 0x60, 0x60, 0x63,
-        0x01, 0x60, 0xFF, 0x65, 0xA4, 0x84, 0x12, 0x60, 0x40, 0x65, 0xA3, 0xD1, 0xD7, 0x80, 0xD0, 0x80,
-        0x06, 0x03, 0x02, 0x03, 0x08, 0xA3, 0xF9, 0x01, 0x02, 0xA3, 0x04, 0x64, 0xA3, 0xDB, 0x20, 0xFE,
-        0x26, 0x46, 0x31, 0x40, 0x20, 0x2A, 0x35, 0x00, 0x3F, 0xF2, 0x47, 0x65, 0xC4, 0x84, 0xE8, 0x84,
-        0x23, 0xFA, 0xF1, 0x60, 0x02, 0x64, 0x24, 0xFA, 0x7D, 0xF3, 0x01, 0x60, 0xFF, 0x65, 0xA4, 0x84,
-        0x01, 0x23, 0x14, 0x00, 0x11, 0x60, 0x60, 0x61, 0x12, 0x60, 0x40, 0x65, 0xA1, 0xD1, 0xD5, 0x80,
-        0xD0, 0x80, 0x0B, 0x03, 0x02, 0x03, 0x08, 0xA1, 0xF9, 0x01, 0x04, 0xA1, 0xA1, 0xD3, 0x01, 0x60,
-        0x00, 0x65, 0x60, 0x47, 0xFF, 0xB4, 0xB4, 0x84, 0x01, 0x00, 0x01, 0x64, 0x00, 0xF4, 0x08, 0xFA,
-        0xFF, 0xFF, 0x26, 0x46, 0x26, 0x60, 0x0A, 0x64, 0x13, 0x60, 0x0D, 0xFB, 0x26, 0x44, 0x5A, 0xDB,
-        0x02, 0x64, 0x5A, 0xDB, 0xFF, 0xFF, 0x2B, 0xFF, 0xFA, 0xFE, 0x00, 0x66, 0x46, 0x46, 0x2F, 0x58,
-        0xFF, 0xFF, 0x26, 0x46, 0x2F, 0x58, 0xFF, 0xFF, 0x78, 0xFB, 0xAC, 0x85, 0x60, 0x41, 0x55, 0x03,
-        0x32, 0x60, 0x00, 0x63, 0x1B, 0x60, 0x04, 0xFD, 0x62, 0x43, 0x1A, 0x60, 0xB4, 0xFD, 0x1A, 0x60,
-        0xBA, 0xFD, 0x1A, 0x60, 0xC4, 0xFD, 0x1A, 0x60, 0xCE, 0xFD, 0x00, 0x63, 0xE9, 0x81, 0x08, 0x64,
-        0x02, 0x24, 0xDF, 0x83, 0xFB, 0x02, 0x53, 0x94, 0x32, 0x7F, 0x03, 0x06, 0x1B, 0x60, 0x04, 0xFB,
-        0x08, 0x63, 0x63, 0x5E, 0x01, 0x7F, 0x19, 0x60, 0x8A, 0xFB, 0x65, 0x41, 0x33, 0x60, 0x16, 0x65,
-        0x0F, 0x60, 0xF4, 0x64, 0xE9, 0x81, 0x58, 0xD1, 0xFD, 0x04, 0xCF, 0x83, 0xA5, 0xD9, 0x0C, 0x03,
-        0xE9, 0x81, 0x58, 0xD1, 0xFD, 0x04, 0x40, 0x48, 0xA5, 0xD1, 0x64, 0x5F, 0x64, 0x5E, 0xA5, 0xDB,
-        0xDA, 0x85, 0xCF, 0x83, 0x28, 0x44, 0xEE, 0x02, 0x00, 0xB9, 0xD8, 0x83, 0x15, 0x03, 0x36, 0x60,
-        0x0A, 0x65, 0xE9, 0x81, 0xBD, 0xD1, 0x02, 0x05, 0xFC, 0x02, 0x17, 0x00, 0xA5, 0xD9, 0x15, 0x03,
-        0xE9, 0x81, 0xBD, 0xD1, 0x02, 0x05, 0xFC, 0x02, 0x10, 0x00, 0xA5, 0xD3, 0xFF, 0xFF, 0x64, 0x5F,
-        0xA5, 0xDB, 0xDA, 0x85, 0xEE, 0x02, 0x09, 0x00, 0x67, 0x43, 0x1A, 0x60, 0xB4, 0xFD, 0x1A, 0x60,
-        0xBA, 0xFD, 0x1A, 0x60, 0xC4, 0xFD, 0x1A, 0x60, 0xCE, 0xFD, 0x2E, 0x45, 0x25, 0x60, 0x46, 0x64,
-        0xD4, 0x80, 0xFF, 0xFF, 0x10, 0x03, 0x20, 0x40, 0x10, 0x27, 0x0D, 0x00, 0x33, 0x60, 0x1E, 0x61,
-        0x19, 0x60, 0x8A, 0xF3, 0xA1, 0xDB, 0xFF, 0xB4, 0xCC, 0x84, 0xA8, 0x83, 0x33, 0x60, 0x14, 0x64,
-        0x58, 0xD1, 0x59, 0xD9, 0xFD, 0x1F, 0x7D, 0xF3, 0x33, 0x60, 0x20, 0x63, 0x60, 0x40, 0x01, 0x27,
-        0x03, 0x00, 0x19, 0x60, 0x3B, 0xF3, 0x02, 0x00, 0x19, 0x60, 0x3C, 0xF3, 0x08, 0x61, 0x60, 0xFE,
-        0xA3, 0xD1, 0xFF, 0xFF, 0x20, 0xFE, 0x00, 0xA8, 0xE8, 0x84, 0x0F, 0x03, 0x60, 0xFE, 0x02, 0x28,
-        0xF6, 0x01, 0x80, 0x62, 0xB2, 0x9C, 0xBD, 0xD9, 0x7B, 0xF9, 0xCD, 0x81, 0x00, 0x36, 0x01, 0x00,
-        0xEE, 0x01, 0x36, 0x60, 0x0A, 0x63, 0x08, 0x61, 0xEA, 0x01, 0x2E, 0x58, 0xFF, 0xFF, 0x32, 0x60,
-        0x76, 0x63, 0x65, 0x40, 0xFF, 0x36, 0x02, 0xA3, 0xA3, 0xD3, 0xFF, 0xFF, 0xE8, 0x84, 0xE8, 0x84,
-        0xE8, 0x84, 0xE8, 0x84, 0x40, 0x26, 0x7F, 0xB4, 0x20, 0x26, 0x3F, 0xB4, 0x60, 0x45, 0x80, 0x63,
-        0xFD, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x7D, 0xFB, 0x40, 0x63, 0xFD, 0x60,
-        0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x7E, 0xFB, 0x20, 0x63, 0xFD, 0x60, 0x58, 0x4D,
-        0x34, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x7F, 0xFB, 0x10, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x34, 0x78,
-        0xFF, 0xFF, 0x19, 0x60, 0x80, 0xFB, 0x08, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF,
-        0x19, 0x60, 0x81, 0xFB, 0x04, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x19, 0x60,
-        0x82, 0xFB, 0x02, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x83, 0xFB,
-        0x01, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x34, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x84, 0xFB, 0x2E, 0x58,
-        0xFF, 0xFF, 0x19, 0x60, 0x3B, 0xF3, 0xFF, 0xFF, 0x0F, 0xB4, 0x60, 0x45, 0x08, 0x63, 0xFD, 0x60,
-        0x58, 0x4D, 0x5F, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x85, 0xFB, 0x04, 0x63, 0xFD, 0x60, 0x58, 0x4D,
-        0x5F, 0x78, 0xFF, 0xFF, 0x19, 0x60, 0x86, 0xFB, 0x02, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x5F, 0x78,
-        0xFF, 0xFF, 0x19, 0x60, 0x87, 0xFB, 0x01, 0x63, 0xFD, 0x60, 0x58, 0x4D, 0x5F, 0x78, 0xFF, 0xFF,
-        0x19, 0x60, 0x88, 0xFB, 0x2E, 0x58, 0xFF, 0xFF, 0x63, 0x5C, 0xA7, 0x84, 0xEB, 0x83, 0x14, 0x02,
-        0x01, 0x03, 0xFB, 0x01, 0x64, 0x44, 0x01, 0x36, 0x0B, 0x64, 0x02, 0x36, 0x0B, 0x64, 0x04, 0x36,
-        0x0A, 0x64, 0x08, 0x36, 0x0A, 0x64, 0x10, 0x36, 0x09, 0x64, 0x20, 0x36, 0x09, 0x64, 0x40, 0x36,
-        0x09, 0x64, 0x80, 0x36, 0x09, 0x64, 0x11, 0x00, 0x60, 0x40, 0x01, 0x36, 0x0B, 0x64, 0x02, 0x36,
-        0x0F, 0x64, 0x04, 0x36, 0x0A, 0x64, 0x08, 0x36, 0x0E, 0x64, 0x10, 0x36, 0x09, 0x64, 0x20, 0x36,
-        0x0D, 0x64, 0x40, 0x36, 0x08, 0x64, 0x80, 0x36, 0x0C, 0x64, 0x2D, 0x58, 0xFF, 0xFF, 0x63, 0x5C,
-        0xA7, 0x84, 0xEB, 0x83, 0x0C, 0x02, 0x01, 0x03, 0xFB, 0x01, 0x64, 0x44, 0x01, 0x36, 0x0A, 0x64,
-        0x02, 0x36, 0x14, 0x64, 0x04, 0x36, 0x37, 0x64, 0x08, 0x36, 0x6E, 0x64, 0x09, 0x00, 0x60, 0x40,
-        0x01, 0x36, 0x0A, 0x64, 0x02, 0x36, 0x14, 0x64, 0x04, 0x36, 0x37, 0x64, 0x08, 0x36, 0x6E, 0x64,
-        0x2D, 0x58, 0xFF, 0xFF, 0x60, 0xFE, 0x81, 0xA1, 0x7F, 0xA1, 0x02, 0x06, 0x00, 0xF4, 0x03, 0x61,
-        0x5D, 0xD2, 0xCF, 0x83, 0xD4, 0x80, 0x25, 0x03, 0x16, 0x03, 0xCF, 0x83, 0x61, 0x44, 0x80, 0xA0,
-        0x20, 0x03, 0x02, 0x02, 0x00, 0xF4, 0x03, 0x61, 0x5D, 0xD2, 0xCF, 0x83, 0x81, 0xA1, 0x19, 0x03,
-        0x05, 0x07, 0x7F, 0xA1, 0xCC, 0x84, 0xDD, 0x81, 0xE6, 0x03, 0xF7, 0x01, 0x00, 0xF4, 0x00, 0xB8,
-        0x04, 0x61, 0xE6, 0x03, 0xF2, 0x01, 0x2C, 0x43, 0x5D, 0xD0, 0xDE, 0xD9, 0x64, 0x44, 0x5D, 0xD0,
-        0xDE, 0xD9, 0xCC, 0x84, 0x81, 0xA1, 0x05, 0x03, 0x7F, 0xA1, 0xF9, 0x04, 0x00, 0xF4, 0x03, 0x61,
-        0xF6, 0x01, 0x20, 0xFE, 0x2E, 0x58, 0xFF, 0xFF, 0x01, 0x3A, 0x02, 0x00, 0x16, 0x64, 0x2B, 0x00,
-        0x02, 0x3A, 0x02, 0x00, 0x14, 0x64, 0x27, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x12, 0x64, 0x23, 0x00,
-        0x08, 0x3A, 0x02, 0x00, 0x10, 0x64, 0x1F, 0x00, 0x10, 0x3A, 0x02, 0x00, 0x0E, 0x64, 0x1B, 0x00,
-        0x20, 0x3A, 0x02, 0x00, 0x0C, 0x64, 0x17, 0x00, 0x40, 0x3A, 0x02, 0x00, 0x0A, 0x64, 0x13, 0x00,
-        0x80, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x0F, 0x00, 0x01, 0x3B, 0x02, 0x00, 0x06, 0x64, 0x0B, 0x00,
-        0x02, 0x3B, 0x02, 0x00, 0x04, 0x64, 0x07, 0x00, 0x04, 0x3B, 0x02, 0x00, 0x02, 0x64, 0x03, 0x00,
-        0x08, 0x3B, 0xFF, 0x01, 0x00, 0x64, 0x2E, 0x58, 0xFF, 0xFF, 0x27, 0xF2, 0xFF, 0xFF, 0x60, 0x40,
-        0x36, 0x3A, 0x02, 0x00, 0x00, 0x61, 0x30, 0x00, 0x30, 0x3A, 0x02, 0x00, 0x02, 0x61, 0x2C, 0x00,
-        0x24, 0x3A, 0x02, 0x00, 0x04, 0x61, 0x28, 0x00, 0x18, 0x3A, 0x02, 0x00, 0x06, 0x61, 0x24, 0x00,
-        0x12, 0x3A, 0x02, 0x00, 0x08, 0x61, 0x20, 0x00, 0x0C, 0x3A, 0x02, 0x00, 0x0A, 0x61, 0x1C, 0x00,
-        0x09, 0x3A, 0x02, 0x00, 0x0C, 0x61, 0x18, 0x00, 0x06, 0x3A, 0x02, 0x00, 0x0E, 0x61, 0x14, 0x00,
-        0x6E, 0x3A, 0x02, 0x00, 0x10, 0x61, 0x10, 0x00, 0x37, 0x3A, 0x02, 0x00, 0x12, 0x61, 0x0C, 0x00,
-        0x14, 0x3A, 0x02, 0x00, 0x14, 0x61, 0x08, 0x00, 0x0A, 0x3A, 0x02, 0x00, 0x16, 0x61, 0x04, 0x00,
-        0x78, 0x43, 0x03, 0x61, 0x29, 0x60, 0xEA, 0x78, 0x65, 0x40, 0x01, 0x3A, 0x13, 0x00, 0x66, 0x45,
-        0x2B, 0x46, 0x92, 0xFA, 0x65, 0x46, 0x26, 0xF2, 0xFF, 0xFF, 0x60, 0x41, 0x00, 0x7F, 0x60, 0x45,
-        0x61, 0x47, 0x00, 0x7F, 0xD4, 0x84, 0x66, 0x41, 0x2B, 0x46, 0x0E, 0xF2, 0x60, 0x45, 0x65, 0x5E,
-        0x0E, 0xFA, 0x61, 0x46, 0x2E, 0x58, 0xFF, 0xFF, 0xCD, 0x81, 0x7F, 0xB4, 0x02, 0x3A, 0x02, 0x00,
-        0x01, 0x64, 0x32, 0x00, 0x04, 0x3A, 0x02, 0x00, 0x02, 0x64, 0x2E, 0x00, 0x0B, 0x3A, 0x02, 0x00,
-        0x04, 0x64, 0x2A, 0x00, 0x16, 0x3A, 0x02, 0x00, 0x08, 0x64, 0x26, 0x00, 0x0C, 0x3A, 0x02, 0x00,
-        0x10, 0x64, 0x22, 0x00, 0x12, 0x3A, 0x02, 0x00, 0x20, 0x64, 0x1E, 0x00, 0x18, 0x3A, 0x02, 0x00,
-        0x40, 0x64, 0x1A, 0x00, 0x24, 0x3A, 0x02, 0x00, 0x80, 0x64, 0x16, 0x00, 0x30, 0x3A, 0x03, 0x00,
-        0x00, 0x7E, 0x01, 0x7F, 0x11, 0x00, 0x48, 0x3A, 0x03, 0x00, 0x00, 0x7E, 0x02, 0x7F, 0x0C, 0x00,
-        0x60, 0x3A, 0x03, 0x00, 0x00, 0x7E, 0x04, 0x7F, 0x07, 0x00, 0x6C, 0x3A, 0x03, 0x00, 0x00, 0x7E,
-        0x08, 0x7F, 0x02, 0x00, 0x00, 0x64, 0x00, 0x00, 0x20, 0xFE, 0x2A, 0x45, 0x34, 0x8A, 0x60, 0xFE,
-        0x61, 0x40, 0x00, 0x36, 0x02, 0x00, 0xBD, 0xD3, 0xBF, 0x01, 0x2E, 0x58, 0xFF, 0xFF,
-
-};  /* fw_image_4_data */
-
-static const CFG_IDENTITY_STRCT fw_image_infoidentity[] = {
-       {
-               sizeof( CFG_IDENTITY_STRCT ) / sizeof(hcf_16) - 1,
-               CFG_FW_IDENTITY,
-               COMP_ID_FW_STA,
-               4,                                                      //Variant
-               1,                                                      //Major
-               36                                                      //Minor
-       },
-       { 0000, 0000, 0000, 0000, 0000, 0000 }          //endsentinel
-};
-
-static const CFG_PROG_STRCT fw_image_code[] = {
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      // mode
-               0x0184,         // sizeof(fw_image_1_data),
-               0x00000060,                                     // Target address in NIC Memory
-               0x0000,                                         // CRC: yes/no  TYPE: primary/station/tertiary
-               (hcf_8 FAR   *) fw_image_1_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      // mode
-               0x2c0e,         // sizeof(fw_image_2_data),
-               0x00000C16,                                     // Target address in NIC Memory
-               0x0000,                                         // CRC: yes/no  TYPE: primary/station/tertiary
-               (hcf_8 FAR   *) fw_image_2_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      // mode
-               0x54de,         // sizeof(fw_image_3_data),
-               0x001E3824,                                     // Target address in NIC Memory
-               0x0000,                                         // CRC: yes/no  TYPE: primary/station/tertiary
-               (hcf_8 FAR   *) fw_image_3_data
-       },
-       {
-               8,
-               CFG_PROG,
-               CFG_PROG_VOLATILE,                      // mode
-               0xbcde,         // sizeof(fw_image_4_data),
-               0x001F4000,                                     // Target address in NIC Memory
-               0x0000,                                         // CRC: yes/no  TYPE: primary/station/tertiary
-               (hcf_8 FAR   *) fw_image_4_data
-       },
-       {
-               5,
-               CFG_PROG,
-               CFG_PROG_STOP,                          // mode
-               0000,
-       0x000F429B,                                     // Start execution address
-       },
-       { 0000, 0000, 0000, 0000, 00000000, 0000, NULL}
-};
-
-static const CFG_RANGE20_STRCT fw_image_infocompat[] = {
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_FW_SUP_RANGE,
-               COMP_ROLE_SUPL,
-               COMP_ID_STA,
-               {
-                       { 4, 1, 2 }                             //variant, bottom, top
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_MFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_MFI,
-               {
-                       { 7, 3, 3 },                            //variant, bottom, top
-                       { 8, 1, 1 }                             //variant, bottom, top
-               }
-       },
-       {       3 + ((20 * sizeof(CFG_RANGE_SPEC_STRCT)) / sizeof(hcf_16)),
-               CFG_CFI_ACT_RANGES_STA,
-               COMP_ROLE_ACT,
-               COMP_ID_CFI,
-               {
-                       { 4, 1, 2 }                             //variant, bottom, top
-               }
-       },
-       { 0000, 0000, 0000, 0000, { { 0000, 0000, 0000 } } }    //endsentinel
-};
-
-memimage fw_image = {
-       "FUPU7D37dhfwci\001C",                  //signature, <format number>, C/Bin type
-       (CFG_PROG_STRCT *) fw_image_code,
-       0x000F429B,
-       NULL,                                   //(dummy) pdaplug
-       NULL,                                   //(dummy) priplug
-       (CFG_RANGE20_STRCT *) fw_image_infocompat,
-       (CFG_IDENTITY_STRCT *) fw_image_infoidentity,
-};
-
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c
deleted file mode 100644 (file)
index 3f7cf41..0000000
+++ /dev/null
@@ -1,440 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file contains processing and initialization specific to Card Services
- *   devices (PCMCIA, CF).
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright (c) 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/kernel.h>
-#include <linux/sched.h>
-#include <linux/ptrace.h>
-#include <linux/ctype.h>
-#include <linux/string.h>
-#include <linux/timer.h>
-#include <linux/interrupt.h>
-#include <linux/in.h>
-#include <linux/delay.h>
-#include <asm/io.h>
-#include <asm/bitops.h>
-
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/skbuff.h>
-#include <linux/if_arp.h>
-#include <linux/ioport.h>
-#include <linux/module.h>
-
-#include <pcmcia/cistpl.h>
-#include <pcmcia/cisreg.h>
-#include <pcmcia/ciscode.h>
-#include <pcmcia/ds.h>
-#include <debug.h>
-
-#include <hcf.h>
-#include <dhf.h>
-#include <hcfdef.h>
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_util.h>
-#include <wl_main.h>
-#include <wl_netdev.h>
-#include <wl_cs.h>
-
-/*******************************************************************************
- *     wl_adapter_attach()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Creates an instance of the driver, allocating local data structures for
- *  one device. The device is registered with Card Services.
- *
- *  PARAMETERS:
- *
- *      none
- *
- *  RETURNS:
- *
- *      pointer to an allocated dev_link_t structure
- *      NULL on failure
- *
- ******************************************************************************/
-static int wl_adapter_attach(struct pcmcia_device *link)
-{
-       struct net_device   *dev;
-       struct wl_private   *lp;
-       int ret;
-
-       dev = wl_device_alloc();
-       if (dev == NULL) {
-               DBG_ERROR(DbgInfo, "wl_device_alloc returned NULL\n");
-               return -ENOMEM;
-       }
-
-       link->resource[0]->end  = HCF_NUM_IO_PORTS;
-       link->resource[0]->flags= IO_DATA_PATH_WIDTH_16;
-       link->config_flags     |= CONF_ENABLE_IRQ;
-       link->config_index      = 5;
-       link->config_regs       = PRESENT_OPTION;
-
-       link->priv = dev;
-       lp = wl_priv(dev);
-       lp->link = link;
-
-       ret = wl_adapter_insert(link);
-       if (ret != 0)
-               wl_device_dealloc(dev);
-
-       return ret;
-} /* wl_adapter_attach */
-/*============================================================================*/
-
-
-
-static void wl_adapter_detach(struct pcmcia_device *link)
-{
-       struct net_device   *dev = link->priv;
-
-       DBG_PARAM(DbgInfo, "link", "0x%p", link);
-
-       wl_adapter_release(link);
-
-       if (dev) {
-               unregister_netdev(dev);
-               wl_device_dealloc(dev);
-       }
-} /* wl_adapter_detach */
-/*============================================================================*/
-
-
-void wl_adapter_release(struct pcmcia_device *link)
-{
-       DBG_PARAM(DbgInfo, "link", "0x%p", link);
-
-       /* Stop hardware */
-       wl_remove(link->priv);
-
-       pcmcia_disable_device(link);
-} /* wl_adapter_release */
-/*============================================================================*/
-
-static int wl_adapter_suspend(struct pcmcia_device *link)
-{
-       struct net_device *dev = link->priv;
-
-       /* if (link->open) { */
-       netif_device_detach(dev);
-       wl_suspend(dev);
-       /* CHECK! pcmcia_release_configuration(link->handle); */
-       /* } */
-
-       return 0;
-} /* wl_adapter_suspend */
-
-static int wl_adapter_resume(struct pcmcia_device *link)
-{
-       struct net_device *dev = link->priv;
-
-       wl_resume(dev);
-
-       netif_device_attach(dev);
-
-       return 0;
-} /* wl_adapter_resume */
-
-int wl_adapter_insert(struct pcmcia_device *link)
-{
-       struct net_device *dev;
-       int ret;
-
-       DBG_PARAM(DbgInfo, "link", "0x%p", link);
-
-       dev     = link->priv;
-
-       /* Do we need to allocate an interrupt? */
-       link->config_flags |= CONF_ENABLE_IRQ;
-       link->io_lines = 6;
-
-       ret = pcmcia_request_io(link);
-       if (ret != 0)
-               goto failed;
-
-       ret = pcmcia_request_irq(link, (void *) wl_isr);
-       if (ret != 0)
-               goto failed;
-
-       ret = pcmcia_enable_device(link);
-       if (ret != 0)
-               goto failed;
-
-       dev->irq        = link->irq;
-       dev->base_addr  = link->resource[0]->start;
-
-       SET_NETDEV_DEV(dev, &link->dev);
-       ret = register_netdev(dev);
-       if (ret != 0) {
-               printk("%s: register_netdev() failed\n", KBUILD_MODNAME);
-               goto failed;
-       }
-
-       printk(KERN_INFO "%s: Wireless, io_addr %#03lx, irq %d, mac_address"
-               " %pM\n", dev->name, dev->base_addr, dev->irq, dev->dev_addr);
-
-       return 0;
-
-failed:
-       wl_adapter_release(link);
-       return ret;
-} /* wl_adapter_insert */
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_adapter_open()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Open the device.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to a net_device structure representing the network
- *            device to open.
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wl_adapter_open(struct net_device *dev)
-{
-       struct wl_private *lp = wl_priv(dev);
-       struct pcmcia_device *link = lp->link;
-       int result = 0;
-       int hcf_status = HCF_SUCCESS;
-
-       DBG_PRINT("%s\n", VERSION_INFO);
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       if (!pcmcia_dev_present(link))
-               return -ENODEV;
-
-       link->open++;
-
-       hcf_status = wl_open(dev);
-
-       if (hcf_status != HCF_SUCCESS) {
-               link->open--;
-               result = -ENODEV;
-       }
-
-       return result;
-} /* wl_adapter_open */
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_adapter_close()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Close the device.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to a net_device structure representing the network
- *            device to close.
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wl_adapter_close(struct net_device *dev)
-{
-       struct wl_private *lp = wl_priv(dev);
-       struct pcmcia_device *link = lp->link;
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       if (link == NULL)
-               return -ENODEV;
-
-       DBG_TRACE(DbgInfo, "%s: Shutting down adapter.\n", dev->name);
-       wl_close(dev);
-
-       link->open--;
-
-       return 0;
-} /* wl_adapter_close */
-/*============================================================================*/
-
-static const struct pcmcia_device_id wl_adapter_ids[] = {
-#if !((HCF_TYPE) & HCF_TYPE_HII5)
-       PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0003),
-       PCMCIA_DEVICE_PROD_ID12("Agere Systems", "Wireless PC Card Model 0110",
-                               0x33103a9b, 0xe175b0dd),
-#else
-       PCMCIA_DEVICE_MANF_CARD(0x0156, 0x0004),
-       PCMCIA_DEVICE_PROD_ID12("Linksys", "WCF54G_Wireless-G_CompactFlash_Card",
-                               0x0733cc81, 0x98a599e1),
-#endif  /* (HCF_TYPE) & HCF_TYPE_HII5 */
-       PCMCIA_DEVICE_NULL,
-};
-MODULE_DEVICE_TABLE(pcmcia, wl_adapter_ids);
-
-static struct pcmcia_driver wlags49_driver = {
-       .owner      = THIS_MODULE,
-       .name       = DRIVER_NAME,
-       .probe      = wl_adapter_attach,
-       .remove     = wl_adapter_detach,
-       .id_table   = wl_adapter_ids,
-       .suspend    = wl_adapter_suspend,
-       .resume     = wl_adapter_resume,
-};
-
-
-
-/*******************************************************************************
- *     wl_adapter_init_module()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Called by init_module() to perform PCMCIA driver initialization.
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      0 on success
- *      -1 on error
- *
- ******************************************************************************/
-int wl_adapter_init_module(void)
-{
-       return pcmcia_register_driver(&wlags49_driver);
-} /* wl_adapter_init_module */
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_adapter_cleanup_module()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Called by cleanup_module() to perform driver uninitialization.
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_adapter_cleanup_module(void)
-{
-       pcmcia_unregister_driver(&wlags49_driver);
-} /* wl_adapter_cleanup_module */
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_adapter_is_open()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Check with Card Services to determine if this device is open.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the net_device structure whose open status will be
- *            checked
- *
- *  RETURNS:
- *
- *      nonzero if device is open
- *      0 otherwise
- *
- ******************************************************************************/
-int wl_adapter_is_open(struct net_device *dev)
-{
-       struct wl_private *lp = wl_priv(dev);
-       struct pcmcia_device *link = lp->link;
-
-       if (!pcmcia_dev_present(link))
-               return 0;
-
-       return link->open;
-} /* wl_adapter_is_open */
-/*============================================================================*/
diff --git a/drivers/staging/wlags49_h2/wl_cs.h b/drivers/staging/wlags49_h2/wl_cs.h
deleted file mode 100644 (file)
index 9a597a9..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing information required for the driver to support PCMCIA.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_CS_H__
-#define __WL_CS_H__
-
-
-
-
-/*******************************************************************************
- *  function prototypes
- ******************************************************************************/
-
-int wl_adapter_insert(struct pcmcia_device *link);
-
-void wl_adapter_release(struct pcmcia_device *link);
-
-int wl_adapter_init_module( void );
-
-void wl_adapter_cleanup_module( void );
-
-int wl_adapter_open(struct net_device *dev);
-
-int wl_adapter_close(struct net_device *dev);
-
-int wl_adapter_is_open(struct net_device *dev);
-
-const char *DbgEvent( int mask );
-
-
-
-#endif  /* __WL_CS_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_enc.c b/drivers/staging/wlags49_h2/wl_enc.c
deleted file mode 100644 (file)
index 389c23b..0000000
+++ /dev/null
@@ -1,217 +0,0 @@
-
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file defines functions related to WEP key coding/decoding.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-#include <linux/string.h>
-#include <wl_version.h>
-
-#include <debug.h>
-#include <hcf.h>
-
-#include <wl_enc.h>
-
-/*******************************************************************************
- *     wl_wep_code()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function encodes a set of wep keys for privacy
- *
- *  PARAMETERS:
- *
- *      szCrypt -
- *      szDest  -
- *      Data    -
- *      nLen    -
- *
- *  RETURNS:
- *
- *      OK
- *
- ******************************************************************************/
-int wl_wep_code(char *szCrypt, char *szDest, void *Data, int nLen)
-{
-       int     i;
-       int     t;
-       int     k ;
-       char    bits;
-       char    *szData = (char *) Data;
-       /*------------------------------------------------------------------------*/
-
-
-       for (i = bits = 0; i < MACADDRESS_STR_LEN; i++) {
-               bits ^= szCrypt[i];
-               bits += szCrypt[i];
-       }
-
-       for (i = t = *szDest = 0; i < nLen; i++, t++) {
-               k = szData[i] ^ (bits + i);
-
-
-       switch (i % 3) {
-
-       case 0:
-
-               szDest[t]   = ((k & 0xFC) >> 2) + CH_START ;
-               szDest[t+1] = ((k & 0x03) << 4) + CH_START ;
-               szDest[t+2] = '\0';
-
-               break;
-
-
-       case 1:
-
-               szDest[t]  += ((k & 0xF0) >> 4);
-               szDest[t+1] = ((k & 0x0F) << 2) + CH_START ;
-               szDest[t+2] = '\0';
-
-               break;
-
-
-       case 2:
-
-               szDest[t]  += ((k & 0xC0) >> 6);
-               szDest[t+1] = (k & 0x3F) + CH_START ;
-               szDest[t+2] = '\0';
-               t++;
-
-               break;
-       }
-       }
-
-       return strlen(szDest);
-
-}
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wep_decode()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function decodes a set of WEP keys for use by the card.
- *
- *  PARAMETERS:
- *
- *      szCrypt -
- *      szDest  -
- *      Data    -
- *
- *  RETURNS:
- *
- *      OK
- *
- ******************************************************************************/
-int wl_wep_decode(char *szCrypt, void *Dest, char *szData)
-{
-       int     i;
-       int     t;
-       int     nLen;
-       char    bits;
-       char    *szDest = Dest;
-       /*------------------------------------------------------------------------*/
-
-
-       for (i = bits = 0; i < 12; i++) {
-               bits ^= szCrypt[i] ;
-               bits += szCrypt[i] ;
-       }
-
-       nLen = (strlen(szData) * 3) / 4 ;
-
-       for (i = t = 0; i < nLen; i++, t++) {
-               switch (i % 3) {
-               case 0:
-
-                       szDest[i] = (((szData[t] - CH_START) & 0x3f) << 2) +
-                                   (((szData[t+1] - CH_START) & 0x30) >> 4);
-                       break;
-
-
-               case 1:
-                       szDest[i] = (((szData[t] - CH_START) & 0x0f) << 4) +
-                                   (((szData[t+1] - CH_START) & 0x3c) >> 2);
-                       break;
-
-
-               case 2:
-                       szDest[i] = (((szData[t] - CH_START) & 0x03) << 6) +
-                                    ((szData[t+1] - CH_START) & 0x3f);
-                       t++;
-                       break;
-               }
-
-               szDest[i] ^= (bits + i);
-
-       }
-
-       return i;
-
-}
-/*============================================================================*/
-
diff --git a/drivers/staging/wlags49_h2/wl_enc.h b/drivers/staging/wlags49_h2/wl_enc.h
deleted file mode 100644 (file)
index 03a52fb..0000000
+++ /dev/null
@@ -1,118 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header for performing coding/decoding of the WEP keys.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WAVELAN2_ENCRYPTION_H__
-#define __WAVELAN2_ENCRYPTION_H__
-
-
-
-
-/*******************************************************************************
- * constant definitions
- ******************************************************************************/
-#define CRYPT_CODE                                     "57617665A5D6"
-#define ENCRYPTION_LEN                         102
-#define ENCRYPTION_MAGIC                       0x48576877L     /* HWhw */
-#define DEF_CRYPT_STR                          "G?TIUEA]d5MAdZV'eUb&&6.)'&:,'VF/(FR2)6^5*'*8*W6;+GB>,7NA-'ZD-X&G.H2J/8>M0(JP0XVS1HbV29.Y3):\\3YF_4IRb56"
-
-#define DEFAULT_CRYPT_MAC                      "W\x01\x6B\x66\xA5\x5A"
-#define CH_START                                       '&'
-#define MACADDRESS_STR_LEN                     12
-
-#define KEY_LEN                     14
-#define NUM_KEYS                    4
-
-#define KEY_LENGTH_NONE_ASCII       0
-#define KEY_LENGTH_64_BIT_ASCII     5
-#define KEY_LENGTH_128_BIT_ASCII    13
-
-#define KEY_LENGTH_NONE_HEX         ( KEY_LENGTH_NONE_ASCII    * sizeof( unsigned short ))
-#define KEY_LENGTH_64_BIT_HEX       ( KEY_LENGTH_64_BIT_ASCII  * sizeof( unsigned short ))
-#define KEY_LENGTH_128_BIT_HEX      ( KEY_LENGTH_128_BIT_ASCII * sizeof( unsigned short ))
-
-
-
-
-/*******************************************************************************
- * type definitions
- ******************************************************************************/
-typedef struct _encstct
-{
-       hcf_32                     dwMagic;
-       hcf_16                     wTxKeyID;
-       hcf_16                     wEnabled;
-       CFG_DEFAULT_KEYS_STRCT     EncStr;
-}
-ENCSTRCT, *PENCSTRCT;
-
-
-
-
-/*******************************************************************************
- * function prototypes
- ******************************************************************************/
-int wl_wep_code( char *szCrypt, char *szDest, void *Data, int nLen );
-
-int wl_wep_decode( char *szCrypt, void *Dest, char *szData );
-
-
-
-
-#endif  /* __WAVELAN2_ENCRYPTION_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_if.h b/drivers/staging/wlags49_h2/wl_if.h
deleted file mode 100644 (file)
index 425d373..0000000
+++ /dev/null
@@ -1,221 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Driver common header for info needed by driver source and user-space
- *   processes communicating with the driver.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WAVELAN2_IF_H__
-#define __WAVELAN2_IF_H__
-
-
-
-
-/*******************************************************************************
- *  constant definitions
- ******************************************************************************/
-#define MAX_LTV_BUF_SIZE            (512 - (sizeof(hcf_16) * 2))
-
-#define HCF_TALLIES_SIZE            (sizeof(CFG_HERMES_TALLIES_STRCT) + \
-                                   (sizeof(hcf_16) * 2))
-
-#define HCF_MAX_MULTICAST           16
-#define HCF_MAX_NAME_LEN            32
-#define MAX_LINE_SIZE               256
-#define HCF_NUM_IO_PORTS            0x80
-#define TX_TIMEOUT                  ((800 * HZ) / 1000)
-
-
-/* PE1DNN
- * Better data from the real world. Not scientific but empirical data gathered
- * from a Thomson Speedtouch 110 which is identified as:
- * PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110"
- *              Manufacture ID: 0156,0003
- * Lowest measurment for noise floor seen is value 54
- * Highest signal strength in close proximity to the AP seen is value 118
- * Very good must be around 100 (otherwise its never "full scale"
- * All other constants are derrived from these. This makes the signal gauge
- * work for me...
- */
-#define HCF_MIN_SIGNAL_LEVEL        54
-#define HCF_MAX_SIGNAL_LEVEL        100
-#define HCF_MIN_NOISE_LEVEL         HCF_MIN_SIGNAL_LEVEL
-#define HCF_MAX_NOISE_LEVEL         HCF_MAX_SIGNAL_LEVEL
-#define HCF_0DBM_OFFSET             (HCF_MAX_SIGNAL_LEVEL + 1)
-#define HCF_MIN_COMM_QUALITY        0
-#define HCF_MAX_COMM_QUALITY        (HCF_MAX_SIGNAL_LEVEL - \
-                                       HCF_MIN_NOISE_LEVEL + 1)
-
-
-/* For encryption (WEP) */
-#define MIN_KEY_SIZE                5       /* 40 bits RC4 - WEP */
-#define MAX_KEY_SIZE                13      /* 104 bits */
-#define MAX_KEYS                    4
-
-#define RADIO_CHANNELS              14
-#define RADIO_SENSITIVITY_LEVELS    3
-#define RADIO_TX_POWER_MWATT        32
-#define RADIO_TX_POWER_DBM          15
-
-#define MIN_RTS_BYTES               0
-#define MAX_RTS_BYTES               2347
-
-#define MAX_RATES                   8
-#define MEGABIT                     (1024 * 1024)
-
-#define HCF_FAILURE                 0xFF
-#define UIL_FAILURE                        0xFF
-#define CFG_UIL_CONNECT             0xA123          /* Define differently? */
-#define CFG_UIL_CONNECT_ACK_CODE    0x5653435A      /* VSCZ */
-#define WVLAN2_UIL_CONNECTED        (0x01L << 0)
-#define WVLAN2_UIL_BUSY             (0x01L << 1)
-
-
-
-
-/*******************************************************************************
- * driver ioctl interface
- ******************************************************************************/
-#define WVLAN2_IOCTL_UIL            SIOCDEVPRIVATE
-
-/* The UIL Interface used in conjunction with the WVLAN2_IOCTL_UIL code above
-   is defined in mdd.h. A quick reference of the UIL codes is listed below */
-/*
-UIL_FUN_CONNECT
-UIL_FUN_DISCONNECT
-UIL_FUN_ACTION
-    UIL_ACT_BLOCK
-    UIL_ACT_UNBLOCK
-    UIL_ACT_SCA
-    UIL_ACT_DIAG
-    UIL_ACT_APPLY
-UIL_FUN_SEND_DIAG_MSG
-UIL_FUN_GET_INFO
-UIL_FUN_PUT_INFO
-*/
-
-#define SIOCSIWNETNAME              (SIOCDEVPRIVATE + 1)
-#define SIOCGIWNETNAME              (SIOCDEVPRIVATE + 2)
-#define SIOCSIWSTANAME              (SIOCDEVPRIVATE + 3)
-#define SIOCGIWSTANAME              (SIOCDEVPRIVATE + 4)
-#define SIOCSIWPORTTYPE             (SIOCDEVPRIVATE + 5)
-#define SIOCGIWPORTTYPE             (SIOCDEVPRIVATE + 6)
-
-/* IOCTL code for the RTS interface */
-#define WL_IOCTL_RTS                (SIOCDEVPRIVATE + 7)
-
-/* IOCTL subcodes for WL_IOCTL_RTS */
-#define WL_IOCTL_RTS_READ           1
-#define WL_IOCTL_RTS_WRITE          2
-#define WL_IOCTL_RTS_BATCH_READ     3
-#define WL_IOCTL_RTS_BATCH_WRITE    4
-
-
-/*******************************************************************************
- * STRUCTURE DEFINITIONS
- ******************************************************************************/
-typedef struct {
-       __u16   length;
-       __u8    name[HCF_MAX_NAME_LEN];
-}
-wvName_t;
-
-
-typedef struct {
-       hcf_16      len;
-       hcf_16      typ;
-       union {
-               hcf_8       u8[MAX_LTV_BUF_SIZE / sizeof(hcf_8)];
-               hcf_16      u16[MAX_LTV_BUF_SIZE / sizeof(hcf_16)];
-               hcf_32      u32[MAX_LTV_BUF_SIZE / sizeof(hcf_32)];
-       } u;
-}
-ltv_t;
-
-
-struct uilreq {
-       union {
-               char    ifrn_name[IFNAMSIZ];
-       } ifr_ifrn;
-
-       IFBP        hcfCtx;
-       __u8        command;
-       __u8        result;
-
-       /* The data field in this structure is typically an LTV of some type.
-          The len field is the size of the buffer in bytes, as opposed to words
-          (like the L-field in the LTV */
-       __u16       len;
-       void       *data;
-};
-
-
-struct rtsreq {
-       union {
-               char    ifrn_name[IFNAMSIZ];
-       }
-       ifr_ifrn;
-
-       __u16   typ;
-       __u16   reg;
-       __u16   len;
-       __u16   *data;
-};
-
-
-#endif  /* __WAVELAN2_IF_H__ */
-
diff --git a/drivers/staging/wlags49_h2/wl_internal.h b/drivers/staging/wlags49_h2/wl_internal.h
deleted file mode 100644 (file)
index 78129e9..0000000
+++ /dev/null
@@ -1,1040 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header for definitions and macros internal to the drvier.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WAVELAN2_H__
-#define __WAVELAN2_H__
-
-
-
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-#ifdef BUS_PCMCIA
-#include <pcmcia/cistpl.h>
-#include <pcmcia/cisreg.h>
-#include <pcmcia/ciscode.h>
-#include <pcmcia/ds.h>
-#endif  // BUS_PCMCIA
-
-#include <linux/wireless.h>
-#include <net/iw_handler.h>
-
-#include <linux/list.h>
-
-#include <linux/interrupt.h>
-
-
-
-
-/*******************************************************************************
- *  constant definitions
- ******************************************************************************/
-#define p_u8    __u8
-#define p_s8    __s8
-#define p_u16   __u16
-#define p_s16   __s16
-#define p_u32   __u32
-#define p_s32   __s32
-#define p_char  char
-
-#define MAX_KEY_LEN         (2 + (13 * 2)) // 0x plus 13 hex digit pairs
-#define MB_SIZE             1024
-#define MAX_ENC_LEN         104
-
-#define MAX_SCAN_TIME_SEC   8
-#define MAX_NAPS            32
-
-#define CFG_MB_INFO         0x0820             //Mail Box Info Block
-
-#define NUM_WDS_PORTS       6
-
-#define WVLAN_MAX_LOOKAHEAD (HCF_MAX_MSG+46) /* as per s0005MIC_4.doc */
-
-
-/* Min/Max/Default Parameter Values */
-#if 0 //;? (HCF_TYPE) & HCF_TYPE_AP
-//;? why this difference depending on compile option, seems to me it should depend on runtime if anything
-#define PARM_DEFAULT_SSID                       "LinuxAP"
-#else
-#define PARM_DEFAULT_SSID                       "ANY"
-#endif // HCF_TYPE_AP
-
-#define PARM_MIN_NAME_LEN                       1
-#define PARM_MAX_NAME_LEN                       32
-
-
-/* The following definitions pertain to module and profile parameters */
-// #define PARM_AP_MODE                            APMode
-// #define PARM_NAME_AP_MODE                                           TEXT("APMode")
-// #define PARM_DEFAULT_AP_MODE                                        FALSE
-
-#define PARM_AUTHENTICATION                     Authentication
-#define PARM_NAME_AUTHENTICATION                               TEXT("Authentication")
-#define PARM_MIN_AUTHENTICATION                 1
-#define PARM_MAX_AUTHENTICATION                 2
-#define PARM_DEFAULT_AUTHENTICATION             1
-
-#define PARM_AUTH_KEY_MGMT_SUITE                AuthKeyMgmtSuite
-#define PARM_NAME_AUTH_KEY_MGMT_SUITE           TEXT("AuthKeyMgmtSuite")
-#define PARM_MIN_AUTH_KEY_MGMT_SUITE            0
-#define PARM_MAX_AUTH_KEY_MGMT_SUITE            4
-#define PARM_DEFAULT_AUTH_KEY_MGMT_SUITE        0
-
-#define PARM_BRSC_2GHZ                          BRSC2GHz
-#define PARM_NAME_BRSC_2GHZ                     TEXT("BRSC2GHz")
-#define PARM_MIN_BRSC                           0x0000
-#define PARM_MAX_BRSC                           0x0FFF
-#define PARM_DEFAULT_BRSC_2GHZ                  0x000F
-
-#define PARM_BRSC_5GHZ                          BRSC5GHz
-#define PARM_NAME_BRSC_5GHZ                     TEXT("BRSC5GHz")
-#define PARM_DEFAULT_BRSC_5GHZ                  0x0150
-
-#define PARM_COEXISTENCE                        Coexistence
-#define PARM_NAME_COEXISTENCE                   TEXT("Coexistence")
-#define PARM_MIN_COEXISTENCE                    0x0000
-#define PARM_MAX_COEXISTENCE                    0x0007
-#define PARM_DEFAULT_COEXISTENCE                0x0000
-
-#define PARM_CONFIGURED                         Configured
-#define PARM_NAME_CONFIGURED                                   TEXT("Configured")
-
-#define PARM_CONNECTION_CONTROL                 ConnectionControl
-#define PARM_NAME_CONNECTION_CONTROL            TEXT("ConnectionControl")
-#define PARM_MIN_CONNECTION_CONTROL             0
-#define PARM_MAX_CONNECTION_CONTROL             3
-#define PARM_DEFAULT_CONNECTION_CONTROL         2
-
-#define PARM_CREATE_IBSS                        CreateIBSS
-#define PARM_NAME_CREATE_IBSS                   TEXT("CreateIBSS")
-#define PARM_DEFAULT_CREATE_IBSS                FALSE
-#define PARM_DEFAULT_CREATE_IBSS_STR            "N"
-
-#define PARM_DEBUG_FLAG                        DebugFlag
-#define PARM_NAME_DEBUG_FLAG                           TEXT("DebugFlag")
-#define PARM_MIN_DEBUG_FLAG                            0
-#define PARM_MAX_DEBUG_FLAG                            0xFFFF
-#define PARM_DEFAULT_DEBUG_FLAG                        0xFFFF
-
-#define PARM_DESIRED_SSID                       DesiredSSID
-#define PARM_NAME_DESIRED_SSID                  TEXT("DesiredSSID")
-
-#define PARM_DOWNLOAD_FIRMWARE                  DownloadFirmware
-#define PARM_NAME_DOWNLOAD_FIRMWARE             TEXT("DownloadFirmware")
-
-#define PARM_DRIVER_ENABLE                      DriverEnable
-#define PARM_NAME_DRIVER_ENABLE                                        TEXT("DriverEnable")
-#define PARM_DEFAULT_DRIVER_ENABLE                             TRUE
-
-#define PARM_ENABLE_ENCRYPTION                  EnableEncryption
-#define PARM_NAME_ENABLE_ENCRYPTION             TEXT("EnableEncryption")
-#define PARM_MIN_ENABLE_ENCRYPTION              0
-#define PARM_MAX_ENABLE_ENCRYPTION              7
-#define PARM_DEFAULT_ENABLE_ENCRYPTION          0
-
-#define PARM_ENCRYPTION                         Encryption
-#define PARM_NAME_ENCRYPTION                    TEXT("Encryption")
-
-#define PARM_EXCLUDE_UNENCRYPTED                ExcludeUnencrypted
-#define PARM_NAME_EXCLUDE_UNENCRYPTED           TEXT("ExcludeUnencrypted")
-#define PARM_DEFAULT_EXCLUDE_UNENCRYPTED        TRUE
-#define PARM_DEFAULT_EXCLUDE_UNENCRYPTED_STR    "N"
-
-#define PARM_INTRA_BSS_RELAY                    IntraBSSRelay
-#define PARM_NAME_INTRA_BSS_RELAY               TEXT("IntraBSSRelay")
-#define PARM_DEFAULT_INTRA_BSS_RELAY            TRUE
-#define PARM_DEFAULT_INTRA_BSS_RELAY_STR        "Y"
-
-#define PARM_KEY1                               Key1
-#define PARM_NAME_KEY1                          TEXT("Key1")
-#define PARM_KEY2                               Key2
-#define PARM_NAME_KEY2                          TEXT("Key2")
-#define PARM_KEY3                               Key3
-#define PARM_NAME_KEY3                          TEXT("Key3")
-#define PARM_KEY4                               Key4
-#define PARM_NAME_KEY4                          TEXT("Key4")
-
-//;? #define PARM_KEY_FORMAT                         AsciiHex
-//;? #define PARM_NAME_KEY_FORMAT                    TEXT("AsciiHex")
-
-#define PARM_LOAD_BALANCING                     LoadBalancing
-#define PARM_NAME_LOAD_BALANCING                TEXT("LoadBalancing")
-#define PARM_DEFAULT_LOAD_BALANCING             TRUE
-#define PARM_DEFAULT_LOAD_BALANCING_STR         "Y"
-
-#define PARM_MAX_DATA_LENGTH                    MaxDataLength
-#define PARM_NAME_MAX_DATA_LENGTH                              TEXT("MaxDataLength")
-
-#define PARM_MAX_SLEEP                          MaxSleepDuration
-#define PARM_NAME_MAX_SLEEP                     TEXT("MaxSleepDuration")
-#define PARM_MIN_MAX_PM_SLEEP                   1                                                              //;?names nearly right?
-#define PARM_MAX_MAX_PM_SLEEP                   65535
-#define PARM_DEFAULT_MAX_PM_SLEEP               100
-
-#define PARM_MEDIUM_DISTRIBUTION                MediumDistribution
-#define PARM_NAME_MEDIUM_DISTRIBUTION           TEXT("MediumDistribution")
-#define PARM_DEFAULT_MEDIUM_DISTRIBUTION        TRUE
-#define PARM_DEFAULT_MEDIUM_DISTRIBUTION_STR    "Y"
-
-#define PARM_MICROWAVE_ROBUSTNESS               MicroWaveRobustness
-#define PARM_NAME_MICROWAVE_ROBUSTNESS          TEXT("MicroWaveRobustness")
-#define PARM_DEFAULT_MICROWAVE_ROBUSTNESS       FALSE
-#define PARM_DEFAULT_MICROWAVE_ROBUSTNESS_STR   "N"
-
-#define PARM_MULTICAST_PM_BUFFERING             MulticastPMBuffering
-#define PARM_NAME_MULTICAST_PM_BUFFERING           TEXT("MulticastPMBuffering")
-#define PARM_DEFAULT_MULTICAST_PM_BUFFERING     TRUE
-#define PARM_DEFAULT_MULTICAST_PM_BUFFERING_STR "Y"
-
-#define PARM_MULTICAST_RATE                     MulticastRate
-#define PARM_NAME_MULTICAST_RATE                TEXT("MulticastRate")
-#ifdef WARP
-#define PARM_MIN_MULTICAST_RATE                 0x0001
-#define PARM_MAX_MULTICAST_RATE                 0x0fff
-#define PARM_DEFAULT_MULTICAST_RATE_2GHZ        0x0004
-#define PARM_DEFAULT_MULTICAST_RATE_5GHZ        0x0010
-#else
-#define PARM_MIN_MULTICAST_RATE                 0x0001
-#define PARM_MAX_MULTICAST_RATE                 0x0004
-#define PARM_DEFAULT_MULTICAST_RATE_2GHZ        0x0002
-#define PARM_DEFAULT_MULTICAST_RATE_5GHZ        0x0000
-#endif  // WARP
-
-#define PARM_MULTICAST_RX                       MulticastReceive
-#define PARM_NAME_MULTICAST_RX                  TEXT("MulticastReceive")
-#define PARM_DEFAULT_MULTICAST_RX               TRUE
-#define PARM_DEFAULT_MULTICAST_RX_STR           "Y"
-
-#define PARM_NETWORK_ADDR                       NetworkAddress
-#define PARM_NAME_NETWORK_ADDR                  TEXT("NetworkAddress")
-#define PARM_DEFAULT_NETWORK_ADDR               { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF }
-
-#define PARM_NETWORK_TYPE                       NetworkType
-#define PARM_NAME_NETWORK_TYPE                                 TEXT("NetworkType")
-#define PARM_DEFAULT_NETWORK_TYPE                      0
-
-#define PARM_OWN_ATIM_WINDOW                    OwnATIMWindow
-#define PARM_NAME_OWN_ATIM_WINDOW                              TEXT("OwnATIMWindow")
-#define PARM_MIN_OWN_ATIM_WINDOW                0
-#define PARM_MAX_OWN_ATIM_WINDOW                100
-#define PARM_DEFAULT_OWN_ATIM_WINDOW            0
-
-#define PARM_OWN_BEACON_INTERVAL                OwnBeaconInterval
-#define PARM_NAME_OWN_BEACON_INTERVAL           TEXT("OwnBeaconInterval")
-#define PARM_MIN_OWN_BEACON_INTERVAL            20
-#define PARM_MAX_OWN_BEACON_INTERVAL            200
-#define PARM_DEFAULT_OWN_BEACON_INTERVAL        100
-
-#define PARM_OWN_CHANNEL                        OwnChannel
-#define PARM_NAME_OWN_CHANNEL                   TEXT("OwnChannel")
-#define PARM_MIN_OWN_CHANNEL                    1
-#define PARM_MAX_OWN_CHANNEL                    161
-#define PARM_DEFAULT_OWN_CHANNEL                10
-
-#define PARM_OWN_DTIM_PERIOD                    OwnDTIMPeriod
-#define PARM_NAME_OWN_DTIM_PERIOD                  TEXT("OwnDTIMPeriod")
-#define PARM_MIN_OWN_DTIM_PERIOD                1
-#define PARM_MAX_OWN_DTIM_PERIOD                65535
-#define PARM_DEFAULT_OWN_DTIM_PERIOD            1
-
-#define PARM_OWN_NAME                           OwnName
-#define PARM_NAME_OWN_NAME                      TEXT("OwnName")
-#define PARM_DEFAULT_OWN_NAME                   "Linux"
-
-#define PARM_OWN_SSID                           OwnSSID
-#define PARM_NAME_OWN_SSID                      TEXT("OwnSSID")
-
-#define PARM_PM_ENABLED                         PMEnabled
-#define PARM_NAME_PM_ENABLED                    TEXT("PMEnabled")
-#define PARM_MAX_PM_ENABLED                                            3
-
-#define PARM_PMEPS                              PMEPS
-#define PARM_NAME_PMEPS                         TEXT("PMEPS")
-
-#define PARM_PM_HOLDOVER_DURATION               PMHoldoverDuration
-#define PARM_NAME_PM_HOLDOVER_DURATION          TEXT("PMHoldoverDuration")
-#define PARM_MIN_PM_HOLDOVER_DURATION           1
-#define PARM_MAX_PM_HOLDOVER_DURATION           1000
-#define PARM_DEFAULT_PM_HOLDOVER_DURATION       100
-
-#define PARM_PM_MODE                            PowerMode
-#define PARM_NAME_PM_MODE                       TEXT("PowerMode")
-
-#define PARM_PORT_TYPE                          PortType
-#define PARM_NAME_PORT_TYPE                     TEXT("PortType")
-#define PARM_MIN_PORT_TYPE                      1
-#define PARM_MAX_PORT_TYPE                      3
-#define PARM_DEFAULT_PORT_TYPE                  1
-
-#define PARM_PROMISCUOUS_MODE                   PromiscuousMode
-#define PARM_NAME_PROMISCUOUS_MODE              TEXT("PromiscuousMode")
-#define PARM_DEFAULT_PROMISCUOUS_MODE           FALSE
-#define PARM_DEFAULT_PROMISCUOUS_MODE_STR       "N"
-
-#define PARM_REJECT_ANY                         RejectANY
-#define PARM_NAME_REJECT_ANY                               TEXT("RejectANY")
-#define PARM_DEFAULT_REJECT_ANY                 FALSE
-#define PARM_DEFAULT_REJECT_ANY_STR             "N"
-
-#define PARM_RTS_THRESHOLD                      RTSThreshold
-#define PARM_NAME_RTS_THRESHOLD                 TEXT("RTSThreshold")
-#define PARM_MIN_RTS_THRESHOLD                  0
-#define PARM_MAX_RTS_THRESHOLD                  2347
-#define PARM_DEFAULT_RTS_THRESHOLD              2347
-
-#define PARM_RTS_THRESHOLD1                     RTSThreshold1
-#define PARM_NAME_RTS_THRESHOLD1                TEXT("RTSThreshold1")
-#define PARM_RTS_THRESHOLD2                     RTSThreshold2
-#define PARM_NAME_RTS_THRESHOLD2                TEXT("RTSThreshold2")
-#define PARM_RTS_THRESHOLD3                     RTSThreshold3
-#define PARM_NAME_RTS_THRESHOLD3                TEXT("RTSThreshold3")
-#define PARM_RTS_THRESHOLD4                     RTSThreshold4
-#define PARM_NAME_RTS_THRESHOLD4                TEXT("RTSThreshold4")
-#define PARM_RTS_THRESHOLD5                     RTSThreshold5
-#define PARM_NAME_RTS_THRESHOLD5                TEXT("RTSThreshold5")
-#define PARM_RTS_THRESHOLD6                     RTSThreshold6
-#define PARM_NAME_RTS_THRESHOLD6                TEXT("RTSThreshold6")
-
-#define PARM_SRSC_2GHZ                          SRSC2GHz
-#define PARM_NAME_SRSC_2GHZ                     TEXT("SRSC2GHz")
-#define PARM_MIN_SRSC                           0x0000
-#define PARM_MAX_SRSC                           0x0FFF
-#define PARM_DEFAULT_SRSC_2GHZ                  0x0FFF
-
-#define PARM_SRSC_5GHZ                          SRSC5GHz
-#define PARM_NAME_SRSC_5GHZ                     TEXT("SRSC5GHz")
-#define PARM_DEFAULT_SRSC_5GHZ                  0x0FF0
-
-#define PARM_SYSTEM_SCALE                       SystemScale
-#define PARM_NAME_SYSTEM_SCALE                  TEXT("SystemScale")
-#define PARM_MIN_SYSTEM_SCALE                   1
-#define PARM_MAX_SYSTEM_SCALE                   5
-#define PARM_DEFAULT_SYSTEM_SCALE               1
-
-#define PARM_TX_KEY                             TxKey
-#define PARM_NAME_TX_KEY                        TEXT("TxKey")
-#define PARM_MIN_TX_KEY                         1
-#define PARM_MAX_TX_KEY                         4
-#define PARM_DEFAULT_TX_KEY                     1
-
-#define PARM_TX_POW_LEVEL                       TxPowLevel
-#define PARM_NAME_TX_POW_LEVEL                  TEXT("TxPowLevel")
-#define PARM_MIN_TX_POW_LEVEL                   1   // 20 dBm
-#define PARM_MAX_TX_POW_LEVEL                   6   //  8 dBm
-#define PARM_DEFAULT_TX_POW_LEVEL               3   // 15 dBm
-
-#define PARM_TX_RATE                            TxRateControl
-#define PARM_NAME_TX_RATE                       TEXT("TxRateControl")
-#define PARM_MIN_TX_RATE                        0x0001
-#ifdef WARP
-#define PARM_MAX_TX_RATE                        0x0FFF
-#define PARM_DEFAULT_TX_RATE_2GHZ               0x0FFF
-#define PARM_DEFAULT_TX_RATE_5GHZ               0x0FF0
-#else
-#define PARM_MAX_TX_RATE                        0x0007
-#define PARM_DEFAULT_TX_RATE_2GHZ               0x0003
-#define PARM_DEFAULT_TX_RATE_5GHZ               0x0000
-#endif  // WARP
-
-#define PARM_TX_RATE1                           TxRateControl1
-#define PARM_NAME_TX_RATE1                      TEXT("TxRateControl1")
-#define PARM_TX_RATE2                           TxRateControl2
-#define PARM_NAME_TX_RATE2                      TEXT("TxRateControl2")
-#define PARM_TX_RATE3                           TxRateControl3
-#define PARM_NAME_TX_RATE3                      TEXT("TxRateControl3")
-#define PARM_TX_RATE4                           TxRateControl4
-#define PARM_NAME_TX_RATE4                      TEXT("TxRateControl4")
-#define PARM_TX_RATE5                           TxRateControl5
-#define PARM_NAME_TX_RATE5                      TEXT("TxRateControl5")
-#define PARM_TX_RATE6                           TxRateControl6
-#define PARM_NAME_TX_RATE6                      TEXT("TxRateControl6")
-
-#define PARM_VENDORDESCRIPTION                  VendorDescription
-#define PARM_NAME_VENDORDESCRIPTION                            TEXT("VendorDescription")
-
-#define PARM_WDS_ADDRESS                        WDSAddress
-#define PARM_NAME_WDS_ADDRESS                                  TEXT("WDSAddress")
-
-#define PARM_WDS_ADDRESS1                       WDSAddress1
-#define PARM_NAME_WDS_ADDRESS1                                 TEXT("WDSAddress1")
-#define PARM_WDS_ADDRESS2                       WDSAddress2
-#define PARM_NAME_WDS_ADDRESS2                                 TEXT("WDSAddress2")
-#define PARM_WDS_ADDRESS3                       WDSAddress3
-#define PARM_NAME_WDS_ADDRESS3                                 TEXT("WDSAddress3")
-#define PARM_WDS_ADDRESS4                       WDSAddress4
-#define PARM_NAME_WDS_ADDRESS4                                 TEXT("WDSAddress4")
-#define PARM_WDS_ADDRESS5                       WDSAddress5
-#define PARM_NAME_WDS_ADDRESS5                                 TEXT("WDSAddress5")
-#define PARM_WDS_ADDRESS6                       WDSAddress6
-#define PARM_NAME_WDS_ADDRESS6                                 TEXT("WDSAddress6")
-
-/*
-#define PARM_LONG_RETRY_LIMIT                   LongRetryLimit
-#define PARM_NAME_LONG_RETRY_LIMIT              TEXT("LongRetryLimit")
-#define PARM_MIN_LONG_RETRY_LIMIT               1
-#define PARM_MAX_LONG_RETRY_LIMIT               15
-#define PARM_DEFAULT_LONG_RETRY_LIMIT           3
-
-
-#define PARM_PROBE_DATA_RATES                   ProbeDataRates
-#define PARM_NAME_PROBE_DATA_RATES              TEXT("ProbeDataRates")
-#define PARM_MIN_PROBE_DATA_RATES               0x0000
-#define PARM_MAX_PROBE_DATA_RATES               0x0FFF
-#define PARM_DEFAULT_PROBE_DATA_RATES_2GHZ      0x0002
-#define PARM_DEFAULT_PROBE_DATA_RATES_5GHZ      0x0010
-
-#define PARM_SHORT_RETRY_LIMIT                  ShortRetryLimit
-#define PARM_NAME_SHORT_RETRY_LIMIT             TEXT("ShortRetryLimit")
-#define PARM_MIN_SHORT_RETRY_LIMIT              1
-#define PARM_MAX_SHORT_RETRY_LIMIT              15
-#define PARM_DEFAULT_SHORT_RETRY_LIMIT          7
-
-
-*/
-
-/*******************************************************************************
- *  state definitions
- ******************************************************************************/
-/* The following constants are used to track state the device */
-#define WL_FRIMWARE_PRESENT     1 // Download if needed
-#define WL_FRIMWARE_NOT_PRESENT        0 // Skip over download, assume its already there
-#define WL_HANDLING_INT         1 // Actually call the HCF to switch interrupts on/off
-#define WL_NOT_HANDLING_INT     0 // Not yet handling interrupts, do not switch on/off
-
-/*******************************************************************************
- *  macro definitions
- ******************************************************************************/
-/* The following macro ensures that no symbols are exported, minimizing the
-   chance of a symbol collision in the kernel */
-// EXPORT_NO_SYMBOLS;
-
-#define NELEM(arr) (sizeof(arr) / sizeof(arr[0]))
-
-#define WVLAN_VALID_MAC_ADDRESS( x ) \
-((x[0]!=0xFF) && (x[1]!=0xFF) && (x[2]!=0xFF) && (x[3]!=0xFF) && (x[4]!=0xFF) && (x[5]!=0xFF))
-
-
-
-
-/*******************************************************************************
- * type definitions
- ******************************************************************************/
-#undef FALSE
-#undef TRUE
-
-typedef enum
-{
-       FALSE = 0,
-       TRUE  = 1
-}
-bool_t;
-
-
-typedef struct _ScanResult
-{
-       //hcf_16        len;
-       //hcf_16        typ;
-       int             scan_complete;
-       int             num_aps;
-       SCAN_RS_STRCT   APTable [MAX_NAPS];
-}
-ScanResult;
-
-
-typedef struct _LINK_STATUS_STRCT
-{
-       hcf_16  len;
-       hcf_16  typ;
-       hcf_16  linkStatus;     /* 1..5 */
-}
-LINK_STATUS_STRCT;
-
-
-typedef struct _ASSOC_STATUS_STRCT
-{
-       hcf_16  len;
-       hcf_16  typ;
-       hcf_16  assocStatus;            /* 1..3 */
-       hcf_8   staAddr[ETH_ALEN];
-       hcf_8   oldApAddr[ETH_ALEN];
-}
-ASSOC_STATUS_STRCT;
-
-
-typedef struct _SECURITY_STATUS_STRCT
-{
-       hcf_16  len;
-       hcf_16  typ;
-       hcf_16  securityStatus;     /* 1..3 */
-       hcf_8   staAddr[ETH_ALEN];
-       hcf_16  reason;
-}
-SECURITY_STATUS_STRCT;
-
-#define WVLAN_WMP_PDU_TYPE_LT_REQ       0x00
-#define WVLAN_WMP_PDU_TYPE_LT_RSP       0x01
-#define WVLAN_WMP_PDU_TYPE_APL_REQ      0x02
-#define WVLAN_WMP_PDU_TYPE_APL_RSP      0x03
-
-typedef struct wvlan_eth_hdr
-{
-       unsigned char   dst[ETH_ALEN];           /* Destination address. */
-       unsigned char   src[ETH_ALEN];           /* Source address. */
-       unsigned short  len;                    /* Length of the PDU. */
-}
-WVLAN_ETH_HDR, *PWVLAN_ETH_HDR;
-
-typedef struct wvlan_llc_snap
-{
-       unsigned char   dsap;                   /* DSAP (0xAA) */
-       unsigned char   ssap;                   /* SSAP (0xAA) */
-       unsigned char   ctrl;                   /* Control (0x03) */
-       unsigned char   oui[3];                 /* Organization Unique ID (00-60-1d). */
-       unsigned char   specid[2];              /* Specific ID code (00-01). */
-}
-WVLAN_LLC_SNAP, *PWVLAN_LLC_SNAP;
-
-
-typedef struct wvlan_lt_hdr
-{
-       unsigned char   version;                /* Version (0x00) */
-       unsigned char   type;                   /* PDU type: 0-req/1-resp. */
-       unsigned short  id;                     /* Identifier to associate resp to req. */
-}
-WVLAN_LT_HDR, *PWVLAN_LT_HDR;
-
-
-typedef struct wvlan_wmp_hdr
-{
-       unsigned char   version;                /* Version  */
-       unsigned char   type;                   /* PDU type */
-}
-WVLAN_WMP_HDR, *PWVLAN_WMP_HDR;
-
-
-#define FILLER_SIZE             1554
-#define TEST_PATTERN_SIZE       54
-
-
-typedef struct wvlan_lt_req
-{
-       unsigned char   Filler[TEST_PATTERN_SIZE];   /* minimal length of 54 bytes */
-}
-WVLAN_LT_REQ, *PWVLAN_LT_REQ;
-
-
-typedef struct wvlan_lt_rsp
-{
-       char           name[32];
-       /* Measured Data */
-       unsigned char  signal;
-       unsigned char  noise;
-       unsigned char  rxFlow;
-       unsigned char  dataRate;
-       unsigned short protocol;
-       /* Capabilities */
-       unsigned char  station;
-       unsigned char  dataRateCap;
-       unsigned char  powerMgmt[4];
-       unsigned char  robustness[4];
-       unsigned char  scaling;
-       unsigned char  reserved[5];
-}
-WVLAN_LT_RSP, *PWVLAN_LT_RSP;
-
-
-typedef struct wvlan_rx_wmp_hdr
-{
-       unsigned short status;
-       unsigned short reserved1[2];
-       unsigned char  silence;
-       unsigned char  signal;
-       unsigned char  rate;
-       unsigned char  rxFlow;
-       unsigned short reserved2[2];
-       unsigned short frameControl;
-       unsigned short duration;
-       unsigned short address1[3];
-       unsigned short address2[3];
-       unsigned short address3[3];
-       unsigned short sequenceControl;
-       unsigned short address4[3];
-#ifndef HERMES25       //;?just to be on the safe side of inherited but not comprehended code #ifdef HERMES2
-       unsigned short seems_to_be_unused_reserved3[5];  //;?
-       unsigned short seems_to_be_unused_reserved4;     //;?
-#endif // HERMES25
-       unsigned short HeaderDataLen;
-}
-WVLAN_RX_WMP_HDR, *PWVLAN_RX_WMP_HDR;
-
-
-typedef struct wvlan_linktest_req_pdu
-{
-       WVLAN_ETH_HDR     ethHdr;
-       WVLAN_LLC_SNAP    llcSnap;
-       WVLAN_LT_HDR      ltHdr;
-       WVLAN_LT_REQ      ltReq;
-}
-WVLAN_LINKTEST_REQ_PDU, *PWVLAN_LINKTEST_REQ_PDU;
-
-
-typedef struct wvlan_linktest_rsp_pdu
-{
-       WVLAN_RX_WMP_HDR  wmpRxHdr;
-       WVLAN_ETH_HDR     ethHdr;
-       WVLAN_LLC_SNAP    llcSnap;
-       WVLAN_LT_HDR      ltHdr;
-       WVLAN_LT_RSP      ltRsp;
-}
-WVLAN_LINKTEST_RSP_PDU, *PWVLAN_LINKTEST_RSP_PDU;
-
-
-typedef struct _LINKTEST_RSP_STRCT
-{
-       hcf_16                   len;
-       hcf_16                   typ;
-       WVLAN_LINKTEST_RSP_PDU   ltRsp;
-}
-LINKTEST_RSP_STRCT;
-
-
-typedef struct wvlan_wmp_rsp_pdu
-{
-       WVLAN_RX_WMP_HDR  wmpRxHdr;
-       WVLAN_ETH_HDR     ethHdr;
-       WVLAN_LLC_SNAP    llcSnap;
-       WVLAN_WMP_HDR     wmpHdr;
-}
-WVLAN_WMP_RSP_PDU, *PWVLAN_WMP_RSP_PDU;
-
-
-typedef struct _WMP_RSP_STRCT
-{
-       hcf_16              len;
-       hcf_16              typ;
-       WVLAN_WMP_RSP_PDU   wmpRsp;
-}
-WMP_RSP_STRCT;
-
-
-typedef struct _PROBE_RESP
-{
-       // first part: 802.11
-       hcf_16  length;
-       hcf_16  infoType;
-       hcf_16  reserved0;
-       //hcf_8 signal;
-       hcf_8   silence;
-       hcf_8   signal;     // Moved signal here as signal/noise values were flipped
-       hcf_8   rxFlow;
-       hcf_8   rate;
-       hcf_16  reserved1[2];
-
-       // second part:
-       hcf_16  frameControl;
-       hcf_16  durID;
-       hcf_8   address1[6];
-       hcf_8   address2[6];
-       hcf_8   BSSID[6];                                       //! this is correct, right ?
-       hcf_16  sequence;
-       hcf_8   address4[6];
-
-#ifndef WARP
-       hcf_8   reserved2[12];
-#endif // WARP
-
-       hcf_16  dataLength;
-                                                                               // the information in the next 3 fields (DA/SA/LenType) is actually not filled in.
-       hcf_8   DA[6];
-       hcf_8   SA[6];
-
-#ifdef WARP
-       hcf_8   channel;
-       hcf_8   band;
-#else
-       hcf_16  lenType;
-#endif  // WARP
-
-       hcf_8   timeStamp[8];
-       hcf_16  beaconInterval;
-       hcf_16  capability;
-       hcf_8   rawData[200];                           //! <<< think about this number !
-       hcf_16  flags;
-}
-PROBE_RESP, *PPROBE_RESP;
-
-
-typedef struct _ProbeResult
-{
-       int         scan_complete;
-       int         num_aps;
-       PROBE_RESP  ProbeTable[MAX_NAPS];
-}
-ProbeResult;
-
-/* Definitions used to parse capabilities out of the probe responses */
-#define CAPABILITY_ESS      0x0001
-#define CAPABILITY_IBSS     0x0002
-#define CAPABILITY_PRIVACY  0x0010
-
-/* Definitions used to parse the Information Elements out of probe responses */
-#define DS_INFO_ELEM                        0x03
-#define GENERIC_INFO_ELEM                   0xdd
-#define WPA_MAX_IE_LEN                      40
-#define WPA_SELECTOR_LEN                    4
-#define WPA_OUI_TYPE                        { 0x00, 0x50, 0xf2, 1 }
-#define WPA_VERSION                         1
-#define WPA_AUTH_KEY_MGMT_UNSPEC_802_1X     { 0x00, 0x50, 0xf2, 1 }
-#define WPA_AUTH_KEY_MGMT_PSK_OVER_802_1X   { 0x00, 0x50, 0xf2, 2 }
-#define WPA_CIPHER_SUITE_NONE               { 0x00, 0x50, 0xf2, 0 }
-#define WPA_CIPHER_SUITE_WEP40              { 0x00, 0x50, 0xf2, 1 }
-#define WPA_CIPHER_SUITE_TKIP               { 0x00, 0x50, 0xf2, 2 }
-#define WPA_CIPHER_SUITE_WRAP               { 0x00, 0x50, 0xf2, 3 }
-#define WPA_CIPHER_SUITE_CCMP               { 0x00, 0x50, 0xf2, 4 }
-#define WPA_CIPHER_SUITE_WEP104             { 0x00, 0x50, 0xf2, 5 }
-
-typedef enum wvlan_drv_mode
-{
-       WVLAN_DRV_MODE_NO_DOWNLOAD,     /* this is the same as STA for Hermes 1    */
-                                                   /* it is also only applicable for Hermes 1 */
-       WVLAN_DRV_MODE_STA,
-       WVLAN_DRV_MODE_AP,
-       WVLAN_DRV_MODE_MAX
-}
-WVLAN_DRV_MODE, *PWVLAN_DRV_MODE;
-
-
-typedef enum wvlan_port_state
-{
-       WVLAN_PORT_STATE_ENABLED,
-       WVLAN_PORT_STATE_DISABLED,
-       WVLAN_PORT_STATE_CONNECTED
-}
-WVLAN_PORT_STATE, *PWVLAN_PORT_STATE;
-
-/*
-typedef enum wvlan_connect_state
-{
-       WVLAN_CONNECT_STATE_CONNECTED,
-       WVLAN_CONNECT_STATE_DISCONNECTED
-}
-WVLAN_CONNECT_STATE, *PWVLAN_CONNECT_STATE;
-*/
-
-typedef enum wvlan_pm_state
-{
-       WVLAN_PM_STATE_DISABLED,
-       WVLAN_PM_STATE_ENHANCED,
-       WVLAN_PM_STATE_STANDARD
-}
-WVLAN_PM_STATE, *PWVLAN_PM_STATE;
-
-
-typedef struct wvlan_frame
-{
-       struct sk_buff  *skb;       /* sk_buff for frame. */
-       hcf_16          port;       /* MAC port for the frame. */
-       hcf_16          len;        /* Length of the frame. */
-}
-WVLAN_FRAME, *PWVLAN_FRAME;
-
-
-typedef struct wvlan_lframe
-{
-       struct list_head    node;   /* Node in the list */
-       WVLAN_FRAME             frame;  /* Frame. */
-}
-WVLAN_LFRAME, *PWVLAN_LFRAME;
-
-
-
-#define DEFAULT_NUM_TX_FRAMES           48
-#define TX_Q_LOW_WATER_MARK             (DEFAULT_NUM_TX_FRAMES/3)
-
-#define WVLAN_MAX_TX_QUEUES             1
-
-
-#ifdef USE_WDS
-
-typedef struct wvlan_wds_if
-{
-       struct net_device           *dev;
-       int                         is_registered;
-       int                         netif_queue_on;
-       struct net_device_stats     stats;
-       hcf_16                      rtsThreshold;
-       hcf_16                      txRateCntl;
-       hcf_8                       wdsAddress[ETH_ALEN];
-} WVLAN_WDS_IF, *PWVLAN_WDS_IF;
-
-#endif  // USE_WDS
-
-
-
-#define NUM_RX_DESC 5
-#define NUM_TX_DESC 5
-
-typedef struct dma_strct
-{
-       DESC_STRCT  *tx_packet[NUM_TX_DESC];
-       DESC_STRCT  *rx_packet[NUM_RX_DESC];
-       DESC_STRCT  *rx_reclaim_desc, *tx_reclaim_desc; // Descriptors for host-reclaim purposes (see HCF)
-       int         tx_rsc_ind; // DMA Tx resource indicator is maintained in the MSF, not in the HCF
-       int         rx_rsc_ind; // Also added rx resource indicator so that cleanup can be performed if alloc fails
-       int         status;
-} DMA_STRCT;
-
-
-/* Macros used in DMA support */
-/* get bus address of {rx,tx}dma structure member, in little-endian byte order */
-#define WL_DMA_BUS_ADDR_LE(str, i, mem) \
-       cpu_to_le32(str##_dma_addr[(i)] + ((hcf_8 *)&str[(i)]->mem - (hcf_8 *)str[(i)]))
-
-
-struct wl_private
-{
-
-#ifdef BUS_PCMCIA
-       struct pcmcia_device        *link;
-#endif // BUS_PCMCIA
-
-
-       struct net_device           *dev;
-//     struct net_device           *dev_next;
-       spinlock_t                  slock;
-       struct tasklet_struct       task;
-       struct net_device_stats     stats;
-
-
-#ifdef WIRELESS_EXT
-       struct iw_statistics        wstats;
-//     int                         spy_number;
-//     u_char                      spy_address[IW_MAX_SPY][ETH_ALEN];
-//     struct iw_quality           spy_stat[IW_MAX_SPY];
-       struct iw_spy_data          spy_data;
-       struct iw_public_data   wireless_data;
-#endif // WIRELESS_EXT
-
-
-       IFB_STRCT                   hcfCtx;
-//;? struct timer_list                 timer_oor;
-//;? hcf_16                                            timer_oor_cnt;
-       u_long                                          wlags49_type;           //controls output in /proc/wlags49
-       u_long                      flags;
-       hcf_16                                          DebugFlag;
-       int                         is_registered;
-       int                         is_handling_int;
-       int                         firmware_present;
-       CFG_DRV_INFO_STRCT          driverInfo;
-       CFG_IDENTITY_STRCT          driverIdentity;
-       CFG_FW_IDENTITY_STRCT       StationIdentity;
-       CFG_PRI_IDENTITY_STRCT      PrimaryIdentity;
-       CFG_PRI_IDENTITY_STRCT      NICIdentity;
-
-       ltv_t                       ltvRecord;
-       u_long                      txBytes;
-       hcf_16                      maxPort;        /* 0 for STA, 6 for AP */
-
-       /* Elements used for async notification from hardware */
-       RID_LOG_STRCT                           RidList[10];
-       ltv_t                       updatedRecord;
-       PROBE_RESP                                  ProbeResp;
-       ASSOC_STATUS_STRCT          assoc_stat;
-       SECURITY_STATUS_STRCT       sec_stat;
-
-       u_char                      lookAheadBuf[WVLAN_MAX_LOOKAHEAD];
-
-       hcf_8                       PortType;           // 1 - 3 (1 [Normal] | 3 [AdHoc])
-       hcf_16                      Channel;            // 0 - 14 (0)
-       hcf_16                      TxRateControl[2];
-       hcf_8                       DistanceBetweenAPs; // 1 - 3 (1)
-       hcf_16                      RTSThreshold;       // 0 - 2347 (2347)
-       hcf_16                      PMEnabled;          // 0 - 2, 8001 - 8002 (0)
-       hcf_8                       MicrowaveRobustness;// 0 - 1 (0)
-       hcf_8                       CreateIBSS;         // 0 - 1 (0)
-       hcf_8                       MulticastReceive;   // 0 - 1 (1)
-       hcf_16                      MaxSleepDuration;   // 0 - 65535 (100)
-       hcf_8                       MACAddress[ETH_ALEN];
-       char                        NetworkName[HCF_MAX_NAME_LEN+1];
-       char                        StationName[HCF_MAX_NAME_LEN+1];
-       hcf_8                       EnableEncryption;   // 0 - 1 (0)
-       char                        Key1[MAX_KEY_LEN+1];
-       char                        Key2[MAX_KEY_LEN+1];
-       char                        Key3[MAX_KEY_LEN+1];
-       char                        Key4[MAX_KEY_LEN+1];
-       hcf_8                       TransmitKeyID;      // 1 - 4 (1)
-       CFG_DEFAULT_KEYS_STRCT      DefaultKeys;
-       u_char                      mailbox[MB_SIZE];
-       char                        szEncryption[MAX_ENC_LEN];
-
-       hcf_16                      driverEnable;
-       hcf_16                      wolasEnable;
-       hcf_16                      atimWindow;
-       hcf_16                      holdoverDuration;
-       hcf_16                      MulticastRate[2];
-
-       hcf_16                      authentication; // is this AP specific?
-       hcf_16                      promiscuousMode;
-       WVLAN_DRV_MODE              DownloadFirmware;   // 0 - 2 (0 [None] | 1 [STA] | 2 [AP])
-
-       char                                            fw_image_filename[MAX_LINE_SIZE+1];
-
-       hcf_16                      AuthKeyMgmtSuite;
-
-       hcf_16                      loadBalancing;
-       hcf_16                      mediumDistribution;
-       hcf_16                      txPowLevel;
-       //hcf_16                      shortRetryLimit;
-       //hcf_16                      longRetryLimit;
-       hcf_16                      srsc[2];
-       hcf_16                      brsc[2];
-       hcf_16                      connectionControl;
-       //hcf_16                      probeDataRates[2];
-       hcf_16                      ownBeaconInterval;
-       hcf_16                      coexistence;
-
-       WVLAN_FRAME                 txF;
-       WVLAN_LFRAME                txList[DEFAULT_NUM_TX_FRAMES];
-       struct list_head            txFree;
-       struct list_head            txQ[WVLAN_MAX_TX_QUEUES];
-       int                         netif_queue_on;
-       int                         txQ_count;
-       DESC_STRCT                  desc_rx;
-       DESC_STRCT                  desc_tx;
-
-       WVLAN_PORT_STATE            portState;
-
-       ScanResult                  scan_results;
-       ProbeResult                 probe_results;
-       int                         probe_num_aps;
-
-       int                         use_dma;
-       DMA_STRCT                   dma;
-#ifdef USE_RTS
-       int                         useRTS;
-#endif  // USE_RTS
-       hcf_8                       DTIMPeriod;         // 1 - 255 (1)
-       hcf_16                      multicastPMBuffering;
-       hcf_8                       RejectAny;          // 0 - 1 (0)
-       hcf_8                       ExcludeUnencrypted; // 0 - 1 (1)
-       hcf_16                      intraBSSRelay;
-#ifdef USE_WDS
-       WVLAN_WDS_IF                wds_port[NUM_WDS_PORTS];
-#endif // USE_WDS
-
-       /* Track whether the card is using WEP encryption or WPA
-        * so we know what to disable next time through.
-        *  IW_ENCODE_ALG_NONE, IW_ENCODE_ALG_WEP, IW_ENCODE_ALG_TKIP
-        */
-       int wext_enc;
-}; // wl_private
-
-#define wl_priv(dev) ((struct wl_private *) netdev_priv(dev))
-
-/********************************************************************/
-/* Locking and synchronization functions                            */
-/********************************************************************/
-
-/* These functions *must* be inline or they will break horribly on
- * SPARC, due to its weird semantics for save/restore flags. extern
- * inline should prevent the kernel from linking or module from
- * loading if they are not inlined. */
-static inline void wl_lock(struct wl_private *lp,
-                              unsigned long *flags)
-{
-       spin_lock_irqsave(&lp->slock, *flags);
-}
-
-static inline void wl_unlock(struct wl_private *lp,
-                                 unsigned long *flags)
-{
-       spin_unlock_irqrestore(&lp->slock, *flags);
-}
-
-/********************************************************************/
-/* Interrupt enable disable functions                               */
-/********************************************************************/
-
-extern inline void wl_act_int_on(struct wl_private *lp)
-{
-       /*
-        * Only do something when the driver is handling
-        * interrupts. Handling starts at wl_open and
-        * ends at wl_close when not in RTS mode
-        */
-       if(lp->is_handling_int == WL_HANDLING_INT) {
-               hcf_action( &lp->hcfCtx, HCF_ACT_INT_ON );
-       }
-}
-
-extern inline void wl_act_int_off(struct wl_private *lp)
-{
-       /*
-        * Only do something when the driver is handling
-        * interrupts. Handling starts at wl_open and
-        * ends at wl_close when not in RTS mode
-        */
-       if(lp->is_handling_int == WL_HANDLING_INT) {
-               hcf_action( &lp->hcfCtx, HCF_ACT_INT_OFF );
-       }
-}
-
-#endif  // __WAVELAN2_H__
diff --git a/drivers/staging/wlags49_h2/wl_main.c b/drivers/staging/wlags49_h2/wl_main.c
deleted file mode 100644 (file)
index fc98b6d..0000000
+++ /dev/null
@@ -1,3702 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file contains the main driver entry points and other adapter
- *   specific routines.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- *  constant definitions
- ******************************************************************************/
-
-/* Allow support for calling system fcns to access F/W image file */
-#define __KERNEL_SYSCALLS__
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/module.h>
-#include <linux/proc_fs.h>
-#include <linux/seq_file.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/unistd.h>
-#include <linux/uaccess.h>
-
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-
-#define BIN_DL 0
-#if BIN_DL
-#include <linux/vmalloc.h>
-#endif /* BIN_DL */
-
-
-#include <debug.h>
-
-#include <hcf.h>
-#include <dhf.h>
-/* in order to get around:: wl_main.c:2229: `HREG_EV_RDMAD' undeclared (first use in this function) */
-#include <hcfdef.h>
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_util.h>
-#include <wl_main.h>
-#include <wl_netdev.h>
-#include <wl_wext.h>
-
-#ifdef USE_PROFILE
-#include <wl_profile.h>
-#endif  /* USE_PROFILE */
-
-#ifdef BUS_PCMCIA
-#include <wl_cs.h>
-#endif  /* BUS_PCMCIA */
-
-#ifdef BUS_PCI
-#include <wl_pci.h>
-#endif  /* BUS_PCI */
-/*******************************************************************************
- *     macro definitions
- ******************************************************************************/
-#define VALID_PARAM(C) \
-       { \
-               if (!(C)) { \
-                       printk(KERN_INFO "Wireless, parameter error: \"%s\"\n", #C); \
-                       goto failed; \
-               } \
-       }
-/*******************************************************************************
- *     local functions
- ******************************************************************************/
-void wl_isr_handler(unsigned long p);
-
-#if 0 //SCULL_USE_PROC /* don't waste space if unused */
-static int scull_read_procmem(struct seq_file *m, void *v);
-static int write_int(struct file *file, const char *buffer, unsigned long count, void *data);
-
-/*
- * seq_file wrappers for procfile show routines.
- */
-static int scull_read_procmem_open(struct inode *inode, struct file *file)
-{
-       return single_open(file, scull_read_procmem, PDE_DATA(inode));
-}
-
-static const struct file_operations scull_read_procmem_fops = {
-       .open           = scull_read_procmem_open,
-       .read           = seq_read,
-       .llseek         = seq_lseek,
-       .release        = single_release,
-};
-
-#endif /* SCULL_USE_PROC */
-
-/*******************************************************************************
- * module parameter definitions - set with 'insmod'
- ******************************************************************************/
-static p_u16    irq_mask                = 0xdeb8; /* IRQ3,4,5,7,9,10,11,12,14,15 */
-static p_s8     irq_list[4]             = { -1 };
-
-#if 0
-MODULE_PARM(irq_mask,               "h");
-MODULE_PARM_DESC(irq_mask,               "IRQ mask [0xdeb8]");
-MODULE_PARM(irq_list,               "1-4b");
-MODULE_PARM_DESC(irq_list,               "IRQ list [<irq_mask>]");
-#endif
-
-static p_u8     PARM_AUTHENTICATION            = PARM_DEFAULT_AUTHENTICATION;
-static p_u16    PARM_AUTH_KEY_MGMT_SUITE       = PARM_DEFAULT_AUTH_KEY_MGMT_SUITE;
-static p_u16    PARM_BRSC_2GHZ                 = PARM_DEFAULT_BRSC_2GHZ;
-static p_u16    PARM_BRSC_5GHZ                 = PARM_DEFAULT_BRSC_5GHZ;
-static p_u16    PARM_COEXISTENCE               = PARM_DEFAULT_COEXISTENCE;
-static p_u16    PARM_CONNECTION_CONTROL        = PARM_DEFAULT_CONNECTION_CONTROL;  /* ;?rename and move */
-static p_char  *PARM_CREATE_IBSS               = PARM_DEFAULT_CREATE_IBSS_STR;
-static p_char  *PARM_DESIRED_SSID              = PARM_DEFAULT_SSID;
-static p_char  *PARM_DOWNLOAD_FIRMWARE      = "";
-static p_u16    PARM_ENABLE_ENCRYPTION         = PARM_DEFAULT_ENABLE_ENCRYPTION;
-static p_char  *PARM_EXCLUDE_UNENCRYPTED       = PARM_DEFAULT_EXCLUDE_UNENCRYPTED_STR;
-static p_char  *PARM_INTRA_BSS_RELAY           = PARM_DEFAULT_INTRA_BSS_RELAY_STR;
-static p_char  *PARM_KEY1                      = "";
-static p_char  *PARM_KEY2                      = "";
-static p_char  *PARM_KEY3                      = "";
-static p_char  *PARM_KEY4                      = "";
-static p_char  *PARM_LOAD_BALANCING            = PARM_DEFAULT_LOAD_BALANCING_STR;
-static p_u16    PARM_MAX_SLEEP                 = PARM_DEFAULT_MAX_PM_SLEEP;
-static p_char  *PARM_MEDIUM_DISTRIBUTION       = PARM_DEFAULT_MEDIUM_DISTRIBUTION_STR;
-static p_char  *PARM_MICROWAVE_ROBUSTNESS      = PARM_DEFAULT_MICROWAVE_ROBUSTNESS_STR;
-static p_char  *PARM_MULTICAST_PM_BUFFERING    = PARM_DEFAULT_MULTICAST_PM_BUFFERING_STR;
-static p_u16    PARM_MULTICAST_RATE            = PARM_DEFAULT_MULTICAST_RATE_2GHZ;
-static p_char  *PARM_MULTICAST_RX              = PARM_DEFAULT_MULTICAST_RX_STR;
-static p_u8     PARM_NETWORK_ADDR[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-static p_u16    PARM_OWN_ATIM_WINDOW           = PARM_DEFAULT_OWN_ATIM_WINDOW;
-static p_u16    PARM_OWN_BEACON_INTERVAL       = PARM_DEFAULT_OWN_BEACON_INTERVAL;
-static p_u8     PARM_OWN_CHANNEL               = PARM_DEFAULT_OWN_CHANNEL;
-static p_u8     PARM_OWN_DTIM_PERIOD           = PARM_DEFAULT_OWN_DTIM_PERIOD;
-static p_char  *PARM_OWN_NAME                  = PARM_DEFAULT_OWN_NAME;
-static p_char  *PARM_OWN_SSID                  = PARM_DEFAULT_SSID;
-static p_u16   PARM_PM_ENABLED                 = WVLAN_PM_STATE_DISABLED;
-static p_u16    PARM_PM_HOLDOVER_DURATION      = PARM_DEFAULT_PM_HOLDOVER_DURATION;
-static p_u8     PARM_PORT_TYPE                 = PARM_DEFAULT_PORT_TYPE;
-static p_char  *PARM_PROMISCUOUS_MODE          = PARM_DEFAULT_PROMISCUOUS_MODE_STR;
-static p_char  *PARM_REJECT_ANY                = PARM_DEFAULT_REJECT_ANY_STR;
-#ifdef USE_WDS
-static p_u16    PARM_RTS_THRESHOLD1            = PARM_DEFAULT_RTS_THRESHOLD;
-static p_u16    PARM_RTS_THRESHOLD2            = PARM_DEFAULT_RTS_THRESHOLD;
-static p_u16    PARM_RTS_THRESHOLD3            = PARM_DEFAULT_RTS_THRESHOLD;
-static p_u16    PARM_RTS_THRESHOLD4            = PARM_DEFAULT_RTS_THRESHOLD;
-static p_u16    PARM_RTS_THRESHOLD5            = PARM_DEFAULT_RTS_THRESHOLD;
-static p_u16    PARM_RTS_THRESHOLD6            = PARM_DEFAULT_RTS_THRESHOLD;
-#endif /* USE_WDS */
-static p_u16    PARM_RTS_THRESHOLD             = PARM_DEFAULT_RTS_THRESHOLD;
-static p_u16    PARM_SRSC_2GHZ                 = PARM_DEFAULT_SRSC_2GHZ;
-static p_u16    PARM_SRSC_5GHZ                 = PARM_DEFAULT_SRSC_5GHZ;
-static p_u8     PARM_SYSTEM_SCALE              = PARM_DEFAULT_SYSTEM_SCALE;
-static p_u8     PARM_TX_KEY                    = PARM_DEFAULT_TX_KEY;
-static p_u16    PARM_TX_POW_LEVEL              = PARM_DEFAULT_TX_POW_LEVEL;
-#ifdef USE_WDS
-static p_u16    PARM_TX_RATE1                  = PARM_DEFAULT_TX_RATE_2GHZ;
-static p_u16    PARM_TX_RATE2                  = PARM_DEFAULT_TX_RATE_2GHZ;
-static p_u16    PARM_TX_RATE3                  = PARM_DEFAULT_TX_RATE_2GHZ;
-static p_u16    PARM_TX_RATE4                  = PARM_DEFAULT_TX_RATE_2GHZ;
-static p_u16    PARM_TX_RATE5                  = PARM_DEFAULT_TX_RATE_2GHZ;
-static p_u16    PARM_TX_RATE6                  = PARM_DEFAULT_TX_RATE_2GHZ;
-#endif /* USE_WDS */
-static p_u16    PARM_TX_RATE                   = PARM_DEFAULT_TX_RATE_2GHZ;
-#ifdef USE_WDS
-static p_u8     PARM_WDS_ADDRESS1[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-static p_u8     PARM_WDS_ADDRESS2[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-static p_u8     PARM_WDS_ADDRESS3[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-static p_u8     PARM_WDS_ADDRESS4[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-static p_u8     PARM_WDS_ADDRESS5[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-static p_u8     PARM_WDS_ADDRESS6[ETH_ALEN]    = PARM_DEFAULT_NETWORK_ADDR;
-#endif /* USE_WDS */
-
-
-#if 0
-MODULE_PARM(PARM_DESIRED_SSID,          "s");
-MODULE_PARM_DESC(PARM_DESIRED_SSID,             "Network Name (<string>) [ANY]");
-MODULE_PARM(PARM_OWN_SSID,              "s");
-MODULE_PARM_DESC(PARM_OWN_SSID,                 "Network Name (<string>) [ANY]");
-MODULE_PARM(PARM_OWN_CHANNEL,           "b");
-MODULE_PARM_DESC(PARM_OWN_CHANNEL,              "Channel (0 - 14) [0]");
-MODULE_PARM(PARM_SYSTEM_SCALE,          "b");
-MODULE_PARM_DESC(PARM_SYSTEM_SCALE,             "Distance Between APs (1 - 3) [1]");
-MODULE_PARM(PARM_TX_RATE,               "b");
-MODULE_PARM_DESC(PARM_TX_RATE,                  "Transmit Rate Control");
-MODULE_PARM(PARM_RTS_THRESHOLD,         "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD,            "Medium Reservation (RTS/CTS Fragment Length) (256 - 2347) [2347]");
-MODULE_PARM(PARM_MICROWAVE_ROBUSTNESS,  "s");
-MODULE_PARM_DESC(PARM_MICROWAVE_ROBUSTNESS,     "Microwave Oven Robustness Enabled (<string> N or Y) [N]");
-MODULE_PARM(PARM_OWN_NAME,              "s");
-MODULE_PARM_DESC(PARM_OWN_NAME,                 "Station Name (<string>) [Linux]");
-
-MODULE_PARM(PARM_ENABLE_ENCRYPTION,     "b");
-MODULE_PARM_DESC(PARM_ENABLE_ENCRYPTION,        "Encryption Mode (0 - 7) [0]");
-
-MODULE_PARM(PARM_KEY1,                  "s");
-MODULE_PARM_DESC(PARM_KEY1,                     "Data Encryption Key 1 (<string>) []");
-MODULE_PARM(PARM_KEY2,                  "s");
-MODULE_PARM_DESC(PARM_KEY2,                     "Data Encryption Key 2 (<string>) []");
-MODULE_PARM(PARM_KEY3,                  "s");
-MODULE_PARM_DESC(PARM_KEY3,                     "Data Encryption Key 3 (<string>) []");
-MODULE_PARM(PARM_KEY4,                  "s");
-MODULE_PARM_DESC(PARM_KEY4,                     "Data Encryption Key 4 (<string>) []");
-MODULE_PARM(PARM_TX_KEY,                "b");
-MODULE_PARM_DESC(PARM_TX_KEY,                   "Transmit Key ID (1 - 4) [1]");
-MODULE_PARM(PARM_MULTICAST_RATE,        "b");
-MODULE_PARM_DESC(PARM_MULTICAST_RATE,           "Multicast Rate");
-MODULE_PARM(PARM_DOWNLOAD_FIRMWARE,     "s");
-MODULE_PARM_DESC(PARM_DOWNLOAD_FIRMWARE,        "filename of firmware image");
-
-MODULE_PARM(PARM_AUTH_KEY_MGMT_SUITE,   "b");
-MODULE_PARM_DESC(PARM_AUTH_KEY_MGMT_SUITE,      "Authentication Key Management suite (0-4) [0]");
-
-MODULE_PARM(PARM_LOAD_BALANCING,        "s");
-MODULE_PARM_DESC(PARM_LOAD_BALANCING,           "Load Balancing Enabled (<string> N or Y) [Y]");
-MODULE_PARM(PARM_MEDIUM_DISTRIBUTION,   "s");
-MODULE_PARM_DESC(PARM_MEDIUM_DISTRIBUTION,      "Medium Distribution Enabled (<string> N or Y) [Y]");
-MODULE_PARM(PARM_TX_POW_LEVEL,          "b");
-MODULE_PARM_DESC(PARM_TX_POW_LEVEL,             "Transmit Power (0 - 6) [3]");
-MODULE_PARM(PARM_SRSC_2GHZ,             "b");
-MODULE_PARM_DESC(PARM_SRSC_2GHZ,                "Supported Rate Set Control 2.4 GHz");
-MODULE_PARM(PARM_SRSC_5GHZ,             "b");
-MODULE_PARM_DESC(PARM_SRSC_5GHZ,                "Supported Rate Set Control 5.0 GHz");
-MODULE_PARM(PARM_BRSC_2GHZ,             "b");
-MODULE_PARM_DESC(PARM_BRSC_2GHZ,                "Basic Rate Set Control 2.4 GHz");
-MODULE_PARM(PARM_BRSC_5GHZ,             "b");
-MODULE_PARM_DESC(PARM_BRSC_5GHZ,                "Basic Rate Set Control 5.0 GHz");
-#if 1 /* (HCF_TYPE) & HCF_TYPE_STA */
-/* ;?seems reasonable that even an AP-only driver could afford this small additional footprint */
-MODULE_PARM(PARM_PM_ENABLED,            "h");
-MODULE_PARM_DESC(PARM_PM_ENABLED,               "Power Management State (0 - 2, 8001 - 8002) [0]");
-MODULE_PARM(PARM_PORT_TYPE,             "b");
-MODULE_PARM_DESC(PARM_PORT_TYPE,                "Port Type (1 - 3) [1]");
-/*
- * ;?MODULE_PARM(PARM_CREATE_IBSS,           "s");
- *;?MODULE_PARM_DESC(PARM_CREATE_IBSS,              "Create IBSS (<string> N or Y) [N]");
- *;?MODULE_PARM(PARM_MULTICAST_RX,          "s");
- *;?MODULE_PARM_DESC(PARM_MULTICAST_RX,             "Multicast Receive Enable (<string> N or Y) [Y]");
- *;?MODULE_PARM(PARM_MAX_SLEEP,             "h");
- *;?MODULE_PARM_DESC(PARM_MAX_SLEEP,                "Maximum Power Management Sleep Duration (0 - 65535) [100]");
- *;?MODULE_PARM(PARM_NETWORK_ADDR,          "6b");
- *;?MODULE_PARM_DESC(PARM_NETWORK_ADDR,             "Hardware Ethernet Address ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [<factory value>]");
- *;?MODULE_PARM(PARM_AUTHENTICATION,        "b");
- *
- *tracker 12448
- *;?MODULE_PARM_DESC(PARM_AUTHENTICATION,           "Authentication Type (0-2) [0] 0=Open 1=SharedKey 2=LEAP");
- *;?MODULE_PARM_DESC(authentication,         "Authentication Type (1-2) [1] 1=Open 2=SharedKey");
- *tracker 12448
- *
- *;?MODULE_PARM(PARM_OWN_ATIM_WINDOW,       "b");
- *;?MODULE_PARM_DESC(PARM_OWN_ATIM_WINDOW,          "ATIM Window time in TU for IBSS creation (0-100) [0]");
- *;?MODULE_PARM(PARM_PM_HOLDOVER_DURATION,  "b");
- *;?MODULE_PARM_DESC(PARM_PM_HOLDOVER_DURATION,     "Time station remains awake after MAC frame transfer when PM is on (0-65535) [100]");
- *;?MODULE_PARM(PARM_PROMISCUOUS_MODE,      "s");
- *;?MODULE_PARM_DESC(PARM_PROMISCUOUS_MODE,         "Promiscuous Mode Enable (<string> Y or N ) [N]" );
- *;?
- */
-MODULE_PARM(PARM_CONNECTION_CONTROL,    "b");
-MODULE_PARM_DESC(PARM_CONNECTION_CONTROL,       "Connection Control (0 - 3) [2]");
-#endif /* HCF_STA */
-#if 1 /* ;? (HCF_TYPE) & HCF_TYPE_AP */
-                                       /* ;?should we restore this to allow smaller memory footprint */
-MODULE_PARM(PARM_OWN_DTIM_PERIOD,       "b");
-MODULE_PARM_DESC(PARM_OWN_DTIM_PERIOD,          "DTIM Period (0 - 255) [1]");
-MODULE_PARM(PARM_REJECT_ANY,            "s");
-MODULE_PARM_DESC(PARM_REJECT_ANY,               "Closed System (<string> N or Y) [N]");
-MODULE_PARM(PARM_EXCLUDE_UNENCRYPTED,   "s");
-MODULE_PARM_DESC(PARM_EXCLUDE_UNENCRYPTED,      "Deny non-encrypted (<string> N or Y) [Y]");
-MODULE_PARM(PARM_MULTICAST_PM_BUFFERING,"s");
-MODULE_PARM_DESC(PARM_MULTICAST_PM_BUFFERING,   "Buffer MAC frames for Tx after DTIM (<string> Y or N) [Y]");
-MODULE_PARM(PARM_INTRA_BSS_RELAY,       "s");
-MODULE_PARM_DESC(PARM_INTRA_BSS_RELAY,          "IntraBSS Relay (<string> N or Y) [Y]");
-MODULE_PARM(PARM_RTS_THRESHOLD1,        "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD1,           "RTS Threshold, WDS Port 1 (256 - 2347) [2347]");
-MODULE_PARM(PARM_RTS_THRESHOLD2,        "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD2,           "RTS Threshold, WDS Port 2 (256 - 2347) [2347]");
-MODULE_PARM(PARM_RTS_THRESHOLD3,        "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD3,           "RTS Threshold, WDS Port 3 (256 - 2347) [2347]");
-MODULE_PARM(PARM_RTS_THRESHOLD4,        "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD4,           "RTS Threshold, WDS Port 4 (256 - 2347) [2347]");
-MODULE_PARM(PARM_RTS_THRESHOLD5,        "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD5,           "RTS Threshold, WDS Port 5 (256 - 2347) [2347]");
-MODULE_PARM(PARM_RTS_THRESHOLD6,        "h");
-MODULE_PARM_DESC(PARM_RTS_THRESHOLD6,           "RTS Threshold, WDS Port 6 (256 - 2347) [2347]");
-MODULE_PARM(PARM_TX_RATE1,              "b");
-MODULE_PARM_DESC(PARM_TX_RATE1,                 "Transmit Rate Control, WDS Port 1 (1 - 7) [3]");
-MODULE_PARM(PARM_TX_RATE2,              "b");
-MODULE_PARM_DESC(PARM_TX_RATE2,                 "Transmit Rate Control, WDS Port 2 (1 - 7) [3]");
-MODULE_PARM(PARM_TX_RATE3,              "b");
-MODULE_PARM_DESC(PARM_TX_RATE3,                 "Transmit Rate Control, WDS Port 3 (1 - 7) [3]");
-MODULE_PARM(PARM_TX_RATE4,              "b");
-MODULE_PARM_DESC(PARM_TX_RATE4,                 "Transmit Rate Control, WDS Port 4 (1 - 7) [3]");
-MODULE_PARM(PARM_TX_RATE5,              "b");
-MODULE_PARM_DESC(PARM_TX_RATE5,                 "Transmit Rate Control, WDS Port 5 (1 - 7) [3]");
-MODULE_PARM(PARM_TX_RATE6,              "b");
-MODULE_PARM_DESC(PARM_TX_RATE6,                 "Transmit Rate Control, WDS Port 6 (1 - 7) [3]");
-MODULE_PARM(PARM_WDS_ADDRESS1,          "6b");
-MODULE_PARM_DESC(PARM_WDS_ADDRESS1,             "MAC Address, WDS Port 1 ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [{0}]");
-MODULE_PARM(PARM_WDS_ADDRESS2,          "6b");
-MODULE_PARM_DESC(PARM_WDS_ADDRESS2,             "MAC Address, WDS Port 2 ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [{0}]");
-MODULE_PARM(PARM_WDS_ADDRESS3,          "6b");
-MODULE_PARM_DESC(PARM_WDS_ADDRESS3,             "MAC Address, WDS Port 3 ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [{0}]");
-MODULE_PARM(PARM_WDS_ADDRESS4,          "6b");
-MODULE_PARM_DESC(PARM_WDS_ADDRESS4,             "MAC Address, WDS Port 4 ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [{0}]");
-MODULE_PARM(PARM_WDS_ADDRESS5,          "6b");
-MODULE_PARM_DESC(PARM_WDS_ADDRESS5,             "MAC Address, WDS Port 5 ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [{0}]");
-MODULE_PARM(PARM_WDS_ADDRESS6,          "6b");
-MODULE_PARM_DESC(PARM_WDS_ADDRESS6,             "MAC Address, WDS Port 6 ([0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff],[0x00-0xff]) [{0}]");
-
-MODULE_PARM(PARM_OWN_BEACON_INTERVAL,   "b");
-MODULE_PARM_DESC(PARM_OWN_BEACON_INTERVAL,      "Own Beacon Interval (20 - 200) [100]");
-MODULE_PARM(PARM_COEXISTENCE,   "b");
-MODULE_PARM_DESC(PARM_COEXISTENCE,      "Coexistence (0-7) [0]");
-
-#endif /* HCF_AP */
-#endif
-
-/* END NEW PARAMETERS */
-/*******************************************************************************
- * debugging specifics
- ******************************************************************************/
-#if DBG
-
-static p_u32    pc_debug = DBG_LVL;
-/*
- * MODULE_PARM(pc_debug, "i");
- *static ;?conflicts with my understanding of CL parameters and breaks now I moved
- * the correspondig logic to wl_profile
- */ p_u32    DebugFlag = ~0; /* recognizable "undefined value" rather then DBG_DEFAULTS; */
-/* MODULE_PARM(DebugFlag, "l"); */
-
-static struct dbg_info wl_info = { KBUILD_MODNAME, 0, 0 };
-struct dbg_info *DbgInfo = &wl_info;
-
-#endif /* DBG */
-#ifdef USE_RTS
-
-static p_char  *useRTS = "N";
-MODULE_PARM(useRTS, "s");
-MODULE_PARM_DESC(useRTS, "Use RTS test interface (<string> N or Y) [N]");
-
-#endif  /* USE_RTS */
-/*******************************************************************************
- * firmware download specifics
- ******************************************************************************/
-extern struct CFG_RANGE2_STRCT BASED
-       cfg_drv_act_ranges_pri;             // describes primary-actor range of HCF
-
-#if 0 //;? (HCF_TYPE) & HCF_TYPE_AP
-extern memimage ap;                 // AP firmware image to be downloaded
-#endif /* HCF_AP */
-
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-//extern memimage station;            // STA firmware image to be downloaded
-extern memimage fw_image;            // firmware image to be downloaded
-#endif /* HCF_STA */
-
-
-int wl_insert(struct net_device *dev)
-{
-       int                     result = 0;
-       int                     hcf_status = HCF_SUCCESS;
-       int                     i;
-       unsigned long           flags = 0;
-       struct wl_private       *lp = wl_priv(dev);
-
-       /* Initialize the adapter hardware. */
-       memset(&(lp->hcfCtx), 0, sizeof(IFB_STRCT));
-
-       /* Initialize the adapter parameters. */
-       spin_lock_init(&(lp->slock));
-
-       /* Initialize states */
-       //lp->lockcount = 0; //PE1DNN
-        lp->is_handling_int = WL_NOT_HANDLING_INT;
-       lp->firmware_present = WL_FRIMWARE_NOT_PRESENT;
-
-       lp->dev = dev;
-
-       DBG_PARAM(DbgInfo, "irq_mask", "0x%04x", irq_mask & 0x0FFFF);
-       DBG_PARAM(DbgInfo, "irq_list", "0x%02x 0x%02x 0x%02x 0x%02x",
-                          irq_list[0] & 0x0FF, irq_list[1] & 0x0FF,
-                          irq_list[2] & 0x0FF, irq_list[3] & 0x0FF);
-       DBG_PARAM(DbgInfo, PARM_NAME_DESIRED_SSID, "\"%s\"", PARM_DESIRED_SSID);
-       DBG_PARAM(DbgInfo, PARM_NAME_OWN_SSID, "\"%s\"", PARM_OWN_SSID);
-       DBG_PARAM(DbgInfo, PARM_NAME_OWN_CHANNEL, "%d", PARM_OWN_CHANNEL);
-       DBG_PARAM(DbgInfo, PARM_NAME_SYSTEM_SCALE, "%d", PARM_SYSTEM_SCALE);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE, "%d", PARM_TX_RATE);
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD, "%d", PARM_RTS_THRESHOLD);
-       DBG_PARAM(DbgInfo, PARM_NAME_MICROWAVE_ROBUSTNESS, "\"%s\"", PARM_MICROWAVE_ROBUSTNESS);
-       DBG_PARAM(DbgInfo, PARM_NAME_OWN_NAME, "\"%s\"", PARM_OWN_NAME);
-//;?           DBG_PARAM( DbgInfo, PARM_NAME_ENABLE_ENCRYPTION, "\"%s\"", PARM_ENABLE_ENCRYPTION );
-       DBG_PARAM(DbgInfo, PARM_NAME_KEY1, "\"%s\"", PARM_KEY1);
-       DBG_PARAM(DbgInfo, PARM_NAME_KEY2, "\"%s\"", PARM_KEY2);
-       DBG_PARAM(DbgInfo, PARM_NAME_KEY3, "\"%s\"", PARM_KEY3);
-       DBG_PARAM(DbgInfo, PARM_NAME_KEY4, "\"%s\"", PARM_KEY4);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_KEY, "%d", PARM_TX_KEY);
-       DBG_PARAM(DbgInfo, PARM_NAME_MULTICAST_RATE, "%d", PARM_MULTICAST_RATE);
-       DBG_PARAM(DbgInfo, PARM_NAME_DOWNLOAD_FIRMWARE, "\"%s\"", PARM_DOWNLOAD_FIRMWARE);
-       DBG_PARAM(DbgInfo, PARM_NAME_AUTH_KEY_MGMT_SUITE, "%d", PARM_AUTH_KEY_MGMT_SUITE);
-//;?#if (HCF_TYPE) & HCF_TYPE_STA
-                                       //;?should we make this code conditional depending on in STA mode
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_PORT_TYPE, "%d", PARM_PORT_TYPE );
-               DBG_PARAM(DbgInfo, PARM_NAME_PM_ENABLED, "%04x", PARM_PM_ENABLED);
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_CREATE_IBSS, "\"%s\"", PARM_CREATE_IBSS );
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_MULTICAST_RX, "\"%s\"", PARM_MULTICAST_RX );
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_MAX_SLEEP, "%d", PARM_MAX_SLEEP );
-/*
-       DBG_PARAM(DbgInfo, PARM_NAME_NETWORK_ADDR, "\"%pM\"",
-                       PARM_NETWORK_ADDR);
- */
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_AUTHENTICATION, "%d", PARM_AUTHENTICATION );
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_OWN_ATIM_WINDOW, "%d", PARM_OWN_ATIM_WINDOW );
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_PM_HOLDOVER_DURATION, "%d", PARM_PM_HOLDOVER_DURATION );
-//;?        DBG_PARAM( DbgInfo, PARM_NAME_PROMISCUOUS_MODE, "\"%s\"", PARM_PROMISCUOUS_MODE );
-//;?#endif /* HCF_STA */
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_AP
-               //;?should we restore this to allow smaller memory footprint
-               //;?I guess: no, since this is Debug mode only
-       DBG_PARAM(DbgInfo, PARM_NAME_OWN_DTIM_PERIOD, "%d", PARM_OWN_DTIM_PERIOD);
-       DBG_PARAM(DbgInfo, PARM_NAME_REJECT_ANY, "\"%s\"", PARM_REJECT_ANY);
-       DBG_PARAM(DbgInfo, PARM_NAME_EXCLUDE_UNENCRYPTED, "\"%s\"", PARM_EXCLUDE_UNENCRYPTED);
-       DBG_PARAM(DbgInfo, PARM_NAME_MULTICAST_PM_BUFFERING, "\"%s\"", PARM_MULTICAST_PM_BUFFERING);
-       DBG_PARAM(DbgInfo, PARM_NAME_INTRA_BSS_RELAY, "\"%s\"", PARM_INTRA_BSS_RELAY);
-#ifdef USE_WDS
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD1, "%d", PARM_RTS_THRESHOLD1);
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD2, "%d", PARM_RTS_THRESHOLD2);
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD3, "%d", PARM_RTS_THRESHOLD3);
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD4, "%d", PARM_RTS_THRESHOLD4);
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD5, "%d", PARM_RTS_THRESHOLD5);
-       DBG_PARAM(DbgInfo, PARM_NAME_RTS_THRESHOLD6, "%d", PARM_RTS_THRESHOLD6);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE1, "%d", PARM_TX_RATE1);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE2, "%d", PARM_TX_RATE2);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE3, "%d", PARM_TX_RATE3);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE4, "%d", PARM_TX_RATE4);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE5, "%d", PARM_TX_RATE5);
-       DBG_PARAM(DbgInfo, PARM_NAME_TX_RATE6, "%d", PARM_TX_RATE6);
-       DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS1, "\"%pM\"",
-                       PARM_WDS_ADDRESS1);
-       DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS2, "\"%pM\"",
-                       PARM_WDS_ADDRESS2);
-       DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS3, "\"%pM\"",
-                       PARM_WDS_ADDRESS3);
-       DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS4, "\"%pM\"",
-                       PARM_WDS_ADDRESS4);
-       DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS5, "\"%pM\"",
-                       PARM_WDS_ADDRESS5);
-       DBG_PARAM(DbgInfo, PARM_NAME_WDS_ADDRESS6, "\"%pM\"",
-                       PARM_WDS_ADDRESS6);
-#endif /* USE_WDS */
-#endif /* HCF_AP */
-
-       VALID_PARAM(!PARM_DESIRED_SSID || (strlen(PARM_DESIRED_SSID) <= PARM_MAX_NAME_LEN));
-       VALID_PARAM(!PARM_OWN_SSID || (strlen(PARM_OWN_SSID) <= PARM_MAX_NAME_LEN));
-       VALID_PARAM((PARM_OWN_CHANNEL <= PARM_MAX_OWN_CHANNEL));
-       VALID_PARAM((PARM_SYSTEM_SCALE >= PARM_MIN_SYSTEM_SCALE) && (PARM_SYSTEM_SCALE <= PARM_MAX_SYSTEM_SCALE));
-       VALID_PARAM((PARM_TX_RATE >= PARM_MIN_TX_RATE) && (PARM_TX_RATE <= PARM_MAX_TX_RATE));
-       VALID_PARAM((PARM_RTS_THRESHOLD <= PARM_MAX_RTS_THRESHOLD));
-       VALID_PARAM(!PARM_MICROWAVE_ROBUSTNESS || strchr("NnYy", PARM_MICROWAVE_ROBUSTNESS[0]) != NULL);
-       VALID_PARAM(!PARM_OWN_NAME || (strlen(PARM_NAME_OWN_NAME) <= PARM_MAX_NAME_LEN));
-       VALID_PARAM((PARM_ENABLE_ENCRYPTION <= PARM_MAX_ENABLE_ENCRYPTION));
-       VALID_PARAM(is_valid_key_string(PARM_KEY1));
-       VALID_PARAM(is_valid_key_string(PARM_KEY2));
-       VALID_PARAM(is_valid_key_string(PARM_KEY3));
-       VALID_PARAM(is_valid_key_string(PARM_KEY4));
-       VALID_PARAM((PARM_TX_KEY >= PARM_MIN_TX_KEY) && (PARM_TX_KEY <= PARM_MAX_TX_KEY));
-
-       VALID_PARAM((PARM_MULTICAST_RATE >= PARM_MIN_MULTICAST_RATE) &&
-                                       (PARM_MULTICAST_RATE <= PARM_MAX_MULTICAST_RATE));
-
-       VALID_PARAM(!PARM_DOWNLOAD_FIRMWARE || (strlen(PARM_DOWNLOAD_FIRMWARE) <= 255 /*;?*/));
-       VALID_PARAM((PARM_AUTH_KEY_MGMT_SUITE < PARM_MAX_AUTH_KEY_MGMT_SUITE));
-
-       VALID_PARAM(!PARM_LOAD_BALANCING || strchr("NnYy", PARM_LOAD_BALANCING[0]) != NULL);
-       VALID_PARAM( !PARM_MEDIUM_DISTRIBUTION || strchr( "NnYy", PARM_MEDIUM_DISTRIBUTION[0] ) != NULL );
-       VALID_PARAM(( PARM_TX_POW_LEVEL <= PARM_MAX_TX_POW_LEVEL ));
-
-       VALID_PARAM(( PARM_PORT_TYPE >= PARM_MIN_PORT_TYPE ) && ( PARM_PORT_TYPE <= PARM_MAX_PORT_TYPE ));
-       VALID_PARAM( PARM_PM_ENABLED <= WVLAN_PM_STATE_STANDARD ||
-                                ( PARM_PM_ENABLED & 0x7FFF ) <= WVLAN_PM_STATE_STANDARD );
-       VALID_PARAM( !PARM_CREATE_IBSS || strchr( "NnYy", PARM_CREATE_IBSS[0] ) != NULL );
-       VALID_PARAM( !PARM_MULTICAST_RX || strchr( "NnYy", PARM_MULTICAST_RX[0] ) != NULL );
-       VALID_PARAM(( PARM_MAX_SLEEP <= PARM_MAX_MAX_PM_SLEEP ));
-       VALID_PARAM(( PARM_AUTHENTICATION <= PARM_MAX_AUTHENTICATION ));
-       VALID_PARAM(( PARM_OWN_ATIM_WINDOW <= PARM_MAX_OWN_ATIM_WINDOW ));
-       VALID_PARAM(( PARM_PM_HOLDOVER_DURATION <= PARM_MAX_PM_HOLDOVER_DURATION ));
-       VALID_PARAM( !PARM_PROMISCUOUS_MODE || strchr( "NnYy", PARM_PROMISCUOUS_MODE[0] ) != NULL );
-       VALID_PARAM(( PARM_CONNECTION_CONTROL <= PARM_MAX_CONNECTION_CONTROL ));
-
-       VALID_PARAM(( PARM_OWN_DTIM_PERIOD >= PARM_MIN_OWN_DTIM_PERIOD ));
-       VALID_PARAM( !PARM_REJECT_ANY || strchr( "NnYy", PARM_REJECT_ANY[0] ) != NULL );
-       VALID_PARAM( !PARM_EXCLUDE_UNENCRYPTED || strchr( "NnYy", PARM_EXCLUDE_UNENCRYPTED[0] ) != NULL );
-       VALID_PARAM( !PARM_MULTICAST_PM_BUFFERING || strchr( "NnYy", PARM_MULTICAST_PM_BUFFERING[0] ) != NULL );
-       VALID_PARAM( !PARM_INTRA_BSS_RELAY || strchr( "NnYy", PARM_INTRA_BSS_RELAY[0] ) != NULL );
-#ifdef USE_WDS
-       VALID_PARAM(( PARM_RTS_THRESHOLD1 <= PARM_MAX_RTS_THRESHOLD ));
-       VALID_PARAM(( PARM_RTS_THRESHOLD2 <= PARM_MAX_RTS_THRESHOLD ));
-       VALID_PARAM(( PARM_RTS_THRESHOLD3 <= PARM_MAX_RTS_THRESHOLD ));
-       VALID_PARAM(( PARM_RTS_THRESHOLD4 <= PARM_MAX_RTS_THRESHOLD ));
-       VALID_PARAM(( PARM_RTS_THRESHOLD5 <= PARM_MAX_RTS_THRESHOLD ));
-       VALID_PARAM(( PARM_RTS_THRESHOLD6 <= PARM_MAX_RTS_THRESHOLD ));
-       VALID_PARAM(( PARM_TX_RATE1 >= PARM_MIN_TX_RATE ) && (PARM_TX_RATE1 <= PARM_MAX_TX_RATE ));
-       VALID_PARAM(( PARM_TX_RATE2 >= PARM_MIN_TX_RATE ) && (PARM_TX_RATE2 <= PARM_MAX_TX_RATE ));
-       VALID_PARAM(( PARM_TX_RATE3 >= PARM_MIN_TX_RATE ) && (PARM_TX_RATE3 <= PARM_MAX_TX_RATE ));
-       VALID_PARAM(( PARM_TX_RATE4 >= PARM_MIN_TX_RATE ) && (PARM_TX_RATE4 <= PARM_MAX_TX_RATE ));
-       VALID_PARAM(( PARM_TX_RATE5 >= PARM_MIN_TX_RATE ) && (PARM_TX_RATE5 <= PARM_MAX_TX_RATE ));
-       VALID_PARAM(( PARM_TX_RATE6 >= PARM_MIN_TX_RATE ) && (PARM_TX_RATE6 <= PARM_MAX_TX_RATE ));
-#endif /* USE_WDS */
-
-       VALID_PARAM(( PARM_OWN_BEACON_INTERVAL >= PARM_MIN_OWN_BEACON_INTERVAL ) && ( PARM_OWN_BEACON_INTERVAL <= PARM_MAX_OWN_BEACON_INTERVAL ));
-       VALID_PARAM(( PARM_COEXISTENCE <= PARM_COEXISTENCE ));
-
-       /* Set the driver parameters from the passed in parameters. */
-
-       /* THESE MODULE PARAMETERS ARE TO BE DEPRECATED IN FAVOR OF A NAMING CONVENTION
-          WHICH IS INLINE WITH THE FORTHCOMING WAVELAN API */
-
-       /* START NEW PARAMETERS */
-
-       lp->Channel             = PARM_OWN_CHANNEL;
-       lp->DistanceBetweenAPs  = PARM_SYSTEM_SCALE;
-
-       /* Need to determine how to handle the new bands for 5GHz */
-       lp->TxRateControl[0]    = PARM_DEFAULT_TX_RATE_2GHZ;
-       lp->TxRateControl[1]    = PARM_DEFAULT_TX_RATE_5GHZ;
-
-       lp->RTSThreshold        = PARM_RTS_THRESHOLD;
-
-       /* Need to determine how to handle the new bands for 5GHz */
-       lp->MulticastRate[0]    = PARM_DEFAULT_MULTICAST_RATE_2GHZ;
-       lp->MulticastRate[1]    = PARM_DEFAULT_MULTICAST_RATE_5GHZ;
-
-       if ( strchr( "Yy", PARM_MICROWAVE_ROBUSTNESS[0] ) != NULL )
-               lp->MicrowaveRobustness = 1;
-       else
-               lp->MicrowaveRobustness = 0;
-       if ( PARM_DESIRED_SSID && ( strlen( PARM_DESIRED_SSID ) <= HCF_MAX_NAME_LEN ))
-               strcpy( lp->NetworkName, PARM_DESIRED_SSID );
-       if ( PARM_OWN_SSID && ( strlen( PARM_OWN_SSID ) <= HCF_MAX_NAME_LEN ))
-               strcpy( lp->NetworkName, PARM_OWN_SSID );
-       if ( PARM_OWN_NAME && ( strlen( PARM_OWN_NAME ) <= HCF_MAX_NAME_LEN ))
-               strcpy( lp->StationName, PARM_OWN_NAME );
-       lp->EnableEncryption = PARM_ENABLE_ENCRYPTION;
-       if ( PARM_KEY1 && ( strlen( PARM_KEY1 ) <= MAX_KEY_LEN ))
-               strcpy( lp->Key1, PARM_KEY1 );
-       if ( PARM_KEY2 && ( strlen( PARM_KEY2 ) <= MAX_KEY_LEN ))
-               strcpy( lp->Key2, PARM_KEY2 );
-       if ( PARM_KEY3 && ( strlen( PARM_KEY3 ) <= MAX_KEY_LEN ))
-               strcpy( lp->Key3, PARM_KEY3 );
-       if ( PARM_KEY4 && ( strlen( PARM_KEY4 ) <= MAX_KEY_LEN ))
-               strcpy( lp->Key4, PARM_KEY4 );
-
-       lp->TransmitKeyID = PARM_TX_KEY;
-
-       key_string2key( lp->Key1, &(lp->DefaultKeys.key[0] ));
-       key_string2key( lp->Key2, &(lp->DefaultKeys.key[1] ));
-       key_string2key( lp->Key3, &(lp->DefaultKeys.key[2] ));
-       key_string2key( lp->Key4, &(lp->DefaultKeys.key[3] ));
-
-       lp->DownloadFirmware = 1 ; //;?to be upgraded PARM_DOWNLOAD_FIRMWARE;
-       lp->AuthKeyMgmtSuite = PARM_AUTH_KEY_MGMT_SUITE;
-
-       if ( strchr( "Yy", PARM_LOAD_BALANCING[0] ) != NULL )
-               lp->loadBalancing = 1;
-       else
-               lp->loadBalancing = 0;
-
-       if ( strchr( "Yy", PARM_MEDIUM_DISTRIBUTION[0] ) != NULL )
-               lp->mediumDistribution = 1;
-       else
-               lp->mediumDistribution = 0;
-
-       lp->txPowLevel = PARM_TX_POW_LEVEL;
-
-       lp->srsc[0] = PARM_SRSC_2GHZ;
-       lp->srsc[1] = PARM_SRSC_5GHZ;
-       lp->brsc[0] = PARM_BRSC_2GHZ;
-       lp->brsc[1] = PARM_BRSC_5GHZ;
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-//;?seems reasonable that even an AP-only driver could afford this small additional footprint
-       lp->PortType            = PARM_PORT_TYPE;
-       lp->MaxSleepDuration    = PARM_MAX_SLEEP;
-       lp->authentication      = PARM_AUTHENTICATION;
-       lp->atimWindow          = PARM_OWN_ATIM_WINDOW;
-       lp->holdoverDuration    = PARM_PM_HOLDOVER_DURATION;
-       lp->PMEnabled           = PARM_PM_ENABLED;  //;?
-       if ( strchr( "Yy", PARM_CREATE_IBSS[0] ) != NULL )
-               lp->CreateIBSS = 1;
-       else
-               lp->CreateIBSS = 0;
-       if ( strchr( "Nn", PARM_MULTICAST_RX[0] ) != NULL )
-               lp->MulticastReceive = 0;
-       else
-               lp->MulticastReceive = 1;
-       if ( strchr( "Yy", PARM_PROMISCUOUS_MODE[0] ) != NULL )
-               lp->promiscuousMode = 1;
-       else
-               lp->promiscuousMode = 0;
-       for( i = 0; i < ETH_ALEN; i++ )
-               lp->MACAddress[i] = PARM_NETWORK_ADDR[i];
-
-       lp->connectionControl = PARM_CONNECTION_CONTROL;
-
-#endif /* HCF_STA */
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_AP
-       //;?should we restore this to allow smaller memory footprint
-       lp->DTIMPeriod = PARM_OWN_DTIM_PERIOD;
-
-       if ( strchr( "Yy", PARM_REJECT_ANY[0] ) != NULL )
-               lp->RejectAny = 1;
-       else
-               lp->RejectAny = 0;
-       if ( strchr( "Nn", PARM_EXCLUDE_UNENCRYPTED[0] ) != NULL )
-               lp->ExcludeUnencrypted = 0;
-       else
-               lp->ExcludeUnencrypted = 1;
-       if ( strchr( "Yy", PARM_MULTICAST_PM_BUFFERING[0] ) != NULL )
-               lp->multicastPMBuffering = 1;
-       else
-               lp->multicastPMBuffering = 0;
-       if ( strchr( "Yy", PARM_INTRA_BSS_RELAY[0] ) != NULL )
-               lp->intraBSSRelay = 1;
-       else
-               lp->intraBSSRelay = 0;
-
-       lp->ownBeaconInterval = PARM_OWN_BEACON_INTERVAL;
-       lp->coexistence       = PARM_COEXISTENCE;
-
-#ifdef USE_WDS
-       lp->wds_port[0].rtsThreshold    = PARM_RTS_THRESHOLD1;
-       lp->wds_port[1].rtsThreshold    = PARM_RTS_THRESHOLD2;
-       lp->wds_port[2].rtsThreshold    = PARM_RTS_THRESHOLD3;
-       lp->wds_port[3].rtsThreshold    = PARM_RTS_THRESHOLD4;
-       lp->wds_port[4].rtsThreshold    = PARM_RTS_THRESHOLD5;
-       lp->wds_port[5].rtsThreshold    = PARM_RTS_THRESHOLD6;
-       lp->wds_port[0].txRateCntl      = PARM_TX_RATE1;
-       lp->wds_port[1].txRateCntl      = PARM_TX_RATE2;
-       lp->wds_port[2].txRateCntl      = PARM_TX_RATE3;
-       lp->wds_port[3].txRateCntl      = PARM_TX_RATE4;
-       lp->wds_port[4].txRateCntl      = PARM_TX_RATE5;
-       lp->wds_port[5].txRateCntl      = PARM_TX_RATE6;
-
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               lp->wds_port[0].wdsAddress[i] = PARM_WDS_ADDRESS1[i];
-       }
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               lp->wds_port[1].wdsAddress[i] = PARM_WDS_ADDRESS2[i];
-       }
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               lp->wds_port[2].wdsAddress[i] = PARM_WDS_ADDRESS3[i];
-       }
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               lp->wds_port[3].wdsAddress[i] = PARM_WDS_ADDRESS4[i];
-       }
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               lp->wds_port[4].wdsAddress[i] = PARM_WDS_ADDRESS5[i];
-       }
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               lp->wds_port[5].wdsAddress[i] = PARM_WDS_ADDRESS6[i];
-       }
-#endif  /* USE_WDS */
-#endif  /* HCF_AP */
-#ifdef USE_RTS
-       if ( strchr( "Yy", useRTS[0] ) != NULL )
-               lp->useRTS = 1;
-       else
-               lp->useRTS = 0;
-#endif  /* USE_RTS */
-
-
-       /* END NEW PARAMETERS */
-
-
-       wl_lock( lp, &flags );
-
-       /* Initialize the portState variable */
-       lp->portState = WVLAN_PORT_STATE_DISABLED;
-
-       /* Initialize the ScanResult struct */
-       memset( &( lp->scan_results ), 0, sizeof( lp->scan_results ));
-       lp->scan_results.scan_complete = FALSE;
-
-       /* Initialize the ProbeResult struct */
-       memset( &( lp->probe_results ), 0, sizeof( lp->probe_results ));
-       lp->probe_results.scan_complete = FALSE;
-       lp->probe_num_aps = 0;
-
-
-       /* Initialize Tx queue stuff */
-       memset( lp->txList, 0, sizeof( lp->txList ));
-
-       INIT_LIST_HEAD( &( lp->txFree ));
-
-       lp->txF.skb  = NULL;
-       lp->txF.port = 0;
-
-
-       for( i = 0; i < DEFAULT_NUM_TX_FRAMES; i++ ) {
-               list_add_tail( &( lp->txList[i].node ), &( lp->txFree ));
-       }
-
-
-       for( i = 0; i < WVLAN_MAX_TX_QUEUES; i++ ) {
-               INIT_LIST_HEAD( &( lp->txQ[i] ));
-       }
-
-       lp->netif_queue_on = TRUE;
-       lp->txQ_count = 0;
-       /* Initialize the use_dma element in the adapter structure. Not sure if
-          this should be a compile-time or run-time configurable. So for now,
-          implement as run-time and just define here */
-#ifdef WARP
-#ifdef ENABLE_DMA
-       DBG_TRACE( DbgInfo, "HERMES 2.5 BUSMASTER DMA MODE\n" );
-       lp->use_dma = 1;
-#else
-       DBG_TRACE( DbgInfo, "HERMES 2.5 PORT I/O MODE\n" );
-       lp->use_dma = 0;
-#endif // ENABLE_DMA
-#endif // WARP
-
-       /* Register the ISR handler information here, so that it's not done
-          repeatedly in the ISR */
-        tasklet_init(&lp->task, wl_isr_handler, (unsigned long)lp);
-
-        /* Connect to the adapter */
-        DBG_TRACE( DbgInfo, "Calling hcf_connect()...\n" );
-        hcf_status = hcf_connect( &lp->hcfCtx, dev->base_addr );
-       //HCF_ERR_INCOMP_FW is acceptable, because download must still take place
-       //HCF_ERR_INCOMP_PRI is not acceptable
-       if ( hcf_status != HCF_SUCCESS && hcf_status != HCF_ERR_INCOMP_FW ) {
-               DBG_ERROR( DbgInfo, "hcf_connect() failed, status: 0x%x\n", hcf_status );
-               wl_unlock( lp, &flags );
-               goto hcf_failed;
-       }
-
-       //;?should set HCF_version and how about driver_stat
-       lp->driverInfo.IO_address       = dev->base_addr;
-       lp->driverInfo.IO_range         = HCF_NUM_IO_PORTS;     //;?conditionally 0x40 or 0x80 seems better
-       lp->driverInfo.IRQ_number       = dev->irq;
-       lp->driverInfo.card_stat        = lp->hcfCtx.IFB_CardStat;
-       //;? what happened to frame_type
-
-       /* Fill in the driver identity structure */
-       lp->driverIdentity.len              = ( sizeof( lp->driverIdentity ) / sizeof( hcf_16 )) - 1;
-       lp->driverIdentity.typ              = CFG_DRV_IDENTITY;
-       lp->driverIdentity.comp_id          = DRV_IDENTITY;
-       lp->driverIdentity.variant          = DRV_VARIANT;
-       lp->driverIdentity.version_major    = DRV_MAJOR_VERSION;
-       lp->driverIdentity.version_minor    = DRV_MINOR_VERSION;
-
-
-       /* Start the card here - This needs to be done in order to get the
-          MAC address for the network layer */
-       DBG_TRACE( DbgInfo, "Calling wvlan_go() to perform a card reset...\n" );
-       hcf_status = wl_go( lp );
-
-       if ( hcf_status != HCF_SUCCESS ) {
-               DBG_ERROR( DbgInfo, "wl_go() failed\n" );
-               wl_unlock( lp, &flags );
-               goto hcf_failed;
-       }
-
-       /* Certain RIDs must be set before enabling the ports */
-       wl_put_ltv_init( lp );
-
-#if 0 //;?why was this already commented out in wl_lkm_720
-       /* Enable the ports */
-       if ( wl_adapter_is_open( lp->dev )) {
-               /* Enable the ports */
-               DBG_TRACE( DbgInfo, "Enabling Port 0\n" );
-               hcf_status = wl_enable( lp );
-
-               if ( hcf_status != HCF_SUCCESS ) {
-                       DBG_TRACE( DbgInfo, "Enable port 0 failed: 0x%x\n", hcf_status );
-               }
-
-#if (HCF_TYPE) & HCF_TYPE_AP
-               DBG_TRACE( DbgInfo, "Enabling WDS Ports\n" );
-               //wl_enable_wds_ports( lp );
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-
-       }
-#endif
-
-       /* Fill out the MAC address information in the net_device struct */
-       memcpy( lp->dev->dev_addr, lp->MACAddress, ETH_ALEN );
-       dev->addr_len = ETH_ALEN;
-
-       lp->is_registered = TRUE;
-
-#ifdef USE_PROFILE
-       /* Parse the config file for the sake of creating WDS ports if WDS is
-          configured there but not in the module options */
-       parse_config( dev );
-#endif  /* USE_PROFILE */
-
-       /* If we're going into AP Mode, register the "virtual" ethernet devices
-          needed for WDS */
-       WL_WDS_NETDEV_REGISTER( lp );
-
-       /* Reset the DownloadFirmware variable in the private struct. If the
-          config file is not used, this will not matter; if it is used, it
-          will be reparsed in wl_open(). This is done because logic in wl_open
-          used to check if a firmware download is needed is broken by parsing
-          the file here; however, this parsing is needed to register WDS ports
-          in AP mode, if they are configured */
-       lp->DownloadFirmware = WVLAN_DRV_MODE_STA; //;?download_firmware;
-
-#ifdef USE_RTS
-       if ( lp->useRTS == 1 ) {
-               DBG_TRACE( DbgInfo, "ENTERING RTS MODE...\n" );
-                wl_act_int_off( lp );
-                lp->is_handling_int = WL_NOT_HANDLING_INT; // Not handling interrupts anymore
-
-               wl_disable( lp );
-
-               hcf_connect( &lp->hcfCtx, HCF_DISCONNECT);
-       }
-#endif  /* USE_RTS */
-
-       wl_unlock( lp, &flags );
-
-       DBG_TRACE( DbgInfo, "%s: Wireless, io_addr %#03lx, irq %d, ""mac_address ",
-                          dev->name, dev->base_addr, dev->irq );
-
-       for( i = 0; i < ETH_ALEN; i++ ) {
-               printk( "%02X%c", dev->dev_addr[i], (( i < ( ETH_ALEN-1 )) ? ':' : '\n' ));
-       }
-
-#if 0 //SCULL_USE_PROC /* don't waste space if unused */
-       proc_create_data( "wlags", 0, NULL, &scull_read_procmem_fops, dev );
-       proc_mkdir("driver/wlags49", 0);
-#endif /* SCULL_USE_PROC */
-
-       return result;
-
-hcf_failed:
-       wl_hcf_error( dev, hcf_status );
-
-failed:
-
-       DBG_ERROR( DbgInfo, "wl_insert() FAILED\n" );
-
-       if ( lp->is_registered == TRUE ) {
-               lp->is_registered = FALSE;
-       }
-
-       WL_WDS_NETDEV_DEREGISTER( lp );
-
-       result = -EFAULT;
-
-       return result;
-} // wl_insert
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_reset()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Reset the adapter.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the net_device struct of the wireless device
- *
- *  RETURNS:
- *
- *      an HCF status code
- *
- ******************************************************************************/
-int wl_reset(struct net_device *dev)
-{
-       struct wl_private  *lp = wl_priv(dev);
-       int                 hcf_status = HCF_SUCCESS;
-
-       DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
-       DBG_PARAM( DbgInfo, "dev->base_addr", "(%#03lx)", dev->base_addr );
-
-       /*
-         * The caller should already have a lock and
-         * disable the interrupts, we do not lock here,
-         * nor do we enable/disable interrupts!
-         */
-
-       DBG_TRACE( DbgInfo, "Device Base Address: %#03lx\n", dev->base_addr );
-       if ( dev->base_addr ) {
-               /* Shutdown the adapter. */
-               hcf_connect( &lp->hcfCtx, HCF_DISCONNECT );
-
-               /* Reset the driver information. */
-               lp->txBytes = 0;
-
-               /* Connect to the adapter. */
-               hcf_status = hcf_connect( &lp->hcfCtx, dev->base_addr );
-               if ( hcf_status != HCF_SUCCESS && hcf_status != HCF_ERR_INCOMP_FW ) {
-                       DBG_ERROR( DbgInfo, "hcf_connect() failed, status: 0x%x\n", hcf_status );
-                       goto out;
-               }
-
-               /* Check if firmware is present, if not change state */
-               if ( hcf_status == HCF_ERR_INCOMP_FW ) {
-                       lp->firmware_present = WL_FRIMWARE_NOT_PRESENT;
-               }
-
-               /* Initialize the portState variable */
-               lp->portState = WVLAN_PORT_STATE_DISABLED;
-
-               /* Restart the adapter. */
-               hcf_status = wl_go( lp );
-               if ( hcf_status != HCF_SUCCESS ) {
-                       DBG_ERROR( DbgInfo, "wl_go() failed, status: 0x%x\n", hcf_status );
-                       goto out;
-               }
-
-               /* Certain RIDs must be set before enabling the ports */
-               wl_put_ltv_init( lp );
-       } else {
-               DBG_ERROR( DbgInfo, "Device Base Address INVALID!!!\n" );
-       }
-
-out:
-       return hcf_status;
-} // wl_reset
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_go()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Reset the adapter.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the net_device struct of the wireless device
- *
- *  RETURNS:
- *
- *      an HCF status code
- *
- ******************************************************************************/
-int wl_go( struct wl_private *lp )
-{
-       int     hcf_status = HCF_SUCCESS;
-       char    *cp = NULL;                     //fw_image
-       int     retries = 0;
-
-       hcf_status = wl_disable( lp );
-       if ( hcf_status != HCF_SUCCESS ) {
-               DBG_TRACE( DbgInfo, "Disable port 0 failed: 0x%x\n", hcf_status );
-
-               while (( hcf_status != HCF_SUCCESS ) && (retries < 10)) {
-                       retries++;
-                       hcf_status = wl_disable( lp );
-               }
-               if ( hcf_status == HCF_SUCCESS ) {
-                       DBG_TRACE( DbgInfo, "Disable port 0 succes : %d retries\n", retries );
-               } else {
-                       DBG_TRACE( DbgInfo, "Disable port 0 failed after: %d retries\n", retries );
-               }
-       }
-
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_AP
-       //DBG_TRACE( DbgInfo, "Disabling WDS Ports\n" );
-       //wl_disable_wds_ports( lp );
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-
-//;?what was the purpose of this
-//     /* load the appropriate firmware image, depending on driver mode */
-//     lp->ltvRecord.len   = ( sizeof( CFG_RANGE20_STRCT ) / sizeof( hcf_16 )) - 1;
-//     lp->ltvRecord.typ   = CFG_DRV_ACT_RANGES_PRI;
-//     hcf_get_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-#if BIN_DL
-       if ( strlen( lp->fw_image_filename ) ) {
-mm_segment_t   fs;
-int                    file_desc;
-int                    rc;
-
-               DBG_TRACE( DbgInfo, "F/W image:%s:\n", lp->fw_image_filename );
-               /* Obtain a user-space process context, storing the original context */
-               fs = get_fs( );
-               set_fs( get_ds( ));
-               file_desc = open( lp->fw_image_filename, O_RDONLY, 0 );
-               if ( file_desc == -1 ) {
-                       DBG_ERROR( DbgInfo, "No image file found\n" );
-               } else {
-                       DBG_TRACE( DbgInfo, "F/W image file found\n" );
-#define DHF_ALLOC_SIZE 96000                   //just below 96K, let's hope it suffices for now and for the future
-                       cp = (char*)vmalloc( DHF_ALLOC_SIZE );
-                       if ( cp == NULL ) {
-                               DBG_ERROR( DbgInfo, "error in vmalloc\n" );
-                       } else {
-                               rc = read( file_desc, cp, DHF_ALLOC_SIZE );
-                               if ( rc == DHF_ALLOC_SIZE ) {
-                                       DBG_ERROR( DbgInfo, "buffer too small, %d\n", DHF_ALLOC_SIZE );
-                               } else if ( rc > 0 ) {
-                                       DBG_TRACE( DbgInfo, "read O.K.: %d bytes  %.12s\n", rc, cp );
-                                       rc = read( file_desc, &cp[rc], 1 );
-                                       if ( rc == 0 ) { //;/change to an until-loop at rc<=0
-                                               DBG_TRACE( DbgInfo, "no more to read\n" );
-                                       }
-                               }
-                               if ( rc != 0 ) {
-                                       DBG_ERROR( DbgInfo, "file not read in one swoop or other error"\
-                                                                               ", give up, too complicated, rc = %0X\n", rc );
-                                       DBG_ERROR( DbgInfo, "still have to change code to get a real download now !!!!!!!!\n" );
-                               } else {
-                                       DBG_TRACE( DbgInfo, "before dhf_download_binary\n" );
-                                       hcf_status = dhf_download_binary( (memimage *)cp );
-                                       DBG_TRACE( DbgInfo, "after dhf_download_binary, before dhf_download_fw\n" );
-                                       //;?improve error flow/handling
-                                       hcf_status = dhf_download_fw( &lp->hcfCtx, (memimage *)cp );
-                                       DBG_TRACE( DbgInfo, "after dhf_download_fw\n" );
-                               }
-                               vfree( cp );
-                       }
-                       close( file_desc );
-               }
-               set_fs( fs );                   /* Return to the original context */
-       }
-#endif // BIN_DL
-
-       /* If firmware is present but the type is unknown then download anyway */
-       if ( (lp->firmware_present == WL_FRIMWARE_PRESENT)
-            &&
-            ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) != COMP_ID_FW_STA )
-            &&
-            ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) != COMP_ID_FW_AP ) ) {
-               /* Unknown type, download needed.  */
-               lp->firmware_present = WL_FRIMWARE_NOT_PRESENT;
-       }
-
-       if(lp->firmware_present == WL_FRIMWARE_NOT_PRESENT)
-       {
-               if ( cp == NULL ) {
-                       DBG_TRACE( DbgInfo, "Downloading STA firmware...\n" );
-//                     hcf_status = dhf_download_fw( &lp->hcfCtx, &station );
-                       hcf_status = dhf_download_fw( &lp->hcfCtx, &fw_image );
-               }
-               if ( hcf_status != HCF_SUCCESS ) {
-                       DBG_ERROR( DbgInfo, "Firmware Download failed\n" );
-                       return hcf_status;
-               }
-       }
-       /* Report the FW versions */
-       //;?obsolete, use the available IFB info:: wl_get_pri_records( lp );
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_STA  ) {
-               DBG_TRACE( DbgInfo, "downloaded station F/W\n" );
-       } else if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-               DBG_TRACE( DbgInfo, "downloaded AP F/W\n" );
-       } else {
-               DBG_ERROR( DbgInfo, "unknown F/W type\n" );
-       }
-
-       /*
-         * Downloaded, no need to repeat this next time, assume the
-         * contents stays in the card until it is powered off. Note we
-         * do not switch firmware on the fly, the firmware is fixed in
-         * the driver for now.
-         */
-       lp->firmware_present = WL_FRIMWARE_PRESENT;
-
-       DBG_TRACE( DbgInfo, "ComponentID:%04x variant:%04x major:%04x minor:%04x\n",
-                               CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ),
-                               CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.variant ),
-                               CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.version_major ),
-                               CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.version_minor ));
-
-       /* now we will get the MAC address of the card */
-       lp->ltvRecord.len = 4;
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-               lp->ltvRecord.typ = CFG_NIC_MAC_ADDR;
-       } else
-       {
-               lp->ltvRecord.typ = CFG_CNF_OWN_MAC_ADDR;
-       }
-       hcf_status = hcf_get_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-       if ( hcf_status != HCF_SUCCESS ) {
-               DBG_ERROR( DbgInfo, "Could not retrieve MAC address\n" );
-               return hcf_status;
-       }
-       memcpy( lp->MACAddress, &lp->ltvRecord.u.u8[0], ETH_ALEN );
-       DBG_TRACE(DbgInfo, "Card MAC Address: %pM\n", lp->MACAddress);
-
-       /* Write out configuration to the device, enable, and reconnect. However,
-          only reconnect if in AP mode. For STA mode, need to wait for passive scan
-          completion before a connect can be issued */
-       wl_put_ltv( lp );
-       /* Enable the ports */
-       hcf_status = wl_enable( lp );
-
-       if ( lp->DownloadFirmware == WVLAN_DRV_MODE_AP ) {
-#ifdef USE_WDS
-               wl_enable_wds_ports( lp );
-#endif // USE_WDS
-               hcf_status = wl_connect( lp );
-       }
-       return hcf_status;
-} // wl_go
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_set_wep_keys()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Write TxKeyID and WEP keys to the adapter. This is separated from
- *  wl_apply() to allow dynamic WEP key updates through the wireless
- *  extensions.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the wireless adapter's private structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_set_wep_keys( struct wl_private *lp )
-{
-       int count = 0;
-
-       DBG_PARAM( DbgInfo, "lp", "%s (0x%p)", lp->dev->name, lp );
-       if ( lp->EnableEncryption ) {
-               /* NOTE: CFG_CNF_ENCRYPTION is set in wl_put_ltv() as it's a static
-                                RID */
-
-               /* set TxKeyID */
-               lp->ltvRecord.len = 2;
-               lp->ltvRecord.typ       = CFG_TX_KEY_ID;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE(lp->TransmitKeyID - 1);
-
-               hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               DBG_TRACE( DbgInfo, "Key 1 len: %d\n", lp->DefaultKeys.key[0].len );
-               DBG_TRACE( DbgInfo, "Key 2 len: %d\n", lp->DefaultKeys.key[1].len );
-               DBG_TRACE( DbgInfo, "Key 3 len: %d\n", lp->DefaultKeys.key[2].len );
-               DBG_TRACE( DbgInfo, "Key 4 len: %d\n", lp->DefaultKeys.key[3].len );
-
-               /* write keys */
-               lp->DefaultKeys.len = sizeof( lp->DefaultKeys ) / sizeof( hcf_16 ) - 1;
-               lp->DefaultKeys.typ = CFG_DEFAULT_KEYS;
-
-               /* endian translate the appropriate key information */
-               for( count = 0; count < MAX_KEYS; count++ ) {
-                       lp->DefaultKeys.key[count].len = CNV_INT_TO_LITTLE( lp->DefaultKeys.key[count].len );
-               }
-
-               hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->DefaultKeys ));
-
-               /* Reverse the above endian translation, since these keys are accessed
-                  elsewhere */
-               for( count = 0; count < MAX_KEYS; count++ ) {
-                       lp->DefaultKeys.key[count].len = CNV_INT_TO_LITTLE( lp->DefaultKeys.key[count].len );
-               }
-
-               DBG_NOTICE( DbgInfo, "encrypt: %d, ID: %d\n", lp->EnableEncryption, lp->TransmitKeyID );
-               DBG_NOTICE( DbgInfo, "set key: %s(%d) [%d]\n", lp->DefaultKeys.key[lp->TransmitKeyID-1].key, lp->DefaultKeys.key[lp->TransmitKeyID-1].len, lp->TransmitKeyID-1 );
-       }
-} // wl_set_wep_keys
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_apply()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Write the parameters to the adapter. (re-)enables the card if device is
- *  open. Returns hcf_status of hcf_enable().
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the wireless adapter's private structure
- *
- *  RETURNS:
- *
- *      an HCF status code
- *
- ******************************************************************************/
-int wl_apply(struct wl_private *lp)
-{
-       int hcf_status = HCF_SUCCESS;
-
-       DBG_ASSERT( lp != NULL);
-       DBG_PARAM( DbgInfo, "lp", "%s (0x%p)", lp->dev->name, lp );
-
-       if ( !( lp->flags & WVLAN2_UIL_BUSY )) {
-               /* The adapter parameters have changed:
-                               disable card
-                               reload parameters
-                               enable card
-               */
-
-               if ( wl_adapter_is_open( lp->dev )) {
-                       /* Disconnect and disable if necessary */
-                       hcf_status = wl_disconnect( lp );
-                       if ( hcf_status != HCF_SUCCESS ) {
-                               DBG_ERROR( DbgInfo, "Disconnect failed\n" );
-                               return -1;
-                       }
-                       hcf_status = wl_disable( lp );
-                       if ( hcf_status != HCF_SUCCESS ) {
-                               DBG_ERROR( DbgInfo, "Disable failed\n" );
-                               return -1;
-                       } else {
-                               /* Write out configuration to the device, enable, and reconnect.
-                                  However, only reconnect if in AP mode. For STA mode, need to
-                                  wait for passive scan completion before a connect can be
-                                  issued */
-                               hcf_status = wl_put_ltv( lp );
-
-                               if ( hcf_status == HCF_SUCCESS ) {
-                                       hcf_status = wl_enable( lp );
-
-                                       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-                                               hcf_status = wl_connect( lp );
-                                       }
-                               } else {
-                                       DBG_WARNING( DbgInfo, "wl_put_ltv() failed\n" );
-                               }
-                       }
-               }
-       }
-
-       return hcf_status;
-} // wl_apply
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_put_ltv_init()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to set basic parameters for card initialization.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the wireless adapter's private structure
- *
- *  RETURNS:
- *
- *      an HCF status code
- *
- ******************************************************************************/
-int wl_put_ltv_init( struct wl_private *lp )
-{
-       int i;
-       int hcf_status;
-       CFG_RID_LOG_STRCT *RidLog;
-
-       if ( lp == NULL ) {
-               DBG_ERROR( DbgInfo, "lp pointer is NULL\n" );
-               return -1;
-       }
-       /* DMA/IO */
-       lp->ltvRecord.len = 2;
-       lp->ltvRecord.typ = CFG_CNTL_OPT;
-
-       /* The Card Services build must ALWAYS be configured for 16-bit I/O. PCI or
-          CardBus can be set to either 16/32 bit I/O, or Bus Master DMA, but only
-          for Hermes-2.5 */
-#ifdef BUS_PCMCIA
-       lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE( USE_16BIT );
-#else
-       if ( lp->use_dma ) {
-               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE( USE_DMA );
-       } else {
-               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE( 0 );
-       }
-
-#endif
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-       DBG_TRACE( DbgInfo, "CFG_CNTL_OPT                      : 0x%04x\n",
-                          lp->ltvRecord.u.u16[0] );
-       DBG_TRACE( DbgInfo, "CFG_CNTL_OPT result               : 0x%04x\n",
-                          hcf_status );
-
-       /* Register the list of RIDs on which asynchronous notification is
-          required. Note that this mechanism replaces the mailbox, so the mailbox
-          can be queried by the host (if desired) without contention from us */
-       i=0;
-
-       lp->RidList[i].len     = sizeof( lp->ProbeResp );
-       lp->RidList[i].typ     = CFG_ACS_SCAN;
-       lp->RidList[i].bufp    = (wci_recordp)&lp->ProbeResp;
-       //lp->ProbeResp.infoType = 0xFFFF;
-       i++;
-
-       lp->RidList[i].len     = sizeof( lp->assoc_stat );
-       lp->RidList[i].typ     = CFG_ASSOC_STAT;
-       lp->RidList[i].bufp    = (wci_recordp)&lp->assoc_stat;
-       lp->assoc_stat.len     = 0xFFFF;
-       i++;
-
-       lp->RidList[i].len     = 4;
-       lp->RidList[i].typ     = CFG_UPDATED_INFO_RECORD;
-       lp->RidList[i].bufp    = (wci_recordp)&lp->updatedRecord;
-       lp->updatedRecord.len  = 0xFFFF;
-       i++;
-
-       lp->RidList[i].len     = sizeof( lp->sec_stat );
-       lp->RidList[i].typ     = CFG_SECURITY_STAT;
-       lp->RidList[i].bufp    = (wci_recordp)&lp->sec_stat;
-       lp->sec_stat.len       = 0xFFFF;
-       i++;
-
-       lp->RidList[i].typ     = 0;    // Terminate List
-
-       RidLog = (CFG_RID_LOG_STRCT *)&lp->ltvRecord;
-       RidLog->len     = 3;
-       RidLog->typ     = CFG_REG_INFO_LOG;
-       RidLog->recordp = (RID_LOGP)&lp->RidList[0];
-
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-       DBG_TRACE( DbgInfo, "CFG_REG_INFO_LOG\n" );
-       DBG_TRACE( DbgInfo, "CFG_REG_INFO_LOG result           : 0x%04x\n",
-                          hcf_status );
-       return hcf_status;
-} // wl_put_ltv_init
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_put_ltv()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used by wvlan_apply() and wvlan_go to set the card's configuration.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the wireless adapter's private structure
- *
- *  RETURNS:
- *
- *      an HCF status code
- *
- ******************************************************************************/
-int wl_put_ltv( struct wl_private *lp )
-{
-       int len;
-       int hcf_status;
-
-       if ( lp == NULL ) {
-               DBG_ERROR( DbgInfo, "lp pointer is NULL\n" );
-               return -1;
-       }
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-               lp->maxPort = 6;                        //;?why set this here and not as part of download process
-       } else {
-               lp->maxPort = 0;
-       }
-
-       /* Send our configuration to the card. Perform any endian translation
-          necessary */
-       /* Register the Mailbox; VxWorks does this elsewhere; why;? */
-       lp->ltvRecord.len       = 4;
-       lp->ltvRecord.typ       = CFG_REG_MB;
-       lp->ltvRecord.u.u32[0]  = (u_long)&( lp->mailbox );
-       lp->ltvRecord.u.u16[2]  = ( MB_SIZE / sizeof( hcf_16 ));
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Max Data Length */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_MAX_DATA_LEN;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( HCF_MAX_PACKET_SIZE );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* System Scale / Distance between APs */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_SYSTEM_SCALE;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->DistanceBetweenAPs );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Channel */
-       if ( lp->CreateIBSS && ( lp->Channel == 0 )) {
-               DBG_TRACE( DbgInfo, "Create IBSS" );
-               lp->Channel = 10;
-       }
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_OWN_CHANNEL;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->Channel );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Microwave Robustness */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_MICRO_WAVE;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->MicrowaveRobustness );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Load Balancing */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_LOAD_BALANCING;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->loadBalancing );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Medium Distribution */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_MEDIUM_DISTRIBUTION;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->mediumDistribution );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-       /* Country Code */
-
-#ifdef WARP
-       /* Tx Power Level (for supported cards) */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_TX_POW_LVL;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->txPowLevel );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Short Retry Limit */
-       /*lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = 0xFC32;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->shortRetryLimit );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-       */
-
-       /* Long Retry Limit */
-       /*lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = 0xFC33;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->longRetryLimit );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-       */
-
-       /* Supported Rate Set Control */
-       lp->ltvRecord.len       = 3;
-       lp->ltvRecord.typ       = CFG_SUPPORTED_RATE_SET_CNTL; //0xFC88;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->srsc[0] );
-       lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( lp->srsc[1] );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Basic Rate Set Control */
-       lp->ltvRecord.len       = 3;
-       lp->ltvRecord.typ       = CFG_BASIC_RATE_SET_CNTL; //0xFC89;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->brsc[0] );
-       lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( lp->brsc[1] );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Frame Burst Limit */
-       /* Defined, but not currently available in Firmware */
-
-#endif // WARP
-
-#ifdef WARP
-       /* Multicast Rate */
-       lp->ltvRecord.len       = 3;
-       lp->ltvRecord.typ       = CFG_CNF_MCAST_RATE;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->MulticastRate[0] );
-       lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( lp->MulticastRate[1] );
-#else
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_MCAST_RATE;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->MulticastRate[0] );
-#endif // WARP
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Own Name (Station Nickname) */
-       len = (strlen(lp->StationName) + 1) & ~0x01;
-       if (len != 0) {
-               //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_NAME                  : %s\n",
-               //           lp->StationName );
-
-               lp->ltvRecord.len       = 2 + ( len / sizeof( hcf_16 ));
-               lp->ltvRecord.typ       = CFG_CNF_OWN_NAME;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( strlen( lp->StationName ));
-
-               memcpy( &( lp->ltvRecord.u.u8[2] ), lp->StationName, len );
-       } else {
-               //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_NAME                  : EMPTY\n" );
-
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_OWN_NAME;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0 );
-       }
-
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_NAME result           : 0x%04x\n",
-       //           hcf_status );
-
-       /* The following are set in STA mode only */
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_STA  ) {
-
-               /* RTS Threshold */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->RTSThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Port Type */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_PORT_TYPE;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->PortType );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Tx Rate Control */
-#ifdef WARP
-               lp->ltvRecord.len       = 3;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->TxRateControl[0] );
-               lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( lp->TxRateControl[1] );
-#else
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->TxRateControl[0] );
-#endif  // WARP
-
-//;?skip temporarily to see whether the RID or something else is the problem hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               DBG_TRACE( DbgInfo, "CFG_TX_RATE_CNTL 2.4GHz           : 0x%04x\n",
-                                  lp->TxRateControl[0] );
-               DBG_TRACE( DbgInfo, "CFG_TX_RATE_CNTL 5.0GHz           : 0x%04x\n",
-                                  lp->TxRateControl[1] );
-               DBG_TRACE( DbgInfo, "CFG_TX_RATE_CNTL result           : 0x%04x\n",
-                                  hcf_status );
-               /* Power Management */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_PM_ENABLED;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->PMEnabled );
-//             lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0x8001 );
-               DBG_TRACE( DbgInfo, "CFG_CNF_PM_ENABLED                : 0x%04x\n", lp->PMEnabled );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-               /* Multicast Receive */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_MCAST_RX;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->MulticastReceive );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Max Sleep Duration */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_MAX_SLEEP_DURATION;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->MaxSleepDuration );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Create IBSS */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CREATE_IBSS;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->CreateIBSS );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Desired SSID */
-               if ((( len = ( strlen( lp->NetworkName ) + 1 ) & ~0x01 ) != 0 ) &&
-                        ( strcmp( lp->NetworkName, "ANY" ) != 0 ) &&
-                        ( strcmp( lp->NetworkName, "any" ) != 0 )) {
-                       //DBG_TRACE( DbgInfo, "CFG_DESIRED_SSID                  : %s\n",
-                       //           lp->NetworkName );
-
-                       lp->ltvRecord.len       = 2 + (len / sizeof(hcf_16));
-                       lp->ltvRecord.typ       = CFG_DESIRED_SSID;
-                       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( strlen( lp->NetworkName ));
-
-                       memcpy( &( lp->ltvRecord.u.u8[2] ), lp->NetworkName, len );
-               } else {
-                       //DBG_TRACE( DbgInfo, "CFG_DESIRED_SSID                  : ANY\n" );
-
-                       lp->ltvRecord.len       = 2;
-                       lp->ltvRecord.typ       = CFG_DESIRED_SSID;
-                       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0 );
-               }
-
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               //DBG_TRACE( DbgInfo, "CFG_DESIRED_SSID result           : 0x%04x\n",
-               //           hcf_status );
-               /* Own ATIM window */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_OWN_ATIM_WINDOW;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->atimWindow );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-
-               /* Holdover Duration */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_HOLDOVER_DURATION;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->holdoverDuration );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Promiscuous Mode */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_PROMISCUOUS_MODE;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->promiscuousMode );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Authentication */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_AUTHENTICATION;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->authentication );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-#ifdef WARP
-               /* Connection Control */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_CONNECTION_CNTL;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->connectionControl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-
-
-               /* Probe data rate */
-               /*lp->ltvRecord.len       = 3;
-               lp->ltvRecord.typ       = CFG_PROBE_DATA_RATE;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->probeDataRates[0] );
-               lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( lp->probeDataRates[1] );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               DBG_TRACE( DbgInfo, "CFG_PROBE_DATA_RATE 2.4GHz        : 0x%04x\n",
-                                  lp->probeDataRates[0] );
-               DBG_TRACE( DbgInfo, "CFG_PROBE_DATA_RATE 5.0GHz        : 0x%04x\n",
-                                  lp->probeDataRates[1] );
-               DBG_TRACE( DbgInfo, "CFG_PROBE_DATA_RATE result        : 0x%04x\n",
-                                  hcf_status );*/
-#endif // WARP
-       } else {
-               /* The following are set in AP mode only */
-#if 0 //;? (HCF_TYPE) & HCF_TYPE_AP
-               //;?should we restore this to allow smaller memory footprint
-
-               /* DTIM Period */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_OWN_DTIM_PERIOD;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->DTIMPeriod );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Multicast PM Buffering */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_MCAST_PM_BUF;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->multicastPMBuffering );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Reject ANY - Closed System */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_REJECT_ANY;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->RejectAny );
-
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Exclude Unencrypted */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_EXCL_UNENCRYPTED;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->ExcludeUnencrypted );
-
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* IntraBSS Relay */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_INTRA_BSS_RELAY;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->intraBSSRelay );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* RTS Threshold 0 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH0;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->RTSThreshold );
-
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Tx Rate Control 0 */
-#ifdef WARP
-               lp->ltvRecord.len       = 3;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL0;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->TxRateControl[0] );
-               lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( lp->TxRateControl[1] );
-#else
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL0;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->TxRateControl[0] );
-#endif  // WARP
-
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Own Beacon Interval */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = 0xFC31;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->ownBeaconInterval );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* Co-Existence Behavior */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = 0xFCC7;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->coexistence );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-#ifdef USE_WDS
-
-               /* RTS Threshold 1 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH1;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[0].rtsThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* RTS Threshold 2 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH2;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[1].rtsThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-
-               /* RTS Threshold 3 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH3;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[2].rtsThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-
-               /* RTS Threshold 4 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH4;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[3].rtsThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-
-               /* RTS Threshold 5 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH5;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[4].rtsThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* RTS Threshold 6 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_RTS_THRH6;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[5].rtsThreshold );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-#if 0
-               /* TX Rate Control 1 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL1;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[0].txRateCntl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* TX Rate Control 2 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL2;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[1].txRateCntl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* TX Rate Control 3 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL3;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[2].txRateCntl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* TX Rate Control 4 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL4;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[3].txRateCntl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* TX Rate Control 5 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL5;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[4].txRateCntl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* TX Rate Control 6 */
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_TX_RATE_CNTL6;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->wds_port[5].txRateCntl );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-#endif
-
-               /* WDS addresses.  It's okay to blindly send these parameters, because
-                  the port needs to be enabled, before anything is done with it. */
-
-               /* WDS Address 1 */
-               lp->ltvRecord.len      = 4;
-               lp->ltvRecord.typ      = CFG_CNF_WDS_ADDR1;
-
-               memcpy( &lp->ltvRecord.u.u8[0], lp->wds_port[0].wdsAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* WDS Address 2 */
-               lp->ltvRecord.len      = 4;
-               lp->ltvRecord.typ      = CFG_CNF_WDS_ADDR2;
-
-               memcpy( &lp->ltvRecord.u.u8[0], lp->wds_port[1].wdsAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* WDS Address 3 */
-               lp->ltvRecord.len      = 4;
-               lp->ltvRecord.typ      = CFG_CNF_WDS_ADDR3;
-
-               memcpy( &lp->ltvRecord.u.u8[0], lp->wds_port[2].wdsAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* WDS Address 4 */
-               lp->ltvRecord.len      = 4;
-               lp->ltvRecord.typ      = CFG_CNF_WDS_ADDR4;
-
-               memcpy( &lp->ltvRecord.u.u8[0], lp->wds_port[3].wdsAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* WDS Address 5 */
-               lp->ltvRecord.len      = 4;
-               lp->ltvRecord.typ      = CFG_CNF_WDS_ADDR5;
-
-               memcpy( &lp->ltvRecord.u.u8[0], lp->wds_port[4].wdsAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-               /* WDS Address 6 */
-               lp->ltvRecord.len      = 4;
-               lp->ltvRecord.typ      = CFG_CNF_WDS_ADDR6;
-
-               memcpy( &lp->ltvRecord.u.u8[0], lp->wds_port[5].wdsAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-#endif  /* USE_WDS */
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-       }
-
-       /* Own MAC Address */
-/*
-       DBG_TRACE(DbgInfo, "MAC Address                       : %pM\n",
-                       lp->MACAddress);
- */
-
-       if ( WVLAN_VALID_MAC_ADDRESS( lp->MACAddress )) {
-               /* Make the MAC address valid by:
-                               Clearing the multicast bit
-                               Setting the local MAC address bit
-               */
-               //lp->MACAddress[0] &= ~0x03;  //;?why is this commented out already in 720
-               //lp->MACAddress[0] |= 0x02;
-
-               lp->ltvRecord.len = 1 + ( ETH_ALEN / sizeof( hcf_16 ));
-               if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-                       //DBG_TRACE( DbgInfo, "CFG_NIC_MAC_ADDR\n" );
-                       lp->ltvRecord.typ = CFG_NIC_MAC_ADDR;
-               } else {
-                       //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_MAC_ADDR\n" );
-                       lp->ltvRecord.typ = CFG_CNF_OWN_MAC_ADDR;
-               }
-               /* MAC address is byte aligned, no endian conversion needed */
-               memcpy( &( lp->ltvRecord.u.u8[0] ), lp->MACAddress, ETH_ALEN );
-               hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-               //DBG_TRACE( DbgInfo, "CFG_XXX_MAC_ADDR result           : 0x%04x\n",
-               //           hcf_status );
-
-               /* Update the MAC address in the netdevice struct */
-               memcpy( lp->dev->dev_addr, lp->MACAddress, ETH_ALEN ); //;?what is the purpose of this seemingly complex logic
-       }
-       /* Own SSID */
-       if ((( len = ( strlen( lp->NetworkName ) + 1 ) & ~0x01 ) != 0 ) &&
-                                ( strcmp( lp->NetworkName, "ANY" ) != 0 ) &&
-                                ( strcmp( lp->NetworkName, "any" ) != 0 )) {
-               //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_SSID                  : %s\n",
-               //           lp->NetworkName );
-               lp->ltvRecord.len       = 2 + (len / sizeof(hcf_16));
-               lp->ltvRecord.typ       = CFG_CNF_OWN_SSID;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( strlen( lp->NetworkName ));
-
-               memcpy( &( lp->ltvRecord.u.u8[2] ), lp->NetworkName, len );
-       } else {
-               //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_SSID                  : ANY\n" );
-               lp->ltvRecord.len       = 2;
-               lp->ltvRecord.typ       = CFG_CNF_OWN_SSID;
-               lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0 );
-       }
-
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       //DBG_TRACE( DbgInfo, "CFG_CNF_OWN_SSID result           : 0x%04x\n",
-       //           hcf_status );
-       /* enable/disable encryption */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_CNF_ENCRYPTION;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->EnableEncryption );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* Set the Authentication Key Management Suite */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_SET_WPA_AUTH_KEY_MGMT_SUITE;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( lp->AuthKeyMgmtSuite );
-       hcf_status = hcf_put_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       /* If WEP (or no) keys are being used, write (or clear) them */
-       if (lp->wext_enc != IW_ENCODE_ALG_TKIP)
-               wl_set_wep_keys(lp);
-
-       /* Country Code */
-       /* countryInfo, ltvCountryInfo, CFG_CNF_COUNTRY_INFO */
-
-       return hcf_status;
-} // wl_put_ltv
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     init_module()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Load the kernel module.
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      0 on success
- *      an errno value otherwise
- *
- ******************************************************************************/
-static int __init wl_module_init( void )
-{
-       int result;
-       /*------------------------------------------------------------------------*/
-
-
-#if DBG
-       /* Convert "standard" PCMCIA parameter pc_debug to a reasonable DebugFlag value.
-        * NOTE: The values all fall through to the lower values. */
-       DbgInfo->DebugFlag = 0;
-       DbgInfo->DebugFlag = DBG_TRACE_ON;              //;?get this mess resolved one day
-       if ( pc_debug ) switch( pc_debug ) {
-         case 8:
-               DbgInfo->DebugFlag |= DBG_DS_ON;
-         case 7:
-               DbgInfo->DebugFlag |= DBG_RX_ON | DBG_TX_ON;
-         case 6:
-               DbgInfo->DebugFlag |= DBG_PARAM_ON;
-         case 5:
-               DbgInfo->DebugFlag |= DBG_TRACE_ON;
-         case 4:
-               DbgInfo->DebugFlag |= DBG_VERBOSE_ON;
-         case 1:
-               DbgInfo->DebugFlag |= DBG_DEFAULTS;
-         default:
-               break;
-       }
-#endif /* DBG */
-
-       printk(KERN_INFO "%s\n", VERSION_INFO);
-       printk(KERN_INFO "*** Modified for kernel 2.6 by Henk de Groot <pe1dnn@amsat.org>\n");
-        printk(KERN_INFO "*** Based on 7.18 version by Andrey Borzenkov <arvidjaar@mail.ru> $Revision: 39 $\n");
-
-
-// ;?#if (HCF_TYPE) & HCF_TYPE_AP
-//     DBG_PRINT( "Access Point Mode (AP) Support: YES\n" );
-// #else
-//     DBG_PRINT( "Access Point Mode (AP) Support: NO\n" );
-// #endif /* (HCF_TYPE) & HCF_TYPE_AP */
-
-       result = wl_adapter_init_module( );
-       return result;
-} // init_module
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     cleanup_module()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Unload the kernel module.
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-static void __exit wl_module_exit( void )
-{
-       wl_adapter_cleanup_module( );
-#if 0 //SCULL_USE_PROC /* don't waste space if unused */
-       remove_proc_entry( "wlags", NULL );             //;?why so a-symmetric compared to location of proc_create_data
-#endif
-} // cleanup_module
-/*============================================================================*/
-
-module_init(wl_module_init);
-module_exit(wl_module_exit);
-
-/*******************************************************************************
- *     wl_isr()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The Interrupt Service Routine for the driver.
- *
- *  PARAMETERS:
- *
- *      irq     -   the irq the interrupt came in on
- *      dev_id  -   a buffer containing information about the request
- *      regs    -
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-irqreturn_t wl_isr( int irq, void *dev_id, struct pt_regs *regs )
-{
-       int                 events;
-       struct net_device   *dev = (struct net_device *) dev_id;
-       struct wl_private   *lp = NULL;
-       /*------------------------------------------------------------------------*/
-       if (( dev == NULL ) || ( !netif_device_present( dev ))) {
-               return IRQ_NONE;
-       }
-
-       /* Set the wl_private pointer (lp), now that we know that dev is non-null */
-       lp = wl_priv(dev);
-
-#ifdef USE_RTS
-       if ( lp->useRTS == 1 ) {
-               DBG_PRINT( "EXITING ISR, IN RTS MODE...\n" );
-               return;
-               }
-#endif  /* USE_RTS */
-
-       /* If we have interrupts pending, then put them on a system task
-          queue. Otherwise turn interrupts back on */
-       events = hcf_action( &lp->hcfCtx, HCF_ACT_INT_OFF );
-
-       if ( events == HCF_INT_PENDING ) {
-               /* Schedule the ISR handler as a bottom-half task in the
-                  tq_immediate queue */
-               tasklet_schedule(&lp->task);
-       } else {
-               //DBG_PRINT( "NOT OUR INTERRUPT\n" );
-               hcf_action( &lp->hcfCtx, HCF_ACT_INT_ON );
-       }
-
-       return IRQ_RETVAL(events == HCF_INT_PENDING);
-} // wl_isr
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_isr_handler()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The ISR handler, scheduled to run in a deferred context by the ISR. This
- *      is where the ISR's work actually gets done.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-#define WVLAN_MAX_INT_SERVICES  50
-
-void wl_isr_handler( unsigned long p )
-{
-       struct net_device       *dev;
-       unsigned long           flags;
-       bool_t                  stop = TRUE;
-       int                     count;
-       int                     result;
-        struct wl_private       *lp = (struct wl_private *)p;
-       /*------------------------------------------------------------------------*/
-
-       if ( lp == NULL ) {
-               DBG_PRINT( "wl_isr_handler  lp adapter pointer is NULL!!!\n" );
-       } else {
-               wl_lock( lp, &flags );
-
-               dev = (struct net_device *)lp->dev;
-               if ( dev != NULL && netif_device_present( dev ) ) stop = FALSE;
-               for( count = 0; stop == FALSE && count < WVLAN_MAX_INT_SERVICES; count++ ) {
-                       stop = TRUE;
-                       result = hcf_service_nic( &lp->hcfCtx,
-                                                                         (wci_bufp)lp->lookAheadBuf,
-                                                                         sizeof( lp->lookAheadBuf ));
-                       if ( result == HCF_ERR_MIC ) {
-                               wl_wext_event_mic_failed( dev );        /* Send an event that MIC failed */
-                               //;?this seems wrong if HCF_ERR_MIC coincides with another event, stop gets FALSE
-                               //so why not do it always ;?
-                       }
-
-#ifndef USE_MBOX_SYNC
-                       if ( lp->hcfCtx.IFB_MBInfoLen != 0 ) {  /* anything in the mailbox */
-                               wl_mbx( lp );
-                               stop = FALSE;
-                       }
-#endif
-                       /* Check for a Link status event */
-                       if ( ( lp->hcfCtx.IFB_LinkStat & CFG_LINK_STAT_FW ) != 0 ) {
-                               wl_process_link_status( lp );
-                               stop = FALSE;
-                       }
-                       /* Check for probe response events */
-                       if ( lp->ProbeResp.infoType != 0 &&
-                               lp->ProbeResp.infoType != 0xFFFF ) {
-                               wl_process_probe_response( lp );
-                               memset( &lp->ProbeResp, 0, sizeof( lp->ProbeResp ));
-                               lp->ProbeResp.infoType = 0xFFFF;
-                               stop = FALSE;
-                       }
-                       /* Check for updated record events */
-                       if ( lp->updatedRecord.len != 0xFFFF ) {
-                               wl_process_updated_record( lp );
-                               lp->updatedRecord.len = 0xFFFF;
-                               stop = FALSE;
-                       }
-                       /* Check for association status events */
-                       if ( lp->assoc_stat.len != 0xFFFF ) {
-                               wl_process_assoc_status( lp );
-                               lp->assoc_stat.len = 0xFFFF;
-                               stop = FALSE;
-                       }
-                       /* Check for security status events */
-                       if ( lp->sec_stat.len != 0xFFFF ) {
-                               wl_process_security_status( lp );
-                               lp->sec_stat.len = 0xFFFF;
-                               stop = FALSE;
-                       }
-
-#ifdef ENABLE_DMA
-                       if ( lp->use_dma ) {
-                               /* Check for DMA Rx packets */
-                               if ( lp->hcfCtx.IFB_DmaPackets & HREG_EV_RDMAD ) {
-                                       wl_rx_dma( dev );
-                                       stop = FALSE;
-                               }
-                               /* Return Tx DMA descriptors to host */
-                               if ( lp->hcfCtx.IFB_DmaPackets & HREG_EV_TDMAD ) {
-                                       wl_pci_dma_hcf_reclaim_tx( lp );
-                                       stop = FALSE;
-                               }
-                       }
-                       else
-#endif // ENABLE_DMA
-                       {
-                               /* Check for Rx packets */
-                               if ( lp->hcfCtx.IFB_RxLen != 0 ) {
-                                       wl_rx( dev );
-                                       stop = FALSE;
-                               }
-                               /* Make sure that queued frames get sent */
-                               if ( wl_send( lp )) {
-                                       stop = FALSE;
-                               }
-                       }
-               }
-               /* We're done, so turn interrupts which were turned off in wl_isr, back on */
-               hcf_action( &lp->hcfCtx, HCF_ACT_INT_ON );
-               wl_unlock( lp, &flags );
-       }
-       return;
-} // wl_isr_handler
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_remove()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Notify the adapter that it has been removed. Since the adapter is gone,
- *  we should no longer try to talk to it.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_remove( struct net_device *dev )
-{
-       struct wl_private   *lp = wl_priv(dev);
-       unsigned long   flags;
-
-       DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
-
-       wl_lock( lp, &flags );
-
-       /* stop handling interrupts */
-       wl_act_int_off( lp );
-        lp->is_handling_int = WL_NOT_HANDLING_INT;
-
-       /*
-         * Disable the ports: just change state: since the
-         * card is gone it is useless to talk to it and at
-         * disconnect all state information is lost anyway.
-         */
-       /* Reset portState */
-       lp->portState = WVLAN_PORT_STATE_DISABLED;
-
-#if 0 //;? (HCF_TYPE) & HCF_TYPE_AP
-#ifdef USE_WDS
-       //wl_disable_wds_ports( lp );
-#endif // USE_WDS
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-
-       /* Mark the device as unregistered */
-       lp->is_registered = FALSE;
-
-       /* Deregister the WDS ports as well */
-       WL_WDS_NETDEV_DEREGISTER( lp );
-#ifdef USE_RTS
-       if ( lp->useRTS == 1 ) {
-               wl_unlock( lp, &flags );
-               return;
-       }
-#endif  /* USE_RTS */
-
-       /* Inform the HCF that the card has been removed */
-       hcf_connect( &lp->hcfCtx, HCF_DISCONNECT );
-
-       wl_unlock( lp, &flags );
-} // wl_remove
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_suspend()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Power-down and halt the adapter.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_suspend( struct net_device *dev )
-{
-       struct wl_private  *lp = wl_priv(dev);
-       unsigned long   flags;
-
-       DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
-
-       /* The adapter is suspended:
-                       Stop the adapter
-                       Power down
-       */
-       wl_lock( lp, &flags );
-
-       /* Disable interrupt handling */
-       wl_act_int_off( lp );
-
-       /* Disconnect */
-       wl_disconnect( lp );
-
-       /* Disable */
-       wl_disable( lp );
-
-        /* Disconnect from the adapter */
-       hcf_connect( &lp->hcfCtx, HCF_DISCONNECT );
-
-       /* Reset portState to be sure (should have been done by wl_disable */
-       lp->portState = WVLAN_PORT_STATE_DISABLED;
-
-       wl_unlock( lp, &flags );
-} // wl_suspend
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_resume()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Resume a previously suspended adapter.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_resume(struct net_device *dev)
-{
-       struct wl_private  *lp = wl_priv(dev);
-       unsigned long   flags;
-
-       DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
-
-       wl_lock( lp, &flags );
-
-        /* Connect to the adapter */
-       hcf_connect( &lp->hcfCtx, dev->base_addr );
-
-       /* Reset portState */
-       lp->portState = WVLAN_PORT_STATE_DISABLED;
-
-       /* Power might have been off, assume the card lost the firmware*/
-       lp->firmware_present = WL_FRIMWARE_NOT_PRESENT;
-
-       /* Reload the firmware and restart */
-       wl_reset( dev );
-
-       /* Resume interrupt handling */
-       wl_act_int_on( lp );
-
-       wl_unlock( lp, &flags );
-} // wl_resume
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_release()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function performs a check on the device and calls wl_remove() if
- *  necessary. This function can be used for all bus types, but exists mostly
- *  for the benefit of the Card Services driver, as there are times when
- *  wl_remove() does not get called.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_release( struct net_device *dev )
-{
-       struct wl_private  *lp = wl_priv(dev);
-
-       DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev );
-       /* If wl_remove() hasn't been called (i.e. when Card Services is shut
-          down with the card in the slot), then call it */
-       if ( lp->is_registered == TRUE ) {
-               DBG_TRACE( DbgInfo, "Calling unregister_netdev(), as it wasn't called yet\n" );
-               wl_remove( dev );
-
-               lp->is_registered = FALSE;
-       }
-} // wl_release
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_get_irq_mask()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Accessor function to retrieve the irq_mask module parameter
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      The irq_mask module parameter
- *
- ******************************************************************************/
-p_u16 wl_get_irq_mask( void )
-{
-       return irq_mask;
-} // wl_get_irq_mask
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_get_irq_list()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Accessor function to retrieve the irq_list module parameter
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      The irq_list module parameter
- *
- ******************************************************************************/
-p_s8 * wl_get_irq_list( void )
-{
-       return irq_list;
-} // wl_get_irq_list
-/*============================================================================*/
-
-
-
-/*******************************************************************************
- *     wl_enable()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to enable MAC ports
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_enable( struct wl_private *lp )
-{
-       int hcf_status = HCF_SUCCESS;
-
-       if ( lp->portState == WVLAN_PORT_STATE_ENABLED ) {
-               DBG_TRACE( DbgInfo, "No action: Card already enabled\n" );
-       } else if ( lp->portState == WVLAN_PORT_STATE_CONNECTED ) {
-               //;?suspicuous logic, how can you be connected without being enabled so this is probably dead code
-               DBG_TRACE( DbgInfo, "No action: Card already connected\n" );
-       } else {
-               hcf_status = hcf_cntl( &lp->hcfCtx, HCF_CNTL_ENABLE );
-               if ( hcf_status == HCF_SUCCESS ) {
-                       /* Set the status of the NIC to enabled */
-                       lp->portState = WVLAN_PORT_STATE_ENABLED;   //;?bad mnemonic, NIC iso PORT
-#ifdef ENABLE_DMA
-                       if ( lp->use_dma ) {
-                               wl_pci_dma_hcf_supply( lp );  //;?always successful?
-                       }
-#endif
-               }
-       }
-       if ( hcf_status != HCF_SUCCESS ) {  //;?make this an assert
-               DBG_TRACE( DbgInfo, "failed: 0x%x\n", hcf_status );
-       }
-       return hcf_status;
-} // wl_enable
-/*============================================================================*/
-
-
-#ifdef USE_WDS
-/*******************************************************************************
- *     wl_enable_wds_ports()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to enable the WDS MAC ports 1-6
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_enable_wds_ports( struct wl_private * lp )
-{
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ){
-               DBG_ERROR( DbgInfo, "!!!!;? someone misunderstood something !!!!!\n" );
-       }
-} // wl_enable_wds_ports
-#endif  /* USE_WDS */
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_connect()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to connect a MAC port
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_connect( struct wl_private *lp )
-{
-       int hcf_status;
-
-       if ( lp->portState != WVLAN_PORT_STATE_ENABLED ) {
-               DBG_TRACE( DbgInfo, "No action: Not in enabled state\n" );
-               return HCF_SUCCESS;
-       }
-       hcf_status = hcf_cntl( &lp->hcfCtx, HCF_CNTL_CONNECT );
-       if ( hcf_status == HCF_SUCCESS ) {
-               lp->portState = WVLAN_PORT_STATE_CONNECTED;
-       }
-       return hcf_status;
-} // wl_connect
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_disconnect()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to disconnect a MAC port
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_disconnect( struct wl_private *lp )
-{
-       int hcf_status;
-
-       if ( lp->portState != WVLAN_PORT_STATE_CONNECTED ) {
-               DBG_TRACE( DbgInfo, "No action: Not in connected state\n" );
-               return HCF_SUCCESS;
-       }
-       hcf_status = hcf_cntl( &lp->hcfCtx, HCF_CNTL_DISCONNECT );
-       if ( hcf_status == HCF_SUCCESS ) {
-               lp->portState = WVLAN_PORT_STATE_ENABLED;
-       }
-       return hcf_status;
-} // wl_disconnect
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_disable()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to disable MAC ports
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *      port    - the MAC port to disable
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_disable( struct wl_private *lp )
-{
-       int hcf_status = HCF_SUCCESS;
-
-       if ( lp->portState == WVLAN_PORT_STATE_DISABLED ) {
-               DBG_TRACE( DbgInfo, "No action: Port state is disabled\n" );
-       } else {
-               hcf_status = hcf_cntl( &lp->hcfCtx, HCF_CNTL_DISABLE );
-               if ( hcf_status == HCF_SUCCESS ) {
-                       /* Set the status of the port to disabled */ //;?bad mnemonic use NIC iso PORT
-                       lp->portState = WVLAN_PORT_STATE_DISABLED;
-
-#ifdef ENABLE_DMA
-                       if ( lp->use_dma ) {
-                               wl_pci_dma_hcf_reclaim( lp );
-                       }
-#endif
-               }
-       }
-       if ( hcf_status != HCF_SUCCESS ) {
-               DBG_TRACE( DbgInfo, "failed: 0x%x\n", hcf_status );
-       }
-       return hcf_status;
-} // wl_disable
-/*============================================================================*/
-
-
-#ifdef USE_WDS
-/*******************************************************************************
- *     wl_disable_wds_ports()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to disable the WDS MAC ports 1-6
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_disable_wds_ports( struct wl_private * lp )
-{
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ){
-               DBG_ERROR( DbgInfo, "!!!!;? someone misunderstood something !!!!!\n" );
-       }
-//     if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-//             wl_disable( lp, HCF_PORT_1 );
-//             wl_disable( lp, HCF_PORT_2 );
-//             wl_disable( lp, HCF_PORT_3 );
-//             wl_disable( lp, HCF_PORT_4 );
-//             wl_disable( lp, HCF_PORT_5 );
-//             wl_disable( lp, HCF_PORT_6 );
-//     }
-       return;
-} // wl_disable_wds_ports
-#endif // USE_WDS
-/*============================================================================*/
-
-
-#ifndef USE_MBOX_SYNC
-/*******************************************************************************
- *     wl_mbx()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *      This function is used to read and process a mailbox message.
- *
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      an HCF status code
- *
- ******************************************************************************/
-int wl_mbx( struct wl_private *lp )
-{
-       int hcf_status = HCF_SUCCESS;
-
-       DBG_TRACE( DbgInfo, "Mailbox Info: IFB_MBInfoLen: %d\n",
-                          lp->hcfCtx.IFB_MBInfoLen );
-
-       memset( &( lp->ltvRecord ), 0, sizeof( ltv_t ));
-
-       lp->ltvRecord.len = MB_SIZE;
-       lp->ltvRecord.typ = CFG_MB_INFO;
-       hcf_status = hcf_get_info( &lp->hcfCtx, (LTVP)&( lp->ltvRecord ));
-
-       if ( hcf_status != HCF_SUCCESS ) {
-               DBG_ERROR( DbgInfo, "hcf_get_info returned 0x%x\n", hcf_status );
-               return hcf_status;
-       }
-
-       if ( lp->ltvRecord.typ == CFG_MB_INFO )
-               return hcf_status;
-
-       /* Endian translate the mailbox data, then process the message */
-       wl_endian_translate_mailbox( &( lp->ltvRecord ));
-       wl_process_mailbox( lp );
-       return hcf_status;
-} // wl_mbx
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_endian_translate_mailbox()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function will perform the tedious task of endian translating all
- *  fields within a mailbox message which need translating.
- *
- *  PARAMETERS:
- *
- *      ltv - pointer to the LTV to endian translate
- *
- *  RETURNS:
- *
- *      none
- *
- ******************************************************************************/
-void wl_endian_translate_mailbox( ltv_t *ltv )
-{
-       switch( ltv->typ ) {
-         case CFG_TALLIES:
-               break;
-
-         case CFG_SCAN:
-               {
-                       int num_aps;
-                       SCAN_RS_STRCT *aps = (SCAN_RS_STRCT *)&ltv->u.u8[0];
-
-                       num_aps = (hcf_16)(( (size_t)(ltv->len - 1 ) * 2 ) /
-                                                                ( sizeof( SCAN_RS_STRCT )));
-
-                       while( num_aps >= 1 ) {
-                               num_aps--;
-
-                               aps[num_aps].channel_id =
-                                       CNV_LITTLE_TO_INT( aps[num_aps].channel_id );
-
-                               aps[num_aps].noise_level =
-                                       CNV_LITTLE_TO_INT( aps[num_aps].noise_level );
-
-                               aps[num_aps].signal_level =
-                                       CNV_LITTLE_TO_INT( aps[num_aps].signal_level );
-
-                               aps[num_aps].beacon_interval_time =
-                                       CNV_LITTLE_TO_INT( aps[num_aps].beacon_interval_time );
-
-                               aps[num_aps].capability =
-                                       CNV_LITTLE_TO_INT( aps[num_aps].capability );
-
-                               aps[num_aps].ssid_len =
-                                       CNV_LITTLE_TO_INT( aps[num_aps].ssid_len );
-
-                               aps[num_aps].ssid_val[aps[num_aps].ssid_len] = 0;
-                       }
-               }
-               break;
-
-         case CFG_ACS_SCAN:
-               {
-                       PROBE_RESP *probe_resp = (PROBE_RESP *)ltv;
-
-                       probe_resp->frameControl   = CNV_LITTLE_TO_INT( probe_resp->frameControl );
-                       probe_resp->durID          = CNV_LITTLE_TO_INT( probe_resp->durID );
-                       probe_resp->sequence       = CNV_LITTLE_TO_INT( probe_resp->sequence );
-                       probe_resp->dataLength     = CNV_LITTLE_TO_INT( probe_resp->dataLength );
-#ifndef WARP
-                       probe_resp->lenType        = CNV_LITTLE_TO_INT( probe_resp->lenType );
-#endif // WARP
-                       probe_resp->beaconInterval = CNV_LITTLE_TO_INT( probe_resp->beaconInterval );
-                       probe_resp->capability     = CNV_LITTLE_TO_INT( probe_resp->capability );
-                       probe_resp->flags          = CNV_LITTLE_TO_INT( probe_resp->flags );
-               }
-               break;
-
-         case CFG_LINK_STAT:
-#define ls ((LINK_STATUS_STRCT *)ltv)
-                       ls->linkStatus = CNV_LITTLE_TO_INT( ls->linkStatus );
-               break;
-#undef ls
-
-         case CFG_ASSOC_STAT:
-               {
-                       ASSOC_STATUS_STRCT *as = (ASSOC_STATUS_STRCT *)ltv;
-
-                       as->assocStatus = CNV_LITTLE_TO_INT( as->assocStatus );
-               }
-               break;
-
-         case CFG_SECURITY_STAT:
-               {
-                       SECURITY_STATUS_STRCT *ss = (SECURITY_STATUS_STRCT *)ltv;
-
-                       ss->securityStatus  = CNV_LITTLE_TO_INT( ss->securityStatus );
-                       ss->reason          = CNV_LITTLE_TO_INT( ss->reason );
-               }
-               break;
-
-         case CFG_WMP:
-               break;
-
-         case CFG_NULL:
-               break;
-
-       default:
-               break;
-       }
-} // wl_endian_translate_mailbox
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_process_mailbox()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function processes the mailbox data.
- *
- *  PARAMETERS:
- *
- *      ltv - pointer to the LTV to be processed.
- *
- *  RETURNS:
- *
- *      none
- *
- ******************************************************************************/
-void wl_process_mailbox( struct wl_private *lp )
-{
-       ltv_t   *ltv;
-       hcf_16  ltv_val = 0xFFFF;
-
-       ltv = &( lp->ltvRecord );
-
-       switch( ltv->typ ) {
-
-         case CFG_TALLIES:
-               DBG_TRACE( DbgInfo, "CFG_TALLIES\n" );
-               break;
-         case CFG_SCAN:
-               DBG_TRACE( DbgInfo, "CFG_SCAN\n" );
-
-               {
-                       int num_aps;
-                       SCAN_RS_STRCT *aps = (SCAN_RS_STRCT *)&ltv->u.u8[0];
-
-                       num_aps = (hcf_16)(( (size_t)(ltv->len - 1 ) * 2 ) /
-                                                                ( sizeof( SCAN_RS_STRCT )));
-
-                       lp->scan_results.num_aps = num_aps;
-
-                       DBG_TRACE( DbgInfo, "Number of APs: %d\n", num_aps );
-
-                       while( num_aps >= 1 ) {
-                               num_aps--;
-
-                               DBG_TRACE( DbgInfo, "AP              : %d\n", num_aps );
-                               DBG_TRACE( DbgInfo, "=========================\n" );
-                               DBG_TRACE( DbgInfo, "Channel ID      : 0x%04x\n",
-                                                  aps[num_aps].channel_id );
-                               DBG_TRACE( DbgInfo, "Noise Level     : 0x%04x\n",
-                                                  aps[num_aps].noise_level );
-                               DBG_TRACE( DbgInfo, "Signal Level    : 0x%04x\n",
-                                                  aps[num_aps].signal_level );
-                               DBG_TRACE( DbgInfo, "Beacon Interval : 0x%04x\n",
-                                                  aps[num_aps].beacon_interval_time );
-                               DBG_TRACE( DbgInfo, "Capability      : 0x%04x\n",
-                                                  aps[num_aps].capability );
-                               DBG_TRACE( DbgInfo, "SSID Length     : 0x%04x\n",
-                                                  aps[num_aps].ssid_len );
-                               DBG_TRACE(DbgInfo, "BSSID           : %pM\n",
-                                                  aps[num_aps].bssid);
-
-                               if ( aps[num_aps].ssid_len != 0 ) {
-                                       DBG_TRACE( DbgInfo, "SSID            : %s.\n",
-                                                          aps[num_aps].ssid_val );
-                               } else {
-                                       DBG_TRACE( DbgInfo, "SSID            : %s.\n", "ANY" );
-                               }
-
-                               DBG_TRACE( DbgInfo, "\n" );
-
-                               /* Copy the info to the ScanResult structure in the private
-                                  adapter struct */
-                               memcpy( &( lp->scan_results.APTable[num_aps]), &( aps[num_aps] ),
-                                               sizeof( SCAN_RS_STRCT ));
-                       }
-
-                       /* Set scan result to true so that any scan requests will
-                          complete */
-                       lp->scan_results.scan_complete = TRUE;
-               }
-
-               break;
-         case CFG_ACS_SCAN:
-               DBG_TRACE( DbgInfo, "CFG_ACS_SCAN\n" );
-
-               {
-                       PROBE_RESP  *probe_rsp = (PROBE_RESP *)ltv;
-                       hcf_8       *wpa_ie = NULL;
-                       hcf_16      wpa_ie_len = 0;
-
-                       DBG_TRACE( DbgInfo, "(%s) =========================\n",
-                                          lp->dev->name );
-
-                       DBG_TRACE( DbgInfo, "(%s) length      : 0x%04x.\n",
-                                          lp->dev->name, probe_rsp->length );
-
-                       if ( probe_rsp->length > 1 ) {
-                               DBG_TRACE( DbgInfo, "(%s) infoType    : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->infoType );
-
-                               DBG_TRACE( DbgInfo, "(%s) signal      : 0x%02x.\n",
-                                                  lp->dev->name, probe_rsp->signal );
-
-                               DBG_TRACE( DbgInfo, "(%s) silence     : 0x%02x.\n",
-                                                  lp->dev->name, probe_rsp->silence );
-
-                               DBG_TRACE( DbgInfo, "(%s) rxFlow      : 0x%02x.\n",
-                                                  lp->dev->name, probe_rsp->rxFlow );
-
-                               DBG_TRACE( DbgInfo, "(%s) rate        : 0x%02x.\n",
-                                                  lp->dev->name, probe_rsp->rate );
-
-                               DBG_TRACE( DbgInfo, "(%s) frame cntl  : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->frameControl );
-
-                               DBG_TRACE( DbgInfo, "(%s) durID       : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->durID );
-
-                               DBG_TRACE(DbgInfo, "(%s) address1    : %pM\n",
-                                       lp->dev->name, probe_rsp->address1);
-
-                               DBG_TRACE(DbgInfo, "(%s) address2    : %pM\n",
-                                       lp->dev->name, probe_rsp->address2);
-
-                               DBG_TRACE(DbgInfo, "(%s) BSSID       : %pM\n",
-                                       lp->dev->name, probe_rsp->BSSID);
-
-                               DBG_TRACE( DbgInfo, "(%s) sequence    : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->sequence );
-
-                               DBG_TRACE(DbgInfo, "(%s) address4    : %pM\n",
-                                       lp->dev->name, probe_rsp->address4);
-
-                               DBG_TRACE( DbgInfo, "(%s) datalength  : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->dataLength );
-
-                               DBG_TRACE(DbgInfo, "(%s) DA          : %pM\n",
-                                       lp->dev->name, probe_rsp->DA);
-
-                               DBG_TRACE(DbgInfo, "(%s) SA          : %pM\n",
-                                       lp->dev->name, probe_rsp->SA);
-
-                               //DBG_TRACE( DbgInfo, "(%s) lenType     : 0x%04x.\n",
-                               //           lp->dev->name, probe_rsp->lenType );
-
-                               DBG_TRACE(DbgInfo, "(%s) timeStamp   : "
-                                               "%d.%d.%d.%d.%d.%d.%d.%d\n",
-                                               lp->dev->name,
-                                               probe_rsp->timeStamp[0],
-                                               probe_rsp->timeStamp[1],
-                                               probe_rsp->timeStamp[2],
-                                               probe_rsp->timeStamp[3],
-                                               probe_rsp->timeStamp[4],
-                                               probe_rsp->timeStamp[5],
-                                               probe_rsp->timeStamp[6],
-                                               probe_rsp->timeStamp[7]);
-
-                               DBG_TRACE( DbgInfo, "(%s) beaconInt   : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->beaconInterval );
-
-                               DBG_TRACE( DbgInfo, "(%s) capability  : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->capability );
-
-                               DBG_TRACE( DbgInfo, "(%s) SSID len    : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->rawData[1] );
-
-                               if ( probe_rsp->rawData[1] > 0 ) {
-                                       char ssid[HCF_MAX_NAME_LEN];
-
-                                       memset( ssid, 0, sizeof( ssid ));
-                                       strncpy( ssid, &probe_rsp->rawData[2],
-                                                min_t(u8,
-                                                       probe_rsp->rawData[1],
-                                                       HCF_MAX_NAME_LEN - 1));
-
-                                       DBG_TRACE( DbgInfo, "(%s) SSID        : %s\n",
-                                                          lp->dev->name, ssid );
-                               }
-
-                               /* Parse out the WPA-IE, if one exists */
-                               wpa_ie = wl_parse_wpa_ie( probe_rsp, &wpa_ie_len );
-                               if ( wpa_ie != NULL ) {
-                                       DBG_TRACE( DbgInfo, "(%s) WPA-IE      : %s\n",
-                                       lp->dev->name, wl_print_wpa_ie( wpa_ie, wpa_ie_len ));
-                               }
-
-                               DBG_TRACE( DbgInfo, "(%s) flags       : 0x%04x.\n",
-                                                  lp->dev->name, probe_rsp->flags );
-                       }
-
-                       DBG_TRACE( DbgInfo, "\n\n" );
-                       /* If probe response length is 1, then the scan is complete */
-                       if ( probe_rsp->length == 1 ) {
-                               DBG_TRACE( DbgInfo, "SCAN COMPLETE\n" );
-                               lp->probe_results.num_aps = lp->probe_num_aps;
-                               lp->probe_results.scan_complete = TRUE;
-
-                               /* Reset the counter for the next scan request */
-                               lp->probe_num_aps = 0;
-
-                               /* Send a wireless extensions event that the scan completed */
-                               wl_wext_event_scan_complete( lp->dev );
-                       } else {
-                               /* Only copy to the table if the entry is unique; APs sometimes
-                                  respond more than once to a probe */
-                               if ( lp->probe_num_aps == 0 ) {
-                                       /* Copy the info to the ScanResult structure in the private
-                                       adapter struct */
-                                       memcpy( &( lp->probe_results.ProbeTable[lp->probe_num_aps] ),
-                                                       probe_rsp, sizeof( PROBE_RESP ));
-
-                                       /* Increment the number of APs detected */
-                                       lp->probe_num_aps++;
-                               } else {
-                                       int count;
-                                       int unique = 1;
-
-                                       for( count = 0; count < lp->probe_num_aps; count++ ) {
-                                               if ( memcmp( &( probe_rsp->BSSID ),
-                                                       lp->probe_results.ProbeTable[count].BSSID,
-                                                       ETH_ALEN ) == 0 ) {
-                                                       unique = 0;
-                                               }
-                                       }
-
-                                       if ( unique ) {
-                                               /* Copy the info to the ScanResult structure in the
-                                               private adapter struct. Only copy if there's room in the
-                                               table */
-                                               if ( lp->probe_num_aps < MAX_NAPS )
-                                               {
-                                                       memcpy( &( lp->probe_results.ProbeTable[lp->probe_num_aps] ),
-                                                                       probe_rsp, sizeof( PROBE_RESP ));
-                                               }
-                                               else
-                                               {
-                                                       DBG_WARNING( DbgInfo, "Num of scan results exceeds storage, truncating\n" );
-                                               }
-
-                                               /* Increment the number of APs detected. Note I do this
-                                                  here even when I don't copy the probe response to the
-                                                  buffer in order to detect the overflow condition */
-                                               lp->probe_num_aps++;
-                                       }
-                               }
-                       }
-               }
-
-               break;
-
-         case CFG_LINK_STAT:
-#define ls ((LINK_STATUS_STRCT *)ltv)
-               DBG_TRACE( DbgInfo, "CFG_LINK_STAT\n" );
-
-               switch( ls->linkStatus ) {
-                 case 1:
-                       DBG_TRACE( DbgInfo, "Link Status : Connected\n" );
-                       wl_wext_event_ap( lp->dev );
-                       break;
-
-                 case 2:
-                       DBG_TRACE( DbgInfo, "Link Status : Disconnected\n"  );
-                       break;
-
-                 case 3:
-                       DBG_TRACE( DbgInfo, "Link Status : Access Point Change\n" );
-                       break;
-
-                 case 4:
-                       DBG_TRACE( DbgInfo, "Link Status : Access Point Out of Range\n" );
-                       break;
-
-                 case 5:
-                       DBG_TRACE( DbgInfo, "Link Status : Access Point In Range\n" );
-                       break;
-
-               default:
-                       DBG_TRACE( DbgInfo, "Link Status : UNKNOWN (0x%04x)\n",
-                                          ls->linkStatus );
-                       break;
-               }
-
-               break;
-#undef ls
-
-         case CFG_ASSOC_STAT:
-               DBG_TRACE( DbgInfo, "CFG_ASSOC_STAT\n" );
-
-               {
-                       ASSOC_STATUS_STRCT *as = (ASSOC_STATUS_STRCT *)ltv;
-
-                       switch( as->assocStatus ) {
-                         case 1:
-                               DBG_TRACE( DbgInfo, "Association Status : STA Associated\n" );
-                               break;
-
-                         case 2:
-                               DBG_TRACE( DbgInfo, "Association Status : STA Reassociated\n" );
-                               break;
-
-                         case 3:
-                               DBG_TRACE( DbgInfo, "Association Status : STA Disassociated\n" );
-                               break;
-
-                       default:
-                               DBG_TRACE( DbgInfo, "Association Status : UNKNOWN (0x%04x)\n",
-                                                  as->assocStatus );
-                               break;
-                       }
-
-                       DBG_TRACE(DbgInfo, "STA Address        : %pM\n",
-                                          as->staAddr);
-
-                       if (( as->assocStatus == 2 )  && ( as->len == 8 )) {
-                               DBG_TRACE(DbgInfo, "Old AP Address     : %pM\n",
-                                                  as->oldApAddr);
-                       }
-               }
-
-               break;
-
-         case CFG_SECURITY_STAT:
-               DBG_TRACE( DbgInfo, "CFG_SECURITY_STAT\n" );
-
-               {
-                       SECURITY_STATUS_STRCT *ss = (SECURITY_STATUS_STRCT *)ltv;
-
-                       switch( ss->securityStatus ) {
-                         case 1:
-                               DBG_TRACE( DbgInfo, "Security Status : Dissassociate [AP]\n" );
-                               break;
-
-                         case 2:
-                               DBG_TRACE( DbgInfo, "Security Status : Deauthenticate [AP]\n" );
-                               break;
-
-                         case 3:
-                               DBG_TRACE( DbgInfo, "Security Status : Authenticate Fail [STA] or [AP]\n" );
-                               break;
-
-                         case 4:
-                               DBG_TRACE( DbgInfo, "Security Status : MIC Fail\n" );
-                               break;
-
-                         case 5:
-                               DBG_TRACE( DbgInfo, "Security Status : Associate Fail\n" );
-                               break;
-
-                       default:
-                               DBG_TRACE( DbgInfo, "Security Status : UNKNOWN %d\n",
-                                                  ss->securityStatus );
-                               break;
-                       }
-
-                       DBG_TRACE(DbgInfo, "STA Address     : %pM\n",
-                                       ss->staAddr);
-
-                       DBG_TRACE(DbgInfo, "Reason          : 0x%04x\n",
-                                       ss->reason);
-               }
-
-               break;
-
-         case CFG_WMP:
-               DBG_TRACE( DbgInfo, "CFG_WMP, size is %d bytes\n", ltv->len );
-               {
-                       WMP_RSP_STRCT *wmp_rsp = (WMP_RSP_STRCT *)ltv;
-
-                       DBG_TRACE( DbgInfo, "CFG_WMP, pdu type is 0x%x\n",
-                                          wmp_rsp->wmpRsp.wmpHdr.type );
-
-                       switch( wmp_rsp->wmpRsp.wmpHdr.type ) {
-                         case WVLAN_WMP_PDU_TYPE_LT_RSP:
-                               {
-#if DBG
-                                       LINKTEST_RSP_STRCT  *lt_rsp = (LINKTEST_RSP_STRCT *)ltv;
-#endif // DBG
-                                       DBG_TRACE( DbgInfo, "LINK TEST RESULT\n" );
-                                       DBG_TRACE( DbgInfo, "================\n" );
-                                       DBG_TRACE( DbgInfo, "Length        : %d.\n",     lt_rsp->len );
-
-                                       DBG_TRACE( DbgInfo, "Name          : %s.\n",     lt_rsp->ltRsp.ltRsp.name );
-                                       DBG_TRACE( DbgInfo, "Signal Level  : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.signal );
-                                       DBG_TRACE( DbgInfo, "Noise  Level  : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.noise );
-                                       DBG_TRACE( DbgInfo, "Receive Flow  : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.rxFlow );
-                                       DBG_TRACE( DbgInfo, "Data Rate     : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.dataRate );
-                                       DBG_TRACE( DbgInfo, "Protocol      : 0x%04x.\n", lt_rsp->ltRsp.ltRsp.protocol );
-                                       DBG_TRACE( DbgInfo, "Station       : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.station );
-                                       DBG_TRACE( DbgInfo, "Data Rate Cap : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.dataRateCap );
-
-                                       DBG_TRACE( DbgInfo, "Power Mgmt    : 0x%02x 0x%02x 0x%02x 0x%02x.\n",
-                                                               lt_rsp->ltRsp.ltRsp.powerMgmt[0],
-                                                               lt_rsp->ltRsp.ltRsp.powerMgmt[1],
-                                                               lt_rsp->ltRsp.ltRsp.powerMgmt[2],
-                                                               lt_rsp->ltRsp.ltRsp.powerMgmt[3] );
-
-                                       DBG_TRACE( DbgInfo, "Robustness    : 0x%02x 0x%02x 0x%02x 0x%02x.\n",
-                                                               lt_rsp->ltRsp.ltRsp.robustness[0],
-                                                               lt_rsp->ltRsp.ltRsp.robustness[1],
-                                                               lt_rsp->ltRsp.ltRsp.robustness[2],
-                                                               lt_rsp->ltRsp.ltRsp.robustness[3] );
-
-                                       DBG_TRACE( DbgInfo, "Scaling       : 0x%02x.\n", lt_rsp->ltRsp.ltRsp.scaling );
-                               }
-
-                               break;
-
-                       default:
-                               break;
-                       }
-               }
-
-               break;
-
-         case CFG_NULL:
-               DBG_TRACE( DbgInfo, "CFG_NULL\n" );
-               break;
-
-         case CFG_UPDATED_INFO_RECORD:        // Updated Information Record
-               DBG_TRACE( DbgInfo, "UPDATED INFORMATION RECORD\n" );
-
-               ltv_val = CNV_INT_TO_LITTLE( ltv->u.u16[0] );
-
-               /* Check and see which RID was updated */
-               switch( ltv_val ) {
-                 case CFG_CUR_COUNTRY_INFO:  // Indicate Passive Scan Completion
-                       DBG_TRACE( DbgInfo, "Updated country info\n" );
-
-                       /* Do I need to hold off on updating RIDs until the process is
-                          complete? */
-                       wl_connect( lp );
-                       break;
-
-                 case CFG_PORT_STAT:    // Wait for Connect Event
-                       //wl_connect( lp );
-
-                       break;
-
-               default:
-                       DBG_WARNING( DbgInfo, "Unknown RID: 0x%04x\n", ltv_val );
-               }
-
-               break;
-
-       default:
-               DBG_TRACE( DbgInfo, "UNKNOWN MESSAGE: 0x%04x\n", ltv->typ );
-               break;
-       }
-} // wl_process_mailbox
-/*============================================================================*/
-#endif  /* ifndef USE_MBOX_SYNC */
-
-#ifdef USE_WDS
-/*******************************************************************************
- *     wl_wds_netdev_register()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function registers net_device structures with the system's network
- *      layer for use with the WDS ports.
- *
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netdev_register( struct wl_private *lp )
-{
-       int count;
-
-       //;?why is there no USE_WDS clause like in wl_enable_wds_ports
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-               for( count = 0; count < NUM_WDS_PORTS; count++ ) {
-                       if ( WVLAN_VALID_MAC_ADDRESS( lp->wds_port[count].wdsAddress )) {
-                               if ( register_netdev( lp->wds_port[count].dev ) != 0 ) {
-                                       DBG_WARNING( DbgInfo, "net device for WDS port %d could not be registered\n",
-                                                               ( count + 1 ));
-                               }
-                               lp->wds_port[count].is_registered = TRUE;
-
-                               /* Fill out the net_device structs with the MAC addr */
-                               memcpy( lp->wds_port[count].dev->dev_addr, lp->MACAddress, ETH_ALEN );
-                               lp->wds_port[count].dev->addr_len = ETH_ALEN;
-                       }
-               }
-       }
-} // wl_wds_netdev_register
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_wds_netdev_deregister()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function deregisters the WDS net_device structures used by the
- *      system's network layer.
- *
- *
- *  PARAMETERS:
- *
- *      lp      - pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netdev_deregister( struct wl_private *lp )
-{
-       int count;
-
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-               for( count = 0; count < NUM_WDS_PORTS; count++ ) {
-                       if ( WVLAN_VALID_MAC_ADDRESS( lp->wds_port[count].wdsAddress )) {
-                               unregister_netdev( lp->wds_port[count].dev );
-                       }
-                       lp->wds_port[count].is_registered = FALSE;
-               }
-       }
-} // wl_wds_netdev_deregister
-/*============================================================================*/
-#endif  /* USE_WDS */
-
-
-#if 0 //SCULL_USE_PROC /* don't waste space if unused */
-/*
- * The proc filesystem: function to read and entry
- */
-static void printf_hcf_16(struct seq_file *m, const char *s, hcf_16 *p, int n)
-{
-       int i, len;
-
-       seq_printf(m, "%-20.20s: ", s);
-       len = 22;
-
-       for (i = 0; i < n; i++) {
-               if (len % 80 > 75)
-                       seq_putc(m, '\n');
-               seq_printf(m, "%04X ", p[i]);
-       }
-       seq_putc(m, '\n');
-}
-
-static void printf_hcf_8(struct seq_file *m, const char *s, hcf_8 *p, int n)
-{
-       int i, len;
-
-       seq_printf(m, "%-20.20s: ", s);
-       len = 22;
-
-       for (i = 0; i <= n; i++) {
-               if (len % 80 > 77)
-                       seq_putc(m, '\n');
-               seq_printf(m, "%02X ", p[i]);
-       }
-       seq_putc(m, '\n');
-}
-
-static void printf_strct(struct seq_file *m, const char *s, hcf_16 *p)
-{
-       int i, len;
-
-       seq_printf(m, "%-20.20s: ", s);
-       len = 22;
-
-       for ( i = 0; i <= *p; i++ ) {
-               if (len % 80 > 75)
-                       seq_putc(m, '\n');
-               seq_printf(m,"%04X ", p[i]);
-       }
-       seq_putc(m, '\n');
-}
-
-int scull_read_procmem(struct seq_file *m, void *v)
-{
-       struct wl_private       *lp = m->private;
-       IFBP                            ifbp;
-       CFG_HERMES_TALLIES_STRCT *p;
-
-       if (lp == NULL) {
-               seq_puts(m, "No wl_private in scull_read_procmem\n" );
-       } else if ( lp->wlags49_type == 0 ){
-               ifbp = &lp->hcfCtx;
-               seq_printf(m, "Magic:               0x%04X\n", ifbp->IFB_Magic );
-               seq_printf(m, "IOBase:              0x%04X\n", ifbp->IFB_IOBase );
-               seq_printf(m, "LinkStat:            0x%04X\n", ifbp->IFB_LinkStat );
-               seq_printf(m, "DSLinkStat:          0x%04X\n", ifbp->IFB_DSLinkStat );
-               seq_printf(m, "TickIni:         0x%08lX\n", ifbp->IFB_TickIni );
-               seq_printf(m, "TickCnt:             0x%04X\n", ifbp->IFB_TickCnt );
-               seq_printf(m, "IntOffCnt:           0x%04X\n", ifbp->IFB_IntOffCnt );
-               printf_hcf_16(m, "IFB_FWIdentity",
-                             &ifbp->IFB_FWIdentity.len, ifbp->IFB_FWIdentity.len + 1 );
-       } else if ( lp->wlags49_type == 1 ) {
-               seq_printf(m, "Channel:              0x%04X\n", lp->Channel );
-/****** seq_printf(m, "slock:                  %d\n", lp->slock );             */
-//x            struct tq_struct            "task:               0x%04X\n", lp->task );
-//x            struct net_device_stats     "stats:              0x%04X\n", lp->stats );
-#ifdef WIRELESS_EXT
-//x            struct iw_statistics        "wstats:             0x%04X\n", lp->wstats );
-//x        seq_printf(m, "spy_number:           0x%04X\n", lp->spy_number );
-//x            u_char                      spy_address[IW_MAX_SPY][ETH_ALEN];
-//x            struct iw_quality           spy_stat[IW_MAX_SPY];
-#endif // WIRELESS_EXT
-               seq_printf(m, "IFB:                  0x%p\n", &lp->hcfCtx );
-               seq_printf(m, "flags:                %#.8lX\n", lp->flags );  //;?use this format from now on
-               seq_printf(m, "DebugFlag(wl_private) 0x%04X\n", lp->DebugFlag );
-#if DBG
-               seq_printf(m, "DebugFlag (DbgInfo):   0x%08lX\n", DbgInfo->DebugFlag );
-#endif // DBG
-               seq_printf(m, "is_registered:        0x%04X\n", lp->is_registered );
-//x            CFG_DRV_INFO_STRCT          "driverInfo:         0x%04X\n", lp->driverInfo );
-               printf_strct( m, "driverInfo", (hcf_16*)&lp->driverInfo );
-//x            CFG_IDENTITY_STRCT          "driverIdentity:     0x%04X\n", lp->driverIdentity );
-               printf_strct( m, "driverIdentity", (hcf_16*)&lp->driverIdentity );
-//x            CFG_FW_IDENTITY_STRCT       "StationIdentity:    0x%04X\n", lp->StationIdentity );
-               printf_strct( m, "StationIdentity", (hcf_16*)&lp->StationIdentity );
-//x            CFG_PRI_IDENTITY_STRCT      "PrimaryIdentity:    0x%04X\n", lp->PrimaryIdentity );
-               printf_strct( m, "PrimaryIdentity", (hcf_16*)&lp->hcfCtx.IFB_PRIIdentity );
-               printf_strct( m, "PrimarySupplier", (hcf_16*)&lp->hcfCtx.IFB_PRISup );
-//x            CFG_PRI_IDENTITY_STRCT      "NICIdentity:        0x%04X\n", lp->NICIdentity );
-               printf_strct( m, "NICIdentity", (hcf_16*)&lp->NICIdentity );
-//x            ltv_t                       "ltvRecord:          0x%04X\n", lp->ltvRecord );
-               seq_printf(m, "txBytes:              0x%08lX\n", lp->txBytes );
-               seq_printf(m, "maxPort:              0x%04X\n", lp->maxPort );        /* 0 for STA, 6 for AP */
-               /* Elements used for async notification from hardware */
-//x            RID_LOG_STRCT                           RidList[10];
-//x            ltv_t                       "updatedRecord:      0x%04X\n", lp->updatedRecord );
-//x            PROBE_RESP                                  "ProbeResp:                    0x%04X\n", lp->ProbeResp );
-//x            ASSOC_STATUS_STRCT          "assoc_stat:         0x%04X\n", lp->assoc_stat );
-//x            SECURITY_STATUS_STRCT       "sec_stat:           0x%04X\n", lp->sec_stat );
-//x            u_char                      lookAheadBuf[WVLAN_MAX_LOOKAHEAD];
-               seq_printf(m, "PortType:             0x%04X\n", lp->PortType );           // 1 - 3 (1 [Normal] | 3 [AdHoc])
-               seq_printf(m, "Channel:              0x%04X\n", lp->Channel );            // 0 - 14 (0)
-//x            hcf_16                      TxRateControl[2];
-               seq_printf(m, "TxRateControl[2]:     0x%04X 0x%04X\n",
-                              lp->TxRateControl[0], lp->TxRateControl[1] );
-               seq_printf(m, "DistanceBetweenAPs:   0x%04X\n", lp->DistanceBetweenAPs ); // 1 - 3 (1)
-               seq_printf(m, "RTSThreshold:         0x%04X\n", lp->RTSThreshold );       // 0 - 2347 (2347)
-               seq_printf(m, "PMEnabled:            0x%04X\n", lp->PMEnabled );          // 0 - 2, 8001 - 8002 (0)
-               seq_printf(m, "MicrowaveRobustness:  0x%04X\n", lp->MicrowaveRobustness );// 0 - 1 (0)
-               seq_printf(m, "CreateIBSS:           0x%04X\n", lp->CreateIBSS );         // 0 - 1 (0)
-               seq_printf(m, "MulticastReceive:     0x%04X\n", lp->MulticastReceive );   // 0 - 1 (1)
-               seq_printf(m, "MaxSleepDuration:     0x%04X\n", lp->MaxSleepDuration );   // 0 - 65535 (100)
-//x            hcf_8                       MACAddress[ETH_ALEN];
-               printf_hcf_8(m, "MACAddress", lp->MACAddress, ETH_ALEN );
-//x            char                        NetworkName[HCF_MAX_NAME_LEN+1];
-               seq_printf(m, "NetworkName:          %.32s\n", lp->NetworkName );
-//x            char                        StationName[HCF_MAX_NAME_LEN+1];
-               seq_printf(m, "EnableEncryption:     0x%04X\n", lp->EnableEncryption );   // 0 - 1 (0)
-//x            char                        Key1[MAX_KEY_LEN+1];
-               printf_hcf_8( m, "Key1", lp->Key1, MAX_KEY_LEN );
-//x            char                        Key2[MAX_KEY_LEN+1];
-//x            char                        Key3[MAX_KEY_LEN+1];
-//x            char                        Key4[MAX_KEY_LEN+1];
-               seq_printf(m, "TransmitKeyID:        0x%04X\n", lp->TransmitKeyID );      // 1 - 4 (1)
-//x            CFG_DEFAULT_KEYS_STRCT      "DefaultKeys:         0x%04X\n", lp->DefaultKeys );
-//x            u_char                      mailbox[MB_SIZE];
-//x            char                        szEncryption[MAX_ENC_LEN];
-               seq_printf(m, "driverEnable:         0x%04X\n", lp->driverEnable );
-               seq_printf(m, "wolasEnable:          0x%04X\n", lp->wolasEnable );
-               seq_printf(m, "atimWindow:           0x%04X\n", lp->atimWindow );
-               seq_printf(m, "holdoverDuration:     0x%04X\n", lp->holdoverDuration );
-//x            hcf_16                      MulticastRate[2];
-               seq_printf(m, "authentication:       0x%04X\n", lp->authentication ); // is this AP specific?
-               seq_printf(m, "promiscuousMode:      0x%04X\n", lp->promiscuousMode );
-               seq_printf(m, "DownloadFirmware:     0x%04X\n", lp->DownloadFirmware );   // 0 - 2 (0 [None] | 1 [STA] | 2 [AP])
-               seq_printf(m, "AuthKeyMgmtSuite:     0x%04X\n", lp->AuthKeyMgmtSuite );
-               seq_printf(m, "loadBalancing:        0x%04X\n", lp->loadBalancing );
-               seq_printf(m, "mediumDistribution:   0x%04X\n", lp->mediumDistribution );
-               seq_printf(m, "txPowLevel:           0x%04X\n", lp->txPowLevel );
-//         seq_printf(m, "shortRetryLimit:    0x%04X\n", lp->shortRetryLimit );
-//         seq_printf(m, "longRetryLimit:     0x%04X\n", lp->longRetryLimit );
-//x            hcf_16                      srsc[2];
-//x            hcf_16                      brsc[2];
-               seq_printf(m, "connectionControl:    0x%04X\n", lp->connectionControl );
-//x            //hcf_16                      probeDataRates[2];
-               seq_printf(m, "ownBeaconInterval:    0x%04X\n", lp->ownBeaconInterval );
-               seq_printf(m, "coexistence:          0x%04X\n", lp->coexistence );
-//x            WVLAN_FRAME                 "txF:                0x%04X\n", lp->txF );
-//x            WVLAN_LFRAME                txList[DEFAULT_NUM_TX_FRAMES];
-//x            struct list_head            "txFree:             0x%04X\n", lp->txFree );
-//x            struct list_head            txQ[WVLAN_MAX_TX_QUEUES];
-               seq_printf(m, "netif_queue_on:       0x%04X\n", lp->netif_queue_on );
-               seq_printf(m, "txQ_count:            0x%04X\n", lp->txQ_count );
-//x            DESC_STRCT                  "desc_rx:            0x%04X\n", lp->desc_rx );
-//x            DESC_STRCT                  "desc_tx:            0x%04X\n", lp->desc_tx );
-//x            WVLAN_PORT_STATE            "portState:          0x%04X\n", lp->portState );
-//x            ScanResult                  "scan_results:       0x%04X\n", lp->scan_results );
-//x            ProbeResult                 "probe_results:      0x%04X\n", lp->probe_results );
-               seq_printf(m, "probe_num_aps:        0x%04X\n", lp->probe_num_aps );
-               seq_printf(m, "use_dma:              0x%04X\n", lp->use_dma );
-//x            DMA_STRCT                   "dma:                0x%04X\n", lp->dma );
-#ifdef USE_RTS
-               seq_printf(m, "useRTS:               0x%04X\n", lp->useRTS );
-#endif  // USE_RTS
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_AP
-               //;?should we restore this to allow smaller memory footprint
-               //;?I guess not. This should be brought under Debug mode only
-               seq_printf(m, "DTIMPeriod:           0x%04X\n", lp->DTIMPeriod );         // 1 - 255 (1)
-               seq_printf(m, "multicastPMBuffering: 0x%04X\n", lp->multicastPMBuffering );
-               seq_printf(m, "RejectAny:            0x%04X\n", lp->RejectAny );          // 0 - 1 (0)
-               seq_printf(m, "ExcludeUnencrypted:   0x%04X\n", lp->ExcludeUnencrypted ); // 0 - 1 (1)
-               seq_printf(m, "intraBSSRelay:        0x%04X\n", lp->intraBSSRelay );
-               seq_printf(m, "wlags49_type:             0x%08lX\n", lp->wlags49_type );
-#ifdef USE_WDS
-//x            WVLAN_WDS_IF                wds_port[NUM_WDS_PORTS];
-#endif // USE_WDS
-#endif // HCF_AP
-       } else if ( lp->wlags49_type == 2 ){
-               seq_printf(m, "tallies to be added\n" );
-//Hermes Tallies (IFB substructure) {
-               p = &lp->hcfCtx.IFB_NIC_Tallies;
-               seq_printf(m, "TxUnicastFrames:          %08lX\n", p->TxUnicastFrames );
-               seq_printf(m, "TxMulticastFrames:        %08lX\n", p->TxMulticastFrames );
-               seq_printf(m, "TxFragments:              %08lX\n", p->TxFragments );
-               seq_printf(m, "TxUnicastOctets:          %08lX\n", p->TxUnicastOctets );
-               seq_printf(m, "TxMulticastOctets:        %08lX\n", p->TxMulticastOctets );
-               seq_printf(m, "TxDeferredTransmissions:  %08lX\n", p->TxDeferredTransmissions );
-               seq_printf(m, "TxSingleRetryFrames:      %08lX\n", p->TxSingleRetryFrames );
-               seq_printf(m, "TxMultipleRetryFrames:    %08lX\n", p->TxMultipleRetryFrames );
-               seq_printf(m, "TxRetryLimitExceeded:     %08lX\n", p->TxRetryLimitExceeded );
-               seq_printf(m, "TxDiscards:               %08lX\n", p->TxDiscards );
-               seq_printf(m, "RxUnicastFrames:          %08lX\n", p->RxUnicastFrames );
-               seq_printf(m, "RxMulticastFrames:        %08lX\n", p->RxMulticastFrames );
-               seq_printf(m, "RxFragments:              %08lX\n", p->RxFragments );
-               seq_printf(m, "RxUnicastOctets:          %08lX\n", p->RxUnicastOctets );
-               seq_printf(m, "RxMulticastOctets:        %08lX\n", p->RxMulticastOctets );
-               seq_printf(m, "RxFCSErrors:              %08lX\n", p->RxFCSErrors );
-               seq_printf(m, "RxDiscardsNoBuffer:       %08lX\n", p->RxDiscardsNoBuffer );
-               seq_printf(m, "TxDiscardsWrongSA:        %08lX\n", p->TxDiscardsWrongSA );
-               seq_printf(m, "RxWEPUndecryptable:       %08lX\n", p->RxWEPUndecryptable );
-               seq_printf(m, "RxMsgInMsgFragments:      %08lX\n", p->RxMsgInMsgFragments );
-               seq_printf(m, "RxMsgInBadMsgFragments:   %08lX\n", p->RxMsgInBadMsgFragments );
-               seq_printf(m, "RxDiscardsWEPICVError:    %08lX\n", p->RxDiscardsWEPICVError );
-               seq_printf(m, "RxDiscardsWEPExcluded:    %08lX\n", p->RxDiscardsWEPExcluded );
-#if (HCF_EXT) & HCF_EXT_TALLIES_FW
-               //to be added ;?
-#endif // HCF_EXT_TALLIES_FW
-       } else if ( lp->wlags49_type & 0x8000 ) {       //;?kludgy but it is unclear to me were else to place this
-#if DBG
-               DbgInfo->DebugFlag = lp->wlags49_type & 0x7FFF;
-#endif // DBG
-               lp->wlags49_type = 0;                           //default to IFB again ;?
-       } else {
-               seq_printf(m, "unknown value for wlags49_type: 0x%08lX\n", lp->wlags49_type );
-               seq_puts(m,
-                        "0x0000 - IFB\n"
-                        "0x0001 - wl_private\n"
-                        "0x0002 - Tallies\n"
-                        "0x8xxx - Change debufflag\n"
-                        "ERROR    0001\nWARNING  0002\nNOTICE   0004\nTRACE    0008\n"
-                        "VERBOSE  0010\nPARAM    0020\nBREAK    0040\nRX       0100\n"
-                        "TX       0200\nDS       0400\n");
-       }
-       return 0;
-} // scull_read_procmem
-
-static int write_int(struct file *file, const char *buffer, unsigned long count, void *data)
-{
-       static char             proc_number[11];
-       unsigned int    nr = 0;
-
-       if (count > 9) {
-               count = -EINVAL;
-       } else if ( copy_from_user(proc_number, buffer, count) ) {
-               count = -EFAULT;
-       }
-       if  (count > 0 ) {
-               proc_number[count] = 0;
-               nr = simple_strtoul(proc_number , NULL, 0);
-               *(unsigned int *)data = nr;
-               if ( nr & 0x8000 ) {    //;?kludgy but it is unclear to me were else to place this
-#if DBG
-                       DbgInfo->DebugFlag = nr & 0x7FFF;
-#endif // DBG
-               }
-       }
-       DBG_PRINT( "value: %08X\n", nr );
-       return count;
-} // write_int
-
-#endif /* SCULL_USE_PROC */
-
-#ifdef DN554
-#define RUN_AT(x)              (jiffies+(x))           //"borrowed" from include/pcmcia/k_compat.h
-#define DS_OOR 0x8000          //Deepsleep OutOfRange Status
-
-               lp->timer_oor_cnt = DS_OOR;
-               init_timer( &lp->timer_oor );
-               lp->timer_oor.function = timer_oor;
-               lp->timer_oor.data = (unsigned long)lp;
-               lp->timer_oor.expires = RUN_AT( 3 * HZ );
-               add_timer( &lp->timer_oor );
-               printk(KERN_NOTICE "wl_enable: %ld\n", jiffies );               //;?remove me 1 day
-#endif //DN554
-#ifdef DN554
-/*******************************************************************************
- *     timer_oor()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *
- *  PARAMETERS:
- *
- *      arg - a u_long representing a pointer to a dev_link_t structure for the
- *            device to be released.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void timer_oor( u_long arg )
-{
-       struct wl_private       *lp = (struct wl_private *)arg;
-
-    DBG_PARAM( DbgInfo, "arg", "0x%08lx", arg );
-
-       printk(KERN_NOTICE "timer_oor: %ld 0x%04X\n", jiffies, lp->timer_oor_cnt );             //;?remove me 1 day
-       lp->timer_oor_cnt += 10;
-    if ( (lp->timer_oor_cnt & ~DS_OOR) > 300 ) {
-               lp->timer_oor_cnt = 300;
-       }
-       lp->timer_oor_cnt |= DS_OOR;
-       init_timer( &lp->timer_oor );
-       lp->timer_oor.function = timer_oor;
-       lp->timer_oor.data = (unsigned long)lp;
-       lp->timer_oor.expires = RUN_AT( (lp->timer_oor_cnt & ~DS_OOR) * HZ );
-       add_timer( &lp->timer_oor );
-} // timer_oor
-#endif //DN554
-
-MODULE_LICENSE("Dual BSD/GPL");
diff --git a/drivers/staging/wlags49_h2/wl_main.h b/drivers/staging/wlags49_h2/wl_main.h
deleted file mode 100644 (file)
index 3806e74..0000000
+++ /dev/null
@@ -1,138 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing device specific routines and driver init/un-init.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_MAIN_H__
-#define __WL_MAIN_H__
-
-
-
-
-/*******************************************************************************
- *  function prototypes
- ******************************************************************************/
-int wl_insert( struct net_device *dev );
-
-void wl_set_wep_keys( struct wl_private *lp );
-
-int wl_put_ltv_init( struct wl_private *lp );
-
-int wl_put_ltv( struct wl_private *lp );
-
-p_u16 wl_get_irq_mask( void );
-
-p_s8 * wl_get_irq_list( void );
-
-int wl_reset( struct net_device *dev );
-
-int wl_go( struct wl_private *lp );
-
-int wl_apply( struct wl_private *lp );
-
-irqreturn_t wl_isr( int irq, void *dev_id, struct pt_regs *regs );
-
-void wl_remove( struct net_device *dev );
-
-void wl_suspend( struct net_device *dev );
-
-void wl_resume( struct net_device *dev );
-
-void wl_release( struct net_device *dev );
-
-int wl_enable( struct wl_private *lp );
-
-int wl_connect( struct wl_private *lp );
-
-int wl_disable( struct wl_private *lp );
-
-int wl_disconnect( struct wl_private *lp );
-
-void wl_enable_wds_ports( struct wl_private * lp );
-
-void wl_disable_wds_ports( struct wl_private * lp );
-
-#ifndef USE_MBOX_SYNC
-
-int wl_mbx( struct wl_private *lp );
-void wl_endian_translate_mailbox( ltv_t *ltv );
-void wl_process_mailbox( struct wl_private *lp );
-
-#endif  /* USE_MBOX_SYNC */
-
-
-#ifdef USE_WDS
-
-void wl_wds_netdev_register( struct wl_private *lp );
-void wl_wds_netdev_deregister( struct wl_private *lp );
-
-#endif  /* USE_WDS */
-
-
-#ifdef USE_WDS
-
-#define WL_WDS_NETDEV_REGISTER( ARG )   wl_wds_netdev_register( ARG )
-#define WL_WDS_NETDEV_DEREGISTER( ARG ) wl_wds_netdev_deregister( ARG )
-
-#else
-
-#define WL_WDS_NETDEV_REGISTER( ARG )
-#define WL_WDS_NETDEV_DEREGISTER( ARG )
-
-#endif  /* USE_WDS */
-#endif  /* __WL_MAIN_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_netdev.c b/drivers/staging/wlags49_h2/wl_netdev.c
deleted file mode 100644 (file)
index a10d014..0000000
+++ /dev/null
@@ -1,1951 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file contains handler functions registered with the net_device
- *   structure.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- * include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/module.h>
-#include <linux/slab.h>
-#include <linux/types.h>
-#include <linux/kernel.h>
-#include <linux/netdevice.h>
-#include <linux/ethtool.h>
-#include <linux/etherdevice.h>
-
-#include <debug.h>
-
-#include <hcf.h>
-#include <dhf.h>
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_util.h>
-#include <wl_priv.h>
-#include <wl_main.h>
-#include <wl_netdev.h>
-#include <wl_wext.h>
-
-#ifdef USE_PROFILE
-#include <wl_profile.h>
-#endif /* USE_PROFILE */
-
-#ifdef BUS_PCMCIA
-#include <wl_cs.h>
-#endif /* BUS_PCMCIA */
-
-#ifdef BUS_PCI
-#include <wl_pci.h>
-#endif /* BUS_PCI */
-
-#if HCF_ENCAP
-#define MTU_MAX (HCF_MAX_MSG - ETH_HLEN - 8)
-#else
-#define MTU_MAX (HCF_MAX_MSG - ETH_HLEN)
-#endif
-
-/*******************************************************************************
- * macros
- ******************************************************************************/
-#define BLOCK_INPUT(buf, len) \
-       do { \
-               desc->buf_addr = buf; \
-               desc->BUF_SIZE = len; \
-               status = hcf_rcv_msg(&(lp->hcfCtx), desc, 0); \
-       } while (0)
-
-#define BLOCK_INPUT_DMA(buf, len) memcpy( buf, desc_next->buf_addr, pktlen )
-
-/*******************************************************************************
- * function prototypes
- ******************************************************************************/
-
-/*******************************************************************************
- *     wl_init()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      We never need to do anything when a "Wireless" device is "initialized"
- *  by the net software, because we only register already-found cards.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wl_init(struct net_device *dev)
-{
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-       return 0;
-}                              /* wl_init */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_config()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Implement the SIOCSIFMAP interface.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *      map - a pointer to the device's ifmap structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno otherwise
- *
- ******************************************************************************/
-int wl_config(struct net_device *dev, struct ifmap *map)
-{
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-       DBG_PARAM(DbgInfo, "map", "0x%p", map);
-
-       /*
-        * The only thing we care about here is a port change.
-        * Since this not needed, ignore the request. 
-        */
-       DBG_TRACE(DbgInfo, "%s: %s called.\n", dev->name, __func__);
-
-       return 0;
-}                              /* wl_config */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_stats()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Return the current device statistics.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      a pointer to a net_device_stats structure containing the network
- *      statistics.
- *
- ******************************************************************************/
-struct net_device_stats *wl_stats(struct net_device *dev)
-{
-#ifdef USE_WDS
-       int count;
-#endif /* USE_WDS */
-       unsigned long flags;
-       struct net_device_stats *pStats;
-       struct wl_private *lp = wl_priv(dev);
-
-       /*DBG_PARAM( DbgInfo, "dev", "%s (0x%p)", dev->name, dev ); */
-
-       pStats = NULL;
-
-       wl_lock(lp, &flags);
-
-#ifdef USE_RTS
-       if (lp->useRTS == 1) {
-               wl_unlock(lp, &flags);
-               return NULL;
-       }
-#endif /* USE_RTS */
-
-       /* Return the statistics for the appropriate device */
-#ifdef USE_WDS
-
-       for (count = 0; count < NUM_WDS_PORTS; count++) {
-               if (dev == lp->wds_port[count].dev)
-                       pStats = &(lp->wds_port[count].stats);
-       }
-
-#endif /* USE_WDS */
-
-       /* If pStats is still NULL, then the device is not a WDS port */
-       if (pStats == NULL)
-               pStats = &(lp->stats);
-
-       wl_unlock(lp, &flags);
-
-       return pStats;
-}                              /* wl_stats */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_open()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Open the device.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno otherwise
- *
- ******************************************************************************/
-int wl_open(struct net_device *dev)
-{
-       int status = HCF_SUCCESS;
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-
-       wl_lock(lp, &flags);
-
-#ifdef USE_RTS
-       if (lp->useRTS == 1) {
-               DBG_TRACE(DbgInfo, "Skipping device open, in RTS mode\n");
-               wl_unlock(lp, &flags);
-               return -EIO;
-       }
-#endif /* USE_RTS */
-
-#ifdef USE_PROFILE
-       parse_config(dev);
-#endif
-
-       if (lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               DBG_TRACE(DbgInfo, "Enabling Port 0\n");
-               status = wl_enable(lp);
-
-               if (status != HCF_SUCCESS) {
-                       DBG_TRACE(DbgInfo, "Enable port 0 failed: 0x%x\n",
-                                 status);
-               }
-       }
-
-       /* Holding the lock too long, make a gap to allow other processes */
-       wl_unlock(lp, &flags);
-       wl_lock(lp, &flags);
-
-       if (strlen(lp->fw_image_filename)) {
-               DBG_TRACE(DbgInfo, ";???? Kludgy way to force a download\n");
-               status = wl_go(lp);
-       } else {
-               status = wl_apply(lp);
-       }
-
-       /* Holding the lock too long, make a gap to allow other processes */
-       wl_unlock(lp, &flags);
-       wl_lock(lp, &flags);
-
-       /* Unsuccessful, try reset of the card to recover */
-       if (status != HCF_SUCCESS)
-               status = wl_reset(dev);
-
-       /* Holding the lock too long, make a gap to allow other processes */
-       wl_unlock(lp, &flags);
-       wl_lock(lp, &flags);
-
-       if (status == HCF_SUCCESS) {
-               netif_carrier_on(dev);
-               WL_WDS_NETIF_CARRIER_ON(lp);
-
-               /* Start handling interrupts */
-               lp->is_handling_int = WL_HANDLING_INT;
-               wl_act_int_on(lp);
-
-               netif_start_queue(dev);
-               WL_WDS_NETIF_START_QUEUE(lp);
-       } else {
-               wl_hcf_error(dev, status);      /* Report the error */
-               netif_device_detach(dev);       /* Stop the device and queue */
-       }
-
-       wl_unlock(lp, &flags);
-
-       return status;
-}                              /* wl_open */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_close()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Close the device.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno otherwise
- *
- ******************************************************************************/
-int wl_close(struct net_device *dev)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       /* Mark the adapter as busy */
-       netif_stop_queue(dev);
-       WL_WDS_NETIF_STOP_QUEUE(lp);
-
-       netif_carrier_off(dev);
-       WL_WDS_NETIF_CARRIER_OFF(lp);
-
-       /*
-        * Shutdown the adapter:
-        * Disable adapter interrupts
-        * Stop Tx/Rx
-        * Update statistics
-        * Set low power mode
-        */
-
-       wl_lock(lp, &flags);
-
-       wl_act_int_off(lp);
-       /* Stop handling interrupts */
-       lp->is_handling_int = WL_NOT_HANDLING_INT;
-
-#ifdef USE_RTS
-       if (lp->useRTS == 1) {
-               DBG_TRACE(DbgInfo, "Skipping device close, in RTS mode\n");
-               wl_unlock(lp, &flags);
-               return -EIO;
-       }
-#endif /* USE_RTS */
-
-       /* Disable the ports */
-       wl_disable(lp);
-
-       wl_unlock(lp, &flags);
-
-       return 0;
-}                              /* wl_close */
-
-/*============================================================================*/
-
-static void wl_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info)
-{
-       strlcpy(info->driver, DRIVER_NAME, sizeof(info->driver));
-       strlcpy(info->version, DRV_VERSION_STR, sizeof(info->version));
-
-       if (dev->dev.parent) {
-               dev_set_name(dev->dev.parent, "%s", info->bus_info);
-       } else {
-               snprintf(info->bus_info, sizeof(info->bus_info),
-                        "PCMCIA FIXME");
-       }
-}                              /* wl_get_drvinfo */
-
-static struct ethtool_ops wl_ethtool_ops = {
-       .get_drvinfo = wl_get_drvinfo,
-       .get_link = ethtool_op_get_link,
-};
-
-/*******************************************************************************
- *     wl_ioctl()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The IOCTL handler for the device.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device struct.
- *      rq  - a pointer to the IOCTL request buffer.
- *      cmd - the IOCTL command code.
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-       DBG_PARAM(DbgInfo, "rq", "0x%p", rq);
-       DBG_PARAM(DbgInfo, "cmd", "0x%04x", cmd);
-
-       wl_lock(lp, &flags);
-
-       wl_act_int_off(lp);
-
-#ifdef USE_RTS
-       if (lp->useRTS == 1) {
-               /* Handle any RTS IOCTL here */
-               if (cmd == WL_IOCTL_RTS) {
-                       DBG_TRACE(DbgInfo, "IOCTL: WL_IOCTL_RTS\n");
-                       ret = wvlan_rts((struct rtsreq *)rq, dev->base_addr);
-               } else {
-                       DBG_TRACE(DbgInfo,
-                                 "IOCTL not supported in RTS mode: 0x%X\n",
-                                 cmd);
-                       ret = -EOPNOTSUPP;
-               }
-
-               goto out_act_int_on_unlock;
-       }
-#endif /* USE_RTS */
-
-       /* Only handle UIL IOCTL requests when the UIL has the system blocked. */
-       if (!((lp->flags & WVLAN2_UIL_BUSY) && (cmd != WVLAN2_IOCTL_UIL))) {
-#ifdef USE_UIL
-               struct uilreq *urq = (struct uilreq *)rq;
-#endif /* USE_UIL */
-
-               switch (cmd) {
-                       /* ================== Private IOCTLs (up to 16) ================== */
-#ifdef USE_UIL
-               case WVLAN2_IOCTL_UIL:
-                       DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL\n");
-                       ret = wvlan_uil(urq, lp);
-                       break;
-#endif /* USE_UIL */
-
-               default:
-                       DBG_TRACE(DbgInfo, "IOCTL CODE NOT SUPPORTED: 0x%X\n",
-                                 cmd);
-                       ret = -EOPNOTSUPP;
-                       break;
-               }
-       } else {
-               DBG_WARNING(DbgInfo,
-                           "DEVICE IS BUSY, CANNOT PROCESS REQUEST\n");
-               ret = -EBUSY;
-       }
-
-#ifdef USE_RTS
-out_act_int_on_unlock:
-#endif /* USE_RTS */
-       wl_act_int_on(lp);
-
-       wl_unlock(lp, &flags);
-
-       return ret;
-}                              /* wl_ioctl */
-
-/*============================================================================*/
-
-#ifdef CONFIG_NET_POLL_CONTROLLER
-static void wl_poll(struct net_device *dev)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       struct pt_regs regs;
-
-       wl_lock(lp, &flags);
-       wl_isr(dev->irq, dev, &regs);
-       wl_unlock(lp, &flags);
-}
-#endif
-
-/*******************************************************************************
- *     wl_tx_timeout()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler called when, for some reason, a Tx request is not completed.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device struct.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_tx_timeout(struct net_device *dev)
-{
-#ifdef USE_WDS
-       int count;
-#endif /* USE_WDS */
-       unsigned long flags;
-       struct wl_private *lp = wl_priv(dev);
-       struct net_device_stats *pStats = NULL;
-
-       DBG_WARNING(DbgInfo, "%s: Transmit timeout.\n", dev->name);
-
-       wl_lock(lp, &flags);
-
-#ifdef USE_RTS
-       if (lp->useRTS == 1) {
-               DBG_TRACE(DbgInfo,
-                         "Skipping tx_timeout handler, in RTS mode\n");
-               wl_unlock(lp, &flags);
-               return;
-       }
-#endif /* USE_RTS */
-
-       /* Figure out which device (the "root" device or WDS port) this timeout
-          is for */
-#ifdef USE_WDS
-
-       for (count = 0; count < NUM_WDS_PORTS; count++) {
-               if (dev == lp->wds_port[count].dev) {
-                       pStats = &(lp->wds_port[count].stats);
-
-                       /* Break the loop so that we can use the counter to access WDS
-                          information in the private structure */
-                       break;
-               }
-       }
-
-#endif /* USE_WDS */
-
-       /* If pStats is still NULL, then the device is not a WDS port */
-       if (pStats == NULL)
-               pStats = &(lp->stats);
-
-       /* Accumulate the timeout error */
-       pStats->tx_errors++;
-
-       wl_unlock(lp, &flags);
-}                              /* wl_tx_timeout */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_send()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The routine which performs data transmits.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's wl_private struct.
- *
- *  RETURNS:
- *
- *      0 on success
- *      1 on error
- *
- ******************************************************************************/
-int wl_send(struct wl_private *lp)
-{
-
-       int status;
-       DESC_STRCT *desc;
-       WVLAN_LFRAME *txF = NULL;
-       struct list_head *element;
-       int len;
-    /*------------------------------------------------------------------------*/
-
-       if (lp == NULL) {
-               DBG_ERROR(DbgInfo, "Private adapter struct is NULL\n");
-               return FALSE;
-       }
-       if (lp->dev == NULL) {
-               DBG_ERROR(DbgInfo, "net_device struct in wl_private is NULL\n");
-               return FALSE;
-       }
-
-       /*
-        * Check for the availability of FIDs; if none are available,
-        * don't take any frames off the txQ
-        */
-       if (lp->hcfCtx.IFB_RscInd == 0)
-               return FALSE;
-
-       /* Reclaim the TxQ Elements and place them back on the free queue */
-       if (!list_empty(&(lp->txQ[0]))) {
-               element = lp->txQ[0].next;
-
-               txF = (WVLAN_LFRAME *) list_entry(element, WVLAN_LFRAME, node);
-               if (txF != NULL) {
-                       lp->txF.skb = txF->frame.skb;
-                       lp->txF.port = txF->frame.port;
-
-                       txF->frame.skb = NULL;
-                       txF->frame.port = 0;
-
-                       list_del(&(txF->node));
-                       list_add(element, &(lp->txFree));
-
-                       lp->txQ_count--;
-
-                       if (lp->txQ_count < TX_Q_LOW_WATER_MARK) {
-                               if (lp->netif_queue_on == FALSE) {
-                                       DBG_TX(DbgInfo, "Kickstarting Q: %d\n",
-                                              lp->txQ_count);
-                                       netif_wake_queue(lp->dev);
-                                       WL_WDS_NETIF_WAKE_QUEUE(lp);
-                                       lp->netif_queue_on = TRUE;
-                               }
-                       }
-               }
-       }
-
-       if (lp->txF.skb == NULL)
-               return FALSE;
-
-       /* If the device has resources (FIDs) available, then Tx the packet */
-       /* Format the TxRequest and send it to the adapter */
-       len = lp->txF.skb->len < ETH_ZLEN ? ETH_ZLEN : lp->txF.skb->len;
-
-       desc = &(lp->desc_tx);
-       desc->buf_addr = lp->txF.skb->data;
-       desc->BUF_CNT = len;
-       desc->next_desc_addr = NULL;
-
-       status = hcf_send_msg(&(lp->hcfCtx), desc, lp->txF.port);
-
-       if (status == HCF_SUCCESS) {
-               lp->dev->trans_start = jiffies;
-
-               DBG_TX(DbgInfo, "Transmit...\n");
-
-               if (lp->txF.port == HCF_PORT_0) {
-                       lp->stats.tx_packets++;
-                       lp->stats.tx_bytes += lp->txF.skb->len;
-               }
-#ifdef USE_WDS
-               else {
-                       lp->wds_port[((lp->txF.port >> 8) -
-                                     1)].stats.tx_packets++;
-                       lp->wds_port[((lp->txF.port >> 8) -
-                                     1)].stats.tx_bytes += lp->txF.skb->len;
-               }
-
-#endif /* USE_WDS */
-
-               /* Free the skb and perform queue cleanup, as the buffer was
-                  transmitted successfully */
-               dev_consume_skb_any( lp->txF.skb );
-
-               lp->txF.skb = NULL;
-               lp->txF.port = 0;
-       }
-
-       return TRUE;
-}                              /* wl_send */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The Tx handler function for the network layer.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff structure containing the data to transfer.
- *      dev - a pointer to the device's net_device structure.
- *
- *  RETURNS:
- *
- *      0 on success
- *      1 on error
- *
- ******************************************************************************/
-int wl_tx(struct sk_buff *skb, struct net_device *dev, int port)
-{
-       unsigned long flags;
-       struct wl_private *lp = wl_priv(dev);
-       WVLAN_LFRAME *txF = NULL;
-       struct list_head *element;
-    /*------------------------------------------------------------------------*/
-
-       /* Grab the spinlock */
-       wl_lock(lp, &flags);
-
-       if (lp->flags & WVLAN2_UIL_BUSY) {
-               DBG_WARNING(DbgInfo, "UIL has device blocked\n");
-               /* Start dropping packets here??? */
-               wl_unlock(lp, &flags);
-               return 1;
-       }
-#ifdef USE_RTS
-       if (lp->useRTS == 1) {
-               DBG_PRINT("RTS: we're getting a Tx...\n");
-               wl_unlock(lp, &flags);
-               return 1;
-       }
-#endif /* USE_RTS */
-
-       if (!lp->use_dma) {
-               /* Get an element from the queue */
-               element = lp->txFree.next;
-               txF = (WVLAN_LFRAME *) list_entry(element, WVLAN_LFRAME, node);
-               if (txF == NULL) {
-                       DBG_ERROR(DbgInfo, "Problem with list_entry\n");
-                       wl_unlock(lp, &flags);
-                       return 1;
-               }
-               /* Fill out the frame */
-               txF->frame.skb = skb;
-               txF->frame.port = port;
-               /* Move the frame to the txQ */
-               /* NOTE: Here's where we would do priority queueing */
-               list_move(&(txF->node), &(lp->txQ[0]));
-
-               lp->txQ_count++;
-               if (lp->txQ_count >= DEFAULT_NUM_TX_FRAMES) {
-                       DBG_TX(DbgInfo, "Q Full: %d\n", lp->txQ_count);
-                       if (lp->netif_queue_on == TRUE) {
-                               netif_stop_queue(lp->dev);
-                               WL_WDS_NETIF_STOP_QUEUE(lp);
-                               lp->netif_queue_on = FALSE;
-                       }
-               }
-       }
-       wl_act_int_off(lp);     /* Disable Interrupts */
-
-       /* Send the data to the hardware using the appropriate method */
-#ifdef ENABLE_DMA
-       if (lp->use_dma) {
-               wl_send_dma(lp, skb, port);
-       } else
-#endif
-       {
-               wl_send(lp);
-       }
-       /* Re-enable Interrupts, release the spinlock and return */
-       wl_act_int_on(lp);
-       wl_unlock(lp, &flags);
-       return 0;
-}                              /* wl_tx */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_rx()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The routine which performs data reception.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure.
- *
- *  RETURNS:
- *
- *      0 on success
- *      1 on error
- *
- ******************************************************************************/
-int wl_rx(struct net_device *dev)
-{
-       int port;
-       struct sk_buff *skb;
-       struct wl_private *lp = wl_priv(dev);
-       int status;
-       hcf_16 pktlen;
-       hcf_16 hfs_stat;
-       DESC_STRCT *desc;
-    /*------------------------------------------------------------------------*/
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       if (!(lp->flags & WVLAN2_UIL_BUSY)) {
-
-#ifdef USE_RTS
-               if (lp->useRTS == 1) {
-                       DBG_PRINT("RTS: We're getting an Rx...\n");
-                       return -EIO;
-               }
-#endif /* USE_RTS */
-
-               /* Read the HFS_STAT register from the lookahead buffer */
-               hfs_stat = (hcf_16) ((lp->lookAheadBuf[HFS_STAT]) |
-                                    (lp->lookAheadBuf[HFS_STAT + 1] << 8));
-
-               /* Make sure the frame isn't bad */
-               if ((hfs_stat & HFS_STAT_ERR) != HCF_SUCCESS) {
-                       DBG_WARNING(DbgInfo,
-                                   "HFS_STAT_ERROR (0x%x) in Rx Packet\n",
-                                   lp->lookAheadBuf[HFS_STAT]);
-                       return -EIO;
-               }
-
-               /* Determine what port this packet is for */
-               port = (hfs_stat >> 8) & 0x0007;
-               DBG_RX(DbgInfo, "Rx frame for port %d\n", port);
-
-               pktlen = lp->hcfCtx.IFB_RxLen;
-               if (pktlen != 0) {
-                       skb = ALLOC_SKB(pktlen);
-                       if (skb != NULL) {
-                               /* Set the netdev based on the port */
-                               switch (port) {
-#ifdef USE_WDS
-                               case 1:
-                               case 2:
-                               case 3:
-                               case 4:
-                               case 5:
-                               case 6:
-                                       skb->dev = lp->wds_port[port - 1].dev;
-                                       break;
-#endif /* USE_WDS */
-
-                               case 0:
-                               default:
-                                       skb->dev = dev;
-                                       break;
-                               }
-
-                               desc = &(lp->desc_rx);
-
-                               desc->next_desc_addr = NULL;
-
-/*
-#define BLOCK_INPUT(buf, len) \
-    desc->buf_addr = buf; \
-    desc->BUF_SIZE = len; \
-    status = hcf_rcv_msg(&(lp->hcfCtx), desc, 0)
-*/
-
-                               GET_PACKET(skb->dev, skb, pktlen);
-
-                               if (status == HCF_SUCCESS) {
-                                       netif_rx(skb);
-
-                                       if (port == 0) {
-                                               lp->stats.rx_packets++;
-                                               lp->stats.rx_bytes += pktlen;
-                                       }
-#ifdef USE_WDS
-                                       else {
-                                               lp->wds_port[port -
-                                                            1].stats.
-                                                   rx_packets++;
-                                               lp->wds_port[port -
-                                                            1].stats.
-                                                   rx_bytes += pktlen;
-                                       }
-#endif /* USE_WDS */
-
-                                       dev->last_rx = jiffies;
-
-#ifdef WIRELESS_EXT
-#ifdef WIRELESS_SPY
-                                       if (lp->spydata.spy_number > 0) {
-                                               char *srcaddr =
-                                                   skb->mac.raw +
-                                                   MAC_ADDR_SIZE;
-
-                                               wl_spy_gather(dev, srcaddr);
-                                       }
-#endif /* WIRELESS_SPY */
-#endif /* WIRELESS_EXT */
-                               } else {
-                                       DBG_ERROR(DbgInfo,
-                                                 "Rx request to card FAILED\n");
-
-                                       if (port == 0)
-                                               lp->stats.rx_dropped++;
-#ifdef USE_WDS
-                                       else {
-                                               lp->wds_port[port -
-                                                            1].stats.
-                                                   rx_dropped++;
-                                       }
-#endif /* USE_WDS */
-
-                                       dev_kfree_skb(skb);
-                               }
-                       } else {
-                               DBG_ERROR(DbgInfo, "Could not alloc skb\n");
-
-                               if (port == 0)
-                                       lp->stats.rx_dropped++;
-#ifdef USE_WDS
-                               else {
-                                       lp->wds_port[port -
-                                                    1].stats.rx_dropped++;
-                               }
-#endif /* USE_WDS */
-                       }
-               }
-       }
-
-       return 0;
-}                              /* wl_rx */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_multicast()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Function to handle multicast packets
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-#ifdef NEW_MULTICAST
-
-void wl_multicast(struct net_device *dev)
-{
-#if 1                          /* (HCF_TYPE) & HCF_TYPE_STA */
-       /*
-        * should we return an error status in AP mode ?
-        * seems reasonable that even an AP-only driver
-        * could afford this small additional footprint
-        */
-
-       int x;
-       struct netdev_hw_addr *ha;
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       if (!wl_adapter_is_open(dev))
-               return;
-
-#if DBG
-       if (DBG_FLAGS(DbgInfo) & DBG_PARAM_ON) {
-               DBG_PRINT("  flags: %s%s%s\n",
-                         (dev->flags & IFF_PROMISC) ? "Promiscuous " : "",
-                         (dev->flags & IFF_MULTICAST) ? "Multicast " : "",
-                         (dev->flags & IFF_ALLMULTI) ? "All-Multicast" : "");
-
-               DBG_PRINT("  mc_count: %d\n", netdev_mc_count(dev));
-
-               netdev_for_each_mc_addr(ha, dev)
-                   DBG_PRINT("    %pM (%d)\n", ha->addr, dev->addr_len);
-       }
-#endif /* DBG */
-
-       if (!(lp->flags & WVLAN2_UIL_BUSY)) {
-
-#ifdef USE_RTS
-               if (lp->useRTS == 1) {
-                       DBG_TRACE(DbgInfo, "Skipping multicast, in RTS mode\n");
-                       return;
-               }
-#endif /* USE_RTS */
-
-               wl_lock(lp, &flags);
-               wl_act_int_off(lp);
-
-               if (CNV_INT_TO_LITTLE(lp->hcfCtx.IFB_FWIdentity.comp_id) ==
-                   COMP_ID_FW_STA) {
-                       if (dev->flags & IFF_PROMISC) {
-                               /* Enable promiscuous mode */
-                               lp->ltvRecord.len = 2;
-                               lp->ltvRecord.typ = CFG_PROMISCUOUS_MODE;
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(1);
-                               DBG_PRINT
-                                   ("Enabling Promiscuous mode (IFF_PROMISC)\n");
-                               hcf_put_info(&(lp->hcfCtx),
-                                            (LTVP) & (lp->ltvRecord));
-                       } else if ((netdev_mc_count(dev) > HCF_MAX_MULTICAST)
-                                  || (dev->flags & IFF_ALLMULTI)) {
-                               /* Shutting off this filter will enable all multicast frames to
-                                  be sent up from the device; however, this is a static RID, so
-                                  a call to wl_apply() is needed */
-                               lp->ltvRecord.len = 2;
-                               lp->ltvRecord.typ = CFG_CNF_RX_ALL_GROUP_ADDR;
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(0);
-                               DBG_PRINT
-                                   ("Enabling all multicast mode (IFF_ALLMULTI)\n");
-                               hcf_put_info(&(lp->hcfCtx),
-                                            (LTVP) & (lp->ltvRecord));
-                               wl_apply(lp);
-                       } else if (!netdev_mc_empty(dev)) {
-                               /* Set the multicast addresses */
-                               lp->ltvRecord.len =
-                                   (netdev_mc_count(dev) * 3) + 1;
-                               lp->ltvRecord.typ = CFG_GROUP_ADDR;
-
-                               x = 0;
-                               netdev_for_each_mc_addr(ha, dev)
-                                   memcpy(&
-                                          (lp->ltvRecord.u.u8[x++ * ETH_ALEN]),
-                                          ha->addr, ETH_ALEN);
-                               DBG_PRINT("Setting multicast list\n");
-                               hcf_put_info(&(lp->hcfCtx),
-                                            (LTVP) & (lp->ltvRecord));
-                       } else {
-                               /* Disable promiscuous mode */
-                               lp->ltvRecord.len = 2;
-                               lp->ltvRecord.typ = CFG_PROMISCUOUS_MODE;
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(0);
-                               DBG_PRINT("Disabling Promiscuous mode\n");
-                               hcf_put_info(&(lp->hcfCtx),
-                                            (LTVP) & (lp->ltvRecord));
-
-                               /* Disable multicast mode */
-                               lp->ltvRecord.len = 2;
-                               lp->ltvRecord.typ = CFG_GROUP_ADDR;
-                               DBG_PRINT("Disabling Multicast mode\n");
-                               hcf_put_info(&(lp->hcfCtx),
-                                            (LTVP) & (lp->ltvRecord));
-
-                               /*
-                                * Turning on this filter will prevent all multicast frames from
-                                * being sent up from the device; however, this is a static RID,
-                                * so a call to wl_apply() is needed
-                                */
-                               lp->ltvRecord.len = 2;
-                               lp->ltvRecord.typ = CFG_CNF_RX_ALL_GROUP_ADDR;
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(1);
-                               DBG_PRINT
-                                   ("Disabling all multicast mode (IFF_ALLMULTI)\n");
-                               hcf_put_info(&(lp->hcfCtx),
-                                            (LTVP) & (lp->ltvRecord));
-                               wl_apply(lp);
-                       }
-               }
-               wl_act_int_on(lp);
-               wl_unlock(lp, &flags);
-       }
-#endif /* HCF_STA */
-}                              /* wl_multicast */
-
-/*============================================================================*/
-
-#else /* NEW_MULTICAST */
-
-void wl_multicast(struct net_device *dev, int num_addrs, void *addrs)
-{
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-       DBG_PARAM(DbgInfo, "num_addrs", "%d", num_addrs);
-       DBG_PARAM(DbgInfo, "addrs", "0x%p", addrs);
-
-#error Obsolete set multicast interface!
-}                              /* wl_multicast */
-
-/*============================================================================*/
-
-#endif /* NEW_MULTICAST */
-
-static const struct net_device_ops wl_netdev_ops = {
-       .ndo_start_xmit = &wl_tx_port0,
-
-       .ndo_set_config = &wl_config,
-       .ndo_get_stats = &wl_stats,
-       .ndo_set_rx_mode = &wl_multicast,
-
-       .ndo_init = &wl_insert,
-       .ndo_open = &wl_adapter_open,
-       .ndo_stop = &wl_adapter_close,
-       .ndo_do_ioctl = &wl_ioctl,
-
-       .ndo_tx_timeout = &wl_tx_timeout,
-
-#ifdef CONFIG_NET_POLL_CONTROLLER
-       .ndo_poll_controller = wl_poll,
-#endif
-};
-
-/*******************************************************************************
- *     wl_device_alloc()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Create instances of net_device and wl_private for the new adapter
- *  and register the device's entry points in the net_device structure.
- *
- *  PARAMETERS:
- *
- *      N/A
- *
- *  RETURNS:
- *
- *      a pointer to an allocated and initialized net_device struct for this
- *      device.
- *
- ******************************************************************************/
-struct net_device *wl_device_alloc(void)
-{
-       struct net_device *dev = NULL;
-       struct wl_private *lp = NULL;
-
-       /* Alloc a net_device struct */
-       dev = alloc_etherdev(sizeof(struct wl_private));
-       if (!dev)
-               return NULL;
-
-       /*
-        * Initialize the 'next' pointer in the struct.
-        * Currently only used for PCI,
-        * but do it here just in case it's used
-        * for other buses in the future
-        */
-       lp = wl_priv(dev);
-
-       /* Check MTU */
-       if (dev->mtu > MTU_MAX) {
-               DBG_WARNING(DbgInfo, "%s: MTU set too high, limiting to %d.\n",
-                           dev->name, MTU_MAX);
-               dev->mtu = MTU_MAX;
-       }
-
-       /* Setup the function table in the device structure. */
-
-       dev->wireless_handlers = (struct iw_handler_def *)&wl_iw_handler_def;
-       lp->wireless_data.spy_data = &lp->spy_data;
-       dev->wireless_data = &lp->wireless_data;
-
-       dev->netdev_ops = &wl_netdev_ops;
-
-       dev->watchdog_timeo = TX_TIMEOUT;
-
-       dev->ethtool_ops = &wl_ethtool_ops;
-
-       netif_stop_queue(dev);
-
-       /* Allocate virtual devices for WDS support if needed */
-       WL_WDS_DEVICE_ALLOC(lp);
-
-       return dev;
-}                              /* wl_device_alloc */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_device_dealloc()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Free instances of net_device and wl_private strcutres for an adapter
- *  and perform basic cleanup.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_device_dealloc(struct net_device *dev)
-{
-       /* Dealloc the WDS ports */
-       WL_WDS_DEVICE_DEALLOC(lp);
-
-       free_netdev(dev);
-}                              /* wl_device_dealloc */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx_port0()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_0.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_0.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port0(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 0\n");
-
-       return wl_tx(skb, dev, HCF_PORT_0);
-#ifdef ENABLE_DMA
-       return wl_tx_dma(skb, dev, HCF_PORT_0);
-#endif
-}                              /* wl_tx_port0i */
-
-/*============================================================================*/
-
-#ifdef USE_WDS
-
-/*******************************************************************************
- *     wl_tx_port1()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_1.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_1.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port1(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 1\n");
-       return wl_tx(skb, dev, HCF_PORT_1);
-}                              /* wl_tx_port1 */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx_port2()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_2.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_2.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port2(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 2\n");
-       return wl_tx(skb, dev, HCF_PORT_2);
-}                              /* wl_tx_port2 */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx_port3()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_3.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_3.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port3(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 3\n");
-       return wl_tx(skb, dev, HCF_PORT_3);
-}                              /* wl_tx_port3 */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx_port4()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_4.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_4.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port4(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 4\n");
-       return wl_tx(skb, dev, HCF_PORT_4);
-}                              /* wl_tx_port4 */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx_port5()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_5.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_5.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port5(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 5\n");
-       return wl_tx(skb, dev, HCF_PORT_5);
-}                              /* wl_tx_port5 */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_tx_port6()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler routine for Tx over HCF_PORT_6.
- *
- *  PARAMETERS:
- *
- *      skb - a pointer to the sk_buff to transmit.
- *      dev - a pointer to a net_device structure representing HCF_PORT_6.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-int wl_tx_port6(struct sk_buff *skb, struct net_device *dev)
-{
-       DBG_TX(DbgInfo, "Tx on Port 6\n");
-       return wl_tx(skb, dev, HCF_PORT_6);
-}                              /* wl_tx_port6 */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_device_alloc()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Create instances of net_device to represent the WDS ports, and register
- *  the device's entry points in the net_device structure.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A, but will place pointers to the allocated and initialized net_device
- *      structs in the private adapter structure.
- *
- ******************************************************************************/
-void wl_wds_device_alloc(struct wl_private *lp)
-{
-       int count;
-
-       /* WDS support requires additional net_device structs to be allocated,
-          so that user space apps can use these virtual devices to specify the
-          port on which to Tx/Rx */
-       for (count = 0; count < NUM_WDS_PORTS; count++) {
-               struct net_device *dev_wds = NULL;
-
-               dev_wds = kzalloc(sizeof(struct net_device), GFP_KERNEL);
-               if (!dev_wds)
-                       return;
-
-               ether_setup(dev_wds);
-
-               lp->wds_port[count].dev = dev_wds;
-
-               /* Re-use wl_init for all the devices, as it currently does nothing, but
-                * is required. Re-use the stats/tx_timeout handler for all as well; the
-                * WDS port which is requesting these operations can be determined by
-                * the net_device pointer. Set the private member of all devices to point
-                * to the same net_device struct; that way, all information gets
-                * funnelled through the one "real" net_device. Name the WDS ports
-                * "wds<n>"
-                * */
-               lp->wds_port[count].dev->init = &wl_init;
-               lp->wds_port[count].dev->get_stats = &wl_stats;
-               lp->wds_port[count].dev->tx_timeout = &wl_tx_timeout;
-               lp->wds_port[count].dev->watchdog_timeo = TX_TIMEOUT;
-               lp->wds_port[count].dev->priv = lp;
-
-               sprintf(lp->wds_port[count].dev->name, "wds%d", count);
-       }
-
-       /* Register the Tx handlers */
-       lp->wds_port[0].dev->hard_start_xmit = &wl_tx_port1;
-       lp->wds_port[1].dev->hard_start_xmit = &wl_tx_port2;
-       lp->wds_port[2].dev->hard_start_xmit = &wl_tx_port3;
-       lp->wds_port[3].dev->hard_start_xmit = &wl_tx_port4;
-       lp->wds_port[4].dev->hard_start_xmit = &wl_tx_port5;
-       lp->wds_port[5].dev->hard_start_xmit = &wl_tx_port6;
-
-       WL_WDS_NETIF_STOP_QUEUE(lp);
-}                              /* wl_wds_device_alloc */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_device_dealloc()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Free instances of net_device structures used to support WDS.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_device_dealloc(struct wl_private *lp)
-{
-       int count;
-
-       for (count = 0; count < NUM_WDS_PORTS; count++) {
-               struct net_device *dev_wds = NULL;
-
-               dev_wds = lp->wds_port[count].dev;
-
-               if (dev_wds != NULL) {
-                       if (dev_wds->flags & IFF_UP) {
-                               dev_close(dev_wds);
-                               dev_wds->flags &= ~(IFF_UP | IFF_RUNNING);
-                       }
-
-                       free_netdev(dev_wds);
-                       lp->wds_port[count].dev = NULL;
-               }
-       }
-}                              /* wl_wds_device_dealloc */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_netif_start_queue()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to start the netif queues of all the "virtual" network devices
- *      which represent the WDS ports.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netif_start_queue(struct wl_private *lp)
-{
-       int count;
-    /*------------------------------------------------------------------------*/
-
-       if (lp != NULL) {
-               for (count = 0; count < NUM_WDS_PORTS; count++) {
-                       if (lp->wds_port[count].is_registered &&
-                           lp->wds_port[count].netif_queue_on == FALSE) {
-                               netif_start_queue(lp->wds_port[count].dev);
-                               lp->wds_port[count].netif_queue_on = TRUE;
-                       }
-               }
-       }
-}                              /* wl_wds_netif_start_queue */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_netif_stop_queue()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to stop the netif queues of all the "virtual" network devices
- *      which represent the WDS ports.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netif_stop_queue(struct wl_private *lp)
-{
-       int count;
-    /*------------------------------------------------------------------------*/
-
-       if (lp != NULL) {
-               for (count = 0; count < NUM_WDS_PORTS; count++) {
-                       if (lp->wds_port[count].is_registered &&
-                           lp->wds_port[count].netif_queue_on == TRUE) {
-                               netif_stop_queue(lp->wds_port[count].dev);
-                               lp->wds_port[count].netif_queue_on = FALSE;
-                       }
-               }
-       }
-}                              /* wl_wds_netif_stop_queue */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_netif_wake_queue()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to wake the netif queues of all the "virtual" network devices
- *      which represent the WDS ports.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netif_wake_queue(struct wl_private *lp)
-{
-       int count;
-    /*------------------------------------------------------------------------*/
-
-       if (lp != NULL) {
-               for (count = 0; count < NUM_WDS_PORTS; count++) {
-                       if (lp->wds_port[count].is_registered &&
-                           lp->wds_port[count].netif_queue_on == FALSE) {
-                               netif_wake_queue(lp->wds_port[count].dev);
-                               lp->wds_port[count].netif_queue_on = TRUE;
-                       }
-               }
-       }
-}                              /* wl_wds_netif_wake_queue */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_netif_carrier_on()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to signal the network layer that carrier is present on all of the
- *      "virtual" network devices which represent the WDS ports.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netif_carrier_on(struct wl_private *lp)
-{
-       int count;
-    /*------------------------------------------------------------------------*/
-
-       if (lp != NULL) {
-               for (count = 0; count < NUM_WDS_PORTS; count++) {
-                       if (lp->wds_port[count].is_registered)
-                               netif_carrier_on(lp->wds_port[count].dev);
-               }
-       }
-}                              /* wl_wds_netif_carrier_on */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_wds_netif_carrier_off()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Used to signal the network layer that carrier is NOT present on all of
- *      the "virtual" network devices which represent the WDS ports.
- *
- *  PARAMETERS:
- *
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wds_netif_carrier_off(struct wl_private *lp)
-{
-       int count;
-
-       if (lp != NULL) {
-               for (count = 0; count < NUM_WDS_PORTS; count++) {
-                       if (lp->wds_port[count].is_registered)
-                               netif_carrier_off(lp->wds_port[count].dev);
-               }
-       }
-
-}                              /* wl_wds_netif_carrier_off */
-
-/*============================================================================*/
-
-#endif /* USE_WDS */
-
-#ifdef ENABLE_DMA
-/*******************************************************************************
- *     wl_send_dma()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The routine which performs data transmits when using busmaster DMA.
- *
- *  PARAMETERS:
- *
- *      lp   - a pointer to the device's wl_private struct.
- *      skb  - a pointer to the network layer's data buffer.
- *      port - the Hermes port on which to transmit.
- *
- *  RETURNS:
- *
- *      0 on success
- *      1 on error
- *
- ******************************************************************************/
-int wl_send_dma(struct wl_private *lp, struct sk_buff *skb, int port)
-{
-       int len;
-       DESC_STRCT *desc = NULL;
-       DESC_STRCT *desc_next = NULL;
-    /*------------------------------------------------------------------------*/
-
-       if (lp == NULL) {
-               DBG_ERROR(DbgInfo, "Private adapter struct is NULL\n");
-               return FALSE;
-       }
-
-       if (lp->dev == NULL) {
-               DBG_ERROR(DbgInfo, "net_device struct in wl_private is NULL\n");
-               return FALSE;
-       }
-
-       /* AGAIN, ALL THE QUEUEING DONE HERE IN I/O MODE IS NOT PERFORMED */
-
-       if (skb == NULL) {
-               DBG_WARNING(DbgInfo, "Nothing to send.\n");
-               return FALSE;
-       }
-
-       len = skb->len;
-
-       /* Get a free descriptor */
-       desc = wl_pci_dma_get_tx_packet(lp);
-
-       if (desc == NULL) {
-               if (lp->netif_queue_on == TRUE) {
-                       netif_stop_queue(lp->dev);
-                       WL_WDS_NETIF_STOP_QUEUE(lp);
-                       lp->netif_queue_on = FALSE;
-
-                       dev_kfree_skb_any( skb );
-                       return 0;
-               }
-       }
-
-       SET_BUF_CNT(desc, /*HCF_DMA_FD_CNT */ HFS_ADDR_DEST);
-       SET_BUF_SIZE(desc, HCF_DMA_TX_BUF1_SIZE);
-
-       desc_next = desc->next_desc_addr;
-
-       if (desc_next->buf_addr == NULL) {
-               DBG_ERROR(DbgInfo, "DMA descriptor buf_addr is NULL\n");
-               return FALSE;
-       }
-
-       /* Copy the payload into the DMA packet */
-       memcpy(desc_next->buf_addr, skb->data, len);
-
-       SET_BUF_CNT(desc_next, len);
-       SET_BUF_SIZE(desc_next, HCF_MAX_PACKET_SIZE);
-
-       hcf_dma_tx_put(&(lp->hcfCtx), desc, 0);
-
-       /* Free the skb and perform queue cleanup, as the buffer was
-          transmitted successfully */
-       dev_consume_skb_any( skb );
-
-       return TRUE;
-}                              /* wl_send_dma */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wl_rx_dma()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The routine which performs data reception when using busmaster DMA.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure.
- *
- *  RETURNS:
- *
- *      0 on success
- *      1 on error
- *
- ******************************************************************************/
-int wl_rx_dma(struct net_device *dev)
-{
-       int port;
-       hcf_16 pktlen;
-       hcf_16 hfs_stat;
-       struct sk_buff *skb;
-       struct wl_private *lp = NULL;
-       DESC_STRCT *desc, *desc_next;
-    /*------------------------------------------------------------------------*/
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       lp = dev->priv;
-       if ((lp != NULL) && !(lp->flags & WVLAN2_UIL_BUSY)) {
-
-#ifdef USE_RTS
-               if (lp->useRTS == 1) {
-                       DBG_PRINT("RTS: We're getting an Rx...\n");
-                       return -EIO;
-               }
-#endif /* USE_RTS */
-
-               /*
-                *if( lp->dma.status == 0 )
-                *{
-                */
-               desc = hcf_dma_rx_get(&(lp->hcfCtx));
-
-               if (desc != NULL) {
-                       /* Check and see if we rcvd. a WMP frame */
-                       /*
-                          if((( *(hcf_8 *)&desc->buf_addr[HFS_STAT] ) &
-                          ( HFS_STAT_MSG_TYPE | HFS_STAT_ERR )) == HFS_STAT_WMP_MSG )
-                          {
-                          DBG_TRACE( DbgInfo, "Got a WMP frame\n" );
-
-                          x.len = sizeof( CFG_MB_INFO_RANGE2_STRCT ) / sizeof( hcf_16 );
-                          x.typ = CFG_MB_INFO;
-                          x.base_typ = CFG_WMP;
-                          x.frag_cnt = 2;
-                          x.frag_buf[0].frag_len  = GET_BUF_CNT( descp ) / sizeof( hcf_16 );
-                          x.frag_buf[0].frag_addr = (hcf_8 *) descp->buf_addr ;
-                          x.frag_buf[1].frag_len  = ( GET_BUF_CNT( descp->next_desc_addr ) + 1 ) / sizeof( hcf_16 );
-                          x.frag_buf[1].frag_addr = (hcf_8 *) descp->next_desc_addr->buf_addr ;
-
-                          hcf_put_info( &( lp->hcfCtx ), (LTVP)&x );
-                          }
-                        */
-
-                       desc_next = desc->next_desc_addr;
-
-                       /* Make sure the buffer isn't empty */
-                       if (GET_BUF_CNT(desc) == 0) {
-                               DBG_WARNING(DbgInfo, "Buffer is empty!\n");
-
-                               /* Give the descriptor back to the HCF */
-                               hcf_dma_rx_put(&(lp->hcfCtx), desc);
-                               return -EIO;
-                       }
-
-                       /* Read the HFS_STAT register from the lookahead buffer */
-                       hfs_stat = (hcf_16) (desc->buf_addr[HFS_STAT / 2]);
-
-                       /* Make sure the frame isn't bad */
-                       if ((hfs_stat & HFS_STAT_ERR) != HCF_SUCCESS) {
-                               DBG_WARNING(DbgInfo,
-                                           "HFS_STAT_ERROR (0x%x) in Rx Packet\n",
-                                           desc->buf_addr[HFS_STAT / 2]);
-
-                               /* Give the descriptor back to the HCF */
-                               hcf_dma_rx_put(&(lp->hcfCtx), desc);
-                               return -EIO;
-                       }
-
-                       /* Determine what port this packet is for */
-                       port = (hfs_stat >> 8) & 0x0007;
-                       DBG_RX(DbgInfo, "Rx frame for port %d\n", port);
-
-                       pktlen = GET_BUF_CNT(desc_next);
-                       if (pktlen != 0) {
-                               skb = ALLOC_SKB(pktlen);
-                               if (skb != NULL) {
-                                       switch (port) {
-#ifdef USE_WDS
-                                       case 1:
-                                       case 2:
-                                       case 3:
-                                       case 4:
-                                       case 5:
-                                       case 6:
-                                               skb->dev =
-                                                   lp->wds_port[port - 1].dev;
-                                               break;
-#endif /* USE_WDS */
-
-                                       case 0:
-                                       default:
-                                               skb->dev = dev;
-                                               break;
-                                       }
-
-                                       GET_PACKET_DMA(skb->dev, skb, pktlen);
-
-                                       /* Give the descriptor back to the HCF */
-                                       hcf_dma_rx_put(&(lp->hcfCtx), desc);
-
-                                       netif_rx(skb);
-
-                                       if (port == 0) {
-                                               lp->stats.rx_packets++;
-                                               lp->stats.rx_bytes += pktlen;
-                                       }
-#ifdef USE_WDS
-                                       else {
-                                               lp->wds_port[port -
-                                                            1].stats.
-                                                   rx_packets++;
-                                               lp->wds_port[port -
-                                                            1].stats.
-                                                   rx_bytes += pktlen;
-                                       }
-#endif /* USE_WDS */
-
-                                       dev->last_rx = jiffies;
-
-                               } else {
-                                       DBG_ERROR(DbgInfo,
-                                                 "Could not alloc skb\n");
-
-                                       if (port == 0)
-                                               lp->stats.rx_dropped++;
-#ifdef USE_WDS
-                                       else {
-                                               lp->wds_port[port -
-                                                            1].stats.
-                                                   rx_dropped++;
-                                       }
-#endif /* USE_WDS */
-                               }
-                       }
-               }
-               /*}*/
-       }
-
-       return 0;
-}                              /* wl_rx_dma */
-
-/*============================================================================*/
-#endif /* ENABLE_DMA */
diff --git a/drivers/staging/wlags49_h2/wl_netdev.h b/drivers/staging/wlags49_h2/wl_netdev.h
deleted file mode 100644 (file)
index 95bfbeb..0000000
+++ /dev/null
@@ -1,154 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing information required by the network layerentry points
- *   into the driver.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_NETDEV_H__
-#define __WL_NETDEV_H__
-
-
-
-
-/*******************************************************************************
- *  function prototypes
- ******************************************************************************/
-int wl_init(struct net_device *dev);
-
-int wl_config(struct net_device *dev, struct ifmap *map);
-
-struct net_device *wl_device_alloc(void);
-
-void wl_device_dealloc(struct net_device *dev);
-
-int wl_open(struct net_device *dev);
-
-int wl_close(struct net_device *dev);
-
-int wl_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
-
-int wl_tx(struct sk_buff *skb, struct net_device *dev, int port);
-
-int wl_send(struct wl_private *lp);
-
-int wl_rx(struct net_device *dev);
-
-void wl_tx_timeout(struct net_device *dev);
-
-struct net_device_stats *wl_stats(struct net_device *dev);
-
-
-#ifdef ENABLE_DMA
-int wl_send_dma(struct wl_private *lp, struct sk_buff *skb, int port);
-int wl_rx_dma(struct net_device *dev);
-#endif
-
-#ifdef NEW_MULTICAST
-void wl_multicast(struct net_device *dev);
-#else
-void wl_multicast(struct net_device *dev, int num_addrs, void *addrs);
-#endif /* NEW_MULTICAST */
-
-
-int wl_tx_port0(struct sk_buff *skb, struct net_device *dev);
-
-
-#ifdef USE_WDS
-
-int wl_tx_port1(struct sk_buff *skb, struct net_device *dev);
-int wl_tx_port2(struct sk_buff *skb, struct net_device *dev);
-int wl_tx_port3(struct sk_buff *skb, struct net_device *dev);
-int wl_tx_port4(struct sk_buff *skb, struct net_device *dev);
-int wl_tx_port5(struct sk_buff *skb, struct net_device *dev);
-int wl_tx_port6(struct sk_buff *skb, struct net_device *dev);
-
-void wl_wds_device_alloc(struct wl_private *lp);
-void wl_wds_device_dealloc(struct wl_private *lp);
-void wl_wds_netif_start_queue(struct wl_private *lp);
-void wl_wds_netif_stop_queue(struct wl_private *lp);
-void wl_wds_netif_wake_queue(struct wl_private *lp);
-void wl_wds_netif_carrier_on(struct wl_private *lp);
-void wl_wds_netif_carrier_off(struct wl_private *lp);
-
-#endif  /* USE_WDS */
-
-
-#ifdef USE_WDS
-
-#define WL_WDS_DEVICE_ALLOC(ARG)      wl_wds_device_alloc(ARG)
-#define WL_WDS_DEVICE_DEALLOC(ARG)    wl_wds_device_dealloc(ARG)
-#define WL_WDS_NETIF_START_QUEUE(ARG) wl_wds_netif_start_queue(ARG)
-#define WL_WDS_NETIF_STOP_QUEUE(ARG)  wl_wds_netif_stop_queue(ARG)
-#define WL_WDS_NETIF_WAKE_QUEUE(ARG)  wl_wds_netif_wake_queue(ARG)
-#define WL_WDS_NETIF_CARRIER_ON(ARG)  wl_wds_netif_carrier_on(ARG)
-#define WL_WDS_NETIF_CARRIER_OFF(ARG) wl_wds_netif_carrier_off(ARG)
-
-#else
-
-#define WL_WDS_DEVICE_ALLOC(ARG)
-#define WL_WDS_DEVICE_DEALLOC(ARG)
-#define WL_WDS_NETIF_START_QUEUE(ARG)
-#define WL_WDS_NETIF_STOP_QUEUE(ARG)
-#define WL_WDS_NETIF_WAKE_QUEUE(ARG)
-#define WL_WDS_NETIF_CARRIER_ON(ARG)
-#define WL_WDS_NETIF_CARRIER_OFF(ARG)
-
-#endif  /* USE_WDS */
-
-
-#endif  /* __WL_NETDEV_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_priv.c b/drivers/staging/wlags49_h2/wl_priv.c
deleted file mode 100644 (file)
index aff9273..0000000
+++ /dev/null
@@ -1,1928 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file defines handling routines for the private IOCTLs
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- * include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/if_arp.h>
-#include <linux/ioport.h>
-#include <linux/slab.h>
-#include <linux/delay.h>
-#include <linux/uaccess.h>
-
-#include <debug.h>
-#include <hcf.h>
-#include <hcfdef.h>
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_enc.h>
-#include <wl_main.h>
-#include <wl_priv.h>
-#include <wl_util.h>
-#include <wl_netdev.h>
-
-int wvlan_uil_connect(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_disconnect(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_action(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_block(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_unblock(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_send_diag_msg(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_put_info(struct uilreq *urq, struct wl_private *lp);
-int wvlan_uil_get_info(struct uilreq *urq, struct wl_private *lp);
-
-int cfg_driver_info(struct uilreq *urq, struct wl_private *lp);
-int cfg_driver_identity(struct uilreq *urq, struct wl_private *lp);
-
-
-/* If USE_UIL is not defined, then none of the UIL Interface code below will
-   be included in the build */
-#ifdef USE_UIL
-
-/*******************************************************************************
- *     wvlan_uil()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      The handler function for the UIL interface.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_uil(struct uilreq *urq, struct wl_private *lp)
-{
-       int ioctl_ret = 0;
-
-       switch (urq->command) {
-       case UIL_FUN_CONNECT:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_CONNECT\n");
-               ioctl_ret = wvlan_uil_connect(urq, lp);
-               break;
-       case UIL_FUN_DISCONNECT:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_DISCONNECT\n");
-               ioctl_ret = wvlan_uil_disconnect(urq, lp);
-               break;
-       case UIL_FUN_ACTION:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_ACTION\n");
-               ioctl_ret = wvlan_uil_action(urq, lp);
-               break;
-       case UIL_FUN_SEND_DIAG_MSG:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_SEND_DIAG_MSG\n");
-               ioctl_ret = wvlan_uil_send_diag_msg(urq, lp);
-               break;
-       case UIL_FUN_GET_INFO:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_GET_INFO\n");
-               ioctl_ret = wvlan_uil_get_info(urq, lp);
-               break;
-       case UIL_FUN_PUT_INFO:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- WVLAN2_UIL_PUT_INFO\n");
-               ioctl_ret = wvlan_uil_put_info(urq, lp);
-               break;
-       default:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_UIL -- UNSUPPORTED UIL CODE: 0x%X", urq->command);
-               ioctl_ret = -EOPNOTSUPP;
-               break;
-       }
-       return ioctl_ret;
-} /* wvlan_uil */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_uil_connect()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Connect to the UIL in order to make a request.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_connect(struct uilreq *urq, struct wl_private *lp)
-{
-       if (!(lp->flags & WVLAN2_UIL_CONNECTED)) {
-               lp->flags |= WVLAN2_UIL_CONNECTED;
-               urq->hcfCtx = &(lp->hcfCtx);
-               urq->result = UIL_SUCCESS;
-       } else {
-               DBG_WARNING(DbgInfo, "UIL_ERR_IN_USE\n");
-               urq->result = UIL_ERR_IN_USE;
-       }
-
-       return 0;
-} /* wvlan_uil_connect */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_uil_disconnect()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Disconnect from the UIL after a request has been completed.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_disconnect(struct uilreq *urq, struct wl_private *lp)
-{
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               if (lp->flags & WVLAN2_UIL_CONNECTED) {
-                       lp->flags &= ~WVLAN2_UIL_CONNECTED;
-                       /*
-                       if (lp->flags & WVLAN2_UIL_BUSY) {
-                               lp->flags &= ~WVLAN2_UIL_BUSY;
-                               netif_start_queue(lp->dev);
-                       }
-                       */
-               }
-
-               urq->hcfCtx = NULL;
-               urq->result = UIL_SUCCESS;
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return 0;
-} /* wvlan_uil_disconnect */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_uil_action()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Handler for the UIL_ACT_xxx subcodes associated with UIL_FUN_ACTION
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_action(struct uilreq *urq, struct wl_private *lp)
-{
-       int     result = 0;
-       ltv_t   *ltv;
-
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               /* Make sure there's an LTV in the request buffer */
-               ltv = (ltv_t *)urq->data;
-               if (ltv != NULL) {
-                       /* Switch on the Type field of the LTV contained in the request
-                          buffer */
-                       switch (ltv->typ) {
-                       case UIL_ACT_BLOCK:
-                               DBG_TRACE(DbgInfo, "UIL_ACT_BLOCK\n");
-                               result = wvlan_uil_block(urq, lp);
-                               break;
-                       case UIL_ACT_UNBLOCK:
-                               DBG_TRACE(DbgInfo, "UIL_ACT_UNBLOCK\n");
-                               result = wvlan_uil_unblock(urq, lp);
-                               break;
-                       case UIL_ACT_SCAN:
-                               DBG_TRACE(DbgInfo, "UIL_ACT_SCAN\n");
-                               urq->result = hcf_action(&(lp->hcfCtx), MDD_ACT_SCAN);
-                               break;
-                       case UIL_ACT_APPLY:
-                               DBG_TRACE(DbgInfo, "UIL_ACT_APPLY\n");
-                               urq->result = wl_apply(lp);
-                               break;
-                       case UIL_ACT_RESET:
-                               DBG_TRACE(DbgInfo, "UIL_ACT_RESET\n");
-                               urq->result = wl_go(lp);
-                               break;
-                       default:
-                               DBG_WARNING(DbgInfo, "Unknown action code: 0x%x\n", ltv->typ);
-                               break;
-                       }
-               } else {
-                       DBG_ERROR(DbgInfo, "Bad LTV for this action\n");
-                       urq->result = UIL_ERR_LEN;
-               }
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return result;
-} /* wvlan_uil_action */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_uil_block()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sets a block in the driver to prevent access to the card by other
- *  processes.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-
-int wvlan_uil_block(struct uilreq *urq, struct wl_private *lp)
-{
-       int result = 0;
-
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               if (capable(CAP_NET_ADMIN)) {
-                       lp->flags |= WVLAN2_UIL_BUSY;
-                       netif_stop_queue(lp->dev);
-                       WL_WDS_NETIF_STOP_QUEUE(lp);
-                       urq->result = UIL_SUCCESS;
-               } else {
-                       DBG_ERROR(DbgInfo, "EPERM\n");
-                       urq->result = UIL_FAILURE;
-                       result = -EPERM;
-               }
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return result;
-} /* wvlan_uil_block */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_uil_unblock()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Unblocks the driver to restore access to the card by other processes.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_unblock(struct uilreq *urq, struct wl_private *lp)
-{
-       int result = 0;
-
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               if (capable(CAP_NET_ADMIN)) {
-                       if (lp->flags & WVLAN2_UIL_BUSY) {
-                               lp->flags &= ~WVLAN2_UIL_BUSY;
-                               netif_wake_queue(lp->dev);
-                               WL_WDS_NETIF_WAKE_QUEUE(lp);
-                       }
-               } else {
-                       DBG_ERROR(DbgInfo, "EPERM\n");
-                       urq->result = UIL_FAILURE;
-                       result = -EPERM;
-               }
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return result;
-} /* wvlan_uil_unblock */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_uil_send_diag_msg()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sends a diagnostic message to the card.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_send_diag_msg(struct uilreq *urq, struct wl_private *lp)
-{
-       int         result = 0;
-       DESC_STRCT  Descp[1];
-
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               if (capable(CAP_NET_ADMIN)) {
-                       if ((urq->data != NULL) && (urq->len != 0)) {
-                               if (lp->hcfCtx.IFB_RscInd != 0) {
-                                       u_char *data;
-
-                                       /* Verify the user buffer */
-                                       result = verify_area(VERIFY_READ, urq->data, urq->len);
-                                       if (result != 0) {
-                                               DBG_ERROR(DbgInfo, "verify_area failed, result: %d\n", result);
-                                               urq->result = UIL_FAILURE;
-                                               return result;
-                                       }
-
-                                       data = kmalloc(urq->len, GFP_KERNEL);
-                                       if (data != NULL) {
-                                               memset(Descp, 0, sizeof(DESC_STRCT));
-                                               memcpy(data, urq->data, urq->len);
-
-                                               Descp[0].buf_addr       = (wci_bufp)data;
-                                               Descp[0].BUF_CNT        = urq->len;
-                                               Descp[0].next_desc_addr = 0;    /* terminate list */
-
-                                               hcf_send_msg(&(lp->hcfCtx),  &Descp[0], HCF_PORT_0);
-                                               kfree(data);
-                                       } else {
-                                               DBG_ERROR(DbgInfo, "ENOMEM\n");
-                                               urq->result = UIL_FAILURE;
-                                               result = -ENOMEM;
-                                               return result;
-                                       }
-
-                               } else {
-                                       urq->result = UIL_ERR_BUSY;
-                               }
-
-                       } else {
-                               urq->result = UIL_FAILURE;
-                       }
-               } else {
-                       DBG_ERROR(DbgInfo, "EPERM\n");
-                       urq->result = UIL_FAILURE;
-                       result = -EPERM;
-               }
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return result;
-} /* wvlan_uil_send_diag_msg */
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wvlan_uil_put_info()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sends a specific RID directly to the driver to set configuration info.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_put_info(struct uilreq *urq, struct wl_private *lp)
-{
-       int                     result = 0;
-       ltv_t                   *pLtv;
-       bool_t                  ltvAllocated = FALSE;
-       ENCSTRCT                sEncryption;
-       size_t                  len;
-
-#ifdef USE_WDS
-       hcf_16                  hcfPort  = HCF_PORT_0;
-#endif  /* USE_WDS */
-
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               if (capable(CAP_NET_ADMIN)) {
-                       if ((urq->data != NULL) && (urq->len != 0)) {
-                               /* Make sure that we have at least a command and length to send. */
-                               if (urq->len < (sizeof(hcf_16) * 2)) {
-                                       urq->len = sizeof(lp->ltvRecord);
-                                       urq->result = UIL_ERR_LEN;
-                                       DBG_ERROR(DbgInfo, "No Length/Type in LTV!!!\n");
-                                       DBG_ERROR(DbgInfo, "UIL_ERR_LEN\n");
-                                       return result;
-                               }
-
-                               /* Verify the user buffer */
-                               result = verify_area(VERIFY_READ, urq->data, urq->len);
-                               if (result != 0) {
-                                       urq->result = UIL_FAILURE;
-                                       DBG_ERROR(DbgInfo, "verify_area(), VERIFY_READ FAILED\n");
-                                       return result;
-                               }
-
-                               /* Get only the command and length information. */
-                               copy_from_user(&(lp->ltvRecord), urq->data, sizeof(hcf_16) * 2);
-
-                               /* Make sure the incoming LTV record length is within the bounds of the
-                                  IOCTL length */
-                               if (((lp->ltvRecord.len + 1) * sizeof(hcf_16)) > urq->len) {
-                                       urq->len = sizeof(lp->ltvRecord);
-                                       urq->result = UIL_ERR_LEN;
-                                       DBG_ERROR(DbgInfo, "UIL_ERR_LEN\n");
-                                       return result;
-                               }
-
-                               /* If the requested length is greater than the size of our local
-                                  LTV record, try to allocate it from the kernel stack.
-                                  Otherwise, we just use our local LTV record. */
-                               if (urq->len > sizeof(lp->ltvRecord)) {
-                                       pLtv = kmalloc(urq->len, GFP_KERNEL);
-                                       if (pLtv != NULL) {
-                                               ltvAllocated = TRUE;
-                                       } else {
-                                               DBG_ERROR(DbgInfo, "Alloc FAILED\n");
-                                               urq->len = sizeof(lp->ltvRecord);
-                                               urq->result = UIL_ERR_LEN;
-                                               result = -ENOMEM;
-                                               return result;
-                                       }
-                               } else {
-                                       pLtv = &(lp->ltvRecord);
-                               }
-
-                               /* Copy the data from the user's buffer into the local LTV
-                                  record data area. */
-                               copy_from_user(pLtv, urq->data, urq->len);
-
-
-                               /* We need to snoop the commands to see if there is anything we
-                                  need to store for the purposes of a reset or start/stop
-                                  sequence. Perform endian translation as needed */
-                               switch (pLtv->typ) {
-                               case CFG_CNF_PORT_TYPE:
-                                       lp->PortType    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_OWN_MAC_ADDR:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               case CFG_CNF_OWN_CHANNEL:
-                                       lp->Channel     = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               /* CFG_CNF_OWN_SSID currently same as CNF_DESIRED_SSID. Do we
-                                  need separate storage for this? */
-                               /* case CFG_CNF_OWN_SSID: */
-                               case CFG_CNF_OWN_ATIM_WINDOW:
-                                       lp->atimWindow  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_SYSTEM_SCALE:
-                                       lp->DistanceBetweenAPs  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-
-                               case CFG_CNF_MAX_DATA_LEN:
-                                       /* TODO: determine if we are going to store anything based
-                                          on this */
-                                       break;
-                               case CFG_CNF_PM_ENABLED:
-                                       lp->PMEnabled   = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_MCAST_RX:
-                                       lp->MulticastReceive    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_MAX_SLEEP_DURATION:
-                                       lp->MaxSleepDuration    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_HOLDOVER_DURATION:
-                                       lp->holdoverDuration    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_OWN_NAME:
-                                       memset(lp->StationName, 0, sizeof(lp->StationName));
-                                       len = min_t(size_t, pLtv->u.u16[0], sizeof(lp->StationName));
-                                       strlcpy(lp->StationName, &pLtv->u.u8[2], len);
-                                       pLtv->u.u16[0] = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_LOAD_BALANCING:
-                                       lp->loadBalancing       = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_MEDIUM_DISTRIBUTION:
-                                       lp->mediumDistribution  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#ifdef WARP
-                               case CFG_CNF_TX_POW_LVL:
-                                       lp->txPowLevel          = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               /* case CFG_CNF_SHORT_RETRY_LIMIT: */ /* Short Retry Limit */
-                               /* case 0xFC33: */   /* Long Retry Limit */
-                               case CFG_SUPPORTED_RATE_SET_CNTL:        /* Supported Rate Set Control */
-                                       lp->srsc[0]             = pLtv->u.u16[0];
-                                       lp->srsc[1]             = pLtv->u.u16[1];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       pLtv->u.u16[1]          = CNV_INT_TO_LITTLE(pLtv->u.u16[1]);
-                                       break;
-                               case CFG_BASIC_RATE_SET_CNTL:        /* Basic Rate Set Control */
-                                       lp->brsc[0]             = pLtv->u.u16[0];
-                                       lp->brsc[1]             = pLtv->u.u16[1];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       pLtv->u.u16[1]          = CNV_INT_TO_LITTLE(pLtv->u.u16[1]);
-                                       break;
-                               case CFG_CNF_CONNECTION_CNTL:
-                                       lp->connectionControl   = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               /* case CFG_PROBE_DATA_RATE: */
-#endif  /* HERMES25 */
-
-#if 1 /* ;? (HCF_TYPE) & HCF_TYPE_AP */
-               /* ;?should we restore this to allow smaller memory footprint */
-
-                               case CFG_CNF_OWN_DTIM_PERIOD:
-                                       lp->DTIMPeriod  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#ifdef WARP
-                               case CFG_CNF_OWN_BEACON_INTERVAL:        /* Own Beacon Interval */
-                                       lp->ownBeaconInterval   = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#endif /* WARP */
-                               case CFG_COEXISTENSE_BEHAVIOUR:         /* Coexistence behavior */
-                                       lp->coexistence         = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#ifdef USE_WDS
-                               case CFG_CNF_WDS_ADDR1:
-                                       memcpy(&lp->wds_port[0].wdsAddress, &pLtv->u.u8[0], ETH_ALEN);
-                                       hcfPort = HCF_PORT_1;
-                                       break;
-                               case CFG_CNF_WDS_ADDR2:
-                                       memcpy(&lp->wds_port[1].wdsAddress, &pLtv->u.u8[0], ETH_ALEN);
-                                       hcfPort = HCF_PORT_2;
-                                       break;
-                               case CFG_CNF_WDS_ADDR3:
-                                       memcpy(&lp->wds_port[2].wdsAddress, &pLtv->u.u8[0], ETH_ALEN);
-                                       hcfPort = HCF_PORT_3;
-                                       break;
-                               case CFG_CNF_WDS_ADDR4:
-                                       memcpy(&lp->wds_port[3].wdsAddress, &pLtv->u.u8[0], ETH_ALEN);
-                                       hcfPort = HCF_PORT_4;
-                                       break;
-                               case CFG_CNF_WDS_ADDR5:
-                                       memcpy(&lp->wds_port[4].wdsAddress, &pLtv->u.u8[0], ETH_ALEN);
-                                       hcfPort = HCF_PORT_5;
-                                       break;
-                               case CFG_CNF_WDS_ADDR6:
-                                       memcpy(&lp->wds_port[5].wdsAddress, &pLtv->u.u8[0], ETH_ALEN);
-                                       hcfPort = HCF_PORT_6;
-                                       break;
-#endif  /* USE_WDS */
-
-                               case CFG_CNF_MCAST_PM_BUF:
-                                       lp->multicastPMBuffering    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_REJECT_ANY:
-                                       lp->RejectAny   = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#endif
-
-                               case CFG_CNF_ENCRYPTION:
-                                       lp->EnableEncryption    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_CNF_AUTHENTICATION:
-                                       lp->authentication  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#if 1 /* ;? (HCF_TYPE) & HCF_TYPE_AP */
-               /* ;?should we restore this to allow smaller memory footprint */
-
-                               /* case CFG_CNF_EXCL_UNENCRYPTED:
-                                       lp->ExcludeUnencrypted  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break; */
-                               case CFG_CNF_MCAST_RATE:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               case CFG_CNF_INTRA_BSS_RELAY:
-                                       lp->intraBSSRelay   = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#endif
-
-                               case CFG_CNF_MICRO_WAVE:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               /*case CFG_CNF_LOAD_BALANCING:*/
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       /* break; */
-                               /* case CFG_CNF_MEDIUM_DISTRIBUTION: */
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       /* break; */
-                               /* case CFG_CNF_RX_ALL_GROUP_ADDRESS: */
-                                       /*  TODO: determine if we are going to store anything based on this */
-                                       /* break; */
-                               /* case CFG_CNF_COUNTRY_INFO: */
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       /* break; */
-                               case CFG_CNF_OWN_SSID:
-                               /* case CNF_DESIRED_SSID: */
-                               case CFG_DESIRED_SSID:
-                                       memset(lp->NetworkName, 0, sizeof(lp->NetworkName));
-                                       memcpy((void *)lp->NetworkName, (void *)&pLtv->u.u8[2], (size_t)pLtv->u.u16[0]);
-                                       pLtv->u.u16[0] = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-
-                                       /* take care of the special network name "ANY" case */
-                                       if ((strlen(&pLtv->u.u8[2]) == 0) ||
-                                          (strcmp(&pLtv->u.u8[2], "ANY") == 0) ||
-                                          (strcmp(&pLtv->u.u8[2], "any") == 0)) {
-                                               /* set the SSID_STRCT llen field (u16[0]) to zero, and the
-                                               effectually null the string u8[2] */
-                                               pLtv->u.u16[0] = 0;
-                                               pLtv->u.u8[2]  = 0;
-                                       }
-                                       break;
-                               case CFG_GROUP_ADDR:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               case CFG_CREATE_IBSS:
-                                       lp->CreateIBSS  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_RTS_THRH:
-                                       lp->RTSThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_TX_RATE_CNTL:
-                                       lp->TxRateControl[0]    = pLtv->u.u16[0];
-                                       lp->TxRateControl[1]    = pLtv->u.u16[1];
-                                       pLtv->u.u16[0]          = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       pLtv->u.u16[1]          = CNV_INT_TO_LITTLE(pLtv->u.u16[1]);
-                                       break;
-                               case CFG_PROMISCUOUS_MODE:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               /* case CFG_WAKE_ON_LAN: */
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       /* break; */
-#if 1 /* ;? #if (HCF_TYPE) & HCF_TYPE_AP */
-               /* ;?should we restore this to allow smaller memory footprint */
-                               case CFG_RTS_THRH0:
-                                       lp->RTSThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_TX_RATE_CNTL0:
-/*;?no idea what this should be, get going so comment it out                                   lp->TxRateControl   = pLtv->u.u16[0];*/
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-#ifdef USE_WDS
-                               case CFG_RTS_THRH1:
-                                       lp->wds_port[0].rtsThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]                  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                         = HCF_PORT_1;
-                                       break;
-                               case CFG_RTS_THRH2:
-                                       lp->wds_port[1].rtsThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]                  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                         = HCF_PORT_2;
-                                       break;
-                               case CFG_RTS_THRH3:
-                                       lp->wds_port[2].rtsThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]                  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                         = HCF_PORT_3;
-                                       break;
-                               case CFG_RTS_THRH4:
-                                       lp->wds_port[3].rtsThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]                  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                         = HCF_PORT_4;
-                                       break;
-                               case CFG_RTS_THRH5:
-                                       lp->wds_port[4].rtsThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]                  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                         = HCF_PORT_5;
-                                       break;
-                               case CFG_RTS_THRH6:
-                                       lp->wds_port[5].rtsThreshold    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]                  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                         = HCF_PORT_6;
-                                       break;
-                               case CFG_TX_RATE_CNTL1:
-                                       lp->wds_port[0].txRateCntl  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                     = HCF_PORT_1;
-                                       break;
-                               case CFG_TX_RATE_CNTL2:
-                                       lp->wds_port[1].txRateCntl  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                     = HCF_PORT_2;
-                                       break;
-                               case CFG_TX_RATE_CNTL3:
-                                       lp->wds_port[2].txRateCntl  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                     = HCF_PORT_3;
-                                       break;
-                               case CFG_TX_RATE_CNTL4:
-                                       lp->wds_port[3].txRateCntl  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                     = HCF_PORT_4;
-                                       break;
-                               case CFG_TX_RATE_CNTL5:
-                                       lp->wds_port[4].txRateCntl  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                     = HCF_PORT_5;
-                                       break;
-                               case CFG_TX_RATE_CNTL6:
-                                       lp->wds_port[5].txRateCntl  = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]              = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       hcfPort                     = HCF_PORT_6;
-                                       break;
-#endif  /* USE_WDS */
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-
-                               case CFG_DEFAULT_KEYS:
-                                       {
-                                               CFG_DEFAULT_KEYS_STRCT *pKeys = (CFG_DEFAULT_KEYS_STRCT *)pLtv;
-
-                                               pKeys->key[0].len = CNV_INT_TO_LITTLE(pKeys->key[0].len);
-                                               pKeys->key[1].len = CNV_INT_TO_LITTLE(pKeys->key[1].len);
-                                               pKeys->key[2].len = CNV_INT_TO_LITTLE(pKeys->key[2].len);
-                                               pKeys->key[3].len = CNV_INT_TO_LITTLE(pKeys->key[3].len);
-
-                                               memcpy((void *)&(lp->DefaultKeys), (void *)pKeys,
-                                                               sizeof(CFG_DEFAULT_KEYS_STRCT));
-                                       }
-                                       break;
-                               case CFG_TX_KEY_ID:
-                                       lp->TransmitKeyID   = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_SCAN_SSID:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               case CFG_TICK_TIME:
-                                       /* TODO: determine if we are going to store anything based on this */
-                                       break;
-                               /* these RIDS are Info RIDs, and should they be allowed for puts??? */
-                               case CFG_MAX_LOAD_TIME:
-                               case CFG_DL_BUF:
-                               /* case CFG_HSI_SUP_RANGE: */
-                               case CFG_NIC_SERIAL_NUMBER:
-                               case CFG_NIC_IDENTITY:
-                               case CFG_NIC_MFI_SUP_RANGE:
-                               case CFG_NIC_CFI_SUP_RANGE:
-                               case CFG_NIC_TEMP_TYPE:
-                               case CFG_NIC_PROFILE:
-                               case CFG_FW_IDENTITY:
-                               case CFG_FW_SUP_RANGE:
-                               case CFG_MFI_ACT_RANGES_STA:
-                               case CFG_CFI_ACT_RANGES_STA:
-                               case CFG_PORT_STAT:
-                               case CFG_CUR_SSID:
-                               case CFG_CUR_BSSID:
-                               case CFG_COMMS_QUALITY:
-                               case CFG_CUR_TX_RATE:
-                               case CFG_CUR_BEACON_INTERVAL:
-                               case CFG_CUR_SCALE_THRH:
-                               case CFG_PROTOCOL_RSP_TIME:
-                               case CFG_CUR_SHORT_RETRY_LIMIT:
-                               case CFG_CUR_LONG_RETRY_LIMIT:
-                               case CFG_MAX_TX_LIFETIME:
-                               case CFG_MAX_RX_LIFETIME:
-                               case CFG_CF_POLLABLE:
-                               case CFG_AUTHENTICATION_ALGORITHMS:
-                               case CFG_PRIVACY_OPT_IMPLEMENTED:
-                               /* case CFG_CURRENT_REMOTE_RATES: */
-                               /* case CFG_CURRENT_USED_RATES: */
-                               /* case CFG_CURRENT_SYSTEM_SCALE: */
-                               /* case CFG_CURRENT_TX_RATE1: */
-                               /* case CFG_CURRENT_TX_RATE2: */
-                               /* case CFG_CURRENT_TX_RATE3: */
-                               /* case CFG_CURRENT_TX_RATE4: */
-                               /* case CFG_CURRENT_TX_RATE5: */
-                               /* case CFG_CURRENT_TX_RATE6: */
-                               case CFG_NIC_MAC_ADDR:
-                               case CFG_PCF_INFO:
-                               /* case CFG_CURRENT_COUNTRY_INFO: */
-                               case CFG_PHY_TYPE:
-                               case CFG_CUR_CHANNEL:
-                               /* case CFG_CURRENT_POWER_STATE: */
-                               /* case CFG_CCAMODE: */
-                               case CFG_SUPPORTED_DATA_RATES:
-                                       break;
-                               case CFG_AP_MODE:
-/*;?                           lp->DownloadFirmware = (pLtv->u.u16[0]) + 1; */
-                                       DBG_ERROR(DbgInfo, "set CFG_AP_MODE no longer supported\n");
-                                       break;
-                               case CFG_ENCRYPT_STRING:
-                                       /* TODO: ENDIAN TRANSLATION HERE??? */
-                                       memset(lp->szEncryption, 0, sizeof(lp->szEncryption));
-                                       memcpy((void *)lp->szEncryption,  (void *)&pLtv->u.u8[0],
-                                                       (pLtv->len * sizeof(hcf_16)));
-                                       wl_wep_decode(CRYPT_CODE, &sEncryption,
-                                                                   lp->szEncryption);
-
-                                       /* the Linux driver likes to use 1-4 for the key IDs, and then
-                                       convert to 0-3 when sending to the card.  The Windows code
-                                       base used 0-3 in the API DLL, which was ported to Linux.  For
-                                       the sake of the user experience, we decided to keep 0-3 as the
-                                       numbers used in the DLL; and will perform the +1 conversion here.
-                                       We could have converted  the entire Linux driver, but this is
-                                       less obtrusive.  This may be a "todo" to convert the whole driver */
-                                       lp->TransmitKeyID    = sEncryption.wTxKeyID + 1;
-                                       lp->EnableEncryption = sEncryption.wEnabled;
-
-                                       memcpy(&lp->DefaultKeys, &sEncryption.EncStr,
-                                                       sizeof(CFG_DEFAULT_KEYS_STRCT));
-                                       break;
-                               /*case CFG_COUNTRY_STRING:
-                                       memset(lp->countryString, 0, sizeof(lp->countryString));
-                                       memcpy((void *)lp->countryString, (void *)&pLtv->u.u8[2], (size_t)pLtv->u.u16[0]);
-                                       break;
-                               */
-
-                               case CFG_DRIVER_ENABLE:
-                                       lp->driverEnable    = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]      = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_WOLAS_ENABLE:
-                                       lp->wolasEnable = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_SET_WPA_AUTH_KEY_MGMT_SUITE:
-                                       lp->AuthKeyMgmtSuite = pLtv->u.u16[0];
-                                       pLtv->u.u16[0]  = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_DISASSOCIATE_ADDR:
-                                       pLtv->u.u16[ETH_ALEN / 2] = CNV_INT_TO_LITTLE(pLtv->u.u16[ETH_ALEN / 2]);
-                                       break;
-                               case CFG_ADD_TKIP_DEFAULT_KEY:
-                               case CFG_REMOVE_TKIP_DEFAULT_KEY:
-                                       /* Endian convert the Tx Key Information */
-                                       pLtv->u.u16[0] = CNV_INT_TO_LITTLE(pLtv->u.u16[0]);
-                                       break;
-                               case CFG_ADD_TKIP_MAPPED_KEY:
-                                       break;
-                               case CFG_REMOVE_TKIP_MAPPED_KEY:
-                                       break;
-                               /* some RIDs just can't be put */
-                               case CFG_MB_INFO:
-                               case CFG_IFB:
-                               default:
-                                       break;
-                               }
-
-                               /* This code will prevent Static Configuration Entities from
-                                  being sent to the card, as they require a call to
-                                  UIL_ACT_APPLY to take effect. Dynamic Entities will be sent
-                                  immediately */
-                               switch (pLtv->typ) {
-                               case CFG_CNF_PORT_TYPE:
-                               case CFG_CNF_OWN_MAC_ADDR:
-                               case CFG_CNF_OWN_CHANNEL:
-                               case CFG_CNF_OWN_SSID:
-                               case CFG_CNF_OWN_ATIM_WINDOW:
-                               case CFG_CNF_SYSTEM_SCALE:
-                               case CFG_CNF_MAX_DATA_LEN:
-                               case CFG_CNF_PM_ENABLED:
-                               case CFG_CNF_MCAST_RX:
-                               case CFG_CNF_MAX_SLEEP_DURATION:
-                               case CFG_CNF_HOLDOVER_DURATION:
-                               case CFG_CNF_OWN_NAME:
-                               case CFG_CNF_LOAD_BALANCING:
-                               case CFG_CNF_MEDIUM_DISTRIBUTION:
-#ifdef WARP
-                               case CFG_CNF_TX_POW_LVL:
-                               case CFG_CNF_CONNECTION_CNTL:
-                               /*case CFG_PROBE_DATA_RATE: */
-#endif /* HERMES25 */
-#if 1 /*;? (HCF_TYPE) & HCF_TYPE_AP */
-               /*;?should we restore this to allow smaller memory footprint */
-                               case CFG_CNF_OWN_DTIM_PERIOD:
-#ifdef WARP
-                               case CFG_CNF_OWN_BEACON_INTERVAL:                    /* Own Beacon Interval */
-#endif /* WARP */
-#ifdef USE_WDS
-                               case CFG_CNF_WDS_ADDR1:
-                               case CFG_CNF_WDS_ADDR2:
-                               case CFG_CNF_WDS_ADDR3:
-                               case CFG_CNF_WDS_ADDR4:
-                               case CFG_CNF_WDS_ADDR5:
-                               case CFG_CNF_WDS_ADDR6:
-#endif
-                               case CFG_CNF_MCAST_PM_BUF:
-                               case CFG_CNF_REJECT_ANY:
-#endif
-
-                               case CFG_CNF_ENCRYPTION:
-                               case CFG_CNF_AUTHENTICATION:
-#if 1 /* ;? (HCF_TYPE) & HCF_TYPE_AP */
-               /* ;?should we restore this to allow smaller memory footprint */
-
-                               case CFG_CNF_EXCL_UNENCRYPTED:
-                               case CFG_CNF_MCAST_RATE:
-                               case CFG_CNF_INTRA_BSS_RELAY:
-#endif
-
-                               case CFG_CNF_MICRO_WAVE:
-                               /* case CFG_CNF_LOAD_BALANCING: */
-                               /* case CFG_CNF_MEDIUM_DISTRIBUTION: */
-                               /* case CFG_CNF_RX_ALL_GROUP_ADDRESS: */
-                               /* case CFG_CNF_COUNTRY_INFO: */
-                               /* case CFG_COUNTRY_STRING: */
-                               case CFG_AP_MODE:
-                               case CFG_ENCRYPT_STRING:
-                               /* case CFG_DRIVER_ENABLE: */
-                               case CFG_WOLAS_ENABLE:
-                               case CFG_MB_INFO:
-                               case CFG_IFB:
-                                       break;
-                               /* Deal with this dynamic MSF RID, as it's required for WPA */
-                               case CFG_DRIVER_ENABLE:
-                                       if (lp->driverEnable) {
-                                               hcf_cntl(&(lp->hcfCtx), HCF_CNTL_ENABLE | HCF_PORT_0);
-                                               hcf_cntl(&(lp->hcfCtx), HCF_CNTL_CONNECT);
-                                       } else {
-                                               hcf_cntl(&(lp->hcfCtx), HCF_CNTL_DISABLE | HCF_PORT_0);
-                                               hcf_cntl(&(lp->hcfCtx), HCF_CNTL_DISCONNECT);
-                                       }
-                                       break;
-                               default:
-                                       wl_act_int_off(lp);
-                                       urq->result = hcf_put_info(&(lp->hcfCtx), (LTVP) pLtv);
-                                       wl_act_int_on(lp);
-                                       break;
-                               }
-
-                               if (ltvAllocated)
-                                       kfree(pLtv);
-                       } else {
-                               urq->result = UIL_FAILURE;
-                       }
-               } else {
-                       DBG_ERROR(DbgInfo, "EPERM\n");
-                       urq->result = UIL_FAILURE;
-                       result = -EPERM;
-               }
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return result;
-} /* wvlan_uil_put_info */
-
-/*============================================================================*/
-
-/*******************************************************************************
- *     wvlan_uil_get_info()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sends a specific RID directly to the driver to retrieve configuration
- *      info.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int wvlan_uil_get_info(struct uilreq *urq, struct wl_private *lp)
-{
-       int result = 0;
-       int i;
-
-       if (urq->hcfCtx == &(lp->hcfCtx)) {
-               if ((urq->data != NULL) && (urq->len != 0)) {
-                       ltv_t      *pLtv;
-                       bool_t      ltvAllocated = FALSE;
-
-                       /* Make sure that we have at least a command and length */
-                       if (urq->len < (sizeof(hcf_16) * 2)) {
-                               urq->len = sizeof(lp->ltvRecord);
-                               DBG_ERROR(DbgInfo, "No Length/Type in LTV!!!\n");
-                               DBG_ERROR(DbgInfo, "UIL_ERR_LEN\n");
-                               urq->result = UIL_ERR_LEN;
-                               return result;
-                       }
-
-                       /* Verify the user's LTV record header. */
-                       result = verify_area(VERIFY_READ, urq->data, sizeof(hcf_16) * 2);
-                       if (result != 0) {
-                               DBG_ERROR(DbgInfo, "verify_area(), VERIFY_READ FAILED\n");
-                               urq->result = UIL_FAILURE;
-                               return result;
-                       }
-
-                       /* Get only the command and length information. */
-                       result = copy_from_user(&(lp->ltvRecord), urq->data, sizeof(hcf_16) * 2);
-
-                       /* Make sure the incoming LTV record length is within the bounds of
-                          the IOCTL length. */
-                       if (((lp->ltvRecord.len + 1) * sizeof(hcf_16)) > urq->len) {
-                               DBG_ERROR(DbgInfo, "Incoming LTV too big\n");
-                               urq->len = sizeof(lp->ltvRecord);
-                               urq->result = UIL_ERR_LEN;
-                               return result;
-                       }
-
-                       /* Determine if hcf_get_info() is needed or not */
-                       switch (lp->ltvRecord.typ) {
-                       case CFG_NIC_IDENTITY:
-                               memcpy(&lp->ltvRecord.u.u8[0], &lp->NICIdentity, sizeof(lp->NICIdentity));
-                               break;
-                       case CFG_PRI_IDENTITY:
-                               memcpy(&lp->ltvRecord.u.u8[0], &lp->PrimaryIdentity, sizeof(lp->PrimaryIdentity));
-                               break;
-                       case CFG_AP_MODE:
-                               DBG_ERROR(DbgInfo, "set CFG_AP_MODE no longer supported, so is get useful ????\n");
-                               lp->ltvRecord.u.u16[0] =
-                                       CNV_INT_TO_LITTLE(lp->hcfCtx.IFB_FWIdentity.comp_id) == COMP_ID_FW_AP;
-                               break;
-                       /* case CFG_DRV_INFO: */
-                       case CFG_ENCRYPT_STRING:
-                       case CFG_COUNTRY_STRING:
-                       case CFG_DRIVER_ENABLE:
-                       case CFG_WOLAS_ENABLE:
-                               /* TODO: determine if we're going to support these */
-                               urq->result = UIL_FAILURE;
-                               break;
-                       case CFG_DRV_INFO:
-                               DBG_TRACE(DbgInfo, "Intercept CFG_DRV_INFO\n");
-                               result = cfg_driver_info(urq, lp);
-                               break;
-                       case CFG_DRV_IDENTITY:
-                               DBG_TRACE(DbgInfo, "Intercept CFG_DRV_IDENTITY\n");
-                               result = cfg_driver_identity(urq, lp);
-                               break;
-                       case CFG_IFB:
-                               /* IFB can be a security hole */
-                               if (!capable(CAP_NET_ADMIN)) {
-                                       result = -EPERM;
-                                       break;
-                               }
-
-                               /* Else fall through to the default */
-
-                       case CFG_FW_IDENTITY:   /* For Hermes-1, this is cached */
-                       default:
-
-                               /* Verify the user buffer */
-                               result = verify_area(VERIFY_WRITE, urq->data, urq->len);
-                               if (result != 0) {
-                                       DBG_ERROR(DbgInfo, "verify_area(), VERIFY_WRITE FAILED\n");
-                                       urq->result = UIL_FAILURE;
-                                       break;
-                               }
-
-                               /* If the requested length is greater than the size of our local
-                                  LTV record, try to allocate it from the kernel stack.
-                                  Otherwise, we just use our local LTV record. */
-                               if (urq->len > sizeof(lp->ltvRecord)) {
-                                       pLtv = kmalloc(urq->len, GFP_KERNEL);
-                                       if (pLtv != NULL) {
-                                               ltvAllocated = TRUE;
-
-                                               /* Copy the command/length information into the new buffer. */
-                                               memcpy(pLtv, &(lp->ltvRecord), sizeof(hcf_16) * 2);
-                                       } else {
-                                               urq->len = sizeof(lp->ltvRecord);
-                                               urq->result = UIL_ERR_LEN;
-                                               DBG_ERROR(DbgInfo, "kmalloc FAILED\n");
-                                               DBG_ERROR(DbgInfo, "UIL_ERR_LEN\n");
-                                               result = -ENOMEM;
-                                               break;
-                                       }
-                               } else {
-                                       pLtv = &(lp->ltvRecord);
-                               }
-
-                               wl_act_int_off(lp);
-                               urq->result = hcf_get_info(&(lp->hcfCtx), (LTVP) pLtv);
-                               wl_act_int_on(lp);
-
-                               /* Copy the LTV into the user's buffer. */
-                               /*copy_to_user(urq->data, pLtv, urq->len); */
-
-                               /*if(ltvAllocated)
-                               {
-                                   kfree(pLtv);
-                               }*/
-
-                               /* urq->result = UIL_SUCCESS; */
-                               break;
-                       }
-
-                       /* Handle endian conversion of special fields */
-                       switch (lp->ltvRecord.typ) {
-                       /* simple int gets just need the first hcf_16 byte flipped */
-                       case CFG_CNF_PORT_TYPE:
-                       case CFG_CNF_OWN_CHANNEL:
-                       case CFG_CNF_OWN_ATIM_WINDOW:
-                       case CFG_CNF_SYSTEM_SCALE:
-                       case CFG_CNF_MAX_DATA_LEN:
-                       case CFG_CNF_PM_ENABLED:
-                       case CFG_CNF_MCAST_RX:
-                       case CFG_CNF_MAX_SLEEP_DURATION:
-                       case CFG_CNF_HOLDOVER_DURATION:
-                       case CFG_CNF_OWN_DTIM_PERIOD:
-                       case CFG_CNF_MCAST_PM_BUF:
-                       case CFG_CNF_REJECT_ANY:
-                       case CFG_CNF_ENCRYPTION:
-                       case CFG_CNF_AUTHENTICATION:
-                       case CFG_CNF_EXCL_UNENCRYPTED:
-                       case CFG_CNF_INTRA_BSS_RELAY:
-                       case CFG_CNF_MICRO_WAVE:
-                       case CFG_CNF_LOAD_BALANCING:
-                       case CFG_CNF_MEDIUM_DISTRIBUTION:
-#ifdef WARP
-                       case CFG_CNF_TX_POW_LVL:
-                       case CFG_CNF_CONNECTION_CNTL:
-                       case CFG_CNF_OWN_BEACON_INTERVAL:                          /* Own Beacon Interval */
-                       case CFG_COEXISTENSE_BEHAVIOUR:                            /* Coexistence Behavior */
-                       /*case CFG_CNF_RX_ALL_GROUP_ADDRESS: */
-#endif /* HERMES25 */
-                       case CFG_CREATE_IBSS:
-                       case CFG_RTS_THRH:
-                       case CFG_PROMISCUOUS_MODE:
-                       /*case CFG_WAKE_ON_LAN: */
-                       case CFG_RTS_THRH0:
-                       case CFG_RTS_THRH1:
-                       case CFG_RTS_THRH2:
-                       case CFG_RTS_THRH3:
-                       case CFG_RTS_THRH4:
-                       case CFG_RTS_THRH5:
-                       case CFG_RTS_THRH6:
-                       case CFG_TX_RATE_CNTL0:
-                       case CFG_TX_RATE_CNTL1:
-                       case CFG_TX_RATE_CNTL2:
-                       case CFG_TX_RATE_CNTL3:
-                       case CFG_TX_RATE_CNTL4:
-                       case CFG_TX_RATE_CNTL5:
-                       case CFG_TX_RATE_CNTL6:
-                       case CFG_TX_KEY_ID:
-                       case CFG_TICK_TIME:
-                       case CFG_MAX_LOAD_TIME:
-                       case CFG_NIC_TEMP_TYPE:
-                       case CFG_PORT_STAT:
-                       case CFG_CUR_TX_RATE:
-                       case CFG_CUR_BEACON_INTERVAL:
-                       case CFG_PROTOCOL_RSP_TIME:
-                       case CFG_CUR_SHORT_RETRY_LIMIT:
-                       case CFG_CUR_LONG_RETRY_LIMIT:
-                       case CFG_MAX_TX_LIFETIME:
-                       case CFG_MAX_RX_LIFETIME:
-                       case CFG_CF_POLLABLE:
-                       case CFG_PRIVACY_OPT_IMPLEMENTED:
-                       /* case CFG_CURRENT_REMOTE_RATES: */
-                       /* case CFG_CURRENT_USED_RATES: */
-                       /* case CFG_CURRENT_SYSTEM_SCALE: */
-                       /* case CFG_CURRENT_TX_RATE1: */
-                       /* case CFG_CURRENT_TX_RATE2: */
-                       /* case CFG_CURRENT_TX_RATE3: */
-                       /* case CFG_CURRENT_TX_RATE4: */
-                       /* case CFG_CURRENT_TX_RATE5: */
-                       /* case CFG_CURRENT_TX_RATE6: */
-                       case CFG_PHY_TYPE:
-                       case CFG_CUR_CHANNEL:
-                       /* case CFG_CURRENT_POWER_STATE: */
-                       /* case CFG_CCAMODE: */
-                       /*     lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]); */
-                       /*     break; */
-                       /* name string gets just need the first hcf_16 byte flipped (length of string) */
-                       case CFG_CNF_OWN_SSID:
-                       case CFG_CNF_OWN_NAME:
-                       /* case CNF_DESIRED_SSID: */
-                       case CFG_DESIRED_SSID:
-                       case CFG_SCAN_SSID:
-                       case CFG_CUR_SSID:
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]);
-                               break;
-                       /* non-length counted strings need no byte flipping */
-                       case CFG_CNF_OWN_MAC_ADDR:
-                       /* this case is no longer valid: CFG_CNF_WDS_ADDR */
-                       case CFG_CNF_WDS_ADDR1:
-                       case CFG_CNF_WDS_ADDR2:
-                       case CFG_CNF_WDS_ADDR3:
-                       case CFG_CNF_WDS_ADDR4:
-                       case CFG_CNF_WDS_ADDR5:
-                       case CFG_CNF_WDS_ADDR6:
-                       case CFG_GROUP_ADDR:
-                       case CFG_NIC_SERIAL_NUMBER:
-                       case CFG_CUR_BSSID:
-                       case CFG_NIC_MAC_ADDR:
-                       case CFG_SUPPORTED_DATA_RATES:  /* need to ensure we can treat this as a string */
-                               break;
-                       /* case CFG_CNF_COUNTRY_INFO: */     /* special case, see page 75  of 022486, Rev C. */
-                       /* case CFG_CURRENT_COUNTRY_INFO: */ /* special case, see page 101 of 022486, Rev C. */
-                       /*
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]);
-                               lp->ltvRecord.u.u16[3] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[3]);
-
-                               for(i = 4; i < lp->ltvRecord.len; i++) {
-                                       lp->ltvRecord.u.u16[i] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[i]);
-                               }
-                               break;
-                       */
-
-                       case CFG_DEFAULT_KEYS:
-                               {
-                                       CFG_DEFAULT_KEYS_STRCT *pKeys = (CFG_DEFAULT_KEYS_STRCT *)&lp->ltvRecord.u.u8[0];
-
-                                       pKeys[0].len = CNV_INT_TO_LITTLE(pKeys[0].len);
-                                       pKeys[1].len = CNV_INT_TO_LITTLE(pKeys[1].len);
-                                       pKeys[2].len = CNV_INT_TO_LITTLE(pKeys[2].len);
-                                       pKeys[3].len = CNV_INT_TO_LITTLE(pKeys[3].len);
-                               }
-                               break;
-                       case CFG_CNF_MCAST_RATE:
-                       case CFG_TX_RATE_CNTL:
-                       case CFG_SUPPORTED_RATE_SET_CNTL:    /*  Supported Rate Set Control */
-                       case CFG_BASIC_RATE_SET_CNTL:    /*  Basic Rate Set Control */
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]);
-                               lp->ltvRecord.u.u16[1] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[1]);
-                               break;
-                       case CFG_DL_BUF:
-                       case CFG_NIC_IDENTITY:
-                       case CFG_COMMS_QUALITY:
-                       case CFG_PCF_INFO:
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]);
-                               lp->ltvRecord.u.u16[1] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[1]);
-                               lp->ltvRecord.u.u16[2] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[2]);
-                               break;
-                       case CFG_FW_IDENTITY:
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]);
-                               lp->ltvRecord.u.u16[1] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[1]);
-                               lp->ltvRecord.u.u16[2] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[2]);
-                               lp->ltvRecord.u.u16[3] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[3]);
-                               break;
-                       /* case CFG_HSI_SUP_RANGE: */
-                       case CFG_NIC_MFI_SUP_RANGE:
-                       case CFG_NIC_CFI_SUP_RANGE:
-                       case CFG_NIC_PROFILE:
-                       case CFG_FW_SUP_RANGE:
-                               lp->ltvRecord.u.u16[0] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[0]);
-                               lp->ltvRecord.u.u16[1] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[1]);
-                               lp->ltvRecord.u.u16[2] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[2]);
-                               lp->ltvRecord.u.u16[3] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[3]);
-                               lp->ltvRecord.u.u16[4] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[4]);
-                               break;
-                       case CFG_MFI_ACT_RANGES_STA:
-                       case CFG_CFI_ACT_RANGES_STA:
-                       case CFG_CUR_SCALE_THRH:
-                       case CFG_AUTHENTICATION_ALGORITHMS:
-                               for (i = 0; i < (lp->ltvRecord.len - 1); i++)
-                                       lp->ltvRecord.u.u16[i] = CNV_INT_TO_LITTLE(lp->ltvRecord.u.u16[i]);
-                               break;
-                       /* done at init time, and endian handled then */
-                       case CFG_PRI_IDENTITY:
-                               break;
-                       case CFG_MB_INFO:
-                               /* wvlanEndianTranslateMailbox(pLtv); */
-                               break;
-                       /* MSF and HCF RIDS */
-                       case CFG_IFB:
-                       case CFG_DRV_INFO:
-                       case CFG_AP_MODE:
-                       case CFG_ENCRYPT_STRING:
-                       case CFG_COUNTRY_STRING:
-                       case CFG_DRIVER_ENABLE:
-                       case CFG_WOLAS_ENABLE:
-                       default:
-                               break;
-                       }
-
-                       /* Copy the LTV into the user's buffer. */
-                       copy_to_user(urq->data, &(lp->ltvRecord), urq->len);
-
-                       if (ltvAllocated)
-                               kfree(&(lp->ltvRecord));
-                       urq->result = UIL_SUCCESS;
-               } else {
-                       urq->result = UIL_FAILURE;
-               }
-       } else {
-               DBG_ERROR(DbgInfo, "UIL_ERR_WRONG_IFB\n");
-               urq->result = UIL_ERR_WRONG_IFB;
-       }
-
-       return result;
-} /* wvlan_uil_get_info */
-/*============================================================================*/
-
-
-
-
-
-/*******************************************************************************
- *     cfg_driver_info()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Retrieves driver information.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int cfg_driver_info(struct uilreq *urq, struct wl_private *lp)
-{
-       int result = 0;
-
-       /* Make sure that user buffer can handle the driver information buffer */
-       if (urq->len < sizeof(lp->driverInfo)) {
-               urq->len = sizeof(lp->driverInfo);
-               urq->result = UIL_ERR_LEN;
-               return result;
-       }
-
-       /* Verify the user buffer. */
-       result = verify_area(VERIFY_WRITE, urq->data, sizeof(lp->driverInfo));
-       if (result != 0) {
-               urq->result = UIL_FAILURE;
-               return result;
-       }
-
-       lp->driverInfo.card_stat = lp->hcfCtx.IFB_CardStat;
-
-       /* Copy the driver information into the user's buffer. */
-       urq->result = UIL_SUCCESS;
-       copy_to_user(urq->data, &(lp->driverInfo), sizeof(lp->driverInfo));
-
-       return result;
-} /* cfg_driver_info */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     cfg_driver_identity()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Retrieves ID information from the card.
- *
- *  PARAMETERS:
- *
- *      urq - a pointer to the UIL request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      UIL_SUCCESS
- *      UIL_ERR_xxx value otherwise
- *
- ******************************************************************************/
-int cfg_driver_identity(struct uilreq *urq, struct wl_private *lp)
-{
-       int result = 0;
-
-       /* Make sure that user buffer can handle the driver identity structure. */
-       if (urq->len < sizeof(lp->driverIdentity)) {
-               urq->len = sizeof(lp->driverIdentity);
-               urq->result = UIL_ERR_LEN;
-               return result;
-       }
-
-       /* Verify the user buffer. */
-       result = verify_area(VERIFY_WRITE, urq->data, sizeof(lp->driverIdentity));
-       if (result != 0) {
-               urq->result = UIL_FAILURE;
-               return result;
-       }
-
-       /* Copy the driver identity into the user's buffer. */
-       urq->result = UIL_SUCCESS;
-       copy_to_user(urq->data, &(lp->driverIdentity), sizeof(lp->driverIdentity));
-
-       return result;
-} /* cfg_driver_identity */
-/*============================================================================*/
-
-
-#endif  /* USE_UIL */
-
-
-/* If WIRELESS_EXT is not defined, then the functions that follow will not be
-   included in the build. */
-/* NOTE: Are these still even needed? */
-#ifdef WIRELESS_EXT
-
-
-/*******************************************************************************
- *     wvlan_set_netname()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Set the ESSID of the card.
- *
- *  PARAMETERS:
- *
- *      wrq - a pointer to the wireless request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_set_netname(struct net_device *dev,
-                     struct iw_request_info *info,
-                     union iwreq_data *wrqu,
-                     char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-
-       wl_lock(lp, &flags);
-
-       memset(lp->NetworkName, 0, sizeof(lp->NetworkName));
-       memcpy(lp->NetworkName, extra, wrqu->data.length);
-
-       /* Commit the adapter parameters */
-       wl_apply(lp);
-       wl_unlock(lp, &flags);
-
-       return 0;
-} /* wvlan_set_netname */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_get_netname()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Get the ESSID of the card.
- *
- *  PARAMETERS:
- *
- *      wrq - a pointer to the wireless request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_get_netname(struct net_device *dev,
-                     struct iw_request_info *info,
-                     union iwreq_data *wrqu,
-                     char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int         ret = 0;
-       int         status = -1;
-       wvName_t   *pName;
-
-       wl_lock(lp, &flags);
-
-       /* Get the current network name */
-       lp->ltvRecord.len = 1 + (sizeof(*pName) / sizeof(hcf_16));
-       lp->ltvRecord.typ = CFG_CUR_SSID;
-
-       status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord));
-
-       if (status == HCF_SUCCESS) {
-               pName = (wvName_t *)&(lp->ltvRecord.u.u32);
-
-               memset(extra, '\0', HCF_MAX_NAME_LEN);
-               wrqu->data.length = pName->length;
-
-               memcpy(extra, pName->name, pName->length);
-       } else {
-               ret = -EFAULT;
-       }
-
-       wl_unlock(lp, &flags);
-
-       return ret;
-} /* wvlan_get_netname */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_set_station_nickname()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Set the card's station nickname.
- *
- *  PARAMETERS:
- *
- *      wrq - a pointer to the wireless request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_set_station_nickname(struct net_device *dev,
-                     struct iw_request_info *info,
-                     union iwreq_data *wrqu,
-                     char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       size_t len;
-
-       wl_lock(lp, &flags);
-
-       memset(lp->StationName, 0, sizeof(lp->StationName));
-       len = min_t(size_t, wrqu->data.length, sizeof(lp->StationName));
-       strlcpy(lp->StationName, extra, len);
-
-       /* Commit the adapter parameters */
-       wl_apply(lp);
-       wl_unlock(lp, &flags);
-
-       return 0;
-} /* wvlan_set_station_nickname */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_get_station_nickname()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Get the card's station nickname.
- *
- *  PARAMETERS:
- *
- *      wrq - a pointer to the wireless request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_get_station_nickname(struct net_device *dev,
-                     struct iw_request_info *info,
-                     union iwreq_data *wrqu,
-                     char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int         ret = 0;
-       int         status = -1;
-       wvName_t   *pName;
-
-       wl_lock(lp, &flags);
-
-       /* Get the current station name */
-       lp->ltvRecord.len = 1 + (sizeof(*pName) / sizeof(hcf_16));
-       lp->ltvRecord.typ = CFG_CNF_OWN_NAME;
-
-       status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord));
-
-       if (status == HCF_SUCCESS) {
-               pName = (wvName_t *)&(lp->ltvRecord.u.u32);
-
-               memset(extra, '\0', HCF_MAX_NAME_LEN);
-               wrqu->data.length = pName->length;
-               memcpy(extra, pName->name, pName->length);
-       } else {
-               ret = -EFAULT;
-       }
-
-       wl_unlock(lp, &flags);
-
-/* out: */
-       return ret;
-} /* wvlan_get_station_nickname */
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wvlan_set_porttype()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Set the card's porttype
- *
- *  PARAMETERS:
- *
- *      wrq - a pointer to the wireless request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_set_porttype(struct net_device *dev,
-                     struct iw_request_info *info,
-                     union iwreq_data *wrqu,
-                     char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int     ret = 0;
-       hcf_16  portType;
-
-       wl_lock(lp, &flags);
-
-       /* Validate the new value */
-       portType = *((__u32 *)extra);
-
-       if (!((portType == 1) || (portType == 3))) {
-               ret = -EINVAL;
-               goto out_unlock;
-       }
-
-       lp->PortType = portType;
-
-       /* Commit the adapter parameters */
-       wl_apply(lp);
-
-out_unlock:
-       wl_unlock(lp, &flags);
-
-/* out: */
-       return ret;
-}
-
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wvlan_get_porttype()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Get the card's porttype
- *
- *  PARAMETERS:
- *
- *      wrq - a pointer to the wireless request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_get_porttype(struct net_device *dev,
-                     struct iw_request_info *info,
-                     union iwreq_data *wrqu,
-                     char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int     ret = 0;
-       int     status = -1;
-       hcf_16  *pPortType;
-       __u32 *pData = (__u32 *)extra;
-
-       wl_lock(lp, &flags);
-
-       /* Get the current port type */
-       lp->ltvRecord.len = 1 + (sizeof(*pPortType) / sizeof(hcf_16));
-       lp->ltvRecord.typ = CFG_CNF_PORT_TYPE;
-
-       status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord));
-
-       if (status == HCF_SUCCESS) {
-               pPortType = (hcf_16 *)&(lp->ltvRecord.u.u32);
-
-               *pData = CNV_LITTLE_TO_INT(*pPortType);
-       } else {
-           ret = -EFAULT;
-       }
-
-       wl_unlock(lp, &flags);
-
-/* out: */
-       return ret;
-} /* wvlan_get_porttype */
-/*============================================================================*/
-
-#endif  /* WIRELESS_EXT */
-
-
-
-
-#ifdef USE_RTS
-/*******************************************************************************
- *     wvlan_rts()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      IOCTL handler for RTS commands
- *
- *  PARAMETERS:
- *
- *      rrq - a pointer to the rts request buffer
- *      lp  - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wvlan_rts(struct rtsreq *rrq, __u32 io_base)
-{
-       int ioctl_ret = 0;
-
-       DBG_PRINT("io_base: 0x%08x\n", io_base);
-
-       switch (rrq->typ) {
-       case WL_IOCTL_RTS_READ:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_RTS -- WL_IOCTL_RTS_READ\n");
-               rrq->data[0] = IN_PORT_WORD(io_base + rrq->reg);
-               DBG_TRACE(DbgInfo, "  reg 0x%04x ==> 0x%04x\n", rrq->reg, CNV_LITTLE_TO_SHORT(rrq->data[0]));
-               break;
-       case WL_IOCTL_RTS_WRITE:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_RTS -- WL_IOCTL_RTS_WRITE\n");
-               OUT_PORT_WORD(io_base + rrq->reg, rrq->data[0]);
-               DBG_TRACE(DbgInfo, "  reg 0x%04x <== 0x%04x\n", rrq->reg, CNV_LITTLE_TO_SHORT(rrq->data[0]));
-               break;
-       case WL_IOCTL_RTS_BATCH_READ:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_RTS -- WL_IOCTL_RTS_BATCH_READ\n");
-               IN_PORT_STRING_16(io_base + rrq->reg, rrq->data, rrq->len);
-               DBG_TRACE(DbgInfo, "  reg 0x%04x ==> %d bytes\n", rrq->reg, rrq->len * sizeof(__u16));
-               break;
-       case WL_IOCTL_RTS_BATCH_WRITE:
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_RTS -- WL_IOCTL_RTS_BATCH_WRITE\n");
-               OUT_PORT_STRING_16(io_base + rrq->reg, rrq->data, rrq->len);
-               DBG_TRACE(DbgInfo, "  reg 0x%04x <== %d bytes\n", rrq->reg, rrq->len * sizeof(__u16));
-               break;
-       default:
-
-               DBG_TRACE(DbgInfo, "IOCTL: WVLAN2_IOCTL_RTS -- UNSUPPORTED RTS CODE: 0x%X", rrq->typ);
-               ioctl_ret = -EOPNOTSUPP;
-               break;
-       }
-
-       return ioctl_ret;
-} /* wvlan_rts */
-/*============================================================================*/
-
-#endif  /* USE_RTS */
diff --git a/drivers/staging/wlags49_h2/wl_priv.h b/drivers/staging/wlags49_h2/wl_priv.h
deleted file mode 100644 (file)
index f35e794..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing information required for the private IOCTL handlers.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_PRIV_H__
-#define __WL_PRIV_H__
-
-
-
-
-/*******************************************************************************
- *  function prototypes
- ******************************************************************************/
-#ifdef WIRELESS_EXT
-
-
-int wvlan_set_netname(struct net_device *, struct iw_request_info *,
-                     union iwreq_data *, char *extra);
-
-int wvlan_get_netname(struct net_device *, struct iw_request_info *,
-                     union iwreq_data *, char *extra);
-
-int wvlan_set_station_nickname(struct net_device *, struct iw_request_info *,
-                              union iwreq_data *, char *extra);
-
-int wvlan_get_station_nickname(struct net_device *, struct iw_request_info *,
-                              union iwreq_data *, char *extra);
-
-int wvlan_set_porttype(struct net_device *, struct iw_request_info *,
-                      union iwreq_data *, char *extra);
-
-int wvlan_get_porttype(struct net_device *, struct iw_request_info *,
-                      union iwreq_data *, char *extra);
-
-
-#endif  /* WIRELESS_EXT */
-
-
-
-
-#ifdef USE_UIL
-
-int wvlan_uil(struct uilreq *urq, struct wl_private *lp);
-
-/* int wvlan_uil_connect( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_disconnect( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_action( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_block( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_unblock( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_send_diag_msg( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_put_info( struct uilreq *urq, struct wl_private *lp ); */
-/* int wvlan_uil_get_info( struct uilreq *urq, struct wl_private *lp ); */
-
-/* int cfg_driver_info( struct uilreq *urq, struct wl_private *lp ); */
-/* int cfg_driver_identity( struct uilreq *urq, struct wl_private *lp ); */
-
-#endif  /* USE_UIL */
-
-
-#ifdef USE_RTS
-
-int wvlan_rts(struct rtsreq *rrq, __u32 io_base);
-int wvlan_rts_read(__u16 reg, __u16 *val, __u32 io_base);
-int wvlan_rts_write(__u16 reg, __u16 val, __u32 io_base);
-int wvlan_rts_batch_read(struct rtsreq *rrq, __u32 io_base);
-int wvlan_rts_batch_write(struct rtsreq *rrq, __u32 io_base);
-
-#endif  /* USE_RTS */
-
-
-#endif  /* __WL_PRIV_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_profile.c b/drivers/staging/wlags49_h2/wl_profile.c
deleted file mode 100644 (file)
index 28cc576..0000000
+++ /dev/null
@@ -1,995 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file defines routines required to parse configuration parameters
- *   listed in a config file, if that config file exists.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/* Only include this file if USE_PROFILE is defined */
-#ifdef USE_PROFILE
-
-
-
-
-/*******************************************************************************
- *  constant definitions
- ******************************************************************************/
-
-
-/* Allow support for calling system fcns to parse config file */
-#define __KERNEL_SYSCALLS__
-
-
-
-
-/*******************************************************************************
- * include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-#include <linux/unistd.h>
-#include <asm/uaccess.h>
-#include <limits.h>
-
-#define BIN_DL 1
-
-#include <debug.h>
-#include <hcf.h>
-/* #include <hcfdef.h> */
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_util.h>
-#include <wl_enc.h>
-#include <wl_main.h>
-#include <wl_profile.h>
-
-
-/* Definition needed to prevent unresolved external in unistd.h */
-static int errno;
-
-#if DBG
-extern p_u32    DebugFlag;
-#endif
-
-int parse_yes_no(char *value);
-
-
-int parse_yes_no(char *value)
-{
-int rc = 0;                                                                            /* default to NO for invalid parameters */
-
-       if (strlen(value) == 1) {
-               if ((value[0] | ('Y'^'y')) == 'y')
-                       rc = 1;
-       /* } else { */
-               /* this should not be debug time info, it is an enduser data entry error ;? */
-               /* DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_MICROWAVE_ROBUSTNESS); */
-       }
-       return rc;
-} /* parse_yes_no */
-
-
-/*******************************************************************************
- *     parse_config()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function opens the device's config file and parses the options from
- *   it, so that it can properly configure itself. If no configuration file
- *   or configuration is present, then continue to use the options already
- *   parsed from config.opts or wireless.opts.
- *
- *  PARAMETERS:
- *
- *      dev - a pointer to the device's net_device structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void parse_config(struct net_device *dev)
-{
-       int                                 file_desc;
-#if 0 /* BIN_DL */
-       int                             rc;
-       char                            *cp = NULL;
-#endif /* BIN_DL */
-       char                buffer[MAX_LINE_SIZE];
-       char                filename[MAX_LINE_SIZE];
-       mm_segment_t        fs;
-       struct wl_private   *wvlan_config = NULL;
-       ENCSTRCT            sEncryption;
-
-       /* Get the wavelan specific info for this device */
-       wvlan_config = dev->priv;
-       if (wvlan_config == NULL) {
-               DBG_ERROR(DbgInfo, "Wavelan specific info struct not present?\n");
-               return;
-       }
-
-       /* setup the default encryption string */
-       strcpy(wvlan_config->szEncryption, DEF_CRYPT_STR);
-
-       /* Obtain a user-space process context, storing the original context */
-       fs = get_fs();
-       set_fs(get_ds());
-
-       /* Determine the filename for this device and attempt to open it */
-       sprintf(filename, "%s%s", ROOT_CONFIG_FILENAME, dev->name);
-       file_desc = open(filename, O_RDONLY, 0);
-       if (file_desc != -1) {
-               DBG_TRACE(DbgInfo, "Wireless config file found. Parsing options...\n");
-
-               /* Read out the options */
-               while (readline(file_desc, buffer))
-                       translate_option(buffer, wvlan_config);
-               /* Close the file */
-               close(file_desc);       /* ;?even if file_desc == -1 ??? */
-       } else {
-               DBG_TRACE(DbgInfo, "No iwconfig file found for this device; "
-                                  "config.opts or wireless.opts will be used\n");
-       }
-       /* Return to the original context */
-       set_fs(fs);
-
-       /* convert the WEP keys, if read in as key1, key2, type of data */
-       if (wvlan_config->EnableEncryption) {
-               memset(&sEncryption, 0, sizeof(sEncryption));
-
-               wl_wep_decode(CRYPT_CODE, &sEncryption,
-                                                  wvlan_config->szEncryption);
-
-               /* the Linux driver likes to use 1-4 for the key IDs, and then
-                  convert to 0-3 when sending to the card.  The Windows code
-                  base used 0-3 in the API DLL, which was ported to Linux.  For
-                  the sake of the user experience, we decided to keep 0-3 as the
-                  numbers used in the DLL; and will perform the +1 conversion here.
-                  We could have converted  the entire Linux driver, but this is
-                  less obtrusive.  This may be a "todo" to convert the whole driver */
-               sEncryption.wEnabled = wvlan_config->EnableEncryption;
-               sEncryption.wTxKeyID = wvlan_config->TransmitKeyID - 1;
-
-               memcpy(&sEncryption.EncStr, &wvlan_config->DefaultKeys,
-                               sizeof(CFG_DEFAULT_KEYS_STRCT));
-
-               memset(wvlan_config->szEncryption, 0, sizeof(wvlan_config->szEncryption));
-
-               wl_wep_code(CRYPT_CODE, wvlan_config->szEncryption, &sEncryption,
-                                                sizeof(sEncryption));
-       }
-
-       /* decode the encryption string for the call to wl_commit() */
-       wl_wep_decode(CRYPT_CODE, &sEncryption, wvlan_config->szEncryption);
-
-       wvlan_config->TransmitKeyID    = sEncryption.wTxKeyID + 1;
-       wvlan_config->EnableEncryption = sEncryption.wEnabled;
-
-       memcpy(&wvlan_config->DefaultKeys, &sEncryption.EncStr,
-                       sizeof(CFG_DEFAULT_KEYS_STRCT));
-
-#if 0 /* BIN_DL */
-               /* Obtain a user-space process context, storing the original context */
-               fs = get_fs();
-               set_fs(get_ds());
-
-               /* ;?just to fake something */
-               strcpy(/*wvlan_config->fw_image_*/filename, "/etc/agere/fw.bin");
-               file_desc = open(/*wvlan_config->fw_image_*/filename, 0, 0);
-               if (file_desc == -1) {
-                       DBG_ERROR(DbgInfo, "No image file found\n");
-               } else {
-                       DBG_TRACE(DbgInfo, "F/W image file found\n");
-#define DHF_ALLOC_SIZE 96000                   /* just below 96K, let's hope it suffices for now and for the future */
-                       cp = vmalloc(DHF_ALLOC_SIZE);
-                       if (cp == NULL) {
-                               DBG_ERROR(DbgInfo, "error in vmalloc\n");
-                       } else {
-                               rc = read(file_desc, cp, DHF_ALLOC_SIZE);
-                               if (rc == DHF_ALLOC_SIZE) {
-                                       DBG_ERROR(DbgInfo, "buffer too small, %d\n", DHF_ALLOC_SIZE);
-                               } else if (rc > 0) {
-                                       DBG_TRACE(DbgInfo, "read O.K.: %d bytes  %.12s\n", rc, cp);
-                                       rc = read(file_desc, &cp[rc], 1);
-                                       if (rc == 0)
-                                               DBG_TRACE(DbgInfo, "no more to read\n");
-                               }
-                               if (rc != 0) {
-                                       DBG_ERROR(DbgInfo, "file not read in one swoop or other error"\
-                                                                               ", give up, too complicated, rc = %0X\n", rc);
-                               }
-                               vfree(cp);
-                       }
-                       close(file_desc);
-               }
-               set_fs(fs);                     /* Return to the original context */
-#endif /* BIN_DL */
-
-       return;
-} /* parse_config */
-
-/*******************************************************************************
- *     readline()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function reads in data from a given file one line at a time,
- *   converting the detected newline character '\n' to a null '\0'. Note that
- *   the file descriptor must be valid before calling this function.
- *
- *  PARAMETERS:
- *
- *      filedesc    - the file descriptor for the open configuration file
- *      buffer      - a buffer pointer, passed in by the caller, to which the
- *                    line will be stored.
- *
- *  RETURNS:
- *
- *      the number of bytes read
- *      -1 on error
- *
- ******************************************************************************/
-int readline(int filedesc, char *buffer)
-{
-       int result = -1;
-       int bytes_read = 0;
-       /*------------------------------------------------------------------------*/
-
-       /* Make sure the file descriptor is good */
-       if (filedesc != -1) {
-               /* Read in from the file byte by byte until a newline is reached */
-               while ((result = read(filedesc, &buffer[bytes_read], 1)) == 1) {
-                       if (buffer[bytes_read] == '\n') {
-                               buffer[bytes_read] = '\0';
-                               bytes_read++;
-                               break;
-                       }
-                       bytes_read++;
-               }
-       }
-
-       /* Return the number of bytes read */
-       if (result == -1)
-               return result;
-       else
-               return bytes_read;
-} /* readline */
-/*============================================================================*/
-
-/*******************************************************************************
- *     translate_option()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function takes a line read in from the config file and parses out
- *   the key/value pairs. It then determines which key has been parsed and sets
- *   the card's configuration based on the value given.
- *
- *  PARAMETERS:
- *
- *      buffer - a buffer containing a line to translate
- *      config - a pointer to the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void translate_option(char *buffer, struct wl_private *lp)
-{
-       unsigned int value_convert = 0;
-       int string_length = 0;
-       char *key = NULL;
-       char *value = NULL;
-       u_char mac_value[ETH_ALEN];
-       /*------------------------------------------------------------------------*/
-
-       if (buffer == NULL || lp == NULL) {
-               DBG_ERROR(DbgInfo, "Config file buffer and/or wavelan buffer ptr NULL\n");
-               return;
-       }
-
-       ParseConfigLine(buffer, &key, &value);
-
-       if (key == NULL || value == NULL)
-               return;
-
-       /* Determine which key it is and perform the appropriate action */
-
-       /* Configuration parameters used in all scenarios */
-#if DBG
-       /* handle DebugFlag as early as possible so it starts its influence as early
-        * as possible
-        */
-       if (strcmp(key, PARM_NAME_DEBUG_FLAG) == 0) {
-               if (DebugFlag == ~0) {                  /* if DebugFlag is not specified on the command line */
-                       if (DbgInfo->DebugFlag == 0) {  /* if pc_debug did not set DebugFlag (i.e.pc_debug is
-                                                                                        * not specified or specified outside the 4-8 range
-                                                                                        */
-                               DbgInfo->DebugFlag |= DBG_DEFAULTS;
-                       }
-               } else {
-                       DbgInfo->DebugFlag = simple_strtoul(value, NULL, 0); /* ;?DebugFlag; */
-               }
-               DbgInfo->DebugFlag = simple_strtoul(value, NULL, 0); /* ;?Delete ASAP */
-       }
-#endif /* DBG */
-       if (strcmp(key, PARM_NAME_AUTH_KEY_MGMT_SUITE) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_AUTH_KEY_MGMT_SUITE, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_AUTH_KEY_MGMT_SUITE) || (value_convert <= PARM_MAX_AUTH_KEY_MGMT_SUITE))
-                       lp->AuthKeyMgmtSuite = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_AUTH_KEY_MGMT_SUITE);
-       } else if (strcmp(key, PARM_NAME_BRSC_2GHZ) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_BRSC_2GHZ, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_BRSC) || (value_convert <= PARM_MAX_BRSC))
-                       lp->brsc[0] = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_BRSC_2GHZ);
-       } else if (strcmp(key, PARM_NAME_BRSC_5GHZ) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_BRSC_5GHZ, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_BRSC) || (value_convert <= PARM_MAX_BRSC))
-                       lp->brsc[1] = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_BRSC_5GHZ);
-       } else if ((strcmp(key, PARM_NAME_DESIRED_SSID) == 0) || (strcmp(key, PARM_NAME_OWN_SSID) == 0)) {
-               DBG_TRACE(DbgInfo, "SSID, value: %s\n", value);
-
-               memset(lp->NetworkName, 0, (PARM_MAX_NAME_LEN + 1));
-
-               /* Make sure the value isn't too long */
-               string_length = strlen(value);
-               if (string_length > PARM_MAX_NAME_LEN) {
-                       DBG_WARNING(DbgInfo, "SSID too long; will be truncated\n");
-                       string_length = PARM_MAX_NAME_LEN;
-               }
-
-               memcpy(lp->NetworkName, value, string_length);
-       }
-#if 0
-       else if (strcmp(key, PARM_NAME_DOWNLOAD_FIRMWARE) == 0) {
-               DBG_TRACE(DbgInfo, "DOWNLOAD_FIRMWARE, value: %s\n", value);
-               memset(lp->fw_image_filename, 0, (MAX_LINE_SIZE + 1));
-               /* Make sure the value isn't too long */
-               string_length = strlen(value);
-               if (string_length > MAX_LINE_SIZE)
-                       DBG_WARNING(DbgInfo, "F/W image file name too long; will be ignored\n");
-               else
-                       memcpy(lp->fw_image_filename, value, string_length);
-       }
-#endif
-       else if (strcmp(key, PARM_NAME_ENABLE_ENCRYPTION) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_ENABLE_ENCRYPTION, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_ENABLE_ENCRYPTION) && (value_convert <= PARM_MAX_ENABLE_ENCRYPTION))
-                       lp->EnableEncryption = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_ENABLE_ENCRYPTION);
-       } else if (strcmp(key, PARM_NAME_ENCRYPTION) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_ENCRYPTION, value);
-
-               memset(lp->szEncryption, 0, sizeof(lp->szEncryption));
-
-               /* Make sure the value isn't too long */
-               string_length = strlen(value);
-               if (string_length > sizeof(lp->szEncryption)) {
-                       DBG_WARNING(DbgInfo, "%s too long; will be truncated\n", PARM_NAME_ENCRYPTION);
-                       string_length = sizeof(lp->szEncryption);
-               }
-
-               memcpy(lp->szEncryption, value, string_length);
-       } else if (strcmp(key, PARM_NAME_KEY1) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_KEY1, value);
-
-               if (is_valid_key_string(value)) {
-                       memset(lp->DefaultKeys.key[0].key, 0, MAX_KEY_SIZE);
-
-                       key_string2key(value, &lp->DefaultKeys.key[0]);
-               } else {
-                        DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_KEY1);
-               }
-       } else if (strcmp(key, PARM_NAME_KEY2) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_KEY2, value);
-
-               if (is_valid_key_string(value)) {
-                       memset(lp->DefaultKeys.key[1].key, 0, MAX_KEY_SIZE);
-
-                       key_string2key(value, &lp->DefaultKeys.key[1]);
-               } else {
-                        DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_KEY2);
-               }
-       } else if (strcmp(key, PARM_NAME_KEY3) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_KEY3, value);
-
-               if (is_valid_key_string(value)) {
-                       memset(lp->DefaultKeys.key[2].key, 0, MAX_KEY_SIZE);
-
-                       key_string2key(value, &lp->DefaultKeys.key[2]);
-               } else {
-                        DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_KEY3);
-               }
-       } else if (strcmp(key, PARM_NAME_KEY4) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_KEY4, value);
-
-               if (is_valid_key_string(value)) {
-                       memset(lp->DefaultKeys.key[3].key, 0, MAX_KEY_SIZE);
-
-                       key_string2key(value, &lp->DefaultKeys.key[3]);
-               } else {
-                        DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_KEY4);
-               }
-       }
-       /* New Parameters for WARP */
-       else if (strcmp(key, PARM_NAME_LOAD_BALANCING) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_LOAD_BALANCING, value);
-               lp->loadBalancing = parse_yes_no(value);
-       } else if (strcmp(key, PARM_NAME_MEDIUM_DISTRIBUTION) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_MEDIUM_DISTRIBUTION, value);
-               lp->mediumDistribution = parse_yes_no(value);
-       } else if (strcmp(key, PARM_NAME_MICROWAVE_ROBUSTNESS) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_MICROWAVE_ROBUSTNESS, value);
-               lp->MicrowaveRobustness = parse_yes_no(value);
-       } else if (strcmp(key, PARM_NAME_MULTICAST_RATE) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_MULTICAST_RATE, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-
-               if ((value_convert >= PARM_MIN_MULTICAST_RATE) && (value_convert <= PARM_MAX_MULTICAST_RATE))
-                       lp->MulticastRate[0] = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_MULTICAST_RATE);
-       } else if (strcmp(key, PARM_NAME_OWN_CHANNEL) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_CHANNEL, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if (wl_is_a_valid_chan(value_convert)) {
-                       if (value_convert > 14)
-                               value_convert = value_convert | 0x100;
-                       lp->Channel = value_convert;
-               } else {
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_OWN_CHANNEL);
-               }
-       } else if (strcmp(key, PARM_NAME_OWN_NAME) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_NAME, value);
-
-               memset(lp->StationName, 0, (PARM_MAX_NAME_LEN + 1));
-
-               /* Make sure the value isn't too long */
-               string_length = strlen(value);
-               if (string_length > PARM_MAX_NAME_LEN) {
-                       DBG_WARNING(DbgInfo, "%s too long; will be truncated\n", PARM_NAME_OWN_NAME);
-                       string_length = PARM_MAX_NAME_LEN;
-               }
-
-               memcpy(lp->StationName, value, string_length);
-       } else if (strcmp(key, PARM_NAME_RTS_THRESHOLD) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                       lp->RTSThreshold = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD);
-       } else if (strcmp(key, PARM_NAME_SRSC_2GHZ) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_SRSC_2GHZ, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_SRSC) || (value_convert <= PARM_MAX_SRSC))
-                       lp->srsc[0] = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_SRSC_2GHZ);
-       } else if (strcmp(key, PARM_NAME_SRSC_5GHZ) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_SRSC_5GHZ, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_SRSC) || (value_convert <= PARM_MAX_SRSC))
-                       lp->srsc[1] = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_SRSC_5GHZ);
-       } else if (strcmp(key, PARM_NAME_SYSTEM_SCALE) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_SYSTEM_SCALE, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_SYSTEM_SCALE) && (value_convert <= PARM_MAX_SYSTEM_SCALE))
-                       lp->DistanceBetweenAPs = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_SYSTEM_SCALE);
-       } else if (strcmp(key, PARM_NAME_TX_KEY) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_KEY, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_TX_KEY) && (value_convert <= PARM_MAX_TX_KEY))
-                       lp->TransmitKeyID = simple_strtoul(value, NULL, 0);
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_KEY);
-       } else if (strcmp(key, PARM_NAME_TX_RATE) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                       lp->TxRateControl[0] = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE);
-       } else if (strcmp(key, PARM_NAME_TX_POW_LEVEL) == 0) {
-               DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_POW_LEVEL, value);
-
-               value_convert = simple_strtoul(value, NULL, 0);
-               if ((value_convert >= PARM_MIN_TX_POW_LEVEL) || (value_convert <= PARM_MAX_TX_POW_LEVEL))
-                       lp->txPowLevel = value_convert;
-               else
-                       DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_POW_LEVEL);
-       }
-
-       /* Need to add? : Country code, Short/Long retry */
-
-       /* Configuration parameters specific to STA mode */
-#if 1 /* ;? (HCF_TYPE) & HCF_TYPE_STA */
-/* ;?seems reasonable that even an AP-only driver could afford this small additional footprint */
-       if (CNV_INT_TO_LITTLE(lp->hcfCtx.IFB_FWIdentity.comp_id) == COMP_ID_FW_STA) {
-                                       /* ;?should we return an error status in AP mode */
-               if (strcmp(key, PARM_NAME_PORT_TYPE) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_PORT_TYPE, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert == PARM_MIN_PORT_TYPE) || (value_convert == PARM_MAX_PORT_TYPE))
-                               lp->PortType = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_PORT_TYPE);
-               } else if (strcmp(key, PARM_NAME_PM_ENABLED) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_PM_ENABLED, value);
-                       value_convert = simple_strtoul(value, NULL, 0);
-       /* ;? how about wl_main.c containing
-        * VALID_PARAM(PARM_PM_ENABLED <= WVLAN_PM_STATE_STANDARD ||
-        *                                       (PARM_PM_ENABLED & 0x7FFF) <= WVLAN_PM_STATE_STANDARD);
-        */
-                       if ((value_convert & 0x7FFF) <= PARM_MAX_PM_ENABLED) {
-                               lp->PMEnabled = value_convert;
-                       } else {
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_PM_ENABLED);
-                               /* ;?this is a data entry error, hence not a DBG_WARNING */
-                       }
-               } else if (strcmp(key, PARM_NAME_CREATE_IBSS) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_CREATE_IBSS, value);
-                       lp->CreateIBSS = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_MULTICAST_RX) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_MULTICAST_RX, value);
-                       lp->MulticastReceive = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_MAX_SLEEP) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_MAX_SLEEP, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= 0) && (value_convert <= 65535))
-                               lp->MaxSleepDuration = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_MAX_SLEEP);
-               } else if (strcmp(key, PARM_NAME_NETWORK_ADDR) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_NETWORK_ADDR, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->MACAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_NETWORK_ADDR);
-               } else if (strcmp(key, PARM_NAME_AUTHENTICATION) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_AUTHENTICATION, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_AUTHENTICATION) && (value_convert <= PARM_MAX_AUTHENTICATION))
-                               lp->authentication = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_AUTHENTICATION);
-               } else if (strcmp(key, PARM_NAME_OWN_ATIM_WINDOW) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_ATIM_WINDOW, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_OWN_ATIM_WINDOW) && (value_convert <= PARM_MAX_OWN_ATIM_WINDOW))
-                               lp->atimWindow = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_OWN_ATIM_WINDOW);
-               } else if (strcmp(key, PARM_NAME_PM_HOLDOVER_DURATION) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_PM_HOLDOVER_DURATION, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_PM_HOLDOVER_DURATION) && (value_convert <= PARM_MAX_PM_HOLDOVER_DURATION))
-                               lp->holdoverDuration = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_PM_HOLDOVER_DURATION);
-               } else if (strcmp(key, PARM_NAME_PROMISCUOUS_MODE) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_PROMISCUOUS_MODE, value);
-                       lp->promiscuousMode = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_CONNECTION_CONTROL) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_CONNECTION_CONTROL, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_CONNECTION_CONTROL) && (value_convert <= PARM_MAX_CONNECTION_CONTROL))
-                               lp->connectionControl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_CONNECTION_CONTROL);
-               }
-
-               /* Need to add? : Probe Data Rate */
-       }
-#endif  /* (HCF_TYPE) & HCF_TYPE_STA */
-
-       /* Configuration parameters specific to AP mode */
-#if 1 /* ;? (HCF_TYPE) & HCF_TYPE_AP */
-               /* ;?should we restore this to allow smaller memory footprint */
-       if (CNV_INT_TO_LITTLE(lp->hcfCtx.IFB_FWIdentity.comp_id) == COMP_ID_FW_AP) {
-               if (strcmp(key, PARM_NAME_OWN_DTIM_PERIOD) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_DTIM_PERIOD, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if (value_convert >= PARM_MIN_OWN_DTIM_PERIOD)
-                               lp->DTIMPeriod = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_OWN_DTIM_PERIOD);
-               } else if (strcmp(key, PARM_NAME_REJECT_ANY) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_REJECT_ANY, value);
-                       lp->RejectAny = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_EXCLUDE_UNENCRYPTED) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_EXCLUDE_UNENCRYPTED, value);
-                       lp->ExcludeUnencrypted = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_MULTICAST_PM_BUFFERING) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_MULTICAST_PM_BUFFERING, value);
-                       lp->ExcludeUnencrypted = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_INTRA_BSS_RELAY) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_INTRA_BSS_RELAY, value);
-                       lp->ExcludeUnencrypted = parse_yes_no(value);
-               } else if (strcmp(key, PARM_NAME_OWN_BEACON_INTERVAL) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_OWN_BEACON_INTERVAL, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if (value_convert >= PARM_MIN_OWN_BEACON_INTERVAL)
-                               lp->ownBeaconInterval = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_OWN_BEACON_INTERVAL);
-               } else if (strcmp(key, PARM_NAME_COEXISTENCE) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_COEXISTENCE, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if (value_convert >= PARM_MIN_COEXISTENCE)
-                               lp->coexistence = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_COEXISTENCE);
-               }
-
-#ifdef USE_WDS
-               else if (strcmp(key, PARM_NAME_RTS_THRESHOLD1) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD1, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                               lp->wds_port[0].rtsThreshold = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD1);
-               } else if (strcmp(key, PARM_NAME_RTS_THRESHOLD2) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD2, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                               lp->wds_port[1].rtsThreshold = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD2);
-               } else if (strcmp(key, PARM_NAME_RTS_THRESHOLD3) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD3, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                               lp->wds_port[2].rtsThreshold = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD3);
-               } else if (strcmp(key, PARM_NAME_RTS_THRESHOLD4) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD4, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                               lp->wds_port[3].rtsThreshold = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD4);
-               } else if (strcmp(key, PARM_NAME_RTS_THRESHOLD5) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD5, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                               lp->wds_port[4].rtsThreshold = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD5);
-               } else if (strcmp(key, PARM_NAME_RTS_THRESHOLD6) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_RTS_THRESHOLD6, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_RTS_THRESHOLD) && (value_convert <= PARM_MAX_RTS_THRESHOLD))
-                               lp->wds_port[5].rtsThreshold = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_RTS_THRESHOLD6);
-               } else if (strcmp(key, PARM_NAME_TX_RATE1) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE1, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                               lp->wds_port[0].txRateCntl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE1);
-               } else if (strcmp(key, PARM_NAME_TX_RATE2) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE2, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                               lp->wds_port[1].txRateCntl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE2);
-               } else if (strcmp(key, PARM_NAME_TX_RATE3) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE3, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                               lp->wds_port[2].txRateCntl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE3);
-               } else if (strcmp(key, PARM_NAME_TX_RATE4) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE4, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                               lp->wds_port[3].txRateCntl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE4);
-               } else if (strcmp(key, PARM_NAME_TX_RATE5) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE5, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                               lp->wds_port[4].txRateCntl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE5);
-               } else if (strcmp(key, PARM_NAME_TX_RATE6) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_TX_RATE6, value);
-
-                       value_convert = simple_strtoul(value, NULL, 0);
-                       if ((value_convert >= PARM_MIN_TX_RATE) && (value_convert <= PARM_MAX_TX_RATE))
-                               lp->wds_port[5].txRateCntl = value_convert;
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_TX_RATE6);
-               } else if (strcmp(key, PARM_NAME_WDS_ADDRESS1) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_WDS_ADDRESS1, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->wds_port[0].wdsAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_WDS_ADDRESS1);
-               } else if (strcmp(key, PARM_NAME_WDS_ADDRESS2) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_WDS_ADDRESS2, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->wds_port[1].wdsAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_WDS_ADDRESS2);
-               } else if (strcmp(key, PARM_NAME_WDS_ADDRESS3) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_WDS_ADDRESS3, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->wds_port[2].wdsAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_WDS_ADDRESS3);
-               } else if (strcmp(key, PARM_NAME_WDS_ADDRESS4) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_WDS_ADDRESS4, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->wds_port[3].wdsAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_WDS_ADDRESS4);
-               } else if (strcmp(key, PARM_NAME_WDS_ADDRESS5) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_WDS_ADDRESS5, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->wds_port[4].wdsAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_WDS_ADDRESS5);
-               } else if (strcmp(key, PARM_NAME_WDS_ADDRESS6) == 0) {
-                       DBG_TRACE(DbgInfo, "%s, value: %s\n", PARM_NAME_WDS_ADDRESS6, value);
-
-                       if (parse_mac_address(value, mac_value) == ETH_ALEN)
-                               memcpy(lp->wds_port[5].wdsAddress, mac_value, ETH_ALEN);
-                       else
-                               DBG_WARNING(DbgInfo, "%s invalid; will be ignored\n", PARM_NAME_WDS_ADDRESS6);
-               }
-#endif  /* USE_WDS */
-       }
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-
-       return;
-} /* translate_option */
-/*============================================================================*/
-
-/*******************************************************************************
- *     parse_mac_address()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function will parse a mac address string and convert it to a byte
- *   array.
- *
- *  PARAMETERS:
- *
- *      value       - the MAC address, represented as a string
- *      byte_array  - the MAC address, represented as a byte array of length
- *                    ETH_ALEN
- *
- *  RETURNS:
- *
- *      The number of bytes in the final MAC address, should equal to ETH_ALEN.
- *
- ******************************************************************************/
-int parse_mac_address(char *value, u_char *byte_array)
-{
-       int     value_offset = 0;
-       int     array_offset = 0;
-       int     field_offset = 0;
-       char    byte_field[3];
-       /*------------------------------------------------------------------------*/
-
-       memset(byte_field, '\0', 3);
-
-       while (value[value_offset] != '\0') {
-               /* Skip over the colon chars separating the bytes, if they exist */
-               if (value[value_offset] == ':') {
-                       value_offset++;
-                       continue;
-               }
-
-               byte_field[field_offset] = value[value_offset];
-               field_offset++;
-               value_offset++;
-
-               /* Once the byte_field is filled, convert it and store it */
-               if (field_offset == 2) {
-                       byte_field[field_offset] = '\0';
-                       byte_array[array_offset] = simple_strtoul(byte_field, NULL, 16);
-                       field_offset = 0;
-                       array_offset++;
-               }
-       }
-
-       /* Use the array_offset as a check; 6 bytes should be written to the
-          byte_array */
-       return array_offset;
-} /* parse_mac_address */
-/*============================================================================*/
-
-/*******************************************************************************
- *     ParseConfigLine()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Parses a line from the configuration file into an L-val and an R-val,
- *  representing a key/value pair.
- *
- *  PARAMETERS:
- *
- *      pszLine     - the line from the config file to parse
- *      ppszLVal    - the resulting L-val (Key)
- *      ppszRVal    - the resulting R-val (Value)
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void ParseConfigLine(char *pszLine, char **ppszLVal, char **ppszRVal)
-{
-       int i;
-       int size;
-
-       /* get a snapshot of our string size */
-       size      = strlen(pszLine);
-       *ppszLVal = NULL;
-       *ppszRVal = NULL;
-
-       if (pszLine[0] != '#' &&                                                        /* skip the line if it is a comment */
-                pszLine[0] != '\n' &&                                                  /* if it's an empty UNIX line, do nothing */
-                !(pszLine[0] == '\r' && pszLine[1] == '\n')    /* if it's an empty MS-DOS line, do nothing */
-          ) {
-               /* advance past any whitespace, and assign the L-value */
-               for (i = 0; i < size; i++) {
-                       if (pszLine[i] != ' ') {
-                               *ppszLVal = &pszLine[i];
-                               break;
-                       }
-               }
-               /* advance to the end of the l-value*/
-               for (i++; i < size; i++) {
-                       if (pszLine[i] == ' ' || pszLine[i] == '=') {
-                               pszLine[i] = '\0';
-                               break;
-                       }
-               }
-               /* make any whitespace and the equal sign a NULL character, and
-                  advance to the R-Value */
-               for (i++; i < size; i++) {
-                       if (pszLine[i] == ' ' || pszLine[i] == '=') {
-                               pszLine[i] = '\0';
-                               continue;
-                       }
-                       *ppszRVal = &pszLine[i];
-                       break;
-               }
-               /* make the line ending character(s) a NULL */
-               for (i++; i < size; i++) {
-                       if (pszLine[i] == '\n')
-                               pszLine[i] = '\0';
-                       if ((pszLine[i] == '\r') && (pszLine[i+1] == '\n'))
-                               pszLine[i] = '\0';
-               }
-       }
-} /* ParseConfigLine */
-/*============================================================================*/
-
-#endif  /* USE_PROFILE */
diff --git a/drivers/staging/wlags49_h2/wl_profile.h b/drivers/staging/wlags49_h2/wl_profile.h
deleted file mode 100644 (file)
index d615c83..0000000
+++ /dev/null
@@ -1,87 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing information required for the config parsing routines.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_PROFILE_H__
-#define __WL_PROFILE_H__
-
-
-
-
-/*******************************************************************************
- *  constant definitions
- ******************************************************************************/
-#define ROOT_CONFIG_FILENAME "/etc/agere/iwconfig-"
-
-
-/*******************************************************************************
- *  function prototypes
- ******************************************************************************/
-void parse_config(struct net_device *dev);
-
-int readline(int filedesc, char *buffer);
-
-void translate_option(char *buffer, struct wl_private *lp);
-
-int parse_mac_address(char *value, u_char *byte_array);
-
-void ParseConfigLine(char *pszLine, char **ppszLVal, char **ppszRVal);
-
-
-#endif  /* __WL_PROFILE_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_util.c b/drivers/staging/wlags49_h2/wl_util.c
deleted file mode 100644 (file)
index 75019c1..0000000
+++ /dev/null
@@ -1,1367 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This file defines misc utility functions.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/kernel.h>
-// #include <linux/sched.h>
-// #include <linux/ptrace.h>
-#include <linux/ctype.h>
-// #include <linux/string.h>
-// #include <linux/timer.h>
-// #include <linux/interrupt.h>
-// #include <linux/in.h>
-// #include <linux/delay.h>
-// #include <asm/io.h>
-// // #include <asm/bitops.h>
-
-#include <linux/netdevice.h>
-#include <linux/etherdevice.h>
-// #include <linux/skbuff.h>
-// #include <linux/if_arp.h>
-// #include <linux/ioport.h>
-
-#include <debug.h>
-#include <hcf.h>
-// #include <hcfdef.h>
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_util.h>
-#include <wl_wext.h>
-#include <wl_main.h>
-
-
-
-/*******************************************************************************
- * global variables
- ******************************************************************************/
-
-/* A matrix which maps channels to frequencies */
-static const long chan_freq_list[][2] =
-{
-    {1,2412},
-    {2,2417},
-    {3,2422},
-    {4,2427},
-    {5,2432},
-    {6,2437},
-    {7,2442},
-    {8,2447},
-    {9,2452},
-    {10,2457},
-    {11,2462},
-    {12,2467},
-    {13,2472},
-    {14,2484},
-    {36,5180},
-    {40,5200},
-    {44,5220},
-    {48,5240},
-    {52,5260},
-    {56,5280},
-    {60,5300},
-    {64,5320},
-    {149,5745},
-    {153,5765},
-    {157,5785},
-    {161,5805}
-};
-
-/*******************************************************************************
- *     dbm()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Return an energy value in dBm.
- *
- *  PARAMETERS:
- *
- *      value - the energy value to be converted
- *
- *  RETURNS:
- *
- *      the value in dBm
- *
- ******************************************************************************/
-int dbm( int value )
-{
-    /* Truncate the value to be between min and max. */
-    if( value < HCF_MIN_SIGNAL_LEVEL )
-        value = HCF_MIN_SIGNAL_LEVEL;
-
-    if( value > HCF_MAX_SIGNAL_LEVEL )
-        value = HCF_MAX_SIGNAL_LEVEL;
-
-    /* Return the energy value in dBm. */
-    return ( value - HCF_0DBM_OFFSET );
-} // dbm
-/*============================================================================*/
-
-
-
-/*******************************************************************************
- *     is_valid_key_string()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Checks to determine if the WEP key string is valid
- *
- *  PARAMETERS:
- *
- *      s - the string in question
- *
- *  RETURNS:
- *
- *      non-zero if the string contains a valid key
- *
- ******************************************************************************/
-int is_valid_key_string( char *s )
-{
-    int l;
-    int i;
-    /*------------------------------------------------------------------------*/
-
-
-    l = strlen( s );
-
-    /* 0x followed by 5 or 13 hexadecimal digit pairs is valid */
-    if( s[0] == '0' && ( s[1] == 'x' || s[1] == 'X' )) {
-        if( l == 12 || l == 28 ) {
-            for( i = 2; i < l; i++ ) {
-                if( !isxdigit( s[i] ))
-                    return 0;
-            }
-
-            return 1;
-        } else {
-            return 0;
-        }
-    }
-
-    /* string with 0, 5, or 13 characters is valid */
-    else
-    {
-        return( l == 0 || l == 5 || l == 13 );
-    }
-} // is_valid_key_string
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     key_string2key()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Converts a key_string to a key, Assumes the key_string is validated with
- *  is_valid_key_string().
- *
- *  PARAMETERS:
- *
- *      ks  - the valid key string
- *      key - a pointer to a KEY_STRUCT where the converted key information will
- *            be stored.
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void key_string2key( char *ks, KEY_STRCT *key )
-{
-    int l,i,n;
-    char *p;
-    /*------------------------------------------------------------------------*/
-
-
-    l = strlen( ks );
-
-    /* 0x followed by hexadecimal digit pairs */
-    if( ks[0] == '0' && ( ks[1] == 'x' || ks[1] == 'X' )) {
-        n = 0;
-        p = (char *)key->key;
-
-        for( i = 2; i < l; i+=2 ) {
-                       *p++ = (hex_to_bin(ks[i]) << 4) + hex_to_bin(ks[i+1]);
-           n++;
-        }
-
-        /* Note that endian translation of the length field is not needed here
-          because it's performed in wl_put_ltv() */
-        key->len = n;
-    }
-    /* character string */
-    else
-    {
-        strcpy( (char *)key->key, ks );
-        key->len = l;
-    }
-
-    return;
-} // key_string2key
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_has_wep()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Checks to see if the device supports WEP
- *
- *  PARAMETERS:
- *
- *      ifbp    - the IFB pointer of the device in question
- *
- *  RETURNS:
- *
- *      1 if WEP is known enabled, else 0
- *
- ******************************************************************************/
-int wl_has_wep (IFBP ifbp)
-{
-    CFG_PRIVACY_OPT_IMPLEMENTED_STRCT ltv;
-       int rc, privacy;
-    /*------------------------------------------------------------------------*/
-
-
-       /* This function allows us to distiguish bronze cards from other types, to
-       know if WEP exists. Does not distinguish (because there's no way to)
-       between silver and gold cards. */
-    ltv.len = 2;
-    ltv.typ = CFG_PRIVACY_OPT_IMPLEMENTED;
-
-       rc = hcf_get_info( ifbp, (LTVP) &ltv );
-
-       privacy = CNV_LITTLE_TO_INT( ltv.privacy_opt_implemented );
-
-       //return rc ? 0 : privacy;
-    return 1;
-} // wl_has_wep
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_hcf_error()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Report the type of HCF error message
- *
- *  PARAMETERS:
- *
- *      none
- *
- *  RETURNS:
- *
- *      A descriptive string indicating the error, quiet otherwise.
- *
- ******************************************************************************/
-void wl_hcf_error( struct net_device *dev, int hcfStatus )
-{
-    char     buffer[64], *pMsg;
-    /*------------------------------------------------------------------------*/
-
-
-    if( hcfStatus != HCF_SUCCESS ) {
-        switch( hcfStatus ) {
-
-        case HCF_ERR_TIME_OUT:
-
-            pMsg = "Expected adapter event did not occur in expected time";
-            break;
-
-
-        case HCF_ERR_NO_NIC:
-
-            pMsg = "Card not found (ejected unexpectedly)";
-            break;
-
-
-        case HCF_ERR_LEN:
-
-            pMsg = "Command buffer size insufficient";
-            break;
-
-
-        case HCF_ERR_INCOMP_PRI:
-
-            pMsg = "Primary functions are not compatible";
-            break;
-
-
-        case HCF_ERR_INCOMP_FW:
-
-            pMsg = "Primary functions are compatible, "
-                "station/ap functions are not";
-            break;
-
-
-        case HCF_ERR_BUSY:
-
-            pMsg = "Inquire cmd while another Inquire in progress";
-            break;
-
-
-        //case HCF_ERR_SEQ_BUG:
-
-        //    pMsg = "Unexpected command completed";
-        //    break;
-
-
-        case HCF_ERR_DEFUNCT_AUX:
-
-            pMsg = "Timeout on ack for enable/disable of AUX registers";
-            break;
-
-
-        case HCF_ERR_DEFUNCT_TIMER:
-            pMsg = "Timeout on timer calibration during initialization process";
-            break;
-
-
-        case HCF_ERR_DEFUNCT_TIME_OUT:
-            pMsg = "Timeout on Busy bit drop during BAP setup";
-            break;
-
-
-        case HCF_ERR_DEFUNCT_CMD_SEQ:
-            pMsg = "Hermes and HCF are out of sync";
-            break;
-
-
-        default:
-
-            sprintf( buffer, "Error code %d", hcfStatus );
-            pMsg = buffer;
-            break;
-        }
-
-        printk( KERN_INFO "%s: Wireless, HCF failure: \"%s\"\n",
-                dev->name, pMsg );
-    }
-} // wl_hcf_error
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_endian_translate_event()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Determines what type of data is in the mailbox and performs the proper
- *  endian translation.
- *
- *  PARAMETERS:
- *
- *      pLtv - an LTV pointer
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_endian_translate_event( ltv_t *pLtv )
-{
-    switch( pLtv->typ ) {
-    case CFG_TALLIES:
-        break;
-
-
-    case CFG_SCAN:
-        {
-            int numAPs;
-            SCAN_RS_STRCT *pAps = (SCAN_RS_STRCT*)&pLtv->u.u8[0];
-
-            numAPs = (hcf_16)(( (size_t)( pLtv->len - 1 ) * 2 ) /
-                                (sizeof( SCAN_RS_STRCT )));
-
-            while( numAPs >= 1 ) {
-                numAPs--;
-
-                pAps[numAPs].channel_id           =
-                    CNV_LITTLE_TO_INT( pAps[numAPs].channel_id );
-
-                pAps[numAPs].noise_level          =
-                    CNV_LITTLE_TO_INT( pAps[numAPs].noise_level );
-
-                pAps[numAPs].signal_level         =
-                    CNV_LITTLE_TO_INT( pAps[numAPs].signal_level );
-
-                pAps[numAPs].beacon_interval_time =
-                    CNV_LITTLE_TO_INT( pAps[numAPs].beacon_interval_time );
-
-                pAps[numAPs].capability           =
-                    CNV_LITTLE_TO_INT( pAps[numAPs].capability );
-
-                pAps[numAPs].ssid_len             =
-                    CNV_LITTLE_TO_INT( pAps[numAPs].ssid_len );
-
-                pAps[numAPs].ssid_val[pAps[numAPs].ssid_len] = 0;
-
-            }
-        }
-        break;
-
-
-    case CFG_ACS_SCAN:
-        {
-            PROBE_RESP *probe_resp = (PROBE_RESP *)pLtv;
-
-            probe_resp->frameControl   = CNV_LITTLE_TO_INT( probe_resp->frameControl );
-            probe_resp->durID          = CNV_LITTLE_TO_INT( probe_resp->durID );
-            probe_resp->sequence       = CNV_LITTLE_TO_INT( probe_resp->sequence );
-            probe_resp->dataLength     = CNV_LITTLE_TO_INT( probe_resp->dataLength );
-
-#ifndef WARP
-            probe_resp->lenType        = CNV_LITTLE_TO_INT( probe_resp->lenType );
-#endif // WARP
-
-            probe_resp->beaconInterval = CNV_LITTLE_TO_INT( probe_resp->beaconInterval );
-            probe_resp->capability     = CNV_LITTLE_TO_INT( probe_resp->capability );
-            probe_resp->flags          = CNV_LITTLE_TO_INT( probe_resp->flags );
-        }
-        break;
-
-
-    case CFG_LINK_STAT:
-#define ls ((LINK_STATUS_STRCT *)pLtv)
-            ls->linkStatus = CNV_LITTLE_TO_INT( ls->linkStatus );
-        break;
-#undef ls
-
-    case CFG_ASSOC_STAT:
-        {
-            ASSOC_STATUS_STRCT *pAs = (ASSOC_STATUS_STRCT *)pLtv;
-
-            pAs->assocStatus = CNV_LITTLE_TO_INT( pAs->assocStatus );
-        }
-        break;
-
-
-    case CFG_SECURITY_STAT:
-        {
-            SECURITY_STATUS_STRCT *pSs = (SECURITY_STATUS_STRCT *)pLtv;
-
-            pSs->securityStatus = CNV_LITTLE_TO_INT( pSs->securityStatus );
-            pSs->reason         = CNV_LITTLE_TO_INT( pSs->reason );
-        }
-        break;
-
-
-    case CFG_WMP:
-        break;
-
-
-    case CFG_NULL:
-        break;
-
-
-    default:
-        break;
-    }
-} // wl_endian_translate_event
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     msf_assert()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Print statement used to display asserts from within the HCF. Only called
- *  when asserts in the HCF are turned on. See hcfcfg.h for more information.
- *
- *  PARAMETERS:
- *
- *      file_namep  - the filename in which the assert occurred.
- *      line_number - the line number on which the assert occurred.
- *      trace       - a comment associated with the assert.
- *      qual        - return code or other value related to the assert
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void msf_assert( unsigned int line_number, hcf_16 trace, hcf_32 qual )
-{
-    DBG_PRINT( "HCF ASSERT: Line %d, VAL: 0x%.8x\n", line_number, /*;?*/(u32)qual );
-} // msf_assert
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_parse_ds_ie()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function parses the Direct Sequence Parameter Set IE, used to
- *      determine channel/frequency information.
- *
- *  PARAMETERS:
- *
- *      probe_rsp - a pointer to a PROBE_RESP structure containing the probe
- *                  response.
- *
- *  RETURNS:
- *
- *      The channel on which the BSS represented by this probe response is
- *      transmitting.
- *
- ******************************************************************************/
-hcf_8 wl_parse_ds_ie( PROBE_RESP *probe_rsp )
-{
-    int     i;
-    int     ie_length = 0;
-    hcf_8   *buf;
-    hcf_8   buf_size;
-    /*------------------------------------------------------------------------*/
-
-
-    if( probe_rsp == NULL ) {
-        return 0;
-    }
-
-    buf      = probe_rsp->rawData;
-    buf_size = sizeof( probe_rsp->rawData );
-
-
-    for( i = 0; i < buf_size; i++ ) {
-        if( buf[i] == DS_INFO_ELEM ) {
-            /* Increment by 1 to get the length, and test it; in a DS element,
-               length should always be 1 */
-            i++;
-            ie_length = buf[i];
-
-            if( buf[i] == 1 ) {
-                /* Get the channel information */
-                i++;
-                return buf[i];
-            }
-        }
-    }
-
-    /* If we get here, we didn't find a DS-IE, which is strange */
-    return 0;
-} // wl_parse_ds_ie
-
-
-/*******************************************************************************
- *     wl_parse_wpa_ie()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function parses the Probe Response for a valid WPA-IE.
- *
- *  PARAMETERS:
- *
- *      probe_rsp - a pointer to a PROBE_RESP structure containing the probe
- *                  response
- *      length    - a pointer to an hcf_16 in which the size of the WPA-IE will
- *                  be stored (if found).
- *
- *  RETURNS:
- *
- *      A pointer to the location in the probe response buffer where a valid
- *      WPA-IE lives. The length of this IE is written back to the 'length'
- *      argument passed to the function.
- *
- ******************************************************************************/
-hcf_8 * wl_parse_wpa_ie( PROBE_RESP *probe_rsp, hcf_16 *length )
-{
-    int     i;
-    int     ie_length = 0;
-    hcf_8   *buf;
-    hcf_8   buf_size;
-    hcf_8   wpa_oui[] = WPA_OUI_TYPE;
-    /*------------------------------------------------------------------------*/
-
-
-    if( probe_rsp == NULL || length == NULL ) {
-        return NULL;
-    }
-
-    buf      = probe_rsp->rawData;
-    buf_size = sizeof( probe_rsp->rawData );
-    *length  = 0;
-
-
-    for( i = 0; i < buf_size; i++ ) {
-        if( buf[i] == GENERIC_INFO_ELEM ) {
-            /* Increment by one to get the IE length */
-            i++;
-            ie_length = probe_rsp->rawData[i];
-
-            /* Increment by one to point to the IE payload */
-            i++;
-
-            /* Does the IE contain a WPA OUI? If not, it's a proprietary IE */
-            if( memcmp( &buf[i], &wpa_oui, WPA_SELECTOR_LEN ) == 0 ) {
-                /* Pass back length and return a pointer to the WPA-IE */
-                /* NOTE: Length contained in the WPA-IE is only the length of
-                   the payload. The entire WPA-IE, including the IE identifier
-                   and the length, is 2 bytes larger */
-                *length = ie_length + 2;
-
-                /* Back up the pointer 2 bytes to include the IE identifier and
-                   the length in the buffer returned */
-                i -= 2;
-                return &buf[i];
-            }
-
-            /* Increment past this non-WPA IE and continue looking */
-            i += ( ie_length - 1 );
-        }
-    }
-
-    /* If we're here, we didn't find a WPA-IE in the buffer */
-    return NULL;
-} // wl_parse_wpa_ie
-
-
-/*******************************************************************************
- *     wl_print_wpa_ie()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Function used to take a WPA Information Element (WPA-IE) buffer and
- *      display it in a readable format.
- *
- *  PARAMETERS:
- *
- *      buffer - the byte buffer containing the WPA-IE
- *      length - the length of the above buffer
- *
- *  RETURNS:
- *
- *      A pointer to the formatted WPA-IE string. Note that the format used is
- *      byte-by-byte printing as %02x hex values with no spaces. This is
- *      required for proper operation with some WPA supplicants.
- *
- ******************************************************************************/
-hcf_8 * wl_print_wpa_ie( hcf_8 *buffer, int length )
-{
-    int count;
-    int rows;
-    int remainder;
-    int rowsize = 4;
-    hcf_8 row_buf[64];
-    static hcf_8 output[512];
-    /*------------------------------------------------------------------------*/
-
-
-    memset( output, 0, sizeof( output ));
-    memset( row_buf, 0, sizeof( row_buf ));
-
-
-    /* Determine how many rows will be needed, and the remainder */
-    rows = length / rowsize;
-    remainder = length % rowsize;
-
-
-    /* Format the rows */
-    for( count = 0; count < rows; count++ ) {
-        sprintf( row_buf, "%02x%02x%02x%02x",
-                 buffer[count*rowsize], buffer[count*rowsize+1],
-                 buffer[count*rowsize+2], buffer[count*rowsize+3]);
-        strcat( output, row_buf );
-    }
-
-    memset( row_buf, 0, sizeof( row_buf ));
-
-
-    /* Format the remainder */
-    for( count = 0; count < remainder; count++ ) {
-        sprintf( row_buf, "%02x", buffer[(rows*rowsize)+count]);
-        strcat( output, row_buf );
-    }
-
-    return output;
-} // wl_print_wpa_ie
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_is_a_valid_chan()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Checks if a given channel is valid
- *
- *  PARAMETERS:
- *
- *      channel - the channel
- *
- *  RETURNS:
- *
- *      1 if TRUE
- *      0 if FALSE
- *
- ******************************************************************************/
-int wl_is_a_valid_chan( int channel )
-{
-    int i;
-    /*------------------------------------------------------------------------*/
-
-
-    /* Strip out the high bit set by the FW for 802.11a channels */
-    if( channel & 0x100 ) {
-        channel = channel & 0x0FF;
-    }
-
-    /* Iterate through the matrix and retrieve the frequency */
-    for( i = 0; i < ARRAY_SIZE(chan_freq_list); i++ ) {
-        if( chan_freq_list[i][0] == channel ) {
-            return 1;
-        }
-    }
-
-    return 0;
-} // wl_is_a_valid_chan
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_get_chan_from_freq()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Checks if a given frequency is valid
- *
- *  PARAMETERS:
- *
- *      freq - the frequency
- *
- *  RETURNS:
- *
- *      1 if TRUE
- *      0 if FALSE
- *
- ******************************************************************************/
-int wl_is_a_valid_freq( long frequency )
-{
-    int i;
-    /*------------------------------------------------------------------------*/
-
-
-    /* Iterate through the matrix and retrieve the channel */
-    for( i = 0; i < ARRAY_SIZE(chan_freq_list); i++ ) {
-        if( chan_freq_list[i][1] == frequency ) {
-            return 1;
-        }
-    }
-
-    return 0;
-} // wl_is_a_valid_freq
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_get_freq_from_chan()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Function used to look up the frequency for a given channel on which the
- *      adapter is Tx/Rx.
- *
- *  PARAMETERS:
- *
- *      channel - the channel
- *
- *  RETURNS:
- *
- *      The corresponding frequency
- *
- ******************************************************************************/
-long wl_get_freq_from_chan( int channel )
-{
-    int i;
-    /*------------------------------------------------------------------------*/
-
-
-    /* Strip out the high bit set by the FW for 802.11a channels */
-    if( channel & 0x100 ) {
-        channel = channel & 0x0FF;
-    }
-
-    /* Iterate through the matrix and retrieve the frequency */
-    for( i = 0; i < ARRAY_SIZE(chan_freq_list); i++ ) {
-        if( chan_freq_list[i][0] == channel ) {
-            return chan_freq_list[i][1];
-        }
-    }
-
-    return 0;
-} // wl_get_freq_from_chan
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_get_chan_from_freq()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Function used to look up the channel for a given frequency on which the
- *      adapter is Tx/Rx.
- *
- *  PARAMETERS:
- *
- *      frequency - the frequency
- *
- *  RETURNS:
- *
- *      The corresponding channel
- *
- ******************************************************************************/
-int wl_get_chan_from_freq( long frequency )
-{
-    int i;
-    /*------------------------------------------------------------------------*/
-
-
-    /* Iterate through the matrix and retrieve the channel */
-    for( i = 0; i < ARRAY_SIZE(chan_freq_list); i++ ) {
-        if( chan_freq_list[i][1] == frequency ) {
-            return chan_freq_list[i][0];
-        }
-    }
-
-    return 0;
-} // wl_get_chan_from_freq
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_process_link_status()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Process the link status message signaled by the device.
- *
- *  PARAMETERS:
- *
- *      lp - a pointer to the device's private structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_process_link_status( struct wl_private *lp )
-{
-    hcf_16 link_stat;
-
-    if( lp != NULL ) {
-        //link_stat = lp->hcfCtx.IFB_DSLinkStat & CFG_LINK_STAT_FW;
-        link_stat = lp->hcfCtx.IFB_LinkStat & CFG_LINK_STAT_FW;
-        switch( link_stat ) {
-        case 1:
-            DBG_TRACE( DbgInfo, "Link Status : Connected\n" );
-            wl_wext_event_ap( lp->dev );
-            break;
-        case 2:
-            DBG_TRACE( DbgInfo, "Link Status : Disconnected\n"  );
-            break;
-        case 3:
-            DBG_TRACE( DbgInfo, "Link Status : Access Point Change\n" );
-            break;
-        case 4:
-            DBG_TRACE( DbgInfo, "Link Status : Access Point Out of Range\n" );
-            break;
-        case 5:
-            DBG_TRACE( DbgInfo, "Link Status : Access Point In Range\n" );
-            break;
-        default:
-            DBG_TRACE( DbgInfo, "Link Status : UNKNOWN (0x%04x)\n", link_stat );
-            break;
-        }
-    }
-} // wl_process_link_status
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_process_probe_response()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Process the probe responses retunred by the device as a result of an
- *      active scan.
- *
- *  PARAMETERS:
- *
- *      lp - a pointer to the device's private structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_process_probe_response( struct wl_private *lp )
-{
-    PROBE_RESP  *probe_rsp;
-    hcf_8       *wpa_ie = NULL;
-    hcf_16      wpa_ie_len = 0;
-
-    if( lp != NULL ) {
-        probe_rsp = (PROBE_RESP *)&lp->ProbeResp;
-
-        wl_endian_translate_event( (ltv_t *)probe_rsp );
-
-        DBG_TRACE( DbgInfo, "(%s) =========================\n", lp->dev->name );
-        DBG_TRACE( DbgInfo, "(%s) length      : 0x%04x.\n",  lp->dev->name,
-                probe_rsp->length );
-
-        if( probe_rsp->length > 1 ) {
-            DBG_TRACE( DbgInfo, "(%s) infoType    : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->infoType );
-
-            DBG_TRACE( DbgInfo, "(%s) signal      : 0x%02x.\n", lp->dev->name,
-                    probe_rsp->signal );
-
-            DBG_TRACE( DbgInfo, "(%s) silence     : 0x%02x.\n", lp->dev->name,
-                    probe_rsp->silence );
-
-            DBG_TRACE( DbgInfo, "(%s) rxFlow      : 0x%02x.\n", lp->dev->name,
-                    probe_rsp->rxFlow );
-
-            DBG_TRACE( DbgInfo, "(%s) rate        : 0x%02x.\n", lp->dev->name,
-                    probe_rsp->rate );
-
-            DBG_TRACE( DbgInfo, "(%s) frame cntl  : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->frameControl );
-
-            DBG_TRACE( DbgInfo, "(%s) durID       : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->durID );
-
-               DBG_TRACE(DbgInfo, "(%s) address1    : %pM\n", lp->dev->name,
-                       probe_rsp->address1);
-
-               DBG_TRACE(DbgInfo, "(%s) address2    : %pM\n", lp->dev->name,
-                       probe_rsp->address2);
-
-               DBG_TRACE(DbgInfo, "(%s) BSSID       : %pM\n", lp->dev->name,
-                       probe_rsp->BSSID);
-
-            DBG_TRACE( DbgInfo, "(%s) sequence    : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->sequence );
-
-               DBG_TRACE(DbgInfo, "(%s) address4    : %pM\n", lp->dev->name,
-                       probe_rsp->address4);
-
-            DBG_TRACE( DbgInfo, "(%s) datalength  : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->dataLength );
-
-               DBG_TRACE(DbgInfo, "(%s) DA          : %pM\n", lp->dev->name,
-                       probe_rsp->DA);
-
-               DBG_TRACE(DbgInfo, "(%s) SA          : %pM\n", lp->dev->name,
-                       probe_rsp->SA);
-
-#ifdef WARP
-
-            DBG_TRACE( DbgInfo, "(%s) channel     : %d\n", lp->dev->name,
-                    probe_rsp->channel );
-
-            DBG_TRACE( DbgInfo, "(%s) band        : %d\n", lp->dev->name,
-                    probe_rsp->band );
-#else
-            DBG_TRACE( DbgInfo, "(%s) lenType     : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->lenType );
-#endif  // WARP
-
-            DBG_TRACE( DbgInfo, "(%s) timeStamp   : %d.%d.%d.%d.%d.%d.%d.%d\n",
-                    lp->dev->name,
-                    probe_rsp->timeStamp[0],
-                    probe_rsp->timeStamp[1],
-                    probe_rsp->timeStamp[2],
-                    probe_rsp->timeStamp[3],
-                    probe_rsp->timeStamp[4],
-                    probe_rsp->timeStamp[5],
-                    probe_rsp->timeStamp[6],
-                    probe_rsp->timeStamp[7]);
-
-            DBG_TRACE( DbgInfo, "(%s) beaconInt   : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->beaconInterval );
-
-            DBG_TRACE( DbgInfo, "(%s) capability  : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->capability );
-
-            DBG_TRACE( DbgInfo, "(%s) SSID len    : 0x%04x.\n", lp->dev->name,
-                    probe_rsp->rawData[1] );
-
-
-            if( probe_rsp->rawData[1] > 0 ) {
-                char ssid[HCF_MAX_NAME_LEN];
-
-                memset( ssid, 0, sizeof( ssid ));
-                strncpy( ssid, &probe_rsp->rawData[2],
-                            probe_rsp->rawData[1] );
-
-                DBG_TRACE( DbgInfo, "(%s) SSID        : %s\n",
-                            lp->dev->name, ssid );
-            }
-
-
-            /* Parse out the WPA-IE, if one exists */
-            wpa_ie = wl_parse_wpa_ie( probe_rsp, &wpa_ie_len );
-            if( wpa_ie != NULL ) {
-                DBG_TRACE( DbgInfo, "(%s) WPA-IE      : %s\n",
-                lp->dev->name, wl_print_wpa_ie( wpa_ie, wpa_ie_len ));
-            }
-
-            DBG_TRACE( DbgInfo, "(%s) flags       : 0x%04x.\n",
-                        lp->dev->name, probe_rsp->flags );
-        }
-
-        DBG_TRACE( DbgInfo, "\n" );
-
-
-        /* If probe response length is 1, then the scan is complete */
-        if( probe_rsp->length == 1 ) {
-            DBG_TRACE( DbgInfo, "SCAN COMPLETE\n" );
-            lp->probe_results.num_aps = lp->probe_num_aps;
-            lp->probe_results.scan_complete = TRUE;
-
-            /* Reset the counter for the next scan request */
-            lp->probe_num_aps = 0;
-
-            /* Send a wireless extensions event that the scan completed */
-            wl_wext_event_scan_complete( lp->dev );
-        } else {
-            /* Only copy to the table if the entry is unique; APs sometimes
-                respond more than once to a probe */
-            if( lp->probe_num_aps == 0 ) {
-                /* Copy the info to the ScanResult structure in the private
-                adapter struct */
-                memcpy( &( lp->probe_results.ProbeTable[lp->probe_num_aps] ),
-                        probe_rsp, sizeof( PROBE_RESP ));
-
-                /* Increment the number of APs detected */
-                lp->probe_num_aps++;
-            } else {
-                int count;
-                int unique = 1;
-
-                for( count = 0; count < lp->probe_num_aps; count++ ) {
-                    if( memcmp( &( probe_rsp->BSSID ),
-                        lp->probe_results.ProbeTable[count].BSSID,
-                        ETH_ALEN ) == 0 ) {
-                        unique = 0;
-                    }
-                }
-
-                if( unique ) {
-                    /* Copy the info to the ScanResult structure in the
-                    private adapter struct. Only copy if there's room in the
-                    table */
-                    if( lp->probe_num_aps < MAX_NAPS )
-                    {
-                        memcpy( &( lp->probe_results.ProbeTable[lp->probe_num_aps] ),
-                                probe_rsp, sizeof( PROBE_RESP ));
-                    }
-                    else
-                    {
-                        DBG_WARNING( DbgInfo, "Num of scan results exceeds storage, truncating\n" );
-                    }
-
-                    /* Increment the number of APs detected. Note I do this
-                        here even when I don't copy the probe response to the
-                        buffer in order to detect the overflow condition */
-                    lp->probe_num_aps++;
-                }
-            }
-        }
-    }
-} // wl_process_probe_response
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_process_updated_record()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Process the updated information record message signaled by the device.
- *
- *  PARAMETERS:
- *
- *      lp - a pointer to the device's private structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_process_updated_record( struct wl_private *lp )
-{
-    if( lp != NULL ) {
-        lp->updatedRecord.u.u16[0] = CNV_LITTLE_TO_INT( lp->updatedRecord.u.u16[0] );
-
-        switch( lp->updatedRecord.u.u16[0] ) {
-        case CFG_CUR_COUNTRY_INFO:
-            DBG_TRACE( DbgInfo, "Updated Record: CFG_CUR_COUNTRY_INFO\n" );
-            wl_connect( lp );
-            break;
-
-        case CFG_PORT_STAT:
-            DBG_TRACE( DbgInfo, "Updated Record: WAIT_FOR_CONNECT (0xFD40)\n" );
-            //wl_connect( lp );
-            break;
-
-        default:
-            DBG_TRACE( DbgInfo, "UNKNOWN: 0x%04x\n",
-                       lp->updatedRecord.u.u16[0] );
-        }
-    }
-} // wl_process_updated_record
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_process_assoc_status()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Process the association status event signaled by the device.
- *
- *  PARAMETERS:
- *
- *      lp - a pointer to the device's private structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_process_assoc_status( struct wl_private *lp )
-{
-    ASSOC_STATUS_STRCT *assoc_stat;
-
-    if( lp != NULL ) {
-        assoc_stat = (ASSOC_STATUS_STRCT *)&lp->assoc_stat;
-
-        wl_endian_translate_event( (ltv_t *)assoc_stat );
-
-        switch( assoc_stat->assocStatus ) {
-        case 1:
-            DBG_TRACE( DbgInfo, "Association Status : STA Associated\n" );
-            break;
-
-        case 2:
-            DBG_TRACE( DbgInfo, "Association Status : STA Reassociated\n" );
-            break;
-
-        case 3:
-            DBG_TRACE( DbgInfo, "Association Status : STA Disassociated\n" );
-            break;
-
-        default:
-            DBG_TRACE( DbgInfo, "Association Status : UNKNOWN (0x%04x)\n",
-                        assoc_stat->assocStatus );
-            break;
-        }
-
-       DBG_TRACE(DbgInfo, "STA Address        : %pM\n", assoc_stat->staAddr);
-
-        if(( assoc_stat->assocStatus == 2 )  && ( assoc_stat->len == 8 )) {
-               DBG_TRACE(DbgInfo, "Old AP Address     : %pM\n",
-                       assoc_stat->oldApAddr);
-        }
-    }
-} // wl_process_assoc_status
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_process_security_status()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Process the security status message signaled by the device.
- *
- *  PARAMETERS:
- *
- *      lp - a pointer to the device's private structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_process_security_status( struct wl_private *lp )
-{
-    SECURITY_STATUS_STRCT *sec_stat;
-
-    if( lp != NULL ) {
-        sec_stat = (SECURITY_STATUS_STRCT *)&lp->sec_stat;
-
-        wl_endian_translate_event( (ltv_t *)sec_stat );
-
-        switch( sec_stat->securityStatus ) {
-        case 1:
-            DBG_TRACE( DbgInfo, "Security Status : Dissassociate [AP]\n" );
-            break;
-
-        case 2:
-            DBG_TRACE( DbgInfo, "Security Status : Deauthenticate [AP]\n" );
-            break;
-
-        case 3:
-            DBG_TRACE( DbgInfo, "Security Status : Authenticate Fail [STA] or [AP]\n" );
-            break;
-
-        case 4:
-            DBG_TRACE( DbgInfo, "Security Status : MIC Fail\n" );
-            break;
-
-        case 5:
-            DBG_TRACE( DbgInfo, "Security Status : Associate Fail\n" );
-            break;
-
-        default:
-            DBG_TRACE( DbgInfo, "Security Status : UNKNOWN (0x%04x)\n",
-                        sec_stat->securityStatus );
-            break;
-        }
-
-       DBG_TRACE(DbgInfo, "STA Address     : %pM\n", sec_stat->staAddr);
-       DBG_TRACE(DbgInfo, "Reason          : 0x%04x\n", sec_stat->reason);
-
-    }
-} // wl_process_security_status
-/*============================================================================*/
-
-int wl_get_tallies(struct wl_private *lp,
-                  CFG_HERMES_TALLIES_STRCT *tallies)
-{
-    int ret = 0;
-    int status;
-    CFG_HERMES_TALLIES_STRCT *pTallies;
-
-    /* Get the current tallies from the adapter */
-    lp->ltvRecord.len = 1 + HCF_TOT_TAL_CNT * sizeof(hcf_16);
-    lp->ltvRecord.typ = CFG_TALLIES;
-
-    status = hcf_get_info(&(lp->hcfCtx), (LTVP)&(lp->ltvRecord));
-
-    if( status == HCF_SUCCESS ) {
-       pTallies = (CFG_HERMES_TALLIES_STRCT *)&(lp->ltvRecord.u.u32);
-       memcpy(tallies, pTallies, sizeof(*tallies));
-       DBG_TRACE( DbgInfo, "Get tallies okay, dixe: %d\n", sizeof(*tallies) );
-    } else {
-       DBG_TRACE( DbgInfo, "Get tallies failed\n" );
-       ret = -EFAULT;
-    }
-
-    return ret;
-}
-
diff --git a/drivers/staging/wlags49_h2/wl_util.h b/drivers/staging/wlags49_h2/wl_util.h
deleted file mode 100644 (file)
index 57bfd7f..0000000
+++ /dev/null
@@ -1,96 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing information required for utility functions used
- *   throughout the driver.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_UTIL_H__
-#define __WL_UTIL_H__
-
-/*******************************************************************************
- *  function prototypes
- ******************************************************************************/
-int dbm(int value);
-
-int is_valid_key_string(char *s);
-
-void key_string2key(char *ks, KEY_STRCT *key);
-
-void wl_hcf_error(struct net_device *dev, int hcfStatus);
-
-void wl_endian_translate_event(ltv_t *pLtv);
-
-int wl_has_wep(IFBP ifbp);
-
-hcf_8  wl_parse_ds_ie(PROBE_RESP *probe_rsp);
-hcf_8 *wl_parse_wpa_ie(PROBE_RESP *probe_rsp, hcf_16 *length);
-hcf_8 *wl_print_wpa_ie(hcf_8 *buffer, int length);
-
-int wl_get_tallies(struct wl_private *, CFG_HERMES_TALLIES_STRCT *);
-int wl_is_a_valid_chan(int channel);
-int wl_is_a_valid_freq(long frequency);
-long wl_get_freq_from_chan(int channel);
-int wl_get_chan_from_freq(long frequency);
-
-void wl_process_link_status(struct wl_private *lp);
-void wl_process_probe_response(struct wl_private *lp);
-void wl_process_updated_record(struct wl_private *lp);
-void wl_process_assoc_status(struct wl_private *lp);
-void wl_process_security_status(struct wl_private *lp);
-
-#endif  /* __WL_UTIL_H__ */
diff --git a/drivers/staging/wlags49_h2/wl_version.h b/drivers/staging/wlags49_h2/wl_version.h
deleted file mode 100644 (file)
index bbc484a..0000000
+++ /dev/null
@@ -1,146 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   This header file contains version information for the code base, as well as
- *   special definitions and macros needed by certain versions of the code.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_VERSION_H__
-#define __WL_VERSION_H__
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-//#include <linux/config.h>
-
-#ifndef CONFIG_MODVERSIONS
-#define __NO_VERSION__
-#endif  // CONFIG_MODVERSIONS
-
-/*******************************************************************************
- *  constant definitions
- ******************************************************************************/
-
-#define VENDOR_NAME         "Agere Systems, http://www.agere.com"
-
-#define DRIVER_NAME         "wlags49"
-#define DRV_IDENTITY        49
-
-#define DRV_MAJOR_VERSION   7
-#define DRV_MINOR_VERSION   22
-#define DRV_VERSION_STR     "7.22"
-
-
-#if defined BUS_PCMCIA
-#define BUS_TYPE            "PCMCIA"
-#elif defined BUS_PCI
-#define BUS_TYPE            "PCI"
-#else
-err: define bus type;
-#endif  // BUS_XXX
-
-#if defined HERMES25
-#define HW_TYPE                                "HII.5"
-#else
-#define HW_TYPE                                "HII"
-#endif // HERMES25
-
-#if defined WARP
-#define FW_TYPE                                "WARP"
-#else
-#define FW_TYPE                                "BEAGLE"
-#endif // WARP
-
-#if defined HERMES25
-#if defined WARP
-#define DRV_VARIANT         3
-#else
-#define DRV_VARIANT         4
-#endif // WARP
-#else
-#define DRV_VARIANT         2
-#endif // HERMES25
-
-#define VERSION_INFO   KBUILD_MODNAME " v" DRV_VERSION_STR     \
-                       " for " BUS_TYPE ", by " VENDOR_NAME
-
-/* The version of wireless extensions we support */
-#define WIRELESS_SUPPORT    21
-
-/*******************************************************************************
- *  bus architecture specific defines, includes, etc.
- ******************************************************************************/
-/*
- * There doesn't seem to be a difference for PCMCIA and PCI anymore, at least
- * for PCMCIA the same defines are needed now as previously only used for PCI
- */
-
-#define NEW_MULTICAST
-#define ALLOC_SKB(len)   dev_alloc_skb(len+2)
-#define GET_PACKET(dev, skb, count)\
-                        skb_reserve((skb), 2); \
-                        BLOCK_INPUT(skb_put((skb), (count)), (count)); \
-                        (skb)->protocol = eth_type_trans((skb), (dev))
-#define GET_PACKET_DMA(dev, skb, count)\
-                        skb_reserve((skb), 2); \
-                        BLOCK_INPUT_DMA(skb_put((skb), (count)), (count)); \
-                        (skb)->protocol = eth_type_trans((skb), (dev))
-
-
-
-
-#endif  // __WL_VERSION_H__
diff --git a/drivers/staging/wlags49_h2/wl_wext.c b/drivers/staging/wlags49_h2/wl_wext.c
deleted file mode 100644 (file)
index 3aeff81..0000000
+++ /dev/null
@@ -1,3794 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-/*******************************************************************************
- *  include files
- ******************************************************************************/
-#include <wl_version.h>
-
-#include <linux/if_arp.h>
-#include <linux/ioport.h>
-#include <linux/delay.h>
-#include <linux/etherdevice.h>
-#include <asm/uaccess.h>
-
-#include <debug.h>
-#include <hcf.h>
-#include <hcfdef.h>
-
-#include <wl_if.h>
-#include <wl_internal.h>
-#include <wl_util.h>
-#include <wl_main.h>
-#include <wl_wext.h>
-#include <wl_priv.h>
-
-/* Set up the LTV to program the appropriate key */
-static int hermes_set_tkip_keys(ltv_t *ltv, u16 key_idx, u8 *addr,
-                               int set_tx, u8 *seq, u8 *key, size_t key_len)
-{
-       int ret = -EINVAL;
-       int buf_idx = 0;
-       hcf_8 tsc[IW_ENCODE_SEQ_MAX_SIZE] =
-               { 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00 };
-
-       /*
-        * Check the key index here; if 0, load as Pairwise Key, otherwise,
-        * load as a group key. Note that for the Hermes, the RIDs for
-        * group/pairwise keys are different from each other and different
-        * than the default WEP keys as well.
-        */
-       switch (key_idx) {
-       case 0:
-               ltv->len = 28;
-               ltv->typ = CFG_ADD_TKIP_MAPPED_KEY;
-
-               /* Load the BSSID */
-               memcpy(&ltv->u.u8[buf_idx], addr, ETH_ALEN);
-               buf_idx += ETH_ALEN;
-
-               /* Load the TKIP key */
-               memcpy(&ltv->u.u8[buf_idx], &key[0], 16);
-               buf_idx += 16;
-
-               /* Load the TSC */
-               memcpy(&ltv->u.u8[buf_idx], tsc, IW_ENCODE_SEQ_MAX_SIZE);
-               buf_idx += IW_ENCODE_SEQ_MAX_SIZE;
-
-               /* Load the RSC */
-               memcpy(&ltv->u.u8[buf_idx], seq, IW_ENCODE_SEQ_MAX_SIZE);
-               buf_idx += IW_ENCODE_SEQ_MAX_SIZE;
-
-               /* Load the TxMIC key */
-               memcpy(&ltv->u.u8[buf_idx], &key[16], 8);
-               buf_idx += 8;
-
-               /* Load the RxMIC key */
-               memcpy(&ltv->u.u8[buf_idx], &key[24], 8);
-
-               ret = 0;
-               break;
-       case 1:
-       case 2:
-       case 3:
-               ltv->len = 26;
-               ltv->typ = CFG_ADD_TKIP_DEFAULT_KEY;
-
-               /* Load the key Index */
-
-               /* If this is a Tx Key, set bit 8000 */
-               if (set_tx)
-                       key_idx |= 0x8000;
-               ltv->u.u16[buf_idx] = cpu_to_le16(key_idx);
-               buf_idx += 2;
-
-               /* Load the RSC */
-               memcpy(&ltv->u.u8[buf_idx], seq, IW_ENCODE_SEQ_MAX_SIZE);
-               buf_idx += IW_ENCODE_SEQ_MAX_SIZE;
-
-               /* Load the TKIP, TxMIC, and RxMIC keys in one shot, because in
-                  CFG_ADD_TKIP_DEFAULT_KEY they are back-to-back */
-               memcpy(&ltv->u.u8[buf_idx], key, key_len);
-               buf_idx += key_len;
-
-               /* Load the TSC */
-               memcpy(&ltv->u.u8[buf_idx], tsc, IW_ENCODE_SEQ_MAX_SIZE);
-
-               ret = 0;
-               break;
-       default:
-               break;
-       }
-
-       return ret;
-}
-
-/* Set up the LTV to clear the appropriate key */
-static int hermes_clear_tkip_keys(ltv_t *ltv, u16 key_idx, u8 *addr)
-{
-       switch (key_idx) {
-       case 0:
-               if (!is_broadcast_ether_addr(addr)) {
-                       ltv->len = 7;
-                       ltv->typ = CFG_REMOVE_TKIP_MAPPED_KEY;
-                       memcpy(&ltv->u.u8[0], addr, ETH_ALEN);
-               }
-               break;
-       case 1:
-       case 2:
-       case 3:
-               /* Clear the Group TKIP keys by index */
-               ltv->len = 2;
-               ltv->typ = CFG_REMOVE_TKIP_DEFAULT_KEY;
-               ltv->u.u16[0] = cpu_to_le16(key_idx);
-
-               break;
-       default:
-               break;
-       }
-
-       return 0;
-}
-
-/* Set the WEP keys in the wl_private structure */
-static int hermes_set_wep_keys(struct wl_private *lp, u16 key_idx,
-                              u8 *key, size_t key_len,
-                              bool enable, bool set_tx)
-{
-       hcf_8  encryption_state = lp->EnableEncryption;
-       int tk = lp->TransmitKeyID - 1; /* current key */
-       int ret = 0;
-
-       /* Is encryption supported? */
-       if (!wl_has_wep(&(lp->hcfCtx))) {
-               DBG_WARNING(DbgInfo, "WEP not supported on this device\n");
-               ret = -EOPNOTSUPP;
-               goto out;
-       }
-
-       DBG_NOTICE(DbgInfo, "pointer: %p, length: %d\n",
-                  key, key_len);
-
-       /* Check the size of the key */
-       switch (key_len) {
-       case MIN_KEY_SIZE:
-       case MAX_KEY_SIZE:
-
-               /* Check the index */
-               if ((key_idx < 0) || (key_idx >= MAX_KEYS))
-                       key_idx = tk;
-
-               /* Cleanup */
-               memset(lp->DefaultKeys.key[key_idx].key, 0, MAX_KEY_SIZE);
-
-               /* Copy the key in the driver */
-               memcpy(lp->DefaultKeys.key[key_idx].key, key, key_len);
-
-               /* Set the length */
-               lp->DefaultKeys.key[key_idx].len = key_len;
-
-               DBG_NOTICE(DbgInfo, "encoding.length: %d\n", key_len);
-               DBG_NOTICE(DbgInfo, "set key: %s(%d) [%d]\n",
-                          lp->DefaultKeys.key[key_idx].key,
-                          lp->DefaultKeys.key[key_idx].len, key_idx);
-
-               /* Enable WEP (if possible) */
-               if ((key_idx == tk) && (lp->DefaultKeys.key[tk].len > 0))
-                       lp->EnableEncryption = 1;
-
-               break;
-
-       case 0:
-               /* Do we want to just set the current transmit key? */
-               if (set_tx && (key_idx >= 0) && (key_idx < MAX_KEYS)) {
-                       DBG_NOTICE(DbgInfo, "index: %d; len: %d\n", key_idx,
-                                  lp->DefaultKeys.key[key_idx].len);
-
-                       if (lp->DefaultKeys.key[key_idx].len > 0) {
-                               lp->TransmitKeyID    = key_idx + 1;
-                               lp->EnableEncryption = 1;
-                       } else {
-                               DBG_WARNING(DbgInfo, "Problem setting the current TxKey\n");
-                               ret = -EINVAL;
-                       }
-               }
-               break;
-
-       default:
-               DBG_WARNING(DbgInfo, "Invalid Key length\n");
-               ret = -EINVAL;
-               goto out;
-       }
-
-       /* Read the flags */
-       if (enable) {
-               lp->EnableEncryption = 1;
-               lp->wext_enc = IW_ENCODE_ALG_WEP;
-       } else {
-               lp->EnableEncryption = 0;       /* disable encryption */
-               lp->wext_enc = IW_ENCODE_ALG_NONE;
-       }
-
-       DBG_TRACE(DbgInfo, "encryption_state :     %d\n", encryption_state);
-       DBG_TRACE(DbgInfo, "lp->EnableEncryption : %d\n", lp->EnableEncryption);
-       DBG_TRACE(DbgInfo, "erq->length          : %d\n", key_len);
-
-       /* Write the changes to the card */
-       if (ret == 0) {
-               DBG_NOTICE(DbgInfo, "encrypt: %d, ID: %d\n", lp->EnableEncryption,
-                          lp->TransmitKeyID);
-
-               if (lp->EnableEncryption == encryption_state) {
-                       if (key_len != 0) {
-                               /* Dynamic WEP key update */
-                               wl_set_wep_keys(lp);
-                       }
-               } else {
-                       /* To switch encryption on/off, soft reset is
-                        * required */
-                       wl_apply(lp);
-               }
-       }
-
-out:
-       return ret;
-}
-
-/*******************************************************************************
- *     wireless_commit()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Commit
- *  protocol used.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-static int wireless_commit(struct net_device *dev,
-                          struct iw_request_info *info,
-                          union iwreq_data *rqu, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       wl_apply(lp);
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_commit
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_protocol()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Returns a vendor-defined string that should identify the wireless
- *  protocol used.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-static int wireless_get_protocol(struct net_device *dev, struct iw_request_info *info, char *name, char *extra)
-{
-       /* Originally, the driver was placing the string "Wireless" here. However,
-          the wireless extensions (/linux/wireless.h) indicate this string should
-          describe the wireless protocol. */
-
-       strcpy(name, "IEEE 802.11b");
-
-       return 0;
-} // wireless_get_protocol
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_frequency()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sets the frequency (channel) on which the card should Tx/Rx.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_frequency(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int channel = 0;
-       int ret     = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if( !capable( CAP_NET_ADMIN )) {
-               ret = -EPERM;
-               return ret;
-       }
-
-
-       /* If frequency specified, look up channel */
-       if( freq->e == 1 ) {
-               int f = freq->m / 100000;
-               channel = wl_get_chan_from_freq( f );
-       }
-
-
-       /* Channel specified */
-       if( freq->e == 0 ) {
-               channel = freq->m;
-       }
-
-
-       /* If the channel is an 802.11a channel, set Bit 8 */
-       if( channel > 14 ) {
-               channel = channel | 0x100;
-       }
-
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       lp->Channel = channel;
-
-
-       /* Commit the adapter parameters */
-       wl_apply( lp );
-
-       /* Send an event that channel/freq has been set */
-       wl_wext_event_freq( lp->dev );
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_frequency
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_frequency()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Gets the frequency (channel) on which the card is Tx/Rx.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-static int wireless_get_frequency(struct net_device *dev, struct iw_request_info *info, struct iw_freq *freq, char *extra)
-
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = -1;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       lp->ltvRecord.len = 2;
-       lp->ltvRecord.typ = CFG_CUR_CHANNEL;
-
-       ret = hcf_get_info( &(lp->hcfCtx), (LTVP)&( lp->ltvRecord ));
-       if( ret == HCF_SUCCESS ) {
-               hcf_16 channel = CNV_LITTLE_TO_INT( lp->ltvRecord.u.u16[0] );
-
-               freq->m = wl_get_freq_from_chan( channel ) * 100000;
-               freq->e = 1;
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-       ret = (ret == HCF_SUCCESS ? 0 : -EFAULT);
-
-out:
-       return ret;
-} // wireless_get_frequency
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_range()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to provide misc info and statistics about the
- *  wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_range(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long      flags;
-       struct iw_range   *range = (struct iw_range *) extra;
-       int                ret = 0;
-       int                status = -1;
-       int                count;
-       __u16             *pTxRate;
-       int                retries = 0;
-
-       /* Set range information */
-       data->length = sizeof(struct iw_range);
-       memset(range, 0, sizeof(struct iw_range));
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Set range information */
-       memset( range, 0, sizeof( struct iw_range ));
-
-retry:
-       /* Get the current transmit rate from the adapter */
-       lp->ltvRecord.len = 1 + (sizeof(*pTxRate) / sizeof(hcf_16));
-       lp->ltvRecord.typ = CFG_CUR_TX_RATE;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       if( status != HCF_SUCCESS ) {
-               /* Recovery action: reset and retry up to 10 times */
-               DBG_TRACE( DbgInfo, "Get CFG_CUR_TX_RATE failed: 0x%x\n", status );
-
-               if (retries < 10) {
-                       retries++;
-
-                       /* Holding the lock too long, makes a gap to allow other processes */
-                       wl_unlock(lp, &flags);
-                       wl_lock( lp, &flags );
-
-                       status = wl_reset( dev );
-                       if ( status != HCF_SUCCESS ) {
-                               DBG_TRACE( DbgInfo, "reset failed: 0x%x\n", status );
-
-                               ret = -EFAULT;
-                               goto out_unlock;
-                       }
-
-                       /* Holding the lock too long, makes a gap to allow other processes */
-                       wl_unlock(lp, &flags);
-                       wl_lock( lp, &flags );
-
-                       goto retry;
-
-               } else {
-                       DBG_TRACE( DbgInfo, "Get CFG_CUR_TX_RATE failed: %d retries\n", retries );
-                       ret = -EFAULT;
-                       goto out_unlock;
-               }
-       }
-
-       /* Holding the lock too long, makes a gap to allow other processes */
-       wl_unlock(lp, &flags);
-       wl_lock( lp, &flags );
-
-       pTxRate = (__u16 *)&( lp->ltvRecord.u.u32 );
-
-       range->throughput = CNV_LITTLE_TO_INT( *pTxRate ) * MEGABIT;
-
-       if (retries > 0) {
-               DBG_TRACE( DbgInfo, "Get CFG_CUR_TX_RATE succes: %d retries\n", retries );
-       }
-
-       // NWID - NOT SUPPORTED
-
-
-       /* Channel/Frequency Info */
-       range->num_channels = RADIO_CHANNELS;
-
-
-       /* Signal Level Thresholds */
-       range->sensitivity = RADIO_SENSITIVITY_LEVELS;
-
-
-       /* Link quality */
-       range->max_qual.qual     = (u_char)HCF_MAX_COMM_QUALITY;
-
-       /* If the value returned in /proc/net/wireless is greater than the maximum range,
-          iwconfig assumes that the value is in dBm. Because an unsigned char is used,
-          it requires a bit of contorsion... */
-
-       range->max_qual.level   = (u_char)( dbm( HCF_MIN_SIGNAL_LEVEL ) - 1 );
-       range->max_qual.noise   = (u_char)( dbm( HCF_MIN_NOISE_LEVEL ) - 1 );
-
-
-       /* Set available rates */
-       range->num_bitrates = 0;
-
-       lp->ltvRecord.len = 6;
-       lp->ltvRecord.typ = CFG_SUPPORTED_DATA_RATES;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       if( status == HCF_SUCCESS ) {
-               for( count = 0; count < MAX_RATES; count++ )
-                       if( lp->ltvRecord.u.u8[count+2] != 0 ) {
-                               range->bitrate[count] = lp->ltvRecord.u.u8[count+2] * MEGABIT / 2;
-                               range->num_bitrates++;
-                       }
-       } else {
-               DBG_TRACE( DbgInfo, "CFG_SUPPORTED_DATA_RATES: 0x%x\n", status );
-               ret = -EFAULT;
-               goto out_unlock;
-       }
-
-       /* RTS Threshold info */
-       range->min_rts   = MIN_RTS_BYTES;
-       range->max_rts   = MAX_RTS_BYTES;
-
-       // Frag Threshold info - NOT SUPPORTED
-
-       // Power Management info - NOT SUPPORTED
-
-       /* Encryption */
-
-       /* Holding the lock too long, makes a gap to allow other processes */
-       wl_unlock(lp, &flags);
-       wl_lock( lp, &flags );
-
-       /* Is WEP supported? */
-
-       if( wl_has_wep( &( lp->hcfCtx ))) {
-               /* WEP: RC4 40 bits */
-               range->encoding_size[0]      = MIN_KEY_SIZE;
-
-               /* RC4 ~128 bits */
-               range->encoding_size[1]      = MAX_KEY_SIZE;
-               range->num_encoding_sizes    = 2;
-               range->max_encoding_tokens   = MAX_KEYS;
-       }
-
-       /* Tx Power Info */
-       range->txpower_capa  = IW_TXPOW_MWATT;
-       range->num_txpower   = 1;
-       range->txpower[0]    = RADIO_TX_POWER_MWATT;
-
-       /* Wireless Extension Info */
-       range->we_version_compiled   = WIRELESS_EXT;
-       range->we_version_source     = WIRELESS_SUPPORT;
-
-       // Retry Limits and Lifetime - NOT SUPPORTED
-
-       /* Holding the lock too long, makes a gap to allow other processes */
-       wl_unlock(lp, &flags);
-       wl_lock( lp, &flags );
-
-       DBG_TRACE( DbgInfo, "calling wl_wireless_stats\n" );
-       wl_wireless_stats( lp->dev );
-       range->avg_qual = lp->wstats.qual;
-       DBG_TRACE( DbgInfo, "wl_wireless_stats done\n" );
-
-       /* Event capability (kernel + driver) */
-       IW_EVENT_CAPA_SET_KERNEL(range->event_capa);
-       IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWAP);
-       IW_EVENT_CAPA_SET(range->event_capa, SIOCGIWSCAN);
-       IW_EVENT_CAPA_SET(range->event_capa, IWEVREGISTERED);
-       IW_EVENT_CAPA_SET(range->event_capa, IWEVEXPIRED);
-       IW_EVENT_CAPA_SET(range->event_capa, IWEVMICHAELMICFAILURE);
-       IW_EVENT_CAPA_SET(range->event_capa, IWEVASSOCREQIE);
-       IW_EVENT_CAPA_SET(range->event_capa, IWEVASSOCRESPIE);
-
-       range->enc_capa = IW_ENC_CAPA_WPA | IW_ENC_CAPA_CIPHER_TKIP;
-       range->scan_capa = IW_SCAN_CAPA_NONE;
-
-out_unlock:
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-       return ret;
-} // wireless_get_range
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wireless_get_bssid()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Gets the BSSID the wireless device is currently associated with.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_bssid(struct net_device *dev, struct iw_request_info *info, struct sockaddr *ap_addr, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-       int status = -1;
-#endif /* (HCF_TYPE) & HCF_TYPE_STA */
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       ap_addr->sa_family = ARPHRD_ETHER;
-
-       /* Assume AP mode here, which means the BSSID is our own MAC address. In
-          STA mode, this address will be overwritten with the actual BSSID using
-          the code below. */
-       memcpy(&ap_addr->sa_data, lp->dev->dev_addr, ETH_ALEN);
-
-
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-                                       //;?should we return an error status in AP mode
-
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_STA  ) {
-               /* Get Current BSSID */
-               lp->ltvRecord.typ = CFG_CUR_BSSID;
-               lp->ltvRecord.len = 4;
-               status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-               if( status == HCF_SUCCESS ) {
-                       /* Copy info into sockaddr struct */
-                       memcpy(&ap_addr->sa_data, lp->ltvRecord.u.u8, ETH_ALEN);
-               } else {
-                       ret = -EFAULT;
-               }
-       }
-
-#endif // (HCF_TYPE) & HCF_TYPE_STA
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_bssid
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_ap_list()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Gets the results of a network scan.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- *  NOTE: SIOCGIWAPLIST has been deprecated by SIOCSIWSCAN. This function
- *       implements SIOCGIWAPLIST only to provide backwards compatibility. For
- *       all systems using WIRELESS_EXT v14 and higher, use SIOCSIWSCAN!
- *
- ******************************************************************************/
-static int wireless_get_ap_list (struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long     flags;
-       int                 ret;
-       int                 num_aps = -1;
-       int                 sec_count = 0;
-       hcf_32              count;
-       struct sockaddr     *hwa = NULL;
-       struct iw_quality   *qual = NULL;
-#ifdef WARP
-       ScanResult                      *p = &lp->scan_results;
-#else
-       ProbeResult         *p = &lp->probe_results;
-#endif  // WARP
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Set the completion state to FALSE */
-       lp->scan_results.scan_complete = FALSE;
-       lp->probe_results.scan_complete = FALSE;
-       /* Channels to scan */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_SCAN_CHANNELS_2GHZ;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0x7FFF );
-       ret = hcf_put_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       DBG_TRACE( DbgInfo, "CFG_SCAN_CHANNELS_2GHZ result: 0x%x\n", ret );
-
-       /* Set the SCAN_SSID to "ANY". Using this RID for scan prevents the need to
-          disassociate from the network we are currently on */
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_SCAN_SSID;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0 );
-       ret = hcf_put_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       DBG_TRACE( DbgInfo, "CFG_SCAN_SSID to 'any' ret: 0x%x\n", ret );
-
-       /* Initiate the scan */
-#ifdef WARP
-       ret = hcf_action( &( lp->hcfCtx ), MDD_ACT_SCAN );
-#else
-       ret = hcf_action( &( lp->hcfCtx ), HCF_ACT_ACS_SCAN );
-#endif  // WARP
-
-       wl_act_int_on( lp );
-
-       //;? unlock? what about the access to lp below? is it broken?
-       wl_unlock(lp, &flags);
-
-       if( ret == HCF_SUCCESS ) {
-               DBG_TRACE( DbgInfo, "SUCCESSFULLY INITIATED SCAN...\n" );
-               while( (*p).scan_complete == FALSE && ret == HCF_SUCCESS ) {
-                       DBG_TRACE( DbgInfo, "Waiting for scan results...\n" );
-                       /* Abort the scan if we've waited for more than MAX_SCAN_TIME_SEC */
-                       if( sec_count++ > MAX_SCAN_TIME_SEC ) {
-                               ret = -EIO;
-                       } else {
-                               /* Wait for 1 sec in 10ms intervals, scheduling the kernel to do
-                                  other things in the meantime, This prevents system lockups by
-                                  giving some time back to the kernel */
-                               for( count = 0; count < 100; count ++ ) {
-                                       mdelay( 10 );
-                                       schedule( );
-                               }
-                       }
-               }
-
-               rmb();
-
-               if ( ret != HCF_SUCCESS ) {
-                       DBG_ERROR( DbgInfo, "timeout waiting for scan results\n" );
-               } else {
-                       num_aps             = (*p)/*lp->probe_results*/.num_aps;
-                       if (num_aps > IW_MAX_AP) {
-                               num_aps = IW_MAX_AP;
-                       }
-                       data->length = num_aps;
-                       hwa = (struct sockaddr *)extra;
-                       qual = (struct iw_quality *) extra +
-                                       ( sizeof( struct sockaddr ) * num_aps );
-
-                       /* This flag is used to tell the user if we provide quality
-                          information. Since we provide signal/noise levels but no
-                          quality info on a scan, this is set to 0. Setting to 1 and
-                          providing a quality of 0 produces weird results. If we ever
-                          provide quality (or can calculate it), this can be changed */
-                       data->flags = 0;
-
-                       for( count = 0; count < num_aps; count++ ) {
-#ifdef WARP
-                               memcpy( hwa[count].sa_data,
-                                               (*p)/*lp->scan_results*/.APTable[count].bssid, ETH_ALEN );
-#else  //;?why use BSSID and bssid as names in seemingly very comparable situations
-                               DBG_PRINT("BSSID: %pM\n",
-                                               (*p).ProbeTable[count].BSSID);
-                               memcpy( hwa[count].sa_data,
-                                               (*p)/*lp->probe_results*/.ProbeTable[count].BSSID, ETH_ALEN );
-#endif // WARP
-                       }
-                       /* Once the data is copied to the wireless struct, invalidate the
-                          scan result to initiate a rescan on the next request */
-                       (*p)/*lp->probe_results*/.scan_complete = FALSE;
-                       /* Send the wireless event that the scan has completed, just in case
-                          it's needed */
-                       wl_wext_event_scan_complete( lp->dev );
-               }
-       }
-out:
-       return ret;
-} // wireless_get_ap_list
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_sensitivity()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sets the sensitivity (distance between APs) of the wireless card.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_sensitivity(struct net_device *dev, struct iw_request_info *info, struct iw_param *sens, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-       int dens = sens->value;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if(( dens < 1 ) || ( dens > 3 )) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       lp->DistanceBetweenAPs = dens;
-       wl_apply( lp );
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_sensitivity
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_sensitivity()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Gets the sensitivity (distance between APs) of the wireless card.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_sensitivity(struct net_device *dev, struct iw_request_info *info, struct iw_param *sens, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       /* not worth locking ... */
-       sens->value = lp->DistanceBetweenAPs;
-       sens->fixed = 0;        /* auto */
-out:
-       return ret;
-} // wireless_get_sensitivity
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_essid()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Sets the ESSID (network name) that the wireless device should associate
- *  with.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *ssid)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if (data->flags != 0 && data->length > HCF_MAX_NAME_LEN) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       memset( lp->NetworkName, 0, sizeof( lp->NetworkName ));
-
-       /* data->flags is zero to ask for "any" */
-       if( data->flags == 0 ) {
-               /* Need this because in STAP build PARM_DEFAULT_SSID is "LinuxAP"
-                * ;?but there ain't no STAP anymore*/
-               if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_STA  ) {
-                       strcpy( lp->NetworkName, "ANY" );
-               } else {
-                       //strcpy( lp->NetworkName, "ANY" );
-                       strcpy( lp->NetworkName, PARM_DEFAULT_SSID );
-               }
-       } else {
-               memcpy( lp->NetworkName, ssid, data->length );
-       }
-
-       DBG_NOTICE( DbgInfo, "set NetworkName: %s\n", ssid );
-
-       /* Commit the adapter parameters */
-       wl_apply( lp );
-
-       /* Send an event that ESSID has been set */
-       wl_wext_event_essid( lp->dev );
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_essid
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_essid()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Gets the ESSID (network name) that the wireless device is associated
- *  with.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_essid(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *essid)
-
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int         ret = 0;
-       int         status = -1;
-       wvName_t    *pName;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Get the desired network name */
-       lp->ltvRecord.len = 1 + ( sizeof( *pName ) / sizeof( hcf_16 ));
-
-
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-                                       //;?should we return an error status in AP mode
-
-       lp->ltvRecord.typ = CFG_DESIRED_SSID;
-
-#endif
-
-
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_AP
-               //;?should we restore this to allow smaller memory footprint
-
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-               lp->ltvRecord.typ = CFG_CNF_OWN_SSID;
-       }
-
-#endif // HCF_AP
-
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       if( status == HCF_SUCCESS ) {
-               pName = (wvName_t *)&( lp->ltvRecord.u.u32 );
-
-               /* Endian translate the string length */
-               pName->length = CNV_LITTLE_TO_INT( pName->length );
-
-               /* Copy the information into the user buffer */
-               data->length = pName->length;
-
-               if( pName->length < HCF_MAX_NAME_LEN ) {
-                       pName->name[pName->length] = '\0';
-               }
-
-               data->flags = 1;
-
-
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-                                       //;?should we return an error status in AP mode
-
-               /* if desired is null ("any"), return current or "any" */
-               if( pName->name[0] == '\0' ) {
-                       /* Get the current network name */
-                       lp->ltvRecord.len = 1 + ( sizeof(*pName ) / sizeof( hcf_16 ));
-                       lp->ltvRecord.typ = CFG_CUR_SSID;
-
-                       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-                       if( status == HCF_SUCCESS ) {
-                               pName = (wvName_t *)&( lp->ltvRecord.u.u32 );
-
-                               /* Endian translate the string length */
-                               pName->length = CNV_LITTLE_TO_INT( pName->length );
-
-                               /* Copy the information into the user buffer */
-                               data->length = pName->length;
-                               data->flags = 1;
-                       } else {
-                               ret = -EFAULT;
-                               goto out_unlock;
-                       }
-               }
-
-#endif // HCF_STA
-
-               if (pName->length > IW_ESSID_MAX_SIZE) {
-                       ret = -EFAULT;
-                       goto out_unlock;
-               }
-
-               memcpy(essid, pName->name, pName->length);
-       } else {
-               ret = -EFAULT;
-               goto out_unlock;
-       }
-
-out_unlock:
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_essid
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_encode()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Sets the encryption keys and status (enable or disable).
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_encode(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *keybuf)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int key_idx = (erq->flags & IW_ENCODE_INDEX) - 1;
-       int ret = 0;
-       bool enable = true;
-
-       if (lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if (erq->flags & IW_ENCODE_DISABLED)
-               enable = false;
-
-       wl_lock(lp, &flags);
-
-       wl_act_int_off(lp);
-
-       ret = hermes_set_wep_keys(lp, key_idx, keybuf, erq->length,
-                                 enable, true);
-
-       /* Send an event that Encryption has been set */
-       if (ret == 0)
-               wl_wext_event_encode(dev);
-
-       wl_act_int_on(lp);
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-}
-
-/*******************************************************************************
- *     wireless_get_encode()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Gets the encryption keys and status.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_encode(struct net_device *dev, struct iw_request_info *info, struct iw_point *erq, char *key)
-
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-       int index;
-
-       DBG_NOTICE(DbgInfo, "GIWENCODE: encrypt: %d, ID: %d\n", lp->EnableEncryption, lp->TransmitKeyID);
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       /* Only super-user can see WEP key */
-       if( !capable( CAP_NET_ADMIN )) {
-               ret = -EPERM;
-               return ret;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Is it supported? */
-       if( !wl_has_wep( &( lp->hcfCtx ))) {
-               ret = -EOPNOTSUPP;
-               goto out_unlock;
-       }
-
-       /* Basic checking */
-       index = (erq->flags & IW_ENCODE_INDEX ) - 1;
-
-
-       /* Set the flags */
-       erq->flags = 0;
-
-       if( lp->EnableEncryption == 0 ) {
-               erq->flags |= IW_ENCODE_DISABLED;
-       }
-
-       /* Which key do we want */
-       if(( index < 0 ) || ( index >= MAX_KEYS )) {
-               index = lp->TransmitKeyID - 1;
-       }
-
-       erq->flags |= index + 1;
-
-       /* Copy the key to the user buffer */
-       erq->length = lp->DefaultKeys.key[index].len;
-
-       memcpy(key, lp->DefaultKeys.key[index].key, erq->length);
-
-out_unlock:
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_encode
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_nickname()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Sets the nickname, or station name, of the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_nickname(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *nickname)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-#if 0 //;? Needed, was present in original code but not in 7.18 Linux 2.6 kernel version
-       if( !capable(CAP_NET_ADMIN )) {
-               ret = -EPERM;
-               return ret;
-       }
-#endif
-
-       /* Validate the new value */
-       if(data->length > HCF_MAX_NAME_LEN) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       memset( lp->StationName, 0, sizeof( lp->StationName ));
-
-       memcpy( lp->StationName, nickname, data->length );
-
-       /* Commit the adapter parameters */
-       wl_apply( lp );
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_nickname
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_nickname()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Gets the nickname, or station name, of the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_nickname(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *nickname)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int         ret = 0;
-       int         status = -1;
-       wvName_t    *pName;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Get the current station name */
-       lp->ltvRecord.len = 1 + ( sizeof( *pName ) / sizeof( hcf_16 ));
-       lp->ltvRecord.typ = CFG_CNF_OWN_NAME;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-       if( status == HCF_SUCCESS ) {
-               pName = (wvName_t *)&( lp->ltvRecord.u.u32 );
-
-               /* Endian translate the length */
-               pName->length = CNV_LITTLE_TO_INT( pName->length );
-
-               if ( pName->length > IW_ESSID_MAX_SIZE ) {
-                       ret = -EFAULT;
-               } else {
-                       /* Copy the information into the user buffer */
-                       data->length = pName->length;
-                       memcpy(nickname, pName->name, pName->length);
-               }
-       } else {
-               ret = -EFAULT;
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_nickname
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_porttype()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Sets the port type of the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_porttype(struct net_device *dev, struct iw_request_info *info, __u32 *mode, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-       hcf_16  portType;
-       hcf_16  createIBSS;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Validate the new value */
-       switch( *mode ) {
-       case IW_MODE_ADHOC:
-
-               /* When user requests ad-hoc, set IBSS mode! */
-               portType         = 1;
-               createIBSS       = 1;
-
-               lp->DownloadFirmware = WVLAN_DRV_MODE_STA; //1;
-
-               break;
-
-
-       case IW_MODE_AUTO:
-       case IW_MODE_INFRA:
-
-               /* Both automatic and infrastructure set port to BSS/STA mode */
-               portType         = 1;
-               createIBSS       = 0;
-
-               lp->DownloadFirmware = WVLAN_DRV_MODE_STA; //1;
-
-               break;
-
-
-#if 0 //;? (HCF_TYPE) & HCF_TYPE_AP
-
-       case IW_MODE_MASTER:
-
-               /* Set BSS/AP mode */
-               portType             = 1;
-
-               lp->CreateIBSS       = 0;
-               lp->DownloadFirmware = WVLAN_DRV_MODE_AP; //2;
-
-               break;
-
-#endif /* (HCF_TYPE) & HCF_TYPE_AP */
-
-
-       default:
-
-               portType   = 0;
-               createIBSS = 0;
-               ret = -EINVAL;
-       }
-
-       if( portType != 0 ) {
-               /* Only do something if there is a mode change */
-               if( ( lp->PortType != portType ) || (lp->CreateIBSS != createIBSS)) {
-                       lp->PortType   = portType;
-                       lp->CreateIBSS = createIBSS;
-
-                       /* Commit the adapter parameters */
-                       wl_go( lp );
-
-                       /* Send an event that mode has been set */
-                       wl_wext_event_mode( lp->dev );
-               }
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_porttype
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_porttype()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Gets the port type of the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_porttype(struct net_device *dev, struct iw_request_info *info, __u32 *mode, char *extra)
-
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int     ret = 0;
-       int     status = -1;
-       hcf_16  *pPortType;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Get the current port type */
-       lp->ltvRecord.len = 1 + ( sizeof( *pPortType ) / sizeof( hcf_16 ));
-       lp->ltvRecord.typ = CFG_CNF_PORT_TYPE;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-       if( status == HCF_SUCCESS ) {
-               pPortType = (hcf_16 *)&( lp->ltvRecord.u.u32 );
-
-               *pPortType = CNV_LITTLE_TO_INT( *pPortType );
-
-               switch( *pPortType ) {
-               case 1:
-
-#if 0
-#if (HCF_TYPE) & HCF_TYPE_AP
-
-                       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-                               *mode = IW_MODE_MASTER;
-                       } else {
-                               *mode = IW_MODE_INFRA;
-                       }
-
-#else
-
-                       *mode = IW_MODE_INFRA;
-
-#endif  /* (HCF_TYPE) & HCF_TYPE_AP */
-#endif
-
-                       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-                               *mode =  IW_MODE_MASTER;
-                       } else {
-                               if( lp->CreateIBSS ) {
-                                       *mode = IW_MODE_ADHOC;
-                               } else {
-                                       *mode = IW_MODE_INFRA;
-                               }
-                       }
-
-                       break;
-
-
-               case 3:
-                       *mode = IW_MODE_ADHOC;
-                       break;
-
-               default:
-                       ret = -EFAULT;
-                       break;
-               }
-       } else {
-               ret = -EFAULT;
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_porttype
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_power()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Sets the power management settings of the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_power(struct net_device *dev, struct iw_request_info *info, struct iw_param *wrq, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       DBG_PRINT( "THIS CORRUPTS PMEnabled ;?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" );
-
-#if 0 //;? Needed, was present in original code but not in 7.18 Linux 2.6 kernel version
-       if( !capable( CAP_NET_ADMIN )) {
-               ret = -EPERM;
-               return ret;
-       }
-#endif
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Set the power management state based on the 'disabled' value */
-       if( wrq->disabled ) {
-               lp->PMEnabled = 0;
-       } else {
-               lp->PMEnabled = 1;
-       }
-
-       /* Commit the adapter parameters */
-       wl_apply( lp );
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_power
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_power()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Gets the power management settings of the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_power(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra)
-
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       DBG_PRINT( "THIS IS PROBABLY AN OVER-SIMPLIFICATION ;?!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n" );
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       rrq->flags = 0;
-       rrq->value = 0;
-
-       if( lp->PMEnabled ) {
-               rrq->disabled = 0;
-       } else {
-               rrq->disabled = 1;
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_power
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_tx_power()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Gets the transmit power of the wireless device's radio.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_tx_power(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-#ifdef USE_POWER_DBM
-       rrq->value = RADIO_TX_POWER_DBM;
-       rrq->flags = IW_TXPOW_DBM;
-#else
-       rrq->value = RADIO_TX_POWER_MWATT;
-       rrq->flags = IW_TXPOW_MWATT;
-#endif
-       rrq->fixed = 1;
-       rrq->disabled = 0;
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_tx_power
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_set_rts_threshold()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Sets the RTS threshold for the wireless card.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_rts_threshold (struct net_device *dev, struct iw_request_info *info, struct iw_param *rts, char *extra)
-{
-       int ret = 0;
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int rthr = rts->value;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if(rts->fixed == 0) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       if( rts->disabled ) {
-               rthr = 2347;
-       }
-
-       if(( rthr < 256 ) || ( rthr > 2347 )) {
-               ret = -EINVAL;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       lp->RTSThreshold = rthr;
-
-       wl_apply( lp );
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_rts_threshold
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_rts_threshold()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *     Gets the RTS threshold for the wireless card.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_rts_threshold (struct net_device *dev, struct iw_request_info *info, struct iw_param *rts, char *extra)
-{
-       int ret = 0;
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       rts->value = lp->RTSThreshold;
-
-       rts->disabled = ( rts->value == 2347 );
-
-       rts->fixed = 1;
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_rts_threshold
-/*============================================================================*/
-
-
-
-
-
-/*******************************************************************************
- *     wireless_set_rate()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Set the default data rate setting used by the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_rate(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret = 0;
-#ifdef WARP
-       int status = -1;
-       int index = 0;
-#endif  // WARP
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-#ifdef WARP
-
-       /* Determine if the card is operating in the 2.4 or 5.0 GHz band; check
-          if Bit 9 is set in the current channel RID */
-       lp->ltvRecord.len = 2;
-       lp->ltvRecord.typ = CFG_CUR_CHANNEL;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-       if( status == HCF_SUCCESS ) {
-               index = ( CNV_LITTLE_TO_INT( lp->ltvRecord.u.u16[0] ) & 0x100 ) ? 1 : 0;
-
-               DBG_PRINT( "Index: %d\n", index );
-       } else {
-               DBG_ERROR( DbgInfo, "Could not determine radio frequency\n" );
-               ret = -EINVAL;
-               goto out_unlock;
-       }
-
-       if( rrq->value > 0 &&
-               rrq->value <= 1 * MEGABIT ) {
-               lp->TxRateControl[index] = 0x0001;
-       }
-       else if( rrq->value > 1 * MEGABIT &&
-                       rrq->value <= 2 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0002;
-               } else {
-                       lp->TxRateControl[index] = 0x0003;
-               }
-       }
-       else if( rrq->value > 2 * MEGABIT &&
-                       rrq->value <= 5 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0004;
-               } else {
-                       lp->TxRateControl[index] = 0x0007;
-               }
-       }
-       else if( rrq->value > 5 * MEGABIT &&
-                       rrq->value <= 6 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0010;
-               } else {
-                       lp->TxRateControl[index] = 0x0017;
-               }
-       }
-       else if( rrq->value > 6 * MEGABIT &&
-                       rrq->value <= 9 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0020;
-               } else {
-                       lp->TxRateControl[index] = 0x0037;
-               }
-       }
-       else if( rrq->value > 9 * MEGABIT &&
-                       rrq->value <= 11 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0008;
-               } else {
-                       lp->TxRateControl[index] = 0x003F;
-               }
-       }
-       else if( rrq->value > 11 * MEGABIT &&
-                       rrq->value <= 12 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0040;
-               } else {
-                       lp->TxRateControl[index] = 0x007F;
-               }
-       }
-       else if( rrq->value > 12 * MEGABIT &&
-                       rrq->value <= 18 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0080;
-               } else {
-                       lp->TxRateControl[index] = 0x00FF;
-               }
-       }
-       else if( rrq->value > 18 * MEGABIT &&
-                       rrq->value <= 24 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0100;
-               } else {
-                       lp->TxRateControl[index] = 0x01FF;
-               }
-       }
-       else if( rrq->value > 24 * MEGABIT &&
-                       rrq->value <= 36 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0200;
-               } else {
-                       lp->TxRateControl[index] = 0x03FF;
-               }
-       }
-       else if( rrq->value > 36 * MEGABIT &&
-                       rrq->value <= 48 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0400;
-               } else {
-                       lp->TxRateControl[index] = 0x07FF;
-               }
-       }
-       else if( rrq->value > 48 * MEGABIT &&
-                       rrq->value <= 54 * MEGABIT ) {
-               if( rrq->fixed == 1 ) {
-                       lp->TxRateControl[index] = 0x0800;
-               } else {
-                       lp->TxRateControl[index] = 0x0FFF;
-               }
-       }
-       else if( rrq->fixed == 0 ) {
-               /* In this case, the user has not specified a bitrate, only the "auto"
-                  moniker. So, set to all supported rates */
-               lp->TxRateControl[index] = PARM_MAX_TX_RATE;
-       } else {
-               rrq->value = 0;
-               ret = -EINVAL;
-               goto out_unlock;
-       }
-
-
-#else
-
-       if( rrq->value > 0 &&
-                       rrq->value <= 1 * MEGABIT ) {
-               lp->TxRateControl[0] = 1;
-       }
-       else if( rrq->value > 1 * MEGABIT &&
-                       rrq->value <= 2 * MEGABIT ) {
-               if( rrq->fixed ) {
-                       lp->TxRateControl[0] = 2;
-               } else {
-                       lp->TxRateControl[0] = 6;
-               }
-       }
-       else if( rrq->value > 2 * MEGABIT &&
-                       rrq->value <= 5 * MEGABIT ) {
-               if( rrq->fixed ) {
-                       lp->TxRateControl[0] = 4;
-               } else {
-                       lp->TxRateControl[0] = 7;
-               }
-       }
-       else if( rrq->value > 5 * MEGABIT &&
-                       rrq->value <= 11 * MEGABIT ) {
-               if( rrq->fixed)  {
-                       lp->TxRateControl[0] = 5;
-               } else {
-                       lp->TxRateControl[0] = 3;
-               }
-       }
-       else if( rrq->fixed == 0 ) {
-               /* In this case, the user has not specified a bitrate, only the "auto"
-                  moniker. So, set the rate to 11Mb auto */
-               lp->TxRateControl[0] = 3;
-       } else {
-               rrq->value = 0;
-               ret = -EINVAL;
-               goto out_unlock;
-       }
-
-#endif  // WARP
-
-
-       /* Commit the adapter parameters */
-       wl_apply( lp );
-
-out_unlock:
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_rate
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_rate()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Get the default data rate setting used by the wireless device.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_rate(struct net_device *dev, struct iw_request_info *info, struct iw_param *rrq, char *extra)
-
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int     ret = 0;
-       int     status = -1;
-       hcf_16  txRate;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* Get the current transmit rate from the adapter */
-       lp->ltvRecord.len = 1 + ( sizeof(txRate)/sizeof(hcf_16));
-       lp->ltvRecord.typ = CFG_CUR_TX_RATE;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-       if( status == HCF_SUCCESS ) {
-#ifdef WARP
-
-               txRate = CNV_LITTLE_TO_INT( lp->ltvRecord.u.u16[0] );
-
-               if( txRate & 0x0001 ) {
-                       txRate = 1;
-               }
-               else if( txRate & 0x0002 ) {
-                       txRate = 2;
-               }
-               else if( txRate & 0x0004 ) {
-                       txRate = 5;
-               }
-               else if( txRate & 0x0008 ) {
-                       txRate = 11;
-               }
-               else if( txRate & 0x00010 ) {
-                       txRate = 6;
-               }
-               else if( txRate & 0x00020 ) {
-                       txRate = 9;
-               }
-               else if( txRate & 0x00040 ) {
-                       txRate = 12;
-               }
-               else if( txRate & 0x00080 ) {
-                       txRate = 18;
-               }
-               else if( txRate & 0x00100 ) {
-                       txRate = 24;
-               }
-               else if( txRate & 0x00200 ) {
-                       txRate = 36;
-               }
-               else if( txRate & 0x00400 ) {
-                       txRate = 48;
-               }
-               else if( txRate & 0x00800 ) {
-                       txRate = 54;
-               }
-
-#else
-
-               txRate = (hcf_16)CNV_LITTLE_TO_LONG( lp->ltvRecord.u.u32[0] );
-
-#endif  // WARP
-
-               rrq->value = txRate * MEGABIT;
-       } else {
-               rrq->value = 0;
-               ret = -EFAULT;
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_rate
-/*============================================================================*/
-
-
-
-
-#if 0 //;? Not used anymore
-/*******************************************************************************
- *     wireless_get_private_interface()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Returns the Linux Wireless Extensions' compatible private interface of
- *  the driver.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-int wireless_get_private_interface( struct iwreq *wrq, struct wl_private *lp )
-{
-       int ret = 0;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if( wrq->u.data.pointer != NULL ) {
-               struct iw_priv_args priv[] =
-               {
-                       { SIOCSIWNETNAME, IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN, 0, "snetwork_name" },
-                       { SIOCGIWNETNAME, 0, IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN, "gnetwork_name" },
-                       { SIOCSIWSTANAME, IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN, 0, "sstation_name" },
-                       { SIOCGIWSTANAME, 0, IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN, "gstation_name" },
-                       { SIOCSIWPORTTYPE, IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, 0, "sport_type" },
-                       { SIOCGIWPORTTYPE, 0, IW_PRIV_TYPE_BYTE | IW_PRIV_SIZE_FIXED | 1, "gport_type" },
-               };
-
-               /* Verify the user buffer */
-               ret = verify_area( VERIFY_WRITE, wrq->u.data.pointer, sizeof( priv ));
-
-               if( ret != 0 )
-                       return ret;
-
-               /* Copy the data into the user's buffer */
-               wrq->u.data.length = NELEM( priv );
-               copy_to_user( wrq->u.data.pointer, &priv, sizeof( priv ));
-       }
-
-out:
-       return ret;
-} // wireless_get_private_interface
-/*============================================================================*/
-#endif
-
-
-
-/*******************************************************************************
- *     wireless_set_scan()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Instructs the driver to initiate a network scan.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_set_scan(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int                 ret = 0;
-       int                 status = -1;
-       int                 retries = 0;
-
-       //;? Note: shows results as trace, returns always 0 unless BUSY
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /*
-         * This looks like a nice place to test if the HCF is still
-         * communicating with the card. It seems that sometimes BAP_1
-         * gets corrupted. By looking at the comments in HCF the
-         * cause is still a mystery. Okay, the communication to the
-         * card is dead, reset the card to revive.
-         */
-       if((lp->hcfCtx.IFB_CardStat & CARD_STAT_DEFUNCT) != 0)
-       {
-               DBG_TRACE( DbgInfo, "CARD is in DEFUNCT mode, reset it to bring it back to life\n" );
-               wl_reset( dev );
-       }
-
-retry:
-       /* Set the completion state to FALSE */
-       lp->probe_results.scan_complete = FALSE;
-
-
-       /* Channels to scan */
-#ifdef WARP
-       lp->ltvRecord.len       = 5;
-       lp->ltvRecord.typ       = CFG_SCAN_CHANNEL;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0x3FFF );  // 2.4 GHz Band
-       lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( 0xFFFF );  // 5.0 GHz Band
-       lp->ltvRecord.u.u16[2]  = CNV_INT_TO_LITTLE( 0xFFFF );  //      ..
-       lp->ltvRecord.u.u16[3]  = CNV_INT_TO_LITTLE( 0x0007 );  //      ..
-#else
-       lp->ltvRecord.len       = 2;
-       lp->ltvRecord.typ       = CFG_SCAN_CHANNEL;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0x7FFF );
-#endif  // WARP
-
-       status = hcf_put_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-       DBG_TRACE( DbgInfo, "CFG_SCAN_CHANNEL result      : 0x%x\n", status );
-
-       // Holding the lock too long, makes a gap to allow other processes
-       wl_unlock(lp, &flags);
-       wl_lock( lp, &flags );
-
-       if( status != HCF_SUCCESS ) {
-               //Recovery
-               retries++;
-               if(retries <= 10) {
-                       DBG_TRACE( DbgInfo, "Reset card to recover, attempt: %d\n", retries );
-                       wl_reset( dev );
-
-                       // Holding the lock too long, makes a gap to allow other processes
-                       wl_unlock(lp, &flags);
-                       wl_lock( lp, &flags );
-
-                       goto retry;
-               }
-       }
-
-       /* Set the SCAN_SSID to "ANY". Using this RID for scan prevents the need to
-          disassociate from the network we are currently on */
-       lp->ltvRecord.len       = 18;
-       lp->ltvRecord.typ       = CFG_SCAN_SSID;
-       lp->ltvRecord.u.u16[0]  = CNV_INT_TO_LITTLE( 0 );
-       lp->ltvRecord.u.u16[1]  = CNV_INT_TO_LITTLE( 0 );
-
-       status = hcf_put_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-       // Holding the lock too long, makes a gap to allow other processes
-       wl_unlock(lp, &flags);
-       wl_lock( lp, &flags );
-
-       DBG_TRACE( DbgInfo, "CFG_SCAN_SSID to 'any' status: 0x%x\n", status );
-
-       /* Initiate the scan */
-       /* NOTE: Using HCF_ACT_SCAN has been removed, as using HCF_ACT_ACS_SCAN to
-          retrieve probe response must always be used to support WPA */
-       status = hcf_action( &( lp->hcfCtx ), HCF_ACT_ACS_SCAN );
-
-       if( status == HCF_SUCCESS ) {
-               DBG_TRACE( DbgInfo, "SUCCESSFULLY INITIATED SCAN...\n" );
-       } else {
-               DBG_TRACE( DbgInfo, "INITIATE SCAN FAILED...\n" );
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_scan
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wireless_get_scan()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Instructs the driver to gather and return the results of a network scan.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-static int wireless_get_scan(struct net_device *dev, struct iw_request_info *info, struct iw_point *data, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int                 ret = 0;
-       int                 count;
-       char                *buf;
-       char                *buf_end;
-       struct iw_event     iwe;
-       PROBE_RESP          *probe_resp;
-       hcf_8               msg[512];
-       hcf_8               *wpa_ie;
-       hcf_16              wpa_ie_len;
-
-       if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       /* If the scan is not done, tell the calling process to try again later */
-       if( !lp->probe_results.scan_complete ) {
-               ret = -EAGAIN;
-               goto out_unlock;
-       }
-
-       DBG_TRACE( DbgInfo, "SCAN COMPLETE, Num of APs: %d\n",
-                          lp->probe_results.num_aps );
-
-       buf     = extra;
-       buf_end = extra + IW_SCAN_MAX_DATA;
-
-       for( count = 0; count < lp->probe_results.num_aps; count++ ) {
-               /* Reference the probe response from the table */
-               probe_resp = (PROBE_RESP *)&lp->probe_results.ProbeTable[count];
-
-
-               /* First entry MUST be the MAC address */
-               memset( &iwe, 0, sizeof( iwe ));
-
-               iwe.cmd                 = SIOCGIWAP;
-               iwe.u.ap_addr.sa_family = ARPHRD_ETHER;
-               memcpy( iwe.u.ap_addr.sa_data, probe_resp->BSSID, ETH_ALEN);
-               iwe.len                 = IW_EV_ADDR_LEN;
-
-               buf = iwe_stream_add_event(info, buf, buf_end,
-                                          &iwe, IW_EV_ADDR_LEN);
-
-               /* Use the mode to indicate if it's a station or AP */
-               /* Won't always be an AP if in IBSS mode */
-               memset( &iwe, 0, sizeof( iwe ));
-
-               iwe.cmd = SIOCGIWMODE;
-
-               if( probe_resp->capability & CAPABILITY_IBSS ) {
-                       iwe.u.mode = IW_MODE_INFRA;
-               } else {
-                       iwe.u.mode = IW_MODE_MASTER;
-               }
-
-               iwe.len = IW_EV_UINT_LEN;
-
-               buf = iwe_stream_add_event(info, buf, buf_end,
-                                          &iwe, IW_EV_UINT_LEN);
-
-               /* Any quality information */
-               memset(&iwe, 0, sizeof(iwe));
-
-               iwe.cmd             = IWEVQUAL;
-               iwe.u.qual.level    = dbm(probe_resp->signal);
-               iwe.u.qual.noise    = dbm(probe_resp->silence);
-               iwe.u.qual.qual     = iwe.u.qual.level - iwe.u.qual.noise;
-               iwe.u.qual.updated  = lp->probe_results.scan_complete | IW_QUAL_DBM;
-               iwe.len             = IW_EV_QUAL_LEN;
-
-               buf = iwe_stream_add_event(info, buf, buf_end,
-                                          &iwe, IW_EV_QUAL_LEN);
-
-
-               /* ESSID information */
-               if( probe_resp->rawData[1] > 0 ) {
-                       memset( &iwe, 0, sizeof( iwe ));
-
-                       iwe.cmd = SIOCGIWESSID;
-                       iwe.u.data.length = probe_resp->rawData[1];
-                       iwe.u.data.flags = 1;
-
-                       buf = iwe_stream_add_point(info, buf, buf_end,
-                                              &iwe, &probe_resp->rawData[2]);
-               }
-
-
-               /* Encryption Information */
-               memset( &iwe, 0, sizeof( iwe ));
-
-               iwe.cmd             = SIOCGIWENCODE;
-               iwe.u.data.length   = 0;
-
-               /* Check the capabilities field of the Probe Response to see if
-                  'privacy' is supported on the AP in question */
-               if( probe_resp->capability & CAPABILITY_PRIVACY ) {
-                       iwe.u.data.flags |= IW_ENCODE_ENABLED;
-               } else {
-                       iwe.u.data.flags |= IW_ENCODE_DISABLED;
-               }
-
-               buf = iwe_stream_add_point(info, buf, buf_end, &iwe, NULL);
-
-
-               /* Frequency Info */
-               memset( &iwe, 0, sizeof( iwe ));
-
-               iwe.cmd = SIOCGIWFREQ;
-               iwe.len = IW_EV_FREQ_LEN;
-               iwe.u.freq.m = wl_parse_ds_ie( probe_resp );
-               iwe.u.freq.e = 0;
-
-               buf = iwe_stream_add_event(info, buf, buf_end,
-                                          &iwe, IW_EV_FREQ_LEN);
-
-
-               /* Custom info (Beacon Interval) */
-               memset( &iwe, 0, sizeof( iwe ));
-               memset( msg, 0, sizeof( msg ));
-
-               iwe.cmd = IWEVCUSTOM;
-               sprintf( msg, "beacon_interval=%d", probe_resp->beaconInterval );
-               iwe.u.data.length = strlen( msg );
-
-               buf = iwe_stream_add_point(info, buf, buf_end, &iwe, msg);
-
-
-               /* WPA-IE */
-               wpa_ie = NULL;
-               wpa_ie_len = 0;
-
-               wpa_ie = wl_parse_wpa_ie( probe_resp, &wpa_ie_len );
-               if( wpa_ie != NULL ) {
-                       memset(&iwe, 0, sizeof(iwe));
-
-                       iwe.cmd = IWEVGENIE;
-                       iwe.u.data.length = wpa_ie_len;
-
-                       buf = iwe_stream_add_point(info, buf, buf_end,
-                                                  &iwe, wpa_ie);
-               }
-
-               /* Add other custom info in formatted string format as needed... */
-       }
-
-       data->length = buf - extra;
-
-out_unlock:
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_get_scan
-/*============================================================================*/
-
-#if DBG
-static const char * const auth_names[] = {
-       "IW_AUTH_WPA_VERSION",
-       "IW_AUTH_CIPHER_PAIRWISE",
-       "IW_AUTH_CIPHER_GROUP",
-       "IW_AUTH_KEY_MGMT",
-       "IW_AUTH_TKIP_COUNTERMEASURES",
-       "IW_AUTH_DROP_UNENCRYPTED",
-       "IW_AUTH_80211_AUTH_ALG",
-       "IW_AUTH_WPA_ENABLED",
-       "IW_AUTH_RX_UNENCRYPTED_EAPOL",
-       "IW_AUTH_ROAMING_CONTROL",
-       "IW_AUTH_PRIVACY_INVOKED",
-       "IW_AUTH_CIPHER_GROUP_MGMT",
-       "IW_AUTH_MFP",
-       "Unsupported"
-};
-#endif
-
-static int wireless_set_auth(struct net_device *dev,
-                         struct iw_request_info *info,
-                         struct iw_param *data, char *extra)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       ltv_t ltv;
-       int ret;
-       int iwa_idx = data->flags & IW_AUTH_INDEX;
-       int iwa_val = data->value;
-
-       if (lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-       if (iwa_idx > IW_AUTH_MFP)
-               iwa_idx = IW_AUTH_MFP + 1;
-       DBG_TRACE(DbgInfo, "%s\n", auth_names[iwa_idx]);
-       switch (iwa_idx) {
-       case IW_AUTH_WPA_VERSION:
-               /* We do support WPA */
-               if ((iwa_val == IW_AUTH_WPA_VERSION_WPA) ||
-                   (iwa_val == IW_AUTH_WPA_VERSION_DISABLED))
-                       ret = 0;
-               else
-                       ret = -EINVAL;
-               break;
-
-       case IW_AUTH_WPA_ENABLED:
-               DBG_TRACE(DbgInfo, "val = %d\n", iwa_val);
-               if (iwa_val)
-                       lp->EnableEncryption = 2;
-               else
-                       lp->EnableEncryption = 0;
-
-               /* Write straight to the card */
-               ltv.len = 2;
-               ltv.typ = CFG_CNF_ENCRYPTION;
-               ltv.u.u16[0] = cpu_to_le16(lp->EnableEncryption);
-               ret = hcf_put_info(&lp->hcfCtx, (LTVP)&ltv);
-
-               break;
-
-       case IW_AUTH_TKIP_COUNTERMEASURES:
-
-               /* Immediately disable card */
-               lp->driverEnable = !iwa_val;
-               if (lp->driverEnable)
-                       hcf_cntl(&(lp->hcfCtx), HCF_CNTL_ENABLE | HCF_PORT_0);
-               else
-                       hcf_cntl(&(lp->hcfCtx), HCF_CNTL_DISABLE | HCF_PORT_0);
-               ret = 0;
-               break;
-
-       case IW_AUTH_MFP:
-               /* Management Frame Protection not supported.
-                * Only fail if set to required.
-                */
-               if (iwa_val == IW_AUTH_MFP_REQUIRED)
-                       ret = -EINVAL;
-               else
-                       ret = 0;
-               break;
-
-       case IW_AUTH_KEY_MGMT:
-
-               /* Record required management suite.
-                * Will take effect on next commit */
-               if (iwa_val != 0)
-                       lp->AuthKeyMgmtSuite = 4;
-               else
-                       lp->AuthKeyMgmtSuite = 0;
-
-               ret = -EINPROGRESS;
-               break;
-
-       case IW_AUTH_80211_AUTH_ALG:
-
-               /* Just record whether open or shared is required.
-                * Will take effect on next commit */
-               ret = -EINPROGRESS;
-
-               if (iwa_val & IW_AUTH_ALG_SHARED_KEY)
-                       lp->authentication = 1;
-               else if (iwa_val & IW_AUTH_ALG_OPEN_SYSTEM)
-                       lp->authentication = 0;
-               else
-                       ret = -EINVAL;
-               break;
-
-       case IW_AUTH_DROP_UNENCRYPTED:
-               /* Only needed for AP */
-               lp->ExcludeUnencrypted = iwa_val;
-               ret = -EINPROGRESS;
-               break;
-
-       case IW_AUTH_CIPHER_PAIRWISE:
-       case IW_AUTH_CIPHER_GROUP:
-       case IW_AUTH_RX_UNENCRYPTED_EAPOL:
-       case IW_AUTH_ROAMING_CONTROL:
-       case IW_AUTH_PRIVACY_INVOKED:
-               /* Not used. May need to do something with
-                * CIPHER_PAIRWISE and CIPHER_GROUP*/
-               ret = -EINPROGRESS;
-               break;
-
-       default:
-               DBG_TRACE(DbgInfo, "IW_AUTH_?? (%d) unknown\n", iwa_idx);
-               /* return an error */
-               ret = -EOPNOTSUPP;
-               break;
-       }
-
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-} // wireless_set_auth
-/*============================================================================*/
-
-
-static void flush_tx(struct wl_private *lp)
-{
-       ltv_t ltv;
-       int count;
-
-       /*
-        * Make sure that there is no data queued up in the firmware
-        * before setting the TKIP keys. If this check is not
-        * performed, some data may be sent out with incorrect MIC
-        * and cause synchronization errors with the AP
-        */
-       /* Check every 1ms for 100ms */
-       for (count = 0; count < 100; count++) {
-               udelay(1000);
-
-               ltv.len = 2;
-               ltv.typ = 0xFD91;  /* This RID not defined in HCF yet!!! */
-               ltv.u.u16[0] = 0;
-
-               hcf_get_info(&(lp->hcfCtx), (LTVP)&ltv);
-
-               if (ltv.u.u16[0] == 0)
-                       break;
-       }
-
-       if (count >= 100)
-               DBG_TRACE(DbgInfo, "Timed out waiting for TxQ flush!\n");
-
-}
-
-static int wireless_set_encodeext(struct net_device *dev,
-                                 struct iw_request_info *info,
-                                 struct iw_point *erq, char *keybuf)
-{
-       struct wl_private *lp = wl_priv(dev);
-       unsigned long flags;
-       int ret;
-       int key_idx = (erq->flags & IW_ENCODE_INDEX) - 1;
-       ltv_t ltv;
-       struct iw_encode_ext *ext = (struct iw_encode_ext *)keybuf;
-       bool enable = true;
-       bool set_tx = false;
-
-       if (lp->portState == WVLAN_PORT_STATE_DISABLED) {
-               ret = -EBUSY;
-               goto out;
-       }
-
-       if (erq->flags & IW_ENCODE_DISABLED) {
-               ext->alg = IW_ENCODE_ALG_NONE;
-               enable = false;
-       }
-
-       if (ext->ext_flags & IW_ENCODE_EXT_SET_TX_KEY)
-               set_tx = true;
-
-       wl_lock(lp, &flags);
-
-       wl_act_int_off(lp);
-
-       memset(&ltv, 0, sizeof(ltv));
-
-       switch (ext->alg) {
-       case IW_ENCODE_ALG_TKIP:
-               DBG_TRACE(DbgInfo, "IW_ENCODE_ALG_TKIP: key(%d)\n", key_idx);
-
-               if (sizeof(ext->rx_seq) != 8) {
-                       DBG_TRACE(DbgInfo, "rx_seq size mismatch\n");
-                       ret = -EINVAL;
-                       goto out_unlock;
-               }
-
-               ret = hermes_set_tkip_keys(&ltv, key_idx, ext->addr.sa_data,
-                                          set_tx,
-                                          ext->rx_seq, ext->key, ext->key_len);
-
-               if (ret != 0) {
-                       DBG_TRACE(DbgInfo, "hermes_set_tkip_keys returned != 0, key not set\n");
-                       goto out_unlock;
-               }
-
-               flush_tx(lp);
-
-               lp->wext_enc = IW_ENCODE_ALG_TKIP;
-
-               /* Write the key */
-               ret = hcf_put_info(&(lp->hcfCtx), (LTVP)&ltv);
-               break;
-
-       case IW_ENCODE_ALG_WEP:
-               DBG_TRACE(DbgInfo, "IW_ENCODE_ALG_WEP: key(%d)\n", key_idx);
-
-               if (erq->flags & IW_ENCODE_RESTRICTED) {
-                       DBG_WARNING(DbgInfo, "IW_ENCODE_RESTRICTED invalid\n");
-                       ret = -EINVAL;
-                       goto out_unlock;
-               }
-
-               ret = hermes_set_wep_keys(lp, key_idx, ext->key, ext->key_len,
-                                         enable, set_tx);
-
-               break;
-
-       case IW_ENCODE_ALG_CCMP:
-               DBG_TRACE(DbgInfo, "IW_ENCODE_ALG_CCMP: key(%d)\n", key_idx);
-               ret = -EOPNOTSUPP;
-               break;
-
-       case IW_ENCODE_ALG_NONE:
-               DBG_TRACE(DbgInfo, "IW_ENCODE_ALG_NONE: key(%d)\n", key_idx);
-
-               if (lp->wext_enc == IW_ENCODE_ALG_TKIP) {
-                       ret = hermes_clear_tkip_keys(&ltv, key_idx,
-                                                    ext->addr.sa_data);
-                       flush_tx(lp);
-                       lp->wext_enc = IW_ENCODE_ALG_NONE;
-                       ret = hcf_put_info(&(lp->hcfCtx), (LTVP)&ltv);
-
-               } else if (lp->wext_enc == IW_ENCODE_ALG_WEP) {
-                       ret = hermes_set_wep_keys(lp, key_idx,
-                                                 ext->key, ext->key_len,
-                                                 false, false);
-               } else {
-                       ret = 0;
-               }
-
-               break;
-
-       default:
-               DBG_TRACE( DbgInfo, "IW_ENCODE_??: key(%d)\n", key_idx);
-               ret = -EOPNOTSUPP;
-               break;
-       }
-
-out_unlock:
-
-       wl_act_int_on(lp);
-
-       wl_unlock(lp, &flags);
-
-out:
-       return ret;
-}
-/*============================================================================*/
-
-
-
-static int wireless_set_genie(struct net_device *dev,
-                             struct iw_request_info *info,
-                             struct iw_point *data, char *extra)
-
-{
-       /* We can't write this to the card, but apparently this
-        * operation needs to succeed */
-
-       return 0;
-}
-/*============================================================================*/
-
-
-/*******************************************************************************
- *     wl_wireless_stats()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Return the current device wireless statistics.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-struct iw_statistics * wl_wireless_stats( struct net_device *dev )
-{
-       struct iw_statistics    *pStats;
-       struct wl_private       *lp = wl_priv(dev);
-
-       DBG_PARAM(DbgInfo, "dev", "%s (0x%p)", dev->name, dev);
-
-       pStats = NULL;
-
-       /* Initialize the statistics */
-       pStats                  = &( lp->wstats );
-       pStats->qual.updated    = 0x00;
-
-       if( !( lp->flags & WVLAN2_UIL_BUSY ))
-       {
-               CFG_COMMS_QUALITY_STRCT *pQual;
-               CFG_HERMES_TALLIES_STRCT tallies;
-               int                         status;
-
-               /* Update driver status */
-               pStats->status = 0;
-
-               /* Get the current link quality information */
-               lp->ltvRecord.len = 1 + ( sizeof( *pQual ) / sizeof( hcf_16 ));
-               lp->ltvRecord.typ = CFG_COMMS_QUALITY;
-               status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-
-               if( status == HCF_SUCCESS ) {
-                       pQual = (CFG_COMMS_QUALITY_STRCT *)&( lp->ltvRecord );
-
-                       pStats->qual.qual  = (u_char) CNV_LITTLE_TO_INT( pQual->coms_qual );
-                       pStats->qual.level = (u_char) dbm( CNV_LITTLE_TO_INT( pQual->signal_lvl ));
-                       pStats->qual.noise = (u_char) dbm( CNV_LITTLE_TO_INT( pQual->noise_lvl ));
-
-                       pStats->qual.updated |= (IW_QUAL_QUAL_UPDATED  |
-                                                 IW_QUAL_LEVEL_UPDATED |
-                                                 IW_QUAL_NOISE_UPDATED |
-                                                 IW_QUAL_DBM);
-               } else {
-                       memset( &( pStats->qual ), 0, sizeof( pStats->qual ));
-               }
-
-               /* Get the current tallies from the adapter */
-                /* Only possible when the device is open */
-               if(lp->portState == WVLAN_PORT_STATE_DISABLED) {
-                       if( wl_get_tallies( lp, &tallies ) == 0 ) {
-                               /* No endian translation is needed here, as CFG_TALLIES is an
-                                  MSF RID; all processing is done on the host, not the card! */
-                               pStats->discard.nwid = 0L;
-                               pStats->discard.code = tallies.RxWEPUndecryptable;
-                               pStats->discard.misc = tallies.TxDiscards +
-                                                      tallies.RxFCSErrors +
-                                                      //tallies.RxDiscardsNoBuffer +
-                                                      tallies.TxDiscardsWrongSA;
-                               //;? Extra taken over from Linux driver based on 7.18 version
-                               pStats->discard.retries = tallies.TxRetryLimitExceeded;
-                               pStats->discard.fragment = tallies.RxMsgInBadMsgFragments;
-                       } else {
-                               memset( &( pStats->discard ), 0, sizeof( pStats->discard ));
-                       }
-               } else {
-                       memset( &( pStats->discard ), 0, sizeof( pStats->discard ));
-               }
-       }
-
-       return pStats;
-} // wl_wireless_stats
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_get_wireless_stats()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Return the current device wireless statistics. This function calls
- *      wl_wireless_stats, but acquires spinlocks first as it can be called
- *      directly by the network layer.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-struct iw_statistics * wl_get_wireless_stats( struct net_device *dev )
-{
-       unsigned long           flags;
-       struct wl_private       *lp = wl_priv(dev);
-       struct iw_statistics    *pStats = NULL;
-
-       wl_lock( lp, &flags );
-
-       wl_act_int_off( lp );
-
-#ifdef USE_RTS
-       if( lp->useRTS == 1 ) {
-               DBG_TRACE( DbgInfo, "Skipping wireless stats, in RTS mode\n" );
-       } else
-#endif
-       {
-               pStats = wl_wireless_stats( dev );
-       }
-       wl_act_int_on( lp );
-
-       wl_unlock(lp, &flags);
-
-       return pStats;
-} // wl_get_wireless_stats
-
-
-/*******************************************************************************
- *     wl_spy_gather()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      Gather wireless spy statistics.
- *
- *  PARAMETERS:
- *
- *      wrq - the wireless request buffer
- *      lp  - the device's private adapter structure
- *
- *  RETURNS:
- *
- *      0 on success
- *      errno value otherwise
- *
- ******************************************************************************/
-inline void wl_spy_gather( struct net_device *dev, u_char *mac )
-{
-       struct iw_quality wstats;
-       int                     status;
-       u_char                  stats[2];
-       DESC_STRCT              desc[1];
-       struct wl_private   *lp = wl_priv(dev);
-       /*------------------------------------------------------------------------*/
-
-       /* shortcut */
-       if (!lp->spy_data.spy_number) {
-               return;
-       }
-
-       /* Gather wireless spy statistics: for each packet, compare the source
-          address with out list, and if match, get the stats. */
-       memset( stats, 0, sizeof(stats));
-       memset( desc, 0, sizeof(DESC_STRCT));
-
-       desc[0].buf_addr        = stats;
-       desc[0].BUF_SIZE        = sizeof(stats);
-       desc[0].next_desc_addr  = 0;            // terminate list
-
-       status = hcf_rcv_msg( &( lp->hcfCtx ), &desc[0], 0 );
-
-       if( status == HCF_SUCCESS ) {
-               wstats.level = (u_char) dbm(stats[1]);
-               wstats.noise = (u_char) dbm(stats[0]);
-               wstats.qual  = wstats.level > wstats.noise ? wstats.level - wstats.noise : 0;
-
-               wstats.updated = (IW_QUAL_QUAL_UPDATED  |
-                                 IW_QUAL_LEVEL_UPDATED |
-                                 IW_QUAL_NOISE_UPDATED |
-                                 IW_QUAL_DBM);
-
-               wireless_spy_update( dev, mac, &wstats );
-       }
-} // wl_spy_gather
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_freq()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that the channel/freq
- *      configuration for a specific device has changed.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_freq( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       wrqu.freq.m = lp->Channel;
-       wrqu.freq.e = 0;
-
-       wireless_send_event( dev, SIOCSIWFREQ, &wrqu, NULL );
-
-       return;
-} // wl_wext_event_freq
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_mode()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that the mode of operation
- *      for a specific device has changed.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_mode( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_STA  ) {
-               wrqu.mode = IW_MODE_INFRA;
-       } else {
-               wrqu.mode = IW_MODE_MASTER;
-       }
-
-       wireless_send_event( dev, SIOCSIWMODE, &wrqu, NULL );
-
-       return;
-} // wl_wext_event_mode
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_essid()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that the ESSID configuration for
- *      a specific device has changed.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_essid( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       /* Fill out the buffer. Note that the buffer doesn't actually contain the
-          ESSID, but a pointer to the contents. In addition, the 'extra' field of
-          the call to wireless_send_event() must also point to where the ESSID
-          lives */
-       wrqu.essid.length  = strlen( lp->NetworkName );
-       wrqu.essid.pointer = (void __user *)lp->NetworkName;
-       wrqu.essid.flags   = 1;
-
-       wireless_send_event( dev, SIOCSIWESSID, &wrqu, lp->NetworkName );
-
-       return;
-} // wl_wext_event_essid
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_encode()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that the encryption configuration
- *      for a specific device has changed.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_encode( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       int index = 0;
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       if( lp->EnableEncryption == 0 ) {
-               wrqu.encoding.flags = IW_ENCODE_DISABLED;
-       } else {
-               wrqu.encoding.flags |= lp->TransmitKeyID;
-
-               index = lp->TransmitKeyID - 1;
-
-               /* Only set IW_ENCODE_RESTRICTED/OPEN flag using lp->ExcludeUnencrypted
-                  if we're in AP mode */
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_AP
-               //;?should we restore this to allow smaller memory footprint
-
-               if ( CNV_INT_TO_LITTLE( lp->hcfCtx.IFB_FWIdentity.comp_id ) == COMP_ID_FW_AP  ) {
-                       if( lp->ExcludeUnencrypted ) {
-                               wrqu.encoding.flags |= IW_ENCODE_RESTRICTED;
-                       } else {
-                               wrqu.encoding.flags |= IW_ENCODE_OPEN;
-                       }
-               }
-
-#endif  // HCF_TYPE_AP
-
-               /* Only provide the key if permissions allow */
-               if( capable( CAP_NET_ADMIN )) {
-                       wrqu.encoding.pointer = (void __user *)lp->DefaultKeys.key[index].key;
-                       wrqu.encoding.length  = lp->DefaultKeys.key[index].len;
-               } else {
-                       wrqu.encoding.flags |= IW_ENCODE_NOKEY;
-               }
-       }
-
-       wireless_send_event( dev, SIOCSIWENCODE, &wrqu,
-                                                lp->DefaultKeys.key[index].key );
-
-       return;
-} // wl_wext_event_encode
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_ap()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that the device has been
- *      associated to a new AP.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_ap( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       int status;
-       /*------------------------------------------------------------------------*/
-
-
-       /* Retrieve the WPA-IEs used by the firmware and send an event. We must send
-          this event BEFORE sending the association event, as there are timing
-          issues with the hostap supplicant. The supplicant will attempt to process
-          an EAPOL-Key frame from an AP before receiving this information, which
-          is required for a proper processed frame. */
-       wl_wext_event_assoc_ie( dev );
-
-       /* Get the BSSID */
-       lp->ltvRecord.typ = CFG_CUR_BSSID;
-       lp->ltvRecord.len = 4;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       if( status == HCF_SUCCESS ) {
-               memset( &wrqu, 0, sizeof( wrqu ));
-
-               memcpy( wrqu.addr.sa_data, lp->ltvRecord.u.u8, ETH_ALEN );
-
-               wrqu.addr.sa_family = ARPHRD_ETHER;
-
-               wireless_send_event( dev, SIOCGIWAP, &wrqu, NULL );
-       }
-
-       return;
-} // wl_wext_event_ap
-/*============================================================================*/
-
-
-
-/*******************************************************************************
- *     wl_wext_event_scan_complete()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that a request for a network scan
- *      has completed.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_scan_complete( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       wrqu.addr.sa_family = ARPHRD_ETHER;
-       wireless_send_event( dev, SIOCGIWSCAN, &wrqu, NULL );
-
-       return;
-} // wl_wext_event_scan_complete
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_new_sta()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that an AP has registered a new
- *      station.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_new_sta( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       /* Send the station's mac address here */
-       memcpy( wrqu.addr.sa_data, dev->dev_addr, ETH_ALEN );
-       wrqu.addr.sa_family = ARPHRD_ETHER;
-       wireless_send_event( dev, IWEVREGISTERED, &wrqu, NULL );
-
-       return;
-} // wl_wext_event_new_sta
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_expired_sta()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that an AP has deregistered a
- *      station.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_expired_sta( struct net_device *dev )
-{
-       union iwreq_data wrqu;
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       memcpy( wrqu.addr.sa_data, dev->dev_addr, ETH_ALEN );
-       wrqu.addr.sa_family = ARPHRD_ETHER;
-       wireless_send_event( dev, IWEVEXPIRED, &wrqu, NULL );
-
-       return;
-} // wl_wext_event_expired_sta
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_mic_failed()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event that MIC calculations failed.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_mic_failed( struct net_device *dev )
-{
-       union iwreq_data   wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       struct iw_michaelmicfailure wxmic;
-       int                key_idx;
-       char              *addr1;
-       char              *addr2;
-       WVLAN_RX_WMP_HDR  *hdr;
-       /*------------------------------------------------------------------------*/
-
-
-       key_idx = lp->lookAheadBuf[HFS_STAT+1] >> 3;
-       key_idx &= 0x03;
-
-       /* Cast the lookahead buffer into a RFS format */
-       hdr = (WVLAN_RX_WMP_HDR *)&lp->lookAheadBuf[HFS_STAT];
-
-       /* Cast the addresses to byte buffers, as in the above RFS they are word
-          length */
-       addr1 = (char *)hdr->address1;
-       addr2 = (char *)hdr->address2;
-
-       DBG_PRINT( "MIC FAIL - KEY USED : %d, STATUS : 0x%04x\n", key_idx,
-                          hdr->status );
-
-       memset(&wrqu, 0, sizeof(wrqu));
-       memset(&wxmic, 0, sizeof(wxmic));
-
-       wxmic.flags = key_idx & IW_MICFAILURE_KEY_ID;
-       wxmic.flags |= (addr1[0] & 1) ?
-               IW_MICFAILURE_GROUP : IW_MICFAILURE_PAIRWISE;
-       wxmic.src_addr.sa_family = ARPHRD_ETHER;
-       memcpy(wxmic.src_addr.sa_data, addr2, ETH_ALEN);
-
-       wrqu.data.length = sizeof(wxmic);
-       wireless_send_event(dev, IWEVMICHAELMICFAILURE, &wrqu, (char *)&wxmic);
-
-       return;
-} // wl_wext_event_mic_failed
-/*============================================================================*/
-
-
-
-
-/*******************************************************************************
- *     wl_wext_event_assoc_ie()
- *******************************************************************************
- *
- *  DESCRIPTION:
- *
- *      This function is used to send an event containing the WPA-IE generated
- *      by the firmware in an association request.
- *
- *
- *  PARAMETERS:
- *
- *      dev - the network device for which this event is to be issued
- *
- *  RETURNS:
- *
- *      N/A
- *
- ******************************************************************************/
-void wl_wext_event_assoc_ie( struct net_device *dev )
-{
-       union iwreq_data   wrqu;
-       struct wl_private *lp = wl_priv(dev);
-       int status;
-       PROBE_RESP         data;
-       hcf_16             length;
-       hcf_8              *wpa_ie;
-       /*------------------------------------------------------------------------*/
-
-
-       memset( &wrqu, 0, sizeof( wrqu ));
-
-       /* Retrieve the Association Request IE */
-       lp->ltvRecord.len = 45;
-       lp->ltvRecord.typ = CFG_CUR_ASSOC_REQ_INFO;
-
-       status = hcf_get_info( &( lp->hcfCtx ), (LTVP)&( lp->ltvRecord ));
-       if( status == HCF_SUCCESS )
-       {
-               length = 0;
-               memcpy( &data.rawData, &( lp->ltvRecord.u.u8[1] ), 88 );
-               wpa_ie = wl_parse_wpa_ie( &data, &length );
-
-               if( length != 0 )
-               {
-                       wrqu.data.length = wpa_ie[1] + 2;
-                       wireless_send_event(dev, IWEVASSOCREQIE,
-                                           &wrqu, wpa_ie);
-
-                       /* This bit is a hack. We send the respie
-                        * event at the same time */
-                       wireless_send_event(dev, IWEVASSOCRESPIE,
-                                           &wrqu, wpa_ie);
-               }
-       }
-
-       return;
-}  // wl_wext_event_assoc_ie
-/*============================================================================*/
-/* Structures to export the Wireless Handlers */
-
-static const iw_handler wl_handler[] =
-{
-       IW_HANDLER(SIOCSIWCOMMIT, (iw_handler) wireless_commit),
-       IW_HANDLER(SIOCGIWNAME, (iw_handler) wireless_get_protocol),
-       IW_HANDLER(SIOCSIWFREQ, (iw_handler) wireless_set_frequency),
-       IW_HANDLER(SIOCGIWFREQ, (iw_handler) wireless_get_frequency),
-       IW_HANDLER(SIOCSIWMODE, (iw_handler) wireless_set_porttype),
-       IW_HANDLER(SIOCGIWMODE, (iw_handler) wireless_get_porttype),
-       IW_HANDLER(SIOCSIWSENS, (iw_handler) wireless_set_sensitivity),
-       IW_HANDLER(SIOCGIWSENS, (iw_handler) wireless_get_sensitivity),
-       IW_HANDLER(SIOCGIWRANGE, (iw_handler) wireless_get_range),
-       IW_HANDLER(SIOCSIWSPY, iw_handler_set_spy),
-       IW_HANDLER(SIOCGIWSPY, iw_handler_get_spy),
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-       IW_HANDLER(SIOCGIWAP, (iw_handler) wireless_get_bssid),
-#endif
-       IW_HANDLER(SIOCGIWAPLIST, (iw_handler) wireless_get_ap_list),
-       IW_HANDLER(SIOCSIWSCAN, (iw_handler) wireless_set_scan),
-       IW_HANDLER(SIOCGIWSCAN, (iw_handler) wireless_get_scan),
-       IW_HANDLER(SIOCSIWESSID, (iw_handler) wireless_set_essid),
-       IW_HANDLER(SIOCGIWESSID, (iw_handler) wireless_get_essid),
-       IW_HANDLER(SIOCSIWNICKN, (iw_handler) wireless_set_nickname),
-       IW_HANDLER(SIOCGIWNICKN, (iw_handler) wireless_get_nickname),
-       IW_HANDLER(SIOCSIWRATE, (iw_handler) wireless_set_rate),
-       IW_HANDLER(SIOCGIWRATE, (iw_handler) wireless_get_rate),
-       IW_HANDLER(SIOCSIWRTS, (iw_handler) wireless_set_rts_threshold),
-       IW_HANDLER(SIOCGIWRTS, (iw_handler) wireless_get_rts_threshold),
-       IW_HANDLER(SIOCGIWTXPOW, (iw_handler) wireless_get_tx_power),
-       IW_HANDLER(SIOCSIWENCODE, (iw_handler) wireless_set_encode),
-       IW_HANDLER(SIOCGIWENCODE, (iw_handler) wireless_get_encode),
-       IW_HANDLER(SIOCSIWPOWER, (iw_handler) wireless_set_power),
-       IW_HANDLER(SIOCGIWPOWER, (iw_handler) wireless_get_power),
-       IW_HANDLER(SIOCSIWGENIE, (iw_handler) wireless_set_genie),
-       IW_HANDLER(SIOCSIWAUTH, (iw_handler) wireless_set_auth),
-       IW_HANDLER(SIOCSIWENCODEEXT, (iw_handler) wireless_set_encodeext),
-};
-
-static const iw_handler wl_private_handler[] =
-{                                                       /* SIOCIWFIRSTPRIV + */
-                wvlan_set_netname,                      /* 0: SIOCSIWNETNAME */
-                wvlan_get_netname,                      /* 1: SIOCGIWNETNAME */
-                wvlan_set_station_nickname,             /* 2: SIOCSIWSTANAME */
-                wvlan_get_station_nickname,             /* 3: SIOCGIWSTANAME */
-#if 1 //;? (HCF_TYPE) & HCF_TYPE_STA
-                wvlan_set_porttype,                     /* 4: SIOCSIWPORTTYPE */
-                wvlan_get_porttype,                     /* 5: SIOCGIWPORTTYPE */
-#endif
-};
-
-static struct iw_priv_args wl_priv_args[] = {
-        {SIOCSIWNETNAME,    IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN, 0, "snetwork_name" },
-        {SIOCGIWNETNAME, 0, IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN,    "gnetwork_name" },
-        {SIOCSIWSTANAME,    IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN, 0, "sstation_name" },
-        {SIOCGIWSTANAME, 0, IW_PRIV_TYPE_CHAR | HCF_MAX_NAME_LEN,    "gstation_name" },
-#if 1 //;? #if (HCF_TYPE) & HCF_TYPE_STA
-        {SIOCSIWPORTTYPE,    IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "sport_type" },
-        {SIOCGIWPORTTYPE, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1,    "gport_type" },
-#endif
-};
-
-const struct iw_handler_def wl_iw_handler_def =
-{
-        .num_private        = sizeof(wl_private_handler) / sizeof(iw_handler),
-        .private            = (iw_handler *) wl_private_handler,
-        .private_args       = (struct iw_priv_args *) wl_priv_args,
-        .num_private_args   = sizeof(wl_priv_args) / sizeof(struct iw_priv_args),
-        .num_standard       = sizeof(wl_handler) / sizeof(iw_handler),
-        .standard           = (iw_handler *) wl_handler,
-        .get_wireless_stats = wl_get_wireless_stats,
-};
diff --git a/drivers/staging/wlags49_h2/wl_wext.h b/drivers/staging/wlags49_h2/wl_wext.h
deleted file mode 100644 (file)
index 4a85dc8..0000000
+++ /dev/null
@@ -1,88 +0,0 @@
-/*******************************************************************************
- * Agere Systems Inc.
- * Wireless device driver for Linux (wlags49).
- *
- * Copyright (c) 1998-2003 Agere Systems Inc.
- * All rights reserved.
- *   http://www.agere.com
- *
- * Initially developed by TriplePoint, Inc.
- *   http://www.triplepoint.com
- *
- *------------------------------------------------------------------------------
- *
- *   Header describing information required for the wireless IOCTL handlers.
- *
- *------------------------------------------------------------------------------
- *
- * SOFTWARE LICENSE
- *
- * This software is provided subject to the following terms and conditions,
- * which you should read carefully before using the software.  Using this
- * software indicates your acceptance of these terms and conditions.  If you do
- * not agree with these terms and conditions, do not use the software.
- *
- * Copyright © 2003 Agere Systems Inc.
- * All rights reserved.
- *
- * Redistribution and use in source or binary forms, with or without
- * modifications, are permitted provided that the following conditions are met:
- *
- * . Redistributions of source code must retain the above copyright notice, this
- *    list of conditions and the following Disclaimer as comments in the code as
- *    well as in the documentation and/or other materials provided with the
- *    distribution.
- *
- * . Redistributions in binary form must reproduce the above copyright notice,
- *    this list of conditions and the following Disclaimer in the documentation
- *    and/or other materials provided with the distribution.
- *
- * . Neither the name of Agere Systems Inc. nor the names of the contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * Disclaimer
- *
- * THIS SOFTWARE IS PROVIDED \93AS IS\94 AND ANY EXPRESS OR IMPLIED WARRANTIES,
- * INCLUDING, BUT NOT LIMITED TO, INFRINGEMENT AND THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  ANY
- * USE, MODIFICATION OR DISTRIBUTION OF THIS SOFTWARE IS SOLELY AT THE USERS OWN
- * RISK. IN NO EVENT SHALL AGERE SYSTEMS INC. OR CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, INCLUDING, BUT NOT LIMITED TO, CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
- * DAMAGE.
- *
- ******************************************************************************/
-
-#ifndef __WL_WEXT_H__
-#define __WL_WEXT_H__
-
-
-/*******************************************************************************
- *  function protoypes
- ******************************************************************************/
-
-struct iw_statistics *wl_wireless_stats( struct net_device *dev );
-
-struct iw_statistics * wl_get_wireless_stats( struct net_device *dev );
-
-inline void wl_spy_gather (struct net_device *dev, u_char *mac);
-
-void wl_wext_event_freq( struct net_device *dev );
-void wl_wext_event_mode( struct net_device *dev );
-void wl_wext_event_essid( struct net_device *dev );
-void wl_wext_event_encode( struct net_device *dev );
-void wl_wext_event_ap( struct net_device *dev );
-void wl_wext_event_scan_complete( struct net_device *dev );
-void wl_wext_event_new_sta( struct net_device *dev );
-void wl_wext_event_expired_sta( struct net_device *dev );
-void wl_wext_event_mic_failed( struct net_device *dev );
-void wl_wext_event_assoc_ie( struct net_device *dev );
-
-extern const struct iw_handler_def wl_iw_handler_def;
-
-#endif  /* __WL_WEXT_H__ */
diff --git a/drivers/staging/wlags49_h25/Kconfig b/drivers/staging/wlags49_h25/Kconfig
deleted file mode 100644 (file)
index dd8dc4d..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-config WLAGS49_H25
-       tristate "Linksys HERMES II.5 WCF54G_Wireless-G_CompactFlash_Card"
-       depends on WLAN && PCMCIA
-       select WIRELESS_EXT
-       select WEXT_SPY
-       select WEXT_PRIV
-       ---help---
-       Driver for wireless cards using Agere's HERMES II.5 chipset
-       which are identified with Manufacture ID: 0156,0004
-       The software is a modified version of wl_lkm_722_abg.tar.gz
-       from the Agere Systems website, adapted for Ubuntu 9.04.
diff --git a/drivers/staging/wlags49_h25/Makefile b/drivers/staging/wlags49_h25/Makefile
deleted file mode 100644 (file)
index 513ba01..0000000
+++ /dev/null
@@ -1,52 +0,0 @@
-#
-# Makefile for wlags49_h2_cs.ko and wlags49_h25_cs.ko
-#
-# Default build for Hermes-II base cards (possibly identified with
-# "manfid: 0x0156, 0x0003" in "pccardctl ident" output), comment
-# -DHERMES25 below
-#
-# If you want to build for Hermes-II.5 base cards (possibly identified with
-# "manfid: 0x0156, 0x0004" in "pccardctl ident" output), uncomment
-# -DHERMES25 below
-#
-#  If you want to build AP support (untested), comment out -DSTA_ONLY
-
-ccflags-y := -I$(KERNELDIR)/include
-ccflags-y += -I$(src) \
-               -DBUS_PCMCIA \
-               -DUSE_WEXT \
-               -DSTA_ONLY \
-               -DWVLAN_49 \
-               -DHERMES25 \
-#              -DDBG \
-#              -DDBG_LVL=5 \
-#              -DUSE_UIL \
-#              -DUSE_PROFILE \
-
-ifeq ($(findstring HERMES25,$(ccflags-y)),)
-WLNAME := wlags49_h2_cs
-$(WLNAME)-y := sta_h2.o
-ifeq ($(findstring STA_ONLY,$(ccflags-y)),)
-$(WLNAME)-y += ap_h2.o
-endif
-else
-WLNAME=wlags49_h25_cs
-$(WLNAME)-y := sta_h25.o
-ifeq ($(findstring STA_ONLY,$(ccflags-y)),)
-$(WLNAME)-y += ap_h25.o
-endif
-endif
-
-obj-m          += $(WLNAME).o
-
-$(WLNAME)-y += wl_profile.o \
-               wl_wext.o \
-               wl_priv.o \
-               wl_main.o \
-               wl_enc.o \
-               wl_util.o \
-               wl_netdev.o \
-               wl_cs.o \
-               mmd.o \
-               hcf.o \
-               dhf.o
diff --git a/drivers/staging/wlags49_h25/README.txt b/drivers/staging/wlags49_h25/README.txt
deleted file mode 100644 (file)
index 4c7a836..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-=======================================================================
-WLAN driver for cards using the HERMES II and HERMES II.5 chipset
-
-HERMES II Card
-
-PCMCIA Info: "Agere Systems" "Wireless PC Card Model 0110"
-             Manufacture ID: 0156,0003
-
-HERMES II.5 Card
-
-PCMCIA Info: "Linksys" "WCF54G_Wireless-G_CompactFlash_Card"
-             Manufacture ID: 0156,0004
-
-Based on Agere Systems Linux LKM Wireless Driver Source Code,
-Version 7.22; complies with Open Source BSD License.
-=======================================================================
-
-DESCRIPTION
-
-This directory only contains files that refer to the source in wlags49_h2.
-Only real sourcefiles are the Makefile which has been configured to build
-the driver for the HERMES II.5 chipset and Kconfig to describe the driver.
-
-The wlags49_h2 directory contains the full source, including the files
-exclusively used by this driver.
-
-For more information about the driver look at the wlags49_h2 direcory.
-
-=======================================================================
-
diff --git a/drivers/staging/wlags49_h25/TODO b/drivers/staging/wlags49_h25/TODO
deleted file mode 100644 (file)
index ec71ad3..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-First of all, the best thing would be that this driver becomes obsolete by
-adding support for Hermes II and Hermes II.5 cards to the existing orinoco
-driver. The orinoco driver currently only supports Hermes I based cards.
-Since this will not happen by magic and has not happened until now this
-driver provides a stop-gap solution for these type of cards.
-
-Having said that, the following wishlist comes to mind to make the driver
-suitable as fully supported kernel driver. Feel free to expand/enhance the
-list.
-
-TODO:
-       - verify against a Hermes II.5 card
-       - verify with WPA encryption (both with H2 and H2.5 cards)
-       - sometimes the card does not initialize correctly, retry mechanisms
-         are build in to catch most cases but not all
-       - once the driver runs it is very stable, but I have the impression
-         some the critical sections take to long
-       - the driver is split into a Hermes II and a Hermes II.5 part, it
-         would be nice to handle both with one module instead of two
-       - review by the wireless developer community
-       - verify the code against the coding standards for a proper linux
-         driver
-       - resolve license issues (?)
-
-DONE:
-       - verified against a Hermes II card (Thomson Speedtouch 110 PCMCIA
-         card)
-       - verified with WEP encryption
-
-Please send any patches or complaints about this driver to Greg
-Kroah-Hartman <greg@kroah.com> and Cc: Henk de Groot <pe1dnn@amsat.org>
-Don't bother the upstream wireless kernel developers about it, they
-want nothing to do with it.
diff --git a/drivers/staging/wlags49_h25/ap_h25.c b/drivers/staging/wlags49_h25/ap_h25.c
deleted file mode 100644 (file)
index 0344fa5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/ap_h25.c"
diff --git a/drivers/staging/wlags49_h25/debug.h b/drivers/staging/wlags49_h25/debug.h
deleted file mode 100644 (file)
index b5fb136..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/debug.h"
diff --git a/drivers/staging/wlags49_h25/dhf.c b/drivers/staging/wlags49_h25/dhf.c
deleted file mode 100644 (file)
index 81762c8..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/dhf.c"
diff --git a/drivers/staging/wlags49_h25/dhf.h b/drivers/staging/wlags49_h25/dhf.h
deleted file mode 100644 (file)
index 54181dc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/dhf.h"
diff --git a/drivers/staging/wlags49_h25/dhfcfg.h b/drivers/staging/wlags49_h25/dhfcfg.h
deleted file mode 100644 (file)
index 2586e39..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/dhfcfg.h"
diff --git a/drivers/staging/wlags49_h25/hcf.c b/drivers/staging/wlags49_h25/hcf.c
deleted file mode 100644 (file)
index eeeba1f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/hcf.c"
diff --git a/drivers/staging/wlags49_h25/hcf.h b/drivers/staging/wlags49_h25/hcf.h
deleted file mode 100644 (file)
index d1143d9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/hcf.h"
diff --git a/drivers/staging/wlags49_h25/hcfcfg.h b/drivers/staging/wlags49_h25/hcfcfg.h
deleted file mode 100644 (file)
index f88c4bc..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/hcfcfg.h"
diff --git a/drivers/staging/wlags49_h25/hcfdef.h b/drivers/staging/wlags49_h25/hcfdef.h
deleted file mode 100644 (file)
index f6a0060..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/hcfdef.h"
diff --git a/drivers/staging/wlags49_h25/mdd.h b/drivers/staging/wlags49_h25/mdd.h
deleted file mode 100644 (file)
index 4d8e142..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/mdd.h"
diff --git a/drivers/staging/wlags49_h25/mmd.c b/drivers/staging/wlags49_h25/mmd.c
deleted file mode 100644 (file)
index b20782d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/mmd.c"
diff --git a/drivers/staging/wlags49_h25/mmd.h b/drivers/staging/wlags49_h25/mmd.h
deleted file mode 100644 (file)
index 8284dd9..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/mmd.h"
diff --git a/drivers/staging/wlags49_h25/sta_h25.c b/drivers/staging/wlags49_h25/sta_h25.c
deleted file mode 100644 (file)
index 83c76bb..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/sta_h25.c"
diff --git a/drivers/staging/wlags49_h25/wl_cs.c b/drivers/staging/wlags49_h25/wl_cs.c
deleted file mode 100644 (file)
index e6e1f19..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_cs.c"
diff --git a/drivers/staging/wlags49_h25/wl_cs.h b/drivers/staging/wlags49_h25/wl_cs.h
deleted file mode 100644 (file)
index 657acee..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_cs.h"
diff --git a/drivers/staging/wlags49_h25/wl_enc.c b/drivers/staging/wlags49_h25/wl_enc.c
deleted file mode 100644 (file)
index fe59df1..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_enc.c"
diff --git a/drivers/staging/wlags49_h25/wl_enc.h b/drivers/staging/wlags49_h25/wl_enc.h
deleted file mode 100644 (file)
index f2e860e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_enc.h"
diff --git a/drivers/staging/wlags49_h25/wl_if.h b/drivers/staging/wlags49_h25/wl_if.h
deleted file mode 100644 (file)
index 70d86f0..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_if.h"
diff --git a/drivers/staging/wlags49_h25/wl_internal.h b/drivers/staging/wlags49_h25/wl_internal.h
deleted file mode 100644 (file)
index c1687a3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_internal.h"
diff --git a/drivers/staging/wlags49_h25/wl_main.c b/drivers/staging/wlags49_h25/wl_main.c
deleted file mode 100644 (file)
index d2c06ad..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_main.c"
diff --git a/drivers/staging/wlags49_h25/wl_main.h b/drivers/staging/wlags49_h25/wl_main.h
deleted file mode 100644 (file)
index c98376e..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_main.h"
diff --git a/drivers/staging/wlags49_h25/wl_netdev.c b/drivers/staging/wlags49_h25/wl_netdev.c
deleted file mode 100644 (file)
index f7512c3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_netdev.c"
diff --git a/drivers/staging/wlags49_h25/wl_netdev.h b/drivers/staging/wlags49_h25/wl_netdev.h
deleted file mode 100644 (file)
index 519cd5f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_netdev.h"
diff --git a/drivers/staging/wlags49_h25/wl_priv.c b/drivers/staging/wlags49_h25/wl_priv.c
deleted file mode 100644 (file)
index 160c801..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_priv.c"
diff --git a/drivers/staging/wlags49_h25/wl_priv.h b/drivers/staging/wlags49_h25/wl_priv.h
deleted file mode 100644 (file)
index 28492b3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_priv.h"
diff --git a/drivers/staging/wlags49_h25/wl_profile.c b/drivers/staging/wlags49_h25/wl_profile.c
deleted file mode 100644 (file)
index 6baa201..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_profile.c"
diff --git a/drivers/staging/wlags49_h25/wl_profile.h b/drivers/staging/wlags49_h25/wl_profile.h
deleted file mode 100644 (file)
index 5f253a5..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_profile.h"
diff --git a/drivers/staging/wlags49_h25/wl_util.c b/drivers/staging/wlags49_h25/wl_util.c
deleted file mode 100644 (file)
index 771bebe..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_util.c"
diff --git a/drivers/staging/wlags49_h25/wl_util.h b/drivers/staging/wlags49_h25/wl_util.h
deleted file mode 100644 (file)
index ccd74e7..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_util.h"
diff --git a/drivers/staging/wlags49_h25/wl_version.h b/drivers/staging/wlags49_h25/wl_version.h
deleted file mode 100644 (file)
index ad38e8f..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_version.h"
diff --git a/drivers/staging/wlags49_h25/wl_wext.c b/drivers/staging/wlags49_h25/wl_wext.c
deleted file mode 100644 (file)
index f660e79..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_wext.c"
diff --git a/drivers/staging/wlags49_h25/wl_wext.h b/drivers/staging/wlags49_h25/wl_wext.h
deleted file mode 100644 (file)
index 31d6386..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-/* Use common source from wlags49_h2 */
-#include "../wlags49_h2/wl_wext.h"
index 723319ee08f39af6a7a27b21de6f8467742717cb..3727f6d25cf1af074ce35f1336453e6b7312a965 100644 (file)
@@ -1,4 +1,6 @@
 /* cfg80211 Interface for prism2_usb module */
+#include "hfa384x.h"
+#include "prism2mgmt.h"
 
 
 /* Prism2 channel/frequency/bitrate declarations */
index 98343ff7061565befe39219d74c9b0fcc1b6e6ce..07cee56372762a72f2a47018652cba9976481357 100644 (file)
@@ -3705,6 +3705,7 @@ static void hfa384x_usbout_callback(struct urb *urb)
                case -EPIPE:
                        {
                                hfa384x_t *hw = wlandev->priv;
+
                                netdev_warn(hw->wlandev->netdev,
                                            "%s tx pipe stalled: requesting reset\n",
                                            wlandev->netdev->name);
index d110b362c3bd27b3f0695f6e499bb0321db6f96c..e6a82d3303c13a6111ca373d34c6609f368807ec 100644 (file)
@@ -156,7 +156,8 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                                          HFA384x_ROAMMODE_HOSTSCAN_HOSTROAM);
        if (result) {
                netdev_err(wlandev->netdev,
-                          "setconfig(ROAMINGMODE) failed. result=%d\n", result);
+                          "setconfig(ROAMINGMODE) failed. result=%d\n",
+                          result);
                msg->resultcode.data =
                    P80211ENUM_resultcode_implementation_failure;
                goto exit;
@@ -177,8 +178,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                                             word);
                if (result) {
                        netdev_warn(wlandev->netdev,
-                                   "Passive scan not supported with "
-                                   "current firmware.  (<1.5.1)\n");
+                                   "Passive scan not supported with current firmware.  (<1.5.1)\n");
                }
        }
 
@@ -190,6 +190,7 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
        word = 0;
        for (i = 0; i < msg->channellist.data.len; i++) {
                u8 channel = msg->channellist.data.data[i];
+
                if (channel > 14)
                        continue;
                /* channel 1 is BIT 0 ... channel 14 is BIT 13 */
@@ -273,7 +274,8 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                result = hfa384x_drvr_enable(hw, 0);
                if (result) {
                        netdev_err(wlandev->netdev,
-                                  "drvr_enable(0) failed. result=%d\n", result);
+                                  "drvr_enable(0) failed. result=%d\n",
+                                  result);
                        msg->resultcode.data =
                            P80211ENUM_resultcode_implementation_failure;
                        goto exit;
@@ -293,7 +295,8 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                                        sizeof(hfa384x_HostScanRequest_data_t));
        if (result) {
                netdev_err(wlandev->netdev,
-                          "setconfig(SCANREQUEST) failed. result=%d\n", result);
+                          "setconfig(SCANREQUEST) failed. result=%d\n",
+                          result);
                msg->resultcode.data =
                    P80211ENUM_resultcode_implementation_failure;
                goto exit;
@@ -315,7 +318,8 @@ int prism2mgmt_scan(wlandevice_t *wlandev, void *msgp)
                result = hfa384x_drvr_disable(hw, 0);
                if (result) {
                        netdev_err(wlandev->netdev,
-                                  "drvr_disable(0) failed. result=%d\n", result);
+                                  "drvr_disable(0) failed. result=%d\n",
+                                  result);
                        msg->resultcode.data =
                            P80211ENUM_resultcode_implementation_failure;
                        goto exit;
@@ -377,8 +381,7 @@ int prism2mgmt_scan_results(wlandevice_t *wlandev, void *msgp)
 
        if (!hw->scanresults) {
                netdev_err(wlandev->netdev,
-                          "dot11req_scan_results can only be used after "
-                          "a successful dot11req_scan.\n");
+                          "dot11req_scan_results can only be used after a successful dot11req_scan.\n");
                result = 2;
                req->resultcode.data = P80211ENUM_resultcode_invalid_parameters;
                goto exit;
@@ -654,7 +657,8 @@ int prism2mgmt_start(wlandevice_t *wlandev, void *msgp)
 
        result = hfa384x_drvr_setconfig16(hw, HFA384x_RID_TXRATECNTL, word);
        if (result) {
-               netdev_err(wlandev->netdev, "Failed to set txrates=%d.\n", word);
+               netdev_err(wlandev->netdev, "Failed to set txrates=%d.\n",
+                          word);
                goto failed;
        }
 
@@ -728,8 +732,8 @@ int prism2mgmt_readpda(wlandevice_t *wlandev, void *msgp)
                                              HFA384x_PDA_LEN_MAX);
                if (result) {
                        netdev_err(wlandev->netdev,
-                                  "hfa384x_drvr_readpda() failed, "
-                                  "result=%d\n", result);
+                                  "hfa384x_drvr_readpda() failed, result=%d\n",
+                                  result);
 
                        msg->resultcode.data =
                            P80211ENUM_resultcode_implementation_failure;
@@ -777,8 +781,7 @@ int prism2mgmt_ramdl_state(wlandevice_t *wlandev, void *msgp)
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
                netdev_err(wlandev->netdev,
-                          "ramdl_state(): may only be called "
-                          "in the fwload state.\n");
+                          "ramdl_state(): may only be called in the fwload state.\n");
                msg->resultcode.data =
                    P80211ENUM_resultcode_implementation_failure;
                msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
@@ -836,8 +839,7 @@ int prism2mgmt_ramdl_write(wlandevice_t *wlandev, void *msgp)
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
                netdev_err(wlandev->netdev,
-                          "ramdl_write(): may only be called "
-                          "in the fwload state.\n");
+                          "ramdl_write(): may only be called in the fwload state.\n");
                msg->resultcode.data =
                    P80211ENUM_resultcode_implementation_failure;
                msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
@@ -896,8 +898,7 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
                netdev_err(wlandev->netdev,
-                          "flashdl_state(): may only be called "
-                          "in the fwload state.\n");
+                          "flashdl_state(): may only be called in the fwload state.\n");
                msg->resultcode.data =
                    P80211ENUM_resultcode_implementation_failure;
                msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
@@ -931,8 +932,8 @@ int prism2mgmt_flashdl_state(wlandevice_t *wlandev, void *msgp)
                result = prism2sta_ifstate(wlandev, P80211ENUM_ifstate_fwload);
                if (result != P80211ENUM_resultcode_success) {
                        netdev_err(wlandev->netdev,
-                                  "prism2sta_ifstate(fwload) failed,"
-                                  "P80211ENUM_resultcode=%d\n", result);
+                                  "prism2sta_ifstate(fwload) failed, P80211ENUM_resultcode=%d\n",
+                                  result);
                        msg->resultcode.data =
                            P80211ENUM_resultcode_implementation_failure;
                        result = -1;
@@ -970,8 +971,7 @@ int prism2mgmt_flashdl_write(wlandevice_t *wlandev, void *msgp)
 
        if (wlandev->msdstate != WLAN_MSD_FWLOAD) {
                netdev_err(wlandev->netdev,
-                          "flashdl_write(): may only be called "
-                          "in the fwload state.\n");
+                          "flashdl_write(): may only be called in the fwload state.\n");
                msg->resultcode.data =
                    P80211ENUM_resultcode_implementation_failure;
                msg->resultcode.status = P80211ENUM_msgitem_status_data_ok;
index 0fb42dfca2a47776274749f5dc563a0c2c161333..bdd3b4c442d29722e2719a5647c6d65f3fe68429 100644 (file)
@@ -672,8 +672,8 @@ static int prism2mib_fragmentationthreshold(struct mibrec *mib,
 
        if (!isget)
                if ((*uint32) % 2) {
-                       netdev_warn(wlandev->netdev, "Attempt to set odd number "
-                              "FragmentationThreshold\n");
+                       netdev_warn(wlandev->netdev,
+                                   "Attempt to set odd number FragmentationThreshold\n");
                        msg->resultcode.data =
                            P80211ENUM_resultcode_not_supported;
                        return 0;
index 278b6a1ef31f9fe6090ec461b382b6f588b9418d..209e4db6979a10fb946ad45e7cf7481e37a3309c 100644 (file)
@@ -360,6 +360,7 @@ static int prism2sta_mlmerequest(wlandevice_t *wlandev, struct p80211msg *msg)
        case DIDmsg_lnxreq_ifstate:
                {
                        struct p80211msg_lnxreq_ifstate *ifstatemsg;
+
                        pr_debug("Received mlme ifstate request\n");
                        ifstatemsg = (struct p80211msg_lnxreq_ifstate *) msg;
                        result =
@@ -467,8 +468,7 @@ u32 prism2sta_ifstate(wlandevice_t *wlandev, u32 ifstate)
                        break;
                case WLAN_MSD_RUNNING:
                        netdev_warn(wlandev->netdev,
-                              "Cannot enter fwload state from enable state,"
-                              "you must disable first.\n");
+                                   "Cannot enter fwload state from enable state, you must disable first.\n");
                        result = P80211ENUM_resultcode_invalid_parameters;
                        break;
                case WLAN_MSD_HWFAIL:
@@ -1407,6 +1407,7 @@ void prism2sta_processing_defer(struct work_struct *data)
                 */
                if (hw->join_ap && --hw->join_retries > 0) {
                        hfa384x_JoinRequest_data_t joinreq;
+
                        joinreq = hw->joinreq;
                        /* Send the join request */
                        hfa384x_drvr_setconfig(hw,
index 78a749a7a1c1de72f48b29fbe3e8da7c816840b1..ae58a3eeb29374ad8a991e890be6bce5d548a95b 100644 (file)
 
 struct xilly_endpoint_hardware;
 
-struct xilly_page {
-       struct list_head node;
-       unsigned long addr;
-       unsigned int order;
-};
-
-struct xilly_dma {
-       struct list_head node;
-       struct pci_dev *pdev;
-       struct device *dev;
-       dma_addr_t dma_addr;
-       size_t size;
-       int direction;
-};
-
 struct xilly_buffer {
        void *addr;
        dma_addr_t dma_addr;
        int end_offset; /* Counting elements, not bytes */
 };
 
-struct xilly_cleanup {
-       struct list_head to_kfree;
-       struct list_head to_pagefree;
-       struct list_head to_unmap;
-};
-
 struct xilly_idt_handle {
        unsigned char *chandesc;
        unsigned char *idt;
@@ -126,9 +105,6 @@ struct xilly_endpoint {
        struct mutex register_mutex;
        wait_queue_head_t ep_wait;
 
-       /* List of memory allocations, to make release easy */
-       struct xilly_cleanup cleanup;
-
        /* Channels and message handling */
        struct cdev cdev;
 
@@ -156,18 +132,22 @@ struct xilly_endpoint_hardware {
                                       dma_addr_t,
                                       size_t,
                                       int);
-       dma_addr_t (*map_single)(struct xilly_cleanup *,
-                                struct xilly_endpoint *,
-                                void *,
-                                size_t,
-                                int);
-       void (*unmap_single)(struct xilly_dma *entry);
+       int (*map_single)(struct xilly_endpoint *,
+                         void *,
+                         size_t,
+                         int,
+                         dma_addr_t *);
 };
 
-irqreturn_t xillybus_isr(int irq, void *data);
+struct xilly_mapping {
+       void *device;
+       dma_addr_t dma_addr;
+       size_t size;
+       int direction;
+};
 
-void xillybus_do_cleanup(struct xilly_cleanup *mem,
-                        struct xilly_endpoint *endpoint);
+
+irqreturn_t xillybus_isr(int irq, void *data);
 
 struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
                                              struct device *dev,
index fe8f9d28b03ba7bf84ce3c50ecccb23d67bee406..5fca58e4e082dab787cd5d6b87905cbd05d79989 100644 (file)
@@ -311,85 +311,14 @@ EXPORT_SYMBOL(xillybus_isr);
  * no locks are applied!
  */
 
-void xillybus_do_cleanup(struct xilly_cleanup *mem,
-                        struct xilly_endpoint *endpoint)
-{
-       struct list_head *this, *next;
-
-       list_for_each_safe(this, next, &mem->to_unmap) {
-               struct xilly_dma *entry =
-                       list_entry(this, struct xilly_dma, node);
-
-               endpoint->ephw->unmap_single(entry);
-               kfree(entry);
-       }
-
-       INIT_LIST_HEAD(&mem->to_unmap);
-
-       list_for_each_safe(this, next, &mem->to_kfree)
-               kfree(this);
-
-       INIT_LIST_HEAD(&mem->to_kfree);
-
-       list_for_each_safe(this, next, &mem->to_pagefree) {
-               struct xilly_page *entry =
-                       list_entry(this, struct xilly_page, node);
-
-               free_pages(entry->addr, entry->order);
-               kfree(entry);
-       }
-       INIT_LIST_HEAD(&mem->to_pagefree);
-}
-EXPORT_SYMBOL(xillybus_do_cleanup);
-
-static void *xilly_malloc(struct xilly_cleanup *mem, size_t size)
-{
-       void *ptr;
-
-       ptr = kzalloc(sizeof(struct list_head) + size, GFP_KERNEL);
-
-       if (!ptr)
-               return ptr;
-
-       list_add_tail((struct list_head *) ptr, &mem->to_kfree);
-
-       return ptr + sizeof(struct list_head);
-}
-
-static unsigned long xilly_pagealloc(struct xilly_cleanup *mem,
-                                    unsigned long order)
-{
-       unsigned long addr;
-       struct xilly_page *this;
-
-       this = kmalloc(sizeof(struct xilly_page), GFP_KERNEL);
-       if (!this)
-               return 0;
-
-       addr =  __get_free_pages(GFP_KERNEL | __GFP_DMA32 | __GFP_ZERO, order);
-
-       if (!addr) {
-               kfree(this);
-               return 0;
-       }
-
-       this->addr = addr;
-       this->order = order;
-
-       list_add_tail(&this->node, &mem->to_pagefree);
-
-       return addr;
-}
-
-
 static void xillybus_autoflush(struct work_struct *work);
 
 static int xilly_setupchannels(struct xilly_endpoint *ep,
-                              struct xilly_cleanup *mem,
                               unsigned char *chandesc,
                               int entries
        )
 {
+       struct device *dev = ep->dev;
        int i, entry, wr_nbuffer, rd_nbuffer;
        struct xilly_channel *channel;
        int channelnum, bufnum, bufsize, format, is_writebuf;
@@ -402,17 +331,20 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
        int left_of_rd_salami = 0;
        dma_addr_t dma_addr;
        int msg_buf_done = 0;
+       const gfp_t gfp_mask = GFP_KERNEL | __GFP_DMA32 | __GFP_ZERO;
 
        struct xilly_buffer *this_buffer = NULL; /* Init to silence warning */
+       int rc = 0;
 
-       channel = xilly_malloc(mem, ep->num_channels *
-                              sizeof(struct xilly_channel));
+       channel = devm_kzalloc(dev, ep->num_channels *
+                              sizeof(struct xilly_channel), GFP_KERNEL);
 
        if (!channel)
                goto memfail;
 
-       ep->channels = xilly_malloc(mem, (ep->num_channels + 1) *
-                                   sizeof(struct xilly_channel *));
+       ep->channels = devm_kzalloc(dev, (ep->num_channels + 1) *
+                                   sizeof(struct xilly_channel *),
+                                   GFP_KERNEL);
 
        if (!ep->channels)
                goto memfail;
@@ -501,16 +433,16 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
                        channel->rd_exclusive_open = exclusive_open;
                        channel->seekable = seekable;
 
-                       channel->rd_buffers = xilly_malloc(
-                               mem,
-                               bufnum * sizeof(struct xilly_buffer *));
+                       channel->rd_buffers = devm_kzalloc(dev,
+                               bufnum * sizeof(struct xilly_buffer *),
+                               GFP_KERNEL);
 
                        if (!channel->rd_buffers)
                                goto memfail;
 
-                       this_buffer = xilly_malloc(
-                               mem,
-                               bufnum * sizeof(struct xilly_buffer));
+                       this_buffer = devm_kzalloc(dev,
+                               bufnum * sizeof(struct xilly_buffer),
+                               GFP_KERNEL);
 
                        if (!this_buffer)
                                goto memfail;
@@ -530,16 +462,16 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
                        channel->wr_synchronous = synchronous;
                        channel->wr_exclusive_open = exclusive_open;
 
-                       channel->wr_buffers = xilly_malloc(
-                               mem,
-                               bufnum * sizeof(struct xilly_buffer *));
+                       channel->wr_buffers = devm_kzalloc(dev,
+                               bufnum * sizeof(struct xilly_buffer *),
+                               GFP_KERNEL);
 
                        if (!channel->wr_buffers)
                                goto memfail;
 
-                       this_buffer = xilly_malloc(
-                               mem,
-                               bufnum * sizeof(struct xilly_buffer));
+                       this_buffer = devm_kzalloc(dev,
+                               bufnum * sizeof(struct xilly_buffer),
+                               GFP_KERNEL);
 
                        if (!this_buffer)
                                goto memfail;
@@ -576,21 +508,21 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
                                        }
 
                                        wr_salami = (void *)
-                                               xilly_pagealloc(mem,
-                                                               allocorder);
+                                               devm_get_free_pages(
+                                                       dev, gfp_mask,
+                                                       allocorder);
+
                                        if (!wr_salami)
                                                goto memfail;
                                        left_of_wr_salami = allocsize;
                                }
 
-                               dma_addr = ep->ephw->map_single(
-                                       mem,
-                                       ep,
-                                       wr_salami,
-                                       bytebufsize,
-                                       DMA_FROM_DEVICE);
+                               rc = ep->ephw->map_single(ep, wr_salami,
+                                                         bytebufsize,
+                                                         DMA_FROM_DEVICE,
+                                                         &dma_addr);
 
-                               if (!dma_addr)
+                               if (rc)
                                        goto dmafail;
 
                                iowrite32(
@@ -654,8 +586,8 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
                                        }
 
                                        rd_salami = (void *)
-                                               xilly_pagealloc(
-                                                       mem,
+                                               devm_get_free_pages(
+                                                       dev, gfp_mask,
                                                        allocorder);
 
                                        if (!rd_salami)
@@ -663,14 +595,13 @@ static int xilly_setupchannels(struct xilly_endpoint *ep,
                                        left_of_rd_salami = allocsize;
                                }
 
-                               dma_addr = ep->ephw->map_single(
-                                       mem,
-                                       ep,
-                                       rd_salami,
-                                       bytebufsize,
-                                       DMA_TO_DEVICE);
 
-                               if (!dma_addr)
+                               rc = ep->ephw->map_single(ep, rd_salami,
+                                                         bytebufsize,
+                                                         DMA_TO_DEVICE,
+                                                         &dma_addr);
+
+                               if (rc)
                                        goto dmafail;
 
                                iowrite32(
@@ -712,7 +643,7 @@ memfail:
        return -ENOMEM;
 dmafail:
        dev_err(ep->dev, "Failed to map DMA memory!. Aborting.\n");
-       return -ENOMEM;
+       return rc;
 }
 
 static void xilly_scan_idt(struct xilly_endpoint *endpoint,
@@ -2103,9 +2034,6 @@ struct xilly_endpoint *xillybus_init_endpoint(struct pci_dev *pdev,
        endpoint->pdev = pdev;
        endpoint->dev = dev;
        endpoint->ephw = ephw;
-       INIT_LIST_HEAD(&endpoint->cleanup.to_kfree);
-       INIT_LIST_HEAD(&endpoint->cleanup.to_pagefree);
-       INIT_LIST_HEAD(&endpoint->cleanup.to_unmap);
        endpoint->msg_counter = 0x0b;
        endpoint->failed_messages = 0;
        endpoint->fatal_error = 0;
@@ -2131,7 +2059,7 @@ static int xilly_quiesce(struct xilly_endpoint *endpoint)
 
        if (endpoint->idtlen < 0) {
                dev_err(endpoint->dev,
-                       "Failed to quiesce the device on exit. Quitting while leaving a mess.\n");
+                       "Failed to quiesce the device on exit.\n");
                return -ENODEV;
        }
        return 0; /* Success */
@@ -2141,8 +2069,9 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
 {
        int rc = 0;
 
-       struct xilly_cleanup tmpmem;
+       void *bootstrap_resources;
        int idtbuffersize = (1 << PAGE_SHIFT);
+       struct device *dev = endpoint->dev;
 
        /*
         * The bogus IDT is used during bootstrap for allocating the initial
@@ -2155,10 +2084,6 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
                                       3, 192, PAGE_SHIFT, 0 };
        struct xilly_idt_handle idt_handle;
 
-       INIT_LIST_HEAD(&tmpmem.to_kfree);
-       INIT_LIST_HEAD(&tmpmem.to_pagefree);
-       INIT_LIST_HEAD(&tmpmem.to_unmap);
-
        /*
         * Writing the value 0x00000001 to Endianness register signals which
         * endianness this processor is using, so the FPGA can swap words as
@@ -2170,12 +2095,16 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
 
        /* Bootstrap phase I: Allocate temporary message buffer */
 
+       bootstrap_resources = devres_open_group(dev, NULL, GFP_KERNEL);
+       if (!bootstrap_resources)
+               return -ENOMEM;
+
        endpoint->num_channels = 0;
 
-       rc = xilly_setupchannels(endpoint, &tmpmem, bogus_idt, 1);
+       rc = xilly_setupchannels(endpoint, bogus_idt, 1);
 
        if (rc)
-               goto failed_buffers;
+               return rc;
 
        /* Clear the message subsystem (and counter in particular) */
        iowrite32(0x04, &endpoint->registers[fpga_msg_ctrl_reg]);
@@ -2199,8 +2128,7 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
 
        if (endpoint->idtlen < 0) {
                dev_err(endpoint->dev, "No response from FPGA. Aborting.\n");
-               rc = -ENODEV;
-               goto failed_quiesce;
+               return -ENODEV;
        }
 
        /* Enable DMA */
@@ -2216,7 +2144,7 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
 
        endpoint->num_channels = 1;
 
-       rc = xilly_setupchannels(endpoint, &tmpmem, bogus_idt, 2);
+       rc = xilly_setupchannels(endpoint, bogus_idt, 2);
 
        if (rc)
                goto failed_idt;
@@ -2234,10 +2162,12 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
                rc = -ENODEV;
                goto failed_idt;
        }
+
+       devres_close_group(dev, bootstrap_resources);
+
        /* Bootstrap phase III: Allocate buffers according to IDT */
 
        rc = xilly_setupchannels(endpoint,
-                                &endpoint->cleanup,
                                 idt_handle.chandesc,
                                 idt_handle.entries);
 
@@ -2260,7 +2190,7 @@ int xillybus_endpoint_discovery(struct xilly_endpoint *endpoint)
        if (rc)
                goto failed_chrdevs;
 
-       xillybus_do_cleanup(&tmpmem, endpoint);
+       devres_release_group(dev, bootstrap_resources);
 
        return 0;
 
@@ -2270,16 +2200,8 @@ failed_chrdevs:
        mutex_unlock(&ep_list_lock);
 
 failed_idt:
-       /* Quiesce the device. Now it's serious to do it */
-       rc = xilly_quiesce(endpoint);
-
-       if (rc)
-               return rc; /* FPGA may still DMA, so no release */
-
+       xilly_quiesce(endpoint);
        flush_workqueue(xillybus_wq);
-failed_quiesce:
-failed_buffers:
-       xillybus_do_cleanup(&tmpmem, endpoint);
 
        return rc;
 }
index 46ea010b4ac65afc7eadc1d016bb062ddd01dce9..e0ae2346b8202afbca43341cedd48c4244a3c2eb 100644 (file)
@@ -62,44 +62,53 @@ static void xilly_dma_sync_single_nop(struct xilly_endpoint *ep,
 {
 }
 
-static dma_addr_t xilly_map_single_of(struct xilly_cleanup *mem,
-                                     struct xilly_endpoint *ep,
-                                     void *ptr,
-                                     size_t size,
-                                     int direction
-       )
+static void xilly_of_unmap(void *ptr)
 {
+       struct xilly_mapping *data = ptr;
 
-       dma_addr_t addr = 0;
-       struct xilly_dma *this;
+       dma_unmap_single(data->device, data->dma_addr,
+                        data->size, data->direction);
+
+       kfree(ptr);
+}
+
+static int xilly_map_single_of(struct xilly_endpoint *ep,
+                              void *ptr,
+                              size_t size,
+                              int direction,
+                              dma_addr_t *ret_dma_handle
+       )
+{
+       dma_addr_t addr;
+       struct xilly_mapping *this;
+       int rc;
 
-       this = kmalloc(sizeof(struct xilly_dma), GFP_KERNEL);
+       this = kzalloc(sizeof(*this), GFP_KERNEL);
        if (!this)
-               return 0;
+               return -ENOMEM;
 
        addr = dma_map_single(ep->dev, ptr, size, direction);
-       this->direction = direction;
 
        if (dma_mapping_error(ep->dev, addr)) {
                kfree(this);
-               return 0;
+               return -ENODEV;
        }
 
+       this->device = ep->dev;
        this->dma_addr = addr;
-       this->dev = ep->dev;
        this->size = size;
+       this->direction = direction;
 
-       list_add_tail(&this->node, &mem->to_unmap);
+       *ret_dma_handle = addr;
 
-       return addr;
-}
+       rc = devm_add_action(ep->dev, xilly_of_unmap, this);
 
-static void xilly_unmap_single_of(struct xilly_dma *entry)
-{
-       dma_unmap_single(entry->dev,
-                        entry->dma_addr,
-                        entry->size,
-                        entry->direction);
+       if (rc) {
+               dma_unmap_single(ep->dev, addr, size, direction);
+               kfree(this);
+       }
+
+       return rc;
 }
 
 static struct xilly_endpoint_hardware of_hw = {
@@ -107,7 +116,6 @@ static struct xilly_endpoint_hardware of_hw = {
        .hw_sync_sgl_for_cpu = xilly_dma_sync_single_for_cpu_of,
        .hw_sync_sgl_for_device = xilly_dma_sync_single_for_device_of,
        .map_single = xilly_map_single_of,
-       .unmap_single = xilly_unmap_single_of
 };
 
 static struct xilly_endpoint_hardware of_hw_coherent = {
@@ -115,7 +123,6 @@ static struct xilly_endpoint_hardware of_hw_coherent = {
        .hw_sync_sgl_for_cpu = xilly_dma_sync_single_nop,
        .hw_sync_sgl_for_device = xilly_dma_sync_single_nop,
        .map_single = xilly_map_single_of,
-       .unmap_single = xilly_unmap_single_of
 };
 
 static int xilly_drv_probe(struct platform_device *op)
@@ -138,12 +145,6 @@ static int xilly_drv_probe(struct platform_device *op)
        dev_set_drvdata(dev, endpoint);
 
        rc = of_address_to_resource(dev->of_node, 0, &res);
-       if (rc) {
-               dev_warn(endpoint->dev,
-                        "Failed to obtain device tree resource\n");
-               return rc;
-       }
-
        endpoint->registers = devm_ioremap_resource(dev, &res);
 
        if (IS_ERR(endpoint->registers))
@@ -159,14 +160,7 @@ static int xilly_drv_probe(struct platform_device *op)
                return -ENODEV;
        }
 
-       rc = xillybus_endpoint_discovery(endpoint);
-
-       if (!rc)
-               return 0;
-
-       xillybus_do_cleanup(&endpoint->cleanup, endpoint);
-
-       return rc;
+       return xillybus_endpoint_discovery(endpoint);
 }
 
 static int xilly_drv_remove(struct platform_device *op)
@@ -176,8 +170,6 @@ static int xilly_drv_remove(struct platform_device *op)
 
        xillybus_endpoint_remove(endpoint);
 
-       xillybus_do_cleanup(&endpoint->cleanup, endpoint);
-
        return 0;
 }
 
index a4fe51c90e92f3858b333b45899d837e92821f34..96c2c9f67e0c4fae6d998810723037b1b0efac67 100644 (file)
@@ -72,52 +72,62 @@ static void xilly_dma_sync_single_for_device_pci(struct xilly_endpoint *ep,
                                       xilly_pci_direction(direction));
 }
 
+static void xilly_pci_unmap(void *ptr)
+{
+       struct xilly_mapping *data = ptr;
+
+       pci_unmap_single(data->device, data->dma_addr,
+                        data->size, data->direction);
+
+       kfree(ptr);
+}
+
 /*
  * Map either through the PCI DMA mapper or the non_PCI one. Behind the
  * scenes exactly the same functions are called with the same parameters,
  * but that can change.
  */
 
-static dma_addr_t xilly_map_single_pci(struct xilly_cleanup *mem,
-                                      struct xilly_endpoint *ep,
-                                      void *ptr,
-                                      size_t size,
-                                      int direction
+static int xilly_map_single_pci(struct xilly_endpoint *ep,
+                               void *ptr,
+                               size_t size,
+                               int direction,
+                               dma_addr_t *ret_dma_handle
        )
 {
-
-       dma_addr_t addr = 0;
-       struct xilly_dma *this;
        int pci_direction;
+       dma_addr_t addr;
+       struct xilly_mapping *this;
+       int rc = 0;
 
-       this = kmalloc(sizeof(struct xilly_dma), GFP_KERNEL);
+       this = kzalloc(sizeof(*this), GFP_KERNEL);
        if (!this)
-               return 0;
+               return -ENOMEM;
 
        pci_direction = xilly_pci_direction(direction);
+
        addr = pci_map_single(ep->pdev, ptr, size, pci_direction);
-       this->direction = pci_direction;
 
        if (pci_dma_mapping_error(ep->pdev, addr)) {
                kfree(this);
-               return 0;
+               return -ENODEV;
        }
 
+       this->device = ep->pdev;
        this->dma_addr = addr;
-       this->pdev = ep->pdev;
        this->size = size;
+       this->direction = pci_direction;
 
-       list_add_tail(&this->node, &mem->to_unmap);
+       *ret_dma_handle = addr;
 
-       return addr;
-}
+       rc = devm_add_action(ep->dev, xilly_pci_unmap, this);
 
-static void xilly_unmap_single_pci(struct xilly_dma *entry)
-{
-       pci_unmap_single(entry->pdev,
-                        entry->dma_addr,
-                        entry->size,
-                        entry->direction);
+       if (rc) {
+               pci_unmap_single(ep->pdev, addr, size, pci_direction);
+               kfree(this);
+       }
+
+       return rc;
 }
 
 static struct xilly_endpoint_hardware pci_hw = {
@@ -125,7 +135,6 @@ static struct xilly_endpoint_hardware pci_hw = {
        .hw_sync_sgl_for_cpu = xilly_dma_sync_single_for_cpu_pci,
        .hw_sync_sgl_for_device = xilly_dma_sync_single_for_device_pci,
        .map_single = xilly_map_single_pci,
-       .unmap_single = xilly_unmap_single_pci
 };
 
 static int xilly_probe(struct pci_dev *pdev,
@@ -199,14 +208,7 @@ static int xilly_probe(struct pci_dev *pdev,
                return -ENODEV;
        }
 
-       rc = xillybus_endpoint_discovery(endpoint);
-
-       if (!rc)
-               return 0;
-
-       xillybus_do_cleanup(&endpoint->cleanup, endpoint);
-
-       return rc;
+       return xillybus_endpoint_discovery(endpoint);
 }
 
 static void xilly_remove(struct pci_dev *pdev)
@@ -214,8 +216,6 @@ static void xilly_remove(struct pci_dev *pdev)
        struct xilly_endpoint *endpoint = pci_get_drvdata(pdev);
 
        xillybus_endpoint_remove(endpoint);
-
-       xillybus_do_cleanup(&endpoint->cleanup, endpoint);
 }
 
 MODULE_DEVICE_TABLE(pci, xillyids);
diff --git a/include/linux/iio/accel/kxcjk_1013.h b/include/linux/iio/accel/kxcjk_1013.h
new file mode 100644 (file)
index 0000000..fd1d540
--- /dev/null
@@ -0,0 +1,22 @@
+/*
+ * KXCJK-1013 3-axis accelerometer Interface
+ * Copyright (c) 2014, Intel Corporation.
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ */
+
+#ifndef __IIO_KXCJK_1013_H__
+#define __IIO_KXCJK_1013_H__
+
+struct kxcjk_1013_platform_data {
+       bool active_high_intr;
+};
+
+#endif
index 369cf2cd51448b690cb812e6310cbd450ab83386..4b79ffe7b18868a65e95849ad128e5f096760cb7 100644 (file)
@@ -129,12 +129,11 @@ void iio_trigger_unregister(struct iio_trigger *trig_info);
 /**
  * iio_trigger_poll() - called on a trigger occurring
  * @trig:      trigger which occurred
- * @time:      timestamp when trigger occurred
  *
  * Typically called in relevant hardware interrupt handler.
  **/
-void iio_trigger_poll(struct iio_trigger *trig, s64 time);
-void iio_trigger_poll_chained(struct iio_trigger *trig, s64 time);
+void iio_trigger_poll(struct iio_trigger *trig);
+void iio_trigger_poll_chained(struct iio_trigger *trig);
 
 irqreturn_t iio_trigger_generic_data_rdy_poll(int irq, void *private);
 
index 88c9c65a430dadd15db4e1c08f7819f6e8bd2f80..a53ba0ba6a1bb4f27907f0f9bb57df5678373a94 100644 (file)
@@ -71,7 +71,7 @@ struct rtc_device *alarmtimer_get_rtcdev(void)
 
        return ret;
 }
-
+EXPORT_SYMBOL_GPL(alarmtimer_get_rtcdev);
 
 static int alarmtimer_rtc_add_device(struct device *dev,
                                struct class_interface *class_intf)